@alquimia-ai/ui 1.9.2 → 2.0.0

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.
Files changed (78) hide show
  1. package/dist/components/atoms/index.d.mts +1 -1
  2. package/dist/components/atoms/index.d.ts +1 -1
  3. package/dist/components/atoms/index.js +1848 -1428
  4. package/dist/components/atoms/index.js.map +1 -1
  5. package/dist/components/atoms/index.mjs +1453 -1409
  6. package/dist/components/atoms/index.mjs.map +1 -1
  7. package/dist/components/hooks/index.d.mts +1 -0
  8. package/dist/components/hooks/index.d.ts +1 -0
  9. package/dist/components/hooks/index.js +572 -211
  10. package/dist/components/hooks/index.js.map +1 -1
  11. package/dist/components/hooks/index.mjs +505 -193
  12. package/dist/components/hooks/index.mjs.map +1 -1
  13. package/dist/components/molecules/documents/index.d.mts +1 -0
  14. package/dist/components/molecules/documents/index.d.ts +1 -0
  15. package/dist/components/molecules/documents/index.js +2366 -1884
  16. package/dist/components/molecules/documents/index.js.map +1 -1
  17. package/dist/components/molecules/documents/index.mjs +2207 -1764
  18. package/dist/components/molecules/documents/index.mjs.map +1 -1
  19. package/dist/components/molecules/index.js +2261 -2095
  20. package/dist/components/molecules/index.js.map +1 -1
  21. package/dist/components/molecules/index.mjs +2084 -2075
  22. package/dist/components/molecules/index.mjs.map +1 -1
  23. package/dist/components/molecules/viewers/index.js +1303 -1185
  24. package/dist/components/molecules/viewers/index.js.map +1 -1
  25. package/dist/components/molecules/viewers/index.mjs +1254 -1167
  26. package/dist/components/molecules/viewers/index.mjs.map +1 -1
  27. package/dist/components/organisms/index.d.mts +1 -0
  28. package/dist/components/organisms/index.d.ts +1 -0
  29. package/dist/components/organisms/index.js +3074 -2609
  30. package/dist/components/organisms/index.js.map +1 -1
  31. package/dist/components/organisms/index.mjs +2999 -2586
  32. package/dist/components/organisms/index.mjs.map +1 -1
  33. package/dist/components/templates/index.d.mts +25 -3
  34. package/dist/components/templates/index.d.ts +25 -3
  35. package/dist/components/templates/index.js +1490 -1300
  36. package/dist/components/templates/index.js.map +1 -1
  37. package/dist/components/templates/index.mjs +1413 -1281
  38. package/dist/components/templates/index.mjs.map +1 -1
  39. package/dist/index.d.mts +4 -3
  40. package/dist/index.d.ts +4 -3
  41. package/dist/index.js +3951 -2977
  42. package/dist/index.js.map +1 -1
  43. package/dist/index.mjs +3368 -2950
  44. package/dist/index.mjs.map +1 -1
  45. package/dist/lib/index.js +106 -54
  46. package/dist/lib/index.js.map +1 -1
  47. package/dist/lib/index.mjs +42 -43
  48. package/dist/lib/index.mjs.map +1 -1
  49. package/dist/providers/index.d.mts +17 -0
  50. package/dist/providers/index.d.ts +17 -0
  51. package/dist/providers/index.js +177 -0
  52. package/dist/providers/index.js.map +1 -0
  53. package/dist/providers/index.mjs +101 -0
  54. package/dist/providers/index.mjs.map +1 -0
  55. package/dist/styles.css +68 -0
  56. package/dist/styles.css.map +1 -0
  57. package/dist/styles.d.mts +2 -0
  58. package/dist/styles.d.ts +2 -0
  59. package/dist/tailwind.config.js +4 -10
  60. package/dist/types/index.d.mts +5 -5
  61. package/dist/types/index.d.ts +5 -5
  62. package/dist/types/index.js +52 -19
  63. package/dist/types/index.js.map +1 -1
  64. package/dist/types/index.mjs +6 -8
  65. package/dist/types/index.mjs.map +1 -1
  66. package/package.json +8 -7
  67. package/dist/components/index.d.mts +0 -23
  68. package/dist/components/index.d.ts +0 -23
  69. package/dist/components/index.js +0 -1734
  70. package/dist/components/index.js.map +0 -1
  71. package/dist/components/index.mjs +0 -1702
  72. package/dist/components/index.mjs.map +0 -1
  73. package/dist/components/templates/cards/index.d.mts +0 -26
  74. package/dist/components/templates/cards/index.d.ts +0 -26
  75. package/dist/components/templates/cards/index.js +0 -1536
  76. package/dist/components/templates/cards/index.js.map +0 -1
  77. package/dist/components/templates/cards/index.mjs +0 -1504
  78. package/dist/components/templates/cards/index.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/organisms/index.ts","../../../src/components/organisms/whisper.tsx","../../../src/lib/utils.ts","../../../src/components/organisms/speechToText.tsx","../../../src/components/organisms/assistant.tsx","../../../src/components/atoms/ui/button.tsx","../../../src/components/atoms/ui/textarea.tsx","../../../src/components/atoms/ui/input.tsx","../../../src/components/atoms/ui/select.tsx","../../../src/components/atoms/ui/avatar.tsx","../../../src/components/atoms/ui/scroll-area.tsx","../../../src/components/atoms/ui/rich-text.tsx","../../../src/components/atoms/ui/skeleton.tsx","../../../src/components/atoms/ui/card.tsx","../../../src/components/atoms/ui/drawer.tsx","../../../src/components/atoms/ui/typography/index.tsx","../../../src/components/atoms/ui/badge.tsx","../../../src/components/atoms/ui/alert.tsx","../../../src/components/atoms/ui/label.tsx","../../../src/components/atoms/ui/checkbox.tsx","../../../src/components/atoms/ui/toggle.tsx","../../../src/components/atoms/ui/slider.tsx","../../../src/components/atoms/ui/switch.tsx","../../../src/components/atoms/ui/tabs.tsx","../../../src/components/atoms/ui/aspect-ratio.tsx","../../../src/components/atoms/ui/table.tsx","../../../src/components/atoms/ui/breadcrumb.tsx","../../../src/components/molecules/alert-dialog.tsx","../../../src/components/atoms/ui/popover.tsx","../../../src/components/atoms/ui/command.tsx","../../../src/components/atoms/ui/dialog.tsx","../../../src/components/atoms/ui/toast.tsx","../../../src/components/atoms/ui/loader.tsx","../../../src/components/atoms/ui/separator.tsx","../../../src/components/hooks/use-toast.ts","../../../src/components/atoms/ui/toaster.tsx","../../../src/components/atoms/ui/think-indicator.tsx","../../../src/components/molecules/page-container.tsx","../../../src/components/molecules/assistant-button.tsx","../../../src/components/molecules/carousel.tsx","../../../src/components/molecules/navigation-menu.tsx","../../../src/components/molecules/sidebar.tsx","../../../src/components/molecules/sonner.tsx","../../../src/components/molecules/rating-stars.tsx","../../../src/components/molecules/rating-thumbs.tsx","../../../src/components/molecules/rating-comment.tsx","../../../src/components/molecules/call-out.tsx","../../../src/components/hooks/use-text-streaming.ts","../../../src/components/organisms/rating-dialog.tsx","../../../src/components/hooks/use-document.tsx","../../../src/components/hooks/use-resize-observer.ts"],"sourcesContent":["export { Whisper } from \"./whisper\";\nexport { SpeechToText } from \"./speechToText\";\nexport { Assistant } from \"./assistant\";\nexport { RatingDialog } from \"./rating-dialog\";\nexport { AssistantMessageArea } from \"./assistant\";\nexport { AssistantInput } from \"./assistant\";\n","import { useState, useEffect } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { AudioLinesIcon, PlayCircleIcon, LoaderCircleIcon } from \"lucide-react\";\nimport { Message } from \"ai\";\nimport { parseTextToSpeech } from \"../../lib/utils\";\nimport { TTSResult } from \"../../types/type\";\ninterface WhisperProps extends React.HTMLAttributes<HTMLDivElement> {\n message: Message;\n isMessageStreaming: boolean;\n textToSpeech: (content: string) => Promise<TTSResult>;\n}\n\nfunction Whisper({\n className,\n message,\n isMessageStreaming,\n textToSpeech,\n}: WhisperProps) {\n const [audioUrl, setAudioUrl] = useState<HTMLAudioElement | null>(null);\n const [isPlaying, setIsPlaying] = useState<boolean>(false);\n const [isLoading, setIsLoading] = useState<boolean>(false);\n\n const content = message.content;\n\n useEffect(() => {\n if (audioUrl) {\n const handlePlaying = () => setIsPlaying(true);\n const handlePause = () => setIsPlaying(false);\n const handleEnded = () => setIsPlaying(false);\n\n audioUrl.addEventListener(\"playing\", handlePlaying);\n audioUrl.addEventListener(\"pause\", handlePause);\n audioUrl.addEventListener(\"ended\", handleEnded);\n\n return () => {\n audioUrl.removeEventListener(\"playing\", handlePlaying);\n audioUrl.removeEventListener(\"pause\", handlePause);\n audioUrl.removeEventListener(\"ended\", handleEnded);\n };\n }\n }, [audioUrl]);\n\n const resetAudio = () => {\n audioUrl && (audioUrl.currentTime = 0);\n audioUrl?.pause();\n };\n\n const playAudio = (url: string) => {\n const audio = new Audio(url);\n audio.play();\n setAudioUrl(audio);\n };\n\n const handleAudioPlay = () => (isPlaying ? resetAudio() : audioUrl?.play());\n\n const handleTextToSpeech = async (content: string) => {\n if (!audioUrl) {\n setIsLoading(true);\n try {\n const filteredContent = parseTextToSpeech(content);\n const audioFile = await textToSpeech(filteredContent);\n\n if (audioFile) {\n switch (audioFile.type) {\n case \"url\":\n await playAudio(audioFile.data);\n break;\n case \"blob\":\n await playAudio(URL.createObjectURL(audioFile.data));\n break;\n default:\n console.error(\"Error obtaining audio\", audioFile.message);\n }\n }\n } catch (error) {\n console.error(\"Error in text to speech:\", error);\n } finally {\n setIsLoading(false);\n }\n } else {\n setIsLoading(false);\n handleAudioPlay();\n }\n };\n\n return (\n <div className={cn(className)}>\n {isMessageStreaming && <div className=\"p-2 w-[24px] h-[24px]\"></div>}\n {!isMessageStreaming && (\n <div onClick={() => handleTextToSpeech(content)}>\n {isPlaying && (\n <button className=\"p-2 items-center justify-center\">\n <AudioLinesIcon\n size={20}\n className=\"animate-[wave_0.7s_infinite_ease-in-out]\"\n />\n </button>\n )}\n\n {isLoading && (\n <button disabled className=\"p-2 items-center justify-center\">\n {\" \"}\n <LoaderCircleIcon\n size={20}\n className=\"animate-[spin_1s_linear_infinite]\"\n />\n </button>\n )}\n\n {!isLoading && !isPlaying && (\n <button\n disabled={isLoading}\n className=\"p-2 items-center justify-center\"\n >\n <PlayCircleIcon size={20} />\n </button>\n )}\n </div>\n )}\n </div>\n );\n}\n\nexport { Whisper };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport function parseTextToSpeech(content: string) {\n return content.replace(/[^\\p{L}\\p{N}\\s.,:]/gu, '');\n}\n\n\nexport function blobToBase64(blob: Blob): Promise<string> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => resolve(reader.result as string);\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n};\n\nexport const truncateString = (str: string, maxLength: number): string => {\n if (str.length <= maxLength) {\n return str;\n }\n return str.slice(0, maxLength) + \"...\";\n};\n\nexport function getCookies(name: string) {\n if (typeof document === 'undefined') return undefined;\n const value = `; ${document.cookie}`;\n const parts = value.split(`; ${name}=`);\n if (parts.length === 2) return parts.pop()?.split(\";\").shift();\n}\n\nexport function hasToolResult(data: any) {\n return data?.tool_output?.result && Object.keys(data.tool_output.result).length > 0;\n}\n\nexport function getErrorMessage(error_code?: string) {\n switch (error_code) {\n case \"STREAM_ERROR\":\n return \"Connection lost. Please try again.\";\n case \"REQUEST_ERROR\":\n return \"There was a problem with your request. Please try again.\";\n case \"401\":\n case \"403\":\n return \"You are not authorized. Please try again.\";\n case \"404\":\n return \"Resource not found.\";\n case \"500\":\n return \"Server error. Please try again later.\";\n default:\n return \"We have an internal error, please try again later.\";\n }\n}\n","import { useState, useEffect } from \"react\";\nimport { cn, blobToBase64 } from \"../../lib/utils\";\ninterface SpeechToTextProps extends React.HTMLAttributes<HTMLDivElement> {\n RecordAudioIcon: React.ReactElement;\n IdleAudioIcon: React.ReactElement;\n speechToText: (audio: string) => Promise<string>;\n handleReplaceInput: (text: string) => void;\n setIsAudioRecording: React.Dispatch<React.SetStateAction<boolean>>;\n onSendAudio?: () => void;\n}\n\nfunction SpeechToText({\n className,\n speechToText,\n RecordAudioIcon,\n IdleAudioIcon,\n handleReplaceInput,\n setIsAudioRecording,\n onSendAudio,\n ...props\n}: SpeechToTextProps) {\n const [isRecording, setIsRecording] = useState<boolean>(false);\n const [isLoading, setIsLoading] = useState<boolean>(false);\n const [mediaRecorder, setMediaRecorder] = useState<MediaRecorder | null>(null);\n const [audioBlob, setAudioBlob] = useState<Blob | null>(null);\n const [speechResult, setSpeechResult] = useState<string | null>(null);\n\n const startRecording = async () => {\n setIsRecording(true);\n const stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n const recorder = new MediaRecorder(stream);\n setMediaRecorder(recorder);\n\n recorder.ondataavailable = (event) => {\n setAudioBlob(event.data);\n };\n\n recorder.start();\n };\n\n const stopRecording = () => {\n setIsRecording(false);\n mediaRecorder?.stop();\n mediaRecorder?.stream.getTracks().forEach(track => track.stop());\n };\n\n const handleSpeechToText = async () => {\n if (!audioBlob) return;\n\n const audioBase64 = await blobToBase64(audioBlob);\n try {\n setIsLoading(true)\n const transcription = await speechToText(audioBase64);\n if (transcription) {\n handleReplaceInput(transcription);\n setSpeechResult(transcription);\n setIsLoading(false)\n }\n } catch (error) {\n console.error('Error transcribing audio:', error);\n setIsLoading(false)\n } finally {\n setAudioBlob(null);\n }\n };\n\n useEffect(() => {\n if (!isRecording && audioBlob) {\n handleSpeechToText();\n }\n }, [isRecording, audioBlob]);\n\n useEffect(() => {\n isLoading || isRecording ? setIsAudioRecording(true) : setIsAudioRecording(false);\n }, [isRecording, isLoading]);\n\n useEffect(() => {\n if (speechResult) {\n setTimeout(() => {\n onSendAudio && onSendAudio();\n setSpeechResult(null);\n }, 200)\n }\n }, [speechResult])\n\n const handleRecordButtonClick = () => {\n if (isRecording) {\n stopRecording();\n } else {\n startRecording();\n }\n };\n\n const recordIcons = isRecording ? RecordAudioIcon : IdleAudioIcon\n\n return (\n <div className={cn(className)} {...props}>\n <button disabled={isLoading} type=\"button\" onClick={handleRecordButtonClick}>\n {recordIcons}\n </button>\n </div>\n );\n}\n\nexport { SpeechToText };","\"use client\";\n\nimport * as React from \"react\";\nimport { FormEvent, useCallback, useEffect, useRef, useState } from \"react\";\nimport { AlquimiaSDK } from \"@alquimia-ai/tools/sdk\";\nimport { Typography } from \"../atoms\";\nimport { CallOut, CallOutResponse, CallOutActions } from \"../molecules\";\nimport { ThinkIndicator } from \"../atoms\";\nimport { cn, getErrorMessage, hasToolResult } from \"../../lib/utils\";\nimport { Message } from \"ai\";\nimport { Send } from \"lucide-react\";\nimport { Tooler, ToolFactory } from \"../../types\";\n\ninterface AssistantProps extends React.HTMLAttributes<HTMLDivElement> {\n sdk: AlquimiaSDK;\n title?: string;\n description?: string;\n}\n\nconst Assistant = React.forwardRef<HTMLDivElement, AssistantProps>(\n ({ className, sdk, title, description, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col h-full bg-background text-foreground\", className)}\n {...props}\n >\n {(title || description) && (\n <AssistantHeader>\n {title && <AssistantTitle title={title} />}\n {description && <AssistantDescription description={description} />}\n </AssistantHeader>\n )}\n {children}\n </div>\n );\n }\n);\nAssistant.displayName = \"Assistant\";\n\ninterface AssistantTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {\n title: string;\n}\n\nconst AssistantTitle = React.forwardRef<HTMLHeadingElement, AssistantTitleProps>(\n ({ className, title, ...props }, ref) => (\n <div ref={ref} className={cn(\"text-foreground\", className)} {...props}>\n <Typography typeStyle=\"heading1\" as=\"h1\">\n {title}\n </Typography>\n </div>\n )\n);\nAssistantTitle.displayName = \"AssistantTitle\";\n\ninterface AssistantDescriptionProps\n extends React.HTMLAttributes<HTMLParagraphElement> {\n description: string;\n}\n\nconst AssistantDescription = React.forwardRef<\n HTMLParagraphElement,\n AssistantDescriptionProps\n>(({ className, description, ...props }, ref) => (\n <div ref={ref} className={cn(\"text-foreground\", className)} {...props}>\n <Typography typeStyle=\"display\" as=\"p\">\n {description}\n </Typography>\n </div>\n));\nAssistantDescription.displayName = \"AssistantDescription\";\n\ninterface AssistantHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst AssistantHeader = React.forwardRef<HTMLDivElement, AssistantHeaderProps>(\n ({ className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"bg-background text-foreground\", className)}\n {...props}\n >\n {children}\n </div>\n )\n);\nAssistantHeader.displayName = \"AssistantHeader\";\n\ninterface MessageAction {\n label: string;\n icon: React.ReactNode;\n onClick: (message?: Message) => Promise<void>;\n custom?: boolean;\n component?: (props: { message?: Message }) => React.ReactNode;\n}\n\ninterface AssistantMessageAreaProps\n extends React.HTMLAttributes<HTMLDivElement> {\n messages: (Message & {\n error_code?: string;\n created_at?: string;\n error_detail?: string;\n additionalInfo?: string;\n loading?: boolean;\n tooler?: Tooler[];\n stream_id?: string;\n })[];\n actions?: MessageAction[];\n messagesEndRef: any;\n thinkIndicator?: React.ReactNode;\n isMessageStreaming?: boolean;\n streamingMessageId: string | null;\n handleIsTextStreaming?: (isStreaming: boolean) => void;\n toolFactory?: ToolFactory;\n isLoading: boolean;\n showDetailedErrors?: boolean;\n}\n\nconst AssistantMessageArea = React.forwardRef<\n HTMLDivElement,\n AssistantMessageAreaProps\n>(\n (\n {\n className,\n messages,\n messagesEndRef,\n actions,\n streamingMessageId,\n thinkIndicator,\n handleIsTextStreaming,\n toolFactory,\n isLoading,\n showDetailedErrors,\n ...props\n },\n ref\n ) => {\n useEffect(() => {\n messagesEndRef.current?.scrollIntoView({ behavior: \"instant\" });\n }, []);\n return (\n <div\n ref={ref}\n className={cn(\"p-6 overflow-y-auto flex-grow bg-background\", className)}\n {...props}\n >\n {messages.map((message) => (\n <div key={message.id}>\n <CallOut\n key={message.id}\n role={message.role as \"user\" | \"assistant\"}\n message={message}\n >\n {streamingMessageId === message.id &&\n (isLoading || message.content.length === 0) &&\n !message.error_code && (\n <div>{thinkIndicator ?? <ThinkIndicator />}</div>\n )}\n {message.error_code && (\n <CallOutResponse\n role=\"assistant\"\n data-error-code={message.error_code}\n additionalInfo={showDetailedErrors ? `${message.error_detail}${message.stream_id ? `\\nstream id: ${message.stream_id}` : ''}` : undefined}\n toggleAdditionalInfo\n >\n {getErrorMessage(message.error_code)}\n </CallOutResponse>\n )}\n {!message.error_code && message.tooler?.filter(hasToolResult).map((tool, index) => (\n <React.Fragment key={tool.control_id || `${tool.tool_summary?.name}-${index}`}>\n {toolFactory?.createTool(tool.tool_summary?.name || \"\", tool.tool_output)}\n </React.Fragment>\n ))}\n {message.content && !message.error_code && (\n <div\n data-role={message.role}\n className=\"alq--callout-message-container\"\n >\n {message.created_at && streamingMessageId !== message.id && (\n <div className=\"text-xs text-muted-foreground/80 pb-1 alq--callout-message-date\">\n {new Date(Number(message.created_at)).toLocaleString(\n \"es-ES\",\n {\n hour: \"2-digit\",\n minute: \"2-digit\",\n hour12: false,\n }\n )}\n </div>\n )}\n <CallOutResponse\n role={message.role}\n isStreaming={streamingMessageId === message.id}\n handleIsTextStreaming={handleIsTextStreaming}\n additionalInfo={\n streamingMessageId !== message.id\n ? message?.additionalInfo\n : undefined\n }\n >\n {message.content}\n </CallOutResponse>\n {actions && streamingMessageId !== message.id && (\n <CallOutActions\n key={message.id}\n actions={actions}\n message={message}\n role={message.role as \"user\" | \"assistant\"}\n />\n )}\n </div>\n )}\n </CallOut>\n </div>\n ))}\n <div ref={messagesEndRef} />\n </div>\n );\n }\n);\nAssistantMessageArea.displayName = \"AssistantMessageArea\";\n\ninterface AssistantInputProps\n extends React.FormHTMLAttributes<HTMLFormElement> {\n sendMessageFunc: (event: React.FormEvent<HTMLFormElement>) => Promise<void>;\n isButtonDisabled: boolean;\n input: string;\n handleInputChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n isMessageStreaming: boolean;\n speechToTextComponent?: React.ReactNode;\n userToolboxComponent?: React.ReactNode;\n placeholders?: [string, string];\n onFileDrop?: (files: File[]) => void;\n attachmentsSlot?: React.ReactNode;\n}\n\nconst AssistantInput = React.forwardRef<HTMLFormElement, AssistantInputProps>(\n (\n {\n className,\n sendMessageFunc,\n isButtonDisabled,\n input,\n handleInputChange,\n isMessageStreaming,\n speechToTextComponent,\n userToolboxComponent,\n placeholders,\n onFileDrop,\n attachmentsSlot,\n ...props\n },\n ref\n ) => {\n const [isDragging, setIsDragging] = useState(false);\n const dragCounterRef = useRef(0);\n\n const handleDragEnter = useCallback((e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n dragCounterRef.current += 1;\n if (e.dataTransfer.types.includes(\"Files\")) {\n setIsDragging(true);\n }\n }, []);\n\n const handleDragOver = useCallback((e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n }, []);\n\n const handleDragLeave = useCallback((e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n dragCounterRef.current -= 1;\n if (dragCounterRef.current === 0) {\n setIsDragging(false);\n }\n }, []);\n\n const handleDrop = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n dragCounterRef.current = 0;\n setIsDragging(false);\n const files = Array.from(e.dataTransfer.files);\n if (files.length > 0) {\n onFileDrop?.(files);\n }\n },\n [onFileDrop]\n );\n\n const placeholder = placeholders\n ? isMessageStreaming\n ? placeholders[0]\n : placeholders[1]\n : isMessageStreaming\n ? \"Processing...\"\n : \"Type your message here...\";\n\n return (\n <form\n onSubmit={sendMessageFunc}\n className={cn(\n \"flex flex-col relative rounded-lg border border-input bg-background\",\n \"focus-within:ring-2 focus-within:ring-ring\",\n onFileDrop && isDragging && \"ring-2 ring-primary/50 alq--assistant-input-dragover\",\n className\n )}\n ref={ref}\n onDragEnter={onFileDrop ? handleDragEnter : undefined}\n onDragOver={onFileDrop ? handleDragOver : undefined}\n onDragLeave={onFileDrop ? handleDragLeave : undefined}\n onDrop={onFileDrop ? handleDrop : undefined}\n {...props}\n >\n {attachmentsSlot}\n <textarea\n disabled={isButtonDisabled}\n value={input}\n onChange={handleInputChange}\n placeholder={placeholder}\n className={cn(\n \"flex-1 min-w-0 text-sm p-3 focus:outline-none w-full resize-none\",\n \"bg-transparent text-foreground\",\n \"placeholder:text-muted-foreground\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n )}\n onKeyDown={(e) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n sendMessageFunc(e as unknown as FormEvent<HTMLFormElement>);\n }\n }}\n />\n <div className=\"flex items-center relative alq--assistant-actions\">\n {userToolboxComponent}\n {speechToTextComponent}\n <button\n type=\"submit\"\n disabled={isButtonDisabled}\n className={cn(\n \"w-10 h-10 rounded-full flex items-center justify-center alq--assistant-button-send\",\n isButtonDisabled\n ? \"bg-muted text-muted-foreground\"\n : \"bg-primary text-primary-foreground hover:bg-primary/90\"\n )}\n >\n <Send className=\"w-5 h-5\" />\n </button>\n </div>\n </form>\n );\n }\n);\nAssistantInput.displayName = \"AssistantInput\";\n\nexport {\n Assistant,\n AssistantTitle,\n AssistantDescription,\n AssistantHeader,\n AssistantMessageArea,\n AssistantInput,\n};\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n }\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import * as React from \"react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nexport interface TextareaProps\n extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, ...props }, ref) => {\n return (\n <textarea\n className={cn(\n \"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n \"alq--textarea\"\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\nTextarea.displayName = \"Textarea\";\n\nexport { Textarea };\n","import { forwardRef } from \"react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n \"alq--input\"\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\";\nimport { cn } from \"../../../lib/utils\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className,\n \"alq--select\"\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"py-1.5 pl-8 pr-2 text-sm font-semibold\", className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Avatar = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Root\n ref={ref}\n className={cn(\n \"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\n className\n )}\n {...props}\n />\n))\nAvatar.displayName = AvatarPrimitive.Root.displayName\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn(\"aspect-square h-full w-full\", className)}\n {...props}\n />\n))\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn(\n \"flex h-full w-full items-center justify-center rounded-full bg-muted\",\n className\n )}\n {...props}\n />\n))\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\"\n\nimport { cn } from \"../../../lib/utils\";\n\nconst ScrollArea = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn(\"relative overflow-hidden\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n))\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName\n\nconst ScrollBar = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n \"flex touch-none select-none transition-colors\",\n orientation === \"vertical\" &&\n \"h-full w-2.5 border-l border-l-transparent p-[1px]\",\n orientation === \"horizontal\" &&\n \"h-2.5 flex-col border-t border-t-transparent p-[1px]\",\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n))\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName\n\nexport { ScrollArea, ScrollBar }\n","import * as React from \"react\";\nimport ReactMarkdown from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport { cn } from \"../../../lib/utils\";\n\ninterface RichTextProps extends React.HTMLAttributes<HTMLDivElement> {\n content: string;\n className?: string;\n}\n\nfunction RichText({ content, className }: RichTextProps) {\n return (\n <ReactMarkdown className={cn(className)} remarkPlugins={[remarkGfm]}>\n {content}\n </ReactMarkdown>\n );\n}\n\nexport { RichText };\n","import { cn } from \"../../../lib/utils\";\n\nfunction Skeleton({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn(\"animate-pulse rounded-md bg-muted text-muted-foreground\", className, \"alq--skeleton\")}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n","import * as React from \"react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"rounded-lg\",\n \" border\",\n \"bg-card\",\n \"text-card-foreground\",\n \"shadow-raised\",\n className\n )}\n {...props}\n />\n));\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n {...props}\n />\n));\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\"alq--typography-heading4\", className)}\n {...props}\n />\n));\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n));\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex items-center p-6 pt-0\", className)}\n {...props}\n />\n));\nCardFooter.displayName = \"CardFooter\";\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardDescription,\n CardContent,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Drawer = ({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n);\nDrawer.displayName = \"Drawer\";\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\nconst DrawerPortal = DrawerPrimitive.Portal;\n\nconst DrawerClose = DrawerPrimitive.Close;\n\nconst DrawerOverlay = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\n {...props}\n />\n));\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\n\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border border-border bg-background text-foreground alq--drawer-content\",\n className\n )}\n {...props}\n >\n <div className=\"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n));\nDrawerContent.displayName = \"DrawerContent\";\n\nconst DrawerHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className, \"alq--drawer-header\")}\n {...props}\n />\n);\nDrawerHeader.displayName = \"DrawerHeader\";\n\nconst DrawerFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className, \"alq--drawer-footer\")}\n {...props}\n />\n);\nDrawerFooter.displayName = \"DrawerFooter\";\n\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n \"alq--drawer-title\"\n )}\n {...props}\n />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className, \"alq--drawer-description\")}\n {...props}\n />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n","import { cn } from \"../../../../lib/utils\";\nimport { forwardRef } from \"react\";\n\nexport interface TypographyProps extends React.HTMLAttributes<HTMLDivElement> {\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"span\";\n typeStyle:\n | \"display\"\n | \"heading1\"\n | \"heading2\"\n | \"heading3\"\n | \"heading4\"\n | \"small\"\n | \"tiny\";\n}\n\nconst Typography = forwardRef<HTMLDivElement, TypographyProps>(\n ({ as: Component = \"p\", typeStyle, ...props }, ref) => {\n return (\n <Component\n {...props}\n className={cn(props.className, `alq--typography-${typeStyle}`)}\n ref={ref}\n />\n );\n }\n);\n\nTypography.displayName = \"Typography\";\n\nexport { Typography };\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../../../lib/utils\";\n\nconst badgeVariants = cva(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground hover:bg-primary/80\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n destructive:\n \"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80\",\n outline: \"text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return (\n <div className={cn(badgeVariants({ variant }), className, \"alq--badge\")} {...props} />\n )\n}\n\nexport { Badge, badgeVariants }\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-background text-foreground\",\n destructive:\n \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n <div\n ref={ref}\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n));\nAlert.displayName = \"Alert\";\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h5\n ref={ref}\n className={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n {...props}\n />\n));\nAlertTitle.displayName = \"AlertTitle\";\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"text-sm [&_p]:leading-relaxed\", className)}\n {...props}\n />\n));\nAlertDescription.displayName = \"AlertDescription\";\n\nexport { Alert, AlertTitle, AlertDescription };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants(), className, \"alq--label\")}\n {...props}\n />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\",\n className,\n \"alq--checkbox\"\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-current\")}\n >\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport { Checkbox };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst toggleVariants = cva(\n \"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline:\n \"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground\",\n },\n size: {\n default: \"h-10 px-3\",\n sm: \"h-9 px-2.5\",\n lg: \"h-11 px-5\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nconst Toggle = React.forwardRef<\n React.ElementRef<typeof TogglePrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &\n VariantProps<typeof toggleVariants>\n>(({ className, variant, size, ...props }, ref) => (\n <TogglePrimitive.Root\n ref={ref}\n className={cn(toggleVariants({ variant, size, className }), \"alq--toggle\")}\n {...props}\n />\n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle, toggleVariants };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as SliderPrimitive from \"@radix-ui/react-slider\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Slider = React.forwardRef<\n React.ElementRef<typeof SliderPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <SliderPrimitive.Root\n ref={ref}\n className={cn(\n \"relative flex w-44 touch-none select-none items-center\",\n className,\n \"alq--slider\"\n )}\n {...props}\n >\n <SliderPrimitive.Track className=\"relative h-2 w-44 grow overflow-hidden rounded-full bg-primary\">\n <SliderPrimitive.Range className=\"absolute h-full bg-secondary\" />\n </SliderPrimitive.Track>\n <SliderPrimitive.Thumb className=\"block h-5 w-5 rounded-full border-2 border-gray bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\" />\n </SliderPrimitive.Root>\n));\nSlider.displayName = SliderPrimitive.Root.displayName;\n\nexport { Slider };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>\n>(({ className, ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(\n \"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n className,\n \"alq--switch\"\n )}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0\"\n )}\n />\n </SwitchPrimitives.Root>\n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Tabs = TabsPrimitive.Root;\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n \"inline-flex h-10 items-center justify-center rounded-md p-1 text-muted-foreground\",\n className,\n \"alq--tabs\"\n )}\n {...props}\n />\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:border-b-2 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-b-2 data-[state=active]:text-foreground data-[state=active]:shadow-sm\",\n className\n )}\n {...props}\n />\n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n","\"use client\"\n\nimport * as AspectRatioPrimitive from \"@radix-ui/react-aspect-ratio\"\n\nconst AspectRatio = AspectRatioPrimitive.Root\n\nexport { AspectRatio }\n","import * as React from \"react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement>\n>(({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table\n ref={ref}\n className={cn(\"w-full caption-bottom text-sm text-foreground bg-background\", className, \"alq--table\")}\n {...props}\n />\n </div>\n));\nTable.displayName = \"Table\";\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={cn(\"[&_tr]:border-b border-border bg-muted\", className, \"alq--table-header\")} {...props} />\n));\nTableHeader.displayName = \"TableHeader\";\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody\n ref={ref}\n className={cn(\"[&_tr:last-child]:border-0 [&_tr]:border-b border-border\", className, \"alq--table-body\")}\n {...props}\n />\n));\nTableBody.displayName = \"TableBody\";\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\n \"border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className,\n \"alq--table-footer\"\n )}\n {...props}\n />\n));\nTableFooter.displayName = \"TableFooter\";\n\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.HTMLAttributes<HTMLTableRowElement>\n>(({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\n \"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\",\n className\n )}\n {...props}\n />\n));\nTableRow.displayName = \"TableRow\";\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n \"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0\",\n className\n )}\n {...props}\n />\n));\nTableHead.displayName = \"TableHead\";\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\"p-4 align-middle [&:has([role=checkbox])]:pr-0\", className)}\n {...props}\n />\n));\nTableCell.displayName = \"TableCell\";\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption\n ref={ref}\n className={cn(\"mt-4 text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nTableCaption.displayName = \"TableCaption\";\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n};\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\ninterface BreadcrumbItemProps {\n label: string;\n href?: string;\n current?: boolean;\n}\n\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<\"nav\"> & {\n separator?: React.ReactNode;\n }\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />);\nBreadcrumb.displayName = \"Breadcrumb\";\n\nconst BreadcrumbList = React.forwardRef<\n HTMLOListElement,\n React.ComponentPropsWithoutRef<\"ol\">\n>(({ className, ...props }, ref) => (\n <ol\n ref={ref}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5\",\n className\n )}\n {...props}\n />\n));\nBreadcrumbList.displayName = \"BreadcrumbList\";\n\nconst BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"inline-flex items-center gap-1.5\", className)}\n {...props}\n />\n));\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<\"a\"> & {\n asChild?: boolean;\n }\n>(({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\";\n\n return (\n <Comp\n ref={ref}\n className={cn(\"transition-colors hover:text-foreground\", className)}\n {...props}\n />\n );\n});\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\n\nconst BreadcrumbPage = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-normal text-foreground\", className)}\n {...props}\n />\n));\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\n\nconst BreadcrumbSeparator = ({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) => (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:w-3.5 [&>svg]:h-3.5\", className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n);\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\n\nconst BreadcrumbEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n);\nBreadcrumbEllipsis.displayName = \"BreadcrumbElipssis\";\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\n\nimport { cn } from \"../../lib/utils\";\nimport { buttonVariants } from \"../atoms/ui/button\";\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n ref={ref}\n />\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\n\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\nconst AlertDialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n);\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\n\nconst AlertDialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n);\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold\", className)}\n {...props}\n />\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nAlertDialogDescription.displayName =\n AlertDialogPrimitive.Description.displayName;\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={cn(buttonVariants(), className)}\n {...props}\n />\n));\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={cn(\n buttonVariants({ variant: \"outline\" }),\n \"mt-2 sm:mt-0\",\n className\n )}\n {...props}\n />\n));\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\nimport { Dialog, DialogContent } from \"./dialog\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n \"alq--dialog-content\"\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left text-foreground\",\n className,\n \"alq--dialog-header\"\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight text-foreground\",\n className,\n \"alq--dialog-title\"\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as ToastPrimitives from \"@radix-ui/react-toast\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst ToastProvider = ToastPrimitives.Provider;\n\nconst ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className\n )}\n {...props}\n />\n));\nToastViewport.displayName = ToastPrimitives.Viewport.displayName;\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border bg-background text-foreground\",\n destructive:\n \"destructive group border-destructive bg-destructive text-destructive-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst Toast = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &\n VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n return (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n );\n});\nToast.displayName = ToastPrimitives.Root.displayName;\n\nconst ToastAction = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive\",\n className\n )}\n {...props}\n />\n));\nToastAction.displayName = ToastPrimitives.Action.displayName;\n\nconst ToastClose = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n \"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600\",\n className\n )}\n toast-close=\"\"\n {...props}\n >\n <X className=\"h-4 w-4\" />\n </ToastPrimitives.Close>\n));\nToastClose.displayName = ToastPrimitives.Close.displayName;\n\nconst ToastTitle = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn(\"text-sm font-semibold\", className)}\n {...props}\n />\n));\nToastTitle.displayName = ToastPrimitives.Title.displayName;\n\nconst ToastDescription = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn(\"text-sm opacity-90\", className)}\n {...props}\n />\n));\nToastDescription.displayName = ToastPrimitives.Description.displayName;\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;\n\ntype ToastActionElement = React.ReactElement<typeof ToastAction>;\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n};\n","// Loader.tsx\nimport * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../../lib/utils\";\nimport { Loader2 } from \"lucide-react\";\n\nconst loaderVariants = cva(\n \"flex justify-center items-center w-full\",\n {\n variants: {\n size: {\n small: \"h-6 w-6\",\n medium: \"h-8 w-8\",\n large: \"h-12 w-12\",\n xl: \"h-24 w-24\",\n },\n colorVariant: {\n default: \"text-primary\",\n primary: \"text-primary\",\n secondary: \"text-secondary\",\n destructive: \"text-destructive\",\n },\n },\n defaultVariants: {\n size: \"medium\",\n colorVariant: \"default\",\n },\n }\n);\n\ninterface LoaderProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof loaderVariants> {}\n\nconst Loader = React.forwardRef<HTMLDivElement, LoaderProps>(\n (\n { className, size, colorVariant, ...props },\n ref\n ) => (\n <div\n ref={ref}\n className={cn(loaderVariants({ size, colorVariant }), \"flex justify-center items-center h-full w-full\", className)}\n {...props}\n >\n <Loader2 className=\"animate-spin\" />\n </div>\n )\n);\n\nLoader.displayName = \"Loader\";\n\nexport { Loader };","\"use client\"\n\nimport * as React from \"react\"\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\n\nimport { cn } from \"../../../lib/utils\"\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = \"horizontal\", decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className,\n \"alq--separator\"\n )}\n {...props}\n />\n))\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }","\"use client\";\n\n// Inspired by react-hot-toast library\nimport * as React from \"react\";\n\nimport type {\n ToastActionElement,\n ToastProps,\n} from \"../../components/atoms/ui/toast\";\n\nconst TOAST_LIMIT = 1;\nconst TOAST_REMOVE_DELAY = 1000000;\n\ntype ToasterToast = ToastProps & {\n id: string;\n title?: React.ReactNode;\n description?: React.ReactNode;\n action?: ToastActionElement;\n};\n\nconst actionTypes = {\n ADD_TOAST: \"ADD_TOAST\",\n UPDATE_TOAST: \"UPDATE_TOAST\",\n DISMISS_TOAST: \"DISMISS_TOAST\",\n REMOVE_TOAST: \"REMOVE_TOAST\",\n} as const;\n\nlet count = 0;\n\nfunction genId() {\n count = (count + 1) % Number.MAX_SAFE_INTEGER;\n return count.toString();\n}\n\ntype ActionType = typeof actionTypes;\n\ntype Action =\n | {\n type: ActionType[\"ADD_TOAST\"];\n toast: ToasterToast;\n }\n | {\n type: ActionType[\"UPDATE_TOAST\"];\n toast: Partial<ToasterToast>;\n }\n | {\n type: ActionType[\"DISMISS_TOAST\"];\n toastId?: ToasterToast[\"id\"];\n }\n | {\n type: ActionType[\"REMOVE_TOAST\"];\n toastId?: ToasterToast[\"id\"];\n };\n\ninterface State {\n toasts: ToasterToast[];\n}\n\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>();\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return;\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId);\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId: toastId,\n });\n }, TOAST_REMOVE_DELAY);\n\n toastTimeouts.set(toastId, timeout);\n};\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n };\n\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t\n ),\n };\n\n case \"DISMISS_TOAST\": {\n const { toastId } = action;\n\n // ! Side effects ! - This could be extracted into a dismissToast() action,\n // but I'll keep it here for simplicity\n if (toastId) {\n addToRemoveQueue(toastId);\n } else {\n state.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id);\n });\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false,\n }\n : t\n ),\n };\n }\n case \"REMOVE_TOAST\":\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: [],\n };\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n };\n }\n};\n\nconst listeners: Array<(state: State) => void> = [];\n\nlet memoryState: State = { toasts: [] };\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action);\n listeners.forEach((listener) => {\n listener(memoryState);\n });\n}\n\ntype Toast = Omit<ToasterToast, \"id\">;\n\nfunction toast({ ...props }: Toast) {\n const id = genId();\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props, id },\n });\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id });\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss();\n },\n },\n });\n\n return {\n id: id,\n dismiss,\n update,\n };\n}\n\nfunction useToast() {\n const [state, setState] = React.useState<State>(memoryState);\n\n React.useEffect(() => {\n listeners.push(setState);\n return () => {\n const index = listeners.indexOf(setState);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n };\n }, [state]);\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n };\n}\n\nexport { useToast, toast };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { useToast } from \"../../hooks/use-toast\";\nimport {\n Toast,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport,\n} from \"./toast\";\n\nfunction Toaster() {\n const { toasts } = useToast();\n\n return (\n <ToastProvider>\n {toasts.map(function ({ id, title, description, action, ...props }: any) {\n return (\n <Toast key={id} {...props}>\n <div className=\"grid gap-1\">\n {title && <ToastTitle>{title}</ToastTitle>}\n {description && (\n <ToastDescription>{description}</ToastDescription>\n )}\n </div>\n {action}\n <ToastClose />\n </Toast>\n );\n })}\n <ToastViewport />\n </ToastProvider>\n );\n}\n\nexport { Toaster };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { useState, useEffect } from \"react\";\nimport { Loader } from \"..\";\nimport { cn } from \"../../../lib/utils\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nconst thinkIndicatorVariants = cva(\n \"flex items-center gap-3\",\n {\n variants: {\n variant: {\n default: \"text-muted-foreground\",\n primary: \"text-primary\",\n secondary: \"text-secondary\",\n },\n size: {\n default: \"gap-3\",\n sm: \"gap-2\",\n lg: \"gap-4\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nexport interface ThinkIndicatorProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof thinkIndicatorVariants> {\n thoughts?: string[];\n interval?: number;\n loader?: React.ReactNode;\n}\n\nexport const ThinkIndicator = React.forwardRef<HTMLDivElement, ThinkIndicatorProps>(\n ({ \n className, \n variant,\n size,\n thoughts = [\n \"Analyzing your request...\",\n \"Processing information...\",\n \"Formulating response...\",\n ],\n interval = 5000, \n loader,\n ...props \n }, ref) => {\n const [currentThoughtIndex, setCurrentThoughtIndex] = useState<number>(0);\n const [isAnimating, setIsAnimating] = useState<boolean>(false);\n\n useEffect(() => {\n const timer = setInterval(() => {\n setIsAnimating(true);\n setTimeout(() => {\n setCurrentThoughtIndex((prev) => {\n return prev < thoughts.length - 1 ? prev + 1 : prev;\n });\n setIsAnimating(false);\n }, 300);\n }, interval);\n\n if (currentThoughtIndex === thoughts.length - 1) {\n clearInterval(timer);\n }\n\n return () => clearInterval(timer);\n }, [thoughts, interval, currentThoughtIndex]);\n\n return (\n <div\n ref={ref}\n className={cn(thinkIndicatorVariants({ variant, size }), className, \"alq--think-indicator\")}\n {...props}\n >\n {loader || (\n <Loader \n className={cn(\n size === \"sm\" ? \"h-3 w-3\" : size === \"lg\" ? \"h-5 w-5\" : \"h-4 w-4\"\n )} \n />\n )}\n <div\n className={cn(\n \"alq--think-indicator-text\",\n \"transition-all duration-300\",\n isAnimating ? \"opacity-0 -translate-y-2\" : \"opacity-100 translate-y-0\"\n )}\n >\n {thoughts[currentThoughtIndex]}\n </div>\n </div>\n );\n }\n);\n\nThinkIndicator.displayName = \"ThinkIndicator\";\n\nexport { thinkIndicatorVariants };","import { forwardRef } from \"react\";\nimport { cn } from \"../../lib/utils\";\n\ninterface PageContainerProps extends React.HTMLAttributes<HTMLDivElement> {}\nconst PageContainer = forwardRef<HTMLDivElement, PageContainerProps>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(className, \"alq--page-container\")}\n {...props}\n />\n );\n }\n);\nPageContainer.displayName = \"PageContainer\";\nexport { PageContainer };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { useState, useEffect } from \"react\";\nimport { LucideIcon } from \"lucide-react\";\nimport { Button } from \"../atoms\";\nimport { cn } from \"../../lib/utils\";\n\ninterface Suggestion {\n label: string;\n icon: LucideIcon;\n action: () => void;\n}\n\ninterface AssistantSuggestionsProps {\n suggestions: Suggestion[];\n className?: string;\n showSuggestions: boolean;\n}\n\nconst AssistantSuggestions = React.forwardRef<\n HTMLDivElement,\n AssistantSuggestionsProps\n>(({ suggestions, showSuggestions, className }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"absolute bottom-[calc(100%+0.5rem)] right-0 pb-2 mb-4 alq--assistant-suggestions-container\",\n \"transition-all duration-300\",\n showSuggestions\n ? \"opacity-100 translate-y-0\"\n : \"opacity-0 translate-y-4\",\n className\n )}\n >\n <div className=\"rounded-lg p-2 pr-0 w-64\">\n {suggestions.map((suggestion, index) => (\n <button\n key={index}\n onClick={() => suggestion.action?.()}\n style={{\n transitionDelay: showSuggestions ? `${index * 50}ms` : \"0ms\",\n }}\n className={cn(\n \"bg-background flex items-center gap-2 border p-2 pr-4 my-2 rounded-full ml-auto\",\n \"text-primary hover:bg-secondary\",\n \"transition-all duration-100\",\n \"origin-bottom w-fit\",\n \"alq--assistant-suggestion\",\n showSuggestions\n ? \"opacity-100 translate-y-0\"\n : \"opacity-0 translate-y-4\"\n )}\n >\n <suggestion.icon className=\"w-5 h-5 text-primary\" />\n <span className=\"text-xs whitespace-nowrap font-normal\">\n {suggestion.label}\n </span>\n </button>\n ))}\n </div>\n </div>\n );\n});\n\nAssistantSuggestions.displayName = \"Suggestions\";\n\ninterface AssistantButtonProps {\n icon: LucideIcon;\n clickAction: () => void;\n className?: string;\n suggestions?: Suggestion[];\n}\n\nexport const AssistantButton = React.forwardRef<\n HTMLDivElement,\n AssistantButtonProps\n>(\n (\n {\n icon: Icon,\n clickAction,\n className,\n suggestions = [],\n },\n ref\n ) => {\n const [isVisible, setIsVisible] = useState(false);\n const [showSuggestions, setShowSuggestions] = useState(false);\n\n const handleMouseEnter = () => {\n setIsVisible(true);\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n setShowSuggestions(true);\n });\n });\n };\n\n const handleMouseLeave = () => {\n setShowSuggestions(false);\n setTimeout(() => setIsVisible(false), 300);\n };\n\n return (\n <div\n ref={ref}\n className={cn(\n \"fixed bottom-8 right-4 z-50\",\n \"alq--assistant-button-container\",\n className\n )}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <div className=\"relative group\">\n {isVisible && suggestions.length > 0 && (\n <AssistantSuggestions\n suggestions={suggestions}\n showSuggestions={showSuggestions}\n />\n )}\n <Button\n variant=\"outline\"\n size=\"sm\"\n className={cn(\n \"fixed hover:bg-opacity-70 transition-all duration-300\",\n \"bottom-4 h-12 w-12 right-4 z-50 rounded-full p-2\",\n \"shadow-md\",\n \"hover:shadow-lg\",\n showSuggestions ? \"scale-110\" : \"hover:scale-105\",\n \"alq--assistant-button\"\n )}\n onClick={clickAction}\n >\n <Icon\n style={{ width: \"22px\", height: \"22px\" }}\n className=\"text-primary\"\n />\n </Button>\n </div>\n </div>\n );\n }\n);\n\nAssistantButton.displayName = \"AssistantButton\";\n","\"use client\";\n\nimport * as React from \"react\";\nimport useEmblaCarousel, {\n type UseEmblaCarouselType,\n} from \"embla-carousel-react\";\nimport { ArrowLeft, ArrowRight } from \"lucide-react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../../components/atoms/ui/button\";\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: \"horizontal\" | \"vertical\";\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a <Carousel />\");\n }\n\n return context;\n}\n\nconst Carousel = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & CarouselProps\n>(\n (\n {\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n },\n ref\n ) => {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return;\n }\n\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext]\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n\n onSelect(api);\n api.on(\"reInit\", onSelect);\n api.on(\"select\", onSelect);\n\n return () => {\n api?.off(\"select\", onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation:\n orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n ref={ref}\n onKeyDownCapture={handleKeyDown}\n className={cn(\"relative\", className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n }\n);\nCarousel.displayName = \"Carousel\";\n\nconst CarouselContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n ref={ref}\n className={cn(\n \"flex\",\n orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n className\n )}\n {...props}\n />\n </div>\n );\n});\nCarouselContent.displayName = \"CarouselContent\";\n\nconst CarouselItem = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const { orientation } = useCarousel();\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn(\n \"min-w-0 shrink-0 grow-0 basis-full\",\n orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n className\n )}\n {...props}\n />\n );\n});\nCarouselItem.displayName = \"CarouselItem\";\n\nconst CarouselPrevious = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button>\n>(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n \"absolute h-8 w-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"-left-12 top-1/2 -translate-y-1/2\"\n : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeft className=\"h-4 w-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n});\nCarouselPrevious.displayName = \"CarouselPrevious\";\n\nconst CarouselNext = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button>\n>(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n \"absolute h-8 w-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"-right-12 top-1/2 -translate-y-1/2\"\n : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRight className=\"h-4 w-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n});\nCarouselNext.displayName = \"CarouselNext\";\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n};\n","import * as React from \"react\";\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\";\nimport { cva } from \"class-variance-authority\";\nimport { ChevronDown } from \"lucide-react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n));\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1\",\n className\n )}\n {...props}\n />\n));\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\nconst navigationMenuTriggerStyle = cva(\n \"group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50\"\n);\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDown\n className=\"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n));\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\n className\n )}\n {...props}\n />\n));\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n));\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName;\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n));\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName;\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n};\n","import * as React from \"react\";\nimport { LucideIcon } from \"lucide-react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\nimport { ScrollArea, Button } from \"../atoms\";\n\nconst sidebarVariants = cva(\n \"flex flex-col border-r\",\n {\n variants: {\n size: {\n sm: \"w-48\",\n default: \"w-64\",\n lg: \"w-72\"\n },\n },\n defaultVariants: {\n size: \"default\",\n },\n }\n);\n\nexport interface SidebarItem {\n name: string;\n icon?: LucideIcon;\n disabled?: boolean;\n isLink?: boolean;\n link?: string;\n}\n\ntype SidebarBaseProps = {\n items: SidebarItem[];\n selectedSection?: SidebarItem;\n onSelect?: (item: SidebarItem) => void;\n footerContent?: React.ReactNode;\n selectedVariant?: \"default\" | \"secondary\" | \"ghost\" | \"link\";\n defaultVariant?: \"default\" | \"secondary\" | \"ghost\" | \"link\";\n buttonClassName?: string;\n}\n\nexport interface SidebarProps \n extends SidebarBaseProps,\n Omit<React.HTMLAttributes<HTMLDivElement>, keyof SidebarBaseProps>,\n VariantProps<typeof sidebarVariants> {}\n\nexport const SidebarFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"p-4\", className)}\n {...props}\n >\n {children}\n </div>\n));\nSidebarFooter.displayName = \"SidebarFooter\";\n\n\nexport const Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>(\n ({ \n className, \n items, \n selectedSection, \n onSelect, \n footerContent,\n size = \"default\",\n selectedVariant = \"secondary\",\n defaultVariant = \"ghost\",\n buttonClassName,\n ...props \n }, ref) => {\n return (\n <div className={cn(className, \"alq--navigation-sidebar h-full\")} ref={ref} {...props}>\n <aside className={cn(sidebarVariants({ size }), \"h-full\")}>\n <ScrollArea className=\"flex-grow justify-between\">\n <div className=\"flex flex-col gap-2 p-4\">\n {items.map((item) => (\n <Button\n key={item.name}\n variant={selectedSection?.name === item.name ? selectedVariant : defaultVariant}\n className={cn(\"justify-start\", buttonClassName)}\n disabled={item.disabled}\n onClick={() => {\n if (onSelect) {\n onSelect(item);\n }\n }}\n >\n {item.icon && <item.icon className=\"mr-2 h-4 w-4\" />}\n {item.name}\n </Button>\n ))}\n </div>\n </ScrollArea>\n {footerContent && (\n <SidebarFooter>\n {footerContent}\n </SidebarFooter>\n )}\n </aside>\n </div>\n );\n }\n);","\"use client\";\nimport * as React from \"react\";\nimport { useTheme } from \"next-themes\";\nimport { Toaster as Sonner } from \"sonner\";\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>;\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n const { theme = \"system\" } = useTheme();\n\n return (\n <Sonner\n theme={theme as ToasterProps[\"theme\"]}\n className=\"toaster group\"\n toastOptions={{\n classNames: {\n toast:\n \"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg\",\n description: \"group-[.toast]:text-muted-foreground\",\n actionButton:\n \"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground\",\n cancelButton:\n \"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground\",\n },\n }}\n {...props}\n />\n );\n};\nexport { Toaster as SonnerToaster };\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\nimport { Star } from \"lucide-react\"\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../atoms\";\n\nconst TooltipProvider = TooltipPrimitive.Provider\nconst Tooltip = TooltipPrimitive.Root\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground shadow-lg animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\ninterface StarColors {\n fill: string\n stroke: string\n}\n\ninterface RatingStarsProps {\n currentRating: number\n isLoading: boolean\n onRate: (rating: number) => void\n className?: string\n}\n\nconst StarRating = React.forwardRef<\n HTMLDivElement,\n { rating: number; onRate: (r: number) => void }\n>(({ rating, onRate }, ref) => (\n <div ref={ref} className=\"flex\">\n {[1, 2, 3, 4, 5].map((star) => (\n <Button\n key={star}\n onClick={() => onRate(star)}\n variant=\"link\"\n className=\"p-1 transition-colors [&_svg]:size-5 h-5\"\n aria-label={`Rate ${star} star${star !== 1 ? \"s\" : \"\"}`}\n >\n <Star\n className={cn(\n \"w-5 h-5\",\n star <= rating ? \"alq-rating-star-active fill-current stroke-current\" : \"alq-rating-star-inactive\",\n )}\n />\n </Button>\n ))}\n </div>\n));\nStarRating.displayName = \"StarRating\"\n\nexport const RatingStars = React.forwardRef<\n HTMLButtonElement,\n RatingStarsProps\n>(({\n currentRating = 0,\n onRate,\n className,\n isLoading\n}, ref) => {\n const [open, setOpen] = React.useState(false)\n const [animate, setAnimate] = React.useState(false)\n\n const handleRate = (rating: number) => {\n onRate(rating)\n setOpen(false)\n }\n\n React.useEffect(() => {\n if (currentRating > 0) {\n setAnimate(true)\n const timer = setTimeout(() => setAnimate(false), 150)\n return () => clearTimeout(timer)\n }\n }, [currentRating])\n\n const hasRated = currentRating > 0\n\n return (\n <TooltipProvider>\n <Tooltip open={open} onOpenChange={setOpen}>\n <TooltipTrigger asChild>\n <Button\n ref={ref}\n variant=\"link\"\n className={cn(\n \"inline-flex items-center justify-center rounded-md text-sm font-medium [&_svg]:size-5 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n className\n )}\n disabled={isLoading}\n onClick={() => setOpen(!open)}\n >\n <Star \n className={cn(\n \"w-5 h-5 transition-all duration-500\",\n animate && \"animate-ping\",\n isLoading && \"animate-pulse\",\n hasRated ? \"alq-rating-star-active fill-current stroke-current\" : \"alq-rating-star-inactive\",\n )}\n />\n </Button>\n </TooltipTrigger>\n <TooltipContent side=\"top\" align=\"center\" className=\"p-0\">\n <div className=\"p-2 bg-background\">\n <StarRating \n rating={currentRating} \n onRate={handleRate}\n />\n </div>\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n )\n})\nRatingStars.displayName = \"RatingStars\"\n\nexport {\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipProvider,\n}","\"use client\"\n\nimport * as React from \"react\"\nimport { ThumbsUp, ThumbsDown } from \"lucide-react\"\nimport { Button } from \"../atoms\";\nimport { cn } from \"../../lib/utils\";\n\ninterface RatingThumbsProps {\n currentRating: string\n isLoading: boolean\n onRate: (rating: \"thumbsUp\" | \"thumbsDown\" | \"\") => void\n direction?: \"row\" | \"column\"\n className?: string\n}\n\nexport const RatingThumbs = React.forwardRef<HTMLDivElement, RatingThumbsProps>(\n (\n {\n currentRating,\n onRate,\n direction = \"row\",\n className,\n isLoading\n },\n ref\n ) => {\n const [animate, setAnimate] = React.useState(false);\n\n React.useEffect(() => {\n if (currentRating) {\n setAnimate(true);\n const timer = setTimeout(() => setAnimate(false), 150);\n return () => clearTimeout(timer);\n }\n }, [currentRating]);\n\n return (\n <div\n ref={ref}\n className={cn(\n \"inline-flex\",\n direction === \"column\" ? \"flex-col\" : \"flex-row\",\n \"space-x-1 gap-4\",\n className\n )}\n >\n <Button\n variant=\"link\"\n onClick={() => onRate(currentRating === \"thumbsUp\" ? \"\" : \"thumbsUp\")}\n className={cn(\n \"p-1 transition-colors disabled:opacity-50 [&_svg]:size-5\",\n `hover:alq-rating-thumbsup/10`\n )}\n aria-label=\"Thumbs up\"\n disabled={isLoading}\n >\n <ThumbsUp\n className={cn(\n \"w-5 h-5 transition-all duration-500\",\n animate && currentRating === \"thumbsUp\" && \"animate-ping\",\n isLoading && \"animate-pulse\",\n currentRating === \"thumbsUp\" ? \"alq-rating-thumbsup fill-current stroke-current\" : \"alq-rating-thumbs-inactive fill-transparent\"\n )}\n />\n </Button>\n <Button\n variant=\"link\"\n onClick={() => onRate(currentRating === \"thumbsDown\" ? \"\" : \"thumbsDown\")}\n className={cn(\n \"p-1 transition-colors disabled:opacity-50 mt-0.5 [&_svg]:size-5\",\n `hover:bg-alq-rating-thumbsdown/10`\n )}\n aria-label=\"Thumbs down\"\n disabled={isLoading}\n >\n <ThumbsDown\n className={cn(\n \"w-5 h-5 transition-all duration-500\",\n animate && currentRating === \"thumbsDown\" && \"animate-ping\",\n isLoading && \"animate-pulse\",\n currentRating === \"thumbsDown\" ? \"alq-rating-thumbsdown fill-current stroke-current\" : \"alq-rating-thumbs-inactive fill-transparent\"\n )}\n />\n </Button>\n </div>\n );\n }\n);\n\nRatingThumbs.displayName = \"RatingThumbs\"","\"use client\"\n\nimport * as React from \"react\"\nimport { Book } from \"lucide-react\"\nimport { cn } from \"../../lib/utils\"\nimport { Button } from \"../atoms\"\nimport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogOverlay,\n DialogTitle,\n} from \"../atoms/ui/dialog\";\n\ninterface RatingCommentProps {\n currentRating: string\n onRate: (comment: string) => void\n className?: string\n isLoading?: boolean\n}\n\nexport const RatingComment = React.forwardRef<HTMLButtonElement, RatingCommentProps>(\n ({ currentRating, onRate, className, isLoading }, ref) => {\n const [open, setOpen] = React.useState(false)\n const [comment, setComment] = React.useState(\"\")\n const [animate, setAnimate] = React.useState(false);\n\n const handleRate = () => {\n onRate(comment)\n setOpen(false)\n }\n\n React.useEffect(() => {\n if (currentRating) {\n setAnimate(true);\n const timer = setTimeout(() => setAnimate(false), 150);\n return () => clearTimeout(timer);\n }\n }, [currentRating]);\n\n React.useEffect(() => {\n setComment(\"\")\n }, [open])\n\n return (\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogTrigger asChild>\n <Button\n ref={ref}\n variant=\"link\"\n size={\"lg\"}\n className={cn(\n \"inline-flex p-2 items-center justify-center rounded-md text-sm font-medium transition-colors [&_svg]:size-5 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring bg-transparent hover:none disabled:pointer-events-none disabled:opacity-50\",\n className\n )}\n disabled={isLoading}\n >\n <Book\n className={cn(\n \"w-5 h-5 transition-all duration-500\",\n animate && \"animate-ping\",\n isLoading && \"animate-pulse\",\n `${comment ? \"alq-rating-comment\" : \"stroke-gray-400\"}`\n )}\n />\n </Button>\n </DialogTrigger>\n <DialogOverlay className=\"fixed inset-0 bg-black bg-opacity-50\" />\n <DialogContent aria-describedby={undefined}>\n <DialogTitle className=\"text-lg font-medium\">\n Deja un comentario\n </DialogTitle>\n <textarea\n className=\"mt-4 w-full p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary\"\n rows={4}\n value={comment}\n onChange={(e) => setComment(e.target.value)}\n />\n <div className=\"mt-4 flex justify-end\">\n <Button\n onClick={handleRate}\n disabled={!comment}\n >\n Enviar\n </Button>\n </div>\n </DialogContent>\n </Dialog>\n );\n }\n)\n\nRatingComment.displayName = \"RatingComment\"\n","import * as React from \"react\";\nimport { ChevronDown, ChevronUp } from \"lucide-react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Button, RichText } from \"../atoms\";\nimport { Message } from \"ai\";\nimport { useTextStreaming } from \"../hooks/use-text-streaming\";\n\nexport interface CallOutMessage {\n id: string;\n role: \"user\" | \"assistant\";\n content: string;\n timestamp: Date;\n}\n\ninterface CallOutActionProps {\n label: string;\n icon: React.ReactNode;\n onClick: (message?: Message) => Promise<void>;\n custom?: boolean;\n component?: (props: { message?: Message }) => React.ReactNode;\n}\n\nexport interface CallOutProps extends React.HTMLAttributes<HTMLDivElement> {\n message?: Message;\n}\n\nconst CallOut = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & CallOutProps\n>(({ className, children, role, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\"alq--callout-box\", className)}\n data-role={role}\n {...props}\n >\n {children}\n </div>\n );\n});\n\nconst CallOutDate = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"alq--callout-date\",\n \"text-sm text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n );\n});\n\nconst CallOutActions = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & {\n actions: CallOutActionProps[];\n role: \"user\" | \"assistant\";\n message?: Message;\n }\n>(({ className, actions, role, message, ...props }, ref) => {\n const [isLoading, setIsLoading] = React.useState(false);\n const [isClicked, setIsClicked] = React.useState(false);\n\n if (role === \"user\") {\n return null;\n }\n\n return (\n <div ref={ref} className={cn(\"alq--callout-actions\", className)} {...props}>\n {actions.map((action) => (\n action.custom ? (\n <React.Fragment key={action.label}>\n {action.component?.({ message })}\n </React.Fragment>\n ) : (\n <button\n key={action.label}\n className={cn(\n \"alq--callout-action\",\n {\n \"alq--callout-animate-action\": isLoading,\n },\n {\n \"alq--callout-clicked-action\": isClicked,\n }\n )}\n type=\"button\"\n title={action.label}\n onClick={() => {\n setIsLoading(true);\n action.onClick(message).then(() => {\n setIsLoading(false);\n setIsClicked(true);\n });\n }}\n >\n <span\n className={cn(\"alq-action-icon-wrapper\", {\n \"alq--callout-animate-action\": isLoading,\n })}\n >\n {action.icon}\n </span>\n <label>{action.label}</label>\n </button>\n )\n ))}\n </div>\n );\n});\n\nconst CallOutResponse = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & {\n role: Message[\"role\"];\n additionalInfo?: string;\n toggleAdditionalInfo?: boolean;\n isStreaming?: boolean;\n handleIsTextStreaming?: (isStreaming: boolean) => void;\n }\n>(\n (\n {\n className,\n children,\n role,\n additionalInfo,\n toggleAdditionalInfo,\n isStreaming,\n handleIsTextStreaming,\n ...props\n },\n ref\n ) => {\n const [isAdditionalInfoOpen, setIsAdditionalInfoOpen] =\n React.useState(false);\n const content = String(children || \"\");\n const shouldStream = role === \"assistant\" && isStreaming;\n const displayedContent = useTextStreaming(\n content,\n shouldStream ?? false,\n handleIsTextStreaming\n );\n\n const showAsToggle = additionalInfo && toggleAdditionalInfo;\n const showInline = additionalInfo && !toggleAdditionalInfo;\n\n return (\n <div\n ref={ref}\n data-role={role}\n className={cn(\n \"alq--callout-response\",\n \"max-w-none\",\n \"text-foreground\",\n className\n )}\n {...props}\n >\n <RichText content={displayedContent} />\n {showInline && (\n <div\n className={cn(\n \"alq--callout-response-additional-info\",\n \"mt-2 text-sm text-muted-foreground whitespace-pre-line\",\n \"border-t border-border pt-2\"\n )}\n >\n {additionalInfo}\n </div>\n )}\n {showAsToggle && (\n <div\n className={cn(\n \"alq--callout-response-additional-info\",\n \"mt-2 border-t border-border pt-2\"\n )}\n >\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-auto py-1.5 px-0 text-xs text-muted-foreground hover:bg-transparent hover:text-muted-foreground -ml-1\"\n onClick={() => setIsAdditionalInfoOpen((prev) => !prev)}\n aria-expanded={isAdditionalInfoOpen}\n >\n {isAdditionalInfoOpen ? (\n <ChevronUp className=\"h-4 w-4 mr-1.5 shrink-0 transition-transform\" />\n ) : (\n <ChevronDown className=\"h-4 w-4 mr-1.5 shrink-0 transition-transform\" />\n )}\n {isAdditionalInfoOpen ? \"Hide details\" : \"Show details\"}\n </Button>\n <div\n className={cn(\n \"grid transition-[grid-template-rows] duration-200 ease-out\",\n isAdditionalInfoOpen ? \"grid-rows-[1fr]\" : \"grid-rows-[0fr]\"\n )}\n >\n <div className=\"overflow-hidden\">\n <div className=\"text-sm text-muted-foreground pt-1 whitespace-pre-line\">\n {additionalInfo}\n </div>\n </div>\n </div>\n </div>\n )}\n </div>\n );\n }\n);\n\nCallOut.displayName = \"CallOut\";\nCallOutDate.displayName = \"CallOutDate\";\nCallOutActions.displayName = \"CallOutActions\";\nCallOutResponse.displayName = \"CallOutResponse\";\nexport { CallOut, CallOutDate, CallOutResponse, CallOutActions };\n","import { useState, useEffect, useRef, useCallback } from \"react\";\n\nconst CHAR_DELAY = 15;\nconst PUNCTUATION_DELAY = 300;\n\nexport function useTextStreaming(\n content: string,\n shouldStream: boolean,\n handleIsTextStreaming?: (isStreaming: boolean) => void\n) {\n const [displayedText, setDisplayedText] = useState(\"\");\n const contentRef = useRef(content);\n const indexRef = useRef(0);\n const timerRef = useRef<NodeJS.Timeout | null>(null);\n\n const hasStartedStreaming = useRef<boolean>(false);\n\n useEffect(() => {\n contentRef.current = content;\n if (hasStartedStreaming.current && !timerRef.current && indexRef.current < contentRef.current.length) {\n typeNext();\n }\n }, [content]);\n\n const typeNext = useCallback(() => {\n if (indexRef.current < contentRef.current.length) {\n const nextChar = contentRef.current.charAt(indexRef.current);\n setDisplayedText((prev) => prev + nextChar);\n indexRef.current++;\n\n const delay = /[.!?;:]/.test(nextChar) ? PUNCTUATION_DELAY : CHAR_DELAY;\n \n timerRef.current = setTimeout(() => {\n timerRef.current = null;\n typeNext();\n }, delay);\n } else {\n handleIsTextStreaming?.(false);\n }\n }, []);\n\n useEffect(() => {\n if (!shouldStream && !hasStartedStreaming.current) {\n setDisplayedText(contentRef.current);\n indexRef.current = contentRef.current.length;\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n handleIsTextStreaming?.(false);\n } else {\n if (indexRef.current < contentRef.current.length && !timerRef.current) {\n handleIsTextStreaming?.(true);\n hasStartedStreaming.current = true;\n typeNext();\n }\n }\n\n return () => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n };\n }, [shouldStream, typeNext]);\n\n return displayedText;\n}\n\n","\"use client\";\n\nimport { Message } from \"ai\";\n\nimport { RatingData } from \"../../types/type\";\nimport { useRatings } from \"@alquimia-ai/tools/hooks\";\nimport { useToast } from \"../hooks\";\nimport { RatingThumbs, RatingStars, RatingComment } from \"../molecules\";\nimport {\n Dialog,\n DialogDescription,\n DialogTitle,\n DialogContent,\n DialogHeader,\n Typography,\n Button,\n ToastAction,\n} from \"../atoms\";\n\ninterface RatingDialogProps {\n topicId: string;\n assistantId: string;\n sendRating: (ratingData: RatingData) => Promise<any>;\n isOpen: boolean;\n onOpenChange: (open: boolean) => void;\n setHasRatedTopic: (hasRated: boolean) => void;\n onError?: (componentName: string, error: Error) => void;\n}\n\nexport function RatingDialog({\n sendRating,\n topicId,\n assistantId,\n isOpen,\n onOpenChange,\n setHasRatedTopic,\n}: RatingDialogProps) {\n const { toast } = useToast();\n const { handleRate, ratingStars, ratingThumbs, ratingComment, isLoading } =\n useRatings({ assistantId, sendRating, topicId });\n\n const onHandleRateSuccess = (success: boolean, err?: string) => {\n setTimeout(() => onOpenChange(false), 1000);\n success\n ? setHasRatedTopic(true)\n : toast({\n title: \"Error\",\n description: `Hubo un error al enviar la calificación`,\n action: (\n <ToastAction altText=\"Goto schedule to undo\">Cerrar</ToastAction>\n ),\n });\n };\n\n const handleCancelRate = () => {\n setHasRatedTopic(true);\n onOpenChange(false);\n };\n\n return (\n <Dialog open={isOpen} onOpenChange={onOpenChange}>\n <DialogContent className=\"sm:max-w-md\">\n <DialogHeader>\n <DialogTitle>Calificá esta conversación</DialogTitle>\n <DialogDescription>\n Por favor, compartí tu opinión sobre el asistente.\n </DialogDescription>\n </DialogHeader>\n <div className=\"flex flex-row justify-center gap-4 py-4\">\n <RatingStars\n currentRating={ratingStars}\n onRate={(newRating) =>\n handleRate(\"score\", newRating, onHandleRateSuccess)\n }\n isLoading={isLoading}\n className=\"p-2 rounded\"\n />\n <RatingThumbs\n currentRating={ratingComment}\n onRate={(newRating) =>\n handleRate(\"description\", newRating, onHandleRateSuccess)\n }\n direction=\"row\"\n isLoading={isLoading}\n />\n <RatingComment\n currentRating={ratingComment}\n onRate={(newRating) =>\n handleRate(\"description\", newRating, onHandleRateSuccess)\n }\n isLoading={isLoading}\n />\n </div>\n <div className=\"flex flex-row justify-center gap-4\">\n <Button onClick={handleCancelRate} variant=\"secondary\">\n <Typography as=\"p\" typeStyle=\"tiny\">\n No, gracias.\n </Typography>\n </Button>\n </div>\n </DialogContent>\n </Dialog>\n );\n}\n","\"use client\";\n\nimport { useState } from \"react\";\nimport { ApiError, ActionResponse } from \"../../types/type\";\n\nexport const useDocumentReader = (\n url: string,\n getDocument: (id: string) => Promise<ActionResponse<Blob>>,\n) => {\n const [loading, setLoading] = useState<boolean>(true);\n const [error, setError] = useState<string | null>(null);\n const [document, setDocument] = useState<Blob | null>(null);\n\n const handleDocumentError = (error: ApiError) => {\n const errorMessage = \"Hubo un error al obtener el documento. Por favor ponganse en contacto con el administrador.\";\n setError(errorMessage);\n throw new Error(error?.message || 'Unknown error');\n };\n\n const resetDocument = () => {\n setDocument(null);\n };\n\n const fetchDocument = async () => {\n setLoading(true);\n setError(null);\n \n try {\n const res = await getDocument(url);\n if (!res.success) {\n handleDocumentError(res.error as ApiError || new Error('Unknown error'));\n setLoading(false);\n return;\n }\n res.data && setDocument(res.data);\n } catch (error) {\n handleDocumentError(error as ApiError);\n } finally {\n setLoading(false);\n }\n };\n\n return { document, loading, fetchDocument, resetDocument, error };\n};\n","import { useEffect, useRef } from 'react';\n\ntype ResizeObserverOptions = {\n box?: 'content-box' | 'border-box';\n};\n\ntype ResizeObserverCallback = (entries: ResizeObserverEntry[], observer: ResizeObserver) => void;\n\nexport default function useResizeObserver(\n element: Element | null,\n options: ResizeObserverOptions | undefined,\n observerCallback: ResizeObserverCallback\n): void {\n const observerRef = useRef<ResizeObserver | null>(null);\n\n useEffect(() => {\n if (!element) return;\n\n observerRef.current = new ResizeObserver(observerCallback);\n observerRef.current.observe(element, options);\n\n return () => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n };\n }, [element, options, observerCallback]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAoC;;;ACApC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;AAEO,SAAS,kBAAkB,SAAiB;AACjD,SAAO,QAAQ,QAAQ,wBAAwB,EAAE;AACnD;AAGO,SAAS,aAAa,MAA6B;AAC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;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,eAAe;AAAA,UACf,QAAQ,CAAC,cACP,WAAW,SAAS,WAAW,mBAAmB;AAAA,UAEpD;AAAA,UACA,WAAU;AAAA;AAAA,MACZ;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,eAAe;AAAA,UACf,QAAQ,CAAC,cACP,WAAW,eAAe,WAAW,mBAAmB;AAAA,UAE1D,WAAU;AAAA,UACV;AAAA;AAAA,MACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,eAAe;AAAA,UACf,QAAQ,CAAC,cACP,WAAW,eAAe,WAAW,mBAAmB;AAAA,UAE1D;AAAA;AAAA,MACF;AAAA,OACF;AAAA,IACA,8CAAC,SAAI,WAAU,sCACb,wDAAC,UAAO,SAAS,kBAAkB,SAAQ,aACzC,wDAAC,cAAW,IAAG,KAAI,WAAU,QAAO,0BAEpC,GACF,GACF;AAAA,KACF,GACF;AAEJ;","names":["content","import_react","import_jsx_runtime","React","import_react","import_jsx_runtime","React","import_jsx_runtime","import_react","import_jsx_runtime","React","import_lucide_react","import_jsx_runtime","React","import_jsx_runtime","React","import_jsx_runtime","import_jsx_runtime","ReactMarkdown","remarkGfm","import_jsx_runtime","React","import_jsx_runtime","React","import_jsx_runtime","DrawerPrimitive","import_react","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","React","import_class_variance_authority","import_jsx_runtime","React","import_class_variance_authority","import_jsx_runtime","Label","React","import_lucide_react","import_jsx_runtime","React","import_class_variance_authority","import_jsx_runtime","React","import_jsx_runtime","React","import_jsx_runtime","React","import_jsx_runtime","React","import_jsx_runtime","React","import_react_slot","import_lucide_react","import_jsx_runtime","React","import_jsx_runtime","React","import_jsx_runtime","React","import_lucide_react","React","import_lucide_react","import_jsx_runtime","import_jsx_runtime","CommandPrimitive","CommandPrimitive","React","import_class_variance_authority","import_lucide_react","import_jsx_runtime","React","import_class_variance_authority","import_lucide_react","import_jsx_runtime","React","import_jsx_runtime","Separator","React","toast","props","import_jsx_runtime","React","import_react","import_class_variance_authority","import_jsx_runtime","import_react","import_jsx_runtime","React","import_react","import_jsx_runtime","Icon","React","import_lucide_react","import_jsx_runtime","useEmblaCarousel","api","React","import_class_variance_authority","import_lucide_react","import_jsx_runtime","React","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","React","import_lucide_react","import_jsx_runtime","React","import_lucide_react","import_jsx_runtime","React","import_lucide_react","import_jsx_runtime","React","import_lucide_react","import_react","import_jsx_runtime","import_lucide_react","import_jsx_runtime","import_react","import_react","import_jsx_runtime","toast"]}
1
+ {"version":3,"sources":["/home/runner/work/sdk-frontend/sdk-frontend/packages/ui/dist/components/organisms/index.js","../../../src/components/organisms/index.ts","../../../src/components/organisms/whisper.tsx","../../../src/lib/utils.ts","../../../src/components/organisms/speechToText.tsx","../../../src/components/organisms/assistant.tsx","../../../src/components/atoms/ui/button.tsx","../../../src/components/atoms/ui/textarea.tsx","../../../src/components/atoms/ui/input.tsx","../../../src/components/atoms/ui/select.tsx","../../../src/components/atoms/ui/avatar.tsx","../../../src/components/atoms/ui/scroll-area.tsx","../../../src/components/atoms/ui/rich-text.tsx","../../../src/components/atoms/ui/skeleton.tsx","../../../src/components/atoms/ui/card.tsx","../../../src/components/atoms/ui/drawer.tsx","../../../src/components/atoms/ui/typography/index.tsx","../../../src/components/atoms/ui/badge.tsx","../../../src/components/atoms/ui/alert.tsx","../../../src/components/atoms/ui/label.tsx","../../../src/components/atoms/ui/checkbox.tsx","../../../src/components/atoms/ui/toggle.tsx","../../../src/components/atoms/ui/slider.tsx","../../../src/components/atoms/ui/switch.tsx","../../../src/components/atoms/ui/tabs.tsx","../../../src/components/atoms/ui/aspect-ratio.tsx","../../../src/components/atoms/ui/table.tsx","../../../src/components/atoms/ui/breadcrumb.tsx","../../../src/components/molecules/alert-dialog.tsx","../../../src/components/atoms/ui/popover.tsx","../../../src/components/atoms/ui/command.tsx","../../../src/components/atoms/ui/dialog.tsx","../../../src/components/atoms/ui/toast.tsx","../../../src/components/atoms/ui/loader.tsx","../../../src/components/atoms/ui/separator.tsx","../../../src/components/hooks/use-toast.ts","../../../src/components/atoms/ui/toaster.tsx","../../../src/components/atoms/ui/think-indicator.tsx","../../../src/components/molecules/page-container.tsx","../../../src/components/molecules/assistant-button.tsx","../../../src/components/molecules/carousel.tsx","../../../src/components/molecules/navigation-menu.tsx","../../../src/components/molecules/sidebar.tsx","../../../src/components/molecules/sonner.tsx","../../../src/providers/theme-context.ts","../../../src/components/molecules/rating-stars.tsx","../../../src/components/molecules/rating-thumbs.tsx","../../../src/components/molecules/rating-comment.tsx","../../../src/components/molecules/call-out.tsx","../../../src/components/hooks/use-text-streaming.ts","../../../src/components/organisms/rating-dialog.tsx","../../../src/components/hooks/use-document.tsx","../../../src/components/hooks/use-resize-observer.ts"],"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","organisms_exports","Assistant","AssistantInput","AssistantMessageArea","RatingDialog","SpeechToText","Whisper","module","exports","import_react","require","import_clsx","import_tailwind_merge","cn","inputs","twMerge","clsx","parseTextToSpeech","content","replace","blobToBase64","blob","Promise","resolve","reject","reader","FileReader","onloadend","result","onerror","readAsDataURL","hasToolResult","data","tool_output","keys","length","getErrorMessage","error_code","import_lucide_react","import_jsx_runtime","className","message","isMessageStreaming","textToSpeech","useState","audioUrl","setAudioUrl","isPlaying","setIsPlaying","isLoading","setIsLoading","useEffect","handlePlaying","handlePause","handleEnded","addEventListener","removeEventListener","resetAudio","currentTime","pause","playAudio","url","audio","Audio","play","handleAudioPlay","handleTextToSpeech","filteredContent","audioFile","error","type","URL","createObjectURL","console","jsxs","children","jsx","onClick","AudioLinesIcon","size","disabled","LoaderCircleIcon","PlayCircleIcon","speechToText","RecordAudioIcon","IdleAudioIcon","handleReplaceInput","setIsAudioRecording","onSendAudio","props","import_react2","isRecording","setIsRecording","mediaRecorder","setMediaRecorder","audioBlob","setAudioBlob","speechResult","setSpeechResult","startRecording","stream","recorder","navigator","mediaDevices","getUserMedia","MediaRecorder","ondataavailable","event","start","stopRecording","stop","getTracks","forEach","track","handleSpeechToText","audioBase64","transcription","setTimeout","handleRecordButtonClick","recordIcons","import_jsx_runtime2","React","import_react_slot","import_class_variance_authority","buttonVariants","cva","variants","variant","default","destructive","outline","secondary","ghost","link","sm","lg","icon","defaultVariants","Button","forwardRef","ref","asChild","Comp","Slot","import_jsx_runtime3","displayName","Textarea","React2","import_jsx_runtime4","Input","import_react3","import_jsx_runtime5","SelectPrimitive","SelectTrigger","React3","import_jsx_runtime6","Trigger","Icon","import_lucide_react2","ChevronDown","SelectScrollUpButton","ScrollUpButton","ChevronUp","SelectScrollDownButton","ScrollDownButton","SelectContent","position","Portal","Content","Viewport","SelectLabel","Label","SelectItem","Item","ItemIndicator","Check","ItemText","SelectSeparator","Separator","AvatarPrimitive","Avatar","React4","import_jsx_runtime7","Root","AvatarImage","Image","AvatarFallback","Fallback","ScrollAreaPrimitive","ScrollArea","React5","import_jsx_runtime8","ScrollBar","Corner","orientation","ScrollAreaScrollbar","ScrollAreaThumb","import_react_markdown","import_remark_gfm","RichText","import_jsx_runtime9","ReactMarkdown","remarkPlugins","remarkGfm","Card","React6","import_jsx_runtime11","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","import_vaul","Drawer","shouldScaleBackground","import_jsx_runtime12","DrawerPrimitive","DrawerTrigger","DrawerPortal","DrawerClose","Close","DrawerOverlay","React7","Overlay","DrawerContent","DrawerHeader","DrawerFooter","DrawerTitle","Title","DrawerDescription","Description","Typography","import_react4","Component","as","typeStyle","import_jsx_runtime13","badgeVariants","import_class_variance_authority2","alertVariants","import_class_variance_authority3","Alert","React8","import_jsx_runtime15","role","AlertTitle","AlertDescription","LabelPrimitive","labelVariants","import_class_variance_authority4","React9","import_jsx_runtime16","CheckboxPrimitive","Checkbox","React10","import_jsx_runtime17","Indicator","import_lucide_react3","TogglePrimitive","toggleVariants","import_class_variance_authority5","Toggle","React11","import_jsx_runtime18","SliderPrimitive","Slider","React12","import_jsx_runtime19","Track","Range","Thumb","SwitchPrimitives","Switch","React13","import_jsx_runtime20","TabsPrimitive","TabsList","React14","import_jsx_runtime21","List","TabsTrigger","TabsContent","AspectRatioPrimitive","Table","React15","import_jsx_runtime22","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption","Breadcrumb","React16","import_jsx_runtime23","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","import_react_slot2","BreadcrumbPage","BreadcrumbSeparator","import_lucide_react4","ChevronRight","BreadcrumbEllipsis","MoreHorizontal","AlertDialogPrimitive","AlertDialogPortal","AlertDialogOverlay","React17","import_jsx_runtime24","AlertDialogContent","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","Action","AlertDialogCancel","Cancel","PopoverPrimitive","PopoverContent","React18","align","sideOffset","import_jsx_runtime25","import_cmdk","DialogPrimitive","Dialog","DialogTrigger","DialogPortal","DialogOverlay","React19","import_jsx_runtime26","DialogContent","import_lucide_react5","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription","Command","React20","import_jsx_runtime27","CommandPrimitive","CommandInput","import_lucide_react6","Search","CommandList","CommandEmpty","Empty","CommandGroup","Group","CommandSeparator","CommandItem","CommandShortcut","ToastPrimitives","ToastViewport","React21","import_jsx_runtime28","toastVariants","import_class_variance_authority6","Toast","ToastAction","ToastClose","import_lucide_react7","ToastTitle","ToastDescription","loaderVariants","import_class_variance_authority7","small","medium","large","xl","colorVariant","primary","Loader","React22","import_jsx_runtime29","import_lucide_react8","Loader2","SeparatorPrimitive","React23","decorative","import_jsx_runtime30","TOAST_LIMIT","TOAST_REMOVE_DELAY","count","genId","Number","MAX_SAFE_INTEGER","toString","toastTimeouts","Map","addToRemoveQueue","toastId","has","timeout","delete","dispatch","set","reducer","state","action","toasts","toast","slice","map","t","id","open","filter","listeners","memoryState","listener","update","dismiss","onOpenChange","useToast","React24","setState","push","index","indexOf","splice","thinkIndicatorVariants","import_class_variance_authority8","ThinkIndicator","React25","thoughts","interval","loader","import_react5","currentThoughtIndex","setCurrentThoughtIndex","isAnimating","setIsAnimating","timer","setInterval","prev","clearInterval","import_jsx_runtime32","PageContainer","import_react6","import_jsx_runtime33","AssistantSuggestions","React26","suggestions","showSuggestions","import_jsx_runtime34","suggestion","style","transitionDelay","label","AssistantButton","clickAction","import_react7","isVisible","setIsVisible","setShowSuggestions","handleMouseEnter","requestAnimationFrame","handleMouseLeave","onMouseEnter","onMouseLeave","width","height","import_embla_carousel_react","CarouselContext","React27","createContext","useCarousel","context","useContext","Error","Carousel","opts","setApi","plugins","useEmblaCarousel","axis","carouselRef","api","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","onSelect","useCallback","scrollPrev","scrollNext","handleKeyDown","preventDefault","on","off","import_jsx_runtime35","Provider","onKeyDownCapture","CarouselContent","CarouselItem","CarouselPrevious","import_lucide_react9","ArrowLeft","CarouselNext","ArrowRight","NavigationMenuPrimitive","NavigationMenu","React28","import_jsx_runtime36","NavigationMenuViewport","NavigationMenuList","navigationMenuTriggerStyle","import_class_variance_authority9","NavigationMenuTrigger","import_lucide_react10","NavigationMenuContent","NavigationMenuIndicator","sidebarVariants","import_class_variance_authority10","SidebarFooter","React29","import_jsx_runtime37","Sidebar","items","selectedSection","footerContent","selectedVariant","defaultVariant","buttonClassName","item","import_sonner","ThemeContext","import_react8","theme","setTheme","TooltipPrimitive","TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","React30","import_jsx_runtime39","StarRating","rating","onRate","star","import_lucide_react11","Star","RatingStars","currentRating","setOpen","animate","setAnimate","handleRate","clearTimeout","hasRated","side","RatingThumbs","React31","direction","import_jsx_runtime40","import_lucide_react12","ThumbsUp","ThumbsDown","RatingComment","React32","comment","setComment","import_jsx_runtime41","import_lucide_react13","Book","rows","onChange","e","CHAR_DELAY","PUNCTUATION_DELAY","useTextStreaming","shouldStream","handleIsTextStreaming","import_react9","displayedText","setDisplayedText","contentRef","useRef","indexRef","timerRef","hasStartedStreaming","current","typeNext","nextChar","charAt","delay","test","CallOut","React33","import_jsx_runtime42","CallOutDate","CallOutActions","actions","isClicked","setIsClicked","custom","Fragment","component","title","then","CallOutResponse","additionalInfo","toggleAdditionalInfo","isStreaming","isAdditionalInfoOpen","setIsAdditionalInfoOpen","String","displayedContent","showAsToggle","showInline","import_lucide_react14","React34","sdk","description","import_jsx_runtime43","AssistantHeader","AssistantTitle","AssistantDescription","messages","messagesEndRef","streamingMessageId","thinkIndicator","toolFactory","showDetailedErrors","import_react10","scrollIntoView","behavior","error_detail","stream_id","tooler","tool","createTool","tool_summary","control_id","created_at","Date","toLocaleString","hour","minute","hour12","sendMessageFunc","isButtonDisabled","input","handleInputChange","speechToTextComponent","userToolboxComponent","placeholders","onFileDrop","attachmentsSlot","isDragging","setIsDragging","dragCounterRef","handleDragEnter","stopPropagation","dataTransfer","types","includes","handleDragOver","handleDragLeave","handleDrop","files","Array","placeholder","onSubmit","onDragEnter","onDragOver","onDragLeave","onDrop","onKeyDown","shiftKey","import_lucide_react15","Send","import_hooks","sendRating","topicId","assistantId","isOpen","setHasRatedTopic","useRatings","ratingStars","ratingThumbs","ratingComment","onHandleRateSuccess","success","err","import_jsx_runtime44","altText","handleCancelRate","newRating"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAAwmB,qBAAAvmB,GAAA,EAAC2J,YAAA;4BAAWG,IAAG;4BAAIC,WAAU;4BAAOhK,UAAA;wBAAA;oBAEpC;gBACF;aACF;QAAA;IACF;AAGN","sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/components/organisms/index.ts\nvar organisms_exports = {};\n__export(organisms_exports, {\n Assistant: () => Assistant,\n AssistantInput: () => AssistantInput,\n AssistantMessageArea: () => AssistantMessageArea,\n RatingDialog: () => RatingDialog,\n SpeechToText: () => SpeechToText,\n Whisper: () => Whisper\n});\nmodule.exports = __toCommonJS(organisms_exports);\n\n// src/components/organisms/whisper.tsx\nvar import_react = require(\"react\");\n\n// src/lib/utils.ts\nvar import_clsx = require(\"clsx\");\nvar import_tailwind_merge = require(\"tailwind-merge\");\nfunction cn(...inputs) {\n return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));\n}\nfunction parseTextToSpeech(content) {\n return content.replace(/[^\\p{L}\\p{N}\\s.,:]/gu, \"\");\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => resolve(reader.result);\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n}\nfunction hasToolResult(data) {\n return data?.tool_output?.result && Object.keys(data.tool_output.result).length > 0;\n}\nfunction getErrorMessage(error_code) {\n switch (error_code) {\n case \"STREAM_ERROR\":\n return \"Connection lost. Please try again.\";\n case \"REQUEST_ERROR\":\n return \"There was a problem with your request. Please try again.\";\n case \"401\":\n case \"403\":\n return \"You are not authorized. Please try again.\";\n case \"404\":\n return \"Resource not found.\";\n case \"500\":\n return \"Server error. Please try again later.\";\n default:\n return \"We have an internal error, please try again later.\";\n }\n}\n\n// src/components/organisms/whisper.tsx\nvar import_lucide_react = require(\"lucide-react\");\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nfunction Whisper({\n className,\n message,\n isMessageStreaming,\n textToSpeech\n}) {\n const [audioUrl, setAudioUrl] = (0, import_react.useState)(null);\n const [isPlaying, setIsPlaying] = (0, import_react.useState)(false);\n const [isLoading, setIsLoading] = (0, import_react.useState)(false);\n const content = message.content;\n (0, import_react.useEffect)(() => {\n if (audioUrl) {\n const handlePlaying = () => setIsPlaying(true);\n const handlePause = () => setIsPlaying(false);\n const handleEnded = () => setIsPlaying(false);\n audioUrl.addEventListener(\"playing\", handlePlaying);\n audioUrl.addEventListener(\"pause\", handlePause);\n audioUrl.addEventListener(\"ended\", handleEnded);\n return () => {\n audioUrl.removeEventListener(\"playing\", handlePlaying);\n audioUrl.removeEventListener(\"pause\", handlePause);\n audioUrl.removeEventListener(\"ended\", handleEnded);\n };\n }\n }, [audioUrl]);\n const resetAudio = () => {\n audioUrl && (audioUrl.currentTime = 0);\n audioUrl?.pause();\n };\n const playAudio = (url) => {\n const audio = new Audio(url);\n audio.play();\n setAudioUrl(audio);\n };\n const handleAudioPlay = () => isPlaying ? resetAudio() : audioUrl?.play();\n const handleTextToSpeech = async (content2) => {\n if (!audioUrl) {\n setIsLoading(true);\n try {\n const filteredContent = parseTextToSpeech(content2);\n const audioFile = await textToSpeech(filteredContent);\n if (audioFile) {\n switch (audioFile.type) {\n case \"url\":\n await playAudio(audioFile.data);\n break;\n case \"blob\":\n await playAudio(URL.createObjectURL(audioFile.data));\n break;\n default:\n console.error(\"Error obtaining audio\", audioFile.message);\n }\n }\n } catch (error) {\n console.error(\"Error in text to speech:\", error);\n } finally {\n setIsLoading(false);\n }\n } else {\n setIsLoading(false);\n handleAudioPlay();\n }\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(\"div\", { className: cn(className), children: [\n isMessageStreaming && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"div\", { className: \"p-2 w-[24px] h-[24px]\" }),\n !isMessageStreaming && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(\"div\", { onClick: () => handleTextToSpeech(content), children: [\n isPlaying && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"button\", { className: \"p-2 items-center justify-center\", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\n import_lucide_react.AudioLinesIcon,\n {\n size: 20,\n className: \"animate-[wave_0.7s_infinite_ease-in-out]\"\n }\n ) }),\n isLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(\"button\", { disabled: true, className: \"p-2 items-center justify-center\", children: [\n \" \",\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\n import_lucide_react.LoaderCircleIcon,\n {\n size: 20,\n className: \"animate-[spin_1s_linear_infinite]\"\n }\n )\n ] }),\n !isLoading && !isPlaying && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\n \"button\",\n {\n disabled: isLoading,\n className: \"p-2 items-center justify-center\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.PlayCircleIcon, { size: 20 })\n }\n )\n ] })\n ] });\n}\n\n// src/components/organisms/speechToText.tsx\nvar import_react2 = require(\"react\");\nvar import_jsx_runtime2 = require(\"react/jsx-runtime\");\nfunction SpeechToText({\n className,\n speechToText,\n RecordAudioIcon,\n IdleAudioIcon,\n handleReplaceInput,\n setIsAudioRecording,\n onSendAudio,\n ...props\n}) {\n const [isRecording, setIsRecording] = (0, import_react2.useState)(false);\n const [isLoading, setIsLoading] = (0, import_react2.useState)(false);\n const [mediaRecorder, setMediaRecorder] = (0, import_react2.useState)(null);\n const [audioBlob, setAudioBlob] = (0, import_react2.useState)(null);\n const [speechResult, setSpeechResult] = (0, import_react2.useState)(null);\n const startRecording = async () => {\n setIsRecording(true);\n const stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n const recorder = new MediaRecorder(stream);\n setMediaRecorder(recorder);\n recorder.ondataavailable = (event) => {\n setAudioBlob(event.data);\n };\n recorder.start();\n };\n const stopRecording = () => {\n setIsRecording(false);\n mediaRecorder?.stop();\n mediaRecorder?.stream.getTracks().forEach((track) => track.stop());\n };\n const handleSpeechToText = async () => {\n if (!audioBlob) return;\n const audioBase64 = await blobToBase64(audioBlob);\n try {\n setIsLoading(true);\n const transcription = await speechToText(audioBase64);\n if (transcription) {\n handleReplaceInput(transcription);\n setSpeechResult(transcription);\n setIsLoading(false);\n }\n } catch (error) {\n console.error(\"Error transcribing audio:\", error);\n setIsLoading(false);\n } finally {\n setAudioBlob(null);\n }\n };\n (0, import_react2.useEffect)(() => {\n if (!isRecording && audioBlob) {\n handleSpeechToText();\n }\n }, [isRecording, audioBlob]);\n (0, import_react2.useEffect)(() => {\n isLoading || isRecording ? setIsAudioRecording(true) : setIsAudioRecording(false);\n }, [isRecording, isLoading]);\n (0, import_react2.useEffect)(() => {\n if (speechResult) {\n setTimeout(() => {\n onSendAudio && onSendAudio();\n setSpeechResult(null);\n }, 200);\n }\n }, [speechResult]);\n const handleRecordButtonClick = () => {\n if (isRecording) {\n stopRecording();\n } else {\n startRecording();\n }\n };\n const recordIcons = isRecording ? RecordAudioIcon : IdleAudioIcon;\n return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(\"div\", { className: cn(className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(\"button\", { disabled: isLoading, type: \"button\", onClick: handleRecordButtonClick, children: recordIcons }) });\n}\n\n// src/components/organisms/assistant.tsx\nvar React34 = __toESM(require(\"react\"));\nvar import_react10 = require(\"react\");\n\n// src/components/atoms/ui/button.tsx\nvar React = __toESM(require(\"react\"));\nvar import_react_slot = require(\"@radix-ui/react-slot\");\nvar import_class_variance_authority = require(\"class-variance-authority\");\nvar import_jsx_runtime3 = require(\"react/jsx-runtime\");\nvar buttonVariants = (0, import_class_variance_authority.cva)(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline: \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\"\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n);\nvar Button = React.forwardRef(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? import_react_slot.Slot : \"button\";\n return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(\n Comp,\n {\n className: cn(buttonVariants({ variant, size, className })),\n ref,\n ...props\n }\n );\n }\n);\nButton.displayName = \"Button\";\n\n// src/components/atoms/ui/textarea.tsx\nvar React2 = __toESM(require(\"react\"));\nvar import_jsx_runtime4 = require(\"react/jsx-runtime\");\nvar Textarea = React2.forwardRef(\n ({ className, ...props }, ref) => {\n return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(\n \"textarea\",\n {\n className: cn(\n \"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n \"alq--textarea\"\n ),\n ref,\n ...props\n }\n );\n }\n);\nTextarea.displayName = \"Textarea\";\n\n// src/components/atoms/ui/input.tsx\nvar import_react3 = require(\"react\");\nvar import_jsx_runtime5 = require(\"react/jsx-runtime\");\nvar Input = (0, import_react3.forwardRef)(\n ({ className, type, ...props }, ref) => {\n return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(\n \"input\",\n {\n type,\n className: cn(\n \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n \"alq--input\"\n ),\n ref,\n ...props\n }\n );\n }\n);\nInput.displayName = \"Input\";\n\n// src/components/atoms/ui/select.tsx\nvar React3 = __toESM(require(\"react\"));\nvar SelectPrimitive = __toESM(require(\"@radix-ui/react-select\"));\nvar import_lucide_react2 = require(\"lucide-react\");\nvar import_jsx_runtime6 = require(\"react/jsx-runtime\");\nvar SelectTrigger = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(\n SelectPrimitive.Trigger,\n {\n ref,\n className: cn(\n \"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className,\n \"alq--select\"\n ),\n ...props,\n children: [\n children,\n /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.ChevronDown, { className: \"h-4 w-4 opacity-50\" }) })\n ]\n }\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\nvar SelectScrollUpButton = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(\n SelectPrimitive.ScrollUpButton,\n {\n ref,\n className: cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n ),\n ...props,\n children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.ChevronUp, { className: \"h-4 w-4\" })\n }\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\nvar SelectScrollDownButton = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(\n SelectPrimitive.ScrollDownButton,\n {\n ref,\n className: cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n ),\n ...props,\n children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.ChevronDown, { className: \"h-4 w-4\" })\n }\n));\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\nvar SelectContent = React3.forwardRef(({ className, children, position = \"popper\", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(\n SelectPrimitive.Content,\n {\n ref,\n className: cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" && \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n ),\n position,\n ...props,\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectScrollUpButton, {}),\n /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(\n SelectPrimitive.Viewport,\n {\n className: cn(\n \"p-1\",\n position === \"popper\" && \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\"\n ),\n children\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectScrollDownButton, {})\n ]\n }\n) }));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\nvar SelectLabel = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(\n SelectPrimitive.Label,\n {\n ref,\n className: cn(\"py-1.5 pl-8 pr-2 text-sm font-semibold\", className),\n ...props\n }\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\nvar SelectItem = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(\n SelectPrimitive.Item,\n {\n ref,\n className: cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n ),\n ...props,\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(\"span\", { className: \"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.Check, { className: \"h-4 w-4\" }) }) }),\n /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.ItemText, { children })\n ]\n }\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\nvar SelectSeparator = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(\n SelectPrimitive.Separator,\n {\n ref,\n className: cn(\"-mx-1 my-1 h-px bg-muted\", className),\n ...props\n }\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\n// src/components/atoms/ui/avatar.tsx\nvar React4 = __toESM(require(\"react\"));\nvar AvatarPrimitive = __toESM(require(\"@radix-ui/react-avatar\"));\nvar import_jsx_runtime7 = require(\"react/jsx-runtime\");\nvar Avatar = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(\n AvatarPrimitive.Root,\n {\n ref,\n className: cn(\n \"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\n className\n ),\n ...props\n }\n));\nAvatar.displayName = AvatarPrimitive.Root.displayName;\nvar AvatarImage = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(\n AvatarPrimitive.Image,\n {\n ref,\n className: cn(\"aspect-square h-full w-full\", className),\n ...props\n }\n));\nAvatarImage.displayName = AvatarPrimitive.Image.displayName;\nvar AvatarFallback = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(\n AvatarPrimitive.Fallback,\n {\n ref,\n className: cn(\n \"flex h-full w-full items-center justify-center rounded-full bg-muted\",\n className\n ),\n ...props\n }\n));\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;\n\n// src/components/atoms/ui/scroll-area.tsx\nvar React5 = __toESM(require(\"react\"));\nvar ScrollAreaPrimitive = __toESM(require(\"@radix-ui/react-scroll-area\"));\nvar import_jsx_runtime8 = require(\"react/jsx-runtime\");\nvar ScrollArea = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(\n ScrollAreaPrimitive.Root,\n {\n ref,\n className: cn(\"relative overflow-hidden\", className),\n ...props,\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ScrollAreaPrimitive.Viewport, { className: \"h-full w-full rounded-[inherit]\", children }),\n /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ScrollBar, {}),\n /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ScrollAreaPrimitive.Corner, {})\n ]\n }\n));\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\nvar ScrollBar = React5.forwardRef(({ className, orientation = \"vertical\", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(\n ScrollAreaPrimitive.ScrollAreaScrollbar,\n {\n ref,\n orientation,\n className: cn(\n \"flex touch-none select-none transition-colors\",\n orientation === \"vertical\" && \"h-full w-2.5 border-l border-l-transparent p-[1px]\",\n orientation === \"horizontal\" && \"h-2.5 flex-col border-t border-t-transparent p-[1px]\",\n className\n ),\n ...props,\n children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: \"relative flex-1 rounded-full bg-border\" })\n }\n));\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;\n\n// src/components/atoms/ui/rich-text.tsx\nvar import_react_markdown = __toESM(require(\"react-markdown\"));\nvar import_remark_gfm = __toESM(require(\"remark-gfm\"));\nvar import_jsx_runtime9 = require(\"react/jsx-runtime\");\nfunction RichText({ content, className }) {\n return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_markdown.default, { className: cn(className), remarkPlugins: [import_remark_gfm.default], children: content });\n}\n\n// src/components/atoms/ui/skeleton.tsx\nvar import_jsx_runtime10 = require(\"react/jsx-runtime\");\n\n// src/components/atoms/ui/card.tsx\nvar React6 = __toESM(require(\"react\"));\nvar import_jsx_runtime11 = require(\"react/jsx-runtime\");\nvar Card = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(\n \"div\",\n {\n ref,\n className: cn(\n \"rounded-lg\",\n \" border\",\n \"bg-card\",\n \"text-card-foreground\",\n \"shadow-raised\",\n className\n ),\n ...props\n }\n));\nCard.displayName = \"Card\";\nvar CardHeader = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(\n \"div\",\n {\n ref,\n className: cn(\"flex flex-col space-y-1.5 p-6\", className),\n ...props\n }\n));\nCardHeader.displayName = \"CardHeader\";\nvar CardTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(\n \"h3\",\n {\n ref,\n className: cn(\"alq--typography-heading4\", className),\n ...props\n }\n));\nCardTitle.displayName = \"CardTitle\";\nvar CardDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(\n \"p\",\n {\n ref,\n className: cn(\"text-sm text-muted-foreground\", className),\n ...props\n }\n));\nCardDescription.displayName = \"CardDescription\";\nvar CardContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(\"div\", { ref, className: cn(\"p-6 pt-0\", className), ...props }));\nCardContent.displayName = \"CardContent\";\nvar CardFooter = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(\n \"div\",\n {\n ref,\n className: cn(\"flex items-center p-6 pt-0\", className),\n ...props\n }\n));\nCardFooter.displayName = \"CardFooter\";\n\n// src/components/atoms/ui/drawer.tsx\nvar React7 = __toESM(require(\"react\"));\nvar import_vaul = require(\"vaul\");\nvar import_jsx_runtime12 = require(\"react/jsx-runtime\");\nvar Drawer = ({\n shouldScaleBackground = true,\n ...props\n}) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(\n import_vaul.Drawer.Root,\n {\n shouldScaleBackground,\n ...props\n }\n);\nDrawer.displayName = \"Drawer\";\nvar DrawerTrigger = import_vaul.Drawer.Trigger;\nvar DrawerPortal = import_vaul.Drawer.Portal;\nvar DrawerClose = import_vaul.Drawer.Close;\nvar DrawerOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(\n import_vaul.Drawer.Overlay,\n {\n ref,\n className: cn(\"fixed inset-0 z-50 bg-black/80\", className),\n ...props\n }\n));\nDrawerOverlay.displayName = import_vaul.Drawer.Overlay.displayName;\nvar DrawerContent = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DrawerPortal, { children: [\n /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DrawerOverlay, {}),\n /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(\n import_vaul.Drawer.Content,\n {\n ref,\n className: cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border border-border bg-background text-foreground alq--drawer-content\",\n className\n ),\n ...props,\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(\"div\", { className: \"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted\" }),\n children\n ]\n }\n )\n] }));\nDrawerContent.displayName = \"DrawerContent\";\nvar DrawerHeader = ({\n className,\n ...props\n}) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(\n \"div\",\n {\n className: cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className, \"alq--drawer-header\"),\n ...props\n }\n);\nDrawerHeader.displayName = \"DrawerHeader\";\nvar DrawerFooter = ({\n className,\n ...props\n}) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(\n \"div\",\n {\n className: cn(\"mt-auto flex flex-col gap-2 p-4\", className, \"alq--drawer-footer\"),\n ...props\n }\n);\nDrawerFooter.displayName = \"DrawerFooter\";\nvar DrawerTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(\n import_vaul.Drawer.Title,\n {\n ref,\n className: cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n \"alq--drawer-title\"\n ),\n ...props\n }\n));\nDrawerTitle.displayName = import_vaul.Drawer.Title.displayName;\nvar DrawerDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(\n import_vaul.Drawer.Description,\n {\n ref,\n className: cn(\"text-sm text-muted-foreground\", className, \"alq--drawer-description\"),\n ...props\n }\n));\nDrawerDescription.displayName = import_vaul.Drawer.Description.displayName;\n\n// src/components/atoms/ui/typography/index.tsx\nvar import_react4 = require(\"react\");\nvar import_jsx_runtime13 = require(\"react/jsx-runtime\");\nvar Typography = (0, import_react4.forwardRef)(\n ({ as: Component = \"p\", typeStyle, ...props }, ref) => {\n return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(\n Component,\n {\n ...props,\n className: cn(props.className, `alq--typography-${typeStyle}`),\n ref\n }\n );\n }\n);\nTypography.displayName = \"Typography\";\n\n// src/components/atoms/ui/badge.tsx\nvar import_class_variance_authority2 = require(\"class-variance-authority\");\nvar import_jsx_runtime14 = require(\"react/jsx-runtime\");\nvar badgeVariants = (0, import_class_variance_authority2.cva)(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default: \"border-transparent bg-primary text-primary-foreground hover:bg-primary/80\",\n secondary: \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n destructive: \"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80\",\n outline: \"text-foreground\"\n }\n },\n defaultVariants: {\n variant: \"default\"\n }\n }\n);\n\n// src/components/atoms/ui/alert.tsx\nvar React8 = __toESM(require(\"react\"));\nvar import_class_variance_authority3 = require(\"class-variance-authority\");\nvar import_jsx_runtime15 = require(\"react/jsx-runtime\");\nvar alertVariants = (0, import_class_variance_authority3.cva)(\n \"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-background text-foreground\",\n destructive: \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\"\n }\n },\n defaultVariants: {\n variant: \"default\"\n }\n }\n);\nvar Alert = React8.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(\n \"div\",\n {\n ref,\n role: \"alert\",\n className: cn(alertVariants({ variant }), className),\n ...props\n }\n));\nAlert.displayName = \"Alert\";\nvar AlertTitle = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(\n \"h5\",\n {\n ref,\n className: cn(\"mb-1 font-medium leading-none tracking-tight\", className),\n ...props\n }\n));\nAlertTitle.displayName = \"AlertTitle\";\nvar AlertDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(\n \"div\",\n {\n ref,\n className: cn(\"text-sm [&_p]:leading-relaxed\", className),\n ...props\n }\n));\nAlertDescription.displayName = \"AlertDescription\";\n\n// src/components/atoms/ui/label.tsx\nvar React9 = __toESM(require(\"react\"));\nvar LabelPrimitive = __toESM(require(\"@radix-ui/react-label\"));\nvar import_class_variance_authority4 = require(\"class-variance-authority\");\nvar import_jsx_runtime16 = require(\"react/jsx-runtime\");\nvar labelVariants = (0, import_class_variance_authority4.cva)(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n);\nvar Label2 = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(\n LabelPrimitive.Root,\n {\n ref,\n className: cn(labelVariants(), className, \"alq--label\"),\n ...props\n }\n));\nLabel2.displayName = LabelPrimitive.Root.displayName;\n\n// src/components/atoms/ui/checkbox.tsx\nvar React10 = __toESM(require(\"react\"));\nvar CheckboxPrimitive = __toESM(require(\"@radix-ui/react-checkbox\"));\nvar import_lucide_react3 = require(\"lucide-react\");\nvar import_jsx_runtime17 = require(\"react/jsx-runtime\");\nvar Checkbox = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(\n CheckboxPrimitive.Root,\n {\n ref,\n className: cn(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\",\n className,\n \"alq--checkbox\"\n ),\n ...props,\n children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(\n CheckboxPrimitive.Indicator,\n {\n className: cn(\"flex items-center justify-center text-current\"),\n children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react3.Check, { className: \"h-4 w-4\" })\n }\n )\n }\n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\n// src/components/atoms/ui/toggle.tsx\nvar React11 = __toESM(require(\"react\"));\nvar TogglePrimitive = __toESM(require(\"@radix-ui/react-toggle\"));\nvar import_class_variance_authority5 = require(\"class-variance-authority\");\nvar import_jsx_runtime18 = require(\"react/jsx-runtime\");\nvar toggleVariants = (0, import_class_variance_authority5.cva)(\n \"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline: \"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground\"\n },\n size: {\n default: \"h-10 px-3\",\n sm: \"h-9 px-2.5\",\n lg: \"h-11 px-5\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n);\nvar Toggle = React11.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(\n TogglePrimitive.Root,\n {\n ref,\n className: cn(toggleVariants({ variant, size, className }), \"alq--toggle\"),\n ...props\n }\n));\nToggle.displayName = TogglePrimitive.Root.displayName;\n\n// src/components/atoms/ui/slider.tsx\nvar React12 = __toESM(require(\"react\"));\nvar SliderPrimitive = __toESM(require(\"@radix-ui/react-slider\"));\nvar import_jsx_runtime19 = require(\"react/jsx-runtime\");\nvar Slider = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(\n SliderPrimitive.Root,\n {\n ref,\n className: cn(\n \"relative flex w-44 touch-none select-none items-center\",\n className,\n \"alq--slider\"\n ),\n ...props,\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SliderPrimitive.Track, { className: \"relative h-2 w-44 grow overflow-hidden rounded-full bg-primary\", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SliderPrimitive.Range, { className: \"absolute h-full bg-secondary\" }) }),\n /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SliderPrimitive.Thumb, { className: \"block h-5 w-5 rounded-full border-2 border-gray bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\" })\n ]\n }\n));\nSlider.displayName = SliderPrimitive.Root.displayName;\n\n// src/components/atoms/ui/switch.tsx\nvar React13 = __toESM(require(\"react\"));\nvar SwitchPrimitives = __toESM(require(\"@radix-ui/react-switch\"));\nvar import_jsx_runtime20 = require(\"react/jsx-runtime\");\nvar Switch = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(\n SwitchPrimitives.Root,\n {\n className: cn(\n \"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n className,\n \"alq--switch\"\n ),\n ...props,\n ref,\n children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(\n SwitchPrimitives.Thumb,\n {\n className: cn(\n \"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0\"\n )\n }\n )\n }\n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\n// src/components/atoms/ui/tabs.tsx\nvar React14 = __toESM(require(\"react\"));\nvar TabsPrimitive = __toESM(require(\"@radix-ui/react-tabs\"));\nvar import_jsx_runtime21 = require(\"react/jsx-runtime\");\nvar TabsList = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(\n TabsPrimitive.List,\n {\n ref,\n className: cn(\n \"inline-flex h-10 items-center justify-center rounded-md p-1 text-muted-foreground\",\n className,\n \"alq--tabs\"\n ),\n ...props\n }\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\nvar TabsTrigger = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(\n TabsPrimitive.Trigger,\n {\n ref,\n className: cn(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:border-b-2 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-b-2 data-[state=active]:text-foreground data-[state=active]:shadow-sm\",\n className\n ),\n ...props\n }\n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\nvar TabsContent = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(\n TabsPrimitive.Content,\n {\n ref,\n className: cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n ),\n ...props\n }\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\n// src/components/atoms/ui/aspect-ratio.tsx\nvar AspectRatioPrimitive = __toESM(require(\"@radix-ui/react-aspect-ratio\"));\n\n// src/components/atoms/ui/table.tsx\nvar React15 = __toESM(require(\"react\"));\nvar import_jsx_runtime22 = require(\"react/jsx-runtime\");\nvar Table = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(\"div\", { className: \"relative w-full overflow-auto\", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(\n \"table\",\n {\n ref,\n className: cn(\"w-full caption-bottom text-sm text-foreground bg-background\", className, \"alq--table\"),\n ...props\n }\n) }));\nTable.displayName = \"Table\";\nvar TableHeader = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(\"thead\", { ref, className: cn(\"[&_tr]:border-b border-border bg-muted\", className, \"alq--table-header\"), ...props }));\nTableHeader.displayName = \"TableHeader\";\nvar TableBody = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(\n \"tbody\",\n {\n ref,\n className: cn(\"[&_tr:last-child]:border-0 [&_tr]:border-b border-border\", className, \"alq--table-body\"),\n ...props\n }\n));\nTableBody.displayName = \"TableBody\";\nvar TableFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(\n \"tfoot\",\n {\n ref,\n className: cn(\n \"border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className,\n \"alq--table-footer\"\n ),\n ...props\n }\n));\nTableFooter.displayName = \"TableFooter\";\nvar TableRow = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(\n \"tr\",\n {\n ref,\n className: cn(\n \"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\",\n className\n ),\n ...props\n }\n));\nTableRow.displayName = \"TableRow\";\nvar TableHead = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(\n \"th\",\n {\n ref,\n className: cn(\n \"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0\",\n className\n ),\n ...props\n }\n));\nTableHead.displayName = \"TableHead\";\nvar TableCell = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(\n \"td\",\n {\n ref,\n className: cn(\"p-4 align-middle [&:has([role=checkbox])]:pr-0\", className),\n ...props\n }\n));\nTableCell.displayName = \"TableCell\";\nvar TableCaption = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(\n \"caption\",\n {\n ref,\n className: cn(\"mt-4 text-sm text-muted-foreground\", className),\n ...props\n }\n));\nTableCaption.displayName = \"TableCaption\";\n\n// src/components/atoms/ui/breadcrumb.tsx\nvar React16 = __toESM(require(\"react\"));\nvar import_react_slot2 = require(\"@radix-ui/react-slot\");\nvar import_lucide_react4 = require(\"lucide-react\");\nvar import_jsx_runtime23 = require(\"react/jsx-runtime\");\nvar Breadcrumb = React16.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(\"nav\", { ref, \"aria-label\": \"breadcrumb\", ...props }));\nBreadcrumb.displayName = \"Breadcrumb\";\nvar BreadcrumbList = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(\n \"ol\",\n {\n ref,\n className: cn(\n \"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5\",\n className\n ),\n ...props\n }\n));\nBreadcrumbList.displayName = \"BreadcrumbList\";\nvar BreadcrumbItem = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(\n \"li\",\n {\n ref,\n className: cn(\"inline-flex items-center gap-1.5\", className),\n ...props\n }\n));\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\nvar BreadcrumbLink = React16.forwardRef(({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? import_react_slot2.Slot : \"a\";\n return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(\n Comp,\n {\n ref,\n className: cn(\"transition-colors hover:text-foreground\", className),\n ...props\n }\n );\n});\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\nvar BreadcrumbPage = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(\n \"span\",\n {\n ref,\n role: \"link\",\n \"aria-disabled\": \"true\",\n \"aria-current\": \"page\",\n className: cn(\"font-normal text-foreground\", className),\n ...props\n }\n));\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\nvar BreadcrumbSeparator = ({\n children,\n className,\n ...props\n}) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(\n \"li\",\n {\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n className: cn(\"[&>svg]:w-3.5 [&>svg]:h-3.5\", className),\n ...props,\n children: children ?? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react4.ChevronRight, {})\n }\n);\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\nvar BreadcrumbEllipsis = ({\n className,\n ...props\n}) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(\n \"span\",\n {\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n className: cn(\"flex h-9 w-9 items-center justify-center\", className),\n ...props,\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react4.MoreHorizontal, { className: \"h-4 w-4\" }),\n /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(\"span\", { className: \"sr-only\", children: \"More\" })\n ]\n }\n);\nBreadcrumbEllipsis.displayName = \"BreadcrumbElipssis\";\n\n// src/components/molecules/alert-dialog.tsx\nvar React17 = __toESM(require(\"react\"));\nvar AlertDialogPrimitive = __toESM(require(\"@radix-ui/react-alert-dialog\"));\nvar import_jsx_runtime24 = require(\"react/jsx-runtime\");\nvar AlertDialogPortal = AlertDialogPrimitive.Portal;\nvar AlertDialogOverlay = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(\n AlertDialogPrimitive.Overlay,\n {\n className: cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n ),\n ...props,\n ref\n }\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\nvar AlertDialogContent = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(AlertDialogPortal, { children: [\n /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(AlertDialogOverlay, {}),\n /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(\n AlertDialogPrimitive.Content,\n {\n ref,\n className: cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className\n ),\n ...props\n }\n )\n] }));\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\nvar AlertDialogHeader = ({\n className,\n ...props\n}) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(\n \"div\",\n {\n className: cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className\n ),\n ...props\n }\n);\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\nvar AlertDialogFooter = ({\n className,\n ...props\n}) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(\n \"div\",\n {\n className: cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n ),\n ...props\n }\n);\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\nvar AlertDialogTitle = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(\n AlertDialogPrimitive.Title,\n {\n ref,\n className: cn(\"text-lg font-semibold\", className),\n ...props\n }\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\nvar AlertDialogDescription = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(\n AlertDialogPrimitive.Description,\n {\n ref,\n className: cn(\"text-sm text-muted-foreground\", className),\n ...props\n }\n));\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;\nvar AlertDialogAction = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(\n AlertDialogPrimitive.Action,\n {\n ref,\n className: cn(buttonVariants(), className),\n ...props\n }\n));\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\nvar AlertDialogCancel = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(\n AlertDialogPrimitive.Cancel,\n {\n ref,\n className: cn(\n buttonVariants({ variant: \"outline\" }),\n \"mt-2 sm:mt-0\",\n className\n ),\n ...props\n }\n));\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\n// src/components/atoms/ui/popover.tsx\nvar React18 = __toESM(require(\"react\"));\nvar PopoverPrimitive = __toESM(require(\"@radix-ui/react-popover\"));\nvar import_jsx_runtime25 = require(\"react/jsx-runtime\");\nvar PopoverContent = React18.forwardRef(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(\n PopoverPrimitive.Content,\n {\n ref,\n align,\n sideOffset,\n className: cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n ),\n ...props\n }\n) }));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\n// src/components/atoms/ui/command.tsx\nvar React20 = __toESM(require(\"react\"));\nvar import_cmdk = require(\"cmdk\");\nvar import_lucide_react6 = require(\"lucide-react\");\n\n// src/components/atoms/ui/dialog.tsx\nvar React19 = __toESM(require(\"react\"));\nvar DialogPrimitive = __toESM(require(\"@radix-ui/react-dialog\"));\nvar import_lucide_react5 = require(\"lucide-react\");\nvar import_jsx_runtime26 = require(\"react/jsx-runtime\");\nvar Dialog = DialogPrimitive.Root;\nvar DialogTrigger = DialogPrimitive.Trigger;\nvar DialogPortal = DialogPrimitive.Portal;\nvar DialogOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(\n DialogPrimitive.Overlay,\n {\n ref,\n className: cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n ),\n ...props\n }\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\nvar DialogContent = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DialogPortal, { children: [\n /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogOverlay, {}),\n /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(\n DialogPrimitive.Content,\n {\n ref,\n className: cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n \"alq--dialog-content\"\n ),\n ...props,\n children: [\n children,\n /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DialogPrimitive.Close, { className: \"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\", children: [\n /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react5.X, { className: \"h-4 w-4\" }),\n /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(\"span\", { className: \"sr-only\", children: \"Close\" })\n ] })\n ]\n }\n )\n] }));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\nvar DialogHeader = ({\n className,\n ...props\n}) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(\n \"div\",\n {\n className: cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left text-foreground\",\n className,\n \"alq--dialog-header\"\n ),\n ...props\n }\n);\nDialogHeader.displayName = \"DialogHeader\";\nvar DialogFooter = ({\n className,\n ...props\n}) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(\n \"div\",\n {\n className: cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n ),\n ...props\n }\n);\nDialogFooter.displayName = \"DialogFooter\";\nvar DialogTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(\n DialogPrimitive.Title,\n {\n ref,\n className: cn(\n \"text-lg font-semibold leading-none tracking-tight text-foreground\",\n className,\n \"alq--dialog-title\"\n ),\n ...props\n }\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\nvar DialogDescription = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(\n DialogPrimitive.Description,\n {\n ref,\n className: cn(\"text-sm text-muted-foreground\", className),\n ...props\n }\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\n// src/components/atoms/ui/command.tsx\nvar import_jsx_runtime27 = require(\"react/jsx-runtime\");\nvar Command = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(\n import_cmdk.Command,\n {\n ref,\n className: cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className\n ),\n ...props\n }\n));\nCommand.displayName = import_cmdk.Command.displayName;\nvar CommandInput = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(\"div\", { className: \"flex items-center border-b px-3\", \"cmdk-input-wrapper\": \"\", children: [\n /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react6.Search, { className: \"mr-2 h-4 w-4 shrink-0 opacity-50\" }),\n /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(\n import_cmdk.Command.Input,\n {\n ref,\n className: cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n ),\n ...props\n }\n )\n] }));\nCommandInput.displayName = import_cmdk.Command.Input.displayName;\nvar CommandList = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(\n import_cmdk.Command.List,\n {\n ref,\n className: cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className),\n ...props\n }\n));\nCommandList.displayName = import_cmdk.Command.List.displayName;\nvar CommandEmpty = React20.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(\n import_cmdk.Command.Empty,\n {\n ref,\n className: \"py-6 text-center text-sm\",\n ...props\n }\n));\nCommandEmpty.displayName = import_cmdk.Command.Empty.displayName;\nvar CommandGroup = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(\n import_cmdk.Command.Group,\n {\n ref,\n className: cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className\n ),\n ...props\n }\n));\nCommandGroup.displayName = import_cmdk.Command.Group.displayName;\nvar CommandSeparator = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(\n import_cmdk.Command.Separator,\n {\n ref,\n className: cn(\"-mx-1 h-px bg-border\", className),\n ...props\n }\n));\nCommandSeparator.displayName = import_cmdk.Command.Separator.displayName;\nvar CommandItem = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(\n import_cmdk.Command.Item,\n {\n ref,\n className: cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className\n ),\n ...props\n }\n));\nCommandItem.displayName = import_cmdk.Command.Item.displayName;\nvar CommandShortcut = ({\n className,\n ...props\n}) => {\n return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(\n \"span\",\n {\n className: cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n ),\n ...props\n }\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\n// src/components/atoms/ui/toast.tsx\nvar React21 = __toESM(require(\"react\"));\nvar ToastPrimitives = __toESM(require(\"@radix-ui/react-toast\"));\nvar import_class_variance_authority6 = require(\"class-variance-authority\");\nvar import_lucide_react7 = require(\"lucide-react\");\nvar import_jsx_runtime28 = require(\"react/jsx-runtime\");\nvar ToastViewport = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(\n ToastPrimitives.Viewport,\n {\n ref,\n className: cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className\n ),\n ...props\n }\n));\nToastViewport.displayName = ToastPrimitives.Viewport.displayName;\nvar toastVariants = (0, import_class_variance_authority6.cva)(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border bg-background text-foreground\",\n destructive: \"destructive group border-destructive bg-destructive text-destructive-foreground\"\n }\n },\n defaultVariants: {\n variant: \"default\"\n }\n }\n);\nvar Toast = React21.forwardRef(({ className, variant, ...props }, ref) => {\n return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(\n ToastPrimitives.Root,\n {\n ref,\n className: cn(toastVariants({ variant }), className),\n ...props\n }\n );\n});\nToast.displayName = ToastPrimitives.Root.displayName;\nvar ToastAction = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(\n ToastPrimitives.Action,\n {\n ref,\n className: cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive\",\n className\n ),\n ...props\n }\n));\nToastAction.displayName = ToastPrimitives.Action.displayName;\nvar ToastClose = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(\n ToastPrimitives.Close,\n {\n ref,\n className: cn(\n \"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600\",\n className\n ),\n \"toast-close\": \"\",\n ...props,\n children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react7.X, { className: \"h-4 w-4\" })\n }\n));\nToastClose.displayName = ToastPrimitives.Close.displayName;\nvar ToastTitle = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(\n ToastPrimitives.Title,\n {\n ref,\n className: cn(\"text-sm font-semibold\", className),\n ...props\n }\n));\nToastTitle.displayName = ToastPrimitives.Title.displayName;\nvar ToastDescription = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(\n ToastPrimitives.Description,\n {\n ref,\n className: cn(\"text-sm opacity-90\", className),\n ...props\n }\n));\nToastDescription.displayName = ToastPrimitives.Description.displayName;\n\n// src/components/atoms/ui/loader.tsx\nvar React22 = __toESM(require(\"react\"));\nvar import_class_variance_authority7 = require(\"class-variance-authority\");\nvar import_lucide_react8 = require(\"lucide-react\");\nvar import_jsx_runtime29 = require(\"react/jsx-runtime\");\nvar loaderVariants = (0, import_class_variance_authority7.cva)(\n \"flex justify-center items-center w-full\",\n {\n variants: {\n size: {\n small: \"h-6 w-6\",\n medium: \"h-8 w-8\",\n large: \"h-12 w-12\",\n xl: \"h-24 w-24\"\n },\n colorVariant: {\n default: \"text-primary\",\n primary: \"text-primary\",\n secondary: \"text-secondary\",\n destructive: \"text-destructive\"\n }\n },\n defaultVariants: {\n size: \"medium\",\n colorVariant: \"default\"\n }\n }\n);\nvar Loader = React22.forwardRef(\n ({ className, size, colorVariant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(\n \"div\",\n {\n ref,\n className: cn(loaderVariants({ size, colorVariant }), \"flex justify-center items-center h-full w-full\", className),\n ...props,\n children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react8.Loader2, { className: \"animate-spin\" })\n }\n )\n);\nLoader.displayName = \"Loader\";\n\n// src/components/atoms/ui/separator.tsx\nvar React23 = __toESM(require(\"react\"));\nvar SeparatorPrimitive = __toESM(require(\"@radix-ui/react-separator\"));\nvar import_jsx_runtime30 = require(\"react/jsx-runtime\");\nvar Separator2 = React23.forwardRef(({ className, orientation = \"horizontal\", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(\n SeparatorPrimitive.Root,\n {\n ref,\n decorative,\n orientation,\n className: cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className,\n \"alq--separator\"\n ),\n ...props\n }\n));\nSeparator2.displayName = SeparatorPrimitive.Root.displayName;\n\n// src/components/hooks/use-toast.ts\nvar React24 = __toESM(require(\"react\"));\nvar TOAST_LIMIT = 1;\nvar TOAST_REMOVE_DELAY = 1e6;\nvar count = 0;\nfunction genId() {\n count = (count + 1) % Number.MAX_SAFE_INTEGER;\n return count.toString();\n}\nvar toastTimeouts = /* @__PURE__ */ new Map();\nvar addToRemoveQueue = (toastId) => {\n if (toastTimeouts.has(toastId)) {\n return;\n }\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId);\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId\n });\n }, TOAST_REMOVE_DELAY);\n toastTimeouts.set(toastId, timeout);\n};\nvar reducer = (state, action) => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)\n };\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map(\n (t) => t.id === action.toast.id ? { ...t, ...action.toast } : t\n )\n };\n case \"DISMISS_TOAST\": {\n const { toastId } = action;\n if (toastId) {\n addToRemoveQueue(toastId);\n } else {\n state.toasts.forEach((toast2) => {\n addToRemoveQueue(toast2.id);\n });\n }\n return {\n ...state,\n toasts: state.toasts.map(\n (t) => t.id === toastId || toastId === void 0 ? {\n ...t,\n open: false\n } : t\n )\n };\n }\n case \"REMOVE_TOAST\":\n if (action.toastId === void 0) {\n return {\n ...state,\n toasts: []\n };\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId)\n };\n }\n};\nvar listeners = [];\nvar memoryState = { toasts: [] };\nfunction dispatch(action) {\n memoryState = reducer(memoryState, action);\n listeners.forEach((listener) => {\n listener(memoryState);\n });\n}\nfunction toast({ ...props }) {\n const id = genId();\n const update = (props2) => dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props2, id }\n });\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id });\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss();\n }\n }\n });\n return {\n id,\n dismiss,\n update\n };\n}\nfunction useToast() {\n const [state, setState] = React24.useState(memoryState);\n React24.useEffect(() => {\n listeners.push(setState);\n return () => {\n const index = listeners.indexOf(setState);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n };\n }, [state]);\n return {\n ...state,\n toast,\n dismiss: (toastId) => dispatch({ type: \"DISMISS_TOAST\", toastId })\n };\n}\n\n// src/components/atoms/ui/toaster.tsx\nvar import_jsx_runtime31 = require(\"react/jsx-runtime\");\n\n// src/components/atoms/ui/think-indicator.tsx\nvar React25 = __toESM(require(\"react\"));\nvar import_react5 = require(\"react\");\nvar import_class_variance_authority8 = require(\"class-variance-authority\");\nvar import_jsx_runtime32 = require(\"react/jsx-runtime\");\nvar thinkIndicatorVariants = (0, import_class_variance_authority8.cva)(\n \"flex items-center gap-3\",\n {\n variants: {\n variant: {\n default: \"text-muted-foreground\",\n primary: \"text-primary\",\n secondary: \"text-secondary\"\n },\n size: {\n default: \"gap-3\",\n sm: \"gap-2\",\n lg: \"gap-4\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n);\nvar ThinkIndicator = React25.forwardRef(\n ({\n className,\n variant,\n size,\n thoughts = [\n \"Analyzing your request...\",\n \"Processing information...\",\n \"Formulating response...\"\n ],\n interval = 5e3,\n loader,\n ...props\n }, ref) => {\n const [currentThoughtIndex, setCurrentThoughtIndex] = (0, import_react5.useState)(0);\n const [isAnimating, setIsAnimating] = (0, import_react5.useState)(false);\n (0, import_react5.useEffect)(() => {\n const timer = setInterval(() => {\n setIsAnimating(true);\n setTimeout(() => {\n setCurrentThoughtIndex((prev) => {\n return prev < thoughts.length - 1 ? prev + 1 : prev;\n });\n setIsAnimating(false);\n }, 300);\n }, interval);\n if (currentThoughtIndex === thoughts.length - 1) {\n clearInterval(timer);\n }\n return () => clearInterval(timer);\n }, [thoughts, interval, currentThoughtIndex]);\n return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(\n \"div\",\n {\n ref,\n className: cn(thinkIndicatorVariants({ variant, size }), className, \"alq--think-indicator\"),\n ...props,\n children: [\n loader || /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(\n Loader,\n {\n className: cn(\n size === \"sm\" ? \"h-3 w-3\" : size === \"lg\" ? \"h-5 w-5\" : \"h-4 w-4\"\n )\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(\n \"div\",\n {\n className: cn(\n \"alq--think-indicator-text\",\n \"transition-all duration-300\",\n isAnimating ? \"opacity-0 -translate-y-2\" : \"opacity-100 translate-y-0\"\n ),\n children: thoughts[currentThoughtIndex]\n }\n )\n ]\n }\n );\n }\n);\nThinkIndicator.displayName = \"ThinkIndicator\";\n\n// src/components/molecules/page-container.tsx\nvar import_react6 = require(\"react\");\nvar import_jsx_runtime33 = require(\"react/jsx-runtime\");\nvar PageContainer = (0, import_react6.forwardRef)(\n ({ className, ...props }, ref) => {\n return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(\n \"div\",\n {\n ref,\n className: cn(className, \"alq--page-container\"),\n ...props\n }\n );\n }\n);\nPageContainer.displayName = \"PageContainer\";\n\n// src/components/molecules/assistant-button.tsx\nvar React26 = __toESM(require(\"react\"));\nvar import_react7 = require(\"react\");\nvar import_jsx_runtime34 = require(\"react/jsx-runtime\");\nvar AssistantSuggestions = React26.forwardRef(({ suggestions, showSuggestions, className }, ref) => {\n return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(\n \"div\",\n {\n ref,\n className: cn(\n \"absolute bottom-[calc(100%+0.5rem)] right-0 pb-2 mb-4 alq--assistant-suggestions-container\",\n \"transition-all duration-300\",\n showSuggestions ? \"opacity-100 translate-y-0\" : \"opacity-0 translate-y-4\",\n className\n ),\n children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(\"div\", { className: \"rounded-lg p-2 pr-0 w-64\", children: suggestions.map((suggestion, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(\n \"button\",\n {\n onClick: () => suggestion.action?.(),\n style: {\n transitionDelay: showSuggestions ? `${index * 50}ms` : \"0ms\"\n },\n className: cn(\n \"bg-background flex items-center gap-2 border p-2 pr-4 my-2 rounded-full ml-auto\",\n \"text-primary hover:bg-secondary\",\n \"transition-all duration-100\",\n \"origin-bottom w-fit\",\n \"alq--assistant-suggestion\",\n showSuggestions ? \"opacity-100 translate-y-0\" : \"opacity-0 translate-y-4\"\n ),\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(suggestion.icon, { className: \"w-5 h-5 text-primary\" }),\n /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(\"span\", { className: \"text-xs whitespace-nowrap font-normal\", children: suggestion.label })\n ]\n },\n index\n )) })\n }\n );\n});\nAssistantSuggestions.displayName = \"Suggestions\";\nvar AssistantButton = React26.forwardRef(\n ({\n icon: Icon2,\n clickAction,\n className,\n suggestions = []\n }, ref) => {\n const [isVisible, setIsVisible] = (0, import_react7.useState)(false);\n const [showSuggestions, setShowSuggestions] = (0, import_react7.useState)(false);\n const handleMouseEnter = () => {\n setIsVisible(true);\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n setShowSuggestions(true);\n });\n });\n };\n const handleMouseLeave = () => {\n setShowSuggestions(false);\n setTimeout(() => setIsVisible(false), 300);\n };\n return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(\n \"div\",\n {\n ref,\n className: cn(\n \"fixed bottom-8 right-4 z-50\",\n \"alq--assistant-button-container\",\n className\n ),\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(\"div\", { className: \"relative group\", children: [\n isVisible && suggestions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(\n AssistantSuggestions,\n {\n suggestions,\n showSuggestions\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(\n Button,\n {\n variant: \"outline\",\n size: \"sm\",\n className: cn(\n \"fixed hover:bg-opacity-70 transition-all duration-300\",\n \"bottom-4 h-12 w-12 right-4 z-50 rounded-full p-2\",\n \"shadow-md\",\n \"hover:shadow-lg\",\n showSuggestions ? \"scale-110\" : \"hover:scale-105\",\n \"alq--assistant-button\"\n ),\n onClick: clickAction,\n children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(\n Icon2,\n {\n style: { width: \"22px\", height: \"22px\" },\n className: \"text-primary\"\n }\n )\n }\n )\n ] })\n }\n );\n }\n);\nAssistantButton.displayName = \"AssistantButton\";\n\n// src/components/molecules/carousel.tsx\nvar React27 = __toESM(require(\"react\"));\nvar import_embla_carousel_react = __toESM(require(\"embla-carousel-react\"));\nvar import_lucide_react9 = require(\"lucide-react\");\nvar import_jsx_runtime35 = require(\"react/jsx-runtime\");\nvar CarouselContext = React27.createContext(null);\nfunction useCarousel() {\n const context = React27.useContext(CarouselContext);\n if (!context) {\n throw new Error(\"useCarousel must be used within a <Carousel />\");\n }\n return context;\n}\nvar Carousel = React27.forwardRef(\n ({\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n }, ref) => {\n const [carouselRef, api] = (0, import_embla_carousel_react.default)(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\"\n },\n plugins\n );\n const [canScrollPrev, setCanScrollPrev] = React27.useState(false);\n const [canScrollNext, setCanScrollNext] = React27.useState(false);\n const onSelect = React27.useCallback((api2) => {\n if (!api2) {\n return;\n }\n setCanScrollPrev(api2.canScrollPrev());\n setCanScrollNext(api2.canScrollNext());\n }, []);\n const scrollPrev = React27.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n const scrollNext = React27.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n const handleKeyDown = React27.useCallback(\n (event) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext]\n );\n React27.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n setApi(api);\n }, [api, setApi]);\n React27.useEffect(() => {\n if (!api) {\n return;\n }\n onSelect(api);\n api.on(\"reInit\", onSelect);\n api.on(\"select\", onSelect);\n return () => {\n api?.off(\"select\", onSelect);\n };\n }, [api, onSelect]);\n return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(\n CarouselContext.Provider,\n {\n value: {\n carouselRef,\n api,\n opts,\n orientation: orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(\n \"div\",\n {\n ref,\n onKeyDownCapture: handleKeyDown,\n className: cn(\"relative\", className),\n role: \"region\",\n \"aria-roledescription\": \"carousel\",\n ...props,\n children\n }\n )\n }\n );\n }\n);\nCarousel.displayName = \"Carousel\";\nvar CarouselContent = React27.forwardRef(({ className, ...props }, ref) => {\n const { carouselRef, orientation } = useCarousel();\n return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(\"div\", { ref: carouselRef, className: \"overflow-hidden\", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(\n \"div\",\n {\n ref,\n className: cn(\n \"flex\",\n orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n className\n ),\n ...props\n }\n ) });\n});\nCarouselContent.displayName = \"CarouselContent\";\nvar CarouselItem = React27.forwardRef(({ className, ...props }, ref) => {\n const { orientation } = useCarousel();\n return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(\n \"div\",\n {\n ref,\n role: \"group\",\n \"aria-roledescription\": \"slide\",\n className: cn(\n \"min-w-0 shrink-0 grow-0 basis-full\",\n orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n className\n ),\n ...props\n }\n );\n});\nCarouselItem.displayName = \"CarouselItem\";\nvar CarouselPrevious = React27.forwardRef(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(\n Button,\n {\n ref,\n variant,\n size,\n className: cn(\n \"absolute h-8 w-8 rounded-full\",\n orientation === \"horizontal\" ? \"-left-12 top-1/2 -translate-y-1/2\" : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n className\n ),\n disabled: !canScrollPrev,\n onClick: scrollPrev,\n ...props,\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react9.ArrowLeft, { className: \"h-4 w-4\" }),\n /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(\"span\", { className: \"sr-only\", children: \"Previous slide\" })\n ]\n }\n );\n});\nCarouselPrevious.displayName = \"CarouselPrevious\";\nvar CarouselNext = React27.forwardRef(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(\n Button,\n {\n ref,\n variant,\n size,\n className: cn(\n \"absolute h-8 w-8 rounded-full\",\n orientation === \"horizontal\" ? \"-right-12 top-1/2 -translate-y-1/2\" : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n className\n ),\n disabled: !canScrollNext,\n onClick: scrollNext,\n ...props,\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react9.ArrowRight, { className: \"h-4 w-4\" }),\n /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(\"span\", { className: \"sr-only\", children: \"Next slide\" })\n ]\n }\n );\n});\nCarouselNext.displayName = \"CarouselNext\";\n\n// src/components/molecules/navigation-menu.tsx\nvar React28 = __toESM(require(\"react\"));\nvar NavigationMenuPrimitive = __toESM(require(\"@radix-ui/react-navigation-menu\"));\nvar import_class_variance_authority9 = require(\"class-variance-authority\");\nvar import_lucide_react10 = require(\"lucide-react\");\nvar import_jsx_runtime36 = require(\"react/jsx-runtime\");\nvar NavigationMenu = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(\n NavigationMenuPrimitive.Root,\n {\n ref,\n className: cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n ),\n ...props,\n children: [\n children,\n /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(NavigationMenuViewport, {})\n ]\n }\n));\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;\nvar NavigationMenuList = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(\n NavigationMenuPrimitive.List,\n {\n ref,\n className: cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1\",\n className\n ),\n ...props\n }\n));\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;\nvar navigationMenuTriggerStyle = (0, import_class_variance_authority9.cva)(\n \"group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50\"\n);\nvar NavigationMenuTrigger = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(\n NavigationMenuPrimitive.Trigger,\n {\n ref,\n className: cn(navigationMenuTriggerStyle(), \"group\", className),\n ...props,\n children: [\n children,\n \" \",\n /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(\n import_lucide_react10.ChevronDown,\n {\n className: \"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180\",\n \"aria-hidden\": \"true\"\n }\n )\n ]\n }\n));\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;\nvar NavigationMenuContent = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(\n NavigationMenuPrimitive.Content,\n {\n ref,\n className: cn(\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\n className\n ),\n ...props\n }\n));\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;\nvar NavigationMenuViewport = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(\"div\", { className: cn(\"absolute left-0 top-full flex justify-center\"), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(\n NavigationMenuPrimitive.Viewport,\n {\n className: cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n ),\n ref,\n ...props\n }\n) }));\nNavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;\nvar NavigationMenuIndicator = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(\n NavigationMenuPrimitive.Indicator,\n {\n ref,\n className: cn(\n \"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n className\n ),\n ...props,\n children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(\"div\", { className: \"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" })\n }\n));\nNavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;\n\n// src/components/molecules/sidebar.tsx\nvar React29 = __toESM(require(\"react\"));\nvar import_class_variance_authority10 = require(\"class-variance-authority\");\nvar import_jsx_runtime37 = require(\"react/jsx-runtime\");\nvar sidebarVariants = (0, import_class_variance_authority10.cva)(\n \"flex flex-col border-r\",\n {\n variants: {\n size: {\n sm: \"w-48\",\n default: \"w-64\",\n lg: \"w-72\"\n }\n },\n defaultVariants: {\n size: \"default\"\n }\n }\n);\nvar SidebarFooter = React29.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(\n \"div\",\n {\n ref,\n className: cn(\"p-4\", className),\n ...props,\n children\n }\n));\nSidebarFooter.displayName = \"SidebarFooter\";\nvar Sidebar = React29.forwardRef(\n ({\n className,\n items,\n selectedSection,\n onSelect,\n footerContent,\n size = \"default\",\n selectedVariant = \"secondary\",\n defaultVariant = \"ghost\",\n buttonClassName,\n ...props\n }, ref) => {\n return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(\"div\", { className: cn(className, \"alq--navigation-sidebar h-full\"), ref, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(\"aside\", { className: cn(sidebarVariants({ size }), \"h-full\"), children: [\n /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ScrollArea, { className: \"flex-grow justify-between\", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(\"div\", { className: \"flex flex-col gap-2 p-4\", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(\n Button,\n {\n variant: selectedSection?.name === item.name ? selectedVariant : defaultVariant,\n className: cn(\"justify-start\", buttonClassName),\n disabled: item.disabled,\n onClick: () => {\n if (onSelect) {\n onSelect(item);\n }\n },\n children: [\n item.icon && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(item.icon, { className: \"mr-2 h-4 w-4\" }),\n item.name\n ]\n },\n item.name\n )) }) }),\n footerContent && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SidebarFooter, { children: footerContent })\n ] }) });\n }\n);\n\n// src/components/molecules/sonner.tsx\nvar import_sonner = require(\"sonner\");\n\n// src/providers/theme-context.ts\nvar import_react8 = require(\"react\");\nvar ThemeContext = (0, import_react8.createContext)({\n theme: \"system\",\n setTheme: () => {\n }\n});\n\n// src/components/molecules/sonner.tsx\nvar import_jsx_runtime38 = require(\"react/jsx-runtime\");\n\n// src/components/molecules/rating-stars.tsx\nvar React30 = __toESM(require(\"react\"));\nvar TooltipPrimitive = __toESM(require(\"@radix-ui/react-tooltip\"));\nvar import_lucide_react11 = require(\"lucide-react\");\nvar import_jsx_runtime39 = require(\"react/jsx-runtime\");\nvar TooltipProvider = TooltipPrimitive.Provider;\nvar Tooltip = TooltipPrimitive.Root;\nvar TooltipTrigger = TooltipPrimitive.Trigger;\nvar TooltipContent = React30.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(\n TooltipPrimitive.Content,\n {\n ref,\n sideOffset,\n className: cn(\n \"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground shadow-lg animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n ),\n ...props\n }\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\nvar StarRating = React30.forwardRef(({ rating, onRate }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(\"div\", { ref, className: \"flex\", children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(\n Button,\n {\n onClick: () => onRate(star),\n variant: \"link\",\n className: \"p-1 transition-colors [&_svg]:size-5 h-5\",\n \"aria-label\": `Rate ${star} star${star !== 1 ? \"s\" : \"\"}`,\n children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(\n import_lucide_react11.Star,\n {\n className: cn(\n \"w-5 h-5\",\n star <= rating ? \"alq-rating-star-active fill-current stroke-current\" : \"alq-rating-star-inactive\"\n )\n }\n )\n },\n star\n)) }));\nStarRating.displayName = \"StarRating\";\nvar RatingStars = React30.forwardRef(({\n currentRating = 0,\n onRate,\n className,\n isLoading\n}, ref) => {\n const [open, setOpen] = React30.useState(false);\n const [animate, setAnimate] = React30.useState(false);\n const handleRate = (rating) => {\n onRate(rating);\n setOpen(false);\n };\n React30.useEffect(() => {\n if (currentRating > 0) {\n setAnimate(true);\n const timer = setTimeout(() => setAnimate(false), 150);\n return () => clearTimeout(timer);\n }\n }, [currentRating]);\n const hasRated = currentRating > 0;\n return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Tooltip, { open, onOpenChange: setOpen, children: [\n /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(\n Button,\n {\n ref,\n variant: \"link\",\n className: cn(\n \"inline-flex items-center justify-center rounded-md text-sm font-medium [&_svg]:size-5 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n className\n ),\n disabled: isLoading,\n onClick: () => setOpen(!open),\n children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(\n import_lucide_react11.Star,\n {\n className: cn(\n \"w-5 h-5 transition-all duration-500\",\n animate && \"animate-ping\",\n isLoading && \"animate-pulse\",\n hasRated ? \"alq-rating-star-active fill-current stroke-current\" : \"alq-rating-star-inactive\"\n )\n }\n )\n }\n ) }),\n /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TooltipContent, { side: \"top\", align: \"center\", className: \"p-0\", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(\"div\", { className: \"p-2 bg-background\", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(\n StarRating,\n {\n rating: currentRating,\n onRate: handleRate\n }\n ) }) })\n ] }) });\n});\nRatingStars.displayName = \"RatingStars\";\n\n// src/components/molecules/rating-thumbs.tsx\nvar React31 = __toESM(require(\"react\"));\nvar import_lucide_react12 = require(\"lucide-react\");\nvar import_jsx_runtime40 = require(\"react/jsx-runtime\");\nvar RatingThumbs = React31.forwardRef(\n ({\n currentRating,\n onRate,\n direction = \"row\",\n className,\n isLoading\n }, ref) => {\n const [animate, setAnimate] = React31.useState(false);\n React31.useEffect(() => {\n if (currentRating) {\n setAnimate(true);\n const timer = setTimeout(() => setAnimate(false), 150);\n return () => clearTimeout(timer);\n }\n }, [currentRating]);\n return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(\n \"div\",\n {\n ref,\n className: cn(\n \"inline-flex\",\n direction === \"column\" ? \"flex-col\" : \"flex-row\",\n \"space-x-1 gap-4\",\n className\n ),\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(\n Button,\n {\n variant: \"link\",\n onClick: () => onRate(currentRating === \"thumbsUp\" ? \"\" : \"thumbsUp\"),\n className: cn(\n \"p-1 transition-colors disabled:opacity-50 [&_svg]:size-5\",\n `hover:alq-rating-thumbsup/10`\n ),\n \"aria-label\": \"Thumbs up\",\n disabled: isLoading,\n children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(\n import_lucide_react12.ThumbsUp,\n {\n className: cn(\n \"w-5 h-5 transition-all duration-500\",\n animate && currentRating === \"thumbsUp\" && \"animate-ping\",\n isLoading && \"animate-pulse\",\n currentRating === \"thumbsUp\" ? \"alq-rating-thumbsup fill-current stroke-current\" : \"alq-rating-thumbs-inactive fill-transparent\"\n )\n }\n )\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(\n Button,\n {\n variant: \"link\",\n onClick: () => onRate(currentRating === \"thumbsDown\" ? \"\" : \"thumbsDown\"),\n className: cn(\n \"p-1 transition-colors disabled:opacity-50 mt-0.5 [&_svg]:size-5\",\n `hover:bg-alq-rating-thumbsdown/10`\n ),\n \"aria-label\": \"Thumbs down\",\n disabled: isLoading,\n children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(\n import_lucide_react12.ThumbsDown,\n {\n className: cn(\n \"w-5 h-5 transition-all duration-500\",\n animate && currentRating === \"thumbsDown\" && \"animate-ping\",\n isLoading && \"animate-pulse\",\n currentRating === \"thumbsDown\" ? \"alq-rating-thumbsdown fill-current stroke-current\" : \"alq-rating-thumbs-inactive fill-transparent\"\n )\n }\n )\n }\n )\n ]\n }\n );\n }\n);\nRatingThumbs.displayName = \"RatingThumbs\";\n\n// src/components/molecules/rating-comment.tsx\nvar React32 = __toESM(require(\"react\"));\nvar import_lucide_react13 = require(\"lucide-react\");\nvar import_jsx_runtime41 = require(\"react/jsx-runtime\");\nvar RatingComment = React32.forwardRef(\n ({ currentRating, onRate, className, isLoading }, ref) => {\n const [open, setOpen] = React32.useState(false);\n const [comment, setComment] = React32.useState(\"\");\n const [animate, setAnimate] = React32.useState(false);\n const handleRate = () => {\n onRate(comment);\n setOpen(false);\n };\n React32.useEffect(() => {\n if (currentRating) {\n setAnimate(true);\n const timer = setTimeout(() => setAnimate(false), 150);\n return () => clearTimeout(timer);\n }\n }, [currentRating]);\n React32.useEffect(() => {\n setComment(\"\");\n }, [open]);\n return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Dialog, { open, onOpenChange: setOpen, children: [\n /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DialogTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(\n Button,\n {\n ref,\n variant: \"link\",\n size: \"lg\",\n className: cn(\n \"inline-flex p-2 items-center justify-center rounded-md text-sm font-medium transition-colors [&_svg]:size-5 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring bg-transparent hover:none disabled:pointer-events-none disabled:opacity-50\",\n className\n ),\n disabled: isLoading,\n children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(\n import_lucide_react13.Book,\n {\n className: cn(\n \"w-5 h-5 transition-all duration-500\",\n animate && \"animate-ping\",\n isLoading && \"animate-pulse\",\n `${comment ? \"alq-rating-comment\" : \"stroke-gray-400\"}`\n )\n }\n )\n }\n ) }),\n /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DialogOverlay, { className: \"fixed inset-0 bg-black bg-opacity-50\" }),\n /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(DialogContent, { \"aria-describedby\": void 0, children: [\n /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DialogTitle, { className: \"text-lg font-medium\", children: \"Deja un comentario\" }),\n /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(\n \"textarea\",\n {\n className: \"mt-4 w-full p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary\",\n rows: 4,\n value: comment,\n onChange: (e) => setComment(e.target.value)\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(\"div\", { className: \"mt-4 flex justify-end\", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(\n Button,\n {\n onClick: handleRate,\n disabled: !comment,\n children: \"Enviar\"\n }\n ) })\n ] })\n ] });\n }\n);\nRatingComment.displayName = \"RatingComment\";\n\n// src/components/molecules/call-out.tsx\nvar React33 = __toESM(require(\"react\"));\nvar import_lucide_react14 = require(\"lucide-react\");\n\n// src/components/hooks/use-text-streaming.ts\nvar import_react9 = require(\"react\");\nvar CHAR_DELAY = 15;\nvar PUNCTUATION_DELAY = 300;\nfunction useTextStreaming(content, shouldStream, handleIsTextStreaming) {\n const [displayedText, setDisplayedText] = (0, import_react9.useState)(\"\");\n const contentRef = (0, import_react9.useRef)(content);\n const indexRef = (0, import_react9.useRef)(0);\n const timerRef = (0, import_react9.useRef)(null);\n const hasStartedStreaming = (0, import_react9.useRef)(false);\n (0, import_react9.useEffect)(() => {\n contentRef.current = content;\n if (hasStartedStreaming.current && !timerRef.current && indexRef.current < contentRef.current.length) {\n typeNext();\n }\n }, [content]);\n const typeNext = (0, import_react9.useCallback)(() => {\n if (indexRef.current < contentRef.current.length) {\n const nextChar = contentRef.current.charAt(indexRef.current);\n setDisplayedText((prev) => prev + nextChar);\n indexRef.current++;\n const delay = /[.!?;:]/.test(nextChar) ? PUNCTUATION_DELAY : CHAR_DELAY;\n timerRef.current = setTimeout(() => {\n timerRef.current = null;\n typeNext();\n }, delay);\n } else {\n handleIsTextStreaming?.(false);\n }\n }, []);\n (0, import_react9.useEffect)(() => {\n if (!shouldStream && !hasStartedStreaming.current) {\n setDisplayedText(contentRef.current);\n indexRef.current = contentRef.current.length;\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n handleIsTextStreaming?.(false);\n } else {\n if (indexRef.current < contentRef.current.length && !timerRef.current) {\n handleIsTextStreaming?.(true);\n hasStartedStreaming.current = true;\n typeNext();\n }\n }\n return () => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n };\n }, [shouldStream, typeNext]);\n return displayedText;\n}\n\n// src/components/molecules/call-out.tsx\nvar import_jsx_runtime42 = require(\"react/jsx-runtime\");\nvar CallOut = React33.forwardRef(({ className, children, role, ...props }, ref) => {\n return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(\n \"div\",\n {\n ref,\n className: cn(\"alq--callout-box\", className),\n \"data-role\": role,\n ...props,\n children\n }\n );\n});\nvar CallOutDate = React33.forwardRef(({ className, children, ...props }, ref) => {\n return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(\n \"div\",\n {\n ref,\n className: cn(\n \"alq--callout-date\",\n \"text-sm text-muted-foreground\",\n className\n ),\n ...props,\n children\n }\n );\n});\nvar CallOutActions = React33.forwardRef(({ className, actions, role, message, ...props }, ref) => {\n const [isLoading, setIsLoading] = React33.useState(false);\n const [isClicked, setIsClicked] = React33.useState(false);\n if (role === \"user\") {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(\"div\", { ref, className: cn(\"alq--callout-actions\", className), ...props, children: actions.map((action) => action.custom ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(React33.Fragment, { children: action.component?.({ message }) }, action.label) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(\n \"button\",\n {\n className: cn(\n \"alq--callout-action\",\n {\n \"alq--callout-animate-action\": isLoading\n },\n {\n \"alq--callout-clicked-action\": isClicked\n }\n ),\n type: \"button\",\n title: action.label,\n onClick: () => {\n setIsLoading(true);\n action.onClick(message).then(() => {\n setIsLoading(false);\n setIsClicked(true);\n });\n },\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(\n \"span\",\n {\n className: cn(\"alq-action-icon-wrapper\", {\n \"alq--callout-animate-action\": isLoading\n }),\n children: action.icon\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(\"label\", { children: action.label })\n ]\n },\n action.label\n )) });\n});\nvar CallOutResponse = React33.forwardRef(\n ({\n className,\n children,\n role,\n additionalInfo,\n toggleAdditionalInfo,\n isStreaming,\n handleIsTextStreaming,\n ...props\n }, ref) => {\n const [isAdditionalInfoOpen, setIsAdditionalInfoOpen] = React33.useState(false);\n const content = String(children || \"\");\n const shouldStream = role === \"assistant\" && isStreaming;\n const displayedContent = useTextStreaming(\n content,\n shouldStream ?? false,\n handleIsTextStreaming\n );\n const showAsToggle = additionalInfo && toggleAdditionalInfo;\n const showInline = additionalInfo && !toggleAdditionalInfo;\n return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(\n \"div\",\n {\n ref,\n \"data-role\": role,\n className: cn(\n \"alq--callout-response\",\n \"max-w-none\",\n \"text-foreground\",\n className\n ),\n ...props,\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RichText, { content: displayedContent }),\n showInline && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(\n \"div\",\n {\n className: cn(\n \"alq--callout-response-additional-info\",\n \"mt-2 text-sm text-muted-foreground whitespace-pre-line\",\n \"border-t border-border pt-2\"\n ),\n children: additionalInfo\n }\n ),\n showAsToggle && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(\n \"div\",\n {\n className: cn(\n \"alq--callout-response-additional-info\",\n \"mt-2 border-t border-border pt-2\"\n ),\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(\n Button,\n {\n type: \"button\",\n variant: \"ghost\",\n size: \"sm\",\n className: \"h-auto py-1.5 px-0 text-xs text-muted-foreground hover:bg-transparent hover:text-muted-foreground -ml-1\",\n onClick: () => setIsAdditionalInfoOpen((prev) => !prev),\n \"aria-expanded\": isAdditionalInfoOpen,\n children: [\n isAdditionalInfoOpen ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react14.ChevronUp, { className: \"h-4 w-4 mr-1.5 shrink-0 transition-transform\" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react14.ChevronDown, { className: \"h-4 w-4 mr-1.5 shrink-0 transition-transform\" }),\n isAdditionalInfoOpen ? \"Hide details\" : \"Show details\"\n ]\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(\n \"div\",\n {\n className: cn(\n \"grid transition-[grid-template-rows] duration-200 ease-out\",\n isAdditionalInfoOpen ? \"grid-rows-[1fr]\" : \"grid-rows-[0fr]\"\n ),\n children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(\"div\", { className: \"overflow-hidden\", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(\"div\", { className: \"text-sm text-muted-foreground pt-1 whitespace-pre-line\", children: additionalInfo }) })\n }\n )\n ]\n }\n )\n ]\n }\n );\n }\n);\nCallOut.displayName = \"CallOut\";\nCallOutDate.displayName = \"CallOutDate\";\nCallOutActions.displayName = \"CallOutActions\";\nCallOutResponse.displayName = \"CallOutResponse\";\n\n// src/components/organisms/assistant.tsx\nvar import_lucide_react15 = require(\"lucide-react\");\nvar import_jsx_runtime43 = require(\"react/jsx-runtime\");\nvar Assistant = React34.forwardRef(\n ({ className, sdk, title, description, children, ...props }, ref) => {\n return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(\n \"div\",\n {\n ref,\n className: cn(\"flex flex-col h-full bg-background text-foreground\", className),\n ...props,\n children: [\n (title || description) && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(AssistantHeader, { children: [\n title && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AssistantTitle, { title }),\n description && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AssistantDescription, { description })\n ] }),\n children\n ]\n }\n );\n }\n);\nAssistant.displayName = \"Assistant\";\nvar AssistantTitle = React34.forwardRef(\n ({ className, title, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(\"div\", { ref, className: cn(\"text-foreground\", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Typography, { typeStyle: \"heading1\", as: \"h1\", children: title }) })\n);\nAssistantTitle.displayName = \"AssistantTitle\";\nvar AssistantDescription = React34.forwardRef(({ className, description, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(\"div\", { ref, className: cn(\"text-foreground\", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Typography, { typeStyle: \"display\", as: \"p\", children: description }) }));\nAssistantDescription.displayName = \"AssistantDescription\";\nvar AssistantHeader = React34.forwardRef(\n ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(\n \"div\",\n {\n ref,\n className: cn(\"bg-background text-foreground\", className),\n ...props,\n children\n }\n )\n);\nAssistantHeader.displayName = \"AssistantHeader\";\nvar AssistantMessageArea = React34.forwardRef(\n ({\n className,\n messages,\n messagesEndRef,\n actions,\n streamingMessageId,\n thinkIndicator,\n handleIsTextStreaming,\n toolFactory,\n isLoading,\n showDetailedErrors,\n ...props\n }, ref) => {\n (0, import_react10.useEffect)(() => {\n messagesEndRef.current?.scrollIntoView({ behavior: \"instant\" });\n }, []);\n return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(\n \"div\",\n {\n ref,\n className: cn(\"p-6 overflow-y-auto flex-grow bg-background\", className),\n ...props,\n children: [\n messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(\"div\", { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(\n CallOut,\n {\n role: message.role,\n message,\n children: [\n streamingMessageId === message.id && (isLoading || message.content.length === 0) && !message.error_code && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(\"div\", { children: thinkIndicator ?? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ThinkIndicator, {}) }),\n message.error_code && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(\n CallOutResponse,\n {\n role: \"assistant\",\n \"data-error-code\": message.error_code,\n additionalInfo: showDetailedErrors ? `${message.error_detail}${message.stream_id ? `\nstream id: ${message.stream_id}` : \"\"}` : void 0,\n toggleAdditionalInfo: true,\n children: getErrorMessage(message.error_code)\n }\n ),\n !message.error_code && message.tooler?.filter(hasToolResult).map((tool, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(React34.Fragment, { children: toolFactory?.createTool(tool.tool_summary?.name || \"\", tool.tool_output) }, tool.control_id || `${tool.tool_summary?.name}-${index}`)),\n message.content && !message.error_code && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(\n \"div\",\n {\n \"data-role\": message.role,\n className: \"alq--callout-message-container\",\n children: [\n message.created_at && streamingMessageId !== message.id && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(\"div\", { className: \"text-xs text-muted-foreground/80 pb-1 alq--callout-message-date\", children: new Date(Number(message.created_at)).toLocaleString(\n \"es-ES\",\n {\n hour: \"2-digit\",\n minute: \"2-digit\",\n hour12: false\n }\n ) }),\n /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(\n CallOutResponse,\n {\n role: message.role,\n isStreaming: streamingMessageId === message.id,\n handleIsTextStreaming,\n additionalInfo: streamingMessageId !== message.id ? message?.additionalInfo : void 0,\n children: message.content\n }\n ),\n actions && streamingMessageId !== message.id && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(\n CallOutActions,\n {\n actions,\n message,\n role: message.role\n },\n message.id\n )\n ]\n }\n )\n ]\n },\n message.id\n ) }, message.id)),\n /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(\"div\", { ref: messagesEndRef })\n ]\n }\n );\n }\n);\nAssistantMessageArea.displayName = \"AssistantMessageArea\";\nvar AssistantInput = React34.forwardRef(\n ({\n className,\n sendMessageFunc,\n isButtonDisabled,\n input,\n handleInputChange,\n isMessageStreaming,\n speechToTextComponent,\n userToolboxComponent,\n placeholders,\n onFileDrop,\n attachmentsSlot,\n ...props\n }, ref) => {\n const [isDragging, setIsDragging] = (0, import_react10.useState)(false);\n const dragCounterRef = (0, import_react10.useRef)(0);\n const handleDragEnter = (0, import_react10.useCallback)((e) => {\n e.preventDefault();\n e.stopPropagation();\n dragCounterRef.current += 1;\n if (e.dataTransfer.types.includes(\"Files\")) {\n setIsDragging(true);\n }\n }, []);\n const handleDragOver = (0, import_react10.useCallback)((e) => {\n e.preventDefault();\n e.stopPropagation();\n }, []);\n const handleDragLeave = (0, import_react10.useCallback)((e) => {\n e.preventDefault();\n e.stopPropagation();\n dragCounterRef.current -= 1;\n if (dragCounterRef.current === 0) {\n setIsDragging(false);\n }\n }, []);\n const handleDrop = (0, import_react10.useCallback)(\n (e) => {\n e.preventDefault();\n e.stopPropagation();\n dragCounterRef.current = 0;\n setIsDragging(false);\n const files = Array.from(e.dataTransfer.files);\n if (files.length > 0) {\n onFileDrop?.(files);\n }\n },\n [onFileDrop]\n );\n const placeholder = placeholders ? isMessageStreaming ? placeholders[0] : placeholders[1] : isMessageStreaming ? \"Processing...\" : \"Type your message here...\";\n return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(\n \"form\",\n {\n onSubmit: sendMessageFunc,\n className: cn(\n \"flex flex-col relative rounded-lg border border-input bg-background\",\n \"focus-within:ring-2 focus-within:ring-ring\",\n onFileDrop && isDragging && \"ring-2 ring-primary/50 alq--assistant-input-dragover\",\n className\n ),\n ref,\n onDragEnter: onFileDrop ? handleDragEnter : void 0,\n onDragOver: onFileDrop ? handleDragOver : void 0,\n onDragLeave: onFileDrop ? handleDragLeave : void 0,\n onDrop: onFileDrop ? handleDrop : void 0,\n ...props,\n children: [\n attachmentsSlot,\n /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(\n \"textarea\",\n {\n disabled: isButtonDisabled,\n value: input,\n onChange: handleInputChange,\n placeholder,\n className: cn(\n \"flex-1 min-w-0 text-sm p-3 focus:outline-none w-full resize-none\",\n \"bg-transparent text-foreground\",\n \"placeholder:text-muted-foreground\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n ),\n onKeyDown: (e) => {\n if (e.key === \"Enter\" && !e.shiftKey) {\n e.preventDefault();\n sendMessageFunc(e);\n }\n }\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(\"div\", { className: \"flex items-center relative alq--assistant-actions\", children: [\n userToolboxComponent,\n speechToTextComponent,\n /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(\n \"button\",\n {\n type: \"submit\",\n disabled: isButtonDisabled,\n className: cn(\n \"w-10 h-10 rounded-full flex items-center justify-center alq--assistant-button-send\",\n isButtonDisabled ? \"bg-muted text-muted-foreground\" : \"bg-primary text-primary-foreground hover:bg-primary/90\"\n ),\n children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react15.Send, { className: \"w-5 h-5\" })\n }\n )\n ] })\n ]\n }\n );\n }\n);\nAssistantInput.displayName = \"AssistantInput\";\n\n// src/components/organisms/rating-dialog.tsx\nvar import_hooks = require(\"@alquimia-ai/tools/hooks\");\n\n// src/components/hooks/use-document.tsx\nvar import_react11 = require(\"react\");\n\n// src/components/hooks/use-resize-observer.ts\nvar import_react12 = require(\"react\");\n\n// src/components/organisms/rating-dialog.tsx\nvar import_jsx_runtime44 = require(\"react/jsx-runtime\");\nfunction RatingDialog({\n sendRating,\n topicId,\n assistantId,\n isOpen,\n onOpenChange,\n setHasRatedTopic\n}) {\n const { toast: toast2 } = useToast();\n const { handleRate, ratingStars, ratingThumbs, ratingComment, isLoading } = (0, import_hooks.useRatings)({ assistantId, sendRating, topicId });\n const onHandleRateSuccess = (success, err) => {\n setTimeout(() => onOpenChange(false), 1e3);\n success ? setHasRatedTopic(true) : toast2({\n title: \"Error\",\n description: `Hubo un error al enviar la calificaci\\xF3n`,\n action: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ToastAction, { altText: \"Goto schedule to undo\", children: \"Cerrar\" })\n });\n };\n const handleCancelRate = () => {\n setHasRatedTopic(true);\n onOpenChange(false);\n };\n return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Dialog, { open: isOpen, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(DialogContent, { className: \"sm:max-w-md\", children: [\n /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(DialogHeader, { children: [\n /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DialogTitle, { children: \"Calific\\xE1 esta conversaci\\xF3n\" }),\n /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DialogDescription, { children: \"Por favor, compart\\xED tu opini\\xF3n sobre el asistente.\" })\n ] }),\n /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(\"div\", { className: \"flex flex-row justify-center gap-4 py-4\", children: [\n /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(\n RatingStars,\n {\n currentRating: ratingStars,\n onRate: (newRating) => handleRate(\"score\", newRating, onHandleRateSuccess),\n isLoading,\n className: \"p-2 rounded\"\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(\n RatingThumbs,\n {\n currentRating: ratingComment,\n onRate: (newRating) => handleRate(\"description\", newRating, onHandleRateSuccess),\n direction: \"row\",\n isLoading\n }\n ),\n /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(\n RatingComment,\n {\n currentRating: ratingComment,\n onRate: (newRating) => handleRate(\"description\", newRating, onHandleRateSuccess),\n isLoading\n }\n )\n ] }),\n /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(\"div\", { className: \"flex flex-row justify-center gap-4\", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Button, { onClick: handleCancelRate, variant: \"secondary\", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Typography, { as: \"p\", typeStyle: \"tiny\", children: \"No, gracias.\" }) }) })\n ] }) });\n}\n","export { Whisper } from \"./whisper\";\nexport { SpeechToText } from \"./speechToText\";\nexport { Assistant } from \"./assistant\";\nexport { RatingDialog } from \"./rating-dialog\";\nexport { AssistantMessageArea } from \"./assistant\";\nexport { AssistantInput } from \"./assistant\";\n","import { useState, useEffect } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { AudioLinesIcon, PlayCircleIcon, LoaderCircleIcon } from \"lucide-react\";\nimport { Message } from \"ai\";\nimport { parseTextToSpeech } from \"../../lib/utils\";\nimport { TTSResult } from \"../../types/type\";\ninterface WhisperProps extends React.HTMLAttributes<HTMLDivElement> {\n message: Message;\n isMessageStreaming: boolean;\n textToSpeech: (content: string) => Promise<TTSResult>;\n}\n\nfunction Whisper({\n className,\n message,\n isMessageStreaming,\n textToSpeech,\n}: WhisperProps) {\n const [audioUrl, setAudioUrl] = useState<HTMLAudioElement | null>(null);\n const [isPlaying, setIsPlaying] = useState<boolean>(false);\n const [isLoading, setIsLoading] = useState<boolean>(false);\n\n const content = message.content;\n\n useEffect(() => {\n if (audioUrl) {\n const handlePlaying = () => setIsPlaying(true);\n const handlePause = () => setIsPlaying(false);\n const handleEnded = () => setIsPlaying(false);\n\n audioUrl.addEventListener(\"playing\", handlePlaying);\n audioUrl.addEventListener(\"pause\", handlePause);\n audioUrl.addEventListener(\"ended\", handleEnded);\n\n return () => {\n audioUrl.removeEventListener(\"playing\", handlePlaying);\n audioUrl.removeEventListener(\"pause\", handlePause);\n audioUrl.removeEventListener(\"ended\", handleEnded);\n };\n }\n }, [audioUrl]);\n\n const resetAudio = () => {\n audioUrl && (audioUrl.currentTime = 0);\n audioUrl?.pause();\n };\n\n const playAudio = (url: string) => {\n const audio = new Audio(url);\n audio.play();\n setAudioUrl(audio);\n };\n\n const handleAudioPlay = () => (isPlaying ? resetAudio() : audioUrl?.play());\n\n const handleTextToSpeech = async (content: string) => {\n if (!audioUrl) {\n setIsLoading(true);\n try {\n const filteredContent = parseTextToSpeech(content);\n const audioFile = await textToSpeech(filteredContent);\n\n if (audioFile) {\n switch (audioFile.type) {\n case \"url\":\n await playAudio(audioFile.data);\n break;\n case \"blob\":\n await playAudio(URL.createObjectURL(audioFile.data));\n break;\n default:\n console.error(\"Error obtaining audio\", audioFile.message);\n }\n }\n } catch (error) {\n console.error(\"Error in text to speech:\", error);\n } finally {\n setIsLoading(false);\n }\n } else {\n setIsLoading(false);\n handleAudioPlay();\n }\n };\n\n return (\n <div className={cn(className)}>\n {isMessageStreaming && <div className=\"p-2 w-[24px] h-[24px]\"></div>}\n {!isMessageStreaming && (\n <div onClick={() => handleTextToSpeech(content)}>\n {isPlaying && (\n <button className=\"p-2 items-center justify-center\">\n <AudioLinesIcon\n size={20}\n className=\"animate-[wave_0.7s_infinite_ease-in-out]\"\n />\n </button>\n )}\n\n {isLoading && (\n <button disabled className=\"p-2 items-center justify-center\">\n {\" \"}\n <LoaderCircleIcon\n size={20}\n className=\"animate-[spin_1s_linear_infinite]\"\n />\n </button>\n )}\n\n {!isLoading && !isPlaying && (\n <button\n disabled={isLoading}\n className=\"p-2 items-center justify-center\"\n >\n <PlayCircleIcon size={20} />\n </button>\n )}\n </div>\n )}\n </div>\n );\n}\n\nexport { Whisper };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport function parseTextToSpeech(content: string) {\n return content.replace(/[^\\p{L}\\p{N}\\s.,:]/gu, '');\n}\n\n\nexport function blobToBase64(blob: Blob): Promise<string> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => resolve(reader.result as string);\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n};\n\nexport const truncateString = (str: string, maxLength: number): string => {\n if (str.length <= maxLength) {\n return str;\n }\n return str.slice(0, maxLength) + \"...\";\n};\n\nexport function getCookies(name: string) {\n if (typeof document === 'undefined') return undefined;\n const value = `; ${document.cookie}`;\n const parts = value.split(`; ${name}=`);\n if (parts.length === 2) return parts.pop()?.split(\";\").shift();\n}\n\nexport function hasToolResult(data: any) {\n return data?.tool_output?.result && Object.keys(data.tool_output.result).length > 0;\n}\n\nexport function getErrorMessage(error_code?: string) {\n switch (error_code) {\n case \"STREAM_ERROR\":\n return \"Connection lost. Please try again.\";\n case \"REQUEST_ERROR\":\n return \"There was a problem with your request. Please try again.\";\n case \"401\":\n case \"403\":\n return \"You are not authorized. Please try again.\";\n case \"404\":\n return \"Resource not found.\";\n case \"500\":\n return \"Server error. Please try again later.\";\n default:\n return \"We have an internal error, please try again later.\";\n }\n}\n","import { useState, useEffect } from \"react\";\nimport { cn, blobToBase64 } from \"../../lib/utils\";\ninterface SpeechToTextProps extends React.HTMLAttributes<HTMLDivElement> {\n RecordAudioIcon: React.ReactElement;\n IdleAudioIcon: React.ReactElement;\n speechToText: (audio: string) => Promise<string>;\n handleReplaceInput: (text: string) => void;\n setIsAudioRecording: React.Dispatch<React.SetStateAction<boolean>>;\n onSendAudio?: () => void;\n}\n\nfunction SpeechToText({\n className,\n speechToText,\n RecordAudioIcon,\n IdleAudioIcon,\n handleReplaceInput,\n setIsAudioRecording,\n onSendAudio,\n ...props\n}: SpeechToTextProps) {\n const [isRecording, setIsRecording] = useState<boolean>(false);\n const [isLoading, setIsLoading] = useState<boolean>(false);\n const [mediaRecorder, setMediaRecorder] = useState<MediaRecorder | null>(null);\n const [audioBlob, setAudioBlob] = useState<Blob | null>(null);\n const [speechResult, setSpeechResult] = useState<string | null>(null);\n\n const startRecording = async () => {\n setIsRecording(true);\n const stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n const recorder = new MediaRecorder(stream);\n setMediaRecorder(recorder);\n\n recorder.ondataavailable = (event) => {\n setAudioBlob(event.data);\n };\n\n recorder.start();\n };\n\n const stopRecording = () => {\n setIsRecording(false);\n mediaRecorder?.stop();\n mediaRecorder?.stream.getTracks().forEach(track => track.stop());\n };\n\n const handleSpeechToText = async () => {\n if (!audioBlob) return;\n\n const audioBase64 = await blobToBase64(audioBlob);\n try {\n setIsLoading(true)\n const transcription = await speechToText(audioBase64);\n if (transcription) {\n handleReplaceInput(transcription);\n setSpeechResult(transcription);\n setIsLoading(false)\n }\n } catch (error) {\n console.error('Error transcribing audio:', error);\n setIsLoading(false)\n } finally {\n setAudioBlob(null);\n }\n };\n\n useEffect(() => {\n if (!isRecording && audioBlob) {\n handleSpeechToText();\n }\n }, [isRecording, audioBlob]);\n\n useEffect(() => {\n isLoading || isRecording ? setIsAudioRecording(true) : setIsAudioRecording(false);\n }, [isRecording, isLoading]);\n\n useEffect(() => {\n if (speechResult) {\n setTimeout(() => {\n onSendAudio && onSendAudio();\n setSpeechResult(null);\n }, 200)\n }\n }, [speechResult])\n\n const handleRecordButtonClick = () => {\n if (isRecording) {\n stopRecording();\n } else {\n startRecording();\n }\n };\n\n const recordIcons = isRecording ? RecordAudioIcon : IdleAudioIcon\n\n return (\n <div className={cn(className)} {...props}>\n <button disabled={isLoading} type=\"button\" onClick={handleRecordButtonClick}>\n {recordIcons}\n </button>\n </div>\n );\n}\n\nexport { SpeechToText };","\"use client\";\n\nimport * as React from \"react\";\nimport { FormEvent, useCallback, useEffect, useRef, useState } from \"react\";\nimport { AlquimiaSDK } from \"@alquimia-ai/tools/sdk\";\nimport { Typography } from \"../atoms\";\nimport { CallOut, CallOutResponse, CallOutActions } from \"../molecules\";\nimport { ThinkIndicator } from \"../atoms\";\nimport { cn, getErrorMessage, hasToolResult } from \"../../lib/utils\";\nimport { Message } from \"ai\";\nimport { Send } from \"lucide-react\";\nimport { Tooler, ToolFactory } from \"../../types\";\n\ninterface AssistantProps extends React.HTMLAttributes<HTMLDivElement> {\n sdk: AlquimiaSDK;\n title?: string;\n description?: string;\n}\n\nconst Assistant = React.forwardRef<HTMLDivElement, AssistantProps>(\n ({ className, sdk, title, description, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col h-full bg-background text-foreground\", className)}\n {...props}\n >\n {(title || description) && (\n <AssistantHeader>\n {title && <AssistantTitle title={title} />}\n {description && <AssistantDescription description={description} />}\n </AssistantHeader>\n )}\n {children}\n </div>\n );\n }\n);\nAssistant.displayName = \"Assistant\";\n\ninterface AssistantTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {\n title: string;\n}\n\nconst AssistantTitle = React.forwardRef<HTMLHeadingElement, AssistantTitleProps>(\n ({ className, title, ...props }, ref) => (\n <div ref={ref} className={cn(\"text-foreground\", className)} {...props}>\n <Typography typeStyle=\"heading1\" as=\"h1\">\n {title}\n </Typography>\n </div>\n )\n);\nAssistantTitle.displayName = \"AssistantTitle\";\n\ninterface AssistantDescriptionProps\n extends React.HTMLAttributes<HTMLParagraphElement> {\n description: string;\n}\n\nconst AssistantDescription = React.forwardRef<\n HTMLParagraphElement,\n AssistantDescriptionProps\n>(({ className, description, ...props }, ref) => (\n <div ref={ref} className={cn(\"text-foreground\", className)} {...props}>\n <Typography typeStyle=\"display\" as=\"p\">\n {description}\n </Typography>\n </div>\n));\nAssistantDescription.displayName = \"AssistantDescription\";\n\ninterface AssistantHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst AssistantHeader = React.forwardRef<HTMLDivElement, AssistantHeaderProps>(\n ({ className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"bg-background text-foreground\", className)}\n {...props}\n >\n {children}\n </div>\n )\n);\nAssistantHeader.displayName = \"AssistantHeader\";\n\ninterface MessageAction {\n label: string;\n icon: React.ReactNode;\n onClick: (message?: Message) => Promise<void>;\n custom?: boolean;\n component?: (props: { message?: Message }) => React.ReactNode;\n}\n\ninterface AssistantMessageAreaProps\n extends React.HTMLAttributes<HTMLDivElement> {\n messages: (Message & {\n error_code?: string;\n created_at?: string;\n error_detail?: string;\n additionalInfo?: string;\n loading?: boolean;\n tooler?: Tooler[];\n stream_id?: string;\n })[];\n actions?: MessageAction[];\n messagesEndRef: any;\n thinkIndicator?: React.ReactNode;\n isMessageStreaming?: boolean;\n streamingMessageId: string | null;\n handleIsTextStreaming?: (isStreaming: boolean) => void;\n toolFactory?: ToolFactory;\n isLoading: boolean;\n showDetailedErrors?: boolean;\n}\n\nconst AssistantMessageArea = React.forwardRef<\n HTMLDivElement,\n AssistantMessageAreaProps\n>(\n (\n {\n className,\n messages,\n messagesEndRef,\n actions,\n streamingMessageId,\n thinkIndicator,\n handleIsTextStreaming,\n toolFactory,\n isLoading,\n showDetailedErrors,\n ...props\n },\n ref\n ) => {\n useEffect(() => {\n messagesEndRef.current?.scrollIntoView({ behavior: \"instant\" });\n }, []);\n return (\n <div\n ref={ref}\n className={cn(\"p-6 overflow-y-auto flex-grow bg-background\", className)}\n {...props}\n >\n {messages.map((message) => (\n <div key={message.id}>\n <CallOut\n key={message.id}\n role={message.role as \"user\" | \"assistant\"}\n message={message}\n >\n {streamingMessageId === message.id &&\n (isLoading || message.content.length === 0) &&\n !message.error_code && (\n <div>{thinkIndicator ?? <ThinkIndicator />}</div>\n )}\n {message.error_code && (\n <CallOutResponse\n role=\"assistant\"\n data-error-code={message.error_code}\n additionalInfo={showDetailedErrors ? `${message.error_detail}${message.stream_id ? `\\nstream id: ${message.stream_id}` : ''}` : undefined}\n toggleAdditionalInfo\n >\n {getErrorMessage(message.error_code)}\n </CallOutResponse>\n )}\n {!message.error_code && message.tooler?.filter(hasToolResult).map((tool, index) => (\n <React.Fragment key={tool.control_id || `${tool.tool_summary?.name}-${index}`}>\n {toolFactory?.createTool(tool.tool_summary?.name || \"\", tool.tool_output)}\n </React.Fragment>\n ))}\n {message.content && !message.error_code && (\n <div\n data-role={message.role}\n className=\"alq--callout-message-container\"\n >\n {message.created_at && streamingMessageId !== message.id && (\n <div className=\"text-xs text-muted-foreground/80 pb-1 alq--callout-message-date\">\n {new Date(Number(message.created_at)).toLocaleString(\n \"es-ES\",\n {\n hour: \"2-digit\",\n minute: \"2-digit\",\n hour12: false,\n }\n )}\n </div>\n )}\n <CallOutResponse\n role={message.role}\n isStreaming={streamingMessageId === message.id}\n handleIsTextStreaming={handleIsTextStreaming}\n additionalInfo={\n streamingMessageId !== message.id\n ? message?.additionalInfo\n : undefined\n }\n >\n {message.content}\n </CallOutResponse>\n {actions && streamingMessageId !== message.id && (\n <CallOutActions\n key={message.id}\n actions={actions}\n message={message}\n role={message.role as \"user\" | \"assistant\"}\n />\n )}\n </div>\n )}\n </CallOut>\n </div>\n ))}\n <div ref={messagesEndRef} />\n </div>\n );\n }\n);\nAssistantMessageArea.displayName = \"AssistantMessageArea\";\n\ninterface AssistantInputProps\n extends React.FormHTMLAttributes<HTMLFormElement> {\n sendMessageFunc: (event: React.FormEvent<HTMLFormElement>) => Promise<void>;\n isButtonDisabled: boolean;\n input: string;\n handleInputChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n isMessageStreaming: boolean;\n speechToTextComponent?: React.ReactNode;\n userToolboxComponent?: React.ReactNode;\n placeholders?: [string, string];\n onFileDrop?: (files: File[]) => void;\n attachmentsSlot?: React.ReactNode;\n}\n\nconst AssistantInput = React.forwardRef<HTMLFormElement, AssistantInputProps>(\n (\n {\n className,\n sendMessageFunc,\n isButtonDisabled,\n input,\n handleInputChange,\n isMessageStreaming,\n speechToTextComponent,\n userToolboxComponent,\n placeholders,\n onFileDrop,\n attachmentsSlot,\n ...props\n },\n ref\n ) => {\n const [isDragging, setIsDragging] = useState(false);\n const dragCounterRef = useRef(0);\n\n const handleDragEnter = useCallback((e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n dragCounterRef.current += 1;\n if (e.dataTransfer.types.includes(\"Files\")) {\n setIsDragging(true);\n }\n }, []);\n\n const handleDragOver = useCallback((e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n }, []);\n\n const handleDragLeave = useCallback((e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n dragCounterRef.current -= 1;\n if (dragCounterRef.current === 0) {\n setIsDragging(false);\n }\n }, []);\n\n const handleDrop = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n dragCounterRef.current = 0;\n setIsDragging(false);\n const files = Array.from(e.dataTransfer.files);\n if (files.length > 0) {\n onFileDrop?.(files);\n }\n },\n [onFileDrop]\n );\n\n const placeholder = placeholders\n ? isMessageStreaming\n ? placeholders[0]\n : placeholders[1]\n : isMessageStreaming\n ? \"Processing...\"\n : \"Type your message here...\";\n\n return (\n <form\n onSubmit={sendMessageFunc}\n className={cn(\n \"flex flex-col relative rounded-lg border border-input bg-background\",\n \"focus-within:ring-2 focus-within:ring-ring\",\n onFileDrop && isDragging && \"ring-2 ring-primary/50 alq--assistant-input-dragover\",\n className\n )}\n ref={ref}\n onDragEnter={onFileDrop ? handleDragEnter : undefined}\n onDragOver={onFileDrop ? handleDragOver : undefined}\n onDragLeave={onFileDrop ? handleDragLeave : undefined}\n onDrop={onFileDrop ? handleDrop : undefined}\n {...props}\n >\n {attachmentsSlot}\n <textarea\n disabled={isButtonDisabled}\n value={input}\n onChange={handleInputChange}\n placeholder={placeholder}\n className={cn(\n \"flex-1 min-w-0 text-sm p-3 focus:outline-none w-full resize-none\",\n \"bg-transparent text-foreground\",\n \"placeholder:text-muted-foreground\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\"\n )}\n onKeyDown={(e) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n sendMessageFunc(e as unknown as FormEvent<HTMLFormElement>);\n }\n }}\n />\n <div className=\"flex items-center relative alq--assistant-actions\">\n {userToolboxComponent}\n {speechToTextComponent}\n <button\n type=\"submit\"\n disabled={isButtonDisabled}\n className={cn(\n \"w-10 h-10 rounded-full flex items-center justify-center alq--assistant-button-send\",\n isButtonDisabled\n ? \"bg-muted text-muted-foreground\"\n : \"bg-primary text-primary-foreground hover:bg-primary/90\"\n )}\n >\n <Send className=\"w-5 h-5\" />\n </button>\n </div>\n </form>\n );\n }\n);\nAssistantInput.displayName = \"AssistantInput\";\n\nexport {\n Assistant,\n AssistantTitle,\n AssistantDescription,\n AssistantHeader,\n AssistantMessageArea,\n AssistantInput,\n};\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n }\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import * as React from \"react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nexport interface TextareaProps\n extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, ...props }, ref) => {\n return (\n <textarea\n className={cn(\n \"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n \"alq--textarea\"\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\nTextarea.displayName = \"Textarea\";\n\nexport { Textarea };\n","import { forwardRef } from \"react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n \"alq--input\"\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\";\nimport { cn } from \"../../../lib/utils\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className,\n \"alq--select\"\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"py-1.5 pl-8 pr-2 text-sm font-semibold\", className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Avatar = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Root\n ref={ref}\n className={cn(\n \"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\n className\n )}\n {...props}\n />\n))\nAvatar.displayName = AvatarPrimitive.Root.displayName\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn(\"aspect-square h-full w-full\", className)}\n {...props}\n />\n))\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn(\n \"flex h-full w-full items-center justify-center rounded-full bg-muted\",\n className\n )}\n {...props}\n />\n))\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\"\n\nimport { cn } from \"../../../lib/utils\";\n\nconst ScrollArea = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn(\"relative overflow-hidden\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n))\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName\n\nconst ScrollBar = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n \"flex touch-none select-none transition-colors\",\n orientation === \"vertical\" &&\n \"h-full w-2.5 border-l border-l-transparent p-[1px]\",\n orientation === \"horizontal\" &&\n \"h-2.5 flex-col border-t border-t-transparent p-[1px]\",\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n))\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName\n\nexport { ScrollArea, ScrollBar }\n","import * as React from \"react\";\nimport ReactMarkdown from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport { cn } from \"../../../lib/utils\";\n\ninterface RichTextProps extends React.HTMLAttributes<HTMLDivElement> {\n content: string;\n className?: string;\n}\n\nfunction RichText({ content, className }: RichTextProps) {\n return (\n <ReactMarkdown className={cn(className)} remarkPlugins={[remarkGfm]}>\n {content}\n </ReactMarkdown>\n );\n}\n\nexport { RichText };\n","import { cn } from \"../../../lib/utils\";\n\nfunction Skeleton({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn(\"animate-pulse rounded-md bg-muted text-muted-foreground\", className, \"alq--skeleton\")}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n","import * as React from \"react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"rounded-lg\",\n \" border\",\n \"bg-card\",\n \"text-card-foreground\",\n \"shadow-raised\",\n className\n )}\n {...props}\n />\n));\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n {...props}\n />\n));\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\"alq--typography-heading4\", className)}\n {...props}\n />\n));\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n));\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex items-center p-6 pt-0\", className)}\n {...props}\n />\n));\nCardFooter.displayName = \"CardFooter\";\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardDescription,\n CardContent,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Drawer = ({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n);\nDrawer.displayName = \"Drawer\";\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\nconst DrawerPortal = DrawerPrimitive.Portal;\n\nconst DrawerClose = DrawerPrimitive.Close;\n\nconst DrawerOverlay = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\n {...props}\n />\n));\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\n\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border border-border bg-background text-foreground alq--drawer-content\",\n className\n )}\n {...props}\n >\n <div className=\"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n));\nDrawerContent.displayName = \"DrawerContent\";\n\nconst DrawerHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className, \"alq--drawer-header\")}\n {...props}\n />\n);\nDrawerHeader.displayName = \"DrawerHeader\";\n\nconst DrawerFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className, \"alq--drawer-footer\")}\n {...props}\n />\n);\nDrawerFooter.displayName = \"DrawerFooter\";\n\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n \"alq--drawer-title\"\n )}\n {...props}\n />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className, \"alq--drawer-description\")}\n {...props}\n />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n","import { cn } from \"../../../../lib/utils\";\nimport { forwardRef } from \"react\";\n\nexport interface TypographyProps extends React.HTMLAttributes<HTMLDivElement> {\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"span\";\n typeStyle:\n | \"display\"\n | \"heading1\"\n | \"heading2\"\n | \"heading3\"\n | \"heading4\"\n | \"small\"\n | \"tiny\";\n}\n\nconst Typography = forwardRef<HTMLDivElement, TypographyProps>(\n ({ as: Component = \"p\", typeStyle, ...props }, ref) => {\n return (\n <Component\n {...props}\n className={cn(props.className, `alq--typography-${typeStyle}`)}\n ref={ref}\n />\n );\n }\n);\n\nTypography.displayName = \"Typography\";\n\nexport { Typography };\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../../../lib/utils\";\n\nconst badgeVariants = cva(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground hover:bg-primary/80\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n destructive:\n \"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80\",\n outline: \"text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return (\n <div className={cn(badgeVariants({ variant }), className, \"alq--badge\")} {...props} />\n )\n}\n\nexport { Badge, badgeVariants }\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-background text-foreground\",\n destructive:\n \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n <div\n ref={ref}\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n));\nAlert.displayName = \"Alert\";\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h5\n ref={ref}\n className={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n {...props}\n />\n));\nAlertTitle.displayName = \"AlertTitle\";\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"text-sm [&_p]:leading-relaxed\", className)}\n {...props}\n />\n));\nAlertDescription.displayName = \"AlertDescription\";\n\nexport { Alert, AlertTitle, AlertDescription };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants(), className, \"alq--label\")}\n {...props}\n />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\",\n className,\n \"alq--checkbox\"\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-current\")}\n >\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport { Checkbox };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst toggleVariants = cva(\n \"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline:\n \"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground\",\n },\n size: {\n default: \"h-10 px-3\",\n sm: \"h-9 px-2.5\",\n lg: \"h-11 px-5\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nconst Toggle = React.forwardRef<\n React.ElementRef<typeof TogglePrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &\n VariantProps<typeof toggleVariants>\n>(({ className, variant, size, ...props }, ref) => (\n <TogglePrimitive.Root\n ref={ref}\n className={cn(toggleVariants({ variant, size, className }), \"alq--toggle\")}\n {...props}\n />\n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle, toggleVariants };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as SliderPrimitive from \"@radix-ui/react-slider\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Slider = React.forwardRef<\n React.ElementRef<typeof SliderPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <SliderPrimitive.Root\n ref={ref}\n className={cn(\n \"relative flex w-44 touch-none select-none items-center\",\n className,\n \"alq--slider\"\n )}\n {...props}\n >\n <SliderPrimitive.Track className=\"relative h-2 w-44 grow overflow-hidden rounded-full bg-primary\">\n <SliderPrimitive.Range className=\"absolute h-full bg-secondary\" />\n </SliderPrimitive.Track>\n <SliderPrimitive.Thumb className=\"block h-5 w-5 rounded-full border-2 border-gray bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\" />\n </SliderPrimitive.Root>\n));\nSlider.displayName = SliderPrimitive.Root.displayName;\n\nexport { Slider };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>\n>(({ className, ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(\n \"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n className,\n \"alq--switch\"\n )}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0\"\n )}\n />\n </SwitchPrimitives.Root>\n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Tabs = TabsPrimitive.Root;\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n \"inline-flex h-10 items-center justify-center rounded-md p-1 text-muted-foreground\",\n className,\n \"alq--tabs\"\n )}\n {...props}\n />\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:border-b-2 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-b-2 data-[state=active]:text-foreground data-[state=active]:shadow-sm\",\n className\n )}\n {...props}\n />\n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n","\"use client\"\n\nimport * as AspectRatioPrimitive from \"@radix-ui/react-aspect-ratio\"\n\nconst AspectRatio = AspectRatioPrimitive.Root\n\nexport { AspectRatio }\n","import * as React from \"react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement>\n>(({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table\n ref={ref}\n className={cn(\"w-full caption-bottom text-sm text-foreground bg-background\", className, \"alq--table\")}\n {...props}\n />\n </div>\n));\nTable.displayName = \"Table\";\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={cn(\"[&_tr]:border-b border-border bg-muted\", className, \"alq--table-header\")} {...props} />\n));\nTableHeader.displayName = \"TableHeader\";\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody\n ref={ref}\n className={cn(\"[&_tr:last-child]:border-0 [&_tr]:border-b border-border\", className, \"alq--table-body\")}\n {...props}\n />\n));\nTableBody.displayName = \"TableBody\";\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\n \"border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className,\n \"alq--table-footer\"\n )}\n {...props}\n />\n));\nTableFooter.displayName = \"TableFooter\";\n\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.HTMLAttributes<HTMLTableRowElement>\n>(({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\n \"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\",\n className\n )}\n {...props}\n />\n));\nTableRow.displayName = \"TableRow\";\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n \"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0\",\n className\n )}\n {...props}\n />\n));\nTableHead.displayName = \"TableHead\";\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\"p-4 align-middle [&:has([role=checkbox])]:pr-0\", className)}\n {...props}\n />\n));\nTableCell.displayName = \"TableCell\";\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption\n ref={ref}\n className={cn(\"mt-4 text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nTableCaption.displayName = \"TableCaption\";\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n};\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\ninterface BreadcrumbItemProps {\n label: string;\n href?: string;\n current?: boolean;\n}\n\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<\"nav\"> & {\n separator?: React.ReactNode;\n }\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />);\nBreadcrumb.displayName = \"Breadcrumb\";\n\nconst BreadcrumbList = React.forwardRef<\n HTMLOListElement,\n React.ComponentPropsWithoutRef<\"ol\">\n>(({ className, ...props }, ref) => (\n <ol\n ref={ref}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5\",\n className\n )}\n {...props}\n />\n));\nBreadcrumbList.displayName = \"BreadcrumbList\";\n\nconst BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"inline-flex items-center gap-1.5\", className)}\n {...props}\n />\n));\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<\"a\"> & {\n asChild?: boolean;\n }\n>(({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\";\n\n return (\n <Comp\n ref={ref}\n className={cn(\"transition-colors hover:text-foreground\", className)}\n {...props}\n />\n );\n});\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\n\nconst BreadcrumbPage = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-normal text-foreground\", className)}\n {...props}\n />\n));\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\n\nconst BreadcrumbSeparator = ({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) => (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:w-3.5 [&>svg]:h-3.5\", className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n);\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\n\nconst BreadcrumbEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n);\nBreadcrumbEllipsis.displayName = \"BreadcrumbElipssis\";\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\n\nimport { cn } from \"../../lib/utils\";\nimport { buttonVariants } from \"../atoms/ui/button\";\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n ref={ref}\n />\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\n\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\nconst AlertDialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n);\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\n\nconst AlertDialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n);\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold\", className)}\n {...props}\n />\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nAlertDialogDescription.displayName =\n AlertDialogPrimitive.Description.displayName;\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={cn(buttonVariants(), className)}\n {...props}\n />\n));\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={cn(\n buttonVariants({ variant: \"outline\" }),\n \"mt-2 sm:mt-0\",\n className\n )}\n {...props}\n />\n));\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\nimport { Dialog, DialogContent } from \"./dialog\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n \"alq--dialog-content\"\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left text-foreground\",\n className,\n \"alq--dialog-header\"\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight text-foreground\",\n className,\n \"alq--dialog-title\"\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as ToastPrimitives from \"@radix-ui/react-toast\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst ToastProvider = ToastPrimitives.Provider;\n\nconst ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className\n )}\n {...props}\n />\n));\nToastViewport.displayName = ToastPrimitives.Viewport.displayName;\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border bg-background text-foreground\",\n destructive:\n \"destructive group border-destructive bg-destructive text-destructive-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst Toast = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &\n VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n return (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n );\n});\nToast.displayName = ToastPrimitives.Root.displayName;\n\nconst ToastAction = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive\",\n className\n )}\n {...props}\n />\n));\nToastAction.displayName = ToastPrimitives.Action.displayName;\n\nconst ToastClose = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n \"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600\",\n className\n )}\n toast-close=\"\"\n {...props}\n >\n <X className=\"h-4 w-4\" />\n </ToastPrimitives.Close>\n));\nToastClose.displayName = ToastPrimitives.Close.displayName;\n\nconst ToastTitle = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn(\"text-sm font-semibold\", className)}\n {...props}\n />\n));\nToastTitle.displayName = ToastPrimitives.Title.displayName;\n\nconst ToastDescription = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn(\"text-sm opacity-90\", className)}\n {...props}\n />\n));\nToastDescription.displayName = ToastPrimitives.Description.displayName;\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;\n\ntype ToastActionElement = React.ReactElement<typeof ToastAction>;\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n};\n","// Loader.tsx\nimport * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../../lib/utils\";\nimport { Loader2 } from \"lucide-react\";\n\nconst loaderVariants = cva(\n \"flex justify-center items-center w-full\",\n {\n variants: {\n size: {\n small: \"h-6 w-6\",\n medium: \"h-8 w-8\",\n large: \"h-12 w-12\",\n xl: \"h-24 w-24\",\n },\n colorVariant: {\n default: \"text-primary\",\n primary: \"text-primary\",\n secondary: \"text-secondary\",\n destructive: \"text-destructive\",\n },\n },\n defaultVariants: {\n size: \"medium\",\n colorVariant: \"default\",\n },\n }\n);\n\ninterface LoaderProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof loaderVariants> {}\n\nconst Loader = React.forwardRef<HTMLDivElement, LoaderProps>(\n (\n { className, size, colorVariant, ...props },\n ref\n ) => (\n <div\n ref={ref}\n className={cn(loaderVariants({ size, colorVariant }), \"flex justify-center items-center h-full w-full\", className)}\n {...props}\n >\n <Loader2 className=\"animate-spin\" />\n </div>\n )\n);\n\nLoader.displayName = \"Loader\";\n\nexport { Loader };","\"use client\"\n\nimport * as React from \"react\"\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\n\nimport { cn } from \"../../../lib/utils\"\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = \"horizontal\", decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className,\n \"alq--separator\"\n )}\n {...props}\n />\n))\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }","\"use client\";\n\n// Inspired by react-hot-toast library\nimport * as React from \"react\";\n\nimport type {\n ToastActionElement,\n ToastProps,\n} from \"../../components/atoms/ui/toast\";\n\nconst TOAST_LIMIT = 1;\nconst TOAST_REMOVE_DELAY = 1000000;\n\ntype ToasterToast = ToastProps & {\n id: string;\n title?: React.ReactNode;\n description?: React.ReactNode;\n action?: ToastActionElement;\n};\n\nconst actionTypes = {\n ADD_TOAST: \"ADD_TOAST\",\n UPDATE_TOAST: \"UPDATE_TOAST\",\n DISMISS_TOAST: \"DISMISS_TOAST\",\n REMOVE_TOAST: \"REMOVE_TOAST\",\n} as const;\n\nlet count = 0;\n\nfunction genId() {\n count = (count + 1) % Number.MAX_SAFE_INTEGER;\n return count.toString();\n}\n\ntype ActionType = typeof actionTypes;\n\ntype Action =\n | {\n type: ActionType[\"ADD_TOAST\"];\n toast: ToasterToast;\n }\n | {\n type: ActionType[\"UPDATE_TOAST\"];\n toast: Partial<ToasterToast>;\n }\n | {\n type: ActionType[\"DISMISS_TOAST\"];\n toastId?: ToasterToast[\"id\"];\n }\n | {\n type: ActionType[\"REMOVE_TOAST\"];\n toastId?: ToasterToast[\"id\"];\n };\n\ninterface State {\n toasts: ToasterToast[];\n}\n\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>();\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return;\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId);\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId: toastId,\n });\n }, TOAST_REMOVE_DELAY);\n\n toastTimeouts.set(toastId, timeout);\n};\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n };\n\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t\n ),\n };\n\n case \"DISMISS_TOAST\": {\n const { toastId } = action;\n\n // ! Side effects ! - This could be extracted into a dismissToast() action,\n // but I'll keep it here for simplicity\n if (toastId) {\n addToRemoveQueue(toastId);\n } else {\n state.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id);\n });\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false,\n }\n : t\n ),\n };\n }\n case \"REMOVE_TOAST\":\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: [],\n };\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n };\n }\n};\n\nconst listeners: Array<(state: State) => void> = [];\n\nlet memoryState: State = { toasts: [] };\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action);\n listeners.forEach((listener) => {\n listener(memoryState);\n });\n}\n\ntype Toast = Omit<ToasterToast, \"id\">;\n\nfunction toast({ ...props }: Toast) {\n const id = genId();\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props, id },\n });\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id });\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss();\n },\n },\n });\n\n return {\n id: id,\n dismiss,\n update,\n };\n}\n\nfunction useToast() {\n const [state, setState] = React.useState<State>(memoryState);\n\n React.useEffect(() => {\n listeners.push(setState);\n return () => {\n const index = listeners.indexOf(setState);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n };\n }, [state]);\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n };\n}\n\nexport { useToast, toast };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { useToast } from \"../../hooks/use-toast\";\nimport {\n Toast,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport,\n} from \"./toast\";\n\nfunction Toaster() {\n const { toasts } = useToast();\n\n return (\n <ToastProvider>\n {toasts.map(function ({ id, title, description, action, ...props }: any) {\n return (\n <Toast key={id} {...props}>\n <div className=\"grid gap-1\">\n {title && <ToastTitle>{title}</ToastTitle>}\n {description && (\n <ToastDescription>{description}</ToastDescription>\n )}\n </div>\n {action}\n <ToastClose />\n </Toast>\n );\n })}\n <ToastViewport />\n </ToastProvider>\n );\n}\n\nexport { Toaster };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { useState, useEffect } from \"react\";\nimport { Loader } from \"..\";\nimport { cn } from \"../../../lib/utils\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nconst thinkIndicatorVariants = cva(\n \"flex items-center gap-3\",\n {\n variants: {\n variant: {\n default: \"text-muted-foreground\",\n primary: \"text-primary\",\n secondary: \"text-secondary\",\n },\n size: {\n default: \"gap-3\",\n sm: \"gap-2\",\n lg: \"gap-4\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nexport interface ThinkIndicatorProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof thinkIndicatorVariants> {\n thoughts?: string[];\n interval?: number;\n loader?: React.ReactNode;\n}\n\nexport const ThinkIndicator = React.forwardRef<HTMLDivElement, ThinkIndicatorProps>(\n ({ \n className, \n variant,\n size,\n thoughts = [\n \"Analyzing your request...\",\n \"Processing information...\",\n \"Formulating response...\",\n ],\n interval = 5000, \n loader,\n ...props \n }, ref) => {\n const [currentThoughtIndex, setCurrentThoughtIndex] = useState<number>(0);\n const [isAnimating, setIsAnimating] = useState<boolean>(false);\n\n useEffect(() => {\n const timer = setInterval(() => {\n setIsAnimating(true);\n setTimeout(() => {\n setCurrentThoughtIndex((prev) => {\n return prev < thoughts.length - 1 ? prev + 1 : prev;\n });\n setIsAnimating(false);\n }, 300);\n }, interval);\n\n if (currentThoughtIndex === thoughts.length - 1) {\n clearInterval(timer);\n }\n\n return () => clearInterval(timer);\n }, [thoughts, interval, currentThoughtIndex]);\n\n return (\n <div\n ref={ref}\n className={cn(thinkIndicatorVariants({ variant, size }), className, \"alq--think-indicator\")}\n {...props}\n >\n {loader || (\n <Loader \n className={cn(\n size === \"sm\" ? \"h-3 w-3\" : size === \"lg\" ? \"h-5 w-5\" : \"h-4 w-4\"\n )} \n />\n )}\n <div\n className={cn(\n \"alq--think-indicator-text\",\n \"transition-all duration-300\",\n isAnimating ? \"opacity-0 -translate-y-2\" : \"opacity-100 translate-y-0\"\n )}\n >\n {thoughts[currentThoughtIndex]}\n </div>\n </div>\n );\n }\n);\n\nThinkIndicator.displayName = \"ThinkIndicator\";\n\nexport { thinkIndicatorVariants };","import { forwardRef } from \"react\";\nimport { cn } from \"../../lib/utils\";\n\ninterface PageContainerProps extends React.HTMLAttributes<HTMLDivElement> {}\nconst PageContainer = forwardRef<HTMLDivElement, PageContainerProps>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(className, \"alq--page-container\")}\n {...props}\n />\n );\n }\n);\nPageContainer.displayName = \"PageContainer\";\nexport { PageContainer };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { useState, useEffect } from \"react\";\nimport { LucideIcon } from \"lucide-react\";\nimport { Button } from \"../atoms\";\nimport { cn } from \"../../lib/utils\";\n\ninterface Suggestion {\n label: string;\n icon: LucideIcon;\n action: () => void;\n}\n\ninterface AssistantSuggestionsProps {\n suggestions: Suggestion[];\n className?: string;\n showSuggestions: boolean;\n}\n\nconst AssistantSuggestions = React.forwardRef<\n HTMLDivElement,\n AssistantSuggestionsProps\n>(({ suggestions, showSuggestions, className }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"absolute bottom-[calc(100%+0.5rem)] right-0 pb-2 mb-4 alq--assistant-suggestions-container\",\n \"transition-all duration-300\",\n showSuggestions\n ? \"opacity-100 translate-y-0\"\n : \"opacity-0 translate-y-4\",\n className\n )}\n >\n <div className=\"rounded-lg p-2 pr-0 w-64\">\n {suggestions.map((suggestion, index) => (\n <button\n key={index}\n onClick={() => suggestion.action?.()}\n style={{\n transitionDelay: showSuggestions ? `${index * 50}ms` : \"0ms\",\n }}\n className={cn(\n \"bg-background flex items-center gap-2 border p-2 pr-4 my-2 rounded-full ml-auto\",\n \"text-primary hover:bg-secondary\",\n \"transition-all duration-100\",\n \"origin-bottom w-fit\",\n \"alq--assistant-suggestion\",\n showSuggestions\n ? \"opacity-100 translate-y-0\"\n : \"opacity-0 translate-y-4\"\n )}\n >\n <suggestion.icon className=\"w-5 h-5 text-primary\" />\n <span className=\"text-xs whitespace-nowrap font-normal\">\n {suggestion.label}\n </span>\n </button>\n ))}\n </div>\n </div>\n );\n});\n\nAssistantSuggestions.displayName = \"Suggestions\";\n\ninterface AssistantButtonProps {\n icon: LucideIcon;\n clickAction: () => void;\n className?: string;\n suggestions?: Suggestion[];\n}\n\nexport const AssistantButton = React.forwardRef<\n HTMLDivElement,\n AssistantButtonProps\n>(\n (\n {\n icon: Icon,\n clickAction,\n className,\n suggestions = [],\n },\n ref\n ) => {\n const [isVisible, setIsVisible] = useState(false);\n const [showSuggestions, setShowSuggestions] = useState(false);\n\n const handleMouseEnter = () => {\n setIsVisible(true);\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n setShowSuggestions(true);\n });\n });\n };\n\n const handleMouseLeave = () => {\n setShowSuggestions(false);\n setTimeout(() => setIsVisible(false), 300);\n };\n\n return (\n <div\n ref={ref}\n className={cn(\n \"fixed bottom-8 right-4 z-50\",\n \"alq--assistant-button-container\",\n className\n )}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <div className=\"relative group\">\n {isVisible && suggestions.length > 0 && (\n <AssistantSuggestions\n suggestions={suggestions}\n showSuggestions={showSuggestions}\n />\n )}\n <Button\n variant=\"outline\"\n size=\"sm\"\n className={cn(\n \"fixed hover:bg-opacity-70 transition-all duration-300\",\n \"bottom-4 h-12 w-12 right-4 z-50 rounded-full p-2\",\n \"shadow-md\",\n \"hover:shadow-lg\",\n showSuggestions ? \"scale-110\" : \"hover:scale-105\",\n \"alq--assistant-button\"\n )}\n onClick={clickAction}\n >\n <Icon\n style={{ width: \"22px\", height: \"22px\" }}\n className=\"text-primary\"\n />\n </Button>\n </div>\n </div>\n );\n }\n);\n\nAssistantButton.displayName = \"AssistantButton\";\n","\"use client\";\n\nimport * as React from \"react\";\nimport useEmblaCarousel, {\n type UseEmblaCarouselType,\n} from \"embla-carousel-react\";\nimport { ArrowLeft, ArrowRight } from \"lucide-react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../../components/atoms/ui/button\";\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: \"horizontal\" | \"vertical\";\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a <Carousel />\");\n }\n\n return context;\n}\n\nconst Carousel = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & CarouselProps\n>(\n (\n {\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n },\n ref\n ) => {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return;\n }\n\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext]\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n\n onSelect(api);\n api.on(\"reInit\", onSelect);\n api.on(\"select\", onSelect);\n\n return () => {\n api?.off(\"select\", onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation:\n orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n ref={ref}\n onKeyDownCapture={handleKeyDown}\n className={cn(\"relative\", className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n }\n);\nCarousel.displayName = \"Carousel\";\n\nconst CarouselContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n ref={ref}\n className={cn(\n \"flex\",\n orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n className\n )}\n {...props}\n />\n </div>\n );\n});\nCarouselContent.displayName = \"CarouselContent\";\n\nconst CarouselItem = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const { orientation } = useCarousel();\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn(\n \"min-w-0 shrink-0 grow-0 basis-full\",\n orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n className\n )}\n {...props}\n />\n );\n});\nCarouselItem.displayName = \"CarouselItem\";\n\nconst CarouselPrevious = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button>\n>(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n \"absolute h-8 w-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"-left-12 top-1/2 -translate-y-1/2\"\n : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeft className=\"h-4 w-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n});\nCarouselPrevious.displayName = \"CarouselPrevious\";\n\nconst CarouselNext = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button>\n>(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n \"absolute h-8 w-8 rounded-full\",\n orientation === \"horizontal\"\n ? \"-right-12 top-1/2 -translate-y-1/2\"\n : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRight className=\"h-4 w-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n});\nCarouselNext.displayName = \"CarouselNext\";\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n};\n","import * as React from \"react\";\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\";\nimport { cva } from \"class-variance-authority\";\nimport { ChevronDown } from \"lucide-react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n));\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1\",\n className\n )}\n {...props}\n />\n));\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\nconst navigationMenuTriggerStyle = cva(\n \"group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50\"\n);\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDown\n className=\"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n));\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\n className\n )}\n {...props}\n />\n));\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n));\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName;\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n));\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName;\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n};\n","import * as React from \"react\";\nimport { LucideIcon } from \"lucide-react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\nimport { ScrollArea, Button } from \"../atoms\";\n\nconst sidebarVariants = cva(\n \"flex flex-col border-r\",\n {\n variants: {\n size: {\n sm: \"w-48\",\n default: \"w-64\",\n lg: \"w-72\"\n },\n },\n defaultVariants: {\n size: \"default\",\n },\n }\n);\n\nexport interface SidebarItem {\n name: string;\n icon?: LucideIcon;\n disabled?: boolean;\n isLink?: boolean;\n link?: string;\n}\n\ntype SidebarBaseProps = {\n items: SidebarItem[];\n selectedSection?: SidebarItem;\n onSelect?: (item: SidebarItem) => void;\n footerContent?: React.ReactNode;\n selectedVariant?: \"default\" | \"secondary\" | \"ghost\" | \"link\";\n defaultVariant?: \"default\" | \"secondary\" | \"ghost\" | \"link\";\n buttonClassName?: string;\n}\n\nexport interface SidebarProps \n extends SidebarBaseProps,\n Omit<React.HTMLAttributes<HTMLDivElement>, keyof SidebarBaseProps>,\n VariantProps<typeof sidebarVariants> {}\n\nexport const SidebarFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"p-4\", className)}\n {...props}\n >\n {children}\n </div>\n));\nSidebarFooter.displayName = \"SidebarFooter\";\n\n\nexport const Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>(\n ({ \n className, \n items, \n selectedSection, \n onSelect, \n footerContent,\n size = \"default\",\n selectedVariant = \"secondary\",\n defaultVariant = \"ghost\",\n buttonClassName,\n ...props \n }, ref) => {\n return (\n <div className={cn(className, \"alq--navigation-sidebar h-full\")} ref={ref} {...props}>\n <aside className={cn(sidebarVariants({ size }), \"h-full\")}>\n <ScrollArea className=\"flex-grow justify-between\">\n <div className=\"flex flex-col gap-2 p-4\">\n {items.map((item) => (\n <Button\n key={item.name}\n variant={selectedSection?.name === item.name ? selectedVariant : defaultVariant}\n className={cn(\"justify-start\", buttonClassName)}\n disabled={item.disabled}\n onClick={() => {\n if (onSelect) {\n onSelect(item);\n }\n }}\n >\n {item.icon && <item.icon className=\"mr-2 h-4 w-4\" />}\n {item.name}\n </Button>\n ))}\n </div>\n </ScrollArea>\n {footerContent && (\n <SidebarFooter>\n {footerContent}\n </SidebarFooter>\n )}\n </aside>\n </div>\n );\n }\n);","\"use client\";\nimport * as React from \"react\";\nimport { Toaster as Sonner } from \"sonner\";\nimport { useAlquimiaTheme } from '../../providers/theme-context';\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>;\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n const { theme = \"system\" } = useAlquimiaTheme();\n\n return (\n <Sonner\n theme={theme as ToasterProps[\"theme\"]}\n className=\"toaster group\"\n toastOptions={{\n classNames: {\n toast:\n \"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg\",\n description: \"group-[.toast]:text-muted-foreground\",\n actionButton:\n \"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground\",\n cancelButton:\n \"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground\",\n },\n }}\n {...props}\n />\n );\n};\nexport { Toaster as SonnerToaster };\n","\"use client\";\nimport { createContext, useContext } from 'react';\n\ninterface ThemeContextValue {\n theme: string;\n setTheme: (theme: string) => void;\n}\n\nexport const ThemeContext = createContext<ThemeContextValue>({\n theme: 'system',\n setTheme: () => {},\n});\n\nexport function useAlquimiaTheme() {\n return useContext(ThemeContext);\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\nimport { Star } from \"lucide-react\"\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../atoms\";\n\nconst TooltipProvider = TooltipPrimitive.Provider\nconst Tooltip = TooltipPrimitive.Root\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground shadow-lg animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\ninterface StarColors {\n fill: string\n stroke: string\n}\n\ninterface RatingStarsProps {\n currentRating: number\n isLoading: boolean\n onRate: (rating: number) => void\n className?: string\n}\n\nconst StarRating = React.forwardRef<\n HTMLDivElement,\n { rating: number; onRate: (r: number) => void }\n>(({ rating, onRate }, ref) => (\n <div ref={ref} className=\"flex\">\n {[1, 2, 3, 4, 5].map((star) => (\n <Button\n key={star}\n onClick={() => onRate(star)}\n variant=\"link\"\n className=\"p-1 transition-colors [&_svg]:size-5 h-5\"\n aria-label={`Rate ${star} star${star !== 1 ? \"s\" : \"\"}`}\n >\n <Star\n className={cn(\n \"w-5 h-5\",\n star <= rating ? \"alq-rating-star-active fill-current stroke-current\" : \"alq-rating-star-inactive\",\n )}\n />\n </Button>\n ))}\n </div>\n));\nStarRating.displayName = \"StarRating\"\n\nexport const RatingStars = React.forwardRef<\n HTMLButtonElement,\n RatingStarsProps\n>(({\n currentRating = 0,\n onRate,\n className,\n isLoading\n}, ref) => {\n const [open, setOpen] = React.useState(false)\n const [animate, setAnimate] = React.useState(false)\n\n const handleRate = (rating: number) => {\n onRate(rating)\n setOpen(false)\n }\n\n React.useEffect(() => {\n if (currentRating > 0) {\n setAnimate(true)\n const timer = setTimeout(() => setAnimate(false), 150)\n return () => clearTimeout(timer)\n }\n }, [currentRating])\n\n const hasRated = currentRating > 0\n\n return (\n <TooltipProvider>\n <Tooltip open={open} onOpenChange={setOpen}>\n <TooltipTrigger asChild>\n <Button\n ref={ref}\n variant=\"link\"\n className={cn(\n \"inline-flex items-center justify-center rounded-md text-sm font-medium [&_svg]:size-5 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n className\n )}\n disabled={isLoading}\n onClick={() => setOpen(!open)}\n >\n <Star \n className={cn(\n \"w-5 h-5 transition-all duration-500\",\n animate && \"animate-ping\",\n isLoading && \"animate-pulse\",\n hasRated ? \"alq-rating-star-active fill-current stroke-current\" : \"alq-rating-star-inactive\",\n )}\n />\n </Button>\n </TooltipTrigger>\n <TooltipContent side=\"top\" align=\"center\" className=\"p-0\">\n <div className=\"p-2 bg-background\">\n <StarRating \n rating={currentRating} \n onRate={handleRate}\n />\n </div>\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n )\n})\nRatingStars.displayName = \"RatingStars\"\n\nexport {\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipProvider,\n}","\"use client\"\n\nimport * as React from \"react\"\nimport { ThumbsUp, ThumbsDown } from \"lucide-react\"\nimport { Button } from \"../atoms\";\nimport { cn } from \"../../lib/utils\";\n\ninterface RatingThumbsProps {\n currentRating: string\n isLoading: boolean\n onRate: (rating: \"thumbsUp\" | \"thumbsDown\" | \"\") => void\n direction?: \"row\" | \"column\"\n className?: string\n}\n\nexport const RatingThumbs = React.forwardRef<HTMLDivElement, RatingThumbsProps>(\n (\n {\n currentRating,\n onRate,\n direction = \"row\",\n className,\n isLoading\n },\n ref\n ) => {\n const [animate, setAnimate] = React.useState(false);\n\n React.useEffect(() => {\n if (currentRating) {\n setAnimate(true);\n const timer = setTimeout(() => setAnimate(false), 150);\n return () => clearTimeout(timer);\n }\n }, [currentRating]);\n\n return (\n <div\n ref={ref}\n className={cn(\n \"inline-flex\",\n direction === \"column\" ? \"flex-col\" : \"flex-row\",\n \"space-x-1 gap-4\",\n className\n )}\n >\n <Button\n variant=\"link\"\n onClick={() => onRate(currentRating === \"thumbsUp\" ? \"\" : \"thumbsUp\")}\n className={cn(\n \"p-1 transition-colors disabled:opacity-50 [&_svg]:size-5\",\n `hover:alq-rating-thumbsup/10`\n )}\n aria-label=\"Thumbs up\"\n disabled={isLoading}\n >\n <ThumbsUp\n className={cn(\n \"w-5 h-5 transition-all duration-500\",\n animate && currentRating === \"thumbsUp\" && \"animate-ping\",\n isLoading && \"animate-pulse\",\n currentRating === \"thumbsUp\" ? \"alq-rating-thumbsup fill-current stroke-current\" : \"alq-rating-thumbs-inactive fill-transparent\"\n )}\n />\n </Button>\n <Button\n variant=\"link\"\n onClick={() => onRate(currentRating === \"thumbsDown\" ? \"\" : \"thumbsDown\")}\n className={cn(\n \"p-1 transition-colors disabled:opacity-50 mt-0.5 [&_svg]:size-5\",\n `hover:bg-alq-rating-thumbsdown/10`\n )}\n aria-label=\"Thumbs down\"\n disabled={isLoading}\n >\n <ThumbsDown\n className={cn(\n \"w-5 h-5 transition-all duration-500\",\n animate && currentRating === \"thumbsDown\" && \"animate-ping\",\n isLoading && \"animate-pulse\",\n currentRating === \"thumbsDown\" ? \"alq-rating-thumbsdown fill-current stroke-current\" : \"alq-rating-thumbs-inactive fill-transparent\"\n )}\n />\n </Button>\n </div>\n );\n }\n);\n\nRatingThumbs.displayName = \"RatingThumbs\"","\"use client\"\n\nimport * as React from \"react\"\nimport { Book } from \"lucide-react\"\nimport { cn } from \"../../lib/utils\"\nimport { Button } from \"../atoms\"\nimport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogOverlay,\n DialogTitle,\n} from \"../atoms/ui/dialog\";\n\ninterface RatingCommentProps {\n currentRating: string\n onRate: (comment: string) => void\n className?: string\n isLoading?: boolean\n}\n\nexport const RatingComment = React.forwardRef<HTMLButtonElement, RatingCommentProps>(\n ({ currentRating, onRate, className, isLoading }, ref) => {\n const [open, setOpen] = React.useState(false)\n const [comment, setComment] = React.useState(\"\")\n const [animate, setAnimate] = React.useState(false);\n\n const handleRate = () => {\n onRate(comment)\n setOpen(false)\n }\n\n React.useEffect(() => {\n if (currentRating) {\n setAnimate(true);\n const timer = setTimeout(() => setAnimate(false), 150);\n return () => clearTimeout(timer);\n }\n }, [currentRating]);\n\n React.useEffect(() => {\n setComment(\"\")\n }, [open])\n\n return (\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogTrigger asChild>\n <Button\n ref={ref}\n variant=\"link\"\n size={\"lg\"}\n className={cn(\n \"inline-flex p-2 items-center justify-center rounded-md text-sm font-medium transition-colors [&_svg]:size-5 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring bg-transparent hover:none disabled:pointer-events-none disabled:opacity-50\",\n className\n )}\n disabled={isLoading}\n >\n <Book\n className={cn(\n \"w-5 h-5 transition-all duration-500\",\n animate && \"animate-ping\",\n isLoading && \"animate-pulse\",\n `${comment ? \"alq-rating-comment\" : \"stroke-gray-400\"}`\n )}\n />\n </Button>\n </DialogTrigger>\n <DialogOverlay className=\"fixed inset-0 bg-black bg-opacity-50\" />\n <DialogContent aria-describedby={undefined}>\n <DialogTitle className=\"text-lg font-medium\">\n Deja un comentario\n </DialogTitle>\n <textarea\n className=\"mt-4 w-full p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary\"\n rows={4}\n value={comment}\n onChange={(e) => setComment(e.target.value)}\n />\n <div className=\"mt-4 flex justify-end\">\n <Button\n onClick={handleRate}\n disabled={!comment}\n >\n Enviar\n </Button>\n </div>\n </DialogContent>\n </Dialog>\n );\n }\n)\n\nRatingComment.displayName = \"RatingComment\"\n","import * as React from \"react\";\nimport { ChevronDown, ChevronUp } from \"lucide-react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Button, RichText } from \"../atoms\";\nimport { Message } from \"ai\";\nimport { useTextStreaming } from \"../hooks/use-text-streaming\";\n\nexport interface CallOutMessage {\n id: string;\n role: \"user\" | \"assistant\";\n content: string;\n timestamp: Date;\n}\n\ninterface CallOutActionProps {\n label: string;\n icon: React.ReactNode;\n onClick: (message?: Message) => Promise<void>;\n custom?: boolean;\n component?: (props: { message?: Message }) => React.ReactNode;\n}\n\nexport interface CallOutProps extends React.HTMLAttributes<HTMLDivElement> {\n message?: Message;\n}\n\nconst CallOut = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & CallOutProps\n>(({ className, children, role, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\"alq--callout-box\", className)}\n data-role={role}\n {...props}\n >\n {children}\n </div>\n );\n});\n\nconst CallOutDate = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"alq--callout-date\",\n \"text-sm text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n );\n});\n\nconst CallOutActions = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & {\n actions: CallOutActionProps[];\n role: \"user\" | \"assistant\";\n message?: Message;\n }\n>(({ className, actions, role, message, ...props }, ref) => {\n const [isLoading, setIsLoading] = React.useState(false);\n const [isClicked, setIsClicked] = React.useState(false);\n\n if (role === \"user\") {\n return null;\n }\n\n return (\n <div ref={ref} className={cn(\"alq--callout-actions\", className)} {...props}>\n {actions.map((action) => (\n action.custom ? (\n <React.Fragment key={action.label}>\n {action.component?.({ message })}\n </React.Fragment>\n ) : (\n <button\n key={action.label}\n className={cn(\n \"alq--callout-action\",\n {\n \"alq--callout-animate-action\": isLoading,\n },\n {\n \"alq--callout-clicked-action\": isClicked,\n }\n )}\n type=\"button\"\n title={action.label}\n onClick={() => {\n setIsLoading(true);\n action.onClick(message).then(() => {\n setIsLoading(false);\n setIsClicked(true);\n });\n }}\n >\n <span\n className={cn(\"alq-action-icon-wrapper\", {\n \"alq--callout-animate-action\": isLoading,\n })}\n >\n {action.icon}\n </span>\n <label>{action.label}</label>\n </button>\n )\n ))}\n </div>\n );\n});\n\nconst CallOutResponse = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & {\n role: Message[\"role\"];\n additionalInfo?: string;\n toggleAdditionalInfo?: boolean;\n isStreaming?: boolean;\n handleIsTextStreaming?: (isStreaming: boolean) => void;\n }\n>(\n (\n {\n className,\n children,\n role,\n additionalInfo,\n toggleAdditionalInfo,\n isStreaming,\n handleIsTextStreaming,\n ...props\n },\n ref\n ) => {\n const [isAdditionalInfoOpen, setIsAdditionalInfoOpen] =\n React.useState(false);\n const content = String(children || \"\");\n const shouldStream = role === \"assistant\" && isStreaming;\n const displayedContent = useTextStreaming(\n content,\n shouldStream ?? false,\n handleIsTextStreaming\n );\n\n const showAsToggle = additionalInfo && toggleAdditionalInfo;\n const showInline = additionalInfo && !toggleAdditionalInfo;\n\n return (\n <div\n ref={ref}\n data-role={role}\n className={cn(\n \"alq--callout-response\",\n \"max-w-none\",\n \"text-foreground\",\n className\n )}\n {...props}\n >\n <RichText content={displayedContent} />\n {showInline && (\n <div\n className={cn(\n \"alq--callout-response-additional-info\",\n \"mt-2 text-sm text-muted-foreground whitespace-pre-line\",\n \"border-t border-border pt-2\"\n )}\n >\n {additionalInfo}\n </div>\n )}\n {showAsToggle && (\n <div\n className={cn(\n \"alq--callout-response-additional-info\",\n \"mt-2 border-t border-border pt-2\"\n )}\n >\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-auto py-1.5 px-0 text-xs text-muted-foreground hover:bg-transparent hover:text-muted-foreground -ml-1\"\n onClick={() => setIsAdditionalInfoOpen((prev) => !prev)}\n aria-expanded={isAdditionalInfoOpen}\n >\n {isAdditionalInfoOpen ? (\n <ChevronUp className=\"h-4 w-4 mr-1.5 shrink-0 transition-transform\" />\n ) : (\n <ChevronDown className=\"h-4 w-4 mr-1.5 shrink-0 transition-transform\" />\n )}\n {isAdditionalInfoOpen ? \"Hide details\" : \"Show details\"}\n </Button>\n <div\n className={cn(\n \"grid transition-[grid-template-rows] duration-200 ease-out\",\n isAdditionalInfoOpen ? \"grid-rows-[1fr]\" : \"grid-rows-[0fr]\"\n )}\n >\n <div className=\"overflow-hidden\">\n <div className=\"text-sm text-muted-foreground pt-1 whitespace-pre-line\">\n {additionalInfo}\n </div>\n </div>\n </div>\n </div>\n )}\n </div>\n );\n }\n);\n\nCallOut.displayName = \"CallOut\";\nCallOutDate.displayName = \"CallOutDate\";\nCallOutActions.displayName = \"CallOutActions\";\nCallOutResponse.displayName = \"CallOutResponse\";\nexport { CallOut, CallOutDate, CallOutResponse, CallOutActions };\n","import { useState, useEffect, useRef, useCallback } from \"react\";\n\nconst CHAR_DELAY = 15;\nconst PUNCTUATION_DELAY = 300;\n\nexport function useTextStreaming(\n content: string,\n shouldStream: boolean,\n handleIsTextStreaming?: (isStreaming: boolean) => void\n) {\n const [displayedText, setDisplayedText] = useState(\"\");\n const contentRef = useRef(content);\n const indexRef = useRef(0);\n const timerRef = useRef<NodeJS.Timeout | null>(null);\n\n const hasStartedStreaming = useRef<boolean>(false);\n\n useEffect(() => {\n contentRef.current = content;\n if (hasStartedStreaming.current && !timerRef.current && indexRef.current < contentRef.current.length) {\n typeNext();\n }\n }, [content]);\n\n const typeNext = useCallback(() => {\n if (indexRef.current < contentRef.current.length) {\n const nextChar = contentRef.current.charAt(indexRef.current);\n setDisplayedText((prev) => prev + nextChar);\n indexRef.current++;\n\n const delay = /[.!?;:]/.test(nextChar) ? PUNCTUATION_DELAY : CHAR_DELAY;\n \n timerRef.current = setTimeout(() => {\n timerRef.current = null;\n typeNext();\n }, delay);\n } else {\n handleIsTextStreaming?.(false);\n }\n }, []);\n\n useEffect(() => {\n if (!shouldStream && !hasStartedStreaming.current) {\n setDisplayedText(contentRef.current);\n indexRef.current = contentRef.current.length;\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n handleIsTextStreaming?.(false);\n } else {\n if (indexRef.current < contentRef.current.length && !timerRef.current) {\n handleIsTextStreaming?.(true);\n hasStartedStreaming.current = true;\n typeNext();\n }\n }\n\n return () => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n };\n }, [shouldStream, typeNext]);\n\n return displayedText;\n}\n\n","\"use client\";\n\nimport { Message } from \"ai\";\n\nimport { RatingData } from \"../../types/type\";\nimport { useRatings } from \"@alquimia-ai/tools/hooks\";\nimport { useToast } from \"../hooks\";\nimport { RatingThumbs, RatingStars, RatingComment } from \"../molecules\";\nimport {\n Dialog,\n DialogDescription,\n DialogTitle,\n DialogContent,\n DialogHeader,\n Typography,\n Button,\n ToastAction,\n} from \"../atoms\";\n\ninterface RatingDialogProps {\n topicId: string;\n assistantId: string;\n sendRating: (ratingData: RatingData) => Promise<any>;\n isOpen: boolean;\n onOpenChange: (open: boolean) => void;\n setHasRatedTopic: (hasRated: boolean) => void;\n onError?: (componentName: string, error: Error) => void;\n}\n\nexport function RatingDialog({\n sendRating,\n topicId,\n assistantId,\n isOpen,\n onOpenChange,\n setHasRatedTopic,\n}: RatingDialogProps) {\n const { toast } = useToast();\n const { handleRate, ratingStars, ratingThumbs, ratingComment, isLoading } =\n useRatings({ assistantId, sendRating, topicId });\n\n const onHandleRateSuccess = (success: boolean, err?: string) => {\n setTimeout(() => onOpenChange(false), 1000);\n success\n ? setHasRatedTopic(true)\n : toast({\n title: \"Error\",\n description: `Hubo un error al enviar la calificación`,\n action: (\n <ToastAction altText=\"Goto schedule to undo\">Cerrar</ToastAction>\n ),\n });\n };\n\n const handleCancelRate = () => {\n setHasRatedTopic(true);\n onOpenChange(false);\n };\n\n return (\n <Dialog open={isOpen} onOpenChange={onOpenChange}>\n <DialogContent className=\"sm:max-w-md\">\n <DialogHeader>\n <DialogTitle>Calificá esta conversación</DialogTitle>\n <DialogDescription>\n Por favor, compartí tu opinión sobre el asistente.\n </DialogDescription>\n </DialogHeader>\n <div className=\"flex flex-row justify-center gap-4 py-4\">\n <RatingStars\n currentRating={ratingStars}\n onRate={(newRating) =>\n handleRate(\"score\", newRating, onHandleRateSuccess)\n }\n isLoading={isLoading}\n className=\"p-2 rounded\"\n />\n <RatingThumbs\n currentRating={ratingComment}\n onRate={(newRating) =>\n handleRate(\"description\", newRating, onHandleRateSuccess)\n }\n direction=\"row\"\n isLoading={isLoading}\n />\n <RatingComment\n currentRating={ratingComment}\n onRate={(newRating) =>\n handleRate(\"description\", newRating, onHandleRateSuccess)\n }\n isLoading={isLoading}\n />\n </div>\n <div className=\"flex flex-row justify-center gap-4\">\n <Button onClick={handleCancelRate} variant=\"secondary\">\n <Typography as=\"p\" typeStyle=\"tiny\">\n No, gracias.\n </Typography>\n </Button>\n </div>\n </DialogContent>\n </Dialog>\n );\n}\n","\"use client\";\n\nimport { useState } from \"react\";\nimport { ApiError, ActionResponse } from \"../../types/type\";\n\nexport const useDocumentReader = (\n url: string,\n getDocument: (id: string) => Promise<ActionResponse<Blob>>,\n) => {\n const [loading, setLoading] = useState<boolean>(true);\n const [error, setError] = useState<string | null>(null);\n const [document, setDocument] = useState<Blob | null>(null);\n\n const handleDocumentError = (error: ApiError) => {\n const errorMessage = \"Hubo un error al obtener el documento. Por favor ponganse en contacto con el administrador.\";\n setError(errorMessage);\n throw new Error(error?.message || 'Unknown error');\n };\n\n const resetDocument = () => {\n setDocument(null);\n };\n\n const fetchDocument = async () => {\n setLoading(true);\n setError(null);\n \n try {\n const res = await getDocument(url);\n if (!res.success) {\n handleDocumentError(res.error as ApiError || new Error('Unknown error'));\n setLoading(false);\n return;\n }\n res.data && setDocument(res.data);\n } catch (error) {\n handleDocumentError(error as ApiError);\n } finally {\n setLoading(false);\n }\n };\n\n return { document, loading, fetchDocument, resetDocument, error };\n};\n","import { useEffect, useRef } from 'react';\n\ntype ResizeObserverOptions = {\n box?: 'content-box' | 'border-box';\n};\n\ntype ResizeObserverCallback = (entries: ResizeObserverEntry[], observer: ResizeObserver) => void;\n\nexport default function useResizeObserver(\n element: Element | null,\n options: ResizeObserverOptions | undefined,\n observerCallback: ResizeObserverCallback\n): void {\n const observerRef = useRef<ResizeObserver | null>(null);\n\n useEffect(() => {\n if (!element) return;\n\n observerRef.current = new ResizeObserver(observerCallback);\n observerRef.current.observe(element, options);\n\n return () => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n };\n }, [element, options, observerCallback]);\n}\n"]}