@inkeep/agents-ui 0.15.13 → 0.15.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +230 -222
- package/dist/primitives/atoms/icons/built-in-icons.cjs +1 -1
- package/dist/primitives/atoms/icons/built-in-icons.d.ts +2 -0
- package/dist/primitives/atoms/icons/built-in-icons.js +33 -31
- package/dist/primitives/atoms/icons/inkeep-default-icons.cjs +1 -1
- package/dist/primitives/atoms/icons/inkeep-default-icons.js +4 -1
- package/dist/primitives/components/chat-history/index.cjs +1 -0
- package/dist/primitives/components/chat-history/index.d.ts +27 -0
- package/dist/primitives/components/chat-history/index.js +105 -0
- package/dist/primitives/components/embedded-chat/use-captcha.cjs +1 -0
- package/dist/primitives/components/embedded-chat/use-captcha.d.ts +23 -6
- package/dist/primitives/components/embedded-chat/use-captcha.js +67 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +2 -2
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +12 -3
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +252 -144
- package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -1
- package/dist/primitives/components/embedded-chat/use-stream-processor.d.ts +2 -0
- package/dist/primitives/components/embedded-chat/use-stream-processor.js +120 -70
- package/dist/primitives/components/embedded-chat.cjs +3 -3
- package/dist/primitives/components/embedded-chat.d.ts +5 -2
- package/dist/primitives/components/embedded-chat.js +1010 -967
- package/dist/primitives/components/index.cjs +1 -1
- package/dist/primitives/components/index.d.ts +1 -0
- package/dist/primitives/components/index.js +20 -18
- package/dist/primitives/hooks/use-anonymous-session.cjs +1 -0
- package/dist/primitives/hooks/use-anonymous-session.d.ts +12 -0
- package/dist/primitives/hooks/use-anonymous-session.js +57 -0
- package/dist/primitives/hooks/use-conversation-loader.cjs +1 -0
- package/dist/primitives/hooks/use-conversation-loader.d.ts +13 -0
- package/dist/primitives/hooks/use-conversation-loader.js +36 -0
- package/dist/primitives/hooks/use-inkeep-api-client.cjs +1 -0
- package/dist/primitives/hooks/use-inkeep-api-client.d.ts +33 -0
- package/dist/primitives/hooks/use-inkeep-api-client.js +87 -0
- package/dist/primitives/hooks/use-local-storage.cjs +1 -0
- package/dist/primitives/hooks/use-local-storage.d.ts +8 -0
- package/dist/primitives/hooks/use-local-storage.js +26 -0
- package/dist/primitives/index.cjs +1 -1
- package/dist/primitives/index.js +157 -151
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/dist/primitives/providers/chat-history-provider.cjs +1 -0
- package/dist/primitives/providers/chat-history-provider.d.ts +32 -0
- package/dist/primitives/providers/chat-history-provider.js +105 -0
- package/dist/primitives/providers/index.cjs +1 -1
- package/dist/primitives/providers/index.d.ts +1 -0
- package/dist/primitives/providers/index.js +55 -52
- package/dist/primitives/utils/component-ids.cjs +1 -1
- package/dist/primitives/utils/component-ids.d.ts +32 -0
- package/dist/primitives/utils/component-ids.js +19 -1
- package/dist/primitives/utils/default-settings.cjs +1 -1
- package/dist/primitives/utils/default-settings.d.ts +2 -0
- package/dist/primitives/utils/default-settings.js +6 -4
- package/dist/react/chat-button.cjs +1 -1
- package/dist/react/chat-button.js +42 -38
- package/dist/react/embedded-chat.cjs +1 -1
- package/dist/react/embedded-chat.js +256 -230
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +230 -222
- package/dist/react/sidebar-chat.cjs +1 -1
- package/dist/react/sidebar-chat.js +26 -22
- package/dist/styled/components/chat-bubble.cjs +1 -1
- package/dist/styled/components/chat-bubble.js +1 -1
- package/dist/styled/components/chat-history.cjs +1 -0
- package/dist/styled/components/chat-history.d.ts +15 -0
- package/dist/styled/components/chat-history.js +197 -0
- package/dist/styled/components/data-summary-group.cjs +1 -1
- package/dist/styled/components/data-summary-group.js +24 -24
- package/dist/styled/components/embedded-chat/session-loading.cjs +1 -0
- package/dist/styled/components/embedded-chat/session-loading.d.ts +1 -0
- package/dist/styled/components/embedded-chat/session-loading.js +26 -0
- package/dist/styled/components/embedded-chat.cjs +1 -1
- package/dist/styled/components/embedded-chat.d.ts +7 -1
- package/dist/styled/components/embedded-chat.js +615 -563
- package/dist/styled/components/embedded-search.cjs +1 -1
- package/dist/styled/components/embedded-search.js +1 -1
- package/dist/styled/components/index.cjs +1 -1
- package/dist/styled/components/index.d.ts +1 -0
- package/dist/styled/components/index.js +22 -20
- package/dist/styled/components/sidebar-chat.cjs +1 -1
- package/dist/styled/components/sidebar-chat.js +1 -1
- package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.cjs +1 -1
- package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.js +3 -2
- package/dist/styled/index.cjs +1 -1
- package/dist/styled/index.js +193 -185
- package/dist/styled/inkeep.css.cjs +146 -4
- package/dist/styled/inkeep.css.js +146 -4
- package/dist/types/config/ai.d.ts +17 -1
- package/dist/types/config/base.d.ts +21 -0
- package/dist/types/icons/built-in.d.ts +1 -1
- package/dist/types/icons/custom.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,34 +1,44 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { DEFAULT_ERROR_MESSAGE as
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
import { useState as O, useRef as I, useMemo as M, useEffect as P, useCallback as U } from "react";
|
|
3
|
+
import { DEFAULT_ERROR_MESSAGE as $ } from "./use-inkeep-chat.js";
|
|
4
|
+
function S(a, n) {
|
|
5
|
+
if (n)
|
|
6
|
+
return a.findIndex((d) => d.type === "tool_call" && d.toolCallId === n);
|
|
7
|
+
const m = a.length - 1;
|
|
8
|
+
return m >= 0 && a[m].type === "tool_call" ? m : -1;
|
|
9
|
+
}
|
|
10
|
+
function z(a) {
|
|
11
|
+
const n = a.ctx, d = a.details?.data, h = n?.toolCallId ?? n?.callId ?? a.toolCallId ?? d?.toolCallId;
|
|
12
|
+
return typeof h == "string" ? h : void 0;
|
|
13
|
+
}
|
|
14
|
+
function B(a, n, m) {
|
|
15
|
+
const [d, h] = O(!1), v = I(0), A = I(0), R = I(Date.now()), y = I(/* @__PURE__ */ new Map()), k = I(null), { processedParts: C, summaryTimings: F } = M(() => {
|
|
16
|
+
const r = [];
|
|
17
|
+
let e = "", o = [], w = !1;
|
|
18
|
+
a.length > v.current && (R.current = Date.now(), v.current = a.length), A.current = 0;
|
|
19
|
+
const u = /* @__PURE__ */ new Map(), g = (s = !1) => {
|
|
20
|
+
if (o.length > 0) {
|
|
21
|
+
const t = `group-${A.current++}`, i = y.current.get(t);
|
|
22
|
+
i ? u.set(t, {
|
|
23
|
+
...i,
|
|
24
|
+
isCompleted: s
|
|
25
|
+
}) : u.set(t, {
|
|
26
|
+
isCompleted: s
|
|
27
|
+
}), r.push({
|
|
18
28
|
type: "summary-group",
|
|
19
|
-
summaries: [...
|
|
29
|
+
summaries: [...o],
|
|
20
30
|
groupKey: t
|
|
21
|
-
}),
|
|
31
|
+
}), o = [];
|
|
22
32
|
}
|
|
23
33
|
};
|
|
24
|
-
for (const
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
else if (
|
|
28
|
-
e.trim() && (
|
|
29
|
-
else if (
|
|
30
|
-
e.trim() && (
|
|
31
|
-
const t =
|
|
34
|
+
for (const s of a)
|
|
35
|
+
if (s.type === "text")
|
|
36
|
+
g(!0), e += s.text || "";
|
|
37
|
+
else if (s.type === "data-summary")
|
|
38
|
+
e.trim() && (r.push({ type: "text", text: e }), e = ""), o.push(s.data);
|
|
39
|
+
else if (s.type === "data-operation") {
|
|
40
|
+
e.trim() && (r.push({ type: "text", text: e }), e = "");
|
|
41
|
+
const t = s.data;
|
|
32
42
|
if (t?.type) {
|
|
33
43
|
if ((t.type === "tool_call" || t.type === "tool_result") && t.details?.data?.inDelegatedAgent === !1)
|
|
34
44
|
continue;
|
|
@@ -36,74 +46,114 @@ function I(m, a, A) {
|
|
|
36
46
|
case "agent_initializing":
|
|
37
47
|
break;
|
|
38
48
|
case "completion": {
|
|
39
|
-
const { type:
|
|
40
|
-
|
|
49
|
+
const { type: l } = t;
|
|
50
|
+
o.push({ type: l, label: "Completed" }), g(!0);
|
|
41
51
|
break;
|
|
42
52
|
}
|
|
43
53
|
case "error": {
|
|
44
|
-
const
|
|
45
|
-
if (console.warn("Data operation error:",
|
|
46
|
-
|
|
54
|
+
const l = t.message || "Unknown error";
|
|
55
|
+
if (console.warn("Data operation error:", l), !r.length)
|
|
56
|
+
g(!0), k.current = l, w || (r.push({ type: "text", text: $ }), w = !0);
|
|
47
57
|
else {
|
|
48
|
-
const { type:
|
|
49
|
-
|
|
58
|
+
const { type: f, label: c } = t;
|
|
59
|
+
o.push({ type: f, label: c });
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
case "tool_call": {
|
|
64
|
+
const { type: l, label: f } = t, c = z(t);
|
|
65
|
+
o.push({ type: l, label: f, ...c && { toolCallId: c } });
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
case "tool_result": {
|
|
69
|
+
const { type: l, label: f } = t, c = z(t), T = { type: l, label: f }, L = S(o, c);
|
|
70
|
+
if (L >= 0) {
|
|
71
|
+
o[L] = T;
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
const D = r.filter(
|
|
75
|
+
(b) => b?.type === "summary-group"
|
|
76
|
+
);
|
|
77
|
+
if (c) {
|
|
78
|
+
let b = !1;
|
|
79
|
+
for (let p = D.length - 1; p >= 0; p--) {
|
|
80
|
+
const x = D[p].summaries;
|
|
81
|
+
if (x?.length) {
|
|
82
|
+
const G = S(x, c);
|
|
83
|
+
if (G >= 0) {
|
|
84
|
+
x[G] = T, b = !0;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (b) break;
|
|
90
|
+
} else {
|
|
91
|
+
const p = D[D.length - 1]?.summaries;
|
|
92
|
+
if (p?.length) {
|
|
93
|
+
const x = S(p, void 0);
|
|
94
|
+
if (x >= 0) {
|
|
95
|
+
p[x] = T;
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
50
99
|
}
|
|
100
|
+
o.push(T);
|
|
51
101
|
break;
|
|
52
102
|
}
|
|
53
103
|
default: {
|
|
54
|
-
const { type:
|
|
55
|
-
|
|
104
|
+
const { type: l, label: f } = t;
|
|
105
|
+
o.push({ type: l, label: f });
|
|
56
106
|
break;
|
|
57
107
|
}
|
|
58
108
|
}
|
|
59
109
|
}
|
|
60
|
-
} else if (
|
|
61
|
-
if (
|
|
62
|
-
const t =
|
|
110
|
+
} else if (s.type === "data-artifact")
|
|
111
|
+
if (s.data?.type?.toLowerCase() === "citation") {
|
|
112
|
+
const t = s.data, i = t.artifactSummary || {
|
|
63
113
|
title: t.name
|
|
64
114
|
};
|
|
65
|
-
e += ` ^${
|
|
115
|
+
e += ` ^${i?.title || t.name}^`;
|
|
66
116
|
} else
|
|
67
|
-
e.trim() && (
|
|
68
|
-
else
|
|
69
|
-
if (
|
|
70
|
-
for (const [
|
|
71
|
-
t.isCompleted ||
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
return !
|
|
75
|
-
}) ?
|
|
76
|
-
return
|
|
77
|
-
}, [
|
|
78
|
-
|
|
79
|
-
|
|
117
|
+
e.trim() && (r.push({ type: "text", text: e }), e = ""), r.push(s);
|
|
118
|
+
else s.type === "data-component" ? (e.trim() && (r.push({ type: "text", text: e }), e = ""), g(!0), r.push(s)) : (e.trim() && (r.push({ type: "text", text: e }), e = ""), g(!0), r.push(s));
|
|
119
|
+
if (g(!n), e.trim() && r.push({ type: "text", text: e }), !n)
|
|
120
|
+
for (const [s, t] of u.entries())
|
|
121
|
+
t.isCompleted || u.set(s, { ...t, isCompleted: !0 });
|
|
122
|
+
const E = u.size !== y.current.size || Array.from(u.entries()).some(([s, t]) => {
|
|
123
|
+
const i = y.current.get(s);
|
|
124
|
+
return !i || i.isCompleted !== t.isCompleted;
|
|
125
|
+
}) ? u : y.current;
|
|
126
|
+
return y.current = E, { processedParts: r, summaryTimings: E };
|
|
127
|
+
}, [a, n]);
|
|
128
|
+
P(() => {
|
|
129
|
+
k.current && (m(new Error(k.current)), k.current = null);
|
|
80
130
|
});
|
|
81
|
-
const
|
|
82
|
-
const
|
|
83
|
-
(
|
|
84
|
-
),
|
|
85
|
-
|
|
131
|
+
const _ = U(() => {
|
|
132
|
+
const r = Date.now() - R.current, e = Array.from(y.current.values()).some(
|
|
133
|
+
(w) => !w.isCompleted
|
|
134
|
+
), o = r > 1e3 && !e;
|
|
135
|
+
h(o);
|
|
86
136
|
}, []);
|
|
87
|
-
|
|
88
|
-
if (!
|
|
89
|
-
|
|
137
|
+
P(() => {
|
|
138
|
+
if (!n) {
|
|
139
|
+
h(!1);
|
|
90
140
|
return;
|
|
91
141
|
}
|
|
92
|
-
if (!(
|
|
93
|
-
|
|
142
|
+
if (!(C.length > 0)) {
|
|
143
|
+
h(!1);
|
|
94
144
|
return;
|
|
95
145
|
}
|
|
96
|
-
const e = setInterval(
|
|
146
|
+
const e = setInterval(_, 200);
|
|
97
147
|
return () => clearInterval(e);
|
|
98
|
-
}, [
|
|
99
|
-
const
|
|
148
|
+
}, [n, _, C.length]);
|
|
149
|
+
const N = M(() => !!(!(C.length > 0) && n), [C.length, n]);
|
|
100
150
|
return {
|
|
101
|
-
processedParts:
|
|
102
|
-
summaryTimings:
|
|
103
|
-
shouldShowInitialLoading:
|
|
104
|
-
shouldShowStreamDelayLoading:
|
|
151
|
+
processedParts: C,
|
|
152
|
+
summaryTimings: F,
|
|
153
|
+
shouldShowInitialLoading: N,
|
|
154
|
+
shouldShowStreamDelayLoading: d
|
|
105
155
|
};
|
|
106
156
|
}
|
|
107
157
|
export {
|
|
108
|
-
|
|
158
|
+
B as useStreamProcessor
|
|
109
159
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("react"),Ba=require("react-dom/client"),ie=require("react-textarea-autosize"),Ta=require("@radix-ui/react-avatar"),ya=require("@radix-ui/react-checkbox"),Ha=require("@radix-ui/react-popover"),ja=require("@radix-ui/react-tooltip"),wa=require("@radix-ui/react-scroll-area"),j=require("../atoms/select.cjs"),S=require("../atoms/combobox.cjs"),A=require("../atoms/dialog.cjs"),La=require("../atoms/avatars/ai.cjs"),Da=require("../atoms/avatars/user.cjs"),x=require("../atoms/icons/custom-icon.cjs"),w=require("../atoms/icons/built-in-icon-renderer.cjs"),Ra=require("../atoms/link.cjs"),z=require("../atoms/markdown/index.cjs"),V=require("../providers/attachment-item-provider.cjs"),B=require("../providers/attachments-bar-provider.cjs"),O=require("../providers/source-item-provider.cjs"),g=require("../providers/config-provider.cjs"),ae=require("../providers/feedback-provider.cjs"),U=require("../providers/message-attachments-provider.cjs"),_=require("../providers/message-provider.cjs"),ue=require("../atoms/icons/checkbox-icon.cjs"),ee=require("../hooks/use-copy-to-clipboard.cjs"),G=require("../providers/feedback-item-provider.cjs"),u=require("../utils/misc.cjs"),a=require("./factory.cjs"),F=require("./embedded-chat/chat-provider.cjs"),Oa=require("./tagline-logo-icon.cjs"),qa=require("../hooks/use-settle-action.cjs"),Wa=require("../hooks/use-container-size.cjs"),re=require("./embedded-chat/use-chat-action.cjs"),te=require("../providers/help-menu-provider.cjs"),k=require("../providers/chat-form-provider.cjs"),H=require("../providers/form-field-provider.cjs"),Na=require("react-hook-form"),Va=require("../utils/highlight-emphasis.cjs"),Qa=require("./modal/modal-provider.cjs"),$a=require("../../color-mode/index.cjs"),oe=require("../utils/compose-refs.cjs"),C=require("../utils/compose-event-handlers.cjs"),Ua=require("../hooks/use-simple-scroll.cjs"),Ka=require("../hooks/use-debounce.cjs"),ne=require("../providers/hover-popover-provider.cjs"),za=require("./modal/widget-auto-focus.cjs"),se=require("../providers/base-events-provider.cjs"),Ga=require("../atoms/shadow/context.cjs"),Ya=require("../utils/get-source-icon.cjs"),Ja=require("../providers/chat-history-provider.cjs");function Q(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const Xa=Q(Ba),de=Q(Ta),Y=Q(ya),q=Q(Ha),W=Q(ja),K=Q(wa),Za="__intro__",er=767,tr=a.ikp("div",{_id:"aiChatWrapper"}),Ce=l.forwardRef(({chatHistoryLayout:t,isChatHistoryOpen:e,setChatHistoryOpen:i,isChatHistoryButtonVisible:o,children:n,...s},d)=>{l.useEffect(()=>{t==="stack"?i(!1):t==="sidepane"&&o&&i(!0)},[t,o,i]);const c=t==="stack"&&e;return r.jsx(tr,{ref:d,"data-chat-history-layout":t,"data-chat-history-open":u.dataAttr(e),"data-stack-history-open":u.dataAttr(c),...s,children:n})});Ce.displayName="EmbeddedChatWrapperInner";const be=l.forwardRef((t,e)=>{const{children:i,...o}=t,{isHidden:n,isMobile:s}=F.useChat(),{aiChatSettings:d}=g.useInkeepConfig(),{isChatHistoryButtonVisible:c}=d,[m,h]=Wa.useContainerSize(),b=oe.useComposedRefs(e,m),v=h?.width?h.width>580:!0,p=Qa.useModal(),P=(h?.width??0)>er?"sidepane":"stack";return r.jsx(Ja.ChatHistoryProvider,{layout:P,children:({isOpen:I,setIsOpen:M})=>r.jsx(Ce,{ref:b,chatHistoryLayout:P,isChatHistoryOpen:I,setChatHistoryOpen:M,isChatHistoryButtonVisible:!!c,"data-widget-md":u.dataAttr(v),"data-hidden":u.dataAttr(n),"data-in-modal":u.dataAttr(!!p),"data-mobile":u.dataAttr(s),...o,children:i})})}),ir=a.ikp("div",{_id:"aiChatRoot"}),pe=t=>{const{isHidden:e}=F.useChat(),{form:i}=k.useChatForm();return i?null:r.jsx(ir,{"data-hidden":u.dataAttr(e),...t})},ar=a.ikp("div",{_id:"aiChatHeader"}),ve=a.ikp("div",{_id:"aiChatHeader__Toolbar"}),ge=a.ikp("div",{_id:"aiChatHeader__ToolbarHeaderWrapper"}),rr=a.ikp(x.CustomIcon,{_id:"aiChatHeader__ChatHistoryButtonIcon"}),Pe=l.memo(t=>r.jsx(rr,{...t})),Fe=a.ikp("button",{_id:"aiChatHeader__ChatHistoryButton"}),or=a.ikp("div",{_id:"aiChatHeader__ToolbarHeader"}),_e=l.memo(t=>{const{aiChatSettings:e}=g.useInkeepConfig(),i=`Ask ${e.aiAssistantName||"AI"}`;return r.jsx(or,{...t,children:i})}),Ee=a.ikp("div",{_id:"aiChatContent"}),Ae=a.ikp(K.Root,{_id:"aiChatContentScrollArea"}),nr=a.ikp(K.Viewport,{_id:"aiChatContentScrollArea__Viewport"}),ke=l.forwardRef(({children:t,...e},i)=>{const{messages:o,isStreaming:n}=F.useChat(),{containerRef:s,scrollToBottom:d,handleScroll:c}=Ua.useSimpleScroll({isStreaming:n}),m=oe.useComposedRefs(i,s);return l.useEffect(()=>{o.length>0&&!n&&d()},[o.length,d,n]),r.jsx(nr,{ref:m,onScroll:c,children:r.jsx("div",{"data-part":"grid",style:{display:"grid"},children:t}),...e})}),Ie=a.ikp(K.ScrollAreaScrollbar,{_id:"aiChatContentScrollArea__Scrollbar"}),Me=a.ikp(K.ScrollAreaThumb,{_id:"aiChatContentScrollArea__Thumb"}),fe=a.ikp(K.Corner,{_id:"aiChatContentScrollArea__Corner"}),sr=a.ikp("div",{_id:"aiChatMessages"}),xe=t=>{const e=F.useChat(),{children:i,...o}=t;return r.jsx(sr,{children:u.maybeRender(i,e),...o})},dr=a.ikp("div",{_id:"aiChatDisclaimer"}),Se=l.memo(t=>{const{aiChatSettings:e}=g.useInkeepConfig(),[i,o]=l.useState(!1),n=Ka.useDebounce(i,100);return e.disclaimerSettings?.isEnabled?r.jsx(ne.HoverPopoverProvider,{open:i,setOpen:o,children:r.jsx(q.Root,{open:n,onOpenChange:o,children:r.jsx(dr,{...t})})}):null}),cr=a.ikp("span",{_id:"aiChatDisclaimerLabel"}),Be=l.memo(t=>{const{aiChatSettings:e}=g.useInkeepConfig(),i=e.disclaimerSettings;return r.jsx(cr,{children:i?.label,...t})}),mr=a.ikp(q.Trigger,{_id:"aiChatDisclaimerTrigger",children:r.jsx(x.CustomIcon,{iconKey:"info"})}),Te=l.memo(t=>{const{setOpen:e}=ne.useHoverPopover(),i=()=>e(!0),o=()=>e(!1);return r.jsx(mr,{onMouseEnter:i,onMouseLeave:o,...t})}),lr=a.ikp(q.Content,{_id:"aiChatDisclaimerContent"}),ye=t=>{const{setOpen:e}=ne.useHoverPopover(),i=()=>e(!0),o=()=>e(!1);return r.jsx(lr,{onMouseEnter:i,onMouseLeave:o,side:"top",sideOffset:8,align:"end",alignOffset:-10,...t})},hr=a.ikp(z.Markdown,{_id:"aiChatDisclaimerText"}),He=l.memo(t=>{const{aiChatSettings:e}=g.useInkeepConfig(),i=e.aiAssistantName,n=e.disclaimerSettings?.tooltip||`Information provided by ${i||"this AI assistant"} is not guaranteed to be accurate or comprehensive.`;return r.jsx(hr,{shouldOpenLinksInNewTab:!0,children:n,...t})}),je=a.ikp(q.Arrow,{_id:"aiChatDisclaimerArrow"}),ur=a.ikp("div",{_id:"aiChatExampleQuestions"}),we=t=>{const{aiChatSettings:e}=g.useInkeepConfig(),{messages:i}=F.useChat();return!e.exampleQuestions?.length||i.length?null:r.jsx(ur,{...t})},Cr=a.ikp("h3",{_id:"aiChatExampleQuestionsLabel"}),Le=l.memo(t=>{const{aiChatSettings:e}=g.useInkeepConfig();return r.jsx(Cr,{children:e.exampleQuestionsLabel,...t})}),br=a.ikp("div",{_id:"aiChatExampleQuestionsList"}),De=l.memo(t=>{const{aiChatSettings:e}=g.useInkeepConfig(),i=e.exampleQuestions,{children:o,...n}=t;return r.jsx(br,{children:u.maybeRender(o,i),...n})}),pr=a.ikp("div",{_id:"aiChatExampleQuestion"}),Re=l.forwardRef((t,e)=>{const{aiChatSettings:i}=g.useInkeepConfig(),o=i.isFirstExampleQuestionHighlighted;return r.jsx(pr,{ref:e,"data-highlight":u.dataAttr(o),...t})}),vr=a.ikp("button",{_id:"aiChatExampleQuestionButton"}),Oe=t=>{const{question:e,onClick:i,...o}=t,n=typeof e=="object"?e.value:e,s=typeof e=="object"?e.label:e,{handleSubmit:d}=F.useChat();return r.jsx(vr,{onClick:C.composeEventHandlers(i,()=>d(n)),children:s,...o})},gr=a.ikp("div",{_id:"aiChatWorkflows"}),qe=t=>{const{aiChatSettings:e}=g.useInkeepConfig(),{messages:i}=F.useChat();return!e.workflows?.length||i.length?null:r.jsx(gr,{...t})},Pr=a.ikp("h3",{_id:"aiChatWorkflowsLabel"}),We=l.memo(t=>{const{aiChatSettings:e}=g.useInkeepConfig();return r.jsx(Pr,{children:e.workflowsHeader,...t})}),Fr=a.ikp("div",{_id:"aiChatWorkflowsList"}),Ne=l.memo(t=>{const{aiChatSettings:e}=g.useInkeepConfig(),i=e.workflows,{children:o,...n}=t;return r.jsx(Fr,{children:u.maybeRender(o,i),...n})}),_r=a.ikp("button",{_id:"aiChatWorkflow"}),Ve=t=>{const{workflow:e,onClick:i,...o}=t,n=s=>{};return r.jsx(_r,{onClick:C.composeEventHandlers(i,()=>n()),children:e.displayName,...o})},Er=a.ikp("div",{_id:"aiChatMessageWrapper"}),ce=t=>{const{message:e,...i}=t;return e.role==="system"?null:r.jsx(_.MessageProvider,{message:e,children:r.jsx(Er,{"data-role":e.role,...i})})},Qe=l.memo(t=>{const{message:e,...i}=t,{aiChatSettings:o,baseSettings:n}=g.useInkeepConfig(),s=o.aiAssistantName,d=s?`Hi, I'm ${s}!`:"Hi!",c=o.chatSubjectName??n.organizationDisplayName,m=c?`
|
|
2
2
|
|
|
3
3
|
Ask me anything about \`${c}\`.`:`
|
|
4
4
|
|
|
5
|
-
How can I help?`,b={parts:[{type:"text",text:o.introMessage??`${d}${m}`}],id:Ga,...e,role:"assistant"};return r.jsx(ce,{message:b,...i})}),vr=a.ikp("div",{_id:"aiChatMessageHeader"}),Ne=t=>{const{message:e}=_.useMessage();return r.jsx(vr,{"data-role":e.role,...t})},gr=a.ikp("div",{_id:"aiChatMessageLoading",children:"Thinking..."}),Ve=t=>r.jsx(gr,{...t}),Pr=a.ikp("div",{_id:"aiChatMessageAvatar"}),Qe=t=>{const{message:e}=_.useMessage();return r.jsx(Pr,{"data-role":e.role,...t})},Fr=a.ikp(de.Root,{_id:"aiChatMessageAvatarContent"}),$e=t=>{const{message:e}=_.useMessage(),{baseSettings:i}=g.useInkeepConfig();return r.jsx(Fr,{"data-username":u.dataAttr(e.role==="user"&&!!i.userProperties.name),"data-role":e.role,...t})},_r=a.ikp(de.Fallback,{_id:"aiChatMessageAvatarFallback"}),Ue=h.memo(t=>{const{baseSettings:e}=g.useInkeepConfig(),{message:i}=_.useMessage();return e.userProperties.name?r.jsx(_r,{"data-role":i.role,children:u.getInitials(e.userProperties.name),...t}):null}),he=a.ikp(de.Image,{_id:"aiChatMessageAvatarImage"}),Ke=h.memo(t=>{const{onLoadingStatusChange:e,...i}=t,{aiChatSettings:o,baseSettings:{userProperties:n}}=g.useInkeepConfig(),{message:s}=_.useMessage(),{aiAssistantAvatar:d}=o??{},c=typeof d=="string"?d:d?.light,m=(typeof d=="string"?d:d?.dark)??c,l=Na.useColorModeValue(c,m),[b,v]=h.useState(l);h.useEffect(()=>{v(l)},[l]);const p=F=>{F==="error"&&v(null)};return s.role==="user"?n.name?null:o.userAvatar?r.jsx(he,{"data-type":"image",alt:"User avatar","data-role":s.role,src:o.userAvatar,...t}):r.jsx(Ha.default,{"data-type":"icon","data-role":s.role,...t}):b?r.jsx(he,{src:b,alt:"AI assistant avatar","data-type":"image","data-role":s.role,onLoadingStatusChange:C.composeEventHandlers(e,p),...i}):r.jsx(ja.default,{"data-type":"icon","data-role":s.role,...t})}),Er=a.ikp("span",{_id:"aiChatMessageName"}),ze=t=>{const{message:e}=_.useMessage(),{aiChatSettings:i}=g.useInkeepConfig(),{aiAssistantName:o}=i;return r.jsx(Er,{"data-role":e.role,children:e.role==="user"?"You":o||"AI assistant",...t})},Ar=a.ikp("div",{_id:"aiChatMessageContentWrapper"}),Ge=t=>{const{message:e}=_.useMessage();return r.jsx(Ar,{"data-role":e.role,...t})},kr=a.ikp("div",{_id:"aiChatMessageContent"}),Ye=t=>{const{message:e}=_.useMessage();return r.jsx(kr,{"data-role":e.role,...t})},Ir=a.ikp("div",{_id:"aiChatMessageAttachments"}),Je=t=>{const{message:e}=_.useMessage(),i=[];return e.role!=="user"||!i?.length?null:r.jsx(U.MessageAttachmentsProvider,{children:r.jsx(Ir,{...t})})},Mr=a.ikp("div",{_id:"aiChatMessageAttachments__List"}),Xe=t=>{const{children:e,...i}=t,o=[];return o?r.jsx(Mr,{children:u.maybeRender(e,o),...i}):null},xr=a.ikp("div",{_id:"aiChatMessageAttachments__Item"}),Ze=t=>{const{attachment:e,onClick:i,...o}=t,{selectItem:n,onOpen:s}=U.useMessageAttachments(),d=()=>{n(e),s()};return r.jsx(V.AttachmentItemProvider,{attachment:e,children:r.jsx(xr,{onClick:C.composeEventHandlers(i,d),...o})})},fr=a.ikp(w.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),et=t=>{const{attachment:e}=V.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?r.jsx(fr,{iconSettings:i,...t}):null},Sr=a.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),tt=t=>{const{attachment:e}=V.useAttachmentItem();return r.jsx(Sr,{children:e.title,...t})},Br=a.ikp(A.Root,{_id:"aiChatMessageAttachmentsPreview"}),it=t=>{const{onOpenChange:e,...i}=t,{selectItem:o,isOpen:n,onClose:s,selectedItem:d}=U.useMessageAttachments(),c=m=>{m||(s(),o(null))};return r.jsx(Br,{open:n&&d!==null,onOpenChange:C.composeEventHandlers(e,c),...i})},at=a.ikp(A.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),rt=a.ikp(A.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),Tr=a.ikp(A.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),ot=t=>{const{selectedItem:e}=U.useMessageAttachments();return r.jsx(Tr,{children:e?.title||"Attachment",...t})},nt=a.ikp(A.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:r.jsx(M.CustomIcon,{iconKey:"close"})}),yr=a.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),st=t=>{const{selectedItem:e}=U.useMessageAttachments();return r.jsx(yr,{children:e?.content,...t})},dt=t=>{const{text:e,componentStyles:i,...o}=t,{aiChatSettings:n}=g.useInkeepConfig(),{shouldOpenLinksInNewTab:s}=n;return r.jsx(z.Markdown,{children:e,componentStyles:i,shouldOpenLinksInNewTab:s,...o})},ct=({name:t,props:e,componentDef:i})=>{const n=Ua.useShadow()?.shadowHost,s=h.useRef(void 0),d=h.useRef(null),c=h.useRef(null),m=h.useRef(!1),[l,b]=h.useState(!1),[v,p]=h.useState(!1),F=h.useRef(i);h.useMemo(()=>{i!==F.current&&(typeof i=="function"&&typeof F.current=="function"?i.toString()!==F.current.toString()&&(F.current=i):F.current=i)},[i]);const S=F.current,B=h.useRef(e);B.current=e;const I=h.useRef(null),L=h.useRef(S);L.current!==S&&(I.current=null,L.current=S),h.useEffect(()=>{s.current||(s.current=`dyn:${t}:${crypto.randomUUID()}`,b(!0))},[t]),h.useLayoutEffect(()=>{if(!S||!n||!l||!s.current)return;const D=s.current,E=document.createElement("div");return E.setAttribute("data-ikp-component",""),E.setAttribute("data-component",t),E.setAttribute("slot",D),d.current=E,m.current=!1,n.appendChild(E),p(!0),()=>{m.current=!0,p(!1),queueMicrotask(()=>{try{c.current&&(c.current.unmount(),c.current=null)}catch(N){console.debug("Ignoring unmount error:",N)}E.parentNode===n&&E.remove(),d.current=null})}},[S,n,l,t]);const $=D=>{const E=d.current;if(!E||m.current)return;const N=y=>{if(I.current!==null)return I.current;if(typeof y!="function"||y.length>1)return I.current=!1,!1;try{if(y.constructor===Function){const Z=y({});return I.current=h.isValidElement(Z),I.current}return I.current=!1,!1}catch{return I.current=!0,!0}};let T;const R=F.current;if(N(R))try{T=h.createElement(R,D||{})}catch(y){console.error("Error creating React element from component:",y);return}else if(typeof R=="function")T=R(D||{},E,null);else{console.error("Invalid component definition");return}if(h.isValidElement(T)||typeof T=="string"){if(m.current)return;c.current||(c.current=za.createRoot(E)),!m.current&&c.current&&c.current.render(T);return}c.current&&!m.current&&c.current.render(null)};return h.useEffect(()=>{$(B.current)},[S,v]),h.useEffect(()=>{!c.current||m.current||$(e)},[e]),r.jsx("slot",{name:s.current})},jr=a.ikp("div",{_id:"aiChatMessagePart"}),Hr=a.ikp("div",{_id:"aiChatMessageToolbar"}),mt=t=>{const{isLoading:e,messages:i}=P.useChat(),{message:o}=_.useMessage();return i.at(-1)?.id===o?.id&&e||o.role==="user"?null:r.jsx(Hr,{...t})},wr=a.ikp("div",{_id:"aiChatMessageCustomActions"}),lt=t=>{const{children:e,...i}=t,{aiChatSettings:o}=g.useInkeepConfig(),{message:n}=_.useMessage(),{isStreaming:s,messages:d}=P.useChat(),c=d.at(-1)?.id===n?.id,m=n.role==="assistant",l=o.messageActions||[];return c&&s||!m?null:r.jsx(wr,{children:u.maybeRender(e,l),...i})},Lr=a.ikp("a",{_id:"aiChatMessageCustomAction"}),Dr=a.ikp("button",{_id:"aiChatMessageCustomAction"}),ht=t=>{const{onClick:e,action:i,...o}=t,{message:n}=_.useMessage(),{handleAction:s}=re.useChatAction(i,n.id),{logEvent:d}=se.useBaseEvents(),{conversationId:c}=P.useChat(),m=()=>{s(),d({eventName:"user_escalation_indicated",properties:{escalationType:"contact_us",conversationId:c}})},l=i.label,b=r.jsxs(r.Fragment,{children:[i.icon&&r.jsx(w.BuiltInIconRenderer,{iconSettings:i.icon}),l]});return i.action.type==="open_link"?r.jsx(Lr,{href:i.action.url,target:"_blank",rel:"noopener","data-type":i.action.type,onClick:C.composeEventHandlers(e,m),children:b,...o}):r.jsx(Dr,{"data-type":i.action.type,onClick:C.composeEventHandlers(e,m),children:b,...o})},Rr=a.ikp("button",{_id:"aiChatMessageAction"}),ut=t=>{const{action:e,onClick:i,className:o,...n}=t,{conversationId:s}=P.useChat(),{baseSettings:{onFeedback:d}}=g.useInkeepConfig(),{message:c}=_.useMessage(),{isStreaming:m,messages:l}=P.useChat(),[b,v]=ee.useCopyToClipboard(),{feedback:p,submitPositiveFeedback:F,setCurrentFeedback:S,currentFeedback:B}=ae.useMessageFeedback(),{logEvent:I}=se.useBaseEvents(),[L,$]=Da.useSettleAction(),D=l.at(-1)?.id===c?.id,E=c.role==="assistant";if(D&&m||!E)return null;const T={copy(){v(u.getMessageContent(c)),I({eventName:"assistant_message_copied",properties:{conversationId:s}})},upvote(){F(c.id).then(()=>{$()})},downvote(){S(c.id)}},R={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},y={copy:r.jsx(M.CustomIcon,{iconKey:b?"messageCopied":"messageCopy"}),upvote:r.jsx(M.CustomIcon,{iconKey:L?"messageCopied":"thumbsUp"}),downvote:r.jsx(M.CustomIcon,{iconKey:"thumbsDown"})},Z={copy:{"data-copied":u.dataAttr(b)},upvote:{"data-upvoted":u.dataAttr(p[c.id]?.type==="positive")},downvote:{"data-downvoted":u.dataAttr(p[c.id]?.type==="negative"),"data-state":B===null?"closed":"open"}};return{copy:!1,upvote:!d,downvote:!d}[e]?null:r.jsx(Rr,{"data-action":e,...Z[e],children:y[e],"aria-label":R[e],className:`${o} ${e}`,onClick:C.composeEventHandlers(i,T[e]),...n})},Or=a.ikp("div",{_id:"aiChatMessageSources"}),Ct=t=>{const{message:e}=_.useMessage();return e.role!=="assistant"||!e.parts.filter(o=>o.type==="data-artifact"&&o.data?.type?.toLowerCase()==="citation")?.length?null:r.jsx(Or,{...t})},qr=a.ikp("div",{_id:"aiChatMessageSources__Header"}),bt=t=>r.jsx(qr,{children:"Sources",...t}),Wr=a.ikp("div",{_id:"aiChatMessageSources__List"}),pt=t=>{const{message:e}=_.useMessage(),{children:i,...o}=t,{baseSettings:{transformSource:n,organizationDisplayName:s},aiChatSettings:{shouldOpenLinksInNewTab:d},searchSettings:{tabs:c}}=g.useInkeepConfig();if(e.role!=="assistant")return null;const m=e.parts.filter(v=>v.type==="data-artifact"&&v.data?.type?.toLowerCase()==="citation");if(!m?.length)return null;const l=new Map,b=m.filter(v=>{const p=v.data.artifactSummary.url;return!p||l.has(p)?!1:(l.set(p,!0),!0)}).map(v=>{const p=v.data,F={id:p?.artifactId,title:p?.artifactSummary?.title||p?.name,url:p?.artifactSummary?.url||"",description:"",breadcrumbs:[],type:p?.artifactSummary?.record_type,contentType:p?.artifactType,tag:p?.artifactType},B=(n??(L=>({...L,shouldOpenInNewTab:d,icon:Ka.getIcon(L)})))(F,"chatSourceItem",{organizationDisplayName:s,tabs:c}),I=B.shouldOpenInNewTab!==void 0?B.shouldOpenInNewTab:d;return{...B,isExternal:I}});return r.jsx(Wr,{children:u.maybeRender(i,b),...o})},Nr=a.ikp(wa.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),vt=t=>{const{source:e,onClick:i,...o}=t,{logEvent:n}=se.useBaseEvents(),{conversationId:s}=P.useChat(),d=()=>{n({eventName:"assistant_source_item_clicked",properties:{conversationId:s,link:e}})};return r.jsx(O.SourceItemProvider,{source:e,children:r.jsx(Nr,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:C.composeEventHandlers(i,d),...o})})},Vr=a.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),gt=t=>{const{source:e}=O.useSourceItem();return e.breadcrumbs?.length?r.jsx(Vr,{"data-type":e.type,...t}):null},Qr=a.ikp(M.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),$r=a.ikp(w.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),Pt=t=>{const{source:e}=O.useSourceItem();return r.jsx($r,{iconSettings:e.icon,"data-type":e.type,...t})},Ur=a.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),Ft=t=>{const{source:e}=O.useSourceItem();return r.jsx(Ur,{"data-type":e.type,children:e.title,...t})},Kr=a.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),_t=t=>{const{source:e}=O.useSourceItem();return r.jsx(Kr,{"data-type":e.type,...t})},zr=a.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),Et=t=>{const{source:e}=O.useSourceItem(),{children:i,...o}=t,n=h.useMemo(()=>e.description?qa.highlightEmphasis(e.description):[],[e.description]);return n.length?r.jsx(zr,{"data-type":e.type,children:u.maybeRender(i,n),...o}):null},Gr=a.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),At=t=>{const{part:e,...i}=t,{source:o}=O.useSourceItem();return typeof e=="string"?e:r.jsx(Gr,{"data-type":o.type,children:e.content,"data-highlighted":u.dataAttr(e.highlighted),...i})},Yr=a.ikp(M.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),kt=t=>{const{source:e}=O.useSourceItem();return r.jsx(Yr,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},It=a.ikp("div",{_id:"aiChatFooter"}),Mt=a.ikp("div",{_id:"aiChatInput__Fieldset"}),xt=a.ikp("div",{_id:"aiChatInput__Group"}),Jr=a.ikp("textarea",{_id:"aiChatInput"}),ft=h.forwardRef(({onChange:t,onKeyDown:e,...i},o)=>{const{handleInputChange:n,handleInputKeyDown:s,input:d,error:c,shouldAutoFocusInput:m,inputRef:l}=P.useChat(),{aiChatSettings:b}=g.useInkeepConfig(),v=oe.useComposedRefs(o,l);return $a.useWidgetAutoFocus("chat",l,m),r.jsx(Jr,{asChild:!0,ref:v,maxLength:99999,placeholder:b.placeholder,value:d,onChange:C.composeEventHandlers(t,n),onKeyDown:C.composeEventHandlers(e,s),disabled:!!c||b.isViewOnly,...i,children:r.jsx(ie,{})})}),Xr=a.ikp("button",{_id:"aiChatInput__SendButton"}),St=t=>{const{handleSubmit:e,isSubmitDisabled:i,error:o}=P.useChat(),{aiChatSettings:n}=g.useInkeepConfig(),{onClick:s,...d}=t;return r.jsx(Xr,{onClick:C.composeEventHandlers(s,()=>e()),"aria-label":"Send message",disabled:i||!!o||n.isViewOnly,...d})},Bt=a.ikp(M.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),Zr=a.ikp("div",{_id:"aiChatAttachmentsBar"}),Tt=t=>{const e={supportedInputs:[]};return!e||!e.supportedInputs?.length?null:r.jsx(f.AttachmentsBarProvider,{children:r.jsx(Zr,{...t})})},eo=a.ikp("div",{_id:"aiChatAttachmentsBar__List"}),yt=t=>{const{children:e,...i}=t,o=[];return r.jsx(eo,{children:u.maybeRender(e,o),...i})},to=a.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),jt=t=>{const{attachment:e,...i}=t;return r.jsx(V.AttachmentItemProvider,{attachment:e,children:r.jsx(to,{...i})})},io=a.ikp(w.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),Ht=t=>{const{attachment:e}=V.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?r.jsx(io,{iconSettings:i,...t}):null},ao=a.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),wt=t=>{const{attachment:e}=V.useAttachmentItem();return r.jsx(ao,{children:e.title,...t})},ro=a.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),Lt=t=>{const{onClick:e,...i}=t,o=()=>{};return r.jsx(ro,{"aria-label":"Remove attachment",children:r.jsx(M.CustomIcon,{iconKey:"close"}),onClick:C.composeEventHandlers(e,o),...i})},Dt=a.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),Rt=a.ikp(W.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),Ot=a.ikp(W.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:r.jsx(M.CustomIcon,{iconKey:"info"})}),me=a.ikp(W.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),qt=a.ikp(W.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:r.jsxs(r.Fragment,{children:[r.jsx(me,{}),"Attachments will be kept in context for the entire conversation."]})}),oo=a.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),Wt=t=>{const{children:e,...i}=t,o={supportedInputs:[]};return o?.supportedInputs?r.jsx(oo,{children:u.maybeRender(e,o.supportedInputs),...i}):null},no=a.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),Nt=t=>{const{input:e,onClick:i,...o}=t,n={supportedInputs:[]},s=[],d=()=>{},{selectInput:c,onOpen:m}=f.useAttachmentsBar(),l=()=>{if(e.type==="FUNCTIONAL_MULTI_ATTACHMENT")return n?e.onInvoke(n,e,d,[...s]):void 0;c(e),m()};return r.jsx(no,{children:e.displayName,onClick:C.composeEventHandlers(i,l),...o})},so=a.ikp(A.Root,{_id:"aiChatAttachmentsBar__Modal"}),Vt=t=>{const{onOpenChange:e,...i}=t,{selectInput:o,isOpen:n,onClose:s,selectedInput:d}=f.useAttachmentsBar(),c=m=>{m||(s(),o(null))};return r.jsx(so,{open:n&&d!==null,onOpenChange:C.composeEventHandlers(e,c),...i})},Qt=a.ikp(A.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),$t=a.ikp(A.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),Ut=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),co=a.ikp(A.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),Kt=t=>{const{selectedInput:e}=f.useAttachmentsBar(),i=`Add ${e?.displayName}`;return r.jsx(co,{children:i,...t})},mo=a.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),zt=t=>{const{selectedInput:e}=f.useAttachmentsBar(),i=e?.workflowModalProps?.modalHelpText;return i?r.jsx(mo,{children:i,...t}):null},lo=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),Gt=t=>{const{children:e,...i}=t,{selectedInput:o}=f.useAttachmentsBar(),n=o?.workflowModalProps?.modalHelpElement;return n?r.jsx(lo,{asChild:!e,children:e||n,...i}):null},Yt=a.ikp(A.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:r.jsx(M.CustomIcon,{iconKey:"close"})}),Jt=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),ho=a.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),Xt=t=>{const{onSubmit:e,...i}=t,{form:o}=f.useAttachmentsBar();return r.jsx(ho,{onSubmit:C.composeEventHandlers(e,o.onSubmit),...i})},Zt=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),uo=a.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),ei=t=>{const{form:e,selectedInput:i}=f.useAttachmentsBar();return r.jsx(uo,{htmlFor:`${i?.id}-title`,children:e.labels.title,...t})},Co=a.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ti=t=>{const{onChange:e,...i}=t,{form:o,selectedInput:n}=f.useAttachmentsBar();return r.jsx(Co,{name:"title",value:o.data.title,id:`${n?.id}-title`,"data-invalid":u.dataAttr(!!o.errors.title),"aria-invalid":!!o.errors.title,onChange:C.composeEventHandlers(e,o.onChange),...i})},bo=a.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),ii=t=>{const{form:e}=f.useAttachmentsBar();return e.errors.title?r.jsx(bo,{"aria-live":"polite",children:e.errors.title,...t}):null},ai=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),po=a.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),ri=t=>{const{form:e,selectedInput:i}=f.useAttachmentsBar();return r.jsx(po,{htmlFor:`${i?.id}-content`,children:e.labels.content,...t})},vo=a.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),oi=t=>{const{onChange:e,...i}=t,{form:o,selectedInput:n}=f.useAttachmentsBar();return r.jsx(vo,{asChild:!0,rows:4,name:"content",value:o.data.content,id:`${n?.id}-content`,"data-invalid":u.dataAttr(!!o.errors.content),"aria-invalid":!!o.errors.content,onChange:C.composeEventHandlers(e,o.onChange),...i,children:r.jsx(ie,{maxRows:10})})},go=a.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),ni=t=>{const{form:e}=f.useAttachmentsBar();return e.errors.content?r.jsx(go,{"aria-live":"polite",children:e.errors.content,...t}):null},si=a.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),di=a.ikp("div",{_id:"aiChatActionBar"}),ci=a.ikp("div",{_id:"aiChat__ChatActions"}),mi=a.ikp("div",{_id:"aiChatTagline__Container"}),li=a.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),hi=a.ikp(La.default,{_id:"aiChatTagline__Logo"}),ui=a.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),Po=a.ikp(W.Trigger,{_id:"aiChat__ChatAction"}),J=t=>{const{action:e,onClick:i,className:o,...n}=t,s={},{clear:d,stop:c,isBusy:m,messages:l}=P.useChat(),{conversationId:b}=P.useChat(),{aiChatSettings:v}=g.useInkeepConfig(),[p,F]=ee.useCopyToClipboard(),[S]=ee.useCopyToClipboard(),B=l.length>0;if({help:!1,copy:!B||!v.isCopyChatButtonVisible||m,share:!B||!v.isShareButtonVisible||!b||!!s||m,clear:!B||v.isViewOnly||m,stop:!m}[e])return null;const D={help:()=>{},copy:()=>{const N=l.map(T=>{const R=`**${T.role==="assistant"?"AI Assistant":"User"}**`,y=u.getMessageContent(T);return`${R}
|
|
5
|
+
How can I help?`,b={parts:[{type:"text",text:o.introMessage??`${d}${m}`}],id:Za,...e,role:"assistant"};return r.jsx(ce,{message:b,...i})}),Ar=a.ikp("div",{_id:"aiChatMessageHeader"}),$e=t=>{const{message:e}=_.useMessage();return r.jsx(Ar,{"data-role":e.role,...t})},kr=a.ikp("div",{_id:"aiChatMessageLoading",children:"Thinking..."}),Ue=t=>r.jsx(kr,{...t}),Ir=a.ikp("div",{_id:"aiChatMessageAvatar"}),Ke=t=>{const{message:e}=_.useMessage();return r.jsx(Ir,{"data-role":e.role,...t})},Mr=a.ikp(de.Root,{_id:"aiChatMessageAvatarContent"}),ze=t=>{const{message:e}=_.useMessage(),{baseSettings:i}=g.useInkeepConfig();return r.jsx(Mr,{"data-username":u.dataAttr(e.role==="user"&&!!i.userProperties.name),"data-role":e.role,...t})},fr=a.ikp(de.Fallback,{_id:"aiChatMessageAvatarFallback"}),Ge=l.memo(t=>{const{baseSettings:e}=g.useInkeepConfig(),{message:i}=_.useMessage();return e.userProperties.name?r.jsx(fr,{"data-role":i.role,children:u.getInitials(e.userProperties.name),...t}):null}),he=a.ikp(de.Image,{_id:"aiChatMessageAvatarImage"}),Ye=l.memo(t=>{const{onLoadingStatusChange:e,...i}=t,{aiChatSettings:o,baseSettings:{userProperties:n}}=g.useInkeepConfig(),{message:s}=_.useMessage(),{aiAssistantAvatar:d}=o??{},c=typeof d=="string"?d:d?.light,m=(typeof d=="string"?d:d?.dark)??c,h=$a.useColorModeValue(c,m),[b,v]=l.useState(h);l.useEffect(()=>{v(h)},[h]);const p=P=>{P==="error"&&v(null)};return s.role==="user"?n.name?null:o.userAvatar?r.jsx(he,{"data-type":"image",alt:"User avatar","data-role":s.role,src:o.userAvatar,...t}):r.jsx(Da.default,{"data-type":"icon","data-role":s.role,...t}):b?r.jsx(he,{src:b,alt:"AI assistant avatar","data-type":"image","data-role":s.role,onLoadingStatusChange:C.composeEventHandlers(e,p),...i}):r.jsx(La.default,{"data-type":"icon","data-role":s.role,...t})}),xr=a.ikp("span",{_id:"aiChatMessageName"}),Je=t=>{const{message:e}=_.useMessage(),{aiChatSettings:i}=g.useInkeepConfig(),{aiAssistantName:o}=i;return r.jsx(xr,{"data-role":e.role,children:e.role==="user"?"You":o||"AI assistant",...t})},Sr=a.ikp("div",{_id:"aiChatMessageContentWrapper"}),Xe=t=>{const{message:e}=_.useMessage();return r.jsx(Sr,{"data-role":e.role,...t})},Br=a.ikp("div",{_id:"aiChatMessageContent"}),Ze=t=>{const{message:e}=_.useMessage();return r.jsx(Br,{"data-role":e.role,...t})},Tr=a.ikp("div",{_id:"aiChatMessageAttachments"}),et=t=>{const{message:e}=_.useMessage(),i=[];return e.role!=="user"||!i?.length?null:r.jsx(U.MessageAttachmentsProvider,{children:r.jsx(Tr,{...t})})},yr=a.ikp("div",{_id:"aiChatMessageAttachments__List"}),tt=t=>{const{children:e,...i}=t,o=[];return o?r.jsx(yr,{children:u.maybeRender(e,o),...i}):null},Hr=a.ikp("div",{_id:"aiChatMessageAttachments__Item"}),it=t=>{const{attachment:e,onClick:i,...o}=t,{selectItem:n,onOpen:s}=U.useMessageAttachments(),d=()=>{n(e),s()};return r.jsx(V.AttachmentItemProvider,{attachment:e,children:r.jsx(Hr,{onClick:C.composeEventHandlers(i,d),...o})})},jr=a.ikp(w.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),at=t=>{const{attachment:e}=V.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?r.jsx(jr,{iconSettings:i,...t}):null},wr=a.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),rt=t=>{const{attachment:e}=V.useAttachmentItem();return r.jsx(wr,{children:e.title,...t})},Lr=a.ikp(A.Root,{_id:"aiChatMessageAttachmentsPreview"}),ot=t=>{const{onOpenChange:e,...i}=t,{selectItem:o,isOpen:n,onClose:s,selectedItem:d}=U.useMessageAttachments(),c=m=>{m||(s(),o(null))};return r.jsx(Lr,{open:n&&d!==null,onOpenChange:C.composeEventHandlers(e,c),...i})},nt=a.ikp(A.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),st=a.ikp(A.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),Dr=a.ikp(A.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),dt=t=>{const{selectedItem:e}=U.useMessageAttachments();return r.jsx(Dr,{children:e?.title||"Attachment",...t})},ct=a.ikp(A.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:r.jsx(x.CustomIcon,{iconKey:"close"})}),Rr=a.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),mt=t=>{const{selectedItem:e}=U.useMessageAttachments();return r.jsx(Rr,{children:e?.content,...t})},lt=t=>{const{text:e,componentStyles:i,...o}=t,{aiChatSettings:n}=g.useInkeepConfig(),{shouldOpenLinksInNewTab:s}=n;return r.jsx(z.Markdown,{children:e,componentStyles:i,shouldOpenLinksInNewTab:s,...o})},ht=({name:t,props:e,componentDef:i})=>{const n=Ga.useShadow()?.shadowHost,s=l.useRef(void 0),d=l.useRef(null),c=l.useRef(null),m=l.useRef(!1),[h,b]=l.useState(!1),[v,p]=l.useState(!1),P=l.useRef(i);l.useMemo(()=>{i!==P.current&&(typeof i=="function"&&typeof P.current=="function"?i.toString()!==P.current.toString()&&(P.current=i):P.current=i)},[i]);const I=P.current,M=l.useRef(e);M.current=e;const f=l.useRef(null),L=l.useRef(I);L.current!==I&&(f.current=null,L.current=I),l.useEffect(()=>{s.current||(s.current=`dyn:${t}:${crypto.randomUUID()}`,b(!0))},[t]),l.useLayoutEffect(()=>{if(!I||!n||!h||!s.current)return;const D=s.current,E=document.createElement("div");return E.setAttribute("data-ikp-component",""),E.setAttribute("data-component",t),E.setAttribute("slot",D),d.current=E,m.current=!1,n.appendChild(E),p(!0),()=>{m.current=!0,p(!1),queueMicrotask(()=>{try{c.current&&(c.current.unmount(),c.current=null)}catch(N){console.debug("Ignoring unmount error:",N)}E.parentNode===n&&E.remove(),d.current=null})}},[I,n,h,t]);const $=D=>{const E=d.current;if(!E||m.current)return;const N=y=>{if(f.current!==null)return f.current;if(typeof y!="function"||y.length>1)return f.current=!1,!1;try{if(y.constructor===Function){const Z=y({});return f.current=l.isValidElement(Z),f.current}return f.current=!1,!1}catch{return f.current=!0,!0}};let T;const R=P.current;if(N(R))try{T=l.createElement(R,D||{})}catch(y){console.error("Error creating React element from component:",y);return}else if(typeof R=="function")T=R(D||{},E,null);else{console.error("Invalid component definition");return}if(l.isValidElement(T)||typeof T=="string"){if(m.current)return;c.current||(c.current=Xa.createRoot(E)),!m.current&&c.current&&c.current.render(T);return}c.current&&!m.current&&c.current.render(null)};return l.useEffect(()=>{$(M.current)},[I,v]),l.useEffect(()=>{!c.current||m.current||$(e)},[e]),r.jsx("slot",{name:s.current})},Or=a.ikp("div",{_id:"aiChatMessagePart"}),qr=a.ikp("div",{_id:"aiChatMessageToolbar"}),ut=t=>{const{isLoading:e,messages:i}=F.useChat(),{message:o}=_.useMessage();return i.at(-1)?.id===o?.id&&e||o.role==="user"?null:r.jsx(qr,{...t})},Wr=a.ikp("div",{_id:"aiChatMessageCustomActions"}),Ct=t=>{const{children:e,...i}=t,{aiChatSettings:o}=g.useInkeepConfig(),{message:n}=_.useMessage(),{isStreaming:s,messages:d}=F.useChat(),c=d.at(-1)?.id===n?.id,m=n.role==="assistant",h=o.messageActions||[];return c&&s||!m?null:r.jsx(Wr,{children:u.maybeRender(e,h),...i})},Nr=a.ikp("a",{_id:"aiChatMessageCustomAction"}),Vr=a.ikp("button",{_id:"aiChatMessageCustomAction"}),bt=t=>{const{onClick:e,action:i,...o}=t,{message:n}=_.useMessage(),{handleAction:s}=re.useChatAction(i,n.id),{logEvent:d}=se.useBaseEvents(),{conversationId:c}=F.useChat(),m=()=>{s(),d({eventName:"user_escalation_indicated",properties:{escalationType:"contact_us",conversationId:c}})},h=i.label,b=r.jsxs(r.Fragment,{children:[i.icon&&r.jsx(w.BuiltInIconRenderer,{iconSettings:i.icon}),h]});return i.action.type==="open_link"?r.jsx(Nr,{href:i.action.url,target:"_blank",rel:"noopener","data-type":i.action.type,onClick:C.composeEventHandlers(e,m),children:b,...o}):r.jsx(Vr,{"data-type":i.action.type,onClick:C.composeEventHandlers(e,m),children:b,...o})},Qr=a.ikp("button",{_id:"aiChatMessageAction"}),pt=t=>{const{action:e,onClick:i,className:o,...n}=t,{conversationId:s}=F.useChat(),{baseSettings:{onFeedback:d}}=g.useInkeepConfig(),{message:c}=_.useMessage(),{isStreaming:m,messages:h}=F.useChat(),[b,v]=ee.useCopyToClipboard(),{feedback:p,submitPositiveFeedback:P,setCurrentFeedback:I,currentFeedback:M}=ae.useMessageFeedback(),{logEvent:f}=se.useBaseEvents(),[L,$]=qa.useSettleAction(),D=h.at(-1)?.id===c?.id,E=c.role==="assistant";if(D&&m||!E)return null;const T={copy(){v(u.getMessageContent(c)),f({eventName:"assistant_message_copied",properties:{conversationId:s}})},upvote(){P(c.id).then(()=>{$()})},downvote(){I(c.id)}},R={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},y={copy:r.jsx(x.CustomIcon,{iconKey:b?"messageCopied":"messageCopy"}),upvote:r.jsx(x.CustomIcon,{iconKey:L?"messageCopied":"thumbsUp"}),downvote:r.jsx(x.CustomIcon,{iconKey:"thumbsDown"})},Z={copy:{"data-copied":u.dataAttr(b)},upvote:{"data-upvoted":u.dataAttr(p[c.id]?.type==="positive")},downvote:{"data-downvoted":u.dataAttr(p[c.id]?.type==="negative"),"data-state":M===null?"closed":"open"}};return{copy:!1,upvote:!d,downvote:!d}[e]?null:r.jsx(Qr,{"data-action":e,...Z[e],children:y[e],"aria-label":R[e],className:`${o} ${e}`,onClick:C.composeEventHandlers(i,T[e]),...n})},$r=a.ikp("div",{_id:"aiChatMessageSources"}),vt=t=>{const{message:e}=_.useMessage();return e.role!=="assistant"||!e.parts.filter(o=>o.type==="data-artifact"&&o.data?.type?.toLowerCase()==="citation")?.length?null:r.jsx($r,{...t})},Ur=a.ikp("div",{_id:"aiChatMessageSources__Header"}),gt=t=>r.jsx(Ur,{children:"Sources",...t}),Kr=a.ikp("div",{_id:"aiChatMessageSources__List"}),Pt=t=>{const{message:e}=_.useMessage(),{children:i,...o}=t,{baseSettings:{transformSource:n,organizationDisplayName:s},aiChatSettings:{shouldOpenLinksInNewTab:d},searchSettings:{tabs:c}}=g.useInkeepConfig();if(e.role!=="assistant")return null;const m=e.parts.filter(v=>v.type==="data-artifact"&&v.data?.type?.toLowerCase()==="citation");if(!m?.length)return null;const h=new Map,b=m.filter(v=>{const p=v.data.artifactSummary.url;return!p||h.has(p)?!1:(h.set(p,!0),!0)}).map(v=>{const p=v.data,P={id:p?.artifactId,title:p?.artifactSummary?.title||p?.name,url:p?.artifactSummary?.url||"",description:"",breadcrumbs:[],type:p?.artifactSummary?.record_type,contentType:p?.artifactType,tag:p?.artifactType},M=(n??(L=>({...L,shouldOpenInNewTab:d,icon:Ya.getIcon(L)})))(P,"chatSourceItem",{organizationDisplayName:s,tabs:c}),f=M.shouldOpenInNewTab!==void 0?M.shouldOpenInNewTab:d;return{...M,isExternal:f}});return r.jsx(Kr,{children:u.maybeRender(i,b),...o})},zr=a.ikp(Ra.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),Ft=t=>{const{source:e,onClick:i,...o}=t,{logEvent:n}=se.useBaseEvents(),{conversationId:s}=F.useChat(),d=()=>{n({eventName:"assistant_source_item_clicked",properties:{conversationId:s,link:e}})};return r.jsx(O.SourceItemProvider,{source:e,children:r.jsx(zr,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:C.composeEventHandlers(i,d),...o})})},Gr=a.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),_t=t=>{const{source:e}=O.useSourceItem();return e.breadcrumbs?.length?r.jsx(Gr,{"data-type":e.type,...t}):null},Yr=a.ikp(x.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),Jr=a.ikp(w.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),Et=t=>{const{source:e}=O.useSourceItem();return r.jsx(Jr,{iconSettings:e.icon,"data-type":e.type,...t})},Xr=a.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),At=t=>{const{source:e}=O.useSourceItem();return r.jsx(Xr,{"data-type":e.type,children:e.title,...t})},Zr=a.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),kt=t=>{const{source:e}=O.useSourceItem();return r.jsx(Zr,{"data-type":e.type,...t})},eo=a.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),It=t=>{const{source:e}=O.useSourceItem(),{children:i,...o}=t,n=l.useMemo(()=>e.description?Va.highlightEmphasis(e.description):[],[e.description]);return n.length?r.jsx(eo,{"data-type":e.type,children:u.maybeRender(i,n),...o}):null},to=a.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),Mt=t=>{const{part:e,...i}=t,{source:o}=O.useSourceItem();return typeof e=="string"?e:r.jsx(to,{"data-type":o.type,children:e.content,"data-highlighted":u.dataAttr(e.highlighted),...i})},io=a.ikp(x.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),ft=t=>{const{source:e}=O.useSourceItem();return r.jsx(io,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},xt=a.ikp("div",{_id:"aiChatFooter"}),St=a.ikp("div",{_id:"aiChatInput__Fieldset"}),Bt=a.ikp("div",{_id:"aiChatInput__Group"}),ao=a.ikp("textarea",{_id:"aiChatInput"}),Tt=l.forwardRef(({onChange:t,onKeyDown:e,...i},o)=>{const{handleInputChange:n,handleInputKeyDown:s,input:d,error:c,shouldAutoFocusInput:m,inputRef:h}=F.useChat(),{aiChatSettings:b}=g.useInkeepConfig(),v=oe.useComposedRefs(o,h);return za.useWidgetAutoFocus("chat",h,m),r.jsx(ao,{asChild:!0,ref:v,maxLength:99999,placeholder:b.placeholder,value:d,onChange:C.composeEventHandlers(t,n),onKeyDown:C.composeEventHandlers(e,s),disabled:!!c||b.isViewOnly,...i,children:r.jsx(ie,{})})}),ro=a.ikp("button",{_id:"aiChatInput__SendButton"}),yt=t=>{const{handleSubmit:e,isSubmitDisabled:i,error:o}=F.useChat(),{aiChatSettings:n}=g.useInkeepConfig(),{onClick:s,...d}=t;return r.jsx(ro,{onClick:C.composeEventHandlers(s,()=>e()),"aria-label":"Send message",disabled:i||!!o||n.isViewOnly,...d})},Ht=a.ikp(x.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),oo=a.ikp("div",{_id:"aiChatAttachmentsBar"}),jt=t=>{const e={supportedInputs:[]};return!e||!e.supportedInputs?.length?null:r.jsx(B.AttachmentsBarProvider,{children:r.jsx(oo,{...t})})},no=a.ikp("div",{_id:"aiChatAttachmentsBar__List"}),wt=t=>{const{children:e,...i}=t,o=[];return r.jsx(no,{children:u.maybeRender(e,o),...i})},so=a.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),Lt=t=>{const{attachment:e,...i}=t;return r.jsx(V.AttachmentItemProvider,{attachment:e,children:r.jsx(so,{...i})})},co=a.ikp(w.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),Dt=t=>{const{attachment:e}=V.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?r.jsx(co,{iconSettings:i,...t}):null},mo=a.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),Rt=t=>{const{attachment:e}=V.useAttachmentItem();return r.jsx(mo,{children:e.title,...t})},lo=a.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),Ot=t=>{const{onClick:e,...i}=t,o=()=>{};return r.jsx(lo,{"aria-label":"Remove attachment",children:r.jsx(x.CustomIcon,{iconKey:"close"}),onClick:C.composeEventHandlers(e,o),...i})},qt=a.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),Wt=a.ikp(W.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),Nt=a.ikp(W.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:r.jsx(x.CustomIcon,{iconKey:"info"})}),me=a.ikp(W.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),Vt=a.ikp(W.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:r.jsxs(r.Fragment,{children:[r.jsx(me,{}),"Attachments will be kept in context for the entire conversation."]})}),ho=a.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),Qt=t=>{const{children:e,...i}=t,o={supportedInputs:[]};return o?.supportedInputs?r.jsx(ho,{children:u.maybeRender(e,o.supportedInputs),...i}):null},uo=a.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),$t=t=>{const{input:e,onClick:i,...o}=t,n={supportedInputs:[]},s=[],d=()=>{},{selectInput:c,onOpen:m}=B.useAttachmentsBar(),h=()=>{if(e.type==="FUNCTIONAL_MULTI_ATTACHMENT")return n?e.onInvoke(n,e,d,[...s]):void 0;c(e),m()};return r.jsx(uo,{children:e.displayName,onClick:C.composeEventHandlers(i,h),...o})},Co=a.ikp(A.Root,{_id:"aiChatAttachmentsBar__Modal"}),Ut=t=>{const{onOpenChange:e,...i}=t,{selectInput:o,isOpen:n,onClose:s,selectedInput:d}=B.useAttachmentsBar(),c=m=>{m||(s(),o(null))};return r.jsx(Co,{open:n&&d!==null,onOpenChange:C.composeEventHandlers(e,c),...i})},Kt=a.ikp(A.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),zt=a.ikp(A.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),Gt=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),bo=a.ikp(A.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),Yt=t=>{const{selectedInput:e}=B.useAttachmentsBar(),i=`Add ${e?.displayName}`;return r.jsx(bo,{children:i,...t})},po=a.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),Jt=t=>{const{selectedInput:e}=B.useAttachmentsBar(),i=e?.workflowModalProps?.modalHelpText;return i?r.jsx(po,{children:i,...t}):null},vo=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),Xt=t=>{const{children:e,...i}=t,{selectedInput:o}=B.useAttachmentsBar(),n=o?.workflowModalProps?.modalHelpElement;return n?r.jsx(vo,{asChild:!e,children:e||n,...i}):null},Zt=a.ikp(A.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:r.jsx(x.CustomIcon,{iconKey:"close"})}),ei=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),go=a.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),ti=t=>{const{onSubmit:e,...i}=t,{form:o}=B.useAttachmentsBar();return r.jsx(go,{onSubmit:C.composeEventHandlers(e,o.onSubmit),...i})},ii=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),Po=a.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),ai=t=>{const{form:e,selectedInput:i}=B.useAttachmentsBar();return r.jsx(Po,{htmlFor:`${i?.id}-title`,children:e.labels.title,...t})},Fo=a.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ri=t=>{const{onChange:e,...i}=t,{form:o,selectedInput:n}=B.useAttachmentsBar();return r.jsx(Fo,{name:"title",value:o.data.title,id:`${n?.id}-title`,"data-invalid":u.dataAttr(!!o.errors.title),"aria-invalid":!!o.errors.title,onChange:C.composeEventHandlers(e,o.onChange),...i})},_o=a.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),oi=t=>{const{form:e}=B.useAttachmentsBar();return e.errors.title?r.jsx(_o,{"aria-live":"polite",children:e.errors.title,...t}):null},ni=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),Eo=a.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),si=t=>{const{form:e,selectedInput:i}=B.useAttachmentsBar();return r.jsx(Eo,{htmlFor:`${i?.id}-content`,children:e.labels.content,...t})},Ao=a.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),di=t=>{const{onChange:e,...i}=t,{form:o,selectedInput:n}=B.useAttachmentsBar();return r.jsx(Ao,{asChild:!0,rows:4,name:"content",value:o.data.content,id:`${n?.id}-content`,"data-invalid":u.dataAttr(!!o.errors.content),"aria-invalid":!!o.errors.content,onChange:C.composeEventHandlers(e,o.onChange),...i,children:r.jsx(ie,{maxRows:10})})},ko=a.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),ci=t=>{const{form:e}=B.useAttachmentsBar();return e.errors.content?r.jsx(ko,{"aria-live":"polite",children:e.errors.content,...t}):null},mi=a.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),li=a.ikp("div",{_id:"aiChatActionBar"}),hi=a.ikp("div",{_id:"aiChat__ChatActions"}),ui=a.ikp("div",{_id:"aiChatTagline__Container"}),Ci=a.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),bi=a.ikp(Oa.default,{_id:"aiChatTagline__Logo"}),pi=a.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),Io=a.ikp(W.Trigger,{_id:"aiChat__ChatAction"}),J=t=>{const{action:e,onClick:i,className:o,...n}=t,s={},{clear:d,stop:c,isBusy:m,messages:h}=F.useChat(),{conversationId:b}=F.useChat(),{aiChatSettings:v}=g.useInkeepConfig(),[p,P]=ee.useCopyToClipboard(),[I]=ee.useCopyToClipboard(),M=h.length>0;if({help:!1,copy:!M||!v.isCopyChatButtonVisible||m,share:!M||!v.isShareButtonVisible||!b||!!s||m,clear:!M||v.isViewOnly||m,stop:!m}[e])return null;const D={help:()=>{},copy:()=>{const N=h.map(T=>{const R=`**${T.role==="assistant"?"AI Assistant":"User"}**`,y=u.getMessageContent(T);return`${R}
|
|
6
6
|
|
|
7
7
|
${y}`}).join(`
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
`);F(N)},share:async()=>{},clear:d,stop:c},E={copy:p,share:S};return r.jsx(W.Tooltip,{delayDuration:0,open:E[e],children:r.jsx(Po,{"data-type":e,"data-copied":u.dataAttr(p||S),className:`${o} ${e}`,children:r.jsx(le,{action:e}),onClick:C.composeEventHandlers(i,D[e]),...n})})},Fo=a.ikp("span",{_id:"aiChat__ChatActionLabel"}),le=t=>{const{action:e,...i}=t,{aiChatSettings:o}=g.useInkeepConfig(),n=o.toolbarButtonLabels??{},s={help:n.getHelp??"Get Help",copy:n.copyChat??"Copy",share:n.share??"Share",clear:n.clear??"Clear",stop:n.stop??"Stop"};return r.jsx(Fo,{children:s[e],...i})},_o=a.ikp(W.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),Ci=t=>{const{action:e,children:i,...o}=t,n={copy:"Copied!",share:"Link copied!"};return r.jsxs(_o,{sideOffset:5,...o,children:[r.jsx(W.Arrow,{}),i||n[e]]})},Eo=a.ikp(q.Root,{_id:"aiChatHelpActions"}),bi=t=>{const{children:e,...i}=t,{aiChatSettings:o}=g.useInkeepConfig(),{getHelpOptions:n}=o;if(!n||(n??[]).length===0)return null;const{_pinned:s,_unpinned:d}=n.reduce((b,v)=>{const p=v.isPinnedToToolbar?"_pinned":"_unpinned";return{...b,[p]:[...b[p],v]}},{_pinned:[],_unpinned:[]}),c=d.length===1?[...s,d[0]]:s,m=d.length===1?[]:d,l=te.useHelpMenuState();return r.jsx(te.HelpMenuProvider,{value:l,children:r.jsx(Eo,{open:l.open,onOpenChange:l.setOpen,children:u.maybeRender(e,{pinned:c,unpinned:m}),...i})})},Ao=a.ikp(J,{_id:"aiChatHelpAction",action:"help"}),ko=a.ikp("a",{_id:"aiChatHelpAction",target:"_blank",rel:"noreferrer"}),pi=t=>{const{action:e,onClick:i,...o}=t,{handleAction:n,logHelpAction:s}=re.useChatAction(e),d=e.action.type,c={"aria-label":e.name,"data-name":e.name,children:e.name,onClick:C.composeEventHandlers(i,()=>{n(),s()}),...o};return d==="open_link"?r.jsx(ko,{href:e.action.url,...c}):r.jsx(Ao,{...c})},Io=a.ikp(q.Trigger,{_id:"aiChatHelpActions__Trigger"}),vi=h.memo(t=>{const{aiChatSettings:e}=g.useInkeepConfig();return r.jsx(J,{action:"help",...t,asChild:!0,children:r.jsx(Io,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),Mo=a.ikp(q.Content,{_id:"aiChatHelpActions__Menu"}),gi=t=>r.jsx(Mo,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),Pi=a.ikp(q.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),Fi=t=>{const{action:e,onClick:i,...o}=t,{handleAction:n,logHelpAction:s}=re.useChatAction(e),{setOpen:d}=te.useHelpMenu(),c=()=>{n({onOpenForm:()=>d(!1)}),s()},m=e.action.type,l=a.ikp(m==="open_link"?"a":"button",{_id:"aiChatHelpActions__MenuItem",children:e.name,"aria-label":e.name,"data-name":e.name,"data-type":e.action.type,...m==="open_link"&&{href:e.action.url,target:"_blank",rel:"noopener"},onClick:C.composeEventHandlers(i,c)});return r.jsx(l,{...o})},xo=a.ikp(w.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),_i=t=>{const{action:e,...i}=t;return e.icon?r.jsx(xo,{iconSettings:e.icon,...i}):null},fo=a.ikp(A.Root,{_id:"aiChatFeedbackModal"}),Ei=t=>{const{onOpenChange:e,...i}=t,{currentFeedback:o,setCurrentFeedback:n}=ae.useMessageFeedback();return r.jsx(fo,{open:o!==null,onOpenChange:C.composeEventHandlers(e,()=>n(null)),...i})},Ai=a.ikp(A.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),ki=a.ikp(A.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),Ii=a.ikp(A.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),Mi=a.ikp(A.Close,{_id:"aiChatFeedbackModal__Close",children:r.jsx(M.CustomIcon,{iconKey:"close"})}),xi=a.ikp("div",{_id:"aiChatFeedbackModal__Body"}),So=a.ikp("form",{_id:"aiChatFeedbackForm"}),fi=t=>{const{onSubmit:e,...i}=t,{submitNegativeFeedback:o,currentFeedback:n,setCurrentFeedback:s}=ae.useMessageFeedback(),d=c=>{c.preventDefault();const m=c.target,l=new FormData(m),b=Object.fromEntries(l.entries());n&&(o(n,b),s(null))};return r.jsx(So,{onSubmit:C.composeEventHandlers(e,d),...i})},Bo=a.ikp("div",{_id:"aiChatFeedbackItem"}),Si=t=>{const{name:e,...i}=t;return r.jsx(G.FeedbackItemProvider,{name:e,children:r.jsx(Bo,{...i})})},To=a.ikp(Y.Root,{_id:"aiChatFeedbackItem__Checkbox"}),Bi=t=>{const{name:e,focusItem:i}=G.useFeedbackItem(),{onCheckedChange:o,...n}=t,s=d=>{d&&i?.current?.focus()};return r.jsx(To,{id:`feedback-${e}`,name:e,onCheckedChange:C.composeEventHandlers(o,s),...n})},Ti=a.ikp(Y.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:r.jsx(ue.CheckboxIcon,{})}),yo=a.ikp("label",{_id:"aiChatFeedbackItem__Label"}),yi=t=>{const{name:e}=G.useFeedbackItem(),i={unrelated_response:"Didn't answer my question",inaccurate_statement:"Inaccurate statement",inaccurate_code_snippet:"Inaccurate code snippet",irrelevant_citations:"Irrelevant citations"};return r.jsx(yo,{htmlFor:`feedback-${e}`,children:i[e],...t})},jo=a.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),ji=t=>{const{name:e,focusItem:i}=G.useFeedbackItem();return r.jsx(jo,{ref:i,name:`${e}:description`,...t})},Hi=a.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),Ho=a.ikp("div",{_id:"aiChatForm__Wrapper"}),wi=t=>{const{form:e}=k.useChatForm();return e?r.jsx(Ho,{...t}):null},wo=a.ikp("form",{_id:"aiChatForm"}),Li=t=>{const{onSubmit:e,...i}=t,{conversationId:o,messages:n}=P.useChat(),{handleSubmit:s,isSuccess:d}=k.useChatForm();return d?null:r.jsx(wo,{onSubmit:C.composeEventHandlers(e,c=>s(c,{id:o,messages:n})),...i})},Lo=a.ikp("button",{_id:"aiChatForm__Close",children:r.jsx(M.CustomIcon,{iconKey:"close"})}),Di=t=>{const{onClick:e,...i}=t,{closeForm:o}=k.useChatForm();return r.jsx(Lo,{onClick:C.composeEventHandlers(e,o),...i})},Ri=a.ikp("div",{_id:"aiChatForm__Header"}),Do=a.ikp("h2",{_id:"aiChatForm__Heading"}),Oi=t=>{const{form:e}=k.useChatForm();return e?.heading?r.jsx(Do,{children:e.heading,...t}):null},Ro=a.ikp(z.Markdown,{_id:"aiChatForm__Description"}),qi=t=>{const{form:e}=k.useChatForm();return e?.description?r.jsx(Ro,{shouldOpenLinksInNewTab:!0,children:e.description,...t}):null},Oo=a.ikp("div",{_id:"aiChatForm__Content"}),Wi=t=>{const{children:e,...i}=t,{getFields:o}=k.useChatForm(),{conversationId:n}=P.useChat(),s=o(n)||[];return r.jsx(Oo,{children:u.maybeRender(e,s),...i})},qo=a.ikp("div",{_id:"aiChatForm__Field"}),Ni=t=>{const{field:e,autoFocus:i,...o}=t,{control:n,errors:s}=k.useChatForm();return r.jsx(Oa.Controller,{name:e.name,control:n,rules:{required:e.isRequired?`${e.label} is required.`:void 0},render:({field:d})=>{const c=d.value!==void 0||e.inputType==="file";return r.jsx(j.FormFieldProvider,{"data-invalid":u.dataAttr(!!s[e.name]),field:e,fieldProps:d,autoFocus:i,children:c&&r.jsx(qo,{"data-input-type":e.inputType,"data-hidden":u.dataAttr(e.isHidden),...o})})}})},Wo=a.ikp("label",{_id:"aiChatForm__FieldLabel"}),Vi=t=>{const{field:e}=j.useFormField();return r.jsx(Wo,{"data-required":u.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},No=a.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),X=t=>{const{field:e,error:i,fieldProps:{onChange:o,onBlur:n,...s},autoFocus:d}=j.useFormField(),{onChange:c,onBlur:m,...l}=t;return r.jsx(No,{id:e.name,autoFocus:d,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":u.dataAttr(!!i),onChange:C.composeEventHandlers(c,o),onBlur:C.composeEventHandlers(m,n),...s,...l})},Qi=a.ikp(X,{_id:"aiChatForm__FieldEmail",type:"email"}),Vo=a.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),$i=t=>{const{field:e,error:i,fieldProps:{value:o,onChange:n,onBlur:s,...d},autoFocus:c}=j.useFormField(),{onChange:m,onBlur:l,...b}=t,v=p=>{const F=p.target.files;n(F)};return r.jsx(Vo,{id:e.name,autoFocus:c,"data-value":o,"data-invalid":u.dataAttr(!!i),...b,...d,onChange:C.composeEventHandlers(m,v),onBlur:C.composeEventHandlers(l,s)})},Ui=a.ikp(X,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:r.jsx(ie,{maxRows:8})}),Qo=a.ikp(Y.Root,{_id:"aiChatForm__FieldCheckbox"}),Ki=t=>{const{field:e,error:i,fieldProps:o,autoFocus:n}=j.useFormField(),{onCheckedChange:s,...d}=t;return r.jsx(Qo,{id:e.name,name:e.name,autoFocus:n,"data-invalid":u.dataAttr(!!i),checked:o.value,onCheckedChange:C.composeEventHandlers(s,o.onChange),...d})},zi=a.ikp(Y.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:r.jsx(ue.CheckboxIcon,{})}),$o=a.ikp(H.Root,{_id:"aiChatForm__FieldSelect"}),Gi=t=>{const{field:e,error:i,fieldProps:o}=j.useFormField(),{onValueChange:n,...s}=t;return r.jsx($o,{name:e.name,"data-invalid":u.dataAttr(!!i),value:o.value,onValueChange:C.composeEventHandlers(n,o.onChange),...s})},Yi=a.ikp(H.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),Uo=a.ikp(H.Value,{_id:"aiChatForm__FieldSelect__Value"}),Ji=t=>{const{field:e}=j.useFormField();return r.jsx(Uo,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},Xi=a.ikp(H.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:r.jsx(w.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),Zi=a.ikp(H.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),ea=a.ikp(H.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),ta=a.ikp(H.Item,{_id:"aiChatForm__FieldSelect__Item"}),ia=a.ikp(H.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),aa=a.ikp(H.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:r.jsx(w.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),ra=t=>{const{field:e,error:i,fieldProps:o}=j.useFormField(),{onValueChange:n,...s}=t;if(e.inputType!=="combobox")return null;const d=e,{items:c,placeholder:m,multiple:l}=d,b=Array.isArray(o.value)?o.value:[],v={name:e.name,"data-invalid":u.dataAttr(!!i)||void 0,items:c,defaultValue:b,multiple:l??!1,placeholder:m,onValueChange:C.composeEventHandlers(n,p=>o.onChange(p.value)),...s};return r.jsx(x.ComboboxRoot,{...v})},Ko={_id:"aiChatForm__FieldCombobox__Control"},oa=a.ikp(x.ComboboxControl,Ko),zo={_id:"aiChatForm__FieldCombobox__Input"},na=a.ikp(x.ComboboxInput,zo),Go={_id:"aiChatForm__FieldCombobox__Trigger",children:r.jsx(w.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})},sa=a.ikp(x.ComboboxTrigger,Go),Yo={_id:"aiChatForm__FieldCombobox__SelectedTags"},da=a.ikp(x.ComboboxSelectedTags,Yo),Jo={_id:"aiChatForm__FieldCombobox__Content"},ca=a.ikp(x.ComboboxContent,Jo),Xo={_id:"aiChatForm__FieldCombobox__Positioner"},ma=a.ikp(x.ComboboxPositioner,Xo),Zo={_id:"aiChatForm__FieldCombobox__List"},la=a.ikp(x.ComboboxList,Zo),ha=a.ikp(x.ComboboxItem,{_id:"aiChatForm__FieldCombobox__Item"}),ua=a.ikp(x.ComboboxItemText,{_id:"aiChatForm__FieldCombobox__ItemText"}),Ca=a.ikp(x.ComboboxItemIndicator,{_id:"aiChatForm__FieldCombobox__ItemIndicator"}),ba=x.ComboboxListItems,pa=a.ikp(x.ComboboxListEmpty,{_id:"aiChatForm__FieldCombobox__ListEmpty"}),en=a.ikp("p",{_id:"aiChatForm__FieldDescription"}),va=t=>{const{field:e}=j.useFormField();return e.description?r.jsx(en,{children:e.description,...t}):null},tn=a.ikp("span",{_id:"aiChatForm__FieldError"}),ga=t=>{const{error:e}=j.useFormField();return e?r.jsx(tn,{children:e.message?.toString(),...t}):null},an=a.ikp("span",{_id:"aiChatForm__Error"}),Pa=t=>{const{formError:e}=k.useChatForm();return e?r.jsx(an,{children:e.message,...t}):null},Fa=a.ikp("div",{_id:"aiChatForm__Footer"}),rn=a.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel",type:"button"}),_a=t=>{const{onClick:e,...i}=t,{closeForm:o}=k.useChatForm();return r.jsx(rn,{onClick:C.composeEventHandlers(e,o),...i})},on=a.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),Ea=t=>{const{onClick:e,...i}=t,{isSubmitting:o,form:n}=k.useChatForm(),s=n?.buttons.submit.label||"Submit";return r.jsx(on,{disabled:o,...i,children:s})},nn=a.ikp("div",{_id:"aiChatForm__Success"}),Aa=t=>{const{isSuccess:e}=k.useChatForm();return e?r.jsx(nn,{...t}):null},sn=a.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),ka=t=>{const{form:e}=k.useChatForm();return r.jsx(sn,{children:e?.successView?.heading,...t})},dn=a.ikp(z.Markdown,{_id:"aiChatForm__SuccessMessage"}),Ia=t=>{const{form:e}=k.useChatForm();return r.jsx(dn,{shouldOpenLinksInNewTab:!0,children:e?.successView?.message,...t})},cn=a.ikp("button",{_id:"aiChatForm__SuccessButton"}),Ma=t=>{const{onClick:e,...i}=t,{form:o,closeForm:n}=k.useChatForm(),s=o?.successView?.doneButton;if(!s)return null;const d=s.icon&&r.jsx(w.BuiltInIconRenderer,{iconSettings:s.icon}),c=s.label;return r.jsx(cn,{onClick:C.composeEventHandlers(e,n),children:r.jsxs(r.Fragment,{children:[d,c]}),...i})};exports.Provider=P.ChatProvider;exports.ActionBar=di;exports.Actions=ci;exports.AttachmentsBar=Tt;exports.AttachmentsBarActions=Dt;exports.AttachmentsBarAttachment=jt;exports.AttachmentsBarAttachmentDelete=Lt;exports.AttachmentsBarAttachmentIcon=Ht;exports.AttachmentsBarAttachmentTitle=wt;exports.AttachmentsBarForm=Xt;exports.AttachmentsBarFormContent=ai;exports.AttachmentsBarFormContentError=ni;exports.AttachmentsBarFormContentInput=oi;exports.AttachmentsBarFormContentLabel=ri;exports.AttachmentsBarFormSubmitButton=si;exports.AttachmentsBarFormTitle=Zt;exports.AttachmentsBarFormTitleError=ii;exports.AttachmentsBarFormTitleInput=ti;exports.AttachmentsBarFormTitleLabel=ei;exports.AttachmentsBarInfoTip=Rt;exports.AttachmentsBarInfoTipArrow=me;exports.AttachmentsBarInfoTipIcon=Ot;exports.AttachmentsBarInfoTipText=qt;exports.AttachmentsBarInput=Nt;exports.AttachmentsBarInputs=Wt;exports.AttachmentsBarList=yt;exports.AttachmentsBarModal=Vt;exports.AttachmentsBarModalBody=Jt;exports.AttachmentsBarModalClose=Yt;exports.AttachmentsBarModalContent=$t;exports.AttachmentsBarModalDescription=zt;exports.AttachmentsBarModalHeader=Ut;exports.AttachmentsBarModalHeading=Kt;exports.AttachmentsBarModalHelp=Gt;exports.AttachmentsBarModalOverlay=Qt;exports.ChatAction=J;exports.ChatActionFeedback=Ci;exports.ChatActionLabel=le;exports.ChatHelpAction=pi;exports.Content=Pe;exports.ContentScrollArea=Fe;exports.ContentScrollAreaCorner=ke;exports.ContentScrollAreaScrollbar=Ee;exports.ContentScrollAreaThumb=Ae;exports.ContentScrollAreaViewport=_e;exports.Disclaimer=Me;exports.DisclaimerArrow=Te;exports.DisclaimerContent=Se;exports.DisclaimerLabel=xe;exports.DisclaimerText=Be;exports.DisclaimerTrigger=fe;exports.DynamicComponent=ct;exports.EmbeddedChatPrimitiveActionBar=di;exports.EmbeddedChatPrimitiveActions=ci;exports.EmbeddedChatPrimitiveAttachmentsBar=Tt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=jt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=Lt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=Ht;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=wt;exports.EmbeddedChatPrimitiveAttachmentsBarForm=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=ai;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=ni;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=oi;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=ri;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=si;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=ii;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=ti;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=ei;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=me;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=qt;exports.EmbeddedChatPrimitiveAttachmentsBarInput=Nt;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarList=yt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=Jt;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=Yt;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=$t;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=Kt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=Gt;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Qt;exports.EmbeddedChatPrimitiveChatAction=J;exports.EmbeddedChatPrimitiveChatActionFeedback=Ci;exports.EmbeddedChatPrimitiveChatActionLabel=le;exports.EmbeddedChatPrimitiveChatHelpAction=pi;exports.EmbeddedChatPrimitiveContent=Pe;exports.EmbeddedChatPrimitiveContentScrollArea=Fe;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=ke;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=Ee;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=Ae;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=_e;exports.EmbeddedChatPrimitiveDisclaimer=Me;exports.EmbeddedChatPrimitiveDisclaimerArrow=Te;exports.EmbeddedChatPrimitiveDisclaimerContent=Se;exports.EmbeddedChatPrimitiveDisclaimerLabel=xe;exports.EmbeddedChatPrimitiveDisclaimerText=Be;exports.EmbeddedChatPrimitiveDisclaimerTrigger=fe;exports.EmbeddedChatPrimitiveDynamicComponent=ct;exports.EmbeddedChatPrimitiveExampleQuestion=we;exports.EmbeddedChatPrimitiveExampleQuestionButton=Le;exports.EmbeddedChatPrimitiveExampleQuestions=ye;exports.EmbeddedChatPrimitiveExampleQuestionsLabel=je;exports.EmbeddedChatPrimitiveExampleQuestionsList=He;exports.EmbeddedChatPrimitiveFeedbackForm=fi;exports.EmbeddedChatPrimitiveFeedbackItem=Si;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=Bi;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=Ti;exports.EmbeddedChatPrimitiveFeedbackItemDescription=ji;exports.EmbeddedChatPrimitiveFeedbackItemLabel=yi;exports.EmbeddedChatPrimitiveFeedbackModal=Ei;exports.EmbeddedChatPrimitiveFeedbackModalBody=xi;exports.EmbeddedChatPrimitiveFeedbackModalClose=Mi;exports.EmbeddedChatPrimitiveFeedbackModalContent=ki;exports.EmbeddedChatPrimitiveFeedbackModalHeader=Ii;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=Ai;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=Hi;exports.EmbeddedChatPrimitiveFooter=It;exports.EmbeddedChatPrimitiveForm=Li;exports.EmbeddedChatPrimitiveFormCancel=_a;exports.EmbeddedChatPrimitiveFormClose=Di;exports.EmbeddedChatPrimitiveFormContent=Wi;exports.EmbeddedChatPrimitiveFormDescription=qi;exports.EmbeddedChatPrimitiveFormError=Pa;exports.EmbeddedChatPrimitiveFormField=Ni;exports.EmbeddedChatPrimitiveFormFieldCheckbox=Ki;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=zi;exports.EmbeddedChatPrimitiveFormFieldCombobox=ra;exports.EmbeddedChatPrimitiveFormFieldComboboxContent=ca;exports.EmbeddedChatPrimitiveFormFieldComboboxControl=oa;exports.EmbeddedChatPrimitiveFormFieldComboboxInput=na;exports.EmbeddedChatPrimitiveFormFieldComboboxItem=ha;exports.EmbeddedChatPrimitiveFormFieldComboboxItemIndicator=Ca;exports.EmbeddedChatPrimitiveFormFieldComboboxItemText=ua;exports.EmbeddedChatPrimitiveFormFieldComboboxList=la;exports.EmbeddedChatPrimitiveFormFieldComboboxListEmpty=pa;exports.EmbeddedChatPrimitiveFormFieldComboboxListItems=ba;exports.EmbeddedChatPrimitiveFormFieldComboboxPositioner=ma;exports.EmbeddedChatPrimitiveFormFieldComboboxSelectedTags=da;exports.EmbeddedChatPrimitiveFormFieldComboboxTrigger=sa;exports.EmbeddedChatPrimitiveFormFieldDescription=va;exports.EmbeddedChatPrimitiveFormFieldEmail=Qi;exports.EmbeddedChatPrimitiveFormFieldError=ga;exports.EmbeddedChatPrimitiveFormFieldFile=$i;exports.EmbeddedChatPrimitiveFormFieldLabel=Vi;exports.EmbeddedChatPrimitiveFormFieldSelect=Gi;exports.EmbeddedChatPrimitiveFormFieldSelectContent=Zi;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=Xi;exports.EmbeddedChatPrimitiveFormFieldSelectItem=ta;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=aa;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=ia;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=Yi;exports.EmbeddedChatPrimitiveFormFieldSelectValue=Ji;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=ea;exports.EmbeddedChatPrimitiveFormFieldText=X;exports.EmbeddedChatPrimitiveFormFieldTextArea=Ui;exports.EmbeddedChatPrimitiveFormFooter=Fa;exports.EmbeddedChatPrimitiveFormHeader=Ri;exports.EmbeddedChatPrimitiveFormHeading=Oi;exports.EmbeddedChatPrimitiveFormSubmit=Ea;exports.EmbeddedChatPrimitiveFormSuccess=Aa;exports.EmbeddedChatPrimitiveFormSuccessButton=Ma;exports.EmbeddedChatPrimitiveFormSuccessHeading=ka;exports.EmbeddedChatPrimitiveFormSuccessMessage=Ia;exports.EmbeddedChatPrimitiveFormWrapper=wi;exports.EmbeddedChatPrimitiveHeaderToolbar=pe;exports.EmbeddedChatPrimitiveHelpActions=bi;exports.EmbeddedChatPrimitiveHelpActionsMenu=gi;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=Pi;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=Fi;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=_i;exports.EmbeddedChatPrimitiveHelpActionsTrigger=vi;exports.EmbeddedChatPrimitiveInput=ft;exports.EmbeddedChatPrimitiveInputFieldset=Mt;exports.EmbeddedChatPrimitiveInputGroup=xt;exports.EmbeddedChatPrimitiveIntroMessageWrapper=We;exports.EmbeddedChatPrimitiveMarkdown=dt;exports.EmbeddedChatPrimitiveMessageAction=ut;exports.EmbeddedChatPrimitiveMessageAttachments=Je;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=Ze;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=et;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=tt;exports.EmbeddedChatPrimitiveMessageAttachmentsList=Xe;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=it;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=st;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=nt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=ot;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=at;exports.EmbeddedChatPrimitiveMessageAvatar=Qe;exports.EmbeddedChatPrimitiveMessageAvatarContent=$e;exports.EmbeddedChatPrimitiveMessageAvatarFallback=Ue;exports.EmbeddedChatPrimitiveMessageAvatarImage=Ke;exports.EmbeddedChatPrimitiveMessageContent=Ye;exports.EmbeddedChatPrimitiveMessageContentWrapper=Ge;exports.EmbeddedChatPrimitiveMessageCustomAction=ht;exports.EmbeddedChatPrimitiveMessageCustomActions=lt;exports.EmbeddedChatPrimitiveMessageHeader=Ne;exports.EmbeddedChatPrimitiveMessageLoading=Ve;exports.EmbeddedChatPrimitiveMessageName=ze;exports.EmbeddedChatPrimitiveMessageSourceItem=vt;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=gt;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=Et;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=At;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=Pt;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=kt;exports.EmbeddedChatPrimitiveMessageSourceItemTag=_t;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=Ft;exports.EmbeddedChatPrimitiveMessageSources=Ct;exports.EmbeddedChatPrimitiveMessageSourcesHeader=bt;exports.EmbeddedChatPrimitiveMessageSourcesList=pt;exports.EmbeddedChatPrimitiveMessageToolbar=mt;exports.EmbeddedChatPrimitiveMessageWrapper=ce;exports.EmbeddedChatPrimitiveMessages=Ie;exports.EmbeddedChatPrimitiveRoot=be;exports.EmbeddedChatPrimitiveSendButton=St;exports.EmbeddedChatPrimitiveSendButtonIcon=Bt;exports.EmbeddedChatPrimitiveTaglineBrandName=ui;exports.EmbeddedChatPrimitiveTaglineContainer=mi;exports.EmbeddedChatPrimitiveTaglineLogo=hi;exports.EmbeddedChatPrimitiveTaglineText=li;exports.EmbeddedChatPrimitiveToolbarHeader=ge;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=ve;exports.EmbeddedChatPrimitiveWorkflow=qe;exports.EmbeddedChatPrimitiveWorkflows=De;exports.EmbeddedChatPrimitiveWorkflowsLabel=Re;exports.EmbeddedChatPrimitiveWorkflowsList=Oe;exports.EmbeddedChatPrimitiveWrapper=Ce;exports.ExampleQuestion=we;exports.ExampleQuestionButton=Le;exports.ExampleQuestions=ye;exports.ExampleQuestionsLabel=je;exports.ExampleQuestionsList=He;exports.FeedbackForm=fi;exports.FeedbackItem=Si;exports.FeedbackItemCheckbox=Bi;exports.FeedbackItemCheckboxIndicator=Ti;exports.FeedbackItemDescription=ji;exports.FeedbackItemLabel=yi;exports.FeedbackModal=Ei;exports.FeedbackModalBody=xi;exports.FeedbackModalClose=Mi;exports.FeedbackModalContent=ki;exports.FeedbackModalHeader=Ii;exports.FeedbackModalOverlay=Ai;exports.FeedbackSubmitButton=Hi;exports.Footer=It;exports.Form=Li;exports.FormCancel=_a;exports.FormClose=Di;exports.FormContent=Wi;exports.FormDescription=qi;exports.FormError=Pa;exports.FormField=Ni;exports.FormFieldCheckbox=Ki;exports.FormFieldCheckboxIndicator=zi;exports.FormFieldCombobox=ra;exports.FormFieldComboboxContent=ca;exports.FormFieldComboboxControl=oa;exports.FormFieldComboboxInput=na;exports.FormFieldComboboxItem=ha;exports.FormFieldComboboxItemIndicator=Ca;exports.FormFieldComboboxItemText=ua;exports.FormFieldComboboxList=la;exports.FormFieldComboboxListEmpty=pa;exports.FormFieldComboboxListItems=ba;exports.FormFieldComboboxPositioner=ma;exports.FormFieldComboboxSelectedTags=da;exports.FormFieldComboboxTrigger=sa;exports.FormFieldDescription=va;exports.FormFieldEmail=Qi;exports.FormFieldError=ga;exports.FormFieldFile=$i;exports.FormFieldLabel=Vi;exports.FormFieldSelect=Gi;exports.FormFieldSelectContent=Zi;exports.FormFieldSelectIcon=Xi;exports.FormFieldSelectItem=ta;exports.FormFieldSelectItemIndicator=aa;exports.FormFieldSelectItemText=ia;exports.FormFieldSelectTrigger=Yi;exports.FormFieldSelectValue=Ji;exports.FormFieldSelectViewport=ea;exports.FormFieldText=X;exports.FormFieldTextArea=Ui;exports.FormFooter=Fa;exports.FormHeader=Ri;exports.FormHeading=Oi;exports.FormSubmit=Ea;exports.FormSuccess=Aa;exports.FormSuccessButton=Ma;exports.FormSuccessHeading=ka;exports.FormSuccessMessage=Ia;exports.FormWrapper=wi;exports.Header=Xa;exports.HeaderToolbar=pe;exports.HeaderToolbarWrapper=ve;exports.HelpActions=bi;exports.HelpActionsMenu=gi;exports.HelpActionsMenuArrow=Pi;exports.HelpActionsMenuItem=Fi;exports.HelpActionsMenuItemIcon=_i;exports.HelpActionsTrigger=vi;exports.Input=ft;exports.InputFieldset=Mt;exports.InputGroup=xt;exports.IntroMessageWrapper=We;exports.Markdown=dt;exports.MessageAction=ut;exports.MessageAttachments=Je;exports.MessageAttachmentsItem=Ze;exports.MessageAttachmentsItemIcon=et;exports.MessageAttachmentsItemTitle=tt;exports.MessageAttachmentsList=Xe;exports.MessageAttachmentsPreview=it;exports.MessageAttachmentsPreviewBody=st;exports.MessageAttachmentsPreviewClose=nt;exports.MessageAttachmentsPreviewContent=rt;exports.MessageAttachmentsPreviewHeader=ot;exports.MessageAttachmentsPreviewOverlay=at;exports.MessageAvatar=Qe;exports.MessageAvatarContent=$e;exports.MessageAvatarFallback=Ue;exports.MessageAvatarImage=Ke;exports.MessageContent=Ye;exports.MessageContentWrapper=Ge;exports.MessageCustomAction=ht;exports.MessageCustomActions=lt;exports.MessageHeader=Ne;exports.MessageLoading=Ve;exports.MessageName=ze;exports.MessageSourceItem=vt;exports.MessageSourceItemBreadcrumbIcon=Qr;exports.MessageSourceItemBreadcrumbs=gt;exports.MessageSourceItemDescription=Et;exports.MessageSourceItemDescriptionPart=At;exports.MessageSourceItemIcon=Pt;exports.MessageSourceItemIndicator=kt;exports.MessageSourceItemTag=_t;exports.MessageSourceItemTitle=Ft;exports.MessageSources=Ct;exports.MessageSourcesHeader=bt;exports.MessageSourcesList=pt;exports.MessageToolbar=mt;exports.MessageWrapper=ce;exports.Messages=Ie;exports.PrimitiveMessagePart=jr;exports.Root=be;exports.SendButton=St;exports.SendButtonIcon=Bt;exports.TaglineBrandName=ui;exports.TaglineContainer=mi;exports.TaglineLogo=hi;exports.TaglineText=li;exports.ToolbarHeader=ge;exports.Workflow=qe;exports.Workflows=De;exports.WorkflowsLabel=Re;exports.WorkflowsList=Oe;exports.Wrapper=Ce;
|
|
11
|
+
`);P(N)},share:async()=>{},clear:d,stop:c},E={copy:p,share:I};return r.jsx(W.Tooltip,{delayDuration:0,open:E[e],children:r.jsx(Io,{"data-type":e,"data-copied":u.dataAttr(p||I),className:`${o} ${e}`,children:r.jsx(le,{action:e}),onClick:C.composeEventHandlers(i,D[e]),...n})})},Mo=a.ikp("span",{_id:"aiChat__ChatActionLabel"}),le=t=>{const{action:e,...i}=t,{aiChatSettings:o}=g.useInkeepConfig(),n=o.toolbarButtonLabels??{},s={help:n.getHelp??"Get Help",copy:n.copyChat??"Copy",share:n.share??"Share",clear:n.clear??"Clear",stop:n.stop??"Stop"};return r.jsx(Mo,{children:s[e],...i})},fo=a.ikp(W.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),vi=t=>{const{action:e,children:i,...o}=t,n={copy:"Copied!",share:"Link copied!"};return r.jsxs(fo,{sideOffset:5,...o,children:[r.jsx(W.Arrow,{}),i||n[e]]})},xo=a.ikp(q.Root,{_id:"aiChatHelpActions"}),gi=t=>{const{children:e,...i}=t,{aiChatSettings:o}=g.useInkeepConfig(),{getHelpOptions:n}=o;if(!n||(n??[]).length===0)return null;const{_pinned:s,_unpinned:d}=n.reduce((b,v)=>{const p=v.isPinnedToToolbar?"_pinned":"_unpinned";return{...b,[p]:[...b[p],v]}},{_pinned:[],_unpinned:[]}),c=d.length===1?[...s,d[0]]:s,m=d.length===1?[]:d,h=te.useHelpMenuState();return r.jsx(te.HelpMenuProvider,{value:h,children:r.jsx(xo,{open:h.open,onOpenChange:h.setOpen,children:u.maybeRender(e,{pinned:c,unpinned:m}),...i})})},So=a.ikp(J,{_id:"aiChatHelpAction",action:"help"}),Bo=a.ikp("a",{_id:"aiChatHelpAction",target:"_blank",rel:"noreferrer"}),Pi=t=>{const{action:e,onClick:i,...o}=t,{handleAction:n,logHelpAction:s}=re.useChatAction(e),d=e.action.type,c={"aria-label":e.name,"data-name":e.name,children:e.name,onClick:C.composeEventHandlers(i,()=>{n(),s()}),...o};return d==="open_link"?r.jsx(Bo,{href:e.action.url,...c}):r.jsx(So,{...c})},To=a.ikp(q.Trigger,{_id:"aiChatHelpActions__Trigger"}),Fi=l.memo(t=>{const{aiChatSettings:e}=g.useInkeepConfig();return r.jsx(J,{action:"help",...t,asChild:!0,children:r.jsx(To,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),yo=a.ikp(q.Content,{_id:"aiChatHelpActions__Menu"}),_i=t=>r.jsx(yo,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),Ei=a.ikp(q.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),Ai=t=>{const{action:e,onClick:i,...o}=t,{handleAction:n,logHelpAction:s}=re.useChatAction(e),{setOpen:d}=te.useHelpMenu(),c=()=>{n({onOpenForm:()=>d(!1)}),s()},m=e.action.type,h=a.ikp(m==="open_link"?"a":"button",{_id:"aiChatHelpActions__MenuItem",children:e.name,"aria-label":e.name,"data-name":e.name,"data-type":e.action.type,...m==="open_link"&&{href:e.action.url,target:"_blank",rel:"noopener"},onClick:C.composeEventHandlers(i,c)});return r.jsx(h,{...o})},Ho=a.ikp(w.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),ki=t=>{const{action:e,...i}=t;return e.icon?r.jsx(Ho,{iconSettings:e.icon,...i}):null},jo=a.ikp(A.Root,{_id:"aiChatFeedbackModal"}),Ii=t=>{const{onOpenChange:e,...i}=t,{currentFeedback:o,setCurrentFeedback:n}=ae.useMessageFeedback();return r.jsx(jo,{open:o!==null,onOpenChange:C.composeEventHandlers(e,()=>n(null)),...i})},Mi=a.ikp(A.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),fi=a.ikp(A.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),xi=a.ikp(A.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),Si=a.ikp(A.Close,{_id:"aiChatFeedbackModal__Close",children:r.jsx(x.CustomIcon,{iconKey:"close"})}),Bi=a.ikp("div",{_id:"aiChatFeedbackModal__Body"}),wo=a.ikp("form",{_id:"aiChatFeedbackForm"}),Ti=t=>{const{onSubmit:e,...i}=t,{submitNegativeFeedback:o,currentFeedback:n,setCurrentFeedback:s}=ae.useMessageFeedback(),d=c=>{c.preventDefault();const m=c.target,h=new FormData(m),b=Object.fromEntries(h.entries());n&&(o(n,b),s(null))};return r.jsx(wo,{onSubmit:C.composeEventHandlers(e,d),...i})},Lo=a.ikp("div",{_id:"aiChatFeedbackItem"}),yi=t=>{const{name:e,...i}=t;return r.jsx(G.FeedbackItemProvider,{name:e,children:r.jsx(Lo,{...i})})},Do=a.ikp(Y.Root,{_id:"aiChatFeedbackItem__Checkbox"}),Hi=t=>{const{name:e,focusItem:i}=G.useFeedbackItem(),{onCheckedChange:o,...n}=t,s=d=>{d&&i?.current?.focus()};return r.jsx(Do,{id:`feedback-${e}`,name:e,onCheckedChange:C.composeEventHandlers(o,s),...n})},ji=a.ikp(Y.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:r.jsx(ue.CheckboxIcon,{})}),Ro=a.ikp("label",{_id:"aiChatFeedbackItem__Label"}),wi=t=>{const{name:e}=G.useFeedbackItem(),i={unrelated_response:"Didn't answer my question",inaccurate_statement:"Inaccurate statement",inaccurate_code_snippet:"Inaccurate code snippet",irrelevant_citations:"Irrelevant citations"};return r.jsx(Ro,{htmlFor:`feedback-${e}`,children:i[e],...t})},Oo=a.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),Li=t=>{const{name:e,focusItem:i}=G.useFeedbackItem();return r.jsx(Oo,{ref:i,name:`${e}:description`,...t})},Di=a.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),qo=a.ikp("div",{_id:"aiChatForm__Wrapper"}),Ri=t=>{const{form:e}=k.useChatForm();return e?r.jsx(qo,{...t}):null},Wo=a.ikp("form",{_id:"aiChatForm"}),Oi=t=>{const{onSubmit:e,...i}=t,{conversationId:o,messages:n}=F.useChat(),{handleSubmit:s,isSuccess:d}=k.useChatForm();return d?null:r.jsx(Wo,{onSubmit:C.composeEventHandlers(e,c=>s(c,{id:o,messages:n})),...i})},No=a.ikp("button",{_id:"aiChatForm__Close",children:r.jsx(x.CustomIcon,{iconKey:"close"})}),qi=t=>{const{onClick:e,...i}=t,{closeForm:o}=k.useChatForm();return r.jsx(No,{onClick:C.composeEventHandlers(e,o),...i})},Wi=a.ikp("div",{_id:"aiChatForm__Header"}),Vo=a.ikp("h2",{_id:"aiChatForm__Heading"}),Ni=t=>{const{form:e}=k.useChatForm();return e?.heading?r.jsx(Vo,{children:e.heading,...t}):null},Qo=a.ikp(z.Markdown,{_id:"aiChatForm__Description"}),Vi=t=>{const{form:e}=k.useChatForm();return e?.description?r.jsx(Qo,{shouldOpenLinksInNewTab:!0,children:e.description,...t}):null},$o=a.ikp("div",{_id:"aiChatForm__Content"}),Qi=t=>{const{children:e,...i}=t,{getFields:o}=k.useChatForm(),{conversationId:n}=F.useChat(),s=o(n)||[];return r.jsx($o,{children:u.maybeRender(e,s),...i})},Uo=a.ikp("div",{_id:"aiChatForm__Field"}),$i=t=>{const{field:e,autoFocus:i,...o}=t,{control:n,errors:s}=k.useChatForm();return r.jsx(Na.Controller,{name:e.name,control:n,rules:{required:e.isRequired?`${e.label} is required.`:void 0},render:({field:d})=>{const c=d.value!==void 0||e.inputType==="file";return r.jsx(H.FormFieldProvider,{"data-invalid":u.dataAttr(!!s[e.name]),field:e,fieldProps:d,autoFocus:i,children:c&&r.jsx(Uo,{"data-input-type":e.inputType,"data-hidden":u.dataAttr(e.isHidden),...o})})}})},Ko=a.ikp("label",{_id:"aiChatForm__FieldLabel"}),Ui=t=>{const{field:e}=H.useFormField();return r.jsx(Ko,{"data-required":u.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},zo=a.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),X=t=>{const{field:e,error:i,fieldProps:{onChange:o,onBlur:n,...s},autoFocus:d}=H.useFormField(),{onChange:c,onBlur:m,...h}=t;return r.jsx(zo,{id:e.name,autoFocus:d,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":u.dataAttr(!!i),onChange:C.composeEventHandlers(c,o),onBlur:C.composeEventHandlers(m,n),...s,...h})},Ki=a.ikp(X,{_id:"aiChatForm__FieldEmail",type:"email"}),Go=a.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),zi=t=>{const{field:e,error:i,fieldProps:{value:o,onChange:n,onBlur:s,...d},autoFocus:c}=H.useFormField(),{onChange:m,onBlur:h,...b}=t,v=p=>{const P=p.target.files;n(P)};return r.jsx(Go,{id:e.name,autoFocus:c,"data-value":o,"data-invalid":u.dataAttr(!!i),...b,...d,onChange:C.composeEventHandlers(m,v),onBlur:C.composeEventHandlers(h,s)})},Gi=a.ikp(X,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:r.jsx(ie,{maxRows:8})}),Yo=a.ikp(Y.Root,{_id:"aiChatForm__FieldCheckbox"}),Yi=t=>{const{field:e,error:i,fieldProps:o,autoFocus:n}=H.useFormField(),{onCheckedChange:s,...d}=t;return r.jsx(Yo,{id:e.name,name:e.name,autoFocus:n,"data-invalid":u.dataAttr(!!i),checked:o.value,onCheckedChange:C.composeEventHandlers(s,o.onChange),...d})},Ji=a.ikp(Y.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:r.jsx(ue.CheckboxIcon,{})}),Jo=a.ikp(j.Root,{_id:"aiChatForm__FieldSelect"}),Xi=t=>{const{field:e,error:i,fieldProps:o}=H.useFormField(),{onValueChange:n,...s}=t;return r.jsx(Jo,{name:e.name,"data-invalid":u.dataAttr(!!i),value:o.value,onValueChange:C.composeEventHandlers(n,o.onChange),...s})},Zi=a.ikp(j.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),Xo=a.ikp(j.Value,{_id:"aiChatForm__FieldSelect__Value"}),ea=t=>{const{field:e}=H.useFormField();return r.jsx(Xo,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},ta=a.ikp(j.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:r.jsx(w.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),ia=a.ikp(j.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),aa=a.ikp(j.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),ra=a.ikp(j.Item,{_id:"aiChatForm__FieldSelect__Item"}),oa=a.ikp(j.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),na=a.ikp(j.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:r.jsx(w.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),sa=t=>{const{field:e,error:i,fieldProps:o}=H.useFormField(),{onValueChange:n,...s}=t;if(e.inputType!=="combobox")return null;const d=e,{items:c,placeholder:m,multiple:h}=d,b=Array.isArray(o.value)?o.value:[],v={name:e.name,"data-invalid":u.dataAttr(!!i)||void 0,items:c,defaultValue:b,multiple:h??!1,placeholder:m,onValueChange:C.composeEventHandlers(n,p=>o.onChange(p.value)),...s};return r.jsx(S.ComboboxRoot,{...v})},Zo={_id:"aiChatForm__FieldCombobox__Control"},da=a.ikp(S.ComboboxControl,Zo),en={_id:"aiChatForm__FieldCombobox__Input"},ca=a.ikp(S.ComboboxInput,en),tn={_id:"aiChatForm__FieldCombobox__Trigger",children:r.jsx(w.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})},ma=a.ikp(S.ComboboxTrigger,tn),an={_id:"aiChatForm__FieldCombobox__SelectedTags"},la=a.ikp(S.ComboboxSelectedTags,an),rn={_id:"aiChatForm__FieldCombobox__Content"},ha=a.ikp(S.ComboboxContent,rn),on={_id:"aiChatForm__FieldCombobox__Positioner"},ua=a.ikp(S.ComboboxPositioner,on),nn={_id:"aiChatForm__FieldCombobox__List"},Ca=a.ikp(S.ComboboxList,nn),ba=a.ikp(S.ComboboxItem,{_id:"aiChatForm__FieldCombobox__Item"}),pa=a.ikp(S.ComboboxItemText,{_id:"aiChatForm__FieldCombobox__ItemText"}),va=a.ikp(S.ComboboxItemIndicator,{_id:"aiChatForm__FieldCombobox__ItemIndicator"}),ga=S.ComboboxListItems,Pa=a.ikp(S.ComboboxListEmpty,{_id:"aiChatForm__FieldCombobox__ListEmpty"}),sn=a.ikp("p",{_id:"aiChatForm__FieldDescription"}),Fa=t=>{const{field:e}=H.useFormField();return e.description?r.jsx(sn,{children:e.description,...t}):null},dn=a.ikp("span",{_id:"aiChatForm__FieldError"}),_a=t=>{const{error:e}=H.useFormField();return e?r.jsx(dn,{children:e.message?.toString(),...t}):null},cn=a.ikp("span",{_id:"aiChatForm__Error"}),Ea=t=>{const{formError:e}=k.useChatForm();return e?r.jsx(cn,{children:e.message,...t}):null},Aa=a.ikp("div",{_id:"aiChatForm__Footer"}),mn=a.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel",type:"button"}),ka=t=>{const{onClick:e,...i}=t,{closeForm:o}=k.useChatForm();return r.jsx(mn,{onClick:C.composeEventHandlers(e,o),...i})},ln=a.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),Ia=t=>{const{onClick:e,...i}=t,{isSubmitting:o,form:n}=k.useChatForm(),s=n?.buttons.submit.label||"Submit";return r.jsx(ln,{disabled:o,...i,children:s})},hn=a.ikp("div",{_id:"aiChatForm__Success"}),Ma=t=>{const{isSuccess:e}=k.useChatForm();return e?r.jsx(hn,{...t}):null},un=a.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),fa=t=>{const{form:e}=k.useChatForm();return r.jsx(un,{children:e?.successView?.heading,...t})},Cn=a.ikp(z.Markdown,{_id:"aiChatForm__SuccessMessage"}),xa=t=>{const{form:e}=k.useChatForm();return r.jsx(Cn,{shouldOpenLinksInNewTab:!0,children:e?.successView?.message,...t})},bn=a.ikp("button",{_id:"aiChatForm__SuccessButton"}),Sa=t=>{const{onClick:e,...i}=t,{form:o,closeForm:n}=k.useChatForm(),s=o?.successView?.doneButton;if(!s)return null;const d=s.icon&&r.jsx(w.BuiltInIconRenderer,{iconSettings:s.icon}),c=s.label;return r.jsx(bn,{onClick:C.composeEventHandlers(e,n),children:r.jsxs(r.Fragment,{children:[d,c]}),...i})};exports.Provider=F.ChatProvider;exports.ActionBar=li;exports.Actions=hi;exports.AttachmentsBar=jt;exports.AttachmentsBarActions=qt;exports.AttachmentsBarAttachment=Lt;exports.AttachmentsBarAttachmentDelete=Ot;exports.AttachmentsBarAttachmentIcon=Dt;exports.AttachmentsBarAttachmentTitle=Rt;exports.AttachmentsBarForm=ti;exports.AttachmentsBarFormContent=ni;exports.AttachmentsBarFormContentError=ci;exports.AttachmentsBarFormContentInput=di;exports.AttachmentsBarFormContentLabel=si;exports.AttachmentsBarFormSubmitButton=mi;exports.AttachmentsBarFormTitle=ii;exports.AttachmentsBarFormTitleError=oi;exports.AttachmentsBarFormTitleInput=ri;exports.AttachmentsBarFormTitleLabel=ai;exports.AttachmentsBarInfoTip=Wt;exports.AttachmentsBarInfoTipArrow=me;exports.AttachmentsBarInfoTipIcon=Nt;exports.AttachmentsBarInfoTipText=Vt;exports.AttachmentsBarInput=$t;exports.AttachmentsBarInputs=Qt;exports.AttachmentsBarList=wt;exports.AttachmentsBarModal=Ut;exports.AttachmentsBarModalBody=ei;exports.AttachmentsBarModalClose=Zt;exports.AttachmentsBarModalContent=zt;exports.AttachmentsBarModalDescription=Jt;exports.AttachmentsBarModalHeader=Gt;exports.AttachmentsBarModalHeading=Yt;exports.AttachmentsBarModalHelp=Xt;exports.AttachmentsBarModalOverlay=Kt;exports.ChatAction=J;exports.ChatActionFeedback=vi;exports.ChatActionLabel=le;exports.ChatHelpAction=Pi;exports.ChatHistoryButton=Fe;exports.ChatHistoryButtonIcon=Pe;exports.Content=Ee;exports.ContentScrollArea=Ae;exports.ContentScrollAreaCorner=fe;exports.ContentScrollAreaScrollbar=Ie;exports.ContentScrollAreaThumb=Me;exports.ContentScrollAreaViewport=ke;exports.Disclaimer=Se;exports.DisclaimerArrow=je;exports.DisclaimerContent=ye;exports.DisclaimerLabel=Be;exports.DisclaimerText=He;exports.DisclaimerTrigger=Te;exports.DynamicComponent=ht;exports.EmbeddedChatPrimitiveActionBar=li;exports.EmbeddedChatPrimitiveActions=hi;exports.EmbeddedChatPrimitiveAttachmentsBar=jt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=qt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=Lt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarForm=ti;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=ni;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=ci;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=di;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=si;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=mi;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=ii;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=oi;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=ri;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=ai;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=me;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=Nt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarInput=$t;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=Qt;exports.EmbeddedChatPrimitiveAttachmentsBarList=wt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=ei;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=Jt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=Gt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=Yt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Kt;exports.EmbeddedChatPrimitiveChatAction=J;exports.EmbeddedChatPrimitiveChatActionFeedback=vi;exports.EmbeddedChatPrimitiveChatActionLabel=le;exports.EmbeddedChatPrimitiveChatHelpAction=Pi;exports.EmbeddedChatPrimitiveChatHistoryButton=Fe;exports.EmbeddedChatPrimitiveChatHistoryButtonIcon=Pe;exports.EmbeddedChatPrimitiveContent=Ee;exports.EmbeddedChatPrimitiveContentScrollArea=Ae;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=fe;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=Ie;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=Me;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=ke;exports.EmbeddedChatPrimitiveDisclaimer=Se;exports.EmbeddedChatPrimitiveDisclaimerArrow=je;exports.EmbeddedChatPrimitiveDisclaimerContent=ye;exports.EmbeddedChatPrimitiveDisclaimerLabel=Be;exports.EmbeddedChatPrimitiveDisclaimerText=He;exports.EmbeddedChatPrimitiveDisclaimerTrigger=Te;exports.EmbeddedChatPrimitiveDynamicComponent=ht;exports.EmbeddedChatPrimitiveExampleQuestion=Re;exports.EmbeddedChatPrimitiveExampleQuestionButton=Oe;exports.EmbeddedChatPrimitiveExampleQuestions=we;exports.EmbeddedChatPrimitiveExampleQuestionsLabel=Le;exports.EmbeddedChatPrimitiveExampleQuestionsList=De;exports.EmbeddedChatPrimitiveFeedbackForm=Ti;exports.EmbeddedChatPrimitiveFeedbackItem=yi;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=Hi;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=ji;exports.EmbeddedChatPrimitiveFeedbackItemDescription=Li;exports.EmbeddedChatPrimitiveFeedbackItemLabel=wi;exports.EmbeddedChatPrimitiveFeedbackModal=Ii;exports.EmbeddedChatPrimitiveFeedbackModalBody=Bi;exports.EmbeddedChatPrimitiveFeedbackModalClose=Si;exports.EmbeddedChatPrimitiveFeedbackModalContent=fi;exports.EmbeddedChatPrimitiveFeedbackModalHeader=xi;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=Mi;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=Di;exports.EmbeddedChatPrimitiveFooter=xt;exports.EmbeddedChatPrimitiveForm=Oi;exports.EmbeddedChatPrimitiveFormCancel=ka;exports.EmbeddedChatPrimitiveFormClose=qi;exports.EmbeddedChatPrimitiveFormContent=Qi;exports.EmbeddedChatPrimitiveFormDescription=Vi;exports.EmbeddedChatPrimitiveFormError=Ea;exports.EmbeddedChatPrimitiveFormField=$i;exports.EmbeddedChatPrimitiveFormFieldCheckbox=Yi;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=Ji;exports.EmbeddedChatPrimitiveFormFieldCombobox=sa;exports.EmbeddedChatPrimitiveFormFieldComboboxContent=ha;exports.EmbeddedChatPrimitiveFormFieldComboboxControl=da;exports.EmbeddedChatPrimitiveFormFieldComboboxInput=ca;exports.EmbeddedChatPrimitiveFormFieldComboboxItem=ba;exports.EmbeddedChatPrimitiveFormFieldComboboxItemIndicator=va;exports.EmbeddedChatPrimitiveFormFieldComboboxItemText=pa;exports.EmbeddedChatPrimitiveFormFieldComboboxList=Ca;exports.EmbeddedChatPrimitiveFormFieldComboboxListEmpty=Pa;exports.EmbeddedChatPrimitiveFormFieldComboboxListItems=ga;exports.EmbeddedChatPrimitiveFormFieldComboboxPositioner=ua;exports.EmbeddedChatPrimitiveFormFieldComboboxSelectedTags=la;exports.EmbeddedChatPrimitiveFormFieldComboboxTrigger=ma;exports.EmbeddedChatPrimitiveFormFieldDescription=Fa;exports.EmbeddedChatPrimitiveFormFieldEmail=Ki;exports.EmbeddedChatPrimitiveFormFieldError=_a;exports.EmbeddedChatPrimitiveFormFieldFile=zi;exports.EmbeddedChatPrimitiveFormFieldLabel=Ui;exports.EmbeddedChatPrimitiveFormFieldSelect=Xi;exports.EmbeddedChatPrimitiveFormFieldSelectContent=ia;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=ta;exports.EmbeddedChatPrimitiveFormFieldSelectItem=ra;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=na;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=oa;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=Zi;exports.EmbeddedChatPrimitiveFormFieldSelectValue=ea;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=aa;exports.EmbeddedChatPrimitiveFormFieldText=X;exports.EmbeddedChatPrimitiveFormFieldTextArea=Gi;exports.EmbeddedChatPrimitiveFormFooter=Aa;exports.EmbeddedChatPrimitiveFormHeader=Wi;exports.EmbeddedChatPrimitiveFormHeading=Ni;exports.EmbeddedChatPrimitiveFormSubmit=Ia;exports.EmbeddedChatPrimitiveFormSuccess=Ma;exports.EmbeddedChatPrimitiveFormSuccessButton=Sa;exports.EmbeddedChatPrimitiveFormSuccessHeading=fa;exports.EmbeddedChatPrimitiveFormSuccessMessage=xa;exports.EmbeddedChatPrimitiveFormWrapper=Ri;exports.EmbeddedChatPrimitiveHeaderToolbar=ve;exports.EmbeddedChatPrimitiveHelpActions=gi;exports.EmbeddedChatPrimitiveHelpActionsMenu=_i;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=Ei;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=Ai;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=ki;exports.EmbeddedChatPrimitiveHelpActionsTrigger=Fi;exports.EmbeddedChatPrimitiveInput=Tt;exports.EmbeddedChatPrimitiveInputFieldset=St;exports.EmbeddedChatPrimitiveInputGroup=Bt;exports.EmbeddedChatPrimitiveIntroMessageWrapper=Qe;exports.EmbeddedChatPrimitiveMarkdown=lt;exports.EmbeddedChatPrimitiveMessageAction=pt;exports.EmbeddedChatPrimitiveMessageAttachments=et;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=it;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=at;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsList=tt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=ot;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=mt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=ct;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=st;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=dt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=nt;exports.EmbeddedChatPrimitiveMessageAvatar=Ke;exports.EmbeddedChatPrimitiveMessageAvatarContent=ze;exports.EmbeddedChatPrimitiveMessageAvatarFallback=Ge;exports.EmbeddedChatPrimitiveMessageAvatarImage=Ye;exports.EmbeddedChatPrimitiveMessageContent=Ze;exports.EmbeddedChatPrimitiveMessageContentWrapper=Xe;exports.EmbeddedChatPrimitiveMessageCustomAction=bt;exports.EmbeddedChatPrimitiveMessageCustomActions=Ct;exports.EmbeddedChatPrimitiveMessageHeader=$e;exports.EmbeddedChatPrimitiveMessageLoading=Ue;exports.EmbeddedChatPrimitiveMessageName=Je;exports.EmbeddedChatPrimitiveMessageSourceItem=Ft;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=_t;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=It;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=Mt;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=Et;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=ft;exports.EmbeddedChatPrimitiveMessageSourceItemTag=kt;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=At;exports.EmbeddedChatPrimitiveMessageSources=vt;exports.EmbeddedChatPrimitiveMessageSourcesHeader=gt;exports.EmbeddedChatPrimitiveMessageSourcesList=Pt;exports.EmbeddedChatPrimitiveMessageToolbar=ut;exports.EmbeddedChatPrimitiveMessageWrapper=ce;exports.EmbeddedChatPrimitiveMessages=xe;exports.EmbeddedChatPrimitiveRoot=pe;exports.EmbeddedChatPrimitiveSendButton=yt;exports.EmbeddedChatPrimitiveSendButtonIcon=Ht;exports.EmbeddedChatPrimitiveTaglineBrandName=pi;exports.EmbeddedChatPrimitiveTaglineContainer=ui;exports.EmbeddedChatPrimitiveTaglineLogo=bi;exports.EmbeddedChatPrimitiveTaglineText=Ci;exports.EmbeddedChatPrimitiveToolbarHeader=_e;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=ge;exports.EmbeddedChatPrimitiveWorkflow=Ve;exports.EmbeddedChatPrimitiveWorkflows=qe;exports.EmbeddedChatPrimitiveWorkflowsLabel=We;exports.EmbeddedChatPrimitiveWorkflowsList=Ne;exports.EmbeddedChatPrimitiveWrapper=be;exports.ExampleQuestion=Re;exports.ExampleQuestionButton=Oe;exports.ExampleQuestions=we;exports.ExampleQuestionsLabel=Le;exports.ExampleQuestionsList=De;exports.FeedbackForm=Ti;exports.FeedbackItem=yi;exports.FeedbackItemCheckbox=Hi;exports.FeedbackItemCheckboxIndicator=ji;exports.FeedbackItemDescription=Li;exports.FeedbackItemLabel=wi;exports.FeedbackModal=Ii;exports.FeedbackModalBody=Bi;exports.FeedbackModalClose=Si;exports.FeedbackModalContent=fi;exports.FeedbackModalHeader=xi;exports.FeedbackModalOverlay=Mi;exports.FeedbackSubmitButton=Di;exports.Footer=xt;exports.Form=Oi;exports.FormCancel=ka;exports.FormClose=qi;exports.FormContent=Qi;exports.FormDescription=Vi;exports.FormError=Ea;exports.FormField=$i;exports.FormFieldCheckbox=Yi;exports.FormFieldCheckboxIndicator=Ji;exports.FormFieldCombobox=sa;exports.FormFieldComboboxContent=ha;exports.FormFieldComboboxControl=da;exports.FormFieldComboboxInput=ca;exports.FormFieldComboboxItem=ba;exports.FormFieldComboboxItemIndicator=va;exports.FormFieldComboboxItemText=pa;exports.FormFieldComboboxList=Ca;exports.FormFieldComboboxListEmpty=Pa;exports.FormFieldComboboxListItems=ga;exports.FormFieldComboboxPositioner=ua;exports.FormFieldComboboxSelectedTags=la;exports.FormFieldComboboxTrigger=ma;exports.FormFieldDescription=Fa;exports.FormFieldEmail=Ki;exports.FormFieldError=_a;exports.FormFieldFile=zi;exports.FormFieldLabel=Ui;exports.FormFieldSelect=Xi;exports.FormFieldSelectContent=ia;exports.FormFieldSelectIcon=ta;exports.FormFieldSelectItem=ra;exports.FormFieldSelectItemIndicator=na;exports.FormFieldSelectItemText=oa;exports.FormFieldSelectTrigger=Zi;exports.FormFieldSelectValue=ea;exports.FormFieldSelectViewport=aa;exports.FormFieldText=X;exports.FormFieldTextArea=Gi;exports.FormFooter=Aa;exports.FormHeader=Wi;exports.FormHeading=Ni;exports.FormSubmit=Ia;exports.FormSuccess=Ma;exports.FormSuccessButton=Sa;exports.FormSuccessHeading=fa;exports.FormSuccessMessage=xa;exports.FormWrapper=Ri;exports.Header=ar;exports.HeaderToolbar=ve;exports.HeaderToolbarWrapper=ge;exports.HelpActions=gi;exports.HelpActionsMenu=_i;exports.HelpActionsMenuArrow=Ei;exports.HelpActionsMenuItem=Ai;exports.HelpActionsMenuItemIcon=ki;exports.HelpActionsTrigger=Fi;exports.Input=Tt;exports.InputFieldset=St;exports.InputGroup=Bt;exports.IntroMessageWrapper=Qe;exports.Markdown=lt;exports.MessageAction=pt;exports.MessageAttachments=et;exports.MessageAttachmentsItem=it;exports.MessageAttachmentsItemIcon=at;exports.MessageAttachmentsItemTitle=rt;exports.MessageAttachmentsList=tt;exports.MessageAttachmentsPreview=ot;exports.MessageAttachmentsPreviewBody=mt;exports.MessageAttachmentsPreviewClose=ct;exports.MessageAttachmentsPreviewContent=st;exports.MessageAttachmentsPreviewHeader=dt;exports.MessageAttachmentsPreviewOverlay=nt;exports.MessageAvatar=Ke;exports.MessageAvatarContent=ze;exports.MessageAvatarFallback=Ge;exports.MessageAvatarImage=Ye;exports.MessageContent=Ze;exports.MessageContentWrapper=Xe;exports.MessageCustomAction=bt;exports.MessageCustomActions=Ct;exports.MessageHeader=$e;exports.MessageLoading=Ue;exports.MessageName=Je;exports.MessageSourceItem=Ft;exports.MessageSourceItemBreadcrumbIcon=Yr;exports.MessageSourceItemBreadcrumbs=_t;exports.MessageSourceItemDescription=It;exports.MessageSourceItemDescriptionPart=Mt;exports.MessageSourceItemIcon=Et;exports.MessageSourceItemIndicator=ft;exports.MessageSourceItemTag=kt;exports.MessageSourceItemTitle=At;exports.MessageSources=vt;exports.MessageSourcesHeader=gt;exports.MessageSourcesList=Pt;exports.MessageToolbar=ut;exports.MessageWrapper=ce;exports.Messages=xe;exports.PrimitiveMessagePart=Or;exports.Root=pe;exports.SendButton=yt;exports.SendButtonIcon=Ht;exports.TaglineBrandName=pi;exports.TaglineContainer=ui;exports.TaglineLogo=bi;exports.TaglineText=Ci;exports.ToolbarHeader=_e;exports.Workflow=Ve;exports.Workflows=qe;exports.WorkflowsLabel=We;exports.WorkflowsList=Ne;exports.Wrapper=be;
|