@quidgest/chatbot 0.5.6 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -43,4 +43,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
43
43
  ${Hn}: ${u}px;
44
44
  }
45
45
  `;return e.onMounted(()=>{document.body.setAttribute(te,(a()+1).toString());const r=Jn(o.gapMode);n.add(l(r,!o.noRelative,o.gapMode,o.noImportant?"":"!important"))}),e.onUnmounted(()=>{const r=a()-1;r<=0?document.body.removeAttribute(te):document.body.setAttribute(te,r.toString()),n.remove()}),(r,i)=>e.renderSlot(r.$slots,"default")}}));function to(t,o,n,a){const l=(a==null?void 0:a.offset)??0,r=(a==null?void 0:a.crossOffset)??0,i=(a==null?void 0:a.placement)??"bottom",s=t.getBoundingClientRect(),u=o.getBoundingClientRect(),d=n==null?void 0:n.getBoundingClientRect(),f=no(s,u,i,l),c=io(s,u,f),m=ao(c,f,l),h=ro(m,f,r),b=oo(h,u,f);let w;if(a!=null&&a.arrow){if(!d)throw new Error("[Quidgest UI] The arrow element must exist to compute its position");w=lo(b,s,u,d,f)}return{overlayCoords:b,arrowCoords:w,placement:f}}function no(t,o,n,a){const l=Ke(t,o,n,a);if(et(l)){const r=ne(n),i={top:"bottom",bottom:"top",left:"right",right:"left"}[r],s=Ke(t,o,i,a);if(et(s))return n;const u=uo(n);return u?`${i}-${u}`:i}return n}function oo(t,o,n){const a=fe(n),l=(i,s,u)=>Math.min(Math.max(i,s),u),r={...t};return a==="x"?r.x=l(t.x,8,window.innerWidth-o.width-8):r.y=l(t.y,8,window.innerHeight-o.height-8),r}function ao(t,o,n){const a=ne(o);return{x:t.x+(a==="left"?-n:a==="right"?n:0),y:t.y+(a==="top"?-n:a==="bottom"?n:0)}}function ro(t,o,n){const a=ne(o);return{x:t.x+(a==="top"||a==="bottom"?n:0),y:t.y+(a==="right"||a==="left"?n:0)}}function lo(t,o,n,a,l){if(fe(l)==="y"){const r=o.top+o.height/2,i=t.y+n.height/2,s=i-r,u=n.height/2-s-a.height/2+2;if(u>0&&u<n.height-a.height)return{y:u}}else{const r=o.left+o.width/2,i=t.x+n.width/2,s=i-r,u=n.width/2-s-a.width/2+2;if(u>0&&u<n.width-a.width)return{x:u}}}function io(t,o,n){const[a,l]=n.split("-"),r=t.x+t.width/2-o.width/2,i=t.y+t.height/2-o.height/2;let s;switch(a){case"top":s={x:r,y:t.y-o.height};break;case"bottom":s={x:r,y:t.y+t.height};break;case"left":s={x:t.x-o.width,y:i};break;case"right":s={x:t.x+t.width,y:i};break;default:throw new Error(`[Quidgest UI] Invalid placement value: ${n}`)}if(!l)return s;const u=fe(n)==="y"?"height":"width",d=fe(n),f=t[u]/2-o[u]/2;switch(l){case"start":s[d]-=f;break;case"end":s[d]+=f;break;default:throw new Error(`[Quidgest UI] Invalid alignment value: ${l}`)}return s}function Ke(t,o,n,a){const l=ne(n);let r=0;switch(l){case"top":r=t.top-(o.height+a);break;case"bottom":r=window.innerHeight-t.bottom-(o.height+a);break;case"left":r=t.left-(o.width+a);break;case"right":r=window.innerWidth-t.right-(o.width+a);break;default:throw new Error(`[Quidgest UI] Invalid side value: ${l}`)}return r}function so(t){return t==="x"?"y":"x"}function co(t){const o=ne(t);return["left","right"].includes(o)?"x":"y"}function fe(t){return so(co(t))}function ne(t){const[o]=t.split("-");return o}function uo(t){const[,o]=t.split("-");return o}function et(t){return t<0}function po(t){return typeof t=="string"?document.querySelector(t):t}const fo=["id"],mo=["role"],go=T(e.defineComponent({inheritAttrs:!1,__name:"QOverlay",props:e.mergeModels({id:{},class:{},anchor:{},appearance:{default:"regular"},arrow:{type:Boolean},attach:{default:"body"},inline:{type:Boolean},backdropBlur:{type:Boolean},backdropClass:{},delay:{default:500},nonModal:{type:Boolean},scrollLock:{type:Boolean},offset:{default:8},crossOffset:{default:0},persistent:{type:Boolean},placement:{default:"right"},spy:{type:Boolean},transition:{default:"fade"},trigger:{default:"click"},width:{default:"auto"},focusTrap:{type:Boolean},centerVertically:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["enter","leave"],["update:modelValue"]),setup(t,{emit:o}){const n=t,a=o,l=e.useModel(t,"modelValue"),{class:r}=Me(),i=e.computed(()=>["q-overlay",`q-overlay--${ne(c.placement)}`,r.value,{"q-overlay--independent":s.value,"q-overlay--inverted":n.appearance==="inverted","q-overlay--center":n.centerVertically},n.class]),s=e.computed(()=>n.anchor===void 0),u=e.computed(()=>l.value&&!n.nonModal),d=e.computed(()=>(l.value||c.animating)&&n.scrollLock),f=e.computed(()=>!n.inline&&(l.value||c.animating)),c=e.reactive({animating:!1,top:0,left:0,width:0,placement:n.placement}),m=e.reactive({top:void 0,left:void 0,hidden:!0});e.watch(l,k);const h=e.computed(()=>{if(s.value)return;const C=x(),X=n.width==="anchor",H=X?C==null?void 0:C.getBoundingClientRect().width:void 0;return{top:`${c.top}px`,left:`${c.left}px`,width:H!==void 0?`${H}px`:void 0}}),b=e.computed(()=>{if(n.arrow)return{top:m.top!==void 0?`${m.top}px`:void 0,left:m.left!==void 0?`${m.left}px`:void 0,opacity:m.hidden?0:1}}),w=e.ref(null),v=e.ref(null),P=e.ref(null);function D(){const C=x();if(!C||!v.value)return;const X={placement:n.placement,width:n.width,offset:n.offset,crossOffset:n.crossOffset,arrow:n.arrow},H=to(C,v.value,(w==null?void 0:w.value)??void 0,X);c.left=H.overlayCoords.x,c.top=H.overlayCoords.y,c.placement=H.placement,m.hidden=H.arrowCoords===void 0,H.arrowCoords&&(m.top=H.arrowCoords.y,m.left=H.arrowCoords.x)}e.watch(()=>n.placement,()=>e.nextTick(D));let V;function R(){_(0)}function M(){_(n.delay)}function _(C){V&&I(),V=window.setTimeout(()=>{l.value=!0},C)}function L(){if(V&&I(),l.value=!1,n.anchor&&n.trigger==="click"){const C=x();e.nextTick(()=>C==null?void 0:C.focus())}}function I(){clearTimeout(V),V=void 0}function U(){e.nextTick(ie),a("enter")}function z(){S()}function p(){a("leave")}function g(){S(),va()}function k(){c.animating=!0}function S(){c.animating=!1}function x(){return n.anchor?po(n.anchor):null}function A(C){n.persistent&&C.preventDefault()}function E(C){var X;if(n.persistent){C.preventDefault();return}let H=!1;C.defaultPrevented||C.detail.originalEvent.type==="pointerdown"&&(H=!0);const Sa=C.detail.originalEvent.target;if((X=x())!=null&&X.contains(Sa)){C.preventDefault();return}C.detail.originalEvent.type==="focusin"&&H&&C.preventDefault()}function q(){L()}let y;function B(){const C=x();if(C)switch(y=new MutationObserver(D),y.observe(C,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),n.trigger){case"click":C.addEventListener("click",R);break;case"hover":C.addEventListener("mouseenter",M),C.addEventListener("mouseleave",L),C.addEventListener("focusin",R),C.addEventListener("focusout",L);break}}function $(){const C=x();if(C)switch(y==null||y.disconnect(),n.trigger){case"click":C.removeEventListener("click",R);break;case"hover":C.removeEventListener("mouseenter",M),C.removeEventListener("mouseleave",L),C.removeEventListener("focusin",R),C.removeEventListener("focusout",L);break}}function N(){window.addEventListener("resize",D),n.scrollLock||window.addEventListener("scroll",D)}function G(){window.removeEventListener("resize",D),n.scrollLock||window.removeEventListener("scroll",D)}let Z;function oe(){x()?(D(),Z=window.setTimeout(oe,100)):L()}function ie(){var C;s.value||(N(),n.spy?oe():D()),(s.value||n.trigger==="click")&&((C=v.value)==null||C.focus())}function va(){s.value||G(),n.spy&&(clearTimeout(Z),Z=void 0)}return e.onMounted(()=>{e.nextTick(B)}),e.onBeforeUnmount($),(C,X)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!f.value,to:n.attach},[e.createVNode(e.Transition,{name:"fade",appear:""},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([n.backdropClass,"q-overlay__underlay",{"q-overlay__underlay--blur":n.backdropBlur}])},null,2)):e.createCommentVNode("v-if",!0)]),_:1}),e.createVNode(e.Transition,{name:n.transition,appear:"",onEnter:U,onAfterEnter:z,onLeave:p,onAfterLeave:g},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:n.id,ref_key:"overlayContainerRef",ref:P,tabindex:"-1",class:e.normalizeClass(i.value),style:e.normalizeStyle(h.value)},[e.createVNode(e.unref(nn),{onDismiss:q,onInteractOutside:E,onPointerDownOutside:A},{default:e.withCtx(()=>[P.value?(e.openBlock(),e.createBlock(e.unref(jn),{key:0,disabled:n.nonModal||!l.value,options:{fallbackFocus:P.value}},{default:e.withCtx(()=>[e.createElementVNode("div",e.mergeProps({ref_key:"overlayRef",ref:v,class:"q-overlay__content",tabindex:"-1",role:u.value?"dialog":void 0},C.$attrs),[n.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowRef",ref:w,role:"presentation",class:"q-overlay__arrow",style:e.normalizeStyle(b.value)},null,4)):e.createCommentVNode("v-if",!0),e.renderSlot(C.$slots,"default")],16,mo)]),_:3},8,["disabled","options"])):e.createCommentVNode("v-if",!0)]),_:3})],14,fo)):e.createCommentVNode("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"])),d.value?(e.openBlock(),e.createBlock(e.unref(eo),{key:0})):e.createCommentVNode("v-if",!0)],64))}})),bo=[{id:"button",icon:{icon:"check"},props:{variant:"bold",label:"Ok"}}],ho={icon:"check-circle-outline"},yo={close:{icon:"close"}},wo={key:0,class:"q-dialog__header"},ko={key:0,class:"q-dialog__header-title"},Bo={key:1,class:"q-dialog__body"},_o={key:0,class:"q-dialog__body-icon"},Co={class:"q-dialog__body-text"},xo=["innerHTML"],Eo={key:1},vo={key:0,class:"q-dialog__input"},So={key:2,class:"q-dialog__footer"},$o={key:0,class:"q-dialog__footer-buttons"},No=e.defineComponent({__name:"QDialog",props:e.mergeModels({id:{},class:{},title:{},text:{},icon:{default:()=>ho},buttons:{default:()=>bo},attach:{default:"body"},inline:{type:Boolean},backdropBlur:{type:Boolean,default:!0},dismissible:{type:Boolean},html:{type:Boolean,default:!0},icons:{default:()=>yo},size:{default:"small"},centerVertically:{type:Boolean},input:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["enter","leave"],["update:modelValue"]),setup(t,{emit:o}){const n=t,a=o,l=e.useModel(t,"modelValue"),r=e.ref(""),i=e.ref(""),s=e.computed(()=>["q-dialog",n.class]),u=e.computed(()=>`q-overlay--${n.size}`);function d(){l.value=!1}function f(h){var b,w;if(h.action){if((b=n.input)!=null&&b.validator&&(i.value=n.input.validator(e.unref(r)),e.unref(i)))return;(w=h.action)==null||w.call(h,e.unref(r))}d()}function c(){a("enter")}function m(){a("leave")}return(h,b)=>(e.openBlock(),e.createBlock(e.unref(go),{id:n.id,modelValue:l.value,"onUpdate:modelValue":b[1]||(b[1]=w=>l.value=w),"backdrop-class":"q-dialog__underlay","scroll-lock":"",persistent:"",inline:n.inline,attach:n.attach,"backdrop-blur":n.backdropBlur,"center-vertically":n.centerVertically,class:e.normalizeClass(u.value),onEnter:c,onLeave:m},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(s.value)},[n.title||h.$slots.header||h.$slots["header.prepend"]||h.$slots["header.append"]?(e.openBlock(),e.createElementBlock("div",wo,[e.renderSlot(h.$slots,"header",{},()=>[e.renderSlot(h.$slots,"header.prepend"),n.title?(e.openBlock(),e.createElementBlock("span",ko,e.toDisplayString(n.title),1)):e.createCommentVNode("v-if",!0),e.renderSlot(h.$slots,"header.append")])])):e.createCommentVNode("v-if",!0),n.icon||n.text||h.$slots.body?(e.openBlock(),e.createElementBlock("div",Bo,[e.renderSlot(h.$slots,"body",{},()=>{var w;return[e.renderSlot(h.$slots,"body.icon",{},()=>[n.icon?(e.openBlock(),e.createElementBlock("span",_o,[e.createVNode(e.unref(F),e.normalizeProps(e.guardReactiveProps(n.icon)),null,16)])):e.createCommentVNode("v-if",!0)]),e.createElementVNode("div",Co,[n.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:n.text},null,8,xo)):(e.openBlock(),e.createElementBlock("div",Eo,e.toDisplayString(n.text),1))]),n.input?(e.openBlock(),e.createElementBlock("div",vo,[e.createVNode(e.unref(Pe),{modelValue:r.value,"onUpdate:modelValue":b[0]||(b[0]=v=>r.value=v),invalid:!!i.value,placeholder:(w=n.input)==null?void 0:w.placeholder,size:"block"},{extras:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(e.unref(F),{key:0,icon:"exclamation-sign"})):e.createCommentVNode("v-if",!0),e.createTextVNode(" "+e.toDisplayString(i.value),1)]),_:1},8,["modelValue","invalid","placeholder"])])):e.createCommentVNode("v-if",!0),e.renderSlot(h.$slots,"body.append")]})])):e.createCommentVNode("v-if",!0),n.buttons||h.$slots["footer.append"]?(e.openBlock(),e.createElementBlock("div",So,[n.buttons?(e.openBlock(),e.createElementBlock("span",$o,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.buttons,w=>(e.openBlock(),e.createBlock(e.unref(j),e.mergeProps({ref_for:!0},w.props,{key:w.id,onClick:()=>f(w)}),{default:e.withCtx(()=>[w.icon?(e.openBlock(),e.createBlock(e.unref(F),e.mergeProps({key:0,ref_for:!0},w.icon),null,16)):e.createCommentVNode("v-if",!0)]),_:2},1040,["onClick"]))),128))])):e.createCommentVNode("v-if",!0),e.renderSlot(h.$slots,"footer.append")])):e.createCommentVNode("v-if",!0),n.dismissible?(e.openBlock(),e.createBlock(e.unref(j),{key:3,class:"q-dialog__close",variant:"text",onClick:d},{default:e.withCtx(()=>[e.createVNode(e.unref(F),e.normalizeProps(e.guardReactiveProps(n.icons.close)),null,16)]),_:1})):e.createCommentVNode("v-if",!0)],2)]),_:3},8,["id","modelValue","inline","attach","backdrop-blur","center-vertically","class"]))}}),me=e.reactive({dialogs:[]});function Ao(){function t(n,a,l){const r=ke(a);return me.dialogs.push({id:r,props:n,options:l}),r}function o(n){const a=me.dialogs.findIndex(l=>l.id===n);a!==-1&&me.dialogs.splice(a,1)}return{...me,addDialog:t,removeDialog:o}}const Io=e.defineComponent({inheritAttrs:!1,__name:"QDialogProvider",props:{inline:{type:Boolean}},emits:["leave"],setup(t,{emit:o}){const n=t,a=o,{dialogs:l,removeDialog:r}=Ao();function i(s){r(s),a("leave",s)}return(s,u)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),d=>(e.openBlock(),e.createBlock(e.unref(tt),e.mergeProps({key:d.id,ref_for:!0},d.props,{"model-value":"",inline:n.inline,onLeave:()=>i(d.id)}),null,16,["inline","onLeave"]))),128))}}),tt=T(No);T(Io);const Do=["id","required","placeholder","readonly","disabled","maxlength","rows","cols","resize","wrap"],Vo=T(e.defineComponent({inheritAttrs:!1,__name:"QTextArea",props:e.mergeModels({id:{},class:{},label:{},for:{},required:{type:Boolean},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},maxLength:{},rows:{default:3},cols:{},resize:{default:"vertical"},wrap:{default:"soft"},autosize:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.useModel(t,"modelValue"),a=e.computed({get:()=>n.value,set:d=>{const f=o.maxLength;n.value=f?d==null?void 0:d.slice(0,f):d}});e.watch(n,d=>a.value=d,{immediate:!0});const l=ke(o.id),r=e.computed(()=>o.readonly||o.disabled?void 0:o.placeholder),i=e.computed(()=>({input:o.autosize?u:null})),s=e.ref(),{triggerResize:u}=un({element:e.computed(()=>o.autosize?s.value:void 0),styleProp:"minHeight"});return(d,f)=>(e.openBlock(),e.createBlock(e.unref(Fe),{class:e.normalizeClass(["q-text-area",o.class]),for:e.unref(l),label:o.label,size:o.size,readonly:o.readonly,disabled:o.disabled,required:o.required},e.createSlots({"label.prepend":e.withCtx(()=>[e.renderSlot(d.$slots,"label.prepend")]),"label.append":e.withCtx(()=>[e.renderSlot(d.$slots,"label.append")]),default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:e.unref(l),ref_key:"textareaRef",ref:s,"onUpdate:modelValue":f[0]||(f[0]=c=>a.value=c),class:"q-text-area__input",required:o.required,placeholder:r.value,readonly:o.readonly,disabled:o.disabled,maxlength:o.maxLength,rows:o.rows,cols:o.cols,resize:o.resize,wrap:o.wrap},d.$attrs,e.toHandlers(i.value,!0)),null,16,Do),[[e.vModelText,a.value]])]),_:2},[d.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(d.$slots,"prepend")]),key:"0"}:void 0,d.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(d.$slots,"append")]),key:"1"}:void 0,d.$slots.extras?{name:"extras",fn:e.withCtx(()=>[e.renderSlot(d.$slots,"extras")]),key:"2"}:void 0]),1032,["class","for","label","size","readonly","disabled","required"]))}}));function W(){return{copy:"Copy",apply:"Apply",applyAll:"Apply all",chatbotTitle:"ChatBot",sendMessage:"Send message",clearChat:"Clear chat",inputLabel:"What can I help with?",imageUpload:"Upload Image",imageUploadQButton:"Upload Image",goodResponse:"Good response",badResponse:"Bad response",initialMessage:"Howdy! I am GenioBot 👋, Quidgest's personal AI assistant! How can I help you?",initialAgentMessage:"Just a temporary message while we are working on the agent mode",loginError:"Uh oh, I could not authenticate with the Quidgest API endpoint 😓",botIsSick:"*cough cough* GenioBot is not feeling alright 🥴️🤒, looks like something failed!",commentDialogTitle:"Would you like to add a comment?",commentPlaceholder:"Type your comment here (optional)...",copyResponse:"Copy response",submitButton:"Submit",cancelButton:"Cancel",senderImage:"Sender Image",imagePreview:"Image preview",regenerateResponsePrompt:"Regenerate a new response for field {0}",regenerateResponse:"Regenerate response",generatingResponse:"Generating",suggestionsForField:"Suggestions for field:",fileUpload:"Upload File"}}async function nt(t,o){var u,d,f,c,m,h;const n=new AbortController,a=n.signal,r=(await K({...t,headers:{Accept:"text/event-stream"},responseType:"stream",signal:a,adapter:"fetch"})).data;if(!r||!(r instanceof ReadableStream))throw new Error("Invalid stream response");const i=r.getReader(),s=new TextDecoder;for(;;){const{done:b,value:w}=await i.read();if(b){(u=o.onDone)==null||u.call(o);break}const P=s.decode(w,{stream:!0}).split(/\n\n+/);for(const D of P){const V=D.trim().split(`
46
- `);let R="",M="";for(const _ of V)_.startsWith("event:")?R=_.replace("event:","").trim():_.startsWith("data:")&&(M=_.replace("data:","").trim());if(R||(R="message"),!!M)try{const _=JSON.parse(M);switch(R){case"message":(d=o.onMessage)==null||d.call(o,_.value);break;case"error":(f=o.onError)==null||f.call(o,new Error(_.value));break;case"field_metadata":(c=o.onFieldMetadata)==null||c.call(o,_);break;case"done":(m=o.onDone)==null||m.call(o);break;default:console.warn(`Unknown event type: ${R}`)}}catch(_){(h=o.onError)==null||h.call(o,_),console.error("Error processing event:",_);continue}finally{b&&(i.releaseLock(),n.abort())}}}}function ot(t){const o=e.ref(!1),n=e.ref(null);async function a(d){o.value=!0,n.value=null;try{return{data:(await K({...d,baseURL:t})).data,error:null}}catch(f){if(f instanceof Error)return n.value=f,console.error("Error in API request:",f),{data:null,error:f}}finally{o.value=!1}return{data:null,error:new Error("Unknown error occurred in baseRequest")}}async function l(d,f,c,m){return await a({method:"POST",url:"/prompt/load",data:{username:d,project:f,agentID:c,formId:m}})}async function r(d,f,c){o.value=!0;try{return await nt({method:"POST",url:`${t}/prompt/submit`,data:d},{onMessage:m=>{f(m)},onDone:()=>o.value=!1})}catch(m){throw o.value=!1,c==null||c(m),console.error("Error in sendPrompt:",m),m}}async function i(d,f,c,m){o.value=!0;try{return await nt({method:"POST",url:`${t}/get-job-result`,data:{jobId:d}},{onMessage:h=>f(h),onFieldMetadata:h=>c(h),onDone:()=>o.value=!1})}catch(h){n.value=h,m==null||m(h),o.value=!1}}async function s(d,f,c,m){return await a({method:"POST",url:"/prompt/clear",data:{username:d,project:f,agentID:c,formId:m}})}async function u(d,f,c){return await a({method:"POST",url:"/prompt/feedback",data:{messageSessionID:c,feedbackValue:d,feedbackComment:f}})}return{isLoading:o,lastError:n,getChatData:l,clearChatData:s,getJobResultData:i,sendPrompt:r,handleFeedback:u}}const Ro=["innerHTML"],ge=e.defineComponent({__name:"MarkdownRender",props:{source:{},options:{},plugins:{}},setup(t){const o=t,n=e.ref(new st({html:!0,breaks:!0,...o.options??{}}));o.plugins&&o.plugins.forEach(l=>n.value.use(l));const a=e.computed(()=>n.value.render(o.source));return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"markdown-renderer",innerHTML:a.value},null,8,Ro))}});function at(t,o){switch(t){case"date":return new Date(o).toLocaleDateString();case"number":return parseFloat(o);case"boolean":return o.toLowerCase()==="true";default:return o.toString()}}function Mo(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}const Lo=["data-testid"],qo={class:"q-field-preview__toolbar"},To={class:"q-field-preview__footer"},Fo=e.defineComponent({__name:"FieldPreview",props:{name:{},text:{},type:{},disabled:{type:Boolean},applied:{type:Boolean}},emits:["apply","regenerate"],setup(t,{emit:o}){const n=t,a=o,l=W(),r=e.ref(n.applied),i=e.ref(!1),s=e.computed(()=>n.disabled||r.value),u=e.computed(()=>n.disabled||i.value),d=e.computed(()=>n.type==="text"||n.type==="multiline_text"?ge:"div"),f=e.computed(()=>{const b={};return d.value===ge?b.source=n.text:b.innerHTML=n.text,b}),c=e.computed(()=>{const b=["q-field-preview__content"];return d.value!==ge&&b.push("preserve-whitespace"),b});function m(){if(r.value)return;r.value=!0;const b=at(n.type,n.text);a("apply",b)}function h(){i.value||(i.value=!0,a("regenerate",n.name))}return(b,w)=>(e.openBlock(),e.createElementBlock("div",{class:"q-field-preview","data-testid":e.unref(Mo)(n.name)},[e.createElementVNode("div",qo,[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(e.unref(l).suggestionsForField)+" ",1),e.createElementVNode("b",null,e.toDisplayString(n.name),1)])]),e.createElementVNode("div",{class:e.normalizeClass(c.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),e.normalizeProps(e.guardReactiveProps(f.value)),null,16))],2),e.createElementVNode("div",To,[e.createVNode(e.unref(qe),{borderless:""},{default:e.withCtx(()=>[e.createVNode(e.unref(j),{title:e.unref(l).regenerateResponse,disabled:u.value,readonly:u.value,borderless:"",onClick:h},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"reset"})]),_:1},8,["title","disabled","readonly"]),e.createVNode(e.unref(j),{label:e.unref(l).apply,"data-testid":"apply-button",disabled:s.value,readonly:s.value,onClick:m},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"apply"})]),_:1},8,["label","disabled","readonly"])]),_:1})])],8,Lo))}}),Po={class:"pulsing-dots"},Oo={class:"generating-text"},Uo={class:"dots-container"},zo=e.defineComponent({__name:"PulseDots",setup(t){const o=[1,2,3],n=W();return(a,l)=>(e.openBlock(),e.createElementBlock("div",Po,[e.createElementVNode("span",Oo,e.toDisplayString(e.unref(n).generatingResponse),1),e.createElementVNode("div",Uo,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(r,i)=>e.createElementVNode("span",{key:i,class:"dot",style:e.normalizeStyle({animationDelay:i*.2+"s"})}," • ",4)),64))])]))}}),jo={class:"q-chatbot__message-container"},Go={class:"q-chatbot__message-wrapper"},Ho={key:0,class:"q-chatbot__image-preview"},Zo=["src","alt"],Qo={key:1,class:"q-chatbot__file-preview-container"},Jo={class:"q-chatbot__file-icon-container"},Wo={class:"q-chatbot__file-info"},Yo={class:"q-chatbot__file-name"},Xo={class:"q-chatbot__file-extension"},Ko={class:"q-chatbot__message"},ea={key:1,class:"q-chatbot__text q-chatbot__user-text"},ta=e.defineComponent({__name:"ChatBotMessage",props:{sender:{default:"user"},message:{},date:{default:()=>new Date},loading:{type:Boolean},dateFormat:{},file:{},apiEndpoint:{},sessionID:{},userImage:{default:void 0},chatbotImage:{},isWelcomeMessage:{type:Boolean},fields:{default:()=>[]}},emits:["apply-fields","regenerate"],setup(t,{emit:o}){const n=t,a=o,l=W(),{handleFeedback:r}=ot(n.apiEndpoint),i=e.computed(()=>n.sender==="bot"&&!Object.values(l||{}).includes(n.message||"")&&!n.isWelcomeMessage),s=e.computed(()=>{var b;return((b=n.file)==null?void 0:b.fileData.type.startsWith("image/"))??!1}),u=e.computed(()=>n.sender==="bot"?n.chatbotImage:n.userImage),d=e.computed(()=>{var w,v;return(w=n.file)!=null&&w.fileData?((v=n.file.fileData.name.split(".").pop())==null?void 0:v.toUpperCase())??"":""});function f(){n.message&&navigator.clipboard.writeText(n.message).then(()=>{console.log("Response copied to clipboard")}).catch(b=>{console.error("Failed to copy response: ",b)})}function c(b,w){a("apply-fields",[{id:w.id,text:b}])}function m(){if(!n.fields||n.fields.length===0)return;const b=n.fields.map(w=>({id:w.id,text:at(w.type,w.text)}));a("apply-fields",b)}function h(b,w){b===null||w===null||!n.sessionID||r(b,w,n.sessionID)}return(b,w)=>{var v,P,D;return e.openBlock(),e.createElementBlock("div",jo,[e.createVNode(e.unref(F),{type:"img",icon:u.value,alt:e.unref(l).senderImage,class:"q-chatbot__profile"},null,8,["icon","alt"]),e.createElementVNode("div",Go,[s.value?(e.openBlock(),e.createElementBlock("div",Ho,[e.createElementVNode("img",{src:(v=n.file)==null?void 0:v.previewUrl,alt:e.unref(l).imagePreview},null,8,Zo)])):(P=n.file)!=null&&P.fileData&&!s.value?(e.openBlock(),e.createElementBlock("div",Qo,[e.createElementVNode("div",Jo,[e.createVNode(e.unref(F),{icon:"file",class:"q-chatbot__file-icon"})]),e.createElementVNode("div",Wo,[e.createElementVNode("span",Yo,e.toDisplayString((D=n.file)==null?void 0:D.fileData.name),1),e.createElementVNode("span",Xo,e.toDisplayString(d.value),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",Ko,[b.loading?(e.openBlock(),e.createBlock(zo,{key:0})):n.sender==="bot"&&n.fields.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.fields,(V,R)=>(e.openBlock(),e.createBlock(e.unref(Fo),{key:R,class:"q-chatbot__text",text:V.text||"",name:V.name,type:V.type,disabled:b.loading,onRegenerate:()=>a("regenerate",V.name),onApply:M=>c(M,V)},null,8,["text","name","type","disabled","onRegenerate","onApply"]))),128)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[n.sender==="bot"?(e.openBlock(),e.createBlock(e.unref(ge),{key:0,class:"q-chatbot__text",source:n.message||""},null,8,["source"])):(e.openBlock(),e.createElementBlock("div",ea,e.toDisplayString(n.message),1))],64))])]),e.createVNode(e.unref(sa),{"show-buttons":i.value,loading:n.loading,"date-format":n.dateFormat,onCopyResponse:f,onSubmitFeedback:h,onApplyAll:m},null,8,["show-buttons","loading","date-format"])])}}}),O=[];for(let t=0;t<256;++t)O.push((t+256).toString(16).slice(1));function na(t,o=0){return(O[t[o+0]]+O[t[o+1]]+O[t[o+2]]+O[t[o+3]]+"-"+O[t[o+4]]+O[t[o+5]]+"-"+O[t[o+6]]+O[t[o+7]]+"-"+O[t[o+8]]+O[t[o+9]]+"-"+O[t[o+10]]+O[t[o+11]]+O[t[o+12]]+O[t[o+13]]+O[t[o+14]]+O[t[o+15]]).toLowerCase()}let Ne;const oa=new Uint8Array(16);function aa(){if(!Ne){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ne=crypto.getRandomValues.bind(crypto)}return Ne(oa)}const rt={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function lt(t,o,n){var l;if(rt.randomUUID&&!o&&!t)return rt.randomUUID();t=t||{};const a=t.random??((l=t.rng)==null?void 0:l.call(t))??aa();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,na(a)}const Y=e.ref([]),be=e.ref(1);function it(){function t(r,i,s,u,d){const f={id:be.value++,message:r,date:new Date,sender:i||"bot",sessionID:u||lt(),file:s,isWelcomeMessage:d,fields:[]};return Y.value.push(f),f}function o(){return Y.value.find(r=>r.id===be.value-1)}function n(){Y.value=[],be.value=1}function a(r){Y.value=Y.value.filter(i=>i.id!==r)}function l(){return Y.value}return{messages:Y,nextMessageId:be,addChatMessage:t,getLastMessage:o,clearMessages:n,getMessages:l,deleteMessageById:a}}const ra={class:"q-chatbot__dialog-title"},la={key:0,class:"q-chatbot__feedback-buttons"},ia={class:"q-chatbot__sender"},sa=e.defineComponent({__name:"ChatBotMessageButtons",props:{loading:{type:Boolean},showButtons:{type:Boolean},dateFormat:{},date:{}},emits:["submit-feedback","copy-response","apply-all"],setup(t,{emit:o}){const n=t,a=o,l=W(),{getLastMessage:r}=it(),i=e.ref(!1),s=e.ref(""),u=e.ref(null),d=e.ref(!1),f=e.computed(()=>n.loading||d.value),c=n.date||new Date,m=r(),h=e.computed(()=>m?m.fields&&m.fields.length>1:!1),b=[{id:"confirm-btn",action:_,props:{label:l.submitButton,class:"q-chatbot__dialog-confirm-button"},icon:{icon:"submit"}},{id:"cancel-btn",props:{label:l.cancelButton,class:"q-chatbot__dialog-cancel-button"},icon:{icon:"cancel"}}],w=e.computed(()=>n.dateFormat?P(c,"HH:mm"):c.toLocaleString()),v=e.computed(()=>`${w.value}`);function P(I,U){const z=I.getDate().toString().padStart(2,"0"),p=(I.getMonth()+1).toString().padStart(2,"0"),g=I.getFullYear().toString().padStart(2,"0"),k=I.getHours().toString().padStart(2,"0"),S=I.getMinutes().toString().padStart(2,"0"),x=I.getSeconds().toString().padStart(2,"0");return U.replace("dd",z).replace("MM",p).replace("yyyy",g).replace("HH",k).replace("mm",S).replace("ss",x)}function D(I){i.value=!0,s.value="",u.value=I}function V(){D(0)}function R(){D(1)}function M(){d.value||(d.value=!0,a("apply-all"))}function _(){u.value&&(a("submit-feedback",u.value,s.value),i.value=!1,s.value="",u.value=null)}function L(){a("copy-response")}return(I,U)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(tt),{modelValue:i.value,"onUpdate:modelValue":U[1]||(U[1]=z=>i.value=z),inline:"",buttons:b},{body:e.withCtx(()=>[e.createElementVNode("div",ra,e.toDisplayString(e.unref(l).commentDialogTitle),1),e.createVNode(e.unref(Pe),{modelValue:s.value,"onUpdate:modelValue":U[0]||(U[0]=z=>s.value=z),class:"q-chatbot__dialog-comment-input","max-length":150,size:"large",placeholder:e.unref(l).commentPlaceholder},null,8,["modelValue","placeholder"])]),_:1},8,["modelValue"]),I.showButtons?(e.openBlock(),e.createElementBlock("div",la,[e.createVNode(e.unref(qe),null,{default:e.withCtx(()=>[e.createVNode(e.unref(j),{title:e.unref(l).goodResponse,class:"q-chatbot__good-response-button",borderless:"",disabled:n.loading,onClick:R},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"thumb-up"})]),_:1},8,["title","disabled"]),e.createVNode(e.unref(j),{title:e.unref(l).badResponse,class:"q-chatbot__bad-response-button",borderless:"",disabled:n.loading,onClick:V},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"thumb-down"})]),_:1},8,["title","disabled"]),e.createVNode(e.unref(j),{title:e.unref(l).copyResponse,class:"q-chatbot__copy-button",borderless:"",disabled:n.loading,onClick:L},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"copy-content"})]),_:1},8,["title","disabled"]),h.value?(e.openBlock(),e.createBlock(e.unref(j),{key:0,title:e.unref(l).applyAll,class:"q-chatbot__apply-all-button",borderless:"",disabled:f.value,readonly:f.value,label:e.unref(l).applyAll,onClick:M},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"apply-all"})]),_:1},8,["title","disabled","readonly","label"])):e.createCommentVNode("",!0)]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",ia,e.toDisplayString(v.value),1)],64))}}),ca={class:"q-chatbot__tools"},da={class:"q-chatbot__tools__select"},ua=e.defineComponent({__name:"ChatToolBar",props:{disabled:{type:Boolean},availableAgents:{default:()=>[]},selectedAgentKey:{}},emits:["clear","change-chat"],setup(t,{emit:o}){const n=t,a=o,{clearChat:l}=W(),r={key:"",value:"Default Chat",formId:""},i=e.computed(()=>n.availableAgents&&n.availableAgents.length>0),s=e.ref(n.selectedAgentKey||r.key);e.watch(()=>n.selectedAgentKey,c=>{s.value=c||r.key});const u=e.computed(()=>{var m;const c=(m=n.availableAgents)==null?void 0:m.map(h=>({key:h.key,value:h.value,formId:h.formId}));return c==null||c.push(r),c||[r]});function d(){a("clear")}function f(c){const m=u.value.find(h=>h.key===c);if(m){if(m.key===r.key){a("change-chat",{key:"",formId:""});return}a("change-chat",m)}}return(c,m)=>{const h=e.resolveComponent("q-select");return e.openBlock(),e.createElementBlock("div",ca,[e.createElementVNode("div",da,[i.value?(e.openBlock(),e.createBlock(h,{key:0,modelValue:s.value,"onUpdate:modelValue":[m[0]||(m[0]=b=>s.value=b),f],inline:"",class:"q-chatbot__tools-select-input",size:"medium",items:u.value},null,8,["modelValue","items"])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(j),{title:e.unref(l),disabled:n.disabled,class:"q-chatbot__tools-clear",borderless:"",onClick:d},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"bin"})]),_:1},8,["title","disabled"])])}}}),pa={class:"q-chatbot__input-wrapper"},fa={key:0,class:"q-chatbot__file-preview"},ma=["src","alt"],ga={key:1,class:"q-chatbot__file-preview",tabindex:"0"},ba={class:"q-chatbot__file-name"},ha={class:"q-chatbot__input"},ya={class:"q-chatbot__send-container"},wa=["accept"],ka=e.defineComponent({__name:"ChatBotInput",props:{disabled:{type:Boolean},loading:{type:Boolean},userPrompt:{},agentId:{}},emits:["send-message"],setup(t,{emit:o}){const n=t,a=o,l=W(),r=e.ref(null),i=e.ref(null),s=e.ref(""),u=e.ref(!1),d=e.computed(()=>".png,.jpeg,.jpg,.svg,.webp,.pdf,.doc,.docx"),f=e.computed(()=>i.value?i.value.type.startsWith("image/")??!1:!1),c=e.ref(n.userPrompt??""),m=e.computed(()=>n.disabled||n.loading||c.value.trim().length===0);function h(_){_.preventDefault(),n.disabled||(u.value=!0)}const b=e.computed(()=>({"q-chatbot__footer-disabled":n.disabled,"drag-over":u.value&&!i.value}));function w(_){_.preventDefault(),u.value=!1}function v(_){var I;if(_.preventDefault(),u.value=!1,n.disabled||i.value)return;const L=(I=_.dataTransfer)==null?void 0:I.files;L&&P(L[0])}function P(_){i.value=_,_.type.startsWith("image/")?s.value=URL.createObjectURL(_):s.value=""}function D(){if(!(c.value.trim()===""||n.loading||n.disabled)){if(i.value){const _={fileData:i.value,previewUrl:s.value??""};a("send-message",c.value,_),V()}else a("send-message",c.value);c.value=""}}function V(){i.value=null,s.value="",r.value&&(r.value.value="",r.value.files=null)}function R(){var _;(_=r.value)==null||_.click()}function M(_){var I;const L=_.target;(I=L.files)!=null&&I[0]&&P(L.files[0])}return(_,L)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(Te),{label:e.unref(l).inputLabel},null,8,["label"]),e.createElementVNode("div",{class:e.normalizeClass(["q-chatbot__footer",b.value]),onDragover:e.withModifiers(h,["prevent"]),onDragleave:e.withModifiers(w,["prevent"]),onDrop:e.withModifiers(v,["prevent"])},[e.createElementVNode("div",pa,[i.value?(e.openBlock(),e.createElementBlock("div",fa,[f.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"q-chatbot__image-preview",src:s.value,tabindex:"0",alt:e.unref(l).imagePreview},null,8,ma)):(e.openBlock(),e.createElementBlock("div",ga,[e.createVNode(e.unref(F),{icon:"file",class:"q-chatbot__file-icon"}),e.createElementVNode("span",ba,e.toDisplayString(i.value.name),1)])),e.createVNode(e.unref(j),{class:"q-chatbot__remove-file",tabindex:"0",flat:"",round:"",onClick:V},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"remove"})]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",ha,[e.createVNode(e.unref(Vo),{id:"chatbot-input",modelValue:c.value,"onUpdate:modelValue":L[0]||(L[0]=I=>c.value=I),size:"block",autosize:"",resize:"none",rows:2,disabled:n.disabled,onKeyup:e.withKeys(D,["enter"])},null,8,["modelValue","disabled"])]),e.createElementVNode("div",ya,[e.createVNode(e.unref(j),{title:e.unref(l).imageUpload,class:"q-chatbot__upload",disabled:n.disabled||n.loading||!!i.value,onClick:R},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"upload"})]),_:1},8,["title","disabled"]),e.createElementVNode("input",{id:"file-upload",ref_key:"fileInput",ref:r,type:"file",accept:d.value,class:"hidden-input",onChange:M},null,40,wa),e.createVNode(e.unref(j),{title:e.unref(l).sendMessage,variant:"bold",class:"q-chatbot__send",disabled:m.value,readonly:m.value,onClick:D},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"send"})]),_:1},8,["title","disabled","readonly"])])])],34)],64))}}),Ba="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20126.25%20110.36'%3e%3cdefs%3e%3cradialGradient%20id='radial-gradient'%20cx='45.24'%20cy='38.05'%20fx='45.24'%20fy='38.05'%20r='59.09'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2331319e'/%3e%3cstop%20offset='.19'%20stop-color='%232e2e97'/%3e%3cstop%20offset='.45'%20stop-color='%23292985'/%3e%3cstop%20offset='.75'%20stop-color='%23202067'/%3e%3cstop%20offset='1'%20stop-color='%2317174a'/%3e%3c/radialGradient%3e%3clinearGradient%20id='linear-gradient'%20x1='82.65'%20y1='50.41'%20x2='82.65'%20y2='77.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='.02'%20stop-color='%2366ebfe'/%3e%3cstop%20offset='.96'%20stop-color='%2300bfdb'/%3e%3c/linearGradient%3e%3clinearGradient%20id='linear-gradient-2'%20x1='44.6'%20y1='50.01'%20x2='44.6'%20y2='77.1'%20xlink:href='%23linear-gradient'/%3e%3c/defs%3e%3cg%20isolation='isolate'%3e%3cg%20id='Layer_1'%3e%3cpath%20d='M126.2,61.4c-.2-3.69-2.61-17.39-5.92-22.09-2.42-3.44-5.89-4.03-7.96-4.38-.13-.02-.27-.05-.41-.07-.16-.28-.32-.58-.45-.81-.63-1.14-1.03-1.87-1.44-2.44-6.96-9.88-14.91-16.51-24.85-20.69-.25-2.29-.84-5.24-3.37-7.44-2.93-2.55-7.58-2.9-11.68-3.21-.93-.07-1.82-.14-2.4-.22l-.33-.05h-8.61l-.36.05c-.65.1-1.61.17-2.63.24-3.75.27-8.01.57-10.98,2.85-2.94,2.26-3.58,5.55-3.79,7.84-9.71,3.94-17.86,10.71-24.85,20.62-.4.57-.81,1.3-1.43,2.44-.13.23-.29.53-.45.81-.14.02-.28.05-.4.07-2.07.35-5.54.94-7.96,4.39-2.25,3.19-3.84,9.89-4.58,13.59-.6,2.97-1.9,10.3-1.08,14.26.79,3.78,3.66,5.6,5.37,6.68.12.08.26.16.39.25,1.65,10.03,6.98,18.56,15.52,24.77,9.23,6.72,20.2,9.43,27.78,10.52,4.49.65,9.15.97,13.85.97,9.67,0,23.77-1.39,36-8.02,11.58-6.27,18.81-16,21.04-28.24,4.52-2.76,6.36-5.67,5.98-12.71Z'%20fill='%2317174a'/%3e%3cpath%20d='M67.15,4.69c2.98.42,9.31.31,11.62,2.31,1.99,1.73,1.65,4.82,2.06,7.22,10.77,3.89,18.73,10.59,25.39,20.04.64.91,2.13,3.95,2.58,4.33,1.71,1.46,5.54.35,7.67,3.37,2.29,3.25,4.83,15.41,5.06,19.59.31,5.82-.76,6.9-5.58,9.44-3.28,26.16-29.7,34.5-52.68,34.5-4.6,0-9.06-.33-13.17-.93-18.13-2.61-37.11-12.11-39.51-33.08-1.7-1.92-4.96-2.54-5.55-5.39-.95-4.56,2.21-20.32,4.89-24.14,2.13-3.02,5.96-1.91,7.67-3.37.46-.39,1.94-3.42,2.58-4.33,6.54-9.28,14.55-16.22,25.21-19.87.85-.87-.3-5.45,2.43-7.55,2.52-1.94,8.35-1.69,11.42-2.16h7.91'%20fill='%23fff'/%3e%3cpath%20d='M121.86,61.51c-.22-4.2-2.78-16.43-5.07-19.7-1.77-2.51-4.71-2.18-6.64-2.83.1,1.18.16,2.37.16,3.57,0,26.85-25.96,48.61-57.98,48.61-15.83,0-30.17-5.32-40.63-13.94,4.91,17.1,22.06,25.14,38.51,27.52,4.12.59,8.6.93,13.21.93,23.06,0,49.57-8.38,52.85-34.68,4.83-2.56,5.91-3.63,5.6-9.49Z'%20fill='%23d0d7e2'%20mix-blend-mode='multiply'%20opacity='.4'/%3e%3cpath%20d='M62.91,97.68c5.82,0,11.67-.53,16.72-1.56,13.1-2.67,22.09-8.06,26.72-16.03,4.43-7.63,4.75-17.33.96-28.84-4.28-13-13.22-22.77-24.7-27.89-.13,4.51-3.84,8.16-8.38,8.16h-20.89c-4.61,0-8.39-3.78-8.39-8.39v-.14c-5.36,2.25-10.29,5.49-14.5,9.61-8.23,8.06-13.16,19.02-13.9,30.84-.59,9.44,2.67,17.53,9.43,23.42,6.27,5.46,15.68,9.02,27.2,10.3,3.13.35,6.43.52,9.73.52'%20fill='url(%23radial-gradient)'/%3e%3crect%20x='74.34'%20y='50.41'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient)'/%3e%3crect%20x='36.29'%20y='50.01'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient-2)'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF2GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAx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ev/w+6IPetTo6+TraP74MnZHnFWClkuK/Zfbv8+j6UYcaR8xh6JOAB9eovwIYH0VoU2QP5F3P7wxMRj9BiarSSzuwCvjA/L3VtdrFvPYE9ie6qqYb0Omgfh3VKcvIIy5czz8YfQbnFJpLbegDeZGmjqxbSI3r+ScCtwL9GhzsS+jQ1tn1aLxuNRvMBR8OTCD4MZk4SJprO6JecOs6govcn88GfggcEXOwz5uZaboN2Qysi3p0Pf8Y40A4lfgUY96IduzcoaR4xqaOWRvW6nr+3sZJcg4wxNJuLjSOl2lKirU2djAWccvGkX+6cTYcE+G2pti26xnjZJkZhwcisQtMN6kCW4Ch5jUYyNSoufeMU2IBOtxmnpJiQ5zs1RAnD0xS837orHIHAb2MAyODDgzcs8j9fKNxgKwzIFehE8G9gT6fu1RJsSrutvk/GdqIAV0smzEAAAAASUVORK5CYII=",Ca={class:"q-chatbot"},xa={class:"q-chatbot__content"},Ea={class:"q-chatbot__footer-container"};return e.defineComponent({name:"ChatBot",__name:"ChatBot",props:{apiEndpoint:{default:"http://localhost:3000"},controllerEndpoint:{},username:{},projectPath:{},userImage:{default:_a},chatbotImage:{default:Ba},dateFormat:{},agentData:{default:()=>({id:"",formId:"",jobId:""})},availableAgents:{default:()=>[]}},emits:["apply-fields","direct-agent-chat"],setup(t,{emit:o}){const n=t,a=o,l=e.ref(!0),r=e.ref(null),i=e.ref(!0),s=e.ref(n.agentData.id),u=e.ref(n.agentData.formId),d=W(),{isLoading:f,clearChatData:c,getChatData:m,getJobResultData:h,sendPrompt:b}=ot(n.apiEndpoint),{messages:w,addChatMessage:v,clearMessages:P,getLastMessage:D,deleteMessageById:V}=it(),R=e.computed(()=>l.value||f.value);e.onBeforeMount(()=>{var y;(y=r.value)==null||y.removeEventListener("scroll",z)}),e.onMounted(()=>{_()});function M(y){l.value=y}async function _(){try{await L()}catch(y){v(d.loginError),console.error("Error logging in: "+y)}}async function L(){M(!0);const{data:y,error:B}=await m(n.username,n.projectPath,s.value,u.value);if(B||!y||!y.success){M(!0),v(d.botIsSick),console.log("Error loading chat data: "+B);return}M(!1),I(),y.history.forEach(async $=>{v($.content,$.type==="ai"?"bot":"user",void 0,$.sessionID)})}function I(){const y=d.initialMessage;v(y,"bot",void 0,void 0,!0)}function U(){P(),M(!1),i.value=!0}function z(){if(r.value){const{scrollTop:B,clientHeight:$,scrollHeight:N}=r.value;i.value=B+$>=N-20}}async function p(y,B){r.value&&r.value.scrollTo({top:r.value.scrollHeight,behavior:"smooth"}),v(y,"user",B),k(y,B==null?void 0:B.fileData)}async function g(y){r.value&&r.value.scrollTo({top:r.value.scrollHeight,behavior:"smooth"}),v("","bot");const B=D();B&&await h(y,$=>{if(B.message+=$,B.fields||(B.fields=[]),B.fields.length>0){const N=B.fields[B.fields.length-1];N.text=B.message}},$=>{var G;B.message="";const N=$;(G=B.fields)==null||G.push({id:N.id,type:N.type,name:N.name,text:N.text})},$=>{M(!0),v(d.botIsSick),console.error("Error getting job result: "+$),V(B.id)})}async function k(y,B){const $=lt(),N=new FormData;if(B&&N.append("file",B),N.append("message",y),N.append("project",n.projectPath),N.append("user",n.username),N.append("sessionID",$),s.value!=="")a("direct-agent-chat",s.value,y);else{v("","bot");const G=D();if(!G)return;await b(N,Z=>{G&&(G.message+=Z)},Z=>{M(!0),v(d.botIsSick),console.error("Error sending message: "+Z),V(G.id)})}}async function S(){const{data:y,error:B}=await c(n.username,n.projectPath,s.value,u.value);if(B||!y||!y.success){M(!0),v(d.loginError),console.log("Error clearing chat: "+B);return}U(),I()}function x(y){const B=["q-chatbot__messages-wrapper"];return y==="user"&&B.push("q-chatbot__messages-wrapper_right"),B}async function A(y){s.value=y.key,u.value=y.formId,U(),await _()}function E(y){!y||y.length===0||a("apply-fields",y)}function q(y){const B=d.regenerateResponsePrompt.replace("{0}",y);a("direct-agent-chat",s.value,B)}return e.watch(()=>n.availableAgents,(y,B)=>{y.length===0&&B.length>0&&(s.value="",u.value="",U(),_())}),e.watch(()=>n.agentData,async(y,B)=>{if(R.value)return;const $=y.jobId,N=B.jobId,G=$!==N;y.id!==s.value&&await A({formId:y.formId,key:y.id}),$&&G&&await g($)},{deep:!0}),(y,B)=>(e.openBlock(),e.createElementBlock("div",Ca,[e.createElementVNode("div",xa,[e.createVNode(e.unref(ua),{disabled:R.value,"available-agents":n.availableAgents,"selected-agent-key":s.value,onClear:S,onChangeChat:A},null,8,["disabled","available-agents","selected-agent-key"]),e.createElementVNode("div",{ref_key:"messagesContainer",ref:r,class:"q-chatbot__messages-container",onScroll:z},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),$=>(e.openBlock(),e.createElementBlock("div",{key:$.id,class:e.normalizeClass(x($.sender))},[e.createVNode(e.unref(ta),e.mergeProps({ref_for:!0},$,{"date-format":n.dateFormat,"user-image":n.userImage,"chatbot-image":n.chatbotImage,loading:e.unref(f)&&!$.message,file:$.file,"api-endpoint":n.apiEndpoint,"session-i-d":$.sessionID,fields:$.fields,onRegenerate:q,onApplyFields:E}),null,16,["date-format","user-image","chatbot-image","loading","file","api-endpoint","session-i-d","fields"])],2))),128))],544)]),e.createElementVNode("div",Ea,[e.createVNode(e.unref(ka),{disabled:R.value,loading:e.unref(f),onSendMessage:p},null,8,["disabled","loading"])])]))}})});
46
+ `);let R="",M="";for(const _ of V)_.startsWith("event:")?R=_.replace("event:","").trim():_.startsWith("data:")&&(M=_.replace("data:","").trim());if(R||(R="message"),!!M)try{const _=JSON.parse(M);switch(R){case"message":(d=o.onMessage)==null||d.call(o,_.value);break;case"error":(f=o.onError)==null||f.call(o,new Error(_.value));break;case"field_metadata":(c=o.onFieldMetadata)==null||c.call(o,_);break;case"done":(m=o.onDone)==null||m.call(o);break;default:console.warn(`Unknown event type: ${R}`)}}catch(_){(h=o.onError)==null||h.call(o,_),console.error("Error processing event:",_);continue}finally{b&&(i.releaseLock(),n.abort())}}}}function ot(t){const o=e.ref(!1),n=e.ref(null);async function a(d){o.value=!0,n.value=null;try{return{data:(await K({...d,baseURL:t})).data,error:null}}catch(f){if(f instanceof Error)return n.value=f,console.error("Error in API request:",f),{data:null,error:f}}finally{o.value=!1}return{data:null,error:new Error("Unknown error occurred in baseRequest")}}async function l(d,f,c,m){return await a({method:"POST",url:"/prompt/load",data:{username:d,project:f,agentID:c,formId:m}})}async function r(d,f,c){o.value=!0;try{return await nt({method:"POST",url:`${t}/prompt/submit`,data:d},{onMessage:m=>{f(m)},onDone:()=>o.value=!1})}catch(m){throw o.value=!1,c==null||c(m),console.error("Error in sendPrompt:",m),m}}async function i(d,f,c,m){o.value=!0;try{return await nt({method:"POST",url:`${t}/get-job-result`,data:{jobId:d}},{onMessage:h=>f(h),onFieldMetadata:h=>c(h),onDone:()=>o.value=!1})}catch(h){n.value=h,m==null||m(h),o.value=!1}}async function s(d,f,c,m){return await a({method:"POST",url:"/prompt/clear",data:{username:d,project:f,agentID:c,formId:m}})}async function u(d,f,c){return await a({method:"POST",url:"/prompt/feedback",data:{messageSessionID:c,feedbackValue:d,feedbackComment:f}})}return{isLoading:o,lastError:n,getChatData:l,clearChatData:s,getJobResultData:i,sendPrompt:r,handleFeedback:u}}const Ro=["innerHTML"],ge=e.defineComponent({__name:"MarkdownRender",props:{source:{},options:{},plugins:{}},setup(t){const o=t,n=e.ref(new st({html:!0,breaks:!0,...o.options??{}}));o.plugins&&o.plugins.forEach(l=>n.value.use(l));const a=e.computed(()=>n.value.render(o.source));return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"markdown-renderer",innerHTML:a.value},null,8,Ro))}});function at(t,o){switch(t){case"date":return new Date(o).toLocaleDateString();case"number":return parseFloat(o);case"boolean":return o.toLowerCase()==="true";default:return o.toString()}}function Mo(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}const Lo=["data-testid"],qo={class:"q-field-preview__toolbar"},To={class:"q-field-preview__footer"},Fo=e.defineComponent({__name:"FieldPreview",props:{name:{},text:{},type:{},disabled:{type:Boolean},applied:{type:Boolean}},emits:["apply","regenerate"],setup(t,{emit:o}){const n=t,a=o,l=W(),r=e.ref(n.applied),i=e.ref(!1),s=e.computed(()=>n.disabled||r.value),u=e.computed(()=>n.disabled||i.value),d=e.computed(()=>n.type==="text"||n.type==="multiline_text"?ge:"div"),f=e.computed(()=>{const b={};return d.value===ge?b.source=n.text:b.innerHTML=n.text,b}),c=e.computed(()=>{const b=["q-field-preview__content"];return d.value!==ge&&b.push("preserve-whitespace"),b});function m(){if(r.value)return;r.value=!0;const b=at(n.type,n.text);a("apply",b)}function h(){i.value||(i.value=!0,a("regenerate",n.name))}return(b,w)=>(e.openBlock(),e.createElementBlock("div",{class:"q-field-preview","data-testid":e.unref(Mo)(n.name)},[e.createElementVNode("div",qo,[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(e.unref(l).suggestionsForField)+" ",1),e.createElementVNode("b",null,e.toDisplayString(n.name),1)])]),e.createElementVNode("div",{class:e.normalizeClass(c.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),e.normalizeProps(e.guardReactiveProps(f.value)),null,16))],2),e.createElementVNode("div",To,[e.createVNode(e.unref(qe),{borderless:""},{default:e.withCtx(()=>[e.createVNode(e.unref(j),{title:e.unref(l).regenerateResponse,disabled:u.value,readonly:u.value,borderless:"",onClick:h},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"reset"})]),_:1},8,["title","disabled","readonly"]),e.createVNode(e.unref(j),{label:e.unref(l).apply,"data-testid":"apply-button",disabled:s.value,readonly:s.value,onClick:m},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"apply"})]),_:1},8,["label","disabled","readonly"])]),_:1})])],8,Lo))}}),Po={class:"pulsing-dots"},Oo={class:"generating-text"},Uo={class:"dots-container"},zo=e.defineComponent({__name:"PulseDots",setup(t){const o=[1,2,3],n=W();return(a,l)=>(e.openBlock(),e.createElementBlock("div",Po,[e.createElementVNode("span",Oo,e.toDisplayString(e.unref(n).generatingResponse),1),e.createElementVNode("div",Uo,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(r,i)=>e.createElementVNode("span",{key:i,class:"dot",style:e.normalizeStyle({animationDelay:i*.2+"s"})}," • ",4)),64))])]))}}),jo={class:"q-chatbot__message-container"},Go={class:"q-chatbot__message-wrapper"},Ho={key:0,class:"q-chatbot__image-preview"},Zo=["src","alt"],Qo={key:1,class:"q-chatbot__file-preview-container"},Jo={class:"q-chatbot__file-icon-container"},Wo={class:"q-chatbot__file-info"},Yo={class:"q-chatbot__file-name"},Xo={class:"q-chatbot__file-extension"},Ko={class:"q-chatbot__message"},ea={key:1,class:"q-chatbot__text q-chatbot__user-text"},ta=e.defineComponent({__name:"ChatBotMessage",props:{sender:{default:"user"},message:{},date:{default:()=>new Date},loading:{type:Boolean},dateFormat:{},file:{},apiEndpoint:{},sessionID:{},userImage:{default:void 0},chatbotImage:{},isWelcomeMessage:{type:Boolean},fields:{default:()=>[]}},emits:["apply-fields","regenerate"],setup(t,{emit:o}){const n=t,a=o,l=W(),{handleFeedback:r}=ot(n.apiEndpoint),i=e.computed(()=>n.sender==="bot"&&!Object.values(l||{}).includes(n.message||"")&&!n.isWelcomeMessage),s=e.computed(()=>{var b;return((b=n.file)==null?void 0:b.fileData.type.startsWith("image/"))??!1}),u=e.computed(()=>n.sender==="bot"?n.chatbotImage:n.userImage),d=e.computed(()=>{var w,v;return(w=n.file)!=null&&w.fileData?((v=n.file.fileData.name.split(".").pop())==null?void 0:v.toUpperCase())??"":""});function f(){n.message&&navigator.clipboard.writeText(n.message).then(()=>{console.log("Response copied to clipboard")}).catch(b=>{console.error("Failed to copy response: ",b)})}function c(b,w){a("apply-fields",[{id:w.id,text:b}])}function m(){if(!n.fields||n.fields.length===0)return;const b=n.fields.map(w=>({id:w.id,text:at(w.type,w.text)}));a("apply-fields",b)}function h(b,w){b===null||w===null||!n.sessionID||r(b,w,n.sessionID)}return(b,w)=>{var v,P,D;return e.openBlock(),e.createElementBlock("div",jo,[e.createVNode(e.unref(F),{type:"img",icon:u.value,alt:e.unref(l).senderImage,class:"q-chatbot__profile"},null,8,["icon","alt"]),e.createElementVNode("div",Go,[s.value?(e.openBlock(),e.createElementBlock("div",Ho,[e.createElementVNode("img",{src:(v=n.file)==null?void 0:v.previewUrl,alt:e.unref(l).imagePreview},null,8,Zo)])):(P=n.file)!=null&&P.fileData&&!s.value?(e.openBlock(),e.createElementBlock("div",Qo,[e.createElementVNode("div",Jo,[e.createVNode(e.unref(F),{icon:"file",class:"q-chatbot__file-icon"})]),e.createElementVNode("div",Wo,[e.createElementVNode("span",Yo,e.toDisplayString((D=n.file)==null?void 0:D.fileData.name),1),e.createElementVNode("span",Xo,e.toDisplayString(d.value),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",Ko,[b.loading?(e.openBlock(),e.createBlock(zo,{key:0})):n.sender==="bot"&&n.fields.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.fields,(V,R)=>(e.openBlock(),e.createBlock(e.unref(Fo),{key:R,class:"q-chatbot__text",text:V.text||"",name:V.name,type:V.type,disabled:b.loading,onRegenerate:()=>a("regenerate",V.name),onApply:M=>c(M,V)},null,8,["text","name","type","disabled","onRegenerate","onApply"]))),128)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[n.sender==="bot"?(e.openBlock(),e.createBlock(e.unref(ge),{key:0,class:"q-chatbot__text",source:n.message||""},null,8,["source"])):(e.openBlock(),e.createElementBlock("div",ea,e.toDisplayString(n.message),1))],64))])]),e.createVNode(e.unref(sa),{"show-buttons":i.value,loading:n.loading,"date-format":n.dateFormat,onCopyResponse:f,onSubmitFeedback:h,onApplyAll:m},null,8,["show-buttons","loading","date-format"])])}}}),O=[];for(let t=0;t<256;++t)O.push((t+256).toString(16).slice(1));function na(t,o=0){return(O[t[o+0]]+O[t[o+1]]+O[t[o+2]]+O[t[o+3]]+"-"+O[t[o+4]]+O[t[o+5]]+"-"+O[t[o+6]]+O[t[o+7]]+"-"+O[t[o+8]]+O[t[o+9]]+"-"+O[t[o+10]]+O[t[o+11]]+O[t[o+12]]+O[t[o+13]]+O[t[o+14]]+O[t[o+15]]).toLowerCase()}let Ne;const oa=new Uint8Array(16);function aa(){if(!Ne){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ne=crypto.getRandomValues.bind(crypto)}return Ne(oa)}const rt={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function lt(t,o,n){var l;if(rt.randomUUID&&!o&&!t)return rt.randomUUID();t=t||{};const a=t.random??((l=t.rng)==null?void 0:l.call(t))??aa();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,na(a)}const Y=e.ref([]),be=e.ref(1);function it(){function t(r,i,s,u,d){const f={id:be.value++,message:r,date:new Date,sender:i||"bot",sessionID:u||lt(),file:s,isWelcomeMessage:d,fields:[]};return Y.value.push(f),f}function o(){return Y.value.find(r=>r.id===be.value-1)}function n(){Y.value=[],be.value=1}function a(r){Y.value=Y.value.filter(i=>i.id!==r)}function l(){return Y.value}return{messages:Y,nextMessageId:be,addChatMessage:t,getLastMessage:o,clearMessages:n,getMessages:l,deleteMessageById:a}}const ra={class:"q-chatbot__dialog-title"},la={key:0,class:"q-chatbot__feedback-buttons"},ia={class:"q-chatbot__sender"},sa=e.defineComponent({__name:"ChatBotMessageButtons",props:{loading:{type:Boolean},showButtons:{type:Boolean},dateFormat:{},date:{}},emits:["submit-feedback","copy-response","apply-all"],setup(t,{emit:o}){const n=t,a=o,l=W(),{getLastMessage:r}=it(),i=e.ref(!1),s=e.ref(""),u=e.ref(null),d=e.ref(!1),f=e.computed(()=>n.loading||d.value),c=n.date||new Date,m=r(),h=e.computed(()=>m?m.fields&&m.fields.length>1:!1),b=[{id:"confirm-btn",action:_,props:{label:l.submitButton,class:"q-chatbot__dialog-confirm-button"},icon:{icon:"submit"}},{id:"cancel-btn",props:{label:l.cancelButton,class:"q-chatbot__dialog-cancel-button"},icon:{icon:"cancel"}}],w=e.computed(()=>n.dateFormat?P(c,"HH:mm"):c.toLocaleString()),v=e.computed(()=>`${w.value}`);function P(I,U){const z=I.getDate().toString().padStart(2,"0"),p=(I.getMonth()+1).toString().padStart(2,"0"),g=I.getFullYear().toString().padStart(2,"0"),k=I.getHours().toString().padStart(2,"0"),S=I.getMinutes().toString().padStart(2,"0"),x=I.getSeconds().toString().padStart(2,"0");return U.replace("dd",z).replace("MM",p).replace("yyyy",g).replace("HH",k).replace("mm",S).replace("ss",x)}function D(I){i.value=!0,s.value="",u.value=I}function V(){D(0)}function R(){D(1)}function M(){d.value||(d.value=!0,a("apply-all"))}function _(){u.value&&(a("submit-feedback",u.value,s.value),i.value=!1,s.value="",u.value=null)}function L(){a("copy-response")}return(I,U)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(tt),{modelValue:i.value,"onUpdate:modelValue":U[1]||(U[1]=z=>i.value=z),inline:"",buttons:b},{body:e.withCtx(()=>[e.createElementVNode("div",ra,e.toDisplayString(e.unref(l).commentDialogTitle),1),e.createVNode(e.unref(Pe),{modelValue:s.value,"onUpdate:modelValue":U[0]||(U[0]=z=>s.value=z),class:"q-chatbot__dialog-comment-input","max-length":150,size:"large",placeholder:e.unref(l).commentPlaceholder},null,8,["modelValue","placeholder"])]),_:1},8,["modelValue"]),I.showButtons?(e.openBlock(),e.createElementBlock("div",la,[e.createVNode(e.unref(qe),null,{default:e.withCtx(()=>[e.createVNode(e.unref(j),{title:e.unref(l).goodResponse,class:"q-chatbot__good-response-button",borderless:"",disabled:n.loading,onClick:R},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"thumb-up"})]),_:1},8,["title","disabled"]),e.createVNode(e.unref(j),{title:e.unref(l).badResponse,class:"q-chatbot__bad-response-button",borderless:"",disabled:n.loading,onClick:V},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"thumb-down"})]),_:1},8,["title","disabled"]),e.createVNode(e.unref(j),{title:e.unref(l).copyResponse,class:"q-chatbot__copy-button",borderless:"",disabled:n.loading,onClick:L},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"copy-content"})]),_:1},8,["title","disabled"]),h.value?(e.openBlock(),e.createBlock(e.unref(j),{key:0,title:e.unref(l).applyAll,class:"q-chatbot__apply-all-button",borderless:"",disabled:f.value,readonly:f.value,label:e.unref(l).applyAll,onClick:M},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"apply-all"})]),_:1},8,["title","disabled","readonly","label"])):e.createCommentVNode("",!0)]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",ia,e.toDisplayString(v.value),1)],64))}}),ca={class:"q-chatbot__tools"},da={class:"q-chatbot__tools__select"},ua=e.defineComponent({__name:"ChatToolBar",props:{disabled:{type:Boolean},availableAgents:{default:()=>[]},selectedAgentKey:{}},emits:["clear","change-chat"],setup(t,{emit:o}){const n=t,a=o,{clearChat:l}=W(),r={key:"",value:"Default Chat",formId:""},i=e.computed(()=>n.availableAgents&&n.availableAgents.length>0),s=e.ref(n.selectedAgentKey||r.key);e.watch(()=>n.selectedAgentKey,c=>{s.value=c||r.key});const u=e.computed(()=>{var m;const c=(m=n.availableAgents)==null?void 0:m.map(h=>({key:h.key,value:h.value,formId:h.formId}));return c==null||c.push(r),c||[r]});function d(){a("clear")}function f(c){const m=u.value.find(h=>h.key===c);if(m){if(m.key===r.key){a("change-chat",{key:"",formId:""});return}a("change-chat",m)}}return(c,m)=>{const h=e.resolveComponent("q-select");return e.openBlock(),e.createElementBlock("div",ca,[e.createElementVNode("div",da,[i.value?(e.openBlock(),e.createBlock(h,{key:0,modelValue:s.value,"onUpdate:modelValue":[m[0]||(m[0]=b=>s.value=b),f],inline:"",required:"",class:"q-chatbot__tools-select-input",size:"medium",items:u.value},null,8,["modelValue","items"])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(j),{title:e.unref(l),disabled:n.disabled,class:"q-chatbot__tools-clear",borderless:"",onClick:d},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"bin"})]),_:1},8,["title","disabled"])])}}}),pa={class:"q-chatbot__input-wrapper"},fa={key:0,class:"q-chatbot__file-preview"},ma=["src","alt"],ga={key:1,class:"q-chatbot__file-preview",tabindex:"0"},ba={class:"q-chatbot__file-name"},ha={class:"q-chatbot__input"},ya={class:"q-chatbot__send-container"},wa=["accept"],ka=e.defineComponent({__name:"ChatBotInput",props:{disabled:{type:Boolean},loading:{type:Boolean},userPrompt:{},agentId:{}},emits:["send-message"],setup(t,{emit:o}){const n=t,a=o,l=W(),r=e.ref(null),i=e.ref(null),s=e.ref(""),u=e.ref(!1),d=e.computed(()=>".png,.jpeg,.jpg,.svg,.webp,.pdf,.doc,.docx"),f=e.computed(()=>i.value?i.value.type.startsWith("image/")??!1:!1),c=e.ref(n.userPrompt??""),m=e.computed(()=>n.disabled||n.loading||c.value.trim().length===0);function h(_){_.preventDefault(),n.disabled||(u.value=!0)}const b=e.computed(()=>({"q-chatbot__footer-disabled":n.disabled,"drag-over":u.value&&!i.value}));function w(_){_.preventDefault(),u.value=!1}function v(_){var I;if(_.preventDefault(),u.value=!1,n.disabled||i.value)return;const L=(I=_.dataTransfer)==null?void 0:I.files;L&&P(L[0])}function P(_){i.value=_,_.type.startsWith("image/")?s.value=URL.createObjectURL(_):s.value=""}function D(){if(!(c.value.trim()===""||n.loading||n.disabled)){if(i.value){const _={fileData:i.value,previewUrl:s.value??""};a("send-message",c.value,_),V()}else a("send-message",c.value);c.value=""}}function V(){i.value=null,s.value="",r.value&&(r.value.value="",r.value.files=null)}function R(){var _;(_=r.value)==null||_.click()}function M(_){var I;const L=_.target;(I=L.files)!=null&&I[0]&&P(L.files[0])}return(_,L)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(Te),{label:e.unref(l).inputLabel},null,8,["label"]),e.createElementVNode("div",{class:e.normalizeClass(["q-chatbot__footer",b.value]),onDragover:e.withModifiers(h,["prevent"]),onDragleave:e.withModifiers(w,["prevent"]),onDrop:e.withModifiers(v,["prevent"])},[e.createElementVNode("div",pa,[i.value?(e.openBlock(),e.createElementBlock("div",fa,[f.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"q-chatbot__image-preview",src:s.value,tabindex:"0",alt:e.unref(l).imagePreview},null,8,ma)):(e.openBlock(),e.createElementBlock("div",ga,[e.createVNode(e.unref(F),{icon:"file",class:"q-chatbot__file-icon"}),e.createElementVNode("span",ba,e.toDisplayString(i.value.name),1)])),e.createVNode(e.unref(j),{class:"q-chatbot__remove-file",tabindex:"0",flat:"",round:"",onClick:V},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"remove"})]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",ha,[e.createVNode(e.unref(Vo),{id:"chatbot-input",modelValue:c.value,"onUpdate:modelValue":L[0]||(L[0]=I=>c.value=I),size:"block",autosize:"",resize:"none",rows:2,disabled:n.disabled,onKeyup:e.withKeys(D,["enter"])},null,8,["modelValue","disabled"])]),e.createElementVNode("div",ya,[e.createVNode(e.unref(j),{title:e.unref(l).imageUpload,class:"q-chatbot__upload",disabled:n.disabled||n.loading||!!i.value,onClick:R},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"upload"})]),_:1},8,["title","disabled"]),e.createElementVNode("input",{id:"file-upload",ref_key:"fileInput",ref:r,type:"file",accept:d.value,class:"hidden-input",onChange:M},null,40,wa),e.createVNode(e.unref(j),{title:e.unref(l).sendMessage,variant:"bold",class:"q-chatbot__send",disabled:m.value,readonly:m.value,onClick:D},{default:e.withCtx(()=>[e.createVNode(e.unref(F),{icon:"send"})]),_:1},8,["title","disabled","readonly"])])])],34)],64))}}),Ba="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20126.25%20110.36'%3e%3cdefs%3e%3cradialGradient%20id='radial-gradient'%20cx='45.24'%20cy='38.05'%20fx='45.24'%20fy='38.05'%20r='59.09'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2331319e'/%3e%3cstop%20offset='.19'%20stop-color='%232e2e97'/%3e%3cstop%20offset='.45'%20stop-color='%23292985'/%3e%3cstop%20offset='.75'%20stop-color='%23202067'/%3e%3cstop%20offset='1'%20stop-color='%2317174a'/%3e%3c/radialGradient%3e%3clinearGradient%20id='linear-gradient'%20x1='82.65'%20y1='50.41'%20x2='82.65'%20y2='77.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='.02'%20stop-color='%2366ebfe'/%3e%3cstop%20offset='.96'%20stop-color='%2300bfdb'/%3e%3c/linearGradient%3e%3clinearGradient%20id='linear-gradient-2'%20x1='44.6'%20y1='50.01'%20x2='44.6'%20y2='77.1'%20xlink:href='%23linear-gradient'/%3e%3c/defs%3e%3cg%20isolation='isolate'%3e%3cg%20id='Layer_1'%3e%3cpath%20d='M126.2,61.4c-.2-3.69-2.61-17.39-5.92-22.09-2.42-3.44-5.89-4.03-7.96-4.38-.13-.02-.27-.05-.41-.07-.16-.28-.32-.58-.45-.81-.63-1.14-1.03-1.87-1.44-2.44-6.96-9.88-14.91-16.51-24.85-20.69-.25-2.29-.84-5.24-3.37-7.44-2.93-2.55-7.58-2.9-11.68-3.21-.93-.07-1.82-.14-2.4-.22l-.33-.05h-8.61l-.36.05c-.65.1-1.61.17-2.63.24-3.75.27-8.01.57-10.98,2.85-2.94,2.26-3.58,5.55-3.79,7.84-9.71,3.94-17.86,10.71-24.85,20.62-.4.57-.81,1.3-1.43,2.44-.13.23-.29.53-.45.81-.14.02-.28.05-.4.07-2.07.35-5.54.94-7.96,4.39-2.25,3.19-3.84,9.89-4.58,13.59-.6,2.97-1.9,10.3-1.08,14.26.79,3.78,3.66,5.6,5.37,6.68.12.08.26.16.39.25,1.65,10.03,6.98,18.56,15.52,24.77,9.23,6.72,20.2,9.43,27.78,10.52,4.49.65,9.15.97,13.85.97,9.67,0,23.77-1.39,36-8.02,11.58-6.27,18.81-16,21.04-28.24,4.52-2.76,6.36-5.67,5.98-12.71Z'%20fill='%2317174a'/%3e%3cpath%20d='M67.15,4.69c2.98.42,9.31.31,11.62,2.31,1.99,1.73,1.65,4.82,2.06,7.22,10.77,3.89,18.73,10.59,25.39,20.04.64.91,2.13,3.95,2.58,4.33,1.71,1.46,5.54.35,7.67,3.37,2.29,3.25,4.83,15.41,5.06,19.59.31,5.82-.76,6.9-5.58,9.44-3.28,26.16-29.7,34.5-52.68,34.5-4.6,0-9.06-.33-13.17-.93-18.13-2.61-37.11-12.11-39.51-33.08-1.7-1.92-4.96-2.54-5.55-5.39-.95-4.56,2.21-20.32,4.89-24.14,2.13-3.02,5.96-1.91,7.67-3.37.46-.39,1.94-3.42,2.58-4.33,6.54-9.28,14.55-16.22,25.21-19.87.85-.87-.3-5.45,2.43-7.55,2.52-1.94,8.35-1.69,11.42-2.16h7.91'%20fill='%23fff'/%3e%3cpath%20d='M121.86,61.51c-.22-4.2-2.78-16.43-5.07-19.7-1.77-2.51-4.71-2.18-6.64-2.83.1,1.18.16,2.37.16,3.57,0,26.85-25.96,48.61-57.98,48.61-15.83,0-30.17-5.32-40.63-13.94,4.91,17.1,22.06,25.14,38.51,27.52,4.12.59,8.6.93,13.21.93,23.06,0,49.57-8.38,52.85-34.68,4.83-2.56,5.91-3.63,5.6-9.49Z'%20fill='%23d0d7e2'%20mix-blend-mode='multiply'%20opacity='.4'/%3e%3cpath%20d='M62.91,97.68c5.82,0,11.67-.53,16.72-1.56,13.1-2.67,22.09-8.06,26.72-16.03,4.43-7.63,4.75-17.33.96-28.84-4.28-13-13.22-22.77-24.7-27.89-.13,4.51-3.84,8.16-8.38,8.16h-20.89c-4.61,0-8.39-3.78-8.39-8.39v-.14c-5.36,2.25-10.29,5.49-14.5,9.61-8.23,8.06-13.16,19.02-13.9,30.84-.59,9.44,2.67,17.53,9.43,23.42,6.27,5.46,15.68,9.02,27.2,10.3,3.13.35,6.43.52,9.73.52'%20fill='url(%23radial-gradient)'/%3e%3crect%20x='74.34'%20y='50.41'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient)'/%3e%3crect%20x='36.29'%20y='50.01'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient-2)'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF2GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1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a={class:"q-chatbot__content"},Ea={class:"q-chatbot__footer-container"};return e.defineComponent({name:"ChatBot",__name:"ChatBot",props:{apiEndpoint:{default:"http://localhost:3000"},controllerEndpoint:{},username:{},projectPath:{},userImage:{default:_a},chatbotImage:{default:Ba},dateFormat:{},agentData:{default:()=>({id:"",formId:"",jobId:""})},availableAgents:{default:()=>[]}},emits:["apply-fields","direct-agent-chat"],setup(t,{emit:o}){const n=t,a=o,l=e.ref(!0),r=e.ref(null),i=e.ref(!0),s=e.ref(n.agentData.id),u=e.ref(n.agentData.formId),d=W(),{isLoading:f,clearChatData:c,getChatData:m,getJobResultData:h,sendPrompt:b}=ot(n.apiEndpoint),{messages:w,addChatMessage:v,clearMessages:P,getLastMessage:D,deleteMessageById:V}=it(),R=e.computed(()=>l.value||f.value);e.onBeforeMount(()=>{var y;(y=r.value)==null||y.removeEventListener("scroll",z)}),e.onMounted(()=>{_()});function M(y){l.value=y}async function _(){try{await L()}catch(y){v(d.loginError),console.error("Error logging in: "+y)}}async function L(){M(!0);const{data:y,error:B}=await m(n.username,n.projectPath,s.value,u.value);if(B||!y||!y.success){M(!0),v(d.botIsSick),console.log("Error loading chat data: "+B);return}M(!1),I(),y.history.forEach(async $=>{v($.content,$.type==="ai"?"bot":"user",void 0,$.sessionID)})}function I(){const y=d.initialMessage;v(y,"bot",void 0,void 0,!0)}function U(){P(),M(!1),i.value=!0}function z(){if(r.value){const{scrollTop:B,clientHeight:$,scrollHeight:N}=r.value;i.value=B+$>=N-20}}async function p(y,B){r.value&&r.value.scrollTo({top:r.value.scrollHeight,behavior:"smooth"}),v(y,"user",B),k(y,B==null?void 0:B.fileData)}async function g(y){r.value&&r.value.scrollTo({top:r.value.scrollHeight,behavior:"smooth"}),v("","bot");const B=D();B&&await h(y,$=>{if(B.message+=$,B.fields||(B.fields=[]),B.fields.length>0){const N=B.fields[B.fields.length-1];N.text=B.message}},$=>{var G;B.message="";const N=$;(G=B.fields)==null||G.push({id:N.id,type:N.type,name:N.name,text:N.text})},$=>{M(!0),v(d.botIsSick),console.error("Error getting job result: "+$),V(B.id)})}async function k(y,B){const $=lt(),N=new FormData;if(B&&N.append("file",B),N.append("message",y),N.append("project",n.projectPath),N.append("user",n.username),N.append("sessionID",$),s.value!=="")a("direct-agent-chat",s.value,y);else{v("","bot");const G=D();if(!G)return;await b(N,Z=>{G&&(G.message+=Z)},Z=>{M(!0),v(d.botIsSick),console.error("Error sending message: "+Z),V(G.id)})}}async function S(){const{data:y,error:B}=await c(n.username,n.projectPath,s.value,u.value);if(B||!y||!y.success){M(!0),v(d.loginError),console.log("Error clearing chat: "+B);return}U(),I()}function x(y){const B=["q-chatbot__messages-wrapper"];return y==="user"&&B.push("q-chatbot__messages-wrapper_right"),B}async function A(y){s.value=y.key,u.value=y.formId,U(),await _()}function E(y){!y||y.length===0||a("apply-fields",y)}function q(y){const B=d.regenerateResponsePrompt.replace("{0}",y);a("direct-agent-chat",s.value,B)}return e.watch(()=>n.availableAgents,(y,B)=>{y.length===0&&B.length>0&&(s.value="",u.value="",U(),_())}),e.watch(()=>n.agentData,async(y,B)=>{if(R.value)return;const $=y.jobId,N=B.jobId,G=$!==N;y.id!==s.value&&await A({formId:y.formId,key:y.id}),$&&G&&await g($)},{deep:!0}),(y,B)=>(e.openBlock(),e.createElementBlock("div",Ca,[e.createElementVNode("div",xa,[e.createVNode(e.unref(ua),{disabled:R.value,"available-agents":n.availableAgents,"selected-agent-key":s.value,onClear:S,onChangeChat:A},null,8,["disabled","available-agents","selected-agent-key"]),e.createElementVNode("div",{ref_key:"messagesContainer",ref:r,class:"q-chatbot__messages-container",onScroll:z},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),$=>(e.openBlock(),e.createElementBlock("div",{key:$.id,class:e.normalizeClass(x($.sender))},[e.createVNode(e.unref(ta),e.mergeProps({ref_for:!0},$,{"date-format":n.dateFormat,"user-image":n.userImage,"chatbot-image":n.chatbotImage,loading:e.unref(f)&&!$.message,file:$.file,"api-endpoint":n.apiEndpoint,"session-i-d":$.sessionID,fields:$.fields,onRegenerate:q,onApplyFields:E}),null,16,["date-format","user-image","chatbot-image","loading","file","api-endpoint","session-i-d","fields"])],2))),128))],544)]),e.createElementVNode("div",Ea,[e.createVNode(e.unref(ka),{disabled:R.value,loading:e.unref(f),onSendMessage:p},null,8,["disabled","loading"])])]))}})});
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getCurrentInstance as nt, computed as w, inject as ot, ref as N, provide as Wt, defineComponent as T, openBlock as y, createElementBlock as $, normalizeClass as Q, normalizeStyle as ye, unref as f, toRef as Ie, withModifiers as qe, createVNode as D, createCommentVNode as P, createElementVNode as R, renderSlot as q, createTextVNode as Ge, toDisplayString as ne, createBlock as H, resolveDynamicComponent as _t, h as Qe, mergeProps as se, useTemplateRef as kt, withCtx as E, normalizeProps as Se, guardReactiveProps as Ne, mergeModels as ue, useModel as De, watch as ie, createSlots as $t, withDirectives as At, vModelDynamic as Yt, useId as Xt, onMounted as Ee, onUnmounted as xt, readonly as Kt, customRef as en, getCurrentScope as tn, onScopeDispose as It, shallowRef as We, nextTick as Ae, toValue as at, reactive as Ye, onBeforeUnmount as nn, Fragment as ce, Teleport as on, Transition as st, renderList as Ce, toHandlers as an, vModelText as rn, resolveComponent as ln, withKeys as sn, onBeforeMount as cn } from "vue";
1
+ import { getCurrentInstance as nt, computed as w, inject as ot, ref as N, provide as Wt, defineComponent as T, openBlock as y, createElementBlock as $, normalizeClass as Q, normalizeStyle as ye, unref as f, toRef as Ie, withModifiers as Le, createVNode as D, createCommentVNode as P, createElementVNode as R, renderSlot as L, createTextVNode as Ge, toDisplayString as ne, createBlock as H, resolveDynamicComponent as _t, h as Qe, mergeProps as se, useTemplateRef as kt, withCtx as E, normalizeProps as Se, guardReactiveProps as Ne, mergeModels as ue, useModel as De, watch as ie, createSlots as $t, withDirectives as At, vModelDynamic as Yt, useId as Xt, onMounted as Ee, onUnmounted as xt, readonly as Kt, customRef as en, getCurrentScope as tn, onScopeDispose as It, shallowRef as We, nextTick as Ae, toValue as at, reactive as Ye, onBeforeUnmount as nn, Fragment as ce, Teleport as on, Transition as st, renderList as Ce, toHandlers as an, vModelText as rn, resolveComponent as ln, withKeys as sn, onBeforeMount as cn } from "vue";
2
2
  import St from "axios";
3
3
  import un from "markdown-it";
4
4
  function Xe(e) {
@@ -270,13 +270,13 @@ const Dn = ["id", "disabled"], En = {
270
270
  class: Q(u.value),
271
271
  disabled: r.value,
272
272
  style: ye(c.value),
273
- onClick: qe(a, ["stop", "prevent"])
273
+ onClick: Le(a, ["stop", "prevent"])
274
274
  }, [
275
275
  t.loading ? (y(), $("div", En, [
276
276
  D(f(hn))
277
277
  ])) : P("v-if", !0),
278
278
  R("span", Cn, [
279
- q(p.$slots, "default"),
279
+ L(p.$slots, "default"),
280
280
  Ge(
281
281
  " " + ne(t.label),
282
282
  1
@@ -321,7 +321,7 @@ const Dn = ["id", "disabled"], En = {
321
321
  style: ye(r.value)
322
322
  }, null, 8, ["id", "class", "icon", "style"]));
323
323
  }
324
- }), Ln = ["id"], qn = /* @__PURE__ */ T({
324
+ }), qn = ["id"], Ln = /* @__PURE__ */ T({
325
325
  __name: "QIconFont",
326
326
  props: {
327
327
  id: {},
@@ -335,7 +335,7 @@ const Dn = ["id", "disabled"], En = {
335
335
  return (r, a) => (y(), $("i", {
336
336
  id: n.id,
337
337
  class: Q(["q-icon", "q-icon__font", t.value, o.value, n.class])
338
- }, null, 10, Ln));
338
+ }, null, 10, qn));
339
339
  }
340
340
  }), Mn = ["id", "src"], Nn = /* @__PURE__ */ T({
341
341
  __name: "QIconImg",
@@ -506,7 +506,7 @@ const Un = /* @__PURE__ */ T({
506
506
  onUnloaded: a
507
507
  }, null, 8, ["id", "class", "src", "symbol"]));
508
508
  }
509
- }), Y = X(Rn), Pn = X(qn), Gn = X(Nn), jn = X(Un);
509
+ }), Y = X(Rn), Pn = X(Ln), Gn = X(Nn), jn = X(Un);
510
510
  let zn = 0;
511
511
  function it(e) {
512
512
  return f(e) || `uid-${++zn}`;
@@ -538,10 +538,10 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
538
538
  ]),
539
539
  role: "group"
540
540
  }, [
541
- q(t.$slots, "default")
541
+ L(t.$slots, "default")
542
542
  ], 10, Vn));
543
543
  }
544
- }), Lt = X(Hn), Zn = ["id"], Jn = ["for"], Qn = /* @__PURE__ */ T({
544
+ }), qt = X(Hn), Zn = ["id"], Jn = ["for"], Qn = /* @__PURE__ */ T({
545
545
  inheritAttrs: !1,
546
546
  __name: "QLabel",
547
547
  props: {
@@ -563,11 +563,11 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
563
563
  id: n.id,
564
564
  class: Q(t.value)
565
565
  }, [
566
- q(o.$slots, "prepend"),
566
+ L(o.$slots, "prepend"),
567
567
  R("label", se({
568
568
  for: n.for
569
569
  }, o.$attrs), [
570
- q(o.$slots, "default", {}, () => [
570
+ L(o.$slots, "default", {}, () => [
571
571
  Ge(
572
572
  ne(n.label),
573
573
  1
@@ -575,10 +575,10 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
575
575
  )
576
576
  ])
577
577
  ], 16, Jn),
578
- q(o.$slots, "append")
578
+ L(o.$slots, "append")
579
579
  ], 10, Zn));
580
580
  }
581
- }), qt = X(Qn), Wn = ["id"], Yn = {
581
+ }), Lt = X(Qn), Wn = ["id"], Yn = {
582
582
  key: 0,
583
583
  class: "q-field__prepend"
584
584
  }, Xn = {
@@ -619,7 +619,7 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
619
619
  id: t.id,
620
620
  class: Q(a.value)
621
621
  }, [
622
- t.label ? (y(), H(f(qt), {
622
+ t.label ? (y(), H(f(Lt), {
623
623
  key: 0,
624
624
  class: "q-field__label",
625
625
  label: t.label,
@@ -627,15 +627,15 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
627
627
  required: t.required
628
628
  }, {
629
629
  prepend: E(() => [
630
- q(i.$slots, "label.prepend")
630
+ L(i.$slots, "label.prepend")
631
631
  ]),
632
632
  append: E(() => [
633
- q(i.$slots, "label.append")
633
+ L(i.$slots, "label.append")
634
634
  ]),
635
635
  _: 3
636
636
  /* FORWARDED */
637
637
  }, 8, ["label", "for", "required"])) : P("v-if", !0),
638
- q(i.$slots, "control", {}, () => [
638
+ L(i.$slots, "control", {}, () => [
639
639
  R(
640
640
  "div",
641
641
  se({
@@ -644,11 +644,11 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
644
644
  }, i.$attrs),
645
645
  [
646
646
  i.$slots.prepend ? (y(), $("div", Yn, [
647
- q(i.$slots, "prepend")
647
+ L(i.$slots, "prepend")
648
648
  ])) : P("v-if", !0),
649
- q(i.$slots, "default"),
649
+ L(i.$slots, "default"),
650
650
  i.$slots.append ? (y(), $("div", Xn, [
651
- q(i.$slots, "append")
651
+ L(i.$slots, "append")
652
652
  ])) : P("v-if", !0)
653
653
  ],
654
654
  16
@@ -656,7 +656,7 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
656
656
  )
657
657
  ]),
658
658
  i.$slots.extras ? (y(), $("div", Kn, [
659
- q(i.$slots, "extras")
659
+ L(i.$slots, "extras")
660
660
  ])) : P("v-if", !0)
661
661
  ], 10, Wn));
662
662
  }
@@ -760,10 +760,10 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
760
760
  invalid: o.invalid
761
761
  }, $t({
762
762
  "label.prepend": E(() => [
763
- q(g.$slots, "label.prepend")
763
+ L(g.$slots, "label.prepend")
764
764
  ]),
765
765
  "label.append": E(() => [
766
- q(g.$slots, "label.append")
766
+ L(g.$slots, "label.append")
767
767
  ]),
768
768
  default: E(() => [
769
769
  At(R("input", se({
@@ -788,14 +788,14 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
788
788
  g.$slots.prepend ? {
789
789
  name: "prepend",
790
790
  fn: E(() => [
791
- q(g.$slots, "prepend")
791
+ L(g.$slots, "prepend")
792
792
  ]),
793
793
  key: "0"
794
794
  } : void 0,
795
795
  g.$slots.append || v.value ? {
796
796
  name: "append",
797
797
  fn: E(() => [
798
- q(g.$slots, "append"),
798
+ L(g.$slots, "append"),
799
799
  v.value ? (y(), H(f(ao), {
800
800
  key: 0,
801
801
  "data-testid": "q-text-field__clear-button",
@@ -808,7 +808,7 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
808
808
  g.$slots.extras ? {
809
809
  name: "extras",
810
810
  fn: E(() => [
811
- q(g.$slots, "extras")
811
+ L(g.$slots, "extras")
812
812
  ]),
813
813
  key: "2"
814
814
  } : void 0
@@ -885,7 +885,7 @@ const co = { ref: "layer" }, uo = /* @__PURE__ */ T({
885
885
  "div",
886
886
  co,
887
887
  [
888
- q(s.$slots, "default")
888
+ L(s.$slots, "default")
889
889
  ],
890
890
  512
891
891
  /* NEED_PATCH */
@@ -1127,10 +1127,10 @@ var Ft = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1127
1127
  xo(n) || Ro(n));
1128
1128
  }, et = function(e, n) {
1129
1129
  return !(Eo(n) || fe(n) < 0 || !Ue(e, n));
1130
- }, Lo = function(e) {
1130
+ }, qo = function(e) {
1131
1131
  var n = parseInt(e.getAttribute("tabindex"), 10);
1132
1132
  return !!(isNaN(n) || n >= 0);
1133
- }, qo = function e(n) {
1133
+ }, Lo = function e(n) {
1134
1134
  var t = [], o = [];
1135
1135
  return n.forEach(function(r, a) {
1136
1136
  var i = !!r.scopeParent, l = i ? r.scopeParent : r, u = ko(l, i), c = i ? e(r.candidates) : l;
@@ -1151,8 +1151,8 @@ var Ft = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1151
1151
  filter: et.bind(null, n),
1152
1152
  flatten: !1,
1153
1153
  getShadowRoot: n.getShadowRoot,
1154
- shadowRootFilter: Lo
1155
- }) : t = Ot(e, n.includeContainer, et.bind(null, n)), qo(t);
1154
+ shadowRootFilter: qo
1155
+ }) : t = Ot(e, n.includeContainer, et.bind(null, n)), Lo(t);
1156
1156
  }, No = function(e, n) {
1157
1157
  n = n || {};
1158
1158
  var t;
@@ -1321,8 +1321,8 @@ var mt = {
1321
1321
  return d && d[m] !== void 0 ? d[m] : r[k || m];
1322
1322
  }, u = function(d, m) {
1323
1323
  var k = typeof (m == null ? void 0 : m.composedPath) == "function" ? m.composedPath() : void 0;
1324
- return a.containerGroups.findIndex(function(L) {
1325
- var S = L.container, O = L.tabbableNodes;
1324
+ return a.containerGroups.findIndex(function(q) {
1325
+ var S = q.container, O = q.tabbableNodes;
1326
1326
  return S.contains(d) || // fall back to explicit tabbable search which will take into consideration any
1327
1327
  // web components if the `tabbableOptions.getShadowRoot` option was used for
1328
1328
  // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
@@ -1332,7 +1332,7 @@ var mt = {
1332
1332
  });
1333
1333
  });
1334
1334
  }, c = function(d) {
1335
- var m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, k = m.hasFallback, L = k === void 0 ? !1 : k, S = m.params, O = S === void 0 ? [] : S, C = r[d];
1335
+ var m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, k = m.hasFallback, q = k === void 0 ? !1 : k, S = m.params, O = S === void 0 ? [] : S, C = r[d];
1336
1336
  if (typeof C == "function" && (C = C.apply(void 0, Go(O))), C === !0 && (C = void 0), !C) {
1337
1337
  if (C === void 0 || C === !1)
1338
1338
  return C;
@@ -1345,7 +1345,7 @@ var mt = {
1345
1345
  } catch (h) {
1346
1346
  throw new Error("`".concat(d, '` appears to be an invalid selector; error="').concat(h.message, '"'));
1347
1347
  }
1348
- if (!J && !L)
1348
+ if (!J && !q)
1349
1349
  throw new Error("`".concat(d, "` as selector refers to no known node"));
1350
1350
  }
1351
1351
  return J;
@@ -1368,7 +1368,7 @@ var mt = {
1368
1368
  return d;
1369
1369
  }, s = function() {
1370
1370
  if (a.containerGroups = a.containers.map(function(d) {
1371
- var m = Mo(d, r.tabbableOptions), k = No(d, r.tabbableOptions), L = m.length > 0 ? m[0] : void 0, S = m.length > 0 ? m[m.length - 1] : void 0, O = k.find(function(h) {
1371
+ var m = Mo(d, r.tabbableOptions), k = No(d, r.tabbableOptions), q = m.length > 0 ? m[0] : void 0, S = m.length > 0 ? m[m.length - 1] : void 0, O = k.find(function(h) {
1372
1372
  return be(h);
1373
1373
  }), C = k.slice().reverse().find(function(h) {
1374
1374
  return be(h);
@@ -1382,7 +1382,7 @@ var mt = {
1382
1382
  /** True if at least one node with positive `tabindex` was found in this container. */
1383
1383
  posTabIndexesFound: J,
1384
1384
  /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
1385
- firstTabbableNode: L,
1385
+ firstTabbableNode: q,
1386
1386
  /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
1387
1387
  lastTabbableNode: S,
1388
1388
  // NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
@@ -1441,7 +1441,7 @@ var mt = {
1441
1441
  });
1442
1442
  return m || (m === !1 ? !1 : d);
1443
1443
  }, _ = function(d) {
1444
- var m = d.target, k = d.event, L = d.isBackward, S = L === void 0 ? !1 : L;
1444
+ var m = d.target, k = d.event, q = d.isBackward, S = q === void 0 ? !1 : q;
1445
1445
  m = m || Be(k), s();
1446
1446
  var O = null;
1447
1447
  if (a.tabbableGroups.length > 0) {
@@ -1493,7 +1493,7 @@ var mt = {
1493
1493
  k && (a.mostRecentlyFocusedNode = m);
1494
1494
  else {
1495
1495
  d.stopImmediatePropagation();
1496
- var L, S = !0;
1496
+ var q, S = !0;
1497
1497
  if (a.mostRecentlyFocusedNode)
1498
1498
  if (fe(a.mostRecentlyFocusedNode) > 0) {
1499
1499
  var O = u(a.mostRecentlyFocusedNode), C = a.containerGroups[O].tabbableNodes;
@@ -1501,7 +1501,7 @@ var mt = {
1501
1501
  var J = C.findIndex(function(h) {
1502
1502
  return h === a.mostRecentlyFocusedNode;
1503
1503
  });
1504
- J >= 0 && (r.isKeyForward(a.recentNavEvent) ? J + 1 < C.length && (L = C[J + 1], S = !1) : J - 1 >= 0 && (L = C[J - 1], S = !1));
1504
+ J >= 0 && (r.isKeyForward(a.recentNavEvent) ? J + 1 < C.length && (q = C[J + 1], S = !1) : J - 1 >= 0 && (q = C[J - 1], S = !1));
1505
1505
  }
1506
1506
  } else
1507
1507
  a.containerGroups.some(function(h) {
@@ -1511,12 +1511,12 @@ var mt = {
1511
1511
  }) || (S = !1);
1512
1512
  else
1513
1513
  S = !1;
1514
- S && (L = _({
1514
+ S && (q = _({
1515
1515
  // move FROM the MRU node, not event-related node (which will be the node that is
1516
1516
  // outside the trap causing the focus escape we're trying to fix)
1517
1517
  target: a.mostRecentlyFocusedNode,
1518
1518
  isBackward: r.isKeyBackward(a.recentNavEvent)
1519
- })), b(L || a.mostRecentlyFocusedNode || p());
1519
+ })), b(q || a.mostRecentlyFocusedNode || p());
1520
1520
  }
1521
1521
  a.recentNavEvent = void 0;
1522
1522
  }, G = function(d) {
@@ -1556,8 +1556,8 @@ var mt = {
1556
1556
  return t.removeEventListener("focusin", W, !0), t.removeEventListener("mousedown", B, !0), t.removeEventListener("touchstart", B, !0), t.removeEventListener("click", V, !0), t.removeEventListener("keydown", j, !0), t.removeEventListener("keydown", z), i;
1557
1557
  }, U = function(d) {
1558
1558
  var m = d.some(function(k) {
1559
- var L = Array.from(k.removedNodes);
1560
- return L.some(function(S) {
1559
+ var q = Array.from(k.removedNodes);
1560
+ return q.some(function(S) {
1561
1561
  return S === a.mostRecentlyFocusedNode;
1562
1562
  });
1563
1563
  });
@@ -1580,12 +1580,12 @@ var mt = {
1580
1580
  activate: function(d) {
1581
1581
  if (a.active)
1582
1582
  return this;
1583
- var m = l(d, "onActivate"), k = l(d, "onPostActivate"), L = l(d, "checkCanFocusTrap");
1584
- L || s(), a.active = !0, a.paused = !1, a.nodeFocusedBeforeActivation = t.activeElement, m == null || m();
1583
+ var m = l(d, "onActivate"), k = l(d, "onPostActivate"), q = l(d, "checkCanFocusTrap");
1584
+ q || s(), a.active = !0, a.paused = !1, a.nodeFocusedBeforeActivation = t.activeElement, m == null || m();
1585
1585
  var S = function() {
1586
- L && s(), x(), te(), k == null || k();
1586
+ q && s(), x(), te(), k == null || k();
1587
1587
  };
1588
- return L ? (L(a.containers.concat()).then(S, S), this) : (S(), this);
1588
+ return q ? (q(a.containers.concat()).then(S, S), this) : (S(), this);
1589
1589
  },
1590
1590
  deactivate: function(d) {
1591
1591
  if (!a.active)
@@ -1596,11 +1596,11 @@ var mt = {
1596
1596
  checkCanReturnFocus: r.checkCanReturnFocus
1597
1597
  }, d);
1598
1598
  clearTimeout(a.delayInitialFocusTimer), a.delayInitialFocusTimer = void 0, Z(), a.active = !1, a.paused = !1, te(), mt.deactivateTrap(o, i);
1599
- var k = l(m, "onDeactivate"), L = l(m, "onPostDeactivate"), S = l(m, "checkCanReturnFocus"), O = l(m, "returnFocus", "returnFocusOnDeactivate");
1599
+ var k = l(m, "onDeactivate"), q = l(m, "onPostDeactivate"), S = l(m, "checkCanReturnFocus"), O = l(m, "returnFocus", "returnFocusOnDeactivate");
1600
1600
  k == null || k();
1601
1601
  var C = function() {
1602
1602
  gt(function() {
1603
- O && b(g(a.nodeFocusedBeforeActivation)), L == null || L();
1603
+ O && b(g(a.nodeFocusedBeforeActivation)), q == null || q();
1604
1604
  });
1605
1605
  };
1606
1606
  return O && S ? (S(g(a.nodeFocusedBeforeActivation)).then(C, C), this) : (C(), this);
@@ -1628,8 +1628,8 @@ var mt = {
1628
1628
  if (a.paused === d)
1629
1629
  return this;
1630
1630
  if (a.paused = d, d) {
1631
- var k = l(m, "onPause"), L = l(m, "onPostPause");
1632
- k == null || k(), Z(), te(), L == null || L();
1631
+ var k = l(m, "onPause"), q = l(m, "onPostPause");
1632
+ k == null || k(), Z(), te(), q == null || q();
1633
1633
  } else {
1634
1634
  var S = l(m, "onUnpause"), O = l(m, "onPostUnpause");
1635
1635
  S == null || S(), s(), x(), te(), O == null || O();
@@ -1668,12 +1668,12 @@ const Xo = /* @__PURE__ */ T({
1668
1668
  emits: ["update:disabled"],
1669
1669
  setup(e) {
1670
1670
  const n = e, t = De(e, "disabled");
1671
- return (o, r) => t.value ? q(o.$slots, "default", { key: 0 }) : (y(), H(
1671
+ return (o, r) => t.value ? L(o.$slots, "default", { key: 0 }) : (y(), H(
1672
1672
  f(Xo),
1673
1673
  Se(se({ key: 1 }, n)),
1674
1674
  {
1675
1675
  default: E(() => [
1676
- q(o.$slots, "default")
1676
+ L(o.$slots, "default")
1677
1677
  ]),
1678
1678
  _: 3
1679
1679
  /* FORWARDED */
@@ -1783,7 +1783,7 @@ const ca = () => {
1783
1783
  }), xt(() => {
1784
1784
  const a = o() - 1;
1785
1785
  a <= 0 ? document.body.removeAttribute(he) : document.body.setAttribute(he, a.toString()), t.remove();
1786
- }), (a, i) => q(a.$slots, "default");
1786
+ }), (a, i) => L(a.$slots, "default");
1787
1787
  }
1788
1788
  }), da = X(ua);
1789
1789
  function pa(e, n, t, o) {
@@ -2046,18 +2046,18 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
2046
2046
  Ae(_e), o("enter");
2047
2047
  }
2048
2048
  function te() {
2049
- L();
2049
+ q();
2050
2050
  }
2051
2051
  function d() {
2052
2052
  o("leave");
2053
2053
  }
2054
2054
  function m() {
2055
- L(), Jt();
2055
+ q(), Jt();
2056
2056
  }
2057
2057
  function k() {
2058
2058
  s.animating = !0;
2059
2059
  }
2060
- function L() {
2060
+ function q() {
2061
2061
  s.animating = !1;
2062
2062
  }
2063
2063
  function S() {
@@ -2215,7 +2215,7 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
2215
2215
  4
2216
2216
  /* STYLE */
2217
2217
  )) : P("v-if", !0),
2218
- q(I.$slots, "default")
2218
+ L(I.$slots, "default")
2219
2219
  ], 16, Aa)
2220
2220
  ]),
2221
2221
  _: 3
@@ -2263,10 +2263,10 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
2263
2263
  }, Ra = {
2264
2264
  key: 1,
2265
2265
  class: "q-dialog__body"
2266
- }, La = {
2266
+ }, qa = {
2267
2267
  key: 0,
2268
2268
  class: "q-dialog__body-icon"
2269
- }, qa = { class: "q-dialog__body-text" }, Ma = ["innerHTML"], Na = { key: 1 }, Fa = {
2269
+ }, La = { class: "q-dialog__body-text" }, Ma = ["innerHTML"], Na = { key: 1 }, Fa = {
2270
2270
  key: 0,
2271
2271
  class: "q-dialog__input"
2272
2272
  }, Ta = {
@@ -2341,8 +2341,8 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
2341
2341
  },
2342
2342
  [
2343
2343
  t.title || b.$slots.header || b.$slots["header.prepend"] || b.$slots["header.append"] ? (y(), $("div", Ca, [
2344
- q(b.$slots, "header", {}, () => [
2345
- q(b.$slots, "header.prepend"),
2344
+ L(b.$slots, "header", {}, () => [
2345
+ L(b.$slots, "header.prepend"),
2346
2346
  t.title ? (y(), $(
2347
2347
  "span",
2348
2348
  Ba,
@@ -2350,15 +2350,15 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
2350
2350
  1
2351
2351
  /* TEXT */
2352
2352
  )) : P("v-if", !0),
2353
- q(b.$slots, "header.append")
2353
+ L(b.$slots, "header.append")
2354
2354
  ])
2355
2355
  ])) : P("v-if", !0),
2356
2356
  t.icon || t.text || b.$slots.body ? (y(), $("div", Ra, [
2357
- q(b.$slots, "body", {}, () => {
2357
+ L(b.$slots, "body", {}, () => {
2358
2358
  var _;
2359
2359
  return [
2360
- q(b.$slots, "body.icon", {}, () => [
2361
- t.icon ? (y(), $("span", La, [
2360
+ L(b.$slots, "body.icon", {}, () => [
2361
+ t.icon ? (y(), $("span", qa, [
2362
2362
  D(
2363
2363
  f(Y),
2364
2364
  Se(Ne(t.icon)),
@@ -2368,7 +2368,7 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
2368
2368
  )
2369
2369
  ])) : P("v-if", !0)
2370
2370
  ]),
2371
- R("div", qa, [
2371
+ R("div", La, [
2372
2372
  t.html ? (y(), $("div", {
2373
2373
  key: 0,
2374
2374
  innerHTML: t.text
@@ -2403,7 +2403,7 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
2403
2403
  /* STABLE */
2404
2404
  }, 8, ["modelValue", "invalid", "placeholder"])
2405
2405
  ])) : P("v-if", !0),
2406
- q(b.$slots, "body.append")
2406
+ L(b.$slots, "body.append")
2407
2407
  ];
2408
2408
  })
2409
2409
  ])) : P("v-if", !0),
@@ -2435,7 +2435,7 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
2435
2435
  /* KEYED_FRAGMENT */
2436
2436
  ))
2437
2437
  ])) : P("v-if", !0),
2438
- q(b.$slots, "footer.append")
2438
+ L(b.$slots, "footer.append")
2439
2439
  ])) : P("v-if", !0),
2440
2440
  t.dismissible ? (y(), H(f(re), {
2441
2441
  key: 3,
@@ -2559,10 +2559,10 @@ const ja = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
2559
2559
  required: n.required
2560
2560
  }, $t({
2561
2561
  "label.prepend": E(() => [
2562
- q(c.$slots, "label.prepend")
2562
+ L(c.$slots, "label.prepend")
2563
2563
  ]),
2564
2564
  "label.append": E(() => [
2565
- q(c.$slots, "label.append")
2565
+ L(c.$slots, "label.append")
2566
2566
  ]),
2567
2567
  default: E(() => [
2568
2568
  At(R("textarea", se({
@@ -2590,21 +2590,21 @@ const ja = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
2590
2590
  c.$slots.prepend ? {
2591
2591
  name: "prepend",
2592
2592
  fn: E(() => [
2593
- q(c.$slots, "prepend")
2593
+ L(c.$slots, "prepend")
2594
2594
  ]),
2595
2595
  key: "0"
2596
2596
  } : void 0,
2597
2597
  c.$slots.append ? {
2598
2598
  name: "append",
2599
2599
  fn: E(() => [
2600
- q(c.$slots, "append")
2600
+ L(c.$slots, "append")
2601
2601
  ]),
2602
2602
  key: "1"
2603
2603
  } : void 0,
2604
2604
  c.$slots.extras ? {
2605
2605
  name: "extras",
2606
2606
  fn: E(() => [
2607
- q(c.$slots, "extras")
2607
+ L(c.$slots, "extras")
2608
2608
  ]),
2609
2609
  key: "2"
2610
2610
  } : void 0
@@ -2881,7 +2881,7 @@ const Ja = ["data-testid"], Qa = { class: "q-field-preview__toolbar" }, Wa = { c
2881
2881
  (y(), H(_t(c.value), Se(Ne(p.value)), null, 16))
2882
2882
  ], 2),
2883
2883
  R("div", Wa, [
2884
- D(f(Lt), { borderless: "" }, {
2884
+ D(f(qt), { borderless: "" }, {
2885
2885
  default: E(() => [
2886
2886
  D(f(re), {
2887
2887
  title: f(r).regenerateResponse,
@@ -3069,11 +3069,11 @@ function Ht(e, n, t) {
3069
3069
  throw new Error("Random bytes length must be >= 16");
3070
3070
  return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, vr(o);
3071
3071
  }
3072
- const pe = N([]), Le = N(1);
3072
+ const pe = N([]), qe = N(1);
3073
3073
  function Zt() {
3074
3074
  function e(a, i, l, u, c) {
3075
3075
  const p = {
3076
- id: Le.value++,
3076
+ id: qe.value++,
3077
3077
  message: a,
3078
3078
  date: /* @__PURE__ */ new Date(),
3079
3079
  sender: i || "bot",
@@ -3085,10 +3085,10 @@ function Zt() {
3085
3085
  return pe.value.push(p), p;
3086
3086
  }
3087
3087
  function n() {
3088
- return pe.value.find((a) => a.id === Le.value - 1);
3088
+ return pe.value.find((a) => a.id === qe.value - 1);
3089
3089
  }
3090
3090
  function t() {
3091
- pe.value = [], Le.value = 1;
3091
+ pe.value = [], qe.value = 1;
3092
3092
  }
3093
3093
  function o(a) {
3094
3094
  pe.value = pe.value.filter((i) => i.id !== a);
@@ -3098,7 +3098,7 @@ function Zt() {
3098
3098
  }
3099
3099
  return {
3100
3100
  messages: pe,
3101
- nextMessageId: Le,
3101
+ nextMessageId: qe,
3102
3102
  addChatMessage: e,
3103
3103
  getLastMessage: n,
3104
3104
  clearMessages: t,
@@ -3143,8 +3143,8 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
3143
3143
  }
3144
3144
  ], _ = w(() => t.dateFormat ? W(s, "HH:mm") : s.toLocaleString()), B = w(() => `${_.value}`);
3145
3145
  function W(U, ee) {
3146
- const te = U.getDate().toString().padStart(2, "0"), d = (U.getMonth() + 1).toString().padStart(2, "0"), m = U.getFullYear().toString().padStart(2, "0"), k = U.getHours().toString().padStart(2, "0"), L = U.getMinutes().toString().padStart(2, "0"), S = U.getSeconds().toString().padStart(2, "0");
3147
- return ee.replace("dd", te).replace("MM", d).replace("yyyy", m).replace("HH", k).replace("mm", L).replace("ss", S);
3146
+ const te = U.getDate().toString().padStart(2, "0"), d = (U.getMonth() + 1).toString().padStart(2, "0"), m = U.getFullYear().toString().padStart(2, "0"), k = U.getHours().toString().padStart(2, "0"), q = U.getMinutes().toString().padStart(2, "0"), S = U.getSeconds().toString().padStart(2, "0");
3147
+ return ee.replace("dd", te).replace("MM", d).replace("yyyy", m).replace("HH", k).replace("mm", q).replace("ss", S);
3148
3148
  }
3149
3149
  function G(U) {
3150
3150
  i.value = !0, l.value = "", u.value = U;
@@ -3185,7 +3185,7 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
3185
3185
  _: 1
3186
3186
  }, 8, ["modelValue"]),
3187
3187
  U.showButtons ? (y(), $("div", yr, [
3188
- D(f(Lt), null, {
3188
+ D(f(qt), null, {
3189
3189
  default: E(() => [
3190
3190
  D(f(re), {
3191
3191
  title: f(r).goodResponse,
@@ -3299,6 +3299,7 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
3299
3299
  p
3300
3300
  ],
3301
3301
  inline: "",
3302
+ required: "",
3302
3303
  class: "q-chatbot__tools-select-input",
3303
3304
  size: "medium",
3304
3305
  items: u.value
@@ -3326,7 +3327,7 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
3326
3327
  key: 1,
3327
3328
  class: "q-chatbot__file-preview",
3328
3329
  tabindex: "0"
3329
- }, Er = { class: "q-chatbot__file-name" }, Cr = { class: "q-chatbot__input" }, Br = { class: "q-chatbot__send-container" }, Rr = ["accept"], Lr = /* @__PURE__ */ T({
3330
+ }, Er = { class: "q-chatbot__file-name" }, Cr = { class: "q-chatbot__input" }, Br = { class: "q-chatbot__send-container" }, Rr = ["accept"], qr = /* @__PURE__ */ T({
3330
3331
  __name: "ChatBotInput",
3331
3332
  props: {
3332
3333
  disabled: { type: Boolean },
@@ -3381,14 +3382,14 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
3381
3382
  (U = Z.files) != null && U[0] && W(Z.files[0]);
3382
3383
  }
3383
3384
  return (x, Z) => (y(), $(ce, null, [
3384
- D(f(qt), {
3385
+ D(f(Lt), {
3385
3386
  label: f(r).inputLabel
3386
3387
  }, null, 8, ["label"]),
3387
3388
  R("div", {
3388
3389
  class: Q(["q-chatbot__footer", g.value]),
3389
- onDragover: qe(b, ["prevent"]),
3390
- onDragleave: qe(_, ["prevent"]),
3391
- onDrop: qe(B, ["prevent"])
3390
+ onDragover: Le(b, ["prevent"]),
3391
+ onDragleave: Le(_, ["prevent"]),
3392
+ onDrop: Le(B, ["prevent"])
3392
3393
  }, [
3393
3394
  R("div", xr, [
3394
3395
  i.value ? (y(), $("div", Ir, [
@@ -3470,7 +3471,7 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
3470
3471
  ], 34)
3471
3472
  ], 64));
3472
3473
  }
3473
- }), qr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20126.25%20110.36'%3e%3cdefs%3e%3cradialGradient%20id='radial-gradient'%20cx='45.24'%20cy='38.05'%20fx='45.24'%20fy='38.05'%20r='59.09'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2331319e'/%3e%3cstop%20offset='.19'%20stop-color='%232e2e97'/%3e%3cstop%20offset='.45'%20stop-color='%23292985'/%3e%3cstop%20offset='.75'%20stop-color='%23202067'/%3e%3cstop%20offset='1'%20stop-color='%2317174a'/%3e%3c/radialGradient%3e%3clinearGradient%20id='linear-gradient'%20x1='82.65'%20y1='50.41'%20x2='82.65'%20y2='77.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='.02'%20stop-color='%2366ebfe'/%3e%3cstop%20offset='.96'%20stop-color='%2300bfdb'/%3e%3c/linearGradient%3e%3clinearGradient%20id='linear-gradient-2'%20x1='44.6'%20y1='50.01'%20x2='44.6'%20y2='77.1'%20xlink:href='%23linear-gradient'/%3e%3c/defs%3e%3cg%20isolation='isolate'%3e%3cg%20id='Layer_1'%3e%3cpath%20d='M126.2,61.4c-.2-3.69-2.61-17.39-5.92-22.09-2.42-3.44-5.89-4.03-7.96-4.38-.13-.02-.27-.05-.41-.07-.16-.28-.32-.58-.45-.81-.63-1.14-1.03-1.87-1.44-2.44-6.96-9.88-14.91-16.51-24.85-20.69-.25-2.29-.84-5.24-3.37-7.44-2.93-2.55-7.58-2.9-11.68-3.21-.93-.07-1.82-.14-2.4-.22l-.33-.05h-8.61l-.36.05c-.65.1-1.61.17-2.63.24-3.75.27-8.01.57-10.98,2.85-2.94,2.26-3.58,5.55-3.79,7.84-9.71,3.94-17.86,10.71-24.85,20.62-.4.57-.81,1.3-1.43,2.44-.13.23-.29.53-.45.81-.14.02-.28.05-.4.07-2.07.35-5.54.94-7.96,4.39-2.25,3.19-3.84,9.89-4.58,13.59-.6,2.97-1.9,10.3-1.08,14.26.79,3.78,3.66,5.6,5.37,6.68.12.08.26.16.39.25,1.65,10.03,6.98,18.56,15.52,24.77,9.23,6.72,20.2,9.43,27.78,10.52,4.49.65,9.15.97,13.85.97,9.67,0,23.77-1.39,36-8.02,11.58-6.27,18.81-16,21.04-28.24,4.52-2.76,6.36-5.67,5.98-12.71Z'%20fill='%2317174a'/%3e%3cpath%20d='M67.15,4.69c2.98.42,9.31.31,11.62,2.31,1.99,1.73,1.65,4.82,2.06,7.22,10.77,3.89,18.73,10.59,25.39,20.04.64.91,2.13,3.95,2.58,4.33,1.71,1.46,5.54.35,7.67,3.37,2.29,3.25,4.83,15.41,5.06,19.59.31,5.82-.76,6.9-5.58,9.44-3.28,26.16-29.7,34.5-52.68,34.5-4.6,0-9.06-.33-13.17-.93-18.13-2.61-37.11-12.11-39.51-33.08-1.7-1.92-4.96-2.54-5.55-5.39-.95-4.56,2.21-20.32,4.89-24.14,2.13-3.02,5.96-1.91,7.67-3.37.46-.39,1.94-3.42,2.58-4.33,6.54-9.28,14.55-16.22,25.21-19.87.85-.87-.3-5.45,2.43-7.55,2.52-1.94,8.35-1.69,11.42-2.16h7.91'%20fill='%23fff'/%3e%3cpath%20d='M121.86,61.51c-.22-4.2-2.78-16.43-5.07-19.7-1.77-2.51-4.71-2.18-6.64-2.83.1,1.18.16,2.37.16,3.57,0,26.85-25.96,48.61-57.98,48.61-15.83,0-30.17-5.32-40.63-13.94,4.91,17.1,22.06,25.14,38.51,27.52,4.12.59,8.6.93,13.21.93,23.06,0,49.57-8.38,52.85-34.68,4.83-2.56,5.91-3.63,5.6-9.49Z'%20fill='%23d0d7e2'%20mix-blend-mode='multiply'%20opacity='.4'/%3e%3cpath%20d='M62.91,97.68c5.82,0,11.67-.53,16.72-1.56,13.1-2.67,22.09-8.06,26.72-16.03,4.43-7.63,4.75-17.33.96-28.84-4.28-13-13.22-22.77-24.7-27.89-.13,4.51-3.84,8.16-8.38,8.16h-20.89c-4.61,0-8.39-3.78-8.39-8.39v-.14c-5.36,2.25-10.29,5.49-14.5,9.61-8.23,8.06-13.16,19.02-13.9,30.84-.59,9.44,2.67,17.53,9.43,23.42,6.27,5.46,15.68,9.02,27.2,10.3,3.13.35,6.43.52,9.73.52'%20fill='url(%23radial-gradient)'/%3e%3crect%20x='74.34'%20y='50.41'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient)'/%3e%3crect%20x='36.29'%20y='50.01'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient-2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Dwyv4eH9gfDqTVYV8blmDwT0LeBxToKoCTVJSTK22H06IFzQBmFrFtP80cJmSYmnMwfYDfgscX+FXbAYuUFL8MYz+OCFf3AizSqw0B/UnwP3ATR2Dt2MC1kWfjDy/iplxg9llPB5Wv5waXOhQ4BGqq2/wMfAH4FYlxauWg/0icDn66Gg18eSrgdOUFKGe1XZqdNG9gFlUX+NoC/A34A7gSVsOgpsCWcOAi4GTQrDji8CpSorQz4Y5NTRCd+Bes5UKQ2+bVfdDwHP1qH7mev5X0CklziW8WhfTgO8G9VDVHXAHo0w0i44wa0PkzMh+ApirpHi3Rn3/AnAUuuDySUA2xK/fYBaV99XS/k5Ev/w+6IPetTo6+TraP74MnZHnFWClkuK/Zfbv8+j6UYcaR8xh6JOAB9eovwIYH0VoU2QP5F3P7wxMRj9BiarSSzuwCvjA/L3VtdrFvPYE9ie6qqYb0Omgfh3VKcvIIy5czz8YfQbnFJpLbegDeZGmjqxbSI3r+ScCtwL9GhzsS+jQ1tn1aLxuNRvMBR8OTCD4MZk4SJprO6JecOs6govcn88GfggcEXOwz5uZaboN2Qysi3p0Pf8Y40A4lfgUY96IduzcoaR4xqaOWRvW6nr+3sZJcg4wxNJuLjSOl2lKirU2djAWccvGkX+6cTYcE+G2pti26xnjZJkZhwcisQtMN6kCW4Ch5jUYyNSoufeMU2IBOtxmnpJiQ5zs1RAnD0xS837orHIHAb2MAyODDgzcs8j9fKNxgKwzIFehE8G9gT6fu1RJsSrutvk/GdqIAV0smzEAAAAASUVORK5CYII=", Nr = { class: "q-chatbot" }, Fr = { class: "q-chatbot__content" }, Tr = { class: "q-chatbot__footer-container" }, Gr = /* @__PURE__ */ T({
3474
+ }), Lr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20126.25%20110.36'%3e%3cdefs%3e%3cradialGradient%20id='radial-gradient'%20cx='45.24'%20cy='38.05'%20fx='45.24'%20fy='38.05'%20r='59.09'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2331319e'/%3e%3cstop%20offset='.19'%20stop-color='%232e2e97'/%3e%3cstop%20offset='.45'%20stop-color='%23292985'/%3e%3cstop%20offset='.75'%20stop-color='%23202067'/%3e%3cstop%20offset='1'%20stop-color='%2317174a'/%3e%3c/radialGradient%3e%3clinearGradient%20id='linear-gradient'%20x1='82.65'%20y1='50.41'%20x2='82.65'%20y2='77.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='.02'%20stop-color='%2366ebfe'/%3e%3cstop%20offset='.96'%20stop-color='%2300bfdb'/%3e%3c/linearGradient%3e%3clinearGradient%20id='linear-gradient-2'%20x1='44.6'%20y1='50.01'%20x2='44.6'%20y2='77.1'%20xlink:href='%23linear-gradient'/%3e%3c/defs%3e%3cg%20isolation='isolate'%3e%3cg%20id='Layer_1'%3e%3cpath%20d='M126.2,61.4c-.2-3.69-2.61-17.39-5.92-22.09-2.42-3.44-5.89-4.03-7.96-4.38-.13-.02-.27-.05-.41-.07-.16-.28-.32-.58-.45-.81-.63-1.14-1.03-1.87-1.44-2.44-6.96-9.88-14.91-16.51-24.85-20.69-.25-2.29-.84-5.24-3.37-7.44-2.93-2.55-7.58-2.9-11.68-3.21-.93-.07-1.82-.14-2.4-.22l-.33-.05h-8.61l-.36.05c-.65.1-1.61.17-2.63.24-3.75.27-8.01.57-10.98,2.85-2.94,2.26-3.58,5.55-3.79,7.84-9.71,3.94-17.86,10.71-24.85,20.62-.4.57-.81,1.3-1.43,2.44-.13.23-.29.53-.45.81-.14.02-.28.05-.4.07-2.07.35-5.54.94-7.96,4.39-2.25,3.19-3.84,9.89-4.58,13.59-.6,2.97-1.9,10.3-1.08,14.26.79,3.78,3.66,5.6,5.37,6.68.12.08.26.16.39.25,1.65,10.03,6.98,18.56,15.52,24.77,9.23,6.72,20.2,9.43,27.78,10.52,4.49.65,9.15.97,13.85.97,9.67,0,23.77-1.39,36-8.02,11.58-6.27,18.81-16,21.04-28.24,4.52-2.76,6.36-5.67,5.98-12.71Z'%20fill='%2317174a'/%3e%3cpath%20d='M67.15,4.69c2.98.42,9.31.31,11.62,2.31,1.99,1.73,1.65,4.82,2.06,7.22,10.77,3.89,18.73,10.59,25.39,20.04.64.91,2.13,3.95,2.58,4.33,1.71,1.46,5.54.35,7.67,3.37,2.29,3.25,4.83,15.41,5.06,19.59.31,5.82-.76,6.9-5.58,9.44-3.28,26.16-29.7,34.5-52.68,34.5-4.6,0-9.06-.33-13.17-.93-18.13-2.61-37.11-12.11-39.51-33.08-1.7-1.92-4.96-2.54-5.55-5.39-.95-4.56,2.21-20.32,4.89-24.14,2.13-3.02,5.96-1.91,7.67-3.37.46-.39,1.94-3.42,2.58-4.33,6.54-9.28,14.55-16.22,25.21-19.87.85-.87-.3-5.45,2.43-7.55,2.52-1.94,8.35-1.69,11.42-2.16h7.91'%20fill='%23fff'/%3e%3cpath%20d='M121.86,61.51c-.22-4.2-2.78-16.43-5.07-19.7-1.77-2.51-4.71-2.18-6.64-2.83.1,1.18.16,2.37.16,3.57,0,26.85-25.96,48.61-57.98,48.61-15.83,0-30.17-5.32-40.63-13.94,4.91,17.1,22.06,25.14,38.51,27.52,4.12.59,8.6.93,13.21.93,23.06,0,49.57-8.38,52.85-34.68,4.83-2.56,5.91-3.63,5.6-9.49Z'%20fill='%23d0d7e2'%20mix-blend-mode='multiply'%20opacity='.4'/%3e%3cpath%20d='M62.91,97.68c5.82,0,11.67-.53,16.72-1.56,13.1-2.67,22.09-8.06,26.72-16.03,4.43-7.63,4.75-17.33.96-28.84-4.28-13-13.22-22.77-24.7-27.89-.13,4.51-3.84,8.16-8.38,8.16h-20.89c-4.61,0-8.39-3.78-8.39-8.39v-.14c-5.36,2.25-10.29,5.49-14.5,9.61-8.23,8.06-13.16,19.02-13.9,30.84-.59,9.44,2.67,17.53,9.43,23.42,6.27,5.46,15.68,9.02,27.2,10.3,3.13.35,6.43.52,9.73.52'%20fill='url(%23radial-gradient)'/%3e%3crect%20x='74.34'%20y='50.41'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient)'/%3e%3crect%20x='36.29'%20y='50.01'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient-2)'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Mr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF2GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuM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uquwleI3IZcKSS4sOaAjad7A0IgnuvZgNnKSkKTQo3jfYZB41eXQf4SorXgrZZUZYd09AogidwORFYYDb0zejEmF8B3HZgVCVwKwZsIM8FxhD80daXgcWu549tIrhj0R6qvgE/uhkYU03whBNC58cDD1T48QeBS5QU6xoUbA/gd8C5FX7FBCXFA9X0oWpvUyGfW5LOZFcDwyv4eH9gfDqTVYV8blmDwT0LeBxToKoCTVJSTK22H06IFzQBmFrFtP80cJmSYmnMwfYDfgscX+FXbAYuUFL8MYz+OCFf3AizSqw0B/UnwP3ATR2Dt2MC1kWfjDy/iplxg9llPB5Wv5waXOhQ4BGqq2/wMfAH4FYlxauWg/0icDn66Gg18eSrgdOUFKGe1XZqdNG9gFlUX+NoC/A34A7gSVsOgpsCWcOAi4GTQrDji8CpSorQz4Y5NTRCd+Bes5UKQ2+bVfdDwHP1qH7mev5X0CklziW8WhfTgO8G9VDVHXAHo0w0i44wa0PkzMh+ApirpHi3Rn3/AnAUuuDySUA2xK/fYBaV99XS/k5Ev/w+6IPetTo6+TraP74MnZHnFWClkuK/Zfbv8+j6UYcaR8xh6JOAB9eovwIYH0VoU2QP5F3P7wxMRj9BiarSSzuwCvjA/L3VtdrFvPYE9ie6qqYb0Omgfh3VKcvIIy5czz8YfQbnFJpLbegDeZGmjqxbSI3r+ScCtwL9GhzsS+jQ1tn1aLxuNRvMBR8OTCD4MZk4SJprO6JecOs6govcn88GfggcEXOwz5uZaboN2Qysi3p0Pf8Y40A4lfgUY96IduzcoaR4xqaOWRvW6nr+3sZJcg4wxNJuLjSOl2lKirU2djAWccvGkX+6cTYcE+G2pti26xnjZJkZhwcisQtMN6kCW4Ch5jUYyNSoufeMU2IBOtxmnpJiQ5zs1RAnD0xS837orHIHAb2MAyODDgzcs8j9fKNxgKwzIFehE8G9gT6fu1RJsSrutvk/GdqIAV0smzEAAAAASUVORK5CYII=", Nr = { class: "q-chatbot" }, Fr = { class: "q-chatbot__content" }, Tr = { class: "q-chatbot__footer-container" }, Gr = /* @__PURE__ */ T({
3474
3475
  name: "ChatBot",
3475
3476
  __name: "ChatBot",
3476
3477
  props: {
@@ -3479,7 +3480,7 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
3479
3480
  username: {},
3480
3481
  projectPath: {},
3481
3482
  userImage: { default: Mr },
3482
- chatbotImage: { default: qr },
3483
+ chatbotImage: { default: Lr },
3483
3484
  dateFormat: {},
3484
3485
  agentData: { default: () => ({
3485
3486
  id: "",
@@ -3599,7 +3600,7 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
3599
3600
  );
3600
3601
  }
3601
3602
  }
3602
- async function L() {
3603
+ async function q() {
3603
3604
  const { data: h, error: A } = await s(
3604
3605
  t.username,
3605
3606
  t.projectPath,
@@ -3645,7 +3646,7 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
3645
3646
  disabled: z.value,
3646
3647
  "available-agents": t.availableAgents,
3647
3648
  "selected-agent-key": l.value,
3648
- onClear: L,
3649
+ onClear: q,
3649
3650
  onChangeChat: O
3650
3651
  }, null, 8, ["disabled", "available-agents", "selected-agent-key"]),
3651
3652
  R("div", {
@@ -3674,7 +3675,7 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
3674
3675
  ], 544)
3675
3676
  ]),
3676
3677
  R("div", Tr, [
3677
- D(f(Lr), {
3678
+ D(f(qr), {
3678
3679
  disabled: z.value,
3679
3680
  loading: f(p),
3680
3681
  onSendMessage: d
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@quidgest/chatbot",
3
3
  "private": false,
4
- "version": "0.5.6",
4
+ "version": "0.5.7",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
7
7
  "main": "dist/index.cjs",
@@ -5,6 +5,7 @@
5
5
  v-if="hasAgents"
6
6
  v-model="selectedChat"
7
7
  inline
8
+ required
8
9
  class="q-chatbot__tools-select-input"
9
10
  size="medium"
10
11
  :items="availableChats"