@inkeep/cxkit-primitives 0.5.5 → 0.5.8
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/atoms/api/analytics/events.cjs +1 -1
- package/dist/atoms/api/analytics/events.js +2 -2
- package/dist/components/embedded-chat/use-chat-action.cjs +1 -1
- package/dist/components/embedded-chat/use-chat-action.js +14 -16
- package/dist/components/embedded-chat/use-inkeep-chat.cjs +3 -3
- package/dist/components/embedded-chat/use-inkeep-chat.js +122 -128
- package/dist/components/embedded-chat.cjs +5 -5
- package/dist/components/embedded-chat.d.cts +9 -8
- package/dist/components/embedded-chat.d.ts +9 -8
- package/dist/components/embedded-chat.js +952 -963
- package/dist/components/embedded-search/use-inkeep-search.cjs +1 -1
- package/dist/components/embedded-search/use-inkeep-search.js +10 -10
- package/dist/components/embedded-search.d.cts +2 -2
- package/dist/components/embedded-search.d.ts +2 -2
- package/dist/components/embedded-search.js +79 -79
- package/dist/components/intelligent-form/intelligent-form-provider.cjs +1 -1
- package/dist/components/intelligent-form/intelligent-form-provider.d.cts +3 -3
- package/dist/components/intelligent-form/intelligent-form-provider.d.ts +3 -3
- package/dist/components/intelligent-form/intelligent-form-provider.js +2 -2
- package/dist/components/intelligent-form/use-inkeep-intelligent-form.cjs +1 -1
- package/dist/components/intelligent-form/use-inkeep-intelligent-form.d.cts +5 -5
- package/dist/components/intelligent-form/use-inkeep-intelligent-form.d.ts +5 -5
- package/dist/components/intelligent-form/use-inkeep-intelligent-form.js +88 -109
- package/dist/components/intelligent-form.cjs +1 -1
- package/dist/components/intelligent-form.d.cts +4 -3
- package/dist/components/intelligent-form.d.ts +4 -3
- package/dist/components/intelligent-form.js +191 -188
- package/dist/components/modal.cjs +1 -1
- package/dist/components/modal.d.cts +1 -1
- package/dist/components/modal.d.ts +1 -1
- package/dist/components/modal.js +26 -26
- package/dist/providers/base-events-provider.cjs +1 -1
- package/dist/providers/base-events-provider.js +1 -1
- package/dist/providers/chat-events-provider.cjs +1 -1
- package/dist/providers/chat-events-provider.d.cts +9 -1
- package/dist/providers/chat-events-provider.d.ts +9 -1
- package/dist/providers/chat-events-provider.js +54 -57
- package/dist/providers/chat-form-provider.cjs +1 -1
- package/dist/providers/chat-form-provider.d.cts +3 -3
- package/dist/providers/chat-form-provider.d.ts +3 -3
- package/dist/providers/chat-form-provider.js +17 -17
- package/dist/providers/feedback-provider.cjs +1 -1
- package/dist/providers/feedback-provider.js +23 -23
- package/dist/utils/default-settings.cjs +1 -1
- package/dist/utils/default-settings.d.cts +1 -0
- package/dist/utils/default-settings.d.ts +1 -0
- package/dist/utils/default-settings.js +13 -11
- package/dist/utils/misc.cjs +1 -1
- package/dist/utils/misc.d.cts +2 -2
- package/dist/utils/misc.d.ts +2 -2
- package/dist/utils/misc.js +15 -13
- package/package.json +5 -4
- package/dist/atoms/dialog.cjs +0 -1
- package/dist/atoms/dialog.js +0 -185
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("react"),ne=require("react-textarea-autosize"),_a=require("@radix-ui/react-avatar"),Aa=require("@radix-ui/react-checkbox"),ka=require("@radix-ui/react-popover"),Fa=require("@radix-ui/react-tooltip"),Ea=require("@radix-ui/react-hover-card"),Ia=require("@radix-ui/react-scroll-area"),Ma=require("@radix-ui/react-select"),Sa=require("@radix-ui/react-dialog"),Ba=require("../node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/hi2/index.cjs"),fa=require("../node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/io5/index.cjs"),xa=require("../atoms/avatars/ai.cjs"),Ta=require("../atoms/avatars/user.cjs"),k=require("../atoms/icons/custom-icon.cjs"),B=require("../atoms/icons/built-in-icon-renderer.cjs"),ja=require("../atoms/link.cjs"),$=require("../atoms/markdown/index.cjs"),w=require("../providers/attachment-item-provider.cjs"),F=require("../providers/attachments-bar-provider.cjs"),f=require("../providers/source-item-provider.cjs"),C=require("../providers/config-provider.cjs"),D=require("../providers/conversation-provider.cjs"),V=require("../providers/chat-events-provider.cjs"),re=require("../providers/feedback-provider.cjs"),q=require("../providers/message-attachments-provider.cjs"),P=require("../providers/message-provider.cjs"),be=require("../atoms/icons/checkbox-icon.cjs"),ie=require("../hooks/use-copy-to-clipboard.cjs"),U=require("../providers/feedback-item-provider.cjs"),ya=require("../utils/get-message-metadata.cjs"),h=require("../utils/misc.cjs"),i=require("./factory.cjs"),b=require("./embedded-chat/chat-provider.cjs"),Ha=require("./tagline-logo-icon.cjs"),wa=require("../hooks/use-settle-action.cjs"),La=require("../hooks/use-container-size.cjs"),se=require("./embedded-chat/use-chat-action.cjs"),ae=require("../providers/help-menu-provider.cjs"),_=require("../providers/chat-form-provider.cjs"),x=require("../providers/form-field-provider.cjs"),Da=require("react-hook-form"),qa=require("../utils/highlight-emphasis.cjs"),ge=require("./modal/modal-provider.cjs"),Ra=require("@inkeep/cxkit-color-mode"),oe=require("../utils/compose-refs.cjs"),u=require("../utils/compose-event-handlers.cjs"),Wa=require("../hooks/use-scroll-to-bottom.cjs"),Oa=require("../atoms/api/analytics/conversation.cjs");function T(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,r.get?r:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const de=T(_a),K=T(Aa),z=T(ka),j=T(Fa),G=T(Ea),R=T(Ia),I=T(Ma),A=T(Sa),Qa="__intro__",Na=i.ikp("div",{_id:"aiChatWrapper"}),Pe=g.forwardRef((t,e)=>{const{...a}=t,{isHidden:r,isMobile:s}=b.useChat(),[d,o]=La.useContainerSize(),c=oe.useComposedRefs(e,d),m=o?.width?o.width>580:!0,l=ge.useModal();return n.jsx(Na,{ref:c,"data-widget-md":h.dataAttr(m),"data-hidden":h.dataAttr(r),"data-in-modal":h.dataAttr(!!l),"data-mobile":h.dataAttr(s),...a})}),$a=i.ikp("div",{_id:"aiChatConversationLoading"}),_e=t=>{const{isLoadingConversation:e}=b.useChat();return e?n.jsx($a,{children:n.jsx("span",{children:"Loading..."}),...t}):null},Va=i.ikp("div",{_id:"aiChatRoot"}),Ae=t=>{const{isLoadingConversation:e,isHidden:a}=b.useChat(),{form:r}=_.useChatForm();return e||r?null:n.jsx(Va,{"data-hidden":h.dataAttr(a),...t})},Ua=i.ikp("div",{_id:"aiChatHeader"}),ke=i.ikp("div",{_id:"aiChatHeader__Toolbar"}),Fe=i.ikp("div",{_id:"aiChatHeader__ToolbarHeaderWrapper"}),Ka=i.ikp("div",{_id:"aiChatHeader__ToolbarHeader"}),Ee=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig(),a=`Ask ${e.aiAssistantName||"AI"}`;return n.jsx(Ka,{...t,children:a})}),Ie=i.ikp("div",{_id:"aiChatContent"}),Me=i.ikp(R.Root,{_id:"aiChatContentScrollArea"}),za=i.ikp(R.Viewport,{_id:"aiChatContentScrollArea__Viewport"}),Se=g.forwardRef(({children:t,...e},a)=>{const{containerRef:r}=Wa.useScrollToBottom(),s=oe.useComposedRefs(a,r);return n.jsx(za,{ref:s,children:n.jsx("div",{"data-part":"grid",style:{display:"grid"},children:t}),...e})}),Be=i.ikp(R.ScrollAreaScrollbar,{_id:"aiChatContentScrollArea__Scrollbar"}),fe=i.ikp(R.ScrollAreaThumb,{_id:"aiChatContentScrollArea__Thumb"}),xe=i.ikp(R.Corner,{_id:"aiChatContentScrollArea__Corner"}),Ga=i.ikp("div",{_id:"aiChatMessages"}),Te=t=>{const e=b.useChat(),{children:a,...r}=t;return n.jsx(Ga,{children:h.maybeRender(a,e),...r})},Ya=i.ikp("div",{_id:"aiChatDisclaimer"}),je=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig();return e.disclaimerSettings?.isEnabled?n.jsx(G.Root,{openDelay:100,children:n.jsx(Ya,{...t})}):null}),Ja=i.ikp("span",{_id:"aiChatDisclaimerLabel"}),ye=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig(),a=e.disclaimerSettings;return n.jsx(Ja,{children:a?.label,...t})}),He=i.ikp(G.Trigger,{_id:"aiChatDisclaimerTrigger",children:n.jsx(k.CustomIcon,{iconKey:"info"})}),Xa=i.ikp(G.Content,{_id:"aiChatDisclaimerContent"}),we=t=>n.jsx(Xa,{side:"top",sideOffset:8,align:"end",alignOffset:-10,...t});i.ikp($.Markdown,{_id:"aiChatDisclaimerText"});const Le=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig(),a=e.aiAssistantName,s=e.disclaimerSettings?.tooltip||`Information provided by ${a||"this AI assistant"} is not guaranteed to be accurate or comprehensive.`;return n.jsx($.Markdown,{shouldOpenLinksInNewTab:!0,children:s,...t})}),De=i.ikp(G.Arrow,{_id:"aiChatDisclaimerArrow"}),Za=i.ikp("div",{_id:"aiChatQuickQuestions"}),qe=t=>{const{aiChatSettings:e}=C.useInkeepConfig(),{messages:a}=b.useChat();return!e.exampleQuestions?.length||a.length?null:n.jsx(Za,{...t})},en=i.ikp("h3",{_id:"aiChatQuickQuestionsLabel"}),Re=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig();return n.jsx(en,{children:e.exampleQuestionsLabel,...t})}),tn=i.ikp("div",{_id:"aiChatQuickQuestionsList"}),We=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig(),a=e.exampleQuestions,{children:r,...s}=t;return n.jsx(tn,{children:h.maybeRender(r,a),...s})}),an=i.ikp("div",{_id:"aiChatQuickQuestion"}),Oe=g.forwardRef((t,e)=>{const{aiChatSettings:a}=C.useInkeepConfig(),r=a.isFirstExampleQuestionHighlighted;return n.jsx(an,{ref:e,"data-highlight":h.dataAttr(r),...t})}),nn=i.ikp("button",{_id:"aiChatQuickQuestionButton"}),Qe=t=>{const{question:e,onClick:a,...r}=t,{handleSubmit:s}=b.useChat();return n.jsx(nn,{onClick:u.composeEventHandlers(a,()=>s(e)),children:e,...r})},rn=i.ikp("div",{_id:"aiChatWorkflows"}),Ne=t=>{const{aiChatSettings:e}=C.useInkeepConfig(),{messages:a}=b.useChat();return!e.workflows?.length||a.length?null:n.jsx(rn,{...t})},sn=i.ikp("h3",{_id:"aiChatWorkflowsLabel"}),$e=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig();return n.jsx(sn,{children:e.workflowsHeader,...t})}),on=i.ikp("div",{_id:"aiChatWorkflowsList"}),Ve=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig(),a=e.workflows,{children:r,...s}=t;return n.jsx(on,{children:h.maybeRender(r,a),...s})}),dn=i.ikp("button",{_id:"aiChatWorkflow"}),Ue=t=>{const{workflow:e,onClick:a,...r}=t,{handleWorkflow:s}=b.useChat();return n.jsx(dn,{onClick:u.composeEventHandlers(a,()=>s(e)),children:e.displayName,...r})},cn=i.ikp(Ba.HiMiniBolt,{_id:"aiChatWorkflow__Icon"}),Ke=t=>n.jsx(cn,{...t}),mn=i.ikp("div",{_id:"aiChatMessageWrapper"}),ce=t=>{const{message:e,...a}=t;return e.role==="system"?null:n.jsx(P.MessageProvider,{message:e,children:n.jsx(mn,{"data-role":e.role,...a})})},ze=g.memo(t=>{const{message:e,...a}=t,{aiChatSettings:r,baseSettings:s}=C.useInkeepConfig(),d=r.aiAssistantName,o=d?`Hi, I'm ${d}!`:"Hi!",c=r.chatSubjectName??s.organizationDisplayName,m=`${o}
|
|
2
2
|
|
|
3
3
|
I'm an AI assistant trained on documentation, help articles, and other content.`,l=c?`
|
|
4
4
|
|
|
5
5
|
Ask me anything about \`${c}\`.`:`
|
|
6
6
|
|
|
7
|
-
Let me know how I can help.`,v={content:s.introMessage??`${m}${l}`,id:Wa,...e,role:"assistant",links:[]};return n.jsx(oe,{message:v,...a})}),dn=i.ikp("div",{_id:"aiChatMessageHeader"}),ze=t=>{const{message:e}=P.useMessage();return n.jsx(dn,{"data-role":e.role,...t})},cn=i.ikp("div",{_id:"aiChatMessageLoading"}),Ge=t=>{const{isLoading:e,isStreaming:a,messages:s}=b.useChat(),{message:r}=P.useMessage();return!(s.at(-1)?.id===r?.id)||r.role!=="assistant"||!e||a?null:n.jsx(cn,{children:"Thinking...",...t})},mn=i.ikp("div",{_id:"aiChatMessageAvatar"}),Ye=t=>{const{message:e}=P.useMessage();return n.jsx(mn,{"data-role":e.role,...t})},ln=i.ikp(re.Root,{_id:"aiChatMessageAvatarContent"}),Je=t=>{const{message:e}=P.useMessage(),{baseSettings:a}=p.useInkeepConfig();return n.jsx(ln,{"data-username":h.dataAttr(e.role==="user"&&!!a.userProperties.name),"data-role":e.role,...t})},hn=i.ikp(re.Fallback,{_id:"aiChatMessageAvatarFallback"}),Xe=g.memo(t=>{const{baseSettings:e}=p.useInkeepConfig(),{message:a}=P.useMessage();return e.userProperties.name?n.jsx(hn,{"data-role":a.role,children:h.getInitials(e.userProperties.name),...t}):null}),Ce=i.ikp(re.Image,{_id:"aiChatMessageAvatarImage"}),Ze=g.memo(t=>{const{onLoadingStatusChange:e,...a}=t,{aiChatSettings:s,baseSettings:{userProperties:r}}=p.useInkeepConfig(),{message:o}=P.useMessage(),{aiAssistantAvatar:d}=s??{},c=typeof d=="string"?d:d?.light,m=(typeof d=="string"?d:d?.dark)??c,l=La.useColorModeValue(c,m),[C,v]=g.useState(l);g.useEffect(()=>{v(l)},[l]);const k=I=>{I==="error"&&v(null)};return o.role==="user"?r.name?null:s.userAvatar?n.jsx(Ce,{"data-type":"image","data-role":o.role,src:s.userAvatar,...t}):n.jsx(fa.default,{"data-type":"icon","data-role":o.role,...t}):C?n.jsx(Ce,{src:C,"data-type":"image","data-role":o.role,onLoadingStatusChange:u.composeEventHandlers(e,k),...a}):n.jsx(Sa.default,{"data-type":"icon","data-role":o.role,...t})}),un=i.ikp("span",{_id:"aiChatMessageName"}),et=t=>{const{message:e}=P.useMessage();return n.jsx(un,{"data-role":e.role,children:e.role==="user"?"You":"AI assistant",...t})},Cn=i.ikp("div",{_id:"aiChatMessageContentWrapper"}),tt=t=>{const{message:e}=P.useMessage();return n.jsx(Cn,{"data-role":e.role,...t})},pn=i.ikp("div",{_id:"aiChatMessageContent"}),it=t=>{const{message:e}=P.useMessage();return n.jsx(pn,{"data-role":e.role,...t})},vn=i.ikp("div",{_id:"aiChatMessageAttachments"}),at=t=>{const{message:e}=P.useMessage(),a=e.metadata?.attributes?.attachments;return e.role!=="user"||!a?.length?null:n.jsx(N.MessageAttachmentsProvider,{children:n.jsx(vn,{...t})})},bn=i.ikp("div",{_id:"aiChatMessageAttachments__List"}),nt=t=>{const{children:e,...a}=t,{message:s}=P.useMessage(),r=s.metadata?.attributes?.attachments;return r?n.jsx(bn,{children:h.maybeRender(e,r),...a}):null},gn=i.ikp("div",{_id:"aiChatMessageAttachments__Item"}),st=t=>{const{attachment:e,onClick:a,...s}=t,{selectItem:r,onOpen:o}=N.useMessageAttachments(),d=()=>{r(e),o()};return n.jsx(w.AttachmentItemProvider,{attachment:e,children:n.jsx(gn,{onClick:u.composeEventHandlers(a,d),...s})})},Pn=i.ikp(S.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),rt=t=>{const{attachment:e}=w.useAttachmentItem(),a=e.contentType?.attachmentIcon;return a?n.jsx(Pn,{iconSettings:a,...t}):null},_n=i.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),ot=t=>{const{attachment:e}=w.useAttachmentItem();return n.jsx(_n,{children:e.title,...t})},An=i.ikp(_.Root,{_id:"aiChatMessageAttachmentsPreview"}),dt=t=>{const{onOpenChange:e,...a}=t,{selectItem:s,isOpen:r,onClose:o,selectedItem:d}=N.useMessageAttachments(),c=m=>{m||(o(),s(null))};return n.jsx(An,{open:r&&d!==null,onOpenChange:u.composeEventHandlers(e,c),...a})},ct=i.ikp(_.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),mt=i.ikp(_.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),kn=i.ikp(_.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),lt=t=>{const{selectedItem:e}=N.useMessageAttachments();return n.jsx(kn,{children:e?.title||"Attachment",...t})},ht=i.ikp(_.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:n.jsx(F.CustomIcon,{iconKey:"close"})}),Fn=i.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),ut=t=>{const{selectedItem:e}=N.useMessageAttachments();return n.jsx(Fn,{children:e?.content,...t})},pe=i.ikp("div",{_id:"aiChatMessage"}),Ct=t=>{const{aiChatSettings:e}=p.useInkeepConfig(),{componentStyles:a,...s}=t,{message:r}=P.useMessage(),{logEvent:o}=Q.useChatEvents(),d=h.getMessageContent(r),{conversation:c}=U.useInkeepConversation();return r.role==="user"?n.jsx(pe,{"data-role":r.role,children:d,...s}):n.jsx(pe,{"data-role":r.role,...s,children:n.jsx(K.Markdown,{children:d,componentStyles:a,shouldOpenLinksInNewTab:e.shouldOpenLinksInNewTab,onLinkClick:(m,l)=>{o({eventName:"chat_response_link_opened",properties:{messageId:r.id,title:l?.toString(),url:m}})},onCodeCopy:(m,l)=>{o({eventName:"chat_code_block_copied",properties:{conversationId:c.id,language:m,code:l}})}})})},En=i.ikp("div",{_id:"aiChatMessageActions"}),pt=t=>{const{isLoading:e,messages:a}=b.useChat(),{message:s}=P.useMessage();return a.at(-1)?.id===s?.id&&e||s.role==="user"?null:n.jsx(En,{...t})},In=i.ikp("div",{_id:"aiChatMessageToolActions"}),vt=t=>{const{children:e,...a}=t,{message:s}=P.useMessage(),{messageToolCalls:r}=b.useChat(),o=r[s.id]||[];return n.jsx(In,{children:h.maybeRender(e,o),...a})},bt=t=>{const{onClick:e,action:a,...s}=t,{logEvent:r}=Q.useChatEvents(),{message:o}=P.useMessage(),{messages:d,selectedWorkflow:c}=b.useChat(),{conversation:m}=U.useInkeepConversation(),{handleAction:l}=ne.useChatAction(a),C=d.findIndex(L=>L.id===o.id),v=()=>{l(),r({eventName:"toolcall_action_clicked",properties:{actionType:a.action.type,conversationId:m.id,question:h.getMessageContent(d[C-1]),answer:h.getMessageContent(o),answerId:o.id,workflowId:c?.id}})},k=a.label||"Contact Support",I=n.jsxs(n.Fragment,{children:[a.icon&&n.jsx(S.BuiltInIconRenderer,{iconSettings:a.icon}),k]}),j=a.action.type,W=i.ikp(j==="open_link"?"a":"button",{_id:"aiChatMessageToolAction",children:I,"data-type":a.action.type,...j==="open_link"&&{href:a.action.url,target:"_blank",rel:"noopener"},onClick:u.composeEventHandlers(e,v)});return n.jsx(W,{...s})},Mn=i.ikp("button",{_id:"aiChatMessageAction"}),gt=t=>{const{action:e,onClick:a,className:s,...r}=t,{message:o}=P.useMessage(),{isStreaming:d,messages:c}=b.useChat(),[m,l]=ee.useCopyToClipboard(),{feedback:C,submitPositiveFeedback:v,setCurrentFeedback:k,currentFeedback:I}=ae.useMessageFeedback(),{logEvent:j}=Q.useChatEvents(),[W,L]=ja.useSettleAction(),{baseSettings:{privacyPreferences:X}}=p.useInkeepConfig(),{optOutAllAnalytics:Z}=X,me=c.at(-1)?.id===o?.id,le=o.role==="assistant";if(me&&d||!le||{copy:!1,upvote:Z,downvote:Z}[e])return null;const R={copy(){l(h.getMessageContent(o)),j({eventName:"chat_message_copied",properties:{messageId:o.id}})},upvote(){v(o.id).then(()=>{L()})},downvote(){k(o.id)}},y={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},O={copy:n.jsx(F.CustomIcon,{iconKey:m?"messageCopied":"messageCopy"}),upvote:n.jsx(F.CustomIcon,{iconKey:W?"messageCopied":"thumbsUp"}),downvote:n.jsx(F.CustomIcon,{iconKey:"thumbsDown"})},H={copy:{"data-copied":h.dataAttr(m)},upvote:{"data-upvoted":h.dataAttr(C[o.id]?.type==="positive")},downvote:{"data-downvoted":h.dataAttr(C[o.id]?.type==="negative"),"data-state":I===null?"closed":"open"}};return n.jsx(Mn,{"data-action":e,...H[e],children:O[e],"aria-label":y[e],className:`${s} ${e}`,onClick:u.composeEventHandlers(a,R[e]),...r})},Sn=i.ikp("div",{_id:"aiChatMessageSources"}),Pt=t=>{const{message:e}=P.useMessage();return e.role!=="assistant"||!e.links?.length?null:n.jsx(Sn,{...t})},fn=i.ikp("div",{_id:"aiChatMessageSources__Header"}),_t=t=>n.jsx(fn,{children:"Sources",...t}),Bn=i.ikp("div",{_id:"aiChatMessageSources__List"}),At=t=>{const{message:e}=P.useMessage(),{children:a,...s}=t,{baseSettings:{transformSource:r,organizationDisplayName:o},aiChatSettings:{shouldOpenLinksInNewTab:d},searchSettings:{tabs:c}}=p.useInkeepConfig();if(e.role!=="assistant")return null;const m=e.links.map(l=>{const C=r(l,"chatSourceItem",{organizationDisplayName:o,tabs:c}),v=d||C.shouldOpenInNewTab;return{...C,isExternal:v}});return n.jsx(Bn,{children:h.maybeRender(a,m),...s})},xn=i.ikp(Ba.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),kt=t=>{const{source:e,onClick:a,...s}=t,{logEvent:r}=Q.useChatEvents(),{message:o}=P.useMessage(),d=()=>{r({eventName:"chat_response_source_item_clicked",properties:{messageId:o.id,sourceType:e.type,title:e.title,url:e.url}})};return n.jsx(f.SourceItemProvider,{source:e,children:n.jsx(xn,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:u.composeEventHandlers(a,d),...s})})},Tn=i.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),Ft=t=>{const{source:e}=f.useSourceItem();return e.breadcrumbs?.length?n.jsx(Tn,{"data-type":e.type,...t}):null},jn=i.ikp(F.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),yn=i.ikp(S.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),Et=t=>{const{source:e}=f.useSourceItem();return n.jsx(yn,{iconSettings:e.icon,"data-type":e.type,...t})},Hn=i.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),It=t=>{const{source:e}=f.useSourceItem();return n.jsx(Hn,{"data-type":e.type,children:e.title,...t})},wn=i.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),Mt=t=>{const{source:e}=f.useSourceItem();return n.jsx(wn,{"data-type":e.type,...t})},Ln=i.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),St=t=>{const{source:e}=f.useSourceItem(),{children:a,...s}=t,r=g.useMemo(()=>e.description?wa.highlightEmphasis(e.description):[],[e.description]);return r.length?n.jsx(Ln,{"data-type":e.type,children:h.maybeRender(a,r),...s}):null},Dn=i.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),ft=t=>{const{part:e,...a}=t,{source:s}=f.useSourceItem();return typeof e=="string"?e:n.jsx(Dn,{"data-type":s.type,children:e.content,"data-highlighted":h.dataAttr(e.highlighted),...a})},qn=i.ikp(F.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),Bt=t=>{const{source:e}=f.useSourceItem();return n.jsx(qn,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},xt=i.ikp("div",{_id:"aiChatFooter"}),Tt=i.ikp("div",{_id:"aiChatInput__Fieldset"}),jt=i.ikp("div",{_id:"aiChatInput__Group"}),Wn=i.ikp("textarea",{_id:"aiChatInput"}),yt=g.forwardRef(({onChange:t,onKeyDown:e,...a},s)=>{const{handleInputChange:r,handleInputKeyDown:o,input:d,error:c,shouldAutoFocusInput:m,inputRef:l}=b.useChat(),{aiChatSettings:C}=p.useInkeepConfig(),v=se.useComposedRefs(s,l),k=be.useModal();return g.useEffect(()=>{requestAnimationFrame(()=>{m&&l?.current&&(l.current.focus(),l.current.selectionStart=l.current.value.length)})},[m,l,k?.isOpen]),n.jsx(Wn,{asChild:!0,ref:v,maxLength:99999,placeholder:C.placeholder,value:d,onChange:u.composeEventHandlers(t,r),onKeyDown:u.composeEventHandlers(e,o),disabled:!!c||C.isViewOnly,...a,children:n.jsx(ie,{})})}),Rn=i.ikp("button",{_id:"aiChatInput__SendButton"}),Ht=t=>{const{handleSubmit:e,isSubmitDisabled:a,error:s}=b.useChat(),{aiChatSettings:r}=p.useInkeepConfig(),{onClick:o,...d}=t;return n.jsx(Rn,{onClick:u.composeEventHandlers(o,()=>e()),"aria-label":"Send message",disabled:a||!!s||r.isViewOnly,...d})},wt=i.ikp(F.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),On=i.ikp("div",{_id:"aiChatAttachmentsBar"}),Lt=t=>{const{selectedWorkflow:e}=b.useChat();return!e||!e.supportedInputs?.length?null:n.jsx(E.AttachmentsBarProvider,{children:n.jsx(On,{...t})})},Qn=i.ikp("div",{_id:"aiChatAttachmentsBar__List"}),Dt=t=>{const{children:e,...a}=t,{messageAttachments:s}=b.useChat();return n.jsx(Qn,{children:h.maybeRender(e,s),...a})},Nn=i.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),qt=t=>{const{attachment:e,...a}=t;return n.jsx(w.AttachmentItemProvider,{attachment:e,children:n.jsx(Nn,{...a})})},$n=i.ikp(S.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),Wt=t=>{const{attachment:e}=w.useAttachmentItem(),a=e.contentType?.attachmentIcon;return a?n.jsx($n,{iconSettings:a,...t}):null},Vn=i.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),Rt=t=>{const{attachment:e}=w.useAttachmentItem();return n.jsx(Vn,{children:e.title,...t})},Un=i.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),Ot=t=>{const{onClick:e,...a}=t,{attachment:s}=w.useAttachmentItem(),{setMessageAttachments:r}=b.useChat(),o=()=>{r(d=>d.filter(c=>c.id!==s.id))};return n.jsx(Un,{"aria-label":"Remove attachment",children:n.jsx(F.CustomIcon,{iconKey:"close"}),onClick:u.composeEventHandlers(e,o),...a})},Qt=i.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),Nt=i.ikp(T.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),$t=i.ikp(T.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:n.jsx(F.CustomIcon,{iconKey:"info"})}),de=i.ikp(T.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),Vt=i.ikp(T.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:n.jsxs(n.Fragment,{children:[n.jsx(de,{}),"Attachments will be kept in context for the entire conversation."]})}),Kn=i.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),Ut=t=>{const{children:e,...a}=t,{selectedWorkflow:s}=b.useChat();return s?.supportedInputs?n.jsx(Kn,{children:h.maybeRender(e,s.supportedInputs),...a}):null},zn=i.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),Kt=t=>{const{input:e,onClick:a,...s}=t,{selectedWorkflow:r,messageAttachments:o,setMessageAttachments:d}=b.useChat(),{selectInput:c,onOpen:m}=E.useAttachmentsBar(),l=()=>{if(e.type==="FUNCTIONAL_MULTI_ATTACHMENT")return r?e.onInvoke(r,e,d,[...o]):void 0;c(e),m()};return n.jsx(zn,{children:e.displayName,onClick:u.composeEventHandlers(a,l),...s})},zt=i.ikp(Ma.IoAdd,{_id:"aiChatAttachmentsBar__InputIcon"}),Gn=i.ikp(_.Root,{_id:"aiChatAttachmentsBar__Modal"}),Gt=t=>{const{onOpenChange:e,...a}=t,{selectInput:s,isOpen:r,onClose:o,selectedInput:d}=E.useAttachmentsBar(),c=m=>{m||(o(),s(null))};return n.jsx(Gn,{open:r&&d!==null,onOpenChange:u.composeEventHandlers(e,c),...a})},Yt=i.ikp(_.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),Jt=i.ikp(_.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),Xt=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),Yn=i.ikp(_.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),Zt=t=>{const{selectedInput:e}=E.useAttachmentsBar(),a=`Add ${e?.displayName}`;return n.jsx(Yn,{children:a,...t})},Jn=i.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),ei=t=>{const{selectedInput:e}=E.useAttachmentsBar(),a=e?.workflowModalProps?.modalHelpText;return a?n.jsx(Jn,{children:a,...t}):null},Xn=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),ti=t=>{const{children:e,...a}=t,{selectedInput:s}=E.useAttachmentsBar(),r=s?.workflowModalProps?.modalHelpElement;return r?n.jsx(Xn,{asChild:!e,children:e||r,...a}):null},ii=i.ikp(_.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:n.jsx(F.CustomIcon,{iconKey:"close"})}),ai=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),Zn=i.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),ni=t=>{const{onSubmit:e,...a}=t,{form:s}=E.useAttachmentsBar();return n.jsx(Zn,{onSubmit:u.composeEventHandlers(e,s.onSubmit),...a})},si=i.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),es=i.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),ri=t=>{const{form:e,selectedInput:a}=E.useAttachmentsBar();return n.jsx(es,{htmlFor:`${a?.id}-title`,children:e.labels.title,...t})},ts=i.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),oi=t=>{const{onChange:e,...a}=t,{form:s,selectedInput:r}=E.useAttachmentsBar();return n.jsx(ts,{name:"title",value:s.data.title,id:`${r?.id}-title`,"data-invalid":h.dataAttr(!!s.errors.title),"aria-invalid":!!s.errors.title,onChange:u.composeEventHandlers(e,s.onChange),...a})},is=i.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),di=t=>{const{form:e}=E.useAttachmentsBar();return e.errors.title?n.jsx(is,{"aria-live":"polite",children:e.errors.title,...t}):null},ci=i.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),as=i.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),mi=t=>{const{form:e,selectedInput:a}=E.useAttachmentsBar();return n.jsx(as,{htmlFor:`${a?.id}-content`,children:e.labels.content,...t})},ns=i.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),li=t=>{const{onChange:e,...a}=t,{form:s,selectedInput:r}=E.useAttachmentsBar();return n.jsx(ns,{asChild:!0,rows:4,name:"content",value:s.data.content,id:`${r?.id}-content`,"data-invalid":h.dataAttr(!!s.errors.content),"aria-invalid":!!s.errors.content,onChange:u.composeEventHandlers(e,s.onChange),...a,children:n.jsx(ie,{maxRows:10})})},ss=i.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),hi=t=>{const{form:e}=E.useAttachmentsBar();return e.errors.content?n.jsx(ss,{"aria-live":"polite",children:e.errors.content,...t}):null},ui=i.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),Ci=i.ikp("div",{_id:"aiChatActionBar"}),pi=i.ikp("div",{_id:"aiChat__ChatActions"}),vi=i.ikp("div",{_id:"aiChatTagline__Container"}),bi=i.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),gi=i.ikp(Ta.default,{_id:"aiChatTagline__Logo"}),Pi=i.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),rs=i.ikp("div",{_id:"aiChat__ChatAction"}),Y=t=>{const{action:e,onClick:a,className:s,...r}=t,{clear:o,stop:d,isLoading:c,messages:m,selectedWorkflow:l}=b.useChat(),{conversation:C}=U.useInkeepConversation(),{aiChatSettings:v,baseSettings:k}=p.useInkeepConfig(),{logEvent:I}=Q.useChatEvents(),[j,W]=ee.useCopyToClipboard(),[L,X]=ee.useCopyToClipboard();if({help:!1,copy:m.length===0||!v.isCopyChatButtonVisible||c,share:m.length===0||!v.isShareButtonVisible||!C.id||!!l||c,clear:m.length===0||v.isViewOnly||c,stop:!c}[e])return null;const he={help:()=>{},copy:()=>{const R=m.map(y=>{const O=`**${y.role==="assistant"?"AI Assistant":"User"}**`,H=h.getMessageContent(y),D=xa.stringifyAttachments(y.metadata?.attributes?.attachments),V=D?`
|
|
7
|
+
Let me know how I can help.`,v={content:r.introMessage??`${m}${l}`,id:Qa,...e,role:"assistant",links:[]};return n.jsx(ce,{message:v,...a})}),ln=i.ikp("div",{_id:"aiChatMessageHeader"}),Ge=t=>{const{message:e}=P.useMessage();return n.jsx(ln,{"data-role":e.role,...t})},hn=i.ikp("div",{_id:"aiChatMessageLoading"}),Ye=t=>{const{isLoading:e,isStreaming:a,messages:r}=b.useChat(),{message:s}=P.useMessage();return!(r.at(-1)?.id===s?.id)||s.role!=="assistant"||!e||a?null:n.jsx(hn,{children:"Thinking...",...t})},un=i.ikp("div",{_id:"aiChatMessageAvatar"}),Je=t=>{const{message:e}=P.useMessage();return n.jsx(un,{"data-role":e.role,...t})},Cn=i.ikp(de.Root,{_id:"aiChatMessageAvatarContent"}),Xe=t=>{const{message:e}=P.useMessage(),{baseSettings:a}=C.useInkeepConfig();return n.jsx(Cn,{"data-username":h.dataAttr(e.role==="user"&&!!a.userProperties.name),"data-role":e.role,...t})},pn=i.ikp(de.Fallback,{_id:"aiChatMessageAvatarFallback"}),Ze=g.memo(t=>{const{baseSettings:e}=C.useInkeepConfig(),{message:a}=P.useMessage();return e.userProperties.name?n.jsx(pn,{"data-role":a.role,children:h.getInitials(e.userProperties.name),...t}):null}),pe=i.ikp(de.Image,{_id:"aiChatMessageAvatarImage"}),et=g.memo(t=>{const{onLoadingStatusChange:e,...a}=t,{aiChatSettings:r,baseSettings:{userProperties:s}}=C.useInkeepConfig(),{message:d}=P.useMessage(),{aiAssistantAvatar:o}=r??{},c=typeof o=="string"?o:o?.light,m=(typeof o=="string"?o:o?.dark)??c,l=Ra.useColorModeValue(c,m),[p,v]=g.useState(l);g.useEffect(()=>{v(l)},[l]);const E=y=>{y==="error"&&v(null)};return d.role==="user"?s.name?null:r.userAvatar?n.jsx(pe,{"data-type":"image","data-role":d.role,src:r.userAvatar,...t}):n.jsx(Ta.default,{"data-type":"icon","data-role":d.role,...t}):p?n.jsx(pe,{src:p,"data-type":"image","data-role":d.role,onLoadingStatusChange:u.composeEventHandlers(e,E),...a}):n.jsx(xa.default,{"data-type":"icon","data-role":d.role,...t})}),vn=i.ikp("span",{_id:"aiChatMessageName"}),tt=t=>{const{message:e}=P.useMessage();return n.jsx(vn,{"data-role":e.role,children:e.role==="user"?"You":"AI assistant",...t})},bn=i.ikp("div",{_id:"aiChatMessageContentWrapper"}),it=t=>{const{message:e}=P.useMessage();return n.jsx(bn,{"data-role":e.role,...t})},gn=i.ikp("div",{_id:"aiChatMessageContent"}),at=t=>{const{message:e}=P.useMessage();return n.jsx(gn,{"data-role":e.role,...t})},Pn=i.ikp("div",{_id:"aiChatMessageAttachments"}),nt=t=>{const{message:e}=P.useMessage(),a=e.metadata?.attributes?.attachments;return e.role!=="user"||!a?.length?null:n.jsx(q.MessageAttachmentsProvider,{children:n.jsx(Pn,{...t})})},_n=i.ikp("div",{_id:"aiChatMessageAttachments__List"}),rt=t=>{const{children:e,...a}=t,{message:r}=P.useMessage(),s=r.metadata?.attributes?.attachments;return s?n.jsx(_n,{children:h.maybeRender(e,s),...a}):null},An=i.ikp("div",{_id:"aiChatMessageAttachments__Item"}),st=t=>{const{attachment:e,onClick:a,...r}=t,{selectItem:s,onOpen:d}=q.useMessageAttachments(),o=()=>{s(e),d()};return n.jsx(w.AttachmentItemProvider,{attachment:e,children:n.jsx(An,{onClick:u.composeEventHandlers(a,o),...r})})},kn=i.ikp(B.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),ot=t=>{const{attachment:e}=w.useAttachmentItem(),a=e.contentType?.attachmentIcon;return a?n.jsx(kn,{iconSettings:a,...t}):null},Fn=i.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),dt=t=>{const{attachment:e}=w.useAttachmentItem();return n.jsx(Fn,{children:e.title,...t})},En=i.ikp(A.Root,{_id:"aiChatMessageAttachmentsPreview"}),ct=t=>{const{onOpenChange:e,...a}=t,{selectItem:r,isOpen:s,onClose:d,selectedItem:o}=q.useMessageAttachments(),c=m=>{m||(d(),r(null))};return n.jsx(En,{open:s&&o!==null,onOpenChange:u.composeEventHandlers(e,c),...a})},mt=i.ikp(A.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),lt=i.ikp(A.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),In=i.ikp(A.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),ht=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(In,{children:e?.title||"Attachment",...t})},ut=i.ikp(A.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:n.jsx(k.CustomIcon,{iconKey:"close"})}),Mn=i.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),Ct=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(Mn,{children:e?.content,...t})},ve=i.ikp("div",{_id:"aiChatMessage"}),pt=t=>{const{aiChatSettings:e}=C.useInkeepConfig(),{componentStyles:a,...r}=t,{message:s}=P.useMessage(),{logEvent:d}=V.useChatEvents(),o=h.getMessageContent(s),{conversation:c}=D.useInkeepConversation();return s.role==="user"?n.jsx(ve,{"data-role":s.role,children:o,...r}):n.jsx(ve,{"data-role":s.role,...r,children:n.jsx($.Markdown,{children:o,componentStyles:a,shouldOpenLinksInNewTab:e.shouldOpenLinksInNewTab,onLinkClick:(m,l)=>{d({eventName:"assistant_message_inline_link_opened",properties:{title:l?.toString(),url:m}})},onCodeCopy:(m,l)=>{d({eventName:"assistant_code_block_copied",properties:{conversation:c,language:m,code:l}})}})})},Sn=i.ikp("div",{_id:"aiChatMessageActions"}),vt=t=>{const{isLoading:e,messages:a}=b.useChat(),{message:r}=P.useMessage();return a.at(-1)?.id===r?.id&&e||r.role==="user"?null:n.jsx(Sn,{...t})},Bn=i.ikp("div",{_id:"aiChatMessageToolActions"}),bt=t=>{const{children:e,...a}=t,{message:r}=P.useMessage(),{messageToolCalls:s}=b.useChat(),d=s[r.id]||[];return n.jsx(Bn,{children:h.maybeRender(e,d),...a})},gt=t=>{const{onClick:e,action:a,...r}=t,{handleAction:s}=se.useChatAction(a),d=()=>{s()},o=a.label||"Contact Support",c=n.jsxs(n.Fragment,{children:[a.icon&&n.jsx(B.BuiltInIconRenderer,{iconSettings:a.icon}),o]}),m=a.action.type,l=i.ikp(m==="open_link"?"a":"button",{_id:"aiChatMessageToolAction",children:c,"data-type":a.action.type,...m==="open_link"&&{href:a.action.url,target:"_blank",rel:"noopener"},onClick:u.composeEventHandlers(e,d)});return n.jsx(l,{...r})},fn=i.ikp("button",{_id:"aiChatMessageAction"}),Pt=t=>{const{action:e,onClick:a,className:r,...s}=t,{conversation:d}=D.useInkeepConversation(),{message:o}=P.useMessage(),{isStreaming:c,messages:m}=b.useChat(),[l,p]=ie.useCopyToClipboard(),{feedback:v,submitPositiveFeedback:E,setCurrentFeedback:y,currentFeedback:W}=re.useMessageFeedback(),{logEvent:X}=V.useChatEvents(),[O,Z]=wa.useSettleAction(),{baseSettings:{privacyPreferences:he}}=C.useInkeepConfig(),{optOutAllAnalytics:ee}=he,ue=m.at(-1)?.id===o?.id,te=o.role==="assistant";if(ue&&c||!te||{copy:!1,upvote:ee,downvote:ee}[e])return null;const H={copy(){p(h.getMessageContent(o)),X({eventName:"assistant_message_copied",properties:{conversation:d}})},upvote(){E(o.id).then(()=>{Z()})},downvote(){y(o.id)}},L={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},M={copy:n.jsx(k.CustomIcon,{iconKey:l?"messageCopied":"messageCopy"}),upvote:n.jsx(k.CustomIcon,{iconKey:O?"messageCopied":"thumbsUp"}),downvote:n.jsx(k.CustomIcon,{iconKey:"thumbsDown"})},S={copy:{"data-copied":h.dataAttr(l)},upvote:{"data-upvoted":h.dataAttr(v[o.id]?.type==="positive")},downvote:{"data-downvoted":h.dataAttr(v[o.id]?.type==="negative"),"data-state":W===null?"closed":"open"}};return n.jsx(fn,{"data-action":e,...S[e],children:M[e],"aria-label":L[e],className:`${r} ${e}`,onClick:u.composeEventHandlers(a,H[e]),...s})},xn=i.ikp("div",{_id:"aiChatMessageSources"}),_t=t=>{const{message:e}=P.useMessage();return e.role!=="assistant"||!e.links?.length?null:n.jsx(xn,{...t})},Tn=i.ikp("div",{_id:"aiChatMessageSources__Header"}),At=t=>n.jsx(Tn,{children:"Sources",...t}),jn=i.ikp("div",{_id:"aiChatMessageSources__List"}),kt=t=>{const{message:e}=P.useMessage(),{children:a,...r}=t,{baseSettings:{transformSource:s,organizationDisplayName:d},aiChatSettings:{shouldOpenLinksInNewTab:o},searchSettings:{tabs:c}}=C.useInkeepConfig();if(e.role!=="assistant")return null;const m=e.links.map(l=>{const p=s(l,"chatSourceItem",{organizationDisplayName:d,tabs:c}),v=o||p.shouldOpenInNewTab;return{...p,isExternal:v}});return n.jsx(jn,{children:h.maybeRender(a,m),...r})},yn=i.ikp(ja.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),Ft=t=>{const{source:e,onClick:a,...r}=t,{logEvent:s}=V.useChatEvents(),{conversation:d}=D.useInkeepConversation(),o=()=>{s({eventName:"assistant_source_item_clicked",properties:{conversation:d,link:e}})};return n.jsx(f.SourceItemProvider,{source:e,children:n.jsx(yn,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:u.composeEventHandlers(a,o),...r})})},Hn=i.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),Et=t=>{const{source:e}=f.useSourceItem();return e.breadcrumbs?.length?n.jsx(Hn,{"data-type":e.type,...t}):null},wn=i.ikp(k.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),Ln=i.ikp(B.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),It=t=>{const{source:e}=f.useSourceItem();return n.jsx(Ln,{iconSettings:e.icon,"data-type":e.type,...t})},Dn=i.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),Mt=t=>{const{source:e}=f.useSourceItem();return n.jsx(Dn,{"data-type":e.type,children:e.title,...t})},qn=i.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),St=t=>{const{source:e}=f.useSourceItem();return n.jsx(qn,{"data-type":e.type,...t})},Rn=i.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),Bt=t=>{const{source:e}=f.useSourceItem(),{children:a,...r}=t,s=g.useMemo(()=>e.description?qa.highlightEmphasis(e.description):[],[e.description]);return s.length?n.jsx(Rn,{"data-type":e.type,children:h.maybeRender(a,s),...r}):null},Wn=i.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),ft=t=>{const{part:e,...a}=t,{source:r}=f.useSourceItem();return typeof e=="string"?e:n.jsx(Wn,{"data-type":r.type,children:e.content,"data-highlighted":h.dataAttr(e.highlighted),...a})},On=i.ikp(k.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),xt=t=>{const{source:e}=f.useSourceItem();return n.jsx(On,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},Tt=i.ikp("div",{_id:"aiChatFooter"}),jt=i.ikp("div",{_id:"aiChatInput__Fieldset"}),yt=i.ikp("div",{_id:"aiChatInput__Group"}),Qn=i.ikp("textarea",{_id:"aiChatInput"}),Ht=g.forwardRef(({onChange:t,onKeyDown:e,...a},r)=>{const{handleInputChange:s,handleInputKeyDown:d,input:o,error:c,shouldAutoFocusInput:m,inputRef:l}=b.useChat(),{aiChatSettings:p}=C.useInkeepConfig(),v=oe.useComposedRefs(r,l),E=ge.useModal();return g.useEffect(()=>{requestAnimationFrame(()=>{m&&l?.current&&(l.current.focus(),l.current.selectionStart=l.current.value.length)})},[m,l,E?.isOpen]),n.jsx(Qn,{asChild:!0,ref:v,maxLength:99999,placeholder:p.placeholder,value:o,onChange:u.composeEventHandlers(t,s),onKeyDown:u.composeEventHandlers(e,d),disabled:!!c||p.isViewOnly,...a,children:n.jsx(ne,{})})}),Nn=i.ikp("button",{_id:"aiChatInput__SendButton"}),wt=t=>{const{handleSubmit:e,isSubmitDisabled:a,error:r}=b.useChat(),{aiChatSettings:s}=C.useInkeepConfig(),{onClick:d,...o}=t;return n.jsx(Nn,{onClick:u.composeEventHandlers(d,()=>e()),"aria-label":"Send message",disabled:a||!!r||s.isViewOnly,...o})},Lt=i.ikp(k.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),$n=i.ikp("div",{_id:"aiChatAttachmentsBar"}),Dt=t=>{const{selectedWorkflow:e}=b.useChat();return!e||!e.supportedInputs?.length?null:n.jsx(F.AttachmentsBarProvider,{children:n.jsx($n,{...t})})},Vn=i.ikp("div",{_id:"aiChatAttachmentsBar__List"}),qt=t=>{const{children:e,...a}=t,{messageAttachments:r}=b.useChat();return n.jsx(Vn,{children:h.maybeRender(e,r),...a})},Un=i.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),Rt=t=>{const{attachment:e,...a}=t;return n.jsx(w.AttachmentItemProvider,{attachment:e,children:n.jsx(Un,{...a})})},Kn=i.ikp(B.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),Wt=t=>{const{attachment:e}=w.useAttachmentItem(),a=e.contentType?.attachmentIcon;return a?n.jsx(Kn,{iconSettings:a,...t}):null},zn=i.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),Ot=t=>{const{attachment:e}=w.useAttachmentItem();return n.jsx(zn,{children:e.title,...t})},Gn=i.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),Qt=t=>{const{onClick:e,...a}=t,{attachment:r}=w.useAttachmentItem(),{setMessageAttachments:s}=b.useChat(),d=()=>{s(o=>o.filter(c=>c.id!==r.id))};return n.jsx(Gn,{"aria-label":"Remove attachment",children:n.jsx(k.CustomIcon,{iconKey:"close"}),onClick:u.composeEventHandlers(e,d),...a})},Nt=i.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),$t=i.ikp(j.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),Vt=i.ikp(j.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:n.jsx(k.CustomIcon,{iconKey:"info"})}),me=i.ikp(j.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),Ut=i.ikp(j.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:n.jsxs(n.Fragment,{children:[n.jsx(me,{}),"Attachments will be kept in context for the entire conversation."]})}),Yn=i.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),Kt=t=>{const{children:e,...a}=t,{selectedWorkflow:r}=b.useChat();return r?.supportedInputs?n.jsx(Yn,{children:h.maybeRender(e,r.supportedInputs),...a}):null},Jn=i.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),zt=t=>{const{input:e,onClick:a,...r}=t,{selectedWorkflow:s,messageAttachments:d,setMessageAttachments:o}=b.useChat(),{selectInput:c,onOpen:m}=F.useAttachmentsBar(),l=()=>{if(e.type==="FUNCTIONAL_MULTI_ATTACHMENT")return s?e.onInvoke(s,e,o,[...d]):void 0;c(e),m()};return n.jsx(Jn,{children:e.displayName,onClick:u.composeEventHandlers(a,l),...r})},Gt=i.ikp(fa.IoAdd,{_id:"aiChatAttachmentsBar__InputIcon"}),Xn=i.ikp(A.Root,{_id:"aiChatAttachmentsBar__Modal"}),Yt=t=>{const{onOpenChange:e,...a}=t,{selectInput:r,isOpen:s,onClose:d,selectedInput:o}=F.useAttachmentsBar(),c=m=>{m||(d(),r(null))};return n.jsx(Xn,{open:s&&o!==null,onOpenChange:u.composeEventHandlers(e,c),...a})},Jt=i.ikp(A.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),Xt=i.ikp(A.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),Zt=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),Zn=i.ikp(A.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),ei=t=>{const{selectedInput:e}=F.useAttachmentsBar(),a=`Add ${e?.displayName}`;return n.jsx(Zn,{children:a,...t})},er=i.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),ti=t=>{const{selectedInput:e}=F.useAttachmentsBar(),a=e?.workflowModalProps?.modalHelpText;return a?n.jsx(er,{children:a,...t}):null},tr=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),ii=t=>{const{children:e,...a}=t,{selectedInput:r}=F.useAttachmentsBar(),s=r?.workflowModalProps?.modalHelpElement;return s?n.jsx(tr,{asChild:!e,children:e||s,...a}):null},ai=i.ikp(A.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:n.jsx(k.CustomIcon,{iconKey:"close"})}),ni=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),ir=i.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),ri=t=>{const{onSubmit:e,...a}=t,{form:r}=F.useAttachmentsBar();return n.jsx(ir,{onSubmit:u.composeEventHandlers(e,r.onSubmit),...a})},si=i.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),ar=i.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),oi=t=>{const{form:e,selectedInput:a}=F.useAttachmentsBar();return n.jsx(ar,{htmlFor:`${a?.id}-title`,children:e.labels.title,...t})},nr=i.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),di=t=>{const{onChange:e,...a}=t,{form:r,selectedInput:s}=F.useAttachmentsBar();return n.jsx(nr,{name:"title",value:r.data.title,id:`${s?.id}-title`,"data-invalid":h.dataAttr(!!r.errors.title),"aria-invalid":!!r.errors.title,onChange:u.composeEventHandlers(e,r.onChange),...a})},rr=i.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),ci=t=>{const{form:e}=F.useAttachmentsBar();return e.errors.title?n.jsx(rr,{"aria-live":"polite",children:e.errors.title,...t}):null},mi=i.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),sr=i.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),li=t=>{const{form:e,selectedInput:a}=F.useAttachmentsBar();return n.jsx(sr,{htmlFor:`${a?.id}-content`,children:e.labels.content,...t})},or=i.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),hi=t=>{const{onChange:e,...a}=t,{form:r,selectedInput:s}=F.useAttachmentsBar();return n.jsx(or,{asChild:!0,rows:4,name:"content",value:r.data.content,id:`${s?.id}-content`,"data-invalid":h.dataAttr(!!r.errors.content),"aria-invalid":!!r.errors.content,onChange:u.composeEventHandlers(e,r.onChange),...a,children:n.jsx(ne,{maxRows:10})})},dr=i.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),ui=t=>{const{form:e}=F.useAttachmentsBar();return e.errors.content?n.jsx(dr,{"aria-live":"polite",children:e.errors.content,...t}):null},Ci=i.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),pi=i.ikp("div",{_id:"aiChatActionBar"}),vi=i.ikp("div",{_id:"aiChat__ChatActions"}),bi=i.ikp("div",{_id:"aiChatTagline__Container"}),gi=i.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),Pi=i.ikp(Ha.default,{_id:"aiChatTagline__Logo"}),_i=i.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),cr=i.ikp("div",{_id:"aiChat__ChatAction"}),Y=t=>{const{action:e,onClick:a,className:r,...s}=t,{clear:d,stop:o,isLoading:c,messages:m,selectedWorkflow:l}=b.useChat(),{conversation:p}=D.useInkeepConversation(),{aiChatSettings:v,baseSettings:E}=C.useInkeepConfig(),{logEvent:y}=V.useChatEvents(),[W,X]=ie.useCopyToClipboard(),[O,Z]=ie.useCopyToClipboard();if({help:!1,copy:m.length===0||!v.isCopyChatButtonVisible||c,share:m.length===0||!v.isShareButtonVisible||!p.id||!!l||c,clear:m.length===0||v.isViewOnly||c,stop:!c}[e])return null;const te={help:()=>{},copy:()=>{const Q=m.map(H=>{const L=`**${H.role==="assistant"?"AI Assistant":"User"}**`,M=h.getMessageContent(H),S=ya.stringifyAttachments(H.metadata?.attributes?.attachments),N=S?`
|
|
8
8
|
|
|
9
9
|
**Attachments**
|
|
10
10
|
|
|
11
|
-
${
|
|
11
|
+
${S}`:"";return`${L}
|
|
12
12
|
|
|
13
|
-
${
|
|
13
|
+
${M}${N}`}).join(`
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
`);W(R)},share:async()=>{const R={visibility:"public",tags:[],userProperties:{},messages:C.messages.map(D=>({...D,id:Date.now().toString()+D.id,conversationId:void 0}))},{apiKey:y,analyticsApiBaseUrl:O}=k,H=await qa.logConversation("",R,y,O);if(H){const V=`${v.shareChatUrlBasePath}?${U.SHARE_QUERY_PARAM}=${H?.id}`;X(V),I({eventName:"chat_share_button_clicked",properties:{sharedConversationId:H?.id,originalConversationId:C.id,sharedChatUrl:V}})}},clear:o,stop:d},ue={copy:j,share:L};return n.jsx(T.Tooltip,{delayDuration:0,open:ue[e],children:n.jsx(rs,{"data-type":e,"data-copied":h.dataAttr(j||L),className:`${s} ${e}`,children:n.jsx(ce,{action:e}),onClick:u.composeEventHandlers(a,he[e]),...r})})},os=i.ikp(T.Trigger,{_id:"aiChat__ChatActionLabel"}),ce=t=>{const{action:e,...a}=t,{aiChatSettings:s}=p.useInkeepConfig(),r=s.toolbarButtonLabels??{},o={help:r.getHelp??"Get Help",copy:r.copyChat??"Copy",share:r.share??"Share",clear:r.clear??"Clear",stop:r.stop??"Stop"};return n.jsx(os,{children:o[e],...a})},ds=i.ikp(T.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),_i=t=>{const{action:e,children:a,...s}=t,r={copy:"Copied!",share:"Link copied!"};return n.jsxs(ds,{sideOffset:5,...s,children:[n.jsx(T.Arrow,{}),a||r[e]]})},cs=i.ikp(x.Root,{_id:"aiChatHelpActions"}),Ai=t=>{const{children:e,...a}=t,{aiChatSettings:s}=p.useInkeepConfig(),{getHelpOptions:r}=s;if(!r||(r??[]).length===0)return null;const{_pinned:o,_unpinned:d}=r.reduce((C,v)=>{const k=v.isPinnedToToolbar?"_pinned":"_unpinned";return{...C,[k]:[...C[k],v]}},{_pinned:[],_unpinned:[]}),c=d.length===1?[...o,d[0]]:o,m=d.length===1?[]:d,l=te.useHelpMenuState();return n.jsx(te.HelpMenuProvider,{value:l,children:n.jsx(cs,{open:l.open,onOpenChange:l.setOpen,children:h.maybeRender(e,{pinned:c,unpinned:m}),...a})})},ms=i.ikp(Y,{_id:"aiChatHelpAction"}),ki=t=>{const{action:e,onClick:a,...s}=t,{handleAction:r,logHelpAction:o}=ne.useChatAction(e),d=e.action.type,c=d==="open_link"?n.jsx("a",{href:e.action.url,target:"_blank",rel:"noreferrer",children:e.name}):e.name;return n.jsx(ms,{action:"help","aria-label":e.name,"data-name":e.name,children:c,asChild:d==="open_link",onClick:u.composeEventHandlers(a,()=>{r(),o()}),...s})},ls=i.ikp(x.Trigger,{_id:"aiChatHelpActions__Trigger"}),Fi=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig();return n.jsx(Y,{action:"help",...t,asChild:!0,children:n.jsx(ls,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),hs=i.ikp(x.Content,{_id:"aiChatHelpActions__Menu"}),Ei=t=>n.jsx(hs,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),Ii=i.ikp(x.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),Mi=t=>{const{action:e,onClick:a,...s}=t,{handleAction:r,logHelpAction:o}=ne.useChatAction(e),{setOpen:d}=te.useHelpMenu(),c=()=>{r({onOpenForm:()=>d(!1)}),o()},m=e.action.type,l=i.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:u.composeEventHandlers(a,c)});return n.jsx(l,{...s})},us=i.ikp(S.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),Si=t=>{const{action:e,...a}=t;return e.icon?n.jsx(us,{iconSettings:e.icon,...a}):null},Cs=i.ikp(_.Root,{_id:"aiChatFeedbackModal"}),fi=t=>{const{onOpenChange:e,...a}=t,{currentFeedback:s,setCurrentFeedback:r}=ae.useMessageFeedback();return n.jsx(Cs,{open:s!==null,onOpenChange:u.composeEventHandlers(e,()=>r(null)),...a})},Bi=i.ikp(_.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),xi=i.ikp(_.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),Ti=i.ikp(_.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),ji=i.ikp(_.Close,{_id:"aiChatFeedbackModal__Close",children:n.jsx(F.CustomIcon,{iconKey:"close"})}),yi=i.ikp("div",{_id:"aiChatFeedbackModal__Body"}),ps=i.ikp("form",{_id:"aiChatFeedbackForm"}),Hi=t=>{const{onSubmit:e,...a}=t,{submitNegativeFeedback:s,currentFeedback:r,setCurrentFeedback:o}=ae.useMessageFeedback(),d=c=>{c.preventDefault();const m=c.target,l=new FormData(m),C=Object.fromEntries(l.entries());r&&(s(r,C),o(null))};return n.jsx(ps,{onSubmit:u.composeEventHandlers(e,d),...a})},vs=i.ikp("div",{_id:"aiChatFeedbackItem"}),wi=t=>{const{name:e,...a}=t;return n.jsx(z.FeedbackItemProvider,{name:e,children:n.jsx(vs,{...a})})},bs=i.ikp(G.Root,{_id:"aiChatFeedbackItem__Checkbox"}),Li=t=>{const{name:e,focusItem:a}=z.useFeedbackItem(),{onCheckedChange:s,...r}=t,o=d=>{d&&a?.current?.focus()};return n.jsx(bs,{id:`feedback-${e}`,name:e,onCheckedChange:u.composeEventHandlers(s,o),...r})},Di=i.ikp(G.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:n.jsx(ve.CheckboxIcon,{})}),gs=i.ikp("label",{_id:"aiChatFeedbackItem__Label"}),qi=t=>{const{name:e}=z.useFeedbackItem(),a={unrelated_response:"Didn't answer my question",inaccurate_statement:"Inaccurate statement",inaccurate_code_snippet:"Inaccurate code snippet",irrelevant_citations:"Irrelevant citations"};return n.jsx(gs,{htmlFor:`feedback-${e}`,children:a[e],...t})},Ps=i.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),Wi=t=>{const{name:e,focusItem:a}=z.useFeedbackItem();return n.jsx(Ps,{ref:a,name:`${e}:description`,...t})},Ri=i.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),_s=i.ikp("div",{_id:"aiChatForm__Wrapper"}),Oi=t=>{const{form:e}=A.useChatForm();return e?n.jsx(_s,{...t}):null},As=i.ikp("form",{_id:"aiChatForm"}),Qi=t=>{const{onSubmit:e,...a}=t,{handleSubmit:s,isSuccess:r}=A.useChatForm();return r?null:n.jsx(As,{onSubmit:u.composeEventHandlers(e,s),...a})},ks=i.ikp("button",{_id:"aiChatForm__Close",children:n.jsx(F.CustomIcon,{iconKey:"close"})}),Ni=t=>{const{onClick:e,...a}=t,{closeForm:s}=A.useChatForm();return n.jsx(ks,{onClick:u.composeEventHandlers(e,s),...a})},$i=i.ikp("div",{_id:"aiChatForm__Header"}),Fs=i.ikp("h2",{_id:"aiChatForm__Heading"}),Vi=t=>{const{form:e}=A.useChatForm();return e?.heading?n.jsx(Fs,{children:e.heading,...t}):null},Es=i.ikp("span",{_id:"aiChatForm__Description"}),Ui=t=>{const{form:e}=A.useChatForm();return e?.description?n.jsx(Es,{children:e.description,...t}):null},Is=i.ikp("div",{_id:"aiChatForm__Content"}),Ki=t=>{const{children:e,...a}=t,{fields:s=[]}=A.useChatForm();return n.jsx(Is,{children:h.maybeRender(e,s),...a})},Ms=i.ikp("div",{_id:"aiChatForm__Field"}),zi=t=>{const{field:e,autoFocus:a,...s}=t,{control:r,errors:o}=A.useChatForm();return n.jsx(Ha.Controller,{name:e.name,control:r,rules:{required:e.isRequired?`${e.label} is required.`:void 0},render:({field:d})=>{const c=d.value!==void 0||e.inputType==="file";return n.jsx(B.FormFieldProvider,{"data-invalid":h.dataAttr(!!o[e.name]),field:e,fieldProps:d,autoFocus:a,children:c&&n.jsx(Ms,{"data-input-type":e.inputType,"data-hidden":h.dataAttr(e.isHidden),...s})})}})},Ss=i.ikp("label",{_id:"aiChatForm__FieldLabel"}),Gi=t=>{const{field:e}=B.useFormField();return n.jsx(Ss,{"data-required":h.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},fs=i.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),J=t=>{const{field:e,error:a,fieldProps:{onChange:s,onBlur:r,...o},autoFocus:d}=B.useFormField(),{onChange:c,onBlur:m,...l}=t;return n.jsx(fs,{id:e.name,autoFocus:d,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":h.dataAttr(!!a),onChange:u.composeEventHandlers(c,s),onBlur:u.composeEventHandlers(m,r),...o,...l})},Yi=i.ikp(J,{_id:"aiChatForm__FieldEmail",type:"email"}),Bs=i.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),Ji=t=>{const{field:e,error:a,fieldProps:{value:s,onChange:r,onBlur:o,...d},autoFocus:c}=B.useFormField(),{onChange:m,onBlur:l,...C}=t,v=k=>{const I=k.target.files;r(I)};return n.jsx(Bs,{id:e.name,autoFocus:c,"data-value":s,"data-invalid":h.dataAttr(!!a),...C,...d,onChange:u.composeEventHandlers(m,v),onBlur:u.composeEventHandlers(l,o)})},Xi=i.ikp(J,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:n.jsx(ie,{maxRows:8})}),xs=i.ikp(G.Root,{_id:"aiChatForm__FieldCheckbox"}),Zi=t=>{const{field:e,error:a,fieldProps:s,autoFocus:r}=B.useFormField(),{onCheckedChange:o,...d}=t;return n.jsx(xs,{id:e.name,name:e.name,autoFocus:r,"data-invalid":h.dataAttr(!!a),checked:s.value,onCheckedChange:u.composeEventHandlers(o,s.onChange),...d})},ea=i.ikp(G.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:n.jsx(ve.CheckboxIcon,{})}),Ts=i.ikp(M.Root,{_id:"aiChatForm__FieldSelect"}),ta=t=>{const{field:e,error:a,fieldProps:s}=B.useFormField(),{onValueChange:r,...o}=t;return n.jsx(Ts,{name:e.name,"data-invalid":h.dataAttr(!!a),value:s.value,onValueChange:u.composeEventHandlers(r,s.onChange),...o})},ia=i.ikp(M.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),js=i.ikp(M.Value,{_id:"aiChatForm__FieldSelect__Value"}),aa=t=>{const{field:e}=B.useFormField();return n.jsx(js,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},na=i.ikp(M.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:n.jsx(S.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),sa=i.ikp(M.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),ra=i.ikp(M.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),oa=i.ikp(M.Item,{_id:"aiChatForm__FieldSelect__Item"}),da=i.ikp(M.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),ca=i.ikp(M.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:n.jsx(S.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),ys=i.ikp("span",{_id:"aiChatForm__FieldError"}),ma=t=>{const{error:e}=B.useFormField();return e?n.jsx(ys,{children:e.message?.toString(),...t}):null},Hs=i.ikp("span",{_id:"aiChatForm__Error"}),la=t=>{const{formError:e}=A.useChatForm();return e?n.jsx(Hs,{children:e.message,...t}):null},ha=i.ikp("div",{_id:"aiChatForm__Footer"}),ws=i.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel"}),ua=t=>{const{onClick:e,...a}=t,{closeForm:s}=A.useChatForm();return n.jsx(ws,{onClick:u.composeEventHandlers(e,s),...a})},Ls=i.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),Ca=t=>{const{onClick:e,...a}=t,{isSubmitting:s}=A.useChatForm();return n.jsx(Ls,{disabled:s,...a})},Ds=i.ikp("div",{_id:"aiChatForm__Success"}),pa=t=>{const{isSuccess:e}=A.useChatForm();return e?n.jsx(Ds,{...t}):null},qs=i.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),va=t=>{const{form:e}=A.useChatForm();return n.jsx(qs,{children:e?.successView.heading,...t})},Ws=i.ikp(K.Markdown,{_id:"aiChatForm__SuccessMessage"}),ba=t=>{const{form:e}=A.useChatForm();return n.jsx(Ws,{children:e?.successView.message,...t})},Rs=i.ikp("button",{_id:"aiChatForm__SuccessButton"}),ga=t=>{const{onClick:e,...a}=t,{form:s,closeForm:r}=A.useChatForm(),o=s?.successView?.button;if(!o)return null;const d=o.icon&&n.jsx(S.BuiltInIconRenderer,{iconSettings:o.icon}),c=o.label;return n.jsx(Rs,{onClick:u.composeEventHandlers(e,r),children:n.jsxs(n.Fragment,{children:[d,c]}),...a})};exports.Provider=b.ChatProvider;exports.ActionBar=Ci;exports.Actions=pi;exports.AttachmentsBar=Lt;exports.AttachmentsBarActions=Qt;exports.AttachmentsBarAttachment=qt;exports.AttachmentsBarAttachmentDelete=Ot;exports.AttachmentsBarAttachmentIcon=Wt;exports.AttachmentsBarAttachmentTitle=Rt;exports.AttachmentsBarForm=ni;exports.AttachmentsBarFormContent=ci;exports.AttachmentsBarFormContentError=hi;exports.AttachmentsBarFormContentInput=li;exports.AttachmentsBarFormContentLabel=mi;exports.AttachmentsBarFormSubmitButton=ui;exports.AttachmentsBarFormTitle=si;exports.AttachmentsBarFormTitleError=di;exports.AttachmentsBarFormTitleInput=oi;exports.AttachmentsBarFormTitleLabel=ri;exports.AttachmentsBarInfoTip=Nt;exports.AttachmentsBarInfoTipArrow=de;exports.AttachmentsBarInfoTipIcon=$t;exports.AttachmentsBarInfoTipText=Vt;exports.AttachmentsBarInput=Kt;exports.AttachmentsBarInputIcon=zt;exports.AttachmentsBarInputs=Ut;exports.AttachmentsBarList=Dt;exports.AttachmentsBarModal=Gt;exports.AttachmentsBarModalBody=ai;exports.AttachmentsBarModalClose=ii;exports.AttachmentsBarModalContent=Jt;exports.AttachmentsBarModalDescription=ei;exports.AttachmentsBarModalHeader=Xt;exports.AttachmentsBarModalHeading=Zt;exports.AttachmentsBarModalHelp=ti;exports.AttachmentsBarModalOverlay=Yt;exports.ChatAction=Y;exports.ChatActionFeedback=_i;exports.ChatActionLabel=ce;exports.ChatHelpAction=ki;exports.Content=Ee;exports.ContentScrollArea=Ie;exports.ContentScrollAreaCorner=Be;exports.ContentScrollAreaScrollbar=Se;exports.ContentScrollAreaThumb=fe;exports.ContentScrollAreaViewport=Me;exports.ConversationLoading=Pe;exports.Disclaimer=Te;exports.DisclaimerArrow=Le;exports.DisclaimerContent=He;exports.DisclaimerLabel=je;exports.DisclaimerText=we;exports.DisclaimerTrigger=ye;exports.EmbeddedChatPrimitiveActionBar=Ci;exports.EmbeddedChatPrimitiveActions=pi;exports.EmbeddedChatPrimitiveAttachmentsBar=Lt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=Qt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=qt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarForm=ni;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=ci;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=hi;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=li;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=mi;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=ui;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=si;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=di;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=oi;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=ri;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=Nt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=de;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=$t;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarInput=Kt;exports.EmbeddedChatPrimitiveAttachmentsBarInputIcon=zt;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarList=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=Gt;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=ai;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=ii;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=Jt;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=ei;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=ti;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Yt;exports.EmbeddedChatPrimitiveChatAction=Y;exports.EmbeddedChatPrimitiveChatActionFeedback=_i;exports.EmbeddedChatPrimitiveChatActionLabel=ce;exports.EmbeddedChatPrimitiveChatHelpAction=ki;exports.EmbeddedChatPrimitiveContent=Ee;exports.EmbeddedChatPrimitiveContentScrollArea=Ie;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=Be;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=Se;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=fe;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=Me;exports.EmbeddedChatPrimitiveConversationLoading=Pe;exports.EmbeddedChatPrimitiveDisclaimer=Te;exports.EmbeddedChatPrimitiveDisclaimerArrow=Le;exports.EmbeddedChatPrimitiveDisclaimerContent=He;exports.EmbeddedChatPrimitiveDisclaimerLabel=je;exports.EmbeddedChatPrimitiveDisclaimerText=we;exports.EmbeddedChatPrimitiveDisclaimerTrigger=ye;exports.EmbeddedChatPrimitiveFeedbackForm=Hi;exports.EmbeddedChatPrimitiveFeedbackItem=wi;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=Li;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=Di;exports.EmbeddedChatPrimitiveFeedbackItemDescription=Wi;exports.EmbeddedChatPrimitiveFeedbackItemLabel=qi;exports.EmbeddedChatPrimitiveFeedbackModal=fi;exports.EmbeddedChatPrimitiveFeedbackModalBody=yi;exports.EmbeddedChatPrimitiveFeedbackModalClose=ji;exports.EmbeddedChatPrimitiveFeedbackModalContent=xi;exports.EmbeddedChatPrimitiveFeedbackModalHeader=Ti;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=Bi;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=Ri;exports.EmbeddedChatPrimitiveFooter=xt;exports.EmbeddedChatPrimitiveForm=Qi;exports.EmbeddedChatPrimitiveFormCancel=ua;exports.EmbeddedChatPrimitiveFormClose=Ni;exports.EmbeddedChatPrimitiveFormContent=Ki;exports.EmbeddedChatPrimitiveFormDescription=Ui;exports.EmbeddedChatPrimitiveFormError=la;exports.EmbeddedChatPrimitiveFormField=zi;exports.EmbeddedChatPrimitiveFormFieldCheckbox=Zi;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=ea;exports.EmbeddedChatPrimitiveFormFieldEmail=Yi;exports.EmbeddedChatPrimitiveFormFieldError=ma;exports.EmbeddedChatPrimitiveFormFieldFile=Ji;exports.EmbeddedChatPrimitiveFormFieldLabel=Gi;exports.EmbeddedChatPrimitiveFormFieldSelect=ta;exports.EmbeddedChatPrimitiveFormFieldSelectContent=sa;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=na;exports.EmbeddedChatPrimitiveFormFieldSelectItem=oa;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=ca;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=da;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=ia;exports.EmbeddedChatPrimitiveFormFieldSelectValue=aa;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=ra;exports.EmbeddedChatPrimitiveFormFieldText=J;exports.EmbeddedChatPrimitiveFormFieldTextArea=Xi;exports.EmbeddedChatPrimitiveFormFooter=ha;exports.EmbeddedChatPrimitiveFormHeader=$i;exports.EmbeddedChatPrimitiveFormHeading=Vi;exports.EmbeddedChatPrimitiveFormSubmit=Ca;exports.EmbeddedChatPrimitiveFormSuccess=pa;exports.EmbeddedChatPrimitiveFormSuccessButton=ga;exports.EmbeddedChatPrimitiveFormSuccessHeading=va;exports.EmbeddedChatPrimitiveFormSuccessMessage=ba;exports.EmbeddedChatPrimitiveFormWrapper=Oi;exports.EmbeddedChatPrimitiveHeaderToolbar=Ae;exports.EmbeddedChatPrimitiveHelpActions=Ai;exports.EmbeddedChatPrimitiveHelpActionsMenu=Ei;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=Ii;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=Mi;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=Si;exports.EmbeddedChatPrimitiveHelpActionsTrigger=Fi;exports.EmbeddedChatPrimitiveInput=yt;exports.EmbeddedChatPrimitiveInputFieldset=Tt;exports.EmbeddedChatPrimitiveInputGroup=jt;exports.EmbeddedChatPrimitiveIntroMessageWrapper=Ke;exports.EmbeddedChatPrimitiveMessage=Ct;exports.EmbeddedChatPrimitiveMessageAction=gt;exports.EmbeddedChatPrimitiveMessageActions=pt;exports.EmbeddedChatPrimitiveMessageAttachments=at;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=st;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=ot;exports.EmbeddedChatPrimitiveMessageAttachmentsList=nt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=dt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=ut;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=ht;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=mt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=lt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=ct;exports.EmbeddedChatPrimitiveMessageAvatar=Ye;exports.EmbeddedChatPrimitiveMessageAvatarContent=Je;exports.EmbeddedChatPrimitiveMessageAvatarFallback=Xe;exports.EmbeddedChatPrimitiveMessageAvatarImage=Ze;exports.EmbeddedChatPrimitiveMessageContent=it;exports.EmbeddedChatPrimitiveMessageContentWrapper=tt;exports.EmbeddedChatPrimitiveMessageHeader=ze;exports.EmbeddedChatPrimitiveMessageLoading=Ge;exports.EmbeddedChatPrimitiveMessageName=et;exports.EmbeddedChatPrimitiveMessageSourceItem=kt;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=Ft;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=St;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=ft;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=Et;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=Bt;exports.EmbeddedChatPrimitiveMessageSourceItemTag=Mt;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=It;exports.EmbeddedChatPrimitiveMessageSources=Pt;exports.EmbeddedChatPrimitiveMessageSourcesHeader=_t;exports.EmbeddedChatPrimitiveMessageSourcesList=At;exports.EmbeddedChatPrimitiveMessageToolAction=bt;exports.EmbeddedChatPrimitiveMessageToolActions=vt;exports.EmbeddedChatPrimitiveMessageWrapper=oe;exports.EmbeddedChatPrimitiveMessages=xe;exports.EmbeddedChatPrimitiveQuickQuestion=Re;exports.EmbeddedChatPrimitiveQuickQuestionButton=Oe;exports.EmbeddedChatPrimitiveQuickQuestions=De;exports.EmbeddedChatPrimitiveQuickQuestionsLabel=qe;exports.EmbeddedChatPrimitiveQuickQuestionsList=We;exports.EmbeddedChatPrimitiveRoot=_e;exports.EmbeddedChatPrimitiveSendButton=Ht;exports.EmbeddedChatPrimitiveSendButtonIcon=wt;exports.EmbeddedChatPrimitiveTaglineBrandName=Pi;exports.EmbeddedChatPrimitiveTaglineContainer=vi;exports.EmbeddedChatPrimitiveTaglineLogo=gi;exports.EmbeddedChatPrimitiveTaglineText=bi;exports.EmbeddedChatPrimitiveToolbarHeader=Fe;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=ke;exports.EmbeddedChatPrimitiveWorkflow=Ve;exports.EmbeddedChatPrimitiveWorkflowIcon=Ue;exports.EmbeddedChatPrimitiveWorkflows=Qe;exports.EmbeddedChatPrimitiveWorkflowsLabel=Ne;exports.EmbeddedChatPrimitiveWorkflowsList=$e;exports.EmbeddedChatPrimitiveWrapper=ge;exports.FeedbackForm=Hi;exports.FeedbackItem=wi;exports.FeedbackItemCheckbox=Li;exports.FeedbackItemCheckboxIndicator=Di;exports.FeedbackItemDescription=Wi;exports.FeedbackItemLabel=qi;exports.FeedbackModal=fi;exports.FeedbackModalBody=yi;exports.FeedbackModalClose=ji;exports.FeedbackModalContent=xi;exports.FeedbackModalHeader=Ti;exports.FeedbackModalOverlay=Bi;exports.FeedbackSubmitButton=Ri;exports.Footer=xt;exports.Form=Qi;exports.FormCancel=ua;exports.FormClose=Ni;exports.FormContent=Ki;exports.FormDescription=Ui;exports.FormError=la;exports.FormField=zi;exports.FormFieldCheckbox=Zi;exports.FormFieldCheckboxIndicator=ea;exports.FormFieldEmail=Yi;exports.FormFieldError=ma;exports.FormFieldFile=Ji;exports.FormFieldLabel=Gi;exports.FormFieldSelect=ta;exports.FormFieldSelectContent=sa;exports.FormFieldSelectIcon=na;exports.FormFieldSelectItem=oa;exports.FormFieldSelectItemIndicator=ca;exports.FormFieldSelectItemText=da;exports.FormFieldSelectTrigger=ia;exports.FormFieldSelectValue=aa;exports.FormFieldSelectViewport=ra;exports.FormFieldText=J;exports.FormFieldTextArea=Xi;exports.FormFooter=ha;exports.FormHeader=$i;exports.FormHeading=Vi;exports.FormSubmit=Ca;exports.FormSuccess=pa;exports.FormSuccessButton=ga;exports.FormSuccessHeading=va;exports.FormSuccessMessage=ba;exports.FormWrapper=Oi;exports.Header=Na;exports.HeaderToolbar=Ae;exports.HeaderToolbarWrapper=ke;exports.HelpActions=Ai;exports.HelpActionsMenu=Ei;exports.HelpActionsMenuArrow=Ii;exports.HelpActionsMenuItem=Mi;exports.HelpActionsMenuItemIcon=Si;exports.HelpActionsTrigger=Fi;exports.Input=yt;exports.InputFieldset=Tt;exports.InputGroup=jt;exports.IntroMessageWrapper=Ke;exports.Message=Ct;exports.MessageAction=gt;exports.MessageActions=pt;exports.MessageAttachments=at;exports.MessageAttachmentsItem=st;exports.MessageAttachmentsItemIcon=rt;exports.MessageAttachmentsItemTitle=ot;exports.MessageAttachmentsList=nt;exports.MessageAttachmentsPreview=dt;exports.MessageAttachmentsPreviewBody=ut;exports.MessageAttachmentsPreviewClose=ht;exports.MessageAttachmentsPreviewContent=mt;exports.MessageAttachmentsPreviewHeader=lt;exports.MessageAttachmentsPreviewOverlay=ct;exports.MessageAvatar=Ye;exports.MessageAvatarContent=Je;exports.MessageAvatarFallback=Xe;exports.MessageAvatarImage=Ze;exports.MessageContent=it;exports.MessageContentWrapper=tt;exports.MessageHeader=ze;exports.MessageLoading=Ge;exports.MessageName=et;exports.MessageSourceItem=kt;exports.MessageSourceItemBreadcrumbIcon=jn;exports.MessageSourceItemBreadcrumbs=Ft;exports.MessageSourceItemDescription=St;exports.MessageSourceItemDescriptionPart=ft;exports.MessageSourceItemIcon=Et;exports.MessageSourceItemIndicator=Bt;exports.MessageSourceItemTag=Mt;exports.MessageSourceItemTitle=It;exports.MessageSources=Pt;exports.MessageSourcesHeader=_t;exports.MessageSourcesList=At;exports.MessageToolAction=bt;exports.MessageToolActions=vt;exports.MessageWrapper=oe;exports.Messages=xe;exports.QuickQuestion=Re;exports.QuickQuestionButton=Oe;exports.QuickQuestions=De;exports.QuickQuestionsLabel=qe;exports.QuickQuestionsList=We;exports.Root=_e;exports.SendButton=Ht;exports.SendButtonIcon=wt;exports.TaglineBrandName=Pi;exports.TaglineContainer=vi;exports.TaglineLogo=gi;exports.TaglineText=bi;exports.ToolbarHeader=Fe;exports.Workflow=Ve;exports.WorkflowIcon=Ue;exports.Workflows=Qe;exports.WorkflowsLabel=Ne;exports.WorkflowsList=$e;exports.Wrapper=ge;
|
|
17
|
+
`);X(Q)},share:async()=>{const Q={visibility:"public",tags:[],userProperties:{},messages:p.messages.map(S=>({...S,id:Date.now().toString()+S.id,conversationId:void 0}))},{apiKey:H,analyticsApiBaseUrl:L}=E,M=await Oa.logConversation("",Q,H,L);if(M){const N=`${v.shareChatUrlBasePath}?${D.SHARE_QUERY_PARAM}=${M?.id}`;Z(N),y({eventName:"chat_share_button_clicked",properties:{sharedConversationId:M?.id,originalConversationId:p.id,sharedChatUrl:N,conversation:M}})}},clear:d,stop:o},Ce={copy:W,share:O};return n.jsx(j.Tooltip,{delayDuration:0,open:Ce[e],children:n.jsx(cr,{"data-type":e,"data-copied":h.dataAttr(W||O),className:`${r} ${e}`,children:n.jsx(le,{action:e}),onClick:u.composeEventHandlers(a,te[e]),...s})})},mr=i.ikp(j.Trigger,{_id:"aiChat__ChatActionLabel"}),le=t=>{const{action:e,...a}=t,{aiChatSettings:r}=C.useInkeepConfig(),s=r.toolbarButtonLabels??{},d={help:s.getHelp??"Get Help",copy:s.copyChat??"Copy",share:s.share??"Share",clear:s.clear??"Clear",stop:s.stop??"Stop"};return n.jsx(mr,{children:d[e],...a})},lr=i.ikp(j.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),Ai=t=>{const{action:e,children:a,...r}=t,s={copy:"Copied!",share:"Link copied!"};return n.jsxs(lr,{sideOffset:5,...r,children:[n.jsx(j.Arrow,{}),a||s[e]]})},hr=i.ikp(z.Root,{_id:"aiChatHelpActions"}),ki=t=>{const{children:e,...a}=t,{aiChatSettings:r}=C.useInkeepConfig(),{getHelpOptions:s}=r;if(!s||(s??[]).length===0)return null;const{_pinned:d,_unpinned:o}=s.reduce((p,v)=>{const E=v.isPinnedToToolbar?"_pinned":"_unpinned";return{...p,[E]:[...p[E],v]}},{_pinned:[],_unpinned:[]}),c=o.length===1?[...d,o[0]]:d,m=o.length===1?[]:o,l=ae.useHelpMenuState();return n.jsx(ae.HelpMenuProvider,{value:l,children:n.jsx(hr,{open:l.open,onOpenChange:l.setOpen,children:h.maybeRender(e,{pinned:c,unpinned:m}),...a})})},ur=i.ikp(Y,{_id:"aiChatHelpAction"}),Fi=t=>{const{action:e,onClick:a,...r}=t,{handleAction:s,logHelpAction:d}=se.useChatAction(e),o=e.action.type,c=o==="open_link"?n.jsx("a",{href:e.action.url,target:"_blank",rel:"noreferrer",children:e.name}):e.name;return n.jsx(ur,{action:"help","aria-label":e.name,"data-name":e.name,children:c,asChild:o==="open_link",onClick:u.composeEventHandlers(a,()=>{s(),d()}),...r})},Cr=i.ikp(z.Trigger,{_id:"aiChatHelpActions__Trigger"}),Ei=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig();return n.jsx(Y,{action:"help",...t,asChild:!0,children:n.jsx(Cr,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),pr=i.ikp(z.Content,{_id:"aiChatHelpActions__Menu"}),Ii=t=>n.jsx(pr,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),Mi=i.ikp(z.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),Si=t=>{const{action:e,onClick:a,...r}=t,{handleAction:s,logHelpAction:d}=se.useChatAction(e),{setOpen:o}=ae.useHelpMenu(),c=()=>{s({onOpenForm:()=>o(!1)}),d()},m=e.action.type,l=i.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:u.composeEventHandlers(a,c)});return n.jsx(l,{...r})},vr=i.ikp(B.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),Bi=t=>{const{action:e,...a}=t;return e.icon?n.jsx(vr,{iconSettings:e.icon,...a}):null},br=i.ikp(A.Root,{_id:"aiChatFeedbackModal"}),fi=t=>{const{onOpenChange:e,...a}=t,{currentFeedback:r,setCurrentFeedback:s}=re.useMessageFeedback();return n.jsx(br,{open:r!==null,onOpenChange:u.composeEventHandlers(e,()=>s(null)),...a})},xi=i.ikp(A.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),Ti=i.ikp(A.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),ji=i.ikp(A.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),yi=i.ikp(A.Close,{_id:"aiChatFeedbackModal__Close",children:n.jsx(k.CustomIcon,{iconKey:"close"})}),Hi=i.ikp("div",{_id:"aiChatFeedbackModal__Body"}),gr=i.ikp("form",{_id:"aiChatFeedbackForm"}),wi=t=>{const{onSubmit:e,...a}=t,{submitNegativeFeedback:r,currentFeedback:s,setCurrentFeedback:d}=re.useMessageFeedback(),o=c=>{c.preventDefault();const m=c.target,l=new FormData(m),p=Object.fromEntries(l.entries());s&&(r(s,p),d(null))};return n.jsx(gr,{onSubmit:u.composeEventHandlers(e,o),...a})},Pr=i.ikp("div",{_id:"aiChatFeedbackItem"}),Li=t=>{const{name:e,...a}=t;return n.jsx(U.FeedbackItemProvider,{name:e,children:n.jsx(Pr,{...a})})},_r=i.ikp(K.Root,{_id:"aiChatFeedbackItem__Checkbox"}),Di=t=>{const{name:e,focusItem:a}=U.useFeedbackItem(),{onCheckedChange:r,...s}=t,d=o=>{o&&a?.current?.focus()};return n.jsx(_r,{id:`feedback-${e}`,name:e,onCheckedChange:u.composeEventHandlers(r,d),...s})},qi=i.ikp(K.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:n.jsx(be.CheckboxIcon,{})}),Ar=i.ikp("label",{_id:"aiChatFeedbackItem__Label"}),Ri=t=>{const{name:e}=U.useFeedbackItem(),a={unrelated_response:"Didn't answer my question",inaccurate_statement:"Inaccurate statement",inaccurate_code_snippet:"Inaccurate code snippet",irrelevant_citations:"Irrelevant citations"};return n.jsx(Ar,{htmlFor:`feedback-${e}`,children:a[e],...t})},kr=i.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),Wi=t=>{const{name:e,focusItem:a}=U.useFeedbackItem();return n.jsx(kr,{ref:a,name:`${e}:description`,...t})},Oi=i.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),Fr=i.ikp("div",{_id:"aiChatForm__Wrapper"}),Qi=t=>{const{form:e}=_.useChatForm();return e?n.jsx(Fr,{...t}):null},Er=i.ikp("form",{_id:"aiChatForm"}),Ni=t=>{const{onSubmit:e,...a}=t,{handleSubmit:r,isSuccess:s}=_.useChatForm();return s?null:n.jsx(Er,{onSubmit:u.composeEventHandlers(e,r),...a})},Ir=i.ikp("button",{_id:"aiChatForm__Close",children:n.jsx(k.CustomIcon,{iconKey:"close"})}),$i=t=>{const{onClick:e,...a}=t,{closeForm:r}=_.useChatForm();return n.jsx(Ir,{onClick:u.composeEventHandlers(e,r),...a})},Vi=i.ikp("div",{_id:"aiChatForm__Header"}),Mr=i.ikp("h2",{_id:"aiChatForm__Heading"}),Ui=t=>{const{form:e}=_.useChatForm();return e?.heading?n.jsx(Mr,{children:e.heading,...t}):null},Sr=i.ikp("span",{_id:"aiChatForm__Description"}),Ki=t=>{const{form:e}=_.useChatForm();return e?.description?n.jsx(Sr,{children:e.description,...t}):null},Br=i.ikp("div",{_id:"aiChatForm__Content"}),zi=t=>{const{children:e,...a}=t,{fields:r=[]}=_.useChatForm();return n.jsx(Br,{children:h.maybeRender(e,r),...a})},fr=i.ikp("div",{_id:"aiChatForm__Field"}),Gi=t=>{const{field:e,autoFocus:a,...r}=t,{control:s,errors:d}=_.useChatForm();return n.jsx(Da.Controller,{name:e.name,control:s,rules:{required:e.isRequired?`${e.label} is required.`:void 0},render:({field:o})=>{const c=o.value!==void 0||e.inputType==="file";return n.jsx(x.FormFieldProvider,{"data-invalid":h.dataAttr(!!d[e.name]),field:e,fieldProps:o,autoFocus:a,children:c&&n.jsx(fr,{"data-input-type":e.inputType,"data-hidden":h.dataAttr(e.isHidden),...r})})}})},xr=i.ikp("label",{_id:"aiChatForm__FieldLabel"}),Yi=t=>{const{field:e}=x.useFormField();return n.jsx(xr,{"data-required":h.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},Tr=i.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),J=t=>{const{field:e,error:a,fieldProps:{onChange:r,onBlur:s,...d},autoFocus:o}=x.useFormField(),{onChange:c,onBlur:m,...l}=t;return n.jsx(Tr,{id:e.name,autoFocus:o,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":h.dataAttr(!!a),onChange:u.composeEventHandlers(c,r),onBlur:u.composeEventHandlers(m,s),...d,...l})},Ji=i.ikp(J,{_id:"aiChatForm__FieldEmail",type:"email"}),jr=i.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),Xi=t=>{const{field:e,error:a,fieldProps:{value:r,onChange:s,onBlur:d,...o},autoFocus:c}=x.useFormField(),{onChange:m,onBlur:l,...p}=t,v=E=>{const y=E.target.files;s(y)};return n.jsx(jr,{id:e.name,autoFocus:c,"data-value":r,"data-invalid":h.dataAttr(!!a),...p,...o,onChange:u.composeEventHandlers(m,v),onBlur:u.composeEventHandlers(l,d)})},Zi=i.ikp(J,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:n.jsx(ne,{maxRows:8})}),yr=i.ikp(K.Root,{_id:"aiChatForm__FieldCheckbox"}),ea=t=>{const{field:e,error:a,fieldProps:r,autoFocus:s}=x.useFormField(),{onCheckedChange:d,...o}=t;return n.jsx(yr,{id:e.name,name:e.name,autoFocus:s,"data-invalid":h.dataAttr(!!a),checked:r.value,onCheckedChange:u.composeEventHandlers(d,r.onChange),...o})},ta=i.ikp(K.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:n.jsx(be.CheckboxIcon,{})}),Hr=i.ikp(I.Root,{_id:"aiChatForm__FieldSelect"}),ia=t=>{const{field:e,error:a,fieldProps:r}=x.useFormField(),{onValueChange:s,...d}=t;return n.jsx(Hr,{name:e.name,"data-invalid":h.dataAttr(!!a),value:r.value,onValueChange:u.composeEventHandlers(s,r.onChange),...d})},aa=i.ikp(I.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),wr=i.ikp(I.Value,{_id:"aiChatForm__FieldSelect__Value"}),na=t=>{const{field:e}=x.useFormField();return n.jsx(wr,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},ra=i.ikp(I.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:n.jsx(B.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),sa=i.ikp(I.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),oa=i.ikp(I.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),da=i.ikp(I.Item,{_id:"aiChatForm__FieldSelect__Item"}),ca=i.ikp(I.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),ma=i.ikp(I.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:n.jsx(B.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),Lr=i.ikp("span",{_id:"aiChatForm__FieldError"}),la=t=>{const{error:e}=x.useFormField();return e?n.jsx(Lr,{children:e.message?.toString(),...t}):null},Dr=i.ikp("span",{_id:"aiChatForm__Error"}),ha=t=>{const{formError:e}=_.useChatForm();return e?n.jsx(Dr,{children:e.message,...t}):null},ua=i.ikp("div",{_id:"aiChatForm__Footer"}),qr=i.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel"}),Ca=t=>{const{onClick:e,...a}=t,{closeForm:r}=_.useChatForm();return n.jsx(qr,{onClick:u.composeEventHandlers(e,r),...a})},Rr=i.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),pa=t=>{const{onClick:e,...a}=t,{isSubmitting:r}=_.useChatForm();return n.jsx(Rr,{disabled:r,...a})},Wr=i.ikp("div",{_id:"aiChatForm__Success"}),va=t=>{const{isSuccess:e}=_.useChatForm();return e?n.jsx(Wr,{...t}):null},Or=i.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),ba=t=>{const{form:e}=_.useChatForm();return n.jsx(Or,{children:e?.successView.heading,...t})},Qr=i.ikp($.Markdown,{_id:"aiChatForm__SuccessMessage"}),ga=t=>{const{form:e}=_.useChatForm();return n.jsx(Qr,{children:e?.successView.message,...t})},Nr=i.ikp("button",{_id:"aiChatForm__SuccessButton"}),Pa=t=>{const{onClick:e,...a}=t,{form:r,closeForm:s}=_.useChatForm(),d=r?.successView?.doneButton;if(!d)return null;const o=d.icon&&n.jsx(B.BuiltInIconRenderer,{iconSettings:d.icon}),c=d.label;return n.jsx(Nr,{onClick:u.composeEventHandlers(e,s),children:n.jsxs(n.Fragment,{children:[o,c]}),...a})};exports.Provider=b.ChatProvider;exports.ActionBar=pi;exports.Actions=vi;exports.AttachmentsBar=Dt;exports.AttachmentsBarActions=Nt;exports.AttachmentsBarAttachment=Rt;exports.AttachmentsBarAttachmentDelete=Qt;exports.AttachmentsBarAttachmentIcon=Wt;exports.AttachmentsBarAttachmentTitle=Ot;exports.AttachmentsBarForm=ri;exports.AttachmentsBarFormContent=mi;exports.AttachmentsBarFormContentError=ui;exports.AttachmentsBarFormContentInput=hi;exports.AttachmentsBarFormContentLabel=li;exports.AttachmentsBarFormSubmitButton=Ci;exports.AttachmentsBarFormTitle=si;exports.AttachmentsBarFormTitleError=ci;exports.AttachmentsBarFormTitleInput=di;exports.AttachmentsBarFormTitleLabel=oi;exports.AttachmentsBarInfoTip=$t;exports.AttachmentsBarInfoTipArrow=me;exports.AttachmentsBarInfoTipIcon=Vt;exports.AttachmentsBarInfoTipText=Ut;exports.AttachmentsBarInput=zt;exports.AttachmentsBarInputIcon=Gt;exports.AttachmentsBarInputs=Kt;exports.AttachmentsBarList=qt;exports.AttachmentsBarModal=Yt;exports.AttachmentsBarModalBody=ni;exports.AttachmentsBarModalClose=ai;exports.AttachmentsBarModalContent=Xt;exports.AttachmentsBarModalDescription=ti;exports.AttachmentsBarModalHeader=Zt;exports.AttachmentsBarModalHeading=ei;exports.AttachmentsBarModalHelp=ii;exports.AttachmentsBarModalOverlay=Jt;exports.ChatAction=Y;exports.ChatActionFeedback=Ai;exports.ChatActionLabel=le;exports.ChatHelpAction=Fi;exports.Content=Ie;exports.ContentScrollArea=Me;exports.ContentScrollAreaCorner=xe;exports.ContentScrollAreaScrollbar=Be;exports.ContentScrollAreaThumb=fe;exports.ContentScrollAreaViewport=Se;exports.ConversationLoading=_e;exports.Disclaimer=je;exports.DisclaimerArrow=De;exports.DisclaimerContent=we;exports.DisclaimerLabel=ye;exports.DisclaimerText=Le;exports.DisclaimerTrigger=He;exports.EmbeddedChatPrimitiveActionBar=pi;exports.EmbeddedChatPrimitiveActions=vi;exports.EmbeddedChatPrimitiveAttachmentsBar=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=Nt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=Qt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarForm=ri;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=mi;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=ui;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=hi;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=li;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=Ci;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=si;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=ci;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=di;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=oi;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=$t;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=me;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarInput=zt;exports.EmbeddedChatPrimitiveAttachmentsBarInputIcon=Gt;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=Kt;exports.EmbeddedChatPrimitiveAttachmentsBarList=qt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=Yt;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=ni;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=ai;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=ti;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=ei;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=ii;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Jt;exports.EmbeddedChatPrimitiveChatAction=Y;exports.EmbeddedChatPrimitiveChatActionFeedback=Ai;exports.EmbeddedChatPrimitiveChatActionLabel=le;exports.EmbeddedChatPrimitiveChatHelpAction=Fi;exports.EmbeddedChatPrimitiveContent=Ie;exports.EmbeddedChatPrimitiveContentScrollArea=Me;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=xe;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=Be;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=fe;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=Se;exports.EmbeddedChatPrimitiveConversationLoading=_e;exports.EmbeddedChatPrimitiveDisclaimer=je;exports.EmbeddedChatPrimitiveDisclaimerArrow=De;exports.EmbeddedChatPrimitiveDisclaimerContent=we;exports.EmbeddedChatPrimitiveDisclaimerLabel=ye;exports.EmbeddedChatPrimitiveDisclaimerText=Le;exports.EmbeddedChatPrimitiveDisclaimerTrigger=He;exports.EmbeddedChatPrimitiveFeedbackForm=wi;exports.EmbeddedChatPrimitiveFeedbackItem=Li;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=Di;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=qi;exports.EmbeddedChatPrimitiveFeedbackItemDescription=Wi;exports.EmbeddedChatPrimitiveFeedbackItemLabel=Ri;exports.EmbeddedChatPrimitiveFeedbackModal=fi;exports.EmbeddedChatPrimitiveFeedbackModalBody=Hi;exports.EmbeddedChatPrimitiveFeedbackModalClose=yi;exports.EmbeddedChatPrimitiveFeedbackModalContent=Ti;exports.EmbeddedChatPrimitiveFeedbackModalHeader=ji;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=xi;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=Oi;exports.EmbeddedChatPrimitiveFooter=Tt;exports.EmbeddedChatPrimitiveForm=Ni;exports.EmbeddedChatPrimitiveFormCancel=Ca;exports.EmbeddedChatPrimitiveFormClose=$i;exports.EmbeddedChatPrimitiveFormContent=zi;exports.EmbeddedChatPrimitiveFormDescription=Ki;exports.EmbeddedChatPrimitiveFormError=ha;exports.EmbeddedChatPrimitiveFormField=Gi;exports.EmbeddedChatPrimitiveFormFieldCheckbox=ea;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=ta;exports.EmbeddedChatPrimitiveFormFieldEmail=Ji;exports.EmbeddedChatPrimitiveFormFieldError=la;exports.EmbeddedChatPrimitiveFormFieldFile=Xi;exports.EmbeddedChatPrimitiveFormFieldLabel=Yi;exports.EmbeddedChatPrimitiveFormFieldSelect=ia;exports.EmbeddedChatPrimitiveFormFieldSelectContent=sa;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=ra;exports.EmbeddedChatPrimitiveFormFieldSelectItem=da;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=ma;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=ca;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=aa;exports.EmbeddedChatPrimitiveFormFieldSelectValue=na;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=oa;exports.EmbeddedChatPrimitiveFormFieldText=J;exports.EmbeddedChatPrimitiveFormFieldTextArea=Zi;exports.EmbeddedChatPrimitiveFormFooter=ua;exports.EmbeddedChatPrimitiveFormHeader=Vi;exports.EmbeddedChatPrimitiveFormHeading=Ui;exports.EmbeddedChatPrimitiveFormSubmit=pa;exports.EmbeddedChatPrimitiveFormSuccess=va;exports.EmbeddedChatPrimitiveFormSuccessButton=Pa;exports.EmbeddedChatPrimitiveFormSuccessHeading=ba;exports.EmbeddedChatPrimitiveFormSuccessMessage=ga;exports.EmbeddedChatPrimitiveFormWrapper=Qi;exports.EmbeddedChatPrimitiveHeaderToolbar=ke;exports.EmbeddedChatPrimitiveHelpActions=ki;exports.EmbeddedChatPrimitiveHelpActionsMenu=Ii;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=Mi;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=Si;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=Bi;exports.EmbeddedChatPrimitiveHelpActionsTrigger=Ei;exports.EmbeddedChatPrimitiveInput=Ht;exports.EmbeddedChatPrimitiveInputFieldset=jt;exports.EmbeddedChatPrimitiveInputGroup=yt;exports.EmbeddedChatPrimitiveIntroMessageWrapper=ze;exports.EmbeddedChatPrimitiveMessage=pt;exports.EmbeddedChatPrimitiveMessageAction=Pt;exports.EmbeddedChatPrimitiveMessageActions=vt;exports.EmbeddedChatPrimitiveMessageAttachments=nt;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=st;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=ot;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=dt;exports.EmbeddedChatPrimitiveMessageAttachmentsList=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=ct;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=Ct;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=ut;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=lt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=ht;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=mt;exports.EmbeddedChatPrimitiveMessageAvatar=Je;exports.EmbeddedChatPrimitiveMessageAvatarContent=Xe;exports.EmbeddedChatPrimitiveMessageAvatarFallback=Ze;exports.EmbeddedChatPrimitiveMessageAvatarImage=et;exports.EmbeddedChatPrimitiveMessageContent=at;exports.EmbeddedChatPrimitiveMessageContentWrapper=it;exports.EmbeddedChatPrimitiveMessageHeader=Ge;exports.EmbeddedChatPrimitiveMessageLoading=Ye;exports.EmbeddedChatPrimitiveMessageName=tt;exports.EmbeddedChatPrimitiveMessageSourceItem=Ft;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=Et;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=Bt;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=ft;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=It;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=xt;exports.EmbeddedChatPrimitiveMessageSourceItemTag=St;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=Mt;exports.EmbeddedChatPrimitiveMessageSources=_t;exports.EmbeddedChatPrimitiveMessageSourcesHeader=At;exports.EmbeddedChatPrimitiveMessageSourcesList=kt;exports.EmbeddedChatPrimitiveMessageToolAction=gt;exports.EmbeddedChatPrimitiveMessageToolActions=bt;exports.EmbeddedChatPrimitiveMessageWrapper=ce;exports.EmbeddedChatPrimitiveMessages=Te;exports.EmbeddedChatPrimitiveQuickQuestion=Oe;exports.EmbeddedChatPrimitiveQuickQuestionButton=Qe;exports.EmbeddedChatPrimitiveQuickQuestions=qe;exports.EmbeddedChatPrimitiveQuickQuestionsLabel=Re;exports.EmbeddedChatPrimitiveQuickQuestionsList=We;exports.EmbeddedChatPrimitiveRoot=Ae;exports.EmbeddedChatPrimitiveSendButton=wt;exports.EmbeddedChatPrimitiveSendButtonIcon=Lt;exports.EmbeddedChatPrimitiveTaglineBrandName=_i;exports.EmbeddedChatPrimitiveTaglineContainer=bi;exports.EmbeddedChatPrimitiveTaglineLogo=Pi;exports.EmbeddedChatPrimitiveTaglineText=gi;exports.EmbeddedChatPrimitiveToolbarHeader=Ee;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=Fe;exports.EmbeddedChatPrimitiveWorkflow=Ue;exports.EmbeddedChatPrimitiveWorkflowIcon=Ke;exports.EmbeddedChatPrimitiveWorkflows=Ne;exports.EmbeddedChatPrimitiveWorkflowsLabel=$e;exports.EmbeddedChatPrimitiveWorkflowsList=Ve;exports.EmbeddedChatPrimitiveWrapper=Pe;exports.FeedbackForm=wi;exports.FeedbackItem=Li;exports.FeedbackItemCheckbox=Di;exports.FeedbackItemCheckboxIndicator=qi;exports.FeedbackItemDescription=Wi;exports.FeedbackItemLabel=Ri;exports.FeedbackModal=fi;exports.FeedbackModalBody=Hi;exports.FeedbackModalClose=yi;exports.FeedbackModalContent=Ti;exports.FeedbackModalHeader=ji;exports.FeedbackModalOverlay=xi;exports.FeedbackSubmitButton=Oi;exports.Footer=Tt;exports.Form=Ni;exports.FormCancel=Ca;exports.FormClose=$i;exports.FormContent=zi;exports.FormDescription=Ki;exports.FormError=ha;exports.FormField=Gi;exports.FormFieldCheckbox=ea;exports.FormFieldCheckboxIndicator=ta;exports.FormFieldEmail=Ji;exports.FormFieldError=la;exports.FormFieldFile=Xi;exports.FormFieldLabel=Yi;exports.FormFieldSelect=ia;exports.FormFieldSelectContent=sa;exports.FormFieldSelectIcon=ra;exports.FormFieldSelectItem=da;exports.FormFieldSelectItemIndicator=ma;exports.FormFieldSelectItemText=ca;exports.FormFieldSelectTrigger=aa;exports.FormFieldSelectValue=na;exports.FormFieldSelectViewport=oa;exports.FormFieldText=J;exports.FormFieldTextArea=Zi;exports.FormFooter=ua;exports.FormHeader=Vi;exports.FormHeading=Ui;exports.FormSubmit=pa;exports.FormSuccess=va;exports.FormSuccessButton=Pa;exports.FormSuccessHeading=ba;exports.FormSuccessMessage=ga;exports.FormWrapper=Qi;exports.Header=Ua;exports.HeaderToolbar=ke;exports.HeaderToolbarWrapper=Fe;exports.HelpActions=ki;exports.HelpActionsMenu=Ii;exports.HelpActionsMenuArrow=Mi;exports.HelpActionsMenuItem=Si;exports.HelpActionsMenuItemIcon=Bi;exports.HelpActionsTrigger=Ei;exports.Input=Ht;exports.InputFieldset=jt;exports.InputGroup=yt;exports.IntroMessageWrapper=ze;exports.Message=pt;exports.MessageAction=Pt;exports.MessageActions=vt;exports.MessageAttachments=nt;exports.MessageAttachmentsItem=st;exports.MessageAttachmentsItemIcon=ot;exports.MessageAttachmentsItemTitle=dt;exports.MessageAttachmentsList=rt;exports.MessageAttachmentsPreview=ct;exports.MessageAttachmentsPreviewBody=Ct;exports.MessageAttachmentsPreviewClose=ut;exports.MessageAttachmentsPreviewContent=lt;exports.MessageAttachmentsPreviewHeader=ht;exports.MessageAttachmentsPreviewOverlay=mt;exports.MessageAvatar=Je;exports.MessageAvatarContent=Xe;exports.MessageAvatarFallback=Ze;exports.MessageAvatarImage=et;exports.MessageContent=at;exports.MessageContentWrapper=it;exports.MessageHeader=Ge;exports.MessageLoading=Ye;exports.MessageName=tt;exports.MessageSourceItem=Ft;exports.MessageSourceItemBreadcrumbIcon=wn;exports.MessageSourceItemBreadcrumbs=Et;exports.MessageSourceItemDescription=Bt;exports.MessageSourceItemDescriptionPart=ft;exports.MessageSourceItemIcon=It;exports.MessageSourceItemIndicator=xt;exports.MessageSourceItemTag=St;exports.MessageSourceItemTitle=Mt;exports.MessageSources=_t;exports.MessageSourcesHeader=At;exports.MessageSourcesList=kt;exports.MessageToolAction=gt;exports.MessageToolActions=bt;exports.MessageWrapper=ce;exports.Messages=Te;exports.QuickQuestion=Oe;exports.QuickQuestionButton=Qe;exports.QuickQuestions=qe;exports.QuickQuestionsLabel=Re;exports.QuickQuestionsList=We;exports.Root=Ae;exports.SendButton=wt;exports.SendButtonIcon=Lt;exports.TaglineBrandName=_i;exports.TaglineContainer=bi;exports.TaglineLogo=Pi;exports.TaglineText=gi;exports.ToolbarHeader=Ee;exports.Workflow=Ue;exports.WorkflowIcon=Ke;exports.Workflows=Ne;exports.WorkflowsLabel=$e;exports.WorkflowsList=Ve;exports.Wrapper=Pe;
|
|
@@ -13,9 +13,10 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
|
13
13
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
14
14
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
15
15
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
16
|
+
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
16
17
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
17
18
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
18
|
-
import * as DialogPrimitive from '
|
|
19
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
19
20
|
export declare const EmbeddedChatPrimitiveWrapper: ForwardRefExoticComponent<Omit< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
20
21
|
declare const PrimitiveConversationLoading: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
21
22
|
export declare const EmbeddedChatPrimitiveConversationLoading: (props: ComponentPropsWithRef<typeof PrimitiveConversationLoading>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -41,12 +42,12 @@ declare const PrimitiveDisclaimer: ForwardRefExoticComponent< PolymorphicProps &
|
|
|
41
42
|
export declare const EmbeddedChatPrimitiveDisclaimer: MemoExoticComponent<(props: ComponentPropsWithRef<typeof PrimitiveDisclaimer>) => import("react/jsx-runtime").JSX.Element | null>;
|
|
42
43
|
declare const PrimitiveDisclaimerLabel: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id">>>;
|
|
43
44
|
export declare const EmbeddedChatPrimitiveDisclaimerLabel: MemoExoticComponent<(props: ComponentPropsWithRef<typeof PrimitiveDisclaimerLabel>) => import("react/jsx-runtime").JSX.Element>;
|
|
44
|
-
export declare const EmbeddedChatPrimitiveDisclaimerTrigger: ForwardRefExoticComponent< PolymorphicProps & Omit<
|
|
45
|
-
declare const PrimitiveDisclaimerContent: ForwardRefExoticComponent< PolymorphicProps & Omit<
|
|
45
|
+
export declare const EmbeddedChatPrimitiveDisclaimerTrigger: ForwardRefExoticComponent< PolymorphicProps & Omit<HoverCardPrimitive.HoverCardTriggerProps & RefAttributes<HTMLAnchorElement>, "children" | "_id"> & Partial<Pick<HoverCardPrimitive.HoverCardTriggerProps & RefAttributes<HTMLAnchorElement>, "children" | "_id">>>;
|
|
46
|
+
declare const PrimitiveDisclaimerContent: ForwardRefExoticComponent< PolymorphicProps & Omit<HoverCardPrimitive.HoverCardContentProps & RefAttributes<HTMLDivElement>, "_id"> & Partial<Pick<HoverCardPrimitive.HoverCardContentProps & RefAttributes<HTMLDivElement>, "_id">>>;
|
|
46
47
|
export declare const EmbeddedChatPrimitiveDisclaimerContent: (props: ComponentPropsWithRef<typeof PrimitiveDisclaimerContent>) => import("react/jsx-runtime").JSX.Element;
|
|
47
48
|
declare const PrimitiveDisclaimerText: ForwardRefExoticComponent< PolymorphicProps & Omit< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & MarkdownProps, "_id"> & Partial<Pick< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & MarkdownProps, "_id">>>;
|
|
48
49
|
export declare const EmbeddedChatPrimitiveDisclaimerText: MemoExoticComponent<(props: Omit<ComponentPropsWithRef<typeof PrimitiveDisclaimerText>, "componentStyles">) => import("react/jsx-runtime").JSX.Element>;
|
|
49
|
-
export declare const EmbeddedChatPrimitiveDisclaimerArrow: ForwardRefExoticComponent< PolymorphicProps & Omit<
|
|
50
|
+
export declare const EmbeddedChatPrimitiveDisclaimerArrow: ForwardRefExoticComponent< PolymorphicProps & Omit<HoverCardPrimitive.HoverCardArrowProps & RefAttributes<SVGSVGElement>, "_id"> & Partial<Pick<HoverCardPrimitive.HoverCardArrowProps & RefAttributes<SVGSVGElement>, "_id">>>;
|
|
50
51
|
export declare const EmbeddedChatPrimitiveQuickQuestions: (props: ComponentPropsWithRef<"div">) => import("react/jsx-runtime").JSX.Element | null;
|
|
51
52
|
export declare const EmbeddedChatPrimitiveQuickQuestionsLabel: MemoExoticComponent<(props: ComponentPropsWithRef<"h3">) => import("react/jsx-runtime").JSX.Element>;
|
|
52
53
|
export interface EmbeddedChatPrimitiveQuickQuestionsListProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
@@ -274,7 +275,7 @@ declare const PrimitiveAttachmentsBarFormContentInput: ForwardRefExoticComponent
|
|
|
274
275
|
export declare const EmbeddedChatPrimitiveAttachmentsBarFormContentInput: (props: ComponentPropsWithRef<typeof PrimitiveAttachmentsBarFormContentInput>) => import("react/jsx-runtime").JSX.Element;
|
|
275
276
|
declare const PrimitiveAttachmentsBarFormContentError: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id">>>;
|
|
276
277
|
export declare const EmbeddedChatPrimitiveAttachmentsBarFormContentError: (props: ComponentPropsWithRef<typeof PrimitiveAttachmentsBarFormContentError>) => import("react/jsx-runtime").JSX.Element | null;
|
|
277
|
-
export declare const EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "
|
|
278
|
+
export declare const EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "type" | "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "type" | "_id">>>;
|
|
278
279
|
export declare const EmbeddedChatPrimitiveActionBar: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
279
280
|
export declare const EmbeddedChatPrimitiveActions: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
280
281
|
export declare const EmbeddedChatPrimitiveTaglineContainer: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
@@ -351,7 +352,7 @@ declare const PrimitiveFeedbackItemLabel: ForwardRefExoticComponent< Polymorphic
|
|
|
351
352
|
export declare const EmbeddedChatPrimitiveFeedbackItemLabel: (props: ComponentPropsWithRef<typeof PrimitiveFeedbackItemLabel>) => import("react/jsx-runtime").JSX.Element;
|
|
352
353
|
declare const PrimitiveFeedbackItemDescription: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "placeholder" | "_id"> & Partial<Pick< DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "placeholder" | "_id">>>;
|
|
353
354
|
export declare const EmbeddedChatPrimitiveFeedbackItemDescription: (props: ComponentPropsWithRef<typeof PrimitiveFeedbackItemDescription>) => import("react/jsx-runtime").JSX.Element;
|
|
354
|
-
export declare const EmbeddedChatPrimitiveFeedbackSubmitButton: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "
|
|
355
|
+
export declare const EmbeddedChatPrimitiveFeedbackSubmitButton: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "type" | "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "type" | "_id">>>;
|
|
355
356
|
declare const PrimitiveFormWrapper: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
356
357
|
export declare const EmbeddedChatPrimitiveFormWrapper: (props: ComponentPropsWithRef<typeof PrimitiveFormWrapper>) => import("react/jsx-runtime").JSX.Element | null;
|
|
357
358
|
declare const PrimitiveForm: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "_id"> & Partial<Pick< DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "_id">>>;
|
|
@@ -380,7 +381,7 @@ export declare const EmbeddedChatPrimitiveFormFieldText: (props: ComponentPropsW
|
|
|
380
381
|
export declare const EmbeddedChatPrimitiveFormFieldEmail: ForwardRefExoticComponent< PolymorphicProps & Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "type" | "_id"> & Partial<Pick< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "type" | "_id">>>;
|
|
381
382
|
declare const PrimitiveFormFieldFile: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "multiple" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "multiple" | "_id">>>;
|
|
382
383
|
export declare const EmbeddedChatPrimitiveFormFieldFile: (props: ComponentPropsWithRef<typeof PrimitiveFormFieldFile>) => import("react/jsx-runtime").JSX.Element;
|
|
383
|
-
export declare const EmbeddedChatPrimitiveFormFieldTextArea: ForwardRefExoticComponent< PolymorphicProps & Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "
|
|
384
|
+
export declare const EmbeddedChatPrimitiveFormFieldTextArea: ForwardRefExoticComponent< PolymorphicProps & Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "children" | "type" | "asChild" | "_id"> & Partial<Pick< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "children" | "type" | "asChild" | "_id">>>;
|
|
384
385
|
declare const PrimitiveFormFieldCheckbox: ForwardRefExoticComponent< PolymorphicProps & Omit<CheckboxPrimitive.CheckboxProps & RefAttributes<HTMLButtonElement>, "_id"> & Partial<Pick<CheckboxPrimitive.CheckboxProps & RefAttributes<HTMLButtonElement>, "_id">>>;
|
|
385
386
|
export declare const EmbeddedChatPrimitiveFormFieldCheckbox: (props: ComponentPropsWithRef<typeof PrimitiveFormFieldCheckbox>) => import("react/jsx-runtime").JSX.Element;
|
|
386
387
|
export declare const EmbeddedChatPrimitiveFormFieldCheckboxIndicator: ForwardRefExoticComponent< PolymorphicProps & Omit<CheckboxPrimitive.CheckboxIndicatorProps & RefAttributes<HTMLSpanElement>, "children" | "_id"> & Partial<Pick<CheckboxPrimitive.CheckboxIndicatorProps & RefAttributes<HTMLSpanElement>, "children" | "_id">>>;
|
|
@@ -402,7 +403,7 @@ export declare const EmbeddedChatPrimitiveFormError: (props: ComponentPropsWithR
|
|
|
402
403
|
export declare const EmbeddedChatPrimitiveFormFooter: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
403
404
|
declare const PrimitiveFormCancel: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "_id">>>;
|
|
404
405
|
export declare const EmbeddedChatPrimitiveFormCancel: (props: ComponentPropsWithRef<typeof PrimitiveFormCancel>) => import("react/jsx-runtime").JSX.Element;
|
|
405
|
-
declare const PrimitiveFormSubmit: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "
|
|
406
|
+
declare const PrimitiveFormSubmit: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "type" | "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "type" | "_id">>>;
|
|
406
407
|
export declare const EmbeddedChatPrimitiveFormSubmit: (props: ComponentPropsWithRef<typeof PrimitiveFormSubmit>) => import("react/jsx-runtime").JSX.Element;
|
|
407
408
|
declare const PrimitiveFormSuccess: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
408
409
|
export declare const EmbeddedChatPrimitiveFormSuccess: (props: ComponentPropsWithRef<typeof PrimitiveFormSuccess>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -13,9 +13,10 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
|
13
13
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
14
14
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
15
15
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
16
|
+
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
16
17
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
17
18
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
18
|
-
import * as DialogPrimitive from '
|
|
19
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
19
20
|
export declare const EmbeddedChatPrimitiveWrapper: ForwardRefExoticComponent<Omit< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
20
21
|
declare const PrimitiveConversationLoading: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
21
22
|
export declare const EmbeddedChatPrimitiveConversationLoading: (props: ComponentPropsWithRef<typeof PrimitiveConversationLoading>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -41,12 +42,12 @@ declare const PrimitiveDisclaimer: ForwardRefExoticComponent< PolymorphicProps &
|
|
|
41
42
|
export declare const EmbeddedChatPrimitiveDisclaimer: MemoExoticComponent<(props: ComponentPropsWithRef<typeof PrimitiveDisclaimer>) => import("react/jsx-runtime").JSX.Element | null>;
|
|
42
43
|
declare const PrimitiveDisclaimerLabel: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id">>>;
|
|
43
44
|
export declare const EmbeddedChatPrimitiveDisclaimerLabel: MemoExoticComponent<(props: ComponentPropsWithRef<typeof PrimitiveDisclaimerLabel>) => import("react/jsx-runtime").JSX.Element>;
|
|
44
|
-
export declare const EmbeddedChatPrimitiveDisclaimerTrigger: ForwardRefExoticComponent< PolymorphicProps & Omit<
|
|
45
|
-
declare const PrimitiveDisclaimerContent: ForwardRefExoticComponent< PolymorphicProps & Omit<
|
|
45
|
+
export declare const EmbeddedChatPrimitiveDisclaimerTrigger: ForwardRefExoticComponent< PolymorphicProps & Omit<HoverCardPrimitive.HoverCardTriggerProps & RefAttributes<HTMLAnchorElement>, "children" | "_id"> & Partial<Pick<HoverCardPrimitive.HoverCardTriggerProps & RefAttributes<HTMLAnchorElement>, "children" | "_id">>>;
|
|
46
|
+
declare const PrimitiveDisclaimerContent: ForwardRefExoticComponent< PolymorphicProps & Omit<HoverCardPrimitive.HoverCardContentProps & RefAttributes<HTMLDivElement>, "_id"> & Partial<Pick<HoverCardPrimitive.HoverCardContentProps & RefAttributes<HTMLDivElement>, "_id">>>;
|
|
46
47
|
export declare const EmbeddedChatPrimitiveDisclaimerContent: (props: ComponentPropsWithRef<typeof PrimitiveDisclaimerContent>) => import("react/jsx-runtime").JSX.Element;
|
|
47
48
|
declare const PrimitiveDisclaimerText: ForwardRefExoticComponent< PolymorphicProps & Omit< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & MarkdownProps, "_id"> & Partial<Pick< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & MarkdownProps, "_id">>>;
|
|
48
49
|
export declare const EmbeddedChatPrimitiveDisclaimerText: MemoExoticComponent<(props: Omit<ComponentPropsWithRef<typeof PrimitiveDisclaimerText>, "componentStyles">) => import("react/jsx-runtime").JSX.Element>;
|
|
49
|
-
export declare const EmbeddedChatPrimitiveDisclaimerArrow: ForwardRefExoticComponent< PolymorphicProps & Omit<
|
|
50
|
+
export declare const EmbeddedChatPrimitiveDisclaimerArrow: ForwardRefExoticComponent< PolymorphicProps & Omit<HoverCardPrimitive.HoverCardArrowProps & RefAttributes<SVGSVGElement>, "_id"> & Partial<Pick<HoverCardPrimitive.HoverCardArrowProps & RefAttributes<SVGSVGElement>, "_id">>>;
|
|
50
51
|
export declare const EmbeddedChatPrimitiveQuickQuestions: (props: ComponentPropsWithRef<"div">) => import("react/jsx-runtime").JSX.Element | null;
|
|
51
52
|
export declare const EmbeddedChatPrimitiveQuickQuestionsLabel: MemoExoticComponent<(props: ComponentPropsWithRef<"h3">) => import("react/jsx-runtime").JSX.Element>;
|
|
52
53
|
export interface EmbeddedChatPrimitiveQuickQuestionsListProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
@@ -274,7 +275,7 @@ declare const PrimitiveAttachmentsBarFormContentInput: ForwardRefExoticComponent
|
|
|
274
275
|
export declare const EmbeddedChatPrimitiveAttachmentsBarFormContentInput: (props: ComponentPropsWithRef<typeof PrimitiveAttachmentsBarFormContentInput>) => import("react/jsx-runtime").JSX.Element;
|
|
275
276
|
declare const PrimitiveAttachmentsBarFormContentError: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id">>>;
|
|
276
277
|
export declare const EmbeddedChatPrimitiveAttachmentsBarFormContentError: (props: ComponentPropsWithRef<typeof PrimitiveAttachmentsBarFormContentError>) => import("react/jsx-runtime").JSX.Element | null;
|
|
277
|
-
export declare const EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "
|
|
278
|
+
export declare const EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "type" | "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "type" | "_id">>>;
|
|
278
279
|
export declare const EmbeddedChatPrimitiveActionBar: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
279
280
|
export declare const EmbeddedChatPrimitiveActions: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
280
281
|
export declare const EmbeddedChatPrimitiveTaglineContainer: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
@@ -351,7 +352,7 @@ declare const PrimitiveFeedbackItemLabel: ForwardRefExoticComponent< Polymorphic
|
|
|
351
352
|
export declare const EmbeddedChatPrimitiveFeedbackItemLabel: (props: ComponentPropsWithRef<typeof PrimitiveFeedbackItemLabel>) => import("react/jsx-runtime").JSX.Element;
|
|
352
353
|
declare const PrimitiveFeedbackItemDescription: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "placeholder" | "_id"> & Partial<Pick< DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "placeholder" | "_id">>>;
|
|
353
354
|
export declare const EmbeddedChatPrimitiveFeedbackItemDescription: (props: ComponentPropsWithRef<typeof PrimitiveFeedbackItemDescription>) => import("react/jsx-runtime").JSX.Element;
|
|
354
|
-
export declare const EmbeddedChatPrimitiveFeedbackSubmitButton: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "
|
|
355
|
+
export declare const EmbeddedChatPrimitiveFeedbackSubmitButton: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "type" | "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "type" | "_id">>>;
|
|
355
356
|
declare const PrimitiveFormWrapper: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
356
357
|
export declare const EmbeddedChatPrimitiveFormWrapper: (props: ComponentPropsWithRef<typeof PrimitiveFormWrapper>) => import("react/jsx-runtime").JSX.Element | null;
|
|
357
358
|
declare const PrimitiveForm: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "_id"> & Partial<Pick< DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "_id">>>;
|
|
@@ -380,7 +381,7 @@ export declare const EmbeddedChatPrimitiveFormFieldText: (props: ComponentPropsW
|
|
|
380
381
|
export declare const EmbeddedChatPrimitiveFormFieldEmail: ForwardRefExoticComponent< PolymorphicProps & Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "type" | "_id"> & Partial<Pick< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "type" | "_id">>>;
|
|
381
382
|
declare const PrimitiveFormFieldFile: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "multiple" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "multiple" | "_id">>>;
|
|
382
383
|
export declare const EmbeddedChatPrimitiveFormFieldFile: (props: ComponentPropsWithRef<typeof PrimitiveFormFieldFile>) => import("react/jsx-runtime").JSX.Element;
|
|
383
|
-
export declare const EmbeddedChatPrimitiveFormFieldTextArea: ForwardRefExoticComponent< PolymorphicProps & Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "
|
|
384
|
+
export declare const EmbeddedChatPrimitiveFormFieldTextArea: ForwardRefExoticComponent< PolymorphicProps & Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "children" | "type" | "asChild" | "_id"> & Partial<Pick< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "children" | "type" | "asChild" | "_id">>>;
|
|
384
385
|
declare const PrimitiveFormFieldCheckbox: ForwardRefExoticComponent< PolymorphicProps & Omit<CheckboxPrimitive.CheckboxProps & RefAttributes<HTMLButtonElement>, "_id"> & Partial<Pick<CheckboxPrimitive.CheckboxProps & RefAttributes<HTMLButtonElement>, "_id">>>;
|
|
385
386
|
export declare const EmbeddedChatPrimitiveFormFieldCheckbox: (props: ComponentPropsWithRef<typeof PrimitiveFormFieldCheckbox>) => import("react/jsx-runtime").JSX.Element;
|
|
386
387
|
export declare const EmbeddedChatPrimitiveFormFieldCheckboxIndicator: ForwardRefExoticComponent< PolymorphicProps & Omit<CheckboxPrimitive.CheckboxIndicatorProps & RefAttributes<HTMLSpanElement>, "children" | "_id"> & Partial<Pick<CheckboxPrimitive.CheckboxIndicatorProps & RefAttributes<HTMLSpanElement>, "children" | "_id">>>;
|
|
@@ -402,7 +403,7 @@ export declare const EmbeddedChatPrimitiveFormError: (props: ComponentPropsWithR
|
|
|
402
403
|
export declare const EmbeddedChatPrimitiveFormFooter: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
403
404
|
declare const PrimitiveFormCancel: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "_id">>>;
|
|
404
405
|
export declare const EmbeddedChatPrimitiveFormCancel: (props: ComponentPropsWithRef<typeof PrimitiveFormCancel>) => import("react/jsx-runtime").JSX.Element;
|
|
405
|
-
declare const PrimitiveFormSubmit: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "
|
|
406
|
+
declare const PrimitiveFormSubmit: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "type" | "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "type" | "_id">>>;
|
|
406
407
|
export declare const EmbeddedChatPrimitiveFormSubmit: (props: ComponentPropsWithRef<typeof PrimitiveFormSubmit>) => import("react/jsx-runtime").JSX.Element;
|
|
407
408
|
declare const PrimitiveFormSuccess: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
408
409
|
export declare const EmbeddedChatPrimitiveFormSuccess: (props: ComponentPropsWithRef<typeof PrimitiveFormSuccess>) => import("react/jsx-runtime").JSX.Element | null;
|