{"version":3,"file":"index.cjs","names":["CloseIcon","CheckIcon","React","DefaultIcons.OpenIcon","DefaultIcons.CloseIcon","DefaultIcons.HeaderCloseIcon","DefaultIcons.SendIcon","DefaultIcons.ActivityIcon","DefaultIcons.SpinnerIcon","DefaultIcons.StopIcon","DefaultIcons.RegenerateIcon","DefaultIcons.MicrophoneIcon","DefaultIcons.CopyIcon","DefaultIcons.ThumbsUpIcon","DefaultIcons.ThumbsDownIcon","DefaultIcons.UploadIcon","React","defaultCopilotContextCategories","COPILOTKIT_VERSION","Menu","MenuButton","MenuItems","MenuItem","React","Light","Prism","CheckIcon","ReactMarkdown","remarkGfm","remarkMath","rehypeRaw","DefaultUserMessage","DefaultAssistantMessage","DefaultImageRenderer","UserMessage","ImageRenderer","AssistantMessage","DefaultRenderMessage","DefaultMessages","DefaultRenderMessage","DefaultRenderSuggestionsList","DefaultInput","DefaultAssistantMessage","DefaultUserMessage","DefaultImageRenderer","CopilotKitError","CopilotKitErrorCode","Severity","ErrorVisibility","React","Messages","AssistantMessage","UserMessage","RenderMessage","ImageRenderer","Input","CopilotKitError","CopilotKitErrorCode","Severity","ErrorVisibility","DefaultWindow","DefaultButton","DefaultHeader","DefaultMessages","DefaultInput","DefaultAssistantMessage","DefaultUserMessage","React","Window","Button","Header","Messages","Input","AssistantMessage","UserMessage"],"sources":["../src/components/chat/Icons.tsx","../src/components/chat/ChatContext.tsx","../src/components/chat/Window.tsx","../src/components/chat/Button.tsx","../src/components/dev-console/utils.ts","../src/components/dev-console/icons.tsx","../src/components/help-modal/icons.tsx","../src/components/help-modal/modal.tsx","../src/components/dev-console/console.tsx","../src/components/chat/Header.tsx","../src/components/chat/AttachmentRenderer.tsx","../src/components/chat/messages/UserMessage.tsx","../src/hooks/use-copy-to-clipboard.tsx","../src/components/chat/CodeBlock.tsx","../src/components/chat/Markdown.tsx","../src/components/chat/messages/AssistantMessage.tsx","../src/components/chat/messages/ImageRenderer.tsx","../src/components/chat/messages/RenderMessage.tsx","../src/components/chat/messages/LegacyRenderMessage.tsx","../src/components/chat/Messages.tsx","../src/components/chat/Textarea.tsx","../src/hooks/use-push-to-talk.tsx","../src/hooks/use-dark-mode.ts","../src/components/chat/PoweredByTag.tsx","../src/components/chat/Input.tsx","../src/components/chat/AttachmentQueue.tsx","../src/components/chat/attachment-utils.ts","../src/components/chat/Suggestion.tsx","../src/components/chat/Suggestions.tsx","../src/components/chat/Chat.tsx","../src/components/chat/Modal.tsx","../src/components/chat/Popup.tsx","../src/components/chat/Sidebar.tsx","../src/hooks/use-copilot-chat-suggestions.tsx"],"sourcesContent":["import React from \"react\";\n\nexport const OpenIcon = (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    viewBox=\"0 0 24 24\"\n    fill=\"currentColor\"\n    width=\"24\"\n    height=\"24\"\n  >\n    <g transform=\"translate(24, 0) scale(-1, 1)\">\n      <path\n        fillRule=\"evenodd\"\n        d=\"M5.337 21.718a6.707 6.707 0 01-.533-.074.75.75 0 01-.44-1.223 3.73 3.73 0 00.814-1.686c.023-.115-.022-.317-.254-.543C3.274 16.587 2.25 14.41 2.25 12c0-5.03 4.428-9 9.75-9s9.75 3.97 9.75 9c0 5.03-4.428 9-9.75 9-.833 0-1.643-.097-2.417-.279a6.721 6.721 0 01-4.246.997z\"\n        clipRule=\"evenodd\"\n      />\n    </g>\n  </svg>\n);\n\nexport const CloseIcon = (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"1.5\"\n    stroke=\"currentColor\"\n    width=\"24\"\n    height=\"24\"\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M19.5 8.25l-7.5 7.5-7.5-7.5\"\n    />\n  </svg>\n);\n\nexport const HeaderCloseIcon = (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"1.5\"\n    stroke=\"currentColor\"\n    width=\"24\"\n    height=\"24\"\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M6 18L18 6M6 6l12 12\"\n    />\n  </svg>\n);\n\nexport const SendIcon = (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"1.5\"\n    stroke=\"currentColor\"\n    width=\"24\"\n    height=\"24\"\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M12 19V5m0 0l-7 7m7-7l7 7\"\n    />\n  </svg>\n);\n\nexport const MicrophoneIcon = (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"1.5\"\n    stroke=\"currentColor\"\n    width=\"24\"\n    height=\"24\"\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z\"\n    />\n  </svg>\n);\n\nexport const StopIcon = (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"1.5\"\n    stroke=\"currentColor\"\n    width=\"24\"\n    height=\"24\"\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z\"\n    />\n  </svg>\n);\n\nexport const RegenerateIcon = (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"2\"\n    stroke=\"currentColor\"\n    width=\"16\"\n    height=\"16\"\n    style={{ minWidth: \"16px\", minHeight: \"16px\" }}\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99\"\n    />\n  </svg>\n);\n\nexport const CopyIcon = (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"2\"\n    stroke=\"currentColor\"\n    width=\"16\"\n    height=\"16\"\n    style={{ minWidth: \"16px\", minHeight: \"16px\" }}\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 01-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 011.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 00-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 01-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5a3.375 3.375 0 00-3.375-3.375H9.75\"\n    />\n  </svg>\n);\n\nexport const SmallSpinnerIcon = (\n  <span\n    className=\"copilotKitSpinner\"\n    style={{ width: \"13px\", height: \"13px\" }}\n  ></span>\n);\n\nexport const SpinnerIcon = (\n  <span\n    className=\"copilotKitSpinner\"\n    style={{ width: \"24px\", height: \"24px\" }}\n  ></span>\n);\n\nexport const ActivityIcon = (\n  <div style={{ display: \"flex\", alignItems: \"center\", gap: \"4px\" }}>\n    <span\n      className=\"copilotKitActivityDot\"\n      style={{ animationDelay: \"0s\" }}\n    ></span>\n    <span\n      className=\"copilotKitActivityDot\"\n      style={{ animationDelay: \"0.2s\" }}\n    ></span>\n    <span\n      className=\"copilotKitActivityDot\"\n      style={{ animationDelay: \"0.4s\" }}\n    ></span>\n  </div>\n);\n\nexport const ThumbsUpIcon = (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"2\"\n    stroke=\"currentColor\"\n    width=\"16\"\n    height=\"16\"\n    style={{ minWidth: \"16px\", minHeight: \"16px\" }}\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 01-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 10.203 4.167 9.75 5 9.75h1.053c.472 0 .745.556.5.96a8.958 8.958 0 00-1.302 4.665c0 1.194.232 2.333.654 3.375z\"\n    />\n  </svg>\n);\n\nexport const ThumbsDownIcon = (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"2\"\n    stroke=\"currentColor\"\n    width=\"16\"\n    height=\"16\"\n    style={{ minWidth: \"16px\", minHeight: \"16px\" }}\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M7.5 15h2.25m8.024-9.75c.011.05.028.1.052.148.591 1.2.924 2.55.924 3.977a8.96 8.96 0 01-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398C20.613 14.547 19.833 15 19 15h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 00.303-.54m.023-8.25H16.48a4.5 4.5 0 01-1.423-.23l-3.114-1.04a4.5 4.5 0 00-1.423-.23H6.504c-.618 0-1.217.247-1.605.729A11.95 11.95 0 002.25 12c0 .434.023.863.068 1.285C2.427 14.306 3.346 15 4.372 15h3.126c.618 0 .991.724.725 1.282A7.471 7.471 0 007.5 19.5a2.25 2.25 0 002.25 2.25.75.75 0 00.75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 002.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384\"\n    />\n  </svg>\n);\n\nexport const DownloadIcon = (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"2\"\n    stroke=\"currentColor\"\n    width=\"16\"\n    height=\"16\"\n    style={{ minWidth: \"16px\", minHeight: \"16px\" }}\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3\"\n    />\n  </svg>\n);\n\nexport const UploadIcon = (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"1.5\"\n    stroke=\"currentColor\"\n    width=\"24\"\n    height=\"24\"\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M12 4.5v15m7.5-7.5h-15\"\n    />\n  </svg>\n);\n\nexport const CheckIcon = (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"2\"\n    stroke=\"currentColor\"\n    width=\"16\"\n    height=\"16\"\n    style={{ minWidth: \"16px\", minHeight: \"16px\" }}\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M4.5 12.75l6 6 9-13.5\"\n    />\n  </svg>\n);\n","import React, { useMemo, useState } from \"react\";\nimport * as DefaultIcons from \"./Icons\";\nimport { ThumbsDownIcon, ThumbsUpIcon } from \"./Icons\";\n\n/**\n * Icons for CopilotChat component.\n */\nexport interface CopilotChatIcons {\n  /**\n   * The icon to use for the open chat button.\n   * @default <OpenIcon />\n   */\n  openIcon?: React.ReactNode;\n\n  /**\n   * The icon to use for the close chat button.\n   * @default <CloseIcon />\n   */\n  closeIcon?: React.ReactNode;\n\n  /**\n   * The icon to use for the close chat button in the header.\n   * @default <HeaderCloseIcon />\n   */\n  headerCloseIcon?: React.ReactNode;\n\n  /**\n   * The icon to use for the send button.\n   * @default <SendIcon />\n   */\n  sendIcon?: React.ReactNode;\n\n  /**\n   * The icon to use for the activity indicator.\n   * @default <ActivityIcon />\n   */\n  activityIcon?: React.ReactNode;\n\n  /**\n   * The icon to use for the spinner.\n   * @default <SpinnerIcon />\n   */\n  spinnerIcon?: React.ReactNode;\n\n  /**\n   * The icon to use for the stop button.\n   * @default <StopIcon />\n   */\n  stopIcon?: React.ReactNode;\n\n  /**\n   * The icon to use for the regenerate button.\n   * @default <RegenerateIcon />\n   */\n  regenerateIcon?: React.ReactNode;\n\n  /**\n   * The icons to use for push to talk.\n   * @default <PushToTalkIcon />\n   */\n\n  pushToTalkIcon?: React.ReactNode;\n\n  /**\n   * The icons to use for copy assistant response\n   * @default <CopyIcon />\n   */\n\n  copyIcon?: React.ReactNode;\n\n  /**\n   * The icon to use for thumbs up/response approval.\n   * @default <ThumbsUpIcon />\n   */\n\n  thumbsUpIcon?: React.ReactNode;\n\n  /**\n   * The icon to use for thumbs down/response rejection.\n   * @default <ThumbsDownIcon />\n   */\n\n  thumbsDownIcon?: React.ReactNode;\n\n  /**\n   * The icon to use for the upload button.\n   * @default <UploadIcon />\n   */\n  uploadIcon?: React.ReactNode;\n}\n\n/**\n * Labels for CopilotChat component.\n */\nexport interface CopilotChatLabels {\n  /**\n   * The initial message(s) to display in the chat window.\n   */\n  initial?: string | string[];\n\n  /**\n   * The title to display in the header.\n   * @default \"CopilotKit\"\n   */\n  title?: string;\n\n  /**\n   * The placeholder to display in the input.\n   * @default \"Type a message...\"\n   */\n  placeholder?: string;\n\n  /**\n   * The message to display when an error occurs.\n   * @default \"❌ An error occurred. Please try again.\"\n   */\n  error?: string;\n\n  /**\n   * The label to display on the stop button.\n   * @default \"Stop generating\"\n   */\n  stopGenerating?: string;\n\n  /**\n   * The label to display on the regenerate button.\n   * @default \"Regenerate response\"\n   */\n  regenerateResponse?: string;\n\n  /**\n   * The label for the copy button.\n   * @default \"Copy to clipboard\"\n   */\n  copyToClipboard?: string;\n\n  /**\n   * The label for the thumbs up button.\n   * @default \"Thumbs up\"\n   */\n  thumbsUp?: string;\n\n  /**\n   * The label for the thumbs down button.\n   * @default \"Thumbs down\"\n   */\n  thumbsDown?: string;\n\n  /**\n   * The text to display when content is copied.\n   * @default \"Copied!\"\n   */\n  copied?: string;\n}\n\ninterface ChatContext {\n  labels: Required<CopilotChatLabels>;\n  icons: Required<CopilotChatIcons>;\n  open: boolean;\n  setOpen: (open: boolean) => void;\n}\n\nexport const ChatContext = React.createContext<ChatContext | undefined>(\n  undefined,\n);\n\nexport function useChatContext(): ChatContext {\n  const context = React.useContext(ChatContext);\n  if (context === undefined) {\n    throw new Error(\n      \"Context not found. Did you forget to wrap your app in a <ChatContextProvider> component?\",\n    );\n  }\n  return context;\n}\n\ninterface ChatContextProps {\n  // temperature?: number;\n  // instructions?: string;\n  // maxFeedback?: number;\n  labels?: CopilotChatLabels;\n  icons?: CopilotChatIcons;\n  children?: React.ReactNode;\n  open: boolean;\n  setOpen: (open: boolean) => void;\n}\n\nexport const ChatContextProvider = ({\n  // temperature,\n  // instructions,\n  // maxFeedback,\n  labels,\n  icons,\n  children,\n  open,\n  setOpen,\n}: ChatContextProps) => {\n  const memoizedLabels = useMemo(\n    () => ({\n      initial: \"\",\n      title: \"CopilotKit\",\n      placeholder: \"Type a message...\",\n      error: \"❌ An error occurred. Please try again.\",\n      stopGenerating: \"Stop generating\",\n      regenerateResponse: \"Regenerate response\",\n      copyToClipboard: \"Copy to clipboard\",\n      thumbsUp: \"Thumbs up\",\n      thumbsDown: \"Thumbs down\",\n      copied: \"Copied!\",\n      ...labels,\n    }),\n    [labels],\n  );\n\n  const memoizedIcons = useMemo(\n    () => ({\n      openIcon: DefaultIcons.OpenIcon,\n      closeIcon: DefaultIcons.CloseIcon,\n      headerCloseIcon: DefaultIcons.HeaderCloseIcon,\n      sendIcon: DefaultIcons.SendIcon,\n      activityIcon: DefaultIcons.ActivityIcon,\n      spinnerIcon: DefaultIcons.SpinnerIcon,\n      stopIcon: DefaultIcons.StopIcon,\n      regenerateIcon: DefaultIcons.RegenerateIcon,\n      pushToTalkIcon: DefaultIcons.MicrophoneIcon,\n      copyIcon: DefaultIcons.CopyIcon,\n      thumbsUpIcon: DefaultIcons.ThumbsUpIcon,\n      thumbsDownIcon: DefaultIcons.ThumbsDownIcon,\n      uploadIcon: DefaultIcons.UploadIcon,\n      ...icons,\n    }),\n    [icons],\n  );\n\n  const context = useMemo(\n    () => ({\n      labels: memoizedLabels,\n      icons: memoizedIcons,\n      open,\n      setOpen,\n    }),\n    [memoizedLabels, memoizedIcons, open, setOpen],\n  );\n\n  return (\n    <ChatContext.Provider value={context}>{children}</ChatContext.Provider>\n  );\n};\n","import React, { useCallback, useEffect } from \"react\";\nimport { WindowProps } from \"./props\";\nimport { useChatContext } from \"./ChatContext\";\nimport { useCopilotContext } from \"@copilotkit/react-core\";\nimport { isMacOS } from \"@copilotkit/shared\";\n\nexport const Window = ({\n  children,\n  clickOutsideToClose,\n  shortcut,\n  hitEscapeToClose,\n}: WindowProps) => {\n  const windowRef = React.useRef<HTMLDivElement>(null);\n  const context = useCopilotContext();\n\n  const { open, setOpen } = useChatContext();\n\n  const handleClickOutside = useCallback(\n    (event: MouseEvent) => {\n      if (!clickOutsideToClose) {\n        return;\n      }\n\n      const parentElement = windowRef.current?.parentElement;\n\n      let className = \"\";\n      if (event.target instanceof HTMLElement) {\n        className = event.target.className;\n      }\n\n      if (\n        open &&\n        parentElement &&\n        !parentElement.contains(event.target as any) &&\n        // prevent closing the window when clicking on the debug menu\n        !className.includes(\"copilotKitDebugMenu\")\n      ) {\n        setOpen(false);\n      }\n    },\n    [clickOutsideToClose, open, setOpen],\n  );\n\n  const handleKeyDown = useCallback(\n    (event: KeyboardEvent) => {\n      const target = event.target as HTMLElement;\n      const isInput =\n        target.tagName === \"INPUT\" ||\n        target.tagName === \"SELECT\" ||\n        target.tagName === \"TEXTAREA\" ||\n        target.isContentEditable;\n\n      const isDescendantOfWrapper = windowRef.current?.contains(target);\n\n      if (\n        open &&\n        event.key === \"Escape\" &&\n        (!isInput || isDescendantOfWrapper) &&\n        hitEscapeToClose\n      ) {\n        setOpen(false);\n      } else if (\n        event.key === shortcut &&\n        ((isMacOS() && event.metaKey) || (!isMacOS() && event.ctrlKey)) &&\n        (!isInput || isDescendantOfWrapper)\n      ) {\n        setOpen(!open);\n      }\n    },\n    [hitEscapeToClose, shortcut, open, setOpen],\n  );\n\n  const adjustForMobile = useCallback(() => {\n    const copilotKitWindow = windowRef.current;\n    const vv = window.visualViewport;\n    if (!copilotKitWindow || !vv) {\n      return;\n    }\n\n    if (window.innerWidth < 640 && open) {\n      copilotKitWindow.style.height = `${vv.height}px`;\n      copilotKitWindow.style.left = `${vv.offsetLeft}px`;\n      copilotKitWindow.style.top = `${vv.offsetTop}px`;\n\n      document.body.style.position = \"fixed\";\n      document.body.style.width = \"100%\";\n      document.body.style.height = `${window.innerHeight}px`;\n      document.body.style.overflow = \"hidden\";\n      document.body.style.touchAction = \"none\";\n\n      // Prevent scrolling on iOS\n      document.body.addEventListener(\"touchmove\", preventScroll, {\n        passive: false,\n      });\n    } else {\n      copilotKitWindow.style.height = \"\";\n      copilotKitWindow.style.left = \"\";\n      copilotKitWindow.style.top = \"\";\n      document.body.style.position = \"\";\n      document.body.style.height = \"\";\n      document.body.style.width = \"\";\n      document.body.style.overflow = \"\";\n      document.body.style.top = \"\";\n      document.body.style.touchAction = \"\";\n\n      document.body.removeEventListener(\"touchmove\", preventScroll);\n    }\n  }, [open]);\n\n  useEffect(() => {\n    document.addEventListener(\"mousedown\", handleClickOutside);\n    document.addEventListener(\"keydown\", handleKeyDown);\n    if (window.visualViewport) {\n      window.visualViewport.addEventListener(\"resize\", adjustForMobile);\n      adjustForMobile();\n    }\n\n    return () => {\n      document.removeEventListener(\"mousedown\", handleClickOutside);\n      document.removeEventListener(\"keydown\", handleKeyDown);\n      if (window.visualViewport) {\n        window.visualViewport.removeEventListener(\"resize\", adjustForMobile);\n      }\n    };\n  }, [adjustForMobile, handleClickOutside, handleKeyDown]);\n\n  return (\n    <div className={`copilotKitWindow ${open ? \" open\" : \"\"}`} ref={windowRef}>\n      {children}\n    </div>\n  );\n};\n\nconst preventScroll = (event: TouchEvent): void => {\n  let targetElement = event.target as Element;\n\n  // Function to check if the target has the parent with a given class\n  const hasParentWithClass = (element: Element, className: string): boolean => {\n    while (element && element !== document.body) {\n      if (element.classList.contains(className)) {\n        return true;\n      }\n      element = element.parentElement!;\n    }\n    return false;\n  };\n\n  // Check if the target of the touch event is inside an element with the 'copilotKitMessages' class\n  if (!hasParentWithClass(targetElement, \"copilotKitMessages\")) {\n    event.preventDefault();\n  }\n};\n","import { ButtonProps } from \"./props\";\nimport { useChatContext } from \"./ChatContext\";\n\nexport const Button = ({}: ButtonProps) => {\n  const { open, setOpen, icons } = useChatContext();\n\n  return (\n    <div onClick={() => setOpen(!open)}>\n      <button\n        className={`copilotKitButton ${open ? \"open\" : \"\"}`}\n        aria-label={open ? \"Close Chat\" : \"Open Chat\"}\n      >\n        <div className=\"copilotKitButtonIcon copilotKitButtonIconOpen\">\n          {icons.openIcon}\n        </div>\n        <div className=\"copilotKitButtonIcon copilotKitButtonIconClose\">\n          {icons.closeIcon}\n        </div>\n      </button>\n    </div>\n  );\n};\n","import {\n  CopilotContextParams,\n  CopilotMessagesContextParams,\n  defaultCopilotContextCategories,\n} from \"@copilotkit/react-core\";\nimport { CopilotKitVersion } from \"./types\";\nexport { shouldShowDevConsole } from \"@copilotkit/react-core\";\n\nexport async function getPublishedCopilotKitVersion(\n  current: string,\n  forceCheck: boolean = false,\n): Promise<CopilotKitVersion> {\n  const LOCAL_STORAGE_KEY = \"__copilotkit_version_check__\";\n  const serializedVersion = localStorage.getItem(LOCAL_STORAGE_KEY);\n  if (serializedVersion && !forceCheck) {\n    try {\n      const parsedVersion: CopilotKitVersion = JSON.parse(serializedVersion);\n      const oneHour = 60 * 60 * 1000;\n      const now = new Date().getTime();\n\n      if (\n        parsedVersion.current === current &&\n        now - new Date(parsedVersion.lastChecked).getTime() < oneHour\n      ) {\n        return parsedVersion;\n      }\n    } catch (error) {\n      console.error(\n        \"Failed to parse CopilotKitVersion from localStorage\",\n        error,\n      );\n    }\n  }\n\n  try {\n    const response = await fetch(\n      \"https://api.cloud.copilotkit.ai/check-for-updates\",\n      {\n        method: \"POST\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n        },\n        body: JSON.stringify({\n          packages: [\n            {\n              packageName: \"@copilotkit/shared\",\n              packageVersion: current,\n            },\n          ],\n        }),\n      },\n    );\n\n    const data = await response.json();\n\n    const version: CopilotKitVersion = {\n      current,\n      lastChecked: new Date().getTime(),\n      latest: data.packages[0].latestVersion,\n      severity: data.packages[0].severity,\n      advisory: data.packages[0].advisory || null,\n    };\n\n    localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(version));\n    return version;\n  } catch (error) {\n    console.error(\"Failed to check for updates\", error);\n    throw error;\n  }\n}\n\nexport function logReadables(context: CopilotContextParams) {\n  console.log(\"%cCurrent Readables:\", \"font-size: 16px; font-weight: bold;\");\n\n  const readables = context\n    .getContextString([], defaultCopilotContextCategories)\n    .trim();\n  if (readables.length === 0) {\n    console.log(\"No readables found\");\n    return;\n  }\n  console.log(readables);\n}\n\nexport function logActions(context: CopilotContextParams) {\n  console.log(\"%cCurrent Actions:\", \"font-size: 16px; font-weight: bold;\");\n\n  if (Object.values(context.actions).length === 0) {\n    console.log(\"No actions found\");\n    return;\n  }\n  for (const action of Object.values(context.actions)) {\n    console.group(action.name);\n    console.log(\"name\", action.name);\n    console.log(\"description\", action.description);\n    console.log(\"parameters\", action.parameters);\n\n    console.groupEnd();\n  }\n}\n\nexport function logMessages(context: CopilotMessagesContextParams) {\n  console.log(\"%cCurrent Messages:\", \"font-size: 16px; font-weight: bold;\");\n\n  if (context.messages.length === 0) {\n    console.log(\"No messages found\");\n    return;\n  }\n\n  const tableData = context.messages.map((message) => {\n    if (message.isTextMessage()) {\n      return {\n        id: message.id,\n        type: \"TextMessage\",\n        role: message.role,\n        name: undefined,\n        scope: undefined,\n        content: message.content,\n      };\n    } else if (message.isActionExecutionMessage()) {\n      return {\n        id: message.id,\n        type: \"ActionExecutionMessage\",\n        role: undefined,\n        name: message.name,\n        scope: message.parentMessageId,\n        content: message.arguments,\n      };\n    } else if (message.isResultMessage()) {\n      return {\n        id: message.id,\n        type: \"ResultMessage\",\n        role: undefined,\n        name: message.actionName,\n        scope: message.actionExecutionId,\n        content: message.result,\n      };\n    } else if (message.isAgentStateMessage()) {\n      return {\n        id: message.id,\n        type: `AgentStateMessage (running: ${message.running})`,\n        role: message.role,\n        name: undefined,\n        scope: message.threadId,\n        content: message.state,\n      };\n    }\n  });\n  console.table(tableData);\n}\n","export const ExclamationMarkTriangleIcon = (\n  <svg\n    width=\"13.3967723px\"\n    height=\"12px\"\n    viewBox=\"0 0 13.3967723 12\"\n    version=\"1.1\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n  >\n    <g id=\"Page-1\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n      <g id=\"exclamation-triangle\" fill=\"#CD2121\">\n        <path\n          d=\"M5.39935802,0.75 C5.97670802,-0.25 7.42007802,-0.25 7.99742802,0.75 L13.193588,9.75 C13.770888,10.75 13.049288,12 11.894588,12 L1.50223802,12 C0.34753802,12 -0.37414898,10.75 0.20319802,9.75 L5.39935802,0.75 Z M6.69838802,2.5 C7.11260802,2.5 7.44838802,2.83579 7.44838802,3.25 L7.44838802,6.25 C7.44838802,6.66421 7.11260802,7 6.69838802,7 C6.28417802,7 5.94838802,6.66421 5.94838802,6.25 L5.94838802,3.25 C5.94838802,2.83579 6.28417802,2.5 6.69838802,2.5 Z M6.69838802,10.5 C7.25067802,10.5 7.69838802,10.0523 7.69838802,9.5 C7.69838802,8.9477 7.25067802,8.5 6.69838802,8.5 C6.14610802,8.5 5.69838802,8.9477 5.69838802,9.5 C5.69838802,10.0523 6.14610802,10.5 6.69838802,10.5 Z\"\n          id=\"Shape\"\n        ></path>\n      </g>\n    </g>\n  </svg>\n);\n\nexport const ExclamationMarkIcon = (\n  <svg\n    width=\"14px\"\n    height=\"14px\"\n    viewBox=\"0 0 14 14\"\n    version=\"1.1\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n  >\n    <g id=\"Page-1\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n      <g id=\"exclamation-circle\" fill=\"#EC662C\">\n        <path\n          d=\"M7,14 C10.866,14 14,10.866 14,7 C14,3.13401 10.866,0 7,0 C3.13401,0 0,3.13401 0,7 C0,10.866 3.13401,14 7,14 Z M7,3 C7.41421,3 7.75,3.33579 7.75,3.75 L7.75,6.75 C7.75,7.16421 7.41421,7.5 7,7.5 C6.58579,7.5 6.25,7.16421 6.25,6.75 L6.25,3.75 C6.25,3.33579 6.58579,3 7,3 Z M7,11 C7.55228,11 8,10.5523 8,10 C8,9.4477 7.55228,9 7,9 C6.44772,9 6,9.4477 6,10 C6,10.5523 6.44772,11 7,11 Z\"\n          id=\"Shape\"\n        ></path>\n      </g>\n    </g>\n  </svg>\n);\n\nexport const ChevronDownIcon = (\n  <svg\n    width=\"7px\"\n    height=\"4px\"\n    viewBox=\"0 0 7 4\"\n    version=\"1.1\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"currentColor\"\n  >\n    <g id=\"Page-1\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n      <g id=\"Group\" fill=\"currentColor\" fillRule=\"nonzero\">\n        <path\n          d=\"M3.71690723,3.90271086 C3.59268176,4.03242971 3.39143629,4.03242971 3.26721082,3.90271086 L0.0853966595,0.57605615 C-0.0314221035,0.444981627 -0.0279751448,0.240725043 0.0931934622,0.114040675 C0.214362069,-0.0126436935 0.409725445,-0.0162475626 0.535093061,0.105888951 L3.49205902,3.19746006 L6.44902499,0.105888951 C6.52834574,0.0168884389 6.64780588,-0.0197473458 6.7605411,0.0103538404 C6.87327633,0.0404550266 6.96130636,0.132492308 6.99009696,0.250359396 C7.01888756,0.368226483 6.98384687,0.493124608 6.89872139,0.57605615 L3.71690723,3.90271086 Z\"\n          id=\"Path\"\n        ></path>\n      </g>\n    </g>\n  </svg>\n);\n\nexport const CheckIcon = (\n  <svg\n    width=\"14px\"\n    height=\"14px\"\n    viewBox=\"0 0 14 14\"\n    version=\"1.1\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n  >\n    <g id=\"Page-1\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n      <g\n        id=\"Group-2\"\n        transform=\"translate(-118, 0)\"\n        fill=\"#1BC030\"\n        fillRule=\"nonzero\"\n      >\n        <g id=\"Group\" transform=\"translate(118, 0)\">\n          <path\n            d=\"M0,7 C0,3.13384615 3.13384615,0 7,0 C10.8661538,0 14,3.13384615 14,7 C14,10.8661538 10.8661538,14 7,14 C3.13384615,14 0,10.8661538 0,7 Z M9.59179487,5.69764103 C9.70905818,5.54139023 9.73249341,5.33388318 9.65303227,5.15541491 C9.57357113,4.97694665 9.40367989,4.85551619 9.20909814,4.83811118 C9.01451638,4.82070616 8.82577109,4.91005717 8.71589744,5.07158974 L6.39261538,8.32389744 L5.22666667,7.15794872 C5.01450582,6.96025518 4.68389046,6.9660885 4.47883563,7.17114332 C4.27378081,7.37619815 4.26794748,7.70681351 4.46564103,7.91897436 L6.08102564,9.53435897 C6.19289944,9.64614839 6.3482622,9.70310251 6.50588106,9.69010587 C6.66349993,9.67710922 6.80743532,9.59547613 6.89948718,9.46687179 L9.59179487,5.69764103 L9.59179487,5.69764103 Z\"\n            id=\"Shape\"\n          ></path>\n        </g>\n      </g>\n    </g>\n  </svg>\n);\n\nexport const CopilotKitIcon = (\n  <svg\n    width=\"33px\"\n    height=\"35px\"\n    viewBox=\"0 0 33 35\"\n    version=\"1.1\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n  >\n    <title>bd5c9079-929b-4d55-bdc9-16d1c8181b71</title>\n    <g id=\"Page-1\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n      <image\n        x=\"0\"\n        y=\"0\"\n        width=\"33\"\n        height=\"35\"\n        xlinkHref=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAACXCAYAAAAoE9hYAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAjaADAAQAAAABAAAAlwAAAACI8Oz3AABAAElEQVR4Ae2dCYAlVXnvv6q79d7TMz37sIMgKKBCkLhkSKK4xJUMQVzAqJBgNDGJa2LsvJfERI0aiEbwRXnoQ2VYRASiQUFRUGQm7DAwzDBbT+/rvbfvXu/3P1V1+84CzEw3MNPD6a579nOqzvev73znO0t59r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MKzesLnTyv6plHUuwDiH8FAu0CIoC6SFvZH837ar3ill4+5BV6/4ecfOLeBAw/HyryLiMwDmFdg3Min5aTS+Tz9zvXNps+H/s18fwQ7FcwDOayDosXAHWLIH54l0Nlrn4oRkLR1g9BX4t8I81iAbPW5VvgE5NbyMyf8zzKsySnL5NXMspd0w9v3cIvM+CMSr39s3G7d7MJbhwWUWIrt8hYeXAu9ndFGfZ2j9C8Lizv/Zb5ce5qEm7j2cibbT6cN/i+7qOMAxDzejA38hdiu6CKYDYBLVWolRQh9bMzZYOcdHtQqHErYEQHEmqgMWk3TeFgDzU5jKf9v3znv02X+guVVjEsFXH+A6kcdaD1Aub29v//VzChi1b49X4vdRhLr11vsHN1pz7Qj8bDKrLULpdyJzKocw1OwCKBm2zYKPCh1PiQ87sujILdnw1gKQrQiMDNmTj5nP0P2F714fHlStCp43M2kBT2t9EXjfBlBydEu37Pfn+J7/zXkIt50IxO3oK1rgKgEaU5YYAJhaUOCLawjufOW8i0Pnlm1/bo/7mAll9uO8/x9teQya14m6TgAAAABJRU5ErkJggg==\"\n      ></image>\n    </g>\n  </svg>\n);\n","import React from \"react\";\n\nexport const LifeBuoyIcon = () => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"24\"\n    height=\"24\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke=\"currentColor\"\n    strokeWidth=\"2\"\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n    className=\"icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy\"\n  >\n    <g transform=\"translate(0, -1)\">\n      <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n      <path d=\"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0\" />\n      <path d=\"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0\" />\n      <path d=\"M15 15l3.35 3.35\" />\n      <path d=\"M9 15l-3.35 3.35\" />\n      <path d=\"M5.65 5.65l3.35 3.35\" />\n      <path d=\"M18.35 5.65l-3.35 3.35\" />\n    </g>\n  </svg>\n);\n\nexport const CloseIcon = () => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    strokeWidth=\"1.5\"\n    stroke=\"currentColor\"\n    width=\"20\"\n    height=\"20\"\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      d=\"M6 18L18 6M6 6l12 12\"\n    />\n  </svg>\n);\n\nexport const LoadingSpinnerIcon = ({\n  color = \"rgb(107 114 128)\",\n}: {\n  color?: string;\n}) => (\n  <svg\n    style={{\n      animation: \"copilotKitSpinAnimation 1s linear infinite\",\n      color,\n    }}\n    width=\"24\"\n    height=\"24\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n  >\n    <circle\n      style={{ opacity: 0.25 }}\n      cx=\"12\"\n      cy=\"12\"\n      r=\"10\"\n      stroke=\"currentColor\"\n      strokeWidth=\"4\"\n    ></circle>\n    <path\n      style={{ opacity: 0.75 }}\n      fill=\"currentColor\"\n      d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n    ></path>\n  </svg>\n);\n","import React, { useMemo, useState, useRef, useEffect } from \"react\";\nimport { CloseIcon } from \"./icons\";\n\nexport function CopilotKitHelpModal() {\n  const [showHelpModal, setShowHelpModal] = useState(false);\n  const buttonRef = useRef<HTMLButtonElement>(null);\n  const popoverRef = useRef<HTMLDivElement>(null);\n\n  // Close popover when clicking outside\n  useEffect(() => {\n    const handleClickOutside = (event: MouseEvent) => {\n      if (\n        popoverRef.current &&\n        !popoverRef.current.contains(event.target as Node) &&\n        buttonRef.current &&\n        !buttonRef.current.contains(event.target as Node)\n      ) {\n        setShowHelpModal(false);\n      }\n    };\n\n    if (showHelpModal) {\n      document.addEventListener(\"mousedown\", handleClickOutside);\n    }\n\n    return () => {\n      document.removeEventListener(\"mousedown\", handleClickOutside);\n    };\n  }, [showHelpModal]);\n\n  const HelpButton = () => (\n    <button\n      ref={buttonRef}\n      onClick={() => setShowHelpModal(!showHelpModal)}\n      className=\"copilotKitDebugMenuTriggerButton relative\"\n      aria-label=\"Open Help\"\n    >\n      Help\n    </button>\n  );\n\n  return (\n    <div className=\"relative\">\n      <HelpButton />\n      {showHelpModal && (\n        <div\n          ref={popoverRef}\n          className=\"absolute mt-2 z-50\"\n          style={{\n            top: \"100%\",\n            right: \"-120px\",\n            width: \"380px\",\n          }}\n        >\n          <div className=\"copilotKitHelpModal rounded-lg shadow-xl w-full p-4 flex-col relative\">\n            <button\n              className=\"copilotKitHelpModalCloseButton absolute text-gray-400 hover:text-gray-600 focus:outline-none\"\n              style={{ top: \"10px\", right: \"10px\" }}\n              onClick={() => setShowHelpModal(false)}\n              aria-label=\"Close\"\n            >\n              <CloseIcon />\n            </button>\n            <div className=\"w-full flex mb-6 justify-center\">\n              <h2 className=\"text-2xl font-bold\">Help Options</h2>\n            </div>\n            <div className=\"space-y-4 mb-4\">\n              <div className=\"copilotKitHelpItemButton\">\n                <a\n                  href=\"https://docs.copilotkit.ai/coagents/troubleshooting/common-issues\"\n                  target=\"_blank\"\n                  rel=\"noopener noreferrer\"\n                >\n                  Visit the Troubleshooting and FAQ section in the docs\n                </a>\n              </div>\n              <div className=\"copilotKitHelpItemButton\">\n                <a\n                  href=\"https://go.copilotkit.ai/dev-console-support-discord\"\n                  target=\"_blank\"\n                  rel=\"noopener noreferrer\"\n                >\n                  Go to Discord Support Channel (Community Support)\n                </a>\n              </div>\n              <div className=\"copilotKitHelpItemButton\">\n                <a\n                  href=\"https://go.copilotkit.ai/dev-console-support-slack\"\n                  target=\"_blank\"\n                  rel=\"noopener noreferrer\"\n                >\n                  Apply for Priority Direct Slack Support\n                </a>\n              </div>\n            </div>\n          </div>\n        </div>\n      )}\n    </div>\n  );\n}\n","\"use client\";\n\nimport {\n  useCopilotContext,\n  useCopilotMessagesContext,\n} from \"@copilotkit/react-core\";\nimport {\n  getPublishedCopilotKitVersion,\n  logActions,\n  logMessages,\n  logReadables,\n  shouldShowDevConsole,\n} from \"./utils\";\nimport React, { useEffect, useRef, useState } from \"react\";\nimport {\n  CheckIcon,\n  ChevronDownIcon,\n  CopilotKitIcon,\n  ExclamationMarkIcon,\n  ExclamationMarkTriangleIcon,\n} from \"./icons\";\nimport { Menu, MenuButton, MenuItem, MenuItems } from \"@headlessui/react\";\nimport { COPILOTKIT_VERSION, copyToClipboard } from \"@copilotkit/shared\";\nimport { SmallSpinnerIcon } from \"../chat/Icons\";\nimport { CopilotKitHelpModal } from \"../help-modal\";\n\ntype VersionStatus =\n  | \"unknown\"\n  | \"checking\"\n  | \"latest\"\n  | \"update-available\"\n  | \"outdated\";\n\nexport function CopilotDevConsole() {\n  const currentVersion = COPILOTKIT_VERSION;\n  const context = useCopilotContext();\n\n  // to prevent hydration errors, ensure that the component renders the same content\n  // server-side as it does during the initial client-side render to prevent a hydration\n  // mismatch\n  // see: https://nextjs.org/docs/messages/react-hydration-error#solution-1-using-useeffect-to-run-on-the-client-only\n\n  const [showDevConsole, setShowDevConsole] = useState(false);\n\n  useEffect(() => {\n    setShowDevConsole(shouldShowDevConsole(context.showDevConsole));\n  }, [context.showDevConsole]);\n\n  const dontRunTwiceInDevMode = useRef(false);\n  const [versionStatus, setVersionStatus] = useState<VersionStatus>(\"unknown\");\n  const [latestVersion, setLatestVersion] = useState<string>(\"\");\n  const consoleRef = useRef<HTMLDivElement>(null);\n  const [debugButtonMode, setDebugButtonMode] = useState<\"full\" | \"compact\">(\n    \"full\",\n  );\n\n  const checkForUpdates = (force: boolean = false) => {\n    setVersionStatus(\"checking\");\n\n    getPublishedCopilotKitVersion(currentVersion, force)\n      .then((v) => {\n        setLatestVersion(v.latest);\n        let versionOk = false;\n\n        // match exact version or a version with a letter (e.g. 1.0.0-alpha.1)\n        if (v.current === v.latest) {\n          versionOk = true;\n        } else if (/[a-zA-Z]/.test(v.current)) {\n          versionOk = true;\n        }\n\n        if (versionOk) {\n          setVersionStatus(\"latest\");\n        } else if (v.severity !== \"low\") {\n          setVersionStatus(\"outdated\");\n        } else {\n          setVersionStatus(\"update-available\");\n        }\n      })\n      .catch((e) => {\n        console.error(e);\n        setVersionStatus(\"unknown\");\n      });\n  };\n\n  useEffect(() => {\n    if (!showDevConsole) {\n      return;\n    }\n    if (dontRunTwiceInDevMode.current === true) {\n      return;\n    }\n    dontRunTwiceInDevMode.current = true;\n\n    checkForUpdates();\n  }, [showDevConsole]);\n\n  if (!showDevConsole) {\n    return null;\n  }\n  return (\n    <div\n      ref={consoleRef}\n      className={\n        \"copilotKitDevConsole \" +\n        (versionStatus === \"update-available\"\n          ? \"copilotKitDevConsoleUpgrade\"\n          : \"\") +\n        (versionStatus === \"outdated\" ? \"copilotKitDevConsoleWarnOutdated\" : \"\")\n      }\n    >\n      <VersionInfo\n        showDevConsole={context.showDevConsole}\n        versionStatus={versionStatus}\n        currentVersion={currentVersion}\n        latestVersion={latestVersion}\n      />\n\n      <CopilotKitHelpModal />\n\n      <DebugMenuButton\n        setShowDevConsole={setShowDevConsole}\n        checkForUpdates={checkForUpdates}\n        mode={debugButtonMode}\n      />\n    </div>\n  );\n}\n\nfunction VersionInfo({\n  showDevConsole,\n  versionStatus,\n  currentVersion,\n  latestVersion,\n}: {\n  showDevConsole: boolean;\n  versionStatus: VersionStatus;\n  currentVersion: string;\n  latestVersion: string;\n}) {\n  const [copyStatus, setCopyStatus] = useState<string>(\"\");\n\n  let versionLabel = \"\";\n  let versionIcon: any = \"\";\n  let currentVersionLabel = currentVersion;\n\n  if (versionStatus === \"latest\") {\n    versionLabel = \"latest\";\n    versionIcon = CheckIcon;\n  } else if (versionStatus === \"checking\") {\n    versionLabel = \"checking\";\n    versionIcon = SmallSpinnerIcon;\n  } else if (versionStatus === \"update-available\") {\n    versionLabel = \"update available\";\n    versionIcon = ExclamationMarkIcon;\n    currentVersionLabel = `${currentVersion} → ${latestVersion}`;\n  } else if (versionStatus === \"outdated\") {\n    versionLabel = \"outdated\";\n    versionIcon = ExclamationMarkTriangleIcon;\n    currentVersionLabel = `${currentVersion} → ${latestVersion}`;\n  }\n\n  let asideLabel = \"\";\n  if (showDevConsole === true) {\n    asideLabel = \"(enabled)\";\n  }\n\n  const installCommand = [\n    `npm install`,\n    `@copilotkit/react-core@${latestVersion}`,\n    `@copilotkit/react-ui@${latestVersion}`,\n    `@copilotkit/react-textarea@${latestVersion}`,\n    `&& npm install @copilotkit/runtime@${latestVersion}`,\n  ].join(\" \");\n\n  const handleCopyClick = async () => {\n    const success = await copyToClipboard(installCommand.trim());\n    if (success) {\n      setCopyStatus(\"Command copied to clipboard!\");\n      setTimeout(() => setCopyStatus(\"\"), 1000);\n    }\n  };\n\n  if (versionStatus === \"update-available\" || versionStatus === \"outdated\") {\n    return (\n      <div className=\"copilotKitVersionInfo\">\n        <p>\n          {currentVersionLabel} {versionIcon}\n        </p>\n        <button onClick={handleCopyClick}>\n          {copyStatus || installCommand}\n        </button>\n      </div>\n    );\n  }\n\n  return null;\n}\n\nexport default function DebugMenuButton({\n  setShowDevConsole,\n  checkForUpdates,\n  mode,\n}: {\n  setShowDevConsole: (show: boolean) => void;\n  checkForUpdates: (force: boolean) => void;\n  mode: \"full\" | \"compact\";\n}) {\n  const context = useCopilotContext();\n  const messagesContext = useCopilotMessagesContext();\n\n  return (\n    <>\n      <Menu>\n        <MenuButton\n          className={`copilotKitDebugMenuTriggerButton ${mode === \"compact\" ? \"compact\" : \"\"}`}\n        >\n          {mode == \"compact\" ? \"Debug\" : <>Debug {ChevronDownIcon}</>}\n        </MenuButton>\n\n        <MenuItems\n          transition\n          anchor=\"bottom end\"\n          className=\"copilotKitDebugMenu\"\n          style={{ zIndex: 40 }}\n        >\n          <MenuItem>\n            <button\n              className=\"copilotKitDebugMenuItem\"\n              onClick={() => logReadables(context)}\n            >\n              Log Readables\n            </button>\n          </MenuItem>\n          <MenuItem>\n            <button\n              className=\"copilotKitDebugMenuItem\"\n              onClick={() => logActions(context)}\n            >\n              Log Actions\n            </button>\n          </MenuItem>\n          <MenuItem>\n            <button\n              className=\"copilotKitDebugMenuItem\"\n              onClick={() => logMessages(messagesContext)}\n            >\n              Log Messages\n            </button>\n          </MenuItem>\n          <MenuItem>\n            <button\n              className=\"copilotKitDebugMenuItem\"\n              onClick={() => checkForUpdates(true)}\n            >\n              Check for Updates\n            </button>\n          </MenuItem>\n          <hr />\n          <MenuItem>\n            <button\n              className=\"copilotKitDebugMenuItem\"\n              onClick={() => setShowDevConsole(false)}\n            >\n              Hide Dev Console\n            </button>\n          </MenuItem>\n        </MenuItems>\n      </Menu>\n    </>\n  );\n}\n","import { HeaderProps } from \"./props\";\nimport { useChatContext } from \"./ChatContext\";\nimport { CopilotDevConsole } from \"../dev-console\";\nimport React from \"react\";\n\nexport const Header = ({}: HeaderProps) => {\n  const { setOpen, icons, labels } = useChatContext();\n\n  return (\n    <div className=\"copilotKitHeader\">\n      <div>{labels.title}</div>\n      <div className=\"copilotKitHeaderControls\">\n        <CopilotDevConsole />\n        <button\n          onClick={() => setOpen(false)}\n          aria-label=\"Close\"\n          className=\"copilotKitHeaderCloseButton\"\n        >\n          {icons.headerCloseIcon}\n        </button>\n      </div>\n    </div>\n  );\n};\n","import React, { memo, useState } from \"react\";\nimport type { InputContentSource } from \"@copilotkit/shared\";\nimport { getSourceUrl, getDocumentIcon } from \"@copilotkit/shared\";\n\ninterface AttachmentRendererProps {\n  type: \"image\" | \"audio\" | \"video\" | \"document\";\n  source: InputContentSource;\n  filename?: string;\n  className?: string;\n}\n\nconst ImageAttachment = memo(function ImageAttachment({\n  src,\n  className,\n}: {\n  src: string;\n  className?: string;\n}) {\n  const [error, setError] = useState(false);\n\n  if (error) {\n    return (\n      <div\n        className={`copilotKitImageRendering copilotKitImageRenderingError ${className ?? \"\"}`}\n      >\n        <div className=\"copilotKitImageRenderingErrorMessage\">\n          Failed to load image\n        </div>\n      </div>\n    );\n  }\n\n  return (\n    <div className={`copilotKitImageRendering ${className ?? \"\"}`}>\n      <img\n        src={src}\n        alt=\"Image attachment\"\n        className=\"copilotKitImageRenderingImage\"\n        onError={() => setError(true)}\n      />\n    </div>\n  );\n});\n\nconst AudioAttachment = memo(function AudioAttachment({\n  src,\n  filename,\n  className,\n}: {\n  src: string;\n  filename?: string;\n  className?: string;\n}) {\n  return (\n    <div\n      className={`copilotKitAttachment copilotKitAttachmentAudio ${className ?? \"\"}`}\n    >\n      <audio src={src} controls preload=\"metadata\" />\n      {filename && (\n        <span className=\"copilotKitAttachmentFilename\">{filename}</span>\n      )}\n    </div>\n  );\n});\n\nconst VideoAttachment = memo(function VideoAttachment({\n  src,\n  className,\n}: {\n  src: string;\n  className?: string;\n}) {\n  return (\n    <div\n      className={`copilotKitAttachment copilotKitAttachmentVideo ${className ?? \"\"}`}\n    >\n      <video src={src} controls preload=\"metadata\" />\n    </div>\n  );\n});\n\nconst DocumentAttachment = memo(function DocumentAttachment({\n  source,\n  filename,\n  className,\n}: {\n  source: InputContentSource;\n  filename?: string;\n  className?: string;\n}) {\n  return (\n    <div\n      className={`copilotKitAttachment copilotKitAttachmentDocument ${className ?? \"\"}`}\n    >\n      <div className=\"copilotKitAttachmentDocIcon\">\n        {getDocumentIcon(source.mimeType ?? \"\")}\n      </div>\n      <div className=\"copilotKitAttachmentDocInfo\">\n        <span className=\"copilotKitAttachmentDocName\">\n          {filename || source.mimeType || \"Unknown type\"}\n        </span>\n      </div>\n    </div>\n  );\n});\n\nexport const AttachmentRenderer: React.FC<AttachmentRendererProps> = ({\n  type,\n  source,\n  filename,\n  className,\n}) => {\n  const src = getSourceUrl(source);\n\n  switch (type) {\n    case \"image\":\n      return <ImageAttachment src={src} className={className} />;\n    case \"audio\":\n      return (\n        <AudioAttachment src={src} filename={filename} className={className} />\n      );\n    case \"video\":\n      return <VideoAttachment src={src} className={className} />;\n    case \"document\":\n      return (\n        <DocumentAttachment\n          source={source}\n          filename={filename}\n          className={className}\n        />\n      );\n  }\n};\n","import { UserMessageProps } from \"../props\";\nimport { AttachmentRenderer } from \"../AttachmentRenderer\";\n\ntype UserMessageContent = NonNullable<UserMessageProps[\"message\"]>[\"content\"];\n\nconst getTextContent = (\n  content: UserMessageContent | undefined,\n): string | undefined => {\n  if (typeof content === \"undefined\") {\n    return undefined;\n  }\n\n  if (typeof content === \"string\") {\n    return content;\n  }\n\n  return (\n    content\n      .map((part) => {\n        if (part.type === \"text\") {\n          return part.text;\n        }\n        return undefined;\n      })\n      .filter(\n        (value): value is string =>\n          typeof value === \"string\" && value.length > 0,\n      )\n      .join(\" \")\n      .trim() || undefined\n  );\n};\n\nconst getMediaParts = (content: UserMessageContent | undefined) => {\n  if (!content || typeof content === \"string\") return [];\n\n  return content.filter(\n    (part) =>\n      part.type === \"image\" ||\n      part.type === \"audio\" ||\n      part.type === \"video\" ||\n      part.type === \"document\",\n  ) as Array<{\n    type: \"image\" | \"audio\" | \"video\" | \"document\";\n    source:\n      | { type: \"data\"; value: string; mimeType: string }\n      | { type: \"url\"; value: string; mimeType?: string };\n  }>;\n};\n\nexport const UserMessage = (props: UserMessageProps) => {\n  const { message, ImageRenderer } = props;\n  const content = message?.content;\n\n  // Legacy path: old-style image field on message\n  const isLegacyImageMessage =\n    message && \"image\" in message && Boolean((message as any).image);\n\n  if (isLegacyImageMessage) {\n    const legacyImage = (message as any).image;\n    const textContent = getTextContent(content);\n    return (\n      <div className=\"copilotKitMessage copilotKitUserMessage\">\n        <ImageRenderer image={legacyImage} content={textContent} />\n      </div>\n    );\n  }\n\n  const textContent = getTextContent(content);\n  const mediaParts = getMediaParts(content);\n\n  if (mediaParts.length === 0) {\n    return (\n      <div className=\"copilotKitMessage copilotKitUserMessage\">\n        {textContent}\n      </div>\n    );\n  }\n\n  return (\n    <div className=\"copilotKitMessage copilotKitUserMessage\">\n      {textContent && <div>{textContent}</div>}\n      {mediaParts.map((part, index) => (\n        <AttachmentRenderer key={index} type={part.type} source={part.source} />\n      ))}\n    </div>\n  );\n};\n","import * as React from \"react\";\n\nexport interface useCopyToClipboardProps {\n  timeout?: number;\n}\n\nexport function useCopyToClipboard({\n  timeout = 2000,\n}: useCopyToClipboardProps) {\n  const [isCopied, setIsCopied] = React.useState<boolean>(false);\n\n  const copyToClipboard = (value: string) => {\n    if (typeof window === \"undefined\" || !navigator.clipboard?.writeText) {\n      return;\n    }\n\n    if (!value) {\n      return;\n    }\n\n    navigator.clipboard.writeText(value).then(() => {\n      setIsCopied(true);\n\n      setTimeout(() => {\n        setIsCopied(false);\n      }, timeout);\n    });\n  };\n\n  return { isCopied, copyToClipboard };\n}\n","import { FC, memo, useEffect, useState } from \"react\";\nimport { Prism, Light } from \"react-syntax-highlighter\";\nimport { useCopyToClipboard } from \"../../hooks/use-copy-to-clipboard\";\nimport { CheckIcon, CopyIcon, DownloadIcon } from \"./Icons\";\n\ninterface CodeActionButtonProps {\n  onClick: () => void;\n  children: React.ReactNode;\n}\n\ninterface Props {\n  language: string;\n  value: string;\n}\n\ninterface languageMap {\n  [key: string]: string | undefined;\n}\n\nexport const programmingLanguages: languageMap = {\n  javascript: \".js\",\n  python: \".py\",\n  java: \".java\",\n  c: \".c\",\n  cpp: \".cpp\",\n  \"c++\": \".cpp\",\n  \"c#\": \".cs\",\n  ruby: \".rb\",\n  php: \".php\",\n  swift: \".swift\",\n  \"objective-c\": \".m\",\n  kotlin: \".kt\",\n  typescript: \".ts\",\n  go: \".go\",\n  perl: \".pl\",\n  rust: \".rs\",\n  scala: \".scala\",\n  haskell: \".hs\",\n  lua: \".lua\",\n  shell: \".sh\",\n  sql: \".sql\",\n  html: \".html\",\n  css: \".css\",\n  // add more file extensions here, make sure the key is same as language prop in CodeBlock.tsx component\n};\n\nexport const generateRandomString = (length: number, lowercase = false) => {\n  const chars = \"ABCDEFGHJKLMNPQRSTUVWXY3456789\"; // excluding similar looking characters like Z, 2, I, 1, O, 0\n  let result = \"\";\n  for (let i = 0; i < length; i++) {\n    result += chars.charAt(Math.floor(Math.random() * chars.length));\n  }\n  return lowercase ? result.toLowerCase() : result;\n};\n\nconst CodeBlock: FC<Props> = memo(({ language, value }) => {\n  const { isCopied, copyToClipboard } = useCopyToClipboard({ timeout: 2000 });\n  const [SyntaxHighlighter, setSyntaxHighlighter] = useState<\n    typeof Light | typeof Prism\n  >(() => Light);\n\n  useEffect(() => {\n    try {\n      new RegExp(\"(?<=#)\\\\w+\");\n      setSyntaxHighlighter(() => Prism);\n    } catch {\n      setSyntaxHighlighter(() => Light);\n    }\n  }, []);\n\n  const downloadAsFile = () => {\n    if (typeof window === \"undefined\") {\n      return;\n    }\n    const fileExtension = programmingLanguages[language] || \".file\";\n    const suggestedFileName = `file-${generateRandomString(3, true)}${fileExtension}`;\n    const fileName = window.prompt(\"Enter file name\", suggestedFileName);\n\n    if (!fileName) {\n      // User pressed cancel on prompt.\n      return;\n    }\n\n    const blob = new Blob([value], { type: \"text/plain\" });\n    const url = URL.createObjectURL(blob);\n    const link = document.createElement(\"a\");\n    link.download = fileName;\n    link.href = url;\n    link.style.display = \"none\";\n    document.body.appendChild(link);\n    link.click();\n    document.body.removeChild(link);\n    URL.revokeObjectURL(url);\n  };\n\n  const onCopy = () => {\n    if (isCopied) return;\n    copyToClipboard(value);\n  };\n\n  return (\n    <div className=\"copilotKitCodeBlock\">\n      <div className=\"copilotKitCodeBlockToolbar\">\n        <span className=\"copilotKitCodeBlockToolbarLanguage\">{language}</span>\n        <div className=\"copilotKitCodeBlockToolbarButtons\">\n          <button\n            className=\"copilotKitCodeBlockToolbarButton\"\n            onClick={downloadAsFile}\n          >\n            {DownloadIcon}\n          </button>\n          <button className=\"copilotKitCodeBlockToolbarButton\" onClick={onCopy}>\n            {isCopied ? CheckIcon : CopyIcon}\n          </button>\n        </div>\n      </div>\n      <SyntaxHighlighter\n        language={language}\n        style={highlightStyle}\n        PreTag=\"div\"\n        customStyle={{\n          margin: 0,\n          borderBottomLeftRadius: \"0.375rem\",\n          borderBottomRightRadius: \"0.375rem\",\n        }}\n      >\n        {value}\n      </SyntaxHighlighter>\n    </div>\n  );\n});\nCodeBlock.displayName = \"CodeBlock\";\n\nexport { CodeBlock };\n\n// import { vscDarkPlus as highlightStyle } from \"react-syntax-highlighter/dist/esm/styles/prism\";\n// As a workaround, we inline the vscDarkPlus from react-syntax-highlighter.\n// Importing it as recommended in the documentation leads to build errors in the non app router\n// (Next.js classic) setup.\nconst highlightStyle: any = {\n  'pre[class*=\"language-\"]': {\n    color: \"#d4d4d4\",\n    fontSize: \"13px\",\n    textShadow: \"none\",\n    fontFamily:\n      'Menlo, Monaco, Consolas, \"Andale Mono\", \"Ubuntu Mono\", \"Courier New\", monospace',\n    direction: \"ltr\",\n    textAlign: \"left\",\n    whiteSpace: \"pre\",\n    wordSpacing: \"normal\",\n    wordBreak: \"normal\",\n    lineHeight: \"1.5\",\n    MozTabSize: \"4\",\n    OTabSize: \"4\",\n    tabSize: \"4\",\n    WebkitHyphens: \"none\",\n    MozHyphens: \"none\",\n    msHyphens: \"none\",\n    hyphens: \"none\",\n    padding: \"1em\",\n    margin: \".5em 0\",\n    overflow: \"auto\",\n    background: \"#1e1e1e\",\n  },\n  'code[class*=\"language-\"]': {\n    color: \"#d4d4d4\",\n    fontSize: \"13px\",\n    textShadow: \"none\",\n    fontFamily:\n      'Menlo, Monaco, Consolas, \"Andale Mono\", \"Ubuntu Mono\", \"Courier New\", monospace',\n    direction: \"ltr\",\n    textAlign: \"left\",\n    whiteSpace: \"pre\",\n    wordSpacing: \"normal\",\n    wordBreak: \"normal\",\n    lineHeight: \"1.5\",\n    MozTabSize: \"4\",\n    OTabSize: \"4\",\n    tabSize: \"4\",\n    WebkitHyphens: \"none\",\n    MozHyphens: \"none\",\n    msHyphens: \"none\",\n    hyphens: \"none\",\n  },\n  'pre[class*=\"language-\"]::selection': {\n    textShadow: \"none\",\n    background: \"#264F78\",\n  },\n  'code[class*=\"language-\"]::selection': {\n    textShadow: \"none\",\n    background: \"#264F78\",\n  },\n  'pre[class*=\"language-\"] *::selection': {\n    textShadow: \"none\",\n    background: \"#264F78\",\n  },\n  'code[class*=\"language-\"] *::selection': {\n    textShadow: \"none\",\n    background: \"#264F78\",\n  },\n  ':not(pre) > code[class*=\"language-\"]': {\n    padding: \".1em .3em\",\n    borderRadius: \".3em\",\n    color: \"#db4c69\",\n    background: \"#1e1e1e\",\n  },\n  \".namespace\": {\n    Opacity: \".7\",\n  },\n  \"doctype.doctype-tag\": {\n    color: \"#569CD6\",\n  },\n  \"doctype.name\": {\n    color: \"#9cdcfe\",\n  },\n  comment: {\n    color: \"#6a9955\",\n  },\n  prolog: {\n    color: \"#6a9955\",\n  },\n  punctuation: {\n    color: \"#d4d4d4\",\n  },\n  \".language-html .language-css .token.punctuation\": {\n    color: \"#d4d4d4\",\n  },\n  \".language-html .language-javascript .token.punctuation\": {\n    color: \"#d4d4d4\",\n  },\n  property: {\n    color: \"#9cdcfe\",\n  },\n  tag: {\n    color: \"#569cd6\",\n  },\n  boolean: {\n    color: \"#569cd6\",\n  },\n  number: {\n    color: \"#b5cea8\",\n  },\n  constant: {\n    color: \"#9cdcfe\",\n  },\n  symbol: {\n    color: \"#b5cea8\",\n  },\n  inserted: {\n    color: \"#b5cea8\",\n  },\n  unit: {\n    color: \"#b5cea8\",\n  },\n  selector: {\n    color: \"#d7ba7d\",\n  },\n  \"attr-name\": {\n    color: \"#9cdcfe\",\n  },\n  string: {\n    color: \"#ce9178\",\n  },\n  char: {\n    color: \"#ce9178\",\n  },\n  builtin: {\n    color: \"#ce9178\",\n  },\n  deleted: {\n    color: \"#ce9178\",\n  },\n  \".language-css .token.string.url\": {\n    textDecoration: \"underline\",\n  },\n  operator: {\n    color: \"#d4d4d4\",\n  },\n  entity: {\n    color: \"#569cd6\",\n  },\n  \"operator.arrow\": {\n    color: \"#569CD6\",\n  },\n  atrule: {\n    color: \"#ce9178\",\n  },\n  \"atrule.rule\": {\n    color: \"#c586c0\",\n  },\n  \"atrule.url\": {\n    color: \"#9cdcfe\",\n  },\n  \"atrule.url.function\": {\n    color: \"#dcdcaa\",\n  },\n  \"atrule.url.punctuation\": {\n    color: \"#d4d4d4\",\n  },\n  keyword: {\n    color: \"#569CD6\",\n  },\n  \"keyword.module\": {\n    color: \"#c586c0\",\n  },\n  \"keyword.control-flow\": {\n    color: \"#c586c0\",\n  },\n  function: {\n    color: \"#dcdcaa\",\n  },\n  \"function.maybe-class-name\": {\n    color: \"#dcdcaa\",\n  },\n  regex: {\n    color: \"#d16969\",\n  },\n  important: {\n    color: \"#569cd6\",\n  },\n  italic: {\n    fontStyle: \"italic\",\n  },\n  \"class-name\": {\n    color: \"#4ec9b0\",\n  },\n  \"maybe-class-name\": {\n    color: \"#4ec9b0\",\n  },\n  console: {\n    color: \"#9cdcfe\",\n  },\n  parameter: {\n    color: \"#9cdcfe\",\n  },\n  interpolation: {\n    color: \"#9cdcfe\",\n  },\n  \"punctuation.interpolation-punctuation\": {\n    color: \"#569cd6\",\n  },\n  variable: {\n    color: \"#9cdcfe\",\n  },\n  \"imports.maybe-class-name\": {\n    color: \"#9cdcfe\",\n  },\n  \"exports.maybe-class-name\": {\n    color: \"#9cdcfe\",\n  },\n  escape: {\n    color: \"#d7ba7d\",\n  },\n  \"tag.punctuation\": {\n    color: \"#808080\",\n  },\n  cdata: {\n    color: \"#808080\",\n  },\n  \"attr-value\": {\n    color: \"#ce9178\",\n  },\n  \"attr-value.punctuation\": {\n    color: \"#ce9178\",\n  },\n  \"attr-value.punctuation.attr-equals\": {\n    color: \"#d4d4d4\",\n  },\n  namespace: {\n    color: \"#4ec9b0\",\n  },\n  'pre[class*=\"language-javascript\"]': {\n    color: \"#9cdcfe\",\n  },\n  'code[class*=\"language-javascript\"]': {\n    color: \"#9cdcfe\",\n  },\n  'pre[class*=\"language-jsx\"]': {\n    color: \"#9cdcfe\",\n  },\n  'code[class*=\"language-jsx\"]': {\n    color: \"#9cdcfe\",\n  },\n  'pre[class*=\"language-typescript\"]': {\n    color: \"#9cdcfe\",\n  },\n  'code[class*=\"language-typescript\"]': {\n    color: \"#9cdcfe\",\n  },\n  'pre[class*=\"language-tsx\"]': {\n    color: \"#9cdcfe\",\n  },\n  'code[class*=\"language-tsx\"]': {\n    color: \"#9cdcfe\",\n  },\n  'pre[class*=\"language-css\"]': {\n    color: \"#ce9178\",\n  },\n  'code[class*=\"language-css\"]': {\n    color: \"#ce9178\",\n  },\n  'pre[class*=\"language-html\"]': {\n    color: \"#d4d4d4\",\n  },\n  'code[class*=\"language-html\"]': {\n    color: \"#d4d4d4\",\n  },\n  \".language-regex .token.anchor\": {\n    color: \"#dcdcaa\",\n  },\n  \".language-html .token.punctuation\": {\n    color: \"#808080\",\n  },\n  'pre[class*=\"language-\"] > code[class*=\"language-\"]': {\n    position: \"relative\",\n    zIndex: \"1\",\n  },\n  \".line-highlight.line-highlight\": {\n    background: \"#f7ebc6\",\n    boxShadow: \"inset 5px 0 0 #f7d87c\",\n    zIndex: \"0\",\n  },\n};\n","import { FC, memo, useMemo } from \"react\";\nimport ReactMarkdown, { Options, Components } from \"react-markdown\";\nimport { CodeBlock } from \"./CodeBlock\";\nimport remarkGfm from \"remark-gfm\";\nimport remarkMath from \"remark-math\";\nimport rehypeRaw from \"rehype-raw\";\n\nconst defaultComponents: Components = {\n  a({ children, ...props }) {\n    return (\n      <a\n        className=\"copilotKitMarkdownElement\"\n        {...props}\n        target=\"_blank\"\n        rel=\"noopener noreferrer\"\n      >\n        {children}\n      </a>\n    );\n  },\n  // @ts-expect-error -- inline\n  code({ children, className, inline, ...props }) {\n    if (Array.isArray(children) && children.length) {\n      if (children[0] == \"▍\") {\n        return (\n          <span\n            style={{\n              animation: \"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite\",\n              marginTop: \"0.25rem\",\n            }}\n          >\n            ▍\n          </span>\n        );\n      }\n\n      children[0] = (children?.[0] as string).replace(\"`▍`\", \"▍\");\n    }\n\n    const match = /language-(\\w+)/.exec(className || \"\");\n\n    // Detect inline code: if it has a language class or contains newlines, it's likely a code block\n    // Otherwise, treat it as inline code\n    const hasLanguage = match && match[1];\n    const content = String(children);\n    const hasNewlines = content.includes(\"\\n\");\n    const isInline = !hasLanguage && !hasNewlines;\n\n    if (isInline) {\n      return (\n        <code\n          className={`copilotKitMarkdownElement copilotKitInlineCode ${className || \"\"}`}\n          {...props}\n        >\n          {children}\n        </code>\n      );\n    }\n\n    return (\n      <CodeBlock\n        language={(match && match[1]) || \"\"}\n        value={String(children).replace(/\\n$/, \"\")}\n        {...props}\n      />\n    );\n  },\n  h1: ({ children, ...props }) => (\n    <h1 className=\"copilotKitMarkdownElement\" {...props}>\n      {children}\n    </h1>\n  ),\n  h2: ({ children, ...props }) => (\n    <h2 className=\"copilotKitMarkdownElement\" {...props}>\n      {children}\n    </h2>\n  ),\n  h3: ({ children, ...props }) => (\n    <h3 className=\"copilotKitMarkdownElement\" {...props}>\n      {children}\n    </h3>\n  ),\n  h4: ({ children, ...props }) => (\n    <h4 className=\"copilotKitMarkdownElement\" {...props}>\n      {children}\n    </h4>\n  ),\n  h5: ({ children, ...props }) => (\n    <h5 className=\"copilotKitMarkdownElement\" {...props}>\n      {children}\n    </h5>\n  ),\n  h6: ({ children, ...props }) => (\n    <h6 className=\"copilotKitMarkdownElement\" {...props}>\n      {children}\n    </h6>\n  ),\n  p: ({ children, ...props }) => (\n    <div className=\"copilotKitMarkdownElement copilotKitParagraph\" {...props}>\n      {children}\n    </div>\n  ),\n  pre: ({ children, ...props }) => (\n    <pre className=\"copilotKitMarkdownElement\" {...props}>\n      {children}\n    </pre>\n  ),\n  blockquote: ({ children, ...props }) => (\n    <blockquote className=\"copilotKitMarkdownElement\" {...props}>\n      {children}\n    </blockquote>\n  ),\n  ul: ({ children, ...props }) => (\n    <ul className=\"copilotKitMarkdownElement\" {...props}>\n      {children}\n    </ul>\n  ),\n  li: ({ children, ...props }) => (\n    <li className=\"copilotKitMarkdownElement\" {...props}>\n      {children}\n    </li>\n  ),\n};\n\nconst MemoizedReactMarkdown: FC<Options> = memo(ReactMarkdown);\n\ntype MarkdownProps = Omit<Options, \"children\"> & {\n  content: string;\n};\n\nexport const Markdown = ({\n  content,\n  components,\n  remarkPlugins,\n  rehypePlugins,\n  ...rest\n}: MarkdownProps) => {\n  const mergedComponents = useMemo(\n    () => ({ ...defaultComponents, ...components }),\n    [components],\n  );\n  const mergedRemarkPlugins = useMemo<Options[\"remarkPlugins\"]>(\n    () => [\n      remarkGfm,\n      [remarkMath, { singleDollarTextMath: false }],\n      ...(remarkPlugins ?? []),\n    ],\n    [remarkPlugins],\n  );\n  const mergedRehypePlugins = useMemo<Options[\"rehypePlugins\"]>(\n    () => [rehypeRaw, ...(rehypePlugins ?? [])],\n    [rehypePlugins],\n  );\n  return (\n    <div className=\"copilotKitMarkdown\">\n      <MemoizedReactMarkdown\n        {...rest}\n        components={mergedComponents}\n        remarkPlugins={mergedRemarkPlugins}\n        rehypePlugins={mergedRehypePlugins}\n      >\n        {content}\n      </MemoizedReactMarkdown>\n    </div>\n  );\n};\n","import { AssistantMessageProps } from \"../props\";\nimport { useChatContext } from \"../ChatContext\";\nimport { Markdown } from \"../Markdown\";\nimport { useState } from \"react\";\nimport React from \"react\";\nimport { copyToClipboard } from \"@copilotkit/shared\";\n\nexport const AssistantMessage = (props: AssistantMessageProps) => {\n  const { icons, labels } = useChatContext();\n  const {\n    message,\n    isLoading,\n    onRegenerate,\n    onCopy,\n    onThumbsUp,\n    onThumbsDown,\n    isCurrentMessage,\n    feedback,\n    markdownTagRenderers,\n  } = props;\n  const [copied, setCopied] = useState(false);\n\n  const handleCopy = async () => {\n    const content = message?.content || \"\";\n    if (!content) return;\n\n    const success = await copyToClipboard(content);\n    if (success) {\n      setCopied(true);\n      if (onCopy) onCopy(content);\n      setTimeout(() => setCopied(false), 2000);\n    }\n  };\n\n  const handleRegenerate = () => {\n    if (onRegenerate) onRegenerate();\n  };\n\n  const handleThumbsUp = () => {\n    if (onThumbsUp && message) {\n      onThumbsUp(message);\n    }\n  };\n\n  const handleThumbsDown = () => {\n    if (onThumbsDown && message) {\n      onThumbsDown(message);\n    }\n  };\n\n  const LoadingIcon = () => <span>{icons.activityIcon}</span>;\n  const content = message?.content || \"\";\n  const subComponent = message?.generativeUI?.() ?? props.subComponent;\n  const subComponentPosition = message?.generativeUIPosition ?? \"after\";\n  const renderBefore = subComponent && subComponentPosition === \"before\";\n  const renderAfter = subComponent && subComponentPosition !== \"before\";\n\n  return (\n    <>\n      {renderBefore ? (\n        <div style={{ marginBottom: \"0.5rem\" }}>{subComponent}</div>\n      ) : null}\n      {content && (\n        <div className=\"copilotKitMessage copilotKitAssistantMessage\">\n          {content && (\n            <Markdown content={content} components={markdownTagRenderers} />\n          )}\n\n          {content && !isLoading && (\n            <div\n              className={`copilotKitMessageControls ${isCurrentMessage ? \"currentMessage\" : \"\"}`}\n            >\n              <button\n                className=\"copilotKitMessageControlButton\"\n                onClick={handleRegenerate}\n                aria-label={labels.regenerateResponse}\n                title={labels.regenerateResponse}\n              >\n                {icons.regenerateIcon}\n              </button>\n              <button\n                className=\"copilotKitMessageControlButton\"\n                onClick={handleCopy}\n                aria-label={labels.copyToClipboard}\n                title={labels.copyToClipboard}\n              >\n                {copied ? (\n                  <span style={{ fontSize: \"10px\", fontWeight: \"bold\" }}>\n                    ✓\n                  </span>\n                ) : (\n                  icons.copyIcon\n                )}\n              </button>\n              {onThumbsUp && (\n                <button\n                  className={`copilotKitMessageControlButton ${\n                    feedback === \"thumbsUp\" ? \"active\" : \"\"\n                  }`}\n                  onClick={handleThumbsUp}\n                  aria-label={labels.thumbsUp}\n                  title={labels.thumbsUp}\n                >\n                  {icons.thumbsUpIcon}\n                </button>\n              )}\n              {onThumbsDown && (\n                <button\n                  className={`copilotKitMessageControlButton ${\n                    feedback === \"thumbsDown\" ? \"active\" : \"\"\n                  }`}\n                  onClick={handleThumbsDown}\n                  aria-label={labels.thumbsDown}\n                  title={labels.thumbsDown}\n                >\n                  {icons.thumbsDownIcon}\n                </button>\n              )}\n            </div>\n          )}\n        </div>\n      )}\n      {renderAfter ? (\n        <div style={{ marginBottom: \"0.5rem\" }}>{subComponent}</div>\n      ) : null}\n      {isLoading && <LoadingIcon />}\n    </>\n  );\n};\n","import React, { useState } from \"react\";\nimport { ImageRendererProps } from \"../props\";\n\n/**\n * @deprecated Use `CopilotChatAttachmentRenderer` from `@copilotkit/react-core/v2` instead.\n * `ImageRenderer` only handles images. The v2 attachment renderer supports images, audio, video, and documents.\n * See https://docs.copilotkit.ai/migration-guides/migrate-attachments\n * @since 1.56.0\n */\nexport const ImageRenderer: React.FC<ImageRendererProps> = ({\n  image,\n  source,\n  content,\n  className = \"\",\n}) => {\n  const [imageError, setImageError] = useState(false);\n\n  // Determine image src from either legacy ImageData or new InputContentSource\n  let imageSrc: string;\n  if (source) {\n    imageSrc =\n      source.type === \"url\"\n        ? source.value\n        : `data:${source.mimeType};base64,${source.value}`;\n  } else if (image) {\n    imageSrc = `data:image/${image.format};base64,${image.bytes}`;\n  } else {\n    return null;\n  }\n\n  const altText = content || \"User uploaded image\";\n\n  if (imageError) {\n    return (\n      <div\n        className={`copilotKitImageRendering copilotKitImageRenderingError ${className}`}\n      >\n        <div className=\"copilotKitImageRenderingErrorMessage\">\n          Failed to load image\n        </div>\n        {content && (\n          <div className=\"copilotKitImageRenderingContent\">{content}</div>\n        )}\n      </div>\n    );\n  }\n\n  return (\n    <div className={`copilotKitImageRendering ${className}`}>\n      <img\n        src={imageSrc}\n        alt={altText}\n        className=\"copilotKitImageRenderingImage\"\n        onError={() => setImageError(true)}\n      />\n      {content && (\n        <div className=\"copilotKitImageRenderingContent\">{content}</div>\n      )}\n    </div>\n  );\n};\n","import { RenderMessageProps } from \"../props\";\nimport { UserMessage as DefaultUserMessage } from \"./UserMessage\";\nimport { AssistantMessage as DefaultAssistantMessage } from \"./AssistantMessage\";\nimport { ImageRenderer as DefaultImageRenderer } from \"./ImageRenderer\";\n\nexport function RenderMessage({\n  UserMessage = DefaultUserMessage,\n  AssistantMessage = DefaultAssistantMessage,\n  ImageRenderer = DefaultImageRenderer,\n  ...props\n}: RenderMessageProps) {\n  const {\n    message,\n    messages,\n    inProgress,\n    index,\n    isCurrentMessage,\n    onRegenerate,\n    onCopy,\n    onThumbsUp,\n    onThumbsDown,\n    messageFeedback,\n    markdownTagRenderers,\n  } = props;\n\n  switch (message.role) {\n    case \"user\":\n      return (\n        <UserMessage\n          key={index}\n          rawData={message}\n          data-message-role=\"user\"\n          message={message}\n          ImageRenderer={ImageRenderer}\n        />\n      );\n    case \"assistant\":\n      return (\n        <AssistantMessage\n          key={index}\n          data-message-role=\"assistant\"\n          subComponent={message.generativeUI?.()}\n          rawData={message}\n          message={message}\n          messages={messages}\n          isLoading={inProgress && isCurrentMessage && !message.content}\n          isGenerating={inProgress && isCurrentMessage && !!message.content}\n          isCurrentMessage={isCurrentMessage}\n          onRegenerate={() => onRegenerate?.(message.id)}\n          onCopy={onCopy}\n          onThumbsUp={onThumbsUp}\n          onThumbsDown={onThumbsDown}\n          feedback={messageFeedback?.[message.id] || null}\n          markdownTagRenderers={markdownTagRenderers}\n          ImageRenderer={ImageRenderer}\n        />\n      );\n    default:\n      return null;\n  }\n}\n","import React from \"react\";\nimport { RenderMessageProps } from \"../props\";\nimport { RenderMessage as DefaultRenderMessage } from \"./RenderMessage\";\nimport { aguiToGQL } from \"@copilotkit/runtime-client-gql\";\n\n/**\n * Legacy message render props interface for backwards compatibility\n */\nexport interface LegacyRenderProps {\n  RenderTextMessage?: React.ComponentType<RenderMessageProps>;\n  RenderActionExecutionMessage?: React.ComponentType<RenderMessageProps>;\n  RenderAgentStateMessage?: React.ComponentType<RenderMessageProps>;\n  RenderResultMessage?: React.ComponentType<RenderMessageProps>;\n  RenderImageMessage?: React.ComponentType<RenderMessageProps>;\n}\n\n/**\n * Props for the LegacyRenderMessage component\n */\nexport interface LegacyRenderMessageProps extends RenderMessageProps {\n  legacyProps: LegacyRenderProps;\n}\n\n/**\n * Legacy message adapter component that maps old render props to new message types.\n * This component provides backwards compatibility for the deprecated render props.\n */\nexport const LegacyRenderMessage: React.FC<LegacyRenderMessageProps> = ({\n  message,\n  messages,\n  inProgress,\n  index,\n  isCurrentMessage,\n  actionResult,\n  AssistantMessage,\n  UserMessage,\n  ImageRenderer,\n  onRegenerate,\n  onCopy,\n  onThumbsUp,\n  onThumbsDown,\n  markdownTagRenderers,\n  legacyProps,\n}) => {\n  const {\n    RenderTextMessage,\n    RenderActionExecutionMessage,\n    RenderAgentStateMessage,\n    RenderResultMessage,\n    RenderImageMessage,\n  } = legacyProps;\n\n  const deprecatedMessage = aguiToGQL(message)[0] ?? undefined;\n\n  // Route to appropriate legacy renderer based on message type\n  if (deprecatedMessage.isTextMessage() && RenderTextMessage) {\n    return (\n      <RenderTextMessage\n        message={message}\n        messages={messages}\n        inProgress={inProgress}\n        index={index}\n        isCurrentMessage={isCurrentMessage}\n        AssistantMessage={AssistantMessage}\n        UserMessage={UserMessage}\n        onRegenerate={onRegenerate}\n        onCopy={onCopy}\n        onThumbsUp={onThumbsUp}\n        onThumbsDown={onThumbsDown}\n        markdownTagRenderers={markdownTagRenderers}\n      />\n    );\n  }\n\n  if (\n    deprecatedMessage.isActionExecutionMessage() &&\n    RenderActionExecutionMessage\n  ) {\n    return (\n      <RenderActionExecutionMessage\n        messages={messages}\n        message={message}\n        inProgress={inProgress}\n        index={index}\n        isCurrentMessage={isCurrentMessage}\n        actionResult={actionResult}\n        AssistantMessage={AssistantMessage}\n        UserMessage={UserMessage}\n      />\n    );\n  }\n\n  if (deprecatedMessage.isAgentStateMessage() && RenderAgentStateMessage) {\n    return (\n      <RenderAgentStateMessage\n        messages={messages}\n        message={message}\n        inProgress={inProgress}\n        index={index}\n        isCurrentMessage={isCurrentMessage}\n        AssistantMessage={AssistantMessage}\n        UserMessage={UserMessage}\n      />\n    );\n  }\n\n  if (deprecatedMessage.isResultMessage() && RenderResultMessage) {\n    return (\n      <RenderResultMessage\n        messages={messages}\n        message={message}\n        inProgress={inProgress}\n        index={index}\n        isCurrentMessage={isCurrentMessage}\n        AssistantMessage={AssistantMessage}\n        UserMessage={UserMessage}\n      />\n    );\n  }\n\n  if (deprecatedMessage.isImageMessage() && RenderImageMessage) {\n    return (\n      <RenderImageMessage\n        messages={messages}\n        message={message}\n        inProgress={inProgress}\n        index={index}\n        isCurrentMessage={isCurrentMessage}\n        AssistantMessage={AssistantMessage}\n        UserMessage={UserMessage}\n      />\n    );\n  }\n\n  // Fallback to default RenderMessage for any unhandled cases\n  return (\n    <DefaultRenderMessage\n      messages={messages}\n      message={message}\n      inProgress={inProgress}\n      index={index}\n      isCurrentMessage={isCurrentMessage}\n      AssistantMessage={AssistantMessage}\n      UserMessage={UserMessage}\n      ImageRenderer={ImageRenderer}\n      onRegenerate={onRegenerate}\n      onCopy={onCopy}\n      onThumbsUp={onThumbsUp}\n      onThumbsDown={onThumbsDown}\n      markdownTagRenderers={markdownTagRenderers}\n    />\n  );\n};\n","import React, { useEffect, useMemo, useRef } from \"react\";\nimport { MessagesProps } from \"./props\";\nimport { useChatContext } from \"./ChatContext\";\nimport { Message } from \"@copilotkit/shared\";\nimport { useCopilotChatInternal } from \"@copilotkit/react-core\";\nimport {\n  LegacyRenderMessage,\n  LegacyRenderProps,\n} from \"./messages/LegacyRenderMessage\";\n\nexport const Messages = ({\n  inProgress,\n  children,\n  RenderMessage,\n  AssistantMessage,\n  UserMessage,\n  ErrorMessage,\n  ImageRenderer,\n  onRegenerate,\n  onCopy,\n  onThumbsUp,\n  onThumbsDown,\n  messageFeedback,\n  markdownTagRenderers,\n  chatError,\n\n  // Legacy props\n  RenderTextMessage,\n  RenderActionExecutionMessage,\n  RenderAgentStateMessage,\n  RenderResultMessage,\n  RenderImageMessage,\n}: MessagesProps) => {\n  const { labels, icons } = useChatContext();\n  const { messages: visibleMessages, interrupt } = useCopilotChatInternal();\n  const initialMessages = useMemo(\n    () => makeInitialMessages(labels.initial),\n    [labels.initial],\n  );\n  const messages = [...initialMessages, ...visibleMessages];\n  const { messagesContainerRef, messagesEndRef } = useScrollToBottom(messages);\n\n  // Check if any legacy props are provided\n  const hasLegacyProps = !!(\n    RenderTextMessage ||\n    RenderActionExecutionMessage ||\n    RenderAgentStateMessage ||\n    RenderResultMessage ||\n    RenderImageMessage\n  );\n\n  // Show deprecation warning if legacy props are used\n  useEffect(() => {\n    if (hasLegacyProps) {\n      console.warn(\n        \"[CopilotKit] Legacy message render props (RenderTextMessage, RenderActionExecutionMessage, etc.) are deprecated. \" +\n          \"Please use the unified 'RenderMessage' prop instead. \" +\n          \"See migration guide: https://docs.copilotkit.ai/migration/render-message\",\n      );\n    }\n  }, [hasLegacyProps]);\n\n  // Create legacy props object for the adapter\n  const legacyProps: LegacyRenderProps = useMemo(\n    () => ({\n      RenderTextMessage,\n      RenderActionExecutionMessage,\n      RenderAgentStateMessage,\n      RenderResultMessage,\n      RenderImageMessage,\n    }),\n    [\n      RenderTextMessage,\n      RenderActionExecutionMessage,\n      RenderAgentStateMessage,\n      RenderResultMessage,\n      RenderImageMessage,\n    ],\n  );\n\n  // Determine which render component to use\n  const MessageRenderer = hasLegacyProps\n    ? (props: any) => (\n        <LegacyRenderMessage {...props} legacyProps={legacyProps} />\n      )\n    : RenderMessage;\n\n  const LoadingIcon = () => <span>{icons.activityIcon}</span>;\n\n  return (\n    <div className=\"copilotKitMessages\" ref={messagesContainerRef}>\n      <div className=\"copilotKitMessagesContainer\">\n        {messages.map((message, index) => {\n          const isCurrentMessage = index === messages.length - 1;\n          return (\n            <MessageRenderer\n              key={index}\n              message={message}\n              messages={messages}\n              inProgress={inProgress}\n              index={index}\n              isCurrentMessage={isCurrentMessage}\n              AssistantMessage={AssistantMessage}\n              UserMessage={UserMessage}\n              ImageRenderer={ImageRenderer}\n              onRegenerate={onRegenerate}\n              onCopy={onCopy}\n              onThumbsUp={onThumbsUp}\n              onThumbsDown={onThumbsDown}\n              messageFeedback={messageFeedback}\n              markdownTagRenderers={markdownTagRenderers}\n            />\n          );\n        })}\n        {inProgress &&\n          (messages[messages.length - 1]?.role === \"user\" ||\n            messages[messages.length - 1]?.role === \"tool\") && <LoadingIcon />}\n        {interrupt}\n        {chatError && ErrorMessage && (\n          <ErrorMessage error={chatError} isCurrentMessage />\n        )}\n      </div>\n      <footer className=\"copilotKitMessagesFooter\" ref={messagesEndRef}>\n        {children}\n      </footer>\n    </div>\n  );\n};\n\nfunction makeInitialMessages(\n  initial: string | string[] | undefined,\n): Message[] {\n  if (!initial) return [];\n\n  if (Array.isArray(initial)) {\n    return initial.map((message) => {\n      return {\n        id: message,\n        role: \"assistant\",\n        content: message,\n      };\n    });\n  }\n\n  return [\n    {\n      id: initial,\n      role: \"assistant\",\n      content: initial,\n    },\n  ];\n}\n\nexport function useScrollToBottom(messages: Message[]) {\n  const messagesEndRef = useRef<HTMLDivElement>(null);\n  const messagesContainerRef = useRef<HTMLDivElement | null>(null);\n  const isProgrammaticScrollRef = useRef(false);\n  const isUserScrollUpRef = useRef(false);\n\n  const scrollToBottom = () => {\n    if (messagesContainerRef.current && messagesEndRef.current) {\n      isProgrammaticScrollRef.current = true;\n      messagesContainerRef.current.scrollTop =\n        messagesContainerRef.current.scrollHeight;\n    }\n  };\n\n  const handleScroll = () => {\n    if (isProgrammaticScrollRef.current) {\n      isProgrammaticScrollRef.current = false;\n      return;\n    }\n\n    if (messagesContainerRef.current) {\n      const { scrollTop, scrollHeight, clientHeight } =\n        messagesContainerRef.current;\n      isUserScrollUpRef.current = scrollTop + clientHeight < scrollHeight;\n    }\n  };\n\n  useEffect(() => {\n    const container = messagesContainerRef.current;\n    if (container) {\n      container.addEventListener(\"scroll\", handleScroll);\n    }\n    return () => {\n      if (container) {\n        container.removeEventListener(\"scroll\", handleScroll);\n      }\n    };\n  }, []);\n\n  useEffect(() => {\n    const container = messagesContainerRef.current;\n    if (!container) {\n      return;\n    }\n\n    const mutationObserver = new MutationObserver(() => {\n      if (!isUserScrollUpRef.current) {\n        scrollToBottom();\n      }\n    });\n\n    mutationObserver.observe(container, {\n      childList: true,\n      subtree: true,\n      characterData: true,\n    });\n\n    return () => {\n      mutationObserver.disconnect();\n    };\n  }, []);\n\n  useEffect(() => {\n    isUserScrollUpRef.current = false;\n    scrollToBottom();\n  }, [messages.filter((m) => m.role === \"user\").length]);\n\n  return { messagesEndRef, messagesContainerRef };\n}\n","import React, {\n  useState,\n  useRef,\n  useEffect,\n  forwardRef,\n  useImperativeHandle,\n} from \"react\";\n\ninterface AutoResizingTextareaProps {\n  maxRows?: number;\n  placeholder?: string;\n  value: string;\n  onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n  onKeyDown?: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;\n  onCompositionStart?: () => void;\n  onCompositionEnd?: () => void;\n  autoFocus?: boolean;\n}\n\nconst AutoResizingTextarea = forwardRef<\n  HTMLTextAreaElement,\n  AutoResizingTextareaProps\n>(\n  (\n    {\n      maxRows = 1,\n      placeholder,\n      value,\n      onChange,\n      onKeyDown,\n      onCompositionStart,\n      onCompositionEnd,\n      autoFocus,\n    },\n    ref,\n  ) => {\n    const internalTextareaRef = useRef<HTMLTextAreaElement>(null);\n    const [maxHeight, setMaxHeight] = useState<number>(0);\n\n    useImperativeHandle(\n      ref,\n      () => internalTextareaRef.current as HTMLTextAreaElement,\n    );\n\n    useEffect(() => {\n      const calculateMaxHeight = () => {\n        const textarea = internalTextareaRef.current;\n        if (textarea) {\n          textarea.style.height = \"auto\";\n          const singleRowHeight = textarea.scrollHeight;\n          setMaxHeight(singleRowHeight * maxRows);\n          if (autoFocus) {\n            textarea.focus();\n          }\n        }\n      };\n\n      calculateMaxHeight();\n    }, [maxRows]);\n\n    useEffect(() => {\n      const textarea = internalTextareaRef.current;\n      if (textarea) {\n        textarea.style.height = \"auto\";\n        textarea.style.height = `${Math.min(textarea.scrollHeight, maxHeight)}px`;\n      }\n    }, [value, maxHeight]);\n\n    return (\n      <textarea\n        ref={internalTextareaRef}\n        value={value}\n        onChange={onChange}\n        onKeyDown={onKeyDown}\n        onCompositionStart={onCompositionStart}\n        onCompositionEnd={onCompositionEnd}\n        placeholder={placeholder}\n        style={{\n          overflow: \"auto\",\n          resize: \"none\",\n          maxHeight: `${maxHeight}px`,\n        }}\n        rows={1}\n      />\n    );\n  },\n);\n\nexport default AutoResizingTextarea;\n","import {\n  useCopilotContext,\n  useCopilotMessagesContext,\n} from \"@copilotkit/react-core\";\nimport { gqlToAGUI } from \"@copilotkit/runtime-client-gql\";\nimport { Message } from \"@copilotkit/shared\";\nimport { MutableRefObject, useEffect, useRef, useState } from \"react\";\n\nexport const checkMicrophonePermission = async () => {\n  try {\n    const permissionStatus = await navigator.permissions.query({\n      name: \"microphone\" as PermissionName,\n    });\n    if (permissionStatus.state === \"granted\") {\n      return true;\n    } else {\n      return false;\n    }\n  } catch (err) {\n    console.error(\"Error checking microphone permission\", err);\n  }\n};\n\nexport const requestMicAndPlaybackPermission = async () => {\n  try {\n    const stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n    const audioContext = new window.AudioContext();\n    await audioContext.resume();\n    return { stream, audioContext };\n  } catch (err) {\n    console.error(\"Error requesting microphone and playback permissions\", err);\n    return null;\n  }\n};\n\nconst startRecording = async (\n  mediaStreamRef: MutableRefObject<MediaStream | null>,\n  mediaRecorderRef: MutableRefObject<MediaRecorder | null>,\n  audioContextRef: MutableRefObject<AudioContext | null>,\n  recordedChunks: Blob[],\n  onStop: () => void,\n) => {\n  if (!mediaStreamRef.current || !audioContextRef.current) {\n    mediaStreamRef.current = await navigator.mediaDevices.getUserMedia({\n      audio: true,\n    });\n    audioContextRef.current = new window.AudioContext();\n    await audioContextRef.current.resume();\n  }\n\n  mediaRecorderRef.current = new MediaRecorder(mediaStreamRef.current!);\n  mediaRecorderRef.current.start(1000);\n  mediaRecorderRef.current.ondataavailable = (event) => {\n    recordedChunks.push(event.data);\n  };\n  mediaRecorderRef.current.onstop = onStop;\n};\n\nconst stopRecording = (\n  mediaRecorderRef: MutableRefObject<MediaRecorder | null>,\n  mediaStreamRef?: MutableRefObject<MediaStream | null>,\n) => {\n  if (\n    mediaRecorderRef.current &&\n    mediaRecorderRef.current.state !== \"inactive\"\n  ) {\n    mediaRecorderRef.current.stop();\n  }\n  // Release microphone tracks to free the device\n  if (mediaStreamRef?.current) {\n    mediaStreamRef.current.getTracks().forEach((track) => track.stop());\n    mediaStreamRef.current = null;\n  }\n};\n\nconst transcribeAudio = async (\n  recordedChunks: Blob[],\n  transcribeAudioUrl: string,\n  mediaType: string = \"audio/mp4\",\n) => {\n  const extension = mediaType.split(\"/\")[1] || \"mp4\";\n  const completeBlob = new Blob(recordedChunks, { type: mediaType });\n  const formData = new FormData();\n  formData.append(\"file\", completeBlob, `recording.${extension}`);\n\n  const response = await fetch(transcribeAudioUrl, {\n    method: \"POST\",\n    body: formData,\n  });\n\n  if (!response.ok) {\n    throw new Error(`Error: ${response.statusText}`);\n  }\n\n  const transcription = await response.json();\n  return transcription.text;\n};\n\nconst playAudioResponse = (\n  text: string,\n  textToSpeechUrl: string,\n  audioContext: AudioContext,\n) => {\n  const encodedText = encodeURIComponent(text);\n  const url = `${textToSpeechUrl}?text=${encodedText}`;\n\n  fetch(url)\n    .then((response) => response.arrayBuffer())\n    .then((arrayBuffer) => audioContext.decodeAudioData(arrayBuffer))\n    .then((audioBuffer) => {\n      const source = audioContext.createBufferSource();\n      source.buffer = audioBuffer;\n      source.connect(audioContext.destination);\n      source.start(0);\n    })\n    .catch((error) => {\n      console.error(\"Error with decoding audio data\", error);\n    });\n};\n\nexport type PushToTalkState = \"idle\" | \"recording\" | \"transcribing\";\n\nexport type SendFunction = (text: string) => Promise<Message | void>;\n\nexport const usePushToTalk = ({\n  sendFunction,\n  inProgress,\n  mediaType = \"audio/mp4\",\n}: {\n  sendFunction: SendFunction;\n  inProgress: boolean;\n  mediaType?: string;\n}) => {\n  const [pushToTalkState, setPushToTalkState] =\n    useState<PushToTalkState>(\"idle\");\n  const mediaStreamRef = useRef<MediaStream | null>(null);\n  const audioContextRef = useRef<AudioContext | null>(null);\n  const mediaRecorderRef = useRef<MediaRecorder | null>(null);\n  const recordedChunks = useRef<Blob[]>([]);\n  const generalContext = useCopilotContext();\n  const messagesContext = useCopilotMessagesContext();\n  const context = { ...generalContext, ...messagesContext };\n  const [startReadingFromMessageId, setStartReadingFromMessageId] = useState<\n    string | null\n  >(null);\n\n  useEffect(() => {\n    if (pushToTalkState === \"recording\") {\n      startRecording(\n        mediaStreamRef,\n        mediaRecorderRef,\n        audioContextRef,\n        recordedChunks.current,\n        () => {\n          setPushToTalkState(\"transcribing\");\n        },\n      );\n    } else {\n      stopRecording(mediaRecorderRef, mediaStreamRef);\n      if (pushToTalkState === \"transcribing\") {\n        transcribeAudio(\n          recordedChunks.current,\n          context.copilotApiConfig.transcribeAudioUrl!,\n          mediaType,\n        ).then(async (transcription) => {\n          recordedChunks.current = [];\n          setPushToTalkState(\"idle\");\n          const message = await sendFunction(transcription);\n          if (message) {\n            setStartReadingFromMessageId(message.id);\n          }\n        });\n      }\n    }\n\n    return () => {\n      stopRecording(mediaRecorderRef, mediaStreamRef);\n    };\n  }, [pushToTalkState]);\n\n  useEffect(() => {\n    if (inProgress === false && startReadingFromMessageId) {\n      const lastMessageIndex = context.messages.findIndex(\n        (message) => message.id === startReadingFromMessageId,\n      );\n\n      const aguiMessages = gqlToAGUI(context.messages);\n\n      const messagesAfterLast = aguiMessages\n        .slice(lastMessageIndex + 1)\n        .filter((message) => message.role === \"assistant\");\n\n      const text = messagesAfterLast\n        .map((message) => message.content)\n        .join(\"\\n\");\n      playAudioResponse(\n        text,\n        context.copilotApiConfig.textToSpeechUrl!,\n        audioContextRef.current!,\n      );\n\n      setStartReadingFromMessageId(null);\n    }\n  }, [startReadingFromMessageId, inProgress]);\n\n  return { pushToTalkState, setPushToTalkState };\n};\n","export const useDarkMode = () => {\n  if (typeof window === \"undefined\") return false;\n  return (\n    document.documentElement.classList.contains(\"dark\") ||\n    document.body.classList.contains(\"dark\") ||\n    document.documentElement.getAttribute(\"data-theme\") === \"dark\" ||\n    document.body.getAttribute(\"data-theme\") === \"dark\" ||\n    window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n  );\n};\n","import React, { useState, useEffect } from \"react\";\nimport { useDarkMode } from \"../../hooks/use-dark-mode\";\n\nexport function PoweredByTag({\n  showPoweredBy = true,\n  removeBranding = false,\n}: {\n  showPoweredBy?: boolean;\n  removeBranding?: boolean;\n}) {\n  const [mounted, setMounted] = useState(false);\n  const isDark = useDarkMode();\n\n  /*\n    note(tylerslaton):\n\n    Ensure we only use the isDark computed value after client-side mount.\n    This prevents hydration mismatches by using a default color on the\n    server and initial client render, then updating to the correct\n    dark mode color after hydration is complete.\n  */\n  useEffect(() => {\n    setMounted(true);\n  }, []);\n\n  if (!showPoweredBy || removeBranding) {\n    return null;\n  }\n\n  const poweredByStyle = {\n    visibility: \"visible\",\n    display: \"block\",\n    position: \"static\",\n    textAlign: \"center\",\n    fontSize: \"12px\",\n    padding: \"3px 0\",\n    color: mounted && isDark ? \"rgb(69, 69, 69)\" : \"rgb(214, 214, 214)\",\n  };\n\n  return (\n    <div>\n      {/*@ts-expect-error -- expecting position not to be a string, but it can be.*/}\n      <p className=\"poweredBy\" style={poweredByStyle}>\n        Powered by CopilotKit\n      </p>\n    </div>\n  );\n}\n","import React, { useMemo, useRef, useState } from \"react\";\nimport { InputProps } from \"./props\";\nimport { useChatContext } from \"./ChatContext\";\nimport AutoResizingTextarea from \"./Textarea\";\nimport { usePushToTalk } from \"../../hooks/use-push-to-talk\";\nimport {\n  useCopilotContext,\n  useCopilotChatInternal,\n} from \"@copilotkit/react-core\";\nimport { PoweredByTag } from \"./PoweredByTag\";\n\nconst MAX_NEWLINES = 6;\n\nexport const Input = ({\n  inProgress,\n  onSend,\n  chatReady = false,\n  onStop,\n  onUpload,\n  hideStopButton = false,\n}: InputProps) => {\n  const context = useChatContext();\n  const copilotContext = useCopilotContext();\n\n  const showPoweredBy = !copilotContext.copilotApiConfig?.publicApiKey;\n\n  const pushToTalkConfigured =\n    copilotContext.copilotApiConfig.textToSpeechUrl !== undefined &&\n    copilotContext.copilotApiConfig.transcribeAudioUrl !== undefined;\n\n  const textareaRef = useRef<HTMLTextAreaElement>(null);\n  const [isComposing, setIsComposing] = useState(false);\n\n  const handleDivClick = (event: React.MouseEvent<HTMLDivElement>) => {\n    const target = event.target as HTMLElement;\n\n    // If the user clicked a button or inside a button, don't focus the textarea\n    if (target.closest(\"button\")) return;\n\n    // If the user clicked the textarea, do nothing (it's already focused)\n    if (target.tagName === \"TEXTAREA\") return;\n\n    // Otherwise, focus the textarea\n    textareaRef.current?.focus();\n  };\n\n  const [text, setText] = useState(\"\");\n  const send = () => {\n    if (inProgress) return;\n    onSend(text);\n    setText(\"\");\n\n    textareaRef.current?.focus();\n  };\n\n  // tylerslaton:\n  //\n  // This scrolls CopilotKit into view always. Reading the commit history, it was likely\n  // added to fix a bug but it is causing issues now.\n  //\n  // For the future, if we want this behavior again, we will need to find a way to do it without\n  // forcing CopilotKit to always be in view. This code causes this because focusing an element\n  // in most browsers will scroll that element into view.\n  //\n  // useEffect(() => {\n  //   if (isVisible) {\n  //     textareaRef.current?.focus();\n  //   }\n  // }, [isVisible]);\n\n  const { pushToTalkState, setPushToTalkState } = usePushToTalk({\n    sendFunction: onSend,\n    inProgress,\n  });\n\n  const isInProgress = inProgress || pushToTalkState === \"transcribing\";\n  const { buttonIcon, buttonAlt } = useMemo(() => {\n    if (!chatReady)\n      return { buttonIcon: context.icons.spinnerIcon, buttonAlt: \"Loading\" };\n    return isInProgress && !hideStopButton && chatReady\n      ? { buttonIcon: context.icons.stopIcon, buttonAlt: \"Stop\" }\n      : { buttonIcon: context.icons.sendIcon, buttonAlt: \"Send\" };\n  }, [\n    isInProgress,\n    chatReady,\n    hideStopButton,\n    context.icons.stopIcon,\n    context.icons.sendIcon,\n  ]);\n  const showPushToTalk =\n    pushToTalkConfigured &&\n    (pushToTalkState === \"idle\" || pushToTalkState === \"recording\") &&\n    !inProgress;\n\n  const { interrupt } = useCopilotChatInternal();\n\n  const canSend = useMemo(() => {\n    return (\n      !isInProgress &&\n      text.trim().length > 0 &&\n      pushToTalkState === \"idle\" &&\n      !interrupt\n    );\n  }, [interrupt, isInProgress, text, pushToTalkState]);\n\n  const canStop = useMemo(() => {\n    return isInProgress && !hideStopButton;\n  }, [isInProgress, hideStopButton]);\n\n  const sendDisabled = !canSend && !canStop;\n\n  return (\n    <div\n      className={`copilotKitInputContainer ${showPoweredBy ? \"poweredByContainer\" : \"\"}`}\n    >\n      <div className=\"copilotKitInput\" onClick={handleDivClick}>\n        <AutoResizingTextarea\n          ref={textareaRef}\n          placeholder={context.labels.placeholder}\n          autoFocus={false}\n          maxRows={MAX_NEWLINES}\n          value={text}\n          onChange={(event) => setText(event.target.value)}\n          onCompositionStart={() => setIsComposing(true)}\n          onCompositionEnd={() => setIsComposing(false)}\n          onKeyDown={(event) => {\n            if (event.key === \"Enter\" && !event.shiftKey && !isComposing) {\n              event.preventDefault();\n              if (canSend) {\n                send();\n              }\n            }\n          }}\n        />\n        <div className=\"copilotKitInputControls\">\n          {onUpload && (\n            <button onClick={onUpload} className=\"copilotKitInputControlButton\">\n              {context.icons.uploadIcon}\n            </button>\n          )}\n\n          <div style={{ flexGrow: 1 }} />\n\n          {showPushToTalk && (\n            <button\n              onClick={() =>\n                setPushToTalkState(\n                  pushToTalkState === \"idle\" ? \"recording\" : \"transcribing\",\n                )\n              }\n              className={\n                pushToTalkState === \"recording\"\n                  ? \"copilotKitInputControlButton copilotKitPushToTalkRecording\"\n                  : \"copilotKitInputControlButton\"\n              }\n            >\n              {context.icons.pushToTalkIcon}\n            </button>\n          )}\n          <button\n            disabled={sendDisabled}\n            onClick={isInProgress && !hideStopButton ? onStop : send}\n            data-copilotkit-in-progress={inProgress}\n            data-test-id={\n              inProgress\n                ? \"copilot-chat-request-in-progress\"\n                : \"copilot-chat-ready\"\n            }\n            className=\"copilotKitInputControlButton\"\n            aria-label={buttonAlt}\n          >\n            {buttonIcon}\n          </button>\n        </div>\n      </div>\n      <PoweredByTag showPoweredBy={showPoweredBy} />\n    </div>\n  );\n};\n","import React from \"react\";\nimport type { Attachment } from \"./props\";\nimport {\n  formatFileSize,\n  getSourceUrl,\n  getDocumentIcon,\n} from \"@copilotkit/shared\";\n\ninterface AttachmentQueueProps {\n  attachments: Attachment[];\n  onRemoveAttachment: (id: string) => void;\n  className?: string;\n}\n\nexport const AttachmentQueue: React.FC<AttachmentQueueProps> = ({\n  attachments,\n  onRemoveAttachment,\n  className = \"\",\n}) => {\n  if (attachments.length === 0) return null;\n\n  return (\n    <div className={`copilotKitAttachmentQueue ${className}`}>\n      {attachments.map((attachment) => (\n        <div\n          key={attachment.id}\n          className={`copilotKitAttachmentQueueItem copilotKitAttachmentQueueItem--${attachment.type}`}\n        >\n          {attachment.status === \"uploading\" && (\n            <div className=\"copilotKitAttachmentQueueOverlay\">\n              <div className=\"copilotKitAttachmentQueueSpinner\" />\n            </div>\n          )}\n          <AttachmentPreview attachment={attachment} />\n          <button\n            onClick={() => onRemoveAttachment(attachment.id)}\n            className=\"copilotKitAttachmentQueueRemoveButton\"\n            aria-label=\"Remove attachment\"\n          >\n            ✕\n          </button>\n        </div>\n      ))}\n    </div>\n  );\n};\n\nfunction AttachmentPreview({ attachment }: { attachment: Attachment }) {\n  if (attachment.status === \"uploading\") {\n    return <div className=\"copilotKitAttachmentQueuePreviewPlaceholder\" />;\n  }\n\n  const src = getSourceUrl(attachment.source);\n\n  switch (attachment.type) {\n    case \"image\":\n      return (\n        <img\n          src={src}\n          alt={attachment.filename || \"Image attachment\"}\n          className=\"copilotKitAttachmentQueuePreviewImage\"\n        />\n      );\n\n    case \"audio\":\n      return (\n        <div className=\"copilotKitAttachmentQueuePreviewAudio\">\n          <audio src={src} controls preload=\"metadata\" />\n          {attachment.filename && (\n            <span className=\"copilotKitAttachmentQueueFilename\">\n              {attachment.filename}\n            </span>\n          )}\n        </div>\n      );\n\n    case \"video\":\n      return (\n        <div className=\"copilotKitAttachmentQueuePreviewVideo\">\n          {attachment.thumbnail ? (\n            <img\n              src={attachment.thumbnail}\n              alt={attachment.filename || \"Video thumbnail\"}\n              className=\"copilotKitAttachmentQueuePreviewImage\"\n            />\n          ) : (\n            <video\n              src={src}\n              preload=\"metadata\"\n              muted\n              className=\"copilotKitAttachmentQueuePreviewImage\"\n            />\n          )}\n        </div>\n      );\n\n    case \"document\":\n      return (\n        <div className=\"copilotKitAttachmentQueuePreviewDocument\">\n          <div className=\"copilotKitAttachmentQueueDocIcon\">\n            {getDocumentIcon(attachment.source.mimeType ?? \"\")}\n          </div>\n          <div className=\"copilotKitAttachmentQueueDocInfo\">\n            <span className=\"copilotKitAttachmentQueueFilename\">\n              {attachment.filename || \"Document\"}\n            </span>\n            {attachment.size != null && (\n              <span className=\"copilotKitAttachmentQueueFileSize\">\n                {formatFileSize(attachment.size)}\n              </span>\n            )}\n          </div>\n        </div>\n      );\n  }\n}\n\n/**\n * @deprecated Use `AttachmentQueue` from `@copilotkit/react-ui` instead.\n * `ImageUploadQueue` only displayed image previews. `AttachmentQueue` supports\n * images, audio, video, and documents.\n * See https://docs.copilotkit.ai/migration-guides/migrate-attachments\n * @since 1.56.0\n */\nexport { AttachmentQueue as ImageUploadQueue };\n","// Re-export utilities from shared\nexport {\n  getModalityFromMimeType,\n  formatFileSize,\n  exceedsMaxSize,\n  readFileAsBase64,\n  generateVideoThumbnail,\n  matchesAcceptFilter,\n} from \"@copilotkit/shared\";\n\n// Deprecation warning helpers — react-ui specific\nconst suppressedWarnings = new Set<string>();\nlet globalSuppress = false;\n\n/**\n * Issue a deprecation warning once per key per session.\n * Suppressed entirely if the user calls suppressDeprecationWarnings().\n */\nexport function deprecationWarning(key: string, message: string) {\n  if (globalSuppress || suppressedWarnings.has(key)) return;\n  if (typeof process !== \"undefined\" && process.env?.NODE_ENV === \"production\")\n    return;\n  suppressedWarnings.add(key);\n  console.warn(`[CopilotKit] Deprecation: ${message}`);\n}\n\n/**\n * Suppress all CopilotKit deprecation warnings.\n */\nexport function suppressDeprecationWarnings() {\n  globalSuppress = true;\n}\n","import { useCopilotChatInternal } from \"@copilotkit/react-core\";\nimport { SmallSpinnerIcon } from \"./Icons\";\n\ninterface SuggestionsProps {\n  title: string;\n  message: string;\n  partial?: boolean;\n  className?: string;\n  onClick: () => void;\n}\n\nexport function Suggestion({\n  title,\n  onClick,\n  partial,\n  className,\n}: SuggestionsProps) {\n  const { isLoading } = useCopilotChatInternal();\n  if (!title) return null;\n\n  return (\n    <button\n      disabled={partial || isLoading}\n      onClick={(e) => {\n        e.preventDefault();\n        onClick();\n      }}\n      className={`suggestion ${className ?? \"\"} ${partial ? \"loading\" : \"\"}`}\n      data-test-id=\"suggestion\"\n      type=\"button\"\n    >\n      {partial ? SmallSpinnerIcon : <span>{title}</span>}\n    </button>\n  );\n}\n","import { Suggestion } from \"./Suggestion\";\nimport { RenderSuggestionsListProps } from \"./props\";\n\nexport function Suggestions({\n  suggestions,\n  onSuggestionClick,\n  isLoading,\n}: RenderSuggestionsListProps) {\n  return (\n    <div className=\"suggestions\">\n      {suggestions.map((suggestion, index) => (\n        <Suggestion\n          key={index}\n          title={suggestion.title}\n          message={suggestion.message}\n          partial={suggestion.isLoading ?? suggestion.partial ?? isLoading}\n          className={suggestion.className}\n          onClick={() => onSuggestionClick(suggestion.message)}\n        />\n      ))}\n    </div>\n  );\n}\n","/**\n * <br/>\n * <img src=\"https://cdn.copilotkit.ai/docs/copilotkit/images/CopilotChat.gif\" width=\"500\" />\n *\n * A chatbot panel component for the CopilotKit framework. The component allows for a high degree\n * of customization through various props and custom CSS.\n *\n * ## Install Dependencies\n *\n * This component is part of the [@copilotkit/react-ui](https://npmjs.com/package/@copilotkit/react-ui) package.\n *\n * ```shell npm2yarn \\\"@copilotkit/react-ui\"\\\n * npm install @copilotkit/react-core @copilotkit/react-ui\n * ```\n *\n * ## Usage\n *\n * ```tsx\n * import { CopilotChat } from \"@copilotkit/react-ui\";\n * import \"@copilotkit/react-ui/styles.css\";\n *\n * <CopilotChat\n *   labels={{\n *     title: \"Your Assistant\",\n *     initial: \"Hi! 👋 How can I assist you today?\",\n *   }}\n * />\n * ```\n *\n * ### With Observability Hooks\n *\n * To monitor user interactions, provide the `observabilityHooks` prop.\n * **Note:** This requires a `publicApiKey` in the `<CopilotKit>` provider.\n *\n * ```tsx\n * <CopilotKit publicApiKey=\"YOUR_PUBLIC_API_KEY\">\n *   <CopilotChat\n *     observabilityHooks={{\n *       onMessageSent: (message) => {\n *         console.log(\"Message sent:\", message);\n *       },\n *     }}\n *   />\n * </CopilotKit>\n * ```\n *\n * ### Look & Feel\n *\n * By default, CopilotKit components do not have any styles. You can import CopilotKit's stylesheet at the root of your project:\n * ```tsx title=\"YourRootComponent.tsx\"\n * ...\n * import \"@copilotkit/react-ui/styles.css\"; // [!code highlight]\n *\n * export function YourRootComponent() {\n *   return (\n *     <CopilotKit>\n *       ...\n *     </CopilotKit>\n *   );\n * }\n * ```\n * For more information about how to customize the styles, check out the [Customize Look & Feel](/guides/custom-look-and-feel/customize-built-in-ui-components) guide.\n */\n\nimport {\n  ChatContext,\n  ChatContextProvider,\n  CopilotChatIcons,\n  CopilotChatLabels,\n} from \"./ChatContext\";\nimport { Messages as DefaultMessages } from \"./Messages\";\nimport { Input as DefaultInput } from \"./Input\";\nimport { RenderMessage as DefaultRenderMessage } from \"./messages/RenderMessage\";\nimport { AssistantMessage as DefaultAssistantMessage } from \"./messages/AssistantMessage\";\nimport { UserMessage as DefaultUserMessage } from \"./messages/UserMessage\";\nimport { ImageRenderer as DefaultImageRenderer } from \"./messages/ImageRenderer\";\nimport React, { useEffect, useRef, useState, useCallback } from \"react\";\nimport {\n  SystemMessageFunction,\n  useCopilotContext,\n  useCopilotChatInternal,\n  type OnStopGeneration,\n  type OnReloadMessages,\n  type ChatSuggestions,\n} from \"@copilotkit/react-core\";\nimport {\n  CopilotKitError,\n  CopilotKitErrorCode,\n  CopilotErrorEvent,\n  Message,\n  Severity,\n  ErrorVisibility,\n  styledConsole,\n  CopilotErrorHandler,\n  randomUUID,\n} from \"@copilotkit/shared\";\nimport {\n  AssistantMessageProps,\n  ChatError,\n  ComponentsMap,\n  CopilotObservabilityHooks,\n  ErrorMessageProps,\n  ImageRendererProps,\n  InputProps,\n  MessagesProps,\n  RenderMessageProps,\n  RenderSuggestionsListProps,\n  UserMessageProps,\n} from \"./props\";\n\nimport { AttachmentQueue } from \"./AttachmentQueue\";\nimport type { Attachment, AttachmentsConfig } from \"./props\";\nimport {\n  getModalityFromMimeType,\n  exceedsMaxSize,\n  readFileAsBase64,\n  generateVideoThumbnail,\n  matchesAcceptFilter,\n  formatFileSize,\n  deprecationWarning,\n} from \"./attachment-utils\";\nimport type { InputContent } from \"@copilotkit/shared\";\nimport { Suggestions as DefaultRenderSuggestionsList } from \"./Suggestions\";\n\n/**\n * Props for CopilotChat component.\n */\nexport interface CopilotChatProps {\n  /**\n   * Custom instructions to be added to the system message. Use this property to\n   * provide additional context or guidance to the language model, influencing\n   * its responses. These instructions can include specific directions,\n   * preferences, or criteria that the model should consider when generating\n   * its output, thereby tailoring the conversation more precisely to the\n   * user's needs or the application's requirements.\n   */\n  instructions?: string;\n\n  /**\n   * Controls the behavior of suggestions in the chat interface.\n   *\n   * `auto` (default) - Suggestions are generated automatically:\n   *   - When the chat is first opened (empty state)\n   *   - After each message exchange completes\n   *   - Uses configuration from `useCopilotChatSuggestions` hooks\n   *\n   * `manual` - Suggestions are controlled programmatically:\n   *   - Use `setSuggestions()` to set custom suggestions\n   *   - Use `generateSuggestions()` to trigger AI generation\n   *   - Access via `useCopilotChat` hook\n   *\n   * `SuggestionItem[]` - Static suggestions array:\n   *   - Always shows the same suggestions\n   *   - No AI generation involved\n   */\n  suggestions?: ChatSuggestions;\n\n  /**\n   * A callback that gets called when the in progress state changes.\n   */\n  onInProgress?: (inProgress: boolean) => void;\n\n  /**\n   * A callback that gets called when a new message it submitted.\n   */\n  onSubmitMessage?: (message: string) => void | Promise<void>;\n\n  /**\n   * A custom stop generation function.\n   */\n  onStopGeneration?: OnStopGeneration;\n\n  /**\n   * A custom reload messages function.\n   */\n  onReloadMessages?: OnReloadMessages;\n\n  /**\n   * A callback function to regenerate the assistant's response\n   */\n  onRegenerate?: (messageId: string) => void;\n\n  /**\n   * A callback function when the message is copied\n   */\n  onCopy?: (message: string) => void;\n\n  /**\n   * A callback function for thumbs up feedback\n   */\n  onThumbsUp?: (message: Message) => void;\n\n  /**\n   * A callback function for thumbs down feedback\n   */\n  onThumbsDown?: (message: Message) => void;\n\n  /**\n   * A list of markdown components to render in assistant message.\n   * Useful when you want to render custom elements in the message (e.g a reference tag element)\n   */\n  markdownTagRenderers?: ComponentsMap;\n\n  /**\n   * Icons can be used to set custom icons for the chat window.\n   */\n  icons?: CopilotChatIcons;\n\n  /**\n   * Labels can be used to set custom labels for the chat window.\n   */\n  labels?: CopilotChatLabels;\n\n  /**\n   * @deprecated Use `attachments={{ enabled: true }}` instead.\n   * `imageUploadsEnabled` only supports images. The new `attachments` prop supports\n   * images, audio, video, and documents.\n   * See https://docs.copilotkit.ai/migration-guides/migrate-attachments\n   * @since 1.56.0\n   *\n   * Enable image upload button (image inputs only supported on some models)\n   */\n  imageUploadsEnabled?: boolean;\n\n  /**\n   * @deprecated Use `attachments={{ enabled: true, accept: \"...\" }}` instead.\n   * The `accept` field on the `attachments` prop replaces `inputFileAccept`.\n   * See https://docs.copilotkit.ai/migration-guides/migrate-attachments\n   * @since 1.56.0\n   *\n   * The 'accept' attribute for the file input used for image uploads.\n   * Defaults to \"image/*\".\n   */\n  inputFileAccept?: string;\n\n  /**\n   * Configuration for file attachments in the chat input.\n   * Enables users to attach images, audio, video, and documents.\n   *\n   * @example\n   * ```tsx\n   * <CopilotChat\n   *   attachments={{\n   *     enabled: true,\n   *     accept: \"image/*,application/pdf\",\n   *     maxSize: 10 * 1024 * 1024, // 10MB\n   *     onUpload: async (file) => {\n   *       const url = await uploadToS3(file);\n   *       return { url, mimeType: file.type };\n   *     },\n   *   }}\n   * />\n   * ```\n   */\n  attachments?: AttachmentsConfig;\n\n  /**\n   * A function that takes in context string and instructions and returns\n   * the system message to include in the chat request.\n   * Use this to completely override the system message, when providing\n   * instructions is not enough.\n   */\n  makeSystemMessage?: SystemMessageFunction;\n\n  /**\n   * Disables inclusion of CopilotKit’s default system message. When true, no system message is sent (this also suppresses any custom message from <code>makeSystemMessage</code>).\n   */\n  disableSystemMessage?: boolean;\n\n  /**\n   * A custom assistant message component to use instead of the default.\n   */\n  AssistantMessage?: React.ComponentType<AssistantMessageProps>;\n\n  /**\n   * A custom user message component to use instead of the default.\n   */\n  UserMessage?: React.ComponentType<UserMessageProps>;\n\n  /**\n   * A custom error message component to use instead of the default.\n   */\n  ErrorMessage?: React.ComponentType<ErrorMessageProps>;\n\n  /**\n   * A custom Messages component to use instead of the default.\n   */\n  Messages?: React.ComponentType<MessagesProps>;\n\n  /**\n   * @deprecated - use RenderMessage instead\n   */\n  RenderTextMessage?: React.ComponentType<RenderMessageProps>;\n\n  /**\n   * @deprecated - use RenderMessage instead\n   */\n  RenderActionExecutionMessage?: React.ComponentType<RenderMessageProps>;\n\n  /**\n   * @deprecated - use RenderMessage instead\n   */\n  RenderAgentStateMessage?: React.ComponentType<RenderMessageProps>;\n\n  /**\n   * @deprecated - use RenderMessage instead\n   */\n  RenderResultMessage?: React.ComponentType<RenderMessageProps>;\n\n  /**\n   * @deprecated - use RenderMessage instead\n   */\n  RenderImageMessage?: React.ComponentType<RenderMessageProps>;\n\n  /**\n   * A custom RenderMessage component to use instead of the default.\n   *\n   * **Warning**: This is a break-glass solution to allow for custom\n   * rendering of messages. You are most likely looking to swap out\n   * the AssistantMessage and UserMessage components instead which\n   * are also props.\n   */\n  RenderMessage?: React.ComponentType<RenderMessageProps>;\n\n  /**\n   * A custom suggestions list component to use instead of the default.\n   */\n  RenderSuggestionsList?: React.ComponentType<RenderSuggestionsListProps>;\n\n  /**\n   * A custom Input component to use instead of the default.\n   */\n  Input?: React.ComponentType<InputProps>;\n\n  /**\n   * @deprecated Use the v2 `CopilotChat` attachment system instead.\n   * See https://docs.copilotkit.ai/migration-guides/migrate-attachments\n   *\n   * A custom image rendering component to use instead of the default.\n   */\n  ImageRenderer?: React.ComponentType<ImageRendererProps>;\n\n  /**\n   * A class name to apply to the root element.\n   */\n  className?: string;\n\n  /**\n   * Children to render.\n   */\n  children?: React.ReactNode;\n\n  hideStopButton?: boolean;\n\n  /**\n   * Event hooks for CopilotKit chat events.\n   * These hooks only work when publicApiKey is provided.\n   */\n  observabilityHooks?: CopilotObservabilityHooks;\n\n  /**\n   * Custom error renderer for chat-specific errors.\n   * When provided, errors will be displayed inline within the chat interface.\n   */\n  renderError?: (error: {\n    message: string;\n    operation?: string;\n    timestamp: number;\n    onDismiss: () => void;\n    onRetry?: () => void;\n  }) => React.ReactNode;\n\n  /**\n   * Optional handler for comprehensive debugging and observability.\n   */\n  onError?: CopilotErrorHandler;\n}\n\n/**\n * @deprecated Use the `Attachment` type from `@copilotkit/react-ui` instead.\n * `ImageUpload` only described image payloads. `Attachment` supports images,\n * audio, video, and documents.\n * See https://docs.copilotkit.ai/migration-guides/migrate-attachments\n * @since 1.56.0\n */\nexport type ImageUpload = {\n  contentType: string;\n  bytes: string;\n};\n\nexport function CopilotChat({\n  instructions,\n  suggestions = \"auto\",\n  onSubmitMessage,\n  makeSystemMessage,\n  disableSystemMessage,\n  onInProgress,\n  onStopGeneration,\n  onReloadMessages,\n  onRegenerate,\n  onCopy,\n  onThumbsUp,\n  onThumbsDown,\n  markdownTagRenderers,\n  Messages = DefaultMessages,\n  RenderMessage = DefaultRenderMessage,\n  RenderSuggestionsList = DefaultRenderSuggestionsList,\n  Input = DefaultInput,\n  className,\n  icons,\n  labels,\n  AssistantMessage = DefaultAssistantMessage,\n  UserMessage = DefaultUserMessage,\n  ImageRenderer = DefaultImageRenderer,\n  ErrorMessage,\n  imageUploadsEnabled,\n  inputFileAccept = \"image/*\",\n  attachments,\n  hideStopButton,\n  observabilityHooks,\n  renderError,\n  onError,\n  // Legacy props - deprecated\n  RenderTextMessage,\n  RenderActionExecutionMessage,\n  RenderAgentStateMessage,\n  RenderResultMessage,\n  RenderImageMessage,\n}: CopilotChatProps) {\n  const {\n    additionalInstructions,\n    setChatInstructions,\n    copilotApiConfig,\n    setBannerError,\n    setInternalErrorHandler,\n    removeInternalErrorHandler,\n  } = useCopilotContext();\n\n  // Destructure stable values to avoid object reference changes\n  const { publicApiKey, chatApiEndpoint } = copilotApiConfig;\n\n  // Resolve attachments config with deprecation bridge\n  const resolvedAttachments: AttachmentsConfig | undefined = (() => {\n    if (attachments) return attachments;\n    if (imageUploadsEnabled) {\n      deprecationWarning(\n        \"imageUploadsEnabled\",\n        \"imageUploadsEnabled is deprecated. Use attachments={{ enabled: true }} instead. \" +\n          \"See https://docs.copilotkit.ai/migration-guides/migrate-attachments\",\n      );\n      return { enabled: true, accept: inputFileAccept || \"image/*\" };\n    }\n    return undefined;\n  })();\n\n  const attachmentsEnabled = resolvedAttachments?.enabled ?? false;\n  const attachmentsAccept = resolvedAttachments?.accept ?? \"*/*\";\n  const attachmentsMaxSize = resolvedAttachments?.maxSize ?? 20 * 1024 * 1024;\n\n  const [selectedAttachments, setSelectedAttachments] = useState<Attachment[]>(\n    [],\n  );\n  const [dragOver, setDragOver] = useState(false);\n  const processFilesRef = useRef<(files: File[]) => Promise<void>>(\n    async () => {},\n  );\n\n  const [chatError, setChatError] = useState<ChatError | null>(null);\n  const [messageFeedback, setMessageFeedback] = useState<\n    Record<string, \"thumbsUp\" | \"thumbsDown\">\n  >({});\n  const fileInputRef = useRef<HTMLInputElement>(null);\n\n  // Helper function to trigger event hooks only if publicApiKey is provided\n  const triggerObservabilityHook = useCallback(\n    (hookName: keyof CopilotObservabilityHooks, ...args: any[]) => {\n      if (publicApiKey && observabilityHooks?.[hookName]) {\n        (observabilityHooks[hookName] as any)(...args);\n      }\n      if (observabilityHooks?.[hookName] && !publicApiKey) {\n        setBannerError(\n          new CopilotKitError({\n            message: \"observabilityHooks requires a publicApiKey to function.\",\n            code: CopilotKitErrorCode.MISSING_PUBLIC_API_KEY_ERROR,\n            severity: Severity.CRITICAL,\n            visibility: ErrorVisibility.BANNER,\n          }),\n        );\n        styledConsole.publicApiKeyRequired(\"observabilityHooks\");\n      }\n    },\n    [publicApiKey, observabilityHooks, setBannerError],\n  );\n\n  // Helper function to trigger chat error and render error UI\n  const triggerChatError = useCallback(\n    (error: any, operation: string, originalError?: any) => {\n      const errorMessage =\n        error?.message || error?.toString() || \"An error occurred\";\n\n      console.error(\n        `[CopilotKit] ${operation} error:`,\n        errorMessage,\n        originalError ?? error,\n      );\n\n      // Set chat error state for rendering\n      setChatError({\n        message: errorMessage,\n        operation,\n        timestamp: Date.now(),\n      });\n\n      const errorEvent: CopilotErrorEvent = {\n        type: \"error\",\n        timestamp: Date.now(),\n        context: {\n          source: \"ui\",\n          request: {\n            operation,\n            url: chatApiEndpoint,\n            startTime: Date.now(),\n          },\n          technical: {\n            environment: \"browser\",\n            userAgent:\n              typeof navigator !== \"undefined\"\n                ? navigator.userAgent\n                : undefined,\n            stackTrace:\n              originalError instanceof Error ? originalError.stack : undefined,\n          },\n        },\n        error,\n      };\n\n      if (onError) {\n        onError(errorEvent);\n      }\n\n      // Also trigger observability hook if available\n      if (publicApiKey && observabilityHooks?.onError) {\n        observabilityHooks.onError(errorEvent);\n      }\n\n      // Show banner error if onError hook is used without publicApiKey\n      if (observabilityHooks?.onError && !publicApiKey) {\n        setBannerError(\n          new CopilotKitError({\n            message:\n              \"observabilityHooks.onError requires a publicApiKey to function.\",\n            code: CopilotKitErrorCode.MISSING_PUBLIC_API_KEY_ERROR,\n            severity: Severity.CRITICAL,\n            visibility: ErrorVisibility.BANNER,\n          }),\n        );\n        styledConsole.publicApiKeyRequired(\"observabilityHooks.onError\");\n      }\n    },\n    [publicApiKey, chatApiEndpoint, observabilityHooks, setBannerError],\n  );\n\n  useEffect(() => {\n    const id = \"chat-component\";\n    setInternalErrorHandler({\n      [id]: (error: CopilotErrorEvent) => {\n        if (!error) return;\n        triggerChatError(error.error, \"sendMessage\");\n      },\n    });\n    return () => {\n      // unregister when this instance unmounts\n      removeInternalErrorHandler?.(id);\n    };\n  }, [triggerChatError, setInternalErrorHandler, removeInternalErrorHandler]);\n\n  // Clipboard paste handler\n  useEffect(() => {\n    if (!attachmentsEnabled) return;\n\n    const handlePaste = async (e: ClipboardEvent) => {\n      const target = e.target as HTMLElement;\n      if (!target.parentElement?.classList.contains(\"copilotKitInput\")) return;\n\n      const items = Array.from(e.clipboardData?.items || []);\n      const fileItems = items.filter(\n        (item) =>\n          item.kind === \"file\" &&\n          item.getAsFile() !== null &&\n          matchesAcceptFilter(item.getAsFile()!, attachmentsAccept),\n      );\n\n      if (fileItems.length === 0) return;\n      e.preventDefault();\n\n      const files = fileItems\n        .map((item) => item.getAsFile())\n        .filter((f): f is File => f !== null);\n\n      try {\n        await processFilesRef.current(files);\n      } catch (error) {\n        triggerChatError(error, \"pasteUpload\", error);\n      }\n    };\n\n    document.addEventListener(\"paste\", handlePaste);\n    return () => document.removeEventListener(\"paste\", handlePaste);\n  }, [\n    attachmentsEnabled,\n    attachmentsAccept,\n    attachmentsMaxSize,\n    triggerChatError,\n  ]);\n\n  useEffect(() => {\n    if (!additionalInstructions?.length) {\n      setChatInstructions(instructions || \"\");\n      return;\n    }\n\n    /*\n      Will result in a prompt like:\n\n      You are a helpful assistant. \n      Additionally, follow these instructions:\n      - Do not answer questions about the weather.\n      - Do not answer questions about the stock market.\"\n    */\n    const combinedAdditionalInstructions = [\n      instructions,\n      \"Additionally, follow these instructions:\",\n      ...additionalInstructions.map((instruction) => `- ${instruction}`),\n    ];\n\n    setChatInstructions(combinedAdditionalInstructions.join(\"\\n\") || \"\");\n  }, [instructions, additionalInstructions]);\n\n  const {\n    messages,\n    isLoading,\n    sendMessage,\n    stopGeneration,\n    reloadMessages,\n    suggestions: currentSuggestions,\n    isLoadingSuggestions,\n    agent,\n  } = useCopilotChatInternal({\n    suggestions,\n    onInProgress,\n    onSubmitMessage,\n    onStopGeneration,\n    onReloadMessages,\n  });\n  // makeSystemMessage,\n  // disableSystemMessage,\n\n  // Track loading state changes for chat start/stop events\n  const prevIsLoading = useRef(isLoading);\n  useEffect(() => {\n    if (prevIsLoading.current !== isLoading) {\n      if (isLoading) {\n        triggerObservabilityHook(\"onChatStarted\");\n      } else {\n        triggerObservabilityHook(\"onChatStopped\");\n      }\n      prevIsLoading.current = isLoading;\n    }\n  }, [isLoading, triggerObservabilityHook]);\n\n  // Wrapper for sendMessage to clear selected attachments and build multimodal content\n  const handleSendMessage = (text: string) => {\n    const hasUploading = selectedAttachments.some(\n      (a) => a.status === \"uploading\",\n    );\n    if (hasUploading) {\n      triggerChatError(\n        new Error(\"Attachment(s) still uploading. Please wait.\"),\n        \"sendMessage\",\n      );\n      // Return a promise that resolves to a dummy message to satisfy the return type\n      return Promise.resolve({\n        id: randomUUID(),\n        content: text,\n        role: \"user\" as const,\n      } as Message);\n    }\n\n    const currentAttachments = selectedAttachments.filter(\n      (a) => a.status === \"ready\",\n    );\n    setSelectedAttachments([]);\n    if (fileInputRef.current) {\n      fileInputRef.current.value = \"\";\n    }\n\n    // Trigger message sent event\n    triggerObservabilityHook(\"onMessageSent\", text);\n\n    // Build content: if we have attachments, use InputContent[]\n    if (currentAttachments.length > 0) {\n      const contentParts: InputContent[] = [];\n\n      if (text.trim()) {\n        contentParts.push({ type: \"text\", text });\n      }\n\n      for (const attachment of currentAttachments) {\n        contentParts.push({\n          type: attachment.type,\n          source: attachment.source,\n          metadata: {\n            ...(attachment.filename ? { filename: attachment.filename } : {}),\n            ...attachment.metadata,\n          },\n        } as InputContent);\n      }\n\n      return sendMessage({\n        id: randomUUID(),\n        content: contentParts,\n        role: \"user\",\n      });\n    }\n\n    // Plain text message\n    return sendMessage({\n      id: randomUUID(),\n      content: text,\n      role: \"user\",\n    });\n  };\n\n  const chatContext = React.useContext(ChatContext);\n  const isVisible = chatContext ? chatContext.open : true;\n\n  const handleRegenerate = (messageId: string) => {\n    if (onRegenerate) {\n      onRegenerate(messageId);\n    }\n\n    // Trigger message regenerated event\n    triggerObservabilityHook(\"onMessageRegenerated\", messageId);\n\n    reloadMessages(messageId);\n  };\n\n  const handleCopy = (message: string) => {\n    if (onCopy) {\n      onCopy(message);\n    }\n\n    // Trigger message copied event\n    triggerObservabilityHook(\"onMessageCopied\", message);\n  };\n\n  const processFiles = async (files: File[]) => {\n    const validFiles = files.filter((file) =>\n      matchesAcceptFilter(file, attachmentsAccept),\n    );\n    const rejectedFiles = files.filter(\n      (file) => !matchesAcceptFilter(file, attachmentsAccept),\n    );\n    for (const file of rejectedFiles) {\n      const message = `File \"${file.name}\" is not accepted. Supported types: ${attachmentsAccept}`;\n      triggerChatError(new Error(message), \"fileUpload\");\n      resolvedAttachments?.onUploadFailed?.({\n        reason: \"invalid-type\",\n        file,\n        message,\n      });\n    }\n\n    for (const file of validFiles) {\n      if (exceedsMaxSize(file, attachmentsMaxSize)) {\n        const message = `File \"${file.name}\" exceeds the maximum size of ${formatFileSize(attachmentsMaxSize)}`;\n        triggerChatError(new Error(message), \"fileUpload\");\n        resolvedAttachments?.onUploadFailed?.({\n          reason: \"file-too-large\",\n          file,\n          message,\n        });\n        continue;\n      }\n\n      const modality = getModalityFromMimeType(file.type);\n\n      // Use a unique ID to track this placeholder across concurrent uploads\n      const placeholderId = randomUUID();\n      const placeholder: Attachment = {\n        id: placeholderId,\n        type: modality,\n        source: { type: \"data\", value: \"\", mimeType: file.type },\n        filename: file.name,\n        size: file.size,\n        status: \"uploading\",\n      };\n\n      setSelectedAttachments((prev) => [...prev, placeholder]);\n\n      try {\n        let source: Attachment[\"source\"];\n        let uploadMetadata: Record<string, unknown> | undefined;\n\n        if (resolvedAttachments?.onUpload) {\n          const { metadata: meta, ...uploadSource } =\n            await resolvedAttachments.onUpload(file);\n          source = uploadSource;\n          uploadMetadata = meta;\n        } else {\n          const base64 = await readFileAsBase64(file);\n          source = { type: \"data\", value: base64, mimeType: file.type };\n        }\n\n        // Generate video thumbnail if applicable\n        let thumbnail: string | undefined;\n        if (modality === \"video\") {\n          thumbnail = await generateVideoThumbnail(file);\n        }\n\n        setSelectedAttachments((prev) =>\n          prev.map((att) =>\n            att.id === placeholderId\n              ? {\n                  ...att,\n                  source,\n                  status: \"ready\" as const,\n                  thumbnail,\n                  metadata: uploadMetadata,\n                }\n              : att,\n          ),\n        );\n      } catch (error) {\n        // Remove the failed placeholder\n        setSelectedAttachments((prev) =>\n          prev.filter((att) => att.id !== placeholderId),\n        );\n        const message = error instanceof Error ? error.message : String(error);\n        triggerChatError(\n          new Error(`Failed to upload \"${file.name}\": ${message}`),\n          \"fileUpload\",\n          error,\n        );\n        resolvedAttachments?.onUploadFailed?.({\n          reason: \"upload-failed\",\n          file,\n          message: `Failed to upload \"${file.name}\": ${message}`,\n        });\n      }\n    }\n  };\n  processFilesRef.current = processFiles;\n\n  const handleFileUpload = async (\n    event: React.ChangeEvent<HTMLInputElement>,\n  ) => {\n    if (!event.target.files || event.target.files.length === 0) return;\n    try {\n      await processFiles(Array.from(event.target.files));\n    } catch (error) {\n      triggerChatError(error, \"fileUpload\", error);\n    }\n  };\n\n  // Drag-and-drop handlers\n  const handleDragOver = (e: React.DragEvent) => {\n    if (!attachmentsEnabled) return;\n    e.preventDefault();\n    e.stopPropagation();\n    setDragOver(true);\n  };\n\n  const handleDragLeave = (e: React.DragEvent) => {\n    e.preventDefault();\n    e.stopPropagation();\n    setDragOver(false);\n  };\n\n  const handleDrop = async (e: React.DragEvent) => {\n    e.preventDefault();\n    e.stopPropagation();\n    setDragOver(false);\n    if (!attachmentsEnabled) return;\n\n    const files = Array.from(e.dataTransfer.files);\n    if (files.length > 0) {\n      try {\n        await processFiles(files);\n      } catch (error) {\n        triggerChatError(error, \"dropUpload\", error);\n      }\n    }\n  };\n\n  const handleThumbsUp = (message: Message) => {\n    if (onThumbsUp) {\n      onThumbsUp(message);\n    }\n\n    // Update feedback state\n    setMessageFeedback((prev) => ({\n      ...prev,\n      [message.id]: \"thumbsUp\",\n    }));\n\n    // Trigger feedback given event\n    triggerObservabilityHook(\"onFeedbackGiven\", message.id, \"thumbsUp\");\n  };\n\n  const handleThumbsDown = (message: Message) => {\n    if (onThumbsDown) {\n      onThumbsDown(message);\n    }\n\n    // Update feedback state\n    setMessageFeedback((prev) => ({\n      ...prev,\n      [message.id]: \"thumbsDown\",\n    }));\n\n    // Trigger feedback given event\n    triggerObservabilityHook(\"onFeedbackGiven\", message.id, \"thumbsDown\");\n  };\n\n  return (\n    <WrappedCopilotChat icons={icons} labels={labels} className={className}>\n      <div\n        onDragOver={handleDragOver}\n        onDragLeave={handleDragLeave}\n        onDrop={handleDrop}\n        className={`copilotKitChatBody${dragOver ? \" copilotKitDragOver\" : \"\"}`}\n      >\n        {/* Render error above messages if present */}\n        {chatError &&\n          renderError &&\n          renderError({\n            ...chatError,\n            onDismiss: () => setChatError(null),\n            onRetry: () => {\n              // Clear error and potentially retry based on operation\n              setChatError(null);\n              // TODO: Implement specific retry logic based on operation type\n            },\n          })}\n\n        <Messages\n          AssistantMessage={AssistantMessage}\n          UserMessage={UserMessage}\n          RenderMessage={RenderMessage}\n          messages={messages}\n          inProgress={isLoading}\n          onRegenerate={handleRegenerate}\n          onCopy={handleCopy}\n          onThumbsUp={handleThumbsUp}\n          onThumbsDown={handleThumbsDown}\n          messageFeedback={messageFeedback}\n          markdownTagRenderers={markdownTagRenderers}\n          ImageRenderer={ImageRenderer}\n          ErrorMessage={ErrorMessage}\n          chatError={chatError}\n          // Legacy props - passed through to Messages component\n          RenderTextMessage={RenderTextMessage}\n          RenderActionExecutionMessage={RenderActionExecutionMessage}\n          RenderAgentStateMessage={RenderAgentStateMessage}\n          RenderResultMessage={RenderResultMessage}\n          RenderImageMessage={RenderImageMessage}\n        >\n          {currentSuggestions.length > 0 && (\n            <RenderSuggestionsList\n              onSuggestionClick={handleSendMessage}\n              suggestions={currentSuggestions}\n              isLoading={isLoadingSuggestions}\n            />\n          )}\n        </Messages>\n\n        {attachmentsEnabled && (\n          <>\n            <AttachmentQueue\n              attachments={selectedAttachments}\n              onRemoveAttachment={(id) =>\n                setSelectedAttachments((prev) =>\n                  prev.filter((att) => att.id !== id),\n                )\n              }\n            />\n            <input\n              type=\"file\"\n              multiple\n              ref={fileInputRef}\n              onChange={handleFileUpload}\n              accept={attachmentsAccept}\n              style={{ display: \"none\" }}\n            />\n          </>\n        )}\n        <Input\n          inProgress={isLoading}\n          chatReady={Boolean(agent)}\n          // @ts-ignore\n          onSend={handleSendMessage}\n          isVisible={isVisible}\n          onStop={stopGeneration}\n          onUpload={\n            attachmentsEnabled ? () => fileInputRef.current?.click() : undefined\n          }\n          hideStopButton={hideStopButton}\n        />\n      </div>\n    </WrappedCopilotChat>\n  );\n}\n\nexport function WrappedCopilotChat({\n  children,\n  icons,\n  labels,\n  className,\n}: {\n  children: React.ReactNode;\n  icons?: CopilotChatIcons;\n  labels?: CopilotChatLabels;\n  className?: string;\n}) {\n  const chatContext = React.useContext(ChatContext);\n  if (!chatContext) {\n    return (\n      <ChatContextProvider\n        icons={icons}\n        labels={labels}\n        open={true}\n        setOpen={() => {}}\n      >\n        <div className={`copilotKitChat ${className ?? \"\"}`}>{children}</div>\n      </ChatContextProvider>\n    );\n  }\n  return <>{children}</>;\n}\n","import React, { useMemo, useCallback, useEffect, useRef } from \"react\";\nimport { ChatContextProvider, useChatContext } from \"./ChatContext\";\nimport {\n  ButtonProps,\n  HeaderProps,\n  WindowProps,\n  CopilotObservabilityHooks,\n} from \"./props\";\nimport { Window as DefaultWindow } from \"./Window\";\nimport { Button as DefaultButton } from \"./Button\";\nimport { Header as DefaultHeader } from \"./Header\";\nimport { Messages as DefaultMessages } from \"./Messages\";\nimport { Input as DefaultInput } from \"./Input\";\nimport { CopilotChat, CopilotChatProps } from \"./Chat\";\nimport { AssistantMessage as DefaultAssistantMessage } from \"./messages/AssistantMessage\";\nimport { UserMessage as DefaultUserMessage } from \"./messages/UserMessage\";\nimport { useCopilotContext } from \"@copilotkit/react-core\";\nimport {\n  CopilotKitError,\n  CopilotKitErrorCode,\n  Severity,\n  ErrorVisibility,\n  styledConsole,\n} from \"@copilotkit/shared\";\n\nexport interface CopilotModalProps extends CopilotChatProps {\n  /**\n   * Whether the chat window should be open by default.\n   * @default false\n   */\n  defaultOpen?: boolean;\n\n  /**\n   * If the chat window should close when the user clicks outside of it.\n   * @default true\n   */\n  clickOutsideToClose?: boolean;\n\n  /**\n   * If the chat window should close when the user hits the Escape key.\n   * @default true\n   */\n  hitEscapeToClose?: boolean;\n\n  /**\n   * The shortcut key to open the chat window.\n   * Uses Command-[shortcut] on a Mac and Ctrl-[shortcut] on Windows.\n   * @default '/'\n   */\n  shortcut?: string;\n\n  /**\n   * A callback that gets called when the chat window opens or closes.\n   */\n  onSetOpen?: (open: boolean) => void;\n\n  /**\n   * A custom Window component to use instead of the default.\n   */\n  Window?: React.ComponentType<WindowProps>;\n\n  /**\n   * A custom Button component to use instead of the default.\n   */\n  Button?: React.ComponentType<ButtonProps>;\n\n  /**\n   * A custom Header component to use instead of the default.\n   */\n  Header?: React.ComponentType<HeaderProps>;\n}\n\n// Inner component that has access to the Copilot context\nconst CopilotModalInner = ({\n  observabilityHooks,\n  onSetOpen,\n  clickOutsideToClose,\n  hitEscapeToClose,\n  shortcut,\n  className,\n  children,\n  Window,\n  Button,\n  Header,\n  ...chatProps\n}: Omit<CopilotModalProps, \"icons\" | \"labels\" | \"defaultOpen\"> & {\n  Window: React.ComponentType<WindowProps>;\n  Button: React.ComponentType<ButtonProps>;\n  Header: React.ComponentType<HeaderProps>;\n  clickOutsideToClose: boolean;\n  hitEscapeToClose: boolean;\n  shortcut: string;\n}) => {\n  const { copilotApiConfig, setBannerError } = useCopilotContext();\n\n  // Destructure stable values to avoid object reference changes\n  const { publicApiKey } = copilotApiConfig;\n\n  // Helper function to trigger event hooks only if publicApiKey is provided\n  const triggerObservabilityHook = useCallback(\n    (hookName: keyof CopilotObservabilityHooks, ...args: any[]) => {\n      if (publicApiKey && observabilityHooks?.[hookName]) {\n        (observabilityHooks[hookName] as any)(...args);\n      }\n      if (observabilityHooks?.[hookName] && !publicApiKey) {\n        setBannerError(\n          new CopilotKitError({\n            message: \"observabilityHooks requires a publicApiKey to function.\",\n            code: CopilotKitErrorCode.MISSING_PUBLIC_API_KEY_ERROR,\n            severity: Severity.CRITICAL,\n            visibility: ErrorVisibility.BANNER,\n          }),\n        );\n        styledConsole.publicApiKeyRequired(\"observabilityHooks\");\n      }\n    },\n    [publicApiKey, observabilityHooks, setBannerError],\n  );\n\n  const { open } = useChatContext();\n  const prevOpen = useRef(open);\n\n  // Monitor open state changes and trigger event hooks\n  useEffect(() => {\n    if (prevOpen.current !== open) {\n      onSetOpen?.(open);\n\n      // Trigger chat minimize/expand events\n      if (open) {\n        triggerObservabilityHook(\"onChatExpanded\");\n      } else {\n        triggerObservabilityHook(\"onChatMinimized\");\n      }\n      prevOpen.current = open;\n    }\n  }, [open, onSetOpen, triggerObservabilityHook]);\n\n  const memoizedHeader = useMemo(() => <Header />, [Header]);\n  const memoizedChildren = useMemo(() => children, [children]);\n\n  return (\n    <>\n      <div className=\"copilotKitModalChildrenWrapper\">{memoizedChildren}</div>\n      <div className={className}>\n        <Button></Button>\n        <Window\n          clickOutsideToClose={clickOutsideToClose}\n          shortcut={shortcut}\n          hitEscapeToClose={hitEscapeToClose}\n        >\n          {memoizedHeader}\n          <CopilotChat {...chatProps} observabilityHooks={observabilityHooks} />\n        </Window>\n      </div>\n    </>\n  );\n};\n\nexport const CopilotModal = ({\n  instructions,\n  defaultOpen = false,\n  clickOutsideToClose = true,\n  hitEscapeToClose = true,\n  onSetOpen,\n  onSubmitMessage,\n  onStopGeneration,\n  onReloadMessages,\n  shortcut = \"/\",\n  icons,\n  labels,\n  makeSystemMessage,\n  onInProgress,\n  Window = DefaultWindow,\n  Button = DefaultButton,\n  Header = DefaultHeader,\n  Messages = DefaultMessages,\n  Input = DefaultInput,\n  AssistantMessage = DefaultAssistantMessage,\n  UserMessage = DefaultUserMessage,\n  onThumbsUp,\n  onThumbsDown,\n  onCopy,\n  onRegenerate,\n  markdownTagRenderers,\n  className,\n  children,\n  observabilityHooks,\n  ...props\n}: CopilotModalProps) => {\n  const [openState, setOpenState] = React.useState(defaultOpen);\n\n  return (\n    <ChatContextProvider\n      icons={icons}\n      labels={labels}\n      open={openState}\n      setOpen={setOpenState}\n    >\n      <CopilotModalInner\n        observabilityHooks={observabilityHooks}\n        onSetOpen={onSetOpen}\n        clickOutsideToClose={clickOutsideToClose ?? true}\n        hitEscapeToClose={hitEscapeToClose ?? true}\n        shortcut={shortcut ?? \"/\"}\n        className={className}\n        Window={Window}\n        Button={Button}\n        Header={Header}\n        instructions={instructions}\n        onSubmitMessage={onSubmitMessage}\n        onStopGeneration={onStopGeneration}\n        onReloadMessages={onReloadMessages}\n        makeSystemMessage={makeSystemMessage}\n        onInProgress={onInProgress}\n        Messages={Messages}\n        Input={Input}\n        AssistantMessage={AssistantMessage}\n        UserMessage={UserMessage}\n        onThumbsUp={onThumbsUp}\n        onThumbsDown={onThumbsDown}\n        onCopy={onCopy}\n        onRegenerate={onRegenerate}\n        markdownTagRenderers={markdownTagRenderers}\n        {...props}\n      >\n        {children}\n      </CopilotModalInner>\n    </ChatContextProvider>\n  );\n};\n","/**\n * <br/>\n * <img src=\"https://cdn.copilotkit.ai/docs/copilotkit/images/CopilotPopup.gif\" width=\"500\" />\n *\n * A chatbot popup component for the CopilotKit framework. The component allows for a high degree\n * of customization through various props and custom CSS.\n *\n * See [CopilotSidebar](/reference/v1/components/chat/CopilotSidebar) for a sidebar version of this component.\n *\n * ## Install Dependencies\n *\n * This component is part of the [@copilotkit/react-ui](https://npmjs.com/package/@copilotkit/react-ui) package.\n *\n * ```shell npm2yarn \\\"@copilotkit/react-ui\"\\\n * npm install @copilotkit/react-core @copilotkit/react-ui\n * ```\n * ## Usage\n *\n * ```tsx\n * import { CopilotPopup } from \"@copilotkit/react-ui\";\n * import \"@copilotkit/react-ui/styles.css\";\n *\n * <CopilotPopup\n *   labels={{\n *     title: \"Your Assistant\",\n *     initial: \"Hi! 👋 How can I assist you today?\",\n *   }}\n * />\n * ```\n *\n * ### With Observability Hooks\n *\n * To monitor user interactions, provide the `observabilityHooks` prop.\n * **Note:** This requires a `publicApiKey` in the `<CopilotKit>` provider.\n *\n * ```tsx\n * <CopilotKit publicApiKey=\"YOUR_PUBLIC_API_KEY\">\n *   <CopilotPopup\n *     observabilityHooks={{\n *       onChatExpanded: () => {\n *         console.log(\"Popup opened\");\n *       },\n *       onChatMinimized: () => {\n *         console.log(\"Popup closed\");\n *       },\n *     }}\n *   />\n * </CopilotKit>\n * ```\n *\n * ### Look & Feel\n *\n * By default, CopilotKit components do not have any styles. You can import CopilotKit's stylesheet at the root of your project:\n * ```tsx title=\"YourRootComponent.tsx\"\n * ...\n * import \"@copilotkit/react-ui/styles.css\"; // [!code highlight]\n *\n * export function YourRootComponent() {\n *   return (\n *     <CopilotKit>\n *       ...\n *     </CopilotKit>\n *   );\n * }\n * ```\n * For more information about how to customize the styles, check out the [Customize Look & Feel](/guides/custom-look-and-feel/customize-built-in-ui-components) guide.\n */\n\nimport { CopilotModal, CopilotModalProps } from \"./Modal\";\n\nexport function CopilotPopup(props: CopilotModalProps) {\n  props = {\n    ...props,\n    className: props.className\n      ? props.className + \" copilotKitPopup\"\n      : \"copilotKitPopup\",\n  };\n  return <CopilotModal {...props}>{props.children}</CopilotModal>;\n}\n","/**\n * <br/>\n * <img src=\"https://cdn.copilotkit.ai/docs/copilotkit/images/CopilotSidebar.gif\" width=\"500\" />\n *\n * A chatbot sidebar component for the CopilotKit framework. Highly customizable through various props and custom CSS.\n *\n * See [CopilotPopup](/reference/v1/components/chat/CopilotPopup) for a popup version of this component.\n *\n * ## Install Dependencies\n *\n * This component is part of the [@copilotkit/react-ui](https://npmjs.com/package/@copilotkit/react-ui) package.\n *\n * ```shell npm2yarn \\\"@copilotkit/react-ui\"\\\n * npm install @copilotkit/react-core @copilotkit/react-ui\n * ```\n *\n * ## Usage\n *\n * ```tsx\n * import { CopilotSidebar } from \"@copilotkit/react-ui\";\n * import \"@copilotkit/react-ui/styles.css\";\n *\n * <CopilotSidebar\n *   labels={{\n *     title: \"Your Assistant\",\n *     initial: \"Hi! 👋 How can I assist you today?\",\n *   }}\n * >\n *   <YourApp/>\n * </CopilotSidebar>\n * ```\n *\n * ### With Observability Hooks\n *\n * To monitor user interactions, provide the `observabilityHooks` prop.\n * **Note:** This requires a `publicApiKey` in the `<CopilotKit>` provider.\n *\n * ```tsx\n * <CopilotKit publicApiKey=\"YOUR_PUBLIC_API_KEY\">\n *   <CopilotSidebar\n *     observabilityHooks={{\n *       onChatExpanded: () => {\n *         console.log(\"Sidebar opened\");\n *       },\n *       onChatMinimized: () => {\n *         console.log(\"Sidebar closed\");\n *       },\n *     }}\n *   >\n *     <YourApp/>\n *   </CopilotSidebar>\n * </CopilotKit>\n * ```\n *\n * ### Look & Feel\n *\n * By default, CopilotKit components do not have any styles. You can import CopilotKit's stylesheet at the root of your project:\n * ```tsx title=\"YourRootComponent.tsx\"\n * ...\n * import \"@copilotkit/react-ui/styles.css\"; // [!code highlight]\n *\n * export function YourRootComponent() {\n *   return (\n *     <CopilotKit>\n *       ...\n *     </CopilotKit>\n *   );\n * }\n * ```\n * For more information about how to customize the styles, check out the [Customize Look & Feel](/guides/custom-look-and-feel/customize-built-in-ui-components) guide.\n */\nimport React, { useState } from \"react\";\nimport { CopilotModal, CopilotModalProps } from \"./Modal\";\n\nexport function CopilotSidebar(props: CopilotModalProps) {\n  props = {\n    ...props,\n    className: props.className\n      ? props.className + \" copilotKitSidebar\"\n      : \"copilotKitSidebar\",\n  };\n  const [expandedClassName, setExpandedClassName] = useState(\n    props.defaultOpen ? \"sidebarExpanded\" : \"\",\n  );\n\n  const onSetOpen = (open: boolean) => {\n    props.onSetOpen?.(open);\n    setExpandedClassName(open ? \"sidebarExpanded\" : \"\");\n  };\n\n  return (\n    <div className={`copilotKitSidebarContentWrapper ${expandedClassName}`}>\n      <CopilotModal {...props} {...{ onSetOpen }}>\n        {props.children}\n      </CopilotModal>\n    </div>\n  );\n}\n","/**\n * <Callout type=\"warning\">\n *   useCopilotChatSuggestions is experimental. The interface is not final and\n *   can change without notice.\n * </Callout>\n *\n * `useCopilotReadable` is a React hook that provides app-state and other information\n * to the Copilot. Optionally, the hook can also handle hierarchical state within your\n * application, passing these parent-child relationships to the Copilot.\n *\n * <br/>\n * <img src=\"https://cdn.copilotkit.ai/docs/copilotkit/images/use-copilot-chat-suggestions/use-copilot-chat-suggestions.gif\" width=\"500\" />\n *\n * ## Usage\n *\n * ### Install Dependencies\n *\n * This component is part of the [@copilotkit/react-ui](https://npmjs.com/package/@copilotkit/react-ui) package.\n *\n * ```shell npm2yarn \\\"@copilotkit/react-ui\"\\\n * npm install @copilotkit/react-core @copilotkit/react-ui\n * ```\n *\n * ### Simple Usage\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n *   const [employees, setEmployees] = useState([]);\n *\n *   useCopilotChatSuggestions({\n *     instructions: `The following employees are on duty: ${JSON.stringify(employees)}`,\n *   });\n * }\n * ```\n *\n * ### Dependency Management\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n *   useCopilotChatSuggestions(\n *     {\n *       instructions: \"Suggest the most relevant next actions.\",\n *     },\n *     [appState],\n *   );\n * }\n * ```\n *\n * In the example above, the suggestions are generated based on the given instructions.\n * The hook monitors `appState`, and updates suggestions accordingly whenever it changes.\n *\n * ### Behavior and Lifecycle\n *\n * The hook registers the configuration with the chat context upon component mount and\n * removes it on unmount, ensuring a clean and efficient lifecycle management.\n */\nimport {\n  useCopilotChatSuggestions as useCoreCopilotChatSuggestions,\n  type UseCopilotChatSuggestionsConfiguration,\n} from \"@copilotkit/react-core\";\n\nexport function useCopilotChatSuggestions(\n  config: UseCopilotChatSuggestionsConfiguration,\n  dependencies: any[] = [],\n) {\n  useCoreCopilotChatSuggestions(config, dependencies);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAa,WACX,2CAAC;CACC,OAAM;CACN,SAAQ;CACR,MAAK;CACL,OAAM;CACN,QAAO;WAEP,2CAAC;EAAE,WAAU;YACX,2CAAC;GACC,UAAS;GACT,GAAE;GACF,UAAS;IACT;GACA;EACA;AAGR,MAAaA,cACX,2CAAC;CACC,OAAM;CACN,MAAK;CACL,SAAQ;CACR,aAAY;CACZ,QAAO;CACP,OAAM;CACN,QAAO;WAEP,2CAAC;EACC,eAAc;EACd,gBAAe;EACf,GAAE;GACF;EACE;AAGR,MAAa,kBACX,2CAAC;CACC,OAAM;CACN,MAAK;CACL,SAAQ;CACR,aAAY;CACZ,QAAO;CACP,OAAM;CACN,QAAO;WAEP,2CAAC;EACC,eAAc;EACd,gBAAe;EACf,GAAE;GACF;EACE;AAGR,MAAa,WACX,2CAAC;CACC,OAAM;CACN,MAAK;CACL,SAAQ;CACR,aAAY;CACZ,QAAO;CACP,OAAM;CACN,QAAO;WAEP,2CAAC;EACC,eAAc;EACd,gBAAe;EACf,GAAE;GACF;EACE;AAGR,MAAa,iBACX,2CAAC;CACC,OAAM;CACN,MAAK;CACL,SAAQ;CACR,aAAY;CACZ,QAAO;CACP,OAAM;CACN,QAAO;WAEP,2CAAC;EACC,eAAc;EACd,gBAAe;EACf,GAAE;GACF;EACE;AAGR,MAAa,WACX,2CAAC;CACC,OAAM;CACN,MAAK;CACL,SAAQ;CACR,aAAY;CACZ,QAAO;CACP,OAAM;CACN,QAAO;WAEP,2CAAC;EACC,eAAc;EACd,gBAAe;EACf,GAAE;GACF;EACE;AAGR,MAAa,iBACX,2CAAC;CACC,OAAM;CACN,MAAK;CACL,SAAQ;CACR,aAAY;CACZ,QAAO;CACP,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,SAAS;EACT,eAAe;EACf,YAAY;EACZ,WAAW;EACX,SAAS;EACT,SAAS;EACT,QAAQ;EACR,UAAU;EACV,YAAY;EACb;CACD,8BAA4B;EAC1B,OAAO;EACP,UAAU;EACV,YAAY;EACZ,YACE;EACF,WAAW;EACX,WAAW;EACX,YAAY;EACZ,aAAa;EACb,WAAW;EACX,YAAY;EACZ,YAAY;EACZ,UAAU;EACV,SAAS;EACT,eAAe;EACf,YAAY;EACZ,WAAW;EACX,SAAS;EACV;CACD,wCAAsC;EACpC,YAAY;EACZ,YAAY;EACb;CACD,yCAAuC;EACrC,YAAY;EACZ,YAAY;EACb;CACD,0CAAwC;EACtC,YAAY;EACZ,YAAY;EACb;CACD,2CAAyC;EACvC,YAAY;EACZ,YAAY;EACb;CACD,0CAAwC;EACtC,SAAS;EACT,cAAc;EACd,OAAO;EACP,YAAY;EACb;CACD,cAAc,EACZ,SAAS,MACV;CACD,uBAAuB,EACrB,OAAO,WACR;CACD,gBAAgB,EACd,OAAO,WACR;CACD,SAAS,EACP,OAAO,WACR;CACD,QAAQ,EACN,OAAO,WACR;CACD,aAAa,EACX,OAAO,WACR;CACD,mDAAmD,EACjD,OAAO,WACR;CACD,0DAA0D,EACxD,OAAO,WACR;CACD,UAAU,EACR,OAAO,WACR;CACD,KAAK,EACH,OAAO,WACR;CACD,SAAS,EACP,OAAO,WACR;CACD,QAAQ,EACN,OAAO,WACR;CACD,UAAU,EACR,OAAO,WACR;CACD,QAAQ,EACN,OAAO,WACR;CACD,UAAU,EACR,OAAO,WACR;CACD,MAAM,EACJ,OAAO,WACR;CACD,UAAU,EACR,OAAO,WACR;CACD,aAAa,EACX,OAAO,WACR;CACD,QAAQ,EACN,OAAO,WACR;CACD,MAAM,EACJ,OAAO,WACR;CACD,SAAS,EACP,OAAO,WACR;CACD,SAAS,EACP,OAAO,WACR;CACD,mCAAmC,EACjC,gBAAgB,aACjB;CACD,UAAU,EACR,OAAO,WACR;CACD,QAAQ,EACN,OAAO,WACR;CACD,kBAAkB,EAChB,OAAO,WACR;CACD,QAAQ,EACN,OAAO,WACR;CACD,eAAe,EACb,OAAO,WACR;CACD,cAAc,EACZ,OAAO,WACR;CACD,uBAAuB,EACrB,OAAO,WACR;CACD,0BAA0B,EACxB,OAAO,WACR;CACD,SAAS,EACP,OAAO,WACR;CACD,kBAAkB,EAChB,OAAO,WACR;CACD,wBAAwB,EACtB,OAAO,WACR;CACD,UAAU,EACR,OAAO,WACR;CACD,6BAA6B,EAC3B,OAAO,WACR;CACD,OAAO,EACL,OAAO,WACR;CACD,WAAW,EACT,OAAO,WACR;CACD,QAAQ,EACN,WAAW,UACZ;CACD,cAAc,EACZ,OAAO,WACR;CACD,oBAAoB,EAClB,OAAO,WACR;CACD,SAAS,EACP,OAAO,WACR;CACD,WAAW,EACT,OAAO,WACR;CACD,eAAe,EACb,OAAO,WACR;CACD,yCAAyC,EACvC,OAAO,WACR;CACD,UAAU,EACR,OAAO,WACR;CACD,4BAA4B,EAC1B,OAAO,WACR;CACD,4BAA4B,EAC1B,OAAO,WACR;CACD,QAAQ,EACN,OAAO,WACR;CACD,mBAAmB,EACjB,OAAO,WACR;CACD,OAAO,EACL,OAAO,WACR;CACD,cAAc,EACZ,OAAO,WACR;CACD,0BAA0B,EACxB,OAAO,WACR;CACD,sCAAsC,EACpC,OAAO,WACR;CACD,WAAW,EACT,OAAO,WACR;CACD,uCAAqC,EACnC,OAAO,WACR;CACD,wCAAsC,EACpC,OAAO,WACR;CACD,gCAA8B,EAC5B,OAAO,WACR;CACD,iCAA+B,EAC7B,OAAO,WACR;CACD,uCAAqC,EACnC,OAAO,WACR;CACD,wCAAsC,EACpC,OAAO,WACR;CACD,gCAA8B,EAC5B,OAAO,WACR;CACD,iCAA+B,EAC7B,OAAO,WACR;CACD,gCAA8B,EAC5B,OAAO,WACR;CACD,iCAA+B,EAC7B,OAAO,WACR;CACD,iCAA+B,EAC7B,OAAO,WACR;CACD,kCAAgC,EAC9B,OAAO,WACR;CACD,iC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;GACtC;GACI;GACE;GACd,UAAU,kBAAkB,QAAQ,OAAO;GACrB;GACtB,eAAeD;KAfV,MAgBL;EAEN,QACE,QAAO;;;;;;;;;;AC/Bb,MAAa,uBAA2D,EACtE,SACA,UACA,YACA,OACA,kBACA,cACA,kBACA,aACA,eACA,cACA,QACA,YACA,cACA,sBACA,kBACI;CACJ,MAAM,EACJ,mBACA,8BACA,yBACA,qBACA,uBACE;CAEJ,MAAM,kEAA8B,QAAQ,CAAC,MAAM;AAGnD,KAAI,kBAAkB,eAAe,IAAI,kBACvC,QACE,2CAAC;EACU;EACC;EACE;EACL;EACW;EACA;EACL;EACC;EACN;EACI;EACE;EACQ;GACtB;AAIN,KACE,kBAAkB,0BAA0B,IAC5C,6BAEA,QACE,2CAAC;EACW;EACD;EACG;EACL;EACW;EACJ;EACI;EACL;GACb;AAIN,KAAI,kBAAkB,qBAAqB,IAAI,wBAC7C,QACE,2CAAC;EACW;EACD;EACG;EACL;EACW;EACA;EACL;GACb;AAIN,KAAI,kBAAkB,iBAAiB,IAAI,oBACzC,QACE,2CAAC;EACW;EACD;EACG;EACL;EACW;EACA;EACL;GACb;AAIN,KAAI,kBAAkB,gBAAgB,IAAI,mBACxC,QACE,2CAAC;EACW;EACD;EACG;EACL;EACW;EACA;EACL;GACb;AAKN,QACE,2CAACE;EACW;EACD;EACG;EACL;EACW;EACA;EACL;EACE;EACD;EACN;EACI;EACE;EACQ;GACtB;;;;;AC5IN,MAAa,YAAY,EACvB,YACA,UACA,eACA,kBACA,aACA,cACA,eACA,cACA,QACA,YACA,cACA,iBACA,sBACA,WAGA,mBACA,8BACA,yBACA,qBACA,yBACmB;CACnB,MAAM,EAAE,QAAQ,UAAU,gBAAgB;CAC1C,MAAM,EAAE,UAAU,iBAAiB,kEAAsC;CAKzE,MAAM,WAAW,CAAC,4BAHV,oBAAoB,OAAO,QAAQ,EACzC,CAAC,OAAO,QAAQ,CACjB,EACqC,GAAG,gBAAgB;CACzD,MAAM,EAAE,sBAA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