diff --git a/copilot-widget/index.html b/copilot-widget/index.html index 33106773b..14e0b445a 100644 --- a/copilot-widget/index.html +++ b/copilot-widget/index.html @@ -28,6 +28,15 @@ user: { name: "John Doe", }, + containerProps: { + style: { + position: "fixed", + height: "100%", + bottom: "0", + right: "0", + width: "400px", + }, + }, }); }; diff --git a/copilot-widget/lib/CopilotWidget.tsx b/copilot-widget/lib/CopilotWidget.tsx index ee199e3d3..bd3f4d393 100644 --- a/copilot-widget/lib/CopilotWidget.tsx +++ b/copilot-widget/lib/CopilotWidget.tsx @@ -3,8 +3,6 @@ import { useWidgetStateContext } from "./contexts/WidgetState"; import cn from "./utils/cn"; import ChatScreenWithSfxs from "./screens/ChatScreen"; import { IS_SERVER } from "./utils/is_server"; -import root from 'react-shadow'; -import css from '../styles/index.css?inline'; function useTrigger(selector: string, toggle: () => void) { const trigger = useRef( @@ -24,32 +22,26 @@ function useTrigger(selector: string, toggle: () => void) { export function CopilotWidget({ triggerSelector, - className, }: { triggerSelector: string; - className?: string; }) { const [open, toggle] = useWidgetStateContext(); useTrigger(triggerSelector, toggle) return ( - -
- -
- -
+
+ +
); } diff --git a/copilot-widget/lib/Root.tsx b/copilot-widget/lib/Root.tsx index f13247a75..963c8b516 100644 --- a/copilot-widget/lib/Root.tsx +++ b/copilot-widget/lib/Root.tsx @@ -5,16 +5,24 @@ import ConfigDataProvider, { import WidgetState from "./contexts/WidgetState"; import { AxiosProvider } from "./contexts/axiosInstance"; import { InitialDataProvider } from "./contexts/InitialDataContext"; +import root from 'react-shadow'; +import css from '../styles/index.css?inline'; function Root({ children, options, + containerProps, }: { children: React.ReactNode; options: ConfigDataContextType; + containerProps?: React.DetailedHTMLProps< + React.HTMLAttributes, + HTMLDivElement + >; }) { + const { style, id, ...containerProp } = containerProps || {} return ( - + @@ -22,7 +30,10 @@ function Root({ - + + ); } diff --git a/copilot-widget/lib/types/options.ts b/copilot-widget/lib/types/options.ts index 53161697e..f3cde4235 100644 --- a/copilot-widget/lib/types/options.ts +++ b/copilot-widget/lib/types/options.ts @@ -5,6 +5,10 @@ export type Options = { triggerSelector: string; apiUrl: string; defaultOpen?: boolean; + containerProps?: React.DetailedHTMLProps< + React.HTMLAttributes, + HTMLDivElement + >; user?: { name?: string; }; diff --git a/copilot-widget/package.json b/copilot-widget/package.json index 9b56c94c1..b13958980 100644 --- a/copilot-widget/package.json +++ b/copilot-widget/package.json @@ -1,7 +1,7 @@ { "name": "@openchatai/copilot-widget", "private": false, - "version": "1.6.1", + "version": "1.7.0", "type": "module", "scripts": { "dev": "vite", diff --git a/copilot-widget/src/main.tsx b/copilot-widget/src/main.tsx index 2700c1857..6af505cf0 100644 --- a/copilot-widget/src/main.tsx +++ b/copilot-widget/src/main.tsx @@ -9,7 +9,7 @@ declare global { } } -function initAiCoPilot({ triggerSelector, ...options }: Options) { +function initAiCoPilot({ triggerSelector, containerProps, ...options }: Options) { const container = document.createElement("div") as HTMLDivElement; container.id = "opencopilot-aicopilot"; document.body.appendChild(container); @@ -18,6 +18,7 @@ function initAiCoPilot({ triggerSelector, ...options }: Options) { options={{ ...options, }} + containerProps={containerProps} > diff --git a/copilot-widget/vite.lib.config.ts b/copilot-widget/vite.lib.config.ts index 6f28426b0..9e7b15a15 100644 --- a/copilot-widget/vite.lib.config.ts +++ b/copilot-widget/vite.lib.config.ts @@ -6,7 +6,6 @@ import tsconfigPaths from "vite-tsconfig-paths"; export default defineConfig({ plugins: [react(), dts({ - outDir: './dist/', entryRoot: './lib/', strictOutput: true, insertTypesEntry: true, diff --git a/dashboard/app/(copilot)/copilot/[copilot_id]/workflow/[workflow_id]/layout.tsx b/dashboard/app/(copilot)/copilot/[copilot_id]/(workflow)/workflow/[workflow_id]/layout.tsx similarity index 97% rename from dashboard/app/(copilot)/copilot/[copilot_id]/workflow/[workflow_id]/layout.tsx rename to dashboard/app/(copilot)/copilot/[copilot_id]/(workflow)/workflow/[workflow_id]/layout.tsx index 433d765a1..4035bf9da 100644 --- a/dashboard/app/(copilot)/copilot/[copilot_id]/workflow/[workflow_id]/layout.tsx +++ b/dashboard/app/(copilot)/copilot/[copilot_id]/(workflow)/workflow/[workflow_id]/layout.tsx @@ -6,10 +6,10 @@ import React from 'react' import { useAsyncFn } from 'react-use' import { syncWorkflowById as $syncWorkflowById, getFlowById } from '@/data/new_flows' import { toast } from '@/components/ui/use-toast'; -import { useCopilot } from '../../../_context/CopilotProvider' import useSWR from 'swr' import { getActionsByBotId } from '@/data/actions' import _, { uniqueId } from 'lodash' +import { useCopilot } from '@/app/(copilot)/copilot/_context/CopilotProvider' type Props = { children: React.ReactNode; diff --git a/dashboard/app/(copilot)/copilot/[copilot_id]/workflow/[workflow_id]/page.tsx b/dashboard/app/(copilot)/copilot/[copilot_id]/(workflow)/workflow/[workflow_id]/page.tsx similarity index 100% rename from dashboard/app/(copilot)/copilot/[copilot_id]/workflow/[workflow_id]/page.tsx rename to dashboard/app/(copilot)/copilot/[copilot_id]/(workflow)/workflow/[workflow_id]/page.tsx diff --git a/dashboard/app/(copilot)/copilot/[copilot_id]/workflow/_parts/CreateWorkflowForm.tsx b/dashboard/app/(copilot)/copilot/[copilot_id]/(workflow)/workflow/_parts/CreateWorkflowForm.tsx similarity index 98% rename from dashboard/app/(copilot)/copilot/[copilot_id]/workflow/_parts/CreateWorkflowForm.tsx rename to dashboard/app/(copilot)/copilot/[copilot_id]/(workflow)/workflow/_parts/CreateWorkflowForm.tsx index 3d67870e1..7ae804845 100644 --- a/dashboard/app/(copilot)/copilot/[copilot_id]/workflow/_parts/CreateWorkflowForm.tsx +++ b/dashboard/app/(copilot)/copilot/[copilot_id]/(workflow)/workflow/_parts/CreateWorkflowForm.tsx @@ -18,11 +18,11 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { Input } from "@/components/ui/input"; import { Textarea } from "@/components/ui/textarea"; import { createFlowByBotId } from "@/data/new_flows"; -import { useCopilot } from "../../../_context/CopilotProvider"; import { useAsyncFn } from "react-use"; import { toast } from "@/components/ui/use-toast"; import { atom, useAtom } from "jotai"; import { useRouter } from "@/lib/router-events"; +import { useCopilot } from "@/app/(copilot)/copilot/_context/CopilotProvider"; const formSchema = z.object({ name: z.string().min(2, { diff --git a/dashboard/app/(copilot)/copilot/[copilot_id]/workflow/_parts/WorkflowsTable.tsx b/dashboard/app/(copilot)/copilot/[copilot_id]/(workflow)/workflow/_parts/WorkflowsTable.tsx similarity index 95% rename from dashboard/app/(copilot)/copilot/[copilot_id]/workflow/_parts/WorkflowsTable.tsx rename to dashboard/app/(copilot)/copilot/[copilot_id]/(workflow)/workflow/_parts/WorkflowsTable.tsx index 1b0e50b30..7399be19e 100644 --- a/dashboard/app/(copilot)/copilot/[copilot_id]/workflow/_parts/WorkflowsTable.tsx +++ b/dashboard/app/(copilot)/copilot/[copilot_id]/(workflow)/workflow/_parts/WorkflowsTable.tsx @@ -3,12 +3,11 @@ import React from 'react' import { Button } from '@/components/ui/button' import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table' import { Link } from '@/lib/router-events' -import { useCopilot } from '../../../_context/CopilotProvider'; import useSWR, { mutate } from 'swr'; import { getFlowsByBotId } from '@/data/new_flows'; -import { format } from 'timeago.js'; import _ from 'lodash'; import { EmptyBlock } from '@/components/domain/EmptyBlock'; +import { useCopilot } from '@/app/(copilot)/copilot/_context/CopilotProvider'; export const revalidateWorkflows = (copilot_id: string) => mutate(copilot_id + '/workflows') function WorkflowsTable() { diff --git a/dashboard/app/(copilot)/copilot/[copilot_id]/workflow/page.tsx b/dashboard/app/(copilot)/copilot/[copilot_id]/(workflow)/workflow/page.tsx similarity index 100% rename from dashboard/app/(copilot)/copilot/[copilot_id]/workflow/page.tsx rename to dashboard/app/(copilot)/copilot/[copilot_id]/(workflow)/workflow/page.tsx diff --git a/dashboard/app/(copilot)/copilot/[copilot_id]/CopilotWidget.tsx b/dashboard/app/(copilot)/copilot/[copilot_id]/CopilotWidget.tsx index dd144bb4b..9a4a94106 100644 --- a/dashboard/app/(copilot)/copilot/[copilot_id]/CopilotWidget.tsx +++ b/dashboard/app/(copilot)/copilot/[copilot_id]/CopilotWidget.tsx @@ -30,7 +30,7 @@ export default function Widget({ }, }} > - + } \ No newline at end of file diff --git a/dashboard/app/(copilot)/copilot/[copilot_id]/layout.tsx b/dashboard/app/(copilot)/copilot/[copilot_id]/layout.tsx index 4a08ed6f9..2a87cb6a9 100644 --- a/dashboard/app/(copilot)/copilot/[copilot_id]/layout.tsx +++ b/dashboard/app/(copilot)/copilot/[copilot_id]/layout.tsx @@ -55,6 +55,7 @@ export default function CopilotLayout({ children, params }: Props) { -
+
diff --git a/dashboard/app/(main)/_parts/CopilotsContainer.tsx b/dashboard/app/(main)/_parts/CopilotsContainer.tsx index 9c9671bbd..a5d5f8707 100644 --- a/dashboard/app/(main)/_parts/CopilotsContainer.tsx +++ b/dashboard/app/(main)/_parts/CopilotsContainer.tsx @@ -1,6 +1,6 @@ "use client"; import React from "react"; -import { BotIcon, GalleryHorizontalEnd, Terminal } from "lucide-react"; +import { GalleryHorizontalEnd } from "lucide-react"; import { Link } from "@/lib/router-events"; import useSwr from "swr"; import { CopilotType, listCopilots } from "@/data/copilot"; @@ -12,7 +12,6 @@ import { filterAtom } from "./Search"; import { useAtomValue } from "jotai"; import { Button } from "@/components/ui/button"; import { format } from "timeago.js"; -import { Tooltip } from "@/components/domain/Tooltip"; import { motion, AnimatePresence } from 'framer-motion'; function customSort(list: CopilotType[], sortBy: Filter["sort"]) { @@ -61,7 +60,7 @@ export function CopilotsContainer() { )} ) : ( -
+
{$copilots?.map((copilot, index) => { const copilotUrl = "/copilot/" + copilot.id; return ( @@ -79,12 +78,12 @@ export function CopilotsContainer() { opacity: 0, y: 50, filter: "blur(10px)" }} - transition={{ duration: 0.2, delay: 0.01 * index }} - className="group" + transition={{ duration: 0.2, delay: 0.1 * index }} + className="group col-span-full lg:col-span-6 xl:col-span-3" > -
-
- +
+
+
diff --git a/dashboard/components/domain/new-flows-editor/ActionsList.tsx b/dashboard/components/domain/new-flows-editor/ActionsList.tsx index 8ae630661..578c87438 100644 --- a/dashboard/components/domain/new-flows-editor/ActionsList.tsx +++ b/dashboard/components/domain/new-flows-editor/ActionsList.tsx @@ -79,7 +79,7 @@ function DropableAsideAction({ action, index }: { action: ActionResponseType, in } export const ASIDE_DROPABLE_ID = "BASE-ACTIONS"; -export function ActionsList() { +export function ActionsList({ disabled }: { disabled?: boolean }) { const { state: { actions } } = useController(); return ( @@ -88,7 +88,7 @@ export function ActionsList() { No actions found
you can create a new one from above or
drag and drop a swagger file here.

- : + : { (provided) => { return
diff --git a/dashboard/components/domain/new-flows-editor/MagicAction.tsx b/dashboard/components/domain/new-flows-editor/MagicAction.tsx index 948b7c61b..24673a2d0 100644 --- a/dashboard/components/domain/new-flows-editor/MagicAction.tsx +++ b/dashboard/components/domain/new-flows-editor/MagicAction.tsx @@ -1,6 +1,6 @@ import React from 'react' import { - AlertDialog, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, + AlertDialog, AlertDialogContent, AlertDialogTitle, AlertDialogCancel, AlertDialogFooter, AlertDialogHeader, AlertDialogTrigger } from '@/components/ui/alert-dialog'; import { Button } from '@/components/ui/button'; @@ -55,7 +55,8 @@ export function MagicAction({ defaultValue }: { defaultValue?: string }) { @@ -65,7 +66,6 @@ export function MagicAction({ defaultValue }: { defaultValue?: string }) { Describe your flow - { connectingNodeParams.current = null; } - + return (
@@ -158,23 +158,23 @@ export function FlowRenderer() {
- +
{ - isBlocksEmpty &&
-
-

- Start building your flow actions/steps: + isBlocksEmpty &&

+
+

+ Start building your flow actions/steps

-
+
- /or/ + /OR/
diff --git a/dashboard/package.json b/dashboard/package.json index 98126ed07..c6bc1d113 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -59,6 +59,7 @@ "react-use": "^17.4.0", "react-use-wizard": "^2.2.3", "reactflow": "^11.10.1", + "sharp": "^0.33.1", "swr": "^2.2.4", "tailwind-merge": "^1.14.0", "tailwindcss-animate": "^1.0.7", @@ -80,7 +81,7 @@ "prettier": "^3.0.3", "prettier-plugin-tailwindcss": "^0.5.5", "react-debounce-input": "^3.3.0", - "tailwindcss": "^3", + "tailwindcss": "^3.4.0", "tailwindcss-debug-screens": "^2.2.1", "typescript": "^5" } diff --git a/dashboard/pnpm-lock.yaml b/dashboard/pnpm-lock.yaml index bf5147b57..5f8d7e06e 100644 --- a/dashboard/pnpm-lock.yaml +++ b/dashboard/pnpm-lock.yaml @@ -149,6 +149,9 @@ dependencies: reactflow: specifier: ^11.10.1 version: 11.10.1(@types/react@18.2.28)(immer@10.0.3)(react-dom@18.2.0)(react@18.2.0) + sharp: + specifier: ^0.33.1 + version: 0.33.1 swr: specifier: ^2.2.4 version: 2.2.4(react@18.2.0) @@ -157,7 +160,7 @@ dependencies: version: 1.14.0 tailwindcss-animate: specifier: ^1.0.7 - version: 1.0.7(tailwindcss@3.3.3) + version: 1.0.7(tailwindcss@3.4.0) timeago.js: specifier: ^4.0.2 version: 4.0.2 @@ -209,11 +212,11 @@ devDependencies: specifier: ^3.3.0 version: 3.3.0(react@18.2.0) tailwindcss: - specifier: ^3 - version: 3.3.3 + specifier: ^3.4.0 + version: 3.4.0 tailwindcss-debug-screens: specifier: ^2.2.1 - version: 2.2.1(tailwindcss@3.3.3) + version: 2.2.1(tailwindcss@3.4.0) typescript: specifier: ^5 version: 5.2.2 @@ -235,6 +238,14 @@ packages: dependencies: regenerator-runtime: 0.14.0 + /@emnapi/runtime@0.44.0: + resolution: {integrity: sha512-ZX/etZEZw8DR7zAB1eVQT40lNo0jeqpb6dCgOvctB6FIQ5PoXfMuNY8+ayQfu8tNQbAB8gQWSSJupR8NxeiZXw==} + requiresBuild: true + dependencies: + tslib: 2.6.2 + dev: false + optional: true + /@emotion/is-prop-valid@0.8.8: resolution: {integrity: sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==} requiresBuild: true @@ -342,6 +353,194 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true + /@img/sharp-darwin-arm64@0.33.1: + resolution: {integrity: sha512-esr2BZ1x0bo+wl7Gx2hjssYhjrhUsD88VQulI0FrG8/otRQUOxLWHMBd1Y1qo2Gfg2KUvXNpT0ASnV9BzJCexw==} + engines: {glibc: '>=2.26', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.0.0 + dev: false + optional: true + + /@img/sharp-darwin-x64@0.33.1: + resolution: {integrity: sha512-YrnuB3bXuWdG+hJlXtq7C73lF8ampkhU3tMxg5Hh+E7ikxbUVOU9nlNtVTloDXz6pRHt2y2oKJq7DY/yt+UXYw==} + engines: {glibc: '>=2.26', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [x64] + os: [darwin] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.0.0 + dev: false + optional: true + + /@img/sharp-libvips-darwin-arm64@1.0.0: + resolution: {integrity: sha512-VzYd6OwnUR81sInf3alj1wiokY50DjsHz5bvfnsFpxs5tqQxESoHtJO6xyksDs3RIkyhMWq2FufXo6GNSU9BMw==} + engines: {macos: '>=11', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-darwin-x64@1.0.0: + resolution: {integrity: sha512-dD9OznTlHD6aovRswaPNEy8dKtSAmNo4++tO7uuR4o5VxbVAOoEQ1uSmN4iFAdQneTHws1lkTZeiXPrcCkh6IA==} + engines: {macos: '>=10.13', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-linux-arm64@1.0.0: + resolution: {integrity: sha512-xTYThiqEZEZc0PRU90yVtM3KE7lw1bKdnDQ9kCTHWbqWyHOe4NpPOtMGy27YnN51q0J5dqRrvicfPbALIOeAZA==} + engines: {glibc: '>=2.26', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-linux-arm@1.0.0: + resolution: {integrity: sha512-VwgD2eEikDJUk09Mn9Dzi1OW2OJFRQK+XlBTkUNmAWPrtj8Ly0yq05DFgu1VCMx2/DqCGQVi5A1dM9hTmxf3uw==} + engines: {glibc: '>=2.28', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-linux-s390x@1.0.0: + resolution: {integrity: sha512-o9E46WWBC6JsBlwU4QyU9578G77HBDT1NInd+aERfxeOPbk0qBZHgoDsQmA2v9TbqJRWzoBPx1aLOhprBMgPjw==} + engines: {glibc: '>=2.28', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-linux-x64@1.0.0: + resolution: {integrity: sha512-naldaJy4hSVhWBgEjfdBY85CAa4UO+W1nx6a1sWStHZ7EUfNiuBTTN2KUYT5dH1+p/xij1t2QSXfCiFJoC5S/Q==} + engines: {glibc: '>=2.26', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-linuxmusl-arm64@1.0.0: + resolution: {integrity: sha512-OdorplCyvmSAPsoJLldtLh3nLxRrkAAAOHsGWGDYfN0kh730gifK+UZb3dWORRa6EusNqCTjfXV4GxvgJ/nPDQ==} + engines: {musl: '>=1.2.2', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-linuxmusl-x64@1.0.0: + resolution: {integrity: sha512-FW8iK6rJrg+X2jKD0Ajhjv6y74lToIBEvkZhl42nZt563FfxkCYacrXZtd+q/sRQDypQLzY5WdLkVTbJoPyqNg==} + engines: {musl: '>=1.2.2', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@img/sharp-linux-arm64@0.33.1: + resolution: {integrity: sha512-59B5GRO2d5N3tIfeGHAbJps7cLpuWEQv/8ySd9109ohQ3kzyCACENkFVAnGPX00HwPTQcaBNF7HQYEfZyZUFfw==} + engines: {glibc: '>=2.26', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [arm64] + os: [linux] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.0.0 + dev: false + optional: true + + /@img/sharp-linux-arm@0.33.1: + resolution: {integrity: sha512-Ii4X1vnzzI4j0+cucsrYA5ctrzU9ciXERfJR633S2r39CiD8npqH2GMj63uFZRCFt3E687IenAdbwIpQOJ5BNA==} + engines: {glibc: '>=2.28', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [arm] + os: [linux] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.0.0 + dev: false + optional: true + + /@img/sharp-linux-s390x@0.33.1: + resolution: {integrity: sha512-tRGrb2pHnFUXpOAj84orYNxHADBDIr0J7rrjwQrTNMQMWA4zy3StKmMvwsI7u3dEZcgwuMMooIIGWEWOjnmG8A==} + engines: {glibc: '>=2.28', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [s390x] + os: [linux] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.0.0 + dev: false + optional: true + + /@img/sharp-linux-x64@0.33.1: + resolution: {integrity: sha512-4y8osC0cAc1TRpy02yn5omBeloZZwS62fPZ0WUAYQiLhSFSpWJfY/gMrzKzLcHB9ulUV6ExFiu2elMaixKDbeg==} + engines: {glibc: '>=2.26', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [x64] + os: [linux] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.0.0 + dev: false + optional: true + + /@img/sharp-linuxmusl-arm64@0.33.1: + resolution: {integrity: sha512-D3lV6clkqIKUizNS8K6pkuCKNGmWoKlBGh5p0sLO2jQERzbakhu4bVX1Gz+RS4vTZBprKlWaf+/Rdp3ni2jLfA==} + engines: {musl: '>=1.2.2', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [arm64] + os: [linux] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.0.0 + dev: false + optional: true + + /@img/sharp-linuxmusl-x64@0.33.1: + resolution: {integrity: sha512-LOGKNu5w8uu1evVqUAUKTix2sQu1XDRIYbsi5Q0c/SrXhvJ4QyOx+GaajxmOg5PZSsSnCYPSmhjHHsRBx06/wQ==} + engines: {musl: '>=1.2.2', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [x64] + os: [linux] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.0.0 + dev: false + optional: true + + /@img/sharp-wasm32@0.33.1: + resolution: {integrity: sha512-vWI/sA+0p+92DLkpAMb5T6I8dg4z2vzCUnp8yvxHlwBpzN8CIcO3xlSXrLltSvK6iMsVMNswAv+ub77rsf25lA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [wasm32] + requiresBuild: true + dependencies: + '@emnapi/runtime': 0.44.0 + dev: false + optional: true + + /@img/sharp-win32-ia32@0.33.1: + resolution: {integrity: sha512-/xhYkylsKL05R+NXGJc9xr2Tuw6WIVl2lubFJaFYfW4/MQ4J+dgjIo/T4qjNRizrqs/szF/lC9a5+updmY9jaQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@img/sharp-win32-x64@0.33.1: + resolution: {integrity: sha512-XaM69X0n6kTEsp9tVYYLhXdg7Qj32vYJlAKRutxUsm1UlgQNx6BOhHwZPwukCGXBU2+tH87ip2eV1I/E8MQnZg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /@jridgewell/gen-mapping@0.3.3: resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} engines: {node: '>=6.0.0'} @@ -2501,11 +2700,24 @@ packages: engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 - dev: true /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true + + /color-string@1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + dependencies: + color-name: 1.1.4 + simple-swizzle: 0.2.2 + dev: false + + /color@4.2.3: + resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} + engines: {node: '>=12.5.0'} + dependencies: + color-convert: 2.0.1 + color-string: 1.9.1 + dev: false /combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} @@ -2704,6 +2916,11 @@ packages: engines: {node: '>=6'} dev: true + /detect-libc@2.0.2: + resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} + engines: {node: '>=8'} + dev: false + /detect-node-es@1.1.0: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} dev: false @@ -3545,6 +3762,10 @@ packages: is-typed-array: 1.1.12 dev: true + /is-arrayish@0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + dev: false + /is-async-function@2.0.0: resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} engines: {node: '>= 0.4'} @@ -3850,7 +4071,6 @@ packages: engines: {node: '>=10'} dependencies: yallist: 4.0.0 - dev: true /lucide-react@0.294.0(react@18.2.0): resolution: {integrity: sha512-V7o0/VECSGbLHn3/1O67FUgBwWB+hmzshrgDVRJQhMh8uj5D3HBuIvhuAmQTtlupILSplwIZg5FTc4tTKMA2SA==} @@ -4758,7 +4978,6 @@ packages: hasBin: true dependencies: lru-cache: 6.0.0 - dev: true /set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} @@ -4774,6 +4993,36 @@ packages: engines: {node: '>=6.9'} dev: false + /sharp@0.33.1: + resolution: {integrity: sha512-iAYUnOdTqqZDb3QjMneBKINTllCJDZ3em6WaWy7NPECM4aHncvqHRm0v0bN9nqJxMiwamv5KIdauJ6lUzKDpTQ==} + engines: {libvips: '>=8.15.0', node: ^18.17.0 || ^20.3.0 || >=21.0.0} + requiresBuild: true + dependencies: + color: 4.2.3 + detect-libc: 2.0.2 + semver: 7.5.4 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.33.1 + '@img/sharp-darwin-x64': 0.33.1 + '@img/sharp-libvips-darwin-arm64': 1.0.0 + '@img/sharp-libvips-darwin-x64': 1.0.0 + '@img/sharp-libvips-linux-arm': 1.0.0 + '@img/sharp-libvips-linux-arm64': 1.0.0 + '@img/sharp-libvips-linux-s390x': 1.0.0 + '@img/sharp-libvips-linux-x64': 1.0.0 + '@img/sharp-libvips-linuxmusl-arm64': 1.0.0 + '@img/sharp-libvips-linuxmusl-x64': 1.0.0 + '@img/sharp-linux-arm': 0.33.1 + '@img/sharp-linux-arm64': 0.33.1 + '@img/sharp-linux-s390x': 0.33.1 + '@img/sharp-linux-x64': 0.33.1 + '@img/sharp-linuxmusl-arm64': 0.33.1 + '@img/sharp-linuxmusl-x64': 0.33.1 + '@img/sharp-wasm32': 0.33.1 + '@img/sharp-win32-ia32': 0.33.1 + '@img/sharp-win32-x64': 0.33.1 + dev: false + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -4794,6 +5043,12 @@ packages: object-inspect: 1.12.3 dev: true + /simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + dependencies: + is-arrayish: 0.3.2 + dev: false + /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -4962,24 +5217,24 @@ packages: resolution: {integrity: sha512-3mFKyCo/MBcgyOTlrY8T7odzZFx+w+qKSMAmdFzRvqBfLlSigU6TZnlFHK0lkMwj9Bj8OYU+9yW9lmGuS0QEnQ==} dev: false - /tailwindcss-animate@1.0.7(tailwindcss@3.3.3): + /tailwindcss-animate@1.0.7(tailwindcss@3.4.0): resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==} peerDependencies: tailwindcss: '>=3.0.0 || insiders' dependencies: - tailwindcss: 3.3.3 + tailwindcss: 3.4.0 dev: false - /tailwindcss-debug-screens@2.2.1(tailwindcss@3.3.3): + /tailwindcss-debug-screens@2.2.1(tailwindcss@3.4.0): resolution: {integrity: sha512-EMyA0CYBzqcZJHtVDvBfmYzfx3NxuK4qDyVO5wnzcGOrmJsv25D9xPpWefVTORTvhE6pCh90Z1WYnLUKsg3yMw==} peerDependencies: tailwindcss: ^1.0 || ^2.0 || ^3.0.0-alpha.1 || ^3.0 dependencies: - tailwindcss: 3.3.3 + tailwindcss: 3.4.0 dev: true - /tailwindcss@3.3.3: - resolution: {integrity: sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==} + /tailwindcss@3.4.0: + resolution: {integrity: sha512-VigzymniH77knD1dryXbyxR+ePHihHociZbXnLZHUyzf2MMs2ZVqlUrZ3FvpXP8pno9JzmILt1sZPD19M3IxtA==} engines: {node: '>=14.0.0'} hasBin: true dependencies: @@ -5329,7 +5584,6 @@ packages: /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - dev: true /yaml@2.3.3: resolution: {integrity: sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==} diff --git a/dashboard/public/pilot.js b/dashboard/public/pilot.js index 3b4ad204a..0fd613279 100644 --- a/dashboard/public/pilot.js +++ b/dashboard/public/pilot.js @@ -6,7 +6,7 @@ function FS(e,t){for(var n=0;n/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Cc(e,t,n,r,o){if(D.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!D.isString(t)){if(D.isString(r))return t.indexOf(r)!==-1;if(D.isRegExp(r))return r.test(t)}}function l$(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function a$(e,t){const n=D.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,l){return this[r].call(this,t,o,i,l)},configurable:!0})})}class pu{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(a,s,u){const c=$i(s);if(!c)throw new Error("header name must be a non-empty string");const p=D.findKey(o,c);(!p||o[p]===void 0||u===!0||u===void 0&&o[p]!==!1)&&(o[p||s]=Ia(a))}const l=(a,s)=>D.forEach(a,(u,c)=>i(u,c,s));return D.isPlainObject(t)||t instanceof this.constructor?l(t,n):D.isString(t)&&(t=t.trim())&&!i$(t)?l(r$(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=$i(t),t){const r=D.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return o$(o);if(D.isFunction(n))return n.call(this,o,r);if(D.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=$i(t),t){const r=D.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Cc(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(l){if(l=$i(l),l){const a=D.findKey(r,l);a&&(!n||Cc(r,r[a],a,n))&&(delete r[a],o=!0)}}return D.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Cc(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return D.forEach(this,(o,i)=>{const l=D.findKey(r,i);if(l){n[l]=Ia(o),delete n[i];return}const a=t?l$(i):String(i).trim();a!==i&&delete n[i],n[a]=Ia(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return D.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&D.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[rg]=this[rg]={accessors:{}}).accessors,o=this.prototype;function i(l){const a=$i(l);r[a]||(a$(o,l),r[a]=!0)}return D.isArray(t)?t.forEach(i):i(t),this}}pu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(pu.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});D.freezeMethods(pu);const Qn=pu;function Ec(e,t){const n=this||Md,r=t||n,o=Qn.from(r.headers);let i=r.data;return D.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function lx(e){return!!(e&&e.__CANCEL__)}function Dl(e,t,n){ve.call(this,e??"canceled",ve.ERR_CANCELED,t,n),this.name="CanceledError"}D.inherits(Dl,ve,{__CANCEL__:!0});function s$(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ve("Request failed with status code "+n.status,[ve.ERR_BAD_REQUEST,ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const u$=_n.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,l,a){const s=[];s.push(n+"="+encodeURIComponent(r)),D.isNumber(o)&&s.push("expires="+new Date(o).toGMTString()),D.isString(i)&&s.push("path="+i),D.isString(l)&&s.push("domain="+l),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function c$(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function p$(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function ax(e,t){return e&&!c$(t)?p$(e,t):t}const f$=_n.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let l=i;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(l){const a=D.isString(l)?o(l):l;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function d$(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function h$(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,l;return t=t!==void 0?t:1e3,function(s){const u=Date.now(),c=r[i];l||(l=u),n[o]=s,r[o]=u;let p=i,d=0;for(;p!==o;)d+=n[p++],p=p%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-l{const i=o.loaded,l=o.lengthComputable?o.total:void 0,a=i-n,s=r(a),u=i<=l;n=i;const c={loaded:i,total:l,progress:l?i/l:void 0,bytes:a,rate:s||void 0,estimated:s&&l&&u?(l-i)/s:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const m$=typeof XMLHttpRequest<"u",g$=m$&&function(e){return new Promise(function(n,r){let o=e.data;const i=Qn.from(e.headers).normalize(),l=e.responseType;let a;function s(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}let u;D.isFormData(o)&&(_n.isStandardBrowserEnv||_n.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?D.isString(u=i.getContentType())&&i.setContentType(u.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let c=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(h+":"+g))}const p=ax(e.baseURL,e.url);c.open(e.method.toUpperCase(),rx(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function d(){if(!c)return;const h=Qn.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),w={data:!l||l==="text"||l==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:h,config:e,request:c};s$(function(y){n(y),s()},function(y){r(y),s()},w),c=null}if("onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(r(new ve("Request aborted",ve.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new ve("Network Error",ve.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let g=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const w=e.transitional||ox;e.timeoutErrorMessage&&(g=e.timeoutErrorMessage),r(new ve(g,w.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,e,c)),c=null},_n.isStandardBrowserEnv){const h=f$(p)&&e.xsrfCookieName&&u$.read(e.xsrfCookieName);h&&i.set(e.xsrfHeaderName,h)}o===void 0&&i.setContentType(null),"setRequestHeader"in c&&D.forEach(i.toJSON(),function(g,w){c.setRequestHeader(w,g)}),D.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),l&&l!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",og(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",og(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=h=>{c&&(r(!h||h.type?new Dl(null,e,c):h),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=d$(p);if(f&&_n.protocols.indexOf(f)===-1){r(new ve("Unsupported protocol "+f+":",ve.ERR_BAD_REQUEST,e));return}c.send(o||null)})},tf={http:U2,xhr:g$};D.forEach(tf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ig=e=>`- ${e}`,y$=e=>D.isFunction(e)||e===null||e===!1,sx={getAdapter:e=>{e=D.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${a} `+(s===!1?"is not supported by the environment":"is not available in the build"));let l=t?i.length>1?`since : `+i.map(ig).join(` -`):" "+ig(i[0]):"as no adapter specified";throw new ve("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:tf};function $c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Dl(null,e)}function lg(e){return $c(e),e.headers=Qn.from(e.headers),e.data=Ec.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),sx.getAdapter(e.adapter||Md.adapter)(e).then(function(r){return $c(e),r.data=Ec.call(e,e.transformResponse,r),r.headers=Qn.from(r.headers),r},function(r){return lx(r)||($c(e),r&&r.response&&(r.response.data=Ec.call(e,e.transformResponse,r.response),r.response.headers=Qn.from(r.response.headers))),Promise.reject(r)})}const ag=e=>e instanceof Qn?e.toJSON():e;function ei(e,t){t=t||{};const n={};function r(u,c,p){return D.isPlainObject(u)&&D.isPlainObject(c)?D.merge.call({caseless:p},u,c):D.isPlainObject(c)?D.merge({},c):D.isArray(c)?c.slice():c}function o(u,c,p){if(D.isUndefined(c)){if(!D.isUndefined(u))return r(void 0,u,p)}else return r(u,c,p)}function i(u,c){if(!D.isUndefined(c))return r(void 0,c)}function l(u,c){if(D.isUndefined(c)){if(!D.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,p){if(p in t)return r(u,c);if(p in e)return r(void 0,u)}const s={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:a,headers:(u,c)=>o(ag(u),ag(c),!0)};return D.forEach(Object.keys(Object.assign({},e,t)),function(c){const p=s[c]||o,d=p(e[c],t[c],c);D.isUndefined(d)&&p!==a||(n[c]=d)}),n}const ux="1.6.0",jd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{jd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const sg={};jd.transitional=function(t,n,r){function o(i,l){return"[Axios v"+ux+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,a)=>{if(t===!1)throw new ve(o(l," has been removed"+(n?" in "+n:"")),ve.ERR_DEPRECATED);return n&&!sg[l]&&(sg[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,a):!0}};function v$(e,t,n){if(typeof e!="object")throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],l=t[i];if(l){const a=e[i],s=a===void 0||l(a,i,e);if(s!==!0)throw new ve("option "+i+" must be "+s,ve.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ve("Unknown option "+i,ve.ERR_BAD_OPTION)}}const nf={assertOptions:v$,validators:jd},cr=nf.validators;class Cs{constructor(t){this.defaults=t,this.interceptors={request:new ng,response:new ng}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ei(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&nf.assertOptions(r,{silentJSONParsing:cr.transitional(cr.boolean),forcedJSONParsing:cr.transitional(cr.boolean),clarifyTimeoutError:cr.transitional(cr.boolean)},!1),o!=null&&(D.isFunction(o)?n.paramsSerializer={serialize:o}:nf.assertOptions(o,{encode:cr.function,serialize:cr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&D.merge(i.common,i[n.method]);i&&D.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=Qn.concat(l,i);const a=[];let s=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(s=s&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,p=0,d;if(!s){const h=[lg.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,u),d=h.length,c=Promise.resolve(n);p{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const l=new Promise(a=>{r.subscribe(a),i=a}).then(o);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,a){r.reason||(r.reason=new Dl(i,l,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Bd(function(o){t=o}),cancel:t}}}const w$=Bd;function x$(e){return function(n){return e.apply(null,n)}}function b$(e){return D.isObject(e)&&e.isAxiosError===!0}const rf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rf).forEach(([e,t])=>{rf[t]=e});const k$=rf;function cx(e){const t=new La(e),n=Ww(La.prototype.request,t);return D.extend(n,La.prototype,t,{allOwnKeys:!0}),D.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return cx(ei(e,o))},n}const Ze=cx(Md);Ze.Axios=La;Ze.CanceledError=Dl;Ze.CancelToken=w$;Ze.isCancel=lx;Ze.VERSION=ux;Ze.toFormData=cu;Ze.AxiosError=ve;Ze.Cancel=Ze.CanceledError;Ze.all=function(t){return Promise.all(t)};Ze.spread=x$;Ze.isAxiosError=b$;Ze.mergeConfig=ei;Ze.AxiosHeaders=Qn;Ze.formToJSON=e=>ix(D.isHTMLForm(e)?new FormData(e):e);Ze.getAdapter=sx.getAdapter;Ze.HttpStatusCode=k$;Ze.default=Ze;const S$=Ze;function C$(e=10){return Math.random().toString(36).substring(2,e+2)}function E$(e){const[t,n]=x.useState(sessionStorage.getItem(e)||C$());return x.useEffect(()=>{sessionStorage.setItem(e,t)},[t,e]),{sessionId:t,setSessionId:n}}function $$(e,t,n){const r=S$.create({baseURL:e,headers:{"X-Session-Id":t,"X-Bot-Token":n}});return r.interceptors.request.use(o=>(o.data={...o.data,session_id:t},o)),r}const px=x.createContext(void 0);function T$({children:e}){const t=Rl(),{sessionId:n}=E$((t==null?void 0:t.token)||"defaultToken"),r=$$(t==null?void 0:t.apiUrl,n,t==null?void 0:t.token);return _.jsx(px.Provider,{value:{axiosInstance:r},children:e})}const fx=()=>{const e=x.useContext(px);if(!e)throw new Error("useAxiosInstance must be used within a AxiosProvider");return e},dx=x.createContext({});function P$({children:e}){const{axiosInstance:t}=fx(),[n,r]=x.useState(),[o,i]=x.useState(!0);async function l(){i(!0),t.get("/chat/init").then(({data:a})=>r(a)).finally(()=>i(!1))}return x.useEffect(()=>{l()},[]),_.jsx(dx.Provider,{value:{data:n,loading:o,refetch:l},children:e})}const Ud=()=>{const e=x.useContext(dx);return e||console.warn("Error loading initial data...."),e};function O$({children:e,options:t}){return _.jsx(ue.Fragment,{children:_.jsx(i2,{data:t,children:_.jsx(a2,{children:_.jsx(T$,{children:_.jsx(P$,{children:e})})})})})}function A$(){for(var e=0,t,n,r="";ee&&(t=0,r=n,n=new Map)}return{get:function(l){var a=n.get(l);if(a!==void 0)return a;if((a=r.get(l))!==void 0)return o(l,a),a},set:function(l,a){n.has(l)?n.set(l,a):o(l,a)}}}var gx="!";function z$(e){var t=e.separator||":",n=t.length===1,r=t[0],o=t.length;return function(l){for(var a=[],s=0,u=0,c,p=0;pu?c-u:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:w}}}function N$(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var o=r[0]==="[";o?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function M$(e){return{cache:L$(e.cacheSize),splitModifiers:z$(e),..._$(e)}}var j$=/\s+/;function B$(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(j$).map(function(l){var a=n(l),s=a.modifiers,u=a.hasImportantModifier,c=a.baseClassName,p=a.maybePostfixModifierPosition,d=r(p?c.substring(0,p):c),f=!!p;if(!d){if(!p)return{isTailwindClass:!1,originalClassName:l};if(d=r(c),!d)return{isTailwindClass:!1,originalClassName:l};f=!1}var h=N$(s).join(":"),g=u?h+gx:h;return{isTailwindClass:!0,modifierId:g,classGroupId:d,originalClassName:l,hasPostfixModifier:f}}).reverse().filter(function(l){if(!l.isTailwindClass)return!0;var a=l.modifierId,s=l.classGroupId,u=l.hasPostfixModifier,c=a+s;return i.has(c)?!1:(i.add(c),o(s,u).forEach(function(p){return i.add(a+p)}),!0)}).reverse().map(function(l){return l.originalClassName}).join(" ")}function U$(){for(var e=arguments.length,t=new Array(e),n=0;ne instanceof Qn?e.toJSON():e;function ei(e,t){t=t||{};const n={};function r(u,c,p){return D.isPlainObject(u)&&D.isPlainObject(c)?D.merge.call({caseless:p},u,c):D.isPlainObject(c)?D.merge({},c):D.isArray(c)?c.slice():c}function o(u,c,p){if(D.isUndefined(c)){if(!D.isUndefined(u))return r(void 0,u,p)}else return r(u,c,p)}function i(u,c){if(!D.isUndefined(c))return r(void 0,c)}function l(u,c){if(D.isUndefined(c)){if(!D.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,p){if(p in t)return r(u,c);if(p in e)return r(void 0,u)}const s={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:a,headers:(u,c)=>o(ag(u),ag(c),!0)};return D.forEach(Object.keys(Object.assign({},e,t)),function(c){const p=s[c]||o,d=p(e[c],t[c],c);D.isUndefined(d)&&p!==a||(n[c]=d)}),n}const ux="1.6.0",jd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{jd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const sg={};jd.transitional=function(t,n,r){function o(i,l){return"[Axios v"+ux+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,a)=>{if(t===!1)throw new ve(o(l," has been removed"+(n?" in "+n:"")),ve.ERR_DEPRECATED);return n&&!sg[l]&&(sg[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,a):!0}};function v$(e,t,n){if(typeof e!="object")throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],l=t[i];if(l){const a=e[i],s=a===void 0||l(a,i,e);if(s!==!0)throw new ve("option "+i+" must be "+s,ve.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ve("Unknown option "+i,ve.ERR_BAD_OPTION)}}const nf={assertOptions:v$,validators:jd},cr=nf.validators;class Cs{constructor(t){this.defaults=t,this.interceptors={request:new ng,response:new ng}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ei(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&nf.assertOptions(r,{silentJSONParsing:cr.transitional(cr.boolean),forcedJSONParsing:cr.transitional(cr.boolean),clarifyTimeoutError:cr.transitional(cr.boolean)},!1),o!=null&&(D.isFunction(o)?n.paramsSerializer={serialize:o}:nf.assertOptions(o,{encode:cr.function,serialize:cr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&D.merge(i.common,i[n.method]);i&&D.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=Qn.concat(l,i);const a=[];let s=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(s=s&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,p=0,d;if(!s){const h=[lg.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,u),d=h.length,c=Promise.resolve(n);p{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const l=new Promise(a=>{r.subscribe(a),i=a}).then(o);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,a){r.reason||(r.reason=new Dl(i,l,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Bd(function(o){t=o}),cancel:t}}}const w$=Bd;function x$(e){return function(n){return e.apply(null,n)}}function b$(e){return D.isObject(e)&&e.isAxiosError===!0}const rf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rf).forEach(([e,t])=>{rf[t]=e});const k$=rf;function cx(e){const t=new La(e),n=Ww(La.prototype.request,t);return D.extend(n,La.prototype,t,{allOwnKeys:!0}),D.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return cx(ei(e,o))},n}const Ze=cx(Md);Ze.Axios=La;Ze.CanceledError=Dl;Ze.CancelToken=w$;Ze.isCancel=lx;Ze.VERSION=ux;Ze.toFormData=cu;Ze.AxiosError=ve;Ze.Cancel=Ze.CanceledError;Ze.all=function(t){return Promise.all(t)};Ze.spread=x$;Ze.isAxiosError=b$;Ze.mergeConfig=ei;Ze.AxiosHeaders=Qn;Ze.formToJSON=e=>ix(D.isHTMLForm(e)?new FormData(e):e);Ze.getAdapter=sx.getAdapter;Ze.HttpStatusCode=k$;Ze.default=Ze;const S$=Ze;function C$(e=10){return Math.random().toString(36).substring(2,e+2)}function E$(e){const[t,n]=x.useState(sessionStorage.getItem(e)||C$());return x.useEffect(()=>{sessionStorage.setItem(e,t)},[t,e]),{sessionId:t,setSessionId:n}}function $$(e,t,n){const r=S$.create({baseURL:e,headers:{"X-Session-Id":t,"X-Bot-Token":n}});return r.interceptors.request.use(o=>(o.data={...o.data,session_id:t},o)),r}const px=x.createContext(void 0);function T$({children:e}){const t=Rl(),{sessionId:n}=E$((t==null?void 0:t.token)||"defaultToken"),r=$$(t==null?void 0:t.apiUrl,n,t==null?void 0:t.token);return _.jsx(px.Provider,{value:{axiosInstance:r},children:e})}const fx=()=>{const e=x.useContext(px);if(!e)throw new Error("useAxiosInstance must be used within a AxiosProvider");return e},dx=x.createContext({});function P$({children:e}){const{axiosInstance:t}=fx(),[n,r]=x.useState(),[o,i]=x.useState(!0);async function l(){i(!0),t.get("/chat/init").then(({data:a})=>r(a)).finally(()=>i(!1))}return x.useEffect(()=>{l()},[]),_.jsx(dx.Provider,{value:{data:n,loading:o,refetch:l},children:e})}const Ud=()=>{const e=x.useContext(dx);return e||console.warn("Error loading initial data...."),e};var ui={};/** + * @license React + * react-dom-server-legacy.browser.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var hx=x;function le(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n