Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

feat(ee): add agent chat

Marc Seitz51a67827f78a
diff --git a/LICENSE b/LICENSE
index afe81f39..3e995f35 100644
--- a/LICENSE
+++ b/LICENSE
@@ -2,7 +2,7 @@ Copyright (c) 2023-present Papermark, Inc.
Portions of this software are licensed as follows:
-- All content that resides under https://github.com/mfts/papermark/tree/main/ee directory of this repository (Commercial License) is licensed under the license defined in "ee/LICENSE".
+- All content that resides under https://github.com/mfts/papermark/tree/main/ee and https://github.com/mfts/papermark/tree/main/app/(ee) directory of this repository (Commercial License) is licensed under the license defined in "ee/LICENSE".
- All third party components incorporated into the Papermark Software are licensed under the original license provided by the owner of the applicable component.
- Content outside of the above mentioned directories or restrictions above is available under the "AGPLv3" license as defined below.
diff --git a/app/(ee)/LICENSE.md b/app/(ee)/LICENSE.md
new file mode 100644
index 00000000..bbf15627
--- /dev/null
+++ b/app/(ee)/LICENSE.md
@@ -0,0 +1 @@
+../ee/LICENSE.md
diff --git a/app/(ee)/README.md b/app/(ee)/README.md
new file mode 100644
index 00000000..1068cc9e
--- /dev/null
+++ b/app/(ee)/README.md
@@ -0,0 +1 @@
+../ee/README.md
diff --git a/app/(ee)/api/ai/chat/[chatId]/messages/route.ts b/app/(ee)/api/ai/chat/[chatId]/messages/route.ts
new file mode 100644
index 00000000..813e48ba
--- /dev/null
+++ b/app/(ee)/api/ai/chat/[chatId]/messages/route.ts
@@ -0,0 +1,137 @@
+import { NextRequest } from "next/server";
+
+import { generateChatTitle } from "@/ee/features/ai/lib/chat/generate-chat-title";
+import { getFilteredDataroomDocumentIds } from "@/ee/features/ai/lib/chat/get-filtered-dataroom-document-ids";
+import { sendMessage } from "@/ee/features/ai/lib/chat/send-message";
+import { validateChatAccess } from "@/ee/features/ai/lib/permissions/validate-chat-access";
+import { sendMessageSchema } from "@/ee/features/ai/schemas/chat";
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import { getServerSession } from "next-auth";
+
+import { getFeatureFlags } from "@/lib/featureFlags";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+
+/**
+ * POST /api/ai/chat/[chatId]/messages
+ * Send a message and get streaming response
+ */
+export async function POST(
+ req: NextRequest,
+ { params }: { params: { chatId: string } },
+) {
+ try {
+ const { chatId } = params;
+ const body = await req.json();
+ const validation = sendMessageSchema.safeParse(body);
+
+ if (!validation.success) {
+ return new Response(
+ JSON.stringify({
+ error: "Invalid request body",
+ details: validation.error,
+ }),
+ { status: 400, headers: { "Content-Type": "application/json" } },
+ );
+ }
+
+ const { content, filterDocumentId } = validation.data;
+
+ const session = await getServerSession(authOptions);
+ const searchParams = req.nextUrl.searchParams;
+ const viewerId = searchParams.get("viewerId");
+
+ let userId: string | undefined;
+
+ if (session) {
+ userId = (session.user as CustomUser).id;
+ }
+
+ // Validate access
+ const hasAccess = await validateChatAccess({
+ chatId,
+ userId,
+ viewerId: viewerId || undefined,
+ });
+
+ if (!hasAccess) {
+ return new Response(JSON.stringify({ error: "Unauthorized" }), {
+ status: 401,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+
+ // Get chat details
+ const chat = await prisma.chat.findUnique({
+ where: { id: chatId },
+ include: {
+ messages: {
+ take: 1,
+ },
+ },
+ });
+
+ if (!chat) {
+ return new Response(JSON.stringify({ error: "Chat not found" }), {
+ status: 404,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+
+ // Check if AI feature is enabled for this team
+ const features = await getFeatureFlags({ teamId: chat.teamId });
+ if (!features.ai) {
+ return new Response(
+ JSON.stringify({
+ error: "AI features are not available for this team",
+ }),
+ { status: 403, headers: { "Content-Type": "application/json" } },
+ );
+ }
+
+ if (!chat.vectorStoreId) {
+ return new Response(
+ JSON.stringify({
+ error: "Vector store not available. Please index documents first.",
+ }),
+ { status: 400, headers: { "Content-Type": "application/json" } },
+ );
+ }
+
+ // Generate title from first message if not set
+ if (!chat.title && chat.messages.length === 0) {
+ const title = await generateChatTitle(content);
+ await prisma.chat.update({
+ where: { id: chatId },
+ data: { title },
+ });
+ }
+
+ // Get filtered dataroom document IDs based on permissions
+ let filteredDataroomDocumentIds: string[] | undefined;
+
+ if (chat.dataroomId && chat.linkId) {
+ filteredDataroomDocumentIds = await getFilteredDataroomDocumentIds(
+ chat.dataroomId,
+ chat.linkId,
+ );
+ }
+
+ // Send message and get streaming response
+ const result = await sendMessage({
+ chatId,
+ content,
+ vectorStoreId: chat.vectorStoreId,
+ filteredDataroomDocumentIds,
+ filterDocumentId,
+ });
+
+ return result.toTextStreamResponse();
+ } catch (error) {
+ console.error("Error sending message:", error);
+ return new Response(JSON.stringify({ error: "Internal server error" }), {
+ status: 500,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+}
diff --git a/app/(ee)/api/ai/chat/[chatId]/route.ts b/app/(ee)/api/ai/chat/[chatId]/route.ts
new file mode 100644
index 00000000..2ea9dcb3
--- /dev/null
+++ b/app/(ee)/api/ai/chat/[chatId]/route.ts
@@ -0,0 +1,146 @@
+import { NextRequest, NextResponse } from "next/server";
+
+import { validateChatAccess } from "@/ee/features/ai/lib/permissions/validate-chat-access";
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import { getServerSession } from "next-auth";
+
+import { getFeatureFlags } from "@/lib/featureFlags";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+
+/**
+ * GET /api/ai/chat/[chatId]
+ * Get chat details with messages
+ */
+export async function GET(
+ req: NextRequest,
+ { params }: { params: { chatId: string } },
+) {
+ try {
+ const { chatId } = params;
+ const session = await getServerSession(authOptions);
+ const searchParams = req.nextUrl.searchParams;
+ const viewerId = searchParams.get("viewerId");
+
+ let userId: string | undefined;
+
+ if (session) {
+ userId = (session.user as CustomUser).id;
+ }
+
+ // Validate access
+ const hasAccess = await validateChatAccess({
+ chatId,
+ userId,
+ viewerId: viewerId || undefined,
+ });
+
+ if (!hasAccess) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ // Fetch chat with messages
+ const chat = await prisma.chat.findUnique({
+ where: { id: chatId },
+ include: {
+ messages: {
+ orderBy: { createdAt: "asc" },
+ },
+ document: {
+ select: {
+ id: true,
+ name: true,
+ },
+ },
+ dataroom: {
+ select: {
+ id: true,
+ name: true,
+ },
+ },
+ },
+ });
+
+ if (!chat) {
+ return NextResponse.json({ error: "Chat not found" }, { status: 404 });
+ }
+
+ // Check if AI feature is enabled for this team
+ const features = await getFeatureFlags({ teamId: chat.teamId });
+ if (!features.ai) {
+ return NextResponse.json(
+ { error: "AI features are not available for this team" },
+ { status: 403 },
+ );
+ }
+
+ return NextResponse.json(chat);
+ } catch (error) {
+ console.error("Error fetching chat:", error);
+ return NextResponse.json(
+ { error: "Internal server error" },
+ { status: 500 },
+ );
+ }
+}
+
+/**
+ * DELETE /api/ai/chat/[chatId]
+ * Delete a chat
+ */
+export async function DELETE(
+ req: NextRequest,
+ { params }: { params: { chatId: string } },
+) {
+ try {
+ const { chatId } = params;
+ const session = await getServerSession(authOptions);
+
+ if (!session) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ const userId = (session.user as CustomUser).id;
+
+ // Validate ownership
+ const hasAccess = await validateChatAccess({
+ chatId,
+ userId,
+ });
+
+ if (!hasAccess) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ // Verify user owns this chat
+ const chat = await prisma.chat.findUnique({
+ where: { id: chatId },
+ });
+
+ if (!chat || chat.userId !== userId) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ // Check if AI feature is enabled for this team
+ const features = await getFeatureFlags({ teamId: chat.teamId });
+ if (!features.ai) {
+ return NextResponse.json(
+ { error: "AI features are not available for this team" },
+ { status: 403 },
+ );
+ }
+
+ // Delete chat (messages will cascade)
+ await prisma.chat.delete({
+ where: { id: chatId },
+ });
+
+ return NextResponse.json({ success: true });
+ } catch (error) {
+ console.error("Error deleting chat:", error);
+ return NextResponse.json(
+ { error: "Internal server error" },
+ { status: 500 },
+ );
+ }
+}
diff --git a/app/(ee)/api/ai/chat/route.ts b/app/(ee)/api/ai/chat/route.ts
new file mode 100644
index 00000000..7e337329
--- /dev/null
+++ b/app/(ee)/api/ai/chat/route.ts
@@ -0,0 +1,590 @@
+import { NextRequest, NextResponse } from "next/server";
+
+import { createChat } from "@/ee/features/ai/lib/chat/create-chat";
+import { createChatSchema } from "@/ee/features/ai/schemas/chat";
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import { getServerSession } from "next-auth";
+import { z } from "zod";
+
+import { verifyDataroomSession } from "@/lib/auth/dataroom-auth";
+import { getFeatureFlags } from "@/lib/featureFlags";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+
+/**
+ * POST /api/ai/chat
+ * Create a new chat session
+ */
+export async function POST(req: NextRequest) {
+ try {
+ const body = await req.json();
+ const validation = createChatSchema.safeParse(body);
+
+ if (!validation.success) {
+ return NextResponse.json(
+ { error: "Invalid request body", details: validation.error },
+ { status: 400 },
+ );
+ }
+
+ const { documentId, dataroomId, linkId, viewId, title, viewerId } =
+ validation.data;
+
+ // Check for either internal user or external viewer authentication
+ const session = await getServerSession(authOptions);
+
+ let userId: string | undefined;
+ let teamId: string;
+
+ // Internal user flow
+ if (session) {
+ userId = (session.user as CustomUser).id;
+
+ // Get team ID from document or dataroom
+ if (dataroomId) {
+ const dataroom = await prisma.dataroom.findUnique({
+ where: { id: dataroomId },
+ select: {
+ teamId: true,
+ agentsEnabled: true,
+ vectorStoreId: true,
+ team: {
+ select: {
+ agentsEnabled: true,
+ },
+ },
+ },
+ });
+
+ if (!dataroom) {
+ return NextResponse.json(
+ { error: "Dataroom not found" },
+ { status: 404 },
+ );
+ }
+
+ // Check if team has AI enabled first
+ if (!dataroom.team?.agentsEnabled) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled for this team" },
+ { status: 403 },
+ );
+ }
+
+ if (!dataroom.agentsEnabled) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled for this dataroom" },
+ { status: 403 },
+ );
+ }
+
+ teamId = dataroom.teamId;
+
+ // Verify user is member of team
+ const userTeam = await prisma.userTeam.findUnique({
+ where: {
+ userId_teamId: {
+ userId,
+ teamId,
+ },
+ },
+ });
+
+ if (!userTeam) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+ } else if (documentId) {
+ const document = await prisma.document.findUnique({
+ where: { id: documentId },
+ select: {
+ teamId: true,
+ agentsEnabled: true,
+ team: {
+ select: {
+ agentsEnabled: true,
+ },
+ },
+ },
+ });
+
+ if (!document) {
+ return NextResponse.json(
+ { error: "Document not found" },
+ { status: 404 },
+ );
+ }
+
+ // Check if team has AI enabled first
+ if (!document.team?.agentsEnabled) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled for this team" },
+ { status: 403 },
+ );
+ }
+
+ if (!document.agentsEnabled) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled for this document" },
+ { status: 403 },
+ );
+ }
+
+ teamId = document.teamId;
+
+ // Verify user is member of team
+ const userTeam = await prisma.userTeam.findUnique({
+ where: {
+ userId_teamId: {
+ userId,
+ teamId,
+ },
+ },
+ });
+
+ if (!userTeam) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+ } else {
+ return NextResponse.json(
+ { error: "Either documentId or dataroomId is required" },
+ { status: 400 },
+ );
+ }
+ }
+ // External viewer flow
+ else if (linkId && viewId && viewerId) {
+ // Verify dataroom session if this is a dataroom link
+ if (dataroomId) {
+ const dataroomSession = await verifyDataroomSession(
+ req,
+ linkId,
+ dataroomId,
+ );
+
+ if (!dataroomSession || dataroomSession.viewerId !== viewerId) {
+ return NextResponse.json(
+ { error: "Unauthorized - invalid session" },
+ { status: 401 },
+ );
+ }
+
+ // Verify link has AI enabled
+ const link = await prisma.link.findUnique({
+ where: { id: linkId, dataroomId },
+ select: {
+ enableAIAgents: true,
+ isArchived: true,
+ dataroom: { select: { teamId: true, agentsEnabled: true } },
+ team: { select: { agentsEnabled: true } },
+ },
+ });
+
+ if (!link) {
+ return NextResponse.json(
+ { error: "Link not found" },
+ { status: 404 },
+ );
+ }
+
+ if (!link?.isArchived) {
+ return NextResponse.json(
+ { error: "Link is archived" },
+ { status: 403 },
+ );
+ }
+
+ if (!link?.enableAIAgents) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled for this link" },
+ { status: 403 },
+ );
+ }
+
+ if (!link?.dataroom) {
+ return NextResponse.json(
+ { error: "Dataroom not found" },
+ { status: 404 },
+ );
+ }
+
+ if (!link?.dataroom?.agentsEnabled) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled for this dataroom" },
+ { status: 403 },
+ );
+ }
+
+ if (!link?.team?.agentsEnabled) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled" },
+ { status: 403 },
+ );
+ }
+
+ teamId = link?.dataroom?.teamId;
+ } else if (documentId) {
+ // Verify link access for document
+ const link = await prisma.link.findUnique({
+ where: { id: linkId, documentId },
+ select: {
+ enableAIAgents: true,
+ isArchived: true,
+ document: { select: { teamId: true, agentsEnabled: true } },
+ team: { select: { agentsEnabled: true } },
+ },
+ });
+
+ if (!link) {
+ return NextResponse.json(
+ { error: "Link not found" },
+ { status: 404 },
+ );
+ }
+
+ if (link?.isArchived) {
+ return NextResponse.json(
+ { error: "Link is archived" },
+ { status: 403 },
+ );
+ }
+
+ // Check if link has AI enabled
+ if (!link.enableAIAgents) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled for this link" },
+ { status: 403 },
+ );
+ }
+
+ if (!link.document?.agentsEnabled) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled for this document" },
+ { status: 403 },
+ );
+ }
+
+ if (!link?.team?.agentsEnabled) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled" },
+ { status: 403 },
+ );
+ }
+
+ if (!link.document || !link.document?.teamId) {
+ return NextResponse.json(
+ { error: "Document not found" },
+ { status: 400 },
+ );
+ }
+
+ teamId = link.document?.teamId;
+ } else {
+ return NextResponse.json(
+ { error: "Either documentId or dataroomId is required" },
+ { status: 400 },
+ );
+ }
+
+ // Verify viewer exists
+ const viewer = await prisma.viewer.findUnique({
+ where: { id: viewerId, teamId },
+ });
+
+ if (!viewer) {
+ return NextResponse.json(
+ { error: "Viewer not found" },
+ { status: 404 },
+ );
+ }
+ } else {
+ return NextResponse.json(
+ { error: "Authentication required" },
+ { status: 401 },
+ );
+ }
+
+ // Check if AI feature is enabled for this team
+ const features = await getFeatureFlags({ teamId });
+ if (!features.ai) {
+ return NextResponse.json(
+ { error: "AI features are not available for this team" },
+ { status: 403 },
+ );
+ }
+
+ // Get vector store ID
+ let vectorStoreId: string | undefined;
+
+ if (dataroomId) {
+ const dataroom = await prisma.dataroom.findUnique({
+ where: { id: dataroomId },
+ select: { vectorStoreId: true },
+ });
+ vectorStoreId = dataroom?.vectorStoreId || undefined;
+ } else if (documentId) {
+ const team = await prisma.team.findUnique({
+ where: { id: teamId },
+ select: { vectorStoreId: true },
+ });
+ vectorStoreId = team?.vectorStoreId || undefined;
+ }
+
+ // Create the chat
+ const chat = await createChat({
+ teamId,
+ documentId,
+ dataroomId,
+ linkId,
+ viewId,
+ userId,
+ viewerId,
+ vectorStoreId,
+ title,
+ });
+
+ return NextResponse.json(chat, { status: 201 });
+ } catch (error) {
+ console.error("Error creating chat:", error);
+ return NextResponse.json(
+ { error: "Internal server error" },
+ { status: 500 },
+ );
+ }
+}
+
+/**
+ * GET /api/ai/chat
+ * List chats with filters
+ * Supports both internal users (via session) and external viewers (via viewerId param)
+ */
+export async function GET(req: NextRequest) {
+ try {
+ const session = await getServerSession(authOptions);
+ const searchParams = req.nextUrl.searchParams;
+
+ const chatListQuerySchema = z.object({
+ viewerId: z.string().cuid().optional(),
+ teamId: z.string().cuid().optional(),
+ documentId: z.string().cuid().optional(),
+ dataroomId: z.string().cuid().optional(),
+ linkId: z.string().cuid().optional(),
+ viewId: z.string().cuid().optional(),
+ });
+
+ const queryObj = {
+ viewerId: searchParams.get("viewerId") ?? undefined,
+ teamId: searchParams.get("teamId") ?? undefined,
+ documentId: searchParams.get("documentId") ?? undefined,
+ dataroomId: searchParams.get("dataroomId") ?? undefined,
+ linkId: searchParams.get("linkId") ?? undefined,
+ viewId: searchParams.get("viewId") ?? undefined,
+ };
+
+ const { viewerId, teamId, documentId, dataroomId, linkId, viewId } =
+ chatListQuerySchema.parse(queryObj);
+
+ // Combined flow: logged-in user with viewerId
+ // This handles the case where a team member is also viewing as a viewer
+ if (session && viewerId && (dataroomId || documentId)) {
+ const userId = (session.user as CustomUser).id;
+
+ // Verify viewer exists
+ const viewer = await prisma.viewer.findUnique({
+ where: { id: viewerId },
+ select: {
+ teamId: true,
+ },
+ });
+
+ if (!viewer) {
+ return NextResponse.json(
+ { error: "Viewer not found" },
+ { status: 404 },
+ );
+ }
+
+ // Verify user is member of team that the viewer is associated with
+ const userTeam = await prisma.userTeam.findUnique({
+ where: {
+ userId_teamId: {
+ userId,
+ teamId: viewer.teamId,
+ },
+ },
+ });
+
+ if (!userTeam) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ // Check if AI feature is enabled for this team
+ const features = await getFeatureFlags({ teamId: viewer.teamId });
+ if (!features.ai) {
+ return NextResponse.json(
+ { error: "AI features are not available for this team" },
+ { status: 403 },
+ );
+ }
+
+ // Build where clause - find chats with this userId OR viewerId
+ const baseWhere: any = {};
+
+ if (documentId) {
+ baseWhere.documentId = documentId;
+ }
+
+ if (dataroomId) {
+ baseWhere.dataroomId = dataroomId;
+ }
+
+ if (linkId) {
+ baseWhere.linkId = linkId;
+ }
+
+ // Fetch chats that belong to either userId or viewerId
+ const chats = await prisma.chat.findMany({
+ where: {
+ ...baseWhere,
+ OR: [{ userId }, { viewerId }],
+ },
+ orderBy: {
+ createdAt: "desc",
+ },
+ take: 50,
+ });
+
+ return NextResponse.json(chats);
+ }
+
+ // External viewer flow (not logged in)
+ if (viewerId && linkId && viewId) {
+ // Build where clause for viewer's chats
+ const where: any = {
+ viewerId,
+ linkId,
+ };
+
+ if (dataroomId) {
+ // verify dataroom session
+ const dataroomSession = await verifyDataroomSession(
+ req,
+ linkId,
+ dataroomId,
+ );
+
+ if (!dataroomSession || dataroomSession.viewerId !== viewerId) {
+ return NextResponse.json(
+ { error: "Unauthorized - invalid session" },
+ { status: 401 },
+ );
+ }
+
+ where.dataroomId = dataroomId;
+ }
+
+ if (documentId) {
+ // verify document session
+ const view = await prisma.view.findUnique({
+ where: { id: viewId, linkId, documentId },
+ select: {
+ viewerId: true,
+ },
+ });
+
+ if (!view || view.viewerId !== viewerId) {
+ return NextResponse.json(
+ { error: "Unauthorized - invalid session" },
+ { status: 401 },
+ );
+ }
+
+ where.documentId = documentId;
+ }
+
+ // Fetch viewer's chats
+ const chats = await prisma.chat.findMany({
+ where,
+ orderBy: {
+ createdAt: "desc",
+ },
+ take: 50,
+ select: {
+ id: true,
+ title: true,
+ createdAt: true,
+ lastMessageAt: true,
+ },
+ });
+
+ return NextResponse.json(chats);
+ }
+
+ // Internal user flow (logged in, no viewerId)
+ if (!session) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ const userId = (session.user as CustomUser).id;
+
+ if (!teamId) {
+ return NextResponse.json(
+ { error: "teamId is required" },
+ { status: 400 },
+ );
+ }
+
+ // Verify user is member of team
+ const userTeam = await prisma.userTeam.findUnique({
+ where: {
+ userId_teamId: {
+ userId,
+ teamId,
+ },
+ },
+ });
+
+ if (!userTeam) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ // Check if AI feature is enabled for this team
+ const features = await getFeatureFlags({ teamId });
+ if (!features.ai) {
+ return NextResponse.json(
+ { error: "AI features are not available for this team" },
+ { status: 403 },
+ );
+ }
+
+ // Build where clause
+ const where: any = {
+ teamId,
+ userId, // Only show user's own chats
+ };
+
+ if (documentId) {
+ where.documentId = documentId;
+ }
+
+ if (dataroomId) {
+ where.dataroomId = dataroomId;
+ }
+
+ // Fetch chats
+ const chats = await prisma.chat.findMany({
+ where,
+ orderBy: {
+ createdAt: "desc",
+ },
+ take: 50,
+ });
+
+ return NextResponse.json(chats);
+ } catch (error) {
+ console.error("Error fetching chats:", error);
+ return NextResponse.json(
+ { error: "Internal server error" },
+ { status: 500 },
+ );
+ }
+}
diff --git a/app/(ee)/api/ai/store/teams/[teamId]/datarooms/[dataroomId]/route.ts b/app/(ee)/api/ai/store/teams/[teamId]/datarooms/[dataroomId]/route.ts
new file mode 100644
index 00000000..32aeb16e
--- /dev/null
+++ b/app/(ee)/api/ai/store/teams/[teamId]/datarooms/[dataroomId]/route.ts
@@ -0,0 +1,213 @@
+import { NextRequest, NextResponse } from "next/server";
+
+import { processDocumentForVectorStore } from "@/ee/features/ai/lib/file-processing/process-document-for-vector-store";
+import { createDataroomVectorStore } from "@/ee/features/ai/lib/vector-stores/create-dataroom-vector-store";
+import { addFileToVectorStore } from "@/ee/features/ai/lib/vector-stores/upload-file-to-vector-store";
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import { getServerSession } from "next-auth";
+
+import { getFeatureFlags } from "@/lib/featureFlags";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+
+/**
+ * POST /api/ai/store/teams/[teamId]/datarooms/[dataroomId]
+ * Index all documents in a dataroom into its vector store
+ */
+export async function POST(
+ req: NextRequest,
+ { params }: { params: { dataroomId: string; teamId: string } },
+) {
+ try {
+ const { dataroomId, teamId } = params;
+ const session = await getServerSession(authOptions);
+
+ if (!session) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ const userId = (session.user as CustomUser).id;
+
+ // Verify user is member of team
+ const userTeam = await prisma.userTeam.findUnique({
+ where: {
+ userId_teamId: {
+ userId,
+ teamId,
+ },
+ },
+ });
+
+ if (!userTeam) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ // Check if AI feature is enabled for this team
+ const features = await getFeatureFlags({ teamId });
+ if (!features.ai) {
+ return NextResponse.json(
+ { error: "AI features are not available for this team" },
+ { status: 403 },
+ );
+ }
+
+ // Get dataroom and documents
+ const dataroom = await prisma.dataroom.findUnique({
+ where: {
+ id: dataroomId,
+ teamId,
+ },
+ include: {
+ team: {
+ select: {
+ agentsEnabled: true,
+ },
+ },
+ documents: {
+ include: {
+ document: {
+ include: {
+ versions: {
+ where: { isPrimary: true },
+ take: 1,
+ },
+ },
+ },
+ },
+ },
+ },
+ });
+
+ if (!dataroom) {
+ return NextResponse.json(
+ { error: "Dataroom not found" },
+ { status: 404 },
+ );
+ }
+
+ // Check if team has AI enabled
+ if (!dataroom.team.agentsEnabled) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled for this team" },
+ { status: 403 },
+ );
+ }
+
+ if (!dataroom.agentsEnabled) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled for this dataroom" },
+ { status: 403 },
+ );
+ }
+
+ // Create or get vector store
+ let vectorStoreId = dataroom.vectorStoreId;
+
+ if (!vectorStoreId) {
+ vectorStoreId = await createDataroomVectorStore({
+ dataroomId,
+ teamId: dataroom.teamId,
+ name: dataroom.name,
+ });
+
+ // Update dataroom with vector store ID
+ await prisma.dataroom.update({
+ where: { id: dataroomId },
+ data: { vectorStoreId },
+ });
+ }
+
+ // Process and upload documents
+ let filesIndexed = 0;
+ const errors: string[] = [];
+
+ for (const dataroomDoc of dataroom.documents) {
+ const document = dataroomDoc.document;
+ const primaryVersion = document.versions[0];
+
+ if (!primaryVersion) {
+ errors.push(`No primary version for document: ${document.name}`);
+ continue;
+ }
+
+ // Skip if already indexed
+ if (dataroomDoc.vectorStoreFileId) {
+ filesIndexed++;
+ continue;
+ }
+
+ try {
+ // Check if document type is supported
+ const supportedTypes = ["application/pdf"];
+ if (!supportedTypes.includes(primaryVersion.contentType || "")) {
+ errors.push(
+ `Unsupported file type for document: ${document.name} (${primaryVersion.contentType})`,
+ );
+ continue;
+ }
+
+ // get version's fileId
+ let fileId = primaryVersion.fileId;
+
+ if (!fileId) {
+ const { fileId: newFileId } = await processDocumentForVectorStore(
+ primaryVersion.file,
+ primaryVersion.storageType,
+ );
+
+ // Update document version with file ID
+ await prisma.documentVersion.update({
+ where: { id: primaryVersion.id },
+ data: { fileId },
+ });
+
+ fileId = newFileId;
+ }
+
+ const metadata = {
+ teamId: dataroom.teamId,
+ documentId: document.id,
+ documentName: document.name,
+ versionId: primaryVersion.id,
+ dataroomId: dataroom.id,
+ dataroomDocumentId: dataroomDoc.id,
+ dataroomFolderId: dataroomDoc.folderId || "root",
+ };
+
+ // Add to vector store
+ const vectorStoreFileId = await addFileToVectorStore({
+ vectorStoreId,
+ fileId,
+ metadata,
+ });
+
+ // Update dataroom document with vector store file ID
+ await prisma.dataroomDocument.update({
+ where: { id: dataroomDoc.id },
+ data: { vectorStoreFileId },
+ });
+
+ filesIndexed++;
+ } catch (error) {
+ console.error(`Error indexing document ${document.name}:`, error);
+ errors.push(
+ `Failed to index document: ${document.name} - ${error instanceof Error ? error.message : "Unknown error"}`,
+ );
+ }
+ }
+
+ return NextResponse.json({
+ success: true,
+ filesIndexed,
+ totalDocuments: dataroom.documents.length,
+ vectorStoreId,
+ errors: errors.length > 0 ? errors : undefined,
+ });
+ } catch (error) {
+ console.error("Error indexing dataroom:", error);
+ return NextResponse.json(
+ { error: "Internal server error" },
+ { status: 500 },
+ );
+ }
+}
diff --git a/app/(ee)/api/ai/store/teams/[teamId]/documents/[documentId]/route.ts b/app/(ee)/api/ai/store/teams/[teamId]/documents/[documentId]/route.ts
new file mode 100644
index 00000000..3c1b8c21
--- /dev/null
+++ b/app/(ee)/api/ai/store/teams/[teamId]/documents/[documentId]/route.ts
@@ -0,0 +1,263 @@
+import { NextRequest, NextResponse } from "next/server";
+
+import { processDocumentForVectorStore } from "@/ee/features/ai/lib/file-processing/process-document-for-vector-store";
+import { createTeamVectorStore } from "@/ee/features/ai/lib/vector-stores/create-team-vector-store";
+import { removeFileFromVectorStore } from "@/ee/features/ai/lib/vector-stores/remove-file-from-vector-store";
+import { addFileToVectorStore } from "@/ee/features/ai/lib/vector-stores/upload-file-to-vector-store";
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import { getServerSession } from "next-auth";
+
+import { getFeatureFlags } from "@/lib/featureFlags";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+
+/**
+ * POST /api/ai/store/teams/[teamId]/documents/[documentId]
+ * Index a single document into the team vector store
+ */
+export async function POST(
+ req: NextRequest,
+ { params }: { params: { documentId: string; teamId: string } },
+) {
+ try {
+ const { documentId, teamId } = params;
+ const session = await getServerSession(authOptions);
+
+ if (!session) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ const userId = (session.user as CustomUser).id;
+
+ // Verify user is member of team
+ const userTeam = await prisma.userTeam.findUnique({
+ where: {
+ userId_teamId: {
+ userId,
+ teamId,
+ },
+ },
+ });
+
+ if (!userTeam) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ // Check if AI feature is enabled for this team
+ const features = await getFeatureFlags({ teamId });
+ if (!features.ai) {
+ return NextResponse.json(
+ { error: "AI features are not available for this team" },
+ { status: 403 },
+ );
+ }
+
+ // Get document and version
+ const document = await prisma.document.findUnique({
+ where: { id: documentId },
+ include: {
+ team: {
+ select: {
+ agentsEnabled: true,
+ vectorStoreId: true,
+ name: true,
+ },
+ },
+ versions: {
+ where: { isPrimary: true },
+ take: 1,
+ },
+ },
+ });
+
+ if (!document) {
+ return NextResponse.json(
+ { error: "Document not found" },
+ { status: 404 },
+ );
+ }
+
+ // Check if team has AI enabled
+ if (!document.team.agentsEnabled) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled for this team" },
+ { status: 403 },
+ );
+ }
+
+ if (!document.agentsEnabled) {
+ return NextResponse.json(
+ { error: "AI agents are not enabled for this document" },
+ { status: 403 },
+ );
+ }
+
+ const primaryVersion = document.versions[0];
+
+ if (!primaryVersion) {
+ return NextResponse.json(
+ { error: "No primary version found for this document" },
+ { status: 400 },
+ );
+ }
+
+ // Create or get team vector store
+ let vectorStoreId = document.team.vectorStoreId;
+
+ if (!vectorStoreId) {
+ vectorStoreId = await createTeamVectorStore(
+ document.teamId,
+ document.team.name,
+ );
+
+ // Update team with vector store ID
+ await prisma.team.update({
+ where: { id: document.teamId },
+ data: { vectorStoreId },
+ });
+ }
+
+ // Check if document type is supported
+ const supportedTypes = ["application/pdf"];
+ if (!supportedTypes.includes(primaryVersion.contentType || "")) {
+ return NextResponse.json(
+ {
+ error: `Unsupported file type: ${primaryVersion.contentType}. Only PDF files are supported.`,
+ },
+ { status: 400 },
+ );
+ }
+
+ let fileId = primaryVersion.fileId;
+
+ if (!fileId) {
+ const { fileId: newFileId } = await processDocumentForVectorStore(
+ primaryVersion.file,
+ primaryVersion.storageType,
+ );
+
+ fileId = newFileId;
+ }
+
+ const metadata = {
+ teamId: document.teamId,
+ documentId: document.id,
+ documentName: document.name,
+ versionId: primaryVersion.id,
+ folderId: document.folderId || "root",
+ };
+
+ // Add to vector store
+ const vectorStoreFileId = await addFileToVectorStore({
+ vectorStoreId,
+ fileId,
+ metadata,
+ });
+
+ // Update document version with vector store file ID
+ await prisma.documentVersion.update({
+ where: { id: primaryVersion.id },
+ data: { vectorStoreFileId },
+ });
+
+ return NextResponse.json({
+ success: true,
+ vectorStoreFileId,
+ vectorStoreId,
+ });
+ } catch (error) {
+ console.error("Error indexing document:", error);
+ return NextResponse.json(
+ { error: "Internal server error" },
+ { status: 500 },
+ );
+ }
+}
+
+/**
+ * DELETE /api/ai/store/teams/[teamId]/documents/[documentId]
+ * Remove a document from the team vector store
+ */
+export async function DELETE(
+ req: NextRequest,
+ { params }: { params: { documentId: string } },
+) {
+ try {
+ const { documentId } = params;
+ const session = await getServerSession(authOptions);
+
+ if (!session) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ const userId = (session.user as CustomUser).id;
+
+ // Get document and verify user access
+ const document = await prisma.document.findUnique({
+ where: { id: documentId },
+ include: {
+ team: {
+ include: {
+ users: {
+ where: { userId },
+ },
+ },
+ },
+ versions: {
+ where: { isPrimary: true },
+ take: 1,
+ },
+ },
+ });
+
+ if (!document) {
+ return NextResponse.json(
+ { error: "Document not found" },
+ { status: 404 },
+ );
+ }
+
+ if (document.team.users.length === 0) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ // Check if AI feature is enabled for this team
+ const features = await getFeatureFlags({ teamId: document.teamId });
+ if (!features.ai) {
+ return NextResponse.json(
+ { error: "AI features are not available for this team" },
+ { status: 403 },
+ );
+ }
+
+ const primaryVersion = document.versions[0];
+ const vectorStoreId = document.team.vectorStoreId;
+
+ if (!primaryVersion?.vectorStoreFileId || !vectorStoreId) {
+ return NextResponse.json(
+ { error: "Document is not indexed" },
+ { status: 400 },
+ );
+ }
+
+ // Remove file from vector store
+ await removeFileFromVectorStore(
+ vectorStoreId,
+ primaryVersion.vectorStoreFileId,
+ );
+
+ // Clear vector store file ID
+ await prisma.documentVersion.update({
+ where: { id: primaryVersion.id },
+ data: { vectorStoreFileId: null },
+ });
+
+ return NextResponse.json({ success: true });
+ } catch (error) {
+ console.error("Error removing document from vector store:", error);
+ return NextResponse.json(
+ { error: "Internal server error" },
+ { status: 500 },
+ );
+ }
+}
diff --git a/app/(ee)/api/ai/store/teams/[teamId]/route.ts b/app/(ee)/api/ai/store/teams/[teamId]/route.ts
new file mode 100644
index 00000000..3f767afe
--- /dev/null
+++ b/app/(ee)/api/ai/store/teams/[teamId]/route.ts
@@ -0,0 +1,86 @@
+import { NextRequest, NextResponse } from "next/server";
+
+import { getVectorStoreInfo } from "@/ee/features/ai/lib/vector-stores/get-vector-store-info";
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import { getServerSession } from "next-auth";
+
+import { getFeatureFlags } from "@/lib/featureFlags";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+
+/**
+ * GET /api/ai/store/teams/[teamId]
+ * Get team vector store information
+ */
+export async function GET(
+ req: NextRequest,
+ { params }: { params: { teamId: string } },
+) {
+ try {
+ const { teamId } = params;
+ const session = await getServerSession(authOptions);
+
+ if (!session) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ const userId = (session.user as CustomUser).id;
+
+ // Verify user is member of team
+ const userTeam = await prisma.userTeam.findFirst({
+ where: {
+ userId,
+ teamId,
+ },
+ });
+
+ if (!userTeam) {
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ }
+
+ // Check if AI feature is enabled for this team
+ const features = await getFeatureFlags({ teamId });
+ if (!features.ai) {
+ return NextResponse.json(
+ { error: "AI features are not available for this team" },
+ { status: 403 },
+ );
+ }
+
+ // Get team with vector store ID
+ const team = await prisma.team.findUnique({
+ where: { id: teamId },
+ select: {
+ vectorStoreId: true,
+ agentsEnabled: true,
+ },
+ });
+
+ if (!team) {
+ return NextResponse.json({ error: "Team not found" }, { status: 404 });
+ }
+
+ if (!team.vectorStoreId) {
+ return NextResponse.json({
+ agentsEnabled: team.agentsEnabled,
+ vectorStoreId: null,
+ info: null,
+ });
+ }
+
+ // Get vector store info
+ const info = await getVectorStoreInfo(team.vectorStoreId);
+
+ return NextResponse.json({
+ agentsEnabled: team.agentsEnabled,
+ vectorStoreId: team.vectorStoreId,
+ info,
+ });
+ } catch (error) {
+ console.error("Error fetching team vector store info:", error);
+ return NextResponse.json(
+ { error: "Internal server error" },
+ { status: 500 },
+ );
+ }
+}
diff --git a/app/api/views-dataroom/route.ts b/app/api/views-dataroom/route.ts
index 1e9b2003..6c77fd61 100644
--- a/app/api/views-dataroom/route.ts
+++ b/app/api/views-dataroom/route.ts
@@ -132,6 +132,7 @@ export async function POST(request: NextRequest) {
select: {
plan: true,
globalBlockList: true,
+ agentsEnabled: true,
},
},
customFields: {
@@ -141,6 +142,12 @@ export async function POST(request: NextRequest) {
},
},
enableUpload: true,
+ dataroom: {
+ select: {
+ agentsEnabled: true,
+ name: true,
+ },
+ },
},
});
@@ -703,6 +710,8 @@ export async function POST(request: NextRequest) {
viewerId: viewer?.id,
conversationsEnabled: link.enableConversation,
enableVisitorUpload: link.enableUpload,
+ agentsEnabled: link.dataroom?.agentsEnabled ?? false,
+ dataroomName: link.dataroom?.name,
...(isTeamMember && { isTeamMember: true }),
};
@@ -1014,6 +1023,8 @@ export async function POST(request: NextRequest) {
canDownload: canDownload,
viewerId: viewer?.id,
conversationsEnabled: link.enableConversation,
+ agentsEnabled: link.dataroom?.agentsEnabled ?? false,
+ dataroomName: link.dataroom?.name,
...(isTeamMember && { isTeamMember: true }),
};
diff --git a/app/api/views/route.ts b/app/api/views/route.ts
index 9ae89ef4..078c6755 100644
--- a/app/api/views/route.ts
+++ b/app/api/views/route.ts
@@ -108,6 +108,7 @@ export async function POST(request: NextRequest) {
select: {
plan: true,
globalBlockList: true,
+ agentsEnabled: true,
},
},
customFields: {
@@ -116,6 +117,11 @@ export async function POST(request: NextRequest) {
label: true,
},
},
+ document: {
+ select: {
+ agentsEnabled: true,
+ },
+ },
},
});
@@ -660,9 +666,14 @@ export async function POST(request: NextRequest) {
}
}
+ // Determine if AI agents should be enabled (requires both team and document level)
+ const agentsEnabled =
+ link.team?.agentsEnabled && link.document?.agentsEnabled;
+
const returnObject = {
message: "View recorded",
viewId: !isPreview && newView ? newView.id : undefined,
+ viewerId: viewer?.id ?? undefined,
isPreview: isPreview ? true : undefined,
file:
(documentVersion &&
@@ -700,6 +711,7 @@ export async function POST(request: NextRequest) {
: undefined,
verificationToken: hashedVerificationToken ?? undefined,
...(isTeamMember && { isTeamMember: true }),
+ ...(agentsEnabled && { agentsEnabled: true }),
};
return NextResponse.json(returnObject);
diff --git a/components/ai-elements/conversation.tsx b/components/ai-elements/conversation.tsx
new file mode 100644
index 00000000..aa380f57
--- /dev/null
+++ b/components/ai-elements/conversation.tsx
@@ -0,0 +1,100 @@
+"use client";
+
+import { Button } from "@/components/ui/button";
+import { cn } from "@/lib/utils";
+import { ArrowDownIcon } from "lucide-react";
+import type { ComponentProps } from "react";
+import { useCallback } from "react";
+import { StickToBottom, useStickToBottomContext } from "use-stick-to-bottom";
+
+export type ConversationProps = ComponentProps<typeof StickToBottom>;
+
+export const Conversation = ({ className, ...props }: ConversationProps) => (
+ <StickToBottom
+ className={cn("relative flex-1 overflow-y-hidden", className)}
+ initial="smooth"
+ resize="smooth"
+ role="log"
+ {...props}
+ />
+);
+
+export type ConversationContentProps = ComponentProps<
+ typeof StickToBottom.Content
+>;
+
+export const ConversationContent = ({
+ className,
+ ...props
+}: ConversationContentProps) => (
+ <StickToBottom.Content
+ className={cn("flex flex-col gap-8 p-4", className)}
+ {...props}
+ />
+);
+
+export type ConversationEmptyStateProps = ComponentProps<"div"> & {
+ title?: string;
+ description?: string;
+ icon?: React.ReactNode;
+};
+
+export const ConversationEmptyState = ({
+ className,
+ title = "No messages yet",
+ description = "Start a conversation to see messages here",
+ icon,
+ children,
+ ...props
+}: ConversationEmptyStateProps) => (
+ <div
+ className={cn(
+ "flex size-full flex-col items-center justify-center gap-3 p-8 text-center",
+ className
+ )}
+ {...props}
+ >
+ {children ?? (
+ <>
+ {icon && <div className="text-muted-foreground">{icon}</div>}
+ <div className="space-y-1">
+ <h3 className="font-medium text-sm">{title}</h3>
+ {description && (
+ <p className="text-muted-foreground text-sm">{description}</p>
+ )}
+ </div>
+ </>
+ )}
+ </div>
+);
+
+export type ConversationScrollButtonProps = ComponentProps<typeof Button>;
+
+export const ConversationScrollButton = ({
+ className,
+ ...props
+}: ConversationScrollButtonProps) => {
+ const { isAtBottom, scrollToBottom } = useStickToBottomContext();
+
+ const handleScrollToBottom = useCallback(() => {
+ scrollToBottom();
+ }, [scrollToBottom]);
+
+ return (
+ !isAtBottom && (
+ <Button
+ className={cn(
+ "absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full",
+ className
+ )}
+ onClick={handleScrollToBottom}
+ size="icon"
+ type="button"
+ variant="outline"
+ {...props}
+ >
+ <ArrowDownIcon className="size-4" />
+ </Button>
+ )
+ );
+};
diff --git a/components/ai-elements/message.tsx b/components/ai-elements/message.tsx
new file mode 100644
index 00000000..c1ad00dc
--- /dev/null
+++ b/components/ai-elements/message.tsx
@@ -0,0 +1,448 @@
+"use client";
+
+import type { ComponentProps, HTMLAttributes, ReactElement } from "react";
+import { createContext, memo, useContext, useEffect, useState } from "react";
+
+import type { FileUIPart, UIMessage } from "ai";
+import {
+ ChevronLeftIcon,
+ ChevronRightIcon,
+ PaperclipIcon,
+ XIcon,
+} from "lucide-react";
+import { Streamdown } from "streamdown";
+
+import { cn } from "@/lib/utils";
+
+import { Button } from "@/components/ui/button";
+import { ButtonGroup, ButtonGroupText } from "@/components/ui/button-group";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+
+export type MessageProps = HTMLAttributes<HTMLDivElement> & {
+ from: UIMessage["role"];
+};
+
+export const Message = ({ className, from, ...props }: MessageProps) => (
+ <div
+ className={cn(
+ "group flex w-full max-w-[80%] flex-col gap-2",
+ from === "user" ? "is-user ml-auto justify-end" : "is-assistant",
+ className,
+ )}
+ {...props}
+ />
+);
+
+export type MessageContentProps = HTMLAttributes<HTMLDivElement>;
+
+export const MessageContent = ({
+ children,
+ className,
+ ...props
+}: MessageContentProps) => (
+ <div
+ className={cn(
+ "is-user:dark flex w-fit flex-col gap-2 overflow-hidden text-sm",
+ "group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground",
+ "group-[.is-assistant]:text-foreground",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+);
+
+export type MessageActionsProps = ComponentProps<"div">;
+
+export const MessageActions = ({
+ className,
+ children,
+ ...props
+}: MessageActionsProps) => (
+ <div className={cn("flex items-center gap-1", className)} {...props}>
+ {children}
+ </div>
+);
+
+export type MessageActionProps = ComponentProps<typeof Button> & {
+ tooltip?: string;
+ label?: string;
+};
+
+export const MessageAction = ({
+ tooltip,
+ children,
+ label,
+ variant = "ghost",
+ size = "icon",
+ ...props
+}: MessageActionProps) => {
+ const button = (
+ <Button size={size} type="button" variant={variant} {...props}>
+ {children}
+ <span className="sr-only">{label || tooltip}</span>
+ </Button>
+ );
+
+ if (tooltip) {
+ return (
+ <TooltipProvider delayDuration={100}>
+ <Tooltip>
+ <TooltipTrigger asChild>{button}</TooltipTrigger>
+ <TooltipContent side="bottom" className="px-1.5 py-1 text-sm">
+ <span>{tooltip}</span>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ );
+ }
+
+ return button;
+};
+
+type MessageBranchContextType = {
+ currentBranch: number;
+ totalBranches: number;
+ goToPrevious: () => void;
+ goToNext: () => void;
+ branches: ReactElement[];
+ setBranches: (branches: ReactElement[]) => void;
+};
+
+const MessageBranchContext = createContext<MessageBranchContextType | null>(
+ null,
+);
+
+const useMessageBranch = () => {
+ const context = useContext(MessageBranchContext);
+
+ if (!context) {
+ throw new Error(
+ "MessageBranch components must be used within MessageBranch",
+ );
+ }
+
+ return context;
+};
+
+export type MessageBranchProps = HTMLAttributes<HTMLDivElement> & {
+ defaultBranch?: number;
+ onBranchChange?: (branchIndex: number) => void;
+};
+
+export const MessageBranch = ({
+ defaultBranch = 0,
+ onBranchChange,
+ className,
+ ...props
+}: MessageBranchProps) => {
+ const [currentBranch, setCurrentBranch] = useState(defaultBranch);
+ const [branches, setBranches] = useState<ReactElement[]>([]);
+
+ const handleBranchChange = (newBranch: number) => {
+ setCurrentBranch(newBranch);
+ onBranchChange?.(newBranch);
+ };
+
+ const goToPrevious = () => {
+ const newBranch =
+ currentBranch > 0 ? currentBranch - 1 : branches.length - 1;
+ handleBranchChange(newBranch);
+ };
+
+ const goToNext = () => {
+ const newBranch =
+ currentBranch < branches.length - 1 ? currentBranch + 1 : 0;
+ handleBranchChange(newBranch);
+ };
+
+ const contextValue: MessageBranchContextType = {
+ currentBranch,
+ totalBranches: branches.length,
+ goToPrevious,
+ goToNext,
+ branches,
+ setBranches,
+ };
+
+ return (
+ <MessageBranchContext.Provider value={contextValue}>
+ <div
+ className={cn("grid w-full gap-2 [&>div]:pb-0", className)}
+ {...props}
+ />
+ </MessageBranchContext.Provider>
+ );
+};
+
+export type MessageBranchContentProps = HTMLAttributes<HTMLDivElement>;
+
+export const MessageBranchContent = ({
+ children,
+ ...props
+}: MessageBranchContentProps) => {
+ const { currentBranch, setBranches, branches } = useMessageBranch();
+ const childrenArray = Array.isArray(children) ? children : [children];
+
+ // Use useEffect to update branches when they change
+ useEffect(() => {
+ if (branches.length !== childrenArray.length) {
+ setBranches(childrenArray);
+ }
+ }, [childrenArray, branches, setBranches]);
+
+ return childrenArray.map((branch, index) => (
+ <div
+ className={cn(
+ "grid gap-2 overflow-hidden [&>div]:pb-0",
+ index === currentBranch ? "block" : "hidden",
+ )}
+ key={branch.key}
+ {...props}
+ >
+ {branch}
+ </div>
+ ));
+};
+
+export type MessageBranchSelectorProps = HTMLAttributes<HTMLDivElement> & {
+ from: UIMessage["role"];
+};
+
+export const MessageBranchSelector = ({
+ className,
+ from,
+ ...props
+}: MessageBranchSelectorProps) => {
+ const { totalBranches } = useMessageBranch();
+
+ // Don't render if there's only one branch
+ if (totalBranches <= 1) {
+ return null;
+ }
+
+ return (
+ <ButtonGroup
+ className="[&>*:not(:first-child)]:rounded-l-md [&>*:not(:last-child)]:rounded-r-md"
+ orientation="horizontal"
+ {...props}
+ />
+ );
+};
+
+export type MessageBranchPreviousProps = ComponentProps<typeof Button>;
+
+export const MessageBranchPrevious = ({
+ children,
+ ...props
+}: MessageBranchPreviousProps) => {
+ const { goToPrevious, totalBranches } = useMessageBranch();
+
+ return (
+ <Button
+ aria-label="Previous branch"
+ disabled={totalBranches <= 1}
+ onClick={goToPrevious}
+ size="icon"
+ type="button"
+ variant="ghost"
+ {...props}
+ >
+ {children ?? <ChevronLeftIcon size={14} />}
+ </Button>
+ );
+};
+
+export type MessageBranchNextProps = ComponentProps<typeof Button>;
+
+export const MessageBranchNext = ({
+ children,
+ className,
+ ...props
+}: MessageBranchNextProps) => {
+ const { goToNext, totalBranches } = useMessageBranch();
+
+ return (
+ <Button
+ aria-label="Next branch"
+ disabled={totalBranches <= 1}
+ onClick={goToNext}
+ size="icon"
+ type="button"
+ variant="ghost"
+ {...props}
+ >
+ {children ?? <ChevronRightIcon size={14} />}
+ </Button>
+ );
+};
+
+export type MessageBranchPageProps = HTMLAttributes<HTMLSpanElement>;
+
+export const MessageBranchPage = ({
+ className,
+ ...props
+}: MessageBranchPageProps) => {
+ const { currentBranch, totalBranches } = useMessageBranch();
+
+ return (
+ <ButtonGroupText
+ className={cn(
+ "border-none bg-transparent text-muted-foreground shadow-none",
+ className,
+ )}
+ {...props}
+ >
+ {currentBranch + 1} of {totalBranches}
+ </ButtonGroupText>
+ );
+};
+
+export type MessageResponseProps = ComponentProps<typeof Streamdown>;
+
+export const MessageResponse = memo(
+ ({ className, ...props }: MessageResponseProps) => (
+ <Streamdown
+ className={cn(
+ "size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_li>p]:m-0 [&_li>p]:inline",
+ className,
+ )}
+ {...props}
+ />
+ ),
+ (prevProps, nextProps) => prevProps.children === nextProps.children,
+);
+
+MessageResponse.displayName = "MessageResponse";
+
+export type MessageAttachmentProps = HTMLAttributes<HTMLDivElement> & {
+ data: FileUIPart;
+ className?: string;
+ onRemove?: () => void;
+};
+
+export function MessageAttachment({
+ data,
+ className,
+ onRemove,
+ ...props
+}: MessageAttachmentProps) {
+ const filename = data.filename || "";
+ const mediaType =
+ data.mediaType?.startsWith("image/") && data.url ? "image" : "file";
+ const isImage = mediaType === "image";
+ const attachmentLabel = filename || (isImage ? "Image" : "Attachment");
+
+ return (
+ <div
+ className={cn(
+ "group relative size-24 overflow-hidden rounded-lg",
+ className,
+ )}
+ {...props}
+ >
+ {isImage ? (
+ <>
+ <img
+ alt={filename || "attachment"}
+ className="size-full object-cover"
+ height={100}
+ src={data.url}
+ width={100}
+ />
+ {onRemove && (
+ <Button
+ aria-label="Remove attachment"
+ className="absolute right-2 top-2 size-6 rounded-full bg-background/80 p-0 opacity-0 backdrop-blur-sm transition-opacity hover:bg-background group-hover:opacity-100 [&>svg]:size-3"
+ onClick={(e) => {
+ e.stopPropagation();
+ onRemove();
+ }}
+ type="button"
+ variant="ghost"
+ >
+ <XIcon />
+ <span className="sr-only">Remove</span>
+ </Button>
+ )}
+ </>
+ ) : (
+ <>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <div className="flex size-full shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground">
+ <PaperclipIcon className="size-4" />
+ </div>
+ </TooltipTrigger>
+ <TooltipContent>
+ <p>{attachmentLabel}</p>
+ </TooltipContent>
+ </Tooltip>
+ {onRemove && (
+ <Button
+ aria-label="Remove attachment"
+ className="size-6 shrink-0 rounded-full p-0 opacity-0 transition-opacity hover:bg-accent group-hover:opacity-100 [&>svg]:size-3"
+ onClick={(e) => {
+ e.stopPropagation();
+ onRemove();
+ }}
+ type="button"
+ variant="ghost"
+ >
+ <XIcon />
+ <span className="sr-only">Remove</span>
+ </Button>
+ )}
+ </>
+ )}
+ </div>
+ );
+}
+
+export type MessageAttachmentsProps = ComponentProps<"div">;
+
+export function MessageAttachments({
+ children,
+ className,
+ ...props
+}: MessageAttachmentsProps) {
+ if (!children) {
+ return null;
+ }
+
+ return (
+ <div
+ className={cn(
+ "ml-auto flex w-fit flex-wrap items-start gap-2",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export type MessageToolbarProps = ComponentProps<"div">;
+
+export const MessageToolbar = ({
+ className,
+ children,
+ ...props
+}: MessageToolbarProps) => (
+ <div
+ className={cn(
+ "mt-4 flex w-full items-center justify-between gap-4",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+);
diff --git a/components/ai-elements/prompt-input.tsx b/components/ai-elements/prompt-input.tsx
new file mode 100644
index 00000000..482188a5
--- /dev/null
+++ b/components/ai-elements/prompt-input.tsx
@@ -0,0 +1,1404 @@
+"use client";
+
+import { Button } from "@/components/ui/button";
+import {
+ Command,
+ CommandEmpty,
+ CommandGroup,
+ CommandInput,
+ CommandItem,
+ CommandList,
+ CommandSeparator,
+} from "@/components/ui/command";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import {
+ HoverCard,
+ HoverCardContent,
+ HoverCardTrigger,
+} from "@/components/ui/hover-card";
+import {
+ InputGroup,
+ InputGroupAddon,
+ InputGroupButton,
+ InputGroupTextarea,
+} from "@/components/ui/input-group";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
+import { cn } from "@/lib/utils";
+import type { ChatStatus, FileUIPart } from "ai";
+import {
+ CornerDownLeftIcon,
+ ImageIcon,
+ Loader2Icon,
+ MicIcon,
+ PaperclipIcon,
+ PlusIcon,
+ SquareIcon,
+ XIcon,
+} from "lucide-react";
+import { nanoid } from "nanoid";
+import {
+ type ChangeEvent,
+ type ChangeEventHandler,
+ Children,
+ type ClipboardEventHandler,
+ type ComponentProps,
+ createContext,
+ type FormEvent,
+ type FormEventHandler,
+ Fragment,
+ type HTMLAttributes,
+ type KeyboardEventHandler,
+ type PropsWithChildren,
+ type ReactNode,
+ type RefObject,
+ useCallback,
+ useContext,
+ useEffect,
+ useMemo,
+ useRef,
+ useState,
+} from "react";
+
+// ============================================================================
+// Provider Context & Types
+// ============================================================================
+
+export type AttachmentsContext = {
+ files: (FileUIPart & { id: string })[];
+ add: (files: File[] | FileList) => void;
+ remove: (id: string) => void;
+ clear: () => void;
+ openFileDialog: () => void;
+ fileInputRef: RefObject<HTMLInputElement | null>;
+};
+
+export type TextInputContext = {
+ value: string;
+ setInput: (v: string) => void;
+ clear: () => void;
+};
+
+export type PromptInputControllerProps = {
+ textInput: TextInputContext;
+ attachments: AttachmentsContext;
+ /** INTERNAL: Allows PromptInput to register its file textInput + "open" callback */
+ __registerFileInput: (
+ ref: RefObject<HTMLInputElement | null>,
+ open: () => void
+ ) => void;
+};
+
+const PromptInputController = createContext<PromptInputControllerProps | null>(
+ null
+);
+const ProviderAttachmentsContext = createContext<AttachmentsContext | null>(
+ null
+);
+
+export const usePromptInputController = () => {
+ const ctx = useContext(PromptInputController);
+ if (!ctx) {
+ throw new Error(
+ "Wrap your component inside <PromptInputProvider> to use usePromptInputController()."
+ );
+ }
+ return ctx;
+};
+
+// Optional variants (do NOT throw). Useful for dual-mode components.
+const useOptionalPromptInputController = () =>
+ useContext(PromptInputController);
+
+export const useProviderAttachments = () => {
+ const ctx = useContext(ProviderAttachmentsContext);
+ if (!ctx) {
+ throw new Error(
+ "Wrap your component inside <PromptInputProvider> to use useProviderAttachments()."
+ );
+ }
+ return ctx;
+};
+
+const useOptionalProviderAttachments = () =>
+ useContext(ProviderAttachmentsContext);
+
+export type PromptInputProviderProps = PropsWithChildren<{
+ initialInput?: string;
+}>;
+
+/**
+ * Optional global provider that lifts PromptInput state outside of PromptInput.
+ * If you don't use it, PromptInput stays fully self-managed.
+ */
+export function PromptInputProvider({
+ initialInput: initialTextInput = "",
+ children,
+}: PromptInputProviderProps) {
+ // ----- textInput state
+ const [textInput, setTextInput] = useState(initialTextInput);
+ const clearInput = useCallback(() => setTextInput(""), []);
+
+ // ----- attachments state (global when wrapped)
+ const [attachmentFiles, setAttachmentFiles] = useState<
+ (FileUIPart & { id: string })[]
+ >([]);
+ const fileInputRef = useRef<HTMLInputElement | null>(null);
+ const openRef = useRef<() => void>(() => {});
+
+ const add = useCallback((files: File[] | FileList) => {
+ const incoming = Array.from(files);
+ if (incoming.length === 0) {
+ return;
+ }
+
+ setAttachmentFiles((prev) =>
+ prev.concat(
+ incoming.map((file) => ({
+ id: nanoid(),
+ type: "file" as const,
+ url: URL.createObjectURL(file),
+ mediaType: file.type,
+ filename: file.name,
+ }))
+ )
+ );
+ }, []);
+
+ const remove = useCallback((id: string) => {
+ setAttachmentFiles((prev) => {
+ const found = prev.find((f) => f.id === id);
+ if (found?.url) {
+ URL.revokeObjectURL(found.url);
+ }
+ return prev.filter((f) => f.id !== id);
+ });
+ }, []);
+
+ const clear = useCallback(() => {
+ setAttachmentFiles((prev) => {
+ for (const f of prev) {
+ if (f.url) {
+ URL.revokeObjectURL(f.url);
+ }
+ }
+ return [];
+ });
+ }, []);
+
+ // Keep a ref to attachments for cleanup on unmount (avoids stale closure)
+ const attachmentsRef = useRef(attachmentFiles);
+ attachmentsRef.current = attachmentFiles;
+
+ // Cleanup blob URLs on unmount to prevent memory leaks
+ useEffect(() => {
+ return () => {
+ for (const f of attachmentsRef.current) {
+ if (f.url) {
+ URL.revokeObjectURL(f.url);
+ }
+ }
+ };
+ }, []);
+
+ const openFileDialog = useCallback(() => {
+ openRef.current?.();
+ }, []);
+
+ const attachments = useMemo<AttachmentsContext>(
+ () => ({
+ files: attachmentFiles,
+ add,
+ remove,
+ clear,
+ openFileDialog,
+ fileInputRef,
+ }),
+ [attachmentFiles, add, remove, clear, openFileDialog]
+ );
+
+ const __registerFileInput = useCallback(
+ (ref: RefObject<HTMLInputElement | null>, open: () => void) => {
+ fileInputRef.current = ref.current;
+ openRef.current = open;
+ },
+ []
+ );
+
+ const controller = useMemo<PromptInputControllerProps>(
+ () => ({
+ textInput: {
+ value: textInput,
+ setInput: setTextInput,
+ clear: clearInput,
+ },
+ attachments,
+ __registerFileInput,
+ }),
+ [textInput, clearInput, attachments, __registerFileInput]
+ );
+
+ return (
+ <PromptInputController.Provider value={controller}>
+ <ProviderAttachmentsContext.Provider value={attachments}>
+ {children}
+ </ProviderAttachmentsContext.Provider>
+ </PromptInputController.Provider>
+ );
+}
+
+// ============================================================================
+// Component Context & Hooks
+// ============================================================================
+
+const LocalAttachmentsContext = createContext<AttachmentsContext | null>(null);
+
+export const usePromptInputAttachments = () => {
+ // Dual-mode: prefer provider if present, otherwise use local
+ const provider = useOptionalProviderAttachments();
+ const local = useContext(LocalAttachmentsContext);
+ const context = provider ?? local;
+ if (!context) {
+ throw new Error(
+ "usePromptInputAttachments must be used within a PromptInput or PromptInputProvider"
+ );
+ }
+ return context;
+};
+
+export type PromptInputAttachmentProps = HTMLAttributes<HTMLDivElement> & {
+ data: FileUIPart & { id: string };
+ className?: string;
+};
+
+export function PromptInputAttachment({
+ data,
+ className,
+ ...props
+}: PromptInputAttachmentProps) {
+ const attachments = usePromptInputAttachments();
+
+ const filename = data.filename || "";
+
+ const mediaType =
+ data.mediaType?.startsWith("image/") && data.url ? "image" : "file";
+ const isImage = mediaType === "image";
+
+ const attachmentLabel = filename || (isImage ? "Image" : "Attachment");
+
+ return (
+ <PromptInputHoverCard>
+ <HoverCardTrigger asChild>
+ <div
+ className={cn(
+ "group relative flex h-8 cursor-pointer select-none items-center gap-1.5 rounded-md border border-border px-1.5 font-medium text-sm transition-all hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
+ className
+ )}
+ key={data.id}
+ {...props}
+ >
+ <div className="relative size-5 shrink-0">
+ <div className="absolute inset-0 flex size-5 items-center justify-center overflow-hidden rounded bg-background transition-opacity group-hover:opacity-0">
+ {isImage ? (
+ <img
+ alt={filename || "attachment"}
+ className="size-5 object-cover"
+ height={20}
+ src={data.url}
+ width={20}
+ />
+ ) : (
+ <div className="flex size-5 items-center justify-center text-muted-foreground">
+ <PaperclipIcon className="size-3" />
+ </div>
+ )}
+ </div>
+ <Button
+ aria-label="Remove attachment"
+ className="absolute inset-0 size-5 cursor-pointer rounded p-0 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 [&>svg]:size-2.5"
+ onClick={(e) => {
+ e.stopPropagation();
+ attachments.remove(data.id);
+ }}
+ type="button"
+ variant="ghost"
+ >
+ <XIcon />
+ <span className="sr-only">Remove</span>
+ </Button>
+ </div>
+
+ <span className="flex-1 truncate">{attachmentLabel}</span>
+ </div>
+ </HoverCardTrigger>
+ <PromptInputHoverCardContent className="w-auto p-2">
+ <div className="w-auto space-y-3">
+ {isImage && (
+ <div className="flex max-h-96 w-96 items-center justify-center overflow-hidden rounded-md border">
+ <img
+ alt={filename || "attachment preview"}
+ className="max-h-full max-w-full object-contain"
+ height={384}
+ src={data.url}
+ width={448}
+ />
+ </div>
+ )}
+ <div className="flex items-center gap-2.5">
+ <div className="min-w-0 flex-1 space-y-1 px-0.5">
+ <h4 className="truncate font-semibold text-sm leading-none">
+ {filename || (isImage ? "Image" : "Attachment")}
+ </h4>
+ {data.mediaType && (
+ <p className="truncate font-mono text-muted-foreground text-xs">
+ {data.mediaType}
+ </p>
+ )}
+ </div>
+ </div>
+ </div>
+ </PromptInputHoverCardContent>
+ </PromptInputHoverCard>
+ );
+}
+
+export type PromptInputAttachmentsProps = Omit<
+ HTMLAttributes<HTMLDivElement>,
+ "children"
+> & {
+ children: (attachment: FileUIPart & { id: string }) => ReactNode;
+};
+
+export function PromptInputAttachments({
+ children,
+ className,
+ ...props
+}: PromptInputAttachmentsProps) {
+ const attachments = usePromptInputAttachments();
+
+ if (!attachments.files.length) {
+ return null;
+ }
+
+ return (
+ <div
+ className={cn("flex flex-wrap items-center gap-2 p-3 w-full", className)}
+ {...props}
+ >
+ {attachments.files.map((file) => (
+ <Fragment key={file.id}>{children(file)}</Fragment>
+ ))}
+ </div>
+ );
+}
+
+export type PromptInputActionAddAttachmentsProps = ComponentProps<
+ typeof DropdownMenuItem
+> & {
+ label?: string;
+};
+
+export const PromptInputActionAddAttachments = ({
+ label = "Add photos or files",
+ ...props
+}: PromptInputActionAddAttachmentsProps) => {
+ const attachments = usePromptInputAttachments();
+
+ return (
+ <DropdownMenuItem
+ {...props}
+ onSelect={(e) => {
+ e.preventDefault();
+ attachments.openFileDialog();
+ }}
+ >
+ <ImageIcon className="mr-2 size-4" /> {label}
+ </DropdownMenuItem>
+ );
+};
+
+export type PromptInputMessage = {
+ text: string;
+ files: FileUIPart[];
+};
+
+export type PromptInputProps = Omit<
+ HTMLAttributes<HTMLFormElement>,
+ "onSubmit" | "onError"
+> & {
+ accept?: string; // e.g., "image/*" or leave undefined for any
+ multiple?: boolean;
+ // When true, accepts drops anywhere on document. Default false (opt-in).
+ globalDrop?: boolean;
+ // Render a hidden input with given name and keep it in sync for native form posts. Default false.
+ syncHiddenInput?: boolean;
+ // Minimal constraints
+ maxFiles?: number;
+ maxFileSize?: number; // bytes
+ onError?: (err: {
+ code: "max_files" | "max_file_size" | "accept";
+ message: string;
+ }) => void;
+ onSubmit: (
+ message: PromptInputMessage,
+ event: FormEvent<HTMLFormElement>
+ ) => void | Promise<void>;
+};
+
+export const PromptInput = ({
+ className,
+ accept,
+ multiple,
+ globalDrop,
+ syncHiddenInput,
+ maxFiles,
+ maxFileSize,
+ onError,
+ onSubmit,
+ children,
+ ...props
+}: PromptInputProps) => {
+ // Try to use a provider controller if present
+ const controller = useOptionalPromptInputController();
+ const usingProvider = !!controller;
+
+ // Refs
+ const inputRef = useRef<HTMLInputElement | null>(null);
+ const formRef = useRef<HTMLFormElement | null>(null);
+
+ // ----- Local attachments (only used when no provider)
+ const [items, setItems] = useState<(FileUIPart & { id: string })[]>([]);
+ const files = usingProvider ? controller.attachments.files : items;
+
+ // Keep a ref to files for cleanup on unmount (avoids stale closure)
+ const filesRef = useRef(files);
+ filesRef.current = files;
+
+ const openFileDialogLocal = useCallback(() => {
+ inputRef.current?.click();
+ }, []);
+
+ const matchesAccept = useCallback(
+ (f: File) => {
+ if (!accept || accept.trim() === "") {
+ return true;
+ }
+ if (accept.includes("image/*")) {
+ return f.type.startsWith("image/");
+ }
+ // NOTE: keep simple; expand as needed
+ return true;
+ },
+ [accept]
+ );
+
+ const addLocal = useCallback(
+ (fileList: File[] | FileList) => {
+ const incoming = Array.from(fileList);
+ const accepted = incoming.filter((f) => matchesAccept(f));
+ if (incoming.length && accepted.length === 0) {
+ onError?.({
+ code: "accept",
+ message: "No files match the accepted types.",
+ });
+ return;
+ }
+ const withinSize = (f: File) =>
+ maxFileSize ? f.size <= maxFileSize : true;
+ const sized = accepted.filter(withinSize);
+ if (accepted.length > 0 && sized.length === 0) {
+ onError?.({
+ code: "max_file_size",
+ message: "All files exceed the maximum size.",
+ });
+ return;
+ }
+
+ setItems((prev) => {
+ const capacity =
+ typeof maxFiles === "number"
+ ? Math.max(0, maxFiles - prev.length)
+ : undefined;
+ const capped =
+ typeof capacity === "number" ? sized.slice(0, capacity) : sized;
+ if (typeof capacity === "number" && sized.length > capacity) {
+ onError?.({
+ code: "max_files",
+ message: "Too many files. Some were not added.",
+ });
+ }
+ const next: (FileUIPart & { id: string })[] = [];
+ for (const file of capped) {
+ next.push({
+ id: nanoid(),
+ type: "file",
+ url: URL.createObjectURL(file),
+ mediaType: file.type,
+ filename: file.name,
+ });
+ }
+ return prev.concat(next);
+ });
+ },
+ [matchesAccept, maxFiles, maxFileSize, onError]
+ );
+
+ const removeLocal = useCallback(
+ (id: string) =>
+ setItems((prev) => {
+ const found = prev.find((file) => file.id === id);
+ if (found?.url) {
+ URL.revokeObjectURL(found.url);
+ }
+ return prev.filter((file) => file.id !== id);
+ }),
+ []
+ );
+
+ const clearLocal = useCallback(
+ () =>
+ setItems((prev) => {
+ for (const file of prev) {
+ if (file.url) {
+ URL.revokeObjectURL(file.url);
+ }
+ }
+ return [];
+ }),
+ []
+ );
+
+ const add = usingProvider ? controller.attachments.add : addLocal;
+ const remove = usingProvider ? controller.attachments.remove : removeLocal;
+ const clear = usingProvider ? controller.attachments.clear : clearLocal;
+ const openFileDialog = usingProvider
+ ? controller.attachments.openFileDialog
+ : openFileDialogLocal;
+
+ // Let provider know about our hidden file input so external menus can call openFileDialog()
+ useEffect(() => {
+ if (!usingProvider) return;
+ controller.__registerFileInput(inputRef, () => inputRef.current?.click());
+ }, [usingProvider, controller]);
+
+ // Note: File input cannot be programmatically set for security reasons
+ // The syncHiddenInput prop is no longer functional
+ useEffect(() => {
+ if (syncHiddenInput && inputRef.current && files.length === 0) {
+ inputRef.current.value = "";
+ }
+ }, [files, syncHiddenInput]);
+
+ // Attach drop handlers on nearest form and document (opt-in)
+ useEffect(() => {
+ const form = formRef.current;
+ if (!form) return;
+
+ const onDragOver = (e: DragEvent) => {
+ if (e.dataTransfer?.types?.includes("Files")) {
+ e.preventDefault();
+ }
+ };
+ const onDrop = (e: DragEvent) => {
+ if (e.dataTransfer?.types?.includes("Files")) {
+ e.preventDefault();
+ }
+ if (e.dataTransfer?.files && e.dataTransfer.files.length > 0) {
+ add(e.dataTransfer.files);
+ }
+ };
+ form.addEventListener("dragover", onDragOver);
+ form.addEventListener("drop", onDrop);
+ return () => {
+ form.removeEventListener("dragover", onDragOver);
+ form.removeEventListener("drop", onDrop);
+ };
+ }, [add]);
+
+ useEffect(() => {
+ if (!globalDrop) return;
+
+ const onDragOver = (e: DragEvent) => {
+ if (e.dataTransfer?.types?.includes("Files")) {
+ e.preventDefault();
+ }
+ };
+ const onDrop = (e: DragEvent) => {
+ if (e.dataTransfer?.types?.includes("Files")) {
+ e.preventDefault();
+ }
+ if (e.dataTransfer?.files && e.dataTransfer.files.length > 0) {
+ add(e.dataTransfer.files);
+ }
+ };
+ document.addEventListener("dragover", onDragOver);
+ document.addEventListener("drop", onDrop);
+ return () => {
+ document.removeEventListener("dragover", onDragOver);
+ document.removeEventListener("drop", onDrop);
+ };
+ }, [add, globalDrop]);
+
+ useEffect(
+ () => () => {
+ if (!usingProvider) {
+ for (const f of filesRef.current) {
+ if (f.url) URL.revokeObjectURL(f.url);
+ }
+ }
+ },
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- cleanup only on unmount; filesRef always current
+ [usingProvider]
+ );
+
+ const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {
+ if (event.currentTarget.files) {
+ add(event.currentTarget.files);
+ }
+ // Reset input value to allow selecting files that were previously removed
+ event.currentTarget.value = "";
+ };
+
+ const convertBlobUrlToDataUrl = async (
+ url: string
+ ): Promise<string | null> => {
+ try {
+ const response = await fetch(url);
+ const blob = await response.blob();
+ return new Promise((resolve) => {
+ const reader = new FileReader();
+ reader.onloadend = () => resolve(reader.result as string);
+ reader.onerror = () => resolve(null);
+ reader.readAsDataURL(blob);
+ });
+ } catch {
+ return null;
+ }
+ };
+
+ const ctx = useMemo<AttachmentsContext>(
+ () => ({
+ files: files.map((item) => ({ ...item, id: item.id })),
+ add,
+ remove,
+ clear,
+ openFileDialog,
+ fileInputRef: inputRef,
+ }),
+ [files, add, remove, clear, openFileDialog]
+ );
+
+ const handleSubmit: FormEventHandler<HTMLFormElement> = (event) => {
+ event.preventDefault();
+
+ const form = event.currentTarget;
+ const text = usingProvider
+ ? controller.textInput.value
+ : (() => {
+ const formData = new FormData(form);
+ return (formData.get("message") as string) || "";
+ })();
+
+ // Reset form immediately after capturing text to avoid race condition
+ // where user input during async blob conversion would be lost
+ if (!usingProvider) {
+ form.reset();
+ }
+
+ // Convert blob URLs to data URLs asynchronously
+ Promise.all(
+ files.map(async ({ id, ...item }) => {
+ if (item.url && item.url.startsWith("blob:")) {
+ const dataUrl = await convertBlobUrlToDataUrl(item.url);
+ // If conversion failed, keep the original blob URL
+ return {
+ ...item,
+ url: dataUrl ?? item.url,
+ };
+ }
+ return item;
+ })
+ )
+ .then((convertedFiles: FileUIPart[]) => {
+ try {
+ const result = onSubmit({ text, files: convertedFiles }, event);
+
+ // Handle both sync and async onSubmit
+ if (result instanceof Promise) {
+ result
+ .then(() => {
+ clear();
+ if (usingProvider) {
+ controller.textInput.clear();
+ }
+ })
+ .catch(() => {
+ // Don't clear on error - user may want to retry
+ });
+ } else {
+ // Sync function completed without throwing, clear attachments
+ clear();
+ if (usingProvider) {
+ controller.textInput.clear();
+ }
+ }
+ } catch {
+ // Don't clear on error - user may want to retry
+ }
+ })
+ .catch(() => {
+ // Don't clear on error - user may want to retry
+ });
+ };
+
+ // Render with or without local provider
+ const inner = (
+ <>
+ <input
+ accept={accept}
+ aria-label="Upload files"
+ className="hidden"
+ multiple={multiple}
+ onChange={handleChange}
+ ref={inputRef}
+ title="Upload files"
+ type="file"
+ />
+ <form
+ className={cn("w-full", className)}
+ onSubmit={handleSubmit}
+ ref={formRef}
+ {...props}
+ >
+ <InputGroup className="overflow-hidden">{children}</InputGroup>
+ </form>
+ </>
+ );
+
+ return usingProvider ? (
+ inner
+ ) : (
+ <LocalAttachmentsContext.Provider value={ctx}>
+ {inner}
+ </LocalAttachmentsContext.Provider>
+ );
+};
+
+export type PromptInputBodyProps = HTMLAttributes<HTMLDivElement>;
+
+export const PromptInputBody = ({
+ className,
+ ...props
+}: PromptInputBodyProps) => (
+ <div className={cn("contents", className)} {...props} />
+);
+
+export type PromptInputTextareaProps = ComponentProps<
+ typeof InputGroupTextarea
+>;
+
+export const PromptInputTextarea = ({
+ onChange,
+ className,
+ placeholder = "What would you like to know?",
+ ...props
+}: PromptInputTextareaProps) => {
+ const controller = useOptionalPromptInputController();
+ const attachments = usePromptInputAttachments();
+ const [isComposing, setIsComposing] = useState(false);
+
+ const handleKeyDown: KeyboardEventHandler<HTMLTextAreaElement> = (e) => {
+ if (e.key === "Enter") {
+ if (isComposing || e.nativeEvent.isComposing) {
+ return;
+ }
+ if (e.shiftKey) {
+ return;
+ }
+ e.preventDefault();
+
+ // Check if the submit button is disabled before submitting
+ const form = e.currentTarget.form;
+ const submitButton = form?.querySelector(
+ 'button[type="submit"]'
+ ) as HTMLButtonElement | null;
+ if (submitButton?.disabled) {
+ return;
+ }
+
+ form?.requestSubmit();
+ }
+
+ // Remove last attachment when Backspace is pressed and textarea is empty
+ if (
+ e.key === "Backspace" &&
+ e.currentTarget.value === "" &&
+ attachments.files.length > 0
+ ) {
+ e.preventDefault();
+ const lastAttachment = attachments.files.at(-1);
+ if (lastAttachment) {
+ attachments.remove(lastAttachment.id);
+ }
+ }
+ };
+
+ const handlePaste: ClipboardEventHandler<HTMLTextAreaElement> = (event) => {
+ const items = event.clipboardData?.items;
+
+ if (!items) {
+ return;
+ }
+
+ const files: File[] = [];
+
+ for (const item of items) {
+ if (item.kind === "file") {
+ const file = item.getAsFile();
+ if (file) {
+ files.push(file);
+ }
+ }
+ }
+
+ if (files.length > 0) {
+ event.preventDefault();
+ attachments.add(files);
+ }
+ };
+
+ const controlledProps = controller
+ ? {
+ value: controller.textInput.value,
+ onChange: (e: ChangeEvent<HTMLTextAreaElement>) => {
+ controller.textInput.setInput(e.currentTarget.value);
+ onChange?.(e);
+ },
+ }
+ : {
+ onChange,
+ };
+
+ return (
+ <InputGroupTextarea
+ className={cn("field-sizing-content max-h-48 min-h-16", className)}
+ name="message"
+ onCompositionEnd={() => setIsComposing(false)}
+ onCompositionStart={() => setIsComposing(true)}
+ onKeyDown={handleKeyDown}
+ onPaste={handlePaste}
+ placeholder={placeholder}
+ {...props}
+ {...controlledProps}
+ />
+ );
+};
+
+export type PromptInputHeaderProps = Omit<
+ ComponentProps<typeof InputGroupAddon>,
+ "align"
+>;
+
+export const PromptInputHeader = ({
+ className,
+ ...props
+}: PromptInputHeaderProps) => (
+ <InputGroupAddon
+ align="block-end"
+ className={cn("order-first flex-wrap gap-1", className)}
+ {...props}
+ />
+);
+
+export type PromptInputFooterProps = Omit<
+ ComponentProps<typeof InputGroupAddon>,
+ "align"
+>;
+
+export const PromptInputFooter = ({
+ className,
+ ...props
+}: PromptInputFooterProps) => (
+ <InputGroupAddon
+ align="block-end"
+ className={cn("justify-between gap-1", className)}
+ {...props}
+ />
+);
+
+export type PromptInputToolsProps = HTMLAttributes<HTMLDivElement>;
+
+export const PromptInputTools = ({
+ className,
+ ...props
+}: PromptInputToolsProps) => (
+ <div className={cn("flex items-center gap-1", className)} {...props} />
+);
+
+export type PromptInputButtonProps = ComponentProps<typeof InputGroupButton>;
+
+export const PromptInputButton = ({
+ variant = "ghost",
+ className,
+ size,
+ ...props
+}: PromptInputButtonProps) => {
+ const newSize =
+ size ?? (Children.count(props.children) > 1 ? "sm" : "icon-sm");
+
+ return (
+ <InputGroupButton
+ className={cn(className)}
+ size={newSize}
+ type="button"
+ variant={variant}
+ {...props}
+ />
+ );
+};
+
+export type PromptInputActionMenuProps = ComponentProps<typeof DropdownMenu>;
+export const PromptInputActionMenu = (props: PromptInputActionMenuProps) => (
+ <DropdownMenu {...props} />
+);
+
+export type PromptInputActionMenuTriggerProps = PromptInputButtonProps;
+
+export const PromptInputActionMenuTrigger = ({
+ className,
+ children,
+ ...props
+}: PromptInputActionMenuTriggerProps) => (
+ <DropdownMenuTrigger asChild>
+ <PromptInputButton className={className} {...props}>
+ {children ?? <PlusIcon className="size-4" />}
+ </PromptInputButton>
+ </DropdownMenuTrigger>
+);
+
+export type PromptInputActionMenuContentProps = ComponentProps<
+ typeof DropdownMenuContent
+>;
+export const PromptInputActionMenuContent = ({
+ className,
+ ...props
+}: PromptInputActionMenuContentProps) => (
+ <DropdownMenuContent align="start" className={cn(className)} {...props} />
+);
+
+export type PromptInputActionMenuItemProps = ComponentProps<
+ typeof DropdownMenuItem
+>;
+export const PromptInputActionMenuItem = ({
+ className,
+ ...props
+}: PromptInputActionMenuItemProps) => (
+ <DropdownMenuItem className={cn(className)} {...props} />
+);
+
+// Note: Actions that perform side-effects (like opening a file dialog)
+// are provided in opt-in modules (e.g., prompt-input-attachments).
+
+export type PromptInputSubmitProps = ComponentProps<typeof InputGroupButton> & {
+ status?: ChatStatus;
+};
+
+export const PromptInputSubmit = ({
+ className,
+ variant = "default",
+ size = "icon-sm",
+ status,
+ children,
+ ...props
+}: PromptInputSubmitProps) => {
+ let Icon = <CornerDownLeftIcon className="size-4" />;
+
+ if (status === "submitted") {
+ Icon = <Loader2Icon className="size-4 animate-spin" />;
+ } else if (status === "streaming") {
+ Icon = <SquareIcon className="size-4" />;
+ } else if (status === "error") {
+ Icon = <XIcon className="size-4" />;
+ }
+
+ return (
+ <InputGroupButton
+ aria-label="Submit"
+ className={cn(className)}
+ size={size}
+ type="submit"
+ variant={variant}
+ {...props}
+ >
+ {children ?? Icon}
+ </InputGroupButton>
+ );
+};
+
+interface SpeechRecognition extends EventTarget {
+ continuous: boolean;
+ interimResults: boolean;
+ lang: string;
+ start(): void;
+ stop(): void;
+ onstart: ((this: SpeechRecognition, ev: Event) => any) | null;
+ onend: ((this: SpeechRecognition, ev: Event) => any) | null;
+ onresult:
+ | ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any)
+ | null;
+ onerror:
+ | ((this: SpeechRecognition, ev: SpeechRecognitionErrorEvent) => any)
+ | null;
+}
+
+interface SpeechRecognitionEvent extends Event {
+ results: SpeechRecognitionResultList;
+ resultIndex: number;
+}
+
+type SpeechRecognitionResultList = {
+ readonly length: number;
+ item(index: number): SpeechRecognitionResult;
+ [index: number]: SpeechRecognitionResult;
+};
+
+type SpeechRecognitionResult = {
+ readonly length: number;
+ item(index: number): SpeechRecognitionAlternative;
+ [index: number]: SpeechRecognitionAlternative;
+ isFinal: boolean;
+};
+
+type SpeechRecognitionAlternative = {
+ transcript: string;
+ confidence: number;
+};
+
+interface SpeechRecognitionErrorEvent extends Event {
+ error: string;
+}
+
+declare global {
+ interface Window {
+ SpeechRecognition: {
+ new (): SpeechRecognition;
+ };
+ webkitSpeechRecognition: {
+ new (): SpeechRecognition;
+ };
+ }
+}
+
+export type PromptInputSpeechButtonProps = ComponentProps<
+ typeof PromptInputButton
+> & {
+ textareaRef?: RefObject<HTMLTextAreaElement | null>;
+ onTranscriptionChange?: (text: string) => void;
+};
+
+export const PromptInputSpeechButton = ({
+ className,
+ textareaRef,
+ onTranscriptionChange,
+ ...props
+}: PromptInputSpeechButtonProps) => {
+ const [isListening, setIsListening] = useState(false);
+ const [recognition, setRecognition] = useState<SpeechRecognition | null>(
+ null
+ );
+ const recognitionRef = useRef<SpeechRecognition | null>(null);
+
+ useEffect(() => {
+ if (
+ typeof window !== "undefined" &&
+ ("SpeechRecognition" in window || "webkitSpeechRecognition" in window)
+ ) {
+ const SpeechRecognition =
+ window.SpeechRecognition || window.webkitSpeechRecognition;
+ const speechRecognition = new SpeechRecognition();
+
+ speechRecognition.continuous = true;
+ speechRecognition.interimResults = true;
+ speechRecognition.lang = "en-US";
+
+ speechRecognition.onstart = () => {
+ setIsListening(true);
+ };
+
+ speechRecognition.onend = () => {
+ setIsListening(false);
+ };
+
+ speechRecognition.onresult = (event) => {
+ let finalTranscript = "";
+
+ for (let i = event.resultIndex; i < event.results.length; i++) {
+ const result = event.results[i];
+ if (result.isFinal) {
+ finalTranscript += result[0]?.transcript ?? "";
+ }
+ }
+
+ if (finalTranscript && textareaRef?.current) {
+ const textarea = textareaRef.current;
+ const currentValue = textarea.value;
+ const newValue =
+ currentValue + (currentValue ? " " : "") + finalTranscript;
+
+ textarea.value = newValue;
+ textarea.dispatchEvent(new Event("input", { bubbles: true }));
+ onTranscriptionChange?.(newValue);
+ }
+ };
+
+ speechRecognition.onerror = (event) => {
+ console.error("Speech recognition error:", event.error);
+ setIsListening(false);
+ };
+
+ recognitionRef.current = speechRecognition;
+ setRecognition(speechRecognition);
+ }
+
+ return () => {
+ if (recognitionRef.current) {
+ recognitionRef.current.stop();
+ }
+ };
+ }, [textareaRef, onTranscriptionChange]);
+
+ const toggleListening = useCallback(() => {
+ if (!recognition) {
+ return;
+ }
+
+ if (isListening) {
+ recognition.stop();
+ } else {
+ recognition.start();
+ }
+ }, [recognition, isListening]);
+
+ return (
+ <PromptInputButton
+ className={cn(
+ "relative transition-all duration-200",
+ isListening && "animate-pulse bg-accent text-accent-foreground",
+ className
+ )}
+ disabled={!recognition}
+ onClick={toggleListening}
+ {...props}
+ >
+ <MicIcon className="size-4" />
+ </PromptInputButton>
+ );
+};
+
+export type PromptInputSelectProps = ComponentProps<typeof Select>;
+
+export const PromptInputSelect = (props: PromptInputSelectProps) => (
+ <Select {...props} />
+);
+
+export type PromptInputSelectTriggerProps = ComponentProps<
+ typeof SelectTrigger
+>;
+
+export const PromptInputSelectTrigger = ({
+ className,
+ ...props
+}: PromptInputSelectTriggerProps) => (
+ <SelectTrigger
+ className={cn(
+ "border-none bg-transparent font-medium text-muted-foreground shadow-none transition-colors",
+ "hover:bg-accent hover:text-foreground aria-expanded:bg-accent aria-expanded:text-foreground",
+ className
+ )}
+ {...props}
+ />
+);
+
+export type PromptInputSelectContentProps = ComponentProps<
+ typeof SelectContent
+>;
+
+export const PromptInputSelectContent = ({
+ className,
+ ...props
+}: PromptInputSelectContentProps) => (
+ <SelectContent className={cn(className)} {...props} />
+);
+
+export type PromptInputSelectItemProps = ComponentProps<typeof SelectItem>;
+
+export const PromptInputSelectItem = ({
+ className,
+ ...props
+}: PromptInputSelectItemProps) => (
+ <SelectItem className={cn(className)} {...props} />
+);
+
+export type PromptInputSelectValueProps = ComponentProps<typeof SelectValue>;
+
+export const PromptInputSelectValue = ({
+ className,
+ ...props
+}: PromptInputSelectValueProps) => (
+ <SelectValue className={cn(className)} {...props} />
+);
+
+export type PromptInputHoverCardProps = ComponentProps<typeof HoverCard>;
+
+export const PromptInputHoverCard = ({
+ openDelay = 0,
+ closeDelay = 0,
+ ...props
+}: PromptInputHoverCardProps) => (
+ <HoverCard closeDelay={closeDelay} openDelay={openDelay} {...props} />
+);
+
+export type PromptInputHoverCardTriggerProps = ComponentProps<
+ typeof HoverCardTrigger
+>;
+
+export const PromptInputHoverCardTrigger = (
+ props: PromptInputHoverCardTriggerProps
+) => <HoverCardTrigger {...props} />;
+
+export type PromptInputHoverCardContentProps = ComponentProps<
+ typeof HoverCardContent
+>;
+
+export const PromptInputHoverCardContent = ({
+ align = "start",
+ ...props
+}: PromptInputHoverCardContentProps) => (
+ <HoverCardContent align={align} {...props} />
+);
+
+export type PromptInputTabsListProps = HTMLAttributes<HTMLDivElement>;
+
+export const PromptInputTabsList = ({
+ className,
+ ...props
+}: PromptInputTabsListProps) => <div className={cn(className)} {...props} />;
+
+export type PromptInputTabProps = HTMLAttributes<HTMLDivElement>;
+
+export const PromptInputTab = ({
+ className,
+ ...props
+}: PromptInputTabProps) => <div className={cn(className)} {...props} />;
+
+export type PromptInputTabLabelProps = HTMLAttributes<HTMLHeadingElement>;
+
+export const PromptInputTabLabel = ({
+ className,
+ ...props
+}: PromptInputTabLabelProps) => (
+ <h3
+ className={cn(
+ "mb-2 px-3 font-medium text-muted-foreground text-xs",
+ className
+ )}
+ {...props}
+ />
+);
+
+export type PromptInputTabBodyProps = HTMLAttributes<HTMLDivElement>;
+
+export const PromptInputTabBody = ({
+ className,
+ ...props
+}: PromptInputTabBodyProps) => (
+ <div className={cn("space-y-1", className)} {...props} />
+);
+
+export type PromptInputTabItemProps = HTMLAttributes<HTMLDivElement>;
+
+export const PromptInputTabItem = ({
+ className,
+ ...props
+}: PromptInputTabItemProps) => (
+ <div
+ className={cn(
+ "flex items-center gap-2 px-3 py-2 text-xs hover:bg-accent",
+ className
+ )}
+ {...props}
+ />
+);
+
+export type PromptInputCommandProps = ComponentProps<typeof Command>;
+
+export const PromptInputCommand = ({
+ className,
+ ...props
+}: PromptInputCommandProps) => <Command className={cn(className)} {...props} />;
+
+export type PromptInputCommandInputProps = ComponentProps<typeof CommandInput>;
+
+export const PromptInputCommandInput = ({
+ className,
+ ...props
+}: PromptInputCommandInputProps) => (
+ <CommandInput className={cn(className)} {...props} />
+);
+
+export type PromptInputCommandListProps = ComponentProps<typeof CommandList>;
+
+export const PromptInputCommandList = ({
+ className,
+ ...props
+}: PromptInputCommandListProps) => (
+ <CommandList className={cn(className)} {...props} />
+);
+
+export type PromptInputCommandEmptyProps = ComponentProps<typeof CommandEmpty>;
+
+export const PromptInputCommandEmpty = ({
+ className,
+ ...props
+}: PromptInputCommandEmptyProps) => (
+ <CommandEmpty className={cn(className)} {...props} />
+);
+
+export type PromptInputCommandGroupProps = ComponentProps<typeof CommandGroup>;
+
+export const PromptInputCommandGroup = ({
+ className,
+ ...props
+}: PromptInputCommandGroupProps) => (
+ <CommandGroup className={cn(className)} {...props} />
+);
+
+export type PromptInputCommandItemProps = ComponentProps<typeof CommandItem>;
+
+export const PromptInputCommandItem = ({
+ className,
+ ...props
+}: PromptInputCommandItemProps) => (
+ <CommandItem className={cn(className)} {...props} />
+);
+
+export type PromptInputCommandSeparatorProps = ComponentProps<
+ typeof CommandSeparator
+>;
+
+export const PromptInputCommandSeparator = ({
+ className,
+ ...props
+}: PromptInputCommandSeparatorProps) => (
+ <CommandSeparator className={cn(className)} {...props} />
+);
diff --git a/components/ai-elements/shimmer.tsx b/components/ai-elements/shimmer.tsx
new file mode 100644
index 00000000..9163aac4
--- /dev/null
+++ b/components/ai-elements/shimmer.tsx
@@ -0,0 +1,64 @@
+"use client";
+
+import { cn } from "@/lib/utils";
+import { motion } from "motion/react";
+import {
+ type CSSProperties,
+ type ElementType,
+ type JSX,
+ memo,
+ useMemo,
+} from "react";
+
+export type TextShimmerProps = {
+ children: string;
+ as?: ElementType;
+ className?: string;
+ duration?: number;
+ spread?: number;
+};
+
+const ShimmerComponent = ({
+ children,
+ as: Component = "p",
+ className,
+ duration = 2,
+ spread = 2,
+}: TextShimmerProps) => {
+ const MotionComponent = motion.create(
+ Component as keyof JSX.IntrinsicElements
+ );
+
+ const dynamicSpread = useMemo(
+ () => (children?.length ?? 0) * spread,
+ [children, spread]
+ );
+
+ return (
+ <MotionComponent
+ animate={{ backgroundPosition: "0% center" }}
+ className={cn(
+ "relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent",
+ "[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]",
+ className
+ )}
+ initial={{ backgroundPosition: "100% center" }}
+ style={
+ {
+ "--spread": `${dynamicSpread}px`,
+ backgroundImage:
+ "var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))",
+ } as CSSProperties
+ }
+ transition={{
+ repeat: Number.POSITIVE_INFINITY,
+ duration,
+ ease: "linear",
+ }}
+ >
+ {children}
+ </MotionComponent>
+ );
+};
+
+export const Shimmer = memo(ShimmerComponent);
diff --git a/components/documents/document-header.tsx b/components/documents/document-header.tsx
index 77cff99c..8878d798 100644
--- a/components/documents/document-header.tsx
+++ b/components/documents/document-header.tsx
@@ -9,6 +9,7 @@ import { Document, DocumentVersion } from "@prisma/client";
import {
ArrowRightIcon,
BetweenHorizontalStartIcon,
+ Bot,
ChevronRight,
CloudDownloadIcon,
DownloadIcon,
@@ -25,9 +26,11 @@ import { useTheme } from "next-themes";
import { toast } from "sonner";
import { mutate } from "swr";
+import { DocumentAIDialog } from "@/ee/features/ai/components/document-ai-dialog";
import { getFile } from "@/lib/files/get-file";
import { usePlan } from "@/lib/swr/use-billing";
import useDatarooms from "@/lib/swr/use-datarooms";
+import { useTeamAI } from "@/lib/swr/use-team-ai";
import {
DocumentWithLinksAndLinkCountAndViewCount,
DocumentWithVersion,
@@ -83,6 +86,7 @@ export default function DocumentHeader({
const isLight =
theme === "light" || (theme === "system" && systemTheme === "light");
const { isPro, isFree, isTrial, isBusiness, isDatarooms } = usePlan();
+ const { canUseAI, isAIEnabled } = useTeamAI();
const [isEditingName, setIsEditingName] = useState<boolean>(false);
const [menuOpen, setMenuOpen] = useState<boolean>(false);
const [isFirstClick, setIsFirstClick] = useState<boolean>(false);
@@ -94,6 +98,7 @@ export default function DocumentHeader({
const [planModalTrigger, setPlanModalTrigger] = useState<string>("");
const [selectedPlan, setSelectedPlan] = useState<PlanEnum>(PlanEnum.Pro);
const [exportModalOpen, setExportModalOpen] = useState<boolean>(false);
+ const [aiDialogOpen, setAiDialogOpen] = useState<boolean>(false);
const nameRef = useRef<HTMLHeadingElement>(null);
const enterPressedRef = useRef<boolean>(false);
const dropdownRef = useRef<HTMLDivElement | null>(null);
@@ -735,6 +740,25 @@ export default function DocumentHeader({
</DropdownMenuItem>
)}
+ {/* AI Agents - only show when team has AI enabled */}
+ {isAIEnabled &&
+ prismaDocument.type !== "notion" &&
+ prismaDocument.type !== "sheet" &&
+ prismaDocument.type !== "zip" &&
+ primaryVersion.type !== "video" && (
+ <DropdownMenuItem
+ onClick={() => {
+ setAiDialogOpen(true);
+ setMenuOpen(false);
+ }}
+ >
+ <Bot className="mr-2 h-4 w-4" />
+ {prismaDocument.agentsEnabled
+ ? "AI Agents Settings"
+ : "Enable AI Agents"}
+ </DropdownMenuItem>
+ )}
+
{primaryVersion.type !== "notion" &&
primaryVersion.type !== "zip" &&
primaryVersion.type !== "map" &&
@@ -982,6 +1006,16 @@ export default function DocumentHeader({
onClose={() => setExportModalOpen(false)}
/>
)}
+
+ {/* AI Agents Dialog */}
+ <DocumentAIDialog
+ open={aiDialogOpen}
+ onOpenChange={setAiDialogOpen}
+ documentId={prismaDocument.id}
+ teamId={teamId}
+ agentsEnabled={prismaDocument.agentsEnabled}
+ vectorStoreFileId={primaryVersion.vectorStoreFileId}
+ />
</header>
);
}
diff --git a/components/links/link-sheet/ai-agents-section.tsx b/components/links/link-sheet/ai-agents-section.tsx
new file mode 100644
index 00000000..7690566f
--- /dev/null
+++ b/components/links/link-sheet/ai-agents-section.tsx
@@ -0,0 +1,69 @@
+import { useEffect, useState } from "react";
+
+import { useFeatureFlags } from "@/lib/hooks/use-feature-flags";
+
+import { DEFAULT_LINK_TYPE } from "@/components/links/link-sheet";
+import LinkItem from "@/components/links/link-sheet/link-item";
+
+import { LinkUpgradeOptions } from "./link-options";
+
+export default function AIAgentsSection({
+ data,
+ setData,
+ isAllowed,
+ handleUpgradeStateChange,
+}: {
+ data: DEFAULT_LINK_TYPE;
+ setData: React.Dispatch<React.SetStateAction<DEFAULT_LINK_TYPE>>;
+ isAllowed: boolean;
+ handleUpgradeStateChange: ({
+ state,
+ trigger,
+ plan,
+ }: LinkUpgradeOptions) => void;
+}) {
+ const { isFeatureEnabled, isLoading: featuresLoading } = useFeatureFlags();
+ const isAIFeatureEnabled = isFeatureEnabled("ai");
+
+ const { enableAIAgents } = data;
+ const [enabled, setEnabled] = useState<boolean>(false);
+
+ useEffect(() => {
+ setEnabled(enableAIAgents);
+ }, [enableAIAgents]);
+
+ const handleToggle = async () => {
+ const updatedState = !enabled;
+
+ setData({
+ ...data,
+ enableAIAgents: updatedState,
+ });
+ setEnabled(updatedState);
+ };
+
+ // Don't render if feature flags are still loading or AI feature is not enabled
+ if (featuresLoading || !isAIFeatureEnabled) {
+ return null;
+ }
+
+ return (
+ <div className="pb-5">
+ <LinkItem
+ title="AI Agents"
+ enabled={enabled}
+ action={handleToggle}
+ isAllowed={isAllowed}
+ requiredPlan="Business"
+ upgradeAction={() =>
+ handleUpgradeStateChange({
+ state: true,
+ trigger: "link_sheet_ai_agents",
+ plan: "Business",
+ })
+ }
+ tooltipContent="Allow visitors to chat with AI about this document or dataroom. Requires AI to be enabled at the team and document/dataroom level."
+ />
+ </div>
+ );
+}
diff --git a/components/links/link-sheet/index.tsx b/components/links/link-sheet/index.tsx
index 10415c8d..d4dba5af 100644
--- a/components/links/link-sheet/index.tsx
+++ b/components/links/link-sheet/index.tsx
@@ -86,6 +86,7 @@ export const DEFAULT_LINK_PROPS = (
customFields: [],
tags: [],
enableConversation: false,
+ enableAIAgents: false,
enableUpload: false,
isFileRequestOnly: false,
uploadFolderId: null,
@@ -129,6 +130,7 @@ export type DEFAULT_LINK_TYPE = {
customFields: CustomFieldData[];
tags: string[];
enableConversation: boolean;
+ enableAIAgents: boolean;
enableUpload: boolean;
isFileRequestOnly: boolean;
uploadFolderId: string | null;
diff --git a/components/links/link-sheet/link-options.tsx b/components/links/link-sheet/link-options.tsx
index 1a16a802..c26e29bd 100644
--- a/components/links/link-sheet/link-options.tsx
+++ b/components/links/link-sheet/link-options.tsx
@@ -29,6 +29,7 @@ import {
} from "@/components/ui/collapsible";
import AgreementSection from "./agreement-section";
+import AIAgentsSection from "./ai-agents-section";
import ConversationSection from "./conversation-section";
import CustomFieldsSection from "./custom-fields-section";
import IndexFileSection from "./index-file-section";
@@ -249,43 +250,53 @@ export const LinkOptions = ({
</div>
</CollapsibleSection>
- {/* Advanced Section - Only for Datarooms */}
- {linkType === LinkType.DATAROOM_LINK ? (
- <CollapsibleSection title="Advanced Controls" defaultOpen={true}>
- <div>
- {targetId ? (
- <UploadSection
- {...{ data, setData }}
- isAllowed={
- isTrial ||
- isDataroomsPlus ||
- (isDatarooms && limits?.dataroomUpload === true)
- }
- handleUpgradeStateChange={handleUpgradeStateChange}
- targetId={targetId}
- />
- ) : null}
+ {/* Advanced Section */}
+ <CollapsibleSection title="Advanced Controls" defaultOpen={true}>
+ <div>
+ {/* AI Agents - Available for both document and dataroom links */}
+ <AIAgentsSection
+ {...{ data, setData }}
+ isAllowed={isTrial || isBusiness || isDatarooms || isDataroomsPlus}
+ handleUpgradeStateChange={handleUpgradeStateChange}
+ />
- <IndexFileSection
- {...{ data, setData }}
- isAllowed={isTrial || isDataroomsPlus}
- handleUpgradeStateChange={handleUpgradeStateChange}
- />
+ {/* Dataroom-specific options */}
+ {linkType === LinkType.DATAROOM_LINK ? (
+ <>
+ {targetId ? (
+ <UploadSection
+ {...{ data, setData }}
+ isAllowed={
+ isTrial ||
+ isDataroomsPlus ||
+ (isDatarooms && limits?.dataroomUpload === true)
+ }
+ handleUpgradeStateChange={handleUpgradeStateChange}
+ targetId={targetId}
+ />
+ ) : null}
- {limits?.conversationsInDataroom ? (
- <ConversationSection
+ <IndexFileSection
{...{ data, setData }}
- isAllowed={
- isDataroomsPlus ||
- ((isBusiness || isDatarooms) &&
- limits?.conversationsInDataroom)
- }
+ isAllowed={isTrial || isDataroomsPlus}
handleUpgradeStateChange={handleUpgradeStateChange}
/>
- ) : null}
- </div>
- </CollapsibleSection>
- ) : null}
+
+ {limits?.conversationsInDataroom ? (
+ <ConversationSection
+ {...{ data, setData }}
+ isAllowed={
+ isDataroomsPlus ||
+ ((isBusiness || isDatarooms) &&
+ limits?.conversationsInDataroom)
+ }
+ handleUpgradeStateChange={handleUpgradeStateChange}
+ />
+ ) : null}
+ </>
+ ) : null}
+ </div>
+ </CollapsibleSection>
<UpgradePlanModal
clickedPlan={upgradePlan}
diff --git a/components/links/links-table.tsx b/components/links/links-table.tsx
index 2c73bf1d..42a61624 100644
--- a/components/links/links-table.tsx
+++ b/components/links/links-table.tsx
@@ -250,6 +250,7 @@ export default function LinksTable({
enableIndexFile: link.enableIndexFile ?? false,
permissionGroupId: link.permissionGroupId ?? null,
welcomeMessage: link.welcomeMessage ?? null,
+ enableAIAgents: link.enableAIAgents ?? false,
});
//wait for dropdown to close before opening the link sheet
setTimeout(() => {
diff --git a/components/settings/settings-header.tsx b/components/settings/settings-header.tsx
index 8c974fc2..4b1052b5 100644
--- a/components/settings/settings-header.tsx
+++ b/components/settings/settings-header.tsx
@@ -1,21 +1,9 @@
-import { useTeam } from "@/context/team-context";
-import useSWR from "swr";
-
-import { fetcher } from "@/lib/utils";
+import { useFeatureFlags } from "@/lib/hooks/use-feature-flags";
import { NavMenu } from "../navigation-menu";
export function SettingsHeader() {
- const teamInfo = useTeam();
- const { data: features } = useSWR<{
- tokens: boolean;
- incomingWebhooks: boolean;
- }>(
- teamInfo?.currentTeam?.id
- ? `/api/feature-flags?teamId=${teamInfo.currentTeam.id}`
- : null,
- fetcher,
- );
+ const { features } = useFeatureFlags();
return (
<header>
@@ -72,6 +60,12 @@ export function SettingsHeader() {
href: `/settings/slack`,
segment: "slack",
},
+ {
+ label: "AI",
+ href: `/settings/ai`,
+ segment: "ai",
+ disabled: !features?.ai,
+ },
{
label: "Tokens",
href: `/settings/tokens`,
diff --git a/components/ui/button-group.tsx b/components/ui/button-group.tsx
new file mode 100644
index 00000000..d6e78014
--- /dev/null
+++ b/components/ui/button-group.tsx
@@ -0,0 +1,83 @@
+import { Slot } from "@radix-ui/react-slot"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+import { Separator } from "@/components/ui/separator"
+
+const buttonGroupVariants = cva(
+ "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
+ {
+ variants: {
+ orientation: {
+ horizontal:
+ "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
+ vertical:
+ "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none",
+ },
+ },
+ defaultVariants: {
+ orientation: "horizontal",
+ },
+ }
+)
+
+function ButtonGroup({
+ className,
+ orientation,
+ ...props
+}: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>) {
+ return (
+ <div
+ role="group"
+ data-slot="button-group"
+ data-orientation={orientation}
+ className={cn(buttonGroupVariants({ orientation }), className)}
+ {...props}
+ />
+ )
+}
+
+function ButtonGroupText({
+ className,
+ asChild = false,
+ ...props
+}: React.ComponentProps<"div"> & {
+ asChild?: boolean
+}) {
+ const Comp = asChild ? Slot : "div"
+
+ return (
+ <Comp
+ className={cn(
+ "bg-muted shadow-xs flex items-center gap-2 rounded-md border px-4 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function ButtonGroupSeparator({
+ className,
+ orientation = "vertical",
+ ...props
+}: React.ComponentProps<typeof Separator>) {
+ return (
+ <Separator
+ data-slot="button-group-separator"
+ orientation={orientation}
+ className={cn(
+ "bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+export {
+ ButtonGroup,
+ ButtonGroupSeparator,
+ ButtonGroupText,
+ buttonGroupVariants,
+}
diff --git a/components/ui/carousel.tsx b/components/ui/carousel.tsx
new file mode 100644
index 00000000..9c2b9bf3
--- /dev/null
+++ b/components/ui/carousel.tsx
@@ -0,0 +1,260 @@
+import * as React from "react"
+import useEmblaCarousel, {
+ type UseEmblaCarouselType,
+} from "embla-carousel-react"
+import { ArrowLeft, ArrowRight } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+import { Button } from "@/components/ui/button"
+
+type CarouselApi = UseEmblaCarouselType[1]
+type UseCarouselParameters = Parameters<typeof useEmblaCarousel>
+type CarouselOptions = UseCarouselParameters[0]
+type CarouselPlugin = UseCarouselParameters[1]
+
+type CarouselProps = {
+ opts?: CarouselOptions
+ plugins?: CarouselPlugin
+ orientation?: "horizontal" | "vertical"
+ setApi?: (api: CarouselApi) => void
+}
+
+type CarouselContextProps = {
+ carouselRef: ReturnType<typeof useEmblaCarousel>[0]
+ api: ReturnType<typeof useEmblaCarousel>[1]
+ scrollPrev: () => void
+ scrollNext: () => void
+ canScrollPrev: boolean
+ canScrollNext: boolean
+} & CarouselProps
+
+const CarouselContext = React.createContext<CarouselContextProps | null>(null)
+
+function useCarousel() {
+ const context = React.useContext(CarouselContext)
+
+ if (!context) {
+ throw new Error("useCarousel must be used within a <Carousel />")
+ }
+
+ return context
+}
+
+const Carousel = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement> & CarouselProps
+>(
+ (
+ {
+ orientation = "horizontal",
+ opts,
+ setApi,
+ plugins,
+ className,
+ children,
+ ...props
+ },
+ ref
+ ) => {
+ const [carouselRef, api] = useEmblaCarousel(
+ {
+ ...opts,
+ axis: orientation === "horizontal" ? "x" : "y",
+ },
+ plugins
+ )
+ const [canScrollPrev, setCanScrollPrev] = React.useState(false)
+ const [canScrollNext, setCanScrollNext] = React.useState(false)
+
+ const onSelect = React.useCallback((api: CarouselApi) => {
+ if (!api) {
+ return
+ }
+
+ setCanScrollPrev(api.canScrollPrev())
+ setCanScrollNext(api.canScrollNext())
+ }, [])
+
+ const scrollPrev = React.useCallback(() => {
+ api?.scrollPrev()
+ }, [api])
+
+ const scrollNext = React.useCallback(() => {
+ api?.scrollNext()
+ }, [api])
+
+ const handleKeyDown = React.useCallback(
+ (event: React.KeyboardEvent<HTMLDivElement>) => {
+ if (event.key === "ArrowLeft") {
+ event.preventDefault()
+ scrollPrev()
+ } else if (event.key === "ArrowRight") {
+ event.preventDefault()
+ scrollNext()
+ }
+ },
+ [scrollPrev, scrollNext]
+ )
+
+ React.useEffect(() => {
+ if (!api || !setApi) {
+ return
+ }
+
+ setApi(api)
+ }, [api, setApi])
+
+ React.useEffect(() => {
+ if (!api) {
+ return
+ }
+
+ onSelect(api)
+ api.on("reInit", onSelect)
+ api.on("select", onSelect)
+
+ return () => {
+ api?.off("select", onSelect)
+ }
+ }, [api, onSelect])
+
+ return (
+ <CarouselContext.Provider
+ value={{
+ carouselRef,
+ api: api,
+ opts,
+ orientation:
+ orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
+ scrollPrev,
+ scrollNext,
+ canScrollPrev,
+ canScrollNext,
+ }}
+ >
+ <div
+ ref={ref}
+ onKeyDownCapture={handleKeyDown}
+ className={cn("relative", className)}
+ role="region"
+ aria-roledescription="carousel"
+ {...props}
+ >
+ {children}
+ </div>
+ </CarouselContext.Provider>
+ )
+ }
+)
+Carousel.displayName = "Carousel"
+
+const CarouselContent = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => {
+ const { carouselRef, orientation } = useCarousel()
+
+ return (
+ <div ref={carouselRef} className="overflow-hidden">
+ <div
+ ref={ref}
+ className={cn(
+ "flex",
+ orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
+ className
+ )}
+ {...props}
+ />
+ </div>
+ )
+})
+CarouselContent.displayName = "CarouselContent"
+
+const CarouselItem = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => {
+ const { orientation } = useCarousel()
+
+ return (
+ <div
+ ref={ref}
+ role="group"
+ aria-roledescription="slide"
+ className={cn(
+ "min-w-0 shrink-0 grow-0 basis-full",
+ orientation === "horizontal" ? "pl-4" : "pt-4",
+ className
+ )}
+ {...props}
+ />
+ )
+})
+CarouselItem.displayName = "CarouselItem"
+
+const CarouselPrevious = React.forwardRef<
+ HTMLButtonElement,
+ React.ComponentProps<typeof Button>
+>(({ className, variant = "outline", size = "icon", ...props }, ref) => {
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel()
+
+ return (
+ <Button
+ ref={ref}
+ variant={variant}
+ size={size}
+ className={cn(
+ "absolute h-8 w-8 rounded-full",
+ orientation === "horizontal"
+ ? "-left-12 top-1/2 -translate-y-1/2"
+ : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
+ className
+ )}
+ disabled={!canScrollPrev}
+ onClick={scrollPrev}
+ {...props}
+ >
+ <ArrowLeft className="h-4 w-4" />
+ <span className="sr-only">Previous slide</span>
+ </Button>
+ )
+})
+CarouselPrevious.displayName = "CarouselPrevious"
+
+const CarouselNext = React.forwardRef<
+ HTMLButtonElement,
+ React.ComponentProps<typeof Button>
+>(({ className, variant = "outline", size = "icon", ...props }, ref) => {
+ const { orientation, scrollNext, canScrollNext } = useCarousel()
+
+ return (
+ <Button
+ ref={ref}
+ variant={variant}
+ size={size}
+ className={cn(
+ "absolute h-8 w-8 rounded-full",
+ orientation === "horizontal"
+ ? "-right-12 top-1/2 -translate-y-1/2"
+ : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
+ className
+ )}
+ disabled={!canScrollNext}
+ onClick={scrollNext}
+ {...props}
+ >
+ <ArrowRight className="h-4 w-4" />
+ <span className="sr-only">Next slide</span>
+ </Button>
+ )
+})
+CarouselNext.displayName = "CarouselNext"
+
+export {
+ type CarouselApi,
+ Carousel,
+ CarouselContent,
+ CarouselItem,
+ CarouselPrevious,
+ CarouselNext,
+}
diff --git a/components/ui/hover-card.tsx b/components/ui/hover-card.tsx
new file mode 100644
index 00000000..95643d9c
--- /dev/null
+++ b/components/ui/hover-card.tsx
@@ -0,0 +1,27 @@
+import * as React from "react"
+import * as HoverCardPrimitive from "@radix-ui/react-hover-card"
+
+import { cn } from "@/lib/utils"
+
+const HoverCard = HoverCardPrimitive.Root
+
+const HoverCardTrigger = HoverCardPrimitive.Trigger
+
+const HoverCardContent = React.forwardRef<
+ React.ElementRef<typeof HoverCardPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
+>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
+ <HoverCardPrimitive.Content
+ ref={ref}
+ align={align}
+ sideOffset={sideOffset}
+ className={cn(
+ "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]",
+ className
+ )}
+ {...props}
+ />
+))
+HoverCardContent.displayName = HoverCardPrimitive.Content.displayName
+
+export { HoverCard, HoverCardTrigger, HoverCardContent }
diff --git a/components/ui/input-group.tsx b/components/ui/input-group.tsx
new file mode 100644
index 00000000..1233eff8
--- /dev/null
+++ b/components/ui/input-group.tsx
@@ -0,0 +1,168 @@
+import * as React from "react"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+import { Button } from "@/components/ui/button"
+import { Input } from "@/components/ui/input"
+import { Textarea } from "@/components/ui/textarea"
+
+function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="input-group"
+ role="group"
+ className={cn(
+ "group/input-group border-input dark:bg-input/30 shadow-xs relative flex w-full items-center rounded-md border outline-none transition-[color,box-shadow]",
+ "h-9 has-[>textarea]:h-auto",
+
+ // Variants based on alignment.
+ "has-[>[data-align=inline-start]]:[&>input]:pl-2",
+ "has-[>[data-align=inline-end]]:[&>input]:pr-2",
+ "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
+ "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
+
+ // Focus state.
+ "has-[[data-slot=input-group-control]:focus-visible]:ring-ring has-[[data-slot=input-group-control]:focus-visible]:ring-1",
+
+ // Error state.
+ "has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
+
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+const inputGroupAddonVariants = cva(
+ "text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
+ {
+ variants: {
+ align: {
+ "inline-start":
+ "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
+ "inline-end":
+ "order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]",
+ "block-start":
+ "[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5",
+ "block-end":
+ "[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5",
+ },
+ },
+ defaultVariants: {
+ align: "inline-start",
+ },
+ }
+)
+
+function InputGroupAddon({
+ className,
+ align = "inline-start",
+ ...props
+}: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) {
+ return (
+ <div
+ role="group"
+ data-slot="input-group-addon"
+ data-align={align}
+ className={cn(inputGroupAddonVariants({ align }), className)}
+ onClick={(e) => {
+ if ((e.target as HTMLElement).closest("button")) {
+ return
+ }
+ e.currentTarget.parentElement?.querySelector("input")?.focus()
+ }}
+ {...props}
+ />
+ )
+}
+
+const inputGroupButtonVariants = cva(
+ "flex items-center gap-2 text-sm shadow-none",
+ {
+ variants: {
+ size: {
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
+ sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
+ "icon-xs":
+ "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0",
+ },
+ },
+ defaultVariants: {
+ size: "xs",
+ },
+ }
+)
+
+function InputGroupButton({
+ className,
+ type = "button",
+ variant = "ghost",
+ size = "xs",
+ ...props
+}: Omit<React.ComponentProps<typeof Button>, "size"> &
+ VariantProps<typeof inputGroupButtonVariants>) {
+ return (
+ <Button
+ type={type}
+ data-size={size}
+ variant={variant}
+ className={cn(inputGroupButtonVariants({ size }), className)}
+ {...props}
+ />
+ )
+}
+
+function InputGroupText({ className, ...props }: React.ComponentProps<"span">) {
+ return (
+ <span
+ className={cn(
+ "text-muted-foreground flex items-center gap-2 text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function InputGroupInput({
+ className,
+ ...props
+}: React.ComponentProps<"input">) {
+ return (
+ <Input
+ data-slot="input-group-control"
+ className={cn(
+ "flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function InputGroupTextarea({
+ className,
+ ...props
+}: React.ComponentProps<"textarea">) {
+ return (
+ <Textarea
+ data-slot="input-group-control"
+ className={cn(
+ "flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+export {
+ InputGroup,
+ InputGroupAddon,
+ InputGroupButton,
+ InputGroupText,
+ InputGroupInput,
+ InputGroupTextarea,
+}
diff --git a/components/view/dataroom/dataroom-document-view.tsx b/components/view/dataroom/dataroom-document-view.tsx
index ad23159d..47b0a1bb 100644
--- a/components/view/dataroom/dataroom-document-view.tsx
+++ b/components/view/dataroom/dataroom-document-view.tsx
@@ -59,6 +59,8 @@ export type DEFAULT_DATAROOM_DOCUMENT_VIEW_TYPE = {
viewerId?: string;
conversationsEnabled?: boolean;
isTeamMember?: boolean;
+ agentsEnabled?: boolean;
+ dataroomName?: string;
};
export default function DataroomDocumentView({
@@ -180,6 +182,8 @@ export default function DataroomDocumentView({
viewerId,
conversationsEnabled,
isTeamMember,
+ agentsEnabled,
+ dataroomName,
} = fetchData as DEFAULT_DATAROOM_DOCUMENT_VIEW_TYPE;
analytics.identify(
userEmail ?? viewerEmail ?? verifiedEmail ?? data.email ?? undefined,
@@ -224,6 +228,8 @@ export default function DataroomDocumentView({
viewerId,
conversationsEnabled,
isTeamMember,
+ agentsEnabled,
+ dataroomName,
}));
setSubmitted(true);
setVerificationRequested(false);
diff --git a/components/view/dataroom/dataroom-view.tsx b/components/view/dataroom/dataroom-view.tsx
index 9ef0101d..83091576 100644
--- a/components/view/dataroom/dataroom-view.tsx
+++ b/components/view/dataroom/dataroom-view.tsx
@@ -43,6 +43,8 @@ export type DEFAULT_DATAROOM_VIEW_TYPE = {
conversationsEnabled?: boolean;
enableVisitorUpload?: boolean;
isTeamMember?: boolean;
+ agentsEnabled?: boolean;
+ dataroomName?: string;
};
export default function DataroomView({
@@ -146,6 +148,8 @@ export default function DataroomView({
conversationsEnabled,
enableVisitorUpload,
isTeamMember,
+ agentsEnabled,
+ dataroomName,
} = fetchData as DEFAULT_DATAROOM_VIEW_TYPE;
analytics.identify(
@@ -181,6 +185,8 @@ export default function DataroomView({
conversationsEnabled,
enableVisitorUpload,
isTeamMember,
+ agentsEnabled,
+ dataroomName,
});
setSubmitted(true);
setVerificationRequested(false);
diff --git a/components/view/document-view.tsx b/components/view/document-view.tsx
index d3981233..2b8ae4fd 100644
--- a/components/view/document-view.tsx
+++ b/components/view/document-view.tsx
@@ -45,6 +45,8 @@ export type DEFAULT_DOCUMENT_VIEW_TYPE = {
ipAddress?: string;
verificationToken?: string;
isTeamMember?: boolean;
+ agentsEnabled?: boolean;
+ viewerId?: string;
};
export default function DocumentView({
@@ -157,7 +159,9 @@ export default function DocumentView({
isPreview,
ipAddress,
verificationToken,
+ agentsEnabled,
isTeamMember,
+ viewerId,
} = fetchData as DEFAULT_DOCUMENT_VIEW_TYPE;
analytics.identify(
userEmail ?? verifiedEmail ?? data.email ?? undefined,
@@ -193,6 +197,8 @@ export default function DocumentView({
isPreview,
ipAddress,
isTeamMember,
+ agentsEnabled,
+ viewerId,
});
setSubmitted(true);
setVerificationRequested(false);
diff --git a/components/view/nav.tsx b/components/view/nav.tsx
index 6993dd11..d6336496 100644
--- a/components/view/nav.tsx
+++ b/components/view/nav.tsx
@@ -3,6 +3,7 @@ import { useRouter } from "next/router";
import React, { useEffect, useState } from "react";
+import { useViewerChatSafe } from "@/ee/features/ai/components/viewer-chat-provider";
import { Brand, DataroomBrand } from "@prisma/client";
import {
ArrowUpRight,
@@ -93,6 +94,10 @@ export default function Nav({
const asPath = router.asPath;
const { previewToken, preview } = router.query;
+ // Get chat context to adjust navbar when chat is open
+ const chatContext = useViewerChatSafe();
+ const isChatOpen = chatContext?.isOpen && chatContext?.isEnabled;
+
const {
linkId,
allowDownload,
@@ -193,8 +198,8 @@ export default function Nav({
})();
toast.promise(downloadPromise, {
- loading: hasWatermark
- ? "Preparing download with watermark..."
+ loading: hasWatermark
+ ? "Preparing download with watermark..."
: "Preparing download...",
success: (message) => message,
error: (err) => err.message || "Failed to download file",
@@ -232,6 +237,9 @@ export default function Nav({
className="bg-black"
style={{
backgroundColor: brand && brand.brandColor ? brand.brandColor : "black",
+ // Extend navbar to full width when chat panel is open (counteract parent padding)
+ marginRight: isChatOpen ? "-400px" : undefined,
+ // paddingRight: isChatOpen ? "400px" : undefined,
}}
>
<div className="mx-auto px-2 sm:px-6 lg:px-8">
diff --git a/components/view/view-data.tsx b/components/view/view-data.tsx
index a972629b..24d733b2 100644
--- a/components/view/view-data.tsx
+++ b/components/view/view-data.tsx
@@ -1,5 +1,11 @@
import dynamic from "next/dynamic";
+import { ViewerChatPanel } from "@/ee/features/ai/components/viewer-chat-panel";
+import {
+ ViewerChatLayout,
+ ViewerChatProvider,
+} from "@/ee/features/ai/components/viewer-chat-provider";
+import { ViewerChatToggle } from "@/ee/features/ai/components/viewer-chat-toggle";
import {
Brand,
DataroomBrand,
@@ -104,95 +110,132 @@ export default function ViewData({
// Calculate allowDownload once for all components
- return notionData?.recordMap ? (
- <NotionPage
- recordMap={notionData.recordMap}
- versionNumber={document.versions[0].versionNumber}
- theme={notionData.theme}
- screenshotProtectionEnabled={link.enableScreenshotProtection!}
- navData={navData}
- />
- ) : document.downloadOnly ? (
- <DownloadOnlyViewer
- versionNumber={document.versions[0].versionNumber}
+ // Check if agents are enabled (returned from views API after access is granted)
+ const agentsEnabled =
+ "agentsEnabled" in viewData ? viewData.agentsEnabled : false;
+
+ // Determine dataroom name if applicable
+ const dataroomName =
+ dataroomId && "dataroomName" in viewData
+ ? viewData.dataroomName
+ : undefined;
+
+ return (
+ <ViewerChatProvider
+ enabled={agentsEnabled}
+ documentId={document.id}
documentName={document.name}
- navData={navData}
- />
- ) : viewData.fileType === "sheet" && viewData.sheetData ? (
- <ExcelViewer
- versionNumber={document.versions[0].versionNumber}
- sheetData={viewData.sheetData}
- screenshotProtectionEnabled={link.enableScreenshotProtection!}
- navData={navData}
- />
- ) : viewData.fileType === "sheet" && useAdvancedExcelViewer ? (
- <AdvancedExcelViewer
- file={viewData.file!}
- versionNumber={document.versions[0].versionNumber}
- navData={navData}
- />
- ) : viewData.fileType === "image" ? (
- <ImageViewer
- file={viewData.file!}
- screenshotProtectionEnabled={link.enableScreenshotProtection!}
- versionNumber={document.versions[0].versionNumber}
- showPoweredByBanner={showPoweredByBanner}
- viewerEmail={viewerEmail}
- watermarkConfig={
- link.enableWatermark ? (link.watermarkConfig as WatermarkConfig) : null
- }
- ipAddress={viewData.ipAddress}
- linkName={link.name ?? `Link #${link.id.slice(-5)}`}
- navData={navData}
- />
- ) : viewData.pages && !document.versions[0].isVertical ? (
- <PagesHorizontalViewer
- pages={viewData.pages}
- feedbackEnabled={link.enableFeedback!}
- screenshotProtectionEnabled={link.enableScreenshotProtection!}
- versionNumber={document.versions[0].versionNumber}
- showPoweredByBanner={showPoweredByBanner}
- showAccountCreationSlide={showAccountCreationSlide}
- enableQuestion={link.enableQuestion}
- feedback={link.feedback}
- viewerEmail={viewerEmail}
- watermarkConfig={
- link.enableWatermark ? (link.watermarkConfig as WatermarkConfig) : null
- }
- ipAddress={viewData.ipAddress}
- linkName={link.name ?? `Link #${link.id.slice(-5)}`}
- navData={navData}
- />
- ) : viewData.pages && document.versions[0].isVertical ? (
- <PagesVerticalViewer
- pages={viewData.pages}
- feedbackEnabled={link.enableFeedback!}
- screenshotProtectionEnabled={link.enableScreenshotProtection!}
- versionNumber={document.versions[0].versionNumber}
- showPoweredByBanner={showPoweredByBanner}
- enableQuestion={link.enableQuestion}
- feedback={link.feedback}
- viewerEmail={viewerEmail}
- watermarkConfig={
- link.enableWatermark ? (link.watermarkConfig as WatermarkConfig) : null
- }
- ipAddress={viewData.ipAddress}
- linkName={link.name ?? `Link #${link.id.slice(-5)}`}
- navData={navData}
- />
- ) : viewData.fileType === "video" ? (
- <VideoViewer
- file={viewData.file!}
- screenshotProtectionEnabled={link.enableScreenshotProtection!}
- versionNumber={document.versions[0].versionNumber}
- navData={navData}
- />
- ) : (
- <PDFViewer
- file={viewData.file}
- name={document.name}
- versionNumber={document.versions[0].versionNumber}
- navData={navData}
- />
+ dataroomId={dataroomId}
+ dataroomName={dataroomName}
+ linkId={link.id}
+ viewId={viewData.viewId}
+ viewerId={"viewerId" in viewData ? viewData.viewerId : undefined}
+ // focusedDocumentId={dataroomId ? document.id : undefined}
+ // focusedDocumentName={dataroomId ? document.name : undefined}
+ >
+ <ViewerChatLayout>
+ {notionData?.recordMap ? (
+ <NotionPage
+ recordMap={notionData.recordMap}
+ versionNumber={document.versions[0].versionNumber}
+ theme={notionData.theme}
+ screenshotProtectionEnabled={link.enableScreenshotProtection!}
+ navData={navData}
+ />
+ ) : document.downloadOnly ? (
+ <DownloadOnlyViewer
+ versionNumber={document.versions[0].versionNumber}
+ documentName={document.name}
+ navData={navData}
+ />
+ ) : viewData.fileType === "sheet" && viewData.sheetData ? (
+ <ExcelViewer
+ versionNumber={document.versions[0].versionNumber}
+ sheetData={viewData.sheetData}
+ screenshotProtectionEnabled={link.enableScreenshotProtection!}
+ navData={navData}
+ />
+ ) : viewData.fileType === "sheet" && useAdvancedExcelViewer ? (
+ <AdvancedExcelViewer
+ file={viewData.file!}
+ versionNumber={document.versions[0].versionNumber}
+ navData={navData}
+ />
+ ) : viewData.fileType === "image" ? (
+ <ImageViewer
+ file={viewData.file!}
+ screenshotProtectionEnabled={link.enableScreenshotProtection!}
+ versionNumber={document.versions[0].versionNumber}
+ showPoweredByBanner={showPoweredByBanner}
+ viewerEmail={viewerEmail}
+ watermarkConfig={
+ link.enableWatermark
+ ? (link.watermarkConfig as WatermarkConfig)
+ : null
+ }
+ ipAddress={viewData.ipAddress}
+ linkName={link.name ?? `Link #${link.id.slice(-5)}`}
+ navData={navData}
+ />
+ ) : viewData.pages && !document.versions[0].isVertical ? (
+ <PagesHorizontalViewer
+ pages={viewData.pages}
+ feedbackEnabled={link.enableFeedback!}
+ screenshotProtectionEnabled={link.enableScreenshotProtection!}
+ versionNumber={document.versions[0].versionNumber}
+ showPoweredByBanner={showPoweredByBanner}
+ showAccountCreationSlide={showAccountCreationSlide}
+ enableQuestion={link.enableQuestion}
+ feedback={link.feedback}
+ viewerEmail={viewerEmail}
+ watermarkConfig={
+ link.enableWatermark
+ ? (link.watermarkConfig as WatermarkConfig)
+ : null
+ }
+ ipAddress={viewData.ipAddress}
+ linkName={link.name ?? `Link #${link.id.slice(-5)}`}
+ navData={navData}
+ />
+ ) : viewData.pages && document.versions[0].isVertical ? (
+ <PagesVerticalViewer
+ pages={viewData.pages}
+ feedbackEnabled={link.enableFeedback!}
+ screenshotProtectionEnabled={link.enableScreenshotProtection!}
+ versionNumber={document.versions[0].versionNumber}
+ showPoweredByBanner={showPoweredByBanner}
+ enableQuestion={link.enableQuestion}
+ feedback={link.feedback}
+ viewerEmail={viewerEmail}
+ watermarkConfig={
+ link.enableWatermark
+ ? (link.watermarkConfig as WatermarkConfig)
+ : null
+ }
+ ipAddress={viewData.ipAddress}
+ linkName={link.name ?? `Link #${link.id.slice(-5)}`}
+ navData={navData}
+ />
+ ) : viewData.fileType === "video" ? (
+ <VideoViewer
+ file={viewData.file!}
+ screenshotProtectionEnabled={link.enableScreenshotProtection!}
+ versionNumber={document.versions[0].versionNumber}
+ navData={navData}
+ />
+ ) : (
+ <PDFViewer
+ file={viewData.file}
+ name={document.name}
+ versionNumber={document.versions[0].versionNumber}
+ navData={navData}
+ />
+ )}
+ </ViewerChatLayout>
+
+ {/* AI Chat Components */}
+ <ViewerChatPanel />
+ <ViewerChatToggle />
+ </ViewerChatProvider>
);
}
diff --git a/components/view/viewer/dataroom-viewer.tsx b/components/view/viewer/dataroom-viewer.tsx
index 186220b8..e27bf32b 100644
--- a/components/view/viewer/dataroom-viewer.tsx
+++ b/components/view/viewer/dataroom-viewer.tsx
@@ -3,6 +3,12 @@ import { useRouter } from "next/router";
import { useMemo } from "react";
import React from "react";
+import { ViewerChatPanel } from "@/ee/features/ai/components/viewer-chat-panel";
+import {
+ ViewerChatLayout,
+ ViewerChatProvider,
+} from "@/ee/features/ai/components/viewer-chat-provider";
+import { ViewerChatToggle } from "@/ee/features/ai/components/viewer-chat-toggle";
import {
DataroomBrand,
DataroomFolder,
@@ -368,7 +374,14 @@ export default function DataroomViewer({
};
return (
- <>
+ <ViewerChatProvider
+ enabled={viewData.agentsEnabled}
+ dataroomId={dataroom?.id}
+ dataroomName={viewData.dataroomName}
+ linkId={linkId}
+ viewId={viewId}
+ viewerId={viewerId}
+ >
<DataroomNav
brand={brand}
linkId={linkId}
@@ -382,151 +395,160 @@ export default function DataroomViewer({
conversationsEnabled={viewData.conversationsEnabled}
isTeamMember={viewData.isTeamMember}
/>
- <div
- style={{ height: "calc(100vh - 64px)" }}
- className="relative flex items-center bg-white dark:bg-black"
- >
- <div className="relative mx-auto flex h-full w-full items-start justify-center">
- {/* Tree view */}
- <div className="hidden h-full w-1/4 space-y-8 overflow-auto px-3 pb-4 pt-4 md:flex md:px-6 md:pt-6 lg:px-8 lg:pt-9 xl:px-14">
- <ScrollArea showScrollbar className="w-full">
- <ViewFolderTree
- folders={folders}
- documents={documents}
- setFolderId={setFolderId}
- folderId={folderId}
- dataroomIndexEnabled={dataroomIndexEnabled}
- />
- <ScrollBar orientation="horizontal" />
- <ScrollBar orientation="vertical" />
- </ScrollArea>
- </div>
+ <ViewerChatLayout>
+ <div className="relative flex flex-1 items-center overflow-hidden bg-white dark:bg-black">
+ <div className="relative mx-auto flex h-full w-full items-start justify-center">
+ {/* Tree view */}
+ <div className="hidden h-full w-1/4 space-y-8 overflow-auto px-3 pb-4 pt-4 md:flex md:px-6 md:pt-6 lg:px-8 lg:pt-9 xl:px-14">
+ <ScrollArea showScrollbar className="w-full">
+ <ViewFolderTree
+ folders={folders}
+ documents={documents}
+ setFolderId={setFolderId}
+ folderId={folderId}
+ dataroomIndexEnabled={dataroomIndexEnabled}
+ />
+ <ScrollBar orientation="horizontal" />
+ <ScrollBar orientation="vertical" />
+ </ScrollArea>
+ </div>
- {/* Detail view */}
- <ScrollArea showScrollbar className="h-full flex-grow overflow-auto">
- <div className="h-full px-3 pb-4 pt-4 md:px-6 md:pt-6 lg:px-8 lg:pt-9 xl:px-14">
- <div className="flex items-center gap-x-2">
- {/* sidebar for mobile */}
- <div className="flex md:hidden">
- <Sheet>
- <SheetTrigger asChild>
- <button className="text-muted-foreground lg:hidden">
- <PanelLeftIcon className="h-5 w-5" aria-hidden="true" />
- </button>
- </SheetTrigger>
- <SheetPortal>
- <SheetOverlay className="fixed top-[35dvh] z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" />
- <SheetPrimitive.Content
- className={cn(
- "fixed top-[35dvh] z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
- "left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-lg",
- "m-0 w-[280px] p-0 sm:w-[300px] lg:hidden",
- )}
- >
- <div className="mt-8 h-full space-y-8 overflow-auto px-2 py-3">
- <ViewFolderTree
- folders={folders}
- documents={documents}
- setFolderId={setFolderId}
- folderId={folderId}
- dataroomIndexEnabled={dataroomIndexEnabled}
+ {/* Detail view */}
+ <ScrollArea
+ showScrollbar
+ className="h-full flex-grow overflow-auto"
+ >
+ <div className="h-full px-3 pb-4 pt-4 md:px-6 md:pt-6 lg:px-8 lg:pt-9 xl:px-14">
+ <div className="flex items-center gap-x-2">
+ {/* sidebar for mobile */}
+ <div className="flex md:hidden">
+ <Sheet>
+ <SheetTrigger asChild>
+ <button className="text-muted-foreground lg:hidden">
+ <PanelLeftIcon
+ className="h-5 w-5"
+ aria-hidden="true"
/>
- </div>
- <SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
- <XIcon className="h-4 w-4" />
- <span className="sr-only">Close</span>
- </SheetPrimitive.Close>
- </SheetPrimitive.Content>
- </SheetPortal>
- </Sheet>
- </div>
-
- <div className="flex flex-1 items-center justify-between gap-x-2">
- <Breadcrumb>
- <BreadcrumbList>
- <BreadcrumbItem key={"root"}>
- <BreadcrumbLink
- onClick={() => setFolderId(null)}
- className="cursor-pointer"
+ </button>
+ </SheetTrigger>
+ <SheetPortal>
+ <SheetOverlay className="fixed top-[35dvh] z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" />
+ <SheetPrimitive.Content
+ className={cn(
+ "fixed top-[35dvh] z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
+ "left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-lg",
+ "m-0 w-[280px] p-0 sm:w-[300px] lg:hidden",
+ )}
>
- Home
- </BreadcrumbLink>
- </BreadcrumbItem>
-
- {breadcrumbFolders.map((folder, index) => (
- <React.Fragment key={folder.id}>
- <BreadcrumbSeparator />
- <BreadcrumbItem>
- <ViewerBreadcrumbItem
- folder={folder}
+ <div className="mt-8 h-full space-y-8 overflow-auto px-2 py-3">
+ <ViewFolderTree
+ folders={folders}
+ documents={documents}
setFolderId={setFolderId}
- isLast={index === breadcrumbFolders.length - 1}
+ folderId={folderId}
dataroomIndexEnabled={dataroomIndexEnabled}
/>
- </BreadcrumbItem>
- </React.Fragment>
- ))}
- </BreadcrumbList>
- </Breadcrumb>
-
- <div className="flex items-center gap-x-2">
- <SearchBoxPersisted inputClassName="h-9" />
- {enableIndexFile && viewId && viewerId && (
- <IndexFileDialog
- linkId={linkId}
- viewId={viewId}
- dataroomId={dataroom?.id}
- viewerId={viewerId}
- viewerEmail={viewerEmail}
- />
- )}
-
- {viewData?.enableVisitorUpload && viewerId && (
- <DocumentUploadModal
- linkId={linkId}
- dataroomId={dataroom?.id}
- viewerId={viewerId}
- folderId={folderId ?? undefined}
- />
- )}
+ </div>
+ <SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
+ <XIcon className="h-4 w-4" />
+ <span className="sr-only">Close</span>
+ </SheetPrimitive.Close>
+ </SheetPrimitive.Content>
+ </SheetPortal>
+ </Sheet>
</div>
- </div>
- </div>
- {/* Search results banner */}
- {searchQuery && (
- <div className="mt-4 rounded-md border border-muted/50 bg-muted px-4 py-3">
- <div className="flex items-center gap-2">
- <div className="text-sm font-medium text-muted-foreground">
- Search results for &quot;{searchQuery}&quot;
- </div>
- <div className="text-xs text-muted-foreground">
- ({mixedItems.length} result
- {mixedItems.length !== 1 ? "s" : ""} across all folders)
+ <div className="flex flex-1 items-center justify-between gap-x-2">
+ <Breadcrumb>
+ <BreadcrumbList>
+ <BreadcrumbItem key={"root"}>
+ <BreadcrumbLink
+ onClick={() => setFolderId(null)}
+ className="cursor-pointer"
+ >
+ Home
+ </BreadcrumbLink>
+ </BreadcrumbItem>
+
+ {breadcrumbFolders.map((folder, index) => (
+ <React.Fragment key={folder.id}>
+ <BreadcrumbSeparator />
+ <BreadcrumbItem>
+ <ViewerBreadcrumbItem
+ folder={folder}
+ setFolderId={setFolderId}
+ isLast={index === breadcrumbFolders.length - 1}
+ dataroomIndexEnabled={dataroomIndexEnabled}
+ />
+ </BreadcrumbItem>
+ </React.Fragment>
+ ))}
+ </BreadcrumbList>
+ </Breadcrumb>
+
+ <div className="flex items-center gap-x-2">
+ <SearchBoxPersisted inputClassName="h-9" />
+ {enableIndexFile && viewId && viewerId && (
+ <IndexFileDialog
+ linkId={linkId}
+ viewId={viewId}
+ dataroomId={dataroom?.id}
+ viewerId={viewerId}
+ viewerEmail={viewerEmail}
+ />
+ )}
+
+ {viewData?.enableVisitorUpload && viewerId && (
+ <DocumentUploadModal
+ linkId={linkId}
+ dataroomId={dataroom?.id}
+ viewerId={viewerId}
+ folderId={folderId ?? undefined}
+ />
+ )}
</div>
</div>
</div>
- )}
-
- <ul role="list" className="-mx-4 space-y-4 overflow-auto p-4">
- {mixedItems.length === 0 ? (
- <li className="py-6 text-center text-muted-foreground">
- {searchQuery
- ? "No documents match your search."
- : "No items available."}
- </li>
- ) : (
- mixedItems.map((item) => (
- <li key={item.id}>{renderItem(item)}</li>
- ))
+
+ {/* Search results banner */}
+ {searchQuery && (
+ <div className="mt-4 rounded-md border border-muted/50 bg-muted px-4 py-3">
+ <div className="flex items-center gap-2">
+ <div className="text-sm font-medium text-muted-foreground">
+ Search results for &quot;{searchQuery}&quot;
+ </div>
+ <div className="text-xs text-muted-foreground">
+ ({mixedItems.length} result
+ {mixedItems.length !== 1 ? "s" : ""} across all folders)
+ </div>
+ </div>
+ </div>
)}
- </ul>
- </div>
- <ScrollBar orientation="vertical" />
- <ScrollBar orientation="horizontal" />
- </ScrollArea>
+
+ <ul role="list" className="-mx-4 space-y-4 overflow-auto p-4">
+ {mixedItems.length === 0 ? (
+ <li className="py-6 text-center text-muted-foreground">
+ {searchQuery
+ ? "No documents match your search."
+ : "No items available."}
+ </li>
+ ) : (
+ mixedItems.map((item) => (
+ <li key={item.id}>{renderItem(item)}</li>
+ ))
+ )}
+ </ul>
+ </div>
+ <ScrollBar orientation="vertical" />
+ <ScrollBar orientation="horizontal" />
+ </ScrollArea>
+ </div>
</div>
- </div>
- </>
+ </ViewerChatLayout>
+
+ {/* AI Chat Components */}
+ <ViewerChatPanel />
+ <ViewerChatToggle />
+ </ViewerChatProvider>
);
}
diff --git a/components/view/viewer/image-viewer.tsx b/components/view/viewer/image-viewer.tsx
index 65dc3688..1891e615 100644
--- a/components/view/viewer/image-viewer.tsx
+++ b/components/view/viewer/image-viewer.tsx
@@ -94,6 +94,16 @@ export default function ImageViewer({
// Add keyboard shortcuts for zooming and fullscreen
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
+ // Don't trigger shortcuts when typing in inputs or textareas
+ const target = e.target as HTMLElement;
+ if (
+ target.tagName === "INPUT" ||
+ target.tagName === "TEXTAREA" ||
+ target.isContentEditable
+ ) {
+ return;
+ }
+
if (e.metaKey || e.ctrlKey) {
if (e.key === "=" || e.key === "+") {
e.preventDefault();
diff --git a/components/view/viewer/pages-horizontal-viewer.tsx b/components/view/viewer/pages-horizontal-viewer.tsx
index 947dd7bd..c00ce0fe 100644
--- a/components/view/viewer/pages-horizontal-viewer.tsx
+++ b/components/view/viewer/pages-horizontal-viewer.tsx
@@ -570,6 +570,16 @@ export default function PagesHorizontalViewer({
// Add keyboard shortcuts for zooming and fullscreen
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
+ // Don't trigger shortcuts when typing in inputs or textareas
+ const target = e.target as HTMLElement;
+ if (
+ target.tagName === "INPUT" ||
+ target.tagName === "TEXTAREA" ||
+ target.isContentEditable
+ ) {
+ return;
+ }
+
if (e.metaKey || e.ctrlKey) {
if (e.key === "=" || e.key === "+") {
e.preventDefault();
diff --git a/components/view/viewer/pages-vertical-viewer.tsx b/components/view/viewer/pages-vertical-viewer.tsx
index d75e6773..52b235e6 100644
--- a/components/view/viewer/pages-vertical-viewer.tsx
+++ b/components/view/viewer/pages-vertical-viewer.tsx
@@ -742,6 +742,16 @@ export default function PagesVerticalViewer({
// Add keyboard shortcuts for zooming and fullscreen
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
+ // Don't trigger shortcuts when typing in inputs or textareas
+ const target = e.target as HTMLElement;
+ if (
+ target.tagName === "INPUT" ||
+ target.tagName === "TEXTAREA" ||
+ target.isContentEditable
+ ) {
+ return;
+ }
+
if (e.metaKey || e.ctrlKey) {
if (e.key === "=" || e.key === "+") {
e.preventDefault();
diff --git a/ee/LICENSE b/ee/LICENSE.md
similarity index 98%
rename from ee/LICENSE
rename to ee/LICENSE.md
index ef62c17f..1c24066a 100644
--- a/ee/LICENSE
+++ b/ee/LICENSE.md
@@ -1,5 +1,5 @@
The Papermark Commercial License (the “Commercial License”)
-Copyright (c) 2024-present Papermark, Inc.
+Copyright (c) 2023-present Papermark, Inc.
With regard to the Papermark Software:
diff --git a/ee/README.md b/ee/README.md
new file mode 100644
index 00000000..25f4b865
--- /dev/null
+++ b/ee/README.md
@@ -0,0 +1,16 @@
+<div align="center">
+ <h1 align="center">Papermark</h1>
+ <a href="https://www.papermark.com/enterprise">Get an Enterprise License</a>
+</div>
+
+# Enterprise Edition
+
+Welcome to the Enterprise Edition of Papermark.
+
+The [/(ee)](https://github.com/mfts/papermark/tree/main/ee) subfolder is the place for all the **Enterprise Edition** features from our [hosted](https://www.papermark.com/pricing) plan and enterprise-grade features for [Enterprise](https://www.papermark.com/enterprise), included but not limited to the following:
+
+- Data Rooms
+- Q&A Conversations
+- Advanced Permissions
+
+> _❗ WARNING: This repository is copyrighted. You are not allowed to use this code to host your own version of app.papermark.com without obtaining a proper [license](https://www.papermark.com/enterprise) first❗_
diff --git a/ee/features/ai/components/agents-settings-card.tsx b/ee/features/ai/components/agents-settings-card.tsx
new file mode 100644
index 00000000..323e851a
--- /dev/null
+++ b/ee/features/ai/components/agents-settings-card.tsx
@@ -0,0 +1,236 @@
+"use client";
+
+import { useState } from "react";
+
+import { Bot, Loader2 } from "lucide-react";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
+import { useFeatureFlags } from "@/lib/hooks/use-feature-flags";
+import { cn } from "@/lib/utils";
+
+import { Button } from "@/components/ui/button";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import { Label } from "@/components/ui/label";
+import LoadingSpinner from "@/components/ui/loading-spinner";
+import { Switch } from "@/components/ui/switch";
+
+interface AgentsSettingsCardProps {
+ type: "document" | "dataroom" | "team";
+ entityId: string;
+ teamId: string;
+ agentsEnabled: boolean;
+ vectorStoreId?: string | null;
+ onUpdate?: () => void;
+}
+
+export function AgentsSettingsCard({
+ type,
+ entityId,
+ teamId,
+ agentsEnabled: initialEnabled,
+ vectorStoreId,
+ onUpdate,
+}: AgentsSettingsCardProps) {
+ const [agentsEnabled, setAgentsEnabled] = useState(initialEnabled);
+ const [loading, setLoading] = useState(false);
+ const [indexing, setIndexing] = useState(false);
+
+ // Check if AI feature is enabled for this team
+ const { isFeatureEnabled, isLoading: featuresLoading } = useFeatureFlags();
+ const isAIFeatureEnabled = isFeatureEnabled("ai");
+
+ // Don't render if feature flags are still loading
+ if (featuresLoading) {
+ return (
+ <Card>
+ <CardContent className="flex h-32 items-center justify-center">
+ <LoadingSpinner className="h-6 w-6" />
+ </CardContent>
+ </Card>
+ );
+ }
+
+ // Don't render if AI feature is not enabled for this team
+ if (!isAIFeatureEnabled) {
+ return null;
+ }
+
+ const handleToggleAgents = async (enabled: boolean) => {
+ setLoading(true);
+
+ try {
+ const endpoint =
+ type === "document"
+ ? `/api/teams/${teamId}/documents/${entityId}`
+ : type === "dataroom"
+ ? `/api/teams/${teamId}/datarooms/${entityId}`
+ : `/api/teams/${teamId}`;
+
+ const response = await fetch(endpoint, {
+ method: "PATCH",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify({ agentsEnabled: enabled }),
+ });
+
+ if (!response.ok) {
+ throw new Error("Failed to update agents setting");
+ }
+
+ setAgentsEnabled(enabled);
+ toast.success(`AI Agents ${enabled ? "enabled" : "disabled"}`);
+
+ // Mutate the relevant SWR cache
+ if (type === "document") {
+ await mutate(`/api/teams/${teamId}/documents/${entityId}`);
+ } else if (type === "dataroom") {
+ await mutate(`/api/teams/${teamId}/datarooms/${entityId}`);
+ }
+
+ onUpdate?.();
+ } catch (error) {
+ console.error("Error toggling agents:", error);
+ toast.error("Failed to update agents setting");
+ setAgentsEnabled(!enabled); // Revert on error
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ const handleIndexDocuments = async () => {
+ setIndexing(true);
+
+ try {
+ const endpoint =
+ type === "document"
+ ? `/api/ai/store/teams/${teamId}/documents/${entityId}`
+ : `/api/ai/store/teams/${teamId}/datarooms/${entityId}`;
+
+ const response = await fetch(endpoint, {
+ method: "POST",
+ });
+
+ if (!response.ok) {
+ const error = await response.json();
+ throw new Error(error.error || "Failed to index documents");
+ }
+
+ const data = await response.json();
+
+ if (data.errors && data.errors.length > 0) {
+ toast.warning(
+ `Indexed ${data.filesIndexed}/${data.totalDocuments || "N/A"} documents with some errors`,
+ );
+ } else {
+ toast.success(
+ `Successfully indexed ${type === "document" ? "document" : `${data.filesIndexed} documents`}`,
+ );
+ }
+
+ onUpdate?.();
+ } catch (error: any) {
+ console.error("Error indexing documents:", error);
+ toast.error(error.message || "Failed to index documents");
+ } finally {
+ setIndexing(false);
+ }
+ };
+
+ const isIndexed = type === "document" ? !!vectorStoreId : !!vectorStoreId;
+
+ return (
+ <Card>
+ <CardHeader>
+ <div className="flex items-center justify-between">
+ <div className="flex items-center gap-2">
+ <Bot className="h-5 w-5 text-primary" />
+ <CardTitle>AI Agents</CardTitle>
+ </div>
+ <span
+ className="relative ml-auto flex h-4 w-4"
+ title={`AI Agents are ${agentsEnabled ? "" : "not"} enabled`}
+ >
+ <span
+ className={cn(
+ "absolute inline-flex h-full w-full rounded-full opacity-75",
+ agentsEnabled ? "animate-ping bg-green-400" : "",
+ )}
+ />
+ <span
+ className={cn(
+ "relative inline-flex h-4 w-4 rounded-full",
+ agentsEnabled ? "bg-green-500" : "bg-gray-400",
+ )}
+ />
+ </span>
+ </div>
+ <CardDescription>
+ Enable AI-powered chat to let visitors ask questions about{" "}
+ {type === "document" ? "this document" : "documents in this " + type}.
+ Documents must be indexed for chat to work.
+ </CardDescription>
+ </CardHeader>
+
+ <CardContent className="space-y-4">
+ <div className="flex items-center justify-between space-x-2">
+ <Label htmlFor="agents-enabled" className="flex flex-col space-y-1">
+ <span>Enable AI Agents</span>
+ <span className="text-xs font-normal leading-snug text-muted-foreground">
+ Allow visitors to chat with AI about{" "}
+ {type === "document" ? "this document" : "these documents"}
+ </span>
+ </Label>
+ <Switch
+ id="agents-enabled"
+ checked={agentsEnabled}
+ onCheckedChange={handleToggleAgents}
+ disabled={loading}
+ />
+ </div>
+
+ {agentsEnabled && (
+ <div className="flex items-center justify-between space-x-2 border-t pt-4">
+ <div className="flex flex-col space-y-1">
+ <span className="text-sm font-medium">Index Status</span>
+ <span className="text-xs text-muted-foreground">
+ {isIndexed
+ ? `${type === "document" ? "Document" : "Documents"} indexed and ready`
+ : `${type === "document" ? "Document needs" : "Documents need"} to be indexed`}
+ </span>
+ </div>
+ <Button
+ onClick={handleIndexDocuments}
+ disabled={indexing}
+ size="sm"
+ >
+ {indexing ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Indexing...
+ </>
+ ) : (
+ <>Index {type === "document" ? "Document" : "Documents"}</>
+ )}
+ </Button>
+ </div>
+ )}
+ </CardContent>
+
+ <CardFooter className="flex items-center justify-between rounded-b-lg border-t bg-muted px-6 py-3">
+ <p className="text-sm text-muted-foreground transition-colors">
+ AI Agents use OpenAI to answer questions. Only PDF documents are
+ currently supported.
+ </p>
+ </CardFooter>
+ </Card>
+ );
+}
diff --git a/ee/features/ai/components/chat-message.tsx b/ee/features/ai/components/chat-message.tsx
new file mode 100644
index 00000000..f3e0f717
--- /dev/null
+++ b/ee/features/ai/components/chat-message.tsx
@@ -0,0 +1,156 @@
+"use client";
+
+import { memo, useState } from "react";
+
+import {
+ CheckIcon,
+ CopyIcon,
+ ThumbsDownIcon,
+ ThumbsUpIcon,
+} from "lucide-react";
+
+import {
+ Message,
+ MessageAction,
+ MessageActions,
+ MessageContent,
+ MessageResponse,
+} from "@/components/ai-elements/message";
+import { Shimmer } from "@/components/ai-elements/shimmer";
+
+import type { FileCitation } from "../lib/stream/parse-ui-message-stream";
+
+// ============================================================================
+// Types
+// ============================================================================
+
+export interface ChatMessageProps {
+ role: "user" | "assistant";
+ content: string;
+ citations?: FileCitation[];
+ isStreaming?: boolean;
+ className?: string;
+ messageId?: string;
+ onFeedback?: (messageId: string, feedback: "up" | "down") => void;
+}
+
+type FeedbackState = "up" | "down" | null;
+
+// ============================================================================
+// Main Component
+// ============================================================================
+
+export const ChatMessage = memo(function ChatMessage({
+ role,
+ content,
+ isStreaming = false,
+ className,
+ messageId,
+ onFeedback,
+}: ChatMessageProps) {
+ const [copied, setCopied] = useState(false);
+ const [feedback, setFeedback] = useState<FeedbackState>(null);
+ const isUser = role === "user";
+
+ const handleCopy = async () => {
+ try {
+ await navigator.clipboard.writeText(content);
+ setCopied(true);
+ setTimeout(() => setCopied(false), 2000);
+ } catch (err) {
+ console.error("Failed to copy:", err);
+ }
+ };
+
+ const handleFeedback = (type: "up" | "down") => {
+ // Toggle feedback if clicking the same button, otherwise set new feedback
+ const newFeedback = feedback === type ? null : type;
+ setFeedback(newFeedback);
+
+ if (messageId && onFeedback && newFeedback) {
+ onFeedback(messageId, newFeedback);
+ }
+ };
+
+ // For user messages, simple rendering
+ if (isUser) {
+ return (
+ <Message from="user" className={className}>
+ <MessageContent>
+ <p className="whitespace-pre-wrap">{content}</p>
+ </MessageContent>
+ </Message>
+ );
+ }
+
+ // For assistant messages
+ return (
+ <div className="space-y-1">
+ <Message from="assistant" className={className}>
+ <MessageContent>
+ {isStreaming && !content ? (
+ <Shimmer duration={1.5}>Generating response...</Shimmer>
+ ) : (
+ <div className="prose prose-sm max-w-none dark:prose-invert">
+ <MessageResponse>{content}</MessageResponse>
+ </div>
+ )}
+ </MessageContent>
+ </Message>
+
+ {/* Message actions - always visible when there's content and not streaming */}
+ {content && !isStreaming && (
+ <MessageActions className="ml-0">
+ <MessageAction
+ onClick={handleCopy}
+ tooltip={copied ? "Copied!" : "Copy"}
+ label={copied ? "Copied" : "Copy message"}
+ variant="ghost"
+ size="icon"
+ className="size-7"
+ >
+ {copied ? (
+ <CheckIcon className="size-3.5 text-green-500" />
+ ) : (
+ <CopyIcon className="size-3.5 text-muted-foreground" />
+ )}
+ </MessageAction>
+ {/* <MessageAction
+ onClick={() => handleFeedback("up")}
+ tooltip="Good response"
+ label="Good response"
+ variant="ghost"
+ size="icon"
+ className="size-7"
+ >
+ <ThumbsUpIcon
+ className={`size-3.5 ${
+ feedback === "up"
+ ? "fill-green-500 text-green-500"
+ : "text-muted-foreground"
+ }`}
+ />
+ </MessageAction>
+ <MessageAction
+ onClick={() => handleFeedback("down")}
+ tooltip="Bad response"
+ label="Bad response"
+ variant="ghost"
+ size="icon"
+ className="size-7"
+ >
+ <ThumbsDownIcon
+ className={`size-3.5 ${
+ feedback === "down"
+ ? "fill-red-500 text-red-500"
+ : "text-muted-foreground"
+ }`}
+ />
+ </MessageAction> */}
+ </MessageActions>
+ )}
+ </div>
+ );
+});
+
+export default ChatMessage;
diff --git a/ee/features/ai/components/document-ai-dialog.tsx b/ee/features/ai/components/document-ai-dialog.tsx
new file mode 100644
index 00000000..e1a26536
--- /dev/null
+++ b/ee/features/ai/components/document-ai-dialog.tsx
@@ -0,0 +1,228 @@
+"use client";
+
+import { useState } from "react";
+
+import { Bot, ExternalLink, Loader2, Shield } from "lucide-react";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
+import { useFeatureFlags } from "@/lib/hooks/use-feature-flags";
+import { cn } from "@/lib/utils";
+
+import { Button } from "@/components/ui/button";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog";
+import { Label } from "@/components/ui/label";
+import { Switch } from "@/components/ui/switch";
+
+interface DocumentAIDialogProps {
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+ documentId: string;
+ teamId: string;
+ agentsEnabled: boolean;
+ vectorStoreFileId?: string | null;
+}
+
+export function DocumentAIDialog({
+ open,
+ onOpenChange,
+ documentId,
+ teamId,
+ agentsEnabled: initialEnabled,
+ vectorStoreFileId,
+}: DocumentAIDialogProps) {
+ const { isFeatureEnabled } = useFeatureFlags();
+ const isAIFeatureEnabled = isFeatureEnabled("ai");
+
+ const [agentsEnabled, setAgentsEnabled] = useState(initialEnabled);
+ const [loading, setLoading] = useState(false);
+ const [indexing, setIndexing] = useState(false);
+
+ // Don't render if AI feature is not enabled
+ if (!isAIFeatureEnabled) {
+ return null;
+ }
+
+ const handleToggleAgents = async (enabled: boolean) => {
+ setLoading(true);
+
+ try {
+ const response = await fetch(
+ `/api/teams/${teamId}/documents/${documentId}`,
+ {
+ method: "PATCH",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify({ agentsEnabled: enabled }),
+ },
+ );
+
+ if (!response.ok) {
+ throw new Error("Failed to update agents setting");
+ }
+
+ setAgentsEnabled(enabled);
+ toast.success(`AI Agents ${enabled ? "enabled" : "disabled"}`);
+
+ // Mutate the document cache
+ await mutate(`/api/teams/${teamId}/documents/${documentId}`);
+ } catch (error) {
+ console.error("Error toggling agents:", error);
+ toast.error("Failed to update agents setting");
+ setAgentsEnabled(!enabled);
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ const handleIndexDocument = async () => {
+ setIndexing(true);
+
+ try {
+ const response = await fetch(
+ `/api/ai/store/teams/${teamId}/documents/${documentId}`,
+ {
+ method: "POST",
+ },
+ );
+
+ if (!response.ok) {
+ const error = await response.json();
+ throw new Error(error.error || "Failed to index document");
+ }
+
+ const data = await response.json();
+
+ if (data.error) {
+ throw new Error(data.error);
+ }
+
+ toast.success("Document indexed successfully");
+
+ // Mutate the document cache
+ await mutate(`/api/teams/${teamId}/documents/${documentId}`);
+ } catch (error: any) {
+ console.error("Error indexing document:", error);
+ toast.error(error.message || "Failed to index document");
+ } finally {
+ setIndexing(false);
+ }
+ };
+
+ const isIndexed = !!vectorStoreFileId;
+
+ return (
+ <Dialog open={open} onOpenChange={onOpenChange}>
+ <DialogContent className="sm:max-w-md">
+ <DialogHeader>
+ <DialogTitle className="flex items-center gap-2">
+ <Bot className="h-5 w-5 text-primary" />
+ AI Agents
+ </DialogTitle>
+ <DialogDescription>
+ Enable AI-powered chat for this document. Visitors can ask questions
+ and get intelligent answers.
+ </DialogDescription>
+ </DialogHeader>
+
+ <div className="space-y-4 py-4">
+ {/* Toggle Section */}
+ <div className="flex items-center justify-between space-x-2 rounded-lg border p-4">
+ <Label htmlFor="agents-toggle" className="flex flex-col space-y-1">
+ <span className="font-medium">Enable AI Chat</span>
+ <span className="text-xs font-normal leading-snug text-muted-foreground">
+ Allow visitors to chat with AI about this document
+ </span>
+ </Label>
+ <Switch
+ id="agents-toggle"
+ checked={agentsEnabled}
+ onCheckedChange={handleToggleAgents}
+ disabled={loading}
+ />
+ </div>
+
+ {/* Index Status */}
+ {agentsEnabled && (
+ <div className="flex items-center justify-between space-x-2 rounded-lg border p-4">
+ <div className="flex flex-col space-y-1">
+ <span className="text-sm font-medium">Index Status</span>
+ <span className="text-xs text-muted-foreground">
+ {isIndexed
+ ? "Document is indexed and ready for AI chat"
+ : "Document needs to be indexed before AI chat can work"}
+ </span>
+ </div>
+ <div className="flex items-center gap-2">
+ <span
+ className={cn(
+ "inline-flex h-2 w-2 rounded-full",
+ isIndexed ? "bg-green-500" : "bg-amber-500",
+ )}
+ />
+ <Button
+ onClick={handleIndexDocument}
+ disabled={indexing}
+ size="sm"
+ variant={isIndexed ? "outline" : "default"}
+ >
+ {indexing ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Indexing...
+ </>
+ ) : isIndexed ? (
+ "Re-index"
+ ) : (
+ "Index Document"
+ )}
+ </Button>
+ </div>
+ </div>
+ )}
+
+ {/* Privacy Notice */}
+ <div className="rounded-lg border border-green-200 bg-green-50 p-4 dark:border-green-900 dark:bg-green-950/30">
+ <div className="flex items-start gap-3">
+ <Shield className="mt-0.5 h-5 w-5 shrink-0 text-green-600" />
+ <div className="space-y-2 text-sm">
+ <p className="font-medium text-green-900 dark:text-green-100">
+ Privacy & Data Usage
+ </p>
+ <ul className="space-y-1 text-green-800 dark:text-green-200">
+ <li>• Powered by OpenAI&apos;s API</li>
+ <li>• Your data is NOT used to train AI models</li>
+ <li>• Document embeddings stored securely</li>
+ <li>• Delete anytime by disabling AI</li>
+ </ul>
+ <a
+ href="https://openai.com/policies/api-data-usage-policies"
+ target="_blank"
+ rel="noopener noreferrer"
+ className="inline-flex items-center gap-1 text-xs text-green-700 hover:underline dark:text-green-300"
+ >
+ OpenAI Data Usage Policy
+ <ExternalLink className="h-3 w-3" />
+ </a>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <DialogFooter>
+ <Button variant="outline" onClick={() => onOpenChange(false)}>
+ Close
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ );
+}
diff --git a/ee/features/ai/components/viewer-chat-panel.tsx b/ee/features/ai/components/viewer-chat-panel.tsx
new file mode 100644
index 00000000..b03b3f2e
--- /dev/null
+++ b/ee/features/ai/components/viewer-chat-panel.tsx
@@ -0,0 +1,417 @@
+"use client";
+
+import { useCallback, useState } from "react";
+
+import { FileTextIcon, Loader2, Plus, SparklesIcon, XIcon } from "lucide-react";
+
+import {
+ Conversation,
+ ConversationContent,
+ ConversationEmptyState,
+ ConversationScrollButton,
+} from "@/components/ai-elements/conversation";
+import {
+ PromptInput,
+ PromptInputFooter,
+ PromptInputHeader,
+ type PromptInputMessage,
+ PromptInputSubmit,
+ PromptInputTextarea,
+} from "@/components/ai-elements/prompt-input";
+import { Button } from "@/components/ui/button";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+
+import { parseTextStream } from "../lib/stream/parse-text-stream";
+import ChatMessage from "./chat-message";
+import { useViewerChatSafe } from "./viewer-chat-provider";
+import { ViewerThreadSelector } from "./viewer-thread-selector";
+
+interface Message {
+ id: string;
+ role: "user" | "assistant";
+ content: string;
+ isStreaming?: boolean;
+}
+
+interface ViewerChatPanelProps {
+ className?: string;
+}
+
+/**
+ * Standalone chat panel that reads configuration from ViewerChatProvider.
+ * Place this anywhere in the component tree within ViewerChatProvider.
+ * It will render as a fixed panel on the right side when open.
+ */
+export function ViewerChatPanel({ className }: ViewerChatPanelProps) {
+ const context = useViewerChatSafe();
+
+ // Don't render if not in provider or not enabled
+ if (!context || !context.isEnabled) {
+ return null;
+ }
+
+ // Don't render if closed
+ if (!context.isOpen) {
+ return null;
+ }
+
+ return (
+ <div className="fixed bottom-0 right-0 top-16 z-30 w-[400px] shadow-xl">
+ <ViewerChatPanelContent
+ onClose={context.close}
+ dataroomId={context.config.dataroomId}
+ dataroomName={context.config.dataroomName}
+ documentId={context.config.documentId}
+ documentName={context.config.documentName}
+ linkId={context.config.linkId}
+ viewId={context.config.viewId}
+ viewerId={context.config.viewerId}
+ />
+ </div>
+ );
+}
+
+// ============================================================================
+// Internal Content Component
+// ============================================================================
+
+interface ViewerChatPanelContentProps {
+ onClose: () => void;
+ dataroomId?: string;
+ dataroomName?: string;
+ documentId?: string;
+ documentName?: string;
+ linkId?: string;
+ viewId?: string;
+ viewerId?: string;
+}
+
+function ViewerChatPanelContent({
+ onClose,
+ dataroomId,
+ dataroomName,
+ documentId,
+ documentName,
+ linkId,
+ viewId,
+ viewerId,
+}: ViewerChatPanelContentProps) {
+ const [messages, setMessages] = useState<Message[]>([]);
+ const [isLoading, setIsLoading] = useState(false);
+ const [chatId, setChatId] = useState<string | null>(null);
+ const [chatTitle, setChatTitle] = useState<string | undefined>();
+
+ const contextName = dataroomName || documentName || "Document";
+
+ // Create chat session
+ const createChat = async () => {
+ try {
+ const response = await fetch(`/api/ai/chat`, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({
+ documentId,
+ dataroomId,
+ linkId,
+ viewId,
+ viewerId,
+ }),
+ });
+
+ if (!response.ok) throw new Error("Failed to create chat");
+
+ const data = await response.json();
+ setChatId(data.id);
+ setChatTitle(undefined);
+ return data.id;
+ } catch (error) {
+ console.error("Error creating chat:", error);
+ return null;
+ }
+ };
+
+ // Load existing chat
+ const loadChat = useCallback(
+ async (selectedChatId: string) => {
+ try {
+ setIsLoading(true);
+ const queryParams = viewerId ? `?viewerId=${viewerId}` : "";
+
+ const response = await fetch(
+ `/api/ai/chat/${selectedChatId}${queryParams}`,
+ );
+
+ if (!response.ok) throw new Error("Failed to load chat");
+
+ const data = await response.json();
+ setChatId(selectedChatId);
+ setChatTitle(data.title);
+
+ // Convert messages to the format expected by the UI
+ const loadedMessages: Message[] = data.messages.map((msg: any) => ({
+ id: msg.id,
+ role: msg.role,
+ content: msg.content,
+ }));
+
+ setMessages(loadedMessages);
+ } catch (error) {
+ console.error("Error loading chat:", error);
+ } finally {
+ setIsLoading(false);
+ }
+ },
+ [viewerId],
+ );
+
+ // Start new chat
+ const handleNewChat = useCallback(() => {
+ setChatId(null);
+ setChatTitle(undefined);
+ setMessages([]);
+ }, []);
+
+ // Delete chat
+ const handleDeleteChat = useCallback(
+ async (deleteChatId: string) => {
+ try {
+ const queryParams = viewerId ? `?viewerId=${viewerId}` : "";
+ await fetch(`/api/ai/chat/${deleteChatId}${queryParams}`, {
+ method: "DELETE",
+ });
+
+ // If deleted current chat, start new one
+ if (deleteChatId === chatId) {
+ handleNewChat();
+ }
+ } catch (error) {
+ console.error("Error deleting chat:", error);
+ }
+ },
+ [chatId, viewerId, handleNewChat],
+ );
+
+ const handleSubmit = async (message: PromptInputMessage) => {
+ if (!message.text.trim() || isLoading) return;
+
+ const userMessage: Message = {
+ id: `user-${Date.now()}`,
+ role: "user",
+ content: message.text.trim(),
+ };
+
+ setMessages((prev) => [...prev, userMessage]);
+ setIsLoading(true);
+
+ try {
+ // Create chat if needed
+ let currentChatId = chatId;
+ if (!currentChatId) {
+ currentChatId = await createChat();
+ if (!currentChatId) {
+ setIsLoading(false);
+ return;
+ }
+ }
+
+ const queryParams = viewerId ? `?viewerId=${viewerId}` : "";
+
+ const response = await fetch(
+ `/api/ai/chat/${currentChatId}/messages${queryParams}`,
+ {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({
+ content: userMessage.content,
+ // When viewing a specific document in a dataroom, filter search to that document
+ filterDocumentId: documentId,
+ }),
+ },
+ );
+
+ if (!response.ok) throw new Error("Failed to send message");
+
+ // Get the reader for streaming
+ const reader = response.body?.getReader();
+ if (!reader) throw new Error("No response body");
+
+ // Create placeholder for assistant message
+ const assistantMessageId = `assistant-${Date.now()}`;
+ const assistantMessage: Message = {
+ id: assistantMessageId,
+ role: "assistant",
+ content: "",
+ isStreaming: true,
+ };
+ setMessages((prev) => [...prev, assistantMessage]);
+
+ // Parse the text stream
+ await parseTextStream(reader, {
+ onTextDelta: (_delta, accumulated) => {
+ setMessages((prev) =>
+ prev.map((m) =>
+ m.id === assistantMessageId ? { ...m, content: accumulated } : m,
+ ),
+ );
+ },
+ onTextEnd: (content) => {
+ setMessages((prev) =>
+ prev.map((m) =>
+ m.id === assistantMessageId
+ ? { ...m, content, isStreaming: false }
+ : m,
+ ),
+ );
+ },
+ onError: (error) => {
+ console.error("Stream error:", error);
+ setMessages((prev) =>
+ prev.map((m) =>
+ m.id === assistantMessageId
+ ? {
+ ...m,
+ content:
+ "Sorry, there was an error processing your request.",
+ isStreaming: false,
+ }
+ : m,
+ ),
+ );
+ },
+ });
+ } catch (error) {
+ console.error("Error sending message:", error);
+ setMessages((prev) => [
+ ...prev,
+ {
+ id: `error-${Date.now()}`,
+ role: "assistant",
+ content: "Sorry, there was an error sending your message.",
+ },
+ ]);
+ } finally {
+ setIsLoading(false);
+ }
+ };
+
+ return (
+ <div className="flex h-full w-full flex-col border-l border-gray-200 bg-white">
+ {/* Header with Thread Selector and New Chat Button */}
+ <div className="flex items-center justify-between border-b border-gray-200 px-3 py-2">
+ <div className="flex min-w-0 flex-1 items-center gap-2">
+ <ViewerThreadSelector
+ currentChatId={chatId}
+ currentChatTitle={chatTitle}
+ onSelectChat={loadChat}
+ onNewChat={handleNewChat}
+ onDeleteChat={handleDeleteChat}
+ documentId={documentId}
+ dataroomId={dataroomId}
+ linkId={linkId}
+ viewerId={viewerId}
+ viewId={viewId}
+ />
+ </div>
+ <div className="flex items-center gap-1">
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={handleNewChat}
+ className="size-8 p-0 text-gray-500 hover:bg-gray-100 hover:text-gray-900"
+ >
+ <Plus className="size-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>New Chat</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={onClose}
+ className="size-8 p-0 text-gray-500 hover:bg-gray-100 hover:text-gray-900"
+ >
+ <XIcon className="size-4" />
+ </Button>
+ </div>
+ </div>
+
+ {/* Context Name */}
+ <div className="border-b border-gray-100 bg-gray-50/50 px-4 py-1.5">
+ <p className="truncate text-xs text-gray-500">{contextName}</p>
+ </div>
+
+ {/* Messages */}
+ <Conversation className="flex-1">
+ <ConversationContent className="gap-4 p-4">
+ {messages.length === 0 ? (
+ <ConversationEmptyState
+ icon={
+ <div className="flex size-12 items-center justify-center rounded-full bg-primary/10">
+ <SparklesIcon className="size-6 text-primary" />
+ </div>
+ }
+ title="Ask me anything"
+ description={`I can help you understand and analyze the content of this ${dataroomId ? "data room" : "document"}.`}
+ />
+ ) : (
+ <>
+ {messages.map((message) => (
+ <div key={message.id} className="space-y-2">
+ <ChatMessage
+ role={message.role}
+ content={message.content}
+ isStreaming={message.isStreaming}
+ />
+ </div>
+ ))}
+
+ {/* Show loading indicator while waiting for response */}
+ {isLoading && messages[messages.length - 1]?.role === "user" && (
+ <div className="flex items-center gap-2 text-sm text-muted-foreground">
+ <Loader2 className="size-4 animate-spin" />
+ <span>Thinking...</span>
+ </div>
+ )}
+ </>
+ )}
+ </ConversationContent>
+ <ConversationScrollButton />
+ </Conversation>
+
+ {/* Input */}
+ <div className="border-t border-gray-200 p-3">
+ <PromptInput onSubmit={handleSubmit}>
+ {/* Show focused document as an attachment when in dataroom */}
+ {documentId && documentName && (
+ <PromptInputHeader>
+ <div className="flex items-center gap-1.5 rounded-md border border-border bg-muted/50 px-2 py-1 text-xs text-muted-foreground">
+ <FileTextIcon className="size-3" />
+ <span className="max-w-[200px] truncate">{documentName}</span>
+ </div>
+ </PromptInputHeader>
+ )}
+ <PromptInputTextarea
+ placeholder="Ask a question..."
+ disabled={isLoading}
+ className="min-h-12"
+ />
+ <PromptInputFooter className="justify-end pt-2">
+ <PromptInputSubmit
+ disabled={isLoading}
+ status={isLoading ? "streaming" : "ready"}
+ />
+ </PromptInputFooter>
+ </PromptInput>
+ </div>
+ </div>
+ );
+}
diff --git a/ee/features/ai/components/viewer-chat-provider.tsx b/ee/features/ai/components/viewer-chat-provider.tsx
new file mode 100644
index 00000000..6bfbd421
--- /dev/null
+++ b/ee/features/ai/components/viewer-chat-provider.tsx
@@ -0,0 +1,183 @@
+"use client";
+
+import {
+ type ReactNode,
+ createContext,
+ useCallback,
+ useContext,
+ useState,
+} from "react";
+
+import { cn } from "@/lib/utils";
+
+// ============================================================================
+// Types
+// ============================================================================
+
+interface ViewerChatConfig {
+ dataroomId?: string;
+ dataroomName?: string;
+ documentId?: string;
+ documentName?: string;
+ linkId?: string;
+ viewId?: string;
+ viewerId?: string;
+}
+
+// interface FocusedDocument {
+// id: string;
+// name: string;
+// }
+
+interface ViewerChatContextType {
+ // State
+ isOpen: boolean;
+ isEnabled: boolean;
+ config: ViewerChatConfig;
+ // focusedDocument: FocusedDocument | null;
+
+ // Actions
+ open: () => void;
+ close: () => void;
+ toggle: () => void;
+ // setFocusedDocument: (doc: FocusedDocument | null) => void;
+}
+
+// ============================================================================
+// Context
+// ============================================================================
+
+const ViewerChatContext = createContext<ViewerChatContextType | null>(null);
+
+/**
+ * Hook to access chat state and actions.
+ * Throws if used outside ViewerChatProvider.
+ */
+export function useViewerChat() {
+ const context = useContext(ViewerChatContext);
+ if (!context) {
+ throw new Error("useViewerChat must be used within ViewerChatProvider");
+ }
+ return context;
+}
+
+/**
+ * Safe hook that returns null if not within ViewerChatProvider.
+ * Useful for components that may or may not be within a chat context.
+ */
+export function useViewerChatSafe() {
+ return useContext(ViewerChatContext);
+}
+
+// ============================================================================
+// Provider
+// ============================================================================
+
+interface ViewerChatProviderProps {
+ children: ReactNode;
+ enabled?: boolean;
+ dataroomId?: string;
+ dataroomName?: string;
+ documentId?: string;
+ documentName?: string;
+ linkId?: string;
+ viewId?: string;
+ viewerId?: string;
+ // /** For dataroom document views - the currently focused document */
+ // focusedDocumentId?: string;
+ // focusedDocumentName?: string;
+}
+
+export function ViewerChatProvider({
+ children,
+ enabled = false,
+ dataroomId,
+ dataroomName,
+ documentId,
+ documentName,
+ linkId,
+ viewId,
+ viewerId,
+ // focusedDocumentId,
+ // focusedDocumentName,
+}: ViewerChatProviderProps) {
+ const [isOpen, setIsOpen] = useState(false);
+ // const [focusedDocument, setFocusedDocumentState] =
+ // useState<FocusedDocument | null>(
+ // focusedDocumentId && focusedDocumentName
+ // ? { id: focusedDocumentId, name: focusedDocumentName }
+ // : null,
+ // );
+
+ const open = useCallback(() => setIsOpen(true), []);
+ const close = useCallback(() => setIsOpen(false), []);
+ const toggle = useCallback(() => setIsOpen((prev) => !prev), []);
+ // const setFocusedDocument = useCallback(
+ // (doc: FocusedDocument | null) => setFocusedDocumentState(doc),
+ // [],
+ // );
+
+ const config: ViewerChatConfig = {
+ dataroomId,
+ dataroomName,
+ documentId,
+ documentName,
+ linkId,
+ viewId,
+ viewerId,
+ };
+
+ const value: ViewerChatContextType = {
+ isOpen,
+ isEnabled: enabled,
+ config,
+ // focusedDocument,
+ open,
+ close,
+ toggle,
+ // setFocusedDocument,
+ };
+
+ return (
+ <ViewerChatContext.Provider value={value}>
+ {children}
+ </ViewerChatContext.Provider>
+ );
+}
+
+// ============================================================================
+// Layout Component - Applies padding when chat is open
+// ============================================================================
+
+interface ViewerChatLayoutProps {
+ children: ReactNode;
+ className?: string;
+}
+
+/**
+ * Layout wrapper that applies padding when chat panel is open.
+ * Use this to wrap content that should shrink when chat opens.
+ */
+export function ViewerChatLayout({
+ children,
+ className,
+}: ViewerChatLayoutProps) {
+ const context = useViewerChatSafe();
+
+ // If not in provider or not enabled, just render children
+ if (!context || !context.isEnabled) {
+ return <>{children}</>;
+ }
+
+ return (
+ <div
+ className={cn(
+ "transition-all duration-300",
+ context.isOpen && "pr-[400px]",
+ className,
+ )}
+ >
+ {children}
+ </div>
+ );
+}
diff --git a/ee/features/ai/components/viewer-chat-toggle.tsx b/ee/features/ai/components/viewer-chat-toggle.tsx
new file mode 100644
index 00000000..900596f1
--- /dev/null
+++ b/ee/features/ai/components/viewer-chat-toggle.tsx
@@ -0,0 +1,37 @@
+"use client";
+
+import { MessageSquare } from "lucide-react";
+
+import { Button } from "@/components/ui/button";
+
+import { useViewerChatSafe } from "./viewer-chat-provider";
+
+interface ViewerChatToggleProps {
+ className?: string;
+}
+
+/**
+ * Floating toggle button for the chat panel.
+ * Only renders when chat is enabled and closed.
+ * Place this anywhere in the component tree within ViewerChatProvider.
+ */
+export function ViewerChatToggle({ className }: ViewerChatToggleProps) {
+ const context = useViewerChatSafe();
+
+ // Don't render if not in provider, not enabled, or already open
+ if (!context || !context.isEnabled || context.isOpen) {
+ return null;
+ }
+
+ return (
+ <Button
+ onClick={context.open}
+ className="fixed bottom-4 right-4 z-40 gap-2 rounded-full shadow-lg"
+ size="lg"
+ >
+ <MessageSquare className="size-5" />
+ AI Chat
+ </Button>
+ );
+}
+
diff --git a/ee/features/ai/components/viewer-thread-selector.tsx b/ee/features/ai/components/viewer-thread-selector.tsx
new file mode 100644
index 00000000..b7b19f97
--- /dev/null
+++ b/ee/features/ai/components/viewer-thread-selector.tsx
@@ -0,0 +1,260 @@
+"use client";
+
+import { useMemo } from "react";
+
+import {
+ differenceInDays,
+ format,
+ isThisWeek,
+ isToday,
+ startOfDay,
+} from "date-fns";
+import {
+ ChevronDown,
+ Loader2,
+ MessageSquare,
+ Plus,
+ Trash2,
+} from "lucide-react";
+import useSWR from "swr";
+
+import { cn, fetcher } from "@/lib/utils";
+
+import { Button } from "@/components/ui/button";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+
+interface Chat {
+ id: string;
+ title: string | null;
+ createdAt: string;
+ lastMessageAt: string | null;
+ messages?: { content: string }[];
+}
+
+interface GroupedChats {
+ today: Chat[];
+ thisWeek: Chat[];
+ older: Chat[];
+}
+
+interface ViewerThreadSelectorProps {
+ currentChatId: string | null;
+ currentChatTitle?: string;
+ onSelectChat: (chatId: string) => void;
+ onNewChat: () => void;
+ onDeleteChat?: (chatId: string) => void;
+ documentId?: string;
+ dataroomId?: string;
+ linkId?: string;
+ viewerId?: string;
+ viewId?: string;
+}
+
+function groupChatsByDate(chats: Chat[]): GroupedChats {
+ const grouped: GroupedChats = {
+ today: [],
+ thisWeek: [],
+ older: [],
+ };
+
+ const now = new Date();
+
+ chats.forEach((chat) => {
+ const chatDate = new Date(chat.lastMessageAt || chat.createdAt);
+
+ if (isToday(chatDate)) {
+ grouped.today.push(chat);
+ } else if (isThisWeek(chatDate, { weekStartsOn: 1 })) {
+ grouped.thisWeek.push(chat);
+ } else {
+ grouped.older.push(chat);
+ }
+ });
+
+ return grouped;
+}
+
+function getChatDisplayTitle(chat: Chat): string {
+ if (chat.title) return chat.title;
+ if (chat.messages?.[0]?.content) {
+ const preview = chat.messages[0].content.slice(0, 40);
+ return preview.length < chat.messages[0].content.length
+ ? `${preview}...`
+ : preview;
+ }
+ return "New Chat";
+}
+
+export function ViewerThreadSelector({
+ currentChatId,
+ currentChatTitle,
+ onSelectChat,
+ onNewChat,
+ onDeleteChat,
+ documentId,
+ dataroomId,
+ linkId,
+ viewerId,
+ viewId,
+}: ViewerThreadSelectorProps) {
+ // Build query params for viewer-based chat listing
+ const params = new URLSearchParams();
+ if (viewerId) params.append("viewerId", viewerId);
+ if (documentId) params.append("documentId", documentId);
+ if (dataroomId) params.append("dataroomId", dataroomId);
+ if (linkId) params.append("linkId", linkId);
+ if (viewId) params.append("viewId", viewId);
+
+ const shouldFetch = viewerId && (documentId || dataroomId);
+
+ const {
+ data: chats,
+ isLoading,
+ mutate,
+ } = useSWR<Chat[]>(
+ shouldFetch ? `/api/ai/chat?${params.toString()}` : null,
+ fetcher,
+ );
+
+ const groupedChats = useMemo(() => {
+ if (!chats) return { today: [], thisWeek: [], older: [] };
+ return groupChatsByDate(chats);
+ }, [chats]);
+
+ const currentChat = chats?.find((chat) => chat.id === currentChatId);
+ const displayTitle =
+ currentChatTitle ||
+ getChatDisplayTitle(currentChat || ({} as Chat)) ||
+ "New Chat";
+
+ const handleDeleteChat = async (chatId: string, e: React.MouseEvent) => {
+ e.stopPropagation();
+ if (onDeleteChat) {
+ onDeleteChat(chatId);
+ }
+ // If deleting current chat, trigger new chat
+ if (chatId === currentChatId) {
+ onNewChat();
+ }
+ // Optimistically update the list
+ mutate(
+ chats?.filter((c) => c.id !== chatId),
+ false,
+ );
+ };
+
+ const renderChatItem = (chat: Chat) => (
+ <DropdownMenuItem
+ key={chat.id}
+ onClick={() => onSelectChat(chat.id)}
+ className={cn(
+ "group flex cursor-pointer items-center justify-between gap-2",
+ chat.id === currentChatId && "bg-gray-100",
+ )}
+ >
+ <div className="flex min-w-0 flex-1 flex-col gap-0.5">
+ <p className="truncate text-sm font-medium">
+ {getChatDisplayTitle(chat)}
+ </p>
+ <p className="text-xs text-gray-500">
+ {format(
+ new Date(chat.lastMessageAt || chat.createdAt),
+ "MMM d, h:mm a",
+ )}
+ </p>
+ </div>
+ {onDeleteChat && (
+ <Button
+ variant="ghost"
+ size="sm"
+ className="size-6 p-0 opacity-0 group-hover:opacity-100"
+ onClick={(e) => handleDeleteChat(chat.id, e)}
+ >
+ <Trash2 className="size-3.5 text-gray-500 hover:text-red-500" />
+ </Button>
+ )}
+ </DropdownMenuItem>
+ );
+
+ const hasChats =
+ groupedChats.today.length > 0 ||
+ groupedChats.thisWeek.length > 0 ||
+ groupedChats.older.length > 0;
+
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button
+ variant="ghost"
+ size="sm"
+ className="h-8 max-w-[180px] gap-1.5 px-2 hover:bg-gray-100"
+ >
+ <MessageSquare className="size-4 shrink-0" />
+ <span className="truncate text-sm font-medium">{displayTitle}</span>
+ <ChevronDown className="size-3 shrink-0 opacity-60" />
+ </Button>
+ </DropdownMenuTrigger>
+
+ <DropdownMenuContent align="start" className="w-full">
+ <div className="max-h-[400px] overflow-y-auto">
+ {hasChats && !isLoading ? (
+ <>
+ {/* Today */}
+ {groupedChats.today.length > 0 && (
+ <>
+ <DropdownMenuLabel className="text-xs font-medium text-gray-500">
+ Today
+ </DropdownMenuLabel>
+ {groupedChats.today.map(renderChatItem)}
+ </>
+ )}
+
+ {/* This Week */}
+ {groupedChats.thisWeek.length > 0 && (
+ <>
+ {groupedChats.today.length > 0 && <DropdownMenuSeparator />}
+ <DropdownMenuLabel className="text-xs font-medium text-gray-500">
+ This Week
+ </DropdownMenuLabel>
+ {groupedChats.thisWeek.map(renderChatItem)}
+ </>
+ )}
+
+ {/* Older */}
+ {groupedChats.older.length > 0 && (
+ <>
+ {(groupedChats.today.length > 0 ||
+ groupedChats.thisWeek.length > 0) && (
+ <DropdownMenuSeparator />
+ )}
+ <DropdownMenuLabel className="text-xs font-medium text-gray-500">
+ Older
+ </DropdownMenuLabel>
+ {groupedChats.older.map(renderChatItem)}
+ </>
+ )}
+ </>
+ ) : isLoading ? (
+ <div className="flex items-center gap-2 p-4">
+ <Loader2 className="size-4 animate-spin" />
+ <span className="text-sm text-gray-500">
+ Loading chat history...
+ </span>
+ </div>
+ ) : (
+ <div className="px-2 py-4 text-center text-sm text-gray-500">
+ No chat history yet
+ </div>
+ )}
+ </div>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+}
diff --git a/ee/features/ai/lib/chat/create-chat.ts b/ee/features/ai/lib/chat/create-chat.ts
new file mode 100644
index 00000000..cb5a38cd
--- /dev/null
+++ b/ee/features/ai/lib/chat/create-chat.ts
@@ -0,0 +1,57 @@
+import prisma from "@/lib/prisma";
+
+interface CreateChatOptions {
+ teamId: string;
+ documentId?: string;
+ dataroomId?: string;
+ linkId?: string;
+ viewId?: string;
+ userId?: string;
+ viewerId?: string;
+ vectorStoreId?: string;
+ title?: string;
+}
+
+/**
+ * Create a new chat session
+ * @param options - Chat creation options
+ * @returns The created chat
+ */
+export async function createChat(options: CreateChatOptions) {
+ const {
+ teamId,
+ documentId,
+ dataroomId,
+ linkId,
+ viewId,
+ userId,
+ viewerId,
+ vectorStoreId,
+ title,
+ } = options;
+
+ try {
+ const chat = await prisma.chat.create({
+ data: {
+ teamId,
+ documentId,
+ dataroomId,
+ linkId,
+ viewId,
+ userId,
+ viewerId,
+ vectorStoreId,
+ title,
+ },
+ include: {
+ messages: true,
+ },
+ });
+
+ return chat;
+ } catch (error) {
+ console.error("Error creating chat:", error);
+ throw new Error("Failed to create chat");
+ }
+}
+
diff --git a/ee/features/ai/lib/chat/generate-chat-title.ts b/ee/features/ai/lib/chat/generate-chat-title.ts
new file mode 100644
index 00000000..af5ca6c1
--- /dev/null
+++ b/ee/features/ai/lib/chat/generate-chat-title.ts
@@ -0,0 +1,36 @@
+import { openai } from "@ai-sdk/openai";
+import { generateText } from "ai";
+
+/**
+ * Generate a chat title from the first message
+ * @param firstMessage - The first user message
+ * @returns Generated title
+ */
+export async function generateChatTitle(firstMessage: string): Promise<string> {
+ try {
+ // Limit message length for title generation
+ const truncatedMessage = firstMessage.slice(0, 200);
+
+ const { text } = await generateText({
+ model: openai("gpt-4o-mini"),
+ prompt: `Generate a short, descriptive title (max 6 words) for a chat that starts with this message: "${truncatedMessage}". Only return the title, nothing else.`,
+ providerOptions: {
+ openai: {
+ maxOutputTokens: 20,
+ },
+ },
+ });
+
+ // Clean up the title
+ const title = text
+ .trim()
+ .replace(/^["']|["']$/g, "") // Remove quotes
+ .slice(0, 60); // Max 60 chars
+
+ return title;
+ } catch (error) {
+ console.error("Error generating chat title:", error);
+ // Return a default title based on first few words
+ return firstMessage.slice(0, 50) + (firstMessage.length > 50 ? "..." : "");
+ }
+}
diff --git a/ee/features/ai/lib/chat/get-filtered-dataroom-document-ids.ts b/ee/features/ai/lib/chat/get-filtered-dataroom-document-ids.ts
new file mode 100644
index 00000000..3d32967b
--- /dev/null
+++ b/ee/features/ai/lib/chat/get-filtered-dataroom-document-ids.ts
@@ -0,0 +1,70 @@
+import prisma from "@/lib/prisma";
+
+/**
+ * Get filtered dataroom document IDs based on link permissions
+ * @param dataroomId - The dataroom ID
+ * @param linkId - The link ID (optional, for external visitors)
+ * @returns Array of accessible dataroom document IDs
+ */
+export async function getFilteredDataroomDocumentIds(
+ dataroomId: string,
+ linkId?: string,
+): Promise<string[]> {
+ try {
+ // If external visitor with link, check permission groups
+ if (!linkId) {
+ return [];
+ }
+
+ const link = await prisma.link.findUnique({
+ where: { id: linkId, dataroomId },
+ select: {
+ permissionGroupId: true,
+ groupId: true,
+ },
+ });
+
+ if (!link) {
+ return [];
+ }
+
+ let accessibleDocuments: { itemId: string }[] = [];
+
+ if (link.permissionGroupId) {
+ accessibleDocuments = await prisma.permissionGroupAccessControls.findMany(
+ {
+ where: {
+ groupId: link.permissionGroupId,
+ itemType: "DATAROOM_DOCUMENT",
+ canView: true,
+ },
+ select: {
+ itemId: true,
+ },
+ },
+ );
+ }
+
+ if (link.groupId) {
+ accessibleDocuments = await prisma.viewerGroupAccessControls.findMany({
+ where: {
+ groupId: link.groupId,
+ itemType: "DATAROOM_DOCUMENT",
+ canView: true,
+ },
+ select: {
+ itemId: true,
+ },
+ });
+ }
+
+ const dataroomDocumentIds = accessibleDocuments.map(
+ (document) => document.itemId,
+ );
+
+ return dataroomDocumentIds;
+ } catch (error) {
+ console.error("Error getting filtered file IDs:", error);
+ throw new Error("Failed to get filtered file IDs");
+ }
+}
diff --git a/ee/features/ai/lib/chat/send-message.ts b/ee/features/ai/lib/chat/send-message.ts
new file mode 100644
index 00000000..6e2a54c0
--- /dev/null
+++ b/ee/features/ai/lib/chat/send-message.ts
@@ -0,0 +1,117 @@
+import { OpenAIResponsesProviderOptions, openai } from "@ai-sdk/openai";
+import { streamText } from "ai";
+
+import prisma from "@/lib/prisma";
+
+interface SendMessageOptions {
+ chatId: string;
+ content: string;
+ vectorStoreId: string;
+ filteredDataroomDocumentIds?: string[];
+ /** Filter file_search results to a specific document by its ID */
+ filterDocumentId?: string;
+}
+
+/**
+ * Send a message and get streaming response
+ * Uses AI SDK with OpenAI file_search tool
+ */
+export async function sendMessage({
+ chatId,
+ content,
+ vectorStoreId,
+ filteredDataroomDocumentIds,
+ filterDocumentId,
+}: SendMessageOptions) {
+ // Get conversation history from database
+ const history = await prisma.chatMessage.findMany({
+ where: { chatId },
+ orderBy: { createdAt: "asc" },
+ take: 10,
+ });
+
+ // Save user message
+ await prisma.chatMessage.create({
+ data: { chatId, role: "user", content },
+ });
+
+ // Build messages for AI SDK
+ const messages = [
+ {
+ role: "system" as const,
+ content: `You are a helpful AI assistant answering questions about documents.
+Use the file_search tool to find relevant information from the documents.
+Always cite sources with document names and page numbers when providing information.
+If you cannot find the answer in the documents, say so clearly.`,
+ },
+ ...history.map((m) => ({
+ role: m.role as "user" | "assistant",
+ content: m.content,
+ })),
+ { role: "user" as const, content },
+ ];
+
+ // Build file_search tool options with optional document filter
+ const fileSearchOptions: Parameters<typeof openai.tools.fileSearch>[0] = {
+ vectorStoreIds: [vectorStoreId],
+ };
+
+ // Add document filter when viewing a specific document in a dataroom
+ if (filterDocumentId) {
+ fileSearchOptions.filters = {
+ type: "eq",
+ key: "documentId",
+ value: filterDocumentId,
+ };
+ }
+
+ if (filteredDataroomDocumentIds) {
+ fileSearchOptions.filters = {
+ type: "in",
+ key: "dataroomDocumentId",
+ value: filteredDataroomDocumentIds,
+ };
+ }
+
+ // Use AI SDK streamText with file_search tool
+ const result = streamText({
+ model: openai.responses("gpt-4o-mini"),
+ messages,
+ tools: {
+ file_search: openai.tools.fileSearch(fileSearchOptions),
+ },
+ providerOptions: {
+ openai: {
+ previousResponseId:
+ history.length > 0
+ ? (history[history.length - 1].metadata as { responseId: string })
+ ?.responseId
+ : null,
+ } satisfies OpenAIResponsesProviderOptions,
+ },
+ onFinish: async ({ text, usage, response }) => {
+ await Promise.all([
+ prisma.chatMessage.create({
+ data: {
+ chatId,
+ role: "assistant",
+ content: text,
+ metadata: {
+ usage,
+ vectorStoreId,
+ responseId: response.id,
+ modelId: response.modelId,
+ filters: fileSearchOptions.filters,
+ },
+ },
+ }),
+ prisma.chat.update({
+ where: { id: chatId },
+ data: { lastMessageAt: new Date() },
+ }),
+ ]);
+ },
+ });
+
+ return result;
+}
diff --git a/ee/features/ai/lib/file-processing/extract-document-metadata.ts b/ee/features/ai/lib/file-processing/extract-document-metadata.ts
new file mode 100644
index 00000000..dc59bf64
--- /dev/null
+++ b/ee/features/ai/lib/file-processing/extract-document-metadata.ts
@@ -0,0 +1,63 @@
+import prisma from "@/lib/prisma";
+
+interface DocumentMetadata {
+ documentId: string;
+ documentName: string;
+ versionId: string;
+ dataroomId?: string;
+ folderId?: string;
+ teamId: string;
+}
+
+/**
+ * Extract metadata from a document for vector store tagging
+ * @param documentId - The document ID
+ * @param versionId - The document version ID
+ * @returns Document metadata
+ */
+export async function extractDocumentMetadata(
+ documentId: string,
+ versionId: string,
+): Promise<DocumentMetadata> {
+ try {
+ const documentVersion = await prisma.documentVersion.findUnique({
+ where: { id: versionId },
+ include: {
+ document: {
+ include: {
+ datarooms: {
+ include: {
+ dataroom: true,
+ folder: true,
+ },
+ },
+ },
+ },
+ },
+ });
+
+ if (!documentVersion) {
+ throw new Error("Document version not found");
+ }
+
+ const document = documentVersion.document;
+
+ // Get dataroom and folder info if document is in a dataroom
+ const dataroomDocument = document.datarooms[0]; // Get first dataroom association
+
+ const metadata: DocumentMetadata = {
+ documentId: document.id,
+ documentName: document.name,
+ versionId: documentVersion.id,
+ teamId: document.teamId,
+ dataroomId: dataroomDocument?.dataroomId,
+ folderId: dataroomDocument?.folderId || document.folderId || undefined,
+ };
+
+ return metadata;
+ } catch (error) {
+ console.error("Error extracting document metadata:", error);
+ throw new Error("Failed to extract document metadata");
+ }
+}
+
diff --git a/ee/features/ai/lib/file-processing/process-document-for-vector-store.ts b/ee/features/ai/lib/file-processing/process-document-for-vector-store.ts
new file mode 100644
index 00000000..21ae057a
--- /dev/null
+++ b/ee/features/ai/lib/file-processing/process-document-for-vector-store.ts
@@ -0,0 +1,51 @@
+import { openai } from "@/ee/features/ai/lib/models/openai";
+import { DocumentStorageType } from "@prisma/client";
+import { toFile } from "openai";
+import path from "path";
+
+import { getFile } from "@/lib/files/get-file";
+
+/**
+ * Process a document and prepare it for vector store upload
+ * Downloads the file from storage and returns it as a buffer
+ * @param filePath - The file path/key in storage
+ * @param storageType - The storage type (S3_PATH or VERCEL_BLOB)
+ * @returns File ID
+ */
+export async function processDocumentForVectorStore(
+ filePath: string,
+ storageType: DocumentStorageType,
+): Promise<{ fileId: string }> {
+ try {
+ // Get the file URL
+ const fileUrl = await getFile({
+ type: storageType,
+ data: filePath,
+ isDownload: true,
+ });
+
+ // Fetch the file
+ const response = await fetch(fileUrl);
+ if (!response.ok) {
+ throw new Error(`Failed to fetch file: ${response.statusText}`);
+ }
+
+ // Extract filename from the original file path (not the presigned URL)
+ const fileName = path.basename(filePath);
+
+ // Convert response to buffer and create a properly named file
+ // This prevents OpenAI from inferring extension from URL query params
+ // const buffer = await response.arrayBuffer();
+ const file = await toFile(response, fileName, { type: "application/pdf" });
+
+ const fileResponse = await openai.files.create({
+ file,
+ purpose: "assistants",
+ });
+
+ return { fileId: fileResponse.id };
+ } catch (error) {
+ console.error("Error processing document for vector store:", error);
+ throw new Error("Failed to process document for vector store");
+ }
+}
diff --git a/ee/features/ai/lib/models/openai.ts b/ee/features/ai/lib/models/openai.ts
new file mode 100644
index 00000000..34f36e46
--- /dev/null
+++ b/ee/features/ai/lib/models/openai.ts
@@ -0,0 +1,5 @@
+import { OpenAI } from "openai";
+
+export const openai = new OpenAI({
+ apiKey: process.env.OPENAI_API_KEY,
+});
diff --git a/ee/features/ai/lib/permissions/validate-chat-access.ts b/ee/features/ai/lib/permissions/validate-chat-access.ts
new file mode 100644
index 00000000..e46545ba
--- /dev/null
+++ b/ee/features/ai/lib/permissions/validate-chat-access.ts
@@ -0,0 +1,81 @@
+import prisma from "@/lib/prisma";
+
+interface ValidateChatAccessOptions {
+ chatId: string;
+ userId?: string;
+ viewerId?: string;
+}
+
+/**
+ * Validate if a user or viewer has access to a chat
+ * @param options - Chat ID and user/viewer ID
+ * @returns Boolean indicating if access is granted
+ */
+export async function validateChatAccess({
+ chatId,
+ userId,
+ viewerId,
+}: ValidateChatAccessOptions): Promise<boolean> {
+ try {
+ const chat = await prisma.chat.findUnique({
+ where: { id: chatId },
+ select: {
+ teamId: true,
+ userId: true,
+ viewerId: true,
+ },
+ });
+
+ if (!chat) {
+ return false;
+ }
+
+ // Internal user access
+ if (userId) {
+ // Check if user is member of the team
+ const userTeam = await prisma.userTeam.findUnique({
+ where: {
+ userId_teamId: {
+ userId,
+ teamId: chat.teamId,
+ },
+ },
+ });
+
+ if (!userTeam) {
+ return false;
+ }
+
+ // Additional check: if chat has a specific userId, it must match
+ if (chat.userId && chat.userId !== userId) {
+ return false;
+ }
+
+ return true;
+ }
+
+ // External viewer access
+ if (viewerId) {
+ // Check if viewer is associated with this chat
+ if (chat.viewerId !== viewerId) {
+ return false;
+ }
+
+ // Verify viewer exists and is associated with the team
+ const viewer = await prisma.viewer.findUnique({
+ where: { id: viewerId },
+ });
+
+ if (!viewer || viewer.teamId !== chat.teamId) {
+ return false;
+ }
+
+ return true;
+ }
+
+ return false;
+ } catch (error) {
+ console.error("Error validating chat access:", error);
+ return false;
+ }
+}
diff --git a/ee/features/ai/lib/stream/parse-text-stream.ts b/ee/features/ai/lib/stream/parse-text-stream.ts
new file mode 100644
index 00000000..6b909791
--- /dev/null
+++ b/ee/features/ai/lib/stream/parse-text-stream.ts
@@ -0,0 +1,52 @@
+/**
+ * Parser for AI SDK's toTextStreamResponse() format
+ * Handles plain text stream (no SSE, no JSON structure)
+ */
+
+export interface TextStreamCallbacks {
+ onTextDelta?: (delta: string, accumulated: string) => void;
+ onTextEnd?: (content: string) => void;
+ onError?: (error: Error) => void;
+}
+
+export interface TextStreamResult {
+ content: string;
+}
+
+/**
+ * Parse the text stream from toTextStreamResponse()
+ * This is a simple text-only stream with no structured events
+ */
+export async function parseTextStream(
+ reader: ReadableStreamDefaultReader<Uint8Array>,
+ callbacks: TextStreamCallbacks,
+): Promise<TextStreamResult> {
+ const decoder = new TextDecoder();
+ let content = "";
+
+ try {
+ while (true) {
+ const { done, value } = await reader.read();
+ if (done) break;
+
+ const chunk = decoder.decode(value, { stream: true });
+ content += chunk;
+ callbacks.onTextDelta?.(chunk, content);
+ }
+
+ // Flush decoder
+ const remaining = decoder.decode();
+ if (remaining) {
+ content += remaining;
+ callbacks.onTextDelta?.(remaining, content);
+ }
+ } catch (error) {
+ callbacks.onError?.(error as Error);
+ throw error;
+ }
+
+ callbacks.onTextEnd?.(content);
+
+ return { content };
+}
+
diff --git a/ee/features/ai/lib/vector-stores/create-dataroom-vector-store.ts b/ee/features/ai/lib/vector-stores/create-dataroom-vector-store.ts
new file mode 100644
index 00000000..e4139d17
--- /dev/null
+++ b/ee/features/ai/lib/vector-stores/create-dataroom-vector-store.ts
@@ -0,0 +1,34 @@
+import { openai } from "@/ee/features/ai/lib/models/openai";
+
+/**
+ * Create a vector store for a dataroom
+ * @param dataroomId - The dataroom ID
+ * @param teamId - The team ID
+ * @param name - The name of the vector store
+ * @returns The vector store ID
+ */
+export async function createDataroomVectorStore({
+ dataroomId,
+ teamId,
+ name,
+}: {
+ dataroomId: string;
+ teamId: string;
+ name: string;
+}): Promise<string> {
+ try {
+ const vectorStore = await openai.vectorStores.create({
+ name: `Dataroom: ${name}`,
+ metadata: {
+ dataroomId,
+ teamId,
+ type: "dataroom",
+ },
+ });
+
+ return vectorStore.id;
+ } catch (error) {
+ console.error("Error creating dataroom vector store:", error);
+ throw new Error("Failed to create dataroom vector store");
+ }
+}
diff --git a/ee/features/ai/lib/vector-stores/create-team-vector-store.ts b/ee/features/ai/lib/vector-stores/create-team-vector-store.ts
new file mode 100644
index 00000000..2b4ee1b4
--- /dev/null
+++ b/ee/features/ai/lib/vector-stores/create-team-vector-store.ts
@@ -0,0 +1,27 @@
+import { openai } from "@/ee/features/ai/lib/models/openai";
+
+/**
+ * Create a vector store for a team
+ * @param teamId - The team ID
+ * @param name - The team name
+ * @returns The vector store ID
+ */
+export async function createTeamVectorStore(
+ teamId: string,
+ name: string,
+): Promise<string> {
+ try {
+ const vectorStore = await openai.vectorStores.create({
+ name: `Team: ${name}`,
+ metadata: {
+ teamId,
+ type: "team",
+ },
+ });
+
+ return vectorStore.id;
+ } catch (error) {
+ console.error("Error creating team vector store:", error);
+ throw new Error("Failed to create team vector store");
+ }
+}
diff --git a/ee/features/ai/lib/vector-stores/delete-vector-store.ts b/ee/features/ai/lib/vector-stores/delete-vector-store.ts
new file mode 100644
index 00000000..ff024fd7
--- /dev/null
+++ b/ee/features/ai/lib/vector-stores/delete-vector-store.ts
@@ -0,0 +1,14 @@
+import { openai } from "@/ee/features/ai/lib/models/openai";
+
+/**
+ * Delete a vector store
+ * @param vectorStoreId - The vector store ID to delete
+ */
+export async function deleteVectorStore(vectorStoreId: string): Promise<void> {
+ try {
+ await openai.vectorStores.delete(vectorStoreId);
+ } catch (error) {
+ console.error("Error deleting vector store:", error);
+ throw new Error("Failed to delete vector store");
+ }
+}
diff --git a/ee/features/ai/lib/vector-stores/get-vector-store-files.ts b/ee/features/ai/lib/vector-stores/get-vector-store-files.ts
new file mode 100644
index 00000000..aec55e5f
--- /dev/null
+++ b/ee/features/ai/lib/vector-stores/get-vector-store-files.ts
@@ -0,0 +1,26 @@
+import { openai } from "@/ee/features/ai/lib/models/openai";
+
+interface VectorStoreFile {
+ id: string;
+ object: string;
+ created_at: number;
+ vector_store_id: string;
+ status: string;
+}
+
+/**
+ * Get all files in a vector store
+ * @param vectorStoreId - The vector store ID
+ * @returns Array of vector store files
+ */
+export async function getVectorStoreFiles(
+ vectorStoreId: string,
+): Promise<VectorStoreFile[]> {
+ try {
+ const files = await openai.vectorStores.files.list(vectorStoreId);
+ return files.data as VectorStoreFile[];
+ } catch (error) {
+ console.error("Error getting vector store files:", error);
+ throw new Error("Failed to get vector store files");
+ }
+}
diff --git a/ee/features/ai/lib/vector-stores/get-vector-store-info.ts b/ee/features/ai/lib/vector-stores/get-vector-store-info.ts
new file mode 100644
index 00000000..2339b1e2
--- /dev/null
+++ b/ee/features/ai/lib/vector-stores/get-vector-store-info.ts
@@ -0,0 +1,32 @@
+import { openai } from "@/ee/features/ai/lib/models/openai";
+
+interface VectorStoreInfo {
+ id: string;
+ name: string;
+ file_counts: {
+ in_progress: number;
+ completed: number;
+ failed: number;
+ cancelled: number;
+ total: number;
+ };
+ created_at: number;
+ metadata: Record<string, string>;
+}
+
+/**
+ * Get information about a vector store
+ * @param vectorStoreId - The vector store ID
+ * @returns Vector store information
+ */
+export async function getVectorStoreInfo(
+ vectorStoreId: string,
+): Promise<VectorStoreInfo> {
+ try {
+ const vectorStore = await openai.vectorStores.retrieve(vectorStoreId);
+ return vectorStore as VectorStoreInfo;
+ } catch (error) {
+ console.error("Error getting vector store info:", error);
+ throw new Error("Failed to get vector store info");
+ }
+}
diff --git a/ee/features/ai/lib/vector-stores/remove-file-from-vector-store.ts b/ee/features/ai/lib/vector-stores/remove-file-from-vector-store.ts
new file mode 100644
index 00000000..2e361970
--- /dev/null
+++ b/ee/features/ai/lib/vector-stores/remove-file-from-vector-store.ts
@@ -0,0 +1,20 @@
+import { openai } from "@/ee/features/ai/lib/models/openai";
+
+/**
+ * Remove a file from a vector store
+ * @param vectorStoreId - The vector store ID
+ * @param fileId - The file ID to remove
+ */
+export async function removeFileFromVectorStore(
+ vectorStoreId: string,
+ fileId: string,
+): Promise<void> {
+ try {
+ await openai.vectorStores.files.delete(fileId, {
+ vector_store_id: vectorStoreId,
+ });
+ } catch (error) {
+ console.error("Error removing file from vector store:", error);
+ throw new Error("Failed to remove file from vector store");
+ }
+}
diff --git a/ee/features/ai/lib/vector-stores/upload-file-to-vector-store.ts b/ee/features/ai/lib/vector-stores/upload-file-to-vector-store.ts
new file mode 100644
index 00000000..43af5f45
--- /dev/null
+++ b/ee/features/ai/lib/vector-stores/upload-file-to-vector-store.ts
@@ -0,0 +1,43 @@
+import { openai } from "@/ee/features/ai/lib/models/openai";
+
+interface VectorStoreFileOptions {
+ vectorStoreId: string;
+ fileId: string;
+ metadata: {
+ teamId: string;
+ documentId: string;
+ documentName: string;
+ versionId: string;
+ folderId?: string;
+ dataroomId?: string;
+ dataroomDocumentId?: string;
+ dataroomFolderId?: string;
+ };
+}
+
+/**
+ * Upload a file to a vector store
+ * @param options - Vector store file options including vector store ID, file ID, and metadata
+ * @returns The vector store file ID
+ */
+export async function addFileToVectorStore({
+ vectorStoreId,
+ fileId,
+ metadata,
+}: VectorStoreFileOptions): Promise<string> {
+ try {
+ // Add file to vector store with metadata
+ const vectorStoreFile = await openai.vectorStores.files.create(
+ vectorStoreId,
+ {
+ file_id: fileId,
+ attributes: metadata,
+ },
+ );
+
+ return vectorStoreFile.id;
+ } catch (error) {
+ console.error("Error adding file to vector store:", error);
+ throw new Error("Failed to add file to vector store");
+ }
+}
diff --git a/ee/features/ai/schemas/chat.ts b/ee/features/ai/schemas/chat.ts
new file mode 100644
index 00000000..c810e33f
--- /dev/null
+++ b/ee/features/ai/schemas/chat.ts
@@ -0,0 +1,85 @@
+import { z } from "zod";
+
+/**
+ * Schema for creating a new chat
+ */
+export const createChatSchema = z.object({
+ documentId: z.string().cuid().optional(),
+ dataroomId: z.string().cuid().optional(),
+ linkId: z.string().cuid().optional(),
+ viewId: z.string().cuid().optional(),
+ title: z.string().max(100).optional(),
+ viewerId: z.string().cuid().optional(),
+});
+
+/**
+ * Schema for sending a message
+ */
+export const sendMessageSchema = z.object({
+ content: z.string().min(1).max(10000),
+ /** Optional document ID to filter file_search results to a specific document */
+ filterDocumentId: z.string().cuid().optional(),
+});
+
+/**
+ * Schema for indexing a document
+ */
+export const indexDocumentSchema = z.object({
+ documentId: z.string().cuid(),
+ versionId: z.string().cuid().optional(),
+});
+
+/**
+ * Schema for indexing a dataroom
+ */
+export const indexDataroomSchema = z.object({
+ dataroomId: z.string().cuid(),
+ documentIds: z.array(z.string().cuid()).optional(),
+});
+
+/**
+ * Schema for chat query parameters
+ */
+export const chatQuerySchema = z.object({
+ teamId: z.string().cuid().optional(),
+ documentId: z.string().cuid().optional(),
+ dataroomId: z.string().cuid().optional(),
+ userId: z.string().cuid().optional(),
+ viewerId: z.string().cuid().optional(),
+ limit: z.number().int().min(1).max(100).optional().default(20),
+ offset: z.number().int().min(0).optional().default(0),
+});
+
+/**
+ * Schema for enabling agents on a document
+ */
+export const enableDocumentAgentsSchema = z.object({
+ agentsEnabled: z.boolean(),
+});
+
+/**
+ * Schema for enabling agents on a dataroom
+ */
+export const enableDataroomAgentsSchema = z.object({
+ agentsEnabled: z.boolean(),
+});
+
+/**
+ * Schema for enabling agents on a team
+ */
+export const enableTeamAgentsSchema = z.object({
+ agentsEnabled: z.boolean(),
+});
+
+export type CreateChatInput = z.infer<typeof createChatSchema>;
+export type SendMessageInput = z.infer<typeof sendMessageSchema>;
+export type IndexDocumentInput = z.infer<typeof indexDocumentSchema>;
+export type IndexDataroomInput = z.infer<typeof indexDataroomSchema>;
+export type ChatQueryInput = z.infer<typeof chatQuerySchema>;
+export type EnableDocumentAgentsInput = z.infer<
+ typeof enableDocumentAgentsSchema
+>;
+export type EnableDataroomAgentsInput = z.infer<
+ typeof enableDataroomAgentsSchema
+>;
+export type EnableTeamAgentsInput = z.infer<typeof enableTeamAgentsSchema>;
diff --git a/lib/featureFlags/index.ts b/lib/featureFlags/index.ts
index 67cf9ba3..9b43e1bf 100644
--- a/lib/featureFlags/index.ts
+++ b/lib/featureFlags/index.ts
@@ -13,7 +13,8 @@ export type BetaFeatures =
| "slack"
| "annotations"
| "dataroomInvitations"
- | "workflows";
+ | "workflows"
+ | "ai";
type BetaFeaturesRecord = Record<BetaFeatures, string[]>;
@@ -32,12 +33,13 @@ export const getFeatureFlags = async ({ teamId }: { teamId?: string }) => {
annotations: false,
dataroomInvitations: false,
workflows: false,
+ ai: false,
};
// Return all features as true if edge config is not available
if (!process.env.EDGE_CONFIG) {
return Object.fromEntries(
- Object.entries(teamFeatures).map(([key, _v]) => [key, true]),
+ Object.entries(teamFeatures).map(([key, _v]) => [key, false]),
);
} else if (!teamId) {
return teamFeatures;
diff --git a/lib/swr/use-team-ai.ts b/lib/swr/use-team-ai.ts
new file mode 100644
index 00000000..77dedc8b
--- /dev/null
+++ b/lib/swr/use-team-ai.ts
@@ -0,0 +1,82 @@
+import { useTeam } from "@/context/team-context";
+import { useSession } from "next-auth/react";
+import useSWR from "swr";
+
+import { BetaFeatures } from "@/lib/featureFlags";
+import { TeamDetail, CustomUser } from "@/lib/types";
+import { fetcher } from "@/lib/utils";
+
+interface TeamAISettings {
+ agentsEnabled: boolean;
+}
+
+/**
+ * Hook to check team AI settings and user permissions
+ * Returns whether AI is feature-flagged for the team,
+ * whether it's enabled, and if the current user is an admin
+ */
+export function useTeamAI() {
+ const { data: session } = useSession();
+ const teamInfo = useTeam();
+ const teamId = teamInfo?.currentTeam?.id;
+
+ // Fetch feature flags to check if AI is enabled for this team
+ const { data: features, isLoading: featuresLoading } = useSWR<
+ Record<BetaFeatures, boolean>
+ >(teamId ? `/api/feature-flags?teamId=${teamId}` : null, fetcher, {
+ dedupingInterval: 60000,
+ });
+
+ // Fetch team details to get agentsEnabled and user role
+ const { data: team, isLoading: teamLoading } = useSWR<TeamDetail>(
+ teamId ? `/api/teams/${teamId}` : null,
+ fetcher,
+ {
+ dedupingInterval: 20000,
+ },
+ );
+
+ // Fetch team AI settings
+ const {
+ data: aiSettings,
+ isLoading: aiSettingsLoading,
+ mutate: mutateAISettings,
+ } = useSWR<TeamAISettings>(
+ teamId ? `/api/teams/${teamId}/ai-settings` : null,
+ fetcher,
+ {
+ dedupingInterval: 10000,
+ },
+ );
+
+ const userId = (session?.user as CustomUser)?.id;
+
+ // Check if current user is admin
+ const isAdmin = team?.users.some(
+ (user) => user.role === "ADMIN" && user.userId === userId,
+ );
+
+ // Check if AI feature is available for this team (via feature flags)
+ const isAIFeatureEnabled = features?.ai ?? false;
+
+ // Check if AI is enabled for this team (team setting)
+ const isAIEnabled = aiSettings?.agentsEnabled ?? false;
+
+ return {
+ // Feature flag - is AI available for this team?
+ isAIFeatureEnabled,
+ // Team setting - is AI enabled for this team?
+ isAIEnabled,
+ // Is the current user an admin?
+ isAdmin,
+ // Can the user manage AI settings? (admin + feature enabled)
+ canManageAI: isAdmin && isAIFeatureEnabled,
+ // Is the feature ready to use? (feature enabled + team enabled)
+ canUseAI: isAIFeatureEnabled && isAIEnabled,
+ // Loading states
+ isLoading: featuresLoading || teamLoading || aiSettingsLoading,
+ // Mutate function to refresh AI settings
+ mutateAISettings,
+ };
+}
+
diff --git a/package-lock.json b/package-lock.json
index 731a0f44..6fb8a77f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,11 +9,13 @@
"version": "0.1.0",
"hasInstallScript": true,
"dependencies": {
- "@aws-sdk/client-lambda": "^3.940.0",
- "@aws-sdk/client-s3": "^3.940.0",
- "@aws-sdk/cloudfront-signer": "^3.935.0",
- "@aws-sdk/lib-storage": "^3.940.0",
- "@aws-sdk/s3-request-presigner": "^3.940.0",
+ "@ai-sdk/openai": "^2.0.80",
+ "@ai-sdk/react": "^2.0.109",
+ "@aws-sdk/client-lambda": "^3.946.0",
+ "@aws-sdk/client-s3": "^3.946.0",
+ "@aws-sdk/cloudfront-signer": "^3.946.0",
+ "@aws-sdk/lib-storage": "^3.946.0",
+ "@aws-sdk/s3-request-presigner": "^3.946.0",
"@calcom/embed-react": "^1.5.3",
"@chronark/zod-bird": "^0.3.10",
"@dnd-kit/core": "^6.3.1",
@@ -23,7 +25,7 @@
"@hookform/resolvers": "^5.2.2",
"@jitsu/js": "^1.10.4",
"@next-auth/prisma-adapter": "^1.0.7",
- "@next/third-parties": "^15.5.6",
+ "@next/third-parties": "^16.0.7",
"@pdf-lib/fontkit": "^1.1.1",
"@prisma/client": "^6.5.0",
"@radix-ui/react-accordion": "^1.2.12",
@@ -33,6 +35,7 @@
"@radix-ui/react-collapsible": "^1.1.12",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
+ "@radix-ui/react-hover-card": "^1.1.15",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-portal": "^1.1.10",
@@ -47,6 +50,7 @@
"@radix-ui/react-toggle": "^1.1.10",
"@radix-ui/react-toggle-group": "^1.1.11",
"@radix-ui/react-tooltip": "^1.2.8",
+ "@radix-ui/react-use-controllable-state": "^1.2.2",
"@react-email/components": "^1.0.1",
"@react-email/render": "^2.0.0",
"@sindresorhus/slugify": "^3.0.0",
@@ -70,7 +74,8 @@
"@vercel/blob": "^2.0.0",
"@vercel/edge-config": "^1.4.3",
"@vercel/functions": "^3.3.4",
- "ai": "2.2.37",
+ "@xyflow/react": "^12.9.3",
+ "ai": "^5.0.108",
"autoprefixer": "^10.4.22",
"base-x": "^5.0.1",
"bcryptjs": "^3.0.3",
@@ -80,42 +85,43 @@
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"date-fns": "^3.6.0",
- "dub": "^0.68.0",
+ "dub": "^0.69.0",
+ "embla-carousel-react": "^8.6.0",
"eslint": "8.57.0",
"eslint-config-next": "^14.2.33",
"exceljs": "^4.4.0",
"fluent-ffmpeg": "^2.1.3",
"input-otp": "^1.4.2",
"js-cookie": "^3.0.5",
- "jsonwebtoken": "^9.0.2",
- "lucide-react": "^0.555.0",
+ "jsonwebtoken": "^9.0.3",
+ "lucide-react": "^0.556.0",
"mime-types": "^3.0.2",
- "motion": "^12.23.24",
+ "motion": "^12.23.25",
"ms": "^2.1.3",
"mupdf": "^1.26.4",
"nanoid": "^5.1.6",
"next": "^14.2.33",
"next-auth": "^4.24.13",
- "next-plausible": "^3.12.4",
"next-themes": "^0.4.6",
"nodemailer": "^7.0.11",
"notion-client": "^7.7.1",
"notion-utils": "^7.7.1",
- "nuqs": "^2.8.1",
- "openai": "4.20.1",
+ "nuqs": "^2.8.3",
+ "openai": "^6.10.0",
"pdf-lib": "^1.17.1",
"postcss": "^8.5.6",
- "posthog-js": "^1.298.1",
+ "posthog-js": "^1.302.2",
"react": "^18.3.1",
"react-colorful": "^5.6.1",
"react-day-picker": "^8.10.1",
"react-dom": "^18.3.1",
"react-draggable": "^4.5.0",
"react-dropzone": "^14.3.8",
- "react-email": "^5.0.5",
- "react-hook-form": "^7.66.1",
+ "react-email": "^5.0.6",
+ "react-hook-form": "^7.68.0",
"react-hotkeys-hook": "^5.2.1",
"react-intersection-observer": "^9.16.0",
+ "react-markdown": "^10.1.0",
"react-notion-x": "^7.7.1",
"react-pdf": "^8.0.2",
"react-phone-number-input": "^3.4.14",
@@ -124,25 +130,28 @@
"react-zoom-pan-pinch": "^3.7.0",
"resend": "^6.5.2",
"sanitize-html": "^2.17.0",
- "shiki": "^3.17.0",
+ "shiki": "^3.19.0",
"sonner": "^2.0.7",
+ "streamdown": "^1.6.10",
"stripe": "^16.12.0",
"swr": "^2.3.7",
"tailwind-merge": "^2.6.0",
"tailwind-scrollbar-hide": "^2.0.0",
"tailwindcss": "^3.4.18",
"tailwindcss-animate": "^1.0.7",
+ "tokenlens": "^1.3.1",
"ts-pattern": "^5.9.0",
"tus-js-client": "^4.3.1",
"ua-parser-js": "^1.0.41",
"unsend": "^1.5.1",
"use-debounce": "^10.0.6",
+ "use-stick-to-bottom": "^1.1.1",
"vaul": "^1.1.2",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
"zod": "^3.25.76"
},
"devDependencies": {
- "@react-email/preview-server": "^5.0.5",
+ "@react-email/preview-server": "^5.0.6",
"@tailwindcss/forms": "^0.5.10",
"@trigger.dev/build": "^3.3.17",
"@trivago/prettier-plugin-sort-imports": "^6.0.0",
@@ -158,8 +167,9 @@
"@types/react-dom": "^18",
"@types/sanitize-html": "^2.13.0",
"@types/ua-parser-js": "^0.7.39",
- "prettier": "^3.7.3",
- "prettier-plugin-tailwindcss": "^0.7.1",
+ "patch-package": "^8.0.1",
+ "prettier": "^3.7.4",
+ "prettier-plugin-tailwindcss": "^0.7.2",
"prisma": "^6.5.0",
"typescript": "^5"
},
@@ -167,6 +177,92 @@
"node": ">=18.18.0"
}
},
+ "node_modules/@ai-sdk/gateway": {
+ "version": "2.0.18",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-2.0.18.tgz",
+ "integrity": "sha512-sDQcW+6ck2m0pTIHW6BPHD7S125WD3qNkx/B8sEzJp/hurocmJ5Cni0ybExg6sQMGo+fr/GWOwpHF1cmCdg5rQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@ai-sdk/provider": "2.0.0",
+ "@ai-sdk/provider-utils": "3.0.18",
+ "@vercel/oidc": "3.0.5"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "zod": "^3.25.76 || ^4.1.8"
+ }
+ },
+ "node_modules/@ai-sdk/openai": {
+ "version": "2.0.80",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/openai/-/openai-2.0.80.tgz",
+ "integrity": "sha512-tNHuraF11db+8xJEDBoU9E3vMcpnHFKRhnLQ3DQX2LnEzfPB9DksZ8rE+yVuDN1WRW9cm2OWAhgHFgVKs7ICuw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@ai-sdk/provider": "2.0.0",
+ "@ai-sdk/provider-utils": "3.0.18"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "zod": "^3.25.76 || ^4.1.8"
+ }
+ },
+ "node_modules/@ai-sdk/provider": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-2.0.0.tgz",
+ "integrity": "sha512-6o7Y2SeO9vFKB8lArHXehNuusnpddKPk7xqL7T2/b+OvXMRIXUO1rR4wcv1hAFUAT9avGZshty3Wlua/XA7TvA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "json-schema": "^0.4.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@ai-sdk/provider-utils": {
+ "version": "3.0.18",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-3.0.18.tgz",
+ "integrity": "sha512-ypv1xXMsgGcNKUP+hglKqtdDuMg68nWHucPPAhIENrbFAI+xCHiqPVN8Zllxyv1TNZwGWUghPxJXU+Mqps0YRQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@ai-sdk/provider": "2.0.0",
+ "@standard-schema/spec": "^1.0.0",
+ "eventsource-parser": "^3.0.6"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "zod": "^3.25.76 || ^4.1.8"
+ }
+ },
+ "node_modules/@ai-sdk/react": {
+ "version": "2.0.109",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/react/-/react-2.0.109.tgz",
+ "integrity": "sha512-5qM8KuN7bv7E+g6BXkSAYLFjwIfMSTKOA1prjg1zEShJXJyLSc+Yqkd3EfGibm75b7nJAqJNShurDmR/IlQqFQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@ai-sdk/provider-utils": "3.0.18",
+ "ai": "5.0.108",
+ "swr": "^2.2.5",
+ "throttleit": "2.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "react": "^18 || ^19 || ^19.0.0-rc",
+ "zod": "^3.25.76 || ^4.1.8"
+ },
+ "peerDependenciesMeta": {
+ "zod": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@alloc/quick-lru": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
@@ -182,6 +278,8 @@
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
"integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.5",
@@ -256,6 +354,28 @@
"resolved": "https://registry.npmjs.org/@analytics/type-utils/-/type-utils-0.6.2.tgz",
"integrity": "sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg=="
},
+ "node_modules/@antfu/install-pkg": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-1.1.0.tgz",
+ "integrity": "sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==",
+ "license": "MIT",
+ "dependencies": {
+ "package-manager-detector": "^1.3.0",
+ "tinyexec": "^1.0.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "node_modules/@antfu/install-pkg/node_modules/tinyexec": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz",
+ "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
"node_modules/@aws-crypto/crc32": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz",
@@ -445,26 +565,26 @@
}
},
"node_modules/@aws-sdk/client-lambda": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.940.0.tgz",
- "integrity": "sha512-yOijmOl/OqKQ2lgdHjXjz9WX9mL6R/ySPp/SCvq2XiYIDro4Hcs/pEOF6BMkITHoKppAvZcClSGbPm1antLI1g==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.946.0.tgz",
+ "integrity": "sha512-+nGzto4JBhHuElKFe9y5phKKwsSMWHDld3RyoQwryQvPvtNyCz1xPQsTd1gdUTekmvwGMl5EmcHwNdvKkHZ3mg==",
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/sha256-browser": "5.2.0",
"@aws-crypto/sha256-js": "5.2.0",
- "@aws-sdk/core": "3.940.0",
- "@aws-sdk/credential-provider-node": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
+ "@aws-sdk/credential-provider-node": "3.946.0",
"@aws-sdk/middleware-host-header": "3.936.0",
"@aws-sdk/middleware-logger": "3.936.0",
"@aws-sdk/middleware-recursion-detection": "3.936.0",
- "@aws-sdk/middleware-user-agent": "3.940.0",
+ "@aws-sdk/middleware-user-agent": "3.946.0",
"@aws-sdk/region-config-resolver": "3.936.0",
"@aws-sdk/types": "3.936.0",
"@aws-sdk/util-endpoints": "3.936.0",
"@aws-sdk/util-user-agent-browser": "3.936.0",
- "@aws-sdk/util-user-agent-node": "3.940.0",
+ "@aws-sdk/util-user-agent-node": "3.946.0",
"@smithy/config-resolver": "^4.4.3",
- "@smithy/core": "^3.18.5",
+ "@smithy/core": "^3.18.7",
"@smithy/eventstream-serde-browser": "^4.2.5",
"@smithy/eventstream-serde-config-resolver": "^4.3.5",
"@smithy/eventstream-serde-node": "^4.2.5",
@@ -472,21 +592,21 @@
"@smithy/hash-node": "^4.2.5",
"@smithy/invalid-dependency": "^4.2.5",
"@smithy/middleware-content-length": "^4.2.5",
- "@smithy/middleware-endpoint": "^4.3.12",
- "@smithy/middleware-retry": "^4.4.12",
+ "@smithy/middleware-endpoint": "^4.3.14",
+ "@smithy/middleware-retry": "^4.4.14",
"@smithy/middleware-serde": "^4.2.6",
"@smithy/middleware-stack": "^4.2.5",
"@smithy/node-config-provider": "^4.3.5",
"@smithy/node-http-handler": "^4.4.5",
"@smithy/protocol-http": "^5.3.5",
- "@smithy/smithy-client": "^4.9.8",
+ "@smithy/smithy-client": "^4.9.10",
"@smithy/types": "^4.9.0",
"@smithy/url-parser": "^4.2.5",
"@smithy/util-base64": "^4.3.0",
"@smithy/util-body-length-browser": "^4.2.0",
"@smithy/util-body-length-node": "^4.2.1",
- "@smithy/util-defaults-mode-browser": "^4.3.11",
- "@smithy/util-defaults-mode-node": "^4.2.14",
+ "@smithy/util-defaults-mode-browser": "^4.3.13",
+ "@smithy/util-defaults-mode-node": "^4.2.16",
"@smithy/util-endpoints": "^3.2.5",
"@smithy/util-middleware": "^4.2.5",
"@smithy/util-retry": "^4.2.5",
@@ -500,34 +620,34 @@
}
},
"node_modules/@aws-sdk/client-s3": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.940.0.tgz",
- "integrity": "sha512-Wi4qnBT6shRRMXuuTgjMFTU5mu2KFWisgcigEMPptjPGUtJvBVi4PTGgS64qsLoUk/obqDAyOBOfEtRZ2ddC2w==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.946.0.tgz",
+ "integrity": "sha512-Y3ww3yd1wzmS2r3qgH3jg4MxCTdeNrae2J1BmdV+IW/2R2gFWJva5U5GbS6KUSUxanJBRG7gd8uOIi1b0EMOng==",
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/sha1-browser": "5.2.0",
"@aws-crypto/sha256-browser": "5.2.0",
"@aws-crypto/sha256-js": "5.2.0",
- "@aws-sdk/core": "3.940.0",
- "@aws-sdk/credential-provider-node": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
+ "@aws-sdk/credential-provider-node": "3.946.0",
"@aws-sdk/middleware-bucket-endpoint": "3.936.0",
"@aws-sdk/middleware-expect-continue": "3.936.0",
- "@aws-sdk/middleware-flexible-checksums": "3.940.0",
+ "@aws-sdk/middleware-flexible-checksums": "3.946.0",
"@aws-sdk/middleware-host-header": "3.936.0",
"@aws-sdk/middleware-location-constraint": "3.936.0",
"@aws-sdk/middleware-logger": "3.936.0",
"@aws-sdk/middleware-recursion-detection": "3.936.0",
- "@aws-sdk/middleware-sdk-s3": "3.940.0",
+ "@aws-sdk/middleware-sdk-s3": "3.946.0",
"@aws-sdk/middleware-ssec": "3.936.0",
- "@aws-sdk/middleware-user-agent": "3.940.0",
+ "@aws-sdk/middleware-user-agent": "3.946.0",
"@aws-sdk/region-config-resolver": "3.936.0",
- "@aws-sdk/signature-v4-multi-region": "3.940.0",
+ "@aws-sdk/signature-v4-multi-region": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@aws-sdk/util-endpoints": "3.936.0",
"@aws-sdk/util-user-agent-browser": "3.936.0",
- "@aws-sdk/util-user-agent-node": "3.940.0",
+ "@aws-sdk/util-user-agent-node": "3.946.0",
"@smithy/config-resolver": "^4.4.3",
- "@smithy/core": "^3.18.5",
+ "@smithy/core": "^3.18.7",
"@smithy/eventstream-serde-browser": "^4.2.5",
"@smithy/eventstream-serde-config-resolver": "^4.3.5",
"@smithy/eventstream-serde-node": "^4.2.5",
@@ -538,21 +658,21 @@
"@smithy/invalid-dependency": "^4.2.5",
"@smithy/md5-js": "^4.2.5",
"@smithy/middleware-content-length": "^4.2.5",
- "@smithy/middleware-endpoint": "^4.3.12",
- "@smithy/middleware-retry": "^4.4.12",
+ "@smithy/middleware-endpoint": "^4.3.14",
+ "@smithy/middleware-retry": "^4.4.14",
"@smithy/middleware-serde": "^4.2.6",
"@smithy/middleware-stack": "^4.2.5",
"@smithy/node-config-provider": "^4.3.5",
"@smithy/node-http-handler": "^4.4.5",
"@smithy/protocol-http": "^5.3.5",
- "@smithy/smithy-client": "^4.9.8",
+ "@smithy/smithy-client": "^4.9.10",
"@smithy/types": "^4.9.0",
"@smithy/url-parser": "^4.2.5",
"@smithy/util-base64": "^4.3.0",
"@smithy/util-body-length-browser": "^4.2.0",
"@smithy/util-body-length-node": "^4.2.1",
- "@smithy/util-defaults-mode-browser": "^4.3.11",
- "@smithy/util-defaults-mode-node": "^4.2.14",
+ "@smithy/util-defaults-mode-browser": "^4.3.13",
+ "@smithy/util-defaults-mode-node": "^4.2.16",
"@smithy/util-endpoints": "^3.2.5",
"@smithy/util-middleware": "^4.2.5",
"@smithy/util-retry": "^4.2.5",
@@ -566,44 +686,44 @@
}
},
"node_modules/@aws-sdk/client-sso": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.940.0.tgz",
- "integrity": "sha512-SdqJGWVhmIURvCSgkDditHRO+ozubwZk9aCX9MK8qxyOndhobCndW1ozl3hX9psvMAo9Q4bppjuqy/GHWpjB+A==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.946.0.tgz",
+ "integrity": "sha512-kGAs5iIVyUz4p6TX3pzG5q3cNxXnVpC4pwRC6DCSaSv9ozyPjc2d74FsK4fZ+J+ejtvCdJk72uiuQtWJc86Wuw==",
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/sha256-browser": "5.2.0",
"@aws-crypto/sha256-js": "5.2.0",
- "@aws-sdk/core": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
"@aws-sdk/middleware-host-header": "3.936.0",
"@aws-sdk/middleware-logger": "3.936.0",
"@aws-sdk/middleware-recursion-detection": "3.936.0",
- "@aws-sdk/middleware-user-agent": "3.940.0",
+ "@aws-sdk/middleware-user-agent": "3.946.0",
"@aws-sdk/region-config-resolver": "3.936.0",
"@aws-sdk/types": "3.936.0",
"@aws-sdk/util-endpoints": "3.936.0",
"@aws-sdk/util-user-agent-browser": "3.936.0",
- "@aws-sdk/util-user-agent-node": "3.940.0",
+ "@aws-sdk/util-user-agent-node": "3.946.0",
"@smithy/config-resolver": "^4.4.3",
- "@smithy/core": "^3.18.5",
+ "@smithy/core": "^3.18.7",
"@smithy/fetch-http-handler": "^5.3.6",
"@smithy/hash-node": "^4.2.5",
"@smithy/invalid-dependency": "^4.2.5",
"@smithy/middleware-content-length": "^4.2.5",
- "@smithy/middleware-endpoint": "^4.3.12",
- "@smithy/middleware-retry": "^4.4.12",
+ "@smithy/middleware-endpoint": "^4.3.14",
+ "@smithy/middleware-retry": "^4.4.14",
"@smithy/middleware-serde": "^4.2.6",
"@smithy/middleware-stack": "^4.2.5",
"@smithy/node-config-provider": "^4.3.5",
"@smithy/node-http-handler": "^4.4.5",
"@smithy/protocol-http": "^5.3.5",
- "@smithy/smithy-client": "^4.9.8",
+ "@smithy/smithy-client": "^4.9.10",
"@smithy/types": "^4.9.0",
"@smithy/url-parser": "^4.2.5",
"@smithy/util-base64": "^4.3.0",
"@smithy/util-body-length-browser": "^4.2.0",
"@smithy/util-body-length-node": "^4.2.1",
- "@smithy/util-defaults-mode-browser": "^4.3.11",
- "@smithy/util-defaults-mode-node": "^4.2.14",
+ "@smithy/util-defaults-mode-browser": "^4.3.13",
+ "@smithy/util-defaults-mode-node": "^4.2.16",
"@smithy/util-endpoints": "^3.2.5",
"@smithy/util-middleware": "^4.2.5",
"@smithy/util-retry": "^4.2.5",
@@ -615,12 +735,12 @@
}
},
"node_modules/@aws-sdk/cloudfront-signer": {
- "version": "3.935.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/cloudfront-signer/-/cloudfront-signer-3.935.0.tgz",
- "integrity": "sha512-7a9IiBrhqE6U1+okESc7YXMo7uhYwvzKgPwwo101V2G8r6kpfuD/I1mHFAD3w4ts4s6M7tnFfrgnpnnolz2oEw==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/cloudfront-signer/-/cloudfront-signer-3.946.0.tgz",
+ "integrity": "sha512-owjqCiZPVr2wrRbn6QIkZprQ870iJc8zRV4onmZr65IRiYhq5ANCjp1UFDylCD+5OaOJ4ecJjr0dRE8j68G+kA==",
"license": "Apache-2.0",
"dependencies": {
- "@smithy/core": "^3.18.5",
+ "@smithy/core": "^3.18.7",
"@smithy/url-parser": "^4.2.5",
"tslib": "^2.6.2"
},
@@ -629,19 +749,19 @@
}
},
"node_modules/@aws-sdk/core": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.940.0.tgz",
- "integrity": "sha512-KsGD2FLaX5ngJao1mHxodIVU9VYd1E8810fcYiGwO1PFHDzf5BEkp6D9IdMeQwT8Q6JLYtiiT1Y/o3UCScnGoA==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.946.0.tgz",
+ "integrity": "sha512-u2BkbLLVbMFrEiXrko2+S6ih5sUZPlbVyRPtXOqMHlCyzr70sE8kIiD6ba223rQeIFPcYfW/wHc6k4ihW2xxVg==",
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/types": "3.936.0",
"@aws-sdk/xml-builder": "3.930.0",
- "@smithy/core": "^3.18.5",
+ "@smithy/core": "^3.18.7",
"@smithy/node-config-provider": "^4.3.5",
"@smithy/property-provider": "^4.2.5",
"@smithy/protocol-http": "^5.3.5",
"@smithy/signature-v4": "^5.3.5",
- "@smithy/smithy-client": "^4.9.8",
+ "@smithy/smithy-client": "^4.9.10",
"@smithy/types": "^4.9.0",
"@smithy/util-base64": "^4.3.0",
"@smithy/util-middleware": "^4.2.5",
@@ -653,12 +773,12 @@
}
},
"node_modules/@aws-sdk/credential-provider-env": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.940.0.tgz",
- "integrity": "sha512-/G3l5/wbZYP2XEQiOoIkRJmlv15f1P3MSd1a0gz27lHEMrOJOGq66rF1Ca4OJLzapWt3Fy9BPrZAepoAX11kMw==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.946.0.tgz",
+ "integrity": "sha512-P4l+K6wX1tf8LmWUvZofdQ+BgCNyk6Tb9u1H10npvqpuCD+dCM4pXIBq3PQcv/juUBOvLGGREo+Govuh3lfD0Q==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@smithy/property-provider": "^4.2.5",
"@smithy/types": "^4.9.0",
@@ -669,18 +789,18 @@
}
},
"node_modules/@aws-sdk/credential-provider-http": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.940.0.tgz",
- "integrity": "sha512-dOrc03DHElNBD6N9Okt4U0zhrG4Wix5QUBSZPr5VN8SvmjD9dkrrxOkkJaMCl/bzrW7kbQEp7LuBdbxArMmOZQ==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.946.0.tgz",
+ "integrity": "sha512-/zeOJ6E7dGZQ/l2k7KytEoPJX0APIhwt0A79hPf/bUpMF4dDs2P6JmchDrotk0a0Y/MIdNF8sBQ/MEOPnBiYoQ==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@smithy/fetch-http-handler": "^5.3.6",
"@smithy/node-http-handler": "^4.4.5",
"@smithy/property-provider": "^4.2.5",
"@smithy/protocol-http": "^5.3.5",
- "@smithy/smithy-client": "^4.9.8",
+ "@smithy/smithy-client": "^4.9.10",
"@smithy/types": "^4.9.0",
"@smithy/util-stream": "^4.5.6",
"tslib": "^2.6.2"
@@ -690,19 +810,19 @@
}
},
"node_modules/@aws-sdk/credential-provider-ini": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.940.0.tgz",
- "integrity": "sha512-gn7PJQEzb/cnInNFTOaDoCN/hOKqMejNmLof1W5VW95Qk0TPO52lH8R4RmJPnRrwFMswOWswTOpR1roKNLIrcw==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.946.0.tgz",
+ "integrity": "sha512-Pdgcra3RivWj/TuZmfFaHbqsvvgnSKO0CxlRUMMr0PgBiCnUhyl+zBktdNOeGsOPH2fUzQpYhcUjYUgVSdcSDQ==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "3.940.0",
- "@aws-sdk/credential-provider-env": "3.940.0",
- "@aws-sdk/credential-provider-http": "3.940.0",
- "@aws-sdk/credential-provider-login": "3.940.0",
- "@aws-sdk/credential-provider-process": "3.940.0",
- "@aws-sdk/credential-provider-sso": "3.940.0",
- "@aws-sdk/credential-provider-web-identity": "3.940.0",
- "@aws-sdk/nested-clients": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
+ "@aws-sdk/credential-provider-env": "3.946.0",
+ "@aws-sdk/credential-provider-http": "3.946.0",
+ "@aws-sdk/credential-provider-login": "3.946.0",
+ "@aws-sdk/credential-provider-process": "3.946.0",
+ "@aws-sdk/credential-provider-sso": "3.946.0",
+ "@aws-sdk/credential-provider-web-identity": "3.946.0",
+ "@aws-sdk/nested-clients": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@smithy/credential-provider-imds": "^4.2.5",
"@smithy/property-provider": "^4.2.5",
@@ -715,13 +835,13 @@
}
},
"node_modules/@aws-sdk/credential-provider-login": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.940.0.tgz",
- "integrity": "sha512-fOKC3VZkwa9T2l2VFKWRtfHQPQuISqqNl35ZhcXjWKVwRwl/o7THPMkqI4XwgT2noGa7LLYVbWMwnsgSsBqglg==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.946.0.tgz",
+ "integrity": "sha512-5iqLNc15u2Zx+7jOdQkIbP62N7n2031tw5hkmIG0DLnozhnk64osOh2CliiOE9x3c4P9Pf4frAwgyy9GzNTk2g==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "3.940.0",
- "@aws-sdk/nested-clients": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
+ "@aws-sdk/nested-clients": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@smithy/property-provider": "^4.2.5",
"@smithy/protocol-http": "^5.3.5",
@@ -734,17 +854,17 @@
}
},
"node_modules/@aws-sdk/credential-provider-node": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.940.0.tgz",
- "integrity": "sha512-M8NFAvgvO6xZjiti5kztFiAYmSmSlG3eUfr4ZHSfXYZUA/KUdZU/D6xJyaLnU8cYRWBludb6K9XPKKVwKfqm4g==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.946.0.tgz",
+ "integrity": "sha512-I7URUqnBPng1a5y81OImxrwERysZqMBREG6svhhGeZgxmqcpAZ8z5ywILeQXdEOCuuES8phUp/ojzxFjPXp/eA==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/credential-provider-env": "3.940.0",
- "@aws-sdk/credential-provider-http": "3.940.0",
- "@aws-sdk/credential-provider-ini": "3.940.0",
- "@aws-sdk/credential-provider-process": "3.940.0",
- "@aws-sdk/credential-provider-sso": "3.940.0",
- "@aws-sdk/credential-provider-web-identity": "3.940.0",
+ "@aws-sdk/credential-provider-env": "3.946.0",
+ "@aws-sdk/credential-provider-http": "3.946.0",
+ "@aws-sdk/credential-provider-ini": "3.946.0",
+ "@aws-sdk/credential-provider-process": "3.946.0",
+ "@aws-sdk/credential-provider-sso": "3.946.0",
+ "@aws-sdk/credential-provider-web-identity": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@smithy/credential-provider-imds": "^4.2.5",
"@smithy/property-provider": "^4.2.5",
@@ -757,12 +877,12 @@
}
},
"node_modules/@aws-sdk/credential-provider-process": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.940.0.tgz",
- "integrity": "sha512-pILBzt5/TYCqRsJb7vZlxmRIe0/T+FZPeml417EK75060ajDGnVJjHcuVdLVIeKoTKm9gmJc9l45gon6PbHyUQ==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.946.0.tgz",
+ "integrity": "sha512-GtGHX7OGqIeVQ3DlVm5RRF43Qmf3S1+PLJv9svrdvAhAdy2bUb044FdXXqrtSsIfpzTKlHgQUiRo5MWLd35Ntw==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@smithy/property-provider": "^4.2.5",
"@smithy/shared-ini-file-loader": "^4.4.0",
@@ -774,14 +894,14 @@
}
},
"node_modules/@aws-sdk/credential-provider-sso": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.940.0.tgz",
- "integrity": "sha512-q6JMHIkBlDCOMnA3RAzf8cGfup+8ukhhb50fNpghMs1SNBGhanmaMbZSgLigBRsPQW7fOk2l8jnzdVLS+BB9Uw==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.946.0.tgz",
+ "integrity": "sha512-LeGSSt2V5iwYey1ENGY75RmoDP3bA2iE/py8QBKW8EDA8hn74XBLkprhrK5iccOvU3UGWY8WrEKFAFGNjJOL9g==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/client-sso": "3.940.0",
- "@aws-sdk/core": "3.940.0",
- "@aws-sdk/token-providers": "3.940.0",
+ "@aws-sdk/client-sso": "3.946.0",
+ "@aws-sdk/core": "3.946.0",
+ "@aws-sdk/token-providers": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@smithy/property-provider": "^4.2.5",
"@smithy/shared-ini-file-loader": "^4.4.0",
@@ -793,13 +913,13 @@
}
},
"node_modules/@aws-sdk/credential-provider-web-identity": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.940.0.tgz",
- "integrity": "sha512-9QLTIkDJHHaYL0nyymO41H8g3ui1yz6Y3GmAN1gYQa6plXisuFBnGAbmKVj7zNvjWaOKdF0dV3dd3AFKEDoJ/w==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.946.0.tgz",
+ "integrity": "sha512-ocBCvjWfkbjxElBI1QUxOnHldsNhoU0uOICFvuRDAZAoxvypJHN3m5BJkqb7gqorBbcv3LRgmBdEnWXOAvq+7Q==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "3.940.0",
- "@aws-sdk/nested-clients": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
+ "@aws-sdk/nested-clients": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@smithy/property-provider": "^4.2.5",
"@smithy/shared-ini-file-loader": "^4.4.0",
@@ -811,14 +931,14 @@
}
},
"node_modules/@aws-sdk/lib-storage": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.940.0.tgz",
- "integrity": "sha512-4pHgz9tuFJNSy/qoTbW5FqXPjoR4B18jB656UsE+TP5GWd7EPx7m4F0EUwIsD3OF5+KPiiyICi8zkxOs7erfQw==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.946.0.tgz",
+ "integrity": "sha512-eD5MWvEeMYFFxXr237IO0JOn9DYV0G7PgMnz73uihIi/dYh/v2IASf+BjEUcWWOTY72jo8nG9V0FKl16zG3Nvw==",
"license": "Apache-2.0",
"dependencies": {
"@smithy/abort-controller": "^4.2.5",
- "@smithy/middleware-endpoint": "^4.3.12",
- "@smithy/smithy-client": "^4.9.8",
+ "@smithy/middleware-endpoint": "^4.3.14",
+ "@smithy/smithy-client": "^4.9.10",
"buffer": "5.6.0",
"events": "3.3.0",
"stream-browserify": "3.0.0",
@@ -828,7 +948,7 @@
"node": ">=18.0.0"
},
"peerDependencies": {
- "@aws-sdk/client-s3": "^3.940.0"
+ "@aws-sdk/client-s3": "^3.946.0"
}
},
"node_modules/@aws-sdk/lib-storage/node_modules/buffer": {
@@ -874,15 +994,15 @@
}
},
"node_modules/@aws-sdk/middleware-flexible-checksums": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.940.0.tgz",
- "integrity": "sha512-WdsxDAVj5qaa5ApAP+JbpCOMHFGSmzjs2Y2OBSbWPeR9Ew7t/Okj+kUub94QJPsgzhvU1/cqNejhsw5VxeFKSQ==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.946.0.tgz",
+ "integrity": "sha512-HJA7RIWsnxcChyZ1hNF/3JICkYCqDonxoeG8FkrmLRBknZ8WVdJiPD420/UwrWaa5F2MuTDA92jxk77rI09h1w==",
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/crc32": "5.2.0",
"@aws-crypto/crc32c": "5.2.0",
"@aws-crypto/util": "5.2.0",
- "@aws-sdk/core": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@smithy/is-array-buffer": "^4.2.0",
"@smithy/node-config-provider": "^4.3.5",
@@ -957,19 +1077,19 @@
}
},
"node_modules/@aws-sdk/middleware-sdk-s3": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.940.0.tgz",
- "integrity": "sha512-JYkLjgS1wLoKHJ40G63+afM1ehmsPsjcmrHirKh8+kSCx4ip7+nL1e/twV4Zicxr8RJi9Y0Ahq5mDvneilDDKQ==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.946.0.tgz",
+ "integrity": "sha512-0UTFmFd8PX2k/jLu/DBmR+mmLQWAtUGHYps9Rjx3dcXNwaMLaa/39NoV3qn7Dwzfpqc6JZlZzBk+NDOCJIHW9g==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@aws-sdk/util-arn-parser": "3.893.0",
- "@smithy/core": "^3.18.5",
+ "@smithy/core": "^3.18.7",
"@smithy/node-config-provider": "^4.3.5",
"@smithy/protocol-http": "^5.3.5",
"@smithy/signature-v4": "^5.3.5",
- "@smithy/smithy-client": "^4.9.8",
+ "@smithy/smithy-client": "^4.9.10",
"@smithy/types": "^4.9.0",
"@smithy/util-config-provider": "^4.2.0",
"@smithy/util-middleware": "^4.2.5",
@@ -996,15 +1116,15 @@
}
},
"node_modules/@aws-sdk/middleware-user-agent": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.940.0.tgz",
- "integrity": "sha512-nJbLrUj6fY+l2W2rIB9P4Qvpiy0tnTdg/dmixRxrU1z3e8wBdspJlyE+AZN4fuVbeL6rrRrO/zxQC1bB3cw5IA==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.946.0.tgz",
+ "integrity": "sha512-7QcljCraeaWQNuqmOoAyZs8KpZcuhPiqdeeKoRd397jVGNRehLFsZbIMOvwaluUDFY11oMyXOkQEERe1Zo2fCw==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@aws-sdk/util-endpoints": "3.936.0",
- "@smithy/core": "^3.18.5",
+ "@smithy/core": "^3.18.7",
"@smithy/protocol-http": "^5.3.5",
"@smithy/types": "^4.9.0",
"tslib": "^2.6.2"
@@ -1014,44 +1134,44 @@
}
},
"node_modules/@aws-sdk/nested-clients": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.940.0.tgz",
- "integrity": "sha512-x0mdv6DkjXqXEcQj3URbCltEzW6hoy/1uIL+i8gExP6YKrnhiZ7SzuB4gPls2UOpK5UqLiqXjhRLfBb1C9i4Dw==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.946.0.tgz",
+ "integrity": "sha512-rjAtEguukeW8mlyEQMQI56vxFoyWlaNwowmz1p1rav948SUjtrzjHAp4TOQWhibb7AR7BUTHBCgIcyCRjBEf4g==",
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/sha256-browser": "5.2.0",
"@aws-crypto/sha256-js": "5.2.0",
- "@aws-sdk/core": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
"@aws-sdk/middleware-host-header": "3.936.0",
"@aws-sdk/middleware-logger": "3.936.0",
"@aws-sdk/middleware-recursion-detection": "3.936.0",
- "@aws-sdk/middleware-user-agent": "3.940.0",
+ "@aws-sdk/middleware-user-agent": "3.946.0",
"@aws-sdk/region-config-resolver": "3.936.0",
"@aws-sdk/types": "3.936.0",
"@aws-sdk/util-endpoints": "3.936.0",
"@aws-sdk/util-user-agent-browser": "3.936.0",
- "@aws-sdk/util-user-agent-node": "3.940.0",
+ "@aws-sdk/util-user-agent-node": "3.946.0",
"@smithy/config-resolver": "^4.4.3",
- "@smithy/core": "^3.18.5",
+ "@smithy/core": "^3.18.7",
"@smithy/fetch-http-handler": "^5.3.6",
"@smithy/hash-node": "^4.2.5",
"@smithy/invalid-dependency": "^4.2.5",
"@smithy/middleware-content-length": "^4.2.5",
- "@smithy/middleware-endpoint": "^4.3.12",
- "@smithy/middleware-retry": "^4.4.12",
+ "@smithy/middleware-endpoint": "^4.3.14",
+ "@smithy/middleware-retry": "^4.4.14",
"@smithy/middleware-serde": "^4.2.6",
"@smithy/middleware-stack": "^4.2.5",
"@smithy/node-config-provider": "^4.3.5",
"@smithy/node-http-handler": "^4.4.5",
"@smithy/protocol-http": "^5.3.5",
- "@smithy/smithy-client": "^4.9.8",
+ "@smithy/smithy-client": "^4.9.10",
"@smithy/types": "^4.9.0",
"@smithy/url-parser": "^4.2.5",
"@smithy/util-base64": "^4.3.0",
"@smithy/util-body-length-browser": "^4.2.0",
"@smithy/util-body-length-node": "^4.2.1",
- "@smithy/util-defaults-mode-browser": "^4.3.11",
- "@smithy/util-defaults-mode-node": "^4.2.14",
+ "@smithy/util-defaults-mode-browser": "^4.3.13",
+ "@smithy/util-defaults-mode-node": "^4.2.16",
"@smithy/util-endpoints": "^3.2.5",
"@smithy/util-middleware": "^4.2.5",
"@smithy/util-retry": "^4.2.5",
@@ -1079,17 +1199,17 @@
}
},
"node_modules/@aws-sdk/s3-request-presigner": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/s3-request-presigner/-/s3-request-presigner-3.940.0.tgz",
- "integrity": "sha512-TgTUDM2H7revReDfkVwVtIqxV3K0cJLdyuLDIkefVHRUNKwU1Vd5FB2TaFrs6STO0kx5pTckDCOLh0iy7nW5WQ==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/s3-request-presigner/-/s3-request-presigner-3.946.0.tgz",
+ "integrity": "sha512-NPNCGW84ZEYCKhN+XkY307eumlBq/E0vWU0iYhVVq7i5cjnA2wwLenKyYp/+0FpXvv83MC/jT9BVB5XMNu4RUw==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/signature-v4-multi-region": "3.940.0",
+ "@aws-sdk/signature-v4-multi-region": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@aws-sdk/util-format-url": "3.936.0",
- "@smithy/middleware-endpoint": "^4.3.12",
+ "@smithy/middleware-endpoint": "^4.3.14",
"@smithy/protocol-http": "^5.3.5",
- "@smithy/smithy-client": "^4.9.8",
+ "@smithy/smithy-client": "^4.9.10",
"@smithy/types": "^4.9.0",
"tslib": "^2.6.2"
},
@@ -1098,12 +1218,12 @@
}
},
"node_modules/@aws-sdk/signature-v4-multi-region": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.940.0.tgz",
- "integrity": "sha512-ugHZEoktD/bG6mdgmhzLDjMP2VrYRAUPRPF1DpCyiZexkH7DCU7XrSJyXMvkcf0DHV+URk0q2sLf/oqn1D2uYw==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.946.0.tgz",
+ "integrity": "sha512-61FZ685lKiJuQ06g6U7K3PL9EwKCxNm51wNlxyKV57nnl1GrLD0NC8O3/hDNkCQLNBArT9y3IXl2H7TtIxP8Jg==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/middleware-sdk-s3": "3.940.0",
+ "@aws-sdk/middleware-sdk-s3": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@smithy/protocol-http": "^5.3.5",
"@smithy/signature-v4": "^5.3.5",
@@ -1115,13 +1235,13 @@
}
},
"node_modules/@aws-sdk/token-providers": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.940.0.tgz",
- "integrity": "sha512-k5qbRe/ZFjW9oWEdzLIa2twRVIEx7p/9rutofyrRysrtEnYh3HAWCngAnwbgKMoiwa806UzcTRx0TjyEpnKcCg==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.946.0.tgz",
+ "integrity": "sha512-a5c+rM6CUPX2ExmUZ3DlbLlS5rQr4tbdoGcgBsjnAHiYx8MuMNAI+8M7wfjF13i2yvUQj5WEIddvLpayfEZj9g==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "3.940.0",
- "@aws-sdk/nested-clients": "3.940.0",
+ "@aws-sdk/core": "3.946.0",
+ "@aws-sdk/nested-clients": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@smithy/property-provider": "^4.2.5",
"@smithy/shared-ini-file-loader": "^4.4.0",
@@ -1212,12 +1332,12 @@
}
},
"node_modules/@aws-sdk/util-user-agent-node": {
- "version": "3.940.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.940.0.tgz",
- "integrity": "sha512-dlD/F+L/jN26I8Zg5x0oDGJiA+/WEQmnSE27fi5ydvYnpfQLwThtQo9SsNS47XSR/SOULaaoC9qx929rZuo74A==",
+ "version": "3.946.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.946.0.tgz",
+ "integrity": "sha512-a2UwwvzbK5AxHKUBupfg4s7VnkqRAHjYsuezHnKCniczmT4HZfP1NnfwwvLKEH8qaTrwenxjKSfq4UWmWkvG+Q==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/middleware-user-agent": "3.940.0",
+ "@aws-sdk/middleware-user-agent": "3.946.0",
"@aws-sdk/types": "3.936.0",
"@smithy/node-config-provider": "^4.3.5",
"@smithy/types": "^4.9.0",
@@ -1387,6 +1507,12 @@
"node": ">=6.9.0"
}
},
+ "node_modules/@braintree/sanitize-url": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.1.tgz",
+ "integrity": "sha512-i1L7noDNxtFyL5DmZafWy1wRVhGehQmzZaz1HiN5e7iylJMSZR7ekOV7NsIqa5qBldlLrsKv4HbgFUVlQrz8Mw==",
+ "license": "MIT"
+ },
"node_modules/@calcom/embed-core": {
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/@calcom/embed-core/-/embed-core-1.5.3.tgz",
@@ -1416,6 +1542,45 @@
"@calcom/embed-core": "1.5.3"
}
},
+ "node_modules/@chevrotain/cst-dts-gen": {
+ "version": "11.0.3",
+ "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz",
+ "integrity": "sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@chevrotain/gast": "11.0.3",
+ "@chevrotain/types": "11.0.3",
+ "lodash-es": "4.17.21"
+ }
+ },
+ "node_modules/@chevrotain/gast": {
+ "version": "11.0.3",
+ "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-11.0.3.tgz",
+ "integrity": "sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@chevrotain/types": "11.0.3",
+ "lodash-es": "4.17.21"
+ }
+ },
+ "node_modules/@chevrotain/regexp-to-ast": {
+ "version": "11.0.3",
+ "resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz",
+ "integrity": "sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/@chevrotain/types": {
+ "version": "11.0.3",
+ "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.0.3.tgz",
+ "integrity": "sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/@chevrotain/utils": {
+ "version": "11.0.3",
+ "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-11.0.3.tgz",
+ "integrity": "sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==",
+ "license": "Apache-2.0"
+ },
"node_modules/@chronark/zod-bird": {
"version": "0.3.10",
"resolved": "https://registry.npmjs.org/@chronark/zod-bird/-/zod-bird-0.3.10.tgz",
@@ -2216,6 +2381,23 @@
"integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
"deprecated": "Use @eslint/object-schema instead"
},
+ "node_modules/@iconify/types": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz",
+ "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==",
+ "license": "MIT"
+ },
+ "node_modules/@iconify/utils": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.1.0.tgz",
+ "integrity": "sha512-Zlzem1ZXhI1iHeeERabLNzBHdOa4VhQbqAcOQaMKuTuyZCpwKbC2R4Dd0Zo3g9EAc+Y4fiarO8HIHRAth7+skw==",
+ "license": "MIT",
+ "dependencies": {
+ "@antfu/install-pkg": "^1.1.0",
+ "@iconify/types": "^2.0.0",
+ "mlly": "^1.8.0"
+ }
+ },
"node_modules/@img/colour": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz",
@@ -2874,6 +3056,15 @@
"react": ">=16"
}
},
+ "node_modules/@mermaid-js/parser": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-0.6.3.tgz",
+ "integrity": "sha512-lnjOhe7zyHjc+If7yT4zoedx2vo4sHaTmtkl1+or8BRTnCtDmcTpAjpzDSfCZrshM5bCoz0GyidzadJAH1xobA==",
+ "license": "MIT",
+ "dependencies": {
+ "langium": "3.3.1"
+ }
+ },
"node_modules/@next-auth/prisma-adapter": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@next-auth/prisma-adapter/-/prisma-adapter-1.0.7.tgz",
@@ -3107,15 +3298,15 @@
}
},
"node_modules/@next/third-parties": {
- "version": "15.5.6",
- "resolved": "https://registry.npmjs.org/@next/third-parties/-/third-parties-15.5.6.tgz",
- "integrity": "sha512-B1BLvEi7edGERNN0njxpiqbqkp3zAZ69eJ5C0vwj/XINRzcC25b9MCqxbSHq094d306H65UnlhEkBv+a8c74iA==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/third-parties/-/third-parties-16.0.7.tgz",
+ "integrity": "sha512-YZ1VNUCNIokMwt1PTXU+/ZcFZzRHEBZTNrjkVja58XNPWxogr30PpGhuJhDsj7StgKfAEjF0IsLTAAONMmMe4g==",
"license": "MIT",
"dependencies": {
"third-party-capital": "1.0.20"
},
"peerDependencies": {
- "next": "^13.0.0 || ^14.0.0 || ^15.0.0",
+ "next": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0-beta.0",
"react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0"
}
},
@@ -3542,9 +3733,9 @@
}
},
"node_modules/@posthog/core": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/@posthog/core/-/core-1.6.0.tgz",
- "integrity": "sha512-Tbh8UACwbb7jFdDC7wwXHtfNzO+4wKh3VbyMHmp2UBe6w1jliJixexTJNfkqdGZm+ht3M10mcKvGGPnoZ2zLBg==",
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/@posthog/core/-/core-1.7.1.tgz",
+ "integrity": "sha512-kjK0eFMIpKo9GXIbts8VtAknsoZ18oZorANdtuTj1CbgS28t4ZVq//HAWhnxEuXRTrtkd+SUJ6Ux3j2Af8NCuA==",
"license": "MIT",
"dependencies": {
"cross-spawn": "^7.0.6"
@@ -4187,6 +4378,61 @@
}
}
},
+ "node_modules/@radix-ui/react-hover-card": {
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-hover-card/-/react-hover-card-1.1.15.tgz",
+ "integrity": "sha512-qgTkjNT1CfKMoP0rcasmlH2r1DAiYicWsDsufxl940sT2wHNEWWv6FMWIQXWhVdmC1d/HYfbhQx60KYyAtKxjg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-popper": "1.2.8",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-hover-card/node_modules/@radix-ui/react-portal": {
+ "version": "1.1.9",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.9.tgz",
+ "integrity": "sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-id": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.1.tgz",
@@ -5496,26 +5742,26 @@
}
},
"node_modules/@react-email/preview-server": {
- "version": "5.0.5",
- "resolved": "https://registry.npmjs.org/@react-email/preview-server/-/preview-server-5.0.5.tgz",
- "integrity": "sha512-dNZ8G7PqQ+BUGkBRJgo+8PDjEtRj8c2vRzUMA3s7Q6zTfXFrBrSchG37UT5TsL6zi/RAOVN2P0wBZqz60J3hsw==",
+ "version": "5.0.6",
+ "resolved": "https://registry.npmjs.org/@react-email/preview-server/-/preview-server-5.0.6.tgz",
+ "integrity": "sha512-hyaQyNeDTJKHrzdnPFdvw7nbohS+jBRzgdQLVVyBcRhiSV3iltqLlsaDVI/x+GJBWxtigbneL9SQ4v/EtOcHKg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "next": "16.0.1"
+ "next": "16.0.7"
}
},
"node_modules/@react-email/preview-server/node_modules/@next/env": {
- "version": "16.0.1",
- "resolved": "https://registry.npmjs.org/@next/env/-/env-16.0.1.tgz",
- "integrity": "sha512-LFvlK0TG2L3fEOX77OC35KowL8D7DlFF45C0OvKMC4hy8c/md1RC4UMNDlUGJqfCoCS2VWrZ4dSE6OjaX5+8mw==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/env/-/env-16.0.7.tgz",
+ "integrity": "sha512-gpaNgUh5nftFKRkRQGnVi5dpcYSKGcZZkQffZ172OrG/XkrnS7UBTQ648YY+8ME92cC4IojpI2LqTC8sTDhAaw==",
"dev": true,
"license": "MIT"
},
"node_modules/@react-email/preview-server/node_modules/@next/swc-darwin-arm64": {
- "version": "16.0.1",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.0.1.tgz",
- "integrity": "sha512-R0YxRp6/4W7yG1nKbfu41bp3d96a0EalonQXiMe+1H9GTHfKxGNCGFNWUho18avRBPsO8T3RmdWuzmfurlQPbg==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.0.7.tgz",
+ "integrity": "sha512-LlDtCYOEj/rfSnEn/Idi+j1QKHxY9BJFmxx7108A6D8K0SB+bNgfYQATPk/4LqOl4C0Wo3LACg2ie6s7xqMpJg==",
"cpu": [
"arm64"
],
@@ -5530,9 +5776,9 @@
}
},
"node_modules/@react-email/preview-server/node_modules/@next/swc-darwin-x64": {
- "version": "16.0.1",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.0.1.tgz",
- "integrity": "sha512-kETZBocRux3xITiZtOtVoVvXyQLB7VBxN7L6EPqgI5paZiUlnsgYv4q8diTNYeHmF9EiehydOBo20lTttCbHAg==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.0.7.tgz",
+ "integrity": "sha512-rtZ7BhnVvO1ICf3QzfW9H3aPz7GhBrnSIMZyr4Qy6boXF0b5E3QLs+cvJmg3PsTCG2M1PBoC+DANUi4wCOKXpA==",
"cpu": [
"x64"
],
@@ -5547,9 +5793,9 @@
}
},
"node_modules/@react-email/preview-server/node_modules/@next/swc-linux-arm64-gnu": {
- "version": "16.0.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.0.1.tgz",
- "integrity": "sha512-hWg3BtsxQuSKhfe0LunJoqxjO4NEpBmKkE+P2Sroos7yB//OOX3jD5ISP2wv8QdUwtRehMdwYz6VB50mY6hqAg==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.0.7.tgz",
+ "integrity": "sha512-mloD5WcPIeIeeZqAIP5c2kdaTa6StwP4/2EGy1mUw8HiexSHGK/jcM7lFuS3u3i2zn+xH9+wXJs6njO7VrAqww==",
"cpu": [
"arm64"
],
@@ -5564,9 +5810,9 @@
}
},
"node_modules/@react-email/preview-server/node_modules/@next/swc-linux-arm64-musl": {
- "version": "16.0.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.0.1.tgz",
- "integrity": "sha512-UPnOvYg+fjAhP3b1iQStcYPWeBFRLrugEyK/lDKGk7kLNua8t5/DvDbAEFotfV1YfcOY6bru76qN9qnjLoyHCQ==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.0.7.tgz",
+ "integrity": "sha512-+ksWNrZrthisXuo9gd1XnjHRowCbMtl/YgMpbRvFeDEqEBd523YHPWpBuDjomod88U8Xliw5DHhekBC3EOOd9g==",
"cpu": [
"arm64"
],
@@ -5581,9 +5827,9 @@
}
},
"node_modules/@react-email/preview-server/node_modules/@next/swc-linux-x64-gnu": {
- "version": "16.0.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.0.1.tgz",
- "integrity": "sha512-Et81SdWkcRqAJziIgFtsFyJizHoWne4fzJkvjd6V4wEkWTB4MX6J0uByUb0peiJQ4WeAt6GGmMszE5KrXK6WKg==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.0.7.tgz",
+ "integrity": "sha512-4WtJU5cRDxpEE44Ana2Xro1284hnyVpBb62lIpU5k85D8xXxatT+rXxBgPkc7C1XwkZMWpK5rXLXTh9PFipWsA==",
"cpu": [
"x64"
],
@@ -5598,9 +5844,9 @@
}
},
"node_modules/@react-email/preview-server/node_modules/@next/swc-linux-x64-musl": {
- "version": "16.0.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.0.1.tgz",
- "integrity": "sha512-qBbgYEBRrC1egcG03FZaVfVxrJm8wBl7vr8UFKplnxNRprctdP26xEv9nJ07Ggq4y1adwa0nz2mz83CELY7N6Q==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.0.7.tgz",
+ "integrity": "sha512-HYlhqIP6kBPXalW2dbMTSuB4+8fe+j9juyxwfMwCe9kQPPeiyFn7NMjNfoFOfJ2eXkeQsoUGXg+O2SE3m4Qg2w==",
"cpu": [
"x64"
],
@@ -5615,9 +5861,9 @@
}
},
"node_modules/@react-email/preview-server/node_modules/@next/swc-win32-arm64-msvc": {
- "version": "16.0.1",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.0.1.tgz",
- "integrity": "sha512-cPuBjYP6I699/RdbHJonb3BiRNEDm5CKEBuJ6SD8k3oLam2fDRMKAvmrli4QMDgT2ixyRJ0+DTkiODbIQhRkeQ==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.0.7.tgz",
+ "integrity": "sha512-EviG+43iOoBRZg9deGauXExjRphhuYmIOJ12b9sAPy0eQ6iwcPxfED2asb/s2/yiLYOdm37kPaiZu8uXSYPs0Q==",
"cpu": [
"arm64"
],
@@ -5632,9 +5878,9 @@
}
},
"node_modules/@react-email/preview-server/node_modules/@next/swc-win32-x64-msvc": {
- "version": "16.0.1",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.0.1.tgz",
- "integrity": "sha512-XeEUJsE4JYtfrXe/LaJn3z1pD19fK0Q6Er8Qoufi+HqvdO4LEPyCxLUt4rxA+4RfYo6S9gMlmzCMU2F+AatFqQ==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.0.7.tgz",
+ "integrity": "sha512-gniPjy55zp5Eg0896qSrf3yB1dw4F/3s8VK1ephdsZZ129j2n6e1WqCbE2YgcKhW9hPB9TVZENugquWJD5x0ug==",
"cpu": [
"x64"
],
@@ -5678,13 +5924,13 @@
}
},
"node_modules/@react-email/preview-server/node_modules/next": {
- "version": "16.0.1",
- "resolved": "https://registry.npmjs.org/next/-/next-16.0.1.tgz",
- "integrity": "sha512-e9RLSssZwd35p7/vOa+hoDFggUZIUbZhIUSLZuETCwrCVvxOs87NamoUzT+vbcNAL8Ld9GobBnWOA6SbV/arOw==",
+ "version": "16.0.7",
+ "resolved": "https://registry.npmjs.org/next/-/next-16.0.7.tgz",
+ "integrity": "sha512-3mBRJyPxT4LOxAJI6IsXeFtKfiJUbjCLgvXO02fV8Wy/lIhPvP94Fe7dGhUgHXcQy4sSuYwQNcOLhIfOm0rL0A==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@next/env": "16.0.1",
+ "@next/env": "16.0.7",
"@swc/helpers": "0.5.15",
"caniuse-lite": "^1.0.30001579",
"postcss": "8.4.31",
@@ -5697,14 +5943,14 @@
"node": ">=20.9.0"
},
"optionalDependencies": {
- "@next/swc-darwin-arm64": "16.0.1",
- "@next/swc-darwin-x64": "16.0.1",
- "@next/swc-linux-arm64-gnu": "16.0.1",
- "@next/swc-linux-arm64-musl": "16.0.1",
- "@next/swc-linux-x64-gnu": "16.0.1",
- "@next/swc-linux-x64-musl": "16.0.1",
- "@next/swc-win32-arm64-msvc": "16.0.1",
- "@next/swc-win32-x64-msvc": "16.0.1",
+ "@next/swc-darwin-arm64": "16.0.7",
+ "@next/swc-darwin-x64": "16.0.7",
+ "@next/swc-linux-arm64-gnu": "16.0.7",
+ "@next/swc-linux-arm64-musl": "16.0.7",
+ "@next/swc-linux-x64-gnu": "16.0.7",
+ "@next/swc-linux-x64-musl": "16.0.7",
+ "@next/swc-win32-arm64-msvc": "16.0.7",
+ "@next/swc-win32-x64-msvc": "16.0.7",
"sharp": "^0.34.4"
},
"peerDependencies": {
@@ -5967,60 +6213,60 @@
}
},
"node_modules/@shikijs/core": {
- "version": "3.17.0",
- "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.17.0.tgz",
- "integrity": "sha512-/HjeOnbc62C+n33QFNFrAhUlIADKwfuoS50Ht0pxujxP4QjZAlFp5Q+OkDo531SCTzivx5T18khwyBdKoPdkuw==",
+ "version": "3.19.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.19.0.tgz",
+ "integrity": "sha512-L7SrRibU7ZoYi1/TrZsJOFAnnHyLTE1SwHG1yNWjZIVCqjOEmCSuK2ZO9thnRbJG6TOkPp+Z963JmpCNw5nzvA==",
"license": "MIT",
"dependencies": {
- "@shikijs/types": "3.17.0",
+ "@shikijs/types": "3.19.0",
"@shikijs/vscode-textmate": "^10.0.2",
"@types/hast": "^3.0.4",
"hast-util-to-html": "^9.0.5"
}
},
"node_modules/@shikijs/engine-javascript": {
- "version": "3.17.0",
- "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.17.0.tgz",
- "integrity": "sha512-WwF99xdP8KfuDrIbT4wxyypfhoIxMeeOCp1AiuvzzZ6JT5B3vIuoclL8xOuuydA6LBeeNXUF/XV5zlwwex1jlA==",
+ "version": "3.19.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.19.0.tgz",
+ "integrity": "sha512-ZfWJNm2VMhKkQIKT9qXbs76RRcT0SF/CAvEz0+RkpUDAoDaCx0uFdCGzSRiD9gSlhm6AHkjdieOBJMaO2eC1rQ==",
"license": "MIT",
"dependencies": {
- "@shikijs/types": "3.17.0",
+ "@shikijs/types": "3.19.0",
"@shikijs/vscode-textmate": "^10.0.2",
"oniguruma-to-es": "^4.3.4"
}
},
"node_modules/@shikijs/engine-oniguruma": {
- "version": "3.17.0",
- "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.17.0.tgz",
- "integrity": "sha512-flSbHZAiOZDNTrEbULY8DLWavu/TyVu/E7RChpLB4WvKX4iHMfj80C6Hi3TjIWaQtHOW0KC6kzMcuB5TO1hZ8Q==",
+ "version": "3.19.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.19.0.tgz",
+ "integrity": "sha512-1hRxtYIJfJSZeM5ivbUXv9hcJP3PWRo5prG/V2sWwiubUKTa+7P62d2qxCW8jiVFX4pgRHhnHNp+qeR7Xl+6kg==",
"license": "MIT",
"dependencies": {
- "@shikijs/types": "3.17.0",
+ "@shikijs/types": "3.19.0",
"@shikijs/vscode-textmate": "^10.0.2"
}
},
"node_modules/@shikijs/langs": {
- "version": "3.17.0",
- "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.17.0.tgz",
- "integrity": "sha512-icmur2n5Ojb+HAiQu6NEcIIJ8oWDFGGEpiqSCe43539Sabpx7Y829WR3QuUW2zjTM4l6V8Sazgb3rrHO2orEAw==",
+ "version": "3.19.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.19.0.tgz",
+ "integrity": "sha512-dBMFzzg1QiXqCVQ5ONc0z2ebyoi5BKz+MtfByLm0o5/nbUu3Iz8uaTCa5uzGiscQKm7lVShfZHU1+OG3t5hgwg==",
"license": "MIT",
"dependencies": {
- "@shikijs/types": "3.17.0"
+ "@shikijs/types": "3.19.0"
}
},
"node_modules/@shikijs/themes": {
- "version": "3.17.0",
- "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.17.0.tgz",
- "integrity": "sha512-/xEizMHLBmMHwtx4JuOkRf3zwhWD2bmG5BRr0IPjpcWpaq4C3mYEuTk/USAEglN0qPrTwEHwKVpSu/y2jhferA==",
+ "version": "3.19.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.19.0.tgz",
+ "integrity": "sha512-H36qw+oh91Y0s6OlFfdSuQ0Ld+5CgB/VE6gNPK+Hk4VRbVG/XQgkjnt4KzfnnoO6tZPtKJKHPjwebOCfjd6F8A==",
"license": "MIT",
"dependencies": {
- "@shikijs/types": "3.17.0"
+ "@shikijs/types": "3.19.0"
}
},
"node_modules/@shikijs/types": {
- "version": "3.17.0",
- "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.17.0.tgz",
- "integrity": "sha512-wjLVfutYWVUnxAjsWEob98xgyaGv0dTEnMZDruU5mRjVN7szcGOfgO+997W2yR6odp+1PtSBNeSITRRTfUzK/g==",
+ "version": "3.19.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.19.0.tgz",
+ "integrity": "sha512-Z2hdeEQlzuntf/BZpFG8a+Fsw9UVXdML7w0o3TgSXV3yNESGon+bs9ITkQb3Ki7zxoXOOu5oJWqZ2uto06V9iQ==",
"license": "MIT",
"dependencies": {
"@shikijs/vscode-textmate": "^10.0.2",
@@ -6125,9 +6371,9 @@
}
},
"node_modules/@smithy/core": {
- "version": "3.18.5",
- "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.18.5.tgz",
- "integrity": "sha512-6gnIz3h+PEPQGDj8MnRSjDvKBah042jEoPgjFGJ4iJLBE78L4lY/n98x14XyPF4u3lN179Ub/ZKFY5za9GeLQw==",
+ "version": "3.18.7",
+ "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.18.7.tgz",
+ "integrity": "sha512-axG9MvKhMWOhFbvf5y2DuyTxQueO0dkedY9QC3mAfndLosRI/9LJv8WaL0mw7ubNhsO4IuXX9/9dYGPFvHrqlw==",
"license": "Apache-2.0",
"dependencies": {
"@smithy/middleware-serde": "^4.2.6",
@@ -6345,12 +6591,12 @@
}
},
"node_modules/@smithy/middleware-endpoint": {
- "version": "4.3.12",
- "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.3.12.tgz",
- "integrity": "sha512-9pAX/H+VQPzNbouhDhkW723igBMLgrI8OtX+++M7iKJgg/zY/Ig3i1e6seCcx22FWhE6Q/S61BRdi2wXBORT+A==",
+ "version": "4.3.14",
+ "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.3.14.tgz",
+ "integrity": "sha512-v0q4uTKgBM8dsqGjqsabZQyH85nFaTnFcgpWU1uydKFsdyyMzfvOkNum9G7VK+dOP01vUnoZxIeRiJ6uD0kjIg==",
"license": "Apache-2.0",
"dependencies": {
- "@smithy/core": "^3.18.5",
+ "@smithy/core": "^3.18.7",
"@smithy/middleware-serde": "^4.2.6",
"@smithy/node-config-provider": "^4.3.5",
"@smithy/shared-ini-file-loader": "^4.4.0",
@@ -6364,15 +6610,15 @@
}
},
"node_modules/@smithy/middleware-retry": {
- "version": "4.4.12",
- "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.4.12.tgz",
- "integrity": "sha512-S4kWNKFowYd0lID7/DBqWHOQxmxlsf0jBaos9chQZUWTVOjSW1Ogyh8/ib5tM+agFDJ/TCxuCTvrnlc+9cIBcQ==",
+ "version": "4.4.14",
+ "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.4.14.tgz",
+ "integrity": "sha512-Z2DG8Ej7FyWG1UA+7HceINtSLzswUgs2np3sZX0YBBxCt+CXG4QUxv88ZDS3+2/1ldW7LqtSY1UO/6VQ1pND8Q==",
"license": "Apache-2.0",
"dependencies": {
"@smithy/node-config-provider": "^4.3.5",
"@smithy/protocol-http": "^5.3.5",
"@smithy/service-error-classification": "^4.2.5",
- "@smithy/smithy-client": "^4.9.8",
+ "@smithy/smithy-client": "^4.9.10",
"@smithy/types": "^4.9.0",
"@smithy/util-middleware": "^4.2.5",
"@smithy/util-retry": "^4.2.5",
@@ -6539,13 +6785,13 @@
}
},
"node_modules/@smithy/smithy-client": {
- "version": "4.9.8",
- "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.9.8.tgz",
- "integrity": "sha512-8xgq3LgKDEFoIrLWBho/oYKyWByw9/corz7vuh1upv7ZBm0ZMjGYBhbn6v643WoIqA9UTcx5A5htEp/YatUwMA==",
+ "version": "4.9.10",
+ "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.9.10.tgz",
+ "integrity": "sha512-Jaoz4Jw1QYHc1EFww/E6gVtNjhoDU+gwRKqXP6C3LKYqqH2UQhP8tMP3+t/ePrhaze7fhLE8vS2q6vVxBANFTQ==",
"license": "Apache-2.0",
"dependencies": {
- "@smithy/core": "^3.18.5",
- "@smithy/middleware-endpoint": "^4.3.12",
+ "@smithy/core": "^3.18.7",
+ "@smithy/middleware-endpoint": "^4.3.14",
"@smithy/middleware-stack": "^4.2.5",
"@smithy/protocol-http": "^5.3.5",
"@smithy/types": "^4.9.0",
@@ -6646,13 +6892,13 @@
}
},
"node_modules/@smithy/util-defaults-mode-browser": {
- "version": "4.3.11",
- "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.3.11.tgz",
- "integrity": "sha512-yHv+r6wSQXEXTPVCIQTNmXVWs7ekBTpMVErjqZoWkYN75HIFN5y9+/+sYOejfAuvxWGvgzgxbTHa/oz61YTbKw==",
+ "version": "4.3.13",
+ "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.3.13.tgz",
+ "integrity": "sha512-hlVLdAGrVfyNei+pKIgqDTxfu/ZI2NSyqj4IDxKd5bIsIqwR/dSlkxlPaYxFiIaDVrBy0he8orsFy+Cz119XvA==",
"license": "Apache-2.0",
"dependencies": {
"@smithy/property-provider": "^4.2.5",
- "@smithy/smithy-client": "^4.9.8",
+ "@smithy/smithy-client": "^4.9.10",
"@smithy/types": "^4.9.0",
"tslib": "^2.6.2"
},
@@ -6661,16 +6907,16 @@
}
},
"node_modules/@smithy/util-defaults-mode-node": {
- "version": "4.2.14",
- "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.14.tgz",
- "integrity": "sha512-ljZN3iRvaJUgulfvobIuG97q1iUuCMrvXAlkZ4msY+ZuVHQHDIqn7FKZCEj+bx8omz6kF5yQXms/xhzjIO5XiA==",
+ "version": "4.2.16",
+ "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.16.tgz",
+ "integrity": "sha512-F1t22IUiJLHrxW9W1CQ6B9PN+skZ9cqSuzB18Eh06HrJPbjsyZ7ZHecAKw80DQtyGTRcVfeukKaCRYebFwclbg==",
"license": "Apache-2.0",
"dependencies": {
"@smithy/config-resolver": "^4.4.3",
"@smithy/credential-provider-imds": "^4.2.5",
"@smithy/node-config-provider": "^4.3.5",
"@smithy/property-provider": "^4.2.5",
- "@smithy/smithy-client": "^4.9.8",
+ "@smithy/smithy-client": "^4.9.10",
"@smithy/types": "^4.9.0",
"tslib": "^2.6.2"
},
@@ -7409,6 +7655,40 @@
"url": "https://github.com/sponsors/ueberdosis"
}
},
+ "node_modules/@tokenlens/core": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/@tokenlens/core/-/core-1.3.0.tgz",
+ "integrity": "sha512-d8YNHNC+q10bVpi95fELJwJyPVf1HfvBEI18eFQxRSZTdByXrP+f/ZtlhSzkx0Jl0aEmYVeBA5tPeeYRioLViQ==",
+ "license": "MIT"
+ },
+ "node_modules/@tokenlens/fetch": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/@tokenlens/fetch/-/fetch-1.3.0.tgz",
+ "integrity": "sha512-RONDRmETYly9xO8XMKblmrZjKSwCva4s5ebJwQNfNlChZoA5kplPoCgnWceHnn1J1iRjLVlrCNB43ichfmGBKQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@tokenlens/core": "1.3.0"
+ }
+ },
+ "node_modules/@tokenlens/helpers": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@tokenlens/helpers/-/helpers-1.3.1.tgz",
+ "integrity": "sha512-t6yL8N6ES8337E6eVSeH4hCKnPdWkZRFpupy9w5E66Q9IeqQ9IO7XQ6gh12JKjvWiRHuyyJ8MBP5I549Cr41EQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@tokenlens/core": "1.3.0",
+ "@tokenlens/fetch": "1.3.0"
+ }
+ },
+ "node_modules/@tokenlens/models": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/@tokenlens/models/-/models-1.3.0.tgz",
+ "integrity": "sha512-9mx7ZGeewW4ndXAiD7AT1bbCk4OpJeortbjHHyNkgap+pMPPn1chY6R5zqe1ggXIUzZ2l8VOAKfPqOvpcrisJw==",
+ "license": "MIT",
+ "dependencies": {
+ "@tokenlens/core": "1.3.0"
+ }
+ },
"node_modules/@tremor/react": {
"version": "3.18.7",
"resolved": "https://registry.npmjs.org/@tremor/react/-/react-3.18.7.tgz",
@@ -7674,21 +7954,156 @@
"@types/node": "*"
}
},
+ "node_modules/@types/d3": {
+ "version": "7.4.3",
+ "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz",
+ "integrity": "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/d3-array": "*",
+ "@types/d3-axis": "*",
+ "@types/d3-brush": "*",
+ "@types/d3-chord": "*",
+ "@types/d3-color": "*",
+ "@types/d3-contour": "*",
+ "@types/d3-delaunay": "*",
+ "@types/d3-dispatch": "*",
+ "@types/d3-drag": "*",
+ "@types/d3-dsv": "*",
+ "@types/d3-ease": "*",
+ "@types/d3-fetch": "*",
+ "@types/d3-force": "*",
+ "@types/d3-format": "*",
+ "@types/d3-geo": "*",
+ "@types/d3-hierarchy": "*",
+ "@types/d3-interpolate": "*",
+ "@types/d3-path": "*",
+ "@types/d3-polygon": "*",
+ "@types/d3-quadtree": "*",
+ "@types/d3-random": "*",
+ "@types/d3-scale": "*",
+ "@types/d3-scale-chromatic": "*",
+ "@types/d3-selection": "*",
+ "@types/d3-shape": "*",
+ "@types/d3-time": "*",
+ "@types/d3-time-format": "*",
+ "@types/d3-timer": "*",
+ "@types/d3-transition": "*",
+ "@types/d3-zoom": "*"
+ }
+ },
"node_modules/@types/d3-array": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.1.tgz",
"integrity": "sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg=="
},
+ "node_modules/@types/d3-axis": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz",
+ "integrity": "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/d3-selection": "*"
+ }
+ },
+ "node_modules/@types/d3-brush": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz",
+ "integrity": "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/d3-selection": "*"
+ }
+ },
+ "node_modules/@types/d3-chord": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz",
+ "integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==",
+ "license": "MIT"
+ },
"node_modules/@types/d3-color": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz",
"integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A=="
},
+ "node_modules/@types/d3-contour": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz",
+ "integrity": "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/d3-array": "*",
+ "@types/geojson": "*"
+ }
+ },
+ "node_modules/@types/d3-delaunay": {
+ "version": "6.0.4",
+ "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz",
+ "integrity": "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==",
+ "license": "MIT"
+ },
+ "node_modules/@types/d3-dispatch": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.7.tgz",
+ "integrity": "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==",
+ "license": "MIT"
+ },
+ "node_modules/@types/d3-drag": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz",
+ "integrity": "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/d3-selection": "*"
+ }
+ },
+ "node_modules/@types/d3-dsv": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz",
+ "integrity": "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==",
+ "license": "MIT"
+ },
"node_modules/@types/d3-ease": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz",
"integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA=="
},
+ "node_modules/@types/d3-fetch": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz",
+ "integrity": "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/d3-dsv": "*"
+ }
+ },
+ "node_modules/@types/d3-force": {
+ "version": "3.0.10",
+ "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz",
+ "integrity": "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==",
+ "license": "MIT"
+ },
+ "node_modules/@types/d3-format": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz",
+ "integrity": "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==",
+ "license": "MIT"
+ },
+ "node_modules/@types/d3-geo": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.0.tgz",
+ "integrity": "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/geojson": "*"
+ }
+ },
+ "node_modules/@types/d3-hierarchy": {
+ "version": "3.1.7",
+ "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz",
+ "integrity": "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==",
+ "license": "MIT"
+ },
"node_modules/@types/d3-interpolate": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz",
@@ -7702,6 +8117,24 @@
"resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.0.tgz",
"integrity": "sha512-P2dlU/q51fkOc/Gfl3Ul9kicV7l+ra934qBFXCFhrZMOL6du1TM0pm1ThYvENukyOn5h9v+yMJ9Fn5JK4QozrQ=="
},
+ "node_modules/@types/d3-polygon": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz",
+ "integrity": "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==",
+ "license": "MIT"
+ },
+ "node_modules/@types/d3-quadtree": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz",
+ "integrity": "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==",
+ "license": "MIT"
+ },
+ "node_modules/@types/d3-random": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.3.tgz",
+ "integrity": "sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ==",
+ "license": "MIT"
+ },
"node_modules/@types/d3-scale": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.8.tgz",
@@ -7710,6 +8143,18 @@
"@types/d3-time": "*"
}
},
+ "node_modules/@types/d3-scale-chromatic": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz",
+ "integrity": "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==",
+ "license": "MIT"
+ },
+ "node_modules/@types/d3-selection": {
+ "version": "3.0.11",
+ "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz",
+ "integrity": "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==",
+ "license": "MIT"
+ },
"node_modules/@types/d3-shape": {
"version": "3.1.6",
"resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.6.tgz",
@@ -7723,11 +8168,45 @@
"resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.3.tgz",
"integrity": "sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw=="
},
+ "node_modules/@types/d3-time-format": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz",
+ "integrity": "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==",
+ "license": "MIT"
+ },
"node_modules/@types/d3-timer": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz",
"integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw=="
},
+ "node_modules/@types/d3-transition": {
+ "version": "3.0.9",
+ "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz",
+ "integrity": "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/d3-selection": "*"
+ }
+ },
+ "node_modules/@types/d3-zoom": {
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz",
+ "integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/d3-interpolate": "*",
+ "@types/d3-selection": "*"
+ }
+ },
+ "node_modules/@types/debug": {
+ "version": "4.1.12",
+ "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz",
+ "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/ms": "*"
+ }
+ },
"node_modules/@types/dlv": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@types/dlv/-/dlv-1.1.4.tgz",
@@ -7738,8 +8217,16 @@
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
- "license": "MIT",
- "peer": true
+ "license": "MIT"
+ },
+ "node_modules/@types/estree-jsx": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz",
+ "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "*"
+ }
},
"node_modules/@types/fluent-ffmpeg": {
"version": "2.1.27",
@@ -7750,6 +8237,12 @@
"@types/node": "*"
}
},
+ "node_modules/@types/geojson": {
+ "version": "7946.0.16",
+ "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",
+ "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==",
+ "license": "MIT"
+ },
"node_modules/@types/hast": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz",
@@ -7781,6 +8274,12 @@
"@types/node": "*"
}
},
+ "node_modules/@types/katex": {
+ "version": "0.16.7",
+ "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.7.tgz",
+ "integrity": "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==",
+ "license": "MIT"
+ },
"node_modules/@types/linkify-it": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz",
@@ -7823,7 +8322,6 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz",
"integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",
- "dev": true,
"license": "MIT"
},
"node_modules/@types/node": {
@@ -7835,15 +8333,6 @@
"undici-types": "~6.21.0"
}
},
- "node_modules/@types/node-fetch": {
- "version": "2.6.11",
- "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz",
- "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==",
- "dependencies": {
- "@types/node": "*",
- "form-data": "^4.0.0"
- }
- },
"node_modules/@types/node/node_modules/undici-types": {
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
@@ -7888,6 +8377,13 @@
"resolved": "https://registry.npmjs.org/@types/shimmer/-/shimmer-1.2.0.tgz",
"integrity": "sha512-UE7oxhQLLd9gub6JKIAhDq06T0F6FnztwMNRvYgjeQSBeMc1ZG/tA47EwfduvkuQS8apbkM/lpLpWsaCeYsXVg=="
},
+ "node_modules/@types/trusted-types": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
+ "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",
+ "license": "MIT",
+ "optional": true
+ },
"node_modules/@types/ua-parser-js": {
"version": "0.7.39",
"resolved": "https://registry.npmjs.org/@types/ua-parser-js/-/ua-parser-js-0.7.39.tgz",
@@ -8229,6 +8725,8 @@
"version": "3.4.35",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.35.tgz",
"integrity": "sha512-gKp0zGoLnMYtw4uS/SJRRO7rsVggLjvot3mcctlMXunYNsX+aRJDqqw/lV5/gHK91nvaAAlWFgdVl020AW1Prg==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"@babel/parser": "^7.24.7",
@@ -8242,12 +8740,16 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "dev": true,
+ "optional": true,
"peer": true
},
"node_modules/@vue/compiler-dom": {
"version": "3.4.35",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.35.tgz",
"integrity": "sha512-pWIZRL76/oE/VMhdv/ovZfmuooEni6JPG1BFe7oLk5DZRo/ImydXijoZl/4kh2406boRQ7lxTYzbZEEXEhj9NQ==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"@vue/compiler-core": "3.4.35",
@@ -8258,6 +8760,8 @@
"version": "3.4.35",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.35.tgz",
"integrity": "sha512-xacnRS/h/FCsjsMfxBkzjoNxyxEyKyZfBch/P4vkLRvYJwe5ChXmZZrj8Dsed/752H2Q3JE8kYu9Uyha9J6PgA==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"@babel/parser": "^7.24.7",
@@ -8275,79 +8779,69 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "dev": true,
+ "optional": true,
"peer": true
},
"node_modules/@vue/compiler-ssr": {
"version": "3.4.35",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.35.tgz",
"integrity": "sha512-7iynB+0KB1AAJKk/biENTV5cRGHRdbdaD7Mx3nWcm1W8bVD6QmnH3B4AHhQQ1qZHhqFwzEzMwiytXm3PX1e60A==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"@vue/compiler-dom": "3.4.35",
"@vue/shared": "3.4.35"
}
},
- "node_modules/@vue/reactivity": {
- "version": "3.4.35",
- "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.35.tgz",
- "integrity": "sha512-Ggtz7ZZHakriKioveJtPlStYardwQH6VCs9V13/4qjHSQb/teE30LVJNrbBVs4+aoYGtTQKJbTe4CWGxVZrvEw==",
- "peer": true,
- "dependencies": {
- "@vue/shared": "3.4.35"
- }
- },
- "node_modules/@vue/runtime-core": {
- "version": "3.4.35",
- "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.35.tgz",
- "integrity": "sha512-D+BAjFoWwT5wtITpSxwqfWZiBClhBbR+bm0VQlWYFOadUUXFo+5wbe9ErXhLvwguPiLZdEF13QAWi2vP3ZD5tA==",
- "peer": true,
- "dependencies": {
- "@vue/reactivity": "3.4.35",
- "@vue/shared": "3.4.35"
- }
- },
- "node_modules/@vue/runtime-dom": {
- "version": "3.4.35",
- "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.35.tgz",
- "integrity": "sha512-yGOlbos+MVhlS5NWBF2HDNgblG8e2MY3+GigHEyR/dREAluvI5tuUUgie3/9XeqhPE4LF0i2wjlduh5thnfOqw==",
- "peer": true,
- "dependencies": {
- "@vue/reactivity": "3.4.35",
- "@vue/runtime-core": "3.4.35",
- "@vue/shared": "3.4.35",
- "csstype": "^3.1.3"
- }
- },
- "node_modules/@vue/server-renderer": {
- "version": "3.4.35",
- "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.35.tgz",
- "integrity": "sha512-iZ0e/u9mRE4T8tNhlo0tbA+gzVkgv8r5BX6s1kRbOZqfpq14qoIvCZ5gIgraOmYkMYrSEZgkkojFPr+Nyq/Mnw==",
- "peer": true,
- "dependencies": {
- "@vue/compiler-ssr": "3.4.35",
- "@vue/shared": "3.4.35"
- },
- "peerDependencies": {
- "vue": "3.4.35"
- }
- },
"node_modules/@vue/shared": {
"version": "3.4.35",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.35.tgz",
"integrity": "sha512-hvuhBYYDe+b1G8KHxsQ0diDqDMA8D9laxWZhNAjE83VZb5UDaXl9Xnz7cGdDSyiHM90qqI/CyGMcpBpiDy6VVQ==",
+ "dev": true,
+ "optional": true,
"peer": true
},
- "node_modules/abort-controller": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
- "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
+ "node_modules/@xyflow/react": {
+ "version": "12.9.3",
+ "resolved": "https://registry.npmjs.org/@xyflow/react/-/react-12.9.3.tgz",
+ "integrity": "sha512-PSWoJ8vHiEqSIkLIkge+0eiHWiw4C6dyFDA03VKWJkqbU4A13VlDIVwKqf/Znuysn2GQw/zA61zpHE4rGgax7Q==",
+ "license": "MIT",
"dependencies": {
- "event-target-shim": "^5.0.0"
+ "@xyflow/system": "0.0.73",
+ "classcat": "^5.0.3",
+ "zustand": "^4.4.0"
},
- "engines": {
- "node": ">=6.5"
+ "peerDependencies": {
+ "react": ">=17",
+ "react-dom": ">=17"
}
},
+ "node_modules/@xyflow/system": {
+ "version": "0.0.73",
+ "resolved": "https://registry.npmjs.org/@xyflow/system/-/system-0.0.73.tgz",
+ "integrity": "sha512-C2ymH2V4mYDkdVSiRx0D7R0s3dvfXiupVBcko6tXP5K4tVdSBMo22/e3V9yRNdn+2HQFv44RFKzwOyCcUUDAVQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/d3-drag": "^3.0.7",
+ "@types/d3-interpolate": "^3.0.4",
+ "@types/d3-selection": "^3.0.10",
+ "@types/d3-transition": "^3.0.8",
+ "@types/d3-zoom": "^3.0.8",
+ "d3-drag": "^3.0.0",
+ "d3-interpolate": "^3.0.1",
+ "d3-selection": "^3.0.0",
+ "d3-zoom": "^3.0.0"
+ }
+ },
+ "node_modules/@yarnpkg/lockfile": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz",
+ "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==",
+ "dev": true,
+ "license": "BSD-2-Clause"
+ },
"node_modules/accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@@ -8421,88 +8915,22 @@
"node": ">= 6.0.0"
}
},
- "node_modules/agentkeepalive": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz",
- "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==",
- "dependencies": {
- "humanize-ms": "^1.2.1"
- },
- "engines": {
- "node": ">= 8.0.0"
- }
- },
"node_modules/ai": {
- "version": "2.2.37",
- "resolved": "https://registry.npmjs.org/ai/-/ai-2.2.37.tgz",
- "integrity": "sha512-JIYm5N1muGVqBqWnvkt29FmXhESoO5TcDxw74OE41SsM+uIou6NPDDs0XWb/ABcd1gmp6k5zym64KWMPM2xm0A==",
+ "version": "5.0.108",
+ "resolved": "https://registry.npmjs.org/ai/-/ai-5.0.108.tgz",
+ "integrity": "sha512-Jex3Lb7V41NNpuqJHKgrwoU6BCLHdI1Pg4qb4GJH4jRIDRXUBySJErHjyN4oTCwbiYCeb/8II9EnqSRPq9EifA==",
+ "license": "Apache-2.0",
"dependencies": {
- "eventsource-parser": "1.0.0",
- "nanoid": "3.3.6",
- "solid-swr-store": "0.10.7",
- "sswr": "2.0.0",
- "swr": "2.2.0",
- "swr-store": "0.10.6",
- "swrv": "1.0.4"
- },
- "engines": {
- "node": ">=14.6"
- },
- "peerDependencies": {
- "react": "^18.2.0",
- "solid-js": "^1.7.7",
- "svelte": "^3.0.0 || ^4.0.0",
- "vue": "^3.3.4"
- },
- "peerDependenciesMeta": {
- "react": {
- "optional": true
- },
- "solid-js": {
- "optional": true
- },
- "svelte": {
- "optional": true
- },
- "vue": {
- "optional": true
- }
- }
- },
- "node_modules/ai/node_modules/eventsource-parser": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-1.0.0.tgz",
- "integrity": "sha512-9jgfSCa3dmEme2ES3mPByGXfgZ87VbP97tng1G2nWwWx6bV2nYxm2AWCrbQjXToSe+yYlqaZNtxffR9IeQr95g==",
- "engines": {
- "node": ">=14.18"
- }
- },
- "node_modules/ai/node_modules/nanoid": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
- "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "bin": {
- "nanoid": "bin/nanoid.cjs"
+ "@ai-sdk/gateway": "2.0.18",
+ "@ai-sdk/provider": "2.0.0",
+ "@ai-sdk/provider-utils": "3.0.18",
+ "@opentelemetry/api": "1.9.0"
},
"engines": {
- "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
- }
- },
- "node_modules/ai/node_modules/swr": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/swr/-/swr-2.2.0.tgz",
- "integrity": "sha512-AjqHOv2lAhkuUdIiBu9xbuettzAzWXmCEcLONNKJRba87WAefz8Ca9d6ds/SzrPc235n1IxWYdhJ2zF3MNUaoQ==",
- "dependencies": {
- "use-sync-external-store": "^1.2.0"
+ "node": ">=18"
},
"peerDependencies": {
- "react": "^16.11.0 || ^17.0.0 || ^18.0.0"
+ "zod": "^3.25.76 || ^4.1.8"
}
},
"node_modules/ajv": {
@@ -8939,11 +9367,6 @@
"retry": "0.13.1"
}
},
- "node_modules/asynckit": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
- },
"node_modules/atomically": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/atomically/-/atomically-2.1.0.tgz",
@@ -9029,16 +9452,21 @@
"deep-equal": "^2.0.5"
}
},
+ "node_modules/bail": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz",
+ "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
- "node_modules/base-64": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz",
- "integrity": "sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA=="
- },
"node_modules/base-x": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-5.0.1.tgz",
@@ -9233,7 +9661,8 @@
"node_modules/buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
- "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
+ "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==",
+ "license": "BSD-3-Clause"
},
"node_modules/buffer-from": {
"version": "1.1.2",
@@ -9268,15 +9697,15 @@
}
},
"node_modules/call-bind": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
- "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
+ "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
+ "license": "MIT",
"dependencies": {
+ "call-bind-apply-helpers": "^1.0.0",
"es-define-property": "^1.0.0",
- "es-errors": "^1.3.0",
- "function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4",
- "set-function-length": "^1.2.1"
+ "set-function-length": "^1.2.2"
},
"engines": {
"node": ">= 0.4"
@@ -9298,6 +9727,23 @@
"node": ">= 0.4"
}
},
+ "node_modules/call-bound": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -9381,6 +9827,16 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
+ "node_modules/character-entities": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz",
+ "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/character-entities-html4": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz",
@@ -9401,12 +9857,40 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/charenc": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
- "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==",
- "engines": {
- "node": "*"
+ "node_modules/character-reference-invalid": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz",
+ "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/chevrotain": {
+ "version": "11.0.3",
+ "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz",
+ "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@chevrotain/cst-dts-gen": "11.0.3",
+ "@chevrotain/gast": "11.0.3",
+ "@chevrotain/regexp-to-ast": "11.0.3",
+ "@chevrotain/types": "11.0.3",
+ "@chevrotain/utils": "11.0.3",
+ "lodash-es": "4.17.21"
+ }
+ },
+ "node_modules/chevrotain-allstar": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/chevrotain-allstar/-/chevrotain-allstar-0.3.1.tgz",
+ "integrity": "sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw==",
+ "license": "MIT",
+ "dependencies": {
+ "lodash-es": "^4.17.21"
+ },
+ "peerDependencies": {
+ "chevrotain": "^11.0.0"
}
},
"node_modules/chokidar": {
@@ -9461,6 +9945,22 @@
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
}
},
+ "node_modules/ci-info": {
+ "version": "3.9.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz",
+ "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/sibiraj-s"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/citty": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz",
@@ -9486,6 +9986,12 @@
"url": "https://polar.sh/cva"
}
},
+ "node_modules/classcat": {
+ "version": "5.0.5",
+ "resolved": "https://registry.npmjs.org/classcat/-/classcat-5.0.5.tgz",
+ "integrity": "sha512-JhZUT7JFcQy/EzW605k/ktHtncoo9vnyW/2GspNYwFlN1C/WmjuV/xtS04e9SOkL2sTdw0VAZ2UGCcQ9lR6p6w==",
+ "license": "MIT"
+ },
"node_modules/classnames": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz",
@@ -9605,6 +10111,7 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/cmdk/-/cmdk-1.1.1.tgz",
"integrity": "sha512-Vsv7kFaXm+ptHDMZ7izaRsP70GgrW9NBNGswt9OZaVBLlE0SNpDq8eu/VGXyF9r7M0azK3Wy7OlYXsuyYLFzHg==",
+ "license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.6",
@@ -9620,6 +10127,8 @@
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz",
"integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.15",
@@ -9663,17 +10172,6 @@
"lodash.uniqby": "4.5.0"
}
},
- "node_modules/combined-stream": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
- "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
- "dependencies": {
- "delayed-stream": "~1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/comma-separated-tokens": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz",
@@ -9760,8 +10258,7 @@
"node_modules/confbox": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz",
- "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==",
- "dev": true
+ "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w=="
},
"node_modules/consola": {
"version": "3.4.2",
@@ -9827,6 +10324,15 @@
"node": ">= 0.10"
}
},
+ "node_modules/cose-base": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz",
+ "integrity": "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==",
+ "license": "MIT",
+ "dependencies": {
+ "layout-base": "^1.0.0"
+ }
+ },
"node_modules/country-flag-icons": {
"version": "1.5.18",
"resolved": "https://registry.npmjs.org/country-flag-icons/-/country-flag-icons-1.5.18.tgz",
@@ -9882,14 +10388,6 @@
"node": ">= 8"
}
},
- "node_modules/crypt": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
- "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==",
- "engines": {
- "node": "*"
- }
- },
"node_modules/crypto-js": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
@@ -9916,6 +10414,95 @@
"resolved": "https://registry.npmjs.org/custom-error-instance/-/custom-error-instance-2.1.1.tgz",
"integrity": "sha512-p6JFxJc3M4OTD2li2qaHkDCw9SfMw82Ldr6OC9Je1aXiGfhx2W8p3GaoeaGrPJTUN9NirTM/KTxHWMUdR1rsUg=="
},
+ "node_modules/cytoscape": {
+ "version": "3.33.1",
+ "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.33.1.tgz",
+ "integrity": "sha512-iJc4TwyANnOGR1OmWhsS9ayRS3s+XQ185FmuHObThD+5AeJCakAAbWv8KimMTt08xCCLNgneQwFp+JRJOr9qGQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/cytoscape-cose-bilkent": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz",
+ "integrity": "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==",
+ "license": "MIT",
+ "dependencies": {
+ "cose-base": "^1.0.0"
+ },
+ "peerDependencies": {
+ "cytoscape": "^3.2.0"
+ }
+ },
+ "node_modules/cytoscape-fcose": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz",
+ "integrity": "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==",
+ "license": "MIT",
+ "dependencies": {
+ "cose-base": "^2.2.0"
+ },
+ "peerDependencies": {
+ "cytoscape": "^3.2.0"
+ }
+ },
+ "node_modules/cytoscape-fcose/node_modules/cose-base": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-2.2.0.tgz",
+ "integrity": "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==",
+ "license": "MIT",
+ "dependencies": {
+ "layout-base": "^2.0.0"
+ }
+ },
+ "node_modules/cytoscape-fcose/node_modules/layout-base": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-2.0.1.tgz",
+ "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==",
+ "license": "MIT"
+ },
+ "node_modules/d3": {
+ "version": "7.9.0",
+ "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz",
+ "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==",
+ "license": "ISC",
+ "dependencies": {
+ "d3-array": "3",
+ "d3-axis": "3",
+ "d3-brush": "3",
+ "d3-chord": "3",
+ "d3-color": "3",
+ "d3-contour": "4",
+ "d3-delaunay": "6",
+ "d3-dispatch": "3",
+ "d3-drag": "3",
+ "d3-dsv": "3",
+ "d3-ease": "3",
+ "d3-fetch": "3",
+ "d3-force": "3",
+ "d3-format": "3",
+ "d3-geo": "3",
+ "d3-hierarchy": "3",
+ "d3-interpolate": "3",
+ "d3-path": "3",
+ "d3-polygon": "3",
+ "d3-quadtree": "3",
+ "d3-random": "3",
+ "d3-scale": "4",
+ "d3-scale-chromatic": "3",
+ "d3-selection": "3",
+ "d3-shape": "3",
+ "d3-time": "3",
+ "d3-time-format": "4",
+ "d3-timer": "3",
+ "d3-transition": "3",
+ "d3-zoom": "3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/d3-array": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz",
@@ -9927,19 +10514,162 @@
"node": ">=12"
}
},
- "node_modules/d3-color": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz",
- "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==",
+ "node_modules/d3-axis": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz",
+ "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==",
+ "license": "ISC",
"engines": {
"node": ">=12"
}
},
- "node_modules/d3-ease": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz",
- "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==",
- "engines": {
+ "node_modules/d3-brush": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz",
+ "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==",
+ "license": "ISC",
+ "dependencies": {
+ "d3-dispatch": "1 - 3",
+ "d3-drag": "2 - 3",
+ "d3-interpolate": "1 - 3",
+ "d3-selection": "3",
+ "d3-transition": "3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-chord": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz",
+ "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==",
+ "license": "ISC",
+ "dependencies": {
+ "d3-path": "1 - 3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-color": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz",
+ "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-contour": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz",
+ "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==",
+ "license": "ISC",
+ "dependencies": {
+ "d3-array": "^3.2.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-delaunay": {
+ "version": "6.0.4",
+ "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz",
+ "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==",
+ "license": "ISC",
+ "dependencies": {
+ "delaunator": "5"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-dispatch": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz",
+ "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-drag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz",
+ "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==",
+ "license": "ISC",
+ "dependencies": {
+ "d3-dispatch": "1 - 3",
+ "d3-selection": "3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-dsv": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz",
+ "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==",
+ "license": "ISC",
+ "dependencies": {
+ "commander": "7",
+ "iconv-lite": "0.6",
+ "rw": "1"
+ },
+ "bin": {
+ "csv2json": "bin/dsv2json.js",
+ "csv2tsv": "bin/dsv2dsv.js",
+ "dsv2dsv": "bin/dsv2dsv.js",
+ "dsv2json": "bin/dsv2json.js",
+ "json2csv": "bin/json2dsv.js",
+ "json2dsv": "bin/json2dsv.js",
+ "json2tsv": "bin/json2dsv.js",
+ "tsv2csv": "bin/dsv2dsv.js",
+ "tsv2json": "bin/dsv2json.js"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-dsv/node_modules/commander": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/d3-ease": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz",
+ "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-fetch": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz",
+ "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==",
+ "license": "ISC",
+ "dependencies": {
+ "d3-dsv": "1 - 3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-force": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz",
+ "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==",
+ "license": "ISC",
+ "dependencies": {
+ "d3-dispatch": "1 - 3",
+ "d3-quadtree": "1 - 3",
+ "d3-timer": "1 - 3"
+ },
+ "engines": {
"node": ">=12"
}
},
@@ -9951,6 +10681,27 @@
"node": ">=12"
}
},
+ "node_modules/d3-geo": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz",
+ "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==",
+ "license": "ISC",
+ "dependencies": {
+ "d3-array": "2.5.0 - 3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-hierarchy": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz",
+ "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/d3-interpolate": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz",
@@ -9970,6 +10721,73 @@
"node": ">=12"
}
},
+ "node_modules/d3-polygon": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz",
+ "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-quadtree": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz",
+ "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-random": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz",
+ "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-sankey": {
+ "version": "0.12.3",
+ "resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz",
+ "integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "d3-array": "1 - 2",
+ "d3-shape": "^1.2.0"
+ }
+ },
+ "node_modules/d3-sankey/node_modules/d3-array": {
+ "version": "2.12.1",
+ "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz",
+ "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "internmap": "^1.0.0"
+ }
+ },
+ "node_modules/d3-sankey/node_modules/d3-path": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz",
+ "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/d3-sankey/node_modules/d3-shape": {
+ "version": "1.3.7",
+ "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz",
+ "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "d3-path": "1"
+ }
+ },
+ "node_modules/d3-sankey/node_modules/internmap": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz",
+ "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==",
+ "license": "ISC"
+ },
"node_modules/d3-scale": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz",
@@ -9985,6 +10803,28 @@
"node": ">=12"
}
},
+ "node_modules/d3-scale-chromatic": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz",
+ "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==",
+ "license": "ISC",
+ "dependencies": {
+ "d3-color": "1 - 3",
+ "d3-interpolate": "1 - 3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-selection": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz",
+ "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/d3-shape": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz",
@@ -10026,6 +10866,51 @@
"node": ">=12"
}
},
+ "node_modules/d3-transition": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz",
+ "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==",
+ "license": "ISC",
+ "dependencies": {
+ "d3-color": "1 - 3",
+ "d3-dispatch": "1 - 3",
+ "d3-ease": "1 - 3",
+ "d3-interpolate": "1 - 3",
+ "d3-timer": "1 - 3"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "peerDependencies": {
+ "d3-selection": "2 - 3"
+ }
+ },
+ "node_modules/d3-zoom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz",
+ "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==",
+ "license": "ISC",
+ "dependencies": {
+ "d3-dispatch": "1 - 3",
+ "d3-drag": "2 - 3",
+ "d3-interpolate": "1 - 3",
+ "d3-selection": "2 - 3",
+ "d3-transition": "2 - 3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/dagre-d3-es": {
+ "version": "7.0.13",
+ "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.13.tgz",
+ "integrity": "sha512-efEhnxpSuwpYOKRm/L5KbqoZmNNukHa/Flty4Wp62JRvgH2ojwVgPgdYyr4twpieZnyRDdIH7PY2mopX26+j2Q==",
+ "license": "MIT",
+ "dependencies": {
+ "d3": "^7.9.0",
+ "lodash-es": "^4.17.21"
+ }
+ },
"node_modules/damerau-levenshtein": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz",
@@ -10089,9 +10974,10 @@
}
},
"node_modules/dayjs": {
- "version": "1.11.13",
- "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz",
- "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
+ "version": "1.11.19",
+ "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
+ "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==",
+ "license": "MIT"
},
"node_modules/debounce": {
"version": "2.0.0",
@@ -10145,6 +11031,19 @@
"resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz",
"integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg=="
},
+ "node_modules/decode-named-character-reference": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.2.0.tgz",
+ "integrity": "sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q==",
+ "license": "MIT",
+ "dependencies": {
+ "character-entities": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/deep-equal": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz",
@@ -10221,12 +11120,13 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/delayed-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
- "engines": {
- "node": ">=0.4.0"
+ "node_modules/delaunator": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.0.1.tgz",
+ "integrity": "sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==",
+ "license": "ISC",
+ "dependencies": {
+ "robust-predicates": "^3.0.2"
}
},
"node_modules/delegates": {
@@ -10291,15 +11191,6 @@
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
"integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw=="
},
- "node_modules/digest-fetch": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/digest-fetch/-/digest-fetch-1.3.0.tgz",
- "integrity": "sha512-CGJuv6iKNM7QyZlM2T3sPAdZWd/p9zQiRNS9G+9COUCwzWFTs0Xp8NF5iePx7wtvhDykReiRRrSeNb4oMmB8lA==",
- "dependencies": {
- "base-64": "^0.1.0",
- "md5": "^2.3.0"
- }
- },
"node_modules/dlv": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
@@ -10363,6 +11254,15 @@
"url": "https://github.com/fb55/domhandler?sponsor=1"
}
},
+ "node_modules/dompurify": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.3.0.tgz",
+ "integrity": "sha512-r+f6MYR1gGN1eJv0TVQbhA7if/U7P87cdPl3HN5rikqaBSBxLiCb/b9O+2eG0cxz0ghyU+mU1QkbsOwERMYlWQ==",
+ "license": "(MPL-2.0 OR Apache-2.0)",
+ "optionalDependencies": {
+ "@types/trusted-types": "^2.0.7"
+ }
+ },
"node_modules/domutils": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz",
@@ -10407,9 +11307,9 @@
}
},
"node_modules/dub": {
- "version": "0.68.0",
- "resolved": "https://registry.npmjs.org/dub/-/dub-0.68.0.tgz",
- "integrity": "sha512-YoRYHu/P3mojiqYE+SuA1H3HbWJLpHJugkXpKDH8kqoeAPmoBNkN5TMLHp+VxYp0OUTOMiAHA1pua+RTMeK8xg==",
+ "version": "0.69.0",
+ "resolved": "https://registry.npmjs.org/dub/-/dub-0.69.0.tgz",
+ "integrity": "sha512-2UotC3GARdPxtduY9/mD6fwxYhHIJnfXe1emLY96b1kj4iRcMRRerYbde1y5FPRsAJKBhuO2PaoT0TZNmn7gxA==",
"dependencies": {
"zod": "^3.25.0 || ^4.0.0"
}
@@ -10477,6 +11377,7 @@
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
"integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
+ "license": "Apache-2.0",
"dependencies": {
"safe-buffer": "^5.0.1"
}
@@ -10487,6 +11388,34 @@
"integrity": "sha512-I+oLXgpEJzD6Cwuwt1gYjxsDmu/S/Kd41mmLA3O+/uH2pFRO/DvOjUyGozL8j3KeLV6WyZ7ssPwELMsXCcsJAQ==",
"license": "ISC"
},
+ "node_modules/embla-carousel": {
+ "version": "8.6.0",
+ "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.6.0.tgz",
+ "integrity": "sha512-SjWyZBHJPbqxHOzckOfo8lHisEaJWmwd23XppYFYVh10bU66/Pn5tkVkbkCMZVdbUE5eTCI2nD8OyIP4Z+uwkA==",
+ "license": "MIT"
+ },
+ "node_modules/embla-carousel-react": {
+ "version": "8.6.0",
+ "resolved": "https://registry.npmjs.org/embla-carousel-react/-/embla-carousel-react-8.6.0.tgz",
+ "integrity": "sha512-0/PjqU7geVmo6F734pmPqpyHqiM99olvyecY7zdweCw+6tKEXnrE90pBiBbMMU8s5tICemzpQ3hi5EpxzGW+JA==",
+ "license": "MIT",
+ "dependencies": {
+ "embla-carousel": "8.6.0",
+ "embla-carousel-reactive-utils": "8.6.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.1 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
+ }
+ },
+ "node_modules/embla-carousel-reactive-utils": {
+ "version": "8.6.0",
+ "resolved": "https://registry.npmjs.org/embla-carousel-reactive-utils/-/embla-carousel-reactive-utils-8.6.0.tgz",
+ "integrity": "sha512-fMVUDUEx0/uIEDM0Mz3dHznDhfX+znCCDCeIophYb1QGVM7YThSWX+wz11zlYwWFOr74b4QLGg0hrGPJeG2s4A==",
+ "license": "MIT",
+ "peerDependencies": {
+ "embla-carousel": "8.6.0"
+ }
+ },
"node_modules/emoji-regex": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
@@ -11312,10 +12241,22 @@
"node": ">=4.0"
}
},
+ "node_modules/estree-util-is-identifier-name": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz",
+ "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/estree-walker": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"@types/estree": "^1.0.0"
@@ -11329,14 +12270,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/event-target-shim": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
- "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/eventemitter3": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
@@ -11362,9 +12295,10 @@
}
},
"node_modules/eventsource-parser": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.0.tgz",
- "integrity": "sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==",
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz",
+ "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==",
+ "license": "MIT",
"engines": {
"node": ">=18.0.0"
}
@@ -11464,6 +12398,12 @@
"integrity": "sha512-VO5fQUzZtI6C+vx4w/4BWJpg3s/5l+6pRQEHzFRM8WFi4XffSP1Z+4qi7GbjWbvRQEbdIco5mIMq+zX4rPuLrw==",
"license": "MIT"
},
+ "node_modules/extend": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
+ "license": "MIT"
+ },
"node_modules/fast-csv": {
"version": "4.3.6",
"resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-4.3.6.tgz",
@@ -11626,6 +12566,16 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/find-yarn-workspace-root": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz",
+ "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "micromatch": "^4.0.2"
+ }
+ },
"node_modules/flat-cache": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",
@@ -11690,79 +12640,44 @@
"url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/form-data": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
- "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
+ "node_modules/fraction.js": {
+ "version": "5.3.4",
+ "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz",
+ "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==",
"license": "MIT",
- "dependencies": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.8",
- "es-set-tostringtag": "^2.1.0",
- "hasown": "^2.0.2",
- "mime-types": "^2.1.12"
- },
"engines": {
- "node": ">= 6"
+ "node": "*"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/rawify"
}
},
- "node_modules/form-data-encoder": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz",
- "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A=="
- },
- "node_modules/form-data/node_modules/mime-db": {
- "version": "1.52.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
- "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/form-data/node_modules/mime-types": {
- "version": "2.1.35",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
- "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "node_modules/framer-motion": {
+ "version": "12.23.25",
+ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.23.25.tgz",
+ "integrity": "sha512-gUHGl2e4VG66jOcH0JHhuJQr6ZNwrET9g31ZG0xdXzT0CznP7fHX4P8Bcvuc4MiUB90ysNnWX2ukHRIggkl6hQ==",
"license": "MIT",
"dependencies": {
- "mime-db": "1.52.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/formdata-node": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz",
- "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==",
- "dependencies": {
- "node-domexception": "1.0.0",
- "web-streams-polyfill": "4.0.0-beta.3"
+ "motion-dom": "^12.23.23",
+ "motion-utils": "^12.23.6",
+ "tslib": "^2.4.0"
},
- "engines": {
- "node": ">= 12.20"
- }
- },
- "node_modules/formdata-node/node_modules/web-streams-polyfill": {
- "version": "4.0.0-beta.3",
- "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz",
- "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==",
- "engines": {
- "node": ">= 14"
- }
- },
- "node_modules/fraction.js": {
- "version": "5.3.4",
- "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz",
- "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==",
- "license": "MIT",
- "engines": {
- "node": "*"
+ "peerDependencies": {
+ "@emotion/is-prop-valid": "*",
+ "react": "^18.0.0 || ^19.0.0",
+ "react-dom": "^18.0.0 || ^19.0.0"
},
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/rawify"
+ "peerDependenciesMeta": {
+ "@emotion/is-prop-valid": {
+ "optional": true
+ },
+ "react": {
+ "optional": true
+ },
+ "react-dom": {
+ "optional": true
+ }
}
},
"node_modules/fs-constants": {
@@ -11770,6 +12685,21 @@
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
},
+ "node_modules/fs-extra": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/fs-minipass": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
@@ -12152,6 +13082,12 @@
"resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
"integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag=="
},
+ "node_modules/hachure-fill": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz",
+ "integrity": "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==",
+ "license": "MIT"
+ },
"node_modules/has-bigints": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz",
@@ -12233,6 +13169,133 @@
"node": ">= 0.4"
}
},
+ "node_modules/hast": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/hast/-/hast-1.0.0.tgz",
+ "integrity": "sha512-vFUqlRV5C+xqP76Wwq2SrM0kipnmpxJm7OfvVXpB35Fp+Fn4MV+ozr+JZr5qFvyR1q/U+Foim2x+3P+x9S1PLA==",
+ "deprecated": "Renamed to rehype",
+ "license": "MIT"
+ },
+ "node_modules/hast-util-from-dom": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/hast-util-from-dom/-/hast-util-from-dom-5.0.1.tgz",
+ "integrity": "sha512-N+LqofjR2zuzTjCPzyDUdSshy4Ma6li7p/c3pA78uTwzFgENbgbUrm2ugwsOdcjI1muO+o6Dgzp9p8WHtn/39Q==",
+ "license": "ISC",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "hastscript": "^9.0.0",
+ "web-namespaces": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-from-html": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.3.tgz",
+ "integrity": "sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "devlop": "^1.1.0",
+ "hast-util-from-parse5": "^8.0.0",
+ "parse5": "^7.0.0",
+ "vfile": "^6.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-from-html-isomorphic": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/hast-util-from-html-isomorphic/-/hast-util-from-html-isomorphic-2.0.0.tgz",
+ "integrity": "sha512-zJfpXq44yff2hmE0XmwEOzdWin5xwH+QIhMLOScpX91e/NSGPsAzNCvLQDIEPyO2TXi+lBmU6hjLIhV8MwP2kw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "hast-util-from-dom": "^5.0.0",
+ "hast-util-from-html": "^2.0.0",
+ "unist-util-remove-position": "^5.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-from-parse5": {
+ "version": "8.0.3",
+ "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-8.0.3.tgz",
+ "integrity": "sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/unist": "^3.0.0",
+ "devlop": "^1.0.0",
+ "hastscript": "^9.0.0",
+ "property-information": "^7.0.0",
+ "vfile": "^6.0.0",
+ "vfile-location": "^5.0.0",
+ "web-namespaces": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-is-element": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-3.0.0.tgz",
+ "integrity": "sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-parse-selector": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-4.0.0.tgz",
+ "integrity": "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-raw": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.1.0.tgz",
+ "integrity": "sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/unist": "^3.0.0",
+ "@ungap/structured-clone": "^1.0.0",
+ "hast-util-from-parse5": "^8.0.0",
+ "hast-util-to-parse5": "^8.0.0",
+ "html-void-elements": "^3.0.0",
+ "mdast-util-to-hast": "^13.0.0",
+ "parse5": "^7.0.0",
+ "unist-util-position": "^5.0.0",
+ "unist-util-visit": "^5.0.0",
+ "vfile": "^6.0.0",
+ "web-namespaces": "^2.0.0",
+ "zwitch": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/hast-util-to-html": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.5.tgz",
@@ -12256,6 +13319,78 @@
"url": "https://opencollective.com/unified"
}
},
+ "node_modules/hast-util-to-jsx-runtime": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz",
+ "integrity": "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/unist": "^3.0.0",
+ "comma-separated-tokens": "^2.0.0",
+ "devlop": "^1.0.0",
+ "estree-util-is-identifier-name": "^3.0.0",
+ "hast-util-whitespace": "^3.0.0",
+ "mdast-util-mdx-expression": "^2.0.0",
+ "mdast-util-mdx-jsx": "^3.0.0",
+ "mdast-util-mdxjs-esm": "^2.0.0",
+ "property-information": "^7.0.0",
+ "space-separated-tokens": "^2.0.0",
+ "style-to-js": "^1.0.0",
+ "unist-util-position": "^5.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-to-parse5": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-8.0.0.tgz",
+ "integrity": "sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "comma-separated-tokens": "^2.0.0",
+ "devlop": "^1.0.0",
+ "property-information": "^6.0.0",
+ "space-separated-tokens": "^2.0.0",
+ "web-namespaces": "^2.0.0",
+ "zwitch": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-to-parse5/node_modules/property-information": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz",
+ "integrity": "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/hast-util-to-text": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.2.tgz",
+ "integrity": "sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/unist": "^3.0.0",
+ "hast-util-is-element": "^3.0.0",
+ "unist-util-find-after": "^5.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/hast-util-whitespace": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz",
@@ -12269,6 +13404,23 @@
"url": "https://opencollective.com/unified"
}
},
+ "node_modules/hastscript": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-9.0.1.tgz",
+ "integrity": "sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "comma-separated-tokens": "^2.0.0",
+ "hast-util-parse-selector": "^4.0.0",
+ "property-information": "^7.0.0",
+ "space-separated-tokens": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/html-to-text": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-9.0.5.tgz",
@@ -12284,6 +13436,16 @@
"node": ">=14"
}
},
+ "node_modules/html-url-attributes": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz",
+ "integrity": "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/html-void-elements": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz",
@@ -12338,12 +13500,16 @@
"resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.32.1.tgz",
"integrity": "sha512-inh5wue5XdfObhu/IGEMiA1nUXigSGcaKNemcbLRKa7jXYGDZXr3LoT9pTIzq2hPEbld7w/qv9h+ikWGz8fL1g=="
},
- "node_modules/humanize-ms": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
- "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
+ "node_modules/iconv-lite": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+ "license": "MIT",
"dependencies": {
- "ms": "^2.0.0"
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
}
},
"node_modules/ieee754": {
@@ -12427,6 +13593,12 @@
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
+ "node_modules/inline-style-parser": {
+ "version": "0.2.7",
+ "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz",
+ "integrity": "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==",
+ "license": "MIT"
+ },
"node_modules/input-format": {
"version": "0.3.14",
"resolved": "https://registry.npmjs.org/input-format/-/input-format-0.3.14.tgz",
@@ -12502,6 +13674,30 @@
"url": "https://opencollective.com/ioredis"
}
},
+ "node_modules/is-alphabetical": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz",
+ "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-alphanumerical": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz",
+ "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==",
+ "license": "MIT",
+ "dependencies": {
+ "is-alphabetical": "^2.0.0",
+ "is-decimal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/is-arguments": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
@@ -12658,6 +13854,32 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/is-decimal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz",
+ "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-docker": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
+ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "is-docker": "cli.js"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
@@ -12710,6 +13932,16 @@
"node": ">=0.10.0"
}
},
+ "node_modules/is-hexadecimal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz",
+ "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/is-interactive": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz",
@@ -12780,6 +14012,18 @@
"node": ">=8"
}
},
+ "node_modules/is-plain-obj": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",
+ "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
@@ -12792,6 +14036,8 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz",
"integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"@types/estree": "*"
@@ -12961,6 +14207,19 @@
"url": "https://github.com/sponsors/mesqueeb"
}
},
+ "node_modules/is-wsl": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
+ "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-docker": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/isarray": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
@@ -13066,6 +14325,12 @@
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
"integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="
},
+ "node_modules/json-schema": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
+ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==",
+ "license": "(AFL-2.1 OR BSD-3-Clause)"
+ },
"node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
@@ -13077,6 +14342,26 @@
"integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==",
"license": "BSD-2-Clause"
},
+ "node_modules/json-stable-stringify": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.3.0.tgz",
+ "integrity": "sha512-qtYiSSFlwot9XHtF9bD9c7rwKjr+RecWT//ZnPvSmEjpV5mmPOCN4j8UjY5hbjNkOwZ/jQv3J6R1/pL7RwgMsg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "isarray": "^2.0.5",
+ "jsonify": "^0.0.1",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/json-stable-stringify-without-jsonify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
@@ -13094,12 +14379,36 @@
"node": ">=6"
}
},
+ "node_modules/jsonfile": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz",
+ "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/jsonify": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz",
+ "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==",
+ "dev": true,
+ "license": "Public Domain",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/jsonwebtoken": {
- "version": "9.0.2",
- "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
- "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
+ "version": "9.0.3",
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz",
+ "integrity": "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==",
+ "license": "MIT",
"dependencies": {
- "jws": "^3.2.2",
+ "jws": "^4.0.1",
"lodash.includes": "^4.3.0",
"lodash.isboolean": "^3.0.3",
"lodash.isinteger": "^4.0.4",
@@ -13173,21 +14482,23 @@
}
},
"node_modules/jwa": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
- "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz",
+ "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==",
+ "license": "MIT",
"dependencies": {
- "buffer-equal-constant-time": "1.0.1",
+ "buffer-equal-constant-time": "^1.0.1",
"ecdsa-sig-formatter": "1.0.11",
"safe-buffer": "^5.0.1"
}
},
"node_modules/jws": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
- "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz",
+ "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==",
+ "license": "MIT",
"dependencies": {
- "jwa": "^1.4.1",
+ "jwa": "^2.0.1",
"safe-buffer": "^5.0.1"
}
},
@@ -13222,6 +14533,21 @@
"json-buffer": "3.0.1"
}
},
+ "node_modules/khroma": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/khroma/-/khroma-2.1.0.tgz",
+ "integrity": "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw=="
+ },
+ "node_modules/klaw-sync": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz",
+ "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.1.11"
+ }
+ },
"node_modules/kleur": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
@@ -13231,6 +14557,22 @@
"node": ">=6"
}
},
+ "node_modules/langium": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/langium/-/langium-3.3.1.tgz",
+ "integrity": "sha512-QJv/h939gDpvT+9SiLVlY7tZC3xB2qK57v0J04Sh9wpMb6MP1q8gB21L3WIo8T5P1MSMg3Ep14L7KkDCFG3y4w==",
+ "license": "MIT",
+ "dependencies": {
+ "chevrotain": "~11.0.3",
+ "chevrotain-allstar": "~0.3.0",
+ "vscode-languageserver": "~9.0.1",
+ "vscode-languageserver-textdocument": "~1.0.11",
+ "vscode-uri": "~3.0.8"
+ },
+ "engines": {
+ "node": ">=16.0.0"
+ }
+ },
"node_modules/language-subtag-registry": {
"version": "0.3.23",
"resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz",
@@ -13247,6 +14589,12 @@
"node": ">=0.10"
}
},
+ "node_modules/layout-base": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz",
+ "integrity": "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==",
+ "license": "MIT"
+ },
"node_modules/lazystream": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz",
@@ -13364,6 +14712,8 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz",
"integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==",
+ "dev": true,
+ "optional": true,
"peer": true
},
"node_modules/locate-path": {
@@ -13389,7 +14739,6 @@
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
- "dev": true,
"license": "MIT"
},
"node_modules/lodash._baseiteratee": {
@@ -13574,6 +14923,16 @@
"resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz",
"integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng=="
},
+ "node_modules/longest-streak": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz",
+ "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
@@ -13597,9 +14956,9 @@
}
},
"node_modules/lucide-react": {
- "version": "0.555.0",
- "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.555.0.tgz",
- "integrity": "sha512-D8FvHUGbxWBRQM90NZeIyhAvkFfsh3u9ekrMvJ30Z6gnpBHS6HC6ldLg7tL45hwiIz/u66eKDtdA23gwwGsAHA==",
+ "version": "0.556.0",
+ "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.556.0.tgz",
+ "integrity": "sha512-iOb8dRk7kLaYBZhR2VlV1CeJGxChBgUthpSP8wom9jfj79qovgG6qcSdiy6vkoREKPnbUYzJsCn4o4PtG3Iy+A==",
"license": "ISC",
"peerDependencies": {
"react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
@@ -13609,6 +14968,8 @@
"version": "0.30.11",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz",
"integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.5.0"
@@ -13671,6 +15032,16 @@
"markdown-it": "bin/markdown-it.mjs"
}
},
+ "node_modules/markdown-table": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz",
+ "integrity": "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/marked": {
"version": "15.0.12",
"resolved": "https://registry.npmjs.org/marked/-/marked-15.0.12.tgz",
@@ -13692,131 +15063,1004 @@
"node": ">= 0.4"
}
},
- "node_modules/md5": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz",
- "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==",
+ "node_modules/mdast-util-find-and-replace": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.2.tgz",
+ "integrity": "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==",
+ "license": "MIT",
"dependencies": {
- "charenc": "0.0.2",
- "crypt": "0.0.2",
- "is-buffer": "~1.1.6"
+ "@types/mdast": "^4.0.0",
+ "escape-string-regexp": "^5.0.0",
+ "unist-util-is": "^6.0.0",
+ "unist-util-visit-parents": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/md5/node_modules/is-buffer": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
- "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
- },
- "node_modules/mdast-util-to-hast": {
- "version": "13.2.1",
- "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz",
- "integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==",
+ "node_modules/mdast-util-from-markdown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz",
+ "integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==",
"license": "MIT",
"dependencies": {
- "@types/hast": "^3.0.0",
"@types/mdast": "^4.0.0",
- "@ungap/structured-clone": "^1.0.0",
+ "@types/unist": "^3.0.0",
+ "decode-named-character-reference": "^1.0.0",
"devlop": "^1.0.0",
- "micromark-util-sanitize-uri": "^2.0.0",
- "trim-lines": "^3.0.0",
- "unist-util-position": "^5.0.0",
- "unist-util-visit": "^5.0.0",
- "vfile": "^6.0.0"
+ "mdast-util-to-string": "^4.0.0",
+ "micromark": "^4.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-decode-string": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0",
+ "unist-util-stringify-position": "^4.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
- "node_modules/mdurl": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz",
- "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==",
- "license": "MIT"
- },
- "node_modules/memoize": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/memoize/-/memoize-10.1.0.tgz",
- "integrity": "sha512-MMbFhJzh4Jlg/poq1si90XRlTZRDHVqdlz2mPyGJ6kqMpyHUyVpDd5gpFAvVehW64+RA1eKE9Yt8aSLY7w2Kgg==",
+ "node_modules/mdast-util-gfm": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.1.0.tgz",
+ "integrity": "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==",
+ "license": "MIT",
"dependencies": {
- "mimic-function": "^5.0.1"
- },
- "engines": {
- "node": ">=18"
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-gfm-autolink-literal": "^2.0.0",
+ "mdast-util-gfm-footnote": "^2.0.0",
+ "mdast-util-gfm-strikethrough": "^2.0.0",
+ "mdast-util-gfm-table": "^2.0.0",
+ "mdast-util-gfm-task-list-item": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
},
"funding": {
- "url": "https://github.com/sindresorhus/memoize?sponsor=1"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/merge-refs": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/merge-refs/-/merge-refs-1.3.0.tgz",
- "integrity": "sha512-nqXPXbso+1dcKDpPCXvwZyJILz+vSLqGGOnDrYHQYE+B8n9JTCekVLC65AfCpR4ggVyA/45Y0iR9LDyS2iI+zA==",
- "funding": {
- "url": "https://github.com/wojtekmaj/merge-refs?sponsor=1"
+ "node_modules/mdast-util-gfm-autolink-literal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.1.tgz",
+ "integrity": "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "ccount": "^2.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-find-and-replace": "^3.0.0",
+ "micromark-util-character": "^2.0.0"
},
- "peerDependencies": {
- "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-gfm-footnote": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.1.0.tgz",
+ "integrity": "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.1.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0"
},
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/merge-stream": {
+ "node_modules/mdast-util-gfm-strikethrough": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
- "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.0.tgz",
+ "integrity": "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
},
- "node_modules/merge2": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
- "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
- "engines": {
- "node": ">= 8"
+ "node_modules/mdast-util-gfm-table": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.0.tgz",
+ "integrity": "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "markdown-table": "^3.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/micromark-util-character": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz",
- "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==",
- "funding": [
- {
- "type": "GitHub Sponsors",
- "url": "https://github.com/sponsors/unifiedjs"
- },
- {
- "type": "OpenCollective",
- "url": "https://opencollective.com/unified"
- }
- ],
+ "node_modules/mdast-util-gfm-task-list-item": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.0.tgz",
+ "integrity": "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==",
"license": "MIT",
"dependencies": {
- "micromark-util-symbol": "^2.0.0",
- "micromark-util-types": "^2.0.0"
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/micromark-util-encode": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz",
- "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==",
- "funding": [
- {
- "type": "GitHub Sponsors",
- "url": "https://github.com/sponsors/unifiedjs"
- },
- {
- "type": "OpenCollective",
- "url": "https://opencollective.com/unified"
- }
- ],
- "license": "MIT"
+ "node_modules/mdast-util-math": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-math/-/mdast-util-math-3.0.0.tgz",
+ "integrity": "sha512-Tl9GBNeG/AhJnQM221bJR2HPvLOSnLE/T9cJI9tlc6zwQk2nPk/4f0cHkOdEixQPC/j8UtKDdITswvLAy1OZ1w==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "longest-streak": "^3.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.1.0",
+ "unist-util-remove-position": "^5.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
},
- "node_modules/micromark-util-sanitize-uri": {
+ "node_modules/mdast-util-mdx-expression": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz",
- "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==",
+ "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz",
+ "integrity": "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree-jsx": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-mdx-jsx": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.0.tgz",
+ "integrity": "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree-jsx": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "ccount": "^2.0.0",
+ "devlop": "^1.1.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0",
+ "parse-entities": "^4.0.0",
+ "stringify-entities": "^4.0.0",
+ "unist-util-stringify-position": "^4.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-mdxjs-esm": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz",
+ "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree-jsx": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-phrasing": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz",
+ "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "unist-util-is": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-to-hast": {
+ "version": "13.2.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz",
+ "integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "@ungap/structured-clone": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "trim-lines": "^3.0.0",
+ "unist-util-position": "^5.0.0",
+ "unist-util-visit": "^5.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-to-markdown": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz",
+ "integrity": "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "longest-streak": "^3.0.0",
+ "mdast-util-phrasing": "^4.0.0",
+ "mdast-util-to-string": "^4.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-decode-string": "^2.0.0",
+ "unist-util-visit": "^5.0.0",
+ "zwitch": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-to-string": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz",
+ "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz",
+ "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==",
+ "license": "MIT"
+ },
+ "node_modules/memoize": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/memoize/-/memoize-10.1.0.tgz",
+ "integrity": "sha512-MMbFhJzh4Jlg/poq1si90XRlTZRDHVqdlz2mPyGJ6kqMpyHUyVpDd5gpFAvVehW64+RA1eKE9Yt8aSLY7w2Kgg==",
+ "dependencies": {
+ "mimic-function": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/memoize?sponsor=1"
+ }
+ },
+ "node_modules/merge-refs": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/merge-refs/-/merge-refs-1.3.0.tgz",
+ "integrity": "sha512-nqXPXbso+1dcKDpPCXvwZyJILz+vSLqGGOnDrYHQYE+B8n9JTCekVLC65AfCpR4ggVyA/45Y0iR9LDyS2iI+zA==",
+ "funding": {
+ "url": "https://github.com/wojtekmaj/merge-refs?sponsor=1"
+ },
+ "peerDependencies": {
+ "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/merge-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/mermaid": {
+ "version": "11.12.1",
+ "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.12.1.tgz",
+ "integrity": "sha512-UlIZrRariB11TY1RtTgUWp65tphtBv4CSq7vyS2ZZ2TgoMjs2nloq+wFqxiwcxlhHUvs7DPGgMjs2aeQxz5h9g==",
+ "license": "MIT",
+ "dependencies": {
+ "@braintree/sanitize-url": "^7.1.1",
+ "@iconify/utils": "^3.0.1",
+ "@mermaid-js/parser": "^0.6.3",
+ "@types/d3": "^7.4.3",
+ "cytoscape": "^3.29.3",
+ "cytoscape-cose-bilkent": "^4.1.0",
+ "cytoscape-fcose": "^2.2.0",
+ "d3": "^7.9.0",
+ "d3-sankey": "^0.12.3",
+ "dagre-d3-es": "7.0.13",
+ "dayjs": "^1.11.18",
+ "dompurify": "^3.2.5",
+ "katex": "^0.16.22",
+ "khroma": "^2.1.0",
+ "lodash-es": "^4.17.21",
+ "marked": "^16.2.1",
+ "roughjs": "^4.6.6",
+ "stylis": "^4.3.6",
+ "ts-dedent": "^2.2.0",
+ "uuid": "^11.1.0"
+ }
+ },
+ "node_modules/mermaid/node_modules/commander": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
+ "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 12"
+ }
+ },
+ "node_modules/mermaid/node_modules/katex": {
+ "version": "0.16.25",
+ "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.25.tgz",
+ "integrity": "sha512-woHRUZ/iF23GBP1dkDQMh1QBad9dmr8/PAwNA54VrSOVYgI12MAcE14TqnDdQOdzyEonGzMepYnqBMYdsoAr8Q==",
+ "funding": [
+ "https://opencollective.com/katex",
+ "https://github.com/sponsors/katex"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "commander": "^8.3.0"
+ },
+ "bin": {
+ "katex": "cli.js"
+ }
+ },
+ "node_modules/mermaid/node_modules/marked": {
+ "version": "16.4.2",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz",
+ "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==",
+ "license": "MIT",
+ "bin": {
+ "marked": "bin/marked.js"
+ },
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/mermaid/node_modules/uuid": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
+ "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
+ "funding": [
+ "https://github.com/sponsors/broofa",
+ "https://github.com/sponsors/ctavan"
+ ],
+ "license": "MIT",
+ "bin": {
+ "uuid": "dist/esm/bin/uuid"
+ }
+ },
+ "node_modules/micromark": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz",
+ "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@types/debug": "^4.0.0",
+ "debug": "^4.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-core-commonmark": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-combine-extensions": "^2.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-encode": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-subtokenize": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-core-commonmark": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz",
+ "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-factory-destination": "^2.0.0",
+ "micromark-factory-label": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-factory-title": "^2.0.0",
+ "micromark-factory-whitespace": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-html-tag-name": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-subtokenize": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-extension-cjk-friendly": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/micromark-extension-cjk-friendly/-/micromark-extension-cjk-friendly-1.2.3.tgz",
+ "integrity": "sha512-gRzVLUdjXBLX6zNPSnHGDoo+ZTp5zy+MZm0g3sv+3chPXY7l9gW+DnrcHcZh/jiPR6MjPKO4AEJNp4Aw6V9z5Q==",
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.1.0",
+ "micromark-extension-cjk-friendly-util": "2.1.1",
+ "micromark-util-chunked": "^2.0.1",
+ "micromark-util-resolve-all": "^2.0.1",
+ "micromark-util-symbol": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16"
+ },
+ "peerDependencies": {
+ "micromark": "^4.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "peerDependenciesMeta": {
+ "micromark-util-types": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/micromark-extension-cjk-friendly-gfm-strikethrough": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/micromark-extension-cjk-friendly-gfm-strikethrough/-/micromark-extension-cjk-friendly-gfm-strikethrough-1.2.3.tgz",
+ "integrity": "sha512-gSPnxgHDDqXYOBvQRq6lerrq9mjDhdtKn+7XETuXjxWcL62yZEfUdA28Ml1I2vDIPfAOIKLa0h2XDSGkInGHFQ==",
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.1.0",
+ "get-east-asian-width": "^1.3.0",
+ "micromark-extension-cjk-friendly-util": "2.1.1",
+ "micromark-util-character": "^2.1.1",
+ "micromark-util-chunked": "^2.0.1",
+ "micromark-util-resolve-all": "^2.0.1",
+ "micromark-util-symbol": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16"
+ },
+ "peerDependencies": {
+ "micromark": "^4.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "peerDependenciesMeta": {
+ "micromark-util-types": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/micromark-extension-cjk-friendly-util": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/micromark-extension-cjk-friendly-util/-/micromark-extension-cjk-friendly-util-2.1.1.tgz",
+ "integrity": "sha512-egs6+12JU2yutskHY55FyR48ZiEcFOJFyk9rsiyIhcJ6IvWB6ABBqVrBw8IobqJTDZ/wdSr9eoXDPb5S2nW1bg==",
+ "license": "MIT",
+ "dependencies": {
+ "get-east-asian-width": "^1.3.0",
+ "micromark-util-character": "^2.1.1",
+ "micromark-util-symbol": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16"
+ },
+ "peerDependenciesMeta": {
+ "micromark-util-types": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/micromark-extension-gfm": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz",
+ "integrity": "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==",
+ "license": "MIT",
+ "dependencies": {
+ "micromark-extension-gfm-autolink-literal": "^2.0.0",
+ "micromark-extension-gfm-footnote": "^2.0.0",
+ "micromark-extension-gfm-strikethrough": "^2.0.0",
+ "micromark-extension-gfm-table": "^2.0.0",
+ "micromark-extension-gfm-tagfilter": "^2.0.0",
+ "micromark-extension-gfm-task-list-item": "^2.0.0",
+ "micromark-util-combine-extensions": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-autolink-literal": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz",
+ "integrity": "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==",
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-footnote": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz",
+ "integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==",
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-core-commonmark": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-strikethrough": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz",
+ "integrity": "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==",
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-table": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.1.tgz",
+ "integrity": "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==",
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-tagfilter": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-2.0.0.tgz",
+ "integrity": "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==",
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-task-list-item": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz",
+ "integrity": "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==",
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-math": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-math/-/micromark-extension-math-3.1.0.tgz",
+ "integrity": "sha512-lvEqd+fHjATVs+2v/8kg9i5Q0AP2k85H0WUOwpIVvUML8BapsMvh1XAogmQjOCsLpoKRCVQqEkQBB3NhVBcsOg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/katex": "^0.16.0",
+ "devlop": "^1.0.0",
+ "katex": "^0.16.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-factory-destination": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz",
+ "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-label": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz",
+ "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-space": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz",
+ "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-title": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz",
+ "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-whitespace": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz",
+ "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-character": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz",
+ "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-chunked": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz",
+ "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-classify-character": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz",
+ "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-combine-extensions": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz",
+ "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-decode-numeric-character-reference": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz",
+ "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-decode-string": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz",
+ "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decode-named-character-reference": "^1.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-encode": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz",
+ "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-util-html-tag-name": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz",
+ "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-util-normalize-identifier": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz",
+ "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-resolve-all": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz",
+ "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-sanitize-uri": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz",
+ "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==",
"funding": [
{
"type": "GitHub Sponsors",
@@ -13834,6 +16078,28 @@
"micromark-util-symbol": "^2.0.0"
}
},
+ "node_modules/micromark-util-subtokenize": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz",
+ "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
"node_modules/micromark-util-symbol": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz",
@@ -14004,15 +16270,15 @@
}
},
"node_modules/mlly": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.2.tgz",
- "integrity": "sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==",
- "dev": true,
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.0.tgz",
+ "integrity": "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==",
+ "license": "MIT",
"dependencies": {
- "acorn": "^8.12.1",
- "pathe": "^1.1.2",
- "pkg-types": "^1.2.0",
- "ufo": "^1.5.4"
+ "acorn": "^8.15.0",
+ "pathe": "^2.0.3",
+ "pkg-types": "^1.3.1",
+ "ufo": "^1.6.1"
}
},
"node_modules/module-details-from-path": {
@@ -14021,12 +16287,12 @@
"integrity": "sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A=="
},
"node_modules/motion": {
- "version": "12.23.24",
- "resolved": "https://registry.npmjs.org/motion/-/motion-12.23.24.tgz",
- "integrity": "sha512-Rc5E7oe2YZ72N//S3QXGzbnXgqNrTESv8KKxABR20q2FLch9gHLo0JLyYo2hZ238bZ9Gx6cWhj9VO0IgwbMjCw==",
+ "version": "12.23.25",
+ "resolved": "https://registry.npmjs.org/motion/-/motion-12.23.25.tgz",
+ "integrity": "sha512-Fk5Y1kcgxYiTYOUjmwfXQAP7tP+iGqw/on1UID9WEL/6KpzxPr9jY2169OsjgZvXJdpraKXy0orkjaCVIl5fgQ==",
"license": "MIT",
"dependencies": {
- "framer-motion": "^12.23.24",
+ "framer-motion": "^12.23.25",
"tslib": "^2.4.0"
},
"peerDependencies": {
@@ -14061,33 +16327,6 @@
"integrity": "sha512-eAWoPgr4eFEOFfg2WjIsMoqJTW6Z8MTUCgn/GZ3VRpClWBdnbjryiA3ZSNLyxCTmCQx4RmYX6jX1iWHbenUPNQ==",
"license": "MIT"
},
- "node_modules/motion/node_modules/framer-motion": {
- "version": "12.23.24",
- "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.23.24.tgz",
- "integrity": "sha512-HMi5HRoRCTou+3fb3h9oTLyJGBxHfW+HnNE25tAXOvVx/IvwMHK0cx7IR4a2ZU6sh3IX1Z+4ts32PcYBOqka8w==",
- "license": "MIT",
- "dependencies": {
- "motion-dom": "^12.23.23",
- "motion-utils": "^12.23.6",
- "tslib": "^2.4.0"
- },
- "peerDependencies": {
- "@emotion/is-prop-valid": "*",
- "react": "^18.0.0 || ^19.0.0",
- "react-dom": "^18.0.0 || ^19.0.0"
- },
- "peerDependenciesMeta": {
- "@emotion/is-prop-valid": {
- "optional": true
- },
- "react": {
- "optional": true
- },
- "react-dom": {
- "optional": true
- }
- }
- },
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -14275,19 +16514,6 @@
"uuid": "dist/bin/uuid"
}
},
- "node_modules/next-plausible": {
- "version": "3.12.4",
- "resolved": "https://registry.npmjs.org/next-plausible/-/next-plausible-3.12.4.tgz",
- "integrity": "sha512-cD3+ixJxf8yBYvsideTxqli3fvrB7R4BXcvsNJz8Sm2X1QN039WfiXjCyNWkub4h5++rRs6fHhchUMnOuJokcg==",
- "funding": {
- "url": "https://github.com/4lejandrito/next-plausible?sponsor=1"
- },
- "peerDependencies": {
- "next": "^11.1.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 ",
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
- }
- },
"node_modules/next-themes": {
"version": "0.4.6",
"resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.4.6.tgz",
@@ -14341,28 +16567,11 @@
"node": "^10 || ^12 || >=14"
}
},
- "node_modules/node-domexception": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
- "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/jimmywarting"
- },
- {
- "type": "github",
- "url": "https://paypal.me/jimmywarting"
- }
- ],
- "engines": {
- "node": ">=10.5.0"
- }
- },
"node_modules/node-fetch": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
+ "optional": true,
"dependencies": {
"whatwg-url": "^5.0.0"
},
@@ -14505,9 +16714,9 @@
}
},
"node_modules/nuqs": {
- "version": "2.8.1",
- "resolved": "https://registry.npmjs.org/nuqs/-/nuqs-2.8.1.tgz",
- "integrity": "sha512-kIw8UW5KXXfVla6B9h0EKzSH/YDpee6lojniQoMyul8wq9brwV0kElE2Jzg4NSCLBo7n2E3wc1J3o7IyPYVlqQ==",
+ "version": "2.8.3",
+ "resolved": "https://registry.npmjs.org/nuqs/-/nuqs-2.8.3.tgz",
+ "integrity": "sha512-ZSLiAw0uDYE3JpmV3Yot7aGP4mfyj7vYCPrM7r7qUo9Bx00Vf/7eHOp4iC9LtgV1PVVdqLkvMf/8qN79BP1Jkg==",
"license": "MIT",
"dependencies": {
"@standard-schema/spec": "1.0.0"
@@ -14560,16 +16769,10 @@
"node": "^14.16.0 || >=16.10.0"
}
},
- "node_modules/nypm/node_modules/confbox": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz",
- "integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==",
- "license": "MIT"
- },
- "node_modules/nypm/node_modules/pathe": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
- "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
+ "node_modules/nypm/node_modules/confbox": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz",
+ "integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==",
"license": "MIT"
},
"node_modules/nypm/node_modules/pkg-types": {
@@ -14773,32 +16976,42 @@
"regex-recursion": "^6.0.2"
}
},
- "node_modules/openai": {
- "version": "4.20.1",
- "resolved": "https://registry.npmjs.org/openai/-/openai-4.20.1.tgz",
- "integrity": "sha512-Dd3q8EvINfganZFtg6V36HjrMaihqRgIcKiHua4Nq9aw/PxOP48dhbsk8x5klrxajt5Lpnc1KTOG5i1S6BKAJA==",
- "dependencies": {
- "@types/node": "^18.11.18",
- "@types/node-fetch": "^2.6.4",
- "abort-controller": "^3.0.0",
- "agentkeepalive": "^4.2.1",
- "digest-fetch": "^1.3.0",
- "form-data-encoder": "1.7.2",
- "formdata-node": "^4.3.2",
- "node-fetch": "^2.6.7",
- "web-streams-polyfill": "^3.2.1"
+ "node_modules/open": {
+ "version": "7.4.2",
+ "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
+ "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-docker": "^2.0.0",
+ "is-wsl": "^2.1.1"
},
- "bin": {
- "openai": "bin/cli"
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/openai/node_modules/@types/node": {
- "version": "18.19.124",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.124.tgz",
- "integrity": "sha512-hY4YWZFLs3ku6D2Gqo3RchTd9VRCcrjqp/I0mmohYeUVA5Y8eCXKJEasHxLAJVZRJuQogfd1GiJ9lgogBgKeuQ==",
- "license": "MIT",
- "dependencies": {
- "undici-types": "~5.26.4"
+ "node_modules/openai": {
+ "version": "6.10.0",
+ "resolved": "https://registry.npmjs.org/openai/-/openai-6.10.0.tgz",
+ "integrity": "sha512-ITxOGo7rO3XRMiKA5l7tQ43iNNu+iXGFAcf2t+aWVzzqRaS0i7m1K2BhxNdaveB+5eENhO0VY1FkiZzhBk4v3A==",
+ "license": "Apache-2.0",
+ "bin": {
+ "openai": "bin/cli"
+ },
+ "peerDependencies": {
+ "ws": "^8.18.0",
+ "zod": "^3.25 || ^4.0"
+ },
+ "peerDependenciesMeta": {
+ "ws": {
+ "optional": true
+ },
+ "zod": {
+ "optional": true
+ }
}
},
"node_modules/openapi-fetch": {
@@ -15029,6 +17242,12 @@
"resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz",
"integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw=="
},
+ "node_modules/package-manager-detector": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.6.0.tgz",
+ "integrity": "sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==",
+ "license": "MIT"
+ },
"node_modules/pako": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
@@ -15045,6 +17264,31 @@
"node": ">=6"
}
},
+ "node_modules/parse-entities": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz",
+ "integrity": "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^2.0.0",
+ "character-entities-legacy": "^3.0.0",
+ "character-reference-invalid": "^2.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "is-alphanumerical": "^2.0.0",
+ "is-decimal": "^2.0.0",
+ "is-hexadecimal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/parse-entities/node_modules/@types/unist": {
+ "version": "2.0.11",
+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz",
+ "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==",
+ "license": "MIT"
+ },
"node_modules/parse-imports-exports": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/parse-imports-exports/-/parse-imports-exports-0.2.4.tgz",
@@ -15068,6 +17312,30 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/parse5": {
+ "version": "7.3.0",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz",
+ "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==",
+ "license": "MIT",
+ "dependencies": {
+ "entities": "^6.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/inikulin/parse5?sponsor=1"
+ }
+ },
+ "node_modules/parse5/node_modules/entities": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz",
+ "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
"node_modules/parseley": {
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/parseley/-/parseley-0.12.1.tgz",
@@ -15080,6 +17348,75 @@
"url": "https://ko-fi.com/killymxi"
}
},
+ "node_modules/patch-package": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.1.tgz",
+ "integrity": "sha512-VsKRIA8f5uqHQ7NGhwIna6Bx6D9s/1iXlA1hthBVBEbkq+t4kXD0HHt+rJhf/Z+Ci0F/HCB2hvn0qLdLG+Qxlw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@yarnpkg/lockfile": "^1.1.0",
+ "chalk": "^4.1.2",
+ "ci-info": "^3.7.0",
+ "cross-spawn": "^7.0.3",
+ "find-yarn-workspace-root": "^2.0.0",
+ "fs-extra": "^10.0.0",
+ "json-stable-stringify": "^1.0.2",
+ "klaw-sync": "^6.0.0",
+ "minimist": "^1.2.6",
+ "open": "^7.4.2",
+ "semver": "^7.5.3",
+ "slash": "^2.0.0",
+ "tmp": "^0.2.4",
+ "yaml": "^2.2.2"
+ },
+ "bin": {
+ "patch-package": "index.js"
+ },
+ "engines": {
+ "node": ">=14",
+ "npm": ">5"
+ }
+ },
+ "node_modules/patch-package/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/patch-package/node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/path-data-parser": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz",
+ "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==",
+ "license": "MIT"
+ },
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -15139,10 +17476,10 @@
}
},
"node_modules/pathe": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz",
- "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",
- "dev": true
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
+ "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
+ "license": "MIT"
},
"node_modules/pdf-lib": {
"version": "1.17.1",
@@ -15184,6 +17521,8 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz",
"integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"@types/estree": "^1.0.0",
@@ -15224,14 +17563,30 @@
}
},
"node_modules/pkg-types": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.1.tgz",
- "integrity": "sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==",
- "dev": true,
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz",
+ "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==",
+ "license": "MIT",
"dependencies": {
"confbox": "^0.1.8",
- "mlly": "^1.7.2",
- "pathe": "^1.1.2"
+ "mlly": "^1.7.4",
+ "pathe": "^2.0.1"
+ }
+ },
+ "node_modules/points-on-curve": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz",
+ "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==",
+ "license": "MIT"
+ },
+ "node_modules/points-on-path": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz",
+ "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==",
+ "license": "MIT",
+ "dependencies": {
+ "path-data-parser": "0.1.0",
+ "points-on-curve": "0.2.0"
}
},
"node_modules/possible-typed-array-names": {
@@ -15410,12 +17765,12 @@
}
},
"node_modules/posthog-js": {
- "version": "1.298.1",
- "resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.298.1.tgz",
- "integrity": "sha512-MynFhC2HO6sg5moUfpkd0s6RzAqcqFX75kjIi4Xrj2Gl0/YQWYvFUgvv8FCpWPKPs2mdvNWYhs+oqJg0BVVHPw==",
+ "version": "1.302.2",
+ "resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.302.2.tgz",
+ "integrity": "sha512-4voih22zQe7yHA7DynlQ3B7kgzJOaKIjzV7K3jJ2Qf+UDXd1ZgO7xYmLWYVtuKEvD1OXHbKk/fPhUTZeHEWpBw==",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
- "@posthog/core": "1.6.0",
+ "@posthog/core": "1.7.1",
"core-js": "^3.38.1",
"fflate": "^0.4.8",
"preact": "^10.19.3",
@@ -15451,9 +17806,9 @@
}
},
"node_modules/prettier": {
- "version": "3.7.3",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.3.tgz",
- "integrity": "sha512-QgODejq9K3OzoBbuyobZlUhznP5SKwPqp+6Q6xw6o8gnhr4O85L2U915iM2IDcfF2NPXVaM9zlo9tdwipnYwzg==",
+ "version": "3.7.4",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.4.tgz",
+ "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==",
"license": "MIT",
"bin": {
"prettier": "bin/prettier.cjs"
@@ -15466,9 +17821,9 @@
}
},
"node_modules/prettier-plugin-tailwindcss": {
- "version": "0.7.1",
- "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.7.1.tgz",
- "integrity": "sha512-Bzv1LZcuiR1Sk02iJTS1QzlFNp/o5l2p3xkopwOrbPmtMeh3fK9rVW5M3neBQzHq+kGKj/4LGQMTNcTH4NGPtQ==",
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.7.2.tgz",
+ "integrity": "sha512-LkphyK3Fw+q2HdMOoiEHWf93fNtYJwfamoKPl7UwtjFQdei/iIBoX11G6j706FzN3ymX9mPVi97qIY8328vdnA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -16010,9 +18365,9 @@
}
},
"node_modules/react-email": {
- "version": "5.0.5",
- "resolved": "https://registry.npmjs.org/react-email/-/react-email-5.0.5.tgz",
- "integrity": "sha512-O0BCyg2zR/3CsEYqoeDQuJL6W8oHYSPmvzIeSbFa5XXdtofmgizCLThbs50lcP7wGCTkDvdJIZ6XWUt2aRU6zA==",
+ "version": "5.0.6",
+ "resolved": "https://registry.npmjs.org/react-email/-/react-email-5.0.6.tgz",
+ "integrity": "sha512-DEGzWpEiC3CquPEaaEJuipNT3WZ9mK58rbkpOe4Slbgyf60PLa1wONnt5a3afbBBRbNdW2aYhIvVI41yS6UIRA==",
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.27.0",
@@ -16182,9 +18537,9 @@
"integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ=="
},
"node_modules/react-hook-form": {
- "version": "7.66.1",
- "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.66.1.tgz",
- "integrity": "sha512-2KnjpgG2Rhbi+CIiIBQQ9Df6sMGH5ExNyFl4Hw9qO7pIqMBR8Bvu9RQyjl3JM4vehzCh9soiNUM/xYMswb2EiA==",
+ "version": "7.68.0",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.68.0.tgz",
+ "integrity": "sha512-oNN3fjrZ/Xo40SWlHf1yCjlMK417JxoSJVUXQjGdvdRCU07NTFei1i1f8ApUAts+IVh14e4EdakeLEA+BEAs/Q==",
"license": "MIT",
"engines": {
"node": ">=18.0.0"
@@ -16244,6 +18599,33 @@
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
},
+ "node_modules/react-markdown": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz",
+ "integrity": "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "hast-util-to-jsx-runtime": "^2.0.0",
+ "html-url-attributes": "^3.0.0",
+ "mdast-util-to-hast": "^13.0.0",
+ "remark-parse": "^11.0.0",
+ "remark-rehype": "^11.0.0",
+ "unified": "^11.0.0",
+ "unist-util-visit": "^5.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ },
+ "peerDependencies": {
+ "@types/react": ">=18",
+ "react": ">=18"
+ }
+ },
"node_modules/react-modal": {
"version": "3.16.3",
"resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.3.tgz",
@@ -16690,6 +19072,179 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/rehype-harden": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/rehype-harden/-/rehype-harden-1.1.6.tgz",
+ "integrity": "sha512-5WyX6BFEWYmmbCF/S2gNRklfgPGTiGjviAjbseO4XlpqEilWBkvWwve6uU/JB3C0JvG/qxCZa3rBn8+ajy4i/A==",
+ "license": "MIT",
+ "dependencies": {
+ "unist-util-visit": "^5.0.0"
+ }
+ },
+ "node_modules/rehype-katex": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/rehype-katex/-/rehype-katex-7.0.1.tgz",
+ "integrity": "sha512-OiM2wrZ/wuhKkigASodFoo8wimG3H12LWQaH8qSPVJn9apWKFSH3YOCtbKpBorTVw/eI7cuT21XBbvwEswbIOA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/katex": "^0.16.0",
+ "hast-util-from-html-isomorphic": "^2.0.0",
+ "hast-util-to-text": "^4.0.0",
+ "katex": "^0.16.0",
+ "unist-util-visit-parents": "^6.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/rehype-raw": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-7.0.0.tgz",
+ "integrity": "sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "hast-util-raw": "^9.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remark-cjk-friendly": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/remark-cjk-friendly/-/remark-cjk-friendly-1.2.3.tgz",
+ "integrity": "sha512-UvAgxwlNk+l9Oqgl/9MWK2eWRS7zgBW/nXX9AthV7nd/3lNejF138E7Xbmk9Zs4WjTJGs721r7fAEc7tNFoH7g==",
+ "license": "MIT",
+ "dependencies": {
+ "micromark-extension-cjk-friendly": "1.2.3"
+ },
+ "engines": {
+ "node": ">=16"
+ },
+ "peerDependencies": {
+ "@types/mdast": "^4.0.0",
+ "unified": "^11.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/mdast": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/remark-cjk-friendly-gfm-strikethrough": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/remark-cjk-friendly-gfm-strikethrough/-/remark-cjk-friendly-gfm-strikethrough-1.2.3.tgz",
+ "integrity": "sha512-bXfMZtsaomK6ysNN/UGRIcasQAYkC10NtPmP0oOHOV8YOhA2TXmwRXCku4qOzjIFxAPfish5+XS0eIug2PzNZA==",
+ "license": "MIT",
+ "dependencies": {
+ "micromark-extension-cjk-friendly-gfm-strikethrough": "1.2.3"
+ },
+ "engines": {
+ "node": ">=16"
+ },
+ "peerDependencies": {
+ "@types/mdast": "^4.0.0",
+ "unified": "^11.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/mdast": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/remark-gfm": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz",
+ "integrity": "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-gfm": "^3.0.0",
+ "micromark-extension-gfm": "^3.0.0",
+ "remark-parse": "^11.0.0",
+ "remark-stringify": "^11.0.0",
+ "unified": "^11.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remark-math": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/remark-math/-/remark-math-6.0.0.tgz",
+ "integrity": "sha512-MMqgnP74Igy+S3WwnhQ7kqGlEerTETXMvJhrUzDikVZ2/uogJCb+WHUg97hK9/jcfc0dkD73s3LN8zU49cTEtA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-math": "^3.0.0",
+ "micromark-extension-math": "^3.0.0",
+ "unified": "^11.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remark-parse": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz",
+ "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "micromark-util-types": "^2.0.0",
+ "unified": "^11.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remark-rehype": {
+ "version": "11.1.2",
+ "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz",
+ "integrity": "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "mdast-util-to-hast": "^13.0.0",
+ "unified": "^11.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remark-stringify": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz",
+ "integrity": "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-to-markdown": "^2.0.0",
+ "unified": "^11.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remend": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/remend/-/remend-1.0.1.tgz",
+ "integrity": "sha512-152puVH0qMoRJQFnaMG+rVDdf01Jq/CaED+MBuXExurJgdbkLp0c3TIe4R12o28Klx8uyGsjvFNG05aFG69G9w==",
+ "license": "Apache-2.0"
+ },
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -16845,12 +19400,30 @@
"url": "https://github.com/sponsors/isaacs"
}
},
+ "node_modules/robust-predicates": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz",
+ "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==",
+ "license": "Unlicense"
+ },
"node_modules/rope-sequence": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.4.tgz",
"integrity": "sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==",
"license": "MIT"
},
+ "node_modules/roughjs": {
+ "version": "4.6.6",
+ "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.6.6.tgz",
+ "integrity": "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==",
+ "license": "MIT",
+ "dependencies": {
+ "hachure-fill": "^0.5.2",
+ "path-data-parser": "^0.1.0",
+ "points-on-curve": "^0.2.0",
+ "points-on-path": "^0.2.1"
+ }
+ },
"node_modules/run-exclusive": {
"version": "2.2.19",
"resolved": "https://registry.npmjs.org/run-exclusive/-/run-exclusive-2.2.19.tgz",
@@ -16881,6 +19454,12 @@
"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==",
+ "license": "BSD-3-Clause"
+ },
"node_modules/safe-array-concat": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz",
@@ -16933,6 +19512,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "license": "MIT"
+ },
"node_modules/sanitize-html": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.17.0.tgz",
@@ -17001,27 +19586,6 @@
"node": ">=10"
}
},
- "node_modules/seroval": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.1.1.tgz",
- "integrity": "sha512-rqEO6FZk8mv7Hyv4UCj3FD3b6Waqft605TLfsCe/BiaylRpyyMC0b+uA5TJKawX3KzMrdi3wsLbCaLplrQmBvQ==",
- "peer": true,
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/seroval-plugins": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.1.1.tgz",
- "integrity": "sha512-qNSy1+nUj7hsCOon7AO4wdAIo9P0jrzAMp18XhiOzA6/uO5TKtP7ScozVJ8T293oRIvi5wyCHSM4TrJo/c/GJA==",
- "peer": true,
- "engines": {
- "node": ">=10"
- },
- "peerDependencies": {
- "seroval": "^1.0"
- }
- },
"node_modules/set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
@@ -17129,17 +19693,17 @@
}
},
"node_modules/shiki": {
- "version": "3.17.0",
- "resolved": "https://registry.npmjs.org/shiki/-/shiki-3.17.0.tgz",
- "integrity": "sha512-lUZfWsyW7czITYTdo/Tb6ZM4VfyXlzmKYBQBjTz+pBzPPkP08RgIt00Ls1Z50Cl3SfwJsue6WbJeF3UgqLVI9Q==",
+ "version": "3.19.0",
+ "resolved": "https://registry.npmjs.org/shiki/-/shiki-3.19.0.tgz",
+ "integrity": "sha512-77VJr3OR/VUZzPiStyRhADmO2jApMM0V2b1qf0RpfWya8Zr1PeZev5AEpPGAAKWdiYUtcZGBE4F5QvJml1PvWA==",
"license": "MIT",
"dependencies": {
- "@shikijs/core": "3.17.0",
- "@shikijs/engine-javascript": "3.17.0",
- "@shikijs/engine-oniguruma": "3.17.0",
- "@shikijs/langs": "3.17.0",
- "@shikijs/themes": "3.17.0",
- "@shikijs/types": "3.17.0",
+ "@shikijs/core": "3.19.0",
+ "@shikijs/engine-javascript": "3.19.0",
+ "@shikijs/engine-oniguruma": "3.19.0",
+ "@shikijs/langs": "3.19.0",
+ "@shikijs/themes": "3.19.0",
+ "@shikijs/types": "3.19.0",
"@shikijs/vscode-textmate": "^10.0.2",
"@types/hast": "^3.0.4"
}
@@ -17238,6 +19802,16 @@
"integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
"license": "MIT"
},
+ "node_modules/slash": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
+ "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/slug": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/slug/-/slug-6.1.0.tgz",
@@ -17315,30 +19889,6 @@
"node": ">=10.0.0"
}
},
- "node_modules/solid-js": {
- "version": "1.9.5",
- "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.9.5.tgz",
- "integrity": "sha512-ogI3DaFcyn6UhYhrgcyRAMbu/buBJitYQASZz5WzfQVPP10RD2AbCoRZ517psnezrasyCbWzIxZ6kVqet768xw==",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "csstype": "^3.1.0",
- "seroval": "^1.1.0",
- "seroval-plugins": "^1.1.0"
- }
- },
- "node_modules/solid-swr-store": {
- "version": "0.10.7",
- "resolved": "https://registry.npmjs.org/solid-swr-store/-/solid-swr-store-0.10.7.tgz",
- "integrity": "sha512-A6d68aJmRP471aWqKKPE2tpgOiR5fH4qXQNfKIec+Vap+MGQm3tvXlT8n0I8UgJSlNAsSAUuw2VTviH2h3Vv5g==",
- "engines": {
- "node": ">=10"
- },
- "peerDependencies": {
- "solid-js": "^1.2",
- "swr-store": "^0.10"
- }
- },
"node_modules/sonner": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.7.tgz",
@@ -17367,17 +19917,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/sswr": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/sswr/-/sswr-2.0.0.tgz",
- "integrity": "sha512-mV0kkeBHcjcb0M5NqKtKVg/uTIYNlIIniyDfSGrSfxpEdM9C365jK0z55pl9K0xAkNTJi2OAOVFQpgMPUk+V0w==",
- "dependencies": {
- "swrev": "^4.0.0"
- },
- "peerDependencies": {
- "svelte": "^4.0.0"
- }
- },
"node_modules/standard-as-callback": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz",
@@ -17416,6 +19955,95 @@
"readable-stream": "^3.5.0"
}
},
+ "node_modules/streamdown": {
+ "version": "1.6.10",
+ "resolved": "https://registry.npmjs.org/streamdown/-/streamdown-1.6.10.tgz",
+ "integrity": "sha512-B4Y3Z/qiXl1Dc+LzAB5c52Cd1QGRiFjaDwP+ERoj1JtCykdRDM8X6HwQnn3YkpkSk0x3R7S/6LrGe1nQiElHQQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "clsx": "^2.1.1",
+ "hast": "^1.0.0",
+ "hast-util-to-jsx-runtime": "^2.3.6",
+ "html-url-attributes": "^3.0.1",
+ "katex": "^0.16.22",
+ "lucide-react": "^0.542.0",
+ "marked": "^16.2.1",
+ "mermaid": "^11.11.0",
+ "rehype-harden": "^1.1.6",
+ "rehype-katex": "^7.0.1",
+ "rehype-raw": "^7.0.0",
+ "remark-cjk-friendly": "^1.2.3",
+ "remark-cjk-friendly-gfm-strikethrough": "^1.2.3",
+ "remark-gfm": "^4.0.1",
+ "remark-math": "^6.0.0",
+ "remark-parse": "^11.0.0",
+ "remark-rehype": "^11.1.2",
+ "remend": "1.0.1",
+ "shiki": "^3.12.2",
+ "tailwind-merge": "^3.3.1",
+ "unified": "^11.0.5",
+ "unist-util-visit": "^5.0.0"
+ },
+ "peerDependencies": {
+ "react": "^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/streamdown/node_modules/commander": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
+ "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 12"
+ }
+ },
+ "node_modules/streamdown/node_modules/katex": {
+ "version": "0.16.25",
+ "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.25.tgz",
+ "integrity": "sha512-woHRUZ/iF23GBP1dkDQMh1QBad9dmr8/PAwNA54VrSOVYgI12MAcE14TqnDdQOdzyEonGzMepYnqBMYdsoAr8Q==",
+ "funding": [
+ "https://opencollective.com/katex",
+ "https://github.com/sponsors/katex"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "commander": "^8.3.0"
+ },
+ "bin": {
+ "katex": "cli.js"
+ }
+ },
+ "node_modules/streamdown/node_modules/lucide-react": {
+ "version": "0.542.0",
+ "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.542.0.tgz",
+ "integrity": "sha512-w3hD8/SQB7+lzU2r4VdFyzzOzKnUjTZIF/MQJGSSvni7Llewni4vuViRppfRAa2guOsY5k4jZyxw/i9DQHv+dw==",
+ "license": "ISC",
+ "peerDependencies": {
+ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/streamdown/node_modules/marked": {
+ "version": "16.4.2",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz",
+ "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==",
+ "license": "MIT",
+ "bin": {
+ "marked": "bin/marked.js"
+ },
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/streamdown/node_modules/tailwind-merge": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.4.0.tgz",
+ "integrity": "sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/dcastil"
+ }
+ },
"node_modules/streamsearch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
@@ -17687,6 +20315,24 @@
"integrity": "sha512-zOh9jPYI+xrNOyisSelgym4tolKTJCQd5GBhK0+0xJvcYDcwlOoxF/rnFKQ2KRZknXSG9jWAp66fwP6AxN9STg==",
"license": "MIT"
},
+ "node_modules/style-to-js": {
+ "version": "1.1.21",
+ "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.21.tgz",
+ "integrity": "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==",
+ "license": "MIT",
+ "dependencies": {
+ "style-to-object": "1.0.14"
+ }
+ },
+ "node_modules/style-to-object": {
+ "version": "1.0.14",
+ "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.14.tgz",
+ "integrity": "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==",
+ "license": "MIT",
+ "dependencies": {
+ "inline-style-parser": "0.2.7"
+ }
+ },
"node_modules/styled-jsx": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
@@ -17709,6 +20355,12 @@
}
}
},
+ "node_modules/stylis": {
+ "version": "4.3.6",
+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.6.tgz",
+ "integrity": "sha512-yQ3rwFWRfwNUY7H5vpU0wfdkNSnvnJinhF9830Swlaxl03zsOjCfmX0ugac+3LtK0lYSgwL/KXc8oYL3mG4YFQ==",
+ "license": "MIT"
+ },
"node_modules/sucrase": {
"version": "3.35.0",
"resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz",
@@ -17787,6 +20439,8 @@
"version": "4.2.19",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.19.tgz",
"integrity": "sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"@ampproject/remapping": "^2.2.1",
@@ -17812,6 +20466,8 @@
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
"integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"dequal": "^2.0.3"
@@ -17821,6 +20477,8 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz",
"integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==",
+ "dev": true,
+ "optional": true,
"peer": true,
"engines": {
"node": ">= 0.4"
@@ -17830,6 +20488,8 @@
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
"integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"mdn-data": "2.0.30",
@@ -17843,6 +20503,8 @@
"version": "2.0.30",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
"integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
+ "dev": true,
+ "optional": true,
"peer": true
},
"node_modules/svix": {
@@ -17885,30 +20547,6 @@
"react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
}
},
- "node_modules/swr-store": {
- "version": "0.10.6",
- "resolved": "https://registry.npmjs.org/swr-store/-/swr-store-0.10.6.tgz",
- "integrity": "sha512-xPjB1hARSiRaNNlUQvWSVrG5SirCjk2TmaUyzzvk69SZQan9hCJqw/5rG9iL7xElHU784GxRPISClq4488/XVw==",
- "dependencies": {
- "dequal": "^2.0.3"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/swrev": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/swrev/-/swrev-4.0.0.tgz",
- "integrity": "sha512-LqVcOHSB4cPGgitD1riJ1Hh4vdmITOp+BkmfmXRh4hSF/t7EnS4iD+SOTmq7w5pPm/SiPeto4ADbKS6dHUDWFA=="
- },
- "node_modules/swrv": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/swrv/-/swrv-1.0.4.tgz",
- "integrity": "sha512-zjEkcP8Ywmj+xOJW3lIT65ciY/4AL4e/Or7Gj0MzU3zBJNMdJiT8geVZhINavnlHRMMCcJLHhraLTAiDOTmQ9g==",
- "peerDependencies": {
- "vue": ">=3.2.26 < 4"
- }
- },
"node_modules/tabbable": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz",
@@ -18185,10 +20823,23 @@
"node": ">=8.0"
}
},
+ "node_modules/tokenlens": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/tokenlens/-/tokenlens-1.3.1.tgz",
+ "integrity": "sha512-7oxmsS5PNCX3z+b+z07hL5vCzlgHKkCGrEQjQmWl5l+v5cUrtL7S1cuST4XThaL1XyjbTX8J5hfP0cjDJRkaLA==",
+ "license": "MIT",
+ "dependencies": {
+ "@tokenlens/core": "1.3.0",
+ "@tokenlens/fetch": "1.3.0",
+ "@tokenlens/helpers": "1.3.1",
+ "@tokenlens/models": "1.3.0"
+ }
+ },
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
+ "optional": true
},
"node_modules/traverse": {
"version": "0.3.9",
@@ -18208,6 +20859,16 @@
"url": "https://github.com/sponsors/wooorm"
}
},
+ "node_modules/trough": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz",
+ "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/ts-api-utils": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz",
@@ -18219,6 +20880,15 @@
"typescript": ">=4.2.0"
}
},
+ "node_modules/ts-dedent": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz",
+ "integrity": "sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.10"
+ }
+ },
"node_modules/ts-interface-checker": {
"version": "0.1.13",
"resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
@@ -18436,9 +21106,10 @@
"license": "MIT"
},
"node_modules/ufo": {
- "version": "1.5.4",
- "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz",
- "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ=="
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz",
+ "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==",
+ "license": "MIT"
},
"node_modules/uint8array-extras": {
"version": "1.5.0",
@@ -18491,10 +21162,24 @@
"node": ">=14.0"
}
},
- "node_modules/undici-types": {
- "version": "5.26.5",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
- "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
+ "node_modules/unified": {
+ "version": "11.0.5",
+ "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz",
+ "integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "bail": "^2.0.0",
+ "devlop": "^1.0.0",
+ "extend": "^3.0.0",
+ "is-plain-obj": "^4.0.0",
+ "trough": "^2.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
},
"node_modules/unionize": {
"version": "3.1.0",
@@ -18502,6 +21187,20 @@
"integrity": "sha512-LQZvbanzvpzvK0QYgRvnaA9VVe+g4nTbRlyoGGWDKFrZn0HJnDN5LC2Ti0+BxpKKOCrL3BQcRBVFPy/t12Y24Q==",
"license": "MIT"
},
+ "node_modules/unist-util-find-after": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-find-after/-/unist-util-find-after-5.0.0.tgz",
+ "integrity": "sha512-amQa0Ep2m6hE2g72AugUItjbuM8X8cGQnFoHk0pGfrFeT9GZhzN5SW8nRsiGKK7Aif4CrACPENkA6P/Lw6fHGQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/unist-util-is": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz",
@@ -18528,6 +21227,20 @@
"url": "https://opencollective.com/unified"
}
},
+ "node_modules/unist-util-remove-position": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-5.0.0.tgz",
+ "integrity": "sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-visit": "^5.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/unist-util-stringify-position": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz",
@@ -18570,6 +21283,16 @@
"url": "https://opencollective.com/unified"
}
},
+ "node_modules/universalify": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
"node_modules/unsend": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/unsend/-/unsend-1.5.1.tgz",
@@ -18793,6 +21516,15 @@
}
}
},
+ "node_modules/use-stick-to-bottom": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/use-stick-to-bottom/-/use-stick-to-bottom-1.1.1.tgz",
+ "integrity": "sha512-JkDp0b0tSmv7HQOOpL1hT7t7QaoUBXkq045WWWOFDTlLGRzgIIyW7vyzOIJzY7L2XVIG7j1yUxeDj2LHm9Vwng==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
"node_modules/use-sync-external-store": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.5.0.tgz",
@@ -18853,6 +21585,20 @@
"url": "https://opencollective.com/unified"
}
},
+ "node_modules/vfile-location": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-5.0.3.tgz",
+ "integrity": "sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/vfile-message": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.3.tgz",
@@ -18888,27 +21634,55 @@
"d3-timer": "^3.0.1"
}
},
- "node_modules/vue": {
- "version": "3.4.35",
- "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.35.tgz",
- "integrity": "sha512-+fl/GLmI4GPileHftVlCdB7fUL4aziPcqTudpTGXCT8s+iZWuOCeNEB5haX6Uz2IpRrbEXOgIFbe+XciCuGbNQ==",
- "peer": true,
+ "node_modules/vscode-jsonrpc": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz",
+ "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/vscode-languageserver": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz",
+ "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==",
+ "license": "MIT",
"dependencies": {
- "@vue/compiler-dom": "3.4.35",
- "@vue/compiler-sfc": "3.4.35",
- "@vue/runtime-dom": "3.4.35",
- "@vue/server-renderer": "3.4.35",
- "@vue/shared": "3.4.35"
- },
- "peerDependencies": {
- "typescript": "*"
+ "vscode-languageserver-protocol": "3.17.5"
},
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
+ "bin": {
+ "installServerIntoExtension": "bin/installServerIntoExtension"
+ }
+ },
+ "node_modules/vscode-languageserver-protocol": {
+ "version": "3.17.5",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz",
+ "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==",
+ "license": "MIT",
+ "dependencies": {
+ "vscode-jsonrpc": "8.2.0",
+ "vscode-languageserver-types": "3.17.5"
}
},
+ "node_modules/vscode-languageserver-textdocument": {
+ "version": "1.0.12",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz",
+ "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==",
+ "license": "MIT"
+ },
+ "node_modules/vscode-languageserver-types": {
+ "version": "3.17.5",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz",
+ "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==",
+ "license": "MIT"
+ },
+ "node_modules/vscode-uri": {
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz",
+ "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==",
+ "license": "MIT"
+ },
"node_modules/w3c-keyname": {
"version": "2.2.8",
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz",
@@ -18923,12 +21697,14 @@
"loose-envify": "^1.0.0"
}
},
- "node_modules/web-streams-polyfill": {
- "version": "3.3.3",
- "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
- "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
- "engines": {
- "node": ">= 8"
+ "node_modules/web-namespaces": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz",
+ "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/web-vitals": {
@@ -18939,12 +21715,14 @@
"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=="
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
+ "optional": true
},
"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==",
+ "optional": true,
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
@@ -19393,6 +22171,34 @@
"zod": "^3.18.0"
}
},
+ "node_modules/zustand": {
+ "version": "4.5.7",
+ "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.7.tgz",
+ "integrity": "sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw==",
+ "license": "MIT",
+ "dependencies": {
+ "use-sync-external-store": "^1.2.2"
+ },
+ "engines": {
+ "node": ">=12.7.0"
+ },
+ "peerDependencies": {
+ "@types/react": ">=16.8",
+ "immer": ">=9.0.6",
+ "react": ">=16.8"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "immer": {
+ "optional": true
+ },
+ "react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/zwitch": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz",
diff --git a/package.json b/package.json
index a983e444..a7459c8c 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
- "postinstall": "prisma generate",
+ "postinstall": "patch-package && prisma generate",
"vercel-build": "prisma migrate deploy && next build",
"email": "email dev --dir ./components/emails --port 3001",
"trigger:v3:dev": "npx trigger.dev@3 dev",
@@ -20,11 +20,13 @@
"dev:prisma": "npx prisma generate && npx prisma migrate deploy"
},
"dependencies": {
- "@aws-sdk/client-lambda": "^3.940.0",
- "@aws-sdk/client-s3": "^3.940.0",
- "@aws-sdk/cloudfront-signer": "^3.935.0",
- "@aws-sdk/lib-storage": "^3.940.0",
- "@aws-sdk/s3-request-presigner": "^3.940.0",
+ "@ai-sdk/openai": "^2.0.80",
+ "@ai-sdk/react": "^2.0.109",
+ "@aws-sdk/client-lambda": "^3.946.0",
+ "@aws-sdk/client-s3": "^3.946.0",
+ "@aws-sdk/cloudfront-signer": "^3.946.0",
+ "@aws-sdk/lib-storage": "^3.946.0",
+ "@aws-sdk/s3-request-presigner": "^3.946.0",
"@calcom/embed-react": "^1.5.3",
"@chronark/zod-bird": "^0.3.10",
"@dnd-kit/core": "^6.3.1",
@@ -34,7 +36,7 @@
"@hookform/resolvers": "^5.2.2",
"@jitsu/js": "^1.10.4",
"@next-auth/prisma-adapter": "^1.0.7",
- "@next/third-parties": "^15.5.6",
+ "@next/third-parties": "^16.0.7",
"@pdf-lib/fontkit": "^1.1.1",
"@prisma/client": "^6.5.0",
"@radix-ui/react-accordion": "^1.2.12",
@@ -44,6 +46,7 @@
"@radix-ui/react-collapsible": "^1.1.12",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
+ "@radix-ui/react-hover-card": "^1.1.15",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-portal": "^1.1.10",
@@ -58,6 +61,7 @@
"@radix-ui/react-toggle": "^1.1.10",
"@radix-ui/react-toggle-group": "^1.1.11",
"@radix-ui/react-tooltip": "^1.2.8",
+ "@radix-ui/react-use-controllable-state": "^1.2.2",
"@react-email/components": "^1.0.1",
"@react-email/render": "^2.0.0",
"@sindresorhus/slugify": "^3.0.0",
@@ -81,7 +85,8 @@
"@vercel/blob": "^2.0.0",
"@vercel/edge-config": "^1.4.3",
"@vercel/functions": "^3.3.4",
- "ai": "2.2.37",
+ "@xyflow/react": "^12.9.3",
+ "ai": "^5.0.108",
"autoprefixer": "^10.4.22",
"base-x": "^5.0.1",
"bcryptjs": "^3.0.3",
@@ -91,42 +96,43 @@
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"date-fns": "^3.6.0",
- "dub": "^0.68.0",
+ "dub": "^0.69.0",
+ "embla-carousel-react": "^8.6.0",
"eslint": "8.57.0",
"eslint-config-next": "^14.2.33",
"exceljs": "^4.4.0",
"fluent-ffmpeg": "^2.1.3",
"input-otp": "^1.4.2",
"js-cookie": "^3.0.5",
- "jsonwebtoken": "^9.0.2",
- "lucide-react": "^0.555.0",
+ "jsonwebtoken": "^9.0.3",
+ "lucide-react": "^0.556.0",
"mime-types": "^3.0.2",
- "motion": "^12.23.24",
+ "motion": "^12.23.25",
"ms": "^2.1.3",
"mupdf": "^1.26.4",
"nanoid": "^5.1.6",
"next": "^14.2.33",
"next-auth": "^4.24.13",
- "next-plausible": "^3.12.4",
"next-themes": "^0.4.6",
"nodemailer": "^7.0.11",
"notion-client": "^7.7.1",
"notion-utils": "^7.7.1",
- "nuqs": "^2.8.1",
- "openai": "4.20.1",
+ "nuqs": "^2.8.3",
+ "openai": "^6.10.0",
"pdf-lib": "^1.17.1",
"postcss": "^8.5.6",
- "posthog-js": "^1.298.1",
+ "posthog-js": "^1.302.2",
"react": "^18.3.1",
"react-colorful": "^5.6.1",
"react-day-picker": "^8.10.1",
"react-dom": "^18.3.1",
"react-draggable": "^4.5.0",
"react-dropzone": "^14.3.8",
- "react-email": "^5.0.5",
- "react-hook-form": "^7.66.1",
+ "react-email": "^5.0.6",
+ "react-hook-form": "^7.68.0",
"react-hotkeys-hook": "^5.2.1",
"react-intersection-observer": "^9.16.0",
+ "react-markdown": "^10.1.0",
"react-notion-x": "^7.7.1",
"react-pdf": "^8.0.2",
"react-phone-number-input": "^3.4.14",
@@ -135,25 +141,28 @@
"react-zoom-pan-pinch": "^3.7.0",
"resend": "^6.5.2",
"sanitize-html": "^2.17.0",
- "shiki": "^3.17.0",
+ "shiki": "^3.19.0",
"sonner": "^2.0.7",
+ "streamdown": "^1.6.10",
"stripe": "^16.12.0",
"swr": "^2.3.7",
"tailwind-merge": "^2.6.0",
"tailwind-scrollbar-hide": "^2.0.0",
"tailwindcss": "^3.4.18",
"tailwindcss-animate": "^1.0.7",
+ "tokenlens": "^1.3.1",
"ts-pattern": "^5.9.0",
"tus-js-client": "^4.3.1",
"ua-parser-js": "^1.0.41",
"unsend": "^1.5.1",
"use-debounce": "^10.0.6",
+ "use-stick-to-bottom": "^1.1.1",
"vaul": "^1.1.2",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
"zod": "^3.25.76"
},
"devDependencies": {
- "@react-email/preview-server": "^5.0.5",
+ "@react-email/preview-server": "^5.0.6",
"@tailwindcss/forms": "^0.5.10",
"@trigger.dev/build": "^3.3.17",
"@trivago/prettier-plugin-sort-imports": "^6.0.0",
@@ -169,8 +178,9 @@
"@types/react-dom": "^18",
"@types/sanitize-html": "^2.13.0",
"@types/ua-parser-js": "^0.7.39",
- "prettier": "^3.7.3",
- "prettier-plugin-tailwindcss": "^0.7.1",
+ "patch-package": "^8.0.1",
+ "prettier": "^3.7.4",
+ "prettier-plugin-tailwindcss": "^0.7.2",
"prisma": "^6.5.0",
"typescript": "^5"
},
diff --git a/pages/api/links/[id]/index.ts b/pages/api/links/[id]/index.ts
index 9c4955f0..45ad6abd 100644
--- a/pages/api/links/[id]/index.ts
+++ b/pages/api/links/[id]/index.ts
@@ -135,7 +135,7 @@ export default async function handle(
});
brand = teamBrand;
}
-
+
return res.status(200).json({ linkType, brand });
}
@@ -398,6 +398,7 @@ export default async function handle(
permissionGroupId: linkData.permissionGroupId || null,
audienceType: linkData.audienceType || LinkAudienceType.GENERAL,
enableConversation: linkData.enableConversation || false,
+ enableAIAgents: linkData.enableAIAgents || false,
enableUpload: linkData.enableUpload || false,
isFileRequestOnly: linkData.isFileRequestOnly || false,
uploadFolderId: linkData.uploadFolderId || null,
diff --git a/pages/api/links/index.ts b/pages/api/links/index.ts
index 378a0c4b..f60cd483 100644
--- a/pages/api/links/index.ts
+++ b/pages/api/links/index.ts
@@ -206,6 +206,7 @@ export default async function handler(
isFileRequestOnly: linkData.isFileRequestOnly,
uploadFolderId: linkData.uploadFolderId,
}),
+ enableAIAgents: linkData.enableAIAgents || false,
showBanner: linkData.showBanner,
...(linkData.customFields && {
customFields: {
diff --git a/pages/api/teams/[teamId]/ai-settings.ts b/pages/api/teams/[teamId]/ai-settings.ts
new file mode 100644
index 00000000..35bc53c0
--- /dev/null
+++ b/pages/api/teams/[teamId]/ai-settings.ts
@@ -0,0 +1,113 @@
+import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import { getServerSession } from "next-auth/next";
+import { z } from "zod";
+
+import { errorhandler } from "@/lib/errorHandler";
+import { getFeatureFlags } from "@/lib/featureFlags";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+
+const updateAISettingsSchema = z.object({
+ agentsEnabled: z.boolean(),
+});
+
+export default async function handle(
+ req: NextApiRequest,
+ res: NextApiResponse,
+) {
+ const session = await getServerSession(req, res, authOptions);
+ if (!session) {
+ return res.status(401).end("Unauthorized");
+ }
+
+ const userId = (session.user as CustomUser).id;
+ const { teamId } = req.query as { teamId: string };
+
+ // Verify user has access to the team
+ const teamAccess = await prisma.userTeam.findUnique({
+ where: {
+ userId_teamId: {
+ userId: userId,
+ teamId: teamId,
+ },
+ },
+ select: { teamId: true, role: true },
+ });
+
+ if (!teamAccess) {
+ return res.status(401).end("Unauthorized");
+ }
+
+ // Check if AI feature is enabled for this team
+ const features = await getFeatureFlags({ teamId });
+ if (!features.ai) {
+ return res
+ .status(403)
+ .json({ error: "AI feature is not available for this team" });
+ }
+
+ if (req.method === "GET") {
+ // GET /api/teams/:teamId/ai-settings
+ try {
+ const team = await prisma.team.findUnique({
+ where: { id: teamId },
+ select: {
+ agentsEnabled: true,
+ vectorStoreId: true,
+ },
+ });
+
+ if (!team) {
+ return res.status(404).json({ error: "Team not found" });
+ }
+
+ return res.status(200).json({
+ agentsEnabled: team.agentsEnabled,
+ vectorStoreId: team.vectorStoreId,
+ });
+ } catch (error) {
+ errorhandler(error, res);
+ }
+ } else if (req.method === "PATCH") {
+ // PATCH /api/teams/:teamId/ai-settings
+ // Only admins can update AI settings
+ if (teamAccess.role !== "ADMIN") {
+ return res.status(403).json({
+ error: "Only team admins can manage AI settings",
+ });
+ }
+
+ try {
+ const validation = updateAISettingsSchema.safeParse(req.body);
+ if (!validation.success) {
+ return res.status(400).json({
+ error: "Invalid request body",
+ details: validation.error,
+ });
+ }
+
+ const { agentsEnabled } = validation.data;
+
+ const updatedTeam = await prisma.team.update({
+ where: { id: teamId },
+ data: { agentsEnabled },
+ select: {
+ agentsEnabled: true,
+ vectorStoreId: true,
+ },
+ });
+
+ return res.status(200).json({
+ agentsEnabled: updatedTeam.agentsEnabled,
+ vectorStoreId: updatedTeam.vectorStoreId,
+ });
+ } catch (error) {
+ errorhandler(error, res);
+ }
+ } else {
+ res.setHeader("Allow", ["GET", "PATCH"]);
+ return res.status(405).end(`Method ${req.method} Not Allowed`);
+ }
+}
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/index.ts b/pages/api/teams/[teamId]/datarooms/[id]/index.ts
index ae62482c..22bb0fa3 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/index.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/index.ts
@@ -28,19 +28,15 @@ export default async function handle(
const userId = (session.user as CustomUser).id;
try {
- // Check if the user is part of the team
- const team = await prisma.team.findUnique({
+ const teamAccess = await prisma.userTeam.findUnique({
where: {
- id: teamId,
- users: {
- some: {
- userId: userId,
- },
+ userId_teamId: {
+ userId: userId,
+ teamId: teamId,
},
},
});
-
- if (!team) {
+ if (!teamAccess) {
return res.status(401).end("Unauthorized");
}
@@ -119,6 +115,7 @@ export default async function handle(
allowBulkDownload,
showLastUpdated,
tags,
+ agentsEnabled,
} = req.body as {
name?: string;
enableChangeNotifications?: boolean;
@@ -126,6 +123,7 @@ export default async function handle(
allowBulkDownload?: boolean;
showLastUpdated?: boolean;
tags?: string[];
+ agentsEnabled?: boolean;
};
const featureFlags = await getFeatureFlags({ teamId: team.id });
@@ -143,6 +141,12 @@ export default async function handle(
});
}
+ if (agentsEnabled !== undefined && !featureFlags.ai) {
+ return res.status(403).json({
+ message: "This feature is not available in your plan",
+ });
+ }
+
const updatedDataroom = await prisma.$transaction(async (tx) => {
const dataroom = await tx.dataroom.update({
where: {
@@ -160,6 +164,9 @@ export default async function handle(
...(typeof showLastUpdated === "boolean" && {
showLastUpdated,
}),
+ ...(typeof agentsEnabled === "boolean" && {
+ agentsEnabled,
+ }),
},
});
diff --git a/pages/api/teams/[teamId]/documents/[id]/index.ts b/pages/api/teams/[teamId]/documents/[id]/index.ts
index fa62b17d..aa79054a 100644
--- a/pages/api/teams/[teamId]/documents/[id]/index.ts
+++ b/pages/api/teams/[teamId]/documents/[id]/index.ts
@@ -182,6 +182,67 @@ export default async function handle(
newPath: document.folder?.path,
oldPath: currentPathName,
});
+ } else if (req.method === "PATCH") {
+ // PATCH /api/teams/:teamId/documents/:id
+ // Update document settings (e.g., agentsEnabled)
+ const session = await getServerSession(req, res, authOptions);
+ if (!session) {
+ return res.status(401).json({ message: "Unauthorized" });
+ }
+
+ const { teamId, id: docId } = req.query as { teamId: string; id: string };
+ const userId = (session.user as CustomUser).id;
+
+ try {
+ // Verify user has access to the team
+ const teamAccess = await prisma.userTeam.findUnique({
+ where: {
+ userId_teamId: {
+ userId: userId,
+ teamId: teamId,
+ },
+ },
+ select: { role: true },
+ });
+
+ if (!teamAccess) {
+ return res.status(401).json({ message: "Unauthorized" });
+ }
+
+ // Extract allowed fields from request body
+ const { agentsEnabled } = req.body as {
+ agentsEnabled?: boolean;
+ };
+
+ // Build update data object with only provided fields
+ const updateData: { agentsEnabled?: boolean } = {};
+
+ if (typeof agentsEnabled === "boolean") {
+ updateData.agentsEnabled = agentsEnabled;
+ }
+
+ // Check if there's anything to update
+ if (Object.keys(updateData).length === 0) {
+ return res.status(400).json({ message: "No valid fields to update" });
+ }
+
+ // Update the document
+ const document = await prisma.document.update({
+ where: {
+ id: docId,
+ teamId: teamId,
+ },
+ data: updateData,
+ select: {
+ id: true,
+ agentsEnabled: true,
+ },
+ });
+
+ return res.status(200).json(document);
+ } catch (error) {
+ errorhandler(error, res);
+ }
} else if (req.method === "DELETE") {
// DELETE /api/teams/:teamId/document/:id
const session = await getServerSession(req, res, authOptions);
@@ -261,8 +322,8 @@ export default async function handle(
errorhandler(error, res);
}
} else {
- // We only allow GET, PUT and DELETE requests
- res.setHeader("Allow", ["GET", "PUT", "DELETE"]);
+ // We only allow GET, PUT, PATCH and DELETE requests
+ res.setHeader("Allow", ["GET", "PUT", "PATCH", "DELETE"]);
return res
.status(405)
.json({ message: `Method ${req.method} Not Allowed` });
diff --git a/pages/settings/ai.tsx b/pages/settings/ai.tsx
new file mode 100644
index 00000000..d4cbc05d
--- /dev/null
+++ b/pages/settings/ai.tsx
@@ -0,0 +1,316 @@
+import { useRouter } from "next/router";
+
+import { useEffect, useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { Bot, ExternalLink, Shield, Sparkles } from "lucide-react";
+import { useSession } from "next-auth/react";
+import { toast } from "sonner";
+import useSWR from "swr";
+
+import { useFeatureFlags } from "@/lib/hooks/use-feature-flags";
+import { useGetTeam } from "@/lib/swr/use-team";
+import { CustomUser } from "@/lib/types";
+import { fetcher } from "@/lib/utils";
+
+import AppLayout from "@/components/layouts/app";
+import { SettingsHeader } from "@/components/settings/settings-header";
+import { Badge } from "@/components/ui/badge";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import { Label } from "@/components/ui/label";
+import LoadingSpinner from "@/components/ui/loading-spinner";
+import { Switch } from "@/components/ui/switch";
+
+interface AISettings {
+ agentsEnabled: boolean;
+ vectorStoreId: string | null;
+}
+
+export default function AISettings() {
+ const router = useRouter();
+ const { data: session } = useSession();
+ const teamInfo = useTeam();
+ const teamId = teamInfo?.currentTeam?.id;
+ const { team, loading: teamLoading } = useGetTeam();
+
+ const [updating, setUpdating] = useState(false);
+
+ // Check if AI feature is enabled for this team
+ const { isFeatureEnabled, isLoading: featuresLoading } = useFeatureFlags();
+ const isAIFeatureEnabled = isFeatureEnabled("ai");
+
+ // Fetch AI settings
+ const {
+ data: aiSettings,
+ isLoading: aiSettingsLoading,
+ mutate: mutateAISettings,
+ } = useSWR<AISettings>(
+ teamId && isAIFeatureEnabled ? `/api/teams/${teamId}/ai-settings` : null,
+ fetcher,
+ );
+
+ const userId = (session?.user as CustomUser)?.id;
+
+ // Check if current user is admin
+ const isAdmin = team?.users.some(
+ (user) => user.role === "ADMIN" && user.userId === userId,
+ );
+
+ // Redirect if feature is not enabled
+ useEffect(() => {
+ if (!featuresLoading && !isAIFeatureEnabled) {
+ router.push("/settings/general");
+ toast.error("AI features are not available for your team");
+ }
+ }, [featuresLoading, isAIFeatureEnabled, router]);
+
+ const handleToggleAI = async (enabled: boolean) => {
+ if (!teamId || !isAdmin) return;
+
+ setUpdating(true);
+
+ try {
+ const response = await fetch(`/api/teams/${teamId}/ai-settings`, {
+ method: "PATCH",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify({ agentsEnabled: enabled }),
+ });
+
+ if (!response.ok) {
+ const error = await response.json();
+ throw new Error(error.error || "Failed to update AI settings");
+ }
+
+ await mutateAISettings();
+ toast.success(
+ `AI Agents ${enabled ? "enabled" : "disabled"} for your team`,
+ );
+ } catch (error) {
+ console.error("Error updating AI settings:", error);
+ toast.error((error as Error).message || "Failed to update AI settings");
+ } finally {
+ setUpdating(false);
+ }
+ };
+
+ if (featuresLoading || teamLoading) {
+ return (
+ <AppLayout>
+ <main className="relative mx-2 mb-10 mt-4 space-y-8 overflow-hidden px-1 sm:mx-3 md:mx-5 md:mt-5 lg:mx-7 lg:mt-8 xl:mx-10">
+ <SettingsHeader />
+ <div className="flex h-64 items-center justify-center">
+ <LoadingSpinner className="h-8 w-8" />
+ </div>
+ </main>
+ </AppLayout>
+ );
+ }
+
+ if (!isAIFeatureEnabled) {
+ return null;
+ }
+
+ return (
+ <AppLayout>
+ <main className="relative mx-2 mb-10 mt-4 space-y-8 overflow-hidden px-1 sm:mx-3 md:mx-5 md:mt-5 lg:mx-7 lg:mt-8 xl:mx-10">
+ <SettingsHeader />
+
+ <div className="mb-4 flex items-center justify-between md:mb-8 lg:mb-12">
+ <div className="space-y-1">
+ <div className="flex items-center gap-2">
+ <h3 className="text-2xl font-semibold tracking-tight text-foreground">
+ AI Agents
+ </h3>
+ <Badge variant="secondary" className="gap-1">
+ <Sparkles className="h-3 w-3" />
+ Beta
+ </Badge>
+ </div>
+ <p className="text-sm text-muted-foreground">
+ Configure AI-powered chat for your documents and datarooms
+ </p>
+ </div>
+ </div>
+
+ <div className="space-y-6">
+ {/* Main AI Toggle Card */}
+ <Card>
+ <CardHeader>
+ <div className="flex items-center gap-2">
+ <Bot className="h-5 w-5 text-primary" />
+ <CardTitle>Enable AI Agents</CardTitle>
+ </div>
+ <CardDescription>
+ Allow AI-powered chat on documents and datarooms in your team.
+ When enabled, you can activate AI chat on individual documents.
+ </CardDescription>
+ </CardHeader>
+
+ <CardContent className="space-y-4">
+ <div className="flex items-center justify-between space-x-2">
+ <Label htmlFor="ai-enabled" className="flex flex-col space-y-1">
+ <span>AI Agents for Team</span>
+ <span className="text-xs font-normal leading-snug text-muted-foreground">
+ {isAdmin
+ ? "Enable to allow AI chat on documents in your team"
+ : "Only team admins can change this setting"}
+ </span>
+ </Label>
+ <Switch
+ id="ai-enabled"
+ checked={aiSettings?.agentsEnabled ?? false}
+ onCheckedChange={handleToggleAI}
+ disabled={updating || aiSettingsLoading || !isAdmin}
+ />
+ </div>
+ </CardContent>
+
+ <CardFooter className="flex items-center justify-between rounded-b-lg border-t bg-muted px-6 py-3">
+ <p className="text-sm text-muted-foreground transition-colors">
+ Once enabled, you can turn on AI chat for individual documents
+ from their settings page.
+ </p>
+ </CardFooter>
+ </Card>
+
+ {/* Privacy & Data Card */}
+ <Card>
+ <CardHeader>
+ <div className="flex items-center gap-2">
+ <Shield className="h-5 w-5 text-green-600" />
+ <CardTitle>Privacy & Data Usage</CardTitle>
+ </div>
+ <CardDescription>
+ How we handle your data with AI features
+ </CardDescription>
+ </CardHeader>
+
+ <CardContent className="space-y-4">
+ <div className="space-y-3 text-sm">
+ <div className="flex items-start gap-3">
+ <div className="mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-green-100 text-green-600 dark:bg-green-900/30">
+ ✓
+ </div>
+ <div>
+ <p className="font-medium">Powered by OpenAI</p>
+ <p className="text-muted-foreground">
+ We use OpenAI&apos;s API to power AI chat features. Your
+ documents are processed to enable intelligent Q&A.
+ </p>
+ </div>
+ </div>
+
+ <div className="flex items-start gap-3">
+ <div className="mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-green-100 text-green-600 dark:bg-green-900/30">
+ ✓
+ </div>
+ <div>
+ <p className="font-medium">No Training on Your Data</p>
+ <p className="text-muted-foreground">
+ OpenAI does not use data sent through their API to train
+ their models. Your content remains private.
+ </p>
+ </div>
+ </div>
+
+ <div className="flex items-start gap-3">
+ <div className="mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-green-100 text-green-600 dark:bg-green-900/30">
+ ✓
+ </div>
+ <div>
+ <p className="font-medium">Data Retention</p>
+ <p className="text-muted-foreground">
+ Document embeddings are stored securely and can be deleted
+ at any time by disabling AI for a document.
+ </p>
+ </div>
+ </div>
+ </div>
+ </CardContent>
+
+ <CardFooter className="flex items-center justify-between rounded-b-lg border-t bg-muted px-6 py-3">
+ <a
+ href="https://openai.com/policies/api-data-usage-policies"
+ target="_blank"
+ rel="noopener noreferrer"
+ className="flex items-center gap-1 text-sm text-muted-foreground transition-colors hover:underline"
+ >
+ Learn more about OpenAI&apos;s data usage policies
+ <ExternalLink className="h-3 w-3" />
+ </a>
+ </CardFooter>
+ </Card>
+
+ {/* How it Works Card */}
+ <Card>
+ <CardHeader>
+ <CardTitle>How AI Agents Work</CardTitle>
+ <CardDescription>
+ A quick overview of the AI chat feature
+ </CardDescription>
+ </CardHeader>
+
+ <CardContent>
+ <ol className="space-y-3 text-sm">
+ <li className="flex items-start gap-3">
+ <span className="flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground">
+ 1
+ </span>
+ <div>
+ <p className="font-medium">Enable AI for your team</p>
+ <p className="text-muted-foreground">
+ Turn on the toggle above (admin only)
+ </p>
+ </div>
+ </li>
+ <li className="flex items-start gap-3">
+ <span className="flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground">
+ 2
+ </span>
+ <div>
+ <p className="font-medium">Activate AI on documents</p>
+ <p className="text-muted-foreground">
+ Go to a document&apos;s settings and enable AI Agents
+ </p>
+ </div>
+ </li>
+ <li className="flex items-start gap-3">
+ <span className="flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground">
+ 3
+ </span>
+ <div>
+ <p className="font-medium">Index your documents</p>
+ <p className="text-muted-foreground">
+ Click &quot;Index Document&quot; to prepare it for AI chat
+ </p>
+ </div>
+ </li>
+ <li className="flex items-start gap-3">
+ <span className="flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground">
+ 4
+ </span>
+ <div>
+ <p className="font-medium">Visitors can chat</p>
+ <p className="text-muted-foreground">
+ Viewers can ask questions and get AI-powered answers about
+ your document
+ </p>
+ </div>
+ </li>
+ </ol>
+ </CardContent>
+ </Card>
+ </div>
+ </main>
+ </AppLayout>
+ );
+}
diff --git a/prisma/migrations/20251208000000_add_chat_model/migration.sql b/prisma/migrations/20251208000000_add_chat_model/migration.sql
new file mode 100644
index 00000000..068d3067
--- /dev/null
+++ b/prisma/migrations/20251208000000_add_chat_model/migration.sql
@@ -0,0 +1,105 @@
+-- DropIndex
+DROP INDEX "Chat_threadId_documentId_key";
+
+-- DropIndex
+DROP INDEX "Chat_threadId_idx";
+
+-- DropIndex
+DROP INDEX "Chat_threadId_key";
+
+-- DropIndex
+DROP INDEX "Chat_userId_documentId_key";
+
+-- AlterTable
+ALTER TABLE "Chat" DROP COLUMN "threadId",
+ADD COLUMN "dataroomId" TEXT,
+ADD COLUMN "linkId" TEXT,
+ADD COLUMN "teamId" TEXT NOT NULL,
+ADD COLUMN "title" TEXT,
+ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL,
+ADD COLUMN "vectorStoreId" TEXT,
+ADD COLUMN "viewId" TEXT,
+ADD COLUMN "viewerId" TEXT,
+ALTER COLUMN "userId" DROP NOT NULL,
+ALTER COLUMN "documentId" DROP NOT NULL;
+
+-- AlterTable
+ALTER TABLE "Dataroom" ADD COLUMN "agentsEnabled" BOOLEAN NOT NULL DEFAULT false,
+ADD COLUMN "vectorStoreId" TEXT;
+
+-- AlterTable
+ALTER TABLE "DataroomDocument" ADD COLUMN "vectorStoreFileId" TEXT;
+
+-- AlterTable
+ALTER TABLE "Document" ADD COLUMN "agentsEnabled" BOOLEAN NOT NULL DEFAULT false;
+
+-- AlterTable
+ALTER TABLE "DocumentVersion" ADD COLUMN "vectorStoreFileId" TEXT;
+
+-- AlterTable
+ALTER TABLE "Link" ADD COLUMN "enableAIAgents" BOOLEAN DEFAULT false;
+
+-- AlterTable
+ALTER TABLE "Team" ADD COLUMN "agentsEnabled" BOOLEAN NOT NULL DEFAULT false,
+ADD COLUMN "vectorStoreId" TEXT;
+
+-- CreateTable
+CREATE TABLE "ChatMessage" (
+ "id" TEXT NOT NULL,
+ "chatId" TEXT NOT NULL,
+ "role" TEXT NOT NULL,
+ "content" TEXT NOT NULL,
+ "metadata" JSONB,
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
+
+ CONSTRAINT "ChatMessage_pkey" PRIMARY KEY ("id")
+);
+
+-- CreateIndex
+CREATE INDEX "ChatMessage_chatId_createdAt_idx" ON "ChatMessage"("chatId" ASC, "createdAt" ASC);
+
+-- CreateIndex
+CREATE INDEX "ChatMessage_chatId_idx" ON "ChatMessage"("chatId" ASC);
+
+-- CreateIndex
+CREATE INDEX "Chat_createdAt_idx" ON "Chat"("createdAt" DESC);
+
+-- CreateIndex
+CREATE INDEX "Chat_dataroomId_idx" ON "Chat"("dataroomId" ASC);
+
+-- CreateIndex
+CREATE INDEX "Chat_documentId_idx" ON "Chat"("documentId" ASC);
+
+-- CreateIndex
+CREATE INDEX "Chat_linkId_idx" ON "Chat"("linkId" ASC);
+
+-- CreateIndex
+CREATE INDEX "Chat_teamId_idx" ON "Chat"("teamId" ASC);
+
+-- CreateIndex
+CREATE INDEX "Chat_userId_idx" ON "Chat"("userId" ASC);
+
+-- CreateIndex
+CREATE INDEX "Chat_viewId_idx" ON "Chat"("viewId" ASC);
+
+-- CreateIndex
+CREATE INDEX "Chat_viewerId_idx" ON "Chat"("viewerId" ASC);
+
+-- AddForeignKey
+ALTER TABLE "Chat" ADD CONSTRAINT "Chat_dataroomId_fkey" FOREIGN KEY ("dataroomId") REFERENCES "Dataroom"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+
+-- AddForeignKey
+ALTER TABLE "Chat" ADD CONSTRAINT "Chat_linkId_fkey" FOREIGN KEY ("linkId") REFERENCES "Link"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+
+-- AddForeignKey
+ALTER TABLE "Chat" ADD CONSTRAINT "Chat_teamId_fkey" FOREIGN KEY ("teamId") REFERENCES "Team"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+
+-- AddForeignKey
+ALTER TABLE "Chat" ADD CONSTRAINT "Chat_viewId_fkey" FOREIGN KEY ("viewId") REFERENCES "View"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+
+-- AddForeignKey
+ALTER TABLE "Chat" ADD CONSTRAINT "Chat_viewerId_fkey" FOREIGN KEY ("viewerId") REFERENCES "Viewer"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+
+-- AddForeignKey
+ALTER TABLE "ChatMessage" ADD CONSTRAINT "ChatMessage_chatId_fkey" FOREIGN KEY ("chatId") REFERENCES "Chat"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+
diff --git a/prisma/schema/dataroom.prisma b/prisma/schema/dataroom.prisma
index 5a909828..b03b5652 100644
--- a/prisma/schema/dataroom.prisma
+++ b/prisma/schema/dataroom.prisma
@@ -22,6 +22,11 @@ model Dataroom {
// FAQ system
faqItems DataroomFaqItem[]
+ // AI agents
+ agentsEnabled Boolean @default(false) // Enable AI agents for this dataroom
+ vectorStoreId String? // OpenAI vector store ID for AI search
+ chats Chat[]
+
// upload external documents
uploadedDocuments DocumentUpload[]
@@ -64,6 +69,8 @@ model DataroomDocument {
uploadedDocuments DocumentUpload[]
+ vectorStoreFileId String? // vector store file ID for AI search
+
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
diff --git a/prisma/schema/document.prisma b/prisma/schema/document.prisma
index 8fd566bc..8dbe331c 100644
--- a/prisma/schema/document.prisma
+++ b/prisma/schema/document.prisma
@@ -14,6 +14,7 @@ model Document {
ownerId String? // This field holds the foreign key.
assistantEnabled Boolean @default(false) // This indicates if assistant is enabled for this document
advancedExcelEnabled Boolean @default(false) // This indicates if advanced Excel is enabled for this document
+ agentsEnabled Boolean @default(false) // This indicates if AI agents are enabled for this document
downloadOnly Boolean @default(false) // Indicates if the document is download only
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@ -52,11 +53,12 @@ model DocumentVersion {
fileSize BigInt? // This should be the size of the file in bytes
storageType DocumentStorageType @default(VERCEL_BLOB)
numPages Int? // This should be a reference to the number of pages in the document
- isPrimary Boolean @default(false) // Indicates if this is the primary version
- isVertical Boolean @default(false) // Indicates if the document is vertical (portrait) or not (landscape)
- fileId String? // This is the file ID of the OpenAI File API
- pages DocumentPage[]
- hasPages Boolean @default(false) // Indicates if the document has pages
+ isPrimary Boolean @default(false) // Indicates if this is the primary version
+ isVertical Boolean @default(false) // Indicates if the document is vertical (portrait) or not (landscape)
+ fileId String? // This is the file ID of the OpenAI File API
+ vectorStoreFileId String? // OpenAI vector store file ID for AI search
+ pages DocumentPage[]
+ hasPages Boolean @default(false) // Indicates if the document has pages
length Int? // This is the length of the video in seconds
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
diff --git a/prisma/schema/link.prisma b/prisma/schema/link.prisma
index 3d85b4f2..cb956330 100644
--- a/prisma/schema/link.prisma
+++ b/prisma/schema/link.prisma
@@ -73,6 +73,10 @@ model Link {
// FAQ system
dataroomFaqItems DataroomFaqItem[]
+ // AI chats
+ enableAIAgents Boolean? @default(false) // Enable AI agents for this link
+ chats Chat[]
+
// upload
enableUpload Boolean? @default(false) // Optional give user a option to enable the upload document function
isFileRequestOnly Boolean? @default(false) // Optional give user a option to enable the file request only
diff --git a/prisma/schema/schema.prisma b/prisma/schema/schema.prisma
index 21091ee3..176c018c 100644
--- a/prisma/schema/schema.prisma
+++ b/prisma/schema/schema.prisma
@@ -145,6 +145,9 @@ model View {
uploadedDocuments DocumentUpload[] // uploaded documents by this view
+ // AI chats
+ chats Chat[]
+
teamId String?
team Team? @relation(fields: [teamId], references: [id], onDelete: Cascade)
@@ -193,6 +196,9 @@ model Viewer {
uploadedDocuments DocumentUpload[] // uploaded documents by this viewer
+ // AI chats
+ chats Chat[]
+
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@ -246,18 +252,66 @@ model SentEmail {
}
model Chat {
- id String @id @default(cuid())
- threadId String @unique // This is the thread ID from OpenAI Assistant API
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
- userId String
- document Document @relation(fields: [documentId], references: [id], onDelete: Cascade)
- documentId String
+ id String @id @default(cuid())
+ title String? // Generated title from first message
+
+ // Context associations
+ teamId String
+ team Team @relation(fields: [teamId], references: [id], onDelete: Cascade)
+
+ documentId String?
+ document Document? @relation(fields: [documentId], references: [id], onDelete: Cascade)
+
+ dataroomId String?
+ dataroom Dataroom? @relation(fields: [dataroomId], references: [id], onDelete: Cascade)
+
+ linkId String?
+ link Link? @relation(fields: [linkId], references: [id], onDelete: Cascade)
+
+ viewId String?
+ view View? @relation(fields: [viewId], references: [id], onDelete: Cascade)
+
+ // User associations (internal or external)
+ userId String?
+ user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
+
+ viewerId String?
+ viewer Viewer? @relation(fields: [viewerId], references: [id], onDelete: Cascade)
+
+ // OpenAI references
+ vectorStoreId String? // The vector store used for this chat
+
+ messages ChatMessage[]
+
createdAt DateTime @default(now())
- lastMessageAt DateTime? // This is the last time a message was sent in the thread
+ updatedAt DateTime @updatedAt
+ lastMessageAt DateTime? // Track latest activity
+
+ @@index([teamId])
+ @@index([documentId])
+ @@index([dataroomId])
+ @@index([linkId])
+ @@index([userId])
+ @@index([viewerId])
+ @@index([viewId])
+ @@index([createdAt(sort: Desc)])
+}
+
+model ChatMessage {
+ id String @id @default(cuid())
+ chatId String
+ chat Chat @relation(fields: [chatId], references: [id], onDelete: Cascade)
+
+ role String // "user" | "assistant" | "system"
+ content String @db.Text
+
+ // Optional structured data
+ metadata Json? // Store sources, page numbers, confidence scores, etc.
+
+ createdAt DateTime @default(now())
- @@unique([userId, documentId])
- @@unique([threadId, documentId])
- @@index([threadId])
+ @@index([chatId])
+ @@index([chatId, createdAt])
}
model Feedback {
diff --git a/prisma/schema/team.prisma b/prisma/schema/team.prisma
index b688020d..34e0d78f 100644
--- a/prisma/schema/team.prisma
+++ b/prisma/schema/team.prisma
@@ -46,6 +46,11 @@ model Team {
enableExcelAdvancedMode Boolean @default(false) // Enable Excel advanced mode for all documents in the team
replicateDataroomFolders Boolean @default(true) // Replicate dataroom folder structure in "All Documents"
+ // AI agents
+ agentsEnabled Boolean @default(false) // Enable AI agents for the team
+ vectorStoreId String? // OpenAI vector store ID for team-level document search
+ chats Chat[]
+
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt