reachat 2.1.0-alpha.3 → 2.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CSVFileRenderer-CpB8ngRc.js → CSVFileRenderer-DodyJ8ty.js} +2 -2
- package/dist/{CSVFileRenderer-CpB8ngRc.js.map → CSVFileRenderer-DodyJ8ty.js.map} +1 -1
- package/dist/{DefaultFileRenderer-DEgyNAd4.js → DefaultFileRenderer-CjPMoUSC.js} +2 -2
- package/dist/{DefaultFileRenderer-DEgyNAd4.js.map → DefaultFileRenderer-CjPMoUSC.js.map} +1 -1
- package/dist/SessionMessages/SessionMessages.d.ts +4 -0
- package/dist/docs.json +21 -0
- package/dist/{index-DVFyp_Cz.js → index-B0_s-rPq.js} +7 -6
- package/dist/index-B0_s-rPq.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +4 -3
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/dist/index-DVFyp_Cz.js.map +0 -1
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { useState, useRef, useEffect } from "react";
|
|
4
4
|
import { AnimatePresence, motion } from "motion/react";
|
|
5
|
-
import { a as SvgCopy } from "./index-
|
|
5
|
+
import { a as SvgCopy } from "./index-B0_s-rPq.js";
|
|
6
6
|
import { IconButton } from "reablocks";
|
|
7
7
|
const sanitizeSVGCell = (cell) => {
|
|
8
8
|
const trimmed = cell.trim();
|
|
@@ -138,4 +138,4 @@ const CSVFileRenderer = ({ name, url, fileIcon }) => {
|
|
|
138
138
|
export {
|
|
139
139
|
CSVFileRenderer as default
|
|
140
140
|
};
|
|
141
|
-
//# sourceMappingURL=CSVFileRenderer-
|
|
141
|
+
//# sourceMappingURL=CSVFileRenderer-DodyJ8ty.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CSVFileRenderer-CpB8ngRc.js","sources":["../src/utils/sanitize.ts","../src/utils/parseCSV.ts","../src/assets/download.svg?react","../src/SessionMessages/SessionMessage/MessageFile/renderers/CSVFileRenderer.tsx"],"sourcesContent":["\n/**\n * Sanitizes cell content to prevent CSV injection and other potential vulnerabilities.\n * Based on the documentation of OWASP for CSV Injection\n * https://owasp.org/www-community/attacks/CSV_Injection\n * @param cell The cell content to sanitize.\n * @returns The sanitized cell content.\n */\nexport const sanitizeSVGCell = (cell: string): string => {\n const trimmed = cell.trim();\n // Escape double quotes by doubling them\n const escaped = trimmed.replace(/\"/g, '\"\"');\n // Add single quote prefix only for potentially dangerous content\n const prefix = /^[=+\\-@]/.test(trimmed) ? '\\'' : '';\n // Only wrap in quotes if the content contains special characters\n const needsQuotes = /[\",\\n\\r]/.test(escaped) || prefix;\n\n return needsQuotes ? `\"${prefix}${escaped}\"` : escaped;\n};\n","import { sanitizeSVGCell } from './sanitize';\n\n/**\n * Parses a CSV string from a local file and returns an array of rows.\n * Sanitizes cell data to prevent injection attacks.\n * @param csvString The raw CSV string content to parse.\n * @returns The parsed CSV data as a 2D array of strings.\n */\nexport const parseCSV = (csvString: string): string[][] => {\n try {\n const rows = csvString.split('\\n');\n return rows.map((row) => row.split(',').map((cell) => sanitizeSVGCell(cell)));\n } catch (error) {\n console.error('Error parsing CSV:', error);\n throw new Error('Failed to parse CSV file.');\n }\n};\n","import * as React from \"react\";\nconst SvgDownload = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-cloud-download\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M12 12v9\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"m8 17 4 4 4-4\" }));\nexport default SvgDownload;\n","import { FC, useEffect, useState, ReactElement, useRef } from 'react';\nimport { motion, AnimatePresence } from 'motion/react';\nimport { parseCSV } from '@/utils/parseCSV';\nimport DownloadIcon from '@/assets/download.svg?react';\nimport PlaceholderIcon from '@/assets/copy.svg?react';\nimport { IconButton } from 'reablocks';\n\ninterface CSVFileRendererProps {\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n\n /**\n * Icon to for file type.\n */\n fileIcon?: ReactElement;\n}\n\n/**\n * Renderer for CSV files that fetches and displays a snippet of the file data.\n */\nconst CSVFileRenderer: FC<CSVFileRendererProps> = ({ name, url, fileIcon }) => {\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [csvData, setCsvData] = useState<string[][]>([]);\n const [error, setError] = useState<string | null>(null);\n const [isModalOpen, setIsModalOpen] = useState(false);\n const modalRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const fetchCsvData = async () => {\n try {\n setIsLoading(true);\n const response = await fetch(url);\n const data = parseCSV(await response.text());\n setCsvData(data);\n } catch {\n setError('Failed to load CSV file.');\n } finally {\n setIsLoading(false);\n }\n };\n\n fetchCsvData();\n }, [url]);\n\n const toggleModal = () => {\n setIsModalOpen(prev => !prev);\n };\n\n const handleClickOutside = (event: MouseEvent) => {\n if (modalRef.current && !modalRef.current.contains(event.target as Node)) {\n setIsModalOpen(false);\n }\n };\n\n useEffect(() => {\n if (isModalOpen) {\n document.addEventListener('mousedown', handleClickOutside);\n } else {\n document.removeEventListener('mousedown', handleClickOutside);\n }\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [isModalOpen]);\n\n const downloadCSV = () => {\n if (csvData.length === 0) return;\n\n const csvContent = csvData.map(row => row.join(',')).join('\\n');\n const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', `${name || 'data'}`);\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n };\n\n const renderTable = (data: string[][], maxRows?: number) => (\n <motion.table\n layout\n className=\"w-full\"\n transition={{ type: 'spring', stiffness: 100, damping: 20 }}\n >\n <thead className=\"sticky top-0 bg-gray-200 dark:bg-gray-800 z-10\">\n <tr>\n <th className=\"py-4 px-6\">#</th>\n {data[0].map((header, index) => (\n <th key={`header-${index}`} className=\"py-4 px-6\">\n {header}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {data.slice(1, maxRows).map((row, rowIndex) => (\n <tr\n key={`row-${rowIndex}`}\n className=\"border-b border-panel-accent light:border-gray-700 hover:bg-panel-accent hover:light:bg-gray-700/40 transition-colors text-base\"\n >\n <td className=\"py-4 px-6\">{rowIndex + 1}</td>\n {row.map((cell, cellIndex) => (\n <td key={`cell-${rowIndex}-${cellIndex}`} className=\"py-4 px-6\">\n {cell}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </motion.table>\n );\n\n return (\n <div className=\"flex flex-col gap-2\">\n <div className=\"flex justify-between items-center gap-4\">\n <div className=\"csv-icon flex items-center\">\n {fileIcon}\n {name && <figcaption className=\"ml-1\">{name}</figcaption>}\n </div>\n <div className=\"csv-icon flex items-center gap-6\">\n <IconButton size=\"small\" variant=\"text\" onClick={downloadCSV}>\n <DownloadIcon />\n </IconButton>\n <IconButton size=\"small\" variant=\"text\" onClick={toggleModal}>\n <PlaceholderIcon />\n </IconButton>\n </div>\n </div>\n\n {error && <div className=\"error-message\">{error}</div>}\n\n {isLoading && !csvData && (\n <div className=\"text-text-secondary\">Loading...</div>\n )}\n\n <div className=\"flex justify-between\">\n {!error && csvData.length > 0 && renderTable(csvData, 6)}\n </div>\n\n <AnimatePresence>\n {isModalOpen && (\n <motion.div\n className=\"fixed inset-0 bg-black/70 flex justify-center items-center z-50\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.3 }}\n >\n <motion.div\n ref={modalRef}\n className=\"bg-white dark:bg-gray-900 rounded-md w-11/12 h-5/6 overflow-auto\"\n initial={{ scale: 0.8 }}\n animate={{ scale: 1 }}\n exit={{ scale: 0.8 }}\n transition={{ duration: 0.3 }}\n >\n {!error && csvData.length > 0 && renderTable(csvData)}\n </motion.div>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n};\n\nexport default CSVFileRenderer;\n"],"names":["url","DownloadIcon","PlaceholderIcon"],"mappings":";;;;;;AAQO,MAAM,kBAAkB,CAAC,SAAyB;AACvD,QAAM,UAAU,KAAK,KAAA;AAErB,QAAM,UAAU,QAAQ,QAAQ,MAAM,IAAI;AAE1C,QAAM,SAAS,WAAW,KAAK,OAAO,IAAI,MAAO;AAEjD,QAAM,cAAc,WAAW,KAAK,OAAO,KAAK;AAEhD,SAAO,cAAc,IAAI,MAAM,GAAG,OAAO,MAAM;AACjD;ACVO,MAAM,WAAW,CAAC,cAAkC;AACzD,MAAI;AACF,UAAM,OAAO,UAAU,MAAM,IAAI;AACjC,WAAO,KAAK,IAAI,CAAC,QAAQ,IAAI,MAAM,GAAG,EAAE,IAAI,CAAC,SAAS,gBAAgB,IAAI,CAAC,CAAC;AAAA,EAC9E,SAAS,OAAO;AACd,YAAQ,MAAM,sBAAsB,KAAK;AACzC,UAAM,IAAI,MAAM,2BAA2B;AAAA,EAC7C;AACF;ACfA,MAAM,cAAc,CAAC,UAA0B,sBAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,OAAO,IAAI,QAAQ,IAAI,SAAS,aAAa,MAAM,QAAQ,QAAQ,gBAAgB,aAAa,GAAG,eAAe,SAAS,gBAAgB,SAAS,WAAW,gCAAgC,GAAG,MAAK,GAAoB,sBAAM,cAAc,QAAQ,EAAE,GAAG,2DAA0D,CAAE,GAAmB,sBAAM,cAAc,QAAQ,EAAE,GAAG,WAAU,CAAE,GAAmB,sBAAM,cAAc,QAAQ,EAAE,GAAG,gBAAe,CAAE,CAAC;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,WAAC,SAAS,QAAQ,SAAS,KAAK,YAAY,OAAO;AAAA,UAAA;AAAA,QAAA;AAAA,MACtD;AAAA,IAAA,EACF,CAEJ;AAAA,EAAA,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"CSVFileRenderer-DodyJ8ty.js","sources":["../src/utils/sanitize.ts","../src/utils/parseCSV.ts","../src/assets/download.svg?react","../src/SessionMessages/SessionMessage/MessageFile/renderers/CSVFileRenderer.tsx"],"sourcesContent":["\n/**\n * Sanitizes cell content to prevent CSV injection and other potential vulnerabilities.\n * Based on the documentation of OWASP for CSV Injection\n * https://owasp.org/www-community/attacks/CSV_Injection\n * @param cell The cell content to sanitize.\n * @returns The sanitized cell content.\n */\nexport const sanitizeSVGCell = (cell: string): string => {\n const trimmed = cell.trim();\n // Escape double quotes by doubling them\n const escaped = trimmed.replace(/\"/g, '\"\"');\n // Add single quote prefix only for potentially dangerous content\n const prefix = /^[=+\\-@]/.test(trimmed) ? '\\'' : '';\n // Only wrap in quotes if the content contains special characters\n const needsQuotes = /[\",\\n\\r]/.test(escaped) || prefix;\n\n return needsQuotes ? `\"${prefix}${escaped}\"` : escaped;\n};\n","import { sanitizeSVGCell } from './sanitize';\n\n/**\n * Parses a CSV string from a local file and returns an array of rows.\n * Sanitizes cell data to prevent injection attacks.\n * @param csvString The raw CSV string content to parse.\n * @returns The parsed CSV data as a 2D array of strings.\n */\nexport const parseCSV = (csvString: string): string[][] => {\n try {\n const rows = csvString.split('\\n');\n return rows.map((row) => row.split(',').map((cell) => sanitizeSVGCell(cell)));\n } catch (error) {\n console.error('Error parsing CSV:', error);\n throw new Error('Failed to parse CSV file.');\n }\n};\n","import * as React from \"react\";\nconst SvgDownload = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-cloud-download\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M12 12v9\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"m8 17 4 4 4-4\" }));\nexport default SvgDownload;\n","import { FC, useEffect, useState, ReactElement, useRef } from 'react';\nimport { motion, AnimatePresence } from 'motion/react';\nimport { parseCSV } from '@/utils/parseCSV';\nimport DownloadIcon from '@/assets/download.svg?react';\nimport PlaceholderIcon from '@/assets/copy.svg?react';\nimport { IconButton } from 'reablocks';\n\ninterface CSVFileRendererProps {\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n\n /**\n * Icon to for file type.\n */\n fileIcon?: ReactElement;\n}\n\n/**\n * Renderer for CSV files that fetches and displays a snippet of the file data.\n */\nconst CSVFileRenderer: FC<CSVFileRendererProps> = ({ name, url, fileIcon }) => {\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [csvData, setCsvData] = useState<string[][]>([]);\n const [error, setError] = useState<string | null>(null);\n const [isModalOpen, setIsModalOpen] = useState(false);\n const modalRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const fetchCsvData = async () => {\n try {\n setIsLoading(true);\n const response = await fetch(url);\n const data = parseCSV(await response.text());\n setCsvData(data);\n } catch {\n setError('Failed to load CSV file.');\n } finally {\n setIsLoading(false);\n }\n };\n\n fetchCsvData();\n }, [url]);\n\n const toggleModal = () => {\n setIsModalOpen(prev => !prev);\n };\n\n const handleClickOutside = (event: MouseEvent) => {\n if (modalRef.current && !modalRef.current.contains(event.target as Node)) {\n setIsModalOpen(false);\n }\n };\n\n useEffect(() => {\n if (isModalOpen) {\n document.addEventListener('mousedown', handleClickOutside);\n } else {\n document.removeEventListener('mousedown', handleClickOutside);\n }\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [isModalOpen]);\n\n const downloadCSV = () => {\n if (csvData.length === 0) return;\n\n const csvContent = csvData.map(row => row.join(',')).join('\\n');\n const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', `${name || 'data'}`);\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n };\n\n const renderTable = (data: string[][], maxRows?: number) => (\n <motion.table\n layout\n className=\"w-full\"\n transition={{ type: 'spring', stiffness: 100, damping: 20 }}\n >\n <thead className=\"sticky top-0 bg-gray-200 dark:bg-gray-800 z-10\">\n <tr>\n <th className=\"py-4 px-6\">#</th>\n {data[0].map((header, index) => (\n <th key={`header-${index}`} className=\"py-4 px-6\">\n {header}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {data.slice(1, maxRows).map((row, rowIndex) => (\n <tr\n key={`row-${rowIndex}`}\n className=\"border-b border-panel-accent light:border-gray-700 hover:bg-panel-accent hover:light:bg-gray-700/40 transition-colors text-base\"\n >\n <td className=\"py-4 px-6\">{rowIndex + 1}</td>\n {row.map((cell, cellIndex) => (\n <td key={`cell-${rowIndex}-${cellIndex}`} className=\"py-4 px-6\">\n {cell}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </motion.table>\n );\n\n return (\n <div className=\"flex flex-col gap-2\">\n <div className=\"flex justify-between items-center gap-4\">\n <div className=\"csv-icon flex items-center\">\n {fileIcon}\n {name && <figcaption className=\"ml-1\">{name}</figcaption>}\n </div>\n <div className=\"csv-icon flex items-center gap-6\">\n <IconButton size=\"small\" variant=\"text\" onClick={downloadCSV}>\n <DownloadIcon />\n </IconButton>\n <IconButton size=\"small\" variant=\"text\" onClick={toggleModal}>\n <PlaceholderIcon />\n </IconButton>\n </div>\n </div>\n\n {error && <div className=\"error-message\">{error}</div>}\n\n {isLoading && !csvData && (\n <div className=\"text-text-secondary\">Loading...</div>\n )}\n\n <div className=\"flex justify-between\">\n {!error && csvData.length > 0 && renderTable(csvData, 6)}\n </div>\n\n <AnimatePresence>\n {isModalOpen && (\n <motion.div\n className=\"fixed inset-0 bg-black/70 flex justify-center items-center z-50\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.3 }}\n >\n <motion.div\n ref={modalRef}\n className=\"bg-white dark:bg-gray-900 rounded-md w-11/12 h-5/6 overflow-auto\"\n initial={{ scale: 0.8 }}\n animate={{ scale: 1 }}\n exit={{ scale: 0.8 }}\n transition={{ duration: 0.3 }}\n >\n {!error && csvData.length > 0 && renderTable(csvData)}\n </motion.div>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n};\n\nexport default CSVFileRenderer;\n"],"names":["url","DownloadIcon","PlaceholderIcon"],"mappings":";;;;;;AAQO,MAAM,kBAAkB,CAAC,SAAyB;AACvD,QAAM,UAAU,KAAK,KAAA;AAErB,QAAM,UAAU,QAAQ,QAAQ,MAAM,IAAI;AAE1C,QAAM,SAAS,WAAW,KAAK,OAAO,IAAI,MAAO;AAEjD,QAAM,cAAc,WAAW,KAAK,OAAO,KAAK;AAEhD,SAAO,cAAc,IAAI,MAAM,GAAG,OAAO,MAAM;AACjD;ACVO,MAAM,WAAW,CAAC,cAAkC;AACzD,MAAI;AACF,UAAM,OAAO,UAAU,MAAM,IAAI;AACjC,WAAO,KAAK,IAAI,CAAC,QAAQ,IAAI,MAAM,GAAG,EAAE,IAAI,CAAC,SAAS,gBAAgB,IAAI,CAAC,CAAC;AAAA,EAC9E,SAAS,OAAO;AACd,YAAQ,MAAM,sBAAsB,KAAK;AACzC,UAAM,IAAI,MAAM,2BAA2B;AAAA,EAC7C;AACF;ACfA,MAAM,cAAc,CAAC,UAA0B,sBAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,OAAO,IAAI,QAAQ,IAAI,SAAS,aAAa,MAAM,QAAQ,QAAQ,gBAAgB,aAAa,GAAG,eAAe,SAAS,gBAAgB,SAAS,WAAW,gCAAgC,GAAG,MAA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A,YACL,WAAU;AAAA,YACV,SAAS,EAAE,OAAO,IAAA;AAAA,YAClB,SAAS,EAAE,OAAO,EAAA;AAAA,YAClB,MAAM,EAAE,OAAO,IAAA;AAAA,YACf,YAAY,EAAE,UAAU,IAAA;AAAA,YAEvB,WAAC,SAAS,QAAQ,SAAS,KAAK,YAAY,OAAO;AAAA,UAAA;AAAA,QAAA;AAAA,MACtD;AAAA,IAAA,EACF,CAEJ;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { S as SvgFile } from "./index-
|
|
2
|
+
import { S as SvgFile } from "./index-B0_s-rPq.js";
|
|
3
3
|
import { cn, Ellipsis } from "reablocks";
|
|
4
4
|
const DefaultFileRenderer = ({
|
|
5
5
|
name,
|
|
@@ -12,4 +12,4 @@ const DefaultFileRenderer = ({
|
|
|
12
12
|
export {
|
|
13
13
|
DefaultFileRenderer as default
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=DefaultFileRenderer-
|
|
15
|
+
//# sourceMappingURL=DefaultFileRenderer-CjPMoUSC.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultFileRenderer-
|
|
1
|
+
{"version":3,"file":"DefaultFileRenderer-CjPMoUSC.js","sources":["../src/SessionMessages/SessionMessage/MessageFile/renderers/DefaultFileRenderer.tsx"],"sourcesContent":["import { FC, ReactElement } from 'react';\nimport FileIcon from '@/assets/file.svg?react';\nimport { Ellipsis, cn } from 'reablocks';\n\ninterface DefaultFileRendererProps {\n /**\n * Limit for the name.\n */\n limit?: number;\n\n /**\n * Name of the file.\n */\n name?: string;\n\n /**\n * URL of the file.\n */\n url: string;\n\n /**\n * Icon to for file type.\n */\n fileIcon?: ReactElement;\n}\n\n/**\n * Default renderer for unspecified file types.\n */\nconst DefaultFileRenderer: FC<DefaultFileRendererProps> = ({\n name,\n limit = 100,\n fileIcon = <FileIcon />,\n}) => (\n <figure className=\"flex items-center gap-2\">\n {fileIcon}\n {name && (\n <figcaption className={cn('file-name-class')}>\n <Ellipsis value={name} limit={limit} />\n </figcaption>\n )}\n </figure>\n);\n\nexport default DefaultFileRenderer;\n"],"names":["FileIcon"],"mappings":";;;AA6BA,MAAM,sBAAoD,CAAC;AAAA,EACzD;AAAA,EACA,QAAQ;AAAA,EACR,+BAAYA,SAAA,CAAA,CAAS;AACvB,MACE,qBAAC,UAAA,EAAO,WAAU,2BACf,UAAA;AAAA,EAAA;AAAA,EACA,QACC,oBAAC,cAAA,EAAW,WAAW,GAAG,iBAAiB,GACzC,UAAA,oBAAC,UAAA,EAAS,OAAO,MAAM,MAAA,CAAc,EAAA,CACvC;AAAA,EAAA,CAEJ;"}
|
|
@@ -13,6 +13,10 @@ interface SessionMessagesProps {
|
|
|
13
13
|
* Text to display for the show more button.
|
|
14
14
|
*/
|
|
15
15
|
showMoreText?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Whether to automatically scroll to the bottom of the content.
|
|
18
|
+
*/
|
|
19
|
+
autoScroll?: boolean;
|
|
16
20
|
/**
|
|
17
21
|
* Render function for the session messages.
|
|
18
22
|
*/
|
package/dist/docs.json
CHANGED
|
@@ -1033,6 +1033,27 @@
|
|
|
1033
1033
|
"name": "string"
|
|
1034
1034
|
}
|
|
1035
1035
|
},
|
|
1036
|
+
"autoScroll": {
|
|
1037
|
+
"defaultValue": {
|
|
1038
|
+
"value": "true"
|
|
1039
|
+
},
|
|
1040
|
+
"description": "Whether to automatically scroll to the bottom of the content.",
|
|
1041
|
+
"name": "autoScroll",
|
|
1042
|
+
"parent": {
|
|
1043
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
1044
|
+
"name": "SessionMessagesProps"
|
|
1045
|
+
},
|
|
1046
|
+
"declarations": [
|
|
1047
|
+
{
|
|
1048
|
+
"fileName": "src/SessionMessages/SessionMessages.tsx",
|
|
1049
|
+
"name": "SessionMessagesProps"
|
|
1050
|
+
}
|
|
1051
|
+
],
|
|
1052
|
+
"required": false,
|
|
1053
|
+
"type": {
|
|
1054
|
+
"name": "boolean"
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1036
1057
|
"children": {
|
|
1037
1058
|
"defaultValue": null,
|
|
1038
1059
|
"description": "Render function for the session messages.",
|
|
@@ -1368,8 +1368,8 @@ function remarkCve() {
|
|
|
1368
1368
|
}
|
|
1369
1369
|
}
|
|
1370
1370
|
const SvgFile = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, viewBox: "0 0 16 16", fill: "currentColor", ...props }, /* @__PURE__ */ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.7036 1.37034C3.04741 1.02653 3.51373 0.833374 3.99996 0.833374H9.33329H9.33331C9.47275 0.833374 9.59885 0.890449 9.68954 0.98251L13.6843 4.97722C13.7763 5.0679 13.8333 5.19398 13.8333 5.33337L13.8333 5.3379V13.3334C13.8333 13.8196 13.6401 14.2859 13.2963 14.6297C12.9525 14.9736 12.4862 15.1667 12 15.1667H3.99996C3.51373 15.1667 3.04741 14.9736 2.7036 14.6297C2.35978 14.2859 2.16663 13.8196 2.16663 13.3334V2.66671C2.16663 2.18048 2.35978 1.71416 2.7036 1.37034ZM3.99996 1.83337H8.83331V5.33337C8.83331 5.60952 9.05717 5.83337 9.33331 5.83337H12.8333V13.3334C12.8333 13.5544 12.7455 13.7663 12.5892 13.9226C12.4329 14.0789 12.221 14.1667 12 14.1667H3.99996C3.77895 14.1667 3.56698 14.0789 3.4107 13.9226C3.25442 13.7663 3.16663 13.5544 3.16663 13.3334V2.66671C3.16663 2.44569 3.25442 2.23373 3.4107 2.07745C3.56698 1.92117 3.77895 1.83337 3.99996 1.83337ZM9.83331 2.5405L12.1262 4.83337H9.83331V2.5405ZM5.33331 8.16663C5.05717 8.16663 4.83331 8.39048 4.83331 8.66663C4.83331 8.94277 5.05717 9.16663 5.33331 9.16663H10.6666C10.9428 9.16663 11.1666 8.94277 11.1666 8.66663C11.1666 8.39048 10.9428 8.16663 10.6666 8.16663H5.33331ZM4.83331 11.3334C4.83331 11.0572 5.05717 10.8334 5.33331 10.8334H10.6666C10.9428 10.8334 11.1666 11.0572 11.1666 11.3334C11.1666 11.6095 10.9428 11.8334 10.6666 11.8334H5.33331C5.05717 11.8334 4.83331 11.6095 4.83331 11.3334ZM5.33331 5.5C5.05717 5.5 4.83331 5.72386 4.83331 6C4.83331 6.27614 5.05717 6.5 5.33331 6.5H6.66665C6.94279 6.5 7.16665 6.27614 7.16665 6C7.16665 5.72386 6.94279 5.5 6.66665 5.5H5.33331Z" }));
|
|
1371
|
-
const DefaultFileRenderer = lazy(() => import("./DefaultFileRenderer-
|
|
1372
|
-
const CSVFileRenderer = lazy(() => import("./CSVFileRenderer-
|
|
1371
|
+
const DefaultFileRenderer = lazy(() => import("./DefaultFileRenderer-CjPMoUSC.js"));
|
|
1372
|
+
const CSVFileRenderer = lazy(() => import("./CSVFileRenderer-DodyJ8ty.js"));
|
|
1373
1373
|
const ImageFileRenderer = lazy(() => import("./ImageFileRenderer-C8tVW3I8.js"));
|
|
1374
1374
|
const PDFFileRenderer = lazy(() => import("./PDFFileRenderer-DQdFS2l6.js"));
|
|
1375
1375
|
const FILE_TYPE_RENDERER_MAP = {
|
|
@@ -1691,18 +1691,19 @@ const SessionMessages = ({
|
|
|
1691
1691
|
children,
|
|
1692
1692
|
newSessionContent,
|
|
1693
1693
|
limit = 10,
|
|
1694
|
-
showMoreText = "Show more"
|
|
1694
|
+
showMoreText = "Show more",
|
|
1695
|
+
autoScroll = true
|
|
1695
1696
|
}) => {
|
|
1696
1697
|
const { activeSession, theme } = useContext(ChatContext);
|
|
1697
1698
|
const contentRef = useRef(null);
|
|
1698
1699
|
const [isAnimating, setIsAnimating] = useState(true);
|
|
1699
1700
|
useEffect(() => {
|
|
1700
|
-
if (contentRef.current) {
|
|
1701
|
+
if (contentRef.current && autoScroll) {
|
|
1701
1702
|
requestAnimationFrame(
|
|
1702
1703
|
() => contentRef.current.scrollTop = contentRef.current.scrollHeight
|
|
1703
1704
|
);
|
|
1704
1705
|
}
|
|
1705
|
-
}, [activeSession, isAnimating]);
|
|
1706
|
+
}, [activeSession, autoScroll, isAnimating]);
|
|
1706
1707
|
function handleShowMore() {
|
|
1707
1708
|
showNext(limit);
|
|
1708
1709
|
requestAnimationFrame(() => contentRef.current.scrollTop = 0);
|
|
@@ -2261,4 +2262,4 @@ export {
|
|
|
2261
2262
|
light as y,
|
|
2262
2263
|
ChatContext as z
|
|
2263
2264
|
};
|
|
2264
|
-
//# sourceMappingURL=index-
|
|
2265
|
+
//# sourceMappingURL=index-B0_s-rPq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-B0_s-rPq.js","sources":["../src/assets/send.svg?react","../src/assets/stop.svg?react","../src/ChatContext.ts","../src/assets/paperclip.svg?react","../src/ChatInput/FileInput.tsx","../src/ChatInput/ChatInput.tsx","../src/SessionMessages/SessionEmpty.tsx","../src/SessionMessages/SessionMessagesHeader.tsx","../src/assets/back.svg?react","../src/SessionMessages/SessionMessagePanel.tsx","../src/assets/copy.svg?react","../src/Markdown/themes/dark.ts","../src/Markdown/themes/light.ts","../src/Markdown/CodeHighlighter.tsx","../src/Markdown/Table.tsx","../src/Markdown/Markdown.tsx","../src/Markdown/plugins/remarkCve.ts","../src/assets/file.svg?react","../src/SessionMessages/SessionMessage/MessageFile/MessageFile.tsx","../src/SessionMessages/SessionMessage/MessageFiles.tsx","../src/SessionMessages/SessionMessage/MessageQuestion.tsx","../src/SessionMessages/SessionMessage/MessageResponse.tsx","../src/SessionMessages/SessionMessage/MessageSource.tsx","../src/SessionMessages/SessionMessage/MessageSources.tsx","../src/assets/thumbs-down.svg?react","../src/assets/thumbs-up.svg?react","../src/assets/refresh.svg?react","../src/SessionMessages/SessionMessage/MessageActions.tsx","../src/SessionMessages/SessionMessage/SessionMessage.tsx","../src/SessionMessages/SessionMessages.tsx","../src/theme.ts","../src/utils/useDimensions.ts","../src/Chat.tsx","../src/assets/trash.svg?react","../src/assets/chat.svg?react","../src/SessionsList/SessionListItem.tsx","../src/SessionsList/SessionsList.tsx","../src/assets/plus.svg?react","../src/SessionsList/NewSessionButton.tsx","../src/utils/grouping.ts","../src/SessionsList/SessionsGroup.tsx","../src/SessionsList/SessionGroups.tsx","../src/AppBar/AppBar.tsx","../src/ChatBubble/ChatBubble.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgSend = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 17, height: 17, viewBox: \"0 0 17 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"send\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M14.6111 2.33327C14.5349 2.3339 14.4598 2.35194 14.3917 2.386L2.39168 8.386C2.31456 8.42456 2.24872 8.4824 2.20055 8.55391C2.15238 8.62543 2.12352 8.70818 2.11677 8.79414C2.11002 8.88009 2.12561 8.96634 2.16203 9.04449C2.19845 9.12264 2.25446 9.19005 2.32462 9.24017L4.52514 10.8124L5.47371 13.6581C5.50257 13.7447 5.55457 13.8217 5.62406 13.8808C5.69355 13.9399 5.7779 13.9789 5.86796 13.9935C5.95802 14.0082 6.05036 13.9979 6.13499 13.9638C6.21962 13.9297 6.2933 13.873 6.34806 13.8001L7.05249 12.8606L10.3207 15.2376C10.3843 15.2839 10.4579 15.3146 10.5355 15.3271C10.6132 15.3396 10.6927 15.3336 10.7676 15.3097C10.8425 15.2857 10.9107 15.2444 10.9667 15.1891C11.0226 15.1338 11.0647 15.0661 11.0896 14.9915L15.0896 2.99147C15.1148 2.91597 15.1216 2.83555 15.1094 2.7569C15.0972 2.67825 15.0665 2.60363 15.0197 2.53926C14.9729 2.47488 14.9114 2.42261 14.8403 2.38678C14.7693 2.35096 14.6907 2.33261 14.6111 2.33327ZM13.2478 5.35345L10.3565 14.0266L7.67293 12.0755L13.2478 5.35345ZM10.684 5.35801L4.934 9.87559L3.58113 8.90879L10.684 5.35801ZM11.2784 6.16205L6.56746 11.843C6.56681 11.8437 6.56616 11.8443 6.56551 11.845L6.56355 11.8476C6.55841 11.8538 6.55342 11.8601 6.54858 11.8665C6.54319 11.8733 6.53798 11.8802 6.53295 11.8873L6.12085 12.4361L5.53426 10.6751L11.2784 6.16205Z\", fill: \"currentColor\" })));\nexport default SvgSend;\n","import * as React from \"react\";\nconst SvgStop = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-octagon-x\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"m15 9-6 6\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"m9 9 6 6\" }));\nexport default SvgStop;\n","import { createContext } from 'react';\nimport { Session } from './types';\nimport { ChatTheme } from './theme';\nimport { Plugin } from 'unified';\n\nexport type ChatViewType = 'chat' | 'companion' | 'console';\n\nexport interface ChatContextProps {\n sessions: Session[];\n disabled?: boolean;\n activeSessionId: string | null;\n theme?: ChatTheme;\n isLoading?: boolean;\n isCompact?: boolean;\n viewType?: ChatViewType;\n activeSession?: Session | null;\n remarkPlugins?: Plugin[];\n selectSession?: (sessionId: string) => void;\n deleteSession?: (sessionId: string) => void;\n createSession?: () => void;\n sendMessage?: (message: string) => void;\n stopMessage?: () => void;\n fileUpload?: (file: File) => void;\n}\n\nexport const ChatContext = createContext<ChatContextProps>({\n sessions: [],\n activeSessionId: null\n});\n","import * as React from \"react\";\nconst SvgPaperclip = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-paperclip\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48\" }));\nexport default SvgPaperclip;\n","import { ChatContext } from '@/ChatContext';\nimport { Button, cn } from 'reablocks';\nimport { FC, ReactNode, useRef, ChangeEvent, useContext } from 'react';\nimport AttachIcon from '@/assets/paperclip.svg?react';\n\ninterface FileInputProps {\n /**\n * Array of allowed file extensions.\n */\n allowedFiles: string[];\n\n /**\n * Indicates whether a file upload is in progress.\n */\n isLoading: boolean;\n\n /**\n * Disables the file input when true.\n */\n disabled: boolean;\n\n /**\n * Custom icon for the attach button.\n */\n attachIcon: ReactNode;\n\n /**\n * Callback function triggered when a file is selected.\n */\n onFileUpload: (event: ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const FileInput: FC<FileInputProps> = ({\n allowedFiles,\n onFileUpload,\n isLoading,\n disabled,\n attachIcon = <AttachIcon />\n}) => {\n const { theme } = useContext(ChatContext);\n const fileInputRef = useRef<HTMLInputElement>(null);\n\n return (\n <>\n <input\n type=\"file\"\n ref={fileInputRef}\n className=\"hidden\"\n accept={allowedFiles.join(',')}\n onChange={e => {\n onFileUpload(e);\n // Cleanup field value after fire callback\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n }}\n />\n <Button\n title=\"Upload\"\n variant=\"text\"\n disabled={isLoading || disabled}\n className={cn(theme.input.upload)}\n onClick={() => fileInputRef.current?.click()}\n >\n {attachIcon}\n </Button>\n </>\n );\n};\n","import {\n useState,\n KeyboardEvent,\n ReactElement,\n useRef,\n ChangeEvent,\n useContext,\n forwardRef,\n useImperativeHandle,\n useEffect,\n useCallback\n} from 'react';\nimport { Button, Textarea, cn } from 'reablocks';\nimport SendIcon from '@/assets/send.svg?react';\nimport StopIcon from '@/assets/stop.svg?react';\nimport { ChatContext } from '@/ChatContext';\nimport { FileInput } from './FileInput';\n\ninterface ChatInputProps {\n /**\n * Default value for the input field.\n */\n defaultValue?: string;\n\n /**\n * Allowed file types for upload.\n */\n allowedFiles?: string[];\n\n /**\n * Placeholder text for the input field.\n */\n placeholder?: string;\n\n /**\n * Icon to show for send.\n */\n sendIcon?: ReactElement;\n\n /**\n * Icon to show for stop.\n */\n stopIcon?: ReactElement;\n\n /**\n * Icon to show for attach.\n */\n attachIcon?: ReactElement;\n\n /**\n * Message to be displayed in the input field.\n */\n message?: string;\n\n /**\n * Callback function to handle message change.\n */\n onMessageChange?: (message: string) => void;\n}\n\nexport interface ChatInputRef {\n /**\n * Focus the input.\n */\n focus: () => void;\n\n /**\n * Send the message.\n */\n send: () => void;\n}\n\nexport const ChatInput = forwardRef<ChatInputRef, ChatInputProps>(\n (\n {\n allowedFiles,\n placeholder,\n defaultValue,\n message,\n sendIcon = <SendIcon />,\n stopIcon = <StopIcon />,\n attachIcon,\n onMessageChange\n },\n ref\n ) => {\n const {\n theme,\n isLoading,\n disabled,\n sendMessage,\n stopMessage,\n fileUpload,\n activeSessionId\n } = useContext(ChatContext);\n const [internalMessage, setInternalMessage] = useState<string>('');\n const inputRef = useRef<HTMLTextAreaElement | null>(null);\n\n useEffect(() => {\n setInternalMessage(message || '');\n }, [message]);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }, [activeSessionId, inputRef]);\n\n useImperativeHandle(ref, () => ({\n focus: () => {\n inputRef.current?.focus();\n },\n send: () => {\n if (internalMessage.trim()) {\n sendMessage?.(internalMessage);\n setInternalMessage('');\n }\n }\n }));\n\n const handleSendMessage = () => {\n if (internalMessage.trim()) {\n sendMessage?.(internalMessage);\n setInternalMessage('');\n }\n };\n\n const handleKeyPress = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleSendMessage();\n }\n };\n\n const handleFileUpload = (event: ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (file && fileUpload) {\n fileUpload(file);\n }\n };\n\n const handleMessageChange = useCallback(\n (event: ChangeEvent<HTMLTextAreaElement>) => {\n setInternalMessage(event.target.value);\n onMessageChange?.(event.target.value);\n },\n [onMessageChange]\n );\n\n return (\n <div className={cn(theme.input.base)}>\n <Textarea\n ref={inputRef}\n containerClassName={cn(theme.input.input)}\n minRows={1}\n autoFocus\n value={internalMessage}\n defaultValue={defaultValue}\n onKeyPress={handleKeyPress}\n placeholder={placeholder}\n disabled={isLoading || disabled}\n onChange={handleMessageChange}\n />\n <div className={cn(theme.input.actions.base)}>\n {allowedFiles?.length > 0 && (\n <FileInput\n allowedFiles={allowedFiles}\n onFileUpload={handleFileUpload}\n isLoading={isLoading}\n disabled={disabled}\n attachIcon={attachIcon}\n />\n )}\n {isLoading && (\n <Button\n title=\"Stop\"\n className={cn(theme.input.actions.stop)}\n onClick={stopMessage}\n disabled={disabled}\n >\n {stopIcon}\n </Button>\n )}\n <Button\n title=\"Send\"\n className={cn(theme.input.actions.send)}\n onClick={handleSendMessage}\n disabled={isLoading || disabled}\n >\n {sendIcon}\n </Button>\n </div>\n </div>\n );\n }\n);\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport { ChatContext } from '@/ChatContext';\nimport { cn } from 'reablocks';\n\ninterface SessionEmptyProps extends PropsWithChildren {\n}\n\nexport const SessionEmpty: FC<SessionEmptyProps> = ({\n children\n}) => {\n const { theme } = useContext(ChatContext);\n return <div className={cn(theme.empty)}>{children}</div>;\n};\n","import { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn, Ellipsis, DateFormat } from 'reablocks';\nimport { FC, PropsWithChildren, useContext } from 'react';\n\nexport const SessionMessagesHeader: FC<PropsWithChildren> = ({ children }) => {\n const { activeSession, theme } = useContext(ChatContext);\n const Comp = children ? Slot : 'header';\n\n if (!activeSession) {\n return null;\n }\n\n return (\n <Comp className={cn(theme.messages.header)}>\n {children || (\n <>\n <h2 className={cn(theme.messages.title)}>\n <Ellipsis limit={125} value={activeSession.title} />\n </h2>\n <DateFormat\n className={cn(theme.messages.date)}\n date={activeSession.createdAt}\n />\n </>\n )}\n </Comp>\n );\n};\n","import * as React from \"react\";\nconst SvgBack = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-chevron-left\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"m15 18-6-6 6-6\" }));\nexport default SvgBack;\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport { Button, cn } from 'reablocks';\nimport { ChatContext } from '@/ChatContext';\nimport { motion } from 'motion/react';\nimport BackIcon from '@/assets/back.svg?react';\n\ninterface SessionMessagePanelProps extends PropsWithChildren {\n allowBack?: boolean;\n}\n\nexport const SessionMessagePanel: FC<SessionMessagePanelProps> = ({\n children,\n allowBack = true\n}) => {\n const { activeSessionId, theme, isCompact, selectSession, viewType } =\n useContext(ChatContext);\n const isVisible =\n (isCompact && activeSessionId) || viewType === 'chat' || !isCompact;\n\n return (\n isVisible && (\n <motion.div\n initial={{ translateX: '200%' }}\n animate={{\n translateX: '0%',\n transition: {\n type: 'tween',\n ease: 'linear',\n duration: 0.2,\n when: 'beforeChildren'\n }\n }}\n exit={{ translateX: '200%' }}\n className={cn(theme.messages.base, {\n [theme.messages.companion]: isCompact,\n [theme.messages.console]: !isCompact\n })}\n >\n <div className={cn(theme.messages.inner)}>\n {allowBack && isCompact && viewType !== 'chat' && (\n <Button\n variant=\"text\"\n size=\"small\"\n onClick={() => selectSession(null)}\n className={cn(theme.messages.back)}\n >\n <BackIcon />\n Back\n </Button>\n )}\n {children}\n </div>\n </motion.div>\n )\n );\n};\n","import * as React from \"react\";\nconst SvgCopy = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-copy\", ...props }, /* @__PURE__ */ React.createElement(\"rect\", { width: 14, height: 14, x: 8, y: 8, rx: 2, ry: 2 }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" }));\nexport default SvgCopy;\n","export const dark = {\n 'code[class*=\"language-\"]': {\n 'background': '#11111f',\n 'color': '#e2e8f0',\n 'textShadow': '0 1px rgba(0, 0, 0, 0.3)',\n 'fontFamily': '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n 'direction': 'ltr',\n 'textAlign': 'left',\n 'whiteSpace': 'pre',\n 'wordSpacing': 'normal',\n 'wordBreak': 'normal',\n 'lineHeight': '1.5',\n 'MozTabSize': '2',\n 'OTabSize': '2',\n 'tabSize': '2',\n 'WebkitHyphens': 'none',\n 'MozHyphens': 'none',\n 'msHyphens': 'none',\n 'hyphens': 'none'\n },\n 'pre[class*=\"language-\"]': {\n 'background': '#11111f',\n 'color': '#e2e8f0',\n 'textShadow': '0 1px rgba(0, 0, 0, 0.3)',\n 'fontFamily': '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n 'direction': 'ltr',\n 'textAlign': 'left',\n 'whiteSpace': 'pre',\n 'wordSpacing': 'normal',\n 'wordBreak': 'normal',\n 'lineHeight': '1.5',\n 'MozTabSize': '2',\n 'OTabSize': '2',\n 'tabSize': '2',\n 'WebkitHyphens': 'none',\n 'MozHyphens': 'none',\n 'msHyphens': 'none',\n 'hyphens': 'none',\n 'padding': '1em',\n 'margin': '0',\n 'overflow': 'auto'\n },\n 'code[class*=\"language-\"]::-moz-selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"] *::-moz-selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'pre[class*=\"language-\"] *::-moz-selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"]::selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"] *::selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'pre[class*=\"language-\"] *::selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n ':not(pre) > code[class*=\"language-\"]': {\n 'padding': '0.2em 0.3em',\n 'borderRadius': '0.3em',\n 'whiteSpace': 'normal'\n },\n 'comment': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n 'prolog': {\n 'color': '#64748b'\n },\n 'cdata': {\n 'color': '#64748b'\n },\n 'doctype': {\n 'color': '#e2e8f0'\n },\n 'punctuation': {\n 'color': '#e2e8f0'\n },\n 'entity': {\n 'color': '#3b82f6',\n 'cursor': 'help'\n },\n 'attr-name': {\n 'color': '#f59e0b'\n },\n 'class-name': {\n 'color': '#f59e0b'\n },\n 'boolean': {\n 'color': '#3b82f6'\n },\n 'constant': {\n 'color': '#3b82f6'\n },\n 'number': {\n 'color': '#3b82f6'\n },\n 'atrule': {\n 'color': '#f59e0b'\n },\n 'keyword': {\n 'color': '#f472b6'\n },\n 'property': {\n 'color': '#3b82f6'\n },\n 'tag': {\n 'color': '#3b82f6'\n },\n 'symbol': {\n 'color': '#3b82f6'\n },\n 'deleted': {\n 'color': '#ef4444'\n },\n 'important': {\n 'color': '#f472b6'\n },\n 'selector': {\n 'color': '#10b981'\n },\n 'string': {\n 'color': '#10b981'\n },\n 'char': {\n 'color': '#10b981'\n },\n 'builtin': {\n 'color': '#10b981'\n },\n 'inserted': {\n 'color': '#10b981'\n },\n 'regex': {\n 'color': '#10b981'\n },\n 'attr-value': {\n 'color': '#10b981'\n },\n 'attr-value > .token.punctuation': {\n 'color': '#10b981'\n },\n 'variable': {\n 'color': '#60a5fa'\n },\n 'operator': {\n 'color': '#60a5fa'\n },\n 'function': {\n 'color': '#60a5fa'\n },\n 'url': {\n 'color': '#60a5fa'\n },\n 'attr-value > .token.punctuation.attr-equals': {\n 'color': '#e2e8f0'\n },\n 'special-attr > .token.attr-value > .token.value.css': {\n 'color': '#e2e8f0'\n },\n '.language-css .token.selector': {\n 'color': '#3b82f6'\n },\n '.language-css .token.property': {\n 'color': '#e2e8f0'\n },\n '.language-css .token.function': {\n 'color': '#60a5fa'\n },\n '.language-css .token.url > .token.function': {\n 'color': '#60a5fa'\n },\n '.language-css .token.url > .token.string.url': {\n 'color': '#10b981'\n },\n '.language-css .token.important': {\n 'color': '#f472b6'\n },\n '.language-css .token.atrule .token.rule': {\n 'color': '#f472b6'\n },\n '.language-javascript .token.operator': {\n 'color': '#f472b6'\n },\n '.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation': {\n 'color': '#ef4444'\n },\n '.language-json .token.operator': {\n 'color': '#e2e8f0'\n },\n '.language-json .token.null.keyword': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.url': {\n 'color': '#e2e8f0'\n },\n '.language-markdown .token.url > .token.operator': {\n 'color': '#e2e8f0'\n },\n '.language-markdown .token.url-reference.url > .token.string': {\n 'color': '#e2e8f0'\n },\n '.language-markdown .token.url > .token.content': {\n 'color': '#60a5fa'\n },\n '.language-markdown .token.url > .token.url': {\n 'color': '#60a5fa'\n },\n '.language-markdown .token.url-reference.url': {\n 'color': '#60a5fa'\n },\n '.language-markdown .token.blockquote.punctuation': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n '.language-markdown .token.hr.punctuation': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n '.language-markdown .token.code-snippet': {\n 'color': '#10b981'\n },\n '.language-markdown .token.bold .token.content': {\n 'color': '#f59e0b'\n },\n '.language-markdown .token.italic .token.content': {\n 'color': '#f472b6'\n },\n '.language-markdown .token.strike .token.content': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.strike .token.punctuation': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.list.punctuation': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.title.important > .token.punctuation': {\n 'color': '#3b82f6'\n },\n 'bold': {\n 'fontWeight': 'bold'\n },\n 'italic': {\n 'fontStyle': 'italic'\n },\n 'namespace': {\n 'Opacity': '0.8'\n },\n 'token.tab:not(:empty):before': {\n 'color': '#64748b',\n 'textShadow': 'none'\n },\n 'token.cr:before': {\n 'color': '#64748b',\n 'textShadow': 'none'\n },\n 'token.lf:before': {\n 'color': '#64748b',\n 'textShadow': 'none'\n },\n 'token.space:before': {\n 'color': '#64748b',\n 'textShadow': 'none'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item': {\n 'marginRight': '0.4em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button': {\n 'background': '#1e293b',\n 'color': '#94a3b8',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a': {\n 'background': '#1e293b',\n 'color': '#94a3b8',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span': {\n 'background': '#1e293b',\n 'color': '#94a3b8',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n '.line-highlight.line-highlight': {\n 'background': 'rgba(59, 130, 246, 0.08)'\n },\n '.line-highlight.line-highlight:before': {\n 'background': '#1e293b',\n 'color': '#e2e8f0',\n 'padding': '0.1em 0.6em',\n 'borderRadius': '0.3em',\n 'boxShadow': '0 2px 0 0 rgba(0, 0, 0, 0.2)'\n },\n '.line-highlight.line-highlight[data-end]:after': {\n 'background': '#1e293b',\n 'color': '#e2e8f0',\n 'padding': '0.1em 0.6em',\n 'borderRadius': '0.3em',\n 'boxShadow': '0 2px 0 0 rgba(0, 0, 0, 0.2)'\n },\n 'pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before': {\n 'backgroundColor': 'rgba(59, 130, 246, 0.08)'\n },\n '.line-numbers.line-numbers .line-numbers-rows': {\n 'borderRightColor': '#1e293b'\n },\n '.command-line .command-line-prompt': {\n 'borderRightColor': '#1e293b'\n },\n '.line-numbers .line-numbers-rows > span:before': {\n 'color': '#64748b'\n },\n '.command-line .command-line-prompt > span:before': {\n 'color': '#64748b'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-1': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-5': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-9': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-2': {\n 'color': '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-6': {\n 'color': '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-10': {\n 'color': '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-3': {\n 'color': '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-7': {\n 'color': '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-11': {\n 'color': '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-4': {\n 'color': '#f472b6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-8': {\n 'color': '#f472b6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-12': {\n 'color': '#f472b6'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n '.prism-previewer.prism-previewer:before': {\n 'borderColor': '#11111f'\n },\n '.prism-previewer-gradient.prism-previewer-gradient div': {\n 'borderColor': '#11111f',\n 'borderRadius': '0.3em'\n },\n '.prism-previewer-color.prism-previewer-color:before': {\n 'borderRadius': '0.3em'\n },\n '.prism-previewer-easing.prism-previewer-easing:before': {\n 'borderRadius': '0.3em'\n },\n '.prism-previewer.prism-previewer:after': {\n 'borderTopColor': '#11111f'\n },\n '.prism-previewer-flipped.prism-previewer-flipped.after': {\n 'borderBottomColor': '#11111f'\n },\n '.prism-previewer-angle.prism-previewer-angle:before': {\n 'background': '#1e293b'\n },\n '.prism-previewer-time.prism-previewer-time:before': {\n 'background': '#1e293b'\n },\n '.prism-previewer-easing.prism-previewer-easing': {\n 'background': '#1e293b'\n },\n '.prism-previewer-angle.prism-previewer-angle circle': {\n 'stroke': '#e2e8f0',\n 'strokeOpacity': '1'\n },\n '.prism-previewer-time.prism-previewer-time circle': {\n 'stroke': '#e2e8f0',\n 'strokeOpacity': '1'\n },\n '.prism-previewer-easing.prism-previewer-easing circle': {\n 'stroke': '#e2e8f0',\n 'fill': 'transparent'\n },\n '.prism-previewer-easing.prism-previewer-easing path': {\n 'stroke': '#e2e8f0'\n },\n '.prism-previewer-easing.prism-previewer-easing line': {\n 'stroke': '#e2e8f0'\n }\n}\n","export const light = {\n 'code[class*=\"language-\"]': {\n 'background': '#fff',\n 'color': '#1e293b',\n 'textShadow': 'none',\n 'fontFamily': '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n 'direction': 'ltr',\n 'textAlign': 'left',\n 'whiteSpace': 'pre',\n 'wordSpacing': 'normal',\n 'wordBreak': 'normal',\n 'lineHeight': '1.5',\n 'MozTabSize': '2',\n 'OTabSize': '2',\n 'tabSize': '2',\n 'WebkitHyphens': 'none',\n 'MozHyphens': 'none',\n 'msHyphens': 'none',\n 'hyphens': 'none'\n },\n 'pre[class*=\"language-\"]': {\n 'background': '#fff',\n 'color': '#1e293b',\n 'textShadow': 'none',\n 'fontFamily': '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n 'direction': 'ltr',\n 'textAlign': 'left',\n 'whiteSpace': 'pre',\n 'wordSpacing': 'normal',\n 'wordBreak': 'normal',\n 'lineHeight': '1.5',\n 'MozTabSize': '2',\n 'OTabSize': '2',\n 'tabSize': '2',\n 'WebkitHyphens': 'none',\n 'MozHyphens': 'none',\n 'msHyphens': 'none',\n 'hyphens': 'none',\n 'padding': '1em',\n 'margin': '0.5em 0',\n 'overflow': 'auto',\n 'borderRadius': '0.3em',\n 'border': '1px solid #e2e8f0'\n },\n 'code[class*=\"language-\"]::-moz-selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"] *::-moz-selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'pre[class*=\"language-\"] *::-moz-selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"]::selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"] *::selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'pre[class*=\"language-\"] *::selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n ':not(pre) > code[class*=\"language-\"]': {\n 'padding': '0.2em 0.3em',\n 'borderRadius': '0.3em',\n 'whiteSpace': 'normal',\n 'background': '#f1f5f9'\n },\n 'comment': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n 'prolog': {\n 'color': '#64748b'\n },\n 'cdata': {\n 'color': '#64748b'\n },\n 'doctype': {\n 'color': '#1e293b'\n },\n 'punctuation': {\n 'color': '#64748b'\n },\n 'entity': {\n 'color': '#3b82f6',\n 'cursor': 'help'\n },\n 'attr-name': {\n 'color': '#ea580c'\n },\n 'class-name': {\n 'color': '#ea580c'\n },\n 'boolean': {\n 'color': '#3b82f6'\n },\n 'constant': {\n 'color': '#3b82f6'\n },\n 'number': {\n 'color': '#3b82f6'\n },\n 'atrule': {\n 'color': '#ea580c'\n },\n 'keyword': {\n 'color': '#9333ea'\n },\n 'property': {\n 'color': '#3b82f6'\n },\n 'tag': {\n 'color': '#3b82f6'\n },\n 'symbol': {\n 'color': '#3b82f6'\n },\n 'deleted': {\n 'color': '#dc2626'\n },\n 'important': {\n 'color': '#9333ea'\n },\n 'selector': {\n 'color': '#16a34a'\n },\n 'string': {\n 'color': '#16a34a'\n },\n 'char': {\n 'color': '#16a34a'\n },\n 'builtin': {\n 'color': '#16a34a'\n },\n 'inserted': {\n 'color': '#16a34a'\n },\n 'regex': {\n 'color': '#16a34a'\n },\n 'attr-value': {\n 'color': '#16a34a'\n },\n 'attr-value > .token.punctuation': {\n 'color': '#16a34a'\n },\n 'variable': {\n 'color': '#3b82f6'\n },\n 'operator': {\n 'color': '#3b82f6'\n },\n 'function': {\n 'color': '#3b82f6'\n },\n 'url': {\n 'color': '#3b82f6'\n },\n 'attr-value > .token.punctuation.attr-equals': {\n 'color': '#64748b'\n },\n 'special-attr > .token.attr-value > .token.value.css': {\n 'color': '#1e293b'\n },\n '.language-css .token.selector': {\n 'color': '#3b82f6'\n },\n '.language-css .token.property': {\n 'color': '#1e293b'\n },\n '.language-css .token.function': {\n 'color': '#3b82f6'\n },\n '.language-css .token.url > .token.function': {\n 'color': '#3b82f6'\n },\n '.language-css .token.url > .token.string.url': {\n 'color': '#16a34a'\n },\n '.language-css .token.important': {\n 'color': '#9333ea'\n },\n '.language-css .token.atrule .token.rule': {\n 'color': '#9333ea'\n },\n '.language-javascript .token.operator': {\n 'color': '#9333ea'\n },\n '.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation': {\n 'color': '#dc2626'\n },\n '.language-json .token.operator': {\n 'color': '#1e293b'\n },\n '.language-json .token.null.keyword': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.url': {\n 'color': '#1e293b'\n },\n '.language-markdown .token.url > .token.operator': {\n 'color': '#1e293b'\n },\n '.language-markdown .token.url-reference.url > .token.string': {\n 'color': '#1e293b'\n },\n '.language-markdown .token.url > .token.content': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.url > .token.url': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.url-reference.url': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.blockquote.punctuation': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n '.language-markdown .token.hr.punctuation': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n '.language-markdown .token.code-snippet': {\n 'color': '#16a34a'\n },\n '.language-markdown .token.bold .token.content': {\n 'color': '#ea580c'\n },\n '.language-markdown .token.italic .token.content': {\n 'color': '#9333ea'\n },\n '.language-markdown .token.strike .token.content': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.strike .token.punctuation': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.list.punctuation': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.title.important > .token.punctuation': {\n 'color': '#3b82f6'\n },\n 'bold': {\n 'fontWeight': 'bold'\n },\n 'italic': {\n 'fontStyle': 'italic'\n },\n 'namespace': {\n 'Opacity': '0.8'\n },\n 'token.tab:not(:empty):before': {\n 'color': '#94a3b8'\n },\n 'token.cr:before': {\n 'color': '#94a3b8'\n },\n 'token.lf:before': {\n 'color': '#94a3b8'\n },\n 'token.space:before': {\n 'color': '#94a3b8'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item': {\n 'marginRight': '0.4em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button': {\n 'background': '#f1f5f9',\n 'color': '#475569',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a': {\n 'background': '#f1f5f9',\n 'color': '#475569',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span': {\n 'background': '#f1f5f9',\n 'color': '#475569',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n '.line-highlight.line-highlight': {\n 'background': 'rgba(59, 130, 246, 0.08)'\n },\n '.line-highlight.line-highlight:before': {\n 'background': '#f1f5f9',\n 'color': '#1e293b',\n 'padding': '0.1em 0.6em',\n 'borderRadius': '0.3em',\n 'boxShadow': '0 2px 0 0 rgba(0, 0, 0, 0.1)'\n },\n '.line-highlight.line-highlight[data-end]:after': {\n 'background': '#f1f5f9',\n 'color': '#1e293b',\n 'padding': '0.1em 0.6em',\n 'borderRadius': '0.3em',\n 'boxShadow': '0 2px 0 0 rgba(0, 0, 0, 0.1)'\n },\n 'pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before': {\n 'backgroundColor': 'rgba(59, 130, 246, 0.08)'\n },\n '.line-numbers.line-numbers .line-numbers-rows': {\n 'borderRightColor': '#e2e8f0'\n },\n '.command-line .command-line-prompt': {\n 'borderRightColor': '#e2e8f0'\n },\n '.line-numbers .line-numbers-rows > span:before': {\n 'color': '#94a3b8'\n },\n '.command-line .command-line-prompt > span:before': {\n 'color': '#94a3b8'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-1': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-5': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-9': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-2': {\n 'color': '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-6': {\n 'color': '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-10': {\n 'color': '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-3': {\n 'color': '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-7': {\n 'color': '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-11': {\n 'color': '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-4': {\n 'color': '#9333ea'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-8': {\n 'color': '#9333ea'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-12': {\n 'color': '#9333ea'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n '.prism-previewer.prism-previewer:before': {\n 'borderColor': '#fff'\n },\n '.prism-previewer-gradient.prism-previewer-gradient div': {\n 'borderColor': '#fff',\n 'borderRadius': '0.3em'\n },\n '.prism-previewer-color.prism-previewer-color:before': {\n 'borderRadius': '0.3em'\n },\n '.prism-previewer-easing.prism-previewer-easing:before': {\n 'borderRadius': '0.3em'\n },\n '.prism-previewer.prism-previewer:after': {\n 'borderTopColor': '#fff'\n },\n '.prism-previewer-flipped.prism-previewer-flipped.after': {\n 'borderBottomColor': '#fff'\n },\n '.prism-previewer-angle.prism-previewer-angle:before': {\n 'background': '#f1f5f9'\n },\n '.prism-previewer-time.prism-previewer-time:before': {\n 'background': '#f1f5f9'\n },\n '.prism-previewer-easing.prism-previewer-easing': {\n 'background': '#f1f5f9'\n },\n '.prism-previewer-angle.prism-previewer-angle circle': {\n 'stroke': '#1e293b',\n 'strokeOpacity': '1'\n },\n '.prism-previewer-time.prism-previewer-time circle': {\n 'stroke': '#1e293b',\n 'strokeOpacity': '1'\n },\n '.prism-previewer-easing.prism-previewer-easing circle': {\n 'stroke': '#1e293b',\n 'fill': 'transparent'\n },\n '.prism-previewer-easing.prism-previewer-easing path': {\n 'stroke': '#1e293b'\n },\n '.prism-previewer-easing.prism-previewer-easing line': {\n 'stroke': '#1e293b'\n }\n}\n","import React, { FC, PropsWithChildren, ReactElement } from 'react';\nimport { Button, cn } from 'reablocks';\nimport { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';\nimport CopyIcon from '@/assets/copy.svg?react';\nimport { dark } from './themes';\n\nexport interface CodeHighlighterProps extends PropsWithChildren {\n /**\n * The class name to apply to the code block.\n */\n className?: string;\n\n /**\n * The language of the code block.\n */\n language?: string;\n\n /**\n * The class name to apply to the copy button.\n */\n copyClassName?: string;\n\n /**\n * The class name to apply to the toolbar.\n */\n toolbarClassName?: string;\n\n /**\n * Icon to show for copy.\n */\n copyIcon?: ReactElement;\n\n /**\n * The theme to use for the code block.\n */\n theme?: Record<string, string>;\n}\n\nexport const CodeHighlighter: FC<CodeHighlighterProps> = ({\n className,\n children,\n copyClassName,\n copyIcon = <CopyIcon />,\n language,\n toolbarClassName,\n theme = dark\n}) => {\n const match = language?.match(/language-(\\w+)/);\n const lang = match ? match[1] : 'text';\n\n const handleCopy = (text: string) => {\n navigator.clipboard\n .writeText(text)\n .then(() => {\n console.log('Text copied to clipboard');\n })\n .catch(err => {\n console.error('Could not copy text: ', err);\n });\n };\n\n return (\n <div className={cn('relative', className)}>\n <div className={cn(toolbarClassName)}>\n <div>\n {lang}\n </div>\n {copyIcon && (\n <Button\n className={cn(copyClassName)}\n size=\"small\"\n variant=\"text\"\n title=\"Copy code\"\n onClick={() => handleCopy(children as string)}\n >\n {copyIcon}\n </Button>\n )}\n </div>\n <SyntaxHighlighter\n language={lang}\n style={theme}\n >\n {children}\n </SyntaxHighlighter>\n </div>\n );\n};\n","import React, { FC, PropsWithChildren } from 'react';\n\nexport const TableComponent: FC<PropsWithChildren<React.HTMLAttributes<HTMLTableElement>>> = ({ children, ...props }) => (\n <table {...props}>\n {children}\n </table>\n);\n\nexport const TableHeaderCell: FC<PropsWithChildren<React.HTMLAttributes<HTMLTableHeaderCellElement>>> = ({ children, ...props }) => (\n <th {...props}>\n {children}\n </th>\n);\n\nexport const TableDataCell: FC<PropsWithChildren<React.HTMLAttributes<HTMLTableDataCellElement>>> = ({ children, ...props }) => (\n <td {...props}>\n {children}\n </td>\n);\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport ReactMarkdown from 'react-markdown';\nimport { Plugin } from 'unified';\nimport { CodeHighlighter } from './CodeHighlighter';\nimport { cn } from 'reablocks';\nimport { TableComponent, TableHeaderCell, TableDataCell } from './Table';\nimport { ChatContext } from '@/ChatContext';\nimport rehypeKatex from 'rehype-katex';\nimport './Markdown.css';\n\ninterface MarkdownWrapperProps extends PropsWithChildren {\n /**\n * Remark plugins to apply to the markdown content.\n */\n remarkPlugins?: Plugin[];\n\n /**\n * Rehype plugins to apply to the markdown content.\n */\n rehypePlugins?: Plugin[];\n}\n\nexport const Markdown: FC<MarkdownWrapperProps> = ({\n children,\n remarkPlugins,\n rehypePlugins = [rehypeKatex]\n}) => {\n const { theme } = useContext(ChatContext);\n\n return (\n <ReactMarkdown\n remarkPlugins={remarkPlugins as Plugin[]}\n rehypePlugins={rehypePlugins as Plugin[]}\n components={{\n code: ({ className, ...props }) => (\n <CodeHighlighter\n {...props}\n // Ref: https://github.com/remarkjs/react-markdown?tab=readme-ov-file#use-custom-components-syntax-highlight\n language={className}\n className={cn(theme.messages.message.markdown.code, className)}\n copyClassName={cn(theme.messages.message.markdown.copy)}\n toolbarClassName={cn(theme.messages.message.markdown.toolbar)}\n />\n ),\n table: props => (\n <TableComponent\n {...props}\n className={cn(theme.messages.message.markdown.table)}\n />\n ),\n th: props => (\n <TableHeaderCell\n {...props}\n className={cn(theme.messages.message.markdown.th)}\n />\n ),\n td: props => (\n <TableDataCell\n {...props}\n className={cn(theme.messages.message.markdown.td)}\n />\n ),\n a: props => (\n <a {...props} className={cn(theme.messages.message.markdown.a)} />\n ),\n p: props => (\n <p {...props} className={cn(theme.messages.message.markdown.p)} />\n ),\n li: props => (\n <li {...props} className={cn(theme.messages.message.markdown.li)} />\n ),\n ul: props => (\n <ul {...props} className={cn(theme.messages.message.markdown.ul)} />\n ),\n ol: props => (\n <ol {...props} className={cn(theme.messages.message.markdown.ol)} />\n )\n }}\n >\n {children as string}\n </ReactMarkdown>\n );\n};\n","import { findAndReplace } from 'mdast-util-find-and-replace';\n\nconst CVE_REGEX = /(CVE-(19|20)\\d{2}-\\d{4,7})/gi;\n\nexport function remarkCve() {\n return (tree, _file) => {\n findAndReplace(tree, [[\n CVE_REGEX,\n replaceCve as unknown as any\n ]]);\n };\n\n function replaceCve(value, id) {\n return [\n {\n type: 'link',\n url: `https://cve.mitre.org/cgi-bin/cvename.cgi?name=${id}`,\n children: [\n { children: [{ type: 'text', value: value.trim() }] }\n ]\n }\n ];\n }\n}\n","import * as React from \"react\";\nconst SvgFile = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, viewBox: \"0 0 16 16\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M2.7036 1.37034C3.04741 1.02653 3.51373 0.833374 3.99996 0.833374H9.33329H9.33331C9.47275 0.833374 9.59885 0.890449 9.68954 0.98251L13.6843 4.97722C13.7763 5.0679 13.8333 5.19398 13.8333 5.33337L13.8333 5.3379V13.3334C13.8333 13.8196 13.6401 14.2859 13.2963 14.6297C12.9525 14.9736 12.4862 15.1667 12 15.1667H3.99996C3.51373 15.1667 3.04741 14.9736 2.7036 14.6297C2.35978 14.2859 2.16663 13.8196 2.16663 13.3334V2.66671C2.16663 2.18048 2.35978 1.71416 2.7036 1.37034ZM3.99996 1.83337H8.83331V5.33337C8.83331 5.60952 9.05717 5.83337 9.33331 5.83337H12.8333V13.3334C12.8333 13.5544 12.7455 13.7663 12.5892 13.9226C12.4329 14.0789 12.221 14.1667 12 14.1667H3.99996C3.77895 14.1667 3.56698 14.0789 3.4107 13.9226C3.25442 13.7663 3.16663 13.5544 3.16663 13.3334V2.66671C3.16663 2.44569 3.25442 2.23373 3.4107 2.07745C3.56698 1.92117 3.77895 1.83337 3.99996 1.83337ZM9.83331 2.5405L12.1262 4.83337H9.83331V2.5405ZM5.33331 8.16663C5.05717 8.16663 4.83331 8.39048 4.83331 8.66663C4.83331 8.94277 5.05717 9.16663 5.33331 9.16663H10.6666C10.9428 9.16663 11.1666 8.94277 11.1666 8.66663C11.1666 8.39048 10.9428 8.16663 10.6666 8.16663H5.33331ZM4.83331 11.3334C4.83331 11.0572 5.05717 10.8334 5.33331 10.8334H10.6666C10.9428 10.8334 11.1666 11.0572 11.1666 11.3334C11.1666 11.6095 10.9428 11.8334 10.6666 11.8334H5.33331C5.05717 11.8334 4.83331 11.6095 4.83331 11.3334ZM5.33331 5.5C5.05717 5.5 4.83331 5.72386 4.83331 6C4.83331 6.27614 5.05717 6.5 5.33331 6.5H6.66665C6.94279 6.5 7.16665 6.27614 7.16665 6C7.16665 5.72386 6.94279 5.5 6.66665 5.5H5.33331Z\" }));\nexport default SvgFile;\n","import { FC, useContext, ReactElement, Suspense, lazy, useMemo } from 'react';\nimport { ConversationFile } from '@/types';\nimport { ChatContext } from '@/ChatContext';\nimport { cn } from 'reablocks';\nimport FileIcon from '@/assets/file.svg?react';\n\nconst DefaultFileRenderer = lazy(() => import('./renderers/DefaultFileRenderer'));\nconst CSVFileRenderer = lazy(() => import('./renderers/CSVFileRenderer'));\nconst ImageFileRenderer = lazy(() => import('./renderers/ImageFileRenderer'));\nconst PDFFileRenderer = lazy(() => import('./renderers/PDFFileRenderer'));\n\nconst FILE_TYPE_RENDERER_MAP: { [key: string]: FC<any> } = {\n 'image/': ImageFileRenderer,\n 'text/csv': CSVFileRenderer,\n 'application/pdf': PDFFileRenderer,\n};\n\nexport interface MessageFileProps extends ConversationFile {\n /**\n * Icon to show for delete.\n */\n fileIcon?: ReactElement;\n\n /**\n * Limit for the name.\n */\n limit?: number;\n}\n\n/**\n * Base MessageFile component that routes to specific file renderers based on file type.\n */\nexport const MessageFile: FC<MessageFileProps> = ({\n name,\n type,\n url,\n limit = 100,\n fileIcon = <FileIcon />,\n}) => {\n const { theme } = useContext(ChatContext);\n\n // Based on the file type, we will render a specific file renderer.\n const FileRenderer = useMemo(() => {\n const Renderer =\n Object.keys(FILE_TYPE_RENDERER_MAP).find((key) => type?.startsWith(key)) ??\n 'default';\n return FILE_TYPE_RENDERER_MAP[Renderer] || DefaultFileRenderer;\n }, [type]);\n\n return (\n <div\n className={cn(theme.messages.message.files.file.base)}\n >\n <Suspense fallback={<div>Loading...</div>}>\n <FileRenderer name={name} url={url} fileIcon={fileIcon} limit={limit} />\n </Suspense>\n </div>\n );\n};\n","import { ChatContext } from '@/ChatContext';\nimport { ConversationFile } from '@/types';\nimport { cn } from 'reablocks';\nimport { FC, PropsWithChildren, useContext, useState } from 'react';\nimport { MessageFile } from './MessageFile';\nimport { Slot } from '@radix-ui/react-slot';\n\ninterface MessageFilesProps extends PropsWithChildren {\n /**\n * Files to render.\n */\n files: ConversationFile[];\n}\n\nexport const MessageFiles: FC<MessageFilesProps> = ({ files, children }) => {\n const { theme } = useContext(ChatContext);\n const Comp = children ? Slot : MessageFile;\n const [expanded, setExpanded] = useState<boolean>(false);\n\n if (!files || files.length === 0) {\n return null;\n }\n\n // Group image and other files\n const { imageFiles, otherFiles } = files.reduce(\n (acc, file) => {\n if (file.type.startsWith('image/')) {\n acc.imageFiles.push(file);\n } else {\n acc.otherFiles.push(file);\n }\n\n return acc;\n },\n {\n imageFiles: [] as ConversationFile[],\n otherFiles: [] as ConversationFile[]\n }\n );\n\n const maxImageLength = 3;\n const truncateImages = !expanded && imageFiles.length > maxImageLength;\n\n // Renders the image files based on the current expansion state\n const renderImageFiles = (images: ConversationFile[]) => {\n return truncateImages\n ? images.slice(0, maxImageLength).map((image, index) => (\n <figure\n key={index}\n className={index === 0 ? 'col-span-2 row-span-2' : 'relative'}\n >\n <img\n src={image.url}\n alt={image.name}\n className=\"relative w-full h-full object-cover rounded-lg\"\n />\n {index === maxImageLength - 1 && (\n <div\n className=\"absolute top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50 rounded-lg cursor-pointer\"\n onClick={() => setExpanded(true)}\n >\n +{(imageFiles.length - maxImageLength).toLocaleString()}\n </div>\n )}\n </figure>\n ))\n : images.map((image, index) => (\n <Comp key={index} {...image}>\n {children}\n </Comp>\n ));\n };\n\n return (\n <div\n className={cn(\n theme.messages.message.files.base,\n truncateImages ? 'grid grid-rows-2 grid-flow-col gap-2 w-1/3' : ''\n )}\n >\n {imageFiles.length > 0 && renderImageFiles(imageFiles)}\n\n {otherFiles.length > 0 &&\n otherFiles.map((file, index) => (\n <Comp key={index} {...file}>\n {children}\n </Comp>\n ))}\n </div>\n );\n};\n","import { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\nimport { Button, cn } from 'reablocks';\nimport { FC, PropsWithChildren, useContext, useState } from 'react';\nimport { Markdown } from '@/Markdown';\nimport { Plugin } from 'unified';\nimport { MessageFiles } from './MessageFiles';\nimport { ConversationFile } from '@/types';\n\nexport interface MessageQuestionProps extends PropsWithChildren {\n /**\n * Question to render.\n */\n question: string;\n\n /**\n * Array of sources referenced in the conversation\n */\n files?: ConversationFile[];\n}\n\nexport const MessageQuestion: FC<MessageQuestionProps> = ({\n children,\n ...props\n}) => {\n const { theme, remarkPlugins } = useContext(ChatContext);\n const { question, files } = props;\n const Comp = children ? Slot : 'div';\n const [expanded, setExpanded] = useState(false);\n const isLong = question.length > 500;\n\n return (\n <Comp\n className={cn(theme.messages.message.question, {\n [theme.messages.message.overlay]: isLong && !expanded\n })}\n {...props}\n >\n {children || (\n <>\n <MessageFiles files={files} />\n <Markdown remarkPlugins={remarkPlugins as Plugin[]}>\n {question}\n </Markdown>\n {isLong && !expanded && (\n <Button\n variant=\"link\"\n size=\"small\"\n className={theme.messages.message.expand}\n onClick={() => setExpanded(true)}\n >\n Show more\n </Button>\n )}\n </>\n )}\n </Comp>\n );\n};\n","import { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\nimport { motion } from 'motion/react';\nimport { cn } from 'reablocks';\nimport { FC, PropsWithChildren, useContext } from 'react';\nimport { Markdown } from '@/Markdown';\nimport { Plugin } from 'unified';\n\nexport interface MessageResponseProps extends PropsWithChildren {\n /**\n * Response to render.\n */\n response: string;\n\n /**\n * Whether the response is loading.\n */\n isLoading?: boolean;\n}\n\nexport const MessageResponse: FC<MessageResponseProps> = ({\n response,\n isLoading,\n children\n}) => {\n const { theme, isCompact, remarkPlugins } = useContext(ChatContext);\n const Comp = children ? Slot : 'div';\n return (\n <Comp\n data-compact={isCompact}\n className={cn(theme.messages.message.response)}\n >\n {children || (\n <>\n <Markdown remarkPlugins={remarkPlugins as Plugin[]}>\n {response}\n </Markdown>\n {isLoading && (\n <motion.div\n className={cn(theme.messages.message.cursor)}\n animate={{ opacity: [1, 0] }}\n transition={{\n duration: 0.7,\n repeat: Infinity,\n repeatType: 'reverse'\n }}\n />\n )}\n </>\n )}\n </Comp>\n );\n};\n","import { FC, useContext } from 'react';\nimport { ConversationSource } from '@/types';\nimport { ChatContext } from '@/ChatContext';\nimport { Ellipsis, cn } from 'reablocks';\n\nexport interface MessageSourceProps extends ConversationSource {\n /**\n * Limit for the title.\n */\n limit?: number;\n}\n\nexport const MessageSource: FC<MessageSourceProps> = ({ title, url, image, limit = 50 }) => {\n const { theme, isCompact } = useContext(ChatContext);\n\n return (\n <figure\n className={cn(theme.messages.message.sources.source.base, {\n [theme.messages.message.sources.source.companion]: isCompact\n })}\n onClick={() => {\n if (url) {\n window.open(url, '_blank');\n }\n }}\n >\n {image && <img src={image} alt={title} className={cn(theme.messages.message.sources.source.image)} />}\n {(title || url) && (\n <figcaption>\n {title && (\n <span className={cn(theme.messages.message.sources.source.title)}>\n <Ellipsis value={title} limit={limit} />\n </span>\n )}\n {url && (\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\" className={cn(theme.messages.message.sources.source.url)}>\n {url}\n </a>\n )}\n </figcaption>\n )}\n </figure>\n );\n};\n","import { ChatContext } from '@/ChatContext';\nimport { ConversationSource } from '@/types';\nimport { cn } from 'reablocks';\nimport { FC, PropsWithChildren, useContext } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { MessageSource } from './MessageSource';\n\ninterface MessageSourcesProps extends PropsWithChildren {\n /**\n * Sources to render.\n */\n sources: ConversationSource[];\n}\n\nexport const MessageSources: FC<MessageSourcesProps> = ({\n sources,\n children\n}) => {\n const { theme } = useContext(ChatContext);\n const Comp = children ? Slot : MessageSource;\n\n if (!sources || sources.length === 0) {\n return null;\n }\n\n return (\n sources &&\n sources.length > 0 && (\n <div className={cn(theme.messages.message.sources.base)}>\n {sources.map((source, index) => (\n <Comp key={index} {...source}>\n {children}\n </Comp>\n ))}\n </div>\n )\n );\n};\n","import * as React from \"react\";\nconst SvgThumbsDown = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-thumbs-down\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M17 14V2\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z\" }));\nexport default SvgThumbsDown;\n","import * as React from \"react\";\nconst SvgThumbsUp = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-thumbs-up\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M7 10v12\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z\" }));\nexport default SvgThumbsUp;\n","import * as React from \"react\";\nconst SvgRefresh = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-refresh-ccw\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M3 3v5h5\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M16 16h5v5\" }));\nexport default SvgRefresh;\n","import { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn, IconButton } from 'reablocks';\nimport {\n FC,\n PropsWithChildren,\n ReactElement,\n ReactNode,\n useContext\n} from 'react';\nimport CopyIcon from '@/assets/copy.svg?react';\nimport ThumbsDownIcon from '@/assets/thumbs-down.svg?react';\nimport ThumbUpIcon from '@/assets/thumbs-up.svg?react';\nimport RefreshIcon from '@/assets/refresh.svg?react';\n\nexport interface MessageActionsProps extends PropsWithChildren {\n /**\n * Question to be copied\n */\n question: string;\n\n /**\n * Response to be copied\n */\n response?: string;\n\n /**\n * Icon to show for copy.\n */\n copyIcon?: ReactElement;\n\n /**\n * Icon to show for thumbs up.\n */\n thumbsUpIcon?: ReactElement;\n\n /**\n * Icon to show for thumbs down.\n */\n thumbsDownIcon?: ReactElement;\n\n /**\n * Icon to show for refresh.\n */\n refreshIcon?: ReactElement;\n\n /**\n * Callback function to handle copying.\n */\n onCopy?: () => void;\n\n /**\n * Callback function to handle upvoting.\n */\n onUpvote?: () => void;\n\n /**\n * Callback function to handle downvoting.\n */\n onDownvote?: () => void;\n\n /**\n * Callback function to handle refreshing.\n */\n onRefresh?: () => void;\n}\n\nexport const MessageActions: FC<MessageActionsProps> = ({\n children,\n ...props\n}) => {\n const { theme } = useContext(ChatContext);\n const {\n question,\n response,\n copyIcon = <CopyIcon />,\n thumbsUpIcon = <ThumbUpIcon />,\n thumbsDownIcon = <ThumbsDownIcon />,\n refreshIcon = <RefreshIcon />,\n onCopy,\n onUpvote,\n onDownvote,\n onRefresh\n } = props;\n const Comp = children ? Slot : 'div';\n\n const handleCopy = (text: string) => {\n navigator.clipboard\n .writeText(text)\n .then(() => {\n console.log('Text copied to clipboard');\n })\n .catch(err => {\n console.error('Could not copy text: ', err);\n });\n };\n\n return (\n (copyIcon || thumbsDownIcon || thumbsUpIcon || refreshIcon) && (\n <Comp className={cn(theme.messages.message.footer.base)}>\n {children || (\n <>\n {copyIcon && (\n <IconButton\n variant=\"text\"\n disablePadding\n title=\"Copy question and response\"\n className={cn(theme.messages.message.footer.copy)}\n onClick={\n onCopy ? onCopy : () => handleCopy(`${question}\\n${response}`)\n }\n >\n {copyIcon}\n </IconButton>\n )}\n {thumbsUpIcon && (\n <IconButton\n variant=\"text\"\n disablePadding\n title=\"Upvote\"\n className={cn(theme.messages.message.footer.upvote)}\n onClick={onUpvote}\n >\n {thumbsUpIcon}\n </IconButton>\n )}\n {thumbsDownIcon && (\n <IconButton\n variant=\"text\"\n disablePadding\n title=\"Downvote\"\n className={cn(theme.messages.message.footer.downvote)}\n onClick={onDownvote}\n >\n {thumbsDownIcon}\n </IconButton>\n )}\n {refreshIcon && (\n <IconButton\n variant=\"text\"\n disablePadding\n title=\"Refresh\"\n className={cn(theme.messages.message.footer.refresh)}\n onClick={onRefresh}\n >\n {refreshIcon}\n </IconButton>\n )}\n </>\n )}\n </Comp>\n )\n );\n};\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport { ChatContext } from '@/ChatContext';\nimport { Card, cn, Divider } from 'reablocks';\nimport { Conversation } from '@/types';\nimport { motion } from 'motion/react';\nimport { MessageQuestion } from './MessageQuestion';\nimport { MessageResponse } from './MessageResponse';\nimport { MessageSources } from './MessageSources';\nimport { MessageActions } from './MessageActions';\n\nconst messageVariants = {\n hidden: {\n opacity: 0,\n y: 20\n },\n visible: {\n opacity: 1,\n y: 0,\n transition: {\n duration: 0.3\n }\n }\n};\n\ninterface SessionMessageProps extends PropsWithChildren {\n /**\n * Conversation to render.\n */\n conversation: Conversation;\n\n /**\n * Whether the message is the last one in the list.\n * This let's the chat know when to show the loading cursor.\n */\n isLast?: boolean;\n}\n\nexport const SessionMessage: FC<SessionMessageProps> = ({\n conversation,\n isLast,\n children\n}) => {\n const { theme, isLoading } = useContext(ChatContext);\n\n return (\n <motion.div key={conversation.id} variants={messageVariants}>\n <Card className={cn(theme.messages.message.base)}>\n {children || (\n <>\n <MessageQuestion question={conversation.question} files={conversation.files} />\n <MessageResponse\n response={conversation.response}\n isLoading={isLast && isLoading}\n />\n <MessageSources sources={conversation.sources} />\n <MessageActions\n question={conversation.question}\n response={conversation.response}\n />\n </>\n )}\n </Card>\n {!isLast && (\n <Divider />\n )}\n </motion.div>\n );\n};\n","import React, {\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState\n} from 'react';\nimport { SessionEmpty } from './SessionEmpty';\nimport { ChatContext } from '@/ChatContext';\nimport { Button, cn, useInfinityList } from 'reablocks';\nimport { AnimatePresence, motion } from 'motion/react';\nimport { Conversation } from '@/types';\nimport { SessionMessage } from './SessionMessage/SessionMessage';\n\nconst containerVariants = {\n hidden: {},\n visible: {\n transition: {\n staggerChildren: 0.07,\n when: 'beforeChildren'\n }\n }\n};\n\ninterface SessionMessagesProps {\n /**\n * Content to display when there are no sessions selected or a new session is started.\n */\n newSessionContent?: string | ReactNode;\n\n /**\n * Limit the number of results returned. Clientside pagination.\n */\n limit?: number | null;\n\n /**\n * Text to display for the show more button.\n */\n showMoreText?: string;\n\n /**\n * Whether to automatically scroll to the bottom of the content.\n */\n autoScroll?: boolean;\n\n /**\n * Render function for the session messages.\n */\n children?: (conversations: Conversation[]) => ReactNode;\n}\n\nexport const SessionMessages: React.FC<SessionMessagesProps> = ({\n children,\n newSessionContent,\n limit = 10,\n showMoreText = 'Show more',\n autoScroll = true\n}) => {\n const { activeSession, theme } = useContext(ChatContext);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const [isAnimating, setIsAnimating] = useState(true);\n\n useEffect(() => {\n if (contentRef.current && autoScroll) {\n // Scroll to the bottom of the content in animation queue\n requestAnimationFrame(\n () => (contentRef.current.scrollTop = contentRef.current.scrollHeight)\n );\n }\n // If we update the active session or load the page initially ( onAnimationComplete )\n // let's scroll to the bottom of the page.\n }, [activeSession, autoScroll, isAnimating]);\n\n function handleShowMore() {\n showNext(limit);\n requestAnimationFrame(() => (contentRef.current.scrollTop = 0));\n }\n\n // Reverse the conversations so the last one is the first one\n const reversedConvos = useMemo(\n () => [...(activeSession?.conversations ?? [])].reverse(),\n [activeSession]\n );\n\n const { data, hasMore, showNext } = useInfinityList({\n items: reversedConvos,\n size: limit\n });\n\n // Reverse the data to the last one last now\n const reReversedConvo = useMemo(() => [...data].reverse(), [data]);\n\n // If we are not paging, just return the conversations\n const convosToRender = limit ? reReversedConvo : activeSession?.conversations;\n\n if (!activeSession) {\n return <SessionEmpty>{newSessionContent}</SessionEmpty>;\n }\n\n return (\n <div className={cn(theme.messages.content)} ref={contentRef}>\n {hasMore && (\n <Button\n variant=\"outline\"\n className={cn(theme.messages.showMore)}\n fullWidth\n onClick={handleShowMore}\n >\n {showMoreText}\n </Button>\n )}\n <AnimatePresence>\n <motion.div\n variants={containerVariants}\n key={activeSession?.id}\n initial=\"hidden\"\n animate=\"visible\"\n onAnimationComplete={() => {\n requestAnimationFrame(() => setIsAnimating(false));\n }}\n >\n {children\n ? children(convosToRender)\n : convosToRender.map((conversation, index) => (\n <SessionMessage\n key={conversation.id}\n conversation={conversation}\n isLast={index === conversation.length - 1}\n />\n ))}\n </motion.div>\n </AnimatePresence>\n </div>\n );\n};\n","export interface ChatTheme {\n base: string;\n console: string;\n companion: string;\n empty: string;\n appbar: string;\n sessions: {\n base: string;\n console: string;\n companion: string;\n create: string;\n group: string;\n session: {\n base: string;\n active: string;\n delete: string;\n };\n };\n messages: {\n base: string;\n console: string;\n companion: string;\n back: string;\n inner: string;\n title: string;\n date: string;\n content: string;\n header: string;\n showMore: string;\n message: {\n base: string;\n question: string;\n response: string;\n cursor: string;\n overlay: string;\n expand: string;\n files: {\n base: string;\n file: {\n base: string;\n name: string;\n };\n };\n sources: {\n base: string;\n source: {\n base: string;\n companion: string;\n image: string;\n title: string;\n url: string;\n };\n };\n markdown: {\n p: string;\n a: string;\n table: string;\n th: string;\n td: string;\n code: string;\n toolbar: string;\n li: string;\n ul: string;\n ol: string;\n copy: string;\n };\n footer: {\n base: string;\n copy: string;\n upvote: string;\n downvote: string;\n refresh: string;\n };\n };\n };\n input: {\n base: string;\n upload: string;\n input: string;\n actions: {\n base: string;\n send: string;\n stop: string;\n };\n };\n}\n\nexport const chatTheme: ChatTheme = {\n base: 'dark:text-white text-gray-500',\n console: 'flex w-full gap-4 h-full',\n companion: 'w-full h-full overflow-hidden',\n empty: 'text-center flex-1',\n appbar: 'flex p-5',\n sessions: {\n base: 'overflow-auto',\n console:\n 'min-w-[150px] w-[30%] max-w-[300px] dark:bg-[#11111F] bg-[#F2F3F7] p-5 rounded-3xl',\n companion: 'w-full h-full',\n group:\n 'text-xs dart:text-gray-400 text-gray-700 mt-4 hover:bg-transparent mb-1',\n create: 'relative mb-4 rounded-[10px] text-white',\n session: {\n base: [\n 'group my-1 rounded-[10px] p-2 text-gray-500 border border-transparent hover:bg-gray-300 hover:border-gray-400 [&_svg]:text-gray-500',\n 'dark:text-typography dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:border-gray-700/50 dark:[&_svg]:text-gray-200'\n ].join(' '),\n active: [\n 'border border-gray-300 hover:border-gray-400 text-gray-700 bg-gray-200 hover:bg-gray-300 ',\n 'dark:text-gray-500 dark:bg-gray-800/70 dark:border-gray-700/50 dark:text-white dark:border-gray-700/70 dark:hover:bg-gray-800/50',\n '[&_button]:opacity-100!'\n ].join(' '),\n delete: '[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:opacity-50!'\n }\n },\n messages: {\n base: '',\n console: 'flex flex-col mx-5 flex-1 overflow-hidden',\n companion: 'flex w-full h-full',\n back: 'self-start p-0 my-2',\n inner: 'flex-1 h-full flex flex-col',\n title: ['text-base font-bold text-gray-500', 'dark:text-gray-200'].join(\n ' '\n ),\n date: 'text-xs whitespace-nowrap text-gray-400',\n content: [\n 'mt-2 flex-1 overflow-auto [&_hr]:bg-gray-200',\n 'dark:[&_hr]:bg-gray-800/60'\n ].join(' '),\n header: 'flex justify-between items-center gap-2',\n showMore: 'mb-4',\n message: {\n base: 'mt-4 mb-4 flex flex-col p-0 rounded-sm border-none bg-transparent',\n question: [\n 'relative font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-gray-200 border-gray-300 text-gray-900',\n 'dark:bg-gray-900/60 dark:border-gray-700/50 dark:text-gray-100'\n ].join(' '),\n response: [\n 'relative data-[compact=false]:px-4 text-gray-900',\n 'dark:text-gray-100'\n ].join(' '),\n overlay:\n \"overflow-y-hidden max-h-[350px] after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-16 after:bg-linear-to-b after:from-transparent dark:after:to-gray-900 after:to-gray-200\",\n cursor: 'inline-block w-1 h-4 bg-current',\n expand: 'absolute bottom-1 right-1 z-10',\n files: {\n base: 'mb-2 flex flex-wrap gap-3 ',\n file: {\n base: [\n 'flex items-center gap-2 border border-gray-300 px-3 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n name: ['text-sm text-gray-500', 'dark:text-gray-200'].join(' ')\n }\n },\n sources: {\n base: 'my-4 flex flex-wrap gap-3',\n source: {\n base: [\n 'flex gap-2 border border-gray-200 px-4 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n companion: 'flex-1 px-3 py-1.5',\n image: 'max-w-10 max-h-10 rounded-md w-full h-fit self-center',\n title: 'text-md block',\n url: 'text-sm text-blue-400 underline'\n }\n },\n markdown: {\n copy: 'sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50',\n p: 'mb-2',\n a: 'text-blue-400 underline',\n table: 'table-auto w-full m-2',\n th: 'px-4 py-2 text-left font-bold border-b border-gray-500',\n td: 'px-4 py-2',\n code: 'm-2 rounded-b relative',\n toolbar:\n 'text-xs dark:bg-gray-700/50 flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gray-200 ',\n li: 'mb-2 ml-6',\n ul: 'mb-4 list-disc',\n ol: 'mb-4 list-decimal'\n },\n footer: {\n base: 'mt-3 flex gap-1.5',\n copy: [\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-200 hover:text-gray-500',\n 'dark:hover:bg-gray-800 dark:hover:text-white text-gray-400'\n ].join(' '),\n upvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n downvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n refresh:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400'\n }\n }\n },\n input: {\n base: 'flex mt-4 relative',\n upload: ['px-5 py-2 text-gray-400 size-10', 'dark:gray-500'].join(' '),\n input: [\n 'w-full border rounded-3xl px-3 py-2 pr-16 text-gray-500 border-gray-200 hover:bg-blue-100 hover:border-blue-500 after:hidden after:mx-10! bg-white [&>textarea]:w-full [&>textarea]:flex-none',\n 'dark:border-gray-700/50 dark:text-gray-200 dark:bg-gray-950 dark:hover:bg-blue-950/40'\n ].join(' '),\n actions: {\n base: 'absolute flex gap-2 items-center right-5 inset-y-1/2 -translate-y-1/2 z-10',\n send: [\n 'px-3 py-3 hover:bg-primary-hover rounded-full bg-gray-200 hover:bg-gray-300 text-gray-500',\n 'dark:text-white light:text-gray-500 dark:bg-gray-800 dark:hover:bg-gray-700'\n ].join(' '),\n stop: 'px-2 py-2 bg-red-500 text-white rounded-full hover:bg-red-700 '\n }\n }\n};\n","import { useCallback, useEffect, useState } from 'react';\n\nexport const useDimensions = () => {\n const [ref, setRef] = useState<HTMLElement | null>(null);\n const [width, setWidth] = useState<number | undefined>(undefined);\n\n const observe = useCallback((element: HTMLElement | null) => {\n if (element) setRef(element);\n }, []);\n\n useEffect(() => {\n if (!ref) return;\n\n const resizeObserver = new ResizeObserver(entries => {\n for (let entry of entries) {\n setWidth(entry.contentRect.width);\n }\n });\n\n resizeObserver.observe(ref);\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [ref]);\n\n return { width, observe };\n};\n","import {\n CSSProperties,\n FC,\n PropsWithChildren,\n useCallback,\n useEffect,\n useMemo,\n useState\n} from 'react';\nimport { useHotkeys } from 'reakeys';\nimport { cn } from 'reablocks';\nimport { Session } from './types';\nimport { ChatTheme, chatTheme } from './theme';\nimport { ChatContext, ChatViewType } from './ChatContext';\nimport { Plugin } from 'unified';\nimport { AnimatePresence } from 'motion/react';\nimport { useDimensions } from './utils/useDimensions';\nimport remarkGfm from 'remark-gfm';\nimport remarkYoutube from 'remark-youtube';\nimport remarkMath from 'remark-math';\n\nexport interface ChatProps extends PropsWithChildren {\n /**\n * The style to apply to the root element.\n */\n style?: CSSProperties;\n\n /**\n * The class name to apply to the root element.\n */\n className?: string;\n\n /**\n * The type of prompt to display.\n *\n * - Companion: Smaller prompt screen with session lists.\n * - Console: Full screen experience.\n * - Chat: Only chat, no sessions.\n */\n viewType?: ChatViewType;\n\n /**\n * The list of sessions to display.\n */\n sessions: Session[];\n\n /**\n * The ID of the currently active session.\n */\n activeSessionId?: string;\n\n /**\n * Custom theme for the chat.\n */\n theme?: ChatTheme;\n\n /**\n * Remark plugins to apply to the request/response.\n */\n remarkPlugins?: Plugin[];\n\n /**\n * Whether to display a loading state.\n */\n isLoading?: boolean;\n\n /**\n * Whether to disable the chat.\n */\n disabled?: boolean;\n\n /**\n * Callback function to handle when a session is selected.\n */\n onSelectSession?: (sessionId: string) => void;\n\n /**\n * Callback function to handle when a session is deleted.\n */\n onDeleteSession?: (sessionId: string) => void;\n\n /**\n * Callback function to handle creating a new session.\n */\n onNewSession?: () => void;\n\n /**\n * Callback function to handle sending a new message.\n */\n onSendMessage?: (message: string) => void;\n\n /**\n * Callback function to handle stopping the current action.\n */\n onStopMessage?: () => void;\n\n /**\n * Callback function to handle file upload.\n */\n onFileUpload?: (file: File) => void;\n}\n\nexport const Chat: FC<ChatProps> = ({\n children,\n viewType = 'console',\n sessions,\n onSelectSession,\n onDeleteSession,\n onSendMessage,\n onStopMessage,\n onFileUpload,\n isLoading,\n activeSessionId,\n theme = chatTheme,\n onNewSession,\n remarkPlugins = [remarkGfm, remarkYoutube, remarkMath],\n disabled,\n style,\n className\n}) => {\n const [internalActiveSessionID, setInternalActiveSessionID] = useState<\n string | null\n >(activeSessionId);\n\n const { width, observe } = useDimensions();\n const isCompact = viewType === 'companion' || (width && width < 767);\n\n useEffect(() => {\n setInternalActiveSessionID(activeSessionId);\n }, [activeSessionId]);\n\n const handleSelectSession = useCallback(\n (sessionId: string) => {\n setInternalActiveSessionID(sessionId);\n onSelectSession?.(sessionId);\n },\n [onSelectSession]\n );\n\n const handleDeleteSession = useCallback(\n (sessionId: string) => {\n setInternalActiveSessionID(undefined);\n onDeleteSession?.(sessionId);\n },\n [onDeleteSession]\n );\n\n const handleCreateNewSession = useCallback(() => {\n setInternalActiveSessionID(undefined);\n onNewSession?.();\n }, [onNewSession]);\n\n useHotkeys([\n {\n name: 'Create new session',\n category: 'Chat',\n keys: 'meta+shift+s',\n callback: event => {\n event.preventDefault();\n handleCreateNewSession();\n }\n }\n ]);\n\n const activeSession = useMemo(\n () => sessions.find(session => session.id === internalActiveSessionID),\n [sessions, internalActiveSessionID]\n );\n\n const contextValue = useMemo(\n () => ({\n sessions,\n activeSession,\n remarkPlugins: remarkPlugins as Plugin[],\n theme,\n disabled,\n isLoading,\n isCompact,\n viewType,\n activeSessionId: internalActiveSessionID,\n selectSession: handleSelectSession,\n deleteSession: handleDeleteSession,\n createSession: handleCreateNewSession,\n sendMessage: onSendMessage,\n stopMessage: onStopMessage,\n fileUpload: onFileUpload\n }),\n [\n isLoading,\n isCompact,\n viewType,\n disabled,\n theme,\n remarkPlugins,\n sessions,\n activeSession,\n internalActiveSessionID,\n handleSelectSession,\n handleDeleteSession,\n handleCreateNewSession,\n onSendMessage,\n onStopMessage,\n onFileUpload\n ]\n );\n\n return (\n <ChatContext.Provider value={contextValue}>\n <AnimatePresence initial={false}>\n <div\n ref={observe}\n className={cn(className, theme.base, {\n [theme.companion]: isCompact,\n [theme.console]: !isCompact\n })}\n style={style}\n >\n {children}\n </div>\n </AnimatePresence>\n </ChatContext.Provider>\n );\n};\n","import * as React from \"react\";\nconst SvgTrash = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 14, height: 14, viewBox: \"0 0 14 14\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"Delete\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M5.97905 1.16666C5.90859 1.16576 5.83895 1.18189 5.77605 1.21368C5.71316 1.24547 5.65888 1.29199 5.61783 1.34926C5.57677 1.40654 5.55016 1.47288 5.54025 1.54265C5.53034 1.61242 5.53743 1.68355 5.56092 1.75H4.27007C3.7342 1.75 3.2324 2.01817 2.93535 2.46435L2.24492 3.5H2.18738C2.12941 3.49918 2.07185 3.50989 2.01805 3.5315C1.96425 3.55312 1.91529 3.58522 1.874 3.62593C1.83271 3.66663 1.79993 3.71514 1.77755 3.76863C1.75518 3.82211 1.74365 3.87952 1.74365 3.9375C1.74365 3.99548 1.75518 4.05288 1.77755 4.10636C1.79993 4.15985 1.83271 4.20836 1.874 4.24907C1.91529 4.28977 1.96425 4.32187 2.01805 4.34349C2.07185 4.3651 2.12941 4.37582 2.18738 4.375H2.41012C2.44765 4.38067 2.48576 4.38143 2.52348 4.37727L3.24468 11.1084C3.33169 11.9199 4.02367 12.5417 4.83973 12.5417H9.15947C9.97553 12.5417 10.6675 11.9199 10.7545 11.1084L11.4763 4.37727C11.5133 4.38124 11.5506 4.38047 11.5874 4.375H11.8124C11.8704 4.37582 11.9279 4.3651 11.9817 4.34349C12.0355 4.32187 12.0845 4.28977 12.1258 4.24907C12.1671 4.20836 12.1998 4.15985 12.2222 4.10636C12.2446 4.05288 12.2561 3.99548 12.2561 3.9375C12.2561 3.87952 12.2446 3.82211 12.2222 3.76863C12.1998 3.71514 12.1671 3.66663 12.1258 3.62593C12.0845 3.58522 12.0355 3.55312 11.9817 3.5315C11.9279 3.50989 11.8704 3.49918 11.8124 3.5H11.7548L11.0644 2.46435C10.7671 2.01841 10.2654 1.75 9.7297 1.75H8.43885C8.46234 1.68355 8.46943 1.61242 8.45952 1.54265C8.44961 1.47288 8.423 1.40654 8.38194 1.34926C8.34089 1.29199 8.2866 1.24547 8.22371 1.21368C8.16082 1.18189 8.09118 1.16576 8.02072 1.16666H5.97905ZM4.27007 2.625H9.7297C9.97394 2.625 10.2009 2.74639 10.3364 2.9497L10.7033 3.5H3.29651L3.66338 2.9497L3.66395 2.94913C3.79913 2.74608 4.02543 2.625 4.27007 2.625ZM3.40361 4.375H10.5962L9.88465 11.015C9.8445 11.3894 9.53575 11.6667 9.15947 11.6667H4.83973C4.46345 11.6667 4.15527 11.3894 4.11512 11.015L3.40361 4.375Z\", fill: \"currentColor\" })));\nexport default SvgTrash;\n","import * as React from \"react\";\nconst SvgChat = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 16, height: 17, viewBox: \"0 0 16 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M8 3C4.55375 3 1.75 5.23753 1.75 7.98828C1.75 9.70653 2.83659 11.2762 4.62109 12.188C4.11184 13.0465 3.62587 13.7378 3.62012 13.7461C3.50687 13.9071 3.49862 14.1196 3.59912 14.2891C3.69012 14.4418 3.8543 14.5342 4.0293 14.5342C4.0483 14.5342 4.06743 14.533 4.08643 14.5308C4.15168 14.5233 5.66214 14.3364 7.50439 12.9604C7.67239 12.9712 7.8385 12.9766 8 12.9766C11.4462 12.9766 14.25 10.739 14.25 7.98828C14.25 5.23753 11.4462 3 8 3ZM8 4C10.8948 4 13.25 5.78903 13.25 7.98828C13.25 10.1875 10.8948 11.9766 8 11.9766C7.8055 11.9766 7.60225 11.968 7.396 11.9497C7.271 11.9382 7.1454 11.9752 7.0459 12.0527C6.3589 12.5855 5.72033 12.9308 5.20508 13.1528C5.38383 12.8648 5.57691 12.5418 5.76416 12.2061C5.83416 12.0813 5.84705 11.9324 5.7998 11.7974C5.75255 11.6624 5.64983 11.5542 5.51758 11.5C3.81033 10.7993 2.75 9.45328 2.75 7.98828C2.75 5.78903 5.10525 4 8 4ZM5.5 7.25C5.08575 7.25 4.75 7.58575 4.75 8C4.75 8.41425 5.08575 8.75 5.5 8.75C5.91425 8.75 6.25 8.41425 6.25 8C6.25 7.58575 5.91425 7.25 5.5 7.25ZM8 7.25C7.58575 7.25 7.25 7.58575 7.25 8C7.25 8.41425 7.58575 8.75 8 8.75C8.41425 8.75 8.75 8.41425 8.75 8C8.75 7.58575 8.41425 7.25 8 7.25ZM10.5 7.25C10.0857 7.25 9.75 7.58575 9.75 8C9.75 8.41425 10.0857 8.75 10.5 8.75C10.9143 8.75 11.25 8.41425 11.25 8C11.25 7.58575 10.9143 7.25 10.5 7.25Z\", fill: \"currentColor\" }));\nexport default SvgChat;\n","import { FC, PropsWithChildren, ReactElement, useContext } from 'react';\nimport { ListItem, IconButton, cn, Ellipsis } from 'reablocks';\nimport { Session } from '@/types';\nimport TrashIcon from '@/assets/trash.svg?react';\nimport ChatIcon from '@/assets/chat.svg?react';\nimport { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\n\nexport interface SessionListItemProps extends PropsWithChildren {\n /**\n * Session to display.\n */\n session: Session;\n\n /**\n * Indicates whether the session is deletable.\n */\n deletable?: boolean;\n\n /**\n * Icon to show for delete.\n */\n deleteIcon?: ReactElement;\n\n /**\n * Icon to show for chat.\n */\n chatIcon?: ReactElement;\n\n /**\n * Limit for the ellipsis.\n */\n limit?: number;\n}\n\nexport const SessionListItem: FC<SessionListItemProps> = ({\n children,\n session,\n deletable = true,\n limit = 100,\n deleteIcon = <TrashIcon />,\n chatIcon = <ChatIcon className=\"mr-2\" />\n}) => {\n const { activeSessionId, selectSession, deleteSession, theme } =\n useContext(ChatContext);\n const Comp = children ? Slot : ListItem;\n\n return (\n <Comp\n dense\n disableGutters\n active={session.id === activeSessionId}\n className={cn(theme.sessions.session.base, {\n [theme.sessions.session.active]: session.id === activeSessionId\n })}\n onClick={() => selectSession?.(session.id)}\n start={chatIcon}\n end={\n <>\n {deletable && (\n <IconButton\n size=\"small\"\n variant=\"text\"\n onClick={e => {\n e.stopPropagation();\n deleteSession(session.id);\n }}\n className={cn(theme.sessions.session.delete)}\n >\n {deleteIcon}\n </IconButton>\n )}\n </>\n }\n >\n {children || <Ellipsis value={session.title} limit={limit} />}\n </Comp>\n );\n};\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport { List, cn } from 'reablocks';\nimport { ChatContext } from '@/ChatContext';\nimport { motion } from 'motion/react';\nimport { Template } from '@/types';\nimport { SessionListItem } from './SessionListItem';\n\nexport interface SessionsListProps extends PropsWithChildren {\n /**\n * Templates to show when no session is active\n */\n templates?: Template[];\n}\n\nexport const SessionsList: FC<SessionsListProps> = ({\n children,\n templates\n}) => {\n const { theme, isCompact, activeSessionId, createSession } =\n useContext(ChatContext);\n const isVisible = isCompact && !activeSessionId;\n\n return (\n (!isCompact || isVisible) && (\n <motion.div\n initial={{ translateX: '-100%' }}\n animate={{\n translateX: '0%',\n transition: {\n type: 'tween',\n ease: 'linear',\n duration: 0.2,\n when: 'beforeChildren'\n }\n }}\n exit={{ translateX: '-100%' }}\n className={cn(theme.sessions.base, {\n [theme.sessions.companion]: isCompact,\n [theme.sessions.console]: !isCompact\n })}\n >\n <List>{children}</List>\n {templates && !activeSessionId && (\n <div className=\"mt-4\">\n {templates.map(template => (\n <div key={template.id} onClick={() => createSession?.()}>\n <SessionListItem\n session={{\n id: template.id,\n title: template.title,\n conversations: []\n }}\n chatIcon={template.icon}\n deletable={false}\n />\n </div>\n ))}\n </div>\n )}\n </motion.div>\n )\n );\n};\n","import * as React from \"react\";\nconst SvgPlus = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 17, height: 17, viewBox: \"0 0 17 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"add\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M13.1667 9.16658H9.16671V13.1666H7.83337V9.16658H3.83337V7.83325H7.83337V3.83325H9.16671V7.83325H13.1667V9.16658Z\", fill: \"currentColor\" })));\nexport default SvgPlus;\n","import { Button, cn } from 'reablocks';\nimport { FC, PropsWithChildren, ReactNode, useContext } from 'react';\nimport { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport PlusIcon from '@/assets/plus.svg?react';\n\ninterface NewSessionButtonProps extends PropsWithChildren {\n /**\n * Text for the new session button.\n */\n newSessionText?: string | ReactNode;\n}\n\nexport const NewSessionButton: FC<NewSessionButtonProps> = ({\n children,\n newSessionText = 'New Session'\n}) => {\n const { theme, createSession, disabled } = useContext(ChatContext);\n const Comp = children ? Slot : Button;\n\n return (\n <>\n <Comp\n fullWidth\n disableMargins\n color=\"primary\"\n startAdornment={<PlusIcon />}\n className={cn(theme.sessions.create)}\n disabled={disabled}\n onClick={createSession}\n >\n {children || newSessionText}\n </Comp>\n </>\n );\n};\n","import {\n format,\n isToday,\n isYesterday,\n isThisWeek,\n isThisYear,\n parseISO,\n differenceInYears\n} from 'date-fns';\nimport { Session } from '@/types';\n\nexport interface GroupedSessions {\n heading: string;\n sessions: Session[];\n}\n\nconst sortOrder = [\n 'Today',\n 'Yesterday',\n 'Last Week',\n 'Last Month',\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n 'Last Year'\n];\n\nexport function groupSessionsByDate(sessions: Session[]): GroupedSessions[] {\n const grouped: any = {};\n\n sessions.forEach(session => {\n const createdAt = new Date(session.createdAt);\n const now = new Date();\n\n if (isToday(createdAt)) {\n if (!grouped['Today']) grouped['Today'] = [];\n grouped['Today'].push(session);\n } else if (isYesterday(createdAt)) {\n if (!grouped['Yesterday']) grouped['Yesterday'] = [];\n grouped['Yesterday'].push(session);\n } else if (isThisWeek(createdAt)) {\n if (!grouped['Last Week']) grouped['Last Week'] = [];\n grouped['Last Week'].push(session);\n } else if (differenceInYears(now, createdAt) === 0) {\n const monthDiff = now.getMonth() - createdAt.getMonth();\n if (\n monthDiff === 1 ||\n (monthDiff === 0 && now.getDate() > createdAt.getDate())\n ) {\n if (!grouped['Last Month']) grouped['Last Month'] = [];\n grouped['Last Month'].push(session);\n } else {\n const monthName = format(createdAt, 'MMMM');\n if (!grouped[monthName]) grouped[monthName] = [];\n grouped[monthName].push(session);\n }\n } else {\n if (!grouped['Last Year']) grouped['Last Year'] = [];\n grouped['Last Year'].push(session);\n }\n });\n\n // Remove empty groups\n Object.keys(grouped).forEach(key => {\n if (grouped[key].length === 0) {\n delete grouped[key];\n }\n });\n\n // Sort groups\n const sortedGroups = Object.keys(grouped).sort(\n (a, b) => sortOrder.indexOf(a) - sortOrder.indexOf(b)\n );\n\n return sortedGroups.map(heading => ({\n heading,\n sessions: grouped[heading].sort(\n (a, b) =>\n new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()\n )\n }));\n}\n","import { FC, PropsWithChildren, ReactNode, useContext } from 'react';\nimport { ChatContext } from '@/ChatContext';\nimport { ListItem, cn } from 'reablocks';\n\ninterface SessionsGroupProps extends PropsWithChildren {\n /**\n * Heading for the session group.\n */\n heading?: string | ReactNode;\n}\n\nexport const SessionsGroup: FC<SessionsGroupProps> = ({\n heading,\n children,\n}) => {\n const { theme } = useContext(ChatContext);\n return (\n <>\n {heading && (\n <ListItem\n disableGutters\n disablePadding\n className={cn(theme.sessions.group)}\n >\n {heading}\n </ListItem>\n )}\n {children}\n </>\n );\n};\n","import { FC, ReactNode, useContext, useMemo } from 'react';\nimport { GroupedSessions, groupSessionsByDate } from '@/utils/grouping';\nimport { ChatContext } from '@/ChatContext';\nimport { SessionsGroup } from './SessionsGroup';\nimport { SessionListItem } from './SessionListItem';\n\nexport interface SessionGroupsProps {\n /**\n * Render function for the session groups.\n */\n children?: (groups: GroupedSessions[]) => ReactNode;\n}\n\nexport const SessionGroups: FC<SessionGroupsProps> = ({ children }) => {\n const { sessions } = useContext(ChatContext);\n const groups = useMemo(() => groupSessionsByDate(sessions), [sessions]);\n\n return (\n <>\n {children\n ? children(groups)\n : groups.map(({ heading, sessions }) => (\n <SessionsGroup heading={heading}>\n {sessions.map(session => (\n <SessionListItem key={session.id} session={session} />\n ))}\n </SessionsGroup>\n ))}\n </>\n );\n};\n","import { ReactNode, FC } from 'react';\nimport { cn } from 'reablocks';\nimport { ChatTheme, chatTheme } from '@/theme';\n\nexport interface AppBarProps {\n /**\n * Content to display in the header\n */\n content?: ReactNode;\n\n /**\n * Custom theme for the appbar\n */\n theme?: ChatTheme;\n}\n\nexport const AppBar: FC<AppBarProps> = ({ content, theme = chatTheme }) => {\n return <div className={cn(theme.appbar)}>{content}</div>;\n};\n","import { offset } from '@floating-ui/react';\nimport { ConnectedOverlay, Modifiers, Placement } from 'reablocks';\nimport { memo, ReactNode, useRef, useState } from 'react';\n\nexport interface ChatBubbleProps {\n /**\n * The main content to be rendered.\n */\n children: ReactNode;\n\n /**\n * The content to be rendered in the trigger bubble.\n */\n bubbleContent: ReactNode;\n\n /**\n * The position of the chat bubble on the screen.\n * @default 'right-end'\n */\n position?: Placement;\n\n /**\n * Custom position modifiers.\n * @default [offset({ mainAxis: 0, crossAxis: -40 })]\n */\n modifiers?: Modifiers;\n\n /**\n * Additional CSS classes to apply to the chat bubble.\n */\n className?: string;\n}\n\nexport const ChatBubble = memo<ChatBubbleProps>(\n ({\n children,\n bubbleContent,\n position = 'right-end',\n modifiers = [offset({ mainAxis: 0, crossAxis: -40 })],\n className\n }) => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const ref = useRef<HTMLDivElement | null>(null);\n\n return (\n <>\n <ConnectedOverlay\n placement={position}\n modifiers={modifiers}\n reference={ref.current}\n open={isOpen}\n onOpen={() => setIsOpen(true)}\n onClose={() => setIsOpen(false)}\n content={() => <>{children}</>}\n />\n <div\n ref={ref}\n className={className}\n onClick={() => setIsOpen(prev => !prev)}\n >\n {bubbleContent}\n </div>\n </>\n );\n }\n);\n"],"names":["AttachIcon","SendIcon","StopIcon","BackIcon","CopyIcon","SyntaxHighlighter","FileIcon","ThumbUpIcon","ThumbsDownIcon","RefreshIcon","TrashIcon","ChatIcon","PlusIcon","sessions"],"mappings":";;;;;;;;;;;;;;;;AACA,MAAM,UAAU,CAAC,UAA0B,sBAAM,cAAc,OAAO,EAAE,OAAO,IAAI,QAAQ,IAAI,SAAS,aAAa,MAAM,QAAQ,OAAO,8BAA8B,GAAG,MAAK,GAAoB,sBAAM,cAAc,KAAK,EAAE,IAAI,OAAM,GAAoB,sBAAM,cAAc,QAAQ,EAAE,IAAI,UAAU,GAAG,wwCAAwwC,MAAM,eAAc,CAAE,CAAC,CAAC;ACA5kD,MAAM,UAAU,CAAC,UAA0B,sBAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,OAAO,IAAI,QAAQ,IAAI,SAAS,aAAa,MAAM,QAAQ,QAAQ,gBAAgB,aAAa,GAAG,eAAe,SAAS,gBAAgB,SAAS,WAAW,2BAA2B,GAAG,MAAK,GAAoB,sBAAM,cAAc,QAAQ,EAAE,GAAG,YAAW,CAAE,GAAmB,sBAAM,cAAc,QAAQ,EAAE,GAAG,6OAA4O,CAAE,GAAmB,sBAAM,cAAc,QAAQ,EAAE,GAAG,WAAU,CAAE,CAAC;ACwB7sB,MAAM,cAAc,cAAgC;AAAA,EACzD,UAAU,CAAA;AAAA,EACV,iBAAiB;AACnB,CAAC;AC3BD,MAAM,eAAe,CAAC,UAA0B,sBAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,OAAO,IAAI,QAAQ,IAAI,SAAS,aAAa,MAAM,QAAQ,Q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
|
|
10
10
|
console.error("vite-plugin-css-injected-by-js", e);
|
|
11
11
|
}
|
|
12
12
|
})();
|
|
13
|
-
import { A, m, B, z, C, v, F, s, f, g, h, i, j, M, k, N, b, p, o, e, d, l, c, q, n, T, u, t, r, x, y, w } from "./index-
|
|
13
|
+
import { A, m, B, z, C, v, F, s, f, g, h, i, j, M, k, N, b, p, o, e, d, l, c, q, n, T, u, t, r, x, y, w } from "./index-B0_s-rPq.js";
|
|
14
14
|
import "react/jsx-runtime";
|
|
15
15
|
import "react";
|
|
16
16
|
import "reablocks";
|