diff --git a/chatfiles-ui/.dockerignore b/.dockerignore similarity index 100% rename from chatfiles-ui/.dockerignore rename to .dockerignore diff --git a/chatfiles-ui/.eslintrc.json b/.eslintrc.json similarity index 100% rename from chatfiles-ui/.eslintrc.json rename to .eslintrc.json diff --git a/.gitignore b/.gitignore index cdb9fc2..d576bc6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,46 @@ -.idea +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ +/dist + +# production +/build + +# misc .DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts +.idea + +public/uploads/* + .env + +/tmp + docker-compose-local.yml \ No newline at end of file diff --git a/chatfiles-ui/Dockerfile b/Dockerfile similarity index 100% rename from chatfiles-ui/Dockerfile rename to Dockerfile diff --git a/README.md b/README.md index 2a2a625..adf8297 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,10 @@ [![My Skills](https://skillicons.dev/icons?i=nextjs,tailwind,react,python,flask)](https://skillicons.dev)Buy Me A Coffee -> ⚠️⚠️⚠️ Warning: Please understand that the https://chatfiles-ui.fly.dev web demo is temporarily unavailable as used up all the credits available in my free trial. and I am unable to recharge. If necessary, please run it locally yourself. Thanks. - # ChatFiles EN | [中文文档](README.zh.md) -> this repository use [jerryjliu/llama_index](https://github.com/jerryjliu/llama_index), based on [mckaywrigley/chatbot-ui](https://github.com/mckaywrigley/chatbot-ui), inspired by [madawei2699/myGPTReader](https://github.com/madawei2699/myGPTReader) +> this repository use [hwchase17/langchainjs](https://github.com/hwchase17/langchainjs), based on [mckaywrigley/chatbot-ui](https://github.com/mckaywrigley/chatbot-ui) ![Chatfiles](./doc/chatfiles.png) @@ -15,8 +13,6 @@ EN | [中文文档](README.zh.md) ## How to use it -Open https://chatfiles-ui.fly.dev and chat with [Good Example](./doc/Example.md) - ### How to run locally without limited 1. clone this repository. 2. create a .env file on root path. @@ -40,28 +36,11 @@ open browser with http://localhost:3000 ### chatfiles-ui ```shell -cd chatfiles-ui npm install npm run dev ``` -### chatfiles -```shell -cd chatfiles -``` - -create a file named .env with value(OPENAI_API_KEY=your token) - -```shell -python3 server.py -``` - -### how to deploy flyio -- [Deploy to fly.io](./doc/deploy-flyio.md) - - ## Feature - [x] Chat with GPT-3.5 -- [x] Chat with file by llama_index -- [x] Upload multiple files to one index, chat with multiple files. \ No newline at end of file +- [x] Chat with file by langchainjs \ No newline at end of file diff --git a/README.zh.md b/README.zh.md index 0563b84..3c47042 100644 --- a/README.zh.md +++ b/README.zh.md @@ -1,13 +1,9 @@ [![My Skills](https://skillicons.dev/icons?i=nextjs,tailwind,react,python,flask)](https://skillicons.dev)Buy Me A Coffee -> ⚠️⚠️⚠️警告:由于我的 Openai key 额度已用完,并且我无法充值,网页 demo 暂时无法服务。如果有需要,请自行在本地运行。感谢。 - # ChatFiles **上传文件然后与之对话.** ## 如何使用 - -浏览器打开:https://chatfiles-ui.fly.dev 。 上传文件对话,可以看看这些好的例子: [Good Example](./doc/Example.md) ### 如何无限制的本地运行 @@ -30,28 +26,13 @@ docker compose up 直接发送消息,而无需上传文件。 ## 如何本地运行 -### chatfiles-ui +### chatfiles ```shell -cd chatfiles-ui npm install npm run dev ``` -### chatfiles -```shell -cd chatfiles -``` - -创建一个名为 .env的文件,里面设置值为(OPENAI_API_KEY=your token) - -```shell -python3 server.py -``` - -## 如何部署到 fly.io -- [Deploy to fly.io](./doc/deploy-flyio.md) - ## 功能 - [x] 与 GPT-3.5 对话。 diff --git a/chatfiles-ui/.gitignore b/chatfiles-ui/.gitignore deleted file mode 100644 index 13f1a97..0000000 --- a/chatfiles-ui/.gitignore +++ /dev/null @@ -1,38 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# next.js -/.next/ -/out/ -/dist - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts -.idea diff --git a/chatfiles-ui/LICENSE b/chatfiles-ui/LICENSE deleted file mode 100644 index b822e41..0000000 --- a/chatfiles-ui/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 liguangzheng - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/chatfiles-ui/README.md b/chatfiles-ui/README.md deleted file mode 100644 index f780f5a..0000000 --- a/chatfiles-ui/README.md +++ /dev/null @@ -1 +0,0 @@ -# ChatFiles \ No newline at end of file diff --git a/chatfiles-ui/components/Sidebar/Key.tsx b/chatfiles-ui/components/Sidebar/Key.tsx deleted file mode 100644 index 1ca74ae..0000000 --- a/chatfiles-ui/components/Sidebar/Key.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { IconCheck, IconKey, IconX } from '@tabler/icons-react'; -import { FC, KeyboardEvent, useState } from 'react'; -import { useTranslation } from 'next-i18next'; -import { SidebarButton } from './SidebarButton'; - -interface Props { - apiKey: string; - onApiKeyChange: (apiKey: string) => void; -} - -export const Key: FC = ({ apiKey, onApiKeyChange }) => { - const { t } = useTranslation('sidebar'); - const [isChanging, setIsChanging] = useState(false); - const [newKey, setNewKey] = useState(apiKey); - - const handleEnterDown = (e: KeyboardEvent) => { - if (e.key === 'Enter') { - e.preventDefault(); - handleUpdateKey(newKey); - } - }; - - const handleUpdateKey = (newKey: string) => { - onApiKeyChange(newKey.trim()); - setIsChanging(false); - }; - - return isChanging ? ( -
- - - setNewKey(e.target.value)} - onKeyDown={handleEnterDown} - placeholder={t('API Key') || 'API Key'} - /> - -
- { - e.stopPropagation(); - handleUpdateKey(newKey); - }} - /> - - { - e.stopPropagation(); - setIsChanging(false); - setNewKey(apiKey); - }} - /> -
-
- ) : ( - } - onClick={() => setIsChanging(true)} - /> - ); -}; diff --git a/chatfiles-ui/pages/api/chat.ts b/chatfiles-ui/pages/api/chat.ts deleted file mode 100644 index 6dfedda..0000000 --- a/chatfiles-ui/pages/api/chat.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { ChatBody, Message, OpenAIModelID } from '@/types'; -import { DEFAULT_SYSTEM_PROMPT } from '@/utils/app/const'; -import { OpenAIStream } from '@/utils/server'; -import tiktokenModel from '@dqbd/tiktoken/encoders/cl100k_base.json'; -import { init, Tiktoken } from '@dqbd/tiktoken/lite/init'; -// @ts-expect-error -import wasm from '../../node_modules/@dqbd/tiktoken/lite/tiktoken_bg.wasm?module'; - -export const config = { - runtime: 'edge', -}; - -const handler = async (req: Request): Promise => { - try { - const { model, messages, key, prompt } = (await req.json()) as ChatBody; - - await init((imports) => WebAssembly.instantiate(wasm, imports)); - const encoding = new Tiktoken( - tiktokenModel.bpe_ranks, - tiktokenModel.special_tokens, - tiktokenModel.pat_str, - ); - - const tokenLimit = model.id === OpenAIModelID.GPT_4 ? 6000 : 3000; - - let promptToSend = prompt; - if (!promptToSend) { - promptToSend = DEFAULT_SYSTEM_PROMPT; - } - - const prompt_tokens = encoding.encode(promptToSend); - - let tokenCount = prompt_tokens.length; - let messagesToSend: Message[] = []; - - for (let i = messages.length - 1; i >= 0; i--) { - const message = messages[i]; - const tokens = encoding.encode(message.content); - - if (tokenCount + tokens.length > tokenLimit) { - break; - } - tokenCount += tokens.length; - messagesToSend = [message, ...messagesToSend]; - } - - encoding.free(); - - const stream = await OpenAIStream(model, promptToSend, key, messagesToSend); - - return new Response(stream); - } catch (error) { - console.error(error); - return new Response('Error', { status: 500 }); - } -}; - -export default handler; diff --git a/chatfiles-ui/pages/api/models.ts b/chatfiles-ui/pages/api/models.ts deleted file mode 100644 index 8e5f840..0000000 --- a/chatfiles-ui/pages/api/models.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { OpenAIModel, OpenAIModelID, OpenAIModels } from '@/types'; -import { OPENAI_API_HOST } from '@/utils/app/const'; - -export const config = { - runtime: 'edge', -}; - -const handler = async (req: Request): Promise => { - try { - const { key } = (await req.json()) as { - key: string; - }; - - const response = await fetch(`${OPENAI_API_HOST}/v1/models`, { - headers: { - 'Content-Type': 'application/json', - Authorization: `Bearer ${key ? key : process.env.OPENAI_API_KEY}`, - }, - }); - - if (response.status === 401) { - return new Response(response.body, { - status: 500, - headers: response.headers, - }); - } else if (response.status !== 200) { - console.error( - `OpenAI API returned an error ${ - response.status - }: ${await response.text()}`, - ); - throw new Error('OpenAI API returned an error'); - } - - const json = await response.json(); - - const models: OpenAIModel[] = json.data - .map((model: any) => { - for (const [key, value] of Object.entries(OpenAIModelID)) { - if (value === model.id) { - return { - id: model.id, - name: OpenAIModels[value].name, - }; - } - } - }) - .filter(Boolean); - - return new Response(JSON.stringify(models), { status: 200 }); - } catch (error) { - console.error(error); - return new Response('Error', { status: 500 }); - } -}; - -export default handler; diff --git a/chatfiles-ui/pages/api/query.ts b/chatfiles-ui/pages/api/query.ts deleted file mode 100644 index 9d5da34..0000000 --- a/chatfiles-ui/pages/api/query.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type {NextApiRequest, NextApiResponse} from 'next' -import fetch from "node-fetch"; -import {CHAT_FILES_SERVER_HOST} from "@/utils/app/const"; - -export const config = { - api: { - bodyParser: false, - } -}; - -const handler = async (req: NextApiRequest, res: NextApiResponse) => { - console.log("beginning handler"); - - const message: string = req.query.message as string; - const indexName: string = req.query.indexName as string; - const indexType: string = req.query.indexType as string; - - console.log("handler chatfile query: ", message, indexName); - - if (message && indexName) { - const response = await fetch(`${CHAT_FILES_SERVER_HOST}/query?message=${message}&indexName=${indexName}&indexType=${indexType}`, { - method: 'Get' - }); - - const result = await response.text(); - res.status(200).json(result); - } -} - -export default handler; \ No newline at end of file diff --git a/chatfiles-ui/pages/api/upload.ts b/chatfiles-ui/pages/api/upload.ts deleted file mode 100644 index 2e2057f..0000000 --- a/chatfiles-ui/pages/api/upload.ts +++ /dev/null @@ -1,45 +0,0 @@ -import type {NextApiRequest, NextApiResponse} from 'next' -import fs from "fs"; -import fetch from "node-fetch"; -import FormData from 'form-data'; -import {IncomingForm} from 'formidable'; -import {CHAT_FILES_SERVER_HOST} from "@/utils/app/const"; -import {LlamaIndex} from "@/types"; - -export const config = { - api: { - bodyParser: false, - } -}; - -const handler = async (req: NextApiRequest, res: NextApiResponse) => { - console.log("beginning handler"); - - const fData = await new Promise<{ fields: any, files: any }>((resolve, reject) => { - const form = new IncomingForm({ - multiples: false - }) - form.parse(req, (err, fields, files) => { - if (err) return reject(err) - resolve({ fields, files }) - }) - }); - - if (fData?.files.file) { - const uploadFile = fData.files.file; - const formData = new FormData(); - - formData.append('file', fs.createReadStream(uploadFile.filepath), uploadFile.originalFilename) - - await fetch(`${CHAT_FILES_SERVER_HOST}/upload`, { - method: 'POST', - body: formData - }).then(res => res.json()) - .then((data) => { - res.status(200).json(data) - }); - - } -} - -export default handler; \ No newline at end of file diff --git a/chatfiles-ui/pages/index.tsx b/chatfiles-ui/pages/index.tsx deleted file mode 100644 index c191e25..0000000 --- a/chatfiles-ui/pages/index.tsx +++ /dev/null @@ -1,647 +0,0 @@ -import { Chat } from '@/components/Chat/Chat'; -import { Navbar } from '@/components/Mobile/Navbar'; -import { Sidebar } from '@/components/Sidebar/Sidebar'; -import { - ChatBody, - ChatFolder, - Conversation, - ErrorMessage, - KeyValuePair, - Message, - OpenAIModel, - OpenAIModelID, - OpenAIModels, -} from '@/types'; -import { - cleanConversationHistory, - cleanSelectedConversation, -} from '@/utils/app/clean'; -import { DEFAULT_SYSTEM_PROMPT } from '@/utils/app/const'; -import { - saveConversation, - saveConversations, - updateConversation, -} from '@/utils/app/conversation'; -import { saveFolders } from '@/utils/app/folders'; -import { exportData, importData } from '@/utils/app/importExport'; -import { IconArrowBarLeft, IconArrowBarRight } from '@tabler/icons-react'; -import { GetServerSideProps } from 'next'; -import Head from 'next/head'; -import { useEffect, useRef, useState } from 'react'; -import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; -import { useTranslation } from 'next-i18next'; - -interface HomeProps { - serverSideApiKeyIsSet: boolean; -} - -const Home: React.FC = ({ serverSideApiKeyIsSet }) => { - const { t } = useTranslation('chat'); - const [folders, setFolders] = useState([]); - const [conversations, setConversations] = useState([]); - const [selectedConversation, setSelectedConversation] = - useState(); - const [loading, setLoading] = useState(false); - const [models, setModels] = useState([]); - const [lightMode, setLightMode] = useState<'dark' | 'light'>('dark'); - const [messageIsStreaming, setMessageIsStreaming] = useState(false); - const [showSidebar, setShowSidebar] = useState(true); - const [apiKey, setApiKey] = useState(''); - const [messageError, setMessageError] = useState(false); - const [modelError, setModelError] = useState(null); - const [currentMessage, setCurrentMessage] = useState(); - - const stopConversationRef = useRef(false); - - const handleSend = async (message: Message, deleteCount = 0) => { - if (selectedConversation) { - let updatedConversation: Conversation; - - if (deleteCount) { - const updatedMessages = [...selectedConversation.messages]; - for (let i = 0; i < deleteCount; i++) { - updatedMessages.pop(); - } - - updatedConversation = { - ...selectedConversation, - messages: [...updatedMessages, message], - }; - } else { - updatedConversation = { - ...selectedConversation, - messages: [...selectedConversation.messages, message], - }; - } - - setSelectedConversation(updatedConversation); - setLoading(true); - setMessageIsStreaming(true); - setMessageError(false); - - - if (updatedConversation.index.indexName.length === 0) { - const chatBody: ChatBody = { - model: updatedConversation.model, - messages: updatedConversation.messages, - key: apiKey, - prompt: updatedConversation.prompt, - }; - - const controller = new AbortController(); - const response = await fetch('/api/chat', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - signal: controller.signal, - body: JSON.stringify(chatBody), - }); - - if (!response.ok) { - setLoading(false); - setMessageIsStreaming(false); - setMessageError(true); - return; - } - - const data = response.body; - - if (!data) { - setLoading(false); - setMessageIsStreaming(false); - setMessageError(true); - - return; - } - - if (updatedConversation.messages.length === 1) { - const { content } = message; - const customName = - content.length > 30 ? content.substring(0, 30) + '...' : content; - - updatedConversation = { - ...updatedConversation, - name: customName, - }; - } - - setLoading(false); - - const reader = data.getReader(); - const decoder = new TextDecoder(); - let done = false; - let isFirst = true; - let text = ''; - - while (!done) { - if (stopConversationRef.current === true) { - controller.abort(); - done = true; - break; - } - const { value, done: doneReading } = await reader.read(); - done = doneReading; - const chunkValue = decoder.decode(value); - - text += chunkValue; - - if (isFirst) { - isFirst = false; - const updatedMessages: Message[] = [ - ...updatedConversation.messages, - { role: 'assistant', content: chunkValue }, - ]; - - updatedConversation = { - ...updatedConversation, - messages: updatedMessages, - }; - - setSelectedConversation(updatedConversation); - } else { - const updatedMessages: Message[] = updatedConversation.messages.map( - (message, index) => { - if (index === updatedConversation.messages.length - 1) { - return { - ...message, - content: text, - }; - } - - return message; - }, - ); - - updatedConversation = { - ...updatedConversation, - messages: updatedMessages, - }; - - setSelectedConversation(updatedConversation); - } - } - } else { - // send to chat file server - const response = await fetch( - `/api/query?message=${message.content}&indexName=${updatedConversation.index.indexName}&indexType=${updatedConversation.index.indexType}`, { - method: 'GET' - }); - - const answer = await response.json() as string; - - const updatedMessages: Message[] = [ - ...updatedConversation.messages, - { role: 'assistant', content: answer }, - ]; - - updatedConversation = { - ...updatedConversation, - messages: updatedMessages, - }; - - setLoading(false) - - setSelectedConversation(updatedConversation); - } - - - saveConversation(updatedConversation); - - const updatedConversations: Conversation[] = conversations.map( - (conversation) => { - if (conversation.id === selectedConversation.id) { - return updatedConversation; - } - - return conversation; - }, - ); - - if (updatedConversations.length === 0) { - updatedConversations.push(updatedConversation); - } - - setConversations(updatedConversations); - - saveConversations(updatedConversations); - - setMessageIsStreaming(false); - } - }; - - const fetchModels = async (key: string) => { - const error = { - title: t('Error fetching models.'), - code: null, - messageLines: [ - t( - 'Make sure your OpenAI API key is set in the bottom left of the sidebar.', - ), - t('If you completed this step, OpenAI may be experiencing issues.'), - ], - } as ErrorMessage; - - const response = await fetch('/api/models', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ - key, - }), - }); - - if (!response.ok) { - try { - const data = await response.json(); - Object.assign(error, { - code: data.error?.code, - messageLines: [data.error?.message], - }); - } catch (e) {} - setModelError(error); - return; - } - - const data = await response.json(); - - if (!data) { - setModelError(error); - return; - } - - setModels(data); - setModelError(null); - }; - - const handleLightMode = (mode: 'dark' | 'light') => { - setLightMode(mode); - localStorage.setItem('theme', mode); - }; - - const handleApiKeyChange = (apiKey: string) => { - setApiKey(apiKey); - localStorage.setItem('apiKey', apiKey); - }; - - const handleExportData = () => { - exportData(); - }; - - const handleImportConversations = (data: { - conversations: Conversation[]; - folders: ChatFolder[]; - }) => { - importData(data.conversations, data.folders); - setConversations(data.conversations); - setSelectedConversation(data.conversations[data.conversations.length - 1]); - setFolders(data.folders); - }; - - const handleSelectConversation = (conversation: Conversation) => { - setSelectedConversation(conversation); - saveConversation(conversation); - }; - - const handleCreateFolder = (name: string) => { - const lastFolder = folders[folders.length - 1]; - - const newFolder: ChatFolder = { - id: lastFolder ? lastFolder.id + 1 : 1, - name, - }; - - const updatedFolders = [...folders, newFolder]; - - setFolders(updatedFolders); - saveFolders(updatedFolders); - }; - - const handleDeleteFolder = (folderId: number) => { - const updatedFolders = folders.filter((f) => f.id !== folderId); - setFolders(updatedFolders); - saveFolders(updatedFolders); - - const updatedConversations: Conversation[] = conversations.map((c) => { - if (c.folderId === folderId) { - return { - ...c, - folderId: 0, - }; - } - - return c; - }); - setConversations(updatedConversations); - saveConversations(updatedConversations); - }; - - const handleUpdateFolder = (folderId: number, name: string) => { - const updatedFolders = folders.map((f) => { - if (f.id === folderId) { - return { - ...f, - name, - }; - } - - return f; - }); - - setFolders(updatedFolders); - saveFolders(updatedFolders); - }; - - const handleNewConversation = () => { - const lastConversation = conversations[conversations.length - 1]; - - const newConversation: Conversation = { - id: lastConversation ? lastConversation.id + 1 : 1, - name: `${t('Conversation')} ${ - lastConversation ? lastConversation.id + 1 : 1 - }`, - messages: [], - model: OpenAIModels[OpenAIModelID.GPT_3_5], - prompt: DEFAULT_SYSTEM_PROMPT, - folderId: 0, - index: { - indexName: '', - indexType: '', - }, - }; - - const updatedConversations = [...conversations, newConversation]; - - setSelectedConversation(newConversation); - setConversations(updatedConversations); - - saveConversation(newConversation); - saveConversations(updatedConversations); - - setLoading(false); - }; - - const handleDeleteConversation = (conversation: Conversation) => { - const updatedConversations = conversations.filter( - (c) => c.id !== conversation.id, - ); - setConversations(updatedConversations); - saveConversations(updatedConversations); - - if (updatedConversations.length > 0) { - setSelectedConversation( - updatedConversations[updatedConversations.length - 1], - ); - saveConversation(updatedConversations[updatedConversations.length - 1]); - } else { - setSelectedConversation({ - id: 1, - name: 'New conversation', - messages: [], - model: OpenAIModels[OpenAIModelID.GPT_3_5], - prompt: DEFAULT_SYSTEM_PROMPT, - folderId: 0, - index: { - indexName: '', - indexType: '', - }, - }); - localStorage.removeItem('selectedConversation'); - } - }; - - const handleUpdateConversation = ( - conversation: Conversation, - data: KeyValuePair, - ) => { - const updatedConversation = { - ...conversation, - [data.key]: data.value, - }; - - const { single, all } = updateConversation( - updatedConversation, - conversations, - ); - - setSelectedConversation(single); - setConversations(all); - }; - - const handleClearConversations = () => { - setConversations([]); - localStorage.removeItem('conversationHistory'); - - setSelectedConversation({ - id: 1, - name: 'New conversation', - messages: [], - model: OpenAIModels[OpenAIModelID.GPT_3_5], - prompt: DEFAULT_SYSTEM_PROMPT, - folderId: 0, - index: { - indexName: '', - indexType: '', - }, - }); - localStorage.removeItem('selectedConversation'); - - setFolders([]); - localStorage.removeItem('folders'); - }; - - const handleEditMessage = (message: Message, messageIndex: number) => { - if (selectedConversation) { - const updatedMessages = selectedConversation.messages - .map((m, i) => { - if (i < messageIndex) { - return m; - } - }) - .filter((m) => m) as Message[]; - - const updatedConversation = { - ...selectedConversation, - messages: updatedMessages, - }; - - const { single, all } = updateConversation( - updatedConversation, - conversations, - ); - - setSelectedConversation(single); - setConversations(all); - - setCurrentMessage(message); - } - }; - - useEffect(() => { - if (currentMessage) { - handleSend(currentMessage); - setCurrentMessage(undefined); - } - }, [currentMessage]); - - useEffect(() => { - if (window.innerWidth < 640) { - setShowSidebar(false); - } - }, [selectedConversation]); - - useEffect(() => { - if (apiKey) { - fetchModels(apiKey); - } - }, [apiKey]); - - useEffect(() => { - const theme = localStorage.getItem('theme'); - if (theme) { - setLightMode(theme as 'dark' | 'light'); - } - - const apiKey = localStorage.getItem('apiKey'); - if (apiKey) { - setApiKey(apiKey); - fetchModels(apiKey); - } else if (serverSideApiKeyIsSet) { - fetchModels(''); - } - - if (window.innerWidth < 640) { - setShowSidebar(false); - } - - const folders = localStorage.getItem('folders'); - if (folders) { - setFolders(JSON.parse(folders)); - } - - const conversationHistory = localStorage.getItem('conversationHistory'); - if (conversationHistory) { - const parsedConversationHistory: Conversation[] = - JSON.parse(conversationHistory); - const cleanedConversationHistory = cleanConversationHistory( - parsedConversationHistory, - ); - setConversations(cleanedConversationHistory); - } - - const selectedConversation = localStorage.getItem('selectedConversation'); - if (selectedConversation) { - const parsedSelectedConversation: Conversation = - JSON.parse(selectedConversation); - const cleanedSelectedConversation = cleanSelectedConversation( - parsedSelectedConversation, - ); - setSelectedConversation(cleanedSelectedConversation); - } else { - setSelectedConversation({ - id: 1, - name: 'New conversation', - messages: [], - model: OpenAIModels[OpenAIModelID.GPT_3_5], - prompt: DEFAULT_SYSTEM_PROMPT, - folderId: 0, - index: { - indexName: '', - indexType: '', - }, - }); - } - }, [serverSideApiKeyIsSet]); - - return ( - <> - - ChatFiles - - - - - {selectedConversation && ( -
-
- -
- -
- {showSidebar ? ( -
- setShowSidebar(!showSidebar)} - onUpdateConversation={handleUpdateConversation} - onApiKeyChange={handleApiKeyChange} - onClearConversations={handleClearConversations} - onExportConversations={handleExportData} - onImportConversations={handleImportConversations} - /> - -
setShowSidebar(!showSidebar)} - className="absolute top-0 left-0 z-10 h-full w-full bg-black opacity-70 sm:hidden" - >
-
- ) : ( - setShowSidebar(!showSidebar)} - /> - )} - - -
-
- )} - - ); -}; -export default Home; - -export const getServerSideProps: GetServerSideProps = async ({ locale }) => { - return { - props: { - serverSideApiKeyIsSet: !!process.env.OPENAI_API_KEY, - ...(await serverSideTranslations(locale ?? 'en', [ - 'common', - 'chat', - 'sidebar', - 'markdown', - ])), - }, - }; -}; diff --git a/chatfiles-ui/styles/globals.css b/chatfiles-ui/styles/globals.css deleted file mode 100644 index 586faf6..0000000 --- a/chatfiles-ui/styles/globals.css +++ /dev/null @@ -1,37 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -::-webkit-scrollbar-track { - background-color: transparent; -} - -::-webkit-scrollbar-thumb { - background-color: #ccc; - border-radius: 10px; -} - -::-webkit-scrollbar-thumb:hover { - background-color: #aaa; -} - -::-webkit-scrollbar-track:hover { - background-color: #f2f2f2; -} - -::-webkit-scrollbar-corner { - background-color: transparent; -} - -::-webkit-scrollbar { - width: 6px; - height: 6px; -} - -html { - background: #202123; -} - -pre:has(div.codeblock) { - padding: 0; -} diff --git a/chatfiles-ui/tailwind.config.js b/chatfiles-ui/tailwind.config.js deleted file mode 100644 index 093ee86..0000000 --- a/chatfiles-ui/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - './app/**/*.{js,ts,jsx,tsx}', - './pages/**/*.{js,ts,jsx,tsx}', - './components/**/*.{js,ts,jsx,tsx}', - "./node_modules/flowbite/**/*.js" - ], - darkMode: 'class', - theme: { - extend: {}, - }, - plugins: [require('@tailwindcss/typography'), require('flowbite/plugin')], -}; diff --git a/chatfiles-ui/utils/app/const.ts b/chatfiles-ui/utils/app/const.ts deleted file mode 100644 index 71cef9e..0000000 --- a/chatfiles-ui/utils/app/const.ts +++ /dev/null @@ -1,12 +0,0 @@ -export const DEFAULT_SYSTEM_PROMPT = - "You are ChatGPT, a large language model trained by OpenAI. Follow the user's instructions carefully. Respond using markdown."; - -export const OPENAI_API_HOST = - process.env.OPENAI_API_HOST || 'https://api.openai.com'; - -export const CHAT_FILES_SERVER_HOST = - process.env.CHAT_FILES_SERVER_HOST || 'http://127.0.0.1:5000'; - -export const CHAT_FILES_MAX_SIZE = - parseInt(process.env.NEXT_PUBLIC_CHAT_FILES_MAX_SIZE || '') || 0; - \ No newline at end of file diff --git a/chatfiles/.dockerignore b/chatfiles/.dockerignore deleted file mode 100644 index 04e3050..0000000 --- a/chatfiles/.dockerignore +++ /dev/null @@ -1,23 +0,0 @@ -# flyctl launch added from .gitignore -**/__pycache__ -**/*documents -**/*decompress -**/*pure - -# Environments -**/.env - -# flyctl launch added from .idea/.gitignore -# Default ignored files -.idea/shelf -.idea/workspace.xml -# Editor-based HTTP Client requests -.idea/httpRequests -# Datasource local storage ignored files -.idea/dataSources -.idea/dataSources.local.xml - -# flyctl launch added from pure/.gitignore -# created by virtualenv automatically -pure/**/* -fly.toml diff --git a/chatfiles/.env.sample b/chatfiles/.env.sample deleted file mode 100644 index ed92b4e..0000000 --- a/chatfiles/.env.sample +++ /dev/null @@ -1 +0,0 @@ -OPENAI_API_KEY='your_api_key' diff --git a/chatfiles/.gitignore b/chatfiles/.gitignore deleted file mode 100644 index a46c882..0000000 --- a/chatfiles/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -__pycache__/ -*documents -*decompress -*pure - -# Environments -.env \ No newline at end of file diff --git a/chatfiles/Dockerfile b/chatfiles/Dockerfile deleted file mode 100644 index ed00e18..0000000 --- a/chatfiles/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM python:3.8 - -WORKDIR /app - -COPY requirements.txt ./ - -RUN pip install -r requirements.txt - -COPY . . - -EXPOSE 5000 -CMD [ "python", "server.py"] \ No newline at end of file diff --git a/chatfiles/chat.py b/chatfiles/chat.py deleted file mode 100644 index 8726c56..0000000 --- a/chatfiles/chat.py +++ /dev/null @@ -1,37 +0,0 @@ -import uuid -from file import (check_index_file_exists, - get_index_name_from_file_path, get_index_name_from_compress_filepath) -from llm import get_index_by_index_name, create_index, create_graph, get_graph_by_graph_name -from prompt import get_prompt - - -def check_llama_index_exists(file_name): - index_name = get_index_name_from_file_path(file_name) - return check_index_file_exists(index_name) - - -def create_llama_index(filepath): - index_name = get_index_name_from_file_path(filepath) - index = create_index(filepath, index_name) - return index_name, index - - -def create_llama_graph_index(filepaths): - index_set = {} - for filepath in filepaths: - index_name = get_index_name_from_compress_filepath(filepath) - index = create_index(filepath, index_name) - index_set[index_name] = index - graph_name = str(uuid.uuid4()) - graph = create_graph(index_set, graph_name) - return graph_name, graph - - -def get_answer_from_index(text, index_name): - index = get_index_by_index_name(index_name) - return index.query(text, text_qa_template=get_prompt()) - - -def get_answer_from_graph(text, graph_name): - graph = get_graph_by_graph_name(graph_name) - return graph.query(text) diff --git a/chatfiles/file.py b/chatfiles/file.py deleted file mode 100644 index 93b45eb..0000000 --- a/chatfiles/file.py +++ /dev/null @@ -1,89 +0,0 @@ -import os -import zipfile -import tarfile -import rarfile -import py7zr -from pathlib import Path - -index_path = './documents' -index_file_dir = Path(index_path) - -compress_path = './decompress' -compress_file_dir = Path(compress_path) - - -def get_index_name_from_file_path(file_name): - file_with_type = str(Path(file_name).relative_to(index_file_dir).name) - file_index_name = file_with_type.split('.')[0].replace(" ", "") - return file_index_name - - -def get_index_name_from_compress_filepath(file_name): - file_with_type = str(Path(file_name).relative_to(compress_file_dir).name) - file_index_name = file_with_type.split('.')[0].replace(" ", "") - return file_index_name - - -def get_index_name_without_json_extension(index_name): - return index_name.replace(".json", "") - - -def get_name_with_json_extension(index_name): - return index_name + '.json' - - -def get_index_filepath(index_name): - return index_file_dir / index_name - - -def get_index_path(): - return index_path - - -def check_index_file_exists(index_name): - return get_index_filepath(index_name).is_file() - - -def check_index_exists(index_name): - index_name = get_name_with_json_extension(index_name) - return check_index_file_exists(index_name) - - -def clean_file(filepath): - if filepath is not None and os.path.exists(filepath): - os.remove(filepath) - - -def clean_files(filepaths): - for filepath in filepaths: - clean_file(filepath) - - -def check_file_is_compressed(file_name): - return file_name.endswith('.zip') or file_name.endswith('.tar.gz') or \ - file_name.endswith('.7z') or file_name.endswith('.rar') - - -def decompress_files_and_get_filepaths(uploaded_file): - file_name = uploaded_file.filename - if check_file_is_compressed(file_name) is False: - return None - else: - if file_name.endswith('.zip'): - with zipfile.ZipFile(uploaded_file, 'r') as zip_ref: - zip_ref.extractall(compress_path) - elif file_name.endswith('.tar.gz'): - with tarfile.open(fileobj=uploaded_file, mode='r:gz') as tar_ref: - tar_ref.extractall(compress_path) - elif file_name.endswith('.7z'): - with py7zr.SevenZipFile(uploaded_file, mode='r') as sz_ref: - sz_ref.extractall(compress_path) - elif file_name.endswith('.rar'): - with rarfile.RarFile(uploaded_file, 'r') as rar_ref: - rar_ref.extractall(compress_path) - return get_decompress_filepaths() - - -def get_decompress_filepaths(): - filepaths = [os.path.join(compress_path, f) for f in os.listdir(compress_path) if os.path.isfile(os.path.join(compress_path, f))] - return filepaths diff --git a/chatfiles/fly.toml b/chatfiles/fly.toml deleted file mode 100644 index e3d60fa..0000000 --- a/chatfiles/fly.toml +++ /dev/null @@ -1,26 +0,0 @@ -# fly.toml file generated for chatfiles-test on 2023-04-09T21:34:21+08:00 - -app = "chatfiles" -kill_signal = "SIGINT" -kill_timeout = 60 -mounts = [] -primary_region = "lax" -processes = [] - -[[services]] - internal_port = 5000 - processes = ["app"] - protocol = "tcp" - [services.concurrency] - hard_limit = 25 - soft_limit = 20 - type = "connections" - - [[services.ports]] - force_https = true - handlers = ["http"] - port = 80 - - [[services.ports]] - handlers = ["tls", "http"] - port = 443 diff --git a/chatfiles/llm.py b/chatfiles/llm.py deleted file mode 100644 index eddabc7..0000000 --- a/chatfiles/llm.py +++ /dev/null @@ -1,56 +0,0 @@ -import os -import openai -from langchain.chat_models import ChatOpenAI -from llama_index import ComposableGraph, GPTListIndex, LLMPredictor, GPTSimpleVectorIndex, ServiceContext, \ - SimpleDirectoryReader - -from file import check_index_file_exists, get_index_filepath, get_name_with_json_extension -from dotenv import load_dotenv - -load_dotenv() - -OPENAI_API_KEY = os.environ.get('OPENAI_API_KEY') -openai.api_key = OPENAI_API_KEY - -llm_predictor = LLMPredictor(llm=ChatOpenAI( - temperature=0.2, model_name="gpt-3.5-turbo")) - -service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor) - - -def create_index(filepath, index_name): - index = get_index_by_index_name(index_name) - if index is not None: - return index - - index_name = get_name_with_json_extension(index_name) - documents = SimpleDirectoryReader(input_files=[filepath]).load_data() - index = GPTSimpleVectorIndex.from_documents(documents) - index.save_to_disk(get_index_filepath(index_name)) - return index - - -def get_index_by_index_name(index_name): - index_name = get_name_with_json_extension(index_name) - if check_index_file_exists(index_name) is False: - return None - index_filepath = get_index_filepath(index_name) - index = GPTSimpleVectorIndex.load_from_disk(index_filepath, service_context=service_context) - return index - - -def create_graph(index_sets, graph_name): - graph_name = get_name_with_json_extension(graph_name) - graph = ComposableGraph.from_indices(GPTListIndex, - [index for _, index in index_sets.items()], - index_summaries=[f"This index contains {indexName}" for indexName, _ in index_sets.items()], - service_context=service_context) - graph.save_to_disk(get_index_filepath(graph_name)) - return graph - - -def get_graph_by_graph_name(graph_name): - graph_name = get_name_with_json_extension(graph_name) - graph_path = get_index_filepath(graph_name) - graph = ComposableGraph.load_from_disk(graph_path, service_context=service_context) - return graph diff --git a/chatfiles/prompt.py b/chatfiles/prompt.py deleted file mode 100644 index e6f1424..0000000 --- a/chatfiles/prompt.py +++ /dev/null @@ -1,14 +0,0 @@ -from llama_index.prompts.prompts import QuestionAnswerPrompt - -DEFAULT_PROMPT = ( - "We have provided context information below: \n" - "---------------------\n" - "{context_str}\n" - "---------------------\n" - "Given this information, Please answer my question in the same language that I used to ask you.\n" - "Please answer the question: {query_str}\n" -) - - -def get_prompt(): - return QuestionAnswerPrompt(DEFAULT_PROMPT) diff --git a/chatfiles/requirements.txt b/chatfiles/requirements.txt deleted file mode 100644 index 1a7d29b..0000000 --- a/chatfiles/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ -Flask==2.2.3 -langchain==0.0.139 -llama-index==0.5.15 -openai==0.27.4 -python-dotenv==1.0.0 -PyPDF2==3.0.1 -EbookLib==0.18 -docx2txt==0.8 -html2text==2020.1.16 -rarfile==4.0 -py7zr==0.20.5 diff --git a/chatfiles/server.py b/chatfiles/server.py deleted file mode 100644 index 9ae661e..0000000 --- a/chatfiles/server.py +++ /dev/null @@ -1,84 +0,0 @@ -import argparse -import os - -from flask import Flask, request, make_response - -from chat import create_llama_index, get_answer_from_index, check_llama_index_exists, get_answer_from_graph, \ - create_llama_graph_index - -from file import get_index_path, get_index_name_from_file_path, check_index_file_exists, \ - get_index_name_without_json_extension, clean_file, check_file_is_compressed, index_path, compress_path, \ - decompress_files_and_get_filepaths, clean_files, check_index_exists - -app = Flask(__name__) - - -@app.route('/upload', methods=['POST']) -def upload_file(): - if 'file' not in request.files: - return "Please send a POST request with a file", 400 - filepath = None - try: - uploaded_file = request.files["file"] - - filename = uploaded_file.filename - if check_file_is_compressed(filename) is False: - filepath = os.path.join(get_index_path(), os.path.basename(filename)) - - if check_llama_index_exists(filepath) is True: - return get_index_name_without_json_extension(get_index_name_from_file_path(filepath)) - - uploaded_file.save(filepath) - - index_name, index = create_llama_index(filepath) - - clean_file(filepath) - return make_response( - {"indexName": get_index_name_without_json_extension(index_name), "indexType": "index"}), 200 - - else: - filepaths = decompress_files_and_get_filepaths(uploaded_file) - if filepaths is not None: - graph_name, graph = create_llama_graph_index(filepaths) - - clean_files(filepaths) - return make_response( - {"indexName": get_index_name_without_json_extension(graph_name), "indexType": "graph"}), 200 - - except Exception as e: - # cleanup temp file - if filepath is not None and os.path.exists(filepath): - os.remove(filepath) - return "Error: {}".format(str(e)), 500 - - -@app.route('/query', methods=['GET']) -def query_from_llama_index(): - try: - message = request.args.get('message') - index_name = request.args.get('indexName') - index_type = request.args.get('indexType') - if check_index_exists(index_name) is False: - return "Index file does not exist", 404 - - if index_type == 'index': - answer = get_answer_from_index(message, index_name) - elif index_type == 'graph': - answer = get_answer_from_graph(message, index_name) - - return make_response(str(answer.response)), 200 - except Exception as e: - return "Error: {}".format(str(e)), 500 - - -if __name__ == '__main__': - parser = argparse.ArgumentParser(description="Chat Files") - parser.add_argument("--debug", action="store_true", help="Enable debug mode") - args = parser.parse_args() - if not os.path.exists(index_path): - os.makedirs(index_path) - if not os.path.exists(compress_path): - os.makedirs(compress_path) - if os.environ.get('CHAT_FILES_MAX_SIZE') is not None: - app.config['MAX_CONTENT_LENGTH'] = int(os.environ.get('CHAT_FILES_MAX_SIZE')) - app.run(port=5000, host='0.0.0.0', debug=args.debug) diff --git a/chatfiles-ui/components/Chat/Chat.tsx b/components/Chat/Chat.tsx similarity index 90% rename from chatfiles-ui/components/Chat/Chat.tsx rename to components/Chat/Chat.tsx index 40cd8a6..145d8d2 100644 --- a/chatfiles-ui/components/Chat/Chat.tsx +++ b/components/Chat/Chat.tsx @@ -1,4 +1,4 @@ -import {Conversation, ErrorMessage, KeyValuePair, Message, OpenAIModel,} from '@/types'; +import {Conversation, ErrorMessage, KeyConfiguration, KeyValuePair, Message, OpenAIModel,} from '@/types'; import {throttle} from '@/utils'; import {IconClearAll, IconSettings} from '@tabler/icons-react'; import {useTranslation} from 'next-i18next'; @@ -15,8 +15,7 @@ import {humanFileSize} from "@/utils/app/files"; interface Props { conversation: Conversation; models: OpenAIModel[]; - apiKey: string; - serverSideApiKeyIsSet: boolean; + keyConfiguration: KeyConfiguration; messageIsStreaming: boolean; modelError: ErrorMessage | null; messageError: boolean; @@ -34,8 +33,7 @@ export const Chat: FC = memo( ({ conversation, models, - apiKey, - serverSideApiKeyIsSet, + keyConfiguration, messageIsStreaming, modelError, loading, @@ -118,29 +116,7 @@ export const Chat: FC = memo( return (
- {!(apiKey || serverSideApiKeyIsSet) ? ( -
-
- {t('OpenAI API Key Required')} -
-
- {t( - 'Please set your OpenAI API key in the bottom left of the sidebar.', - )} -
-
- {t("If you don't have an OpenAI API key, you can get one here: ")} - - openai.com - -
-
- ) : modelError ? ( + { modelError ? ( ) : ( <> @@ -172,6 +148,7 @@ export const Chat: FC = memo( onUpdateConversation(conversation, { key: 'index', value: index,})} + keyConfiguration={keyConfiguration} handleIsUploading={handleIsUploading} handleIsUploadSuccess={handleIsUploadSuccess} handleUploadError={handleUploadError} diff --git a/chatfiles-ui/components/Chat/ChatInput.tsx b/components/Chat/ChatInput.tsx similarity index 100% rename from chatfiles-ui/components/Chat/ChatInput.tsx rename to components/Chat/ChatInput.tsx diff --git a/chatfiles-ui/components/Chat/ChatLoader.tsx b/components/Chat/ChatLoader.tsx similarity index 100% rename from chatfiles-ui/components/Chat/ChatLoader.tsx rename to components/Chat/ChatLoader.tsx diff --git a/chatfiles-ui/components/Chat/ChatMessage.tsx b/components/Chat/ChatMessage.tsx similarity index 100% rename from chatfiles-ui/components/Chat/ChatMessage.tsx rename to components/Chat/ChatMessage.tsx diff --git a/chatfiles-ui/components/Chat/CopyButton.tsx b/components/Chat/CopyButton.tsx similarity index 100% rename from chatfiles-ui/components/Chat/CopyButton.tsx rename to components/Chat/CopyButton.tsx diff --git a/chatfiles-ui/components/Chat/ErrorMessageDiv.tsx b/components/Chat/ErrorMessageDiv.tsx similarity index 100% rename from chatfiles-ui/components/Chat/ErrorMessageDiv.tsx rename to components/Chat/ErrorMessageDiv.tsx diff --git a/chatfiles-ui/components/Chat/ModelSelect.tsx b/components/Chat/ModelSelect.tsx similarity index 100% rename from chatfiles-ui/components/Chat/ModelSelect.tsx rename to components/Chat/ModelSelect.tsx diff --git a/chatfiles-ui/components/Chat/Regenerate.tsx b/components/Chat/Regenerate.tsx similarity index 100% rename from chatfiles-ui/components/Chat/Regenerate.tsx rename to components/Chat/Regenerate.tsx diff --git a/chatfiles-ui/components/Chat/SystemPrompt.tsx b/components/Chat/SystemPrompt.tsx similarity index 100% rename from chatfiles-ui/components/Chat/SystemPrompt.tsx rename to components/Chat/SystemPrompt.tsx diff --git a/chatfiles-ui/components/Chat/Upload.tsx b/components/Chat/Upload.tsx similarity index 50% rename from chatfiles-ui/components/Chat/Upload.tsx rename to components/Chat/Upload.tsx index a7fe112..2aa1c6a 100644 --- a/chatfiles-ui/components/Chat/Upload.tsx +++ b/components/Chat/Upload.tsx @@ -1,16 +1,25 @@ -import {LlamaIndex} from "@/types"; +import {KeyConfiguration, LlamaIndex} from "@/types"; import {CHAT_FILES_MAX_SIZE} from "@/utils/app/const"; import {humanFileSize} from "@/utils/app/files"; import {useTranslation} from 'next-i18next'; +import {v4 as uuidv4} from 'uuid'; +import {EmbeddingCreateRequest} from "@/types/embedding"; interface Props { onIndexChange: (index: LlamaIndex) => void; + keyConfiguration: KeyConfiguration; handleIsUploading: (isUploading: boolean) => void; handleIsUploadSuccess: (isUploadSuccess: boolean) => void; handleUploadError: (error: string) => void; } -export const Upload = ({onIndexChange, handleIsUploading, handleIsUploadSuccess, handleUploadError}: Props) => { +export const Upload = ({ + onIndexChange, + keyConfiguration, + handleIsUploading, + handleIsUploadSuccess, + handleUploadError +}: Props) => { const { t } = useTranslation('sidebar'); @@ -23,17 +32,7 @@ export const Upload = ({onIndexChange, handleIsUploading, handleIsUploadSuccess, handleIsUploading(true); try { - const formData = new FormData(); - formData.append("file", file); - - await fetch('/api/upload', { - method: 'POST', - body: formData - }).then(res => res.json()) - .then((data: LlamaIndex) => { - onIndexChange({indexName: data.indexName, indexType: data.indexType}); - console.log("import file index json name:", data.indexName); - }); + await uploadFile(file); handleIsUploading(false); handleIsUploadSuccess(true) @@ -55,6 +54,65 @@ export const Upload = ({onIndexChange, handleIsUploading, handleIsUploadSuccess, return true; }; + const uploadFile = async (file: File) => { + const fileName = uuidv4(); + const fileType = file.name.split('.').pop()!; + + const formData = new FormData(); + formData.append("file", file); + + await fetch(`/api/files?fileName=${fileName}.${fileType}`, { + method: 'POST', + body: formData + }).then(res => { + if (!res.ok) { + console.log("save file failed:", fileName); + throw new Error(`save file failed:, ${fileName}`); + } + }).then(async (data: any) => { + console.log("save file success:", fileName); + await saveEmbeddings(fileName, fileType); + onIndexChange({indexName: fileName, indexType: fileType.split('.').pop()!}); + }); + } + + const saveEmbeddings = async (fileName: string, fileType: string) => { + await fetch('/api/embedding', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'x-api-type': keyConfiguration.apiType ?? '', + 'x-api-key': keyConfiguration.apiKey ?? '', + 'x-azure-api-key': keyConfiguration.azureApiKey ?? '', + 'x-azure-instance-name': keyConfiguration.azureInstanceName ?? '', + 'x-azure-api-version': keyConfiguration.azureApiVersion ?? '', + 'x-azure-deployment-name': keyConfiguration.azureDeploymentName ?? '', + 'x-azure-embedding-deployment-name': keyConfiguration.azureEmbeddingDeploymentName ?? '', + }, + body: JSON.stringify({ + fileName: fileName, + fileType: fileType, + }) + }).then(res => { + if (!res.ok) { + console.log("save embedding failed:"); + throw new Error("save embedding failed`"); + } + + }); + } + + const deleteFile = async (fileTempName: string) => { + + await fetch(`/api/files?fileName=${fileTempName}`, { + method: 'DELETE' + }).then(res => res.json()) + .then((data: any) => { + // onIndexChange({indexName: data.indexName, indexType: data.indexType}); + console.log("import file index json name:", data); + }); + } + return (
diff --git a/chatfiles-ui/components/Markdown/CodeBlock.tsx b/components/Markdown/CodeBlock.tsx similarity index 100% rename from chatfiles-ui/components/Markdown/CodeBlock.tsx rename to components/Markdown/CodeBlock.tsx diff --git a/chatfiles-ui/components/Markdown/MemoizedReactMarkdown.tsx b/components/Markdown/MemoizedReactMarkdown.tsx similarity index 100% rename from chatfiles-ui/components/Markdown/MemoizedReactMarkdown.tsx rename to components/Markdown/MemoizedReactMarkdown.tsx diff --git a/chatfiles-ui/components/Mobile/Navbar.tsx b/components/Mobile/Navbar.tsx similarity index 100% rename from chatfiles-ui/components/Mobile/Navbar.tsx rename to components/Mobile/Navbar.tsx diff --git a/chatfiles-ui/components/Sidebar/ClearConversations.tsx b/components/Sidebar/ClearConversations.tsx similarity index 100% rename from chatfiles-ui/components/Sidebar/ClearConversations.tsx rename to components/Sidebar/ClearConversations.tsx diff --git a/chatfiles-ui/components/Sidebar/Conversation.tsx b/components/Sidebar/Conversation.tsx similarity index 100% rename from chatfiles-ui/components/Sidebar/Conversation.tsx rename to components/Sidebar/Conversation.tsx diff --git a/chatfiles-ui/components/Sidebar/Conversations.tsx b/components/Sidebar/Conversations.tsx similarity index 100% rename from chatfiles-ui/components/Sidebar/Conversations.tsx rename to components/Sidebar/Conversations.tsx diff --git a/chatfiles-ui/components/Sidebar/Folder.tsx b/components/Sidebar/Folder.tsx similarity index 100% rename from chatfiles-ui/components/Sidebar/Folder.tsx rename to components/Sidebar/Folder.tsx diff --git a/chatfiles-ui/components/Sidebar/Folders.tsx b/components/Sidebar/Folders.tsx similarity index 100% rename from chatfiles-ui/components/Sidebar/Folders.tsx rename to components/Sidebar/Folders.tsx diff --git a/chatfiles-ui/components/Sidebar/Import.tsx b/components/Sidebar/Import.tsx similarity index 100% rename from chatfiles-ui/components/Sidebar/Import.tsx rename to components/Sidebar/Import.tsx diff --git a/components/Sidebar/KeySettings.tsx b/components/Sidebar/KeySettings.tsx new file mode 100644 index 0000000..2d7e9c1 --- /dev/null +++ b/components/Sidebar/KeySettings.tsx @@ -0,0 +1,143 @@ +import { FC, MouseEventHandler, useState } from 'react'; +import { Button } from "@/components/ui/button" +import { Input } from "@/components/ui/input" +import { Label } from "@/components/ui/label" +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" +import { + Sheet, + SheetClose, + SheetContent, + SheetDescription, + SheetFooter, + SheetHeader, + SheetTitle, + SheetTrigger, +} from "@/components/ui/sheet" +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, + } from "@/components/ui/card" +import { KeyConfiguration, ModelType } from '@/types'; + +interface Props { + keyConfiguration: KeyConfiguration; + onKeyConfigrationChange: (keySettings: KeyConfiguration) => void; + keyConfigurationButtonRef: React.RefObject; +} + +export const KeySettings: FC = ({ + keyConfiguration, + onKeyConfigrationChange, + keyConfigurationButtonRef, +}) => { + const [fromkeyConfigration, setFromKeyConfigration] = useState({ + apiType: keyConfiguration.apiType, + apiKey: keyConfiguration.apiKey, + azureApiKey: keyConfiguration.azureApiKey, + azureInstanceName: keyConfiguration.azureInstanceName, + azureApiVersion: keyConfiguration.azureApiVersion, + azureDeploymentName: keyConfiguration.azureDeploymentName, + azureEmbeddingDeploymentName: keyConfiguration.azureEmbeddingDeploymentName, + }) + + const handleOpenAISubmit = () => { + fromkeyConfigration.apiType = ModelType.OPENAI; + onKeyConfigrationChange(fromkeyConfigration); + }; + + const handleAzureOpenAISubmit = () => { + fromkeyConfigration.apiType = ModelType.AZURE_OPENAI; + onKeyConfigrationChange(fromkeyConfigration); + }; + + const handleChange = (event: React.ChangeEvent) => { + setFromKeyConfigration({ + ...fromkeyConfigration, + [event.target.name]: event.target.value, + }); + }; + + return ( + <> + + + + + + + OpenAI Key Configuration + + + + OpenAI + Azure OpenAI + + + + + OpenAI + + Make changes to your OpenAI Key here. Click save when you are done. We will not store your API Key. + + + +
+ + +
+
+ + + + + +
+
+ + + + Azure OpenAI + + Make changes to your Auzre OpenAI Configuration here. Click save when you are done. We will not store your API Key. + + + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + + + +
+
+
+
+
+ + + ) +} \ No newline at end of file diff --git a/chatfiles-ui/components/Sidebar/Search.tsx b/components/Sidebar/Search.tsx similarity index 100% rename from chatfiles-ui/components/Sidebar/Search.tsx rename to components/Sidebar/Search.tsx diff --git a/chatfiles-ui/components/Sidebar/Sidebar.tsx b/components/Sidebar/Sidebar.tsx similarity index 93% rename from chatfiles-ui/components/Sidebar/Sidebar.tsx rename to components/Sidebar/Sidebar.tsx index 292cfcf..ad81fa9 100644 --- a/chatfiles-ui/components/Sidebar/Sidebar.tsx +++ b/components/Sidebar/Sidebar.tsx @@ -1,4 +1,4 @@ -import { ChatFolder, Conversation, KeyValuePair } from '@/types'; +import { ChatFolder, Conversation, KeyConfiguration, KeyValuePair } from '@/types'; import { IconArrowBarLeft, IconFolderPlus, @@ -17,7 +17,6 @@ interface Props { conversations: Conversation[]; lightMode: 'light' | 'dark'; selectedConversation: Conversation; - apiKey: string; folders: ChatFolder[]; onCreateFolder: (name: string) => void; onDeleteFolder: (folderId: number) => void; @@ -31,13 +30,15 @@ interface Props { conversation: Conversation, data: KeyValuePair, ) => void; - onApiKeyChange: (apiKey: string) => void; onClearConversations: () => void; onExportConversations: () => void; onImportConversations: (data: { conversations: Conversation[]; folders: ChatFolder[]; }) => void; + keyConfiguration: KeyConfiguration; + onKeyConfigrationChange: (keySettings: KeyConfiguration) => void; + keyConfigurationButtonRef: React.RefObject; } export const Sidebar: FC = ({ @@ -45,7 +46,6 @@ export const Sidebar: FC = ({ conversations, lightMode, selectedConversation, - apiKey, folders, onCreateFolder, onDeleteFolder, @@ -56,10 +56,12 @@ export const Sidebar: FC = ({ onDeleteConversation, onToggleSidebar, onUpdateConversation, - onApiKeyChange, onClearConversations, onExportConversations, onImportConversations, + keyConfiguration, + onKeyConfigrationChange, + keyConfigurationButtonRef, }) => { const { t } = useTranslation('sidebar'); const [searchTerm, setSearchTerm] = useState(''); @@ -201,12 +203,13 @@ export const Sidebar: FC = ({ ); diff --git a/chatfiles-ui/components/Sidebar/SidebarButton.tsx b/components/Sidebar/SidebarButton.tsx similarity index 100% rename from chatfiles-ui/components/Sidebar/SidebarButton.tsx rename to components/Sidebar/SidebarButton.tsx diff --git a/chatfiles-ui/components/Sidebar/SidebarSettings.tsx b/components/Sidebar/SidebarSettings.tsx similarity index 72% rename from chatfiles-ui/components/Sidebar/SidebarSettings.tsx rename to components/Sidebar/SidebarSettings.tsx index 020da8d..bae42f5 100644 --- a/chatfiles-ui/components/Sidebar/SidebarSettings.tsx +++ b/components/Sidebar/SidebarSettings.tsx @@ -1,35 +1,38 @@ -import { ChatFolder, Conversation } from '@/types'; +import { ChatFolder, Conversation, KeyConfiguration, ModelType } from '@/types'; import { IconFileExport, IconMoon, IconSun } from '@tabler/icons-react'; -import { FC } from 'react'; +import { FC, useState } from 'react'; import { useTranslation } from 'next-i18next'; import { ClearConversations } from './ClearConversations'; import { Import } from './Import'; -import { Key } from './Key'; import { SidebarButton } from './SidebarButton'; +import { KeySettings } from './KeySettings'; interface Props { lightMode: 'light' | 'dark'; - apiKey: string; onToggleLightMode: (mode: 'light' | 'dark') => void; - onApiKeyChange: (apiKey: string) => void; onClearConversations: () => void; onExportConversations: () => void; onImportConversations: (data: { conversations: Conversation[]; folders: ChatFolder[]; }) => void; + keyConfiguration: KeyConfiguration; + onKeyConfigrationChange: (keySettings: KeyConfiguration) => void; + keyConfigurationButtonRef: React.RefObject; } export const SidebarSettings: FC = ({ lightMode, - apiKey, onToggleLightMode, - onApiKeyChange, onClearConversations, onExportConversations, onImportConversations, + keyConfiguration, + onKeyConfigrationChange, + keyConfigurationButtonRef, }) => { const { t } = useTranslation('sidebar'); + return (
@@ -51,8 +54,8 @@ export const SidebarSettings: FC = ({ onToggleLightMode(lightMode === 'light' ? 'dark' : 'light') } /> - - +
); }; + diff --git a/components/ui/button.tsx b/components/ui/button.tsx new file mode 100644 index 0000000..2ada851 --- /dev/null +++ b/components/ui/button.tsx @@ -0,0 +1,55 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const buttonVariants = cva( + "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background", + { + variants: { + variant: { + default: "bg-primary text-primary-foreground hover:bg-primary/90", + destructive: + "bg-destructive text-destructive-foreground hover:bg-destructive/90", + outline: + "border border-input hover:bg-accent hover:text-accent-foreground", + secondary: + "bg-secondary text-secondary-foreground hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground", + link: "underline-offset-4 hover:underline text-primary", + }, + size: { + default: "h-10 py-2 px-4", + sm: "h-9 px-3 rounded-md", + lg: "h-11 px-8 rounded-md", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + } +) + +export interface ButtonProps + extends React.ButtonHTMLAttributes, + VariantProps { + asChild?: boolean +} + +const Button = React.forwardRef( + ({ className, variant, size, asChild = false, ...props }, ref) => { + const Comp = asChild ? Slot : "button" + return ( + + ) + } +) +Button.displayName = "Button" + +export { Button, buttonVariants } diff --git a/components/ui/card.tsx b/components/ui/card.tsx new file mode 100644 index 0000000..dff04b6 --- /dev/null +++ b/components/ui/card.tsx @@ -0,0 +1,79 @@ +import * as React from "react" + +import { cn } from "@/lib/utils" + +const Card = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)) +Card.displayName = "Card" + +const CardHeader = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)) +CardHeader.displayName = "CardHeader" + +const CardTitle = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

+)) +CardTitle.displayName = "CardTitle" + +const CardDescription = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

+)) +CardDescription.displayName = "CardDescription" + +const CardContent = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

+)) +CardContent.displayName = "CardContent" + +const CardFooter = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)) +CardFooter.displayName = "CardFooter" + +export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } diff --git a/components/ui/input.tsx b/components/ui/input.tsx new file mode 100644 index 0000000..929e05f --- /dev/null +++ b/components/ui/input.tsx @@ -0,0 +1,25 @@ +import * as React from "react" + +import { cn } from "@/lib/utils" + +export interface InputProps + extends React.InputHTMLAttributes {} + +const Input = React.forwardRef( + ({ className, type, ...props }, ref) => { + return ( + + ) + } +) +Input.displayName = "Input" + +export { Input } diff --git a/components/ui/label.tsx b/components/ui/label.tsx new file mode 100644 index 0000000..5341821 --- /dev/null +++ b/components/ui/label.tsx @@ -0,0 +1,26 @@ +"use client" + +import * as React from "react" +import * as LabelPrimitive from "@radix-ui/react-label" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const labelVariants = cva( + "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" +) + +const Label = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef & + VariantProps +>(({ className, ...props }, ref) => ( + +)) +Label.displayName = LabelPrimitive.Root.displayName + +export { Label } diff --git a/components/ui/sheet.tsx b/components/ui/sheet.tsx new file mode 100644 index 0000000..259d72e --- /dev/null +++ b/components/ui/sheet.tsx @@ -0,0 +1,233 @@ +"use client" + +import * as React from "react" +import * as SheetPrimitive from "@radix-ui/react-dialog" +import { cva, type VariantProps } from "class-variance-authority" +import { X } from "lucide-react" + +import { cn } from "@/lib/utils" + +const Sheet = SheetPrimitive.Root + +const SheetTrigger = SheetPrimitive.Trigger + +const SheetClose = SheetPrimitive.Close + +const portalVariants = cva("fixed inset-0 z-50 flex", { + variants: { + position: { + top: "items-start", + bottom: "items-end", + left: "justify-start", + right: "justify-end", + }, + }, + defaultVariants: { position: "right" }, +}) + +interface SheetPortalProps + extends SheetPrimitive.DialogPortalProps, + VariantProps {} + +const SheetPortal = ({ + position, + className, + children, + ...props +}: SheetPortalProps) => ( + +
{children}
+
+) +SheetPortal.displayName = SheetPrimitive.Portal.displayName + +const SheetOverlay = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + +)) +SheetOverlay.displayName = SheetPrimitive.Overlay.displayName + +const sheetVariants = cva( + "fixed z-50 scale-100 gap-4 bg-background p-6 opacity-100 shadow-lg border", + { + variants: { + position: { + top: "animate-in slide-in-from-top w-full duration-300", + bottom: "animate-in slide-in-from-bottom w-full duration-300", + left: "animate-in slide-in-from-left h-full duration-300", + right: "animate-in slide-in-from-right h-full duration-300", + }, + size: { + content: "", + default: "", + sm: "", + lg: "", + xl: "", + full: "", + }, + }, + compoundVariants: [ + { + position: ["top", "bottom"], + size: "content", + class: "max-h-screen", + }, + { + position: ["top", "bottom"], + size: "default", + class: "h-1/3", + }, + { + position: ["top", "bottom"], + size: "sm", + class: "h-1/4", + }, + { + position: ["top", "bottom"], + size: "lg", + class: "h-1/2", + }, + { + position: ["top", "bottom"], + size: "xl", + class: "h-5/6", + }, + { + position: ["top", "bottom"], + size: "full", + class: "h-screen", + }, + { + position: ["right", "left"], + size: "content", + class: "max-w-screen", + }, + { + position: ["right", "left"], + size: "default", + class: "w-1/3", + }, + { + position: ["right", "left"], + size: "sm", + class: "w-1/4", + }, + { + position: ["right", "left"], + size: "lg", + class: "w-1/2", + }, + { + position: ["right", "left"], + size: "xl", + class: "w-5/6", + }, + { + position: ["right", "left"], + size: "full", + class: "w-screen", + }, + ], + defaultVariants: { + position: "right", + size: "default", + }, + } +) + +export interface DialogContentProps + extends React.ComponentPropsWithoutRef, + VariantProps {} + +const SheetContent = React.forwardRef< + React.ElementRef, + DialogContentProps +>(({ position, size, className, children, ...props }, ref) => ( + + + + {children} + + + Close + + + +)) +SheetContent.displayName = SheetPrimitive.Content.displayName + +const SheetHeader = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +SheetHeader.displayName = "SheetHeader" + +const SheetFooter = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +SheetFooter.displayName = "SheetFooter" + +const SheetTitle = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SheetTitle.displayName = SheetPrimitive.Title.displayName + +const SheetDescription = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SheetDescription.displayName = SheetPrimitive.Description.displayName + +export { + Sheet, + SheetTrigger, + SheetClose, + SheetContent, + SheetHeader, + SheetFooter, + SheetTitle, + SheetDescription, +} diff --git a/components/ui/tabs.tsx b/components/ui/tabs.tsx new file mode 100644 index 0000000..26eb109 --- /dev/null +++ b/components/ui/tabs.tsx @@ -0,0 +1,55 @@ +"use client" + +import * as React from "react" +import * as TabsPrimitive from "@radix-ui/react-tabs" + +import { cn } from "@/lib/utils" + +const Tabs = TabsPrimitive.Root + +const TabsList = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +TabsList.displayName = TabsPrimitive.List.displayName + +const TabsTrigger = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +TabsTrigger.displayName = TabsPrimitive.Trigger.displayName + +const TabsContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +TabsContent.displayName = TabsPrimitive.Content.displayName + +export { Tabs, TabsList, TabsTrigger, TabsContent } diff --git a/docker-compose.yml b/docker-compose.yml index fbc23a0..11b728e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,18 +3,17 @@ services: chatfiles: image: guangzhengli/chatfiles:latest container_name: chatfiles - ports: - - 5000:5000 - environment: - - OPENAI_API_KEY=${OPENAI_API_KEY} - chatfiles-ui: - image: guangzhengli/chatfiles-ui:latest - container_name: chatfiles-ui ports: - 3000:3000 environment: + - OPENAI_TYPE=${OPENAI_TYPE} - OPENAI_API_KEY=${OPENAI_API_KEY} - - CHAT_FILES_SERVER_HOST=http://chatfiles:5000 - - NEXT_PUBLIC_CHAT_FILES_MAX_SIZE=0 - depends_on: - - chatfiles \ No newline at end of file + - AZURE_OPENAI_API_KEY=${AZURE_OPENAI_API_KEY} + - AZURE_OPENAI_API_DEPLOYMENT_NAME=${AZURE_OPENAI_API_DEPLOYMENT_NAME} + - AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME=${AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME} + - AZURE_OPENAI_API_INSTANCE_NAME=${AZURE_OPENAI_API_INSTANCE_NAME} + - AZURE_OPENAI_API_VERSION=${AZURE_OPENAI_API_VERSION} + - SUPABASE_SERVICE_ROLE_KEY=${SUPABASE_SERVICE_ROLE_KEY} + - SUPABASE_URL=${SUPABASE_URL} + - NEXT_PUBLIC_CHAT_FILES_UPLOAD_PATH=public/uploads + - NEXT_PUBLIC_CHAT_FILES_MAX_SIZE=0 \ No newline at end of file diff --git a/chatfiles-ui/fly.toml b/fly.toml similarity index 100% rename from chatfiles-ui/fly.toml rename to fly.toml diff --git a/lib/utils.ts b/lib/utils.ts new file mode 100644 index 0000000..bd0c391 --- /dev/null +++ b/lib/utils.ts @@ -0,0 +1,6 @@ +import { clsx, type ClassValue } from "clsx" +import { twMerge } from "tailwind-merge" + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)) +} diff --git a/chatfiles-ui/next-i18next.config.js b/next-i18next.config.js similarity index 100% rename from chatfiles-ui/next-i18next.config.js rename to next-i18next.config.js diff --git a/chatfiles-ui/next.config.js b/next.config.js similarity index 99% rename from chatfiles-ui/next.config.js rename to next.config.js index 715516f..240a1f5 100644 --- a/chatfiles-ui/next.config.js +++ b/next.config.js @@ -13,6 +13,6 @@ const nextConfig = { return config; }, -}; +} module.exports = nextConfig; diff --git a/chatfiles-ui/package-lock.json b/package-lock.json similarity index 75% rename from chatfiles-ui/package-lock.json rename to package-lock.json index e2f020f..511d498 100644 --- a/chatfiles-ui/package-lock.json +++ b/package-lock.json @@ -1,24 +1,40 @@ { - "name": "chatfiles-ui", + "name": "ChatFiles", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "chatfiles-ui", + "name": "ChatFiles", "version": "0.1.0", "dependencies": { "@dqbd/tiktoken": "^1.0.2", + "@radix-ui/react-dialog": "^1.0.4", + "@radix-ui/react-label": "^2.0.2", + "@radix-ui/react-slot": "^1.0.2", + "@radix-ui/react-tabs": "^1.0.4", + "@supabase/supabase-js": "^2.21.0", "@tabler/icons-react": "^2.9.0", + "@types/multer": "^1.4.7", + "class-variance-authority": "^0.6.0", + "clsx": "^1.2.1", + "d3-dsv": "^2.0.0", "dotenv": "^16.0.3", + "epub2": "^3.0.1", "eventsource-parser": "^0.1.0", "flowbite": "^1.6.4", "formidable": "^2.1.1", + "html-to-text": "^9.0.5", "i18next": "^22.4.13", + "langchain": "^0.0.94", + "lucide-react": "^0.241.0", + "mammoth": "^1.6.0", + "multer": "^1.4.5-lts.1", "next": "13.2.4", "next-i18next": "^13.2.2", "node-fetch": "^3.3.1", "openai": "^3.2.1", + "pdf-parse": "^1.1.1", "react": "18.2.0", "react-dom": "18.2.0", "react-i18next": "^12.2.0", @@ -26,7 +42,10 @@ "react-syntax-highlighter": "^15.5.0", "rehype-mathjax": "^4.0.2", "remark-gfm": "^3.0.1", - "remark-math": "^5.1.1" + "remark-math": "^5.1.1", + "srt-parser-2": "^1.2.3", + "tailwind-merge": "^1.13.1", + "tailwindcss-animate": "^1.0.6" }, "devDependencies": { "@tailwindcss/typography": "^0.5.9", @@ -35,6 +54,7 @@ "@types/react": "18.0.30", "@types/react-dom": "18.0.11", "@types/react-syntax-highlighter": "^15.5.6", + "@types/uuid": "^9.0.1", "autoprefixer": "^10.4.14", "eslint": "8.36.0", "eslint-config-next": "13.2.4", @@ -45,6 +65,15 @@ "typescript": "4.9.5" } }, + "node_modules/@anthropic-ai/sdk": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.4.3.tgz", + "integrity": "sha512-SZrlXvjUUYT9rPmSzlTtmVk1OjVNpkCzILRluhiYwNcxXfQyvPJDi0CI6PyymygcgtqEF5EVqhKmC/PtPsNEIw==", + "dependencies": { + "@fortaine/fetch-event-source": "^3.0.6", + "cross-fetch": "^3.1.5" + } + }, "node_modules/@babel/runtime": { "version": "7.21.0", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz", @@ -57,9 +86,9 @@ } }, "node_modules/@dqbd/tiktoken": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@dqbd/tiktoken/-/tiktoken-1.0.2.tgz", - "integrity": "sha512-AjGTBRWsMoVmVeN55NLyupyM8TNamOUBl6tj5t/leLDVup3CFGO9tVagNL1jf3GyZLkWZSTmYVbPQ/M2LEcNzw==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@dqbd/tiktoken/-/tiktoken-1.0.7.tgz", + "integrity": "sha512-bhR5k5W+8GLzysjk8zTMVygQZsgvf7W1F0IlL4ZQ5ugjo5rCyiwGM5d8DYriXspytfu98tv59niang3/T+FoDw==" }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", @@ -117,6 +146,14 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@fortaine/fetch-event-source": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@fortaine/fetch-event-source/-/fetch-event-source-3.0.6.tgz", + "integrity": "sha512-621GAuLMvKtyZQ3IA6nlDWhV1V/7PGOTNIGLUifxt0KzM+dZIweJ6F3XvQF3QnqeNfS1N7WQ0Kil1Di/lhChEw==", + "engines": { + "node": ">=16.15" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", @@ -363,7 +400,6 @@ "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" @@ -376,7 +412,6 @@ "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" } @@ -385,7 +420,6 @@ "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" @@ -423,12 +457,529 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@radix-ui/primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.1.tgz", + "integrity": "sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==", + "dependencies": { + "@babel/runtime": "^7.13.10" + } + }, + "node_modules/@radix-ui/react-collection": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.3.tgz", + "integrity": "sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-compose-refs": "1.0.1", + "@radix-ui/react-context": "1.0.1", + "@radix-ui/react-primitive": "1.0.3", + "@radix-ui/react-slot": "1.0.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-compose-refs": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz", + "integrity": "sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==", + "dependencies": { + "@babel/runtime": "^7.13.10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-context": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.1.tgz", + "integrity": "sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==", + "dependencies": { + "@babel/runtime": "^7.13.10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.4.tgz", + "integrity": "sha512-hJtRy/jPULGQZceSAP2Re6/4NpKo8im6V8P2hUqZsdFiSL8l35kYsw3qbRI6Ay5mQd2+wlLqje770eq+RJ3yZg==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/primitive": "1.0.1", + "@radix-ui/react-compose-refs": "1.0.1", + "@radix-ui/react-context": "1.0.1", + "@radix-ui/react-dismissable-layer": "1.0.4", + "@radix-ui/react-focus-guards": "1.0.1", + "@radix-ui/react-focus-scope": "1.0.3", + "@radix-ui/react-id": "1.0.1", + "@radix-ui/react-portal": "1.0.3", + "@radix-ui/react-presence": "1.0.1", + "@radix-ui/react-primitive": "1.0.3", + "@radix-ui/react-slot": "1.0.2", + "@radix-ui/react-use-controllable-state": "1.0.1", + "aria-hidden": "^1.1.1", + "react-remove-scroll": "2.5.5" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-direction": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.1.tgz", + "integrity": "sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==", + "dependencies": { + "@babel/runtime": "^7.13.10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dismissable-layer": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.4.tgz", + "integrity": "sha512-7UpBa/RKMoHJYjie1gkF1DlK8l1fdU/VKDpoS3rCCo8YBJR294GwcEHyxHw72yvphJ7ld0AXEcSLAzY2F/WyCg==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/primitive": "1.0.1", + "@radix-ui/react-compose-refs": "1.0.1", + "@radix-ui/react-primitive": "1.0.3", + "@radix-ui/react-use-callback-ref": "1.0.1", + "@radix-ui/react-use-escape-keydown": "1.0.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-focus-guards": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.1.tgz", + "integrity": "sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==", + "dependencies": { + "@babel/runtime": "^7.13.10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-focus-scope": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.3.tgz", + "integrity": "sha512-upXdPfqI4islj2CslyfUBNlaJCPybbqRHAi1KER7Isel9Q2AtSJ0zRBZv8mWQiFXD2nyAJ4BhC3yXgZ6kMBSrQ==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-compose-refs": "1.0.1", + "@radix-ui/react-primitive": "1.0.3", + "@radix-ui/react-use-callback-ref": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-id": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.1.tgz", + "integrity": "sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-use-layout-effect": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-label": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.0.2.tgz", + "integrity": "sha512-N5ehvlM7qoTLx7nWPodsPYPgMzA5WM8zZChQg8nyFJKnDO5WHdba1vv5/H6IO5LtJMfD2Q3wh1qHFGNtK0w3bQ==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-primitive": "1.0.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-portal": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.3.tgz", + "integrity": "sha512-xLYZeHrWoPmA5mEKEfZZevoVRK/Q43GfzRXkWV6qawIWWK8t6ifIiLQdd7rmQ4Vk1bmI21XhqF9BN3jWf+phpA==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-primitive": "1.0.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-presence": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.1.tgz", + "integrity": "sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-compose-refs": "1.0.1", + "@radix-ui/react-use-layout-effect": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-primitive": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz", + "integrity": "sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-slot": "1.0.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-roving-focus": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.4.tgz", + "integrity": "sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/primitive": "1.0.1", + "@radix-ui/react-collection": "1.0.3", + "@radix-ui/react-compose-refs": "1.0.1", + "@radix-ui/react-context": "1.0.1", + "@radix-ui/react-direction": "1.0.1", + "@radix-ui/react-id": "1.0.1", + "@radix-ui/react-primitive": "1.0.3", + "@radix-ui/react-use-callback-ref": "1.0.1", + "@radix-ui/react-use-controllable-state": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-slot": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz", + "integrity": "sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-compose-refs": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.0.4.tgz", + "integrity": "sha512-egZfYY/+wRNCflXNHx+dePvnz9FbmssDTJBtgRfDY7e8SE5oIo3Py2eCB1ckAbh1Q7cQ/6yJZThJ++sgbxibog==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/primitive": "1.0.1", + "@radix-ui/react-context": "1.0.1", + "@radix-ui/react-direction": "1.0.1", + "@radix-ui/react-id": "1.0.1", + "@radix-ui/react-presence": "1.0.1", + "@radix-ui/react-primitive": "1.0.3", + "@radix-ui/react-roving-focus": "1.0.4", + "@radix-ui/react-use-controllable-state": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-callback-ref": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz", + "integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==", + "dependencies": { + "@babel/runtime": "^7.13.10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-controllable-state": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.1.tgz", + "integrity": "sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-use-callback-ref": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-escape-keydown": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.3.tgz", + "integrity": "sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-use-callback-ref": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz", + "integrity": "sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==", + "dependencies": { + "@babel/runtime": "^7.13.10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@rushstack/eslint-patch": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz", "integrity": "sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==", "dev": true }, + "node_modules/@selderee/plugin-htmlparser2": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.11.0.tgz", + "integrity": "sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==", + "dependencies": { + "domhandler": "^5.0.3", + "selderee": "^0.11.0" + }, + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, + "node_modules/@supabase/functions-js": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-2.1.1.tgz", + "integrity": "sha512-bIR1Puae6W+1/MzPfYBWOG/SCWGo4B5CB7c0ZZksvliNEAzhxNBJ0UFKYINcGdGtxG8ZC+1xr3utWpNZNwnoRw==", + "dependencies": { + "cross-fetch": "^3.1.5" + } + }, + "node_modules/@supabase/gotrue-js": { + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-2.25.0.tgz", + "integrity": "sha512-tZXArO0f1NKMQo6rtGryOSqS51WQJQMS3lEHIyH50WffQb/n1tiYY1L8yCyrvTogz9RXpihdQeUjVW77kKd7sQ==", + "dependencies": { + "cross-fetch": "^3.1.5" + } + }, + "node_modules/@supabase/postgrest-js": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-1.6.1.tgz", + "integrity": "sha512-WDBUPOCOwcZonaCwEodwdA8hwWYOiXroDF9vWGxZxKAnuSVE2Ieci/kvhR4EsWvgGST2h90LRowgO+msXe8+fA==", + "dependencies": { + "cross-fetch": "^3.1.5" + } + }, + "node_modules/@supabase/realtime-js": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.7.2.tgz", + "integrity": "sha512-Fi6xAl5PUkqnjl3wo4rdcQIbMG3+yTRX1aUZe/yfvTG84RMvmCXJ1yN6MmafVLeZpU1xkaz5Vx4L0tnHcLiy6w==", + "dependencies": { + "@types/phoenix": "^1.5.4", + "@types/websocket": "^1.0.3", + "websocket": "^1.0.34" + } + }, + "node_modules/@supabase/storage-js": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@supabase/storage-js/-/storage-js-2.5.1.tgz", + "integrity": "sha512-nkR0fQA9ScAtIKA3vNoPEqbZv1k5B5HVRYEvRWdlP6mUpFphM9TwPL2jZ/ztNGMTG5xT6SrHr+H7Ykz8qzbhjw==", + "dependencies": { + "cross-fetch": "^3.1.5" + } + }, + "node_modules/@supabase/supabase-js": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.21.0.tgz", + "integrity": "sha512-FW3ZzBoc4orSgfX0dXrmJoXAcI/hiekmqXTkN64vjtUF2Urp3UjyAf71UTtV9Jl6ejHoe3K++e0+Rg9zKUJh5w==", + "dependencies": { + "@supabase/functions-js": "^2.1.0", + "@supabase/gotrue-js": "^2.23.0", + "@supabase/postgrest-js": "^1.1.1", + "@supabase/realtime-js": "^2.7.2", + "@supabase/storage-js": "^2.5.1", + "cross-fetch": "^3.1.5" + } + }, "node_modules/@swc/helpers": { "version": "0.4.14", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz", @@ -485,6 +1036,23 @@ "node": ">= 10" } }, + "node_modules/@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/debug": { "version": "4.1.7", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", @@ -493,6 +1061,28 @@ "@types/ms": "*" } }, + "node_modules/@types/express": { + "version": "4.17.17", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", + "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.34", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.34.tgz", + "integrity": "sha512-fvr49XlCGoUj2Pp730AItckfjat4WNb0lb3kfrLWffd+RLeoGAMsq7UOy04PAPtoL01uKwcp6u8nhzpgpDYr3w==", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, "node_modules/@types/formidable": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-2.0.5.tgz", @@ -543,22 +1133,49 @@ "@types/unist": "*" } }, + "node_modules/@types/mime": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", + "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==" + }, "node_modules/@types/ms": { "version": "0.7.31", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" }, + "node_modules/@types/multer": { + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/@types/multer/-/multer-1.4.7.tgz", + "integrity": "sha512-/SNsDidUFCvqqcWDwxv2feww/yqhNeTRL5CVoL3jU4Goc4kKEL10T7Eye65ZqPNi4HRx8sAEX59pV1aEH7drNA==", + "dependencies": { + "@types/express": "*" + } + }, "node_modules/@types/node": { "version": "18.15.10", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz", - "integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ==", - "dev": true + "integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ==" + }, + "node_modules/@types/phoenix": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/@types/phoenix/-/phoenix-1.5.6.tgz", + "integrity": "sha512-e7jZ6I9uyRGsg7MNwQcarmBvRlbGb9DibbocE9crVnxqsy6C23RMxLWbJ2CQ3vgCW7taoL1L+F02EcjA6ld7XA==" }, "node_modules/@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + }, + "node_modules/@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" + }, "node_modules/@types/react": { "version": "18.0.30", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.30.tgz", @@ -573,7 +1190,7 @@ "version": "18.0.11", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.11.tgz", "integrity": "sha512-O38bPbI2CWtgw/OoQoY+BRelw7uysmXbWvw3nLWO21H1HSh+GOlqPuXshJfjmpNlKiiSDG9cc1JZAaMmVdcTlw==", - "dev": true, + "devOptional": true, "dependencies": { "@types/react": "*" } @@ -587,21 +1204,57 @@ "@types/react": "*" } }, + "node_modules/@types/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==" + }, "node_modules/@types/scheduler": { "version": "0.16.3", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz", "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==" }, + "node_modules/@types/send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", + "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.1.tgz", + "integrity": "sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==", + "dependencies": { + "@types/mime": "*", + "@types/node": "*" + } + }, "node_modules/@types/unist": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==" }, + "node_modules/@types/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==" + }, "node_modules/@types/web": { "version": "0.0.46", "resolved": "https://registry.npmjs.org/@types/web/-/web-0.0.46.tgz", "integrity": "sha512-ki0OmbjSdAEfvmy5AYWFpMkRsPW+6h4ibQ4tzk8SJsS9dkrrD3B/U1eVvdNNWxAzntjq6o2sjSia6UBCoPH+Yg==" }, + "node_modules/@types/websocket": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.5.tgz", + "integrity": "sha512-NbsqiNX9CnEfC1Z0Vf4mE1SgAJ07JnRYcNex7AJ9zAVzmiGHmjKFEk7O4TJIsgv2B1sLEb6owKFZrACwdYngsQ==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@typescript-eslint/parser": { "version": "5.57.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.57.0.tgz", @@ -703,6 +1356,14 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@xmldom/xmldom": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz", + "integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q==", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -752,7 +1413,6 @@ "version": "1.8.2", "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "dev": true, "dependencies": { "acorn": "^7.0.0", "acorn-walk": "^7.0.0", @@ -763,7 +1423,6 @@ "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -779,6 +1438,14 @@ "node": ">=0.4.0" } }, + "node_modules/adm-zip": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz", + "integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==", + "engines": { + "node": ">=6.0" + } + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -834,7 +1501,6 @@ "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" @@ -843,11 +1509,15 @@ "node": ">= 8" } }, + "node_modules/append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==" + }, "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 + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" }, "node_modules/argparse": { "version": "2.0.1", @@ -855,6 +1525,17 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/aria-hidden": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.3.tgz", + "integrity": "sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/aria-query": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", @@ -877,6 +1558,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array-hyper-unique": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/array-hyper-unique/-/array-hyper-unique-2.1.4.tgz", + "integrity": "sha512-RVsGx2YpFGhGpgdkK7A0VjFQecVUCowpkQerGCsyXVRXHxccAlPPTDt9ueF/X7Zq/6z6duZ49i9WzTCzcnQygQ==", + "dependencies": { + "deep-eql": "= 4.0.0", + "lodash": "^4.17.21" + } + }, "node_modules/array-includes": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", @@ -1056,15 +1746,43 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "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/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, "engines": { "node": ">=8" } }, + "node_modules/binary-search": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/binary-search/-/binary-search-1.3.6.tgz", + "integrity": "sha512-nbE1WxOTTrUWIfsfZ4aHGYu5DOuNkbxGokjV6Z2kxfJK3uaAb8zNK1muzOeipoLHZjInT4Br88BHpzevc681xA==" + }, + "node_modules/bluebird": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", + "integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1079,7 +1797,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -1120,6 +1837,34 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/bufferutil": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", + "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -1141,11 +1886,21 @@ "node": ">=6" } }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "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" } @@ -1225,7 +1980,6 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, "funding": [ { "type": "individual", @@ -1252,7 +2006,6 @@ "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" }, @@ -1260,11 +2013,38 @@ "node": ">= 6" } }, + "node_modules/class-variance-authority": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.6.0.tgz", + "integrity": "sha512-qdRDgfjx3GRb9fpwpSvn+YaidnT7IUJNe4wt5/SWwM+PmUwJUhQRk/8zAyNro0PmVfmen2635UboTjIBXXxy5A==", + "dependencies": { + "clsx": "1.2.1" + }, + "funding": { + "url": "https://joebell.co.uk" + }, + "peerDependencies": { + "typescript": ">= 4.5.5 < 6" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/client-only": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, + "node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "engines": { + "node": ">=6" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1280,8 +2060,7 @@ "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 + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/combined-stream": { "version": "1.0.8", @@ -1317,6 +2096,20 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, "node_modules/core-js": { "version": "3.29.1", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.29.1.tgz", @@ -1327,6 +2120,65 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/crlf-normalize": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/crlf-normalize/-/crlf-normalize-1.0.19.tgz", + "integrity": "sha512-cpV1h7YwFtIA36NHtyWuMMMPGxUp6zrzxjRnFEDLh1ZH0SPNUqCWmM8RlKVycxvKHgZOxWXs3XxX/DAlBAjFzA==", + "dependencies": { + "ts-type": ">=2" + } + }, + "node_modules/cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "dependencies": { + "node-fetch": "2.6.7" + } + }, + "node_modules/cross-fetch/node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/cross-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/cross-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/cross-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1345,7 +2197,6 @@ "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" }, @@ -1379,6 +2230,52 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "node_modules/d3-dsv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-2.0.0.tgz", + "integrity": "sha512-E+Pn8UJYx9mViuIUkoc93gJGGYut6mSDKy2+XaPwccwkRGlR+LO97L2VCCRjQivTwLHkSnAJG7yo00BWY6QM+w==", + "dependencies": { + "commander": "2", + "iconv-lite": "0.4", + "rw": "1" + }, + "bin": { + "csv2json": "bin/dsv2json", + "csv2tsv": "bin/dsv2dsv", + "dsv2dsv": "bin/dsv2dsv", + "dsv2json": "bin/dsv2json", + "json2csv": "bin/json2dsv", + "json2dsv": "bin/json2dsv", + "json2tsv": "bin/json2dsv", + "tsv2csv": "bin/dsv2dsv", + "tsv2json": "bin/dsv2json" + } + }, + "node_modules/d3-dsv/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/d3-dsv/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/damerau-levenshtein": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", @@ -1434,6 +2331,17 @@ } } }, + "node_modules/decamelize": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", + "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/decimal.js": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", @@ -1460,6 +2368,17 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/deep-eql": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.0.0.tgz", + "integrity": "sha512-GxJC5MOg2KyQlv6WiUF/VAnMj4MWnYiXo4oLgeptOELVoknyErb4Z8+5F/IM/K4g9/80YzzatxmWcyRwUseH0A==", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/deep-equal": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz", @@ -1493,6 +2412,14 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -1522,7 +2449,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -1543,11 +2469,15 @@ "node": ">=6" } }, + "node_modules/detect-node-es": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", + "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==" + }, "node_modules/detective": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz", "integrity": "sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==", - "dev": true, "dependencies": { "acorn-node": "^1.8.2", "defined": "^1.0.0", @@ -1572,8 +2502,7 @@ "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 + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==" }, "node_modules/diff": { "version": "5.1.0", @@ -1583,6 +2512,11 @@ "node": ">=0.3.1" } }, + "node_modules/dingbat-to-unicode": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dingbat-to-unicode/-/dingbat-to-unicode-1.0.1.tgz", + "integrity": "sha512-98l0sW87ZT58pU4i61wa2OHwxbiYSbuxsCBozaVnYX2iCnr3bLM3fIes1/ej7h1YdOKuKt/MLs706TVnALA65w==" + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -1598,8 +2532,7 @@ "node_modules/dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "dev": true + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" }, "node_modules/doctrine": { "version": "3.0.0", @@ -1613,6 +2546,30 @@ "node": ">=6.0.0" } }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, "node_modules/domexception": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", @@ -1624,6 +2581,33 @@ "node": ">=12" } }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, "node_modules/dotenv": { "version": "16.0.3", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", @@ -1632,6 +2616,14 @@ "node": ">=12" } }, + "node_modules/duck": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/duck/-/duck-0.1.12.tgz", + "integrity": "sha512-wkctla1O6VfP89gQ+J/yDesM0S7B7XLXjKGzXxMDVFg7uEn706niAtyYovKbyq1oT9YwDcly721/iUWoc8MVRg==", + "dependencies": { + "underscore": "^1.13.1" + } + }, "node_modules/electron-to-chromium": { "version": "1.4.341", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.341.tgz", @@ -1657,6 +2649,35 @@ "node": ">=10.13.0" } }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/epub2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/epub2/-/epub2-3.0.1.tgz", + "integrity": "sha512-qwAPzDvcfKOZza1FU38BHo7qyiHMZXpJKVkdLK7I+wHi4nUhIhh+6qQbOGxPdiPaqAuI985d/nIUuJmbZ1ACrA==", + "dependencies": { + "adm-zip": "^0.5.9", + "array-hyper-unique": "^2.1.4", + "bluebird": "^3.7.2", + "crlf-normalize": "^1.0.18", + "tslib": "^2.4.1", + "xml2js": "^0.4.23" + } + }, + "node_modules/epub2/node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, "node_modules/es-abstract": { "version": "1.21.2", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", @@ -1765,6 +2786,39 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -2318,6 +3372,11 @@ "node": ">=0.10.0" } }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, "node_modules/eventsource-parser": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-0.1.0.tgz", @@ -2326,6 +3385,24 @@ "node": ">=14.18" } }, + "node_modules/expr-eval": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expr-eval/-/expr-eval-2.0.2.tgz", + "integrity": "sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg==" + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -2341,7 +3418,6 @@ "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -2357,7 +3433,6 @@ "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" }, @@ -2380,7 +3455,6 @@ "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, "dependencies": { "reusify": "^1.0.4" } @@ -2435,7 +3509,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -2459,6 +3532,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "bin": { + "flat": "cli.js" + } + }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -2584,7 +3665,6 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -2639,6 +3719,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-nonce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", + "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==", + "engines": { + "node": ">=6" + } + }, "node_modules/get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -2688,7 +3776,6 @@ "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" }, @@ -3029,12 +4116,45 @@ "node": ">=12" } }, - "node_modules/html-parse-stringify": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz", - "integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==", + "node_modules/html-parse-stringify": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz", + "integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==", + "dependencies": { + "void-elements": "3.1.0" + } + }, + "node_modules/html-to-text": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-9.0.5.tgz", + "integrity": "sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg==", + "dependencies": { + "@selderee/plugin-htmlparser2": "^0.11.0", + "deepmerge": "^4.3.1", + "dom-serializer": "^2.0.0", + "htmlparser2": "^8.0.2", + "selderee": "^0.11.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], "dependencies": { - "void-elements": "3.1.0" + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" } }, "node_modules/http-proxy-agent": { @@ -3104,11 +4224,16 @@ "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 4" } }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -3147,8 +4272,7 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/inline-style-parser": { "version": "0.1.1", @@ -3169,6 +4293,14 @@ "node": ">= 0.4" } }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/is-alphabetical": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", @@ -3191,6 +4323,11 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-any-array": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-any-array/-/is-any-array-2.0.1.tgz", + "integrity": "sha512-UtilS7hLRu++wb/WBAw9bNuP1Eg04Ivn1vERJck8zJthEvXCBEBpGR/33u/xLKWEQf95803oalHrVDptcAvFdQ==" + }, "node_modules/is-arguments": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", @@ -3237,7 +4374,6 @@ "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" }, @@ -3299,7 +4435,6 @@ "version": "2.11.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", - "dev": true, "dependencies": { "has": "^1.0.3" }, @@ -3350,7 +4485,6 @@ "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" } @@ -3359,7 +4493,6 @@ "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" }, @@ -3401,7 +4534,6 @@ "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" } @@ -3532,6 +4664,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, "node_modules/is-weakmap": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", @@ -3600,6 +4737,14 @@ "url": "https://opencollective.com/js-sdsl" } }, + "node_modules/js-tiktoken": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.6.tgz", + "integrity": "sha512-lxHntEupgjWvSh37WxpAW4XN6UBXBtFJOpZZq5HN5oNjDfN7L/iJhHOKjyL/DFtuYXUwn5jfTciLtOWpgQmHjQ==", + "dependencies": { + "base64-js": "^1.5.1" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3686,6 +4831,14 @@ "json5": "lib/cli.js" } }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/jsx-ast-utils": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz", @@ -3699,6 +4852,17 @@ "node": ">=4.0" } }, + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, "node_modules/katex": { "version": "0.13.24", "resolved": "https://registry.npmjs.org/katex/-/katex-0.13.24.tgz", @@ -3722,6 +4886,269 @@ "node": ">=6" } }, + "node_modules/langchain": { + "version": "0.0.94", + "resolved": "https://registry.npmjs.org/langchain/-/langchain-0.0.94.tgz", + "integrity": "sha512-RafU2Nk005jnNgOPSi5LhXtwOhdf8nwLSWU4hRyMXwB1l3lNCwTKlYWfKwMQ9VaSEe+4fEaO8lM9yVp+y3aa9w==", + "dependencies": { + "@anthropic-ai/sdk": "^0.4.3", + "ansi-styles": "^5.0.0", + "binary-extensions": "^2.2.0", + "camelcase": "6", + "decamelize": "5", + "expr-eval": "^2.0.2", + "flat": "^5.0.2", + "js-tiktoken": "^1.0.6", + "jsonpointer": "^5.0.1", + "langchainplus-sdk": "^0.0.11", + "ml-distance": "^4.0.0", + "object-hash": "^3.0.0", + "openai": "^3.3.0", + "p-queue": "^6.6.2", + "p-retry": "4", + "uuid": "^9.0.0", + "yaml": "^2.2.1", + "zod": "^3.21.4", + "zod-to-json-schema": "^3.20.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@aws-sdk/client-dynamodb": "^3.310.0", + "@aws-sdk/client-lambda": "^3.310.0", + "@aws-sdk/client-s3": "^3.310.0", + "@aws-sdk/client-sagemaker-runtime": "^3.310.0", + "@clickhouse/client": "^0.0.14", + "@getmetal/metal-sdk": "*", + "@getzep/zep-js": "^0.3.1", + "@gomomento/sdk": "^1.23.0", + "@google-cloud/storage": "^6.10.1", + "@huggingface/inference": "^1.5.1", + "@opensearch-project/opensearch": "*", + "@pinecone-database/pinecone": "*", + "@qdrant/js-client-rest": "^1.2.0", + "@supabase/postgrest-js": "^1.1.1", + "@supabase/supabase-js": "^2.10.0", + "@tensorflow-models/universal-sentence-encoder": "*", + "@tensorflow/tfjs-converter": "*", + "@tensorflow/tfjs-core": "*", + "@tigrisdata/vector": "^1.1.0", + "@upstash/redis": "^1.20.6", + "@zilliz/milvus2-sdk-node": ">=2.2.7", + "apify-client": "^2.7.1", + "axios": "*", + "cheerio": "^1.0.0-rc.12", + "chromadb": "^1.5.2", + "cohere-ai": "^5.0.2", + "d3-dsv": "^2.0.0", + "epub2": "^3.0.1", + "faiss-node": "^0.2.1", + "google-auth-library": "^8.8.0", + "hnswlib-node": "^1.4.2", + "html-to-text": "^9.0.5", + "ignore": "^5.2.0", + "mammoth": "*", + "mongodb": "^5.2.0", + "mysql2": "^3.3.3", + "pdf-parse": "1.1.1", + "peggy": "^3.0.2", + "pg": "^8.11.0", + "pickleparser": "^0.1.0", + "playwright": "^1.32.1", + "puppeteer": "^19.7.2", + "redis": "^4.6.4", + "replicate": "^0.9.0", + "srt-parser-2": "^1.2.2", + "typeorm": "^0.3.12", + "weaviate-ts-client": "^1.0.0" + }, + "peerDependenciesMeta": { + "@aws-sdk/client-dynamodb": { + "optional": true + }, + "@aws-sdk/client-lambda": { + "optional": true + }, + "@aws-sdk/client-s3": { + "optional": true + }, + "@aws-sdk/client-sagemaker-runtime": { + "optional": true + }, + "@clickhouse/client": { + "optional": true + }, + "@getmetal/metal-sdk": { + "optional": true + }, + "@getzep/zep-js": { + "optional": true + }, + "@gomomento/sdk": { + "optional": true + }, + "@google-cloud/storage": { + "optional": true + }, + "@huggingface/inference": { + "optional": true + }, + "@opensearch-project/opensearch": { + "optional": true + }, + "@pinecone-database/pinecone": { + "optional": true + }, + "@qdrant/js-client-rest": { + "optional": true + }, + "@supabase/postgrest-js": { + "optional": true + }, + "@supabase/supabase-js": { + "optional": true + }, + "@tensorflow-models/universal-sentence-encoder": { + "optional": true + }, + "@tensorflow/tfjs-converter": { + "optional": true + }, + "@tensorflow/tfjs-core": { + "optional": true + }, + "@tigrisdata/vector": { + "optional": true + }, + "@upstash/redis": { + "optional": true + }, + "@zilliz/milvus2-sdk-node": { + "optional": true + }, + "apify-client": { + "optional": true + }, + "axios": { + "optional": true + }, + "cheerio": { + "optional": true + }, + "chromadb": { + "optional": true + }, + "cohere-ai": { + "optional": true + }, + "d3-dsv": { + "optional": true + }, + "epub2": { + "optional": true + }, + "faiss-node": { + "optional": true + }, + "google-auth-library": { + "optional": true + }, + "hnswlib-node": { + "optional": true + }, + "html-to-text": { + "optional": true + }, + "ignore": { + "optional": true + }, + "mammoth": { + "optional": true + }, + "mongodb": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "pdf-parse": { + "optional": true + }, + "peggy": { + "optional": true + }, + "pg": { + "optional": true + }, + "pickleparser": { + "optional": true + }, + "playwright": { + "optional": true + }, + "puppeteer": { + "optional": true + }, + "redis": { + "optional": true + }, + "replicate": { + "optional": true + }, + "srt-parser-2": { + "optional": true + }, + "typeorm": { + "optional": true + }, + "weaviate-ts-client": { + "optional": true + } + } + }, + "node_modules/langchain/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/langchain/node_modules/yaml": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz", + "integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==", + "engines": { + "node": ">= 14" + } + }, + "node_modules/langchainplus-sdk": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/langchainplus-sdk/-/langchainplus-sdk-0.0.11.tgz", + "integrity": "sha512-bEovYVJZq88LYznDfK+ohNVd0lqQ1DMgE/A/8ZkqsiyaRuEjvIQj4PLc0VQ8htWPBljrfTu8oS7g+SGWYTZfNw==", + "dependencies": { + "@types/uuid": "^9.0.1", + "commander": "^10.0.1", + "p-queue": "^6.6.2", + "p-retry": "4", + "uuid": "^9.0.0" + }, + "bin": { + "langchain": "dist/cli/main.cjs" + } + }, + "node_modules/langchainplus-sdk/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "engines": { + "node": ">=14" + } + }, "node_modules/language-subtag-registry": { "version": "0.3.22", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", @@ -3737,6 +5164,14 @@ "language-subtag-registry": "~0.3.2" } }, + "node_modules/leac": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/leac/-/leac-0.6.0.tgz", + "integrity": "sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==", + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -3750,11 +5185,18 @@ "node": ">= 0.8.0" } }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dependencies": { + "immediate": "~3.0.5" + } + }, "node_modules/lilconfig": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", - "dev": true, "engines": { "node": ">=10" } @@ -3774,6 +5216,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, "node_modules/lodash.castarray": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz", @@ -3812,6 +5259,16 @@ "loose-envify": "cli.js" } }, + "node_modules/lop": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/lop/-/lop-0.4.1.tgz", + "integrity": "sha512-9xyho9why2A2tzm5aIcMWKvzqKsnxrf9B5I+8O30olh6lQU8PH978LqZoI4++37RBgS1Em5i54v1TFs/3wnmXQ==", + "dependencies": { + "duck": "^0.1.12", + "option": "~0.2.1", + "underscore": "^1.13.1" + } + }, "node_modules/lowlight": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-1.20.0.tgz", @@ -3837,6 +5294,45 @@ "node": ">=10" } }, + "node_modules/lucide-react": { + "version": "0.241.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.241.0.tgz", + "integrity": "sha512-g22ci6iHuNc2hUwjiFz0D3jQQfQYrZBZesXG6+AX5rOV68Epttkt/nF6dMdz6reKJjtpoNzu+LKeKHGu/qjOgQ==", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/mammoth": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mammoth/-/mammoth-1.6.0.tgz", + "integrity": "sha512-jOwbj6BwJzxCf6jr2l1zmSemniIkLnchvELXnDJCANlJawhzyIKObIq48B8kWEPLgUUh57k7FtEO3DHFQMnjMg==", + "dependencies": { + "@xmldom/xmldom": "^0.8.6", + "argparse": "~1.0.3", + "base64-js": "^1.5.1", + "bluebird": "~3.4.0", + "dingbat-to-unicode": "^1.0.1", + "jszip": "^3.7.1", + "lop": "^0.4.1", + "path-is-absolute": "^1.0.0", + "underscore": "^1.13.1", + "xmlbuilder": "^10.0.0" + }, + "bin": { + "mammoth": "bin/mammoth" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/mammoth/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/markdown-table": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz", @@ -4085,11 +5581,18 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, "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" } @@ -4658,7 +6161,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -4710,7 +6212,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4720,6 +6221,57 @@ "resolved": "https://registry.npmjs.org/mj-context-menu/-/mj-context-menu-0.6.1.tgz", "integrity": "sha512-7NO5s6n10TIV96d4g2uDpG7ZDpIhMh0QNfGdJw/W47JswFcosz457wqz/b5sAKvl12sxINGFCn80NZHKwxQEXA==" }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ml-array-mean": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/ml-array-mean/-/ml-array-mean-1.1.6.tgz", + "integrity": "sha512-MIdf7Zc8HznwIisyiJGRH9tRigg3Yf4FldW8DxKxpCCv/g5CafTw0RRu51nojVEOXuCQC7DRVVu5c7XXO/5joQ==", + "dependencies": { + "ml-array-sum": "^1.1.6" + } + }, + "node_modules/ml-array-sum": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/ml-array-sum/-/ml-array-sum-1.1.6.tgz", + "integrity": "sha512-29mAh2GwH7ZmiRnup4UyibQZB9+ZLyMShvt4cH4eTK+cL2oEMIZFnSyB3SS8MlsTh6q/w/yh48KmqLxmovN4Dw==", + "dependencies": { + "is-any-array": "^2.0.0" + } + }, + "node_modules/ml-distance": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ml-distance/-/ml-distance-4.0.0.tgz", + "integrity": "sha512-zj7+UGZpHk3uL7n79XTfGNUjIGnhLn8xVvrxYvBHvXFxo3jq1q+/UjP311hZxnLVhbxbXCjUniThX8gozjacYA==", + "dependencies": { + "ml-array-mean": "^1.1.6", + "ml-distance-euclidean": "^2.0.0", + "ml-tree-similarity": "^1.0.0" + } + }, + "node_modules/ml-distance-euclidean": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ml-distance-euclidean/-/ml-distance-euclidean-2.0.0.tgz", + "integrity": "sha512-yC9/2o8QF0A3m/0IXqCTXCzz2pNEzvmcE/9HFKOZGnTjatvBbsn4lWYJkxENkA4Ug2fnYl7PXQxnPi21sgMy/Q==" + }, + "node_modules/ml-tree-similarity": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ml-tree-similarity/-/ml-tree-similarity-1.0.0.tgz", + "integrity": "sha512-XJUyYqjSuUQkNQHMscr6tcjldsOoAekxADTplt40QKfwW6nd++1wHWV9AArl0Zvw/TIHgNaZZNvr8QGvE8wLRg==", + "dependencies": { + "binary-search": "^1.3.5", + "num-sort": "^2.0.0" + } + }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -4733,6 +6285,23 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node_modules/multer": { + "version": "1.4.5-lts.1", + "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.1.tgz", + "integrity": "sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==", + "dependencies": { + "append-field": "^1.0.0", + "busboy": "^1.0.0", + "concat-stream": "^1.5.2", + "mkdirp": "^0.5.4", + "object-assign": "^4.1.1", + "type-is": "^1.6.4", + "xtend": "^4.0.0" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", @@ -4846,6 +6415,11 @@ "react-i18next": "^12.2.0" } }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, "node_modules/next/node_modules/postcss": { "version": "8.4.14", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", @@ -4887,6 +6461,11 @@ "node": ">=10.5.0" } }, + "node_modules/node-ensure": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/node-ensure/-/node-ensure-0.0.0.tgz", + "integrity": "sha512-DRI60hzo2oKN1ma0ckc6nQWlHU69RH6xN0sjQTjMpChPfTYvKZdcQFfdYK2RWbJcKyUizSIy/l8OTGxMAM1QDw==" + }, "node_modules/node-fetch": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", @@ -4904,6 +6483,16 @@ "url": "https://opencollective.com/node-fetch" } }, + "node_modules/node-gyp-build": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", + "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, "node_modules/node-releases": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", @@ -4914,7 +6503,6 @@ "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" } @@ -4928,6 +6516,17 @@ "node": ">=0.10.0" } }, + "node_modules/num-sort": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/num-sort/-/num-sort-2.1.0.tgz", + "integrity": "sha512-1MQz1Ed8z2yckoBeSfkQHHO9K1yDRxxtotKSJ9yvcTUUxSvfvzEq5GwBrjjHEpMlq/k5gvXdmJ1SbYxWtpNoVg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/nwsapi": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.2.tgz", @@ -4945,7 +6544,6 @@ "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" } @@ -5088,14 +6686,19 @@ } }, "node_modules/openai": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/openai/-/openai-3.2.1.tgz", - "integrity": "sha512-762C9BNlJPbjjlWZi4WYK9iM2tAVAv0uUp1UmI34vb0CN5T2mjB/qM6RYBmNKMh/dN9fC+bxqPwWJZUTWW052A==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/openai/-/openai-3.3.0.tgz", + "integrity": "sha512-uqxI/Au+aPRnsaQRe8CojU0eCR7I0mBiKjD3sNMzY6DaC1ZVrc85u98mtJW6voDug8fgGN+DIZmTDxTthxb7dQ==", "dependencies": { "axios": "^0.26.0", "form-data": "^4.0.0" } }, + "node_modules/option": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/option/-/option-0.2.4.tgz", + "integrity": "sha512-pkEqbDyl8ou5cpq+VsnQbe/WlEy5qS7xPzMS1U55OCG9KPvwFD46zDbxQIj3egJSFc3D+XhYOPUzz49zQAVy7A==" + }, "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -5110,7 +6713,15 @@ "word-wrap": "^1.2.3" }, "engines": { - "node": ">= 0.8.0" + "node": ">= 0.8.0" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", + "engines": { + "node": ">=4" } }, "node_modules/p-limit": { @@ -5143,6 +6754,49 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-queue": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", + "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", + "dependencies": { + "eventemitter3": "^4.0.4", + "p-timeout": "^3.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-retry": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", + "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "dependencies": { + "@types/retry": "0.12.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "dependencies": { + "p-finally": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -5177,6 +6831,18 @@ "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" }, + "node_modules/parseley": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/parseley/-/parseley-0.12.1.tgz", + "integrity": "sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==", + "dependencies": { + "leac": "^0.6.0", + "peberminta": "^0.9.0" + }, + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -5190,7 +6856,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -5207,8 +6872,7 @@ "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 + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-type": { "version": "4.0.0", @@ -5219,6 +6883,34 @@ "node": ">=8" } }, + "node_modules/pdf-parse": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pdf-parse/-/pdf-parse-1.1.1.tgz", + "integrity": "sha512-v6ZJ/efsBpGrGGknjtq9J/oC8tZWq0KWL5vQrk2GlzLEQPUDB1ex+13Rmidl1neNN358Jn9EHZw5y07FFtaC7A==", + "dependencies": { + "debug": "^3.1.0", + "node-ensure": "^0.0.0" + }, + "engines": { + "node": ">=6.8.1" + } + }, + "node_modules/pdf-parse/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/peberminta": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/peberminta/-/peberminta-0.9.0.tgz", + "integrity": "sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==", + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -5228,7 +6920,6 @@ "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" }, @@ -5240,7 +6931,6 @@ "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" } @@ -5249,7 +6939,6 @@ "version": "8.4.21", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", - "dev": true, "funding": [ { "type": "opencollective", @@ -5273,7 +6962,6 @@ "version": "14.1.0", "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.1.0.tgz", "integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==", - "dev": true, "dependencies": { "postcss-value-parser": "^4.0.0", "read-cache": "^1.0.0", @@ -5290,7 +6978,6 @@ "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" }, @@ -5309,7 +6996,6 @@ "version": "3.1.4", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", - "dev": true, "dependencies": { "lilconfig": "^2.0.5", "yaml": "^1.10.2" @@ -5338,7 +7024,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.0.tgz", "integrity": "sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==", - "dev": true, "dependencies": { "postcss-selector-parser": "^6.0.10" }, @@ -5357,7 +7042,6 @@ "version": "6.0.10", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", - "dev": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -5369,8 +7053,7 @@ "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 + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/prelude-ls": { "version": "1.2.1", @@ -5478,6 +7161,11 @@ "node": ">=6" } }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -5533,7 +7221,6 @@ "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", @@ -5553,7 +7240,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true, "engines": { "node": ">=10" }, @@ -5645,6 +7331,73 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" }, + "node_modules/react-remove-scroll": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz", + "integrity": "sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==", + "dependencies": { + "react-remove-scroll-bar": "^2.3.3", + "react-style-singleton": "^2.2.1", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.0", + "use-sidecar": "^1.1.2" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-remove-scroll-bar": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.4.tgz", + "integrity": "sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==", + "dependencies": { + "react-style-singleton": "^2.2.1", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-style-singleton": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.1.tgz", + "integrity": "sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==", + "dependencies": { + "get-nonce": "^1.0.0", + "invariant": "^2.2.4", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/react-syntax-highlighter": { "version": "15.5.0", "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz", @@ -5664,16 +7417,33 @@ "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/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, "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" }, @@ -5813,7 +7583,6 @@ "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, "dependencies": { "is-core-module": "^2.9.0", "path-parse": "^1.0.7", @@ -5835,11 +7604,18 @@ "node": ">=4" } }, + "node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "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" @@ -5864,7 +7640,6 @@ "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", @@ -5883,6 +7658,11 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/rw": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" + }, "node_modules/sade": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", @@ -5894,6 +7674,11 @@ "node": ">=6" } }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, "node_modules/safe-regex-test": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", @@ -5913,6 +7698,11 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, "node_modules/saxes": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", @@ -5932,6 +7722,17 @@ "loose-envify": "^1.1.0" } }, + "node_modules/selderee": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/selderee/-/selderee-0.11.0.tgz", + "integrity": "sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA==", + "dependencies": { + "parseley": "^0.12.0" + }, + "funding": { + "url": "https://ko-fi.com/killymxi" + } + }, "node_modules/semver": { "version": "7.3.8", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", @@ -5947,6 +7748,11 @@ "node": ">=10" } }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -6037,6 +7843,22 @@ "node": "^12.20.0 || >=14" } }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + }, + "node_modules/srt-parser-2": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/srt-parser-2/-/srt-parser-2-1.2.3.tgz", + "integrity": "sha512-dANP1AyJTI503H0/kXwRza+7QxDB3BqeFvEKTF4MI9lQcBe8JbRUQTKVIGzGABJCwBovEYavZ2Qsdm/s8XKz8A==", + "bin": { + "srt-parser-2": "bin/index.js" + }, + "engines": { + "node": "*" + } + }, "node_modules/stop-iteration-iterator": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", @@ -6049,6 +7871,22 @@ "node": ">= 0.4" } }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/string.prototype.matchall": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", @@ -6192,7 +8030,6 @@ "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" }, @@ -6221,11 +8058,19 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/tailwind-merge": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-1.13.1.tgz", + "integrity": "sha512-tRtRN22TDokGi2TuYSvuHQuuW6BJ/zlUEG+iYpAQ9i66msc/0eU/+HPccbPnNNH0mCPp0Ob8thaC8Uy9CxHitQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, "node_modules/tailwindcss": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.7.tgz", "integrity": "sha512-B6DLqJzc21x7wntlH/GsZwEXTBttVSl1FtCzC8WP4oBc/NKef7kaax5jeihkkCEWc831/5NDJ9gRNDK6NEioQQ==", - "dev": true, "dependencies": { "arg": "^5.0.2", "chokidar": "^3.5.3", @@ -6262,11 +8107,18 @@ "postcss": "^8.0.9" } }, + "node_modules/tailwindcss-animate": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/tailwindcss-animate/-/tailwindcss-animate-1.0.6.tgz", + "integrity": "sha512-4WigSGMvbl3gCCact62ZvOngA+PRqhAn7si3TQ3/ZuPuQZcIEtVap+ENSXbzWhpojKB8CpvnIsrwBu8/RnHtuw==", + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders" + } + }, "node_modules/tailwindcss/node_modules/postcss-selector-parser": { "version": "6.0.11", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz", "integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==", - "dev": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -6304,7 +8156,6 @@ "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" }, @@ -6355,6 +8206,25 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/ts-toolbelt": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", + "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", + "peer": true + }, + "node_modules/ts-type": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ts-type/-/ts-type-3.0.1.tgz", + "integrity": "sha512-cleRydCkBGBFQ4KAvLH0ARIkciduS745prkGVVxPGvcRGhMMoSJUB7gNR1ByKhFTEYrYRg2CsMRGYnqp+6op+g==", + "dependencies": { + "@types/node": "*", + "tslib": ">=2", + "typedarray-dts": "^1.0.0" + }, + "peerDependencies": { + "ts-toolbelt": "^9.6.0" + } + }, "node_modules/tsconfig-paths": { "version": "3.14.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", @@ -6393,6 +8263,11 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -6405,6 +8280,14 @@ "node": ">= 0.8.0" } }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "engines": { + "node": ">=4" + } + }, "node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", @@ -6417,6 +8300,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/typed-array-length": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", @@ -6431,11 +8326,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" + }, + "node_modules/typedarray-dts": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typedarray-dts/-/typedarray-dts-1.0.0.tgz", + "integrity": "sha512-Ka0DBegjuV9IPYFT1h0Qqk5U4pccebNIJCGl8C5uU7xtOs+jpJvKGAY4fHGK25hTmXZOEUl9Cnsg5cS6K/b5DA==" + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, "node_modules/typescript": { "version": "4.9.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, + "devOptional": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -6459,6 +8372,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==" + }, "node_modules/unified": { "version": "10.1.2", "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", @@ -6614,11 +8532,71 @@ "requires-port": "^1.0.0" } }, + "node_modules/use-callback-ref": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.0.tgz", + "integrity": "sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/use-sidecar": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz", + "integrity": "sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==", + "dependencies": { + "detect-node-es": "^1.1.0", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "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 + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "bin": { + "uuid": "dist/bin/uuid" + } }, "node_modules/uvu": { "version": "0.5.6", @@ -6718,6 +8696,35 @@ "node": ">=12" } }, + "node_modules/websocket": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", + "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", + "dependencies": { + "bufferutil": "^4.0.1", + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "typedarray-to-buffer": "^3.1.5", + "utf-8-validate": "^5.0.2", + "yaeti": "^0.0.6" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/websocket/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/websocket/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/whatwg-encoding": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", @@ -6861,6 +8868,34 @@ "node": ">=12" } }, + "node_modules/xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xml2js/node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/xmlbuilder": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-10.1.1.tgz", + "integrity": "sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg==", + "engines": { + "node": ">=4.0" + } + }, "node_modules/xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", @@ -6882,6 +8917,14 @@ "node": ">=0.4" } }, + "node_modules/yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==", + "engines": { + "node": ">=0.10.32" + } + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -6892,7 +8935,6 @@ "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true, "engines": { "node": ">= 6" } @@ -6909,6 +8951,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/zod": { + "version": "3.21.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz", + "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.21.0.tgz", + "integrity": "sha512-+KyFCzqKwE6CxMSZxEUBaGmdXzB09BoFebO+xef/ISE4cTfReQlyThYbS8aqd3uWkdt9fz5BGHsY0CbY+Ra9oA==", + "peerDependencies": { + "zod": "^3.21.4" + } + }, "node_modules/zwitch": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", diff --git a/chatfiles-ui/package.json b/package.json similarity index 64% rename from chatfiles-ui/package.json rename to package.json index 649288d..74fe987 100644 --- a/chatfiles-ui/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "chatfiles-ui", + "name": "ChatFiles", "version": "0.1.0", "private": true, "scripts": { @@ -11,16 +11,32 @@ }, "dependencies": { "@dqbd/tiktoken": "^1.0.2", + "@radix-ui/react-dialog": "^1.0.4", + "@radix-ui/react-label": "^2.0.2", + "@radix-ui/react-slot": "^1.0.2", + "@radix-ui/react-tabs": "^1.0.4", + "@supabase/supabase-js": "^2.21.0", "@tabler/icons-react": "^2.9.0", + "@types/multer": "^1.4.7", + "class-variance-authority": "^0.6.0", + "clsx": "^1.2.1", + "d3-dsv": "^2.0.0", "dotenv": "^16.0.3", + "epub2": "^3.0.1", "eventsource-parser": "^0.1.0", "flowbite": "^1.6.4", "formidable": "^2.1.1", + "html-to-text": "^9.0.5", "i18next": "^22.4.13", + "langchain": "^0.0.94", + "lucide-react": "^0.241.0", + "mammoth": "^1.6.0", + "multer": "^1.4.5-lts.1", "next": "13.2.4", "next-i18next": "^13.2.2", "node-fetch": "^3.3.1", "openai": "^3.2.1", + "pdf-parse": "^1.1.1", "react": "18.2.0", "react-dom": "18.2.0", "react-i18next": "^12.2.0", @@ -28,7 +44,10 @@ "react-syntax-highlighter": "^15.5.0", "rehype-mathjax": "^4.0.2", "remark-gfm": "^3.0.1", - "remark-math": "^5.1.1" + "remark-math": "^5.1.1", + "srt-parser-2": "^1.2.3", + "tailwind-merge": "^1.13.1", + "tailwindcss-animate": "^1.0.6" }, "devDependencies": { "@tailwindcss/typography": "^0.5.9", @@ -37,6 +56,7 @@ "@types/react": "18.0.30", "@types/react-dom": "18.0.11", "@types/react-syntax-highlighter": "^15.5.6", + "@types/uuid": "^9.0.1", "autoprefixer": "^10.4.14", "eslint": "8.36.0", "eslint-config-next": "13.2.4", diff --git a/chatfiles-ui/pages/_app.tsx b/pages/_app.tsx similarity index 100% rename from chatfiles-ui/pages/_app.tsx rename to pages/_app.tsx diff --git a/chatfiles-ui/pages/_document.tsx b/pages/_document.tsx similarity index 100% rename from chatfiles-ui/pages/_document.tsx rename to pages/_document.tsx diff --git a/pages/api/chat.ts b/pages/api/chat.ts new file mode 100644 index 0000000..59f0109 --- /dev/null +++ b/pages/api/chat.ts @@ -0,0 +1,75 @@ +import {ChatBody} from '@/types'; +// @ts-expect-error +import wasm from '../../node_modules/@dqbd/tiktoken/lite/tiktoken_bg.wasm?module'; +import {getKeyConfiguration} from "@/utils/app/configuration"; +import {NextApiRequest, NextApiResponse} from "next"; +import {AIChatMessage, BaseChatMessage, HumanChatMessage} from "langchain/schema"; +import {getChatModel} from "@/utils/openai"; +import {ChatPromptTemplate, HumanMessagePromptTemplate} from "langchain/prompts"; +import {BufferMemory, ChatMessageHistory} from "langchain/memory"; +import {LLMChain} from "langchain/chains"; + +export const config = { + // runtime: 'edge', +}; + + +const handler = async (req: NextApiRequest, res: NextApiResponse) => { + const { messages, prompt } = req.body as ChatBody; + const keyConfiguration = getKeyConfiguration(req); + + let input: string; + if (messages.length === 1) { + input = messages[0].content; + } else { + input = messages[messages.length - 1].content; + } + + const historyMessages: BaseChatMessage[] = messages?.slice(0, messages.length - 1) + .map((message) => { + if (message.role === 'user') { + return new HumanChatMessage(message.content); + } else if (message.role === 'assistant') { + return new AIChatMessage(message.content); + } + throw new TypeError('Invalid message role'); + }); + + try { + const llm = await getChatModel(keyConfiguration, res); + + const promptTemplate = ChatPromptTemplate.fromPromptMessages([ + // SystemMessagePromptTemplate.fromTemplate(prompt ? prompt : DEFAULT_SYSTEM_PROMPT), + // new MessagesPlaceholder("history"), + HumanMessagePromptTemplate.fromTemplate("{input}"), + ]); + + const memory = new BufferMemory({ + returnMessages: true, + chatHistory: new ChatMessageHistory(historyMessages), + }); + + const chain = new LLMChain({ + prompt: promptTemplate, + llm, + memory, + }); + + chain.call({ input }).catch(console.error); + } catch (err) { + console.error(err); + let error = "Unexpected message"; + if (err instanceof Error) { + error = err.message; + } + return new Response(JSON.stringify({ error }), { + status: 500, + headers: { + "Content-Type": "application/json", + }, + }); + } +}; + + +export default handler; diff --git a/pages/api/embedding.ts b/pages/api/embedding.ts new file mode 100644 index 0000000..f2adf58 --- /dev/null +++ b/pages/api/embedding.ts @@ -0,0 +1,30 @@ +import type {NextApiRequest, NextApiResponse} from 'next' +import {getDocumentLoader} from "@/utils/langchain/documentLoader"; +import {getSplitterDocument} from "@/utils/langchain/splitter"; +import {saveEmbeddings} from "@/utils/vector"; +import {NEXT_PUBLIC_CHAT_FILES_UPLOAD_PATH} from "@/utils/app/const"; +import { getKeyConfiguration } from '@/utils/app/configuration'; + +const folderPath = NEXT_PUBLIC_CHAT_FILES_UPLOAD_PATH; + +const handler = async (req: NextApiRequest, res: NextApiResponse) => { + console.log("beginning embedding handler"); + const keyConfiguration = getKeyConfiguration(req); + + const { fileName, fileType } = req.body; + const loader = getDocumentLoader(fileType, `${folderPath}/${fileName}.${fileType}`); + const document = await loader.load(); + const splitDocuments = await getSplitterDocument(keyConfiguration, document); + splitDocuments.map((doc) => { + doc.metadata = { file_name : fileName }; + }); + try { + await saveEmbeddings(keyConfiguration, splitDocuments); + res.status(200).json({ message: 'save supabase embedding successes' }); + } catch (e) { + console.error(e); + res.status(500).json({ message: (e as Error).message }); + } +} + +export default handler; \ No newline at end of file diff --git a/pages/api/files.ts b/pages/api/files.ts new file mode 100644 index 0000000..eb8af2a --- /dev/null +++ b/pages/api/files.ts @@ -0,0 +1,55 @@ +import type {NextApiRequest, NextApiResponse} from 'next' +import multer from "multer"; +import fs from 'fs'; +import {NEXT_PUBLIC_CHAT_FILES_UPLOAD_PATH} from "@/utils/app/const"; + +export const config = { + api: { + bodyParser: false, + } +}; + +const folderPath = NEXT_PUBLIC_CHAT_FILES_UPLOAD_PATH!; + +const upload = multer({ + storage: multer.diskStorage({ + destination: (req, file, cb) => { + cb(null, folderPath); + }, + filename: (req, file, cb) => { + cb(null, req.query.fileName as string); + }, + }), +}); + +const handler = async (req: NextApiRequest, res: NextApiResponse) => { + console.log("beginning files handler"); + + if (req.method === 'POST') { + upload.single('file')(req as any, res as any, (err: any) => { + if (err) { + return res.status(400).json({ message: err.message }); + } + // File uploaded successfully + res.status(200).json({ message: 'File uploaded successfully' }); + }); + } else if (req.method === 'DELETE') { + const filePath = `${folderPath}/${req.query.fileName as string}`; + if (fs.existsSync(filePath)) { + fs.unlink(filePath, (err) => { + if (err) { + console.error(err); + return res.status(400).json({ message: err.message }); + } + res.status(200).json({ message: 'File deleted successfully' }); + console.log('File deleted successfully'); + }); + } else { + res.status(404).json({ message: 'File Not Found' }); + console.log('File does not exist'); + } + } + +} + +export default handler; \ No newline at end of file diff --git a/pages/api/query.ts b/pages/api/query.ts new file mode 100644 index 0000000..ec122b6 --- /dev/null +++ b/pages/api/query.ts @@ -0,0 +1,40 @@ +import type {NextApiRequest, NextApiResponse} from 'next' +import {getExistingVectorStore} from "@/utils/vector"; +import {getModel} from "@/utils/openai"; +import {loadQAStuffChain} from "langchain/chains"; +import { getKeyConfiguration } from '@/utils/app/configuration'; + +export const config = { + api: { + bodyParser: false, + } +}; + +const handler = async (req: NextApiRequest, res: NextApiResponse) => { + console.log("beginning handler"); + const keyConfiguration = getKeyConfiguration(req); + + const message: string = req.query.message as string; + const indexName: string = req.query.indexName as string; + + console.log("handler chatfile query: ", message, indexName); + const vectorStore = await getExistingVectorStore(keyConfiguration, indexName); + + const documents = await vectorStore.similaritySearch(message, 2); + const llm = await getModel(keyConfiguration, res); + const stuffChain = loadQAStuffChain(llm); + + try { + stuffChain.call({ + input_documents: documents, + question: message, + }).catch(console.error); + // res.status(200).json({ responseMessage: chainValues.text.toString() }); + } catch (e) { + console.log("error in handler: ", e); + res.status(500).json({ responseMessage: (e as Error).toString() }); + } + +} + +export default handler; \ No newline at end of file diff --git a/pages/index.tsx b/pages/index.tsx new file mode 100644 index 0000000..d09fb1f --- /dev/null +++ b/pages/index.tsx @@ -0,0 +1,615 @@ +import {Chat} from '@/components/Chat/Chat'; +import {Navbar} from '@/components/Mobile/Navbar'; +import {Sidebar} from '@/components/Sidebar/Sidebar'; +import { + ChatBody, + ChatFolder, + Conversation, + ErrorMessage, + KeyConfiguration, + KeyValuePair, + Message, + ModelType, + OpenAIModel, + OpenAIModelID, + OpenAIModels, +} from '@/types'; +import { + cleanConversationHistory, + cleanSelectedConversation, +} from '@/utils/app/clean'; +import {DEFAULT_SYSTEM_PROMPT} from '@/utils/app/const'; +import { + saveConversation, + saveConversations, + updateConversation, +} from '@/utils/app/conversation'; +import {saveFolders} from '@/utils/app/folders'; +import {exportData, importData} from '@/utils/app/importExport'; +import {IconArrowBarRight} from '@tabler/icons-react'; +import {GetServerSideProps} from 'next'; +import {useTranslation} from 'next-i18next'; +import {serverSideTranslations} from 'next-i18next/serverSideTranslations'; +import Head from 'next/head'; +import {useEffect, useRef, useState} from 'react'; + +interface HomeProps { + serverSideApiKeyIsSet: boolean; +} + +const Home: React.FC = ({serverSideApiKeyIsSet}) => { + const {t} = useTranslation('chat'); + const [folders, setFolders] = useState([]); + const [conversations, setConversations] = useState([]); + const [selectedConversation, setSelectedConversation] = + useState(); + const [loading, setLoading] = useState(false); + const [models, setModels] = useState([]); + const [lightMode, setLightMode] = useState<'dark' | 'light'>('dark'); + const [messageIsStreaming, setMessageIsStreaming] = useState(false); + const [showSidebar, setShowSidebar] = useState(true); + const [messageError, setMessageError] = useState(false); + const [modelError, setModelError] = useState(null); + const [currentMessage, setCurrentMessage] = useState(); + const [keyConfiguration, setkeyConfiguration] = useState({ + apiType: ModelType.OPENAI, + apiKey: '', + azureApiKey: '', + azureInstanceName: '', + azureApiVersion: '', + azureDeploymentName: '', + azureEmbeddingDeploymentName: '', + }); + const stopConversationRef = useRef(false); + + const keyConfigurationButtonRef = useRef(null); + const handlekeyConfigurationButtonClick = () => { + if (keyConfigurationButtonRef.current) { + keyConfigurationButtonRef.current.click(); + } + }; + + const handleSend = async (message: Message, deleteCount = 0) => { + if (selectedConversation) { + let updatedConversation: Conversation; + + if (deleteCount) { + const updatedMessages = [...selectedConversation.messages]; + for (let i = 0; i < deleteCount; i++) { + updatedMessages.pop(); + } + + updatedConversation = { + ...selectedConversation, + messages: [...updatedMessages, message], + }; + } else { + updatedConversation = { + ...selectedConversation, + messages: [...selectedConversation.messages, message], + }; + } + + setSelectedConversation(updatedConversation); + setLoading(true); + setMessageIsStreaming(true); + setMessageError(false); + + + const controller = new AbortController(); + + let response: Response; + + if (updatedConversation.index.indexName.length === 0) { + + response = await fetch('/api/chat', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'x-api-type': keyConfiguration.apiType ?? '', + 'x-api-key': keyConfiguration.apiKey ?? '', + 'x-azure-api-key': keyConfiguration.azureApiKey ?? '', + 'x-azure-instance-name': keyConfiguration.azureInstanceName ?? '', + 'x-azure-api-version': keyConfiguration.azureApiVersion ?? '', + 'x-azure-deployment-name': keyConfiguration.azureDeploymentName ?? '', + 'x-azure-embedding-deployment-name': keyConfiguration.azureEmbeddingDeploymentName ?? '', + }, + signal: controller.signal, + body: JSON.stringify({ + messages: updatedConversation.messages, + prompt: updatedConversation.prompt, + }), + }); + + console.log("handle chat response") + } else { + response = await fetch( + `/api/query?message=${message.content}&indexName=${updatedConversation.index.indexName}`, { + method: 'GET', + headers: { + 'x-api-type': keyConfiguration.apiType ?? '', + 'x-api-key': keyConfiguration.apiKey ?? '', + 'x-azure-api-key': keyConfiguration.azureApiKey ?? '', + 'x-azure-instance-name': keyConfiguration.azureInstanceName ?? '', + 'x-azure-api-version': keyConfiguration.azureApiVersion ?? '', + 'x-azure-deployment-name': keyConfiguration.azureDeploymentName ?? '', + 'x-azure-embedding-deployment-name': keyConfiguration.azureEmbeddingDeploymentName ?? '', + }, + }); + console.log("handle file chat response") + } + + if (!response.ok) { + setLoading(false); + setMessageIsStreaming(false); + setMessageError(true); + return; + } + + if (!response?.body) { + setLoading(false); + setMessageIsStreaming(false); + setMessageError(true); + return; + } + + if (updatedConversation.messages.length === 1) { + const {content} = message; + const customName = + content.length > 30 ? content.substring(0, 30) + '...' : content; + + updatedConversation = { + ...updatedConversation, + name: customName, + }; + } + + setLoading(false); + + const reader = response.body.getReader(); + const decoder = new TextDecoder(); + let done = false; + let isFirst = true; + let text = ''; + + while (!done) { + if (stopConversationRef.current === true) { + controller.abort(); + done = true; + break; + } + const {value, done: doneReading} = await reader.read(); + done = doneReading; + const chunkValue = decoder.decode(value); + + text += chunkValue; + + if (isFirst) { + isFirst = false; + const updatedMessages: Message[] = [ + ...updatedConversation.messages, + {role: 'assistant', content: chunkValue}, + ]; + + updatedConversation = { + ...updatedConversation, + messages: updatedMessages, + }; + + setSelectedConversation(updatedConversation); + } else { + const updatedMessages: Message[] = updatedConversation.messages.map( + (message, index) => { + if (index === updatedConversation.messages.length - 1) { + return { + ...message, + content: text, + }; + } + + return message; + }, + ); + + updatedConversation = { + ...updatedConversation, + messages: updatedMessages, + }; + + setSelectedConversation(updatedConversation); + } + } + await reader.cancel(); + + saveConversation(updatedConversation); + + const updatedConversations: Conversation[] = conversations.map( + (conversation) => { + if (conversation.id === selectedConversation.id) { + return updatedConversation; + } + + return conversation; + }, + ); + + if (updatedConversations.length === 0) { + updatedConversations.push(updatedConversation); + } + + setConversations(updatedConversations); + + saveConversations(updatedConversations); + + setMessageIsStreaming(false); + } + }; + + const handleLightMode = (mode: 'dark' | 'light') => { + setLightMode(mode); + localStorage.setItem('theme', mode); + }; + + const handleExportData = () => { + exportData(); + }; + + const handleKeyConfigrationChange = (keySettings: KeyConfiguration) => { + setkeyConfiguration(keySettings); + localStorage.setItem('keyConfiguation', JSON.stringify(keySettings)); + }; + + const handleImportConversations = (data: { + conversations: Conversation[]; + folders: ChatFolder[]; + }) => { + importData(data.conversations, data.folders); + setConversations(data.conversations); + setSelectedConversation(data.conversations[data.conversations.length - 1]); + setFolders(data.folders); + }; + + const handleSelectConversation = (conversation: Conversation) => { + setSelectedConversation(conversation); + saveConversation(conversation); + }; + + const handleCreateFolder = (name: string) => { + const lastFolder = folders[folders.length - 1]; + + const newFolder: ChatFolder = { + id: lastFolder ? lastFolder.id + 1 : 1, + name, + }; + + const updatedFolders = [...folders, newFolder]; + + setFolders(updatedFolders); + saveFolders(updatedFolders); + }; + + const handleDeleteFolder = (folderId: number) => { + const updatedFolders = folders.filter((f) => f.id !== folderId); + setFolders(updatedFolders); + saveFolders(updatedFolders); + + const updatedConversations: Conversation[] = conversations.map((c) => { + if (c.folderId === folderId) { + return { + ...c, + folderId: 0, + }; + } + + return c; + }); + setConversations(updatedConversations); + saveConversations(updatedConversations); + }; + + const handleUpdateFolder = (folderId: number, name: string) => { + const updatedFolders = folders.map((f) => { + if (f.id === folderId) { + return { + ...f, + name, + }; + } + + return f; + }); + + setFolders(updatedFolders); + saveFolders(updatedFolders); + }; + + const handleNewConversation = () => { + const lastConversation = conversations[conversations.length - 1]; + + const newConversation: Conversation = { + id: lastConversation ? lastConversation.id + 1 : 1, + name: `${t('Conversation')} ${ + lastConversation ? lastConversation.id + 1 : 1 + }`, + messages: [], + model: OpenAIModels[OpenAIModelID.GPT_3_5], + prompt: DEFAULT_SYSTEM_PROMPT, + folderId: 0, + index: { + indexName: '', + indexType: '', + }, + }; + + const updatedConversations = [...conversations, newConversation]; + + setSelectedConversation(newConversation); + setConversations(updatedConversations); + + saveConversation(newConversation); + saveConversations(updatedConversations); + + setLoading(false); + }; + + const handleDeleteConversation = (conversation: Conversation) => { + const updatedConversations = conversations.filter( + (c) => c.id !== conversation.id, + ); + setConversations(updatedConversations); + saveConversations(updatedConversations); + + if (updatedConversations.length > 0) { + setSelectedConversation( + updatedConversations[updatedConversations.length - 1], + ); + saveConversation(updatedConversations[updatedConversations.length - 1]); + } else { + setSelectedConversation({ + id: 1, + name: 'New conversation', + messages: [], + model: OpenAIModels[OpenAIModelID.GPT_3_5], + prompt: DEFAULT_SYSTEM_PROMPT, + folderId: 0, + index: { + indexName: '', + indexType: '', + }, + }); + localStorage.removeItem('selectedConversation'); + } + }; + + const handleUpdateConversation = ( + conversation: Conversation, + data: KeyValuePair, + ) => { + const updatedConversation = { + ...conversation, + [data.key]: data.value, + }; + + const {single, all} = updateConversation( + updatedConversation, + conversations, + ); + + setSelectedConversation(single); + setConversations(all); + }; + + const handleClearConversations = () => { + setConversations([]); + localStorage.removeItem('conversationHistory'); + + setSelectedConversation({ + id: 1, + name: 'New conversation', + messages: [], + model: OpenAIModels[OpenAIModelID.GPT_3_5], + prompt: DEFAULT_SYSTEM_PROMPT, + folderId: 0, + index: { + indexName: '', + indexType: '', + }, + }); + localStorage.removeItem('selectedConversation'); + + setFolders([]); + localStorage.removeItem('folders'); + }; + + const handleEditMessage = (message: Message, messageIndex: number) => { + if (selectedConversation) { + const updatedMessages = selectedConversation.messages + .map((m, i) => { + if (i < messageIndex) { + return m; + } + }) + .filter((m) => m) as Message[]; + + const updatedConversation = { + ...selectedConversation, + messages: updatedMessages, + }; + + const {single, all} = updateConversation( + updatedConversation, + conversations, + ); + + setSelectedConversation(single); + setConversations(all); + + setCurrentMessage(message); + } + }; + + useEffect(() => { + if (currentMessage) { + handleSend(currentMessage); + setCurrentMessage(undefined); + } + }, [currentMessage]); + + useEffect(() => { + if (window.innerWidth < 640) { + setShowSidebar(false); + } + }, [selectedConversation]); + + useEffect(() => { + const theme = localStorage.getItem('theme'); + if (theme) { + setLightMode(theme as 'dark' | 'light'); + } + + const keyConfiguation = localStorage.getItem('keyConfiguation'); + if (keyConfiguation) { + setkeyConfiguration(JSON.parse(keyConfiguation)); + } + + if (window.innerWidth < 640) { + setShowSidebar(false); + } + + const folders = localStorage.getItem('folders'); + if (folders) { + setFolders(JSON.parse(folders)); + } + + const conversationHistory = localStorage.getItem('conversationHistory'); + if (conversationHistory) { + const parsedConversationHistory: Conversation[] = + JSON.parse(conversationHistory); + const cleanedConversationHistory = cleanConversationHistory( + parsedConversationHistory, + ); + setConversations(cleanedConversationHistory); + } + + const selectedConversation = localStorage.getItem('selectedConversation'); + if (selectedConversation) { + const parsedSelectedConversation: Conversation = + JSON.parse(selectedConversation); + const cleanedSelectedConversation = cleanSelectedConversation( + parsedSelectedConversation, + ); + setSelectedConversation(cleanedSelectedConversation); + } else { + setSelectedConversation({ + id: 1, + name: 'New conversation', + messages: [], + model: OpenAIModels[OpenAIModelID.GPT_3_5], + prompt: DEFAULT_SYSTEM_PROMPT, + folderId: 0, + index: { + indexName: '', + indexType: '', + }, + }); + } + }, [serverSideApiKeyIsSet]); + + useEffect(() => { + if (!serverSideApiKeyIsSet && !keyConfiguration.apiKey && !keyConfiguration.azureApiKey) { + handlekeyConfigurationButtonClick(); + } + }); + + return ( + <> + + ChatFiles + + + + + {selectedConversation && ( +
+
+ +
+ +
+ {showSidebar ? ( +
+ setShowSidebar(!showSidebar)} + onUpdateConversation={handleUpdateConversation} + onClearConversations={handleClearConversations} + onExportConversations={handleExportData} + onImportConversations={handleImportConversations} + keyConfiguration={keyConfiguration} + onKeyConfigrationChange={handleKeyConfigrationChange} + keyConfigurationButtonRef={keyConfigurationButtonRef} + /> + +
setShowSidebar(!showSidebar)} + className="absolute top-0 left-0 z-10 h-full w-full bg-black opacity-70 sm:hidden" + >
+
+ ) : ( + setShowSidebar(!showSidebar)} + /> + )} + + +
+
+ )} + + ); +}; +export default Home; + +export const getServerSideProps: GetServerSideProps = async ({locale}) => { + return { + props: { + serverSideApiKeyIsSet: !!process.env.OPENAI_TYPE, + ...(await serverSideTranslations(locale ?? 'en', [ + 'common', + 'chat', + 'sidebar', + 'markdown', + ])), + }, + }; +}; diff --git a/chatfiles-ui/postcss.config.js b/postcss.config.js similarity index 100% rename from chatfiles-ui/postcss.config.js rename to postcss.config.js diff --git a/chatfiles-ui/prettier.config.js b/prettier.config.js similarity index 100% rename from chatfiles-ui/prettier.config.js rename to prettier.config.js diff --git a/chatfiles-ui/public/favicon.ico b/public/favicon.ico similarity index 100% rename from chatfiles-ui/public/favicon.ico rename to public/favicon.ico diff --git a/chatfiles-ui/public/locales/en/common.json b/public/locales/en/common.json similarity index 100% rename from chatfiles-ui/public/locales/en/common.json rename to public/locales/en/common.json diff --git a/chatfiles-ui/public/locales/zh/chat.json b/public/locales/zh/chat.json similarity index 100% rename from chatfiles-ui/public/locales/zh/chat.json rename to public/locales/zh/chat.json diff --git a/chatfiles-ui/public/locales/zh/common.json b/public/locales/zh/common.json similarity index 100% rename from chatfiles-ui/public/locales/zh/common.json rename to public/locales/zh/common.json diff --git a/chatfiles-ui/public/locales/zh/markdown.json b/public/locales/zh/markdown.json similarity index 100% rename from chatfiles-ui/public/locales/zh/markdown.json rename to public/locales/zh/markdown.json diff --git a/chatfiles-ui/public/locales/zh/sidebar.json b/public/locales/zh/sidebar.json similarity index 100% rename from chatfiles-ui/public/locales/zh/sidebar.json rename to public/locales/zh/sidebar.json diff --git a/chatfiles-ui/public/locales/zh/upload.json b/public/locales/zh/upload.json similarity index 100% rename from chatfiles-ui/public/locales/zh/upload.json rename to public/locales/zh/upload.json diff --git a/styles/globals.css b/styles/globals.css new file mode 100644 index 0000000..ce4cc73 --- /dev/null +++ b/styles/globals.css @@ -0,0 +1,116 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +::-webkit-scrollbar-track { + background-color: transparent; +} + +::-webkit-scrollbar-thumb { + background-color: #ccc; + border-radius: 10px; +} + +::-webkit-scrollbar-thumb:hover { + background-color: #aaa; +} + +::-webkit-scrollbar-track:hover { + background-color: #f2f2f2; +} + +::-webkit-scrollbar-corner { + background-color: transparent; +} + +::-webkit-scrollbar { + width: 6px; + height: 6px; +} + +html { + background: #202123; +} + +pre:has(div.codeblock) { + padding: 0; +} + + +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 222.2 47.4% 11.2%; + + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; + + --popover: 0 0% 100%; + --popover-foreground: 222.2 47.4% 11.2%; + + --card: 0 0% 100%; + --card-foreground: 222.2 47.4% 11.2%; + + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + + --primary: 222.2 47.4% 11.2%; + --primary-foreground: 210 40% 98%; + + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + + --destructive: 0 100% 50%; + --destructive-foreground: 210 40% 98%; + + --ring: 215 20.2% 65.1%; + + --radius: 0.5rem; + } + + .dark { + --background: 224 71% 4%; + --foreground: 213 31% 91%; + + --muted: 223 47% 11%; + --muted-foreground: 215.4 16.3% 56.9%; + + --popover: 224 71% 4%; + --popover-foreground: 215 20.2% 65.1%; + + --card: 224 71% 4%; + --card-foreground: 213 31% 91%; + + --border: 216 34% 17%; + --input: 216 34% 17%; + + --primary: 210 40% 98%; + --primary-foreground: 222.2 47.4% 1.2%; + + --secondary: 222.2 47.4% 11.2%; + --secondary-foreground: 210 40% 98%; + + --accent: 216 34% 17%; + --accent-foreground: 210 40% 98%; + + --destructive: 0 63% 31%; + --destructive-foreground: 210 40% 98%; + + --ring: 216 34% 17%; + + --radius: 0.5rem; + } +} + +@layer base { + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + font-feature-settings: "rlig" 1, "calt" 1; + } +} \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..8994a6e --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,84 @@ +const { fontFamily } = require("tailwindcss/defaultTheme") + +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + './app/**/*.{js,ts,jsx,tsx}', + './pages/**/*.{js,ts,jsx,tsx}', + './components/**/*.{js,ts,jsx,tsx}', + "./node_modules/flowbite/**/*.js", + ], + darkMode: 'class', + theme: { + extend: {}, + }, + plugins: [require('@tailwindcss/typography'), require('flowbite/plugin'), require('tailwindcss-animate')], + theme: { + container: { + center: true, + padding: "2rem", + screens: { + "2xl": "1400px", + }, + }, + extend: { + colors: { + border: "hsl(var(--border))", + input: "hsl(var(--input))", + ring: "hsl(var(--ring))", + background: "hsl(var(--background))", + foreground: "hsl(var(--foreground))", + primary: { + DEFAULT: "hsl(var(--primary))", + foreground: "hsl(var(--primary-foreground))", + }, + secondary: { + DEFAULT: "hsl(var(--secondary))", + foreground: "hsl(var(--secondary-foreground))", + }, + destructive: { + DEFAULT: "hsl(var(--destructive))", + foreground: "hsl(var(--destructive-foreground))", + }, + muted: { + DEFAULT: "hsl(var(--muted))", + foreground: "hsl(var(--muted-foreground))", + }, + accent: { + DEFAULT: "hsl(var(--accent))", + foreground: "hsl(var(--accent-foreground))", + }, + popover: { + DEFAULT: "hsl(var(--popover))", + foreground: "hsl(var(--popover-foreground))", + }, + card: { + DEFAULT: "hsl(var(--card))", + foreground: "hsl(var(--card-foreground))", + }, + }, + borderRadius: { + lg: `var(--radius)`, + md: `calc(var(--radius) - 2px)`, + sm: "calc(var(--radius) - 4px)", + }, + fontFamily: { + sans: ["var(--font-sans)", ...fontFamily.sans], + }, + keyframes: { + "accordion-down": { + from: { height: 0 }, + to: { height: "var(--radix-accordion-content-height)" }, + }, + "accordion-up": { + from: { height: "var(--radix-accordion-content-height)" }, + to: { height: 0 }, + }, + }, + animation: { + "accordion-down": "accordion-down 0.2s ease-out", + "accordion-up": "accordion-up 0.2s ease-out", + }, + }, + }, +}; diff --git a/chatfiles-ui/tsconfig.json b/tsconfig.json similarity index 100% rename from chatfiles-ui/tsconfig.json rename to tsconfig.json diff --git a/types/embedding.ts b/types/embedding.ts new file mode 100644 index 0000000..22babb3 --- /dev/null +++ b/types/embedding.ts @@ -0,0 +1,4 @@ +export interface EmbeddingCreateRequest { + fileName: string; + fileType: string; +} \ No newline at end of file diff --git a/chatfiles-ui/types/env.d.ts b/types/env.d.ts similarity index 100% rename from chatfiles-ui/types/env.d.ts rename to types/env.d.ts diff --git a/chatfiles-ui/types/index.ts b/types/index.ts similarity index 76% rename from chatfiles-ui/types/index.ts rename to types/index.ts index 0b7f565..0ff2678 100644 --- a/chatfiles-ui/types/index.ts +++ b/types/index.ts @@ -8,6 +8,11 @@ export enum OpenAIModelID { GPT_4 = 'gpt-4', } +export enum ModelType { + OPENAI = 'OPENAI', + AZURE_OPENAI = 'AZURE_OPENAI', +} + export const OpenAIModels: Record = { [OpenAIModelID.GPT_3_5]: { id: OpenAIModelID.GPT_3_5, @@ -42,9 +47,7 @@ export interface Conversation { } export interface ChatBody { - model: OpenAIModel; messages: Message[]; - key: string; prompt: string; } @@ -62,4 +65,14 @@ export interface ErrorMessage { export interface LlamaIndex { indexName: string; indexType: string; -} \ No newline at end of file +} + +export interface KeyConfiguration { + apiType?: ModelType; + apiKey?: string; + azureApiKey?: string; + azureInstanceName?: string; + azureApiVersion?: string; + azureDeploymentName?: string; + azureEmbeddingDeploymentName?: string; +} diff --git a/chatfiles-ui/utils/app/clean.ts b/utils/app/clean.ts similarity index 100% rename from chatfiles-ui/utils/app/clean.ts rename to utils/app/clean.ts diff --git a/chatfiles-ui/utils/app/codeblock.ts b/utils/app/codeblock.ts similarity index 100% rename from chatfiles-ui/utils/app/codeblock.ts rename to utils/app/codeblock.ts diff --git a/utils/app/configuration.ts b/utils/app/configuration.ts new file mode 100644 index 0000000..4b815e1 --- /dev/null +++ b/utils/app/configuration.ts @@ -0,0 +1,65 @@ +import { KeyConfiguration, ModelType } from "@/types"; +import { NextApiRequest } from "next"; +import { AZURE_OPENAI_API_DEPLOYMENT_NAME, AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME, AZURE_OPENAI_API_INSTANCE_NAME, AZURE_OPENAI_API_KEY, AZURE_OPENAI_API_VERSION, OPENAI_API_KEY, OPENAI_TYPE } from "./const"; + +export const getKeyConfiguration = (req: NextApiRequest): KeyConfiguration => { + const apiType = OPENAI_TYPE; + if (!apiType) { + return getKeyConfigurationFromReqHeaders(req); + } + return getKeyConfigurationFromEnvorinment(); +} + +const getKeyConfigurationFromReqHeaders = (req: NextApiRequest): KeyConfiguration => { + const apiType = req.headers['x-api-type']; + const apiKey = req.headers['x-api-key'] as string; + const azureApiKey = req.headers['x-azure-api-key'] as string; + const azureInstanceName = req.headers['x-azure-instance-name'] as string; + const azureApiVersion = req.headers['x-azure-api-version'] as string; + const azureDeploymentName = req.headers['x-azure-deployment-name'] as string; + const azureEmbeddingDeploymentName = req.headers['x-azure-embedding-deployment-name'] as string; + const keyConfiguration = { apiType: apiType as ModelType, + apiKey, + azureApiKey, + azureInstanceName, + azureApiVersion, + azureDeploymentName, + azureEmbeddingDeploymentName + }; + valideKeyConfiguration(keyConfiguration); + return keyConfiguration; +} + +const getKeyConfigurationFromEnvorinment = (): KeyConfiguration => { + const apiType = OPENAI_TYPE as ModelType; + const apiKey = OPENAI_API_KEY; + const azureApiKey = AZURE_OPENAI_API_KEY; + const azureInstanceName = AZURE_OPENAI_API_INSTANCE_NAME; + const azureApiVersion = AZURE_OPENAI_API_VERSION; + const azureDeploymentName = AZURE_OPENAI_API_DEPLOYMENT_NAME; + const azureEmbeddingDeploymentName = AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME; + + const keyConfiguration = { + apiType, + apiKey, + azureApiKey, + azureInstanceName, + azureApiVersion, + azureDeploymentName, + azureEmbeddingDeploymentName + }; + valideKeyConfiguration(keyConfiguration); + return keyConfiguration; +} + +const valideKeyConfiguration = (keyConfiguration: KeyConfiguration): boolean => { + if (keyConfiguration.apiType === ModelType.OPENAI) { + if (!keyConfiguration.apiKey) throw new Error(`Expected environment value: OPENAI_API_KEY`); + } + if (keyConfiguration.apiType === ModelType.AZURE_OPENAI) { + if (!keyConfiguration.azureApiKey || !keyConfiguration.azureInstanceName || !keyConfiguration.azureApiVersion || !keyConfiguration.azureDeploymentName || !keyConfiguration.azureEmbeddingDeploymentName) { + throw new Error(`Expected environment value: AZURE_OPENAI_API_KEY`); + } + } + return true; +} \ No newline at end of file diff --git a/utils/app/const.ts b/utils/app/const.ts new file mode 100644 index 0000000..3d5dd7e --- /dev/null +++ b/utils/app/const.ts @@ -0,0 +1,29 @@ +export const DEFAULT_SYSTEM_PROMPT = + "The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know."; + +export const CHAT_FILES_MAX_SIZE = + parseInt(process.env.NEXT_PUBLIC_CHAT_FILES_MAX_SIZE || '') || 0; + +export const NEXT_PUBLIC_CHAT_FILES_UPLOAD_PATH = process.env.NEXT_PUBLIC_CHAT_FILES_UPLOAD_PATH; + +export const SUPABASE_KEY = process.env.SUPABASE_SERVICE_ROLE_KEY +// if (!SUPABASE_KEY) throw new Error(`Expected SUPABASE_SERVICE_ROLE_KEY`) + +export const SUPABASE_URL = process.env.SUPABASE_URL +// if (!SUPABASE_URL) throw new Error(`Expected env var SUPABASE_URL`) + +export const OPENAI_TYPE = process.env.OPENAI_TYPE; // Or OPENAI || AZURE_OPENAI + +export const OPENAI_API_HOST = + process.env.OPENAI_API_HOST || 'https://api.openai.com'; + +export const OPENAI_API_KEY = process.env.OPENAI_API_KEY; + +export const AZURE_OPENAI_API_KEY = process.env.AZURE_OPENAI_API_KEY; + +export const AZURE_OPENAI_API_INSTANCE_NAME = process.env.AZURE_OPENAI_API_INSTANCE_NAME; + +export const AZURE_OPENAI_API_DEPLOYMENT_NAME = process.env.AZURE_OPENAI_API_DEPLOYMENT_NAME; +export const AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME = process.env.AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME; + +export const AZURE_OPENAI_API_VERSION = process.env.AZURE_OPENAI_API_VERSION; \ No newline at end of file diff --git a/chatfiles-ui/utils/app/conversation.ts b/utils/app/conversation.ts similarity index 100% rename from chatfiles-ui/utils/app/conversation.ts rename to utils/app/conversation.ts diff --git a/chatfiles-ui/utils/app/files.ts b/utils/app/files.ts similarity index 100% rename from chatfiles-ui/utils/app/files.ts rename to utils/app/files.ts diff --git a/chatfiles-ui/utils/app/folders.ts b/utils/app/folders.ts similarity index 100% rename from chatfiles-ui/utils/app/folders.ts rename to utils/app/folders.ts diff --git a/chatfiles-ui/utils/app/importExport.ts b/utils/app/importExport.ts similarity index 100% rename from chatfiles-ui/utils/app/importExport.ts rename to utils/app/importExport.ts diff --git a/utils/embeddings.ts b/utils/embeddings.ts new file mode 100644 index 0000000..7267890 --- /dev/null +++ b/utils/embeddings.ts @@ -0,0 +1,17 @@ +import { KeyConfiguration, ModelType } from "@/types"; +import { OpenAIEmbeddings } from "langchain/embeddings/openai"; + +export const getEmbeddings = async (keyConfiguration: KeyConfiguration) => { + if (keyConfiguration.apiType === ModelType.AZURE_OPENAI) { + return new OpenAIEmbeddings({ + azureOpenAIApiKey: keyConfiguration.azureApiKey, + azureOpenAIApiInstanceName: keyConfiguration.azureInstanceName, + azureOpenAIApiDeploymentName: keyConfiguration.azureEmbeddingDeploymentName, + azureOpenAIApiVersion: keyConfiguration.azureApiVersion, + }); + } else { + return new OpenAIEmbeddings({ + openAIApiKey: keyConfiguration.apiKey, + }); + } +} \ No newline at end of file diff --git a/chatfiles-ui/utils/index.ts b/utils/index.ts similarity index 100% rename from chatfiles-ui/utils/index.ts rename to utils/index.ts diff --git a/utils/langchain/documentLoader.ts b/utils/langchain/documentLoader.ts new file mode 100644 index 0000000..d4846e5 --- /dev/null +++ b/utils/langchain/documentLoader.ts @@ -0,0 +1,46 @@ +import {PDFLoader} from "langchain/document_loaders/fs/pdf"; +import {EPubLoader} from "langchain/document_loaders/fs/epub"; +import {DocxLoader} from "langchain/document_loaders/fs/docx"; +import {TextLoader} from "langchain/document_loaders/fs/text"; +import { DirectoryLoader } from "langchain/document_loaders/fs/directory"; +import {DocumentLoader} from "langchain/dist/document_loaders/base"; +import { UnstructuredLoader } from "langchain/document_loaders/fs/unstructured"; + +export function getDocumentLoader(fileType: string, filePath: string): DocumentLoader { + let loader; + switch (fileType) { + case "pdf": + loader = new PDFLoader(filePath, { + splitPages: false, + }); + return loader; + case "epub": + loader = new EPubLoader( + filePath, { + splitChapters: false, + }); + return loader; + case "docx": + loader = new DocxLoader( + filePath + ); + return loader; + case "txt": + loader = new TextLoader(filePath); + return loader; + default: + loader = new UnstructuredLoader(filePath); + return loader; + } +} + +export function getDirectoryLoader(path: string): DocumentLoader { + return new DirectoryLoader( + path, { + ".pdf": (path) => getDocumentLoader("pdf", path), + ".epub": (path) => getDocumentLoader("epub", path), + ".txt": (path) => getDocumentLoader("txt", path), + ".docx": (path) => getDocumentLoader("docx", path), + } + ); +} \ No newline at end of file diff --git a/utils/langchain/splitter.ts b/utils/langchain/splitter.ts new file mode 100644 index 0000000..0fc1e04 --- /dev/null +++ b/utils/langchain/splitter.ts @@ -0,0 +1,12 @@ +import { KeyConfiguration, ModelType } from "@/types"; +import { Document } from "langchain/dist/document"; +import { TokenTextSplitter } from "langchain/text_splitter"; + +export function getSplitterDocument(keyConfiguration: KeyConfiguration, documents: Document[]): Promise { + const chunkSize = keyConfiguration.apiKey === ModelType.AZURE_OPENAI ? 4000 : 2000; + const splitter = new TokenTextSplitter({ + chunkSize: chunkSize, + chunkOverlap: 200, + }); + return splitter.splitDocuments(documents); +} \ No newline at end of file diff --git a/utils/openai.ts b/utils/openai.ts new file mode 100644 index 0000000..d86c5b7 --- /dev/null +++ b/utils/openai.ts @@ -0,0 +1,57 @@ +import { KeyConfiguration, ModelType } from "@/types"; +import { OpenAIChat } from "langchain/llms/openai"; +import {CallbackManager} from "langchain/callbacks"; +import {NextApiResponse} from "next"; + +export const getModel = async (keyConfiguration: KeyConfiguration, res: NextApiResponse) => { + if (keyConfiguration.apiType === ModelType.AZURE_OPENAI) { + return new OpenAIChat({ + temperature: 0.9, + streaming: true, + azureOpenAIApiKey: keyConfiguration.azureApiKey, + azureOpenAIApiInstanceName: keyConfiguration.azureInstanceName, + azureOpenAIApiDeploymentName: keyConfiguration.azureDeploymentName, + azureOpenAIApiVersion: keyConfiguration.azureApiVersion, + callbacks: getCallbackManager(res), + }); + } else { + return new OpenAIChat({ + temperature: 0.9, + streaming: true, + openAIApiKey: keyConfiguration.apiKey, + callbacks: getCallbackManager(res), + }); + } +} + +export const getChatModel = async (keyConfiguration: KeyConfiguration, res: NextApiResponse) => { + if (keyConfiguration.apiType === ModelType.AZURE_OPENAI) { + return new OpenAIChat({ + temperature: 0.9, + streaming: true, + azureOpenAIApiKey: keyConfiguration.azureApiKey, + azureOpenAIApiInstanceName: keyConfiguration.azureInstanceName, + azureOpenAIApiDeploymentName: keyConfiguration.azureDeploymentName, + azureOpenAIApiVersion: keyConfiguration.azureApiVersion, + callbacks: getCallbackManager(res), + }); + } else { + return new OpenAIChat({ + temperature: 0.9, + streaming: true, + openAIApiKey: keyConfiguration.apiKey, + callbacks: getCallbackManager(res), + }); + } +} + +export const getCallbackManager = (res: NextApiResponse) => { + return CallbackManager.fromHandlers({ + handleLLMNewToken: async (token: string, runId: string, parentRunId?: string) =>{ + res.write(token); + }, + handleLLMEnd: async () => { + res.end(); + }, + }) +} \ No newline at end of file diff --git a/chatfiles-ui/utils/server/index.ts b/utils/server/index.ts similarity index 100% rename from chatfiles-ui/utils/server/index.ts rename to utils/server/index.ts diff --git a/utils/vector.ts b/utils/vector.ts new file mode 100644 index 0000000..89f5df0 --- /dev/null +++ b/utils/vector.ts @@ -0,0 +1,47 @@ +import {SupabaseFilterRPCCall, SupabaseVectorStore} from "langchain/vectorstores/supabase"; +import {createClient} from "@supabase/supabase-js"; +import {Document} from "langchain/dist/document"; +import {OPENAI_TYPE, SUPABASE_KEY, SUPABASE_URL} from "@/utils/app/const"; +import {getEmbeddings} from "@/utils/embeddings"; +import { KeyConfiguration, ModelType } from "@/types"; + + +const client = createClient(SUPABASE_URL!, SUPABASE_KEY!); + +export const getVectorStore = async (keyConfiguration: KeyConfiguration, texts: string[], metadata: object) => { + return await SupabaseVectorStore.fromTexts(texts, metadata, await getEmbeddings(keyConfiguration), + { + client, + tableName: "documents", + queryName: "match_documents", + } + ); +} + +export const getExistingVectorStore = async (keyConfiguration: KeyConfiguration, fileName: string) => { + const fileNameFilter: SupabaseFilterRPCCall = (rpc) => + rpc.filter("metadata->>file_name", "eq", fileName); + return await SupabaseVectorStore.fromExistingIndex(await getEmbeddings(keyConfiguration), + { + client, + tableName: "documents", + queryName: "match_documents", + filter: fileNameFilter + } + ); +} + +export const saveEmbeddings = async (keyConfiguration: KeyConfiguration, documents: Document[]) => { + const supabaseVectorStore = new SupabaseVectorStore(await getEmbeddings(keyConfiguration), + {client, tableName: "documents", queryName: "match_documents"}); + + // wait for https://github.com/hwchase17/langchainjs/pull/1598 to be released + if (keyConfiguration.apiType === ModelType.AZURE_OPENAI) { + for (const doc of documents) { + await supabaseVectorStore.addDocuments([doc]); + } + } else { + await supabaseVectorStore.addDocuments(documents); + } + +} \ No newline at end of file diff --git a/chatfiles-ui/yarn.lock b/yarn.lock similarity index 75% rename from chatfiles-ui/yarn.lock rename to yarn.lock index 0d667d5..6476c5f 100644 --- a/chatfiles-ui/yarn.lock +++ b/yarn.lock @@ -2,7 +2,15 @@ # yarn lockfile v1 -"@babel/runtime@^7.20.13", "@babel/runtime@^7.20.6", "@babel/runtime@^7.20.7", "@babel/runtime@^7.3.1": +"@anthropic-ai/sdk@^0.4.3": + version "0.4.3" + resolved "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.4.3.tgz" + integrity sha512-SZrlXvjUUYT9rPmSzlTtmVk1OjVNpkCzILRluhiYwNcxXfQyvPJDi0CI6PyymygcgtqEF5EVqhKmC/PtPsNEIw== + dependencies: + "@fortaine/fetch-event-source" "^3.0.6" + cross-fetch "^3.1.5" + +"@babel/runtime@^7.13.10", "@babel/runtime@^7.20.13", "@babel/runtime@^7.20.6", "@babel/runtime@^7.20.7", "@babel/runtime@^7.3.1": version "7.21.0" resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz" integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw== @@ -10,9 +18,9 @@ regenerator-runtime "^0.13.11" "@dqbd/tiktoken@^1.0.2": - version "1.0.2" - resolved "https://registry.npmjs.org/@dqbd/tiktoken/-/tiktoken-1.0.2.tgz" - integrity sha512-AjGTBRWsMoVmVeN55NLyupyM8TNamOUBl6tj5t/leLDVup3CFGO9tVagNL1jf3GyZLkWZSTmYVbPQ/M2LEcNzw== + version "1.0.7" + resolved "https://registry.npmjs.org/@dqbd/tiktoken/-/tiktoken-1.0.7.tgz" + integrity sha512-bhR5k5W+8GLzysjk8zTMVygQZsgvf7W1F0IlL4ZQ5ugjo5rCyiwGM5d8DYriXspytfu98tv59niang3/T+FoDw== "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" @@ -46,6 +54,11 @@ resolved "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz" integrity sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg== +"@fortaine/fetch-event-source@^3.0.6": + version "3.0.6" + resolved "https://registry.npmjs.org/@fortaine/fetch-event-source/-/fetch-event-source-3.0.6.tgz" + integrity sha512-621GAuLMvKtyZQ3IA6nlDWhV1V/7PGOTNIGLUifxt0KzM+dZIweJ6F3XvQF3QnqeNfS1N7WQ0Kil1Di/lhChEw== + "@humanwhocodes/config-array@^0.11.8": version "0.11.8" resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz" @@ -120,11 +133,267 @@ resolved "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz" integrity sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw== +"@radix-ui/primitive@1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.1.tgz" + integrity sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw== + dependencies: + "@babel/runtime" "^7.13.10" + +"@radix-ui/react-collection@1.0.3": + version "1.0.3" + resolved "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.3.tgz" + integrity sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-slot" "1.0.2" + +"@radix-ui/react-compose-refs@1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz" + integrity sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw== + dependencies: + "@babel/runtime" "^7.13.10" + +"@radix-ui/react-context@1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.1.tgz" + integrity sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg== + dependencies: + "@babel/runtime" "^7.13.10" + +"@radix-ui/react-dialog@^1.0.4": + version "1.0.4" + resolved "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.4.tgz" + integrity sha512-hJtRy/jPULGQZceSAP2Re6/4NpKo8im6V8P2hUqZsdFiSL8l35kYsw3qbRI6Ay5mQd2+wlLqje770eq+RJ3yZg== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-dismissable-layer" "1.0.4" + "@radix-ui/react-focus-guards" "1.0.1" + "@radix-ui/react-focus-scope" "1.0.3" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-portal" "1.0.3" + "@radix-ui/react-presence" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-slot" "1.0.2" + "@radix-ui/react-use-controllable-state" "1.0.1" + aria-hidden "^1.1.1" + react-remove-scroll "2.5.5" + +"@radix-ui/react-direction@1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.1.tgz" + integrity sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA== + dependencies: + "@babel/runtime" "^7.13.10" + +"@radix-ui/react-dismissable-layer@1.0.4": + version "1.0.4" + resolved "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.4.tgz" + integrity sha512-7UpBa/RKMoHJYjie1gkF1DlK8l1fdU/VKDpoS3rCCo8YBJR294GwcEHyxHw72yvphJ7ld0AXEcSLAzY2F/WyCg== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-use-callback-ref" "1.0.1" + "@radix-ui/react-use-escape-keydown" "1.0.3" + +"@radix-ui/react-focus-guards@1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.1.tgz" + integrity sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA== + dependencies: + "@babel/runtime" "^7.13.10" + +"@radix-ui/react-focus-scope@1.0.3": + version "1.0.3" + resolved "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.3.tgz" + integrity sha512-upXdPfqI4islj2CslyfUBNlaJCPybbqRHAi1KER7Isel9Q2AtSJ0zRBZv8mWQiFXD2nyAJ4BhC3yXgZ6kMBSrQ== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-use-callback-ref" "1.0.1" + +"@radix-ui/react-id@1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.1.tgz" + integrity sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-use-layout-effect" "1.0.1" + +"@radix-ui/react-label@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.0.2.tgz" + integrity sha512-N5ehvlM7qoTLx7nWPodsPYPgMzA5WM8zZChQg8nyFJKnDO5WHdba1vv5/H6IO5LtJMfD2Q3wh1qHFGNtK0w3bQ== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-primitive" "1.0.3" + +"@radix-ui/react-portal@1.0.3": + version "1.0.3" + resolved "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.3.tgz" + integrity sha512-xLYZeHrWoPmA5mEKEfZZevoVRK/Q43GfzRXkWV6qawIWWK8t6ifIiLQdd7rmQ4Vk1bmI21XhqF9BN3jWf+phpA== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-primitive" "1.0.3" + +"@radix-ui/react-presence@1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.1.tgz" + integrity sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-use-layout-effect" "1.0.1" + +"@radix-ui/react-primitive@1.0.3": + version "1.0.3" + resolved "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz" + integrity sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-slot" "1.0.2" + +"@radix-ui/react-roving-focus@1.0.4": + version "1.0.4" + resolved "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.4.tgz" + integrity sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-collection" "1.0.3" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-direction" "1.0.1" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-use-callback-ref" "1.0.1" + "@radix-ui/react-use-controllable-state" "1.0.1" + +"@radix-ui/react-slot@^1.0.2", "@radix-ui/react-slot@1.0.2": + version "1.0.2" + resolved "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz" + integrity sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-compose-refs" "1.0.1" + +"@radix-ui/react-tabs@^1.0.4": + version "1.0.4" + resolved "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.0.4.tgz" + integrity sha512-egZfYY/+wRNCflXNHx+dePvnz9FbmssDTJBtgRfDY7e8SE5oIo3Py2eCB1ckAbh1Q7cQ/6yJZThJ++sgbxibog== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-direction" "1.0.1" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-presence" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-roving-focus" "1.0.4" + "@radix-ui/react-use-controllable-state" "1.0.1" + +"@radix-ui/react-use-callback-ref@1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz" + integrity sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ== + dependencies: + "@babel/runtime" "^7.13.10" + +"@radix-ui/react-use-controllable-state@1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.1.tgz" + integrity sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-use-callback-ref" "1.0.1" + +"@radix-ui/react-use-escape-keydown@1.0.3": + version "1.0.3" + resolved "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.3.tgz" + integrity sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-use-callback-ref" "1.0.1" + +"@radix-ui/react-use-layout-effect@1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz" + integrity sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ== + dependencies: + "@babel/runtime" "^7.13.10" + "@rushstack/eslint-patch@^1.1.3": version "1.2.0" resolved "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz" integrity sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg== +"@selderee/plugin-htmlparser2@^0.11.0": + version "0.11.0" + resolved "https://registry.npmjs.org/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.11.0.tgz" + integrity sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ== + dependencies: + domhandler "^5.0.3" + selderee "^0.11.0" + +"@supabase/functions-js@^2.1.0": + version "2.1.1" + resolved "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-2.1.1.tgz" + integrity sha512-bIR1Puae6W+1/MzPfYBWOG/SCWGo4B5CB7c0ZZksvliNEAzhxNBJ0UFKYINcGdGtxG8ZC+1xr3utWpNZNwnoRw== + dependencies: + cross-fetch "^3.1.5" + +"@supabase/gotrue-js@^2.23.0": + version "2.25.0" + resolved "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-2.25.0.tgz" + integrity sha512-tZXArO0f1NKMQo6rtGryOSqS51WQJQMS3lEHIyH50WffQb/n1tiYY1L8yCyrvTogz9RXpihdQeUjVW77kKd7sQ== + dependencies: + cross-fetch "^3.1.5" + +"@supabase/postgrest-js@^1.1.1": + version "1.6.1" + resolved "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-1.6.1.tgz" + integrity sha512-WDBUPOCOwcZonaCwEodwdA8hwWYOiXroDF9vWGxZxKAnuSVE2Ieci/kvhR4EsWvgGST2h90LRowgO+msXe8+fA== + dependencies: + cross-fetch "^3.1.5" + +"@supabase/realtime-js@^2.7.2": + version "2.7.2" + resolved "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.7.2.tgz" + integrity sha512-Fi6xAl5PUkqnjl3wo4rdcQIbMG3+yTRX1aUZe/yfvTG84RMvmCXJ1yN6MmafVLeZpU1xkaz5Vx4L0tnHcLiy6w== + dependencies: + "@types/phoenix" "^1.5.4" + "@types/websocket" "^1.0.3" + websocket "^1.0.34" + +"@supabase/storage-js@^2.5.1": + version "2.5.1" + resolved "https://registry.npmjs.org/@supabase/storage-js/-/storage-js-2.5.1.tgz" + integrity sha512-nkR0fQA9ScAtIKA3vNoPEqbZv1k5B5HVRYEvRWdlP6mUpFphM9TwPL2jZ/ztNGMTG5xT6SrHr+H7Ykz8qzbhjw== + dependencies: + cross-fetch "^3.1.5" + +"@supabase/supabase-js@^2.10.0", "@supabase/supabase-js@^2.21.0": + version "2.21.0" + resolved "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.21.0.tgz" + integrity sha512-FW3ZzBoc4orSgfX0dXrmJoXAcI/hiekmqXTkN64vjtUF2Urp3UjyAf71UTtV9Jl6ejHoe3K++e0+Rg9zKUJh5w== + dependencies: + "@supabase/functions-js" "^2.1.0" + "@supabase/gotrue-js" "^2.23.0" + "@supabase/postgrest-js" "^1.1.1" + "@supabase/realtime-js" "^2.7.2" + "@supabase/storage-js" "^2.5.1" + cross-fetch "^3.1.5" + "@swc/helpers@0.4.14": version "0.4.14" resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz" @@ -160,6 +429,21 @@ resolved "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz" integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== +"@types/body-parser@*": + version "1.19.2" + resolved "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz" + integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/connect@*": + version "3.4.35" + resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz" + integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== + dependencies: + "@types/node" "*" + "@types/debug@^4.0.0": version "4.1.7" resolved "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz" @@ -167,6 +451,26 @@ dependencies: "@types/ms" "*" +"@types/express-serve-static-core@^4.17.33": + version "4.17.34" + resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.34.tgz" + integrity sha512-fvr49XlCGoUj2Pp730AItckfjat4WNb0lb3kfrLWffd+RLeoGAMsq7UOy04PAPtoL01uKwcp6u8nhzpgpDYr3w== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + "@types/send" "*" + +"@types/express@*": + version "4.17.17" + resolved "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz" + integrity sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.33" + "@types/qs" "*" + "@types/serve-static" "*" + "@types/formidable@^2.0.5": version "2.0.5" resolved "https://registry.npmjs.org/@types/formidable/-/formidable-2.0.5.tgz" @@ -211,22 +515,49 @@ dependencies: "@types/unist" "*" +"@types/mime@*", "@types/mime@^1": + version "1.3.2" + resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz" + integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== + "@types/ms@*": version "0.7.31" resolved "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== +"@types/multer@^1.4.7": + version "1.4.7" + resolved "https://registry.npmjs.org/@types/multer/-/multer-1.4.7.tgz" + integrity sha512-/SNsDidUFCvqqcWDwxv2feww/yqhNeTRL5CVoL3jU4Goc4kKEL10T7Eye65ZqPNi4HRx8sAEX59pV1aEH7drNA== + dependencies: + "@types/express" "*" + "@types/node@*", "@types/node@18.15.10": version "18.15.10" resolved "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz" integrity sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ== +"@types/phoenix@^1.5.4": + version "1.5.6" + resolved "https://registry.npmjs.org/@types/phoenix/-/phoenix-1.5.6.tgz" + integrity sha512-e7jZ6I9uyRGsg7MNwQcarmBvRlbGb9DibbocE9crVnxqsy6C23RMxLWbJ2CQ3vgCW7taoL1L+F02EcjA6ld7XA== + "@types/prop-types@*", "@types/prop-types@^15.0.0": version "15.7.5" resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz" integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== -"@types/react-dom@18.0.11": +"@types/qs@*": + version "6.9.7" + resolved "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz" + integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== + +"@types/range-parser@*": + version "1.2.4" + resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz" + integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== + +"@types/react-dom@*", "@types/react-dom@18.0.11": version "18.0.11" resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.11.tgz" integrity sha512-O38bPbI2CWtgw/OoQoY+BRelw7uysmXbWvw3nLWO21H1HSh+GOlqPuXshJfjmpNlKiiSDG9cc1JZAaMmVdcTlw== @@ -240,7 +571,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@>=16", "@types/react@18.0.30": +"@types/react@*", "@types/react@^16.8.0 || ^17.0.0 || ^18.0.0", "@types/react@^16.9.0 || ^17.0.0 || ^18.0.0", "@types/react@>=16", "@types/react@18.0.30": version "18.0.30" resolved "https://registry.npmjs.org/@types/react/-/react-18.0.30.tgz" integrity sha512-AnME2cHDH11Pxt/yYX6r0w448BfTwQOLEhQEjCdwB7QskEI7EKtxhGUsExTQe/MsY3D9D5rMtu62WRocw9A8FA== @@ -249,21 +580,54 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/retry@0.12.0": + version "0.12.0" + resolved "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz" + integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== + "@types/scheduler@*": version "0.16.3" resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz" integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== +"@types/send@*": + version "0.17.1" + resolved "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz" + integrity sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + +"@types/serve-static@*": + version "1.15.1" + resolved "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.1.tgz" + integrity sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ== + dependencies: + "@types/mime" "*" + "@types/node" "*" + "@types/unist@*", "@types/unist@^2.0.0": version "2.0.6" resolved "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz" integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== +"@types/uuid@^9.0.1": + version "9.0.1" + resolved "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.1.tgz" + integrity sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA== + "@types/web@^0.0.46": version "0.0.46" resolved "https://registry.npmjs.org/@types/web/-/web-0.0.46.tgz" integrity sha512-ki0OmbjSdAEfvmy5AYWFpMkRsPW+6h4ibQ4tzk8SJsS9dkrrD3B/U1eVvdNNWxAzntjq6o2sjSia6UBCoPH+Yg== +"@types/websocket@^1.0.3": + version "1.0.5" + resolved "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.5.tgz" + integrity sha512-NbsqiNX9CnEfC1Z0Vf4mE1SgAJ07JnRYcNex7AJ9zAVzmiGHmjKFEk7O4TJIsgv2B1sLEb6owKFZrACwdYngsQ== + dependencies: + "@types/node" "*" + "@typescript-eslint/parser@^5.42.0": version "5.57.0" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.57.0.tgz" @@ -308,6 +672,11 @@ "@typescript-eslint/types" "5.57.0" eslint-visitor-keys "^3.3.0" +"@xmldom/xmldom@^0.8.6": + version "0.8.8" + resolved "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz" + integrity sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q== + abab@^2.0.5, abab@^2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz" @@ -355,6 +724,11 @@ acorn@^7.1.1: resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== +adm-zip@^0.5.9: + version "0.5.10" + resolved "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz" + integrity sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ== + agent-base@6: version "6.0.2" resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" @@ -384,6 +758,11 @@ ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + anymatch@~3.1.2: version "3.1.3" resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" @@ -392,6 +771,11 @@ anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +append-field@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz" + integrity sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw== + arg@^5.0.2: version "5.0.2" resolved "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz" @@ -402,6 +786,20 @@ argparse@^2.0.1: resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +argparse@~1.0.3: + version "1.0.10" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +aria-hidden@^1.1.1: + version "1.2.3" + resolved "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.3.tgz" + integrity sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ== + dependencies: + tslib "^2.0.0" + aria-query@^5.1.3: version "5.1.3" resolved "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz" @@ -417,6 +815,14 @@ array-buffer-byte-length@^1.0.0: call-bind "^1.0.2" is-array-buffer "^3.0.1" +array-hyper-unique@^2.1.4: + version "2.1.4" + resolved "https://registry.npmjs.org/array-hyper-unique/-/array-hyper-unique-2.1.4.tgz" + integrity sha512-RVsGx2YpFGhGpgdkK7A0VjFQecVUCowpkQerGCsyXVRXHxccAlPPTDt9ueF/X7Zq/6z6duZ49i9WzTCzcnQygQ== + dependencies: + deep-eql "= 4.0.0" + lodash "^4.17.21" + array-includes@^3.1.5, array-includes@^3.1.6: version "3.1.6" resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz" @@ -501,7 +907,7 @@ axe-core@^4.6.2: resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.6.3.tgz" integrity sha512-/BQzOX780JhsxDnPpH4ZiyrJAzcd8AfzFPkv+89veFSr1rcMjuq2JDCwypKaPeB6ljHp9KjXhPpjgCvQlWYuqg== -axios@^0.26.0: +axios@*, axios@^0.26.0: version "0.26.1" resolved "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz" integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== @@ -525,11 +931,31 @@ balanced-match@^1.0.0: resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -binary-extensions@^2.0.0: +base64-js@^1.5.1: + version "1.5.1" + resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +binary-extensions@^2.0.0, binary-extensions@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== +binary-search@^1.3.5: + version "1.3.6" + resolved "https://registry.npmjs.org/binary-search/-/binary-search-1.3.6.tgz" + integrity sha512-nbE1WxOTTrUWIfsfZ4aHGYu5DOuNkbxGokjV6Z2kxfJK3uaAb8zNK1muzOeipoLHZjInT4Br88BHpzevc681xA== + +bluebird@^3.7.2: + version "3.7.2" + resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bluebird@~3.4.0: + version "3.4.7" + resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz" + integrity sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" @@ -560,6 +986,25 @@ browserslist@^4.21.5, "browserslist@>= 4.21.0": node-releases "^2.0.8" update-browserslist-db "^1.0.10" +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +bufferutil@^4.0.1: + version "4.0.7" + resolved "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz" + integrity sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw== + dependencies: + node-gyp-build "^4.3.0" + +busboy@^1.0.0: + version "1.6.0" + resolved "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz" + integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== + dependencies: + streamsearch "^1.1.0" + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" @@ -578,6 +1023,11 @@ camelcase-css@^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== +camelcase@6: + version "6.3.0" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001464: version "1.0.30001472" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001472.tgz" @@ -631,11 +1081,23 @@ chokidar@^3.5.3: optionalDependencies: fsevents "~2.3.2" +class-variance-authority@^0.6.0: + version "0.6.0" + resolved "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.6.0.tgz" + integrity sha512-qdRDgfjx3GRb9fpwpSvn+YaidnT7IUJNe4wt5/SWwM+PmUwJUhQRk/8zAyNro0PmVfmen2635UboTjIBXXxy5A== + dependencies: + clsx "1.2.1" + client-only@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz" integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== +clsx@^1.2.1, clsx@1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz" + integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== + color-convert@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" @@ -665,11 +1127,21 @@ comma-separated-tokens@^2.0.0: resolved "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz" integrity sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg== +commander@^10.0.1: + version "10.0.1" + resolved "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + commander@^8.0.0: version "8.3.0" resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== +commander@2: + version "2.20.3" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + commander@9.2.0: version "9.2.0" resolved "https://registry.npmjs.org/commander/-/commander-9.2.0.tgz" @@ -680,11 +1152,40 @@ concat-map@0.0.1: resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +concat-stream@^1.5.2: + version "1.6.2" + resolved "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + core-js@^3: version "3.29.1" resolved "https://registry.npmjs.org/core-js/-/core-js-3.29.1.tgz" integrity sha512-+jwgnhg6cQxKYIIjGtAHq2nwUOolo9eoFZ4sHfUH09BLXBgxnH4gA0zEd+t+BO2cNB8idaBtZFcFTRjQJRJmAw== +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +crlf-normalize@^1.0.18: + version "1.0.19" + resolved "https://registry.npmjs.org/crlf-normalize/-/crlf-normalize-1.0.19.tgz" + integrity sha512-cpV1h7YwFtIA36NHtyWuMMMPGxUp6zrzxjRnFEDLh1ZH0SPNUqCWmM8RlKVycxvKHgZOxWXs3XxX/DAlBAjFzA== + dependencies: + ts-type ">=2" + +cross-fetch@^3.1.5: + version "3.1.5" + resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz" + integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== + dependencies: + node-fetch "2.6.7" + cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" @@ -721,6 +1222,23 @@ csstype@^3.0.2: resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz" integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw== +d@^1.0.1, d@1: + version "1.0.1" + resolved "https://registry.npmjs.org/d/-/d-1.0.1.tgz" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + +d3-dsv@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/d3-dsv/-/d3-dsv-2.0.0.tgz" + integrity sha512-E+Pn8UJYx9mViuIUkoc93gJGGYut6mSDKy2+XaPwccwkRGlR+LO97L2VCCRjQivTwLHkSnAJG7yo00BWY6QM+w== + dependencies: + commander "2" + iconv-lite "0.4" + rw "1" + damerau-levenshtein@^1.0.8: version "1.0.8" resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz" @@ -740,6 +1258,20 @@ data-urls@^3.0.1: whatwg-mimetype "^3.0.0" whatwg-url "^11.0.0" +debug@^2.2.0: + version "2.6.9" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^3.1.0: + version "3.2.7" + resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + debug@^3.2.7: version "3.2.7" resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" @@ -754,6 +1286,11 @@ debug@^4.0.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4, debug@4: dependencies: ms "2.1.2" +decamelize@5: + version "5.0.1" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz" + integrity sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA== + decimal.js@^10.3.1: version "10.4.3" resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz" @@ -766,6 +1303,13 @@ decode-named-character-reference@^1.0.0: dependencies: character-entities "^2.0.0" +"deep-eql@= 4.0.0": + version "4.0.0" + resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-4.0.0.tgz" + integrity sha512-GxJC5MOg2KyQlv6WiUF/VAnMj4MWnYiXo4oLgeptOELVoknyErb4Z8+5F/IM/K4g9/80YzzatxmWcyRwUseH0A== + dependencies: + type-detect "^4.0.0" + deep-equal@^2.0.5: version "2.2.0" resolved "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz" @@ -794,6 +1338,11 @@ deep-is@^0.1.3, deep-is@~0.1.3: resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +deepmerge@^4.3.1: + version "4.3.1" + resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz" @@ -822,6 +1371,11 @@ dequal@^2.0.0: resolved "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz" integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== +detect-node-es@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz" + integrity sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ== + detective@^5.2.1: version "5.2.1" resolved "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz" @@ -849,6 +1403,11 @@ diff@^5.0.0: resolved "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz" integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== +dingbat-to-unicode@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/dingbat-to-unicode/-/dingbat-to-unicode-1.0.1.tgz" + integrity sha512-98l0sW87ZT58pU4i61wa2OHwxbiYSbuxsCBozaVnYX2iCnr3bLM3fIes1/ej7h1YdOKuKt/MLs706TVnALA65w== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" @@ -875,6 +1434,20 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-serializer@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz" + integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.2" + entities "^4.2.0" + +domelementtype@^2.3.0: + version "2.3.0" + resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + domexception@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz" @@ -882,11 +1455,34 @@ domexception@^4.0.0: dependencies: webidl-conversions "^7.0.0" +domhandler@^5.0.2, domhandler@^5.0.3: + version "5.0.3" + resolved "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz" + integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== + dependencies: + domelementtype "^2.3.0" + +domutils@^3.0.1: + version "3.1.0" + resolved "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz" + integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== + dependencies: + dom-serializer "^2.0.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + dotenv@^16.0.3: version "16.0.3" resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz" integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== +duck@^0.1.12: + version "0.1.12" + resolved "https://registry.npmjs.org/duck/-/duck-0.1.12.tgz" + integrity sha512-wkctla1O6VfP89gQ+J/yDesM0S7B7XLXjKGzXxMDVFg7uEn706niAtyYovKbyq1oT9YwDcly721/iUWoc8MVRg== + dependencies: + underscore "^1.13.1" + electron-to-chromium@^1.4.284: version "1.4.341" resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.341.tgz" @@ -905,6 +1501,23 @@ enhanced-resolve@^5.10.0: graceful-fs "^4.2.4" tapable "^2.2.0" +entities@^4.2.0, entities@^4.4.0: + version "4.5.0" + resolved "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== + +epub2@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/epub2/-/epub2-3.0.1.tgz" + integrity sha512-qwAPzDvcfKOZza1FU38BHo7qyiHMZXpJKVkdLK7I+wHi4nUhIhh+6qQbOGxPdiPaqAuI985d/nIUuJmbZ1ACrA== + dependencies: + adm-zip "^0.5.9" + array-hyper-unique "^2.1.4" + bluebird "^3.7.2" + crlf-normalize "^1.0.18" + tslib "^2.4.1" + xml2js "^0.4.23" + es-abstract@^1.19.0, es-abstract@^1.20.4: version "1.21.2" resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz" @@ -985,6 +1598,32 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.62" + resolved "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + next-tick "^1.1.0" + +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.3" + resolved "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" @@ -1227,11 +1866,28 @@ esutils@^2.0.2: resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +eventemitter3@^4.0.4: + version "4.0.7" + resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + eventsource-parser@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-0.1.0.tgz" integrity sha512-M9QjFtEIkwytUarnx113HGmgtk52LSn3jNAtnWKi3V+b9rqSfQeVdLsaD5AG/O4IrGQwmAAHBIsqbmURPTd2rA== +expr-eval@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/expr-eval/-/expr-eval-2.0.2.tgz" + integrity sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg== + +ext@^1.1.2: + version "1.7.0" + resolved "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + extend@^3.0.0: version "3.0.2" resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" @@ -1315,6 +1971,11 @@ flat-cache@^3.0.4: flatted "^3.1.0" rimraf "^3.0.2" +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + flatted@^3.1.0: version "3.2.7" resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz" @@ -1415,6 +2076,11 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has "^1.0.3" has-symbols "^1.0.3" +get-nonce@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz" + integrity sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q== + get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz" @@ -1662,6 +2328,27 @@ html-parse-stringify@^3.0.1: dependencies: void-elements "3.1.0" +html-to-text@^9.0.5: + version "9.0.5" + resolved "https://registry.npmjs.org/html-to-text/-/html-to-text-9.0.5.tgz" + integrity sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg== + dependencies: + "@selderee/plugin-htmlparser2" "^0.11.0" + deepmerge "^4.3.1" + dom-serializer "^2.0.0" + htmlparser2 "^8.0.2" + selderee "^0.11.0" + +htmlparser2@^8.0.2: + version "8.0.2" + resolved "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz" + integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.0.1" + entities "^4.4.0" + http-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz" @@ -1691,6 +2378,13 @@ i18next@^22.0.6, i18next@^22.4.13, "i18next@>= 19.0.0": dependencies: "@babel/runtime" "^7.20.6" +iconv-lite@0.4: + version "0.4.24" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + iconv-lite@0.6.3: version "0.6.3" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" @@ -1703,6 +2397,11 @@ ignore@^5.2.0: resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz" + integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== + import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" @@ -1724,7 +2423,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2: +inherits@^2.0.3, inherits@~2.0.3, inherits@2: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -1743,6 +2442,13 @@ internal-slot@^1.0.3, internal-slot@^1.0.4, internal-slot@^1.0.5: has "^1.0.3" side-channel "^1.0.4" +invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + is-alphabetical@^1.0.0: version "1.0.4" resolved "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz" @@ -1756,6 +2462,11 @@ is-alphanumerical@^1.0.0: is-alphabetical "^1.0.0" is-decimal "^1.0.0" +is-any-array@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/is-any-array/-/is-any-array-2.0.1.tgz" + integrity sha512-UtilS7hLRu++wb/WBAw9bNuP1Eg04Ivn1vERJck8zJthEvXCBEBpGR/33u/xLKWEQf95803oalHrVDptcAvFdQ== + is-arguments@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz" @@ -1928,6 +2639,11 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.9: gopd "^1.0.1" has-tostringtag "^1.0.0" +is-typedarray@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" + integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== + is-weakmap@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz" @@ -1960,6 +2676,11 @@ isarray@^2.0.5: resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz" integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" @@ -1970,6 +2691,13 @@ js-sdsl@^4.1.4: resolved "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz" integrity sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg== +js-tiktoken@^1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.6.tgz" + integrity sha512-lxHntEupgjWvSh37WxpAW4XN6UBXBtFJOpZZq5HN5oNjDfN7L/iJhHOKjyL/DFtuYXUwn5jfTciLtOWpgQmHjQ== + dependencies: + base64-js "^1.5.1" + "js-tokens@^3.0.0 || ^4.0.0": version "4.0.0" resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" @@ -2032,6 +2760,11 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" +jsonpointer@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz" + integrity sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ== + "jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.3: version "3.3.3" resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz" @@ -2040,6 +2773,16 @@ json5@^1.0.2: array-includes "^3.1.5" object.assign "^4.1.3" +jszip@^3.7.1: + version "3.10.1" + resolved "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz" + integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g== + dependencies: + lie "~3.3.0" + pako "~1.0.2" + readable-stream "~2.3.6" + setimmediate "^1.0.5" + katex@^0.13.0: version "0.13.24" resolved "https://registry.npmjs.org/katex/-/katex-0.13.24.tgz" @@ -2052,6 +2795,42 @@ kleur@^4.0.3: resolved "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz" integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== +langchain@^0.0.94: + version "0.0.94" + resolved "https://registry.npmjs.org/langchain/-/langchain-0.0.94.tgz" + integrity sha512-RafU2Nk005jnNgOPSi5LhXtwOhdf8nwLSWU4hRyMXwB1l3lNCwTKlYWfKwMQ9VaSEe+4fEaO8lM9yVp+y3aa9w== + dependencies: + "@anthropic-ai/sdk" "^0.4.3" + ansi-styles "^5.0.0" + binary-extensions "^2.2.0" + camelcase "6" + decamelize "5" + expr-eval "^2.0.2" + flat "^5.0.2" + js-tiktoken "^1.0.6" + jsonpointer "^5.0.1" + langchainplus-sdk "^0.0.11" + ml-distance "^4.0.0" + object-hash "^3.0.0" + openai "^3.3.0" + p-queue "^6.6.2" + p-retry "4" + uuid "^9.0.0" + yaml "^2.2.1" + zod "^3.21.4" + zod-to-json-schema "^3.20.4" + +langchainplus-sdk@^0.0.11: + version "0.0.11" + resolved "https://registry.npmjs.org/langchainplus-sdk/-/langchainplus-sdk-0.0.11.tgz" + integrity sha512-bEovYVJZq88LYznDfK+ohNVd0lqQ1DMgE/A/8ZkqsiyaRuEjvIQj4PLc0VQ8htWPBljrfTu8oS7g+SGWYTZfNw== + dependencies: + "@types/uuid" "^9.0.1" + commander "^10.0.1" + p-queue "^6.6.2" + p-retry "4" + uuid "^9.0.0" + language-subtag-registry@~0.3.2: version "0.3.22" resolved "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz" @@ -2064,6 +2843,11 @@ language-tags@=1.0.5: dependencies: language-subtag-registry "~0.3.2" +leac@^0.6.0: + version "0.6.0" + resolved "https://registry.npmjs.org/leac/-/leac-0.6.0.tgz" + integrity sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg== + levn@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" @@ -2080,6 +2864,13 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lie@~3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz" + integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ== + dependencies: + immediate "~3.0.5" + lilconfig@^2.0.5, lilconfig@^2.0.6: version "2.1.0" resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz" @@ -2107,18 +2898,32 @@ lodash.merge@^4.6.2: resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + longest-streak@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz" integrity sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g== -loose-envify@^1.1.0, loose-envify@^1.4.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== dependencies: js-tokens "^3.0.0 || ^4.0.0" +lop@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/lop/-/lop-0.4.1.tgz" + integrity sha512-9xyho9why2A2tzm5aIcMWKvzqKsnxrf9B5I+8O30olh6lQU8PH978LqZoI4++37RBgS1Em5i54v1TFs/3wnmXQ== + dependencies: + duck "^0.1.12" + option "~0.2.1" + underscore "^1.13.1" + lowlight@^1.17.0: version "1.20.0" resolved "https://registry.npmjs.org/lowlight/-/lowlight-1.20.0.tgz" @@ -2134,6 +2939,27 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lucide-react@^0.241.0: + version "0.241.0" + resolved "https://registry.npmjs.org/lucide-react/-/lucide-react-0.241.0.tgz" + integrity sha512-g22ci6iHuNc2hUwjiFz0D3jQQfQYrZBZesXG6+AX5rOV68Epttkt/nF6dMdz6reKJjtpoNzu+LKeKHGu/qjOgQ== + +mammoth@*, mammoth@^1.6.0: + version "1.6.0" + resolved "https://registry.npmjs.org/mammoth/-/mammoth-1.6.0.tgz" + integrity sha512-jOwbj6BwJzxCf6jr2l1zmSemniIkLnchvELXnDJCANlJawhzyIKObIq48B8kWEPLgUUh57k7FtEO3DHFQMnjMg== + dependencies: + "@xmldom/xmldom" "^0.8.6" + argparse "~1.0.3" + base64-js "^1.5.1" + bluebird "~3.4.0" + dingbat-to-unicode "^1.0.1" + jszip "^3.7.1" + lop "^0.4.1" + path-is-absolute "^1.0.0" + underscore "^1.13.1" + xmlbuilder "^10.0.0" + markdown-table@^3.0.0: version "3.0.3" resolved "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz" @@ -2296,6 +3122,11 @@ mdast-util-to-string@^3.0.0, mdast-util-to-string@^3.1.0: dependencies: "@types/mdast" "^3.0.0" +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" @@ -2607,7 +3438,7 @@ mime-db@1.52.0: resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12: +mime-types@^2.1.12, mime-types@~2.1.24: version "2.1.35" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -2636,6 +3467,49 @@ mj-context-menu@^0.6.1: resolved "https://registry.npmjs.org/mj-context-menu/-/mj-context-menu-0.6.1.tgz" integrity sha512-7NO5s6n10TIV96d4g2uDpG7ZDpIhMh0QNfGdJw/W47JswFcosz457wqz/b5sAKvl12sxINGFCn80NZHKwxQEXA== +mkdirp@^0.5.4: + version "0.5.6" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +ml-array-mean@^1.1.6: + version "1.1.6" + resolved "https://registry.npmjs.org/ml-array-mean/-/ml-array-mean-1.1.6.tgz" + integrity sha512-MIdf7Zc8HznwIisyiJGRH9tRigg3Yf4FldW8DxKxpCCv/g5CafTw0RRu51nojVEOXuCQC7DRVVu5c7XXO/5joQ== + dependencies: + ml-array-sum "^1.1.6" + +ml-array-sum@^1.1.6: + version "1.1.6" + resolved "https://registry.npmjs.org/ml-array-sum/-/ml-array-sum-1.1.6.tgz" + integrity sha512-29mAh2GwH7ZmiRnup4UyibQZB9+ZLyMShvt4cH4eTK+cL2oEMIZFnSyB3SS8MlsTh6q/w/yh48KmqLxmovN4Dw== + dependencies: + is-any-array "^2.0.0" + +ml-distance-euclidean@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/ml-distance-euclidean/-/ml-distance-euclidean-2.0.0.tgz" + integrity sha512-yC9/2o8QF0A3m/0IXqCTXCzz2pNEzvmcE/9HFKOZGnTjatvBbsn4lWYJkxENkA4Ug2fnYl7PXQxnPi21sgMy/Q== + +ml-distance@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/ml-distance/-/ml-distance-4.0.0.tgz" + integrity sha512-zj7+UGZpHk3uL7n79XTfGNUjIGnhLn8xVvrxYvBHvXFxo3jq1q+/UjP311hZxnLVhbxbXCjUniThX8gozjacYA== + dependencies: + ml-array-mean "^1.1.6" + ml-distance-euclidean "^2.0.0" + ml-tree-similarity "^1.0.0" + +ml-tree-similarity@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/ml-tree-similarity/-/ml-tree-similarity-1.0.0.tgz" + integrity sha512-XJUyYqjSuUQkNQHMscr6tcjldsOoAekxADTplt40QKfwW6nd++1wHWV9AArl0Zvw/TIHgNaZZNvr8QGvE8wLRg== + dependencies: + binary-search "^1.3.5" + num-sort "^2.0.0" + mri@^1.1.0: version "1.2.0" resolved "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz" @@ -2646,6 +3520,24 @@ ms@^2.1.1, ms@2.1.2: resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +multer@^1.4.5-lts.1: + version "1.4.5-lts.1" + resolved "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.1.tgz" + integrity sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ== + dependencies: + append-field "^1.0.0" + busboy "^1.0.0" + concat-stream "^1.5.2" + mkdirp "^0.5.4" + object-assign "^4.1.1" + type-is "^1.6.4" + xtend "^4.0.0" + nanoid@^3.3.4: version "3.3.6" resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz" @@ -2667,6 +3559,11 @@ next-i18next@^13.2.2: hoist-non-react-statics "^3.3.2" i18next-fs-backend "^2.1.1" +next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + "next@>= 12.0.0", next@13.2.4: version "13.2.4" resolved "https://registry.npmjs.org/next/-/next-13.2.4.tgz" @@ -2697,6 +3594,11 @@ node-domexception@^1.0.0: resolved "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz" integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== +node-ensure@^0.0.0: + version "0.0.0" + resolved "https://registry.npmjs.org/node-ensure/-/node-ensure-0.0.0.tgz" + integrity sha512-DRI60hzo2oKN1ma0ckc6nQWlHU69RH6xN0sjQTjMpChPfTYvKZdcQFfdYK2RWbJcKyUizSIy/l8OTGxMAM1QDw== + node-fetch@^3.3.1: version "3.3.1" resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz" @@ -2706,6 +3608,18 @@ node-fetch@^3.3.1: fetch-blob "^3.1.4" formdata-polyfill "^4.0.10" +node-fetch@2.6.7: + version "2.6.7" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + +node-gyp-build@^4.3.0: + version "4.6.0" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz" + integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== + node-releases@^2.0.8: version "2.0.10" resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz" @@ -2721,6 +3635,11 @@ normalize-range@^0.1.2: resolved "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz" integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== +num-sort@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/num-sort/-/num-sort-2.1.0.tgz" + integrity sha512-1MQz1Ed8z2yckoBeSfkQHHO9K1yDRxxtotKSJ9yvcTUUxSvfvzEq5GwBrjjHEpMlq/k5gvXdmJ1SbYxWtpNoVg== + nwsapi@^2.2.0: version "2.2.2" resolved "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.2.tgz" @@ -2815,14 +3734,19 @@ open@^8.4.0: is-docker "^2.1.1" is-wsl "^2.2.0" -openai@^3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/openai/-/openai-3.2.1.tgz" - integrity sha512-762C9BNlJPbjjlWZi4WYK9iM2tAVAv0uUp1UmI34vb0CN5T2mjB/qM6RYBmNKMh/dN9fC+bxqPwWJZUTWW052A== +openai@^3.2.1, openai@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/openai/-/openai-3.3.0.tgz" + integrity sha512-uqxI/Au+aPRnsaQRe8CojU0eCR7I0mBiKjD3sNMzY6DaC1ZVrc85u98mtJW6voDug8fgGN+DIZmTDxTthxb7dQ== dependencies: axios "^0.26.0" form-data "^4.0.0" +option@~0.2.1: + version "0.2.4" + resolved "https://registry.npmjs.org/option/-/option-0.2.4.tgz" + integrity sha512-pkEqbDyl8ou5cpq+VsnQbe/WlEy5qS7xPzMS1U55OCG9KPvwFD46zDbxQIj3egJSFc3D+XhYOPUzz49zQAVy7A== + optionator@^0.8.1: version "0.8.3" resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz" @@ -2847,6 +3771,11 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz" + integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== + p-limit@^3.0.2: version "3.1.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" @@ -2861,6 +3790,34 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" +p-queue@^6.6.2: + version "6.6.2" + resolved "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz" + integrity sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ== + dependencies: + eventemitter3 "^4.0.4" + p-timeout "^3.2.0" + +p-retry@4: + version "4.6.2" + resolved "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz" + integrity sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ== + dependencies: + "@types/retry" "0.12.0" + retry "^0.13.1" + +p-timeout@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz" + integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== + dependencies: + p-finally "^1.0.0" + +pako@~1.0.2: + version "1.0.11" + resolved "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" @@ -2885,6 +3842,14 @@ parse5@6.0.1: resolved "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== +parseley@^0.12.0: + version "0.12.1" + resolved "https://registry.npmjs.org/parseley/-/parseley-0.12.1.tgz" + integrity sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw== + dependencies: + leac "^0.6.0" + peberminta "^0.9.0" + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" @@ -2910,6 +3875,19 @@ path-type@^4.0.0: resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +pdf-parse@^1.1.1, pdf-parse@1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/pdf-parse/-/pdf-parse-1.1.1.tgz" + integrity sha512-v6ZJ/efsBpGrGGknjtq9J/oC8tZWq0KWL5vQrk2GlzLEQPUDB1ex+13Rmidl1neNN358Jn9EHZw5y07FFtaC7A== + dependencies: + debug "^3.1.0" + node-ensure "^0.0.0" + +peberminta@^0.9.0: + version "0.9.0" + resolved "https://registry.npmjs.org/peberminta/-/peberminta-0.9.0.tgz" + integrity sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ== + picocolors@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" @@ -3025,6 +4003,11 @@ prismjs@~1.27.0: resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz" integrity sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA== +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + prop-types@^15.0.0, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" @@ -3078,7 +4061,7 @@ quick-lru@^5.1.1: resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz" integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== -react-dom@^18.2.0, react-dom@18.2.0: +"react-dom@^16.8 || ^17.0 || ^18.0", react-dom@^18.2.0, react-dom@18.2.0: version "18.2.0" resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz" integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== @@ -3125,6 +4108,34 @@ react-markdown@^8.0.5: unist-util-visit "^4.0.0" vfile "^5.0.0" +react-remove-scroll-bar@^2.3.3: + version "2.3.4" + resolved "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.4.tgz" + integrity sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A== + dependencies: + react-style-singleton "^2.2.1" + tslib "^2.0.0" + +react-remove-scroll@2.5.5: + version "2.5.5" + resolved "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz" + integrity sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw== + dependencies: + react-remove-scroll-bar "^2.3.3" + react-style-singleton "^2.2.1" + tslib "^2.1.0" + use-callback-ref "^1.3.0" + use-sidecar "^1.1.2" + +react-style-singleton@^2.2.1: + version "2.2.1" + resolved "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.1.tgz" + integrity sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g== + dependencies: + get-nonce "^1.0.0" + invariant "^2.2.4" + tslib "^2.0.0" + react-syntax-highlighter@^15.5.0: version "15.5.0" resolved "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz" @@ -3136,7 +4147,7 @@ react-syntax-highlighter@^15.5.0: prismjs "^1.27.0" refractor "^3.6.0" -"react@^16.5.1 || ^17.0.0 || ^18.0.0", react@^18.2.0, "react@>= 0.14.0", "react@>= 16.8.0", "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", "react@>= 17.0.2", react@>=16, react@18.2.0: +"react@^16.5.1 || ^17.0.0 || ^18.0.0", "react@^16.8 || ^17.0 || ^18.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", react@^18.2.0, "react@>= 0.14.0", "react@>= 16.8.0", "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", "react@>= 17.0.2", react@>=16, react@18.2.0: version "18.2.0" resolved "https://registry.npmjs.org/react/-/react-18.2.0.tgz" integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== @@ -3150,6 +4161,19 @@ read-cache@^1.0.0: dependencies: pify "^2.3.0" +readable-stream@^2.2.2, readable-stream@~2.3.6: + version "2.3.8" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" @@ -3262,6 +4286,11 @@ resolve@^2.0.0-next.4: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +retry@^0.13.1: + version "0.13.1" + resolved "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz" + integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== + reusify@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" @@ -3281,6 +4310,11 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +rw@1: + version "1.3.3" + resolved "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz" + integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== + sade@^1.7.3: version "1.8.1" resolved "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz" @@ -3288,6 +4322,11 @@ sade@^1.7.3: dependencies: mri "^1.1.0" +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + safe-regex-test@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz" @@ -3297,11 +4336,16 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" -"safer-buffer@>= 2.1.2 < 3.0.0": +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +sax@>=0.6.0: + version "1.2.4" + resolved "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + saxes@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz" @@ -3316,6 +4360,13 @@ scheduler@^0.23.0: dependencies: loose-envify "^1.1.0" +selderee@^0.11.0: + version "0.11.0" + resolved "https://registry.npmjs.org/selderee/-/selderee-0.11.0.tgz" + integrity sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA== + dependencies: + parseley "^0.12.0" + semver@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" @@ -3328,6 +4379,11 @@ semver@^7.3.7: dependencies: lru-cache "^6.0.0" +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" @@ -3388,6 +4444,16 @@ speech-rule-engine@^4.0.6: wicked-good-xpath "1.3.0" xmldom-sre "0.1.31" +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +srt-parser-2@^1.2.2, srt-parser-2@^1.2.3: + version "1.2.3" + resolved "https://registry.npmjs.org/srt-parser-2/-/srt-parser-2-1.2.3.tgz" + integrity sha512-dANP1AyJTI503H0/kXwRza+7QxDB3BqeFvEKTF4MI9lQcBe8JbRUQTKVIGzGABJCwBovEYavZ2Qsdm/s8XKz8A== + stop-iteration-iterator@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz" @@ -3395,6 +4461,18 @@ stop-iteration-iterator@^1.0.0: dependencies: internal-slot "^1.0.4" +streamsearch@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz" + integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + string.prototype.matchall@^4.0.8: version "4.0.8" resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz" @@ -3492,6 +4570,16 @@ synckit@^0.8.4: "@pkgr/utils" "^2.3.1" tslib "^2.5.0" +tailwind-merge@^1.13.1: + version "1.13.1" + resolved "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-1.13.1.tgz" + integrity sha512-tRtRN22TDokGi2TuYSvuHQuuW6BJ/zlUEG+iYpAQ9i66msc/0eU/+HPccbPnNNH0mCPp0Ob8thaC8Uy9CxHitQ== + +tailwindcss-animate@^1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/tailwindcss-animate/-/tailwindcss-animate-1.0.6.tgz" + integrity sha512-4WigSGMvbl3gCCact62ZvOngA+PRqhAn7si3TQ3/ZuPuQZcIEtVap+ENSXbzWhpojKB8CpvnIsrwBu8/RnHtuw== + tailwindcss@^3.2.7, "tailwindcss@>=3.0.0 || insiders": version "3.2.7" resolved "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.7.tgz" @@ -3563,6 +4651,11 @@ tr46@^3.0.0: dependencies: punycode "^2.1.1" +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + trim-lines@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz" @@ -3573,6 +4666,20 @@ trough@^2.0.0: resolved "https://registry.npmjs.org/trough/-/trough-2.1.0.tgz" integrity sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g== +ts-toolbelt@^9.6.0: + version "9.6.0" + resolved "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz" + integrity sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w== + +ts-type@>=2: + version "3.0.1" + resolved "https://registry.npmjs.org/ts-type/-/ts-type-3.0.1.tgz" + integrity sha512-cleRydCkBGBFQ4KAvLH0ARIkciduS745prkGVVxPGvcRGhMMoSJUB7gNR1ByKhFTEYrYRg2CsMRGYnqp+6op+g== + dependencies: + "@types/node" "*" + tslib ">=2" + typedarray-dts "^1.0.0" + tsconfig-paths@^3.14.1: version "3.14.2" resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz" @@ -3588,7 +4695,7 @@ tslib@^1.8.1: resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.4.0, tslib@^2.5.0: +tslib@^2.0.0, tslib@^2.1.0, tslib@^2.4.0, tslib@^2.4.1, tslib@^2.5.0, tslib@>=2: version "2.5.0" resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== @@ -3614,11 +4721,34 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" +type-detect@^4.0.0: + version "4.0.8" + resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + type-fest@^0.20.2: version "0.20.2" resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== +type-is@^1.6.4: + version "1.6.18" + resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +type@^1.0.1: + version "1.2.0" + resolved "https://registry.npmjs.org/type/-/type-1.2.0.tgz" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.7.2: + version "2.7.2" + resolved "https://registry.npmjs.org/type/-/type-2.7.2.tgz" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + typed-array-length@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz" @@ -3628,7 +4758,24 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" -"typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", typescript@>=3.3.1, typescript@4.9.5: +typedarray-dts@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/typedarray-dts/-/typedarray-dts-1.0.0.tgz" + integrity sha512-Ka0DBegjuV9IPYFT1h0Qqk5U4pccebNIJCGl8C5uU7xtOs+jpJvKGAY4fHGK25hTmXZOEUl9Cnsg5cS6K/b5DA== + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" + integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== + +"typescript@>= 4.5.5 < 6", "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", typescript@>=3.3.1, typescript@4.9.5: version "4.9.5" resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== @@ -3643,6 +4790,11 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +underscore@^1.13.1: + version "1.13.6" + resolved "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz" + integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== + unified@^10.0.0: version "10.1.2" resolved "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz" @@ -3735,11 +4887,38 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" -util-deprecate@^1.0.2: +use-callback-ref@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.0.tgz" + integrity sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w== + dependencies: + tslib "^2.0.0" + +use-sidecar@^1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz" + integrity sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw== + dependencies: + detect-node-es "^1.1.0" + tslib "^2.0.0" + +utf-8-validate@^5.0.2, utf-8-validate@>=5.0.2: + version "5.0.10" + resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz" + integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== + dependencies: + node-gyp-build "^4.3.0" + +util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +uuid@^9.0.0: + version "9.0.0" + resolved "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz" + integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== + uvu@^0.5.0: version "0.5.6" resolved "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz" @@ -3797,11 +4976,28 @@ web-streams-polyfill@^3.0.3: resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz" integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + webidl-conversions@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz" integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== +websocket@^1.0.34: + version "1.0.34" + resolved "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz" + integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + whatwg-encoding@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz" @@ -3830,6 +5026,14 @@ whatwg-url@^11.0.0: tr46 "^3.0.0" webidl-conversions "^7.0.0" +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz" @@ -3895,6 +5099,24 @@ xml-name-validator@^4.0.0: resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz" integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== +xml2js@^0.4.23: + version "0.4.23" + resolved "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz" + integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== + dependencies: + sax ">=0.6.0" + xmlbuilder "~11.0.0" + +xmlbuilder@^10.0.0: + version "10.1.1" + resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-10.1.1.tgz" + integrity sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg== + +xmlbuilder@~11.0.0: + version "11.0.1" + resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz" + integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== + xmlchars@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz" @@ -3910,6 +5132,11 @@ xtend@^4.0.0, xtend@^4.0.2: resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== +yaeti@^0.0.6: + version "0.0.6" + resolved "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz" + integrity sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug== + yallist@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" @@ -3920,11 +5147,26 @@ yaml@^1.10.2: resolved "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== +yaml@^2.2.1: + version "2.2.2" + resolved "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz" + integrity sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA== + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +zod-to-json-schema@^3.20.4: + version "3.21.0" + resolved "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.21.0.tgz" + integrity sha512-+KyFCzqKwE6CxMSZxEUBaGmdXzB09BoFebO+xef/ISE4cTfReQlyThYbS8aqd3uWkdt9fz5BGHsY0CbY+Ra9oA== + +zod@^3.21.4: + version "3.21.4" + resolved "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz" + integrity sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw== + zwitch@^2.0.0: version "2.0.4" resolved "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz"