@inkeep/cxkit-primitives 0.0.0-dev-20260219205800 → 0.0.0-dev-20260219215642

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.
@@ -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"),ne=require("react-textarea-autosize"),fa=require("@radix-ui/react-avatar"),Ba=require("@radix-ui/react-checkbox"),Ta=require("@radix-ui/react-popover"),ja=require("@radix-ui/react-tooltip"),ya=require("@radix-ui/react-scroll-area"),S=require("../atoms/select.cjs"),I=require("../atoms/combobox.cjs"),F=require("../atoms/dialog.cjs"),Ha=require("../atoms/avatars/ai.cjs"),wa=require("../atoms/avatars/user.cjs"),A=require("../atoms/icons/custom-icon.cjs"),M=require("../atoms/icons/built-in-icon-renderer.cjs"),La=require("../atoms/link.cjs"),K=require("../atoms/markdown/index.cjs"),L=require("../providers/attachment-item-provider.cjs"),E=require("../providers/attachments-bar-provider.cjs"),T=require("../providers/source-item-provider.cjs"),p=require("../providers/config-provider.cjs"),D=require("../providers/conversation-provider.cjs"),O=require("../providers/chat-events-provider.cjs"),oe=require("../providers/feedback-provider.cjs"),q=require("../providers/message-attachments-provider.cjs"),P=require("../providers/message-provider.cjs"),ge=require("../atoms/icons/checkbox-icon.cjs"),ie=require("../hooks/use-copy-to-clipboard.cjs"),z=require("../providers/feedback-item-provider.cjs"),Da=require("../utils/get-message-metadata.cjs"),h=require("../utils/misc.cjs"),i=require("./factory.cjs"),b=require("./embedded-chat/chat-provider.cjs"),Ra=require("./tagline-logo-icon.cjs"),Oa=require("../hooks/use-settle-action.cjs"),qa=require("../hooks/use-container-size.cjs"),re=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"),Wa=require("react-hook-form"),Na=require("../utils/highlight-emphasis.cjs"),Va=require("./modal/modal-provider.cjs"),Qa=require("@inkeep/cxkit-color-mode"),se=require("../utils/compose-refs.cjs"),C=require("../utils/compose-event-handlers.cjs"),$a=require("../hooks/use-scroll-to-bottom.cjs"),Ua=require("../atoms/api/analytics/conversation.cjs"),Ka=require("../utils/transform-source/index.cjs"),za=require("../hooks/use-debounce.cjs"),de=require("../providers/hover-popover-provider.cjs"),Ga=require("./modal/widget-auto-focus.cjs"),Ya=require("../atoms/shadow/context.cjs");function W(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const me=W(fa),G=W(Ba),j=W(Ta),y=W(ja),N=W(ya),Ja="__intro__",Xa=i.ikp("div",{_id:"aiChatWrapper"}),Pe=g.forwardRef((t,e)=>{const{...a}=t,{isHidden:o,isMobile:r}=b.useChat(),[s,d]=qa.useContainerSize(),m=se.useComposedRefs(e,s),c=d?.width?d.width>580:!0,l=Va.useModal();return n.jsx(Xa,{ref:m,"data-widget-md":h.dataAttr(c),"data-hidden":h.dataAttr(o),"data-in-modal":h.dataAttr(!!l),"data-mobile":h.dataAttr(r),...a})}),Za=i.ikp("div",{_id:"aiChatConversationLoading"}),Fe=t=>{const{isLoadingConversation:e}=b.useChat();return e?n.jsx(Za,{children:n.jsx("span",{children:"Loading..."}),...t}):null},en=i.ikp("div",{_id:"aiChatRoot"}),_e=t=>{const{isLoadingConversation:e,isHidden:a}=b.useChat(),{form:o}=_.useChatForm();return e||o?null:n.jsx(en,{"data-hidden":h.dataAttr(a),...t})},tn=i.ikp("div",{_id:"aiChatHeader"}),Ae=i.ikp("div",{_id:"aiChatHeader__Toolbar"}),Ee=i.ikp("div",{_id:"aiChatHeader__ToolbarHeaderWrapper"}),an=i.ikp("div",{_id:"aiChatHeader__ToolbarHeader"}),ke=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig(),a=`Ask ${e.aiAssistantName||"AI"}`;return n.jsx(an,{...t,children:a})}),Ie=i.ikp("div",{_id:"aiChatContent"}),Me=i.ikp(N.Root,{_id:"aiChatContentScrollArea"}),nn=i.ikp(N.Viewport,{_id:"aiChatContentScrollArea__Viewport"}),xe=g.forwardRef(({children:t,...e},a)=>{const{containerRef:o}=$a.useScrollToBottom(),r=se.useComposedRefs(a,o);return n.jsx(nn,{ref:r,children:n.jsx("div",{"data-part":"grid",style:{display:"grid"},children:t}),...e})}),Se=i.ikp(N.ScrollAreaScrollbar,{_id:"aiChatContentScrollArea__Scrollbar"}),fe=i.ikp(N.ScrollAreaThumb,{_id:"aiChatContentScrollArea__Thumb"}),Be=i.ikp(N.Corner,{_id:"aiChatContentScrollArea__Corner"}),on=i.ikp("div",{_id:"aiChatMessages"}),Te=t=>{const e=b.useChat(),{children:a,...o}=t;return n.jsx(on,{children:h.maybeRender(a,e),...o})},rn=i.ikp("div",{_id:"aiChatDisclaimer"}),je=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig(),[a,o]=g.useState(!1),r=za.useDebounce(a,100);return e.disclaimerSettings?.isEnabled?n.jsx(de.HoverPopoverProvider,{open:a,setOpen:o,children:n.jsx(j.Root,{open:r,onOpenChange:o,children:n.jsx(rn,{...t})})}):null}),sn=i.ikp("span",{_id:"aiChatDisclaimerLabel"}),ye=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig(),a=e.disclaimerSettings;return n.jsx(sn,{children:a?.label,...t})}),dn=i.ikp(j.Trigger,{_id:"aiChatDisclaimerTrigger",children:n.jsx(A.CustomIcon,{iconKey:"info"})}),He=g.memo(t=>{const{setOpen:e}=de.useHoverPopover(),a=()=>e(!0),o=()=>e(!1);return n.jsx(dn,{onMouseEnter:a,onMouseLeave:o,...t})}),mn=i.ikp(j.Content,{_id:"aiChatDisclaimerContent"}),we=t=>{const{setOpen:e}=de.useHoverPopover(),a=()=>e(!0),o=()=>e(!1);return n.jsx(mn,{onMouseEnter:a,onMouseLeave:o,side:"top",sideOffset:8,align:"end",alignOffset:-10,...t})},cn=i.ikp(K.Markdown,{_id:"aiChatDisclaimerText"}),Le=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig(),a=e.aiAssistantName,r=e.disclaimerSettings?.tooltip||`Information provided by ${a||"this AI assistant"} is not guaranteed to be accurate or comprehensive.`;return n.jsx(cn,{shouldOpenLinksInNewTab:!0,children:r,...t})}),De=i.ikp(j.Arrow,{_id:"aiChatDisclaimerArrow"}),ln=i.ikp("div",{_id:"aiChatExampleQuestions"}),Re=t=>{const{aiChatSettings:e}=p.useInkeepConfig(),{messages:a}=b.useChat();return!e.exampleQuestions?.length||a.length?null:n.jsx(ln,{...t})},hn=i.ikp("h3",{_id:"aiChatExampleQuestionsLabel"}),Oe=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig();return n.jsx(hn,{children:e.exampleQuestionsLabel,...t})}),Cn=i.ikp("div",{_id:"aiChatExampleQuestionsList"}),qe=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig(),a=e.exampleQuestions,{children:o,...r}=t;return n.jsx(Cn,{children:h.maybeRender(o,a),...r})}),un=i.ikp("div",{_id:"aiChatExampleQuestion"}),We=g.forwardRef((t,e)=>{const{aiChatSettings:a}=p.useInkeepConfig(),o=a.isFirstExampleQuestionHighlighted;return n.jsx(un,{ref:e,"data-highlight":h.dataAttr(o),...t})}),pn=i.ikp("button",{_id:"aiChatExampleQuestionButton"}),Ne=t=>{const{question:e,onClick:a,...o}=t,{handleSubmit:r}=b.useChat();return n.jsx(pn,{onClick:C.composeEventHandlers(a,()=>r(e)),children:e,...o})},bn=i.ikp("div",{_id:"aiChatWorkflows"}),Ve=t=>{const{aiChatSettings:e}=p.useInkeepConfig(),{messages:a}=b.useChat();return!e.workflows?.length||a.length?null:n.jsx(bn,{...t})},vn=i.ikp("h3",{_id:"aiChatWorkflowsLabel"}),Qe=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig();return n.jsx(vn,{children:e.workflowsHeader,...t})}),gn=i.ikp("div",{_id:"aiChatWorkflowsList"}),$e=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig(),a=e.workflows,{children:o,...r}=t;return n.jsx(gn,{children:h.maybeRender(o,a),...r})}),Pn=i.ikp("button",{_id:"aiChatWorkflow"}),Ue=t=>{const{workflow:e,onClick:a,...o}=t,{handleWorkflow:r}=b.useChat();return n.jsx(Pn,{onClick:C.composeEventHandlers(a,()=>r(e)),children:e.displayName,...o})},Fn=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(Fn,{"data-role":e.role,...a})})},Ke=g.memo(t=>{const{message:e,...a}=t,{aiChatSettings:o,baseSettings:r}=p.useInkeepConfig(),s=o.aiAssistantName,d=s?`Hi, I'm ${s}!`:"Hi!",m=o.chatSubjectName??r.organizationDisplayName,c=`${d}
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"),fa=require("@radix-ui/react-avatar"),Ba=require("@radix-ui/react-checkbox"),Ta=require("@radix-ui/react-popover"),ja=require("@radix-ui/react-tooltip"),ya=require("@radix-ui/react-scroll-area"),S=require("../atoms/select.cjs"),I=require("../atoms/combobox.cjs"),F=require("../atoms/dialog.cjs"),Ha=require("../atoms/avatars/ai.cjs"),wa=require("../atoms/avatars/user.cjs"),A=require("../atoms/icons/custom-icon.cjs"),M=require("../atoms/icons/built-in-icon-renderer.cjs"),La=require("../atoms/link.cjs"),K=require("../atoms/markdown/index.cjs"),L=require("../providers/attachment-item-provider.cjs"),E=require("../providers/attachments-bar-provider.cjs"),T=require("../providers/source-item-provider.cjs"),p=require("../providers/config-provider.cjs"),D=require("../providers/conversation-provider.cjs"),R=require("../providers/chat-events-provider.cjs"),oe=require("../providers/feedback-provider.cjs"),q=require("../providers/message-attachments-provider.cjs"),P=require("../providers/message-provider.cjs"),ge=require("../atoms/icons/checkbox-icon.cjs"),ie=require("../hooks/use-copy-to-clipboard.cjs"),z=require("../providers/feedback-item-provider.cjs"),Da=require("../utils/get-message-metadata.cjs"),h=require("../utils/misc.cjs"),i=require("./factory.cjs"),b=require("./embedded-chat/chat-provider.cjs"),Oa=require("./tagline-logo-icon.cjs"),Ra=require("../hooks/use-settle-action.cjs"),qa=require("../hooks/use-container-size.cjs"),re=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"),Wa=require("react-hook-form"),Na=require("../utils/highlight-emphasis.cjs"),Va=require("./modal/modal-provider.cjs"),Qa=require("@inkeep/cxkit-color-mode"),se=require("../utils/compose-refs.cjs"),C=require("../utils/compose-event-handlers.cjs"),$a=require("../hooks/use-scroll-to-bottom.cjs"),Ua=require("../atoms/api/analytics/conversation.cjs"),Ka=require("../utils/transform-source/index.cjs"),za=require("../hooks/use-debounce.cjs"),de=require("../providers/hover-popover-provider.cjs"),Ga=require("./modal/widget-auto-focus.cjs"),Ya=require("../atoms/shadow/context.cjs");function W(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const me=W(fa),G=W(Ba),j=W(Ta),y=W(ja),N=W(ya),Ja="__intro__",Xa=i.ikp("div",{_id:"aiChatWrapper"}),Pe=g.forwardRef((t,e)=>{const{...a}=t,{isHidden:o,isMobile:r}=b.useChat(),[s,d]=qa.useContainerSize(),m=se.useComposedRefs(e,s),c=d?.width?d.width>580:!0,l=Va.useModal();return n.jsx(Xa,{ref:m,"data-widget-md":h.dataAttr(c),"data-hidden":h.dataAttr(o),"data-in-modal":h.dataAttr(!!l),"data-mobile":h.dataAttr(r),...a})}),Za=i.ikp("div",{_id:"aiChatConversationLoading"}),Fe=t=>{const{isLoadingConversation:e}=b.useChat();return e?n.jsx(Za,{children:n.jsx("span",{children:"Loading..."}),...t}):null},en=i.ikp("div",{_id:"aiChatRoot"}),_e=t=>{const{isLoadingConversation:e,isHidden:a}=b.useChat(),{form:o}=_.useChatForm();return e||o?null:n.jsx(en,{"data-hidden":h.dataAttr(a),...t})},tn=i.ikp("div",{_id:"aiChatHeader"}),Ae=i.ikp("div",{_id:"aiChatHeader__Toolbar"}),Ee=i.ikp("div",{_id:"aiChatHeader__ToolbarHeaderWrapper"}),an=i.ikp("div",{_id:"aiChatHeader__ToolbarHeader"}),ke=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig(),a=`Ask ${e.aiAssistantName||"AI"}`;return n.jsx(an,{...t,children:a})}),Ie=i.ikp("div",{_id:"aiChatContent"}),Me=i.ikp(N.Root,{_id:"aiChatContentScrollArea"}),nn=i.ikp(N.Viewport,{_id:"aiChatContentScrollArea__Viewport"}),xe=g.forwardRef(({children:t,...e},a)=>{const{containerRef:o}=$a.useScrollToBottom(),r=se.useComposedRefs(a,o);return n.jsx(nn,{ref:r,children:n.jsx("div",{"data-part":"grid",style:{display:"grid"},children:t}),...e})}),Se=i.ikp(N.ScrollAreaScrollbar,{_id:"aiChatContentScrollArea__Scrollbar"}),fe=i.ikp(N.ScrollAreaThumb,{_id:"aiChatContentScrollArea__Thumb"}),Be=i.ikp(N.Corner,{_id:"aiChatContentScrollArea__Corner"}),on=i.ikp("div",{_id:"aiChatMessages"}),Te=t=>{const e=b.useChat(),{children:a,...o}=t;return n.jsx(on,{children:h.maybeRender(a,e),...o})},rn=i.ikp("div",{_id:"aiChatDisclaimer"}),je=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig(),[a,o]=g.useState(!1),r=za.useDebounce(a,100);return e.disclaimerSettings?.isEnabled?n.jsx(de.HoverPopoverProvider,{open:a,setOpen:o,children:n.jsx(j.Root,{open:r,onOpenChange:o,children:n.jsx(rn,{...t})})}):null}),sn=i.ikp("span",{_id:"aiChatDisclaimerLabel"}),ye=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig(),a=e.disclaimerSettings;return n.jsx(sn,{children:a?.label,...t})}),dn=i.ikp(j.Trigger,{_id:"aiChatDisclaimerTrigger",children:n.jsx(A.CustomIcon,{iconKey:"info"})}),He=g.memo(t=>{const{setOpen:e}=de.useHoverPopover(),a=()=>e(!0),o=()=>e(!1);return n.jsx(dn,{onMouseEnter:a,onMouseLeave:o,...t})}),mn=i.ikp(j.Content,{_id:"aiChatDisclaimerContent"}),we=t=>{const{setOpen:e}=de.useHoverPopover(),a=()=>e(!0),o=()=>e(!1);return n.jsx(mn,{onMouseEnter:a,onMouseLeave:o,side:"top",sideOffset:8,align:"end",alignOffset:-10,...t})},cn=i.ikp(K.Markdown,{_id:"aiChatDisclaimerText"}),Le=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig(),a=e.aiAssistantName,r=e.disclaimerSettings?.tooltip||`Information provided by ${a||"this AI assistant"} is not guaranteed to be accurate or comprehensive.`;return n.jsx(cn,{shouldOpenLinksInNewTab:!0,children:r,...t})}),De=i.ikp(j.Arrow,{_id:"aiChatDisclaimerArrow"}),ln=i.ikp("div",{_id:"aiChatExampleQuestions"}),Oe=t=>{const{aiChatSettings:e}=p.useInkeepConfig(),{messages:a}=b.useChat();return!e.exampleQuestions?.length||a.length?null:n.jsx(ln,{...t})},hn=i.ikp("h3",{_id:"aiChatExampleQuestionsLabel"}),Re=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig();return n.jsx(hn,{children:e.exampleQuestionsLabel,...t})}),Cn=i.ikp("div",{_id:"aiChatExampleQuestionsList"}),qe=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig(),a=e.exampleQuestions,{children:o,...r}=t;return n.jsx(Cn,{children:h.maybeRender(o,a),...r})}),un=i.ikp("div",{_id:"aiChatExampleQuestion"}),We=g.forwardRef((t,e)=>{const{aiChatSettings:a}=p.useInkeepConfig(),o=a.isFirstExampleQuestionHighlighted;return n.jsx(un,{ref:e,"data-highlight":h.dataAttr(o),...t})}),pn=i.ikp("button",{_id:"aiChatExampleQuestionButton"}),Ne=t=>{const{question:e,onClick:a,...o}=t,{handleSubmit:r}=b.useChat();return n.jsx(pn,{onClick:C.composeEventHandlers(a,()=>r(e)),children:e,...o})},bn=i.ikp("div",{_id:"aiChatWorkflows"}),Ve=t=>{const{aiChatSettings:e}=p.useInkeepConfig(),{messages:a}=b.useChat();return!e.workflows?.length||a.length?null:n.jsx(bn,{...t})},vn=i.ikp("h3",{_id:"aiChatWorkflowsLabel"}),Qe=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig();return n.jsx(vn,{children:e.workflowsHeader,...t})}),gn=i.ikp("div",{_id:"aiChatWorkflowsList"}),$e=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig(),a=e.workflows,{children:o,...r}=t;return n.jsx(gn,{children:h.maybeRender(o,a),...r})}),Pn=i.ikp("button",{_id:"aiChatWorkflow"}),Ue=t=>{const{workflow:e,onClick:a,...o}=t,{handleWorkflow:r}=b.useChat();return n.jsx(Pn,{onClick:C.composeEventHandlers(a,()=>r(e)),children:e.displayName,...o})},Fn=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(Fn,{"data-role":e.role,...a})})},Ke=g.memo(t=>{const{message:e,...a}=t,{aiChatSettings:o,baseSettings:r}=p.useInkeepConfig(),s=o.aiAssistantName,d=s?`Hi, I'm ${s}!`:"Hi!",m=o.chatSubjectName??r.organizationDisplayName,c=`${d}
2
2
 
3
3
  I'm an AI assistant trained on documentation, help articles, and other content.`,l=m?`
4
4
 
5
5
  Ask me anything about \`${m}\`.`:`
6
6
 
7
- Let me know how I can help.`,v={content:o.introMessage??`${c}${l}`,id:Ja,...e,role:"assistant",links:[]};return n.jsx(ce,{message:v,...a})}),_n=i.ikp("div",{_id:"aiChatMessageHeader"}),ze=t=>{const{message:e}=P.useMessage();return n.jsx(_n,{"data-role":e.role,...t})},An=i.ikp("div",{_id:"aiChatMessageLoading"}),Ge=t=>{const{isLoading:e,isStreaming:a,messages:o}=b.useChat(),{message:r}=P.useMessage();return!(o.at(-1)?.id===r?.id)||r.role!=="assistant"||!e||a?null:n.jsx(An,{children:"Thinking...",...t})},En=i.ikp("div",{_id:"aiChatMessageAvatar"}),Ye=t=>{const{message:e}=P.useMessage();return n.jsx(En,{"data-role":e.role,...t})},kn=i.ikp(me.Root,{_id:"aiChatMessageAvatarContent"}),Je=t=>{const{message:e}=P.useMessage(),{baseSettings:a}=p.useInkeepConfig();return n.jsx(kn,{"data-username":h.dataAttr(e.role==="user"&&!!a.userProperties.name),"data-role":e.role,...t})},In=i.ikp(me.Fallback,{_id:"aiChatMessageAvatarFallback"}),Xe=g.memo(t=>{const{baseSettings:e}=p.useInkeepConfig(),{message:a}=P.useMessage();return e.userProperties.name?n.jsx(In,{"data-role":a.role,children:h.getInitials(e.userProperties.name),...t}):null}),be=i.ikp(me.Image,{_id:"aiChatMessageAvatarImage"}),Ze=g.memo(t=>{const{onLoadingStatusChange:e,...a}=t,{aiChatSettings:o,baseSettings:{userProperties:r}}=p.useInkeepConfig(),{message:s}=P.useMessage(),{aiAssistantAvatar:d}=o??{},m=typeof d=="string"?d:d?.light,c=(typeof d=="string"?d:d?.dark)??m,l=Qa.useColorModeValue(m,c),[u,v]=g.useState(l);g.useEffect(()=>{v(l)},[l]);const k=H=>{H==="error"&&v(null)};return s.role==="user"?o.userAvatar?n.jsx(be,{"data-type":"image",alt:"User avatar","data-role":s.role,src:o.userAvatar,...t}):r.name?null:n.jsx(wa.default,{"data-type":"icon","data-role":s.role,...t}):u?n.jsx(be,{src:u,alt:"AI assistant avatar","data-type":"image","data-role":s.role,onLoadingStatusChange:C.composeEventHandlers(e,k),...a}):n.jsx(Ha.default,{"data-type":"icon","data-role":s.role,...t})}),Mn=i.ikp("span",{_id:"aiChatMessageName"}),et=t=>{const{message:e}=P.useMessage();return n.jsx(Mn,{"data-role":e.role,children:e.role==="user"?"You":"AI assistant",...t})},xn=i.ikp("div",{_id:"aiChatMessageContentWrapper"}),tt=t=>{const{message:e}=P.useMessage(),{messageButtons:a}=b.useChat(),o=a[e.id]||[];return n.jsx(xn,{"data-role":e.role,"data-has-message-buttons":h.dataAttr(!!o.length),...t})},Sn=i.ikp("div",{_id:"aiChatMessageContent"}),it=t=>{const{message:e}=P.useMessage();return n.jsx(Sn,{"data-role":e.role,...t})},fn=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(q.MessageAttachmentsProvider,{children:n.jsx(fn,{...t})})},Bn=i.ikp("div",{_id:"aiChatMessageAttachments__List"}),nt=t=>{const{children:e,...a}=t,{message:o}=P.useMessage(),r=o.metadata?.attributes?.attachments;return r?n.jsx(Bn,{children:h.maybeRender(e,r),...a}):null},Tn=i.ikp("div",{_id:"aiChatMessageAttachments__Item"}),ot=t=>{const{attachment:e,onClick:a,...o}=t,{selectItem:r,onOpen:s}=q.useMessageAttachments(),d=()=>{r(e),s()};return n.jsx(L.AttachmentItemProvider,{attachment:e,children:n.jsx(Tn,{onClick:C.composeEventHandlers(a,d),...o})})},jn=i.ikp(M.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),rt=t=>{const{attachment:e}=L.useAttachmentItem(),a=e.contentType?.attachmentIcon;return a?n.jsx(jn,{iconSettings:a,...t}):null},yn=i.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),st=t=>{const{attachment:e}=L.useAttachmentItem();return n.jsx(yn,{children:e.title,...t})},Hn=i.ikp(F.Root,{_id:"aiChatMessageAttachmentsPreview"}),dt=t=>{const{onOpenChange:e,...a}=t,{selectItem:o,isOpen:r,onClose:s,selectedItem:d}=q.useMessageAttachments(),m=c=>{c||(s(),o(null))};return n.jsx(Hn,{open:r&&d!==null,onOpenChange:C.composeEventHandlers(e,m),...a})},mt=i.ikp(F.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),ct=i.ikp(F.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),wn=i.ikp(F.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),lt=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(wn,{children:e?.title||"Attachment",...t})},ht=i.ikp(F.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:n.jsx(A.CustomIcon,{iconKey:"close"})}),Ln=i.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),Ct=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(Ln,{children:e?.content,...t})},ve=i.ikp("div",{_id:"aiChatMessage"}),ut=t=>{const{aiChatSettings:e}=p.useInkeepConfig(),{componentStyles:a,...o}=t,{message:r}=P.useMessage(),{logEvent:s}=O.useChatEvents(),d=h.getMessageContent(r),{conversation:m}=D.useInkeepConversation();return r.role==="user"?n.jsx(ve,{"data-role":r.role,children:d,...o}):n.jsx(ve,{"data-role":r.role,...o,children:n.jsx(K.Markdown,{children:d,componentStyles:a,shouldOpenLinksInNewTab:e.shouldOpenLinksInNewTab,onLinkClick:(c,l)=>{s({eventName:"assistant_message_inline_link_opened",properties:{title:l?.toString(),url:c}})},onCodeCopy:(c,l)=>{s({eventName:"assistant_code_block_copied",properties:{conversation:m,language:c,code:l}})}})})},Dn=i.ikp("div",{_id:"aiChatMessageToolbar"}),pt=t=>{const{isLoading:e,messages:a}=b.useChat(),{message:o}=P.useMessage();return a.at(-1)?.id===o?.id&&e||o.role==="user"?null:n.jsx(Dn,{...t})},Rn=i.ikp("div",{_id:"aiChatMessageToolActions"}),bt=t=>{const{children:e,...a}=t,{message:o}=P.useMessage(),{messageButtons:r}=b.useChat(),s=r[o.id]||[];return n.jsx(Rn,{children:h.maybeRender(e,s),...a})},On=i.ikp("a",{_id:"aiChatMessageToolAction"}),qn=i.ikp("button",{_id:"aiChatMessageToolAction"}),vt=t=>{const{onClick:e,action:a,...o}=t,{handleAction:r}=re.useChatAction(a),{logEvent:s}=O.useChatEvents(),{conversation:d}=D.useInkeepConversation(),m=()=>{r(),s({eventName:"tool_call_action_clicked",properties:{conversation:d}}),a.action.type!=="open_form"&&s({eventName:"user_escalation_indicated",properties:{escalationType:"contact_us",conversation:d}})},c=a.label||"Contact Support",l=n.jsxs(n.Fragment,{children:[a.icon&&n.jsx(M.BuiltInIconRenderer,{iconSettings:a.icon}),c]});return a.action.type==="open_link"?n.jsx(On,{href:a.action.url,target:"_blank",rel:"noopener","data-type":a.action.type,onClick:C.composeEventHandlers(e,m),children:l,...o}):n.jsx(qn,{"data-type":a.action.type,onClick:C.composeEventHandlers(e,m),children:l,...o})},Wn=i.ikp("button",{_id:"aiChatMessageAction"}),gt=t=>{const{action:e,onClick:a,className:o,...r}=t,{conversation:s}=D.useInkeepConversation(),{message:d}=P.useMessage(),{isStreaming:m,messages:c}=b.useChat(),[l,u]=ie.useCopyToClipboard(),{feedback:v,submitPositiveFeedback:k,setCurrentFeedback:H,currentFeedback:V}=oe.useMessageFeedback(),{logEvent:X}=O.useChatEvents(),[Q,Z]=Oa.useSettleAction(),{baseSettings:{privacyPreferences:Ce}}=p.useInkeepConfig(),{optOutAllAnalytics:ee}=Ce,ue=c.at(-1)?.id===d?.id,te=d.role==="assistant";if(ue&&m||!te||{copy:!1,upvote:ee,downvote:ee}[e])return null;const w={copy(){u(h.getMessageContent(d)),X({eventName:"assistant_message_copied",properties:{conversation:s}})},upvote(){k(d.id).then(()=>{Z()})},downvote(){H(d.id)}},R={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},f={copy:n.jsx(A.CustomIcon,{iconKey:l?"messageCopied":"messageCopy"}),upvote:n.jsx(A.CustomIcon,{iconKey:Q?"messageCopied":"thumbsUp"}),downvote:n.jsx(A.CustomIcon,{iconKey:"thumbsDown"})},B={copy:{"data-copied":h.dataAttr(l)},upvote:{"data-upvoted":h.dataAttr(v[d.id]?.type==="positive")},downvote:{"data-downvoted":h.dataAttr(v[d.id]?.type==="negative"),"data-state":V===null?"closed":"open"}};return n.jsx(Wn,{"data-action":e,...B[e],children:f[e],"aria-label":R[e],className:`${o} ${e}`,onClick:C.composeEventHandlers(a,w[e]),...r})},Nn=i.ikp("div",{_id:"aiChatMessageSources"}),Pt=t=>{const{message:e}=P.useMessage();return e.role!=="assistant"||!e.links?.length?null:n.jsx(Nn,{...t})},Vn=i.ikp("div",{_id:"aiChatMessageSources__Header"}),Ft=t=>n.jsx(Vn,{children:"Sources",...t}),Qn=i.ikp("div",{_id:"aiChatMessageSources__List"}),_t=t=>{const{message:e}=P.useMessage(),{children:a,...o}=t,{baseSettings:{transformSource:r,organizationDisplayName:s},aiChatSettings:{shouldOpenLinksInNewTab:d},searchSettings:{tabs:m}}=p.useInkeepConfig();if(e.role!=="assistant")return null;const c=e.links.map(l=>{const u=Ka.transformInkeepSource(l,"chatSourceItem",{organizationDisplayName:s,tabs:m,transformSource:r}),v=u.shouldOpenInNewTab!==void 0?u.shouldOpenInNewTab:d;return{...u,isExternal:v}});return n.jsx(Qn,{children:h.maybeRender(a,c),...o})},$n=i.ikp(La.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),At=t=>{const{source:e,onClick:a,...o}=t,{logEvent:r}=O.useChatEvents(),{conversation:s}=D.useInkeepConversation(),d=()=>{r({eventName:"assistant_source_item_clicked",properties:{conversation:s,link:e}})};return n.jsx(T.SourceItemProvider,{source:e,children:n.jsx($n,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:C.composeEventHandlers(a,d),...o})})},Un=i.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),Et=t=>{const{source:e}=T.useSourceItem();return e.breadcrumbs?.length?n.jsx(Un,{"data-type":e.type,...t}):null},Kn=i.ikp(A.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),zn=i.ikp(M.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),kt=t=>{const{source:e}=T.useSourceItem();return n.jsx(zn,{iconSettings:e.icon,"data-type":e.type,...t})},Gn=i.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),It=t=>{const{source:e}=T.useSourceItem();return n.jsx(Gn,{"data-type":e.type,children:e.title,...t})},Yn=i.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),Mt=t=>{const{source:e}=T.useSourceItem();return n.jsx(Yn,{"data-type":e.type,...t})},Jn=i.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),xt=t=>{const{source:e}=T.useSourceItem(),{children:a,...o}=t,r=g.useMemo(()=>e.description?Na.highlightEmphasis(e.description):[],[e.description]);return r.length?n.jsx(Jn,{"data-type":e.type,children:h.maybeRender(a,r),...o}):null},Xn=i.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),St=t=>{const{part:e,...a}=t,{source:o}=T.useSourceItem();return typeof e=="string"?e:n.jsx(Xn,{"data-type":o.type,children:e.content,"data-highlighted":h.dataAttr(e.highlighted),...a})},Zn=i.ikp(A.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),ft=t=>{const{source:e}=T.useSourceItem();return n.jsx(Zn,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},Bt=i.ikp("div",{_id:"aiChatFooter"}),Tt=i.ikp("div",{_id:"aiChatInput__Fieldset"}),jt=i.ikp("div",{_id:"aiChatInput__Group"}),eo=i.ikp("textarea",{_id:"aiChatInput"}),yt=g.forwardRef(({onChange:t,onKeyDown:e,...a},o)=>{const{handleInputChange:r,handleInputKeyDown:s,input:d,error:m,shouldAutoFocusInput:c,inputRef:l}=b.useChat(),{aiChatSettings:u}=p.useInkeepConfig(),v=se.useComposedRefs(o,l);return Ga.useWidgetAutoFocus("chat",l,c),n.jsx(eo,{asChild:!0,ref:v,maxLength:99999,placeholder:u.placeholder,value:d,onChange:C.composeEventHandlers(t,r),onKeyDown:C.composeEventHandlers(e,s),disabled:!!m||u.isViewOnly,...a,children:n.jsx(ne,{})})}),to=i.ikp("button",{_id:"aiChatInput__SendButton"}),Ht=t=>{const{handleSubmit:e,isSubmitDisabled:a,error:o}=b.useChat(),{aiChatSettings:r}=p.useInkeepConfig(),{onClick:s,...d}=t;return n.jsx(to,{onClick:C.composeEventHandlers(s,()=>e()),"aria-label":"Send message",disabled:a||!!o||r.isViewOnly,...d})},wt=i.ikp(A.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),io=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(io,{...t})})},ao=i.ikp("div",{_id:"aiChatAttachmentsBar__List"}),Dt=t=>{const{children:e,...a}=t,{messageAttachments:o}=b.useChat();return n.jsx(ao,{children:h.maybeRender(e,o),...a})},no=i.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),Rt=t=>{const{attachment:e,...a}=t;return n.jsx(L.AttachmentItemProvider,{attachment:e,children:n.jsx(no,{...a})})},oo=i.ikp(M.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),Ot=t=>{const{attachment:e}=L.useAttachmentItem(),a=e.contentType?.attachmentIcon;return a?n.jsx(oo,{iconSettings:a,...t}):null},ro=i.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),qt=t=>{const{attachment:e}=L.useAttachmentItem();return n.jsx(ro,{children:e.title,...t})},so=i.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),Wt=t=>{const{onClick:e,...a}=t,{attachment:o}=L.useAttachmentItem(),{setMessageAttachments:r}=b.useChat(),s=()=>{r(d=>d.filter(m=>m.id!==o.id))};return n.jsx(so,{"aria-label":"Remove attachment",children:n.jsx(A.CustomIcon,{iconKey:"close"}),onClick:C.composeEventHandlers(e,s),...a})},Nt=i.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),Vt=i.ikp(y.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),Qt=i.ikp(y.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:n.jsx(A.CustomIcon,{iconKey:"info"})}),le=i.ikp(y.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),$t=i.ikp(y.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:n.jsxs(n.Fragment,{children:[n.jsx(le,{}),"Attachments will be kept in context for the entire conversation."]})}),mo=i.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),Ut=t=>{const{children:e,...a}=t,{selectedWorkflow:o}=b.useChat();return o?.supportedInputs?n.jsx(mo,{children:h.maybeRender(e,o.supportedInputs),...a}):null},co=i.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),Kt=t=>{const{input:e,onClick:a,...o}=t,{selectedWorkflow:r,messageAttachments:s,setMessageAttachments:d}=b.useChat(),{selectInput:m,onOpen:c}=E.useAttachmentsBar(),l=()=>{if(e.type==="FUNCTIONAL_MULTI_ATTACHMENT")return r?e.onInvoke(r,e,d,[...s]):void 0;m(e),c()};return n.jsx(co,{children:e.displayName,onClick:C.composeEventHandlers(a,l),...o})},lo=i.ikp(F.Root,{_id:"aiChatAttachmentsBar__Modal"}),zt=t=>{const{onOpenChange:e,...a}=t,{selectInput:o,isOpen:r,onClose:s,selectedInput:d}=E.useAttachmentsBar(),m=c=>{c||(s(),o(null))};return n.jsx(lo,{open:r&&d!==null,onOpenChange:C.composeEventHandlers(e,m),...a})},Gt=i.ikp(F.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),Yt=i.ikp(F.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),Jt=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),ho=i.ikp(F.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),Xt=t=>{const{selectedInput:e}=E.useAttachmentsBar(),a=`Add ${e?.displayName}`;return n.jsx(ho,{children:a,...t})},Co=i.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),Zt=t=>{const{selectedInput:e}=E.useAttachmentsBar(),a=e?.workflowModalProps?.modalHelpText;return a?n.jsx(Co,{children:a,...t}):null},uo=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),ei=t=>{const{children:e,...a}=t,{selectedInput:o}=E.useAttachmentsBar(),r=o?.workflowModalProps?.modalHelpElement;return r?n.jsx(uo,{asChild:!e,children:e||r,...a}):null},ti=i.ikp(F.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:n.jsx(A.CustomIcon,{iconKey:"close"})}),ii=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),po=i.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),ai=t=>{const{onSubmit:e,...a}=t,{form:o}=E.useAttachmentsBar();return n.jsx(po,{onSubmit:C.composeEventHandlers(e,o.onSubmit),...a})},ni=i.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),bo=i.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),oi=t=>{const{form:e,selectedInput:a}=E.useAttachmentsBar();return n.jsx(bo,{htmlFor:`${a?.id}-title`,children:e.labels.title,...t})},vo=i.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ri=t=>{const{onChange:e,...a}=t,{form:o,selectedInput:r}=E.useAttachmentsBar();return n.jsx(vo,{name:"title",value:o.data.title,id:`${r?.id}-title`,"data-invalid":h.dataAttr(!!o.errors.title),"aria-invalid":!!o.errors.title,onChange:C.composeEventHandlers(e,o.onChange),...a})},go=i.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),si=t=>{const{form:e}=E.useAttachmentsBar();return e.errors.title?n.jsx(go,{"aria-live":"polite",children:e.errors.title,...t}):null},di=i.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),Po=i.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),mi=t=>{const{form:e,selectedInput:a}=E.useAttachmentsBar();return n.jsx(Po,{htmlFor:`${a?.id}-content`,children:e.labels.content,...t})},Fo=i.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ci=t=>{const{onChange:e,...a}=t,{form:o,selectedInput:r}=E.useAttachmentsBar();return n.jsx(Fo,{asChild:!0,rows:4,name:"content",value:o.data.content,id:`${r?.id}-content`,"data-invalid":h.dataAttr(!!o.errors.content),"aria-invalid":!!o.errors.content,onChange:C.composeEventHandlers(e,o.onChange),...a,children:n.jsx(ne,{maxRows:10})})},_o=i.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),li=t=>{const{form:e}=E.useAttachmentsBar();return e.errors.content?n.jsx(_o,{"aria-live":"polite",children:e.errors.content,...t}):null},hi=i.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),Ci=i.ikp("div",{_id:"aiChatActionBar"}),ui=i.ikp("div",{_id:"aiChat__ChatActions"}),pi=i.ikp("div",{_id:"aiChatTagline__Container"}),bi=i.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),vi=i.ikp(Ra.default,{_id:"aiChatTagline__Logo"}),gi=i.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),Ao=i.ikp(y.Trigger,{_id:"aiChat__ChatAction"}),Y=t=>{const{action:e,onClick:a,className:o,...r}=t,{clear:s,stop:d,isLoading:m,messages:c,selectedWorkflow:l}=b.useChat(),{conversation:u}=D.useInkeepConversation(),{aiChatSettings:v,baseSettings:k}=p.useInkeepConfig(),{logEvent:H}=O.useChatEvents(),[V,X]=ie.useCopyToClipboard(),[Q,Z]=ie.useCopyToClipboard();if({help:!1,copy:c.length===0||!v.isCopyChatButtonVisible||m,share:c.length===0||!v.isShareButtonVisible||!u.id||!!l||m,clear:c.length===0||v.isViewOnly||m,stop:!m}[e])return null;const te={help:()=>{},copy:()=>{const $=c.map(w=>{const R=`**${w.role==="assistant"?"AI Assistant":"User"}**`,f=h.getMessageContent(w),B=Da.stringifyAttachments(w.metadata?.attributes?.attachments),U=B?`
7
+ Let me know how I can help.`,v={content:o.introMessage??`${c}${l}`,id:Ja,...e,role:"assistant",links:[]};return n.jsx(ce,{message:v,...a})}),_n=i.ikp("div",{_id:"aiChatMessageHeader"}),ze=t=>{const{message:e}=P.useMessage();return n.jsx(_n,{"data-role":e.role,...t})},An=i.ikp("div",{_id:"aiChatMessageLoading"}),Ge=t=>{const{isLoading:e,isStreaming:a,messages:o}=b.useChat(),{message:r}=P.useMessage();return!(o.at(-1)?.id===r?.id)||r.role!=="assistant"||!e||a?null:n.jsx(An,{children:"Thinking...",...t})},En=i.ikp("div",{_id:"aiChatMessageAvatar"}),Ye=t=>{const{message:e}=P.useMessage();return n.jsx(En,{"data-role":e.role,...t})},kn=i.ikp(me.Root,{_id:"aiChatMessageAvatarContent"}),Je=t=>{const{message:e}=P.useMessage(),{baseSettings:a}=p.useInkeepConfig();return n.jsx(kn,{"data-username":h.dataAttr(e.role==="user"&&!!a.userProperties.name),"data-role":e.role,...t})},In=i.ikp(me.Fallback,{_id:"aiChatMessageAvatarFallback"}),Xe=g.memo(t=>{const{baseSettings:e}=p.useInkeepConfig(),{message:a}=P.useMessage();return e.userProperties.name?n.jsx(In,{"data-role":a.role,children:h.getInitials(e.userProperties.name),...t}):null}),be=i.ikp(me.Image,{_id:"aiChatMessageAvatarImage"}),Ze=g.memo(t=>{const{onLoadingStatusChange:e,...a}=t,{aiChatSettings:o,baseSettings:{userProperties:r}}=p.useInkeepConfig(),{message:s}=P.useMessage(),{aiAssistantAvatar:d}=o??{},m=typeof d=="string"?d:d?.light,c=(typeof d=="string"?d:d?.dark)??m,l=Qa.useColorModeValue(m,c),[u,v]=g.useState(l);g.useEffect(()=>{v(l)},[l]);const k=H=>{H==="error"&&v(null)};return s.role==="user"?o.userAvatar?n.jsx(be,{"data-type":"image",alt:"User avatar","data-role":s.role,src:o.userAvatar,...t}):r.name?null:n.jsx(wa.default,{"data-type":"icon","data-role":s.role,...t}):u?n.jsx(be,{src:u,alt:"AI assistant avatar","data-type":"image","data-role":s.role,onLoadingStatusChange:C.composeEventHandlers(e,k),...a}):n.jsx(Ha.default,{"data-type":"icon","data-role":s.role,...t})}),Mn=i.ikp("span",{_id:"aiChatMessageName"}),et=t=>{const{message:e}=P.useMessage();return n.jsx(Mn,{"data-role":e.role,children:e.role==="user"?"You":"AI assistant",...t})},xn=i.ikp("div",{_id:"aiChatMessageContentWrapper"}),tt=t=>{const{message:e}=P.useMessage(),{messageButtons:a}=b.useChat(),o=a[e.id]||[];return n.jsx(xn,{"data-role":e.role,"data-has-message-buttons":h.dataAttr(!!o.length),...t})},Sn=i.ikp("div",{_id:"aiChatMessageContent"}),it=t=>{const{message:e}=P.useMessage();return n.jsx(Sn,{"data-role":e.role,...t})},fn=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(q.MessageAttachmentsProvider,{children:n.jsx(fn,{...t})})},Bn=i.ikp("div",{_id:"aiChatMessageAttachments__List"}),nt=t=>{const{children:e,...a}=t,{message:o}=P.useMessage(),r=o.metadata?.attributes?.attachments;return r?n.jsx(Bn,{children:h.maybeRender(e,r),...a}):null},Tn=i.ikp("div",{_id:"aiChatMessageAttachments__Item"}),ot=t=>{const{attachment:e,onClick:a,...o}=t,{selectItem:r,onOpen:s}=q.useMessageAttachments(),d=()=>{r(e),s()};return n.jsx(L.AttachmentItemProvider,{attachment:e,children:n.jsx(Tn,{onClick:C.composeEventHandlers(a,d),...o})})},jn=i.ikp(M.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),rt=t=>{const{attachment:e}=L.useAttachmentItem(),a=e.contentType?.attachmentIcon;return a?n.jsx(jn,{iconSettings:a,...t}):null},yn=i.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),st=t=>{const{attachment:e}=L.useAttachmentItem();return n.jsx(yn,{children:e.title,...t})},Hn=i.ikp(F.Root,{_id:"aiChatMessageAttachmentsPreview"}),dt=t=>{const{onOpenChange:e,...a}=t,{selectItem:o,isOpen:r,onClose:s,selectedItem:d}=q.useMessageAttachments(),m=c=>{c||(s(),o(null))};return n.jsx(Hn,{open:r&&d!==null,onOpenChange:C.composeEventHandlers(e,m),...a})},mt=i.ikp(F.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),ct=i.ikp(F.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),wn=i.ikp(F.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),lt=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(wn,{children:e?.title||"Attachment",...t})},ht=i.ikp(F.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:n.jsx(A.CustomIcon,{iconKey:"close"})}),Ln=i.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),Ct=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(Ln,{children:e?.content,...t})},ve=i.ikp("div",{_id:"aiChatMessage"}),ut=t=>{const{aiChatSettings:e}=p.useInkeepConfig(),{componentStyles:a,...o}=t,{message:r}=P.useMessage(),{logEvent:s}=R.useChatEvents(),d=h.getMessageContent(r),{conversation:m}=D.useInkeepConversation();return r.role==="user"?n.jsx(ve,{"data-role":r.role,children:d,...o}):n.jsx(ve,{"data-role":r.role,...o,children:n.jsx(K.Markdown,{children:d,componentStyles:a,shouldOpenLinksInNewTab:e.shouldOpenLinksInNewTab,onLinkClick:(c,l)=>{s({eventName:"assistant_message_inline_link_opened",properties:{title:l?.toString(),url:c}})},onCodeCopy:(c,l)=>{s({eventName:"assistant_code_block_copied",properties:{conversation:m,language:c,code:l}})}})})},Dn=i.ikp("div",{_id:"aiChatMessageToolbar"}),pt=t=>{const{isLoading:e,messages:a}=b.useChat(),{message:o}=P.useMessage();return a.at(-1)?.id===o?.id&&e||o.role==="user"?null:n.jsx(Dn,{...t})},On=i.ikp("div",{_id:"aiChatMessageToolActions"}),bt=t=>{const{children:e,...a}=t,{message:o}=P.useMessage(),{messageButtons:r}=b.useChat(),s=r[o.id]||[];return n.jsx(On,{children:h.maybeRender(e,s),...a})},Rn=i.ikp("a",{_id:"aiChatMessageToolAction"}),qn=i.ikp("button",{_id:"aiChatMessageToolAction"}),vt=t=>{const{onClick:e,action:a,...o}=t,{handleAction:r}=re.useChatAction(a),{logEvent:s}=R.useChatEvents(),{conversation:d}=D.useInkeepConversation(),m=()=>{r(),s({eventName:"tool_call_action_clicked",properties:{conversation:d}}),a.action.type!=="open_form"&&s({eventName:"user_escalation_indicated",properties:{escalationType:"contact_us",conversation:d}})},c=a.label||"Contact Support",l=n.jsxs(n.Fragment,{children:[a.icon&&n.jsx(M.BuiltInIconRenderer,{iconSettings:a.icon}),c]});return a.action.type==="open_link"?n.jsx(Rn,{href:a.action.url,target:"_blank",rel:"noopener","data-type":a.action.type,onClick:C.composeEventHandlers(e,m),children:l,...o}):n.jsx(qn,{"data-type":a.action.type,onClick:C.composeEventHandlers(e,m),children:l,...o})},Wn=i.ikp("button",{_id:"aiChatMessageAction"}),gt=t=>{const{action:e,onClick:a,className:o,...r}=t,{conversation:s}=D.useInkeepConversation(),{message:d}=P.useMessage(),{isStreaming:m,messages:c}=b.useChat(),[l,u]=ie.useCopyToClipboard(),{feedback:v,submitPositiveFeedback:k,setCurrentFeedback:H,currentFeedback:V}=oe.useMessageFeedback(),{logEvent:X}=R.useChatEvents(),[Q,Z]=Ra.useSettleAction(),{baseSettings:{privacyPreferences:Ce}}=p.useInkeepConfig(),{optOutAllAnalytics:ee}=Ce,ue=c.at(-1)?.id===d?.id,te=d.role==="assistant";if(ue&&m||!te||{copy:!1,upvote:ee,downvote:ee}[e])return null;const w={copy(){u(h.getMessageContent(d)),X({eventName:"assistant_message_copied",properties:{conversation:s}})},upvote(){k(d.id).then(()=>{Z()})},downvote(){H(d.id)}},O={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},f={copy:n.jsx(A.CustomIcon,{iconKey:l?"messageCopied":"messageCopy"}),upvote:n.jsx(A.CustomIcon,{iconKey:Q?"messageCopied":"thumbsUp"}),downvote:n.jsx(A.CustomIcon,{iconKey:"thumbsDown"})},B={copy:{"data-copied":h.dataAttr(l)},upvote:{"data-upvoted":h.dataAttr(v[d.id]?.type==="positive")},downvote:{"data-downvoted":h.dataAttr(v[d.id]?.type==="negative"),"data-state":V===null?"closed":"open"}};return n.jsx(Wn,{"data-action":e,...B[e],children:f[e],"aria-label":O[e],className:`${o} ${e}`,onClick:C.composeEventHandlers(a,w[e]),...r})},Nn=i.ikp("div",{_id:"aiChatMessageSources"}),Pt=t=>{const{message:e}=P.useMessage();return e.role!=="assistant"||!e.links?.length?null:n.jsx(Nn,{...t})},Vn=i.ikp("div",{_id:"aiChatMessageSources__Header"}),Ft=t=>n.jsx(Vn,{children:"Sources",...t}),Qn=i.ikp("div",{_id:"aiChatMessageSources__List"}),_t=t=>{const{message:e}=P.useMessage(),{children:a,...o}=t,{baseSettings:{transformSource:r,organizationDisplayName:s},aiChatSettings:{shouldOpenLinksInNewTab:d},searchSettings:{tabs:m}}=p.useInkeepConfig();if(e.role!=="assistant")return null;const c=e.links.map(l=>{const u=Ka.transformInkeepSource(l,"chatSourceItem",{organizationDisplayName:s,tabs:m,transformSource:r}),v=u.shouldOpenInNewTab!==void 0?u.shouldOpenInNewTab:d;return{...u,isExternal:v}});return n.jsx(Qn,{children:h.maybeRender(a,c),...o})},$n=i.ikp(La.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),At=t=>{const{source:e,onClick:a,...o}=t,{logEvent:r}=R.useChatEvents(),{conversation:s}=D.useInkeepConversation(),d=()=>{r({eventName:"assistant_source_item_clicked",properties:{conversation:s,link:e}})};return n.jsx(T.SourceItemProvider,{source:e,children:n.jsx($n,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:C.composeEventHandlers(a,d),...o})})},Un=i.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),Et=t=>{const{source:e}=T.useSourceItem();return e.breadcrumbs?.length?n.jsx(Un,{"data-type":e.type,...t}):null},Kn=i.ikp(A.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),zn=i.ikp(M.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),kt=t=>{const{source:e}=T.useSourceItem();return n.jsx(zn,{iconSettings:e.icon,"data-type":e.type,...t})},Gn=i.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),It=t=>{const{source:e}=T.useSourceItem();return n.jsx(Gn,{"data-type":e.type,children:e.title,...t})},Yn=i.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),Mt=t=>{const{source:e}=T.useSourceItem();return n.jsx(Yn,{"data-type":e.type,...t})},Jn=i.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),xt=t=>{const{source:e}=T.useSourceItem(),{children:a,...o}=t,r=g.useMemo(()=>e.description?Na.highlightEmphasis(e.description):[],[e.description]);return r.length?n.jsx(Jn,{"data-type":e.type,children:h.maybeRender(a,r),...o}):null},Xn=i.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),St=t=>{const{part:e,...a}=t,{source:o}=T.useSourceItem();return typeof e=="string"?e:n.jsx(Xn,{"data-type":o.type,children:e.content,"data-highlighted":h.dataAttr(e.highlighted),...a})},Zn=i.ikp(A.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),ft=t=>{const{source:e}=T.useSourceItem();return n.jsx(Zn,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},Bt=i.ikp("div",{_id:"aiChatFooter"}),Tt=i.ikp("div",{_id:"aiChatInput__Fieldset"}),jt=i.ikp("div",{_id:"aiChatInput__Group"}),eo=i.ikp("textarea",{_id:"aiChatInput"}),yt=g.forwardRef(({onChange:t,onKeyDown:e,...a},o)=>{const{handleInputChange:r,handleInputKeyDown:s,input:d,error:m,shouldAutoFocusInput:c,inputRef:l}=b.useChat(),{aiChatSettings:u}=p.useInkeepConfig(),v=se.useComposedRefs(o,l);return Ga.useWidgetAutoFocus("chat",l,c),n.jsx(eo,{asChild:!0,ref:v,maxLength:99999,placeholder:u.placeholder,value:d,onChange:C.composeEventHandlers(t,r),onKeyDown:C.composeEventHandlers(e,s),disabled:!!m||u.isViewOnly,...a,children:n.jsx(ne,{})})}),to=i.ikp("button",{_id:"aiChatInput__SendButton"}),Ht=t=>{const{handleSubmit:e,isSubmitDisabled:a,error:o}=b.useChat(),{aiChatSettings:r}=p.useInkeepConfig(),{onClick:s,...d}=t;return n.jsx(to,{onClick:C.composeEventHandlers(s,()=>e()),"aria-label":"Send message",disabled:a||!!o||r.isViewOnly,...d})},wt=i.ikp(A.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),io=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(io,{...t})})},ao=i.ikp("div",{_id:"aiChatAttachmentsBar__List"}),Dt=t=>{const{children:e,...a}=t,{messageAttachments:o}=b.useChat();return n.jsx(ao,{children:h.maybeRender(e,o),...a})},no=i.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),Ot=t=>{const{attachment:e,...a}=t;return n.jsx(L.AttachmentItemProvider,{attachment:e,children:n.jsx(no,{...a})})},oo=i.ikp(M.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),Rt=t=>{const{attachment:e}=L.useAttachmentItem(),a=e.contentType?.attachmentIcon;return a?n.jsx(oo,{iconSettings:a,...t}):null},ro=i.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),qt=t=>{const{attachment:e}=L.useAttachmentItem();return n.jsx(ro,{children:e.title,...t})},so=i.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),Wt=t=>{const{onClick:e,...a}=t,{attachment:o}=L.useAttachmentItem(),{setMessageAttachments:r}=b.useChat(),s=()=>{r(d=>d.filter(m=>m.id!==o.id))};return n.jsx(so,{"aria-label":"Remove attachment",children:n.jsx(A.CustomIcon,{iconKey:"close"}),onClick:C.composeEventHandlers(e,s),...a})},Nt=i.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),Vt=i.ikp(y.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),Qt=i.ikp(y.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:n.jsx(A.CustomIcon,{iconKey:"info"})}),le=i.ikp(y.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),$t=i.ikp(y.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:n.jsxs(n.Fragment,{children:[n.jsx(le,{}),"Attachments will be kept in context for the entire conversation."]})}),mo=i.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),Ut=t=>{const{children:e,...a}=t,{selectedWorkflow:o}=b.useChat();return o?.supportedInputs?n.jsx(mo,{children:h.maybeRender(e,o.supportedInputs),...a}):null},co=i.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),Kt=t=>{const{input:e,onClick:a,...o}=t,{selectedWorkflow:r,messageAttachments:s,setMessageAttachments:d}=b.useChat(),{selectInput:m,onOpen:c}=E.useAttachmentsBar(),l=()=>{if(e.type==="FUNCTIONAL_MULTI_ATTACHMENT")return r?e.onInvoke(r,e,d,[...s]):void 0;m(e),c()};return n.jsx(co,{children:e.displayName,onClick:C.composeEventHandlers(a,l),...o})},lo=i.ikp(F.Root,{_id:"aiChatAttachmentsBar__Modal"}),zt=t=>{const{onOpenChange:e,...a}=t,{selectInput:o,isOpen:r,onClose:s,selectedInput:d}=E.useAttachmentsBar(),m=c=>{c||(s(),o(null))};return n.jsx(lo,{open:r&&d!==null,onOpenChange:C.composeEventHandlers(e,m),...a})},Gt=i.ikp(F.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),Yt=i.ikp(F.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),Jt=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),ho=i.ikp(F.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),Xt=t=>{const{selectedInput:e}=E.useAttachmentsBar(),a=`Add ${e?.displayName}`;return n.jsx(ho,{children:a,...t})},Co=i.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),Zt=t=>{const{selectedInput:e}=E.useAttachmentsBar(),a=e?.workflowModalProps?.modalHelpText;return a?n.jsx(Co,{children:a,...t}):null},uo=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),ei=t=>{const{children:e,...a}=t,{selectedInput:o}=E.useAttachmentsBar(),r=o?.workflowModalProps?.modalHelpElement;return r?n.jsx(uo,{asChild:!e,children:e||r,...a}):null},ti=i.ikp(F.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:n.jsx(A.CustomIcon,{iconKey:"close"})}),ii=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),po=i.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),ai=t=>{const{onSubmit:e,...a}=t,{form:o}=E.useAttachmentsBar();return n.jsx(po,{onSubmit:C.composeEventHandlers(e,o.onSubmit),...a})},ni=i.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),bo=i.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),oi=t=>{const{form:e,selectedInput:a}=E.useAttachmentsBar();return n.jsx(bo,{htmlFor:`${a?.id}-title`,children:e.labels.title,...t})},vo=i.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ri=t=>{const{onChange:e,...a}=t,{form:o,selectedInput:r}=E.useAttachmentsBar();return n.jsx(vo,{name:"title",value:o.data.title,id:`${r?.id}-title`,"data-invalid":h.dataAttr(!!o.errors.title),"aria-invalid":!!o.errors.title,onChange:C.composeEventHandlers(e,o.onChange),...a})},go=i.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),si=t=>{const{form:e}=E.useAttachmentsBar();return e.errors.title?n.jsx(go,{"aria-live":"polite",children:e.errors.title,...t}):null},di=i.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),Po=i.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),mi=t=>{const{form:e,selectedInput:a}=E.useAttachmentsBar();return n.jsx(Po,{htmlFor:`${a?.id}-content`,children:e.labels.content,...t})},Fo=i.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ci=t=>{const{onChange:e,...a}=t,{form:o,selectedInput:r}=E.useAttachmentsBar();return n.jsx(Fo,{asChild:!0,rows:4,name:"content",value:o.data.content,id:`${r?.id}-content`,"data-invalid":h.dataAttr(!!o.errors.content),"aria-invalid":!!o.errors.content,onChange:C.composeEventHandlers(e,o.onChange),...a,children:n.jsx(ne,{maxRows:10})})},_o=i.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),li=t=>{const{form:e}=E.useAttachmentsBar();return e.errors.content?n.jsx(_o,{"aria-live":"polite",children:e.errors.content,...t}):null},hi=i.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),Ci=i.ikp("div",{_id:"aiChatActionBar"}),ui=i.ikp("div",{_id:"aiChat__ChatActions"}),pi=i.ikp("div",{_id:"aiChatTagline__Container"}),bi=i.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),vi=i.ikp(Oa.default,{_id:"aiChatTagline__Logo"}),gi=i.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),Ao=i.ikp(y.Trigger,{_id:"aiChat__ChatAction"}),Y=t=>{const{action:e,onClick:a,className:o,...r}=t,{clear:s,stop:d,isLoading:m,messages:c,selectedWorkflow:l}=b.useChat(),{conversation:u}=D.useInkeepConversation(),{aiChatSettings:v,baseSettings:k}=p.useInkeepConfig(),{logEvent:H}=R.useChatEvents(),[V,X]=ie.useCopyToClipboard(),[Q,Z]=ie.useCopyToClipboard();if({help:!1,copy:c.length===0||!v.isCopyChatButtonVisible||m,share:c.length===0||!v.isShareButtonVisible||!u.id||!!l||m,clear:c.length===0||v.isViewOnly||m,stop:!m}[e])return null;const te={help:()=>{},copy:()=>{const $=c.map(w=>{const O=`**${w.role==="assistant"?"AI Assistant":"User"}**`,f=h.getMessageContent(w),B=Da.stringifyAttachments(w.metadata?.attributes?.attachments),U=B?`
8
8
 
9
9
  **Attachments**
10
10
 
11
- ${B}`:"";return`${R}
11
+ ${B}`:"";return`${O}
12
12
 
13
13
  ${f}${U}`}).join(`
14
14
 
15
15
  ---
16
16
 
17
- `);X($)},share:async()=>{const $={visibility:"public",tags:[],userProperties:{},messages:u.messages.map(B=>({...B,createdAt:void 0,updatedAt:void 0,id:Date.now().toString()+B.id,conversationId:void 0}))},{apiKey:w,analyticsApiBaseUrl:R}=k,f=await Ua.logConversation("",$,w,R);if(f){const U=`${v.shareChatUrlBasePath}?${D.SHARE_QUERY_PARAM}=${f?.id}`;Z(U),H({eventName:"chat_share_button_clicked",properties:{sharedConversationId:f?.id,originalConversationId:u.id,sharedChatUrl:U,conversation:f}})}},clear:s,stop:d},pe={copy:V,share:Q};return n.jsx(y.Tooltip,{delayDuration:0,open:pe[e],children:n.jsx(Ao,{"data-type":e,"data-copied":h.dataAttr(V||Q),className:`${o} ${e}`,children:n.jsx(he,{action:e}),onClick:C.composeEventHandlers(a,te[e]),...r})})},Eo=i.ikp("span",{_id:"aiChat__ChatActionLabel"}),he=t=>{const{action:e,...a}=t,{aiChatSettings:o}=p.useInkeepConfig(),r=o.toolbarButtonLabels??{},s={help:r.getHelp??"Get Help",copy:r.copyChat??"Copy",share:r.share??"Share",clear:r.clear??"Clear",stop:r.stop??"Stop"};return n.jsx(Eo,{children:s[e],...a})},ko=i.ikp(y.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),Pi=t=>{const{action:e,children:a,...o}=t,r={copy:"Copied!",share:"Link copied!"};return n.jsxs(ko,{sideOffset:5,...o,children:[n.jsx(y.Arrow,{}),a||r[e]]})},Io=i.ikp(j.Root,{_id:"aiChatHelpActions"}),Fi=t=>{const{children:e,...a}=t,{aiChatSettings:o}=p.useInkeepConfig(),{getHelpOptions:r}=o;if(!r||(r??[]).length===0)return null;const{_pinned:s,_unpinned:d}=r.reduce((u,v)=>{const k=v.isPinnedToToolbar?"_pinned":"_unpinned";return{...u,[k]:[...u[k],v]}},{_pinned:[],_unpinned:[]}),m=d.length===1?[...s,d[0]]:s,c=d.length===1?[]:d,l=ae.useHelpMenuState();return n.jsx(ae.HelpMenuProvider,{value:l,children:n.jsx(Io,{open:l.open,onOpenChange:l.setOpen,children:h.maybeRender(e,{pinned:m,unpinned:c}),...a})})},Mo=i.ikp(Y,{_id:"aiChatHelpAction",action:"help"}),xo=i.ikp("a",{_id:"aiChatHelpAction",target:"_blank",rel:"noreferrer"}),_i=t=>{const{action:e,onClick:a,...o}=t,{handleAction:r,logHelpAction:s}=re.useChatAction(e),d=e.action.type,m={"aria-label":e.name,"data-name":e.name,children:e.name,onClick:C.composeEventHandlers(a,()=>{r(),s()}),...o};return d==="open_link"?n.jsx(xo,{href:e.action.url,...m}):n.jsx(Mo,{...m})},So=i.ikp(j.Trigger,{_id:"aiChatHelpActions__Trigger"}),Ai=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig();return n.jsx(Y,{action:"help",...t,asChild:!0,children:n.jsx(So,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),fo=i.ikp(j.Content,{_id:"aiChatHelpActions__Menu"}),Ei=t=>n.jsx(fo,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),ki=i.ikp(j.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),Ii=t=>{const{action:e,onClick:a,...o}=t,{handleAction:r,logHelpAction:s}=re.useChatAction(e),{setOpen:d}=ae.useHelpMenu(),m=()=>{r({onOpenForm:()=>d(!1)}),s()},c=e.action.type,l=i.ikp(c==="open_link"?"a":"button",{_id:"aiChatHelpActions__MenuItem",children:e.name,"aria-label":e.name,"data-name":e.name,"data-type":e.action.type,...c==="open_link"&&{href:e.action.url,target:"_blank",rel:"noopener"},onClick:C.composeEventHandlers(a,m)});return n.jsx(l,{...o})},Bo=i.ikp(M.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),Mi=t=>{const{action:e,...a}=t;return e.icon?n.jsx(Bo,{iconSettings:e.icon,...a}):null},To=i.ikp(F.Root,{_id:"aiChatFeedbackModal"}),xi=t=>{const{onOpenChange:e,...a}=t,{currentFeedback:o,setCurrentFeedback:r}=oe.useMessageFeedback();return n.jsx(To,{open:o!==null,onOpenChange:C.composeEventHandlers(e,()=>r(null)),...a})},Si=i.ikp(F.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),fi=i.ikp(F.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),Bi=i.ikp(F.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),Ti=i.ikp(F.Close,{_id:"aiChatFeedbackModal__Close",children:n.jsx(A.CustomIcon,{iconKey:"close"})}),ji=i.ikp("div",{_id:"aiChatFeedbackModal__Body"}),jo=i.ikp("form",{_id:"aiChatFeedbackForm"}),yi=t=>{const{onSubmit:e,...a}=t,{submitNegativeFeedback:o,currentFeedback:r,setCurrentFeedback:s}=oe.useMessageFeedback(),d=m=>{m.preventDefault();const c=m.target,l=new FormData(c),u=Object.fromEntries(l.entries());r&&(o(r,u),s(null))};return n.jsx(jo,{onSubmit:C.composeEventHandlers(e,d),...a})},yo=i.ikp("div",{_id:"aiChatFeedbackItem"}),Hi=t=>{const{name:e,...a}=t;return n.jsx(z.FeedbackItemProvider,{name:e,children:n.jsx(yo,{...a})})},Ho=i.ikp(G.Root,{_id:"aiChatFeedbackItem__Checkbox"}),wi=t=>{const{name:e,focusItem:a}=z.useFeedbackItem(),{onCheckedChange:o,...r}=t,s=d=>{d&&a?.current?.focus()};return n.jsx(Ho,{id:`feedback-${e}`,name:e,onCheckedChange:C.composeEventHandlers(o,s),...r})},Li=i.ikp(G.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:n.jsx(ge.CheckboxIcon,{})}),wo=i.ikp("label",{_id:"aiChatFeedbackItem__Label"}),Di=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(wo,{htmlFor:`feedback-${e}`,children:a[e],...t})},Lo=i.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),Ri=t=>{const{name:e,focusItem:a}=z.useFeedbackItem();return n.jsx(Lo,{ref:a,name:`${e}:description`,...t})},Oi=i.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),Do=i.ikp("div",{_id:"aiChatForm__Wrapper"}),qi=t=>{const{form:e}=_.useChatForm();return e?n.jsx(Do,{...t}):null},Ro=i.ikp("form",{_id:"aiChatForm"}),Wi=t=>{const{onSubmit:e,...a}=t,{handleSubmit:o,isSuccess:r}=_.useChatForm();return r?null:n.jsx(Ro,{onSubmit:C.composeEventHandlers(e,o),...a})},Oo=i.ikp("button",{_id:"aiChatForm__Close",children:n.jsx(A.CustomIcon,{iconKey:"close"})}),Ni=t=>{const{onClick:e,...a}=t,{closeForm:o}=_.useChatForm();return n.jsx(Oo,{onClick:C.composeEventHandlers(e,o),...a})},Vi=i.ikp("div",{_id:"aiChatForm__Header"}),qo=i.ikp("h2",{_id:"aiChatForm__Heading"}),Qi=t=>{const{form:e}=_.useChatForm();return e?.heading?n.jsx(qo,{children:e.heading,...t}):null},Wo=i.ikp(K.Markdown,{_id:"aiChatForm__Description"}),$i=t=>{const{form:e}=_.useChatForm();return e?.description?n.jsx(Wo,{children:e.description,...t}):null},No=i.ikp("div",{_id:"aiChatForm__Content"}),Ui=t=>{const{children:e,...a}=t,{fields:o=[]}=_.useChatForm();return n.jsx(No,{children:h.maybeRender(e,o),...a})},Vo=i.ikp("div",{_id:"aiChatForm__Field"}),Ki=t=>{const{field:e,autoFocus:a,...o}=t,{control:r,errors:s}=_.useChatForm();return n.jsx(Wa.Controller,{name:e.name,control:r,rules:{required:e.isRequired?`${e.label} is required.`:void 0},render:({field:d})=>{const m=d.value!==void 0||e.inputType==="file";return n.jsx(x.FormFieldProvider,{"data-invalid":h.dataAttr(!!s[e.name]),field:e,fieldProps:d,autoFocus:a,children:m&&n.jsx(Vo,{"data-input-type":e.inputType,"data-hidden":h.dataAttr(e.isHidden),...o})})}})},Qo=i.ikp("label",{_id:"aiChatForm__FieldLabel"}),zi=t=>{const{field:e}=x.useFormField();return n.jsx(Qo,{"data-required":h.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},$o=i.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),J=t=>{const{field:e,error:a,fieldProps:{onChange:o,onBlur:r,...s},autoFocus:d}=x.useFormField(),{onChange:m,onBlur:c,...l}=t;return n.jsx($o,{id:e.name,autoFocus:d,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":h.dataAttr(!!a),onChange:C.composeEventHandlers(m,o),onBlur:C.composeEventHandlers(c,r),...s,...l})},Gi=i.ikp(J,{_id:"aiChatForm__FieldEmail",type:"email"}),Uo=i.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),Yi=t=>{const{field:e,error:a,fieldProps:{value:o,onChange:r,onBlur:s,...d},autoFocus:m}=x.useFormField(),{onChange:c,onBlur:l,...u}=t,v=k=>{const H=k.target.files;r(H)};return n.jsx(Uo,{id:e.name,autoFocus:m,"data-value":o,"data-invalid":h.dataAttr(!!a),...u,...d,onChange:C.composeEventHandlers(c,v),onBlur:C.composeEventHandlers(l,s)})},Ji=i.ikp(J,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:n.jsx(ne,{maxRows:8})}),Ko=i.ikp(G.Root,{_id:"aiChatForm__FieldCheckbox"}),Xi=t=>{const{field:e,error:a,fieldProps:o,autoFocus:r}=x.useFormField(),{onCheckedChange:s,...d}=t;return n.jsx(Ko,{id:e.name,name:e.name,autoFocus:r,"data-invalid":h.dataAttr(!!a),checked:o.value,onCheckedChange:C.composeEventHandlers(s,o.onChange),...d})},Zi=i.ikp(G.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:n.jsx(ge.CheckboxIcon,{})}),zo=i.ikp(S.Root,{_id:"aiChatForm__FieldSelect"}),ea=t=>{const{field:e,error:a,fieldProps:o}=x.useFormField(),{onValueChange:r,...s}=t;return n.jsx(zo,{name:e.name,"data-invalid":h.dataAttr(!!a),value:o.value,onValueChange:C.composeEventHandlers(r,o.onChange),...s})},ta=i.ikp(S.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),Go=i.ikp(S.Value,{_id:"aiChatForm__FieldSelect__Value"}),ia=t=>{const{field:e}=x.useFormField();return n.jsx(Go,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},aa=i.ikp(S.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:n.jsx(M.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),na=i.ikp(S.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),oa=i.ikp(S.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),ra=i.ikp(S.Item,{_id:"aiChatForm__FieldSelect__Item"}),sa=i.ikp(S.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),da=i.ikp(S.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:n.jsx(M.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),ma=t=>{const{field:e,error:a,fieldProps:o,autoFocus:r}=x.useFormField(),s=Ya.useShadow();if(e.inputType!=="combobox")return null;const{onValueChange:d,children:m,...c}=t,l=s?.shadowHost?()=>s.shadowHost.shadowRoot??document:void 0;return n.jsx(I.ComboboxRoot,{...c,id:e.name,name:e.name,items:e.items??[],defaultValue:e.defaultValue,onValueChange:C.composeEventHandlers(d,o.onChange),multiple:e.multiple,placeholder:"placeholder"in e?e.placeholder:void 0,invalid:!!a,autoFocus:r,getRootNode:l,children:m})},ca=i.ikp(I.ComboboxControl,{_id:"aiChatForm__FieldCombobox__Control"}),la=i.ikp(I.ComboboxInput,{_id:"aiChatForm__FieldCombobox__Input"}),ha=i.ikp(I.ComboboxTrigger,{_id:"aiChatForm__FieldCombobox__Trigger",children:n.jsx(M.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),Ca=i.ikp(I.ComboboxPositioner,{_id:"aiChatForm__FieldCombobox__Positioner"}),ua=i.ikp(I.ComboboxContent,{_id:"aiChatForm__FieldCombobox__Content"}),pa=i.ikp(I.ComboboxItem,{_id:"aiChatForm__FieldCombobox__Item"}),ba=i.ikp(I.ComboboxItemText,{_id:"aiChatForm__FieldCombobox__ItemText"}),va=i.ikp(I.ComboboxSelectedTags,{_id:"aiChatForm__FieldCombobox__SelectedTags"}),ga=i.ikp(I.ComboboxItemIndicator,{_id:"aiChatForm__FieldCombobox__ItemIndicator",children:n.jsx(M.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),Yo=i.ikp("p",{_id:"aiChatForm__FieldDescription"}),Pa=t=>{const{field:e}=x.useFormField();return e.description?n.jsx(Yo,{children:e.description,...t}):null},Jo=i.ikp("span",{_id:"aiChatForm__FieldError"}),Fa=t=>{const{error:e}=x.useFormField();return e?n.jsx(Jo,{children:e.message?.toString(),...t}):null},Xo=i.ikp("span",{_id:"aiChatForm__Error"}),_a=t=>{const{formError:e}=_.useChatForm();return e?n.jsx(Xo,{children:e.message,...t}):null},Aa=i.ikp("div",{_id:"aiChatForm__Footer"}),Zo=i.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel",type:"button"}),Ea=t=>{const{onClick:e,...a}=t,{closeForm:o}=_.useChatForm();return n.jsx(Zo,{onClick:C.composeEventHandlers(e,o),...a})},er=i.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),ka=t=>{const{onClick:e,...a}=t,{isSubmitting:o,form:r}=_.useChatForm(),s=r?.buttons.submit.label||"Submit";return n.jsx(er,{disabled:o,...a,children:s})},tr=i.ikp("div",{_id:"aiChatForm__Success"}),Ia=t=>{const{isSuccess:e}=_.useChatForm();return e?n.jsx(tr,{...t}):null},ir=i.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),Ma=t=>{const{form:e}=_.useChatForm();return n.jsx(ir,{children:e?.successView?.heading,...t})},ar=i.ikp(K.Markdown,{_id:"aiChatForm__SuccessMessage"}),xa=t=>{const{form:e}=_.useChatForm();return n.jsx(ar,{children:e?.successView?.message,...t})},nr=i.ikp("button",{_id:"aiChatForm__SuccessButton"}),Sa=t=>{const{onClick:e,...a}=t,{form:o,closeForm:r}=_.useChatForm(),s=o?.successView?.doneButton;if(!s)return null;const d=s.icon&&n.jsx(M.BuiltInIconRenderer,{iconSettings:s.icon}),m=s.label;return n.jsx(nr,{onClick:C.composeEventHandlers(e,r),children:n.jsxs(n.Fragment,{children:[d,m]}),...a})};exports.Provider=b.ChatProvider;exports.ActionBar=Ci;exports.Actions=ui;exports.AttachmentsBar=Lt;exports.AttachmentsBarActions=Nt;exports.AttachmentsBarAttachment=Rt;exports.AttachmentsBarAttachmentDelete=Wt;exports.AttachmentsBarAttachmentIcon=Ot;exports.AttachmentsBarAttachmentTitle=qt;exports.AttachmentsBarForm=ai;exports.AttachmentsBarFormContent=di;exports.AttachmentsBarFormContentError=li;exports.AttachmentsBarFormContentInput=ci;exports.AttachmentsBarFormContentLabel=mi;exports.AttachmentsBarFormSubmitButton=hi;exports.AttachmentsBarFormTitle=ni;exports.AttachmentsBarFormTitleError=si;exports.AttachmentsBarFormTitleInput=ri;exports.AttachmentsBarFormTitleLabel=oi;exports.AttachmentsBarInfoTip=Vt;exports.AttachmentsBarInfoTipArrow=le;exports.AttachmentsBarInfoTipIcon=Qt;exports.AttachmentsBarInfoTipText=$t;exports.AttachmentsBarInput=Kt;exports.AttachmentsBarInputs=Ut;exports.AttachmentsBarList=Dt;exports.AttachmentsBarModal=zt;exports.AttachmentsBarModalBody=ii;exports.AttachmentsBarModalClose=ti;exports.AttachmentsBarModalContent=Yt;exports.AttachmentsBarModalDescription=Zt;exports.AttachmentsBarModalHeader=Jt;exports.AttachmentsBarModalHeading=Xt;exports.AttachmentsBarModalHelp=ei;exports.AttachmentsBarModalOverlay=Gt;exports.ChatAction=Y;exports.ChatActionFeedback=Pi;exports.ChatActionLabel=he;exports.ChatHelpAction=_i;exports.Content=Ie;exports.ContentScrollArea=Me;exports.ContentScrollAreaCorner=Be;exports.ContentScrollAreaScrollbar=Se;exports.ContentScrollAreaThumb=fe;exports.ContentScrollAreaViewport=xe;exports.ConversationLoading=Fe;exports.Disclaimer=je;exports.DisclaimerArrow=De;exports.DisclaimerContent=we;exports.DisclaimerLabel=ye;exports.DisclaimerText=Le;exports.DisclaimerTrigger=He;exports.EmbeddedChatPrimitiveActionBar=Ci;exports.EmbeddedChatPrimitiveActions=ui;exports.EmbeddedChatPrimitiveAttachmentsBar=Lt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=Nt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=qt;exports.EmbeddedChatPrimitiveAttachmentsBarForm=ai;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=di;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=li;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=ci;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=mi;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=hi;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=ni;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=si;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=ri;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=oi;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=le;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=Qt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=$t;exports.EmbeddedChatPrimitiveAttachmentsBarInput=Kt;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarList=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=ii;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=ti;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=Yt;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=Jt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=ei;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Gt;exports.EmbeddedChatPrimitiveChatAction=Y;exports.EmbeddedChatPrimitiveChatActionFeedback=Pi;exports.EmbeddedChatPrimitiveChatActionLabel=he;exports.EmbeddedChatPrimitiveChatHelpAction=_i;exports.EmbeddedChatPrimitiveContent=Ie;exports.EmbeddedChatPrimitiveContentScrollArea=Me;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=Be;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=Se;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=fe;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=xe;exports.EmbeddedChatPrimitiveConversationLoading=Fe;exports.EmbeddedChatPrimitiveDisclaimer=je;exports.EmbeddedChatPrimitiveDisclaimerArrow=De;exports.EmbeddedChatPrimitiveDisclaimerContent=we;exports.EmbeddedChatPrimitiveDisclaimerLabel=ye;exports.EmbeddedChatPrimitiveDisclaimerText=Le;exports.EmbeddedChatPrimitiveDisclaimerTrigger=He;exports.EmbeddedChatPrimitiveExampleQuestion=We;exports.EmbeddedChatPrimitiveExampleQuestionButton=Ne;exports.EmbeddedChatPrimitiveExampleQuestions=Re;exports.EmbeddedChatPrimitiveExampleQuestionsLabel=Oe;exports.EmbeddedChatPrimitiveExampleQuestionsList=qe;exports.EmbeddedChatPrimitiveFeedbackForm=yi;exports.EmbeddedChatPrimitiveFeedbackItem=Hi;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=wi;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=Li;exports.EmbeddedChatPrimitiveFeedbackItemDescription=Ri;exports.EmbeddedChatPrimitiveFeedbackItemLabel=Di;exports.EmbeddedChatPrimitiveFeedbackModal=xi;exports.EmbeddedChatPrimitiveFeedbackModalBody=ji;exports.EmbeddedChatPrimitiveFeedbackModalClose=Ti;exports.EmbeddedChatPrimitiveFeedbackModalContent=fi;exports.EmbeddedChatPrimitiveFeedbackModalHeader=Bi;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=Si;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=Oi;exports.EmbeddedChatPrimitiveFooter=Bt;exports.EmbeddedChatPrimitiveForm=Wi;exports.EmbeddedChatPrimitiveFormCancel=Ea;exports.EmbeddedChatPrimitiveFormClose=Ni;exports.EmbeddedChatPrimitiveFormContent=Ui;exports.EmbeddedChatPrimitiveFormDescription=$i;exports.EmbeddedChatPrimitiveFormError=_a;exports.EmbeddedChatPrimitiveFormField=Ki;exports.EmbeddedChatPrimitiveFormFieldCheckbox=Xi;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=Zi;exports.EmbeddedChatPrimitiveFormFieldCombobox=ma;exports.EmbeddedChatPrimitiveFormFieldComboboxContent=ua;exports.EmbeddedChatPrimitiveFormFieldComboboxControl=ca;exports.EmbeddedChatPrimitiveFormFieldComboboxInput=la;exports.EmbeddedChatPrimitiveFormFieldComboboxItem=pa;exports.EmbeddedChatPrimitiveFormFieldComboboxItemIndicator=ga;exports.EmbeddedChatPrimitiveFormFieldComboboxItemText=ba;exports.EmbeddedChatPrimitiveFormFieldComboboxPositioner=Ca;exports.EmbeddedChatPrimitiveFormFieldComboboxSelectedTags=va;exports.EmbeddedChatPrimitiveFormFieldComboboxTrigger=ha;exports.EmbeddedChatPrimitiveFormFieldDescription=Pa;exports.EmbeddedChatPrimitiveFormFieldEmail=Gi;exports.EmbeddedChatPrimitiveFormFieldError=Fa;exports.EmbeddedChatPrimitiveFormFieldFile=Yi;exports.EmbeddedChatPrimitiveFormFieldLabel=zi;exports.EmbeddedChatPrimitiveFormFieldSelect=ea;exports.EmbeddedChatPrimitiveFormFieldSelectContent=na;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=aa;exports.EmbeddedChatPrimitiveFormFieldSelectItem=ra;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=da;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=sa;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=ta;exports.EmbeddedChatPrimitiveFormFieldSelectValue=ia;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=oa;exports.EmbeddedChatPrimitiveFormFieldText=J;exports.EmbeddedChatPrimitiveFormFieldTextArea=Ji;exports.EmbeddedChatPrimitiveFormFooter=Aa;exports.EmbeddedChatPrimitiveFormHeader=Vi;exports.EmbeddedChatPrimitiveFormHeading=Qi;exports.EmbeddedChatPrimitiveFormSubmit=ka;exports.EmbeddedChatPrimitiveFormSuccess=Ia;exports.EmbeddedChatPrimitiveFormSuccessButton=Sa;exports.EmbeddedChatPrimitiveFormSuccessHeading=Ma;exports.EmbeddedChatPrimitiveFormSuccessMessage=xa;exports.EmbeddedChatPrimitiveFormWrapper=qi;exports.EmbeddedChatPrimitiveHeaderToolbar=Ae;exports.EmbeddedChatPrimitiveHelpActions=Fi;exports.EmbeddedChatPrimitiveHelpActionsMenu=Ei;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=ki;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=Ii;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=Mi;exports.EmbeddedChatPrimitiveHelpActionsTrigger=Ai;exports.EmbeddedChatPrimitiveInput=yt;exports.EmbeddedChatPrimitiveInputFieldset=Tt;exports.EmbeddedChatPrimitiveInputGroup=jt;exports.EmbeddedChatPrimitiveIntroMessageWrapper=Ke;exports.EmbeddedChatPrimitiveMessage=ut;exports.EmbeddedChatPrimitiveMessageAction=gt;exports.EmbeddedChatPrimitiveMessageAttachments=at;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=ot;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=st;exports.EmbeddedChatPrimitiveMessageAttachmentsList=nt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=dt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=Ct;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=ht;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=ct;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=lt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=mt;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=At;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=Et;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=xt;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=St;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=kt;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=ft;exports.EmbeddedChatPrimitiveMessageSourceItemTag=Mt;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=It;exports.EmbeddedChatPrimitiveMessageSources=Pt;exports.EmbeddedChatPrimitiveMessageSourcesHeader=Ft;exports.EmbeddedChatPrimitiveMessageSourcesList=_t;exports.EmbeddedChatPrimitiveMessageToolAction=vt;exports.EmbeddedChatPrimitiveMessageToolActions=bt;exports.EmbeddedChatPrimitiveMessageToolbar=pt;exports.EmbeddedChatPrimitiveMessageWrapper=ce;exports.EmbeddedChatPrimitiveMessages=Te;exports.EmbeddedChatPrimitiveRoot=_e;exports.EmbeddedChatPrimitiveSendButton=Ht;exports.EmbeddedChatPrimitiveSendButtonIcon=wt;exports.EmbeddedChatPrimitiveTaglineBrandName=gi;exports.EmbeddedChatPrimitiveTaglineContainer=pi;exports.EmbeddedChatPrimitiveTaglineLogo=vi;exports.EmbeddedChatPrimitiveTaglineText=bi;exports.EmbeddedChatPrimitiveToolbarHeader=ke;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=Ee;exports.EmbeddedChatPrimitiveWorkflow=Ue;exports.EmbeddedChatPrimitiveWorkflows=Ve;exports.EmbeddedChatPrimitiveWorkflowsLabel=Qe;exports.EmbeddedChatPrimitiveWorkflowsList=$e;exports.EmbeddedChatPrimitiveWrapper=Pe;exports.ExampleQuestion=We;exports.ExampleQuestionButton=Ne;exports.ExampleQuestions=Re;exports.ExampleQuestionsLabel=Oe;exports.ExampleQuestionsList=qe;exports.FeedbackForm=yi;exports.FeedbackItem=Hi;exports.FeedbackItemCheckbox=wi;exports.FeedbackItemCheckboxIndicator=Li;exports.FeedbackItemDescription=Ri;exports.FeedbackItemLabel=Di;exports.FeedbackModal=xi;exports.FeedbackModalBody=ji;exports.FeedbackModalClose=Ti;exports.FeedbackModalContent=fi;exports.FeedbackModalHeader=Bi;exports.FeedbackModalOverlay=Si;exports.FeedbackSubmitButton=Oi;exports.Footer=Bt;exports.Form=Wi;exports.FormCancel=Ea;exports.FormClose=Ni;exports.FormContent=Ui;exports.FormDescription=$i;exports.FormError=_a;exports.FormField=Ki;exports.FormFieldCheckbox=Xi;exports.FormFieldCheckboxIndicator=Zi;exports.FormFieldCombobox=ma;exports.FormFieldComboboxContent=ua;exports.FormFieldComboboxControl=ca;exports.FormFieldComboboxInput=la;exports.FormFieldComboboxItem=pa;exports.FormFieldComboboxItemIndicator=ga;exports.FormFieldComboboxItemText=ba;exports.FormFieldComboboxPositioner=Ca;exports.FormFieldComboboxSelectedTags=va;exports.FormFieldComboboxTrigger=ha;exports.FormFieldDescription=Pa;exports.FormFieldEmail=Gi;exports.FormFieldError=Fa;exports.FormFieldFile=Yi;exports.FormFieldLabel=zi;exports.FormFieldSelect=ea;exports.FormFieldSelectContent=na;exports.FormFieldSelectIcon=aa;exports.FormFieldSelectItem=ra;exports.FormFieldSelectItemIndicator=da;exports.FormFieldSelectItemText=sa;exports.FormFieldSelectTrigger=ta;exports.FormFieldSelectValue=ia;exports.FormFieldSelectViewport=oa;exports.FormFieldText=J;exports.FormFieldTextArea=Ji;exports.FormFooter=Aa;exports.FormHeader=Vi;exports.FormHeading=Qi;exports.FormSubmit=ka;exports.FormSuccess=Ia;exports.FormSuccessButton=Sa;exports.FormSuccessHeading=Ma;exports.FormSuccessMessage=xa;exports.FormWrapper=qi;exports.Header=tn;exports.HeaderToolbar=Ae;exports.HeaderToolbarWrapper=Ee;exports.HelpActions=Fi;exports.HelpActionsMenu=Ei;exports.HelpActionsMenuArrow=ki;exports.HelpActionsMenuItem=Ii;exports.HelpActionsMenuItemIcon=Mi;exports.HelpActionsTrigger=Ai;exports.Input=yt;exports.InputFieldset=Tt;exports.InputGroup=jt;exports.IntroMessageWrapper=Ke;exports.Message=ut;exports.MessageAction=gt;exports.MessageAttachments=at;exports.MessageAttachmentsItem=ot;exports.MessageAttachmentsItemIcon=rt;exports.MessageAttachmentsItemTitle=st;exports.MessageAttachmentsList=nt;exports.MessageAttachmentsPreview=dt;exports.MessageAttachmentsPreviewBody=Ct;exports.MessageAttachmentsPreviewClose=ht;exports.MessageAttachmentsPreviewContent=ct;exports.MessageAttachmentsPreviewHeader=lt;exports.MessageAttachmentsPreviewOverlay=mt;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=At;exports.MessageSourceItemBreadcrumbIcon=Kn;exports.MessageSourceItemBreadcrumbs=Et;exports.MessageSourceItemDescription=xt;exports.MessageSourceItemDescriptionPart=St;exports.MessageSourceItemIcon=kt;exports.MessageSourceItemIndicator=ft;exports.MessageSourceItemTag=Mt;exports.MessageSourceItemTitle=It;exports.MessageSources=Pt;exports.MessageSourcesHeader=Ft;exports.MessageSourcesList=_t;exports.MessageToolAction=vt;exports.MessageToolActions=bt;exports.MessageToolbar=pt;exports.MessageWrapper=ce;exports.Messages=Te;exports.Root=_e;exports.SendButton=Ht;exports.SendButtonIcon=wt;exports.TaglineBrandName=gi;exports.TaglineContainer=pi;exports.TaglineLogo=vi;exports.TaglineText=bi;exports.ToolbarHeader=ke;exports.Workflow=Ue;exports.Workflows=Ve;exports.WorkflowsLabel=Qe;exports.WorkflowsList=$e;exports.Wrapper=Pe;
17
+ `);X($)},share:async()=>{const $={visibility:"public",tags:[],userProperties:{},messages:u.messages.map(B=>({...B,createdAt:void 0,updatedAt:void 0,id:Date.now().toString()+B.id,conversationId:void 0}))},{apiKey:w,analyticsApiBaseUrl:O}=k,f=await Ua.logConversation("",$,w,O);if(f){const U=`${v.shareChatUrlBasePath}?${D.SHARE_QUERY_PARAM}=${f?.id}`;Z(U),H({eventName:"chat_share_button_clicked",properties:{sharedConversationId:f?.id,originalConversationId:u.id,sharedChatUrl:U,conversation:f}})}},clear:s,stop:d},pe={copy:V,share:Q};return n.jsx(y.Tooltip,{delayDuration:0,open:pe[e],children:n.jsx(Ao,{"data-type":e,"data-copied":h.dataAttr(V||Q),className:`${o} ${e}`,children:n.jsx(he,{action:e}),onClick:C.composeEventHandlers(a,te[e]),...r})})},Eo=i.ikp("span",{_id:"aiChat__ChatActionLabel"}),he=t=>{const{action:e,...a}=t,{aiChatSettings:o}=p.useInkeepConfig(),r=o.toolbarButtonLabels??{},s={help:r.getHelp??"Get Help",copy:r.copyChat??"Copy",share:r.share??"Share",clear:r.clear??"Clear",stop:r.stop??"Stop"};return n.jsx(Eo,{children:s[e],...a})},ko=i.ikp(y.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),Pi=t=>{const{action:e,children:a,...o}=t,r={copy:"Copied!",share:"Link copied!"};return n.jsxs(ko,{sideOffset:5,...o,children:[n.jsx(y.Arrow,{}),a||r[e]]})},Io=i.ikp(j.Root,{_id:"aiChatHelpActions"}),Fi=t=>{const{children:e,...a}=t,{aiChatSettings:o}=p.useInkeepConfig(),{getHelpOptions:r}=o;if(!r||(r??[]).length===0)return null;const{_pinned:s,_unpinned:d}=r.reduce((u,v)=>{const k=v.isPinnedToToolbar?"_pinned":"_unpinned";return{...u,[k]:[...u[k],v]}},{_pinned:[],_unpinned:[]}),m=d.length===1?[...s,d[0]]:s,c=d.length===1?[]:d,l=ae.useHelpMenuState();return n.jsx(ae.HelpMenuProvider,{value:l,children:n.jsx(Io,{open:l.open,onOpenChange:l.setOpen,children:h.maybeRender(e,{pinned:m,unpinned:c}),...a})})},Mo=i.ikp(Y,{_id:"aiChatHelpAction",action:"help"}),xo=i.ikp("a",{_id:"aiChatHelpAction",target:"_blank",rel:"noreferrer"}),_i=t=>{const{action:e,onClick:a,...o}=t,{handleAction:r,logHelpAction:s}=re.useChatAction(e),d=e.action.type,m={"aria-label":e.name,"data-name":e.name,children:e.name,onClick:C.composeEventHandlers(a,()=>{r(),s()}),...o};return d==="open_link"?n.jsx(xo,{href:e.action.url,...m}):n.jsx(Mo,{...m})},So=i.ikp(j.Trigger,{_id:"aiChatHelpActions__Trigger"}),Ai=g.memo(t=>{const{aiChatSettings:e}=p.useInkeepConfig();return n.jsx(Y,{action:"help",...t,asChild:!0,children:n.jsx(So,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),fo=i.ikp(j.Content,{_id:"aiChatHelpActions__Menu"}),Ei=t=>n.jsx(fo,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),ki=i.ikp(j.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),Ii=t=>{const{action:e,onClick:a,...o}=t,{handleAction:r,logHelpAction:s}=re.useChatAction(e),{setOpen:d}=ae.useHelpMenu(),m=()=>{r({onOpenForm:()=>d(!1)}),s()},c=e.action.type,l=i.ikp(c==="open_link"?"a":"button",{_id:"aiChatHelpActions__MenuItem",children:e.name,"aria-label":e.name,"data-name":e.name,"data-type":e.action.type,...c==="open_link"&&{href:e.action.url,target:"_blank",rel:"noopener"},onClick:C.composeEventHandlers(a,m)});return n.jsx(l,{...o})},Bo=i.ikp(M.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),Mi=t=>{const{action:e,...a}=t;return e.icon?n.jsx(Bo,{iconSettings:e.icon,...a}):null},To=i.ikp(F.Root,{_id:"aiChatFeedbackModal"}),xi=t=>{const{onOpenChange:e,...a}=t,{currentFeedback:o,setCurrentFeedback:r}=oe.useMessageFeedback();return n.jsx(To,{open:o!==null,onOpenChange:C.composeEventHandlers(e,()=>r(null)),...a})},Si=i.ikp(F.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),fi=i.ikp(F.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),Bi=i.ikp(F.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),Ti=i.ikp(F.Close,{_id:"aiChatFeedbackModal__Close",children:n.jsx(A.CustomIcon,{iconKey:"close"})}),ji=i.ikp("div",{_id:"aiChatFeedbackModal__Body"}),jo=i.ikp("form",{_id:"aiChatFeedbackForm"}),yi=t=>{const{onSubmit:e,...a}=t,{submitNegativeFeedback:o,currentFeedback:r,setCurrentFeedback:s}=oe.useMessageFeedback(),d=m=>{m.preventDefault();const c=m.target,l=new FormData(c),u=Object.fromEntries(l.entries());r&&(o(r,u),s(null))};return n.jsx(jo,{onSubmit:C.composeEventHandlers(e,d),...a})},yo=i.ikp("div",{_id:"aiChatFeedbackItem"}),Hi=t=>{const{name:e,...a}=t;return n.jsx(z.FeedbackItemProvider,{name:e,children:n.jsx(yo,{...a})})},Ho=i.ikp(G.Root,{_id:"aiChatFeedbackItem__Checkbox"}),wi=t=>{const{name:e,focusItem:a}=z.useFeedbackItem(),{onCheckedChange:o,...r}=t,s=d=>{d&&a?.current?.focus()};return n.jsx(Ho,{id:`feedback-${e}`,name:e,onCheckedChange:C.composeEventHandlers(o,s),...r})},Li=i.ikp(G.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:n.jsx(ge.CheckboxIcon,{})}),wo=i.ikp("label",{_id:"aiChatFeedbackItem__Label"}),Di=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(wo,{htmlFor:`feedback-${e}`,children:a[e],...t})},Lo=i.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),Oi=t=>{const{name:e,focusItem:a}=z.useFeedbackItem();return n.jsx(Lo,{ref:a,name:`${e}:description`,...t})},Ri=i.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),Do=i.ikp("div",{_id:"aiChatForm__Wrapper"}),qi=t=>{const{form:e}=_.useChatForm();return e?n.jsx(Do,{...t}):null},Oo=i.ikp("form",{_id:"aiChatForm"}),Wi=t=>{const{onSubmit:e,...a}=t,{handleSubmit:o,isSuccess:r}=_.useChatForm();return r?null:n.jsx(Oo,{onSubmit:C.composeEventHandlers(e,o),...a})},Ro=i.ikp("button",{_id:"aiChatForm__Close",children:n.jsx(A.CustomIcon,{iconKey:"close"})}),Ni=t=>{const{onClick:e,...a}=t,{closeForm:o}=_.useChatForm();return n.jsx(Ro,{onClick:C.composeEventHandlers(e,o),...a})},Vi=i.ikp("div",{_id:"aiChatForm__Header"}),qo=i.ikp("h2",{_id:"aiChatForm__Heading"}),Qi=t=>{const{form:e}=_.useChatForm();return e?.heading?n.jsx(qo,{children:e.heading,...t}):null},Wo=i.ikp(K.Markdown,{_id:"aiChatForm__Description"}),$i=t=>{const{form:e}=_.useChatForm();return e?.description?n.jsx(Wo,{shouldOpenLinksInNewTab:!0,children:e.description,...t}):null},No=i.ikp("div",{_id:"aiChatForm__Content"}),Ui=t=>{const{children:e,...a}=t,{fields:o=[]}=_.useChatForm();return n.jsx(No,{children:h.maybeRender(e,o),...a})},Vo=i.ikp("div",{_id:"aiChatForm__Field"}),Ki=t=>{const{field:e,autoFocus:a,...o}=t,{control:r,errors:s}=_.useChatForm();return n.jsx(Wa.Controller,{name:e.name,control:r,rules:{required:e.isRequired?`${e.label} is required.`:void 0},render:({field:d})=>{const m=d.value!==void 0||e.inputType==="file";return n.jsx(x.FormFieldProvider,{"data-invalid":h.dataAttr(!!s[e.name]),field:e,fieldProps:d,autoFocus:a,children:m&&n.jsx(Vo,{"data-input-type":e.inputType,"data-hidden":h.dataAttr(e.isHidden),...o})})}})},Qo=i.ikp("label",{_id:"aiChatForm__FieldLabel"}),zi=t=>{const{field:e}=x.useFormField();return n.jsx(Qo,{"data-required":h.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},$o=i.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),J=t=>{const{field:e,error:a,fieldProps:{onChange:o,onBlur:r,...s},autoFocus:d}=x.useFormField(),{onChange:m,onBlur:c,...l}=t;return n.jsx($o,{id:e.name,autoFocus:d,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":h.dataAttr(!!a),onChange:C.composeEventHandlers(m,o),onBlur:C.composeEventHandlers(c,r),...s,...l})},Gi=i.ikp(J,{_id:"aiChatForm__FieldEmail",type:"email"}),Uo=i.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),Yi=t=>{const{field:e,error:a,fieldProps:{value:o,onChange:r,onBlur:s,...d},autoFocus:m}=x.useFormField(),{onChange:c,onBlur:l,...u}=t,v=k=>{const H=k.target.files;r(H)};return n.jsx(Uo,{id:e.name,autoFocus:m,"data-value":o,"data-invalid":h.dataAttr(!!a),...u,...d,onChange:C.composeEventHandlers(c,v),onBlur:C.composeEventHandlers(l,s)})},Ji=i.ikp(J,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:n.jsx(ne,{maxRows:8})}),Ko=i.ikp(G.Root,{_id:"aiChatForm__FieldCheckbox"}),Xi=t=>{const{field:e,error:a,fieldProps:o,autoFocus:r}=x.useFormField(),{onCheckedChange:s,...d}=t;return n.jsx(Ko,{id:e.name,name:e.name,autoFocus:r,"data-invalid":h.dataAttr(!!a),checked:o.value,onCheckedChange:C.composeEventHandlers(s,o.onChange),...d})},Zi=i.ikp(G.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:n.jsx(ge.CheckboxIcon,{})}),zo=i.ikp(S.Root,{_id:"aiChatForm__FieldSelect"}),ea=t=>{const{field:e,error:a,fieldProps:o}=x.useFormField(),{onValueChange:r,...s}=t;return n.jsx(zo,{name:e.name,"data-invalid":h.dataAttr(!!a),value:o.value,onValueChange:C.composeEventHandlers(r,o.onChange),...s})},ta=i.ikp(S.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),Go=i.ikp(S.Value,{_id:"aiChatForm__FieldSelect__Value"}),ia=t=>{const{field:e}=x.useFormField();return n.jsx(Go,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},aa=i.ikp(S.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:n.jsx(M.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),na=i.ikp(S.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),oa=i.ikp(S.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),ra=i.ikp(S.Item,{_id:"aiChatForm__FieldSelect__Item"}),sa=i.ikp(S.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),da=i.ikp(S.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:n.jsx(M.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),ma=t=>{const{field:e,error:a,fieldProps:o,autoFocus:r}=x.useFormField(),s=Ya.useShadow();if(e.inputType!=="combobox")return null;const{onValueChange:d,children:m,...c}=t,l=s?.shadowHost?()=>s.shadowHost.shadowRoot??document:void 0;return n.jsx(I.ComboboxRoot,{...c,id:e.name,name:e.name,items:e.items??[],defaultValue:e.defaultValue,onValueChange:C.composeEventHandlers(d,o.onChange),multiple:e.multiple,placeholder:"placeholder"in e?e.placeholder:void 0,invalid:!!a,autoFocus:r,getRootNode:l,children:m})},ca=i.ikp(I.ComboboxControl,{_id:"aiChatForm__FieldCombobox__Control"}),la=i.ikp(I.ComboboxInput,{_id:"aiChatForm__FieldCombobox__Input"}),ha=i.ikp(I.ComboboxTrigger,{_id:"aiChatForm__FieldCombobox__Trigger",children:n.jsx(M.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),Ca=i.ikp(I.ComboboxPositioner,{_id:"aiChatForm__FieldCombobox__Positioner"}),ua=i.ikp(I.ComboboxContent,{_id:"aiChatForm__FieldCombobox__Content"}),pa=i.ikp(I.ComboboxItem,{_id:"aiChatForm__FieldCombobox__Item"}),ba=i.ikp(I.ComboboxItemText,{_id:"aiChatForm__FieldCombobox__ItemText"}),va=i.ikp(I.ComboboxSelectedTags,{_id:"aiChatForm__FieldCombobox__SelectedTags"}),ga=i.ikp(I.ComboboxItemIndicator,{_id:"aiChatForm__FieldCombobox__ItemIndicator",children:n.jsx(M.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),Yo=i.ikp("p",{_id:"aiChatForm__FieldDescription"}),Pa=t=>{const{field:e}=x.useFormField();return e.description?n.jsx(Yo,{children:e.description,...t}):null},Jo=i.ikp("span",{_id:"aiChatForm__FieldError"}),Fa=t=>{const{error:e}=x.useFormField();return e?n.jsx(Jo,{children:e.message?.toString(),...t}):null},Xo=i.ikp("span",{_id:"aiChatForm__Error"}),_a=t=>{const{formError:e}=_.useChatForm();return e?n.jsx(Xo,{children:e.message,...t}):null},Aa=i.ikp("div",{_id:"aiChatForm__Footer"}),Zo=i.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel",type:"button"}),Ea=t=>{const{onClick:e,...a}=t,{closeForm:o}=_.useChatForm();return n.jsx(Zo,{onClick:C.composeEventHandlers(e,o),...a})},er=i.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),ka=t=>{const{onClick:e,...a}=t,{isSubmitting:o,form:r}=_.useChatForm(),s=r?.buttons.submit.label||"Submit";return n.jsx(er,{disabled:o,...a,children:s})},tr=i.ikp("div",{_id:"aiChatForm__Success"}),Ia=t=>{const{isSuccess:e}=_.useChatForm();return e?n.jsx(tr,{...t}):null},ir=i.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),Ma=t=>{const{form:e}=_.useChatForm();return n.jsx(ir,{children:e?.successView?.heading,...t})},ar=i.ikp(K.Markdown,{_id:"aiChatForm__SuccessMessage"}),xa=t=>{const{form:e}=_.useChatForm();return n.jsx(ar,{shouldOpenLinksInNewTab:!0,children:e?.successView?.message,...t})},nr=i.ikp("button",{_id:"aiChatForm__SuccessButton"}),Sa=t=>{const{onClick:e,...a}=t,{form:o,closeForm:r}=_.useChatForm(),s=o?.successView?.doneButton;if(!s)return null;const d=s.icon&&n.jsx(M.BuiltInIconRenderer,{iconSettings:s.icon}),m=s.label;return n.jsx(nr,{onClick:C.composeEventHandlers(e,r),children:n.jsxs(n.Fragment,{children:[d,m]}),...a})};exports.Provider=b.ChatProvider;exports.ActionBar=Ci;exports.Actions=ui;exports.AttachmentsBar=Lt;exports.AttachmentsBarActions=Nt;exports.AttachmentsBarAttachment=Ot;exports.AttachmentsBarAttachmentDelete=Wt;exports.AttachmentsBarAttachmentIcon=Rt;exports.AttachmentsBarAttachmentTitle=qt;exports.AttachmentsBarForm=ai;exports.AttachmentsBarFormContent=di;exports.AttachmentsBarFormContentError=li;exports.AttachmentsBarFormContentInput=ci;exports.AttachmentsBarFormContentLabel=mi;exports.AttachmentsBarFormSubmitButton=hi;exports.AttachmentsBarFormTitle=ni;exports.AttachmentsBarFormTitleError=si;exports.AttachmentsBarFormTitleInput=ri;exports.AttachmentsBarFormTitleLabel=oi;exports.AttachmentsBarInfoTip=Vt;exports.AttachmentsBarInfoTipArrow=le;exports.AttachmentsBarInfoTipIcon=Qt;exports.AttachmentsBarInfoTipText=$t;exports.AttachmentsBarInput=Kt;exports.AttachmentsBarInputs=Ut;exports.AttachmentsBarList=Dt;exports.AttachmentsBarModal=zt;exports.AttachmentsBarModalBody=ii;exports.AttachmentsBarModalClose=ti;exports.AttachmentsBarModalContent=Yt;exports.AttachmentsBarModalDescription=Zt;exports.AttachmentsBarModalHeader=Jt;exports.AttachmentsBarModalHeading=Xt;exports.AttachmentsBarModalHelp=ei;exports.AttachmentsBarModalOverlay=Gt;exports.ChatAction=Y;exports.ChatActionFeedback=Pi;exports.ChatActionLabel=he;exports.ChatHelpAction=_i;exports.Content=Ie;exports.ContentScrollArea=Me;exports.ContentScrollAreaCorner=Be;exports.ContentScrollAreaScrollbar=Se;exports.ContentScrollAreaThumb=fe;exports.ContentScrollAreaViewport=xe;exports.ConversationLoading=Fe;exports.Disclaimer=je;exports.DisclaimerArrow=De;exports.DisclaimerContent=we;exports.DisclaimerLabel=ye;exports.DisclaimerText=Le;exports.DisclaimerTrigger=He;exports.EmbeddedChatPrimitiveActionBar=Ci;exports.EmbeddedChatPrimitiveActions=ui;exports.EmbeddedChatPrimitiveAttachmentsBar=Lt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=Nt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=qt;exports.EmbeddedChatPrimitiveAttachmentsBarForm=ai;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=di;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=li;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=ci;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=mi;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=hi;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=ni;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=si;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=ri;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=oi;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=le;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=Qt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=$t;exports.EmbeddedChatPrimitiveAttachmentsBarInput=Kt;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarList=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=ii;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=ti;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=Yt;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=Jt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=ei;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Gt;exports.EmbeddedChatPrimitiveChatAction=Y;exports.EmbeddedChatPrimitiveChatActionFeedback=Pi;exports.EmbeddedChatPrimitiveChatActionLabel=he;exports.EmbeddedChatPrimitiveChatHelpAction=_i;exports.EmbeddedChatPrimitiveContent=Ie;exports.EmbeddedChatPrimitiveContentScrollArea=Me;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=Be;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=Se;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=fe;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=xe;exports.EmbeddedChatPrimitiveConversationLoading=Fe;exports.EmbeddedChatPrimitiveDisclaimer=je;exports.EmbeddedChatPrimitiveDisclaimerArrow=De;exports.EmbeddedChatPrimitiveDisclaimerContent=we;exports.EmbeddedChatPrimitiveDisclaimerLabel=ye;exports.EmbeddedChatPrimitiveDisclaimerText=Le;exports.EmbeddedChatPrimitiveDisclaimerTrigger=He;exports.EmbeddedChatPrimitiveExampleQuestion=We;exports.EmbeddedChatPrimitiveExampleQuestionButton=Ne;exports.EmbeddedChatPrimitiveExampleQuestions=Oe;exports.EmbeddedChatPrimitiveExampleQuestionsLabel=Re;exports.EmbeddedChatPrimitiveExampleQuestionsList=qe;exports.EmbeddedChatPrimitiveFeedbackForm=yi;exports.EmbeddedChatPrimitiveFeedbackItem=Hi;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=wi;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=Li;exports.EmbeddedChatPrimitiveFeedbackItemDescription=Oi;exports.EmbeddedChatPrimitiveFeedbackItemLabel=Di;exports.EmbeddedChatPrimitiveFeedbackModal=xi;exports.EmbeddedChatPrimitiveFeedbackModalBody=ji;exports.EmbeddedChatPrimitiveFeedbackModalClose=Ti;exports.EmbeddedChatPrimitiveFeedbackModalContent=fi;exports.EmbeddedChatPrimitiveFeedbackModalHeader=Bi;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=Si;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=Ri;exports.EmbeddedChatPrimitiveFooter=Bt;exports.EmbeddedChatPrimitiveForm=Wi;exports.EmbeddedChatPrimitiveFormCancel=Ea;exports.EmbeddedChatPrimitiveFormClose=Ni;exports.EmbeddedChatPrimitiveFormContent=Ui;exports.EmbeddedChatPrimitiveFormDescription=$i;exports.EmbeddedChatPrimitiveFormError=_a;exports.EmbeddedChatPrimitiveFormField=Ki;exports.EmbeddedChatPrimitiveFormFieldCheckbox=Xi;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=Zi;exports.EmbeddedChatPrimitiveFormFieldCombobox=ma;exports.EmbeddedChatPrimitiveFormFieldComboboxContent=ua;exports.EmbeddedChatPrimitiveFormFieldComboboxControl=ca;exports.EmbeddedChatPrimitiveFormFieldComboboxInput=la;exports.EmbeddedChatPrimitiveFormFieldComboboxItem=pa;exports.EmbeddedChatPrimitiveFormFieldComboboxItemIndicator=ga;exports.EmbeddedChatPrimitiveFormFieldComboboxItemText=ba;exports.EmbeddedChatPrimitiveFormFieldComboboxPositioner=Ca;exports.EmbeddedChatPrimitiveFormFieldComboboxSelectedTags=va;exports.EmbeddedChatPrimitiveFormFieldComboboxTrigger=ha;exports.EmbeddedChatPrimitiveFormFieldDescription=Pa;exports.EmbeddedChatPrimitiveFormFieldEmail=Gi;exports.EmbeddedChatPrimitiveFormFieldError=Fa;exports.EmbeddedChatPrimitiveFormFieldFile=Yi;exports.EmbeddedChatPrimitiveFormFieldLabel=zi;exports.EmbeddedChatPrimitiveFormFieldSelect=ea;exports.EmbeddedChatPrimitiveFormFieldSelectContent=na;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=aa;exports.EmbeddedChatPrimitiveFormFieldSelectItem=ra;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=da;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=sa;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=ta;exports.EmbeddedChatPrimitiveFormFieldSelectValue=ia;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=oa;exports.EmbeddedChatPrimitiveFormFieldText=J;exports.EmbeddedChatPrimitiveFormFieldTextArea=Ji;exports.EmbeddedChatPrimitiveFormFooter=Aa;exports.EmbeddedChatPrimitiveFormHeader=Vi;exports.EmbeddedChatPrimitiveFormHeading=Qi;exports.EmbeddedChatPrimitiveFormSubmit=ka;exports.EmbeddedChatPrimitiveFormSuccess=Ia;exports.EmbeddedChatPrimitiveFormSuccessButton=Sa;exports.EmbeddedChatPrimitiveFormSuccessHeading=Ma;exports.EmbeddedChatPrimitiveFormSuccessMessage=xa;exports.EmbeddedChatPrimitiveFormWrapper=qi;exports.EmbeddedChatPrimitiveHeaderToolbar=Ae;exports.EmbeddedChatPrimitiveHelpActions=Fi;exports.EmbeddedChatPrimitiveHelpActionsMenu=Ei;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=ki;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=Ii;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=Mi;exports.EmbeddedChatPrimitiveHelpActionsTrigger=Ai;exports.EmbeddedChatPrimitiveInput=yt;exports.EmbeddedChatPrimitiveInputFieldset=Tt;exports.EmbeddedChatPrimitiveInputGroup=jt;exports.EmbeddedChatPrimitiveIntroMessageWrapper=Ke;exports.EmbeddedChatPrimitiveMessage=ut;exports.EmbeddedChatPrimitiveMessageAction=gt;exports.EmbeddedChatPrimitiveMessageAttachments=at;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=ot;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=st;exports.EmbeddedChatPrimitiveMessageAttachmentsList=nt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=dt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=Ct;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=ht;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=ct;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=lt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=mt;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=At;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=Et;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=xt;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=St;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=kt;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=ft;exports.EmbeddedChatPrimitiveMessageSourceItemTag=Mt;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=It;exports.EmbeddedChatPrimitiveMessageSources=Pt;exports.EmbeddedChatPrimitiveMessageSourcesHeader=Ft;exports.EmbeddedChatPrimitiveMessageSourcesList=_t;exports.EmbeddedChatPrimitiveMessageToolAction=vt;exports.EmbeddedChatPrimitiveMessageToolActions=bt;exports.EmbeddedChatPrimitiveMessageToolbar=pt;exports.EmbeddedChatPrimitiveMessageWrapper=ce;exports.EmbeddedChatPrimitiveMessages=Te;exports.EmbeddedChatPrimitiveRoot=_e;exports.EmbeddedChatPrimitiveSendButton=Ht;exports.EmbeddedChatPrimitiveSendButtonIcon=wt;exports.EmbeddedChatPrimitiveTaglineBrandName=gi;exports.EmbeddedChatPrimitiveTaglineContainer=pi;exports.EmbeddedChatPrimitiveTaglineLogo=vi;exports.EmbeddedChatPrimitiveTaglineText=bi;exports.EmbeddedChatPrimitiveToolbarHeader=ke;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=Ee;exports.EmbeddedChatPrimitiveWorkflow=Ue;exports.EmbeddedChatPrimitiveWorkflows=Ve;exports.EmbeddedChatPrimitiveWorkflowsLabel=Qe;exports.EmbeddedChatPrimitiveWorkflowsList=$e;exports.EmbeddedChatPrimitiveWrapper=Pe;exports.ExampleQuestion=We;exports.ExampleQuestionButton=Ne;exports.ExampleQuestions=Oe;exports.ExampleQuestionsLabel=Re;exports.ExampleQuestionsList=qe;exports.FeedbackForm=yi;exports.FeedbackItem=Hi;exports.FeedbackItemCheckbox=wi;exports.FeedbackItemCheckboxIndicator=Li;exports.FeedbackItemDescription=Oi;exports.FeedbackItemLabel=Di;exports.FeedbackModal=xi;exports.FeedbackModalBody=ji;exports.FeedbackModalClose=Ti;exports.FeedbackModalContent=fi;exports.FeedbackModalHeader=Bi;exports.FeedbackModalOverlay=Si;exports.FeedbackSubmitButton=Ri;exports.Footer=Bt;exports.Form=Wi;exports.FormCancel=Ea;exports.FormClose=Ni;exports.FormContent=Ui;exports.FormDescription=$i;exports.FormError=_a;exports.FormField=Ki;exports.FormFieldCheckbox=Xi;exports.FormFieldCheckboxIndicator=Zi;exports.FormFieldCombobox=ma;exports.FormFieldComboboxContent=ua;exports.FormFieldComboboxControl=ca;exports.FormFieldComboboxInput=la;exports.FormFieldComboboxItem=pa;exports.FormFieldComboboxItemIndicator=ga;exports.FormFieldComboboxItemText=ba;exports.FormFieldComboboxPositioner=Ca;exports.FormFieldComboboxSelectedTags=va;exports.FormFieldComboboxTrigger=ha;exports.FormFieldDescription=Pa;exports.FormFieldEmail=Gi;exports.FormFieldError=Fa;exports.FormFieldFile=Yi;exports.FormFieldLabel=zi;exports.FormFieldSelect=ea;exports.FormFieldSelectContent=na;exports.FormFieldSelectIcon=aa;exports.FormFieldSelectItem=ra;exports.FormFieldSelectItemIndicator=da;exports.FormFieldSelectItemText=sa;exports.FormFieldSelectTrigger=ta;exports.FormFieldSelectValue=ia;exports.FormFieldSelectViewport=oa;exports.FormFieldText=J;exports.FormFieldTextArea=Ji;exports.FormFooter=Aa;exports.FormHeader=Vi;exports.FormHeading=Qi;exports.FormSubmit=ka;exports.FormSuccess=Ia;exports.FormSuccessButton=Sa;exports.FormSuccessHeading=Ma;exports.FormSuccessMessage=xa;exports.FormWrapper=qi;exports.Header=tn;exports.HeaderToolbar=Ae;exports.HeaderToolbarWrapper=Ee;exports.HelpActions=Fi;exports.HelpActionsMenu=Ei;exports.HelpActionsMenuArrow=ki;exports.HelpActionsMenuItem=Ii;exports.HelpActionsMenuItemIcon=Mi;exports.HelpActionsTrigger=Ai;exports.Input=yt;exports.InputFieldset=Tt;exports.InputGroup=jt;exports.IntroMessageWrapper=Ke;exports.Message=ut;exports.MessageAction=gt;exports.MessageAttachments=at;exports.MessageAttachmentsItem=ot;exports.MessageAttachmentsItemIcon=rt;exports.MessageAttachmentsItemTitle=st;exports.MessageAttachmentsList=nt;exports.MessageAttachmentsPreview=dt;exports.MessageAttachmentsPreviewBody=Ct;exports.MessageAttachmentsPreviewClose=ht;exports.MessageAttachmentsPreviewContent=ct;exports.MessageAttachmentsPreviewHeader=lt;exports.MessageAttachmentsPreviewOverlay=mt;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=At;exports.MessageSourceItemBreadcrumbIcon=Kn;exports.MessageSourceItemBreadcrumbs=Et;exports.MessageSourceItemDescription=xt;exports.MessageSourceItemDescriptionPart=St;exports.MessageSourceItemIcon=kt;exports.MessageSourceItemIndicator=ft;exports.MessageSourceItemTag=Mt;exports.MessageSourceItemTitle=It;exports.MessageSources=Pt;exports.MessageSourcesHeader=Ft;exports.MessageSourcesList=_t;exports.MessageToolAction=vt;exports.MessageToolActions=bt;exports.MessageToolbar=pt;exports.MessageWrapper=ce;exports.Messages=Te;exports.Root=_e;exports.SendButton=Ht;exports.SendButtonIcon=wt;exports.TaglineBrandName=gi;exports.TaglineContainer=pi;exports.TaglineLogo=vi;exports.TaglineText=bi;exports.ToolbarHeader=ke;exports.Workflow=Ue;exports.Workflows=Ve;exports.WorkflowsLabel=Qe;exports.WorkflowsList=$e;exports.Wrapper=Pe;
@@ -6,9 +6,9 @@ import * as te from "@radix-ui/react-avatar";
6
6
  import * as K from "@radix-ui/react-checkbox";
7
7
  import * as B from "@radix-ui/react-popover";
8
8
  import * as T from "@radix-ui/react-tooltip";
9
- import * as L from "@radix-ui/react-scroll-area";
9
+ import * as H from "@radix-ui/react-scroll-area";
10
10
  import { Trigger as fe, Icon as Ee, Content as Se, Viewport as ke, Item as Be, ItemText as Te, ItemIndicator as ye, Root as we, Value as xe } from "../atoms/select.js";
11
- import { ComboboxRoot as He, ComboboxControl as Le, ComboboxInput as De, ComboboxTrigger as Oe, ComboboxPositioner as We, ComboboxContent as Ne, ComboboxItem as Re, ComboboxItemText as $e, ComboboxSelectedTags as Ve, ComboboxItemIndicator as Qe } from "../atoms/combobox.js";
11
+ import { ComboboxRoot as Le, ComboboxControl as He, ComboboxInput as De, ComboboxTrigger as Oe, ComboboxPositioner as Ne, ComboboxContent as We, ComboboxItem as Re, ComboboxItemText as $e, ComboboxSelectedTags as Ve, ComboboxItemIndicator as Qe } from "../atoms/combobox.js";
12
12
  import { Overlay as ie, Content as ae, Close as ne, Title as oe, Root as se } from "../atoms/dialog.js";
13
13
  import Ue from "../atoms/avatars/ai.js";
14
14
  import Ke from "../atoms/avatars/user.js";
@@ -21,7 +21,7 @@ import { AttachmentsBarProvider as je, useAttachmentsBar as A } from "../provide
21
21
  import { SourceItemProvider as Ge, useSourceItem as x } from "../providers/source-item-provider.js";
22
22
  import { useInkeepConfig as C } from "../providers/config-provider.js";
23
23
  import { useInkeepConversation as O, SHARE_QUERY_PARAM as ze } from "../providers/conversation-provider.js";
24
- import { useChatEvents as W } from "../providers/chat-events-provider.js";
24
+ import { useChatEvents as N } from "../providers/chat-events-provider.js";
25
25
  import { useMessageFeedback as re } from "../providers/feedback-provider.js";
26
26
  import { MessageAttachmentsProvider as Ye, useMessageAttachments as j } from "../providers/message-attachments-provider.js";
27
27
  import { MessageProvider as Je, useMessage as _ } from "../providers/message-provider.js";
@@ -93,9 +93,9 @@ const gt = "__intro__", Ft = i("div", {
93
93
  }
94
94
  ), kn = i("div", {
95
95
  _id: "aiChatContent"
96
- }), Bn = i(L.Root, {
96
+ }), Bn = i(H.Root, {
97
97
  _id: "aiChatContentScrollArea"
98
- }), It = i(L.Viewport, {
98
+ }), It = i(H.Viewport, {
99
99
  _id: "aiChatContentScrollArea__Viewport"
100
100
  }), Tn = U(({ children: t, ...e }, a) => {
101
101
  const { containerRef: o } = ht(), s = le(a, o);
@@ -111,25 +111,25 @@ const gt = "__intro__", Ft = i("div", {
111
111
  }
112
112
  );
113
113
  }), yn = i(
114
- L.ScrollAreaScrollbar,
114
+ H.ScrollAreaScrollbar,
115
115
  {
116
116
  _id: "aiChatContentScrollArea__Scrollbar"
117
117
  }
118
118
  ), wn = i(
119
- L.ScrollAreaThumb,
119
+ H.ScrollAreaThumb,
120
120
  {
121
121
  _id: "aiChatContentScrollArea__Thumb"
122
122
  }
123
- ), xn = i(L.Corner, {
123
+ ), xn = i(H.Corner, {
124
124
  _id: "aiChatContentScrollArea__Corner"
125
125
  }), ft = i("div", {
126
126
  _id: "aiChatMessages"
127
- }), Hn = (t) => {
127
+ }), Ln = (t) => {
128
128
  const e = v(), { children: a, ...o } = t;
129
129
  return /* @__PURE__ */ n(ft, { children: M(a, e), ...o });
130
130
  }, Et = i("div", {
131
131
  _id: "aiChatDisclaimer"
132
- }), Ln = P(
132
+ }), Hn = P(
133
133
  (t) => {
134
134
  const { aiChatSettings: e } = C(), [a, o] = ve(!1), s = pt(a, 100);
135
135
  return e.disclaimerSettings?.isEnabled ? /* @__PURE__ */ n(bt, { open: a, setOpen: o, children: /* @__PURE__ */ n(B.Root, { open: s, onOpenChange: o, children: /* @__PURE__ */ n(Et, { ...t }) }) }) : null;
@@ -158,7 +158,7 @@ const gt = "__intro__", Ft = i("div", {
158
158
  }
159
159
  ), Bt = i(B.Content, {
160
160
  _id: "aiChatDisclaimerContent"
161
- }), Wn = (t) => {
161
+ }), Nn = (t) => {
162
162
  const { setOpen: e } = Fe();
163
163
  return /* @__PURE__ */ n(
164
164
  Bt,
@@ -174,7 +174,7 @@ const gt = "__intro__", Ft = i("div", {
174
174
  );
175
175
  }, Tt = i(q, {
176
176
  _id: "aiChatDisclaimerText"
177
- }), Nn = P(
177
+ }), Wn = P(
178
178
  (t) => {
179
179
  const { aiChatSettings: e } = C(), a = e.aiAssistantName, s = e.disclaimerSettings?.tooltip || `Information provided by ${a || "this AI assistant"} is not guaranteed to be accurate or comprehensive.`;
180
180
  return /* @__PURE__ */ n(Tt, { shouldOpenLinksInNewTab: !0, children: s, ...t });
@@ -200,17 +200,17 @@ const gt = "__intro__", Ft = i("div", {
200
200
  const { aiChatSettings: e } = C(), a = e.exampleQuestions, { children: o, ...s } = t;
201
201
  return /* @__PURE__ */ n(xt, { children: M(o, a), ...s });
202
202
  }
203
- ), Ht = i("div", {
203
+ ), Lt = i("div", {
204
204
  _id: "aiChatExampleQuestion"
205
205
  }), Un = U((t, e) => {
206
206
  const { aiChatSettings: a } = C(), o = a.isFirstExampleQuestionHighlighted;
207
- return /* @__PURE__ */ n(Ht, { ref: e, "data-highlight": p(o), ...t });
208
- }), Lt = i("button", {
207
+ return /* @__PURE__ */ n(Lt, { ref: e, "data-highlight": p(o), ...t });
208
+ }), Ht = i("button", {
209
209
  _id: "aiChatExampleQuestionButton"
210
210
  }), Kn = (t) => {
211
211
  const { question: e, onClick: a, ...o } = t, { handleSubmit: s } = v();
212
212
  return /* @__PURE__ */ n(
213
- Lt,
213
+ Ht,
214
214
  {
215
215
  onClick: h(a, () => s(e)),
216
216
  children: e,
@@ -227,19 +227,19 @@ const gt = "__intro__", Ft = i("div", {
227
227
  }), jn = P((t) => {
228
228
  const { aiChatSettings: e } = C();
229
229
  return /* @__PURE__ */ n(Ot, { children: e.workflowsHeader, ...t });
230
- }), Wt = i("div", {
230
+ }), Nt = i("div", {
231
231
  _id: "aiChatWorkflowsList"
232
232
  }), Gn = P(
233
233
  (t) => {
234
234
  const { aiChatSettings: e } = C(), a = e.workflows, { children: o, ...s } = t;
235
- return /* @__PURE__ */ n(Wt, { children: M(o, a), ...s });
235
+ return /* @__PURE__ */ n(Nt, { children: M(o, a), ...s });
236
236
  }
237
- ), Nt = i("button", {
237
+ ), Wt = i("button", {
238
238
  _id: "aiChatWorkflow"
239
239
  }), zn = (t) => {
240
240
  const { workflow: e, onClick: a, ...o } = t, { handleWorkflow: s } = v();
241
241
  return /* @__PURE__ */ n(
242
- Nt,
242
+ Wt,
243
243
  {
244
244
  onClick: h(a, () => s(e)),
245
245
  children: e.displayName,
@@ -464,7 +464,7 @@ const gt = "__intro__", Ft = i("div", {
464
464
  }, be = i("div", {
465
465
  _id: "aiChatMessage"
466
466
  }), _o = (t) => {
467
- const { aiChatSettings: e } = C(), { componentStyles: a, ...o } = t, { message: s } = _(), { logEvent: r } = W(), c = de(s), { conversation: d } = O();
467
+ const { aiChatSettings: e } = C(), { componentStyles: a, ...o } = t, { message: s } = _(), { logEvent: r } = N(), c = de(s), { conversation: d } = O();
468
468
  return s.role === "user" ? /* @__PURE__ */ n(be, { "data-role": s.role, children: c, ...o }) : /* @__PURE__ */ n(be, { "data-role": s.role, ...o, children: /* @__PURE__ */ n(
469
469
  q,
470
470
  {
@@ -507,7 +507,7 @@ const gt = "__intro__", Ft = i("div", {
507
507
  }), ri = i("button", {
508
508
  _id: "aiChatMessageToolAction"
509
509
  }), Po = (t) => {
510
- const { onClick: e, action: a, ...o } = t, { handleAction: s } = me(a), { logEvent: r } = W(), { conversation: c } = O(), d = () => {
510
+ const { onClick: e, action: a, ...o } = t, { handleAction: s } = me(a), { logEvent: r } = N(), { conversation: c } = O(), d = () => {
511
511
  s(), r({
512
512
  eventName: "tool_call_action_clicked",
513
513
  properties: {
@@ -547,7 +547,7 @@ const gt = "__intro__", Ft = i("div", {
547
547
  }, ci = i("button", {
548
548
  _id: "aiChatMessageAction"
549
549
  }), Ao = (t) => {
550
- const { action: e, onClick: a, className: o, ...s } = t, { conversation: r } = O(), { message: c } = _(), { isStreaming: d, messages: m } = v(), [l, u] = X(), { feedback: b, submitPositiveFeedback: I, setCurrentFeedback: y, currentFeedback: N } = re(), { logEvent: G } = W(), [R, z] = it(), {
550
+ const { action: e, onClick: a, className: o, ...s } = t, { conversation: r } = O(), { message: c } = _(), { isStreaming: d, messages: m } = v(), [l, u] = X(), { feedback: b, submitPositiveFeedback: I, setCurrentFeedback: y, currentFeedback: W } = re(), { logEvent: G } = N(), [R, z] = it(), {
551
551
  baseSettings: { privacyPreferences: he }
552
552
  } = C(), { optOutAllAnalytics: Y } = he, ue = m.at(-1)?.id === c?.id, J = c.role === "assistant";
553
553
  if (ue && d || !J || {
@@ -572,7 +572,7 @@ const gt = "__intro__", Ft = i("div", {
572
572
  downvote() {
573
573
  y(c.id);
574
574
  }
575
- }, H = {
575
+ }, L = {
576
576
  copy: "Copy Message",
577
577
  upvote: "Upvote Message",
578
578
  downvote: "Downvote Message"
@@ -587,7 +587,7 @@ const gt = "__intro__", Ft = i("div", {
587
587
  },
588
588
  downvote: {
589
589
  "data-downvoted": p(b[c.id]?.type === "negative"),
590
- "data-state": N === null ? "closed" : "open"
590
+ "data-state": W === null ? "closed" : "open"
591
591
  }
592
592
  };
593
593
  return /* @__PURE__ */ n(
@@ -596,7 +596,7 @@ const gt = "__intro__", Ft = i("div", {
596
596
  "data-action": e,
597
597
  ...k[e],
598
598
  children: S[e],
599
- "aria-label": H[e],
599
+ "aria-label": L[e],
600
600
  className: `${o} ${e}`,
601
601
  onClick: h(a, w[e]),
602
602
  ...s
@@ -630,7 +630,7 @@ const gt = "__intro__", Ft = i("div", {
630
630
  }, hi = i(qe, {
631
631
  _id: "aiChatMessageSourceItem"
632
632
  }), Eo = (t) => {
633
- const { source: e, onClick: a, ...o } = t, { logEvent: s } = W(), { conversation: r } = O(), c = () => {
633
+ const { source: e, onClick: a, ...o } = t, { logEvent: s } = N(), { conversation: r } = O(), c = () => {
634
634
  s({
635
635
  eventName: "assistant_source_item_clicked",
636
636
  properties: {
@@ -700,7 +700,7 @@ const gt = "__intro__", Ft = i("div", {
700
700
  );
701
701
  }, gi = i(F, {
702
702
  _id: "aiChatMessageSourceItem__Indicator"
703
- }), Ho = (t) => {
703
+ }), Lo = (t) => {
704
704
  const { source: e } = x();
705
705
  return /* @__PURE__ */ n(
706
706
  gi,
@@ -709,7 +709,7 @@ const gt = "__intro__", Ft = i("div", {
709
709
  ...t
710
710
  }
711
711
  );
712
- }, Lo = i("div", {
712
+ }, Ho = i("div", {
713
713
  _id: "aiChatFooter"
714
714
  }), Do = i("div", {
715
715
  _id: "aiChatInput__Fieldset"
@@ -717,7 +717,7 @@ const gt = "__intro__", Ft = i("div", {
717
717
  _id: "aiChatInput__Group"
718
718
  }), Fi = i("textarea", {
719
719
  _id: "aiChatInput"
720
- }), Wo = U(({ onChange: t, onKeyDown: e, ...a }, o) => {
720
+ }), No = U(({ onChange: t, onKeyDown: e, ...a }, o) => {
721
721
  const { handleInputChange: s, handleInputKeyDown: r, input: c, error: d, shouldAutoFocusInput: m, inputRef: l } = v(), { aiChatSettings: u } = C(), b = le(
722
722
  o,
723
723
  l
@@ -739,7 +739,7 @@ const gt = "__intro__", Ft = i("div", {
739
739
  );
740
740
  }), Pi = i("button", {
741
741
  _id: "aiChatInput__SendButton"
742
- }), No = (t) => {
742
+ }), Wo = (t) => {
743
743
  const { handleSubmit: e, isSubmitDisabled: a, error: o } = v(), { aiChatSettings: s } = C(), { onClick: r, ...c } = t;
744
744
  return /* @__PURE__ */ n(
745
745
  Pi,
@@ -870,22 +870,22 @@ const gt = "__intro__", Ft = i("div", {
870
870
  }), ns = (t) => {
871
871
  const { selectedInput: e } = A(), a = e?.workflowModalProps?.modalHelpText;
872
872
  return a ? /* @__PURE__ */ n(xi, { children: a, ...t }) : null;
873
- }, Hi = i("div", {
873
+ }, Li = i("div", {
874
874
  _id: "aiChatAttachmentsBar__ModalHelp"
875
875
  }), os = (t) => {
876
876
  const { children: e, ...a } = t, { selectedInput: o } = A(), s = o?.workflowModalProps?.modalHelpElement;
877
- return s ? /* @__PURE__ */ n(Hi, { asChild: !e, children: e || s, ...a }) : null;
877
+ return s ? /* @__PURE__ */ n(Li, { asChild: !e, children: e || s, ...a }) : null;
878
878
  }, ss = i(ne, {
879
879
  _id: "aiChatAttachmentsBar__ModalClose",
880
880
  children: /* @__PURE__ */ n(F, { iconKey: "close" })
881
881
  }), rs = i("div", {
882
882
  _id: "aiChatAttachmentsBar__ModalBody"
883
- }), Li = i("form", {
883
+ }), Hi = i("form", {
884
884
  _id: "aiChatAttachmentsBar__Form"
885
885
  }), cs = (t) => {
886
886
  const { onSubmit: e, ...a } = t, { form: o } = A();
887
887
  return /* @__PURE__ */ n(
888
- Li,
888
+ Hi,
889
889
  {
890
890
  onSubmit: h(e, o.onSubmit),
891
891
  ...a
@@ -922,12 +922,12 @@ const gt = "__intro__", Ft = i("div", {
922
922
  ...a
923
923
  }
924
924
  );
925
- }, Wi = i("span", {
925
+ }, Ni = i("span", {
926
926
  _id: "aiChatAttachmentsBar__FormTitleError"
927
927
  }), hs = (t) => {
928
928
  const { form: e } = A();
929
929
  return e.errors.title ? /* @__PURE__ */ n(
930
- Wi,
930
+ Ni,
931
931
  {
932
932
  "aria-live": "polite",
933
933
  children: e.errors.title,
@@ -937,12 +937,12 @@ const gt = "__intro__", Ft = i("div", {
937
937
  }, us = i("div", {
938
938
  _id: "aiChatAttachmentsBar__FormTitle",
939
939
  role: "group"
940
- }), Ni = i("label", {
940
+ }), Wi = i("label", {
941
941
  _id: "aiChatAttachmentsBar__FormContentLabel"
942
942
  }), Cs = (t) => {
943
943
  const { form: e, selectedInput: a } = A();
944
944
  return /* @__PURE__ */ n(
945
- Ni,
945
+ Wi,
946
946
  {
947
947
  htmlFor: `${a?.id}-content`,
948
948
  children: e.labels.content,
@@ -1004,7 +1004,7 @@ const gt = "__intro__", Ft = i("div", {
1004
1004
  }), Vi = i(T.Trigger, {
1005
1005
  _id: "aiChat__ChatAction"
1006
1006
  }), Pe = (t) => {
1007
- const { action: e, onClick: a, className: o, ...s } = t, { clear: r, stop: c, isLoading: d, messages: m, selectedWorkflow: l } = v(), { conversation: u } = O(), { aiChatSettings: b, baseSettings: I } = C(), { logEvent: y } = W(), [N, G] = X(), [R, z] = X();
1007
+ const { action: e, onClick: a, className: o, ...s } = t, { clear: r, stop: c, isLoading: d, messages: m, selectedWorkflow: l } = v(), { conversation: u } = O(), { aiChatSettings: b, baseSettings: I } = C(), { logEvent: y } = N(), [W, G] = X(), [R, z] = X();
1008
1008
  if ({
1009
1009
  help: !1,
1010
1010
  copy: m.length === 0 || !b.isCopyChatButtonVisible || d,
@@ -1018,12 +1018,12 @@ const gt = "__intro__", Ft = i("div", {
1018
1018
  },
1019
1019
  copy: () => {
1020
1020
  const $ = m.map((w) => {
1021
- const H = `**${w.role === "assistant" ? "AI Assistant" : "User"}**`, S = de(w), k = Ze(w.metadata?.attributes?.attachments), V = k ? `
1021
+ const L = `**${w.role === "assistant" ? "AI Assistant" : "User"}**`, S = de(w), k = Ze(w.metadata?.attributes?.attachments), V = k ? `
1022
1022
 
1023
1023
  **Attachments**
1024
1024
 
1025
1025
  ${k}` : "";
1026
- return `${H}
1026
+ return `${L}
1027
1027
 
1028
1028
  ${S}${V}`;
1029
1029
  }).join(`
@@ -1045,11 +1045,11 @@ ${S}${V}`;
1045
1045
  id: Date.now().toString() + k.id,
1046
1046
  conversationId: void 0
1047
1047
  }))
1048
- }, { apiKey: w, analyticsApiBaseUrl: H } = I, S = await ut(
1048
+ }, { apiKey: w, analyticsApiBaseUrl: L } = I, S = await ut(
1049
1049
  "",
1050
1050
  $,
1051
1051
  w,
1052
- H
1052
+ L
1053
1053
  );
1054
1054
  if (S) {
1055
1055
  const V = `${b.shareChatUrlBasePath}?${ze}=${S?.id}`;
@@ -1067,14 +1067,14 @@ ${S}${V}`;
1067
1067
  clear: r,
1068
1068
  stop: c
1069
1069
  }, Ce = {
1070
- copy: N,
1070
+ copy: W,
1071
1071
  share: R
1072
1072
  };
1073
1073
  return /* @__PURE__ */ n(T.Tooltip, { delayDuration: 0, open: Ce[e], children: /* @__PURE__ */ n(
1074
1074
  Vi,
1075
1075
  {
1076
1076
  "data-type": e,
1077
- "data-copied": p(N || R),
1077
+ "data-copied": p(W || R),
1078
1078
  className: `${o} ${e}`,
1079
1079
  children: /* @__PURE__ */ n(Ui, { action: e }),
1080
1080
  onClick: h(a, J[e]),
@@ -1202,10 +1202,10 @@ ${S}${V}`;
1202
1202
  );
1203
1203
  }, xs = i(ie, {
1204
1204
  _id: "aiChatFeedbackModal__Overlay"
1205
- }), Hs = i(ae, {
1205
+ }), Ls = i(ae, {
1206
1206
  _id: "aiChatFeedbackModal__Content",
1207
1207
  "aria-describedby": void 0
1208
- }), Ls = i(oe, {
1208
+ }), Hs = i(oe, {
1209
1209
  _id: "aiChatFeedbackModal__Header",
1210
1210
  children: "Help improve my answers!"
1211
1211
  }), Ds = i(ne, {
@@ -1215,7 +1215,7 @@ ${S}${V}`;
1215
1215
  _id: "aiChatFeedbackModal__Body"
1216
1216
  }), Zi = i("form", {
1217
1217
  _id: "aiChatFeedbackForm"
1218
- }), Ws = (t) => {
1218
+ }), Ns = (t) => {
1219
1219
  const { onSubmit: e, ...a } = t, { submitNegativeFeedback: o, currentFeedback: s, setCurrentFeedback: r } = re();
1220
1220
  return /* @__PURE__ */ n(Zi, { onSubmit: h(e, (d) => {
1221
1221
  d.preventDefault();
@@ -1224,7 +1224,7 @@ ${S}${V}`;
1224
1224
  }), ...a });
1225
1225
  }, ea = i("div", {
1226
1226
  _id: "aiChatFeedbackItem"
1227
- }), Ns = (t) => {
1227
+ }), Ws = (t) => {
1228
1228
  const { name: e, ...a } = t;
1229
1229
  return /* @__PURE__ */ n(Xe, { name: e, children: /* @__PURE__ */ n(ea, { ...a }) });
1230
1230
  }, ta = i(K.Root, {
@@ -1299,7 +1299,7 @@ ${S}${V}`;
1299
1299
  _id: "aiChatForm__Description"
1300
1300
  }), Ys = (t) => {
1301
1301
  const { form: e } = g();
1302
- return e?.description ? /* @__PURE__ */ n(ca, { children: e.description, ...t }) : null;
1302
+ return e?.description ? /* @__PURE__ */ n(ca, { shouldOpenLinksInNewTab: !0, children: e.description, ...t }) : null;
1303
1303
  }, da = i("div", {
1304
1304
  _id: "aiChatForm__Content"
1305
1305
  }), Js = (t) => {
@@ -1479,7 +1479,7 @@ ${S}${V}`;
1479
1479
  if (e.inputType !== "combobox") return null;
1480
1480
  const { onValueChange: c, children: d, ...m } = t, l = r?.shadowHost ? () => r.shadowHost.shadowRoot ?? document : void 0;
1481
1481
  return /* @__PURE__ */ n(
1482
- He,
1482
+ Le,
1483
1483
  {
1484
1484
  ...m,
1485
1485
  id: e.name,
@@ -1495,16 +1495,16 @@ ${S}${V}`;
1495
1495
  children: d
1496
1496
  }
1497
1497
  );
1498
- }, pr = i(Le, {
1498
+ }, pr = i(He, {
1499
1499
  _id: "aiChatForm__FieldCombobox__Control"
1500
1500
  }), br = i(De, {
1501
1501
  _id: "aiChatForm__FieldCombobox__Input"
1502
1502
  }), vr = i(Oe, {
1503
1503
  _id: "aiChatForm__FieldCombobox__Trigger",
1504
1504
  children: /* @__PURE__ */ n(f, { iconSettings: { builtIn: "LuChevronDown" } })
1505
- }), _r = i(We, {
1505
+ }), _r = i(Ne, {
1506
1506
  _id: "aiChatForm__FieldCombobox__Positioner"
1507
- }), gr = i(Ne, {
1507
+ }), gr = i(We, {
1508
1508
  _id: "aiChatForm__FieldCombobox__Content"
1509
1509
  }), Fr = i(Re, {
1510
1510
  _id: "aiChatForm__FieldCombobox__Item"
@@ -1560,7 +1560,7 @@ ${S}${V}`;
1560
1560
  _id: "aiChatForm__SuccessMessage"
1561
1561
  }), wr = (t) => {
1562
1562
  const { form: e } = g();
1563
- return /* @__PURE__ */ n(Ia, { children: e?.successView?.message, ...t });
1563
+ return /* @__PURE__ */ n(Ia, { shouldOpenLinksInNewTab: !0, children: e?.successView?.message, ...t });
1564
1564
  }, fa = i("button", {
1565
1565
  _id: "aiChatForm__SuccessButton"
1566
1566
  }), xr = (t) => {
@@ -1625,11 +1625,11 @@ export {
1625
1625
  wn as ContentScrollAreaThumb,
1626
1626
  Tn as ContentScrollAreaViewport,
1627
1627
  An as ConversationLoading,
1628
- Ln as Disclaimer,
1628
+ Hn as Disclaimer,
1629
1629
  Rn as DisclaimerArrow,
1630
- Wn as DisclaimerContent,
1630
+ Nn as DisclaimerContent,
1631
1631
  Dn as DisclaimerLabel,
1632
- Nn as DisclaimerText,
1632
+ Wn as DisclaimerText,
1633
1633
  On as DisclaimerTrigger,
1634
1634
  _s as EmbeddedChatPrimitiveActionBar,
1635
1635
  gs as EmbeddedChatPrimitiveActions,
@@ -1676,19 +1676,19 @@ export {
1676
1676
  wn as EmbeddedChatPrimitiveContentScrollAreaThumb,
1677
1677
  Tn as EmbeddedChatPrimitiveContentScrollAreaViewport,
1678
1678
  An as EmbeddedChatPrimitiveConversationLoading,
1679
- Ln as EmbeddedChatPrimitiveDisclaimer,
1679
+ Hn as EmbeddedChatPrimitiveDisclaimer,
1680
1680
  Rn as EmbeddedChatPrimitiveDisclaimerArrow,
1681
- Wn as EmbeddedChatPrimitiveDisclaimerContent,
1681
+ Nn as EmbeddedChatPrimitiveDisclaimerContent,
1682
1682
  Dn as EmbeddedChatPrimitiveDisclaimerLabel,
1683
- Nn as EmbeddedChatPrimitiveDisclaimerText,
1683
+ Wn as EmbeddedChatPrimitiveDisclaimerText,
1684
1684
  On as EmbeddedChatPrimitiveDisclaimerTrigger,
1685
1685
  Un as EmbeddedChatPrimitiveExampleQuestion,
1686
1686
  Kn as EmbeddedChatPrimitiveExampleQuestionButton,
1687
1687
  $n as EmbeddedChatPrimitiveExampleQuestions,
1688
1688
  Vn as EmbeddedChatPrimitiveExampleQuestionsLabel,
1689
1689
  Qn as EmbeddedChatPrimitiveExampleQuestionsList,
1690
- Ws as EmbeddedChatPrimitiveFeedbackForm,
1691
- Ns as EmbeddedChatPrimitiveFeedbackItem,
1690
+ Ns as EmbeddedChatPrimitiveFeedbackForm,
1691
+ Ws as EmbeddedChatPrimitiveFeedbackItem,
1692
1692
  Rs as EmbeddedChatPrimitiveFeedbackItemCheckbox,
1693
1693
  $s as EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator,
1694
1694
  Qs as EmbeddedChatPrimitiveFeedbackItemDescription,
@@ -1696,11 +1696,11 @@ export {
1696
1696
  ws as EmbeddedChatPrimitiveFeedbackModal,
1697
1697
  Os as EmbeddedChatPrimitiveFeedbackModalBody,
1698
1698
  Ds as EmbeddedChatPrimitiveFeedbackModalClose,
1699
- Hs as EmbeddedChatPrimitiveFeedbackModalContent,
1700
- Ls as EmbeddedChatPrimitiveFeedbackModalHeader,
1699
+ Ls as EmbeddedChatPrimitiveFeedbackModalContent,
1700
+ Hs as EmbeddedChatPrimitiveFeedbackModalHeader,
1701
1701
  xs as EmbeddedChatPrimitiveFeedbackModalOverlay,
1702
1702
  Us as EmbeddedChatPrimitiveFeedbackSubmitButton,
1703
- Lo as EmbeddedChatPrimitiveFooter,
1703
+ Ho as EmbeddedChatPrimitiveFooter,
1704
1704
  qs as EmbeddedChatPrimitiveForm,
1705
1705
  kr as EmbeddedChatPrimitiveFormCancel,
1706
1706
  js as EmbeddedChatPrimitiveFormClose,
@@ -1752,7 +1752,7 @@ export {
1752
1752
  Ts as EmbeddedChatPrimitiveHelpActionsMenuItem,
1753
1753
  ys as EmbeddedChatPrimitiveHelpActionsMenuItemIcon,
1754
1754
  Ss as EmbeddedChatPrimitiveHelpActionsTrigger,
1755
- Wo as EmbeddedChatPrimitiveInput,
1755
+ No as EmbeddedChatPrimitiveInput,
1756
1756
  Do as EmbeddedChatPrimitiveInputFieldset,
1757
1757
  Oo as EmbeddedChatPrimitiveInputGroup,
1758
1758
  Yn as EmbeddedChatPrimitiveIntroMessageWrapper,
@@ -1783,7 +1783,7 @@ export {
1783
1783
  wo as EmbeddedChatPrimitiveMessageSourceItemDescription,
1784
1784
  xo as EmbeddedChatPrimitiveMessageSourceItemDescriptionPart,
1785
1785
  Bo as EmbeddedChatPrimitiveMessageSourceItemIcon,
1786
- Ho as EmbeddedChatPrimitiveMessageSourceItemIndicator,
1786
+ Lo as EmbeddedChatPrimitiveMessageSourceItemIndicator,
1787
1787
  yo as EmbeddedChatPrimitiveMessageSourceItemTag,
1788
1788
  To as EmbeddedChatPrimitiveMessageSourceItemTitle,
1789
1789
  Mo as EmbeddedChatPrimitiveMessageSources,
@@ -1793,9 +1793,9 @@ export {
1793
1793
  Fo as EmbeddedChatPrimitiveMessageToolActions,
1794
1794
  go as EmbeddedChatPrimitiveMessageToolbar,
1795
1795
  $t as EmbeddedChatPrimitiveMessageWrapper,
1796
- Hn as EmbeddedChatPrimitiveMessages,
1796
+ Ln as EmbeddedChatPrimitiveMessages,
1797
1797
  Mn as EmbeddedChatPrimitiveRoot,
1798
- No as EmbeddedChatPrimitiveSendButton,
1798
+ Wo as EmbeddedChatPrimitiveSendButton,
1799
1799
  Ro as EmbeddedChatPrimitiveSendButtonIcon,
1800
1800
  Ms as EmbeddedChatPrimitiveTaglineBrandName,
1801
1801
  Fs as EmbeddedChatPrimitiveTaglineContainer,
@@ -1813,8 +1813,8 @@ export {
1813
1813
  $n as ExampleQuestions,
1814
1814
  Vn as ExampleQuestionsLabel,
1815
1815
  Qn as ExampleQuestionsList,
1816
- Ws as FeedbackForm,
1817
- Ns as FeedbackItem,
1816
+ Ns as FeedbackForm,
1817
+ Ws as FeedbackItem,
1818
1818
  Rs as FeedbackItemCheckbox,
1819
1819
  $s as FeedbackItemCheckboxIndicator,
1820
1820
  Qs as FeedbackItemDescription,
@@ -1822,11 +1822,11 @@ export {
1822
1822
  ws as FeedbackModal,
1823
1823
  Os as FeedbackModalBody,
1824
1824
  Ds as FeedbackModalClose,
1825
- Hs as FeedbackModalContent,
1826
- Ls as FeedbackModalHeader,
1825
+ Ls as FeedbackModalContent,
1826
+ Hs as FeedbackModalHeader,
1827
1827
  xs as FeedbackModalOverlay,
1828
1828
  Us as FeedbackSubmitButton,
1829
- Lo as Footer,
1829
+ Ho as Footer,
1830
1830
  qs as Form,
1831
1831
  kr as FormCancel,
1832
1832
  js as FormClose,
@@ -1880,7 +1880,7 @@ export {
1880
1880
  Ts as HelpActionsMenuItem,
1881
1881
  ys as HelpActionsMenuItemIcon,
1882
1882
  Ss as HelpActionsTrigger,
1883
- Wo as Input,
1883
+ No as Input,
1884
1884
  Do as InputFieldset,
1885
1885
  Oo as InputGroup,
1886
1886
  Yn as IntroMessageWrapper,
@@ -1912,7 +1912,7 @@ export {
1912
1912
  wo as MessageSourceItemDescription,
1913
1913
  xo as MessageSourceItemDescriptionPart,
1914
1914
  Bo as MessageSourceItemIcon,
1915
- Ho as MessageSourceItemIndicator,
1915
+ Lo as MessageSourceItemIndicator,
1916
1916
  yo as MessageSourceItemTag,
1917
1917
  To as MessageSourceItemTitle,
1918
1918
  Mo as MessageSources,
@@ -1922,10 +1922,10 @@ export {
1922
1922
  Fo as MessageToolActions,
1923
1923
  go as MessageToolbar,
1924
1924
  $t as MessageWrapper,
1925
- Hn as Messages,
1925
+ Ln as Messages,
1926
1926
  Dr as Provider,
1927
1927
  Mn as Root,
1928
- No as SendButton,
1928
+ Wo as SendButton,
1929
1929
  Ro as SendButtonIcon,
1930
1930
  Ms as TaglineBrandName,
1931
1931
  Fs as TaglineContainer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-primitives",
3
- "version": "0.0.0-dev-20260219205800",
3
+ "version": "0.0.0-dev-20260219215642",
4
4
  "description": "",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",
@@ -68,9 +68,9 @@
68
68
  "remark-gfm": "^4.0.1",
69
69
  "unist-util-visit": "^5.0.0",
70
70
  "use-sync-external-store": "^1.4.0",
71
- "@inkeep/cxkit-color-mode": "^0.0.0-dev-20260219205800",
72
- "@inkeep/cxkit-theme": "0.0.0-dev-20260219205800",
73
- "@inkeep/cxkit-types": "0.0.0-dev-20260219205800"
71
+ "@inkeep/cxkit-color-mode": "^0.0.0-dev-20260219215642",
72
+ "@inkeep/cxkit-theme": "0.0.0-dev-20260219215642",
73
+ "@inkeep/cxkit-types": "0.0.0-dev-20260219215642"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@biomejs/biome": "1.9.4",