@openchatwidget/sdk 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +89 -37
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,63 +1,115 @@
|
|
|
1
|
-
|
|
1
|
+
<img src="../public/open-chat-widget-banner.png" alt="OpenChatWidget banner" width="100%" />
|
|
2
2
|
|
|
3
|
-
OpenChatWidget
|
|
4
|
-
It intentionally ships only the client widget:
|
|
3
|
+
OpenChatWidget lets you embed a ChatGPT-like AI chat widget into your website. Connect the widget to any AI agent you build, any LLM model. It's free, open source, and self hosted. You own the entire stack.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
- AI SDK chat streaming client
|
|
5
|
+
If you want to bring agentic chat to your product, this is it. Get started with only a few lines of code.
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
### Example use cases
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
- **AI customer service agent** -
|
|
10
|
+
Help customers get instant answers, resolve common support questions, and reduce ticket volume. Open source free alternative to Intercom's Fin Agent.\
|
|
11
|
+
|
|
12
|
+
- **Knowledge base and documentation search** -
|
|
13
|
+
Let users ask questions about your docs, product guides, or internal knowledge base in natural language.
|
|
14
|
+
|
|
15
|
+
- **In-product onboarding** -
|
|
16
|
+
Add a chat assistant that helps users navigate your dashboard, learn features, and get unstuck faster.
|
|
17
|
+
|
|
18
|
+
- **Bookings and task automation** -
|
|
19
|
+
Power flows like scheduling meetings, tracking orders, booking appointments, and triggering simple actions.
|
|
20
|
+
|
|
21
|
+
## 🚀 Quick Start
|
|
22
|
+
|
|
23
|
+
### 1. Install the chat widget
|
|
24
|
+
Install the widget in your React app:
|
|
12
25
|
|
|
13
26
|
```bash
|
|
14
|
-
|
|
15
|
-
npm install
|
|
27
|
+
npm install @openchatwidget/sdk
|
|
16
28
|
```
|
|
17
29
|
|
|
18
|
-
|
|
30
|
+
Embed the component anywhere in your project. A common pattern is to mount it in your main app layout so it appears across your site.
|
|
19
31
|
|
|
20
|
-
```
|
|
21
|
-
import { OpenChatWidget } from "openchatwidget";
|
|
32
|
+
```tsx
|
|
33
|
+
import { OpenChatWidget } from "@openchatwidget/sdk";
|
|
22
34
|
|
|
23
35
|
export default function App() {
|
|
24
|
-
return
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
<main>
|
|
39
|
+
...
|
|
40
|
+
</main>
|
|
41
|
+
|
|
42
|
+
<OpenChatWidget url="<YOUR_AGENT_STREAMING_ENDPOINT>" /> // Fill out streaming endpoint in Step 3.
|
|
43
|
+
</>
|
|
44
|
+
);
|
|
25
45
|
}
|
|
26
46
|
```
|
|
27
47
|
|
|
28
|
-
|
|
48
|
+
### 2. Build your first agent
|
|
29
49
|
|
|
30
|
-
|
|
50
|
+
The next step is to set up your AI agent backend. Create an API endpoint with your favorite Node backend framework, such as Express or Hono.
|
|
31
51
|
|
|
32
|
-
|
|
52
|
+
Here's a simple text stream agent:
|
|
53
|
+
```tsx
|
|
54
|
+
app.use(express.json());
|
|
55
|
+
app.post("/api/chat", async (request, response) => {
|
|
56
|
+
const { messages } = request.body as { messages: UIMessage[] };
|
|
33
57
|
|
|
34
|
-
|
|
58
|
+
const openai = createOpenAI({
|
|
59
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
60
|
+
});
|
|
35
61
|
|
|
36
|
-
|
|
62
|
+
const result = streamText({
|
|
63
|
+
model: openai("gpt-4o-mini"),
|
|
64
|
+
system: "You are the OpenChatWidget example assistant. Keep answers concise and useful.",
|
|
65
|
+
messages: await convertToModelMessages(messages),
|
|
66
|
+
});
|
|
37
67
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
68
|
+
result.pipeUIMessageStreamToResponse(response);
|
|
69
|
+
});
|
|
70
|
+
```
|
|
41
71
|
|
|
42
|
-
|
|
72
|
+
### 3. Connect the widget to the agent.
|
|
43
73
|
|
|
44
|
-
|
|
74
|
+
Grab the exact URL of your agent endpoint and paste it into `<YOUR_AGENT_STREAMING_ENDPOINT>`, for example `http://localhost:8787/api/chat`. Make sure to start both your front end and Node backend. You should be able to start chatting.
|
|
45
75
|
|
|
46
|
-
|
|
47
|
-
import {
|
|
48
|
-
convertToModelMessages,
|
|
49
|
-
createOpenAI,
|
|
50
|
-
streamText,
|
|
51
|
-
type UIMessage,
|
|
52
|
-
} from "openchatwidget";
|
|
53
|
-
```
|
|
76
|
+
For a working basic example, check out [`examples/vite-express-app`](./examples/vite-express-app/).
|
|
54
77
|
|
|
55
|
-
##
|
|
78
|
+
## ✨ Features
|
|
56
79
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
80
|
+
| Feature | Details |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| Embeddable widget | Add a bottom-right AI chat widget to any React / Next app with a single component. |
|
|
83
|
+
| Custom AI agent | Create your own AI agent hosted on any Node backend framework |
|
|
84
|
+
| 🚧 Live chat | Chat with users in real time, just like Intercom but free |
|
|
85
|
+
| 🚧 Support for voice and image uploading | Be able to talk to engage and upload photos in the chat widget |
|
|
86
|
+
| 🚧 Support for MCP and MCP apps | Connect to MCP servers and render UI from MCP apps |
|
|
87
|
+
| 🚧 Client side tools | Be able to call tools on the UI client side, WebMCP style. |
|
|
88
|
+
|
|
89
|
+
<img src="public/product-demo-filler.png" alt="OpenChatWidget product demo" width="100%" />
|
|
90
|
+
|
|
91
|
+
## Stack
|
|
92
|
+
Open Chat Widget is a simple UI wrapper around [Vercel AI-SDK](https://ai-sdk.dev/docs/introduction). When building your backend AI agent, all capabilities from AI-SDK are compatible with Open Chat Widget.
|
|
93
|
+
|
|
94
|
+
- Front end is written in React / Typescript
|
|
95
|
+
- Agentic chat powered by Vercel AI SDK.
|
|
96
|
+
|
|
97
|
+
### Why AI-SDK?
|
|
98
|
+
We want to be opiniated on how
|
|
99
|
+
|
|
100
|
+
## 📦 Examples
|
|
101
|
+
|
|
102
|
+
- [`examples/vite-express-app`](./examples/vite-express-app): Vite frontend with an Express backend and OpenAI streaming
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
## 🛣️ Roadmap
|
|
106
|
+
|
|
107
|
+
[See ROADMAP.md](../ROADMAP.md)
|
|
108
|
+
## 🤝 Community
|
|
109
|
+
|
|
110
|
+
- [Discord](https://discord.gg/jA4vcJKECy)
|
|
111
|
+
- [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
60
112
|
|
|
61
|
-
|
|
113
|
+
## 📄 License
|
|
62
114
|
|
|
63
|
-
|
|
115
|
+
MIT. See [LICENSE](./LICENSE).
|
package/dist/index.js
CHANGED
|
@@ -678,7 +678,7 @@ function Composer({
|
|
|
678
678
|
/* @__PURE__ */ jsxs4(
|
|
679
679
|
"a",
|
|
680
680
|
{
|
|
681
|
-
href: "https://
|
|
681
|
+
href: "https://openchatwidget.com",
|
|
682
682
|
target: "_blank",
|
|
683
683
|
rel: "noreferrer",
|
|
684
684
|
style: {
|
|
@@ -707,7 +707,7 @@ function Composer({
|
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
709
|
),
|
|
710
|
-
/* @__PURE__ */ jsx4("span", { children: "Powered by
|
|
710
|
+
/* @__PURE__ */ jsx4("span", { children: "Powered by Open Chat Widget" })
|
|
711
711
|
]
|
|
712
712
|
}
|
|
713
713
|
)
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../widget/src/OpenChatWidget.tsx","../widget/src/components/ChatToggleButton.tsx","../widget/src/theme.ts","../widget/src/components/WidgetPanel.tsx","../widget/src/components/MessageList.tsx","../widget/src/components/Composer.tsx","../widget/src/components/MarkdownMessage.tsx","../widget/src/components/EmptyState.tsx","../widget/src/utils/chat.ts","../widget/src/index.ts"],"sourcesContent":["import * as React from \"react\";\nimport { useChat } from \"@ai-sdk/react\";\nimport { DefaultChatTransport, type UIMessage } from \"ai\";\nimport { ChatToggleButton } from \"./components/ChatToggleButton\";\nimport { WidgetPanel } from \"./components/WidgetPanel\";\nimport { MessageList } from \"./components/MessageList\";\nimport { Composer } from \"./components/Composer\";\nimport { MarkdownMessage } from \"./components/MarkdownMessage\";\nimport { EmptyState } from \"./components/EmptyState\";\nimport { HELPFUL_CHAT_LOGO_DATA_URI, buildOpenChatWidgetThemeCss } from \"./theme\";\nimport { extractMessageText } from \"./utils/chat\";\n\nconst MOBILE_BREAKPOINT_PX = 768;\nconst DEFAULT_TITLE = \"Helpful Chat\";\nconst DEFAULT_PLACEHOLDER = \"Ask a question...\";\n\nexport type OpenChatWidgetProps = {\n url: string;\n};\n\nexport function OpenChatWidget({ url }: OpenChatWidgetProps) {\n const [input, setInput] = React.useState(\"\");\n const [isOpen, setIsOpen] = React.useState(false);\n const [isInputFocused, setIsInputFocused] = React.useState(false);\n const [isMobileViewport, setIsMobileViewport] = React.useState(() => {\n if (typeof window === \"undefined\") {\n return false;\n }\n return window.innerWidth <= MOBILE_BREAKPOINT_PX;\n });\n const [visualViewportHeight, setVisualViewportHeight] = React.useState(() => {\n if (typeof window === \"undefined\") {\n return 0;\n }\n return window.visualViewport?.height ?? window.innerHeight;\n });\n const [visualViewportOffsetTop, setVisualViewportOffsetTop] = React.useState(() => {\n if (typeof window === \"undefined\") {\n return 0;\n }\n return window.visualViewport?.offsetTop ?? 0;\n });\n const messageListRef = React.useRef<HTMLDivElement | null>(null);\n const textareaRef = React.useRef<HTMLTextAreaElement | null>(null);\n const panelRef = React.useRef<HTMLElement | null>(null);\n const toggleRef = React.useRef<HTMLButtonElement | null>(null);\n\n const transport = React.useMemo(\n () =>\n new DefaultChatTransport({\n api: url,\n }),\n [url],\n );\n const themeCss = React.useMemo(() => buildOpenChatWidgetThemeCss(), []);\n\n const {\n messages,\n sendMessage,\n status,\n error,\n stop,\n } = useChat<UIMessage>({\n transport,\n });\n\n const isGenerating = status === \"submitted\" || status === \"streaming\";\n const canSend = input.trim().length > 0 && !isGenerating;\n\n React.useEffect(() => {\n const handleResize = () => {\n setIsMobileViewport(window.innerWidth <= MOBILE_BREAKPOINT_PX);\n };\n handleResize();\n window.addEventListener(\"resize\", handleResize);\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n\n React.useEffect(() => {\n const handleViewportChange = () => {\n if (typeof window === \"undefined\") {\n return;\n }\n setVisualViewportHeight(window.visualViewport?.height ?? window.innerHeight);\n setVisualViewportOffsetTop(window.visualViewport?.offsetTop ?? 0);\n };\n\n handleViewportChange();\n window.addEventListener(\"resize\", handleViewportChange);\n window.visualViewport?.addEventListener(\"resize\", handleViewportChange);\n window.visualViewport?.addEventListener(\"scroll\", handleViewportChange);\n\n return () => {\n window.removeEventListener(\"resize\", handleViewportChange);\n window.visualViewport?.removeEventListener(\"resize\", handleViewportChange);\n window.visualViewport?.removeEventListener(\"scroll\", handleViewportChange);\n };\n }, []);\n\n React.useEffect(() => {\n if (!isMobileViewport || !isOpen || typeof document === \"undefined\") {\n return;\n }\n\n const { body } = document;\n const previousOverflow = body.style.overflow;\n const previousOverscroll = body.style.overscrollBehavior;\n body.style.overflow = \"hidden\";\n body.style.overscrollBehavior = \"none\";\n\n return () => {\n body.style.overflow = previousOverflow;\n body.style.overscrollBehavior = previousOverscroll;\n };\n }, [isMobileViewport, isOpen]);\n\n React.useEffect(() => {\n const scrollToBottom = () => {\n const container = messageListRef.current;\n if (!container) {\n return;\n }\n container.scrollTo({\n top: container.scrollHeight,\n behavior: isGenerating ? \"auto\" : \"smooth\",\n });\n };\n scrollToBottom();\n }, [messages, isGenerating]);\n\n React.useEffect(() => {\n if (!isOpen || typeof document === \"undefined\") {\n return;\n }\n\n const handlePointerDown = (event: PointerEvent) => {\n const target = event.target;\n if (!(target instanceof Node)) {\n return;\n }\n\n const clickedPanel = panelRef.current?.contains(target) ?? false;\n const clickedToggle = toggleRef.current?.contains(target) ?? false;\n if (!clickedPanel && !clickedToggle) {\n setIsOpen(false);\n }\n };\n\n document.addEventListener(\"pointerdown\", handlePointerDown);\n return () => {\n document.removeEventListener(\"pointerdown\", handlePointerDown);\n };\n }, [isOpen]);\n\n const toggleOpen = React.useCallback(() => {\n setIsOpen((prev) => !prev);\n }, []);\n\n const closeChat = React.useCallback(() => {\n textareaRef.current?.blur();\n setIsOpen(false);\n }, []);\n\n const submitMessage = React.useCallback(() => {\n const nextInput = input.trim();\n if (!nextInput || isGenerating) {\n return;\n }\n void sendMessage({\n text: nextInput,\n });\n setInput(\"\");\n textareaRef.current?.focus();\n }, [sendMessage, input, isGenerating, setInput]);\n\n const handleSubmit = React.useCallback(\n (event: React.FormEvent) => {\n event.preventDefault();\n submitMessage();\n },\n [submitMessage],\n );\n\n const handleInputKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (event.key !== \"Enter\") {\n return;\n }\n\n if (event.shiftKey || event.nativeEvent.isComposing) {\n return;\n }\n\n event.preventDefault();\n submitMessage();\n },\n [submitMessage],\n );\n\n const handleFocusInput = React.useCallback(() => {\n setIsInputFocused(true);\n }, []);\n\n const handleBlurInput = React.useCallback(() => {\n setIsInputFocused(false);\n }, []);\n\n const mobilePanelHeight =\n visualViewportHeight > 0 ? `${Math.round(visualViewportHeight)}px` : \"100dvh\";\n const mobilePanelTop =\n visualViewportOffsetTop > 0 ? `${Math.round(visualViewportOffsetTop)}px` : \"0px\";\n\n const panelStyle: React.CSSProperties = isMobileViewport\n ? {\n position: \"fixed\",\n top: mobilePanelTop,\n left: \"0\",\n right: \"0\",\n width: \"100vw\",\n height: mobilePanelHeight,\n borderRadius: \"0\",\n background: \"#ffffff\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n zIndex: 1001,\n }\n : {\n position: \"fixed\",\n right: \"16px\",\n bottom: \"96px\",\n width: \"min(700px, calc(100vw - 20px))\",\n height: \"min(820px, calc(100vh - 116px))\",\n borderRadius: \"20px\",\n background: \"#ffffff\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n zIndex: 1000,\n boxShadow:\n \"0 20px 48px rgba(15, 23, 42, 0.16), 0 3px 10px rgba(15, 23, 42, 0.08)\",\n };\n\n const emptyState = (\n <EmptyState isMobileViewport={isMobileViewport} />\n );\n\n return (\n <div data-openchatwidget-root=\"\">\n <style>{themeCss}</style>\n <ChatToggleButton\n ref={toggleRef}\n isOpen={isOpen}\n isMobile={isMobileViewport}\n onToggle={toggleOpen}\n unreadCount={0}\n logoSrc={HELPFUL_CHAT_LOGO_DATA_URI}\n />\n <WidgetPanel\n isOpen={isOpen}\n isMobileViewport={isMobileViewport}\n title={DEFAULT_TITLE}\n onClose={closeChat}\n panelStyle={panelStyle}\n panelRef={panelRef}\n logoSrc={HELPFUL_CHAT_LOGO_DATA_URI}\n >\n <div\n style={{\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n flex: 1,\n minHeight: 0,\n }}\n >\n <MessageList\n messages={messages}\n isGenerating={isGenerating}\n error={error}\n isMobileViewport={isMobileViewport}\n messageContainerRef={messageListRef}\n getMessageText={(parts) => extractMessageText({ parts })}\n renderMarkdown={(text) => <MarkdownMessage text={text} />}\n emptyState={emptyState}\n hasApiKey\n />\n <Composer\n input={input}\n setInput={setInput}\n placeholder={DEFAULT_PLACEHOLDER}\n isGenerating={isGenerating}\n canSend={canSend}\n isMobileViewport={isMobileViewport}\n isInputFocused={isInputFocused}\n textareaRef={textareaRef}\n onSubmit={handleSubmit}\n onStop={() => void stop()}\n onInputKeyDown={handleInputKeyDown}\n onFocus={handleFocusInput}\n onBlur={handleBlurInput}\n logoSrc={HELPFUL_CHAT_LOGO_DATA_URI}\n />\n </div>\n </WidgetPanel>\n </div>\n );\n}\n\nexport default OpenChatWidget;\n","import * as React from \"react\";\nimport { HELPFUL_CHAT_LOGO_DATA_URI } from \"../theme\";\n\ntype OpenChatWidgetToggleProps = {\n isOpen: boolean;\n onToggle: () => void;\n isMobile?: boolean;\n logoSrc?: string;\n unreadCount?: number;\n};\n\nconst DEFAULT_LOGO_SRC = HELPFUL_CHAT_LOGO_DATA_URI;\nconst BUTTON_SIZE_PX = 68;\nconst ICON_SIZE_PX = 54;\nconst CLOSE_ICON_SIZE_PX = 22;\nconst MOBILE_BUTTON_SIZE_PX = 56;\nconst MOBILE_ICON_SIZE_PX = 42;\nconst MOBILE_CLOSE_ICON_SIZE_PX = 18;\n\nfunction CloseIcon({ size }: { size: number }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width={size}\n height={size}\n fill=\"none\"\n aria-hidden=\"true\"\n style={{ display: \"block\" }}\n >\n <path\n d=\"M6 6l12 12M18 6 6 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n />\n </svg>\n );\n}\n\nexport const ChatToggleButton = React.forwardRef<\n HTMLButtonElement,\n OpenChatWidgetToggleProps\n>(function ChatToggleButton(\n {\n isOpen,\n onToggle,\n isMobile = false,\n logoSrc = DEFAULT_LOGO_SRC,\n unreadCount = 0,\n },\n ref,\n) {\n const [logoLoadFailed, setLogoLoadFailed] = React.useState(false);\n const buttonSize = isMobile ? MOBILE_BUTTON_SIZE_PX : BUTTON_SIZE_PX;\n const iconSize = isMobile ? MOBILE_ICON_SIZE_PX : ICON_SIZE_PX;\n const closeIconSize = isMobile ? MOBILE_CLOSE_ICON_SIZE_PX : CLOSE_ICON_SIZE_PX;\n const offset = isMobile ? \"12px\" : \"16px\";\n const hasUnread = !isOpen && unreadCount > 0;\n const unreadLabel = unreadCount > 99 ? \"99+\" : String(unreadCount);\n\n return (\n <button\n ref={ref}\n type=\"button\"\n onClick={onToggle}\n aria-label={isOpen ? \"Close chat\" : \"Open chat\"}\n style={{\n position: \"fixed\",\n right: offset,\n bottom: offset,\n borderRadius: \"9999px\",\n border: \"none\",\n width: `${buttonSize}px`,\n height: `${buttonSize}px`,\n padding: \"0\",\n background: isOpen ? \"#111827\" : \"#00E46A\",\n color: \"#ffffff\",\n cursor: \"pointer\",\n zIndex: 1000,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {hasUnread ? (\n <span\n aria-label={`${unreadCount} unread support message${unreadCount === 1 ? \"\" : \"s\"}`}\n style={{\n position: \"absolute\",\n top: isMobile ? \"-2px\" : \"0px\",\n right: isMobile ? \"-2px\" : \"0px\",\n minWidth: isMobile ? \"18px\" : \"20px\",\n height: isMobile ? \"18px\" : \"20px\",\n borderRadius: \"9999px\",\n padding: \"0 5px\",\n background: \"#ef4444\",\n color: \"#ffffff\",\n fontSize: isMobile ? \"10px\" : \"11px\",\n fontWeight: 700,\n lineHeight: 1,\n border: \"1.5px solid #ffffff\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {unreadLabel}\n </span>\n ) : null}\n {isOpen ? (\n <CloseIcon size={closeIconSize} />\n ) : !logoLoadFailed ? (\n <img\n src={logoSrc}\n alt=\"\"\n aria-hidden=\"true\"\n width={iconSize}\n height={iconSize}\n onError={() => setLogoLoadFailed(true)}\n style={{\n display: \"block\",\n filter: \"brightness(0) invert(1)\",\n }}\n />\n ) : (\n <span aria-hidden=\"true\" style={{ fontSize: \"24px\", lineHeight: 1 }}>\n +\n </span>\n )}\n </button>\n );\n});\n","export const HELPFUL_CHAT_LOGO_DATA_URI =\n \"data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cg clip-path='url(%23clip0_10_20)'%3E %3Cmask id='mask0_10_20' style='mask-type:luminance' maskUnits='userSpaceOnUse' x='-20' y='0' width='240' height='200'%3E %3Cpath d='M220 0H-20V200H220V0Z' fill='white'/%3E %3Cpath d='M-20 76C0 64 20 88 40 76C60 64 80 88 100 76C120 64 140 88 160 76C180 64 200 88 220 76V102C200 114 180 90 160 102C140 114 120 90 100 102C80 114 60 90 40 102C20 114 0 90 -20 102V76Z' fill='black'/%3E %3C/mask%3E %3Cg mask='url(%23mask0_10_20)'%3E %3Cpath d='M100 156C143.078 156 178 125.555 178 88C178 50.4446 143.078 20 100 20C56.9218 20 22 50.4446 22 88C22 125.555 56.9218 156 100 156Z' fill='%2300E46A'/%3E %3Cpath d='M76 146L64 184L106 152L76 146Z' fill='%2300E46A'/%3E %3C/g%3E %3C/g%3E %3Cdefs%3E %3CclipPath id='clip0_10_20'%3E %3Crect width='200' height='200' fill='white'/%3E %3C/clipPath%3E %3C/defs%3E %3C/svg%3E\";\n\nconst OPENCHAT_THEME_SCOPE = \"[data-openchatwidget-root]\";\n\nexport function buildOpenChatWidgetThemeCss(scopeSelector = OPENCHAT_THEME_SCOPE) {\n return `\n@import url(\"https://fonts.googleapis.com/css2?family=Sora:wght@600;700&family=Space+Grotesk:wght@400;500;700&display=swap\");\n\n${scopeSelector},\n${scopeSelector} *,\n${scopeSelector} *::before,\n${scopeSelector} *::after {\n box-sizing: border-box;\n}\n\n${scopeSelector} {\n color: #1b1d22;\n font-size: 16px;\n line-height: 1.4;\n font-family: \"Space Grotesk\", \"Avenir Next\", \"Segoe UI\", sans-serif;\n text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n${scopeSelector} button,\n${scopeSelector} input,\n${scopeSelector} select,\n${scopeSelector} textarea {\n font: inherit;\n color: inherit;\n}\n\n@keyframes helpfulChatDotPulse {\n 0%, 100% {\n opacity: 0.2;\n transform: translateY(0);\n }\n 50% {\n opacity: 1;\n transform: translateY(-2px);\n }\n}\n\n@keyframes helpfulChatEmptyFadeIn {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n`;\n}\n","import * as React from \"react\";\nimport { HELPFUL_CHAT_LOGO_DATA_URI } from \"../theme\";\n\ntype WidgetPanelProps = {\n isOpen: boolean;\n isMobileViewport: boolean;\n title: string;\n onClose: () => void;\n panelStyle: React.CSSProperties;\n panelRef: React.RefObject<HTMLElement | null>;\n logoSrc?: string;\n activeSupport?: {\n name: string;\n pictureUrl?: string | null;\n isOnline?: boolean;\n statusLabel?: string;\n } | null;\n children: React.ReactNode;\n};\n\nconst DEFAULT_LOGO_SRC = HELPFUL_CHAT_LOGO_DATA_URI;\n\nexport function WidgetPanel({\n isOpen,\n isMobileViewport,\n title,\n onClose,\n panelStyle,\n panelRef,\n logoSrc = DEFAULT_LOGO_SRC,\n activeSupport,\n children,\n}: WidgetPanelProps) {\n if (!isOpen) {\n return null;\n }\n\n return (\n <section ref={panelRef} style={panelStyle} aria-label={title}>\n <header\n style={{\n padding: isMobileViewport\n ? \"calc(8px + env(safe-area-inset-top, 0px)) 14px 8px\"\n : \"14px 16px 8px\",\n display: \"grid\",\n gridTemplateColumns: \"36px minmax(0, 1fr) 36px\",\n alignItems: \"center\",\n gap: \"10px\",\n }}\n >\n <img\n src={logoSrc}\n alt=\"\"\n aria-hidden=\"true\"\n width={36}\n height={36}\n style={{ display: \"block\" }}\n />\n {activeSupport ? (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"8px\",\n minWidth: 0,\n }}\n >\n <div\n style={{\n position: \"relative\",\n width: \"30px\",\n height: \"30px\",\n borderRadius: \"9999px\",\n overflow: \"hidden\",\n background: \"#e2e8f0\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"#334155\",\n fontSize: \"11px\",\n fontWeight: 600,\n flexShrink: 0,\n }}\n >\n {activeSupport.pictureUrl ? (\n <img\n src={activeSupport.pictureUrl}\n alt=\"\"\n aria-hidden=\"true\"\n width={30}\n height={30}\n style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\" }}\n />\n ) : (\n <span>{activeSupport.name.slice(0, 1).toUpperCase()}</span>\n )}\n {activeSupport.isOnline ? (\n <span\n aria-hidden=\"true\"\n style={{\n position: \"absolute\",\n right: \"1px\",\n bottom: \"1px\",\n width: \"8px\",\n height: \"8px\",\n borderRadius: \"9999px\",\n background: \"#22c55e\",\n border: \"1.5px solid #ffffff\",\n }}\n />\n ) : null}\n </div>\n <div\n style={{\n minWidth: 0,\n }}\n >\n <p\n style={{\n margin: 0,\n fontSize: isMobileViewport ? \"12px\" : \"13px\",\n lineHeight: 1.2,\n color: \"#0f172a\",\n fontWeight: 600,\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }}\n >\n {activeSupport.name}\n </p>\n <p\n style={{\n margin: \"1px 0 0\",\n fontSize: \"11px\",\n lineHeight: 1.2,\n color: activeSupport.isOnline ? \"#166534\" : \"#64748b\",\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }}\n >\n {activeSupport.statusLabel ?? (activeSupport.isOnline ? \"Online now\" : \"Offline\")}\n </p>\n </div>\n </div>\n ) : (\n <div />\n )}\n <button\n type=\"button\"\n onClick={onClose}\n aria-label=\"Close chat\"\n style={{\n width: isMobileViewport ? \"36px\" : \"32px\",\n height: isMobileViewport ? \"36px\" : \"32px\",\n borderRadius: \"9999px\",\n border: \"none\",\n background: \"transparent\",\n color: \"#4b5563\",\n cursor: \"pointer\",\n fontSize: \"20px\",\n lineHeight: 1,\n }}\n >\n x\n </button>\n </header>\n {children}\n </section>\n );\n}\n","import * as React from \"react\";\n\ntype MessageListMessage = {\n id: string;\n role: string;\n parts: ReadonlyArray<unknown>;\n};\n\ntype MessageDecoration = {\n isSystem?: boolean;\n avatarUrl?: string;\n avatarFallbackLabel?: string;\n assistantBubble?: boolean;\n messageTimestampLabel?: string;\n};\n\ntype WidgetMessageListProps = {\n messages: ReadonlyArray<MessageListMessage>;\n isGenerating: boolean;\n error?: Error;\n messageContainerRef: React.RefObject<HTMLDivElement | null>;\n isMobileViewport: boolean;\n getMessageText: (parts: ReadonlyArray<unknown>) => string;\n renderMarkdown: (text: string) => React.ReactNode;\n messageDecorations?: Record<string, MessageDecoration | undefined>;\n hasApiKey?: boolean;\n emptyState?: React.ReactNode;\n};\n\nfunction getAvatarFallback(label?: string) {\n if (!label || label.trim().length === 0) {\n return \"S\";\n }\n\n const words = label\n .trim()\n .split(/\\s+/)\n .filter((value) => value.length > 0)\n .slice(0, 2);\n if (words.length === 0) {\n return \"S\";\n }\n\n return words.map((word) => word[0]?.toUpperCase() ?? \"\").join(\"\");\n}\n\nexport function MessageList({\n messages,\n isGenerating,\n error,\n messageContainerRef,\n isMobileViewport,\n getMessageText,\n renderMarkdown,\n messageDecorations,\n hasApiKey = true,\n emptyState,\n}: WidgetMessageListProps) {\n return (\n <div\n ref={messageContainerRef}\n style={{\n padding: isMobileViewport ? \"10px 14px 12px\" : \"8px 18px 14px\",\n overflowY: \"auto\",\n WebkitOverflowScrolling: \"touch\",\n overscrollBehaviorY: \"contain\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: isMobileViewport ? \"16px\" : \"14px\",\n flex: 1,\n }}\n >\n {messages.length === 0 ? (\n <div\n style={{\n padding: isMobileViewport ? \"4px 2px 2px\" : \"2px 2px 4px\",\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"100%\",\n }}\n >\n {emptyState ?? null}\n </div>\n ) : null}\n\n {messages.map((message) => {\n const text = getMessageText(message.parts);\n if (!text.trim()) {\n return null;\n }\n\n const decoration = messageDecorations?.[message.id];\n const isUser = message.role === \"user\";\n const isSystem = Boolean(decoration?.isSystem);\n const messageTimestampLabel = decoration?.messageTimestampLabel;\n const showAssistantAvatar =\n !isUser && !isSystem && Boolean(decoration?.avatarUrl || decoration?.assistantBubble);\n const article = (\n <article\n style={{\n alignSelf: isSystem ? \"center\" : isUser ? \"flex-end\" : \"flex-start\",\n background: isSystem ? \"transparent\" : isUser ? \"#f3f4f6\" : \"transparent\",\n border: \"none\",\n borderRadius: isSystem ? \"0\" : isUser ? \"20px\" : \"0\",\n padding: isSystem\n ? \"0\"\n : isUser\n ? isMobileViewport\n ? \"11px 14px\"\n : \"10px 14px\"\n : \"0\",\n maxWidth: isSystem\n ? \"92%\"\n : isUser\n ? isMobileViewport\n ? \"90%\"\n : \"86%\"\n : showAssistantAvatar\n ? isMobileViewport\n ? \"88%\"\n : \"84%\"\n : \"100%\",\n color: isSystem ? \"#64748b\" : \"#111827\",\n fontStyle: isSystem ? \"italic\" : \"normal\",\n fontSize: isSystem ? \"13px\" : isMobileViewport ? \"16px\" : \"15px\",\n lineHeight: 1.5,\n boxShadow: \"none\",\n }}\n >\n {renderMarkdown(text)}\n </article>\n );\n\n const messageBody = showAssistantAvatar ? (\n <div\n style={{\n alignSelf: \"flex-start\",\n display: \"flex\",\n alignItems: \"flex-start\",\n gap: \"8px\",\n maxWidth: \"100%\",\n }}\n >\n <div\n style={{\n width: \"26px\",\n height: \"26px\",\n borderRadius: \"9999px\",\n background: \"#e2e8f0\",\n overflow: \"hidden\",\n flexShrink: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"#334155\",\n fontSize: \"11px\",\n fontWeight: 600,\n }}\n >\n {decoration?.avatarUrl ? (\n <img\n src={decoration.avatarUrl}\n alt=\"\"\n aria-hidden=\"true\"\n width={26}\n height={26}\n style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\" }}\n />\n ) : (\n <span>{getAvatarFallback(decoration?.avatarFallbackLabel)}</span>\n )}\n </div>\n {article}\n </div>\n ) : (\n article\n );\n\n return (\n <div\n key={message.id}\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: messageTimestampLabel ? \"3px\" : \"0\",\n }}\n >\n {messageBody}\n {messageTimestampLabel ? (\n <p\n style={{\n margin: 0,\n alignSelf: isSystem ? \"center\" : isUser ? \"flex-end\" : \"flex-start\",\n marginLeft: !isSystem && !isUser && showAssistantAvatar ? \"34px\" : \"0\",\n fontSize: \"10px\",\n lineHeight: 1.2,\n color: \"#94a3b8\",\n letterSpacing: \"0.01em\",\n }}\n >\n {messageTimestampLabel}\n </p>\n ) : null}\n </div>\n );\n })}\n\n {isGenerating ? (\n <div\n aria-label=\"Assistant is responding\"\n style={{\n alignSelf: \"flex-start\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"18px\",\n height: \"18px\",\n }}\n >\n <span\n style={{\n width: \"8px\",\n height: \"8px\",\n borderRadius: \"9999px\",\n background: \"#9ca3af\",\n animation: \"helpfulChatDotPulse 1.1s ease-in-out infinite\",\n }}\n />\n </div>\n ) : null}\n\n {error ? <p style={{ margin: 0, color: \"#b91c1c\", fontSize: \"14px\" }}>{error.message}</p> : null}\n\n {!hasApiKey ? <p style={{ margin: 0, color: \"#b91c1c\", fontSize: \"14px\" }}>Missing apiKey prop.</p> : null}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { HELPFUL_CHAT_LOGO_DATA_URI } from \"../theme\";\n\ntype WidgetComposerProps = {\n input: string;\n setInput: (nextInput: string) => void;\n placeholder: string;\n isGenerating: boolean;\n canSend: boolean;\n isMobileViewport: boolean;\n isInputFocused: boolean;\n textareaRef: React.RefObject<HTMLTextAreaElement | null>;\n onSubmit: (event: React.FormEvent) => void;\n onStop: () => void;\n onInputKeyDown: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;\n onFocus: () => void;\n onBlur: () => void;\n logoSrc?: string;\n};\n\nconst POWERED_BY_LOGO_SRC = HELPFUL_CHAT_LOGO_DATA_URI;\n\nfunction SendIcon() {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"17\"\n height=\"17\"\n fill=\"none\"\n aria-hidden=\"true\"\n style={{ display: \"block\" }}\n >\n <path\n d=\"M12 19V5m0 0-5 5m5-5 5 5\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction StopIcon() {\n return (\n <span\n aria-hidden=\"true\"\n style={{\n display: \"block\",\n width: \"10px\",\n height: \"10px\",\n background: \"currentColor\",\n borderRadius: \"2px\",\n }}\n />\n );\n}\n\nexport function Composer({\n input,\n setInput,\n placeholder,\n isGenerating,\n canSend,\n isMobileViewport,\n isInputFocused,\n textareaRef,\n onSubmit,\n onStop,\n onInputKeyDown,\n onFocus,\n onBlur,\n logoSrc = POWERED_BY_LOGO_SRC,\n}: WidgetComposerProps) {\n return (\n <form\n onSubmit={onSubmit}\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n padding: isMobileViewport\n ? \"8px 12px calc(10px + env(safe-area-inset-bottom, 0px))\"\n : \"0 16px 16px\",\n background: \"#ffffff\",\n gap: \"6px\",\n }}\n >\n <div\n style={{\n flex: 1,\n borderRadius: \"9999px\",\n border: isInputFocused ? \"1px solid #cbd5e1\" : \"1px solid #e5e7eb\",\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n padding: isMobileViewport ? \"4px 6px 4px 16px\" : \"4px 6px 4px 14px\",\n background: \"#ffffff\",\n minHeight: isMobileViewport ? \"52px\" : \"44px\",\n boxShadow: isInputFocused ? \"0 0 0 3px rgba(15, 23, 42, 0.06)\" : \"none\",\n transition: \"box-shadow 120ms ease, border-color 120ms ease\",\n }}\n >\n <textarea\n ref={textareaRef}\n value={input}\n onChange={(event) => setInput(event.target.value)}\n onKeyDown={onInputKeyDown}\n onFocus={onFocus}\n onBlur={onBlur}\n placeholder={placeholder}\n rows={1}\n enterKeyHint=\"send\"\n style={{\n flex: 1,\n border: \"none\",\n background: \"transparent\",\n outline: \"none\",\n padding: isMobileViewport ? \"12px 0 11px\" : \"10px 0 9px\",\n fontSize: isMobileViewport ? \"16px\" : \"15px\",\n lineHeight: 1.4,\n color: \"#111827\",\n resize: \"none\",\n }}\n />\n <button\n type={isGenerating ? \"button\" : \"submit\"}\n onClick={isGenerating ? onStop : undefined}\n disabled={isGenerating ? false : !canSend}\n aria-label={isGenerating ? \"Stop generating response\" : \"Send message\"}\n style={{\n width: isMobileViewport ? \"38px\" : \"36px\",\n height: isMobileViewport ? \"38px\" : \"36px\",\n borderRadius: \"9999px\",\n border: \"none\",\n background: isGenerating ? \"#111827\" : canSend ? \"#111827\" : \"#d1d5db\",\n color: \"#ffffff\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n cursor: \"pointer\",\n }}\n >\n {isGenerating ? <StopIcon /> : <SendIcon />}\n </button>\n </div>\n <a\n href=\"https://helpfulchatapp.com\"\n target=\"_blank\"\n rel=\"noreferrer\"\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"5px\",\n color: \"#9ca3af\",\n fontSize: \"10px\",\n lineHeight: 1.2,\n userSelect: \"none\",\n textDecoration: \"none\",\n width: \"100%\",\n }}\n >\n <img\n src={logoSrc}\n alt=\"\"\n width={10}\n height={10}\n style={{\n display: \"block\",\n opacity: 0.5,\n }}\n />\n <span>Powered by HelpfulChat</span>\n </a>\n </form>\n );\n}\n","import ReactMarkdown from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\n\nexport function MarkdownMessage({ text }: { text: string }) {\n return (\n <ReactMarkdown\n remarkPlugins={[remarkGfm]}\n components={{\n p: ({ children }) => <p style={{ margin: \"0 0 10px\", lineHeight: 1.5 }}>{children}</p>,\n h1: ({ children }) => (\n <h1 style={{ margin: \"0 0 10px\", fontSize: \"1.2rem\", lineHeight: 1.3 }}>{children}</h1>\n ),\n h2: ({ children }) => (\n <h2 style={{ margin: \"0 0 10px\", fontSize: \"1.1rem\", lineHeight: 1.3 }}>{children}</h2>\n ),\n h3: ({ children }) => (\n <h3 style={{ margin: \"0 0 10px\", fontSize: \"1rem\", lineHeight: 1.3 }}>{children}</h3>\n ),\n ul: ({ children }) => <ul style={{ margin: \"0 0 10px\", paddingLeft: \"20px\" }}>{children}</ul>,\n ol: ({ children }) => <ol style={{ margin: \"0 0 10px\", paddingLeft: \"20px\" }}>{children}</ol>,\n li: ({ children }) => <li style={{ marginBottom: \"6px\" }}>{children}</li>,\n a: ({ href, children }) => (\n <a href={href} style={{ color: \"#0f172a\", textDecoration: \"underline\" }} target=\"_blank\" rel=\"noreferrer\">\n {children}\n </a>\n ),\n code: ({ children }) => (\n <code\n style={{\n background: \"#f3f4f6\",\n borderRadius: \"6px\",\n padding: \"2px 6px\",\n fontFamily:\n 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace',\n fontSize: \"0.9em\",\n }}\n >\n {children}\n </code>\n ),\n pre: ({ children }) => (\n <pre\n style={{\n margin: \"0 0 10px\",\n background: \"#f9fafb\",\n borderRadius: \"10px\",\n border: \"1px solid #e5e7eb\",\n padding: \"10px 12px\",\n overflowX: \"auto\",\n }}\n >\n {children}\n </pre>\n ),\n blockquote: ({ children }) => (\n <blockquote\n style={{\n margin: \"0 0 10px\",\n paddingLeft: \"12px\",\n borderLeft: \"2px solid #e5e7eb\",\n color: \"#374151\",\n }}\n >\n {children}\n </blockquote>\n ),\n }}\n >\n {text}\n </ReactMarkdown>\n );\n}\n","import * as React from \"react\";\n\ntype EmptyStateProps = {\n isMobileViewport: boolean;\n children?: React.ReactNode;\n};\n\nexport function EmptyState({ isMobileViewport, children }: EmptyStateProps) {\n return (\n <section\n aria-label=\"Conversation introduction\"\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n minHeight: isMobileViewport ? \"110px\" : \"124px\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"12px\",\n width: \"100%\",\n animation: \"helpfulChatEmptyFadeIn 240ms ease-out both\",\n }}\n >\n <h2\n style={{\n margin: 0,\n color: \"#0f172a\",\n fontSize: isMobileViewport ? \"17px\" : \"18px\",\n lineHeight: 1.25,\n fontWeight: 500,\n letterSpacing: \"-0.005em\",\n textAlign: \"center\",\n }}\n >\n What can I help you with today?\n </h2>\n {children ? <div style={{ width: \"100%\" }}>{children}</div> : null}\n </div>\n </section>\n );\n}\n","export function extractMessageText(message: {\n content?: unknown;\n parts?: unknown;\n}) {\n if (typeof message?.content === \"string\") {\n return message.content;\n }\n\n if (!Array.isArray(message.parts)) {\n return \"\";\n }\n\n const textChunks = message.parts\n .map((part) => {\n if (!part || typeof part !== \"object\") {\n return \"\";\n }\n\n const typedPart = part as { type?: unknown; text?: unknown };\n if (typedPart.type !== \"text\" || typeof typedPart.text !== \"string\") {\n return \"\";\n }\n\n return typedPart.text;\n })\n .filter(Boolean);\n\n return textChunks.join(\"\");\n}\n","export { OpenChatWidget } from \"./OpenChatWidget\";\nexport type { OpenChatWidgetProps } from \"./OpenChatWidget\";\nexport { createOpenAI } from \"@ai-sdk/openai\";\nexport { convertToModelMessages, streamText } from \"ai\";\nexport type { UIMessage } from \"ai\";\n"],"mappings":";AAAA,YAAYA,YAAW;AACvB,SAAS,eAAe;AACxB,SAAS,4BAA4C;;;ACFrD,YAAY,WAAW;;;ACAhB,IAAM,6BACX;AAEF,IAAM,uBAAuB;AAEtB,SAAS,4BAA4B,gBAAgB,sBAAsB;AAChF,SAAO;AAAA;AAAA;AAAA,EAGP,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA;AAAA;AAAA;AAAA,EAIb,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA2Bf;;;AD5BM,cAgCF,YAhCE;AAlBN,IAAM,mBAAmB;AACzB,IAAM,iBAAiB;AACvB,IAAM,eAAe;AACrB,IAAM,qBAAqB;AAC3B,IAAM,wBAAwB;AAC9B,IAAM,sBAAsB;AAC5B,IAAM,4BAA4B;AAElC,SAAS,UAAU,EAAE,KAAK,GAAqB;AAC7C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MAC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AAA;AAAA,IACF;AAAA,KACF;AAEJ;;;ASnTA,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB,kBAAkB;","names":["React","ChatToggleButton","jsx","jsxs","DEFAULT_LOGO_SRC","jsx","jsxs","jsx","jsxs","jsx","jsx","jsxs","jsx","jsxs"]}
|
|
1
|
+
{"version":3,"sources":["../widget/src/OpenChatWidget.tsx","../widget/src/components/ChatToggleButton.tsx","../widget/src/theme.ts","../widget/src/components/WidgetPanel.tsx","../widget/src/components/MessageList.tsx","../widget/src/components/Composer.tsx","../widget/src/components/MarkdownMessage.tsx","../widget/src/components/EmptyState.tsx","../widget/src/utils/chat.ts","../widget/src/index.ts"],"sourcesContent":["import * as React from \"react\";\nimport { useChat } from \"@ai-sdk/react\";\nimport { DefaultChatTransport, type UIMessage } from \"ai\";\nimport { ChatToggleButton } from \"./components/ChatToggleButton\";\nimport { WidgetPanel } from \"./components/WidgetPanel\";\nimport { MessageList } from \"./components/MessageList\";\nimport { Composer } from \"./components/Composer\";\nimport { MarkdownMessage } from \"./components/MarkdownMessage\";\nimport { EmptyState } from \"./components/EmptyState\";\nimport { HELPFUL_CHAT_LOGO_DATA_URI, buildOpenChatWidgetThemeCss } from \"./theme\";\nimport { extractMessageText } from \"./utils/chat\";\n\nconst MOBILE_BREAKPOINT_PX = 768;\nconst DEFAULT_TITLE = \"Helpful Chat\";\nconst DEFAULT_PLACEHOLDER = \"Ask a question...\";\n\nexport type OpenChatWidgetProps = {\n url: string;\n};\n\nexport function OpenChatWidget({ url }: OpenChatWidgetProps) {\n const [input, setInput] = React.useState(\"\");\n const [isOpen, setIsOpen] = React.useState(false);\n const [isInputFocused, setIsInputFocused] = React.useState(false);\n const [isMobileViewport, setIsMobileViewport] = React.useState(() => {\n if (typeof window === \"undefined\") {\n return false;\n }\n return window.innerWidth <= MOBILE_BREAKPOINT_PX;\n });\n const [visualViewportHeight, setVisualViewportHeight] = React.useState(() => {\n if (typeof window === \"undefined\") {\n return 0;\n }\n return window.visualViewport?.height ?? window.innerHeight;\n });\n const [visualViewportOffsetTop, setVisualViewportOffsetTop] = React.useState(() => {\n if (typeof window === \"undefined\") {\n return 0;\n }\n return window.visualViewport?.offsetTop ?? 0;\n });\n const messageListRef = React.useRef<HTMLDivElement | null>(null);\n const textareaRef = React.useRef<HTMLTextAreaElement | null>(null);\n const panelRef = React.useRef<HTMLElement | null>(null);\n const toggleRef = React.useRef<HTMLButtonElement | null>(null);\n\n const transport = React.useMemo(\n () =>\n new DefaultChatTransport({\n api: url,\n }),\n [url],\n );\n const themeCss = React.useMemo(() => buildOpenChatWidgetThemeCss(), []);\n\n const {\n messages,\n sendMessage,\n status,\n error,\n stop,\n } = useChat<UIMessage>({\n transport,\n });\n\n const isGenerating = status === \"submitted\" || status === \"streaming\";\n const canSend = input.trim().length > 0 && !isGenerating;\n\n React.useEffect(() => {\n const handleResize = () => {\n setIsMobileViewport(window.innerWidth <= MOBILE_BREAKPOINT_PX);\n };\n handleResize();\n window.addEventListener(\"resize\", handleResize);\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n\n React.useEffect(() => {\n const handleViewportChange = () => {\n if (typeof window === \"undefined\") {\n return;\n }\n setVisualViewportHeight(window.visualViewport?.height ?? window.innerHeight);\n setVisualViewportOffsetTop(window.visualViewport?.offsetTop ?? 0);\n };\n\n handleViewportChange();\n window.addEventListener(\"resize\", handleViewportChange);\n window.visualViewport?.addEventListener(\"resize\", handleViewportChange);\n window.visualViewport?.addEventListener(\"scroll\", handleViewportChange);\n\n return () => {\n window.removeEventListener(\"resize\", handleViewportChange);\n window.visualViewport?.removeEventListener(\"resize\", handleViewportChange);\n window.visualViewport?.removeEventListener(\"scroll\", handleViewportChange);\n };\n }, []);\n\n React.useEffect(() => {\n if (!isMobileViewport || !isOpen || typeof document === \"undefined\") {\n return;\n }\n\n const { body } = document;\n const previousOverflow = body.style.overflow;\n const previousOverscroll = body.style.overscrollBehavior;\n body.style.overflow = \"hidden\";\n body.style.overscrollBehavior = \"none\";\n\n return () => {\n body.style.overflow = previousOverflow;\n body.style.overscrollBehavior = previousOverscroll;\n };\n }, [isMobileViewport, isOpen]);\n\n React.useEffect(() => {\n const scrollToBottom = () => {\n const container = messageListRef.current;\n if (!container) {\n return;\n }\n container.scrollTo({\n top: container.scrollHeight,\n behavior: isGenerating ? \"auto\" : \"smooth\",\n });\n };\n scrollToBottom();\n }, [messages, isGenerating]);\n\n React.useEffect(() => {\n if (!isOpen || typeof document === \"undefined\") {\n return;\n }\n\n const handlePointerDown = (event: PointerEvent) => {\n const target = event.target;\n if (!(target instanceof Node)) {\n return;\n }\n\n const clickedPanel = panelRef.current?.contains(target) ?? false;\n const clickedToggle = toggleRef.current?.contains(target) ?? false;\n if (!clickedPanel && !clickedToggle) {\n setIsOpen(false);\n }\n };\n\n document.addEventListener(\"pointerdown\", handlePointerDown);\n return () => {\n document.removeEventListener(\"pointerdown\", handlePointerDown);\n };\n }, [isOpen]);\n\n const toggleOpen = React.useCallback(() => {\n setIsOpen((prev) => !prev);\n }, []);\n\n const closeChat = React.useCallback(() => {\n textareaRef.current?.blur();\n setIsOpen(false);\n }, []);\n\n const submitMessage = React.useCallback(() => {\n const nextInput = input.trim();\n if (!nextInput || isGenerating) {\n return;\n }\n void sendMessage({\n text: nextInput,\n });\n setInput(\"\");\n textareaRef.current?.focus();\n }, [sendMessage, input, isGenerating, setInput]);\n\n const handleSubmit = React.useCallback(\n (event: React.FormEvent) => {\n event.preventDefault();\n submitMessage();\n },\n [submitMessage],\n );\n\n const handleInputKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (event.key !== \"Enter\") {\n return;\n }\n\n if (event.shiftKey || event.nativeEvent.isComposing) {\n return;\n }\n\n event.preventDefault();\n submitMessage();\n },\n [submitMessage],\n );\n\n const handleFocusInput = React.useCallback(() => {\n setIsInputFocused(true);\n }, []);\n\n const handleBlurInput = React.useCallback(() => {\n setIsInputFocused(false);\n }, []);\n\n const mobilePanelHeight =\n visualViewportHeight > 0 ? `${Math.round(visualViewportHeight)}px` : \"100dvh\";\n const mobilePanelTop =\n visualViewportOffsetTop > 0 ? `${Math.round(visualViewportOffsetTop)}px` : \"0px\";\n\n const panelStyle: React.CSSProperties = isMobileViewport\n ? {\n position: \"fixed\",\n top: mobilePanelTop,\n left: \"0\",\n right: \"0\",\n width: \"100vw\",\n height: mobilePanelHeight,\n borderRadius: \"0\",\n background: \"#ffffff\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n zIndex: 1001,\n }\n : {\n position: \"fixed\",\n right: \"16px\",\n bottom: \"96px\",\n width: \"min(700px, calc(100vw - 20px))\",\n height: \"min(820px, calc(100vh - 116px))\",\n borderRadius: \"20px\",\n background: \"#ffffff\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n zIndex: 1000,\n boxShadow:\n \"0 20px 48px rgba(15, 23, 42, 0.16), 0 3px 10px rgba(15, 23, 42, 0.08)\",\n };\n\n const emptyState = (\n <EmptyState isMobileViewport={isMobileViewport} />\n );\n\n return (\n <div data-openchatwidget-root=\"\">\n <style>{themeCss}</style>\n <ChatToggleButton\n ref={toggleRef}\n isOpen={isOpen}\n isMobile={isMobileViewport}\n onToggle={toggleOpen}\n unreadCount={0}\n logoSrc={HELPFUL_CHAT_LOGO_DATA_URI}\n />\n <WidgetPanel\n isOpen={isOpen}\n isMobileViewport={isMobileViewport}\n title={DEFAULT_TITLE}\n onClose={closeChat}\n panelStyle={panelStyle}\n panelRef={panelRef}\n logoSrc={HELPFUL_CHAT_LOGO_DATA_URI}\n >\n <div\n style={{\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n flex: 1,\n minHeight: 0,\n }}\n >\n <MessageList\n messages={messages}\n isGenerating={isGenerating}\n error={error}\n isMobileViewport={isMobileViewport}\n messageContainerRef={messageListRef}\n getMessageText={(parts) => extractMessageText({ parts })}\n renderMarkdown={(text) => <MarkdownMessage text={text} />}\n emptyState={emptyState}\n hasApiKey\n />\n <Composer\n input={input}\n setInput={setInput}\n placeholder={DEFAULT_PLACEHOLDER}\n isGenerating={isGenerating}\n canSend={canSend}\n isMobileViewport={isMobileViewport}\n isInputFocused={isInputFocused}\n textareaRef={textareaRef}\n onSubmit={handleSubmit}\n onStop={() => void stop()}\n onInputKeyDown={handleInputKeyDown}\n onFocus={handleFocusInput}\n onBlur={handleBlurInput}\n logoSrc={HELPFUL_CHAT_LOGO_DATA_URI}\n />\n </div>\n </WidgetPanel>\n </div>\n );\n}\n\nexport default OpenChatWidget;\n","import * as React from \"react\";\nimport { HELPFUL_CHAT_LOGO_DATA_URI } from \"../theme\";\n\ntype OpenChatWidgetToggleProps = {\n isOpen: boolean;\n onToggle: () => void;\n isMobile?: boolean;\n logoSrc?: string;\n unreadCount?: number;\n};\n\nconst DEFAULT_LOGO_SRC = HELPFUL_CHAT_LOGO_DATA_URI;\nconst BUTTON_SIZE_PX = 68;\nconst ICON_SIZE_PX = 54;\nconst CLOSE_ICON_SIZE_PX = 22;\nconst MOBILE_BUTTON_SIZE_PX = 56;\nconst MOBILE_ICON_SIZE_PX = 42;\nconst MOBILE_CLOSE_ICON_SIZE_PX = 18;\n\nfunction CloseIcon({ size }: { size: number }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width={size}\n height={size}\n fill=\"none\"\n aria-hidden=\"true\"\n style={{ display: \"block\" }}\n >\n <path\n d=\"M6 6l12 12M18 6 6 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n />\n </svg>\n );\n}\n\nexport const ChatToggleButton = React.forwardRef<\n HTMLButtonElement,\n OpenChatWidgetToggleProps\n>(function ChatToggleButton(\n {\n isOpen,\n onToggle,\n isMobile = false,\n logoSrc = DEFAULT_LOGO_SRC,\n unreadCount = 0,\n },\n ref,\n) {\n const [logoLoadFailed, setLogoLoadFailed] = React.useState(false);\n const buttonSize = isMobile ? MOBILE_BUTTON_SIZE_PX : BUTTON_SIZE_PX;\n const iconSize = isMobile ? MOBILE_ICON_SIZE_PX : ICON_SIZE_PX;\n const closeIconSize = isMobile ? MOBILE_CLOSE_ICON_SIZE_PX : CLOSE_ICON_SIZE_PX;\n const offset = isMobile ? \"12px\" : \"16px\";\n const hasUnread = !isOpen && unreadCount > 0;\n const unreadLabel = unreadCount > 99 ? \"99+\" : String(unreadCount);\n\n return (\n <button\n ref={ref}\n type=\"button\"\n onClick={onToggle}\n aria-label={isOpen ? \"Close chat\" : \"Open chat\"}\n style={{\n position: \"fixed\",\n right: offset,\n bottom: offset,\n borderRadius: \"9999px\",\n border: \"none\",\n width: `${buttonSize}px`,\n height: `${buttonSize}px`,\n padding: \"0\",\n background: isOpen ? \"#111827\" : \"#00E46A\",\n color: \"#ffffff\",\n cursor: \"pointer\",\n zIndex: 1000,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {hasUnread ? (\n <span\n aria-label={`${unreadCount} unread support message${unreadCount === 1 ? \"\" : \"s\"}`}\n style={{\n position: \"absolute\",\n top: isMobile ? \"-2px\" : \"0px\",\n right: isMobile ? \"-2px\" : \"0px\",\n minWidth: isMobile ? \"18px\" : \"20px\",\n height: isMobile ? \"18px\" : \"20px\",\n borderRadius: \"9999px\",\n padding: \"0 5px\",\n background: \"#ef4444\",\n color: \"#ffffff\",\n fontSize: isMobile ? \"10px\" : \"11px\",\n fontWeight: 700,\n lineHeight: 1,\n border: \"1.5px solid #ffffff\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {unreadLabel}\n </span>\n ) : null}\n {isOpen ? (\n <CloseIcon size={closeIconSize} />\n ) : !logoLoadFailed ? (\n <img\n src={logoSrc}\n alt=\"\"\n aria-hidden=\"true\"\n width={iconSize}\n height={iconSize}\n onError={() => setLogoLoadFailed(true)}\n style={{\n display: \"block\",\n filter: \"brightness(0) invert(1)\",\n }}\n />\n ) : (\n <span aria-hidden=\"true\" style={{ fontSize: \"24px\", lineHeight: 1 }}>\n +\n </span>\n )}\n </button>\n );\n});\n","export const HELPFUL_CHAT_LOGO_DATA_URI =\n \"data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cg clip-path='url(%23clip0_10_20)'%3E %3Cmask id='mask0_10_20' style='mask-type:luminance' maskUnits='userSpaceOnUse' x='-20' y='0' width='240' height='200'%3E %3Cpath d='M220 0H-20V200H220V0Z' fill='white'/%3E %3Cpath d='M-20 76C0 64 20 88 40 76C60 64 80 88 100 76C120 64 140 88 160 76C180 64 200 88 220 76V102C200 114 180 90 160 102C140 114 120 90 100 102C80 114 60 90 40 102C20 114 0 90 -20 102V76Z' fill='black'/%3E %3C/mask%3E %3Cg mask='url(%23mask0_10_20)'%3E %3Cpath d='M100 156C143.078 156 178 125.555 178 88C178 50.4446 143.078 20 100 20C56.9218 20 22 50.4446 22 88C22 125.555 56.9218 156 100 156Z' fill='%2300E46A'/%3E %3Cpath d='M76 146L64 184L106 152L76 146Z' fill='%2300E46A'/%3E %3C/g%3E %3C/g%3E %3Cdefs%3E %3CclipPath id='clip0_10_20'%3E %3Crect width='200' height='200' fill='white'/%3E %3C/clipPath%3E %3C/defs%3E %3C/svg%3E\";\n\nconst OPENCHAT_THEME_SCOPE = \"[data-openchatwidget-root]\";\n\nexport function buildOpenChatWidgetThemeCss(scopeSelector = OPENCHAT_THEME_SCOPE) {\n return `\n@import url(\"https://fonts.googleapis.com/css2?family=Sora:wght@600;700&family=Space+Grotesk:wght@400;500;700&display=swap\");\n\n${scopeSelector},\n${scopeSelector} *,\n${scopeSelector} *::before,\n${scopeSelector} *::after {\n box-sizing: border-box;\n}\n\n${scopeSelector} {\n color: #1b1d22;\n font-size: 16px;\n line-height: 1.4;\n font-family: \"Space Grotesk\", \"Avenir Next\", \"Segoe UI\", sans-serif;\n text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n${scopeSelector} button,\n${scopeSelector} input,\n${scopeSelector} select,\n${scopeSelector} textarea {\n font: inherit;\n color: inherit;\n}\n\n@keyframes helpfulChatDotPulse {\n 0%, 100% {\n opacity: 0.2;\n transform: translateY(0);\n }\n 50% {\n opacity: 1;\n transform: translateY(-2px);\n }\n}\n\n@keyframes helpfulChatEmptyFadeIn {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n`;\n}\n","import * as React from \"react\";\nimport { HELPFUL_CHAT_LOGO_DATA_URI } from \"../theme\";\n\ntype WidgetPanelProps = {\n isOpen: boolean;\n isMobileViewport: boolean;\n title: string;\n onClose: () => void;\n panelStyle: React.CSSProperties;\n panelRef: React.RefObject<HTMLElement | null>;\n logoSrc?: string;\n activeSupport?: {\n name: string;\n pictureUrl?: string | null;\n isOnline?: boolean;\n statusLabel?: string;\n } | null;\n children: React.ReactNode;\n};\n\nconst DEFAULT_LOGO_SRC = HELPFUL_CHAT_LOGO_DATA_URI;\n\nexport function WidgetPanel({\n isOpen,\n isMobileViewport,\n title,\n onClose,\n panelStyle,\n panelRef,\n logoSrc = DEFAULT_LOGO_SRC,\n activeSupport,\n children,\n}: WidgetPanelProps) {\n if (!isOpen) {\n return null;\n }\n\n return (\n <section ref={panelRef} style={panelStyle} aria-label={title}>\n <header\n style={{\n padding: isMobileViewport\n ? \"calc(8px + env(safe-area-inset-top, 0px)) 14px 8px\"\n : \"14px 16px 8px\",\n display: \"grid\",\n gridTemplateColumns: \"36px minmax(0, 1fr) 36px\",\n alignItems: \"center\",\n gap: \"10px\",\n }}\n >\n <img\n src={logoSrc}\n alt=\"\"\n aria-hidden=\"true\"\n width={36}\n height={36}\n style={{ display: \"block\" }}\n />\n {activeSupport ? (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"8px\",\n minWidth: 0,\n }}\n >\n <div\n style={{\n position: \"relative\",\n width: \"30px\",\n height: \"30px\",\n borderRadius: \"9999px\",\n overflow: \"hidden\",\n background: \"#e2e8f0\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"#334155\",\n fontSize: \"11px\",\n fontWeight: 600,\n flexShrink: 0,\n }}\n >\n {activeSupport.pictureUrl ? (\n <img\n src={activeSupport.pictureUrl}\n alt=\"\"\n aria-hidden=\"true\"\n width={30}\n height={30}\n style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\" }}\n />\n ) : (\n <span>{activeSupport.name.slice(0, 1).toUpperCase()}</span>\n )}\n {activeSupport.isOnline ? (\n <span\n aria-hidden=\"true\"\n style={{\n position: \"absolute\",\n right: \"1px\",\n bottom: \"1px\",\n width: \"8px\",\n height: \"8px\",\n borderRadius: \"9999px\",\n background: \"#22c55e\",\n border: \"1.5px solid #ffffff\",\n }}\n />\n ) : null}\n </div>\n <div\n style={{\n minWidth: 0,\n }}\n >\n <p\n style={{\n margin: 0,\n fontSize: isMobileViewport ? \"12px\" : \"13px\",\n lineHeight: 1.2,\n color: \"#0f172a\",\n fontWeight: 600,\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }}\n >\n {activeSupport.name}\n </p>\n <p\n style={{\n margin: \"1px 0 0\",\n fontSize: \"11px\",\n lineHeight: 1.2,\n color: activeSupport.isOnline ? \"#166534\" : \"#64748b\",\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }}\n >\n {activeSupport.statusLabel ?? (activeSupport.isOnline ? \"Online now\" : \"Offline\")}\n </p>\n </div>\n </div>\n ) : (\n <div />\n )}\n <button\n type=\"button\"\n onClick={onClose}\n aria-label=\"Close chat\"\n style={{\n width: isMobileViewport ? \"36px\" : \"32px\",\n height: isMobileViewport ? \"36px\" : \"32px\",\n borderRadius: \"9999px\",\n border: \"none\",\n background: \"transparent\",\n color: \"#4b5563\",\n cursor: \"pointer\",\n fontSize: \"20px\",\n lineHeight: 1,\n }}\n >\n x\n </button>\n </header>\n {children}\n </section>\n );\n}\n","import * as React from \"react\";\n\ntype MessageListMessage = {\n id: string;\n role: string;\n parts: ReadonlyArray<unknown>;\n};\n\ntype MessageDecoration = {\n isSystem?: boolean;\n avatarUrl?: string;\n avatarFallbackLabel?: string;\n assistantBubble?: boolean;\n messageTimestampLabel?: string;\n};\n\ntype WidgetMessageListProps = {\n messages: ReadonlyArray<MessageListMessage>;\n isGenerating: boolean;\n error?: Error;\n messageContainerRef: React.RefObject<HTMLDivElement | null>;\n isMobileViewport: boolean;\n getMessageText: (parts: ReadonlyArray<unknown>) => string;\n renderMarkdown: (text: string) => React.ReactNode;\n messageDecorations?: Record<string, MessageDecoration | undefined>;\n hasApiKey?: boolean;\n emptyState?: React.ReactNode;\n};\n\nfunction getAvatarFallback(label?: string) {\n if (!label || label.trim().length === 0) {\n return \"S\";\n }\n\n const words = label\n .trim()\n .split(/\\s+/)\n .filter((value) => value.length > 0)\n .slice(0, 2);\n if (words.length === 0) {\n return \"S\";\n }\n\n return words.map((word) => word[0]?.toUpperCase() ?? \"\").join(\"\");\n}\n\nexport function MessageList({\n messages,\n isGenerating,\n error,\n messageContainerRef,\n isMobileViewport,\n getMessageText,\n renderMarkdown,\n messageDecorations,\n hasApiKey = true,\n emptyState,\n}: WidgetMessageListProps) {\n return (\n <div\n ref={messageContainerRef}\n style={{\n padding: isMobileViewport ? \"10px 14px 12px\" : \"8px 18px 14px\",\n overflowY: \"auto\",\n WebkitOverflowScrolling: \"touch\",\n overscrollBehaviorY: \"contain\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: isMobileViewport ? \"16px\" : \"14px\",\n flex: 1,\n }}\n >\n {messages.length === 0 ? (\n <div\n style={{\n padding: isMobileViewport ? \"4px 2px 2px\" : \"2px 2px 4px\",\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"100%\",\n }}\n >\n {emptyState ?? null}\n </div>\n ) : null}\n\n {messages.map((message) => {\n const text = getMessageText(message.parts);\n if (!text.trim()) {\n return null;\n }\n\n const decoration = messageDecorations?.[message.id];\n const isUser = message.role === \"user\";\n const isSystem = Boolean(decoration?.isSystem);\n const messageTimestampLabel = decoration?.messageTimestampLabel;\n const showAssistantAvatar =\n !isUser && !isSystem && Boolean(decoration?.avatarUrl || decoration?.assistantBubble);\n const article = (\n <article\n style={{\n alignSelf: isSystem ? \"center\" : isUser ? \"flex-end\" : \"flex-start\",\n background: isSystem ? \"transparent\" : isUser ? \"#f3f4f6\" : \"transparent\",\n border: \"none\",\n borderRadius: isSystem ? \"0\" : isUser ? \"20px\" : \"0\",\n padding: isSystem\n ? \"0\"\n : isUser\n ? isMobileViewport\n ? \"11px 14px\"\n : \"10px 14px\"\n : \"0\",\n maxWidth: isSystem\n ? \"92%\"\n : isUser\n ? isMobileViewport\n ? \"90%\"\n : \"86%\"\n : showAssistantAvatar\n ? isMobileViewport\n ? \"88%\"\n : \"84%\"\n : \"100%\",\n color: isSystem ? \"#64748b\" : \"#111827\",\n fontStyle: isSystem ? \"italic\" : \"normal\",\n fontSize: isSystem ? \"13px\" : isMobileViewport ? \"16px\" : \"15px\",\n lineHeight: 1.5,\n boxShadow: \"none\",\n }}\n >\n {renderMarkdown(text)}\n </article>\n );\n\n const messageBody = showAssistantAvatar ? (\n <div\n style={{\n alignSelf: \"flex-start\",\n display: \"flex\",\n alignItems: \"flex-start\",\n gap: \"8px\",\n maxWidth: \"100%\",\n }}\n >\n <div\n style={{\n width: \"26px\",\n height: \"26px\",\n borderRadius: \"9999px\",\n background: \"#e2e8f0\",\n overflow: \"hidden\",\n flexShrink: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"#334155\",\n fontSize: \"11px\",\n fontWeight: 600,\n }}\n >\n {decoration?.avatarUrl ? (\n <img\n src={decoration.avatarUrl}\n alt=\"\"\n aria-hidden=\"true\"\n width={26}\n height={26}\n style={{ display: \"block\", width: \"100%\", height: \"100%\", objectFit: \"cover\" }}\n />\n ) : (\n <span>{getAvatarFallback(decoration?.avatarFallbackLabel)}</span>\n )}\n </div>\n {article}\n </div>\n ) : (\n article\n );\n\n return (\n <div\n key={message.id}\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: messageTimestampLabel ? \"3px\" : \"0\",\n }}\n >\n {messageBody}\n {messageTimestampLabel ? (\n <p\n style={{\n margin: 0,\n alignSelf: isSystem ? \"center\" : isUser ? \"flex-end\" : \"flex-start\",\n marginLeft: !isSystem && !isUser && showAssistantAvatar ? \"34px\" : \"0\",\n fontSize: \"10px\",\n lineHeight: 1.2,\n color: \"#94a3b8\",\n letterSpacing: \"0.01em\",\n }}\n >\n {messageTimestampLabel}\n </p>\n ) : null}\n </div>\n );\n })}\n\n {isGenerating ? (\n <div\n aria-label=\"Assistant is responding\"\n style={{\n alignSelf: \"flex-start\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"18px\",\n height: \"18px\",\n }}\n >\n <span\n style={{\n width: \"8px\",\n height: \"8px\",\n borderRadius: \"9999px\",\n background: \"#9ca3af\",\n animation: \"helpfulChatDotPulse 1.1s ease-in-out infinite\",\n }}\n />\n </div>\n ) : null}\n\n {error ? <p style={{ margin: 0, color: \"#b91c1c\", fontSize: \"14px\" }}>{error.message}</p> : null}\n\n {!hasApiKey ? <p style={{ margin: 0, color: \"#b91c1c\", fontSize: \"14px\" }}>Missing apiKey prop.</p> : null}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { HELPFUL_CHAT_LOGO_DATA_URI } from \"../theme\";\n\ntype WidgetComposerProps = {\n input: string;\n setInput: (nextInput: string) => void;\n placeholder: string;\n isGenerating: boolean;\n canSend: boolean;\n isMobileViewport: boolean;\n isInputFocused: boolean;\n textareaRef: React.RefObject<HTMLTextAreaElement | null>;\n onSubmit: (event: React.FormEvent) => void;\n onStop: () => void;\n onInputKeyDown: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;\n onFocus: () => void;\n onBlur: () => void;\n logoSrc?: string;\n};\n\nconst POWERED_BY_LOGO_SRC = HELPFUL_CHAT_LOGO_DATA_URI;\n\nfunction SendIcon() {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"17\"\n height=\"17\"\n fill=\"none\"\n aria-hidden=\"true\"\n style={{ display: \"block\" }}\n >\n <path\n d=\"M12 19V5m0 0-5 5m5-5 5 5\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction StopIcon() {\n return (\n <span\n aria-hidden=\"true\"\n style={{\n display: \"block\",\n width: \"10px\",\n height: \"10px\",\n background: \"currentColor\",\n borderRadius: \"2px\",\n }}\n />\n );\n}\n\nexport function Composer({\n input,\n setInput,\n placeholder,\n isGenerating,\n canSend,\n isMobileViewport,\n isInputFocused,\n textareaRef,\n onSubmit,\n onStop,\n onInputKeyDown,\n onFocus,\n onBlur,\n logoSrc = POWERED_BY_LOGO_SRC,\n}: WidgetComposerProps) {\n return (\n <form\n onSubmit={onSubmit}\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n padding: isMobileViewport\n ? \"8px 12px calc(10px + env(safe-area-inset-bottom, 0px))\"\n : \"0 16px 16px\",\n background: \"#ffffff\",\n gap: \"6px\",\n }}\n >\n <div\n style={{\n flex: 1,\n borderRadius: \"9999px\",\n border: isInputFocused ? \"1px solid #cbd5e1\" : \"1px solid #e5e7eb\",\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n padding: isMobileViewport ? \"4px 6px 4px 16px\" : \"4px 6px 4px 14px\",\n background: \"#ffffff\",\n minHeight: isMobileViewport ? \"52px\" : \"44px\",\n boxShadow: isInputFocused ? \"0 0 0 3px rgba(15, 23, 42, 0.06)\" : \"none\",\n transition: \"box-shadow 120ms ease, border-color 120ms ease\",\n }}\n >\n <textarea\n ref={textareaRef}\n value={input}\n onChange={(event) => setInput(event.target.value)}\n onKeyDown={onInputKeyDown}\n onFocus={onFocus}\n onBlur={onBlur}\n placeholder={placeholder}\n rows={1}\n enterKeyHint=\"send\"\n style={{\n flex: 1,\n border: \"none\",\n background: \"transparent\",\n outline: \"none\",\n padding: isMobileViewport ? \"12px 0 11px\" : \"10px 0 9px\",\n fontSize: isMobileViewport ? \"16px\" : \"15px\",\n lineHeight: 1.4,\n color: \"#111827\",\n resize: \"none\",\n }}\n />\n <button\n type={isGenerating ? \"button\" : \"submit\"}\n onClick={isGenerating ? onStop : undefined}\n disabled={isGenerating ? false : !canSend}\n aria-label={isGenerating ? \"Stop generating response\" : \"Send message\"}\n style={{\n width: isMobileViewport ? \"38px\" : \"36px\",\n height: isMobileViewport ? \"38px\" : \"36px\",\n borderRadius: \"9999px\",\n border: \"none\",\n background: isGenerating ? \"#111827\" : canSend ? \"#111827\" : \"#d1d5db\",\n color: \"#ffffff\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n cursor: \"pointer\",\n }}\n >\n {isGenerating ? <StopIcon /> : <SendIcon />}\n </button>\n </div>\n <a\n href=\"https://openchatwidget.com\"\n target=\"_blank\"\n rel=\"noreferrer\"\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"5px\",\n color: \"#9ca3af\",\n fontSize: \"10px\",\n lineHeight: 1.2,\n userSelect: \"none\",\n textDecoration: \"none\",\n width: \"100%\",\n }}\n >\n <img\n src={logoSrc}\n alt=\"\"\n width={10}\n height={10}\n style={{\n display: \"block\",\n opacity: 0.5,\n }}\n />\n <span>Powered by Open Chat Widget</span>\n </a>\n </form>\n );\n}\n","import ReactMarkdown from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\n\nexport function MarkdownMessage({ text }: { text: string }) {\n return (\n <ReactMarkdown\n remarkPlugins={[remarkGfm]}\n components={{\n p: ({ children }) => <p style={{ margin: \"0 0 10px\", lineHeight: 1.5 }}>{children}</p>,\n h1: ({ children }) => (\n <h1 style={{ margin: \"0 0 10px\", fontSize: \"1.2rem\", lineHeight: 1.3 }}>{children}</h1>\n ),\n h2: ({ children }) => (\n <h2 style={{ margin: \"0 0 10px\", fontSize: \"1.1rem\", lineHeight: 1.3 }}>{children}</h2>\n ),\n h3: ({ children }) => (\n <h3 style={{ margin: \"0 0 10px\", fontSize: \"1rem\", lineHeight: 1.3 }}>{children}</h3>\n ),\n ul: ({ children }) => <ul style={{ margin: \"0 0 10px\", paddingLeft: \"20px\" }}>{children}</ul>,\n ol: ({ children }) => <ol style={{ margin: \"0 0 10px\", paddingLeft: \"20px\" }}>{children}</ol>,\n li: ({ children }) => <li style={{ marginBottom: \"6px\" }}>{children}</li>,\n a: ({ href, children }) => (\n <a href={href} style={{ color: \"#0f172a\", textDecoration: \"underline\" }} target=\"_blank\" rel=\"noreferrer\">\n {children}\n </a>\n ),\n code: ({ children }) => (\n <code\n style={{\n background: \"#f3f4f6\",\n borderRadius: \"6px\",\n padding: \"2px 6px\",\n fontFamily:\n 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace',\n fontSize: \"0.9em\",\n }}\n >\n {children}\n </code>\n ),\n pre: ({ children }) => (\n <pre\n style={{\n margin: \"0 0 10px\",\n background: \"#f9fafb\",\n borderRadius: \"10px\",\n border: \"1px solid #e5e7eb\",\n padding: \"10px 12px\",\n overflowX: \"auto\",\n }}\n >\n {children}\n </pre>\n ),\n blockquote: ({ children }) => (\n <blockquote\n style={{\n margin: \"0 0 10px\",\n paddingLeft: \"12px\",\n borderLeft: \"2px solid #e5e7eb\",\n color: \"#374151\",\n }}\n >\n {children}\n </blockquote>\n ),\n }}\n >\n {text}\n </ReactMarkdown>\n );\n}\n","import * as React from \"react\";\n\ntype EmptyStateProps = {\n isMobileViewport: boolean;\n children?: React.ReactNode;\n};\n\nexport function EmptyState({ isMobileViewport, children }: EmptyStateProps) {\n return (\n <section\n aria-label=\"Conversation introduction\"\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n minHeight: isMobileViewport ? \"110px\" : \"124px\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"12px\",\n width: \"100%\",\n animation: \"helpfulChatEmptyFadeIn 240ms ease-out both\",\n }}\n >\n <h2\n style={{\n margin: 0,\n color: \"#0f172a\",\n fontSize: isMobileViewport ? \"17px\" : \"18px\",\n lineHeight: 1.25,\n fontWeight: 500,\n letterSpacing: \"-0.005em\",\n textAlign: \"center\",\n }}\n >\n What can I help you with today?\n </h2>\n {children ? <div style={{ width: \"100%\" }}>{children}</div> : null}\n </div>\n </section>\n );\n}\n","export function extractMessageText(message: {\n content?: unknown;\n parts?: unknown;\n}) {\n if (typeof message?.content === \"string\") {\n return message.content;\n }\n\n if (!Array.isArray(message.parts)) {\n return \"\";\n }\n\n const textChunks = message.parts\n .map((part) => {\n if (!part || typeof part !== \"object\") {\n return \"\";\n }\n\n const typedPart = part as { type?: unknown; text?: unknown };\n if (typedPart.type !== \"text\" || typeof typedPart.text !== \"string\") {\n return \"\";\n }\n\n return typedPart.text;\n })\n .filter(Boolean);\n\n return textChunks.join(\"\");\n}\n","export { OpenChatWidget } from \"./OpenChatWidget\";\nexport type { OpenChatWidgetProps } from \"./OpenChatWidget\";\nexport { createOpenAI } from \"@ai-sdk/openai\";\nexport { convertToModelMessages, streamText } from \"ai\";\nexport type { UIMessage } from \"ai\";\n"],"mappings":";AAAA,YAAYA,YAAW;AACvB,SAAS,eAAe;AACxB,SAAS,4BAA4C;;;ACFrD,YAAY,WAAW;;;ACAhB,IAAM,6BACX;AAEF,IAAM,uBAAuB;AAEtB,SAAS,4BAA4B,gBAAgB,sBAAsB;AAChF,SAAO;AAAA;AAAA;AAAA,EAGP,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA;AAAA;AAAA;AAAA,EAIb,aAAa;AAAA;AAAA;AAAA;AAAA;A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