@navsi.ai/sdk 1.0.5 → 1.0.6
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.
|
@@ -527,7 +527,7 @@ import {a,c,d,e,f}from'./chunk-UWRZ4ZYG.js';import qe,{useMemo,useReducer,useRef
|
|
|
527
527
|
max-height: 600px;
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
`;var gt="navsi-chatbot-styles",ze=false;function ht(){if(ze||typeof document>"u")return;if(document.getElementById(gt)){ze=true;return}let i=document.createElement("style");i.id=gt,i.textContent=dt,document.head.prepend(i),ze=true;}function ft(i){let e=[],t=0,n=i;for(;n.length>0;){let r=n.indexOf("**");if(r===-1){e.push(jsx(qe.Fragment,{children:n},t++));break}let o=n.slice(0,r),s=n.slice(r+2),a=s.indexOf("**");if(a===-1){e.push(jsx(qe.Fragment,{children:n},t++));break}o&&e.push(jsx(qe.Fragment,{children:o},t++)),e.push(jsx("strong",{children:s.slice(0,a)},t++)),n=s.slice(a+2);}return e.length===1?e[0]:jsx(Fragment,{children:e})}function Yt({content:i,isUser:e}){if(e)return jsx(Fragment,{children:i});let t=typeof i=="string"?i:"";if(!t.trim())return jsx(Fragment,{children:"\xA0"});let n=t.split(/\n/),r=[],o=[],s=()=>{o.length>0&&(r.push(jsx("ul",{className:"navsi-chatbot-message-list",children:o.map((a,c)=>jsx("li",{className:"navsi-chatbot-message-list-item",children:ft(a)},c))},r.length)),o=[]);};for(let a=0;a<n.length;a++){let u=n[a].trim(),h=u.match(/^[*-]\s+(.*)$/);h?(s(),o.push(h[1].trim())):(s(),u&&r.push(jsx("p",{className:"navsi-chatbot-message-paragraph",children:ft(u)},r.length)));}return s(),r.length===0?jsx(Fragment,{children:t}):jsx("div",{className:"navsi-chatbot-message-content",children:r})}function Jt({className:i,windowClassName:e$1,buttonClassName:t}){ht();let[n,r]=useState(""),o=useRef(null),s=useRef(null),a=useRef(null),c$1=useRef(false),u=useRef(false),{messages:h,sendMessage:E,isConnected:S,mode:D,setMode:pe,isExecuting:R,error:p,clearError:me,clearMessages:J,isWidgetOpen:V,setWidgetOpen:te,stopExecution:Pe,widgetConfig:$,voiceLanguage:be,setVoiceLanguage:A}=c(),Q=be??$?.voiceLanguage??(typeof navigator<"u"?navigator.language:void 0)??"en-US",{progress:O}=d(),{isReconnecting:G}=e(),$e=useCallback(g=>{u.current=true,E(g),r("");},[E]),y=f({lang:Q,onTranscript:$e,silenceMs:1200,autoSpeak:true});useEffect(()=>{h.length>0&&s.current&&V&&requestAnimationFrame(()=>{s.current&&s.current.scrollTo({top:s.current.scrollHeight,behavior:"smooth"});});},[h,V]),useEffect(()=>{if(!c$1.current){let g=[...h].reverse().find(T=>T.role==="assistant");a.current=g?.id??null,c$1.current=true;}},[]),useEffect(()=>{if(!c$1.current||!u.current||y.isListening)return;let g=h.length>0?h[h.length-1]:void 0;if(!g||g.role!=="assistant"||g.id===a.current)return;let T=g.content?.trim();T&&(y.speak(T),a.current=g.id,u.current=false);},[h,y]);let ve=()=>{n.trim()&&(u.current=false,E(n.trim()),r(""));},We=g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),ve());};function F(g,T){return g&&(/^#[0-9a-fA-F]{3,8}$/.test(g)||/^rgba?\(\s*[\d.,\s%]+\)$/.test(g)||/^hsla?\(\s*[\d.,\s%]+\)$/.test(g)||/^[a-zA-Z]{2,30}$/.test(g))?g:T}function j(g,T){if(!g)return T;let W=g.replace(/[^a-zA-Z0-9\s,'_-]/g,"").trim();return W.length>0&&W.length<=200?W:T}useEffect(()=>{let g=$?.theme,T="navsi-chatbot-theme-vars",W=document.getElementById(T);W||(W=document.createElement("style"),W.id=T,document.head.appendChild(W));let ye=F(g?.primaryColor,"#2563eb"),xe=F(g?.secondaryColor,"#1d4ed8"),Ee=F(g?.backgroundColor,"#ffffff"),Se=F(g?.textColor,"#1f2937"),we=j(g?.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"),se=Math.min(50,Math.max(0,Number(g?.borderRadius)||12)),Ce=Math.min(800,Math.max(280,Number(g?.windowWidth)||360)),Re=Math.min(1e3,Math.max(300,Number(g?.windowHeight)||520)),Ae=Math.min(120,Math.max(32,Number(g?.buttonSize)||56)),ee=["bottom-right","bottom-left","top-right","top-left"].includes(g?.position??"")?g?.position??"bottom-right":"bottom-right",l=ee==="bottom-right"||ee==="top-right",f=ee==="bottom-right"||ee==="bottom-left";W.textContent=`
|
|
530
|
+
`;var gt="navsi-chatbot-styles",ze=false;function ht(){if(ze||typeof document>"u")return;if(document.getElementById(gt)){ze=true;return}let i=document.createElement("style");i.id=gt,i.textContent=dt,document.head.prepend(i),ze=true;}function ft(i){let e=[],t=0,n=i;for(;n.length>0;){let r=n.indexOf("**");if(r===-1){e.push(jsx(qe.Fragment,{children:n},t++));break}let o=n.slice(0,r),s=n.slice(r+2),a=s.indexOf("**");if(a===-1){e.push(jsx(qe.Fragment,{children:n},t++));break}o&&e.push(jsx(qe.Fragment,{children:o},t++)),e.push(jsx("strong",{children:s.slice(0,a)},t++)),n=s.slice(a+2);}return e.length===1?e[0]:jsx(Fragment,{children:e})}function Yt({content:i,isUser:e}){if(e)return jsx(Fragment,{children:i});let t=typeof i=="string"?i:"";if(!t.trim())return jsx(Fragment,{children:"\xA0"});let n=t.split(/\n/),r=[],o=[],s=()=>{o.length>0&&(r.push(jsx("ul",{className:"navsi-chatbot-message-list",children:o.map((a,c)=>jsx("li",{className:"navsi-chatbot-message-list-item",children:ft(a)},c))},r.length)),o=[]);};for(let a=0;a<n.length;a++){let u=n[a].trim(),h=u.match(/^[*-]\s+(.*)$/);h?(s(),o.push(h[1].trim())):(s(),u&&r.push(jsx("p",{className:"navsi-chatbot-message-paragraph",children:ft(u)},r.length)));}return s(),r.length===0?jsx(Fragment,{children:t}):jsx("div",{className:"navsi-chatbot-message-content",children:r})}function Jt({className:i,windowClassName:e$1,buttonClassName:t}){ht();let[n,r]=useState(""),o=useRef(null),s=useRef(null),a=useRef(null),c$1=useRef(false),u=useRef(false),{messages:h,sendMessage:E,isConnected:S,mode:D,setMode:pe,isExecuting:R,error:p,clearError:me,clearMessages:J,isWidgetOpen:V,setWidgetOpen:te,stopExecution:Pe,widgetConfig:$,voiceLanguage:be,setVoiceLanguage:A}=c(),Q=be??$?.voiceLanguage??(typeof navigator<"u"?navigator.language:void 0)??"en-US",{progress:O}=d(),{isReconnecting:G}=e(),$e=useCallback(g=>{u.current=true,E(g),r("");},[E]),y=f({lang:Q,onTranscript:$e,silenceMs:1200,autoSpeak:true});useEffect(()=>{h.length>0&&s.current&&V&&requestAnimationFrame(()=>{s.current&&s.current.scrollTo({top:s.current.scrollHeight,behavior:"smooth"});});},[h,V]),useEffect(()=>{if(!c$1.current){let g=[...h].reverse().find(T=>T.role==="assistant");a.current=g?.id??null,c$1.current=true;}},[]),useEffect(()=>{if(!c$1.current||!u.current||y.isListening)return;let g=h.length>0?h[h.length-1]:void 0;if(!g||g.role!=="assistant"||g.id===a.current||g.status==="sending")return;let T=g.content?.trim();T&&(y.speak(T),a.current=g.id,u.current=false);},[h,y]);let ve=()=>{n.trim()&&(u.current=false,E(n.trim()),r(""));},We=g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),ve());};function F(g,T){return g&&(/^#[0-9a-fA-F]{3,8}$/.test(g)||/^rgba?\(\s*[\d.,\s%]+\)$/.test(g)||/^hsla?\(\s*[\d.,\s%]+\)$/.test(g)||/^[a-zA-Z]{2,30}$/.test(g))?g:T}function j(g,T){if(!g)return T;let W=g.replace(/[^a-zA-Z0-9\s,'_-]/g,"").trim();return W.length>0&&W.length<=200?W:T}useEffect(()=>{let g=$?.theme,T="navsi-chatbot-theme-vars",W=document.getElementById(T);W||(W=document.createElement("style"),W.id=T,document.head.appendChild(W));let ye=F(g?.primaryColor,"#2563eb"),xe=F(g?.secondaryColor,"#1d4ed8"),Ee=F(g?.backgroundColor,"#ffffff"),Se=F(g?.textColor,"#1f2937"),we=j(g?.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"),se=Math.min(50,Math.max(0,Number(g?.borderRadius)||12)),Ce=Math.min(800,Math.max(280,Number(g?.windowWidth)||360)),Re=Math.min(1e3,Math.max(300,Number(g?.windowHeight)||520)),Ae=Math.min(120,Math.max(32,Number(g?.buttonSize)||56)),ee=["bottom-right","bottom-left","top-right","top-left"].includes(g?.position??"")?g?.position??"bottom-right":"bottom-right",l=ee==="bottom-right"||ee==="top-right",f=ee==="bottom-right"||ee==="bottom-left";W.textContent=`
|
|
531
531
|
.navsi-chatbot-container {
|
|
532
532
|
--navsi-primary: ${ye};
|
|
533
533
|
--navsi-primary-hover: ${xe};
|
|
@@ -544,5 +544,5 @@ import {a,c,d,e,f}from'./chunk-UWRZ4ZYG.js';import qe,{useMemo,useReducer,useRef
|
|
|
544
544
|
${f?"bottom: 24px; top: auto;":"top: 24px; bottom: auto;"}
|
|
545
545
|
${l?"right: 24px; left: auto;":"left: 24px; right: auto;"}
|
|
546
546
|
}
|
|
547
|
-
`;},[$?.theme]);let ne={position:"fixed",zIndex:9999},K=$?.headerTitle??"AI Assistant",Z=$?.welcomeMessage??"How can I help you today?",re=$?.subtitle??"Type a message to get started",oe=$?.askPlaceholder??"Ask a question...",ie=$?.navigatePlaceholder??"What should I do? Try: Go to cart, Add product 1 to cart",Be=$?.supportedLanguages??[{code:"en-US",label:"EN"},{code:"hi-IN",label:"\u0939\u093F\u0902\u0926\u0940"}];return jsxs("div",{style:ne,className:`navsi-chatbot-container ${i||""}`,children:[V&&jsxs("div",{className:`navsi-chatbot-window ${e$1||""}`,children:[jsxs("div",{className:"navsi-chatbot-header",children:[jsx("div",{className:"navsi-chatbot-header-left",children:jsxs("div",{children:[jsx("div",{className:"navsi-chatbot-title",children:K}),jsx("div",{className:"navsi-chatbot-status",children:S?"Connected":G?"Reconnecting":"Disconnected"}),y.isListening&&jsxs("div",{className:"navsi-chatbot-voice-indicator","aria-live":"polite",children:[jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]}),"Listening\u2026"]})]})}),jsxs("div",{className:"navsi-chatbot-mode-toggle",children:[jsx("button",{className:`navsi-chatbot-mode-button ${D==="ask"?"navsi-chatbot-mode-active":""}`,onClick:()=>pe("ask"),children:"Ask"}),jsx("button",{className:`navsi-chatbot-mode-button ${D==="navigate"?"navsi-chatbot-mode-active":""}`,onClick:()=>pe("navigate"),children:"Action"})]}),jsx("div",{className:"navsi-chatbot-lang-toggle",role:"group","aria-label":"Voice and response language",children:Be.map(g=>jsx("button",{type:"button",className:`navsi-chatbot-lang-button ${Q.startsWith(g.code.split("-")[0])?"navsi-chatbot-lang-active":""}`,onClick:()=>A(g.code),title:g.label,"aria-pressed":Q.startsWith(g.code.split("-")[0]),children:g.label},g.code))}),h.length>0&&jsx("button",{type:"button",onClick:()=>J(),className:"navsi-chatbot-clear",title:"Clear chat","aria-label":"Clear chat",children:"Clear"})]}),R&&jsxs("div",{className:"navsi-chatbot-banner",children:[jsx("span",{children:"\u26A1 Executing actions\u2026"}),O&&jsxs(Fragment,{children:[jsxs("span",{className:"navsi-chatbot-pill",children:[O.current+1,"/",O.total]}),O.description&&jsx("span",{className:"navsi-chatbot-step",children:O.description})]})]}),O&&jsx("div",{className:"navsi-chatbot-progress-container",children:jsx("div",{className:"navsi-chatbot-progress-bar",children:jsx("div",{className:"navsi-chatbot-progress-fill",style:{width:`${O.percentage??0}%`}})})}),p&&jsxs("div",{className:"navsi-chatbot-error",children:[jsx("span",{children:p.message}),jsx("button",{className:"navsi-chatbot-error-close",onClick:me,children:"\u2715"})]}),y.error&&jsx("div",{className:"navsi-chatbot-voice-error",role:"alert",children:y.error}),jsxs("div",{ref:s,className:"navsi-chatbot-messages",role:"log","aria-live":"polite","aria-label":"Chat messages",children:[h.length===0&&jsxs("div",{className:"navsi-chatbot-welcome",children:[jsx("div",{className:"navsi-chatbot-welcome-icon",children:"\u{1F44B}"}),jsx("div",{className:"navsi-chatbot-welcome-text",children:Z}),jsx("div",{className:"navsi-chatbot-welcome-hint",children:re})]}),h.map(g=>jsx("div",{className:`navsi-chatbot-message ${g.role==="user"?"navsi-chatbot-message-user":"navsi-chatbot-message-assistant"}`,children:jsx(Yt,{content:g.content,isUser:g.role==="user"})},g.id)),jsx("div",{ref:o})]}),jsxs("div",{className:"navsi-chatbot-input-area",children:[jsx("input",{type:"text",value:n,onChange:g=>r(g.target.value),onKeyDown:We,placeholder:D==="ask"?oe:ie,className:"navsi-chatbot-input",maxLength:8e3,"aria-label":D==="ask"?oe:ie}),jsx("button",{className:`navsi-chatbot-voice-button ${y.isListening?"navsi-chatbot-voice-button-active":""}`,onClick:()=>{y.isListening?y.stop():y.start();},disabled:!S||!y.isSupported,"aria-label":y.isSupported?y.isListening?"Stop voice input":"Start voice input":"Voice input not supported in this browser","aria-pressed":y.isListening,title:y.isSupported?y.isListening?"Click to stop and send":"Click to start listening":"Voice input is not available in this browser",type:"button",children:y.isListening?jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("circle",{cx:"12",cy:"12",r:"8"})}):jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]})}),R?jsx("button",{className:"navsi-chatbot-stop-button",onClick:Pe,"aria-label":"Stop",title:"Stop current action",children:jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"1"})})}):jsx("button",{className:"navsi-chatbot-send-button",onClick:ve,disabled:!S,children:jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("path",{d:"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"})})})]}),y.transcript&&jsx("div",{className:"navsi-chatbot-voice-transcript","aria-live":"polite",children:y.transcript})]}),jsx("button",{className:`navsi-chatbot-toggle ${t||""}`,onClick:()=>te(!V),"aria-label":V?"Close chat":"Open chat",children:V?jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}):jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"})})})]})}export{ce as a,en as b,Ze as c,le as d,on as e,Kt as f,Jt as g};//# sourceMappingURL=chunk-
|
|
548
|
-
//# sourceMappingURL=chunk-
|
|
547
|
+
`;},[$?.theme]);let ne={position:"fixed",zIndex:9999},K=$?.headerTitle??"AI Assistant",Z=$?.welcomeMessage??"How can I help you today?",re=$?.subtitle??"Type a message to get started",oe=$?.askPlaceholder??"Ask a question...",ie=$?.navigatePlaceholder??"What should I do? Try: Go to cart, Add product 1 to cart",Be=$?.supportedLanguages??[{code:"en-US",label:"EN"},{code:"hi-IN",label:"\u0939\u093F\u0902\u0926\u0940"}];return jsxs("div",{style:ne,className:`navsi-chatbot-container ${i||""}`,children:[V&&jsxs("div",{className:`navsi-chatbot-window ${e$1||""}`,children:[jsxs("div",{className:"navsi-chatbot-header",children:[jsx("div",{className:"navsi-chatbot-header-left",children:jsxs("div",{children:[jsx("div",{className:"navsi-chatbot-title",children:K}),jsx("div",{className:"navsi-chatbot-status",children:S?"Connected":G?"Reconnecting":"Disconnected"}),y.isListening&&jsxs("div",{className:"navsi-chatbot-voice-indicator","aria-live":"polite",children:[jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]}),"Listening\u2026"]})]})}),jsxs("div",{className:"navsi-chatbot-mode-toggle",children:[jsx("button",{className:`navsi-chatbot-mode-button ${D==="ask"?"navsi-chatbot-mode-active":""}`,onClick:()=>pe("ask"),children:"Ask"}),jsx("button",{className:`navsi-chatbot-mode-button ${D==="navigate"?"navsi-chatbot-mode-active":""}`,onClick:()=>pe("navigate"),children:"Action"})]}),jsx("div",{className:"navsi-chatbot-lang-toggle",role:"group","aria-label":"Voice and response language",children:Be.map(g=>jsx("button",{type:"button",className:`navsi-chatbot-lang-button ${Q.startsWith(g.code.split("-")[0])?"navsi-chatbot-lang-active":""}`,onClick:()=>A(g.code),title:g.label,"aria-pressed":Q.startsWith(g.code.split("-")[0]),children:g.label},g.code))}),h.length>0&&jsx("button",{type:"button",onClick:()=>J(),className:"navsi-chatbot-clear",title:"Clear chat","aria-label":"Clear chat",children:"Clear"})]}),R&&jsxs("div",{className:"navsi-chatbot-banner",children:[jsx("span",{children:"\u26A1 Executing actions\u2026"}),O&&jsxs(Fragment,{children:[jsxs("span",{className:"navsi-chatbot-pill",children:[O.current+1,"/",O.total]}),O.description&&jsx("span",{className:"navsi-chatbot-step",children:O.description})]})]}),O&&jsx("div",{className:"navsi-chatbot-progress-container",children:jsx("div",{className:"navsi-chatbot-progress-bar",children:jsx("div",{className:"navsi-chatbot-progress-fill",style:{width:`${O.percentage??0}%`}})})}),p&&jsxs("div",{className:"navsi-chatbot-error",children:[jsx("span",{children:p.message}),jsx("button",{className:"navsi-chatbot-error-close",onClick:me,children:"\u2715"})]}),y.error&&jsx("div",{className:"navsi-chatbot-voice-error",role:"alert",children:y.error}),jsxs("div",{ref:s,className:"navsi-chatbot-messages",role:"log","aria-live":"polite","aria-label":"Chat messages",children:[h.length===0&&jsxs("div",{className:"navsi-chatbot-welcome",children:[jsx("div",{className:"navsi-chatbot-welcome-icon",children:"\u{1F44B}"}),jsx("div",{className:"navsi-chatbot-welcome-text",children:Z}),jsx("div",{className:"navsi-chatbot-welcome-hint",children:re})]}),h.map(g=>jsx("div",{className:`navsi-chatbot-message ${g.role==="user"?"navsi-chatbot-message-user":"navsi-chatbot-message-assistant"}`,children:jsx(Yt,{content:g.content,isUser:g.role==="user"})},g.id)),jsx("div",{ref:o})]}),jsxs("div",{className:"navsi-chatbot-input-area",children:[jsx("input",{type:"text",value:n,onChange:g=>r(g.target.value),onKeyDown:We,placeholder:D==="ask"?oe:ie,className:"navsi-chatbot-input",maxLength:8e3,"aria-label":D==="ask"?oe:ie}),jsx("button",{className:`navsi-chatbot-voice-button ${y.isListening?"navsi-chatbot-voice-button-active":""}`,onClick:()=>{y.isListening?y.stop():y.start();},disabled:!S||!y.isSupported,"aria-label":y.isSupported?y.isListening?"Stop voice input":"Start voice input":"Voice input not supported in this browser","aria-pressed":y.isListening,title:y.isSupported?y.isListening?"Click to stop and send":"Click to start listening":"Voice input is not available in this browser",type:"button",children:y.isListening?jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("circle",{cx:"12",cy:"12",r:"8"})}):jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]})}),R?jsx("button",{className:"navsi-chatbot-stop-button",onClick:Pe,"aria-label":"Stop",title:"Stop current action",children:jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"1"})})}):jsx("button",{className:"navsi-chatbot-send-button",onClick:ve,disabled:!S,children:jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("path",{d:"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"})})})]}),y.transcript&&jsx("div",{className:"navsi-chatbot-voice-transcript","aria-live":"polite",children:y.transcript})]}),jsx("button",{className:`navsi-chatbot-toggle ${t||""}`,onClick:()=>te(!V),"aria-label":V?"Close chat":"Open chat",children:V?jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}):jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"})})})]})}export{ce as a,en as b,Ze as c,le as d,on as e,Kt as f,Jt as g};//# sourceMappingURL=chunk-CH74WH2N.js.map
|
|
548
|
+
//# sourceMappingURL=chunk-CH74WH2N.js.map
|