@botfabrik/engine-webclient 4.115.19 → 4.116.0

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.
@@ -55,21 +55,21 @@ ${w.current.stack}
55
55
  `),endPos:i.end}:null}function hc(e,t,n){uc=0,e=Ao(e),!t.refs&&(t.refs={}),t.j=es(e,t.refs,n);let r=pc(e,t,n);return t.refs&&Object.keys(t.refs).length>0?[{type:J.refCollection,refs:t.refs},...r]:r}var gc=/^\n+/,_c;try{_c=x.createElement(`div`).$$typeof}catch{_c=Symbol.for(`react.transitional.element`)}function vc(e,t,n){return{$$typeof:_c,type:e,key:n==null?null:``+n,ref:null,props:t,_owner:null,_store:{},_debugStack:null,_debugTask:null}}var yc=typeof x.createContext<`u`?x.createContext(void 0):void 0;function bc(e,t,n,r,i,a,o,s,c){switch(e.type){case J.blockQuote:{let i={key:n.key};return e.alert&&(i.className=`markdown-alert-`+a(e.alert.toLowerCase(),uo),e.children.unshift({attrs:{},children:[{type:J.text,text:e.alert}],c:!0,type:J.htmlBlock,tag:`header`})),r(`blockquote`,i,t(e.children,n))}case J.breakLine:return r(`br`,{key:n.key});case J.breakThematic:return r(`hr`,{key:n.key});case J.frontmatter:return s.preserveFrontmatter?r(`pre`,{key:n.key},e.text):null;case J.codeBlock:let h=e.lang?io(e.lang):``;return r(`pre`,{key:n.key},r(`code`,{...ro(e.attrs||{}),className:h?`language-${h} lang-${h}`:``},e.text));case J.codeInline:return r(`code`,{key:n.key},e.text);case J.footnoteReference:return r(`a`,{key:n.key,href:i(e.target,`a`,`href`)||void 0},r(`sup`,{key:n.key},e.text));case J.gfmTask:return r(`input`,{checked:e.completed,key:n.key,readOnly:!0,type:`checkbox`});case J.heading:return r(`h${e.level}`,{id:e.id,key:n.key},t(e.children,n));case J.htmlBlock:{let h=e;if(s.tagfilter&&Lo(h.tag)){var l=``;if(h.attrs)for(var u in h.attrs){var d=h.attrs[u];d===!0?l+=` `+u:d!=null&&d!==!1&&(l+=` `+u+`="`+String(d)+`"`)}return r(`span`,{key:n.key},`<`+h.tag+l+`>`)}if(h.a&&h.c){let r=function(e){if((e.type===J.htmlSelfClosing||e.type===J.htmlBlock)&&e.b)return[];if(e.type===J.paragraph){let t=e.children;return t?t.flatMap(r):[]}return e.type===J.text?e.text?.trim()?[e]:[]:e.type===J.htmlBlock&&e.children?[{...e,children:e.children?.flatMap(r)}]:[e]},l=function(e){for(var t=0;t<e.length;t++)e[t].type===J.htmlBlock&&(e[t].c=!1),`children`in e[t]&&e[t].children&&l(e[t].children)},u=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.type===J.paragraph&&r.children)for(var i=r.children,a=0;a<i.length;a++){var o=i[a];if(o.type===J.htmlSelfClosing&&o.b&&o.tag.toLowerCase()===t){var s=e.slice(0,n);a>0&&s.push({type:J.paragraph,children:i.slice(0,a)});var c=[];if(a+1<i.length){var l=i.slice(a+1);l=l.filter(function(e){return!(e.type===J.htmlSelfClosing&&e.b)}),l.length>0&&(c=l)}return c=c.concat(e.slice(n+1)),{found:!0,beforeClose:s,afterClose:c}}}if((r.type===J.htmlSelfClosing||r.type===J.htmlBlock)&&r.b&&r.tag.toLowerCase()===t)return{found:!0,beforeClose:e.slice(0,n),afterClose:e.slice(n+1)}}return{found:!1,beforeClose:e,afterClose:[]}},d=h.tag.toLowerCase(),g=Xo(d),_=h.children&&h.children.length>0,v=/<[a-z][^>]{0,100}>/i.test(h.a);if(g){let t=h.a.replace(RegExp(`\\s*</`+d+`>\\s*$`,`i`),``);return s.tagfilter&&(t=zo(t)),v?c(e.tag,{key:n.key,...ro(e.attrs||{}),dangerouslySetInnerHTML:{__html:t}}):c(e.tag,{key:n.key,...ro(e.attrs||{})},t)}let y=RegExp(`^<${h.tag}(\\s|>)`,`i`).test(h.a);if(_&&!y&&s.tagfilter&&Ro(h.a))return c(e.tag,{key:n.key,...ro(e.attrs||{})},t(h.children,n));if(Zo(h.a)){let t=s.tagfilter?zo(h.a):h.a;return c(e.tag,{key:n.key,...ro(e.attrs||{}),dangerouslySetInnerHTML:{__html:t}})}let b={slugify:e=>a(e,uo),sanitizer:i,tagfilter:!0},S=h.a.replace(/>\s+</g,`><`).replace(/\n+/g,` `).trim();if(RegExp(`^<${h.tag}(\\s[^>]*)?>(\\s*</${h.tag}>)?$`,`i`).test(S))return h.children&&h.children.length>0?c(e.tag,{key:n.key,...ro(e.attrs||{})},t(h.children,n)):c(e.tag,{key:n.key,...ro(e.attrs||{})});let C=hc(S,{inline:!1,refs:o,inHTML:!1},b);l(C);let w=h.tag.toLowerCase(),T=`</`+w+`>`,E=RegExp(`^<${h.tag}(\\s|>)`,`i`).test(S),D=S.toLowerCase().trimEnd().endsWith(T),O=E&&D;if(O&&_)return c(e.tag,{key:n.key,...ro(e.attrs||{})},t(h.children,n));if(O)return t(C.flatMap(r),n);var f=u(C,w);if(f.found&&f.afterClose.length>0){var p=f.beforeClose.flatMap(r),m=f.afterClose.flatMap(r);return vc(x.Fragment,{children:[c(e.tag,{key:n.key,...ro(e.attrs||{})},t(p,n)),t(m,n)]},null)}return c(e.tag,{key:n.key,...ro(e.attrs||{})},t(C.flatMap(r),n))}return mo(e.tag)?c(e.tag,{key:n.key,...ro(e.attrs||{})}):c(e.tag,{key:n.key,...ro(e.attrs||{})},e.children?t(e.children,n):``)}case J.htmlSelfClosing:{let t=e;if(s.tagfilter&&Lo(t.tag)){var l=``;if(t.attrs)for(var u in t.attrs){var d=t.attrs[u];d===!0?l+=` `+u:d!=null&&d!==!1&&(l+=` `+u+`="`+String(d)+`"`)}return r(`span`,{key:n.key},`<`+t.tag+l+` />`)}return c(e.tag,{key:n.key,...ro(e.attrs||{})})}case J.image:{let t=e.target==null?null:i(e.target,`img`,`src`);return r(`img`,{key:n.key,alt:e.alt&&e.alt.length>0?e.alt:void 0,title:e.title||void 0,src:t||void 0})}case J.link:{let i={key:n.key};return e.target!=null&&(i.href=No(e.target)),e.title&&(i.title=e.title),r(`a`,i,t(e.children,n))}case J.table:{let i=e;return r(`table`,{key:n.key},r(`thead`,{key:`thead`},r(`tr`,null,i.header.map(function(e,a){return r(`th`,{key:a,style:i.align[a]==null?{}:{textAlign:i.align[a]}},t(e,n))}))),i.cells.length>0&&r(`tbody`,{key:`tbody`},i.cells.map(function(e,a){return r(`tr`,{key:a},e.map(function(e,a){return r(`td`,{key:a,style:i.align[a]==null?{}:{textAlign:i.align[a]}},t(e,n))}))})))}case J.text:return e.text;case J.textFormatted:return r(e.tag,{key:n.key},t(e.children,n));case J.orderedList:case J.unorderedList:return r(e.type===J.orderedList?`ol`:`ul`,{key:n.key,start:e.type===J.orderedList?e.start:void 0},e.items.map(function(e,i){return r(`li`,{key:i},t(e,n))}));case J.paragraph:return r(`p`,{key:n.key},t(e.children,n));case J.ref:return null;default:return null}}var xc=(e,t,n,r,i,a,o)=>{var s=e=>e.map(function(e){return`text`in e?e.text:``}),c=(l,u={})=>{var d=(u.renderDepth||0)+1;if(d>2500)return s(l);u.renderDepth=d;for(var f=u.key,p=[],m=!1,h=0;h<l.length;h++){u.key=h;var g=e?e(bc.bind(null,l[h],c,u,t,n,r,i,a,o),l[h],c,u):bc(l[h],c,u,t,n,r,i,a,o),_=typeof g==`string`;if(_&&m)p[p.length-1]+=g;else if(g!==null)if(Array.isArray(g))for(var v=0;v<g.length;v++)p.push(g[v]);else p.push(g);m=_}return u.key=f,u.renderDepth=d-1,p};return c},Sc=(e,t)=>{let n=Mo(t,e,void 0);return n?typeof n==`function`||typeof n==`object`&&`render`in n?n:Mo(t,`${e}.component`,e):e};function Cc(e,t){let n={...t||{}};n.overrides=n.overrides||{};let r=n.slugify||uo,i=n.sanitizer||oo,a=n.createElement,o=n.overrides&&Object.keys(n.overrides).length>0,s=e=>wc(e,{...n,wrapper:null});function c(e){for(var t in e){var n=e[t];if(typeof n==`string`&&n.length>0&&n.charCodeAt(0)===va&&(Bo.test(n)||Vo.test(n)||mc(n,0))){var r=s(n.trim());e[t]=t===`innerHTML`&&Array.isArray(r)?r[0]:r}}}function l(e,t,...r){var i=t||{},s=e;if(o){var c=Mo(n.overrides,e+`.props`,{});s=Sc(e,n.overrides),i={...i,...c,className:Po(i.className,c.className)||void 0}}if(!a){var l=i.key;return l!=null&&delete i.key,r.length===1?i.children=r[0]:r.length>1&&(i.children=r),vc(s,i,l)}return a(s,i,...r)}function u(e,t,...n){return t&&c(t),l(e,t,...n)}let d={...n,slugify:n.slugify?e=>n.slugify(e,uo):uo,sanitizer:i,tagfilter:n.tagfilter!==!1},f=e[0]&&e[0].type===J.refCollection?e[0].refs:{},p=xc(n.renderRule,l,i,r,f,n,u),m=p(e,{inline:n.forceInline,refs:f}),h=[];for(let e in f)e.charCodeAt(0)===ua&&h.push({identifier:e,footnote:f[e].target});if(h.length&&m.push(l(`footer`,{key:`footer`},h.map(function(e){let t=e.identifier.charCodeAt(0)===ua?e.identifier.slice(1):e.identifier,n=hc(e.footnote,{inline:!0,refs:f},d);return l(`div`,{id:r(t,uo),key:e.identifier},t+`: `,p(n,{inline:!0,refs:f}))}))),n.wrapper===null)return m;let g=n.wrapper||(n.forceInline?`span`:`div`),_;if(m.length>1||n.forceWrapper)_=m;else return m.length===1?m[0]:null;var v=n.wrapperProps?{...n.wrapperProps}:{};return v.children=_,vc(g,v,`outer`)}function wc(e=``,t={}){let n={...t||{}};n.overrides=n.overrides||{},n.slugify;let r=n.sanitizer||oo;function i(e){let t=n.forceInline||!n.forceBlock&&!Y.test(e),i={...n,slugify:n.slugify?e=>n.slugify(e,uo):uo,sanitizer:r,tagfilter:n.tagfilter!==!1},o=e;if(!t){let e=o.length;for(;e>0&&(o[e-1]===`
56
56
  `||o[e-1]===`\r`);)e--;o=o.slice(0,e),o=`${o.replace(gc,``)}
57
57
 
58
- `}if(n.optimizeForStreaming){var s=o.lastIndexOf(`<`);s!==-1&&o.indexOf(`>`,s)===-1&&(o=o.slice(0,s)),s=e.lastIndexOf(`<`),s!==-1&&e.indexOf(`>`,s)===-1&&(e=e.slice(0,s))}return Cc(hc(t?e:o,{inline:t,refs:a},i),{...i,forceInline:t})}let a={};return i(e)}var Tc=({children:e,options:t,...n})=>{if(!(typeof x.useContext<`u`)){let r={...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...n}};return wc(e??``,r)}let r=x.useContext(yc),i=x.useMemo(()=>({...r,...t,overrides:{...r?.overrides,...t?.overrides},wrapperProps:{...r?.wrapperProps,...t?.wrapperProps,...n}}),[r,t,n]),a=e??``;return x.useMemo(()=>wc(a,i),[a,i])},Ec={generalConditionsContainer:`_generalConditionsContainer_55hjg_1`,generalConditions:`_generalConditions_55hjg_1`,generalConditionsHeader:`_generalConditionsHeader_55hjg_15`,generalConditionsBody:`_generalConditionsBody_55hjg_26`,generalConditionsAccept:`_generalConditionsAccept_55hjg_35`},Dc=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),X=o(((e,t)=>{t.exports=Dc()}))(),Oc=()=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1rem`,height:`1rem`,fill:`currentColor`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`})}),kc=()=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1rem`,height:`1rem`,fill:`currentColor`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z`})}),Ac=`general-conditions.header`,jc=`general-conditions.body`,Mc=`general-conditions.accept-conditions-note`,Nc=()=>{let e=B(),[t,n]=(0,x.useState)(!1),r=()=>n(!t),i=e=>{e.key===`ArrowDown`||e.key===`ArrowRight`?n(!0):e.key===`ArrowUp`||e.key===`ArrowLeft`||e.key===`Escape`?n(!1):(e.key===`Enter`||e.key===`Space`||e.key===` `)&&r()},a=e(Ac),o=e(Mc);return(0,X.jsxs)(`div`,{className:R(Ec.generalConditionsContainer,`chat__generalConditions`),children:[!!a?.length&&(0,X.jsxs)(`div`,{className:Ec.generalConditions,children:[(0,X.jsxs)(`div`,{role:`button`,onClick:r,onKeyDown:i,tabIndex:0,className:R(Ec.generalConditionsHeader,`chat__generalConditions__header`),"aria-controls":`general-conditions-body`,"aria-expanded":t?`true`:`false`,"aria-pressed":t?`true`:`false`,children:[(0,X.jsx)(Tc,{children:a}),t?(0,X.jsx)(kc,{}):(0,X.jsx)(Oc,{})]}),(0,X.jsx)(`div`,{className:R(Ec.generalConditionsBody,`chat__generalConditions__body`),id:`general-conditions-body`,role:`region`,tabIndex:-1,children:t&&(0,X.jsx)(Tc,{children:e(jc)||``})})]}),!!o?.length&&(0,X.jsx)(`div`,{className:R(Ec.generalConditionsAccept,`chat__generalConditions__accept`),tabIndex:0,children:(0,X.jsx)(Tc,{children:e(Mc)||``})})]})},Z={messageContainer:`_messageContainer_1rxi5_1`,message:`_message_1rxi5_1`,messageBot:`_messageBot_1rxi5_14`,messageBotLast:`_messageBotLast_1rxi5_45`,avatar:`_avatar_1rxi5_45`,messageBotFirst:`_messageBotFirst_1rxi5_54`,messageBotAnimated:`_messageBotAnimated_1rxi5_67`,fadeInLeft:`_fadeInLeft_1rxi5_1`,messageGuest:`_messageGuest_1rxi5_78`,messageGuestFirst:`_messageGuestFirst_1rxi5_84`,messageGuestLast:`_messageGuestLast_1rxi5_90`,botAvatar:`_botAvatar_1rxi5_104`,agentAvatar:`_agentAvatar_1rxi5_108`,bubble:`_bubble_1rxi5_112`,bubbleContent:`_bubbleContent_1rxi5_118`,bubbleLeft:`_bubbleLeft_1rxi5_132`,leftText:`_leftText_1rxi5_143`,bubbleRight:`_bubbleRight_1rxi5_150`,rightText:`_rightText_1rxi5_160`,sourceInfoReference:`_sourceInfoReference_1rxi5_192`,sourceInfoReferenceActive:`_sourceInfoReferenceActive_1rxi5_204`},Pc=(e,t)=>{(0,x.useEffect)(()=>{let n=n=>{e.current&&!e.current.contains(n.target)&&t()};return document.addEventListener(`mousedown`,n),()=>document.removeEventListener(`mousedown`,n)},[e,t])};function Fc(e,t){let n=null,r=null,i=(...i)=>{r=i,n&&clearTimeout(n),n=setTimeout(()=>{e(...r),n=null,r=null},t)};return i.flush=()=>{n&&r&&(clearTimeout(n),e(...r),n=null,r=null)},i}function Ic(e,t){let n=0,r=null;return((...i)=>{let a=Date.now(),o=a-n;o>=t?(n=a,e(...i)):(r&&clearTimeout(r),r=setTimeout(()=>{n=Date.now(),e(...i)},t-o))})}var Lc={container:`_container_131ib_1`,categoryContainer:`_categoryContainer_131ib_13`,categoryButton:`_categoryButton_131ib_20`,active:`_active_131ib_35`,commentTextarea:`_commentTextarea_131ib_44`},Rc=(e,t,n)=>{(0,x.useEffect)(()=>{if(e){let e=()=>{let e=[`button:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`,`a[href]`,`input:not([disabled])`,`select:not([disabled])`].join(`,`),r=t.current?Array.from(t.current.querySelectorAll(e)):[],i=n.current?Array.from(n.current.querySelectorAll(e)):[];return[...r,...i]},r=t=>{if(t.key===`Tab`){let n=e();if(n.length>0){let e=n[0],r=n[n.length-1],i=document.activeElement;!t.shiftKey&&i===r?(t.preventDefault(),e.focus()):t.shiftKey&&i===e&&(t.preventDefault(),r.focus())}}};return document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`keydown`,r,!0)}}},[e,t,n])},zc=({open:e,actionsRef:t,reaction:n,onReaction:r})=>{let i=B(),a=(0,x.useRef)(null),o=Fc(e=>{r({...n,comment:e})},300);(0,x.useEffect)(()=>()=>o.flush(),[o]),Rc(e,t,a);let s=e=>{r({...n,category:n.category===e?void 0:e})};return e?(0,X.jsxs)(`div`,{ref:a,className:Lc.container,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`bad-reaction-title`,children:[(0,X.jsx)(`h2`,{id:`bad-reaction-title`,children:i(`bot-bubble.reaction.say-more`)}),(0,X.jsx)(`div`,{className:Lc.categoryContainer,role:`radiogroup`,children:[`WRONG_INFORMATION`,`MISSING_INFORMATION`,`OLD_INFORMATION`,`UNCLEAR`,`OFF_TOPIC`].map(e=>(0,X.jsx)(`button`,{className:R(Lc.categoryButton,n?.category===e&&Lc.active),onClick:()=>s(e),"aria-pressed":n?.category===e,"aria-label":i(`bot-bubble.reaction.category.${e}`),tabIndex:0,role:`radio`,children:i(`bot-bubble.reaction.category.${e}`)},e))}),(0,X.jsx)(`textarea`,{id:`comment`,name:`comment`,placeholder:i(`bot-bubble.reaction.comment`),defaultValue:n?.comment,onChange:e=>o(e.target.value),className:Lc.commentTextarea,rows:3,"aria-label":i(`bot-bubble.reaction.comment`)})]}):null},Bc={botMessageActionContainer:`_botMessageActionContainer_g6hpe_1`,alwaysVisible:`_alwaysVisible_g6hpe_15`,active:`_active_g6hpe_19`,botMessageActionInnerContainer:`_botMessageActionInnerContainer_g6hpe_27`,header:`_header_g6hpe_52`,botMessageActions:`_botMessageActions_g6hpe_57`,reported:`_reported_g6hpe_68`,action:`_action_g6hpe_72`,anyReport:`_anyReport_g6hpe_120`,closeButton:`_closeButton_g6hpe_136`},Vc=({isSubmitting:e,onClick:t})=>{let n=B();return(0,X.jsx)(`button`,{className:R(Bc.action,Bc.closeButton,`tooltip--bottom-left`),"aria-label":n(`bot-bubble.reaction.close`),"data-title":n(`bot-bubble.reaction.close`),tabIndex:0,onClick:t,children:(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:e?(0,X.jsx)(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}):(0,X.jsx)(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`})})})},Hc=({alwaysVisible:e,senderType:t,reaction:n,botMessageRef:r,message:i,onReaction:a})=>{let o=B(),[s,c]=(0,x.useState)(!1),[l,u]=(0,x.useState)(!1),[d,f]=(0,x.useState)(!1),p=(0,x.useRef)(null),m=(0,x.useRef)(null);Pc(p,()=>{f(!1)});let h=e=>{e.key===`Escape`&&f(!1)};(0,x.useEffect)(()=>(document.addEventListener(`keydown`,h),()=>{document.removeEventListener(`keydown`,h)}),[]),(0,x.useEffect)(()=>{d&&p.current?.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`nearest`})},[d]);let g=e=>{m.current&&clearTimeout(m.current),u(!0),a(e),m.current=setTimeout(()=>{u(!1)},1e3)},_=(0,x.useCallback)(async()=>{if(r.current)try{c(!0);let e=r.current.innerHTML,t=r.current.innerText;await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([t],{type:`text/plain`})})]),await new Promise(e=>setTimeout(e,1500))}finally{c(!1)}},[r]),v=()=>{f(!1),a(n?.type===`GOOD`?null:{type:`GOOD`})},y=()=>{a({...i.reaction,type:`BAD`}),f(!d)},b=e=>t=>{(t.key===`Enter`||t.key===` `)&&e()};return(0,X.jsx)(`div`,{ref:p,className:R(Bc.botMessageActionContainer,e&&Bc.alwaysVisible,d&&Bc.active),"aria-hidden":`true`,children:(0,X.jsxs)(`div`,{className:R(Bc.botMessageActionInnerContainer,e&&Bc.alwaysVisible,d&&Bc.active,n&&Bc.reported),role:`group`,"aria-label":o(`bot-bubble.actions.label`),children:[(0,X.jsxs)(`div`,{className:Bc.header,children:[(0,X.jsxs)(`div`,{className:R(Bc.botMessageActions,n&&Bc.reported),children:[t===na.BOT&&(0,X.jsx)(`button`,{className:R(Bc.action,n?.type&&Bc.anyReport,n?.type===`GOOD`&&Bc.reported,`tooltip--top-right`),tabIndex:0,"aria-label":o(n?.type===`GOOD`?`bot-bubble.reaction.remove`:`bot-bubble.reaction.good`),"aria-pressed":n?.type===`GOOD`,"data-title":o(n?.type===`GOOD`?`bot-bubble.reaction.remove`:`bot-bubble.reaction.good`),onPointerDown:v,onKeyDown:b(v),children:(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:n?.type===`GOOD`?(0,X.jsx)(`path`,{d:`M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32Z`}):(0,X.jsx)(`path`,{d:`M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z`})})}),t===na.BOT&&(0,X.jsx)(`button`,{className:R(Bc.action,n?.type&&Bc.anyReport,n?.type===`BAD`&&Bc.reported,`tooltip--top-right`),tabIndex:0,"aria-label":o(`bot-bubble.reaction.bad`),"aria-pressed":n?.type===`BAD`,"data-title":o(`bot-bubble.reaction.bad`),onPointerDown:y,onKeyDown:b(y),children:(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:n?.type===`BAD`?(0,X.jsx)(`path`,{d:`M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Z`}):(0,X.jsx)(`path`,{d:`M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z`})})}),(0,X.jsx)(`button`,{className:R(Bc.action,`tooltip--top-right`),style:{visibility:d?`hidden`:`visible`},tabIndex:0,"aria-label":o(`bot-bubble.copy`),"data-title":o(`bot-bubble.copy`),onClick:_,children:(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:s?(0,X.jsx)(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}):(0,X.jsx)(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`})})})]}),d&&(0,X.jsx)(Vc,{isSubmitting:l,onClick:()=>f(!1)})]}),i.reaction&&(0,X.jsx)(zc,{open:d,actionsRef:p,reaction:i.reaction,onReaction:g})]})})},Uc=(0,x.forwardRef)(({message:e,isAnimated:t,isLastMessage:n,isFirstMessageBySender:r,isLastMessageBySender:i,children:a,onReaction:o},s)=>{let c=B(),l=(0,x.useRef)(null),u=e.sender.type===z.BOT;return(0,X.jsxs)(`li`,{ref:s,className:R(Z.message,Z.messageBot,n&&Z.lastMessage,r&&Z.messageBotFirst,i&&Z.messageBotLast,`chat__bubbleContainer`,t&&Z.messageBotAnimated,t&&`chat__bubbleContainer--animated`,u?`chat__botBubbleContainer`:`chat__agentBubbleContainer`,r&&`chat__bubbleContainer--first`,i&&`chat__bubbleContainer--last`),role:`article`,children:[(0,X.jsx)(`img`,{className:R(Z.avatar,u?Z.botAvatar:Z.agentAvatar,`chat__avatar`,u?`chat__botAvatar`:`chat__agentAvatar`),src:`${e.sender.avatar}`,alt:u?`Bot`:`Agent`,referrerPolicy:`no-referrer`,"aria-hidden":`true`}),(0,X.jsxs)(`div`,{className:Z.messageContainer,children:[(0,X.jsx)(`div`,{ref:l,className:R(Z.bubble,Z.bubbleLeft,`chat__bubble`,u?`chat__botBubble`:`chat__agentBubble`),tabIndex:0,role:`group`,"aria-label":c(u?`bot-bubble.label`:`agent-bubble.label`),children:(0,X.jsx)(`div`,{className:R(Z.leftText),children:a})}),o&&(0,X.jsx)(Hc,{alwaysVisible:n&&i,senderType:e.sender.type,reaction:e.reaction,message:e,botMessageRef:l,onReaction:o})]})]})}),Wc={sourceList:`_sourceList_1sc0q_1`,source:`_source_1sc0q_1`,label:`_label_1sc0q_39`},Gc=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,...e,children:(0,X.jsx)(`path`,{d:`M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z`})}),Kc=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,...e,children:(0,X.jsx)(`path`,{d:`M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z`})}),qc=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,...e,children:(0,X.jsx)(`path`,{d:`M222,152a6,6,0,0,1-6,6H190v20h18a6,6,0,0,1,0,12H190v18a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h32A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm84,8a34,34,0,0,1-34,34H112a6,6,0,0,1-6-6V152a6,6,0,0,1,6-6h16A34,34,0,0,1,162,180Zm-12,0a22,22,0,0,0-22-22H118v44h10A22,22,0,0,0,150,180ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z`})}),Jc=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,...e,children:(0,X.jsx)(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z`})}),Yc=({type:e,...t})=>{switch(e){case`WEBSITE`:return(0,X.jsx)(Jc,{...t});case`PDF`:return(0,X.jsx)(qc,{...t});case`DOCX`:return(0,X.jsx)(Gc,{...t});default:return(0,X.jsx)(Kc,{...t})}},Xc=({sources:e,onLinkClick:t})=>{let n=B(),r=e=>()=>{t(e.url)},i=e=>n=>{(n.key===`Enter`||n.key===` `)&&t(e.url)};return e.length?(0,X.jsx)(`ul`,{className:Wc.sourceList,"aria-label":n(`bot-bubble.sources`),children:e.map(e=>(0,X.jsx)(`li`,{className:Wc.source,children:(0,X.jsxs)(`a`,{role:`button`,tabIndex:0,"aria-label":`${n(`bot-bubble.source.open`)}: ${e.label}`,onClick:r(e),onKeyDown:i(e),children:[(0,X.jsx)(Yc,{type:e.type,"aria-hidden":`true`}),(0,X.jsx)(`div`,{className:Wc.label,children:e.label})]})},e.url))}):null},Zc={button:`_button_3ui4g_1`,buttonDefault:`_buttonDefault_3ui4g_13`,buttonPrimary:`_buttonPrimary_3ui4g_28`},Qc=({className:e,children:t,...n})=>(0,X.jsx)(`button`,{className:R(Zc.button,e),type:`button`,role:`button`,...n,children:t}),$c={title:`_title_137pi_1`,buttons:`_buttons_137pi_6`,button:`_button_137pi_6`,imageContainer:`_imageContainer_137pi_29`,image:`_image_137pi_29`,video_container:`_video_container_137pi_44`,video:`_video_137pi_44`,only:`_only_137pi_58`},el=({buttons:e,onButtonClick:t})=>(0,X.jsx)(`div`,{className:R($c.buttons,`chat__bubbleButtons`),children:e.map((e,n)=>(0,X.jsx)(Qc,{className:R($c.button,`chat__bubbleButton`),onClick:()=>t(e),children:e.title},n))}),tl=`newtab#`,nl=({markdown:e,markdownOptions:t={},onLinkClick:n})=>{let r=e=>t=>(t.preventDefault(),e&&n(e),!1),i=({title:e,href:t,children:n})=>t.indexOf(tl)===0?(0,X.jsx)(`a`,{href:t.slice(7),title:e,target:`_blank`,rel:`noopener noreferrer`,children:n}):(0,X.jsx)(`a`,{onClick:r(t),title:e,href:t,children:n});return(0,X.jsx)(Tc,{options:{...t,overrides:{a:i}},children:e})},rl=({text:e,onLinkClick:t})=>e?(0,X.jsx)(`div`,{children:(0,X.jsx)(nl,{markdown:e,onLinkClick:t})}):null,il=({title:e})=>e?(0,X.jsx)(`h1`,{className:$c.title,children:e}):null,al=({title:e,text:t,buttons:n,onButtonClick:r,onLinkClick:i})=>e?.length||t?.length||n?.length?(0,X.jsxs)(`div`,{className:R(Z.bubbleContent),children:[(0,X.jsx)(il,{title:e}),(0,X.jsx)(rl,{text:t,onLinkClick:i}),(0,X.jsx)(el,{buttons:n,onButtonClick:r})]}):null,ol=({alt:e,imageUrl:t,itemUrl:n,hasBody:r})=>t?n?n.indexOf(`youtube.com`)>-1?(0,X.jsx)(`div`,{className:$c.video_container,children:(0,X.jsx)(`iframe`,{className:R($c.video,{[$c.only]:!r}),title:`Youtube`,width:`100%`,src:n+`?rel=0`,frameBorder:`0`,allowFullScreen:!0})}):(0,X.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,children:(0,X.jsx)(`div`,{className:$c.imageContainer,children:(0,X.jsx)(`img`,{className:R($c.image,{[$c.only]:!r}),src:t,alt:e})})}):(0,X.jsx)(`div`,{className:$c.imageContainer,children:(0,X.jsx)(`img`,{className:R($c.image,{[$c.only]:!r}),src:t,alt:e})}):null,sl=({title:e,text:t,imageUrl:n,itemUrl:r,buttons:i,sources:a,onButtonClick:o,onLinkClick:s})=>{let c=!!e?.length||!!t?.length||!!i?.length;return(0,X.jsxs)(`div`,{className:R($c.detailMessage),children:[(0,X.jsx)(ol,{hasBody:c,imageUrl:n,itemUrl:r,alt:e||``}),c&&(0,X.jsx)(al,{title:e,text:t,buttons:i,onLinkClick:s,onButtonClick:o}),(0,X.jsx)(Xc,{sources:a,onLinkClick:s})]})},cl=(0,x.forwardRef)(({isFirstMessageBySender:e,isLastMessageBySender:t,children:n},r)=>{let i=B();return(0,X.jsx)(`li`,{ref:r,className:R(Z.message,Z.messageGuest,e&&Z.messageGuestFirst,t&&Z.messageGuestLast,`chat__bubbleContainer`,`chat__guestBubbleContainer`,e&&`chat__bubbleContainer--first`,t&&`chat__bubbleContainer--last`),role:`article`,children:(0,X.jsx)(`div`,{className:R(Z.bubble,Z.bubbleRight,`chat__bubble`,`chat__guestBubble`),tabIndex:0,role:`group`,"aria-label":i(`guest-bubble.label`),children:(0,X.jsx)(`div`,{className:R(Z.rightText),children:n})})})}),ll=()=>(0,x.useMemo)(()=>Qt(),[]),ul={markdown:`_markdown_nw7vg_1`},dl=`source-info-reference`,fl=({actionId:e,markdown:t,sources:n,onLinkClick:r})=>{let i=ll(),a=$i(),o=pl(),s=ea(e=>{let t=e.chat.sourceInfos;if(t?.type===`loaded`||t?.type===`loading`)return t.chunkId}),c=t=>n=>{let r=n.key;(r===`ArrowDown`||r===`ArrowRight`||r===`Enter`||r===` `||r===`Space`)&&(n.stopPropagation(),a(Mi(i,e,t)))},l=t=>()=>{a(Mi(i,e,t))};return(0,x.useLayoutEffect)(()=>{document.querySelectorAll(`.${dl}`).forEach(e=>{let t=e.previousSibling;t&&t.nodeType===Node.TEXT_NODE&&t.textContent?.endsWith(` `)&&t.textContent?.trim().length&&e.classList.add(`${dl}--before-space`);let n=e.nextSibling;n&&n.nodeType===Node.TEXT_NODE&&n.textContent?.startsWith(` `)&&n.textContent?.trim().length&&e.classList.add(`${dl}--after-space`)})},[t]),(0,X.jsxs)(`div`,{className:Z.bubbleContent,children:[(0,X.jsx)(`div`,{className:ul.markdown,children:(0,X.jsx)(nl,{markdown:t,onLinkClick:r,markdownOptions:{renderRule(e,t,n,r){if(t.type===J.footnoteReference){let e=t.text===s;return(0,X.jsx)(`span`,{className:R(Z.sourceInfoReference,e&&Z.sourceInfoReferenceActive,dl),children:(0,X.jsx)(`a`,{type:`button`,tabIndex:0,onClick:l(t.text),onKeyDown:c(t.text),children:o(t.text)})},r.key)}return e()}}})}),(0,X.jsx)(Xc,{sources:n,onLinkClick:r})]})},pl=()=>{let e=[];return t=>{let n=e.indexOf(t);return n>-1?n+1:(e.push(t),e.length)}},ml={text:`_text_gp0s0_1`,command:`_command_gp0s0_5`},hl=({text:e,commands:t=[]})=>{let n=t.find(t=>e.startsWith(`/${t}`)),r=n?e.slice(n.length+1):e;return(0,X.jsxs)(`div`,{children:[n&&(0,X.jsxs)(`code`,{className:ml.command,children:[`/`,n]}),r.split(`
58
+ `}if(n.optimizeForStreaming){var s=o.lastIndexOf(`<`);s!==-1&&o.indexOf(`>`,s)===-1&&(o=o.slice(0,s)),s=e.lastIndexOf(`<`),s!==-1&&e.indexOf(`>`,s)===-1&&(e=e.slice(0,s))}return Cc(hc(t?e:o,{inline:t,refs:a},i),{...i,forceInline:t})}let a={};return i(e)}var Tc=({children:e,options:t,...n})=>{if(!(typeof x.useContext<`u`)){let r={...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...n}};return wc(e??``,r)}let r=x.useContext(yc),i=x.useMemo(()=>({...r,...t,overrides:{...r?.overrides,...t?.overrides},wrapperProps:{...r?.wrapperProps,...t?.wrapperProps,...n}}),[r,t,n]),a=e??``;return x.useMemo(()=>wc(a,i),[a,i])},Ec={generalConditionsContainer:`_generalConditionsContainer_55hjg_1`,generalConditions:`_generalConditions_55hjg_1`,generalConditionsHeader:`_generalConditionsHeader_55hjg_15`,generalConditionsBody:`_generalConditionsBody_55hjg_26`,generalConditionsAccept:`_generalConditionsAccept_55hjg_35`},Dc=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),X=o(((e,t)=>{t.exports=Dc()}))(),Oc=()=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1rem`,height:`1rem`,fill:`currentColor`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`})}),kc=()=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1rem`,height:`1rem`,fill:`currentColor`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z`})}),Ac=`general-conditions.header`,jc=`general-conditions.body`,Mc=`general-conditions.accept-conditions-note`,Nc=()=>{let e=B(),[t,n]=(0,x.useState)(!1),r=()=>n(!t),i=e=>{e.key===`ArrowDown`||e.key===`ArrowRight`?n(!0):e.key===`ArrowUp`||e.key===`ArrowLeft`||e.key===`Escape`?n(!1):(e.key===`Enter`||e.key===`Space`||e.key===` `)&&r()},a=e(Ac),o=e(Mc);return(0,X.jsxs)(`div`,{className:R(Ec.generalConditionsContainer,`chat__generalConditions`),children:[!!a?.length&&(0,X.jsxs)(`div`,{className:Ec.generalConditions,children:[(0,X.jsxs)(`div`,{role:`button`,onClick:r,onKeyDown:i,tabIndex:0,className:R(Ec.generalConditionsHeader,`chat__generalConditions__header`),"aria-controls":`general-conditions-body`,"aria-expanded":t?`true`:`false`,"aria-pressed":t?`true`:`false`,children:[(0,X.jsx)(Tc,{children:a}),t?(0,X.jsx)(kc,{}):(0,X.jsx)(Oc,{})]}),(0,X.jsx)(`div`,{className:R(Ec.generalConditionsBody,`chat__generalConditions__body`),id:`general-conditions-body`,role:`region`,tabIndex:-1,children:t&&(0,X.jsx)(Tc,{children:e(jc)||``})})]}),!!o?.length&&(0,X.jsx)(`div`,{className:R(Ec.generalConditionsAccept,`chat__generalConditions__accept`),tabIndex:0,children:(0,X.jsx)(Tc,{children:e(Mc)||``})})]})},Z={messageContainer:`_messageContainer_1rxi5_1`,message:`_message_1rxi5_1`,messageBot:`_messageBot_1rxi5_14`,messageBotLast:`_messageBotLast_1rxi5_45`,avatar:`_avatar_1rxi5_45`,messageBotFirst:`_messageBotFirst_1rxi5_54`,messageBotAnimated:`_messageBotAnimated_1rxi5_67`,fadeInLeft:`_fadeInLeft_1rxi5_1`,messageGuest:`_messageGuest_1rxi5_78`,messageGuestFirst:`_messageGuestFirst_1rxi5_84`,messageGuestLast:`_messageGuestLast_1rxi5_90`,botAvatar:`_botAvatar_1rxi5_104`,agentAvatar:`_agentAvatar_1rxi5_108`,bubble:`_bubble_1rxi5_112`,bubbleContent:`_bubbleContent_1rxi5_118`,bubbleLeft:`_bubbleLeft_1rxi5_132`,leftText:`_leftText_1rxi5_143`,bubbleRight:`_bubbleRight_1rxi5_150`,rightText:`_rightText_1rxi5_160`,sourceInfoReference:`_sourceInfoReference_1rxi5_192`,sourceInfoReferenceActive:`_sourceInfoReferenceActive_1rxi5_204`},Pc=(e,t)=>{(0,x.useEffect)(()=>{let n=n=>{e.current&&!e.current.contains(n.target)&&t()};return document.addEventListener(`mousedown`,n),()=>document.removeEventListener(`mousedown`,n)},[e,t])};function Fc(e,t){let n=null,r=null,i=(...i)=>{r=i,n&&clearTimeout(n),n=setTimeout(()=>{e(...r),n=null,r=null},t)};return i.flush=()=>{n&&r&&(clearTimeout(n),e(...r),n=null,r=null)},i}function Ic(e,t){let n=0,r=null;return((...i)=>{let a=Date.now(),o=a-n;o>=t?(n=a,e(...i)):(r&&clearTimeout(r),r=setTimeout(()=>{n=Date.now(),e(...i)},t-o))})}var Lc={container:`_container_131ib_1`,categoryContainer:`_categoryContainer_131ib_13`,categoryButton:`_categoryButton_131ib_20`,active:`_active_131ib_35`,commentTextarea:`_commentTextarea_131ib_44`},Rc=(e,t,n)=>{(0,x.useEffect)(()=>{if(e){let e=()=>{let e=[`button:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`,`a[href]`,`input:not([disabled])`,`select:not([disabled])`].join(`,`),r=t.current?Array.from(t.current.querySelectorAll(e)):[],i=n.current?Array.from(n.current.querySelectorAll(e)):[];return[...r,...i]},r=t=>{if(t.key===`Tab`){let n=e();if(n.length>0){let e=n[0],r=n[n.length-1],i=document.activeElement;!t.shiftKey&&i===r?(t.preventDefault(),e.focus()):t.shiftKey&&i===e&&(t.preventDefault(),r.focus())}}};return document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`keydown`,r,!0)}}},[e,t,n])},zc=({open:e,actionsRef:t,reaction:n,onReaction:r})=>{let i=B(),a=(0,x.useRef)(null),o=Fc(e=>{r({...n,comment:e})},300);(0,x.useEffect)(()=>()=>o.flush(),[o]),Rc(e,t,a);let s=e=>{r({...n,category:n.category===e?void 0:e})};return e?(0,X.jsxs)(`div`,{ref:a,className:Lc.container,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`bad-reaction-title`,children:[(0,X.jsx)(`h2`,{id:`bad-reaction-title`,children:i(`bot-bubble.reaction.say-more`)}),(0,X.jsx)(`div`,{className:Lc.categoryContainer,role:`radiogroup`,children:[`WRONG_INFORMATION`,`MISSING_INFORMATION`,`OLD_INFORMATION`,`UNCLEAR`,`OFF_TOPIC`].map(e=>(0,X.jsx)(`button`,{className:R(Lc.categoryButton,n?.category===e&&Lc.active),onClick:()=>s(e),"aria-pressed":n?.category===e,"aria-label":i(`bot-bubble.reaction.category.${e}`),tabIndex:0,role:`radio`,children:i(`bot-bubble.reaction.category.${e}`)},e))}),(0,X.jsx)(`textarea`,{id:`comment`,name:`comment`,placeholder:i(`bot-bubble.reaction.comment`),defaultValue:n?.comment,onChange:e=>o(e.target.value),className:Lc.commentTextarea,rows:3,"aria-label":i(`bot-bubble.reaction.comment`)})]}):null},Bc={botMessageActionContainer:`_botMessageActionContainer_g6hpe_1`,alwaysVisible:`_alwaysVisible_g6hpe_15`,active:`_active_g6hpe_19`,botMessageActionInnerContainer:`_botMessageActionInnerContainer_g6hpe_27`,header:`_header_g6hpe_52`,botMessageActions:`_botMessageActions_g6hpe_57`,reported:`_reported_g6hpe_68`,action:`_action_g6hpe_72`,anyReport:`_anyReport_g6hpe_120`,closeButton:`_closeButton_g6hpe_136`},Vc=({isSubmitting:e,onClick:t})=>{let n=B();return(0,X.jsx)(`button`,{className:R(Bc.action,Bc.closeButton,`tooltip--bottom-left`),"aria-label":n(`bot-bubble.reaction.close`),"data-title":n(`bot-bubble.reaction.close`),tabIndex:0,onClick:t,children:(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:e?(0,X.jsx)(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}):(0,X.jsx)(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`})})})},Hc=({alwaysVisible:e,senderType:t,reaction:n,botMessageRef:r,message:i,onReaction:a})=>{let o=B(),[s,c]=(0,x.useState)(!1),[l,u]=(0,x.useState)(!1),[d,f]=(0,x.useState)(!1),p=(0,x.useRef)(null),m=(0,x.useRef)(null);Pc(p,()=>{f(!1)});let h=e=>{e.key===`Escape`&&f(!1)};(0,x.useEffect)(()=>(document.addEventListener(`keydown`,h),()=>{document.removeEventListener(`keydown`,h)}),[]),(0,x.useEffect)(()=>{d&&p.current?.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`nearest`})},[d]);let g=e=>{m.current&&clearTimeout(m.current),u(!0),a(e),m.current=setTimeout(()=>{u(!1)},1e3)},_=(0,x.useCallback)(async()=>{if(r.current)try{c(!0);let e=r.current.innerHTML,t=r.current.innerText;await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([t],{type:`text/plain`})})]),await new Promise(e=>setTimeout(e,1500))}finally{c(!1)}},[r]),v=()=>{f(!1),a(n?.type===`GOOD`?null:{type:`GOOD`})},y=()=>{a({...i.reaction,type:`BAD`}),f(!d)},b=e=>t=>{(t.key===`Enter`||t.key===` `)&&e()};return(0,X.jsx)(`div`,{ref:p,className:R(Bc.botMessageActionContainer,e&&Bc.alwaysVisible,d&&Bc.active),"aria-hidden":`true`,children:(0,X.jsxs)(`div`,{className:R(Bc.botMessageActionInnerContainer,e&&Bc.alwaysVisible,d&&Bc.active,n&&Bc.reported),role:`group`,"aria-label":o(`bot-bubble.actions.label`),children:[(0,X.jsxs)(`div`,{className:Bc.header,children:[(0,X.jsxs)(`div`,{className:R(Bc.botMessageActions,n&&Bc.reported),children:[t===na.BOT&&(0,X.jsx)(`button`,{className:R(Bc.action,n?.type&&Bc.anyReport,n?.type===`GOOD`&&Bc.reported,`tooltip--top-right`),tabIndex:0,"aria-label":o(n?.type===`GOOD`?`bot-bubble.reaction.remove`:`bot-bubble.reaction.good`),"aria-pressed":n?.type===`GOOD`,"data-title":o(n?.type===`GOOD`?`bot-bubble.reaction.remove`:`bot-bubble.reaction.good`),onPointerDown:v,onKeyDown:b(v),children:(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:n?.type===`GOOD`?(0,X.jsx)(`path`,{d:`M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32Z`}):(0,X.jsx)(`path`,{d:`M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z`})})}),t===na.BOT&&(0,X.jsx)(`button`,{className:R(Bc.action,n?.type&&Bc.anyReport,n?.type===`BAD`&&Bc.reported,`tooltip--top-right`),tabIndex:0,"aria-label":o(`bot-bubble.reaction.bad`),"aria-pressed":n?.type===`BAD`,"data-title":o(`bot-bubble.reaction.bad`),onPointerDown:y,onKeyDown:b(y),children:(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:n?.type===`BAD`?(0,X.jsx)(`path`,{d:`M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Z`}):(0,X.jsx)(`path`,{d:`M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z`})})}),(0,X.jsx)(`button`,{className:R(Bc.action,`tooltip--top-right`),style:{visibility:d?`hidden`:`visible`},tabIndex:0,"aria-label":o(`bot-bubble.copy`),"data-title":o(`bot-bubble.copy`),onClick:_,children:(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:s?(0,X.jsx)(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}):(0,X.jsx)(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`})})})]}),d&&(0,X.jsx)(Vc,{isSubmitting:l,onClick:()=>f(!1)})]}),i.reaction&&(0,X.jsx)(zc,{open:d,actionsRef:p,reaction:i.reaction,onReaction:g})]})})},Uc=(0,x.forwardRef)(({message:e,isAnimated:t,isLastMessage:n,isFirstMessageBySender:r,isLastMessageBySender:i,children:a,onReaction:o},s)=>{let c=B(),l=(0,x.useRef)(null),u=e.sender.type===z.BOT;return(0,X.jsxs)(`li`,{ref:s,className:R(Z.message,Z.messageBot,n&&Z.lastMessage,r&&Z.messageBotFirst,i&&Z.messageBotLast,`chat__bubbleContainer`,t&&Z.messageBotAnimated,t&&`chat__bubbleContainer--animated`,u?`chat__botBubbleContainer`:`chat__agentBubbleContainer`,r&&`chat__bubbleContainer--first`,i&&`chat__bubbleContainer--last`),role:`article`,children:[(0,X.jsx)(`img`,{className:R(Z.avatar,u?Z.botAvatar:Z.agentAvatar,`chat__avatar`,u?`chat__botAvatar`:`chat__agentAvatar`),src:`${e.sender.avatar}`,alt:u?`Bot`:`Agent`,referrerPolicy:`no-referrer`,"aria-hidden":`true`}),(0,X.jsxs)(`div`,{className:Z.messageContainer,children:[(0,X.jsx)(`div`,{ref:l,className:R(Z.bubble,Z.bubbleLeft,`chat__bubble`,u?`chat__botBubble`:`chat__agentBubble`),tabIndex:0,role:`group`,"aria-label":c(u?`bot-bubble.label`:`agent-bubble.label`),children:(0,X.jsx)(`div`,{className:R(Z.leftText),children:a})}),o&&(0,X.jsx)(Hc,{alwaysVisible:n&&i,senderType:e.sender.type,reaction:e.reaction,message:e,botMessageRef:l,onReaction:o})]})]})}),Wc={sourceList:`_sourceList_1sc0q_1`,source:`_source_1sc0q_1`,label:`_label_1sc0q_39`},Gc=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,...e,children:(0,X.jsx)(`path`,{d:`M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z`})}),Kc=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,...e,children:(0,X.jsx)(`path`,{d:`M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z`})}),qc=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,...e,children:(0,X.jsx)(`path`,{d:`M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z`})}),Jc=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,...e,children:(0,X.jsx)(`path`,{d:`M222,152a6,6,0,0,1-6,6H190v20h18a6,6,0,0,1,0,12H190v18a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h32A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm84,8a34,34,0,0,1-34,34H112a6,6,0,0,1-6-6V152a6,6,0,0,1,6-6h16A34,34,0,0,1,162,180Zm-12,0a22,22,0,0,0-22-22H118v44h10A22,22,0,0,0,150,180ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z`})}),Yc=({type:e,...t})=>{switch(e){case`WEBSITE`:return(0,X.jsx)(Gc,{...t});case`PDF`:return(0,X.jsx)(Jc,{...t});case`DOCX`:return(0,X.jsx)(Kc,{...t});default:return(0,X.jsx)(qc,{...t})}},Xc=({sources:e,onLinkClick:t})=>{let n=B(),r=e=>()=>{t(e.url)},i=e=>n=>{(n.key===`Enter`||n.key===` `)&&t(e.url)};return e.length?(0,X.jsx)(`ul`,{className:Wc.sourceList,"aria-label":n(`bot-bubble.sources`),children:e.map(e=>(0,X.jsx)(`li`,{className:Wc.source,children:(0,X.jsxs)(`a`,{role:`button`,tabIndex:0,"aria-label":`${n(`bot-bubble.source.open`)}: ${e.label}`,onClick:r(e),onKeyDown:i(e),children:[(0,X.jsx)(Yc,{type:e.type,"aria-hidden":`true`}),(0,X.jsx)(`div`,{className:Wc.label,children:e.label})]})},e.url))}):null},Zc={button:`_button_3ui4g_1`,buttonDefault:`_buttonDefault_3ui4g_13`,buttonPrimary:`_buttonPrimary_3ui4g_28`},Qc=({className:e,children:t,...n})=>(0,X.jsx)(`button`,{className:R(Zc.button,e),type:`button`,role:`button`,...n,children:t}),$c={title:`_title_137pi_1`,buttons:`_buttons_137pi_6`,button:`_button_137pi_6`,imageContainer:`_imageContainer_137pi_29`,image:`_image_137pi_29`,video_container:`_video_container_137pi_44`,video:`_video_137pi_44`,only:`_only_137pi_58`},el=({buttons:e,onButtonClick:t})=>(0,X.jsx)(`div`,{className:R($c.buttons,`chat__bubbleButtons`),children:e.map((e,n)=>(0,X.jsx)(Qc,{className:R($c.button,`chat__bubbleButton`),onClick:()=>t(e),children:e.title},n))}),tl=`newtab#`,nl=({markdown:e,markdownOptions:t={},onLinkClick:n})=>{let r=e=>t=>(t.preventDefault(),e&&n(e),!1),i=({title:e,href:t,children:n})=>t.indexOf(tl)===0?(0,X.jsx)(`a`,{href:t.slice(7),title:e,target:`_blank`,rel:`noopener noreferrer`,children:n}):(0,X.jsx)(`a`,{onClick:r(t),title:e,href:t,children:n});return(0,X.jsx)(Tc,{options:{...t,overrides:{a:i}},children:e})},rl=({text:e,onLinkClick:t})=>e?(0,X.jsx)(`div`,{children:(0,X.jsx)(nl,{markdown:e,onLinkClick:t})}):null,il=({title:e})=>e?(0,X.jsx)(`h1`,{className:$c.title,children:e}):null,al=({title:e,text:t,buttons:n,onButtonClick:r,onLinkClick:i})=>e?.length||t?.length||n?.length?(0,X.jsxs)(`div`,{className:R(Z.bubbleContent),children:[(0,X.jsx)(il,{title:e}),(0,X.jsx)(rl,{text:t,onLinkClick:i}),(0,X.jsx)(el,{buttons:n,onButtonClick:r})]}):null,ol=({alt:e,imageUrl:t,itemUrl:n,hasBody:r})=>t?n?n.indexOf(`youtube.com`)>-1?(0,X.jsx)(`div`,{className:$c.video_container,children:(0,X.jsx)(`iframe`,{className:R($c.video,{[$c.only]:!r}),title:`Youtube`,width:`100%`,src:n+`?rel=0`,frameBorder:`0`,allowFullScreen:!0})}):(0,X.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,children:(0,X.jsx)(`div`,{className:$c.imageContainer,children:(0,X.jsx)(`img`,{className:R($c.image,{[$c.only]:!r}),src:t,alt:e})})}):(0,X.jsx)(`div`,{className:$c.imageContainer,children:(0,X.jsx)(`img`,{className:R($c.image,{[$c.only]:!r}),src:t,alt:e})}):null,sl=({title:e,text:t,imageUrl:n,itemUrl:r,buttons:i,sources:a,onButtonClick:o,onLinkClick:s})=>{let c=!!e?.length||!!t?.length||!!i?.length;return(0,X.jsxs)(`div`,{className:R($c.detailMessage),children:[(0,X.jsx)(ol,{hasBody:c,imageUrl:n,itemUrl:r,alt:e||``}),c&&(0,X.jsx)(al,{title:e,text:t,buttons:i,onLinkClick:s,onButtonClick:o}),(0,X.jsx)(Xc,{sources:a,onLinkClick:s})]})},cl=(0,x.forwardRef)(({isFirstMessageBySender:e,isLastMessageBySender:t,children:n},r)=>{let i=B();return(0,X.jsx)(`li`,{ref:r,className:R(Z.message,Z.messageGuest,e&&Z.messageGuestFirst,t&&Z.messageGuestLast,`chat__bubbleContainer`,`chat__guestBubbleContainer`,e&&`chat__bubbleContainer--first`,t&&`chat__bubbleContainer--last`),role:`article`,children:(0,X.jsx)(`div`,{className:R(Z.bubble,Z.bubbleRight,`chat__bubble`,`chat__guestBubble`),tabIndex:0,role:`group`,"aria-label":i(`guest-bubble.label`),children:(0,X.jsx)(`div`,{className:R(Z.rightText),children:n})})})}),ll=()=>(0,x.useMemo)(()=>Qt(),[]),ul={markdown:`_markdown_nw7vg_1`},dl=`source-info-reference`,fl=({actionId:e,markdown:t,sources:n,onLinkClick:r})=>{let i=ll(),a=$i(),o=pl(),s=ea(e=>{let t=e.chat.sourceInfos;if(t?.type===`loaded`||t?.type===`loading`)return t.chunkId}),c=t=>n=>{let r=n.key;(r===`ArrowDown`||r===`ArrowRight`||r===`Enter`||r===` `||r===`Space`)&&(n.stopPropagation(),a(Mi(i,e,t)))},l=t=>()=>{a(Mi(i,e,t))};return(0,x.useLayoutEffect)(()=>{document.querySelectorAll(`.${dl}`).forEach(e=>{let t=e.previousSibling;t&&t.nodeType===Node.TEXT_NODE&&t.textContent?.endsWith(` `)&&t.textContent?.trim().length&&e.classList.add(`${dl}--before-space`);let n=e.nextSibling;n&&n.nodeType===Node.TEXT_NODE&&n.textContent?.startsWith(` `)&&n.textContent?.trim().length&&e.classList.add(`${dl}--after-space`)})},[t]),(0,X.jsxs)(`div`,{className:Z.bubbleContent,children:[(0,X.jsx)(`div`,{className:ul.markdown,children:(0,X.jsx)(nl,{markdown:t,onLinkClick:r,markdownOptions:{renderRule(e,t,n,r){if(t.type===J.footnoteReference){let e=t.text===s;return(0,X.jsx)(`span`,{className:R(Z.sourceInfoReference,e&&Z.sourceInfoReferenceActive,dl),children:(0,X.jsx)(`a`,{type:`button`,tabIndex:0,onClick:l(t.text),onKeyDown:c(t.text),children:o(t.text)})},r.key)}return e()}}})}),(0,X.jsx)(Xc,{sources:n,onLinkClick:r})]})},pl=()=>{let e=[];return t=>{let n=e.indexOf(t);return n>-1?n+1:(e.push(t),e.length)}},ml={text:`_text_gp0s0_1`,command:`_command_gp0s0_5`},hl=({text:e,commands:t=[]})=>{let n=t.find(t=>e.startsWith(`/${t}`)),r=n?e.slice(n.length+1):e;return(0,X.jsxs)(`div`,{children:[n&&(0,X.jsxs)(`code`,{className:ml.command,children:[`/`,n]}),r.split(`
59
59
  `).map((e,t)=>(0,X.jsxs)(`span`,{className:ml.text,children:[e,(0,X.jsx)(`br`,{})]},t))]})},gl=({text:e,commands:t,sources:n,onLinkClick:r})=>(0,X.jsxs)(`div`,{className:Z.bubbleContent,children:[(0,X.jsx)(hl,{text:e,commands:t}),(0,X.jsx)(Xc,{sources:n,onLinkClick:r})]}),_l=(0,x.forwardRef)(({message:e,commands:t,isLastMessage:n,isFirstMessageBySender:r,isLastMessageBySender:i,onReaction:a,onButtonClick:o,onLinkClick:s},c)=>{let l=vl(e._id,e,t,o,s),u=t=>{a(e._id,t)};switch(e.sender.type){case z.GUEST:return(0,X.jsx)(cl,{ref:c,isFirstMessageBySender:r,isLastMessageBySender:i,children:l});default:return(0,X.jsx)(Uc,{ref:c,message:e,isAnimated:!1,isLastMessage:n,isFirstMessageBySender:r,isLastMessageBySender:i,onReaction:u,children:l})}}),vl=(e,t,n,r,i)=>{switch(t.type){case st.TEXT:return(0,X.jsx)(gl,{text:t.text,commands:n,sources:t.sources||[],onLinkClick:i});case st.DETAIL:{let e=t;return(0,X.jsx)(sl,{title:e.title,text:e.text,imageUrl:e.imageUrl,itemUrl:e.itemUrl,buttons:e.buttons,sources:t.sources||[],onButtonClick:r,onLinkClick:i})}case st.MARKDOWN:{let n=t;return(0,X.jsx)(fl,{actionId:e,markdown:n.markdown,sources:n.sources||[],onLinkClick:i})}}},yl=x.memo(_l,(e,t)=>e.message._id===t.message._id&&e.message.reaction===t.message.reaction&&e.isLastMessage===t.isLastMessage&&e.isFirstMessageBySender===t.isFirstMessageBySender&&e.isLastMessageBySender===t.isLastMessageBySender),bl={ticontainer:`_ticontainer_xg0dn_1`,tiblock:`_tiblock_xg0dn_5`,tidot:`_tidot_xg0dn_12`,mercuryTypingAnimation:`_mercuryTypingAnimation_xg0dn_1`},xl=({isTyping:e=!1})=>(0,X.jsx)(`div`,{className:bl.ticontainer,children:(0,X.jsx)(`div`,{className:bl.tiblock,children:e?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{className:R(bl.tidot,`chat__typingIndicator`),"aria-hidden":`true`}),(0,X.jsx)(`div`,{className:R(bl.tidot,`chat__typingIndicator`),"aria-hidden":`true`}),(0,X.jsx)(`div`,{className:R(bl.tidot,`chat__typingIndicator`),"aria-hidden":`true`})]}):null})}),Sl=Object.assign({_id:`typing-indicator`},new ft(``,new lt)),Cl=({messages:e,isBotTyping:t,commands:n,onTranscriptItemReaction:r,onButtonClick:i,onLinkClick:a})=>{let o=B(),s=(0,x.useRef)(0),c=(0,x.useRef)(!0),l=(0,x.useRef)(null),u=(0,x.useRef)(null),d=(0,x.useRef)(null),f=ea(e=>e.settings.enableGeneralConditions);(0,x.useLayoutEffect)(()=>{if(e.length&&l.current&&(s.current<e.length||t)){if(u.current){let e=u.current.offsetTop;l.current.scrollTop=e}else if(d.current){let e=d.current.offsetTop;l.current.scrollTop=e}c.current&&=!1,s.current=e.length}},[e,c,t]);let p,m=e.length;return(0,X.jsxs)(`div`,{ref:l,className:R(ia.messageContainer,`chat__messageContainer`),style:{scrollBehavior:e.length&&c.current?`auto`:`smooth`},id:`MessageContainer`,"aria-label":o(`conversation.label`),children:[f&&(0,X.jsx)(Nc,{}),(0,X.jsxs)(`ul`,{className:ia.messages,role:`list`,children:[e.map((o,s)=>{let c=wl(o,p),l=Tl(o,s,e,t);p=o.sender.type;let u=s+1===m,f=o._id||`added-${s}`;return(0,X.jsx)(yl,{ref:u?d:null,message:o,commands:n,isLastMessage:u,isFirstMessageBySender:c,isLastMessageBySender:l,onButtonClick:i,onLinkClick:a,onReaction:r},f)}),t&&(0,X.jsx)(Uc,{ref:u,message:Sl,isLastMessage:!1,isAnimated:!0,isFirstMessageBySender:p!==z.BOT,isLastMessageBySender:!0,children:(0,X.jsx)(xl,{isTyping:!0})},`last`)]})]})},wl=(e,t)=>!t||t!==e.sender.type,Tl=(e,t,n,r)=>{let i=e.sender.type,a=n.length;return t+1===a?!(i===z.BOT&&r):i!==n.at(t+1)?.sender.type},El={bottomSheet:`_bottomSheet_jp8dl_1`,bottomSheetOpen:`_bottomSheetOpen_jp8dl_15`,"slide-in":`_slide-in_jp8dl_1`,bottomSheetClose:`_bottomSheetClose_jp8dl_20`,"slide-out":`_slide-out_jp8dl_1`},Dl={container:`_container_xc2nx_1`},Ol=({contentUrl:e})=>{let t=ea(e=>e.connection.sessionId),[n,r]=(0,x.useState)(!1);(0,x.useEffect)(()=>{r(t=>t||!!e)},[e]);let i=(0,x.useMemo)(()=>{if(e&&t){let n=new URL(e,document.baseURI);return n.searchParams.set(`sessionId`,t),n.toString()}else return},[e,t]);return(0,X.jsx)(`div`,{className:R(Dl.container,El.bottomSheet,{[El.bottomSheetOpen]:!!e,[El.bottomSheetClose]:n&&!e}),children:i&&(0,X.jsx)(`iframe`,{title:`Drawer`,id:`form-drawer`,src:i,className:Dl.iframe})})},kl={container:`_container_1634s_1`},Al=({title:e,href:t,children:n})=>(0,X.jsx)(`a`,{href:t,title:e,target:`_blank`,rel:`noopener noreferrer`,children:n}),jl=()=>{let e=B()(`powered-by`);return e&&e.length?(0,X.jsx)(`div`,{className:R(kl.container,`chat__poweredBy`),children:(0,X.jsx)(Tc,{options:{overrides:{a:Al}},children:e})}):null},Ml=(e,t)=>{let n=new Map,r=0;return e.replace(/^#{1,6}\s+/gm,``).replace(/(\*\*|__)(.*?)\1/g,`$2`).replace(/(\*|_)(.*?)\1/g,`$2`).replace(/\[([^\]]+)\]\([^)]+\)/g,`$1`).replace(/\[\^([^\]]+)\]/g,(e,i)=>(n.has(i)||n.set(i,++r),`(${t} ${n.get(i)})`)).replace(/`([^`]+)`/g,`$1`).replace(/```[\s\S]*?```/g,``).replace(/^>\s+/gm,``).replace(/^(-{3,}|_{3,}|\*{3,})$/gm,``).replace(/^[\s]*[-*+]\s+/gm,``).replace(/^[\s]*\d+\.\s+/gm,``).replace(/\n{3,}/g,`
60
60
 
61
61
  `).trim()},Nl=({messages:e,isBotTyping:t})=>{let n=(0,x.useRef)(``),r=B(),i=r(`bot-bubble.footnote`),a=e=>{switch(e.type){case`TEXT`:return e.text||``;case`MARKDOWN`:return Ml(e.markdown||``,i);case`DETAIL`:return e.text||e.title||``;default:return``}},o=(()=>{if(t)return r(`chatbot.typing`)??`Chatbot is typing`;let n=[...e].reverse().find(e=>e.sender.type===na.BOT);return n?a(n):``})();return(0,x.useEffect)(()=>{o!==n.current&&(n.current=o)},[o]),(0,X.jsx)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`sr-only`,children:o})},Pl=({className:e,children:t,...n})=>(0,X.jsx)(Qc,{className:R(Zc.buttonDefault,e),type:`button`,...n,children:t}),Q=({className:e,children:t,...n})=>(0,X.jsx)(Qc,{className:R(Zc.buttonPrimary,e),...n,children:t}),$={container:`_container_h23mk_1`,formContainer:`_formContainer_h23mk_17`,emailInput:`_emailInput_h23mk_22`,description:`_description_h23mk_52`,actions:`_actions_h23mk_57`,validationError:`_validationError_h23mk_67`,submitted:`_submitted_h23mk_74`},Fl=({visible:e,onEmailExport:t,onClose:n})=>{let r=B(),[i,a]=(0,x.useState)(void 0),[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(void 0),u=(0,x.useRef)(null);(0,x.useEffect)(()=>{e?(u.current?.focus(),s(!1),a(e)):i===!0&&a(!1)},[e,i]);let d=e=>{e.preventDefault(),c&&c.length>0&&(t(c),s(!0),setTimeout(n,3*1e3))},f=e=>{let t=e.target.value.trim();l(/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(t)?t:``)};return(0,X.jsxs)(`div`,{className:R($.container,El.bottomSheet,{[El.bottomSheetOpen]:i===!0,[El.bottomSheetClose]:i===!1}),children:[(0,X.jsx)(`h2`,{children:r(`export-transcript.email.title`)}),(0,X.jsx)(Tc,{className:$.description,children:r(`export-transcript.email.description`)||``}),(0,X.jsxs)(`form`,{onSubmit:d,className:$.formContainer,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`input`,{disabled:o,ref:u,type:`email`,placeholder:r(`export-transcript.email.placeholder`),className:$.emailInput,onChange:f}),c?.length===0?(0,X.jsx)(`div`,{className:$.validationError,children:r(`export-transcript.email.invalid`)}):null]}),(0,X.jsxs)(`div`,{className:$.actions,children:[(0,X.jsx)(Pl,{onClick:n,children:r(`export-transcript.email.cancel`)}),(0,X.jsx)(Q,{type:`submit`,disabled:o||c===void 0||c.length===0,children:r(`export-transcript.email.send`)})]})]}),o&&(0,X.jsx)(`div`,{className:$.submitted,children:r(`export-transcript.email.success`)})]})},Il={inputContainer:`_inputContainer_fi5ao_1`},Ll={blockUserInput:`_blockUserInput_pot9c_1`,"append-animate":`_append-animate_pot9c_1`},Rl=({visible:e})=>{let t=B();return e?(0,X.jsx)(`div`,{className:R(Ll.blockUserInput,`chat__blockUserInput`),children:t(`block-user-input.title`)}):null},zl={commandsDropdown:`_commandsDropdown_fmklx_1`,commands:`_commands_fmklx_1`,command:`_command_fmklx_1`,commandActive:`_commandActive_fmklx_49`},Bl=(e,t,n,r,i)=>{(0,x.useEffect)(()=>{let a=a=>{if(e.length)switch(a.key){case`Enter`:n(e[t]);break;case`ArrowUp`:r(t=>t>0?t-1:e.length-1);break;case`ArrowDown`:r(t=>t<e.length-1?t+1:0);break;case`Escape`:i([]);break;default:break}};return document.addEventListener(`keydown`,a),()=>{document.removeEventListener(`keydown`,a)}},[e,t,n,r,i])},Vl=({text:e,commands:t,onSelectCommand:n,onVisibilityChange:r})=>{let i=(0,x.useRef)(null),a=B(),[o,s]=(0,x.useState)([]),[c,l]=(0,x.useState)(Hl(t)),[u,d]=(0,x.useState)(0),f=e=>n(`/${e}`);return Pc(i,()=>s([])),Bl(o,u,f,d,s),(0,x.useEffect)(()=>{l(Hl(t))},[t]),(0,x.useEffect)(()=>{let n=e.length||0;n===0||n>c||!e.startsWith(`/`)?s([]):s(t.filter(Ul(e))),d(0)},[t,e,c]),(0,x.useEffect)(()=>{r(!!o.length)},[o,r]),o.length?(0,X.jsx)(`div`,{ref:i,className:zl.commandsDropdown,children:(0,X.jsx)(`ul`,{id:`command-list`,className:zl.commands,role:`listbox`,children:o.map((e,t)=>(0,X.jsxs)(`li`,{className:R([zl.command,u===t&&zl.commandActive]),role:`option`,onClick:()=>f(e),onMouseOver:()=>d(t),children:[(0,X.jsxs)(`h1`,{children:[`/`,e]}),(0,X.jsx)(`p`,{children:a(`commands.${e}`)})]},e))})}):null},Hl=e=>Math.max(...e.map(e=>e.length+1)),Ul=e=>t=>{let n=`/${t}`;return n.startsWith(e)&&n.length>=e.length},Wl={callToActionContainer:`_callToActionContainer_d8izj_1`,"append-animate":`_append-animate_d8izj_1`,callToActionTitle:`_callToActionTitle_d8izj_23`,rateOverlay:`_rateOverlay_d8izj_30`,body:`_body_d8izj_52`,footer:`_footer_d8izj_60`,actions:`_actions_d8izj_75`,bubbles:`_bubbles_d8izj_89`,rateFeedbackBotBubble:`_rateFeedbackBotBubble_d8izj_118`,rateFeedbackGuestBubble:`_rateFeedbackGuestBubble_d8izj_124`,avatar:`_avatar_d8izj_130`,fadeInLeft:`_fadeInLeft_d8izj_1`,bubble:`_bubble_d8izj_89`,appear:`_appear_d8izj_1`,botBubble:`_botBubble_d8izj_156`,guestBubble:`_guestBubble_d8izj_167`,rateText:`_rateText_d8izj_186`,stars:`_stars_d8izj_191`,starsSmall:`_starsSmall_d8izj_205`,starsLarge:`_starsLarge_d8izj_211`,star:`_star_d8izj_191`,starReadonly:`_starReadonly_d8izj_225`,starIcon:`_starIcon_d8izj_235`,starsDescriptionContainer:`_starsDescriptionContainer_d8izj_253`,starsDescription:`_starsDescription_d8izj_253`},Gl=({value:e,index:t,count:n,readonly:r,onHover:i,onClick:a})=>{let o=e=>{a&&e.key===`Enter`&&a()};return(0,X.jsx)(`li`,{className:R(Wl.star,{[Wl.starReadonly]:r},`chat__conversationRating__star`),children:(0,X.jsx)(`div`,{role:`radio`,"aria-checked":e>t?`true`:`false`,"aria-posinset":t+1,"aria-setsize":n,tabIndex:0,onMouseOver:i,onKeyDown:o,onClick:a,children:(0,X.jsx)(`span`,{role:`img`,"aria-label":`Star`,className:R(Wl.starIcon),children:(0,X.jsx)(`svg`,{viewBox:`64 64 896 896`,focusable:`false`,"data-icon":`star`,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`,children:(0,X.jsx)(`path`,{d:`M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z`})})})})})},Kl=5,ql=({value:e,size:t,readonly:n=!1,onChange:r})=>{let[i,a]=(0,x.useState)(void 0),o=()=>{a(void 0)},s=e=>()=>{n||a(e+1)},c=t=>()=>{r&&!n&&(r(t===0&&e===1?0:t+1),a(void 0))};return(0,X.jsx)(`ul`,{tabIndex:0,role:`radiogroup`,className:R(Wl.stars,{[Wl.starsSmall]:t===`small`,[Wl.starsLarge]:t===`large`},`chat__conversationRating__stars`,{chat__conversationRating__stars__small:t===`small`,chat__conversationRating__stars__large:t===`large`}),onMouseOut:o,children:Array(Kl).fill(0).map((t,r)=>(0,X.jsx)(Gl,{value:i===void 0?e:i,index:r,count:Kl,readonly:n,onHover:s(r),onClick:c(r)},r))})},Jl=({visible:e,onRate:t})=>{let n=B();return e?(0,X.jsxs)(`div`,{className:R(Wl.callToActionContainer,`chat__conversationRating__callToAction`),children:[(0,X.jsx)(`div`,{className:R(Wl.callToActionTitle,`chat__conversationRating__callToAction__title`),children:n(`conversation-rating.call-to-action.title`)}),(0,X.jsx)(ql,{value:0,size:`small`,onChange:t})]}):null},Yl=({isFirstMessageBySender:e,isLastMessageBySender:t,children:n})=>(0,X.jsxs)(`div`,{className:R(Z.message,Z.messageBot,e&&Z.messageBotFirst,t&&Z.messageBotLast,`chat__bubbleContainer`,`chat__botBubbleContainer`,e&&`chat__bubbleContainer--first`,t&&`chat__bubbleContainer--last`),children:[(0,X.jsx)(`img`,{className:R(Z.avatar,Z.botAvatar),src:`bot.svg`,alt:`Bot`}),(0,X.jsx)(`div`,{className:R(Z.bubble,Z.bubbleLeft,`chat__bubble`,`chat__botBubble`),children:(0,X.jsx)(`div`,{className:R(Z.leftText,Z.bubbleContent),children:n})})]}),Xl=({children:e})=>(0,X.jsx)(`div`,{className:R(Z.message,Z.messageGuest,Z.messageGuestFirst,Z.messageGuestLast,`chat__bubbleContainer`,`chat__guestBubbleContainer`,`chat__bubbleContainer--first`,`chat__bubbleContainer--last`),children:(0,X.jsx)(`div`,{className:R(Z.bubble,Z.bubbleRight,`chat__bubble`,`chat__guestBubble`),children:(0,X.jsx)(`div`,{className:R(Z.rightText,Z.bubbleContent),children:e})})}),Zl=()=>{let e=B(),t=$i(),n=ea(e=>e.chat.conversationRating),[r,i]=(0,x.useState)(n.rating?.value||0),[a,o]=(0,x.useState)(void 0),[s,c]=(0,x.useState)(void 0),[l,u]=(0,x.useState)({submitted:!1,feedback:``}),d=(0,x.useRef)(null),[f,p]=(0,x.useState)(!1);(0,x.useEffect)(()=>{n.opener?(u({submitted:!1,feedback:``}),c(!0)):s===!0&&c(!1)},[n.opener,s]),(0,x.useEffect)(()=>{i(n.rating?.value||0)},[n.rating?.value,n.opener]),(0,x.useEffect)(()=>{d.current&&(d.current.value=n.rating?.feedback||``)},[n.rating?.feedback]),(0,x.useEffect)(()=>{let t=r>0?e(`conversation-rating.overlay.bot-message.rate-feedback.value-${r}`):void 0;o(t?.length?t:void 0)},[r,e]),(0,x.useEffect)(()=>{l.submitted?setTimeout(()=>p(!0),l.feedback.length?500:0):p(!1)},[l]);let m=e=>{e.preventDefault();let n=d.current?.value?.trim()||``;t(Pt(r,n)),u({submitted:!0,feedback:n})},h=()=>{n.opener===`CLOSE_CHAT`?t(Di()):n.opener===`RESTART_CHAT`?t(Zi()):t(ji())};return(0,X.jsx)(`div`,{className:R(Wl.rateOverlay,El.bottomSheet,`chat__conversationRating__overlay`,{[El.bottomSheetOpen]:s===!0,[El.bottomSheetClose]:s===!1}),children:(0,X.jsxs)(`form`,{onSubmit:m,children:[(0,X.jsxs)(`div`,{className:R(Wl.body,`chat__conversationRating__overlay__body`),children:[(0,X.jsx)(`div`,{}),(0,X.jsx)(`div`,{className:R(Wl.bubbles),children:n.opener&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(Yl,{isFirstMessageBySender:!0,isLastMessageBySender:!a,children:[(0,X.jsx)(`h2`,{children:e(`conversation-rating.overlay.title`)}),(0,X.jsxs)(`div`,{className:R(Wl.starsDescriptionContainer),children:[(0,X.jsx)(ql,{value:r,size:`large`,readonly:l.submitted,onChange:i}),(0,X.jsxs)(`div`,{className:R(Wl.starsDescription),children:[(0,X.jsx)(`div`,{children:e(`conversation-rating.overlay.star.very-bad`)}),(0,X.jsx)(`div`,{children:e(`conversation-rating.overlay.star.very-good`)})]})]})]}),a&&(0,X.jsx)(Yl,{isFirstMessageBySender:!1,isLastMessageBySender:!f||!!l.feedback.length,children:(0,X.jsx)(`div`,{children:a})}),!!l.feedback.length&&(0,X.jsx)(Xl,{children:l.feedback}),f&&(0,X.jsx)(Yl,{isFirstMessageBySender:!!l.feedback.length,isLastMessageBySender:!0,children:(0,X.jsx)(`div`,{children:e(`conversation-rating.overlay.bot-message.submit-feedback`)})})]})})]}),(0,X.jsxs)(`div`,{className:R(Wl.footer,`chat__conversationRating__overlay__footer`),children:[!l.submitted&&(0,X.jsx)(`input`,{ref:d,defaultValue:n.rating?.feedback||``,placeholder:e(`conversation-rating.overlay.guest-feedback.input-placeholder`)}),(0,X.jsxs)(`div`,{className:R(Wl.actions,`chat__conversationRating__overlay__footer__actions`),children:[l.submitted?(0,X.jsx)(Q,{type:`button`,disabled:!r,onClick:h,children:n.opener===`CLOSE_CHAT`?e(`conversation-rating.overlay.action.close-chat`):n.opener===`RESTART_CHAT`?e(`conversation-rating.overlay.action.restart-chat`):e(`conversation-rating.overlay.action.back-to-chat`)},`close-button`):(0,X.jsx)(Q,{type:`submit`,disabled:!r,children:e(`conversation-rating.overlay.action.submit`)},`submit-button`),n.opener!==`CHAT`&&!l.submitted&&(0,X.jsx)(Pl,{onClick:h,children:n.opener===`CLOSE_CHAT`?e(`conversation-rating.overlay.action.close-chat`):n.opener===`RESTART_CHAT`?e(`conversation-rating.overlay.action.restart-chat`):e(`conversation-rating.overlay.action.cancel`)})]})]})]})})},Ql=(0,x.memo)(({numberOfMessagesFromGuest:e})=>{let t=$i(),n=ea(e=>e.chat.conversationRating),r=e=>{t(Ai(`CHAT`,e))},i=!n.rating?.value&&e>=1;return n.enabled?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Jl,{visible:i,onRate:r}),(0,X.jsx)(Zl,{})]}):null}),$l={inputWrapper:`_inputWrapper_18j9q_1`,withOpenCommands:`_withOpenCommands_18j9q_13`,actions:`_actions_18j9q_18`,messageInputWrapper:`_messageInputWrapper_18j9q_53`,messageInput:`_messageInput_18j9q_53`,buttons:`_buttons_18j9q_78`,button:`_button_18j9q_78`},eu={audioRecorder:`_audioRecorder_g845f_1`,audioButton:`_audioButton_g845f_6`,recorderIcon:`_recorderIcon_g845f_37`,pulse:`_pulse_g845f_1`,spinning:`_spinning_g845f_60`,spin:`_spin_g845f_60`},tu=2048,nu=16e3,ru=class extends x.Component{audioInput=null;volume=null;leftchannel=[];recorder=null;recordingLength=0;sampleRate=null;mediaStream=null;constructor(e){super(e),this.state={recordingState:`none`},this.triggerAudioRecording=this.triggerAudioRecording.bind(this),this.triggerAudioRecordingSuccess=this.triggerAudioRecordingSuccess.bind(this),this.initRecording=this.initRecording.bind(this),this.processRecordingInput=this.processRecordingInput.bind(this),this.handleClickSubmitAudio=this.handleClickSubmitAudio.bind(this),this.handleClickStopAudio=this.handleClickStopAudio.bind(this)}triggerAudioRecording(){this.setState({recordingState:`connecting`}),navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(this.triggerAudioRecordingSuccess)}triggerAudioRecordingSuccess(e){this.mediaStream=e,this.leftchannel.length=0,this.recordingLength=0,this.initRecording(e)}initRecording(e){let t=new(window.AudioContext||window.webkitAudioContext);this.sampleRate=t.sampleRate,this.volume=t.createGain(),this.audioInput=t.createMediaStreamSource(e),this.audioInput.connect(this.volume),this.recorder=t.createScriptProcessor(tu,1,1),this.recorder.onaudioprocess=this.processRecordingInput,this.volume.connect(this.recorder),this.recorder.connect(t.destination)}processRecordingInput(e){if(this.state.recordingState===`connecting`&&this.setState({recordingState:`recording`}),this.state.recordingState!==`none`){let t=e.inputBuffer.getChannelData(0);this.leftchannel.push(new Float32Array(t)),this.recordingLength+=tu}}handleClickSubmitAudio(){let e=iu(su(ou(this.leftchannel,this.recordingLength),this.sampleRate||0));this.props.onAudioRecorded(e),this.handleClickStopAudio()}handleClickStopAudio(){this.setState({recordingState:`none`}),this.audioInput?.disconnect(),this.volume?.disconnect(),this.recorder?.disconnect(),this.mediaStream&&this.mediaStream?.getAudioTracks().forEach(e=>{e.stop()})}render(){return(0,X.jsxs)(`div`,{className:eu.audioRecorder,children:[this.state.recordingState===`none`&&(0,X.jsx)(`button`,{className:R(eu.audioButton,`chat__button`),type:`submit`,"aria-label":this.props.translate(`message-input.actions.start-audio-recording.label`),"data-title":this.props.translate(`message-input.actions.start-audio-recording.label`),tabIndex:0,onClick:this.triggerAudioRecording,children:(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,children:[(0,X.jsx)(`path`,{d:`M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z`}),(0,X.jsx)(`path`,{d:`M0 0h24v24H0z`,fill:`none`})]})}),this.state.recordingState===`connecting`&&(0,X.jsxs)(`svg`,{className:eu.spinning,xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,children:[(0,X.jsx)(`path`,{d:`M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z`}),(0,X.jsx)(`path`,{d:`M0 0h24v24H0z`,fill:`none`})]}),this.state.recordingState===`recording`&&(0,X.jsxs)(`div`,{className:eu.audioRecorder,children:[(0,X.jsx)(`button`,{className:R(eu.audioButton),onClick:this.handleClickStopAudio,"aria-label":this.props.translate(`message-input.actions.stop-audio-recording.label`),tabIndex:0,children:(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,children:[(0,X.jsx)(`path`,{d:`M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),(0,X.jsx)(`path`,{d:`M0 0h24v24H0z`,fill:`none`})]})}),(0,X.jsx)(`div`,{className:eu.recorderIcon}),(0,X.jsx)(`button`,{className:R(eu.audioButton),type:`submit`,onClick:this.handleClickSubmitAudio,"aria-label":this.props.translate(`message-input.actions.submit-audio-recording.label`),tabIndex:0,autoFocus:!0,children:(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,children:[(0,X.jsx)(`path`,{d:`M0 0h24v24H0z`,fill:`none`}),(0,X.jsx)(`path`,{d:`M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`})]})})]})]})}},iu=e=>{let t=new ArrayBuffer(44+e.length*2),n=new DataView(t);au(n,0,`RIFF`),n.setUint32(4,44+e.length*2,!0),au(n,8,`WAVE`),au(n,12,`fmt `),n.setUint32(16,16,!0),n.setUint16(20,1,!0),n.setUint16(22,1,!0),n.setUint32(24,nu,!0),n.setUint32(28,nu*4,!0),n.setUint16(32,4,!0),n.setUint16(34,16,!0),au(n,36,`data`),n.setUint32(40,e.length*2,!0);let r=e.length,i=44;for(let t=0;t<r;t++)n.setInt16(i,e[t]*(32767*1),!0),i+=2;return new Blob([n],{type:`audio/wav`})},au=(e,t,n)=>{for(let r=0;r<n.length;r++)e.setUint8(t+r,n.charCodeAt(r))},ou=(e,t)=>{let n=new Float32Array(t),r=0,i=e.length;for(let t=0;t<i;t++){let i=e[t];n.set(i,r),r+=i.length}return n},su=(e,t)=>{if(nu===t)return e;let n=t/nu,r=Math.round(e.length/n),i=new Float32Array(r),a=0,o=0;for(;a<i.length;){let t=Math.round((a+1)*n),r=0,s=0;for(let n=o;n<t&&n<e.length;n++)r+=e[n],s++;i[a]=r/s,a++,o=t}return i},cu=({onClick:e})=>{let t=B();return(0,X.jsxs)(`button`,{onClick:e,type:`button`,"aria-label":t(`message-input.actions.command.label`),children:[(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`32`,height:`32`,fill:`#000000`,viewBox:`0 0 256 256`,children:[(0,X.jsx)(`rect`,{x:`32`,y:`32`,width:`192`,height:`192`,rx:`16`,ry:`16`,fill:`none`,stroke:`currentColor`,"stroke-width":`16`}),(0,X.jsx)(`line`,{x1:`80`,y1:`176`,x2:`176`,y2:`80`,stroke:`currentColor`,"stroke-width":`16`,"stroke-linecap":`round`})]}),(0,X.jsx)(`span`,{children:t(`message-input.actions.command.label`)})]})},lu=({disabled:e,textInput:t,commandsVisible:n,hasCommands:r,onTextInput:i,onTextInputSubmit:a,onAudioRecorded:o})=>{let s=B(),c=(0,x.useRef)(null),l=(0,x.useRef)(0),{enableSpeechSupport:u}=ea(e=>e.settings),d=e=>{e.style.height=``;let{scrollHeight:t}=e,n=Math.max(l.current,Math.min(t,150));e.style.height=`${n}px`,e.style.overflowY=t>150?`auto`:`hidden`};(0,x.useEffect)(()=>{let e=c.current;e&&(l.current===0&&(l.current=e.scrollHeight),d(e),e.focus())},[t]);let f=()=>{let e=c.current;e&&t.trim().length>=1&&a(t.trim())&&(e.value=``,e.style.height=``,e.focus())};return(0,X.jsxs)(`form`,{className:R($l.inputWrapper,n&&$l.withOpenCommands,`chat__textInput`),onSubmit:e=>{e.preventDefault(),f()},children:[(0,X.jsxs)(`div`,{className:$l.messageInputWrapper,children:[(0,X.jsx)(`textarea`,{id:`user_input`,ref:c,className:$l.messageInput,tabIndex:0,placeholder:s(`message-input-placeholder`),value:t,onChange:e=>{let t=e.target.value;i(t),d(e.target)},onKeyDown:e=>{e.code===`Enter`&&!e.shiftKey?(e.repeat||f(),e.preventDefault()):n&&(e.code===`ArrowUp`||e.code===`ArrowDown`)&&e.preventDefault()},"aria-label":s(`message-input-label`),"aria-controls":r?`command-list`:void 0,"aria-haspopup":r?`listbox`:void 0}),r&&(0,X.jsx)(`div`,{className:$l.actions,children:(0,X.jsx)(cu,{onClick:()=>{t.startsWith(`/`)?i(``):i(`/`)}})})]}),(0,X.jsx)(`div`,{className:R($l.buttons,`chat__buttons`),children:t.length||!u||navigator.mediaDevices===void 0?(0,X.jsx)(`button`,{className:R($l.button,`chat__button`),type:`submit`,"aria-label":s(`message-input.actions.submit.label`),"data-title":s(`message-input.actions.submit.label`),tabIndex:0,disabled:e,children:(0,X.jsx)(`svg`,{viewBox:`64 64 896 896`,focusable:`false`,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`,children:(0,X.jsx)(`path`,{d:`M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z`})})}):u&&navigator.mediaDevices!==void 0&&(0,X.jsx)(ru,{translate:s,onAudioRecorded:o})})]})},uu={quickReplies:`_quickReplies_83npe_1`,quickReply:`_quickReply_83npe_9`},du=({quickReplies:e,onQuickReplyClick:t})=>e.length?(0,X.jsx)(`div`,{className:R(uu.quickReplies,`chat__quickReplies`),children:e.map(e=>(0,X.jsx)(Qc,{tabIndex:0,className:R(uu.quickReply,`chat__button`,`chat__quickReply`),onClick:()=>t(e),children:e.label},e.label))}):null,fu=5e3,pu=1e3,mu=({isBotTyping:e,quickReplies:t,numberOfMessagesFromGuest:n,commands:r,onTextInput:i,onQuickReplyClick:a,onAudioRecorded:o})=>{let[s,c]=(0,x.useState)(``),[l,u]=(0,x.useState)(!1),[d,f]=(0,x.useState)(!1),p=(0,x.useRef)(0),m=(0,x.useRef)(0);return(0,x.useEffect)(()=>{if(l&&!e){let e=p.current?Date.now()-p.current:0;e>fu?u(!1):setTimeout(()=>{u(!1)},fu-e)}},[l,e]),(0,x.useEffect)(()=>{l&&(p.current=Date.now())},[l]),(0,X.jsxs)(`div`,{className:R(Il.inputContainer),children:[(0,X.jsx)(du,{quickReplies:t,onQuickReplyClick:a}),(0,X.jsx)(Rl,{visible:l}),!l&&(0,X.jsx)(Ql,{numberOfMessagesFromGuest:n}),!!r?.length&&(0,X.jsx)(Vl,{text:s,commands:r,onSelectCommand:e=>{c(e+` `)},onVisibilityChange:f}),(0,X.jsx)(lu,{textInput:s,disabled:l,commandsVisible:d,hasCommands:!!r?.length,onTextInput:c,onTextInputSubmit:t=>{let n=Date.now()-m.current<pu;return d?!1:e||n?(u(!0),!1):(i(t),c(``),m.current=Date.now(),!0)},onAudioRecorded:o})]})},hu=Ge(e=>{let{messages:t,quickReplies:n,isBotTyping:r,drawerContentUrl:i}=e.chat;return{messages:t,quickReplies:n,isBotTyping:r,drawerContentUrl:i}},e=>({onRestartChat:()=>e(Zi()),onMessageFromUser:t=>e(ht(t)),onAudioRecorded:t=>e(kt(t)),onActionFromUser:t=>e(t),onQuickReplyClick:t=>e(mt(t)),onNluEvent:t=>e(Ft(t)),onButtonClick:t=>e(Lt(t)),onLinkClick:t=>e(Rt(t)),onTranscriptExport:t=>e(jt(t)),onTranscriptItemReaction:(t,n)=>{e(pt.transcriptItemGuestReaction(t,n?.type||null,n?.category,n?.comment))}}))(({clientName:e,messages:t,quickReplies:n,isBotTyping:r,drawerContentUrl:i,onMessageFromUser:a,onQuickReplyClick:o,onButtonClick:s,onLinkClick:c,onAudioRecorded:l,onTranscriptExport:u,onTranscriptItemReaction:d})=>{let f=$i(),p=ea(e=>e.connection.connectionState),{enableTranscriptExportEmail:m,commands:h}=ea(e=>e.settings),{showTranscriptMailOverlay:g,conversationRating:_}=ea(e=>e.chat),v=t.filter(e=>e.sender.type===na.GUEST).length;return(0,x.useEffect)(()=>{p===ta.CONNECTED&&f(Xi(e))},[e,p,f]),(0,X.jsxs)(`div`,{className:ra.container,children:[(0,X.jsx)(Nl,{messages:t,isBotTyping:r}),(0,X.jsxs)(`div`,{className:R([ra.chatcontent,(g||_?.opener)&&ra.accessabilityHidden]),children:[(0,X.jsx)(Cl,{messages:t,isBotTyping:r,commands:h,onButtonClick:s,onLinkClick:c,onTranscriptItemReaction:d}),(0,X.jsx)(mu,{isBotTyping:r,quickReplies:r?[]:n,numberOfMessagesFromGuest:v,commands:h,onQuickReplyClick:o,onTextInput:a,onAudioRecorded:l}),(0,X.jsx)(jl,{})]}),m&&(0,X.jsx)(Fl,{visible:!!g,onEmailExport:u,onClose:()=>{f(ki())}}),(0,X.jsx)(Ol,{contentUrl:i})]})}),gu=()=>(0,x.useMemo)(()=>{try{return window.self!==window.top}catch{return!0}},[]),_u=e=>t=>{let n=t.key;(n===`ArrowDown`||n===`ArrowRight`||n===`Enter`||n===` `||n===`Space`)&&(t.stopPropagation(),e())},vu=({onClick:e})=>{let t=B();return gu()?(0,X.jsx)(`button`,{className:`tooltip--bottom-left`,"aria-label":t(`header.close-chat`),"data-title":t(`header.close-chat`),tabIndex:0,onClick:e,onKeyDown:_u(e),children:(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z`})})}):null},yu={header:`_header_3gvbz_1`,logoContainer:`_logoContainer_3gvbz_14`,logo:`_logo_3gvbz_14`,actions:`_actions_3gvbz_28`,active:`_active_3gvbz_43`,menuContainer:`_menuContainer_3gvbz_56`,menu:`_menu_3gvbz_56`,divider:`_divider_3gvbz_86`},bu=({icon:e})=>{switch(e){case`arrow-counter-clockwise`:return(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z`})});case`download`:return(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z`})});case`expand`:return(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M214,48V96a6,6,0,0,1-12,0V62.48l-53.76,53.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM107.76,139.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l53.76-53.76a6,6,0,0,0-8.48-8.48Z`})});case`mail`:return(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z`})});case`phone`:return(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M144.27,45.93a8,8,0,0,1,9.8-5.66,86.22,86.22,0,0,1,61.66,61.66,8,8,0,0,1-5.66,9.8A8.23,8.23,0,0,1,208,112a8,8,0,0,1-7.73-5.94,70.35,70.35,0,0,0-50.33-50.33A8,8,0,0,1,144.27,45.93Zm-2.33,41.8c13.79,3.68,22.65,12.54,26.33,26.33A8,8,0,0,0,176,120a8.23,8.23,0,0,0,2.07-.27,8,8,0,0,0,5.66-9.8c-5.12-19.16-18.5-32.54-37.66-37.66a8,8,0,1,0-4.13,15.46Zm81.94,95.35A56.26,56.26,0,0,1,168,232C88.6,232,24,167.4,24,88A56.26,56.26,0,0,1,72.92,32.12a16,16,0,0,1,16.62,9.52l21.12,47.15,0,.12A16,16,0,0,1,109.39,104c-.18.27-.37.52-.57.77L88,129.45c7.49,15.22,23.41,31,38.83,38.51l24.34-20.71a8.12,8.12,0,0,1,.75-.56,16,16,0,0,1,15.17-1.4l.13.06,47.11,21.11A16,16,0,0,1,223.88,183.08Zm-15.88-2s-.07,0-.11,0h0l-47-21.05-24.35,20.71a8.44,8.44,0,0,1-.74.56,16,16,0,0,1-15.75,1.14c-18.73-9.05-37.4-27.58-46.46-46.11a16,16,0,0,1,1-15.7,6.13,6.13,0,0,1,.57-.77L96,95.15l-21-47a.61.61,0,0,1,0-.12A40.2,40.2,0,0,0,40,88,128.14,128.14,0,0,0,168,216,40.21,40.21,0,0,0,208,181.07Z`})});case`scroll`:return(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M96,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H104A8,8,0,0,1,96,104Zm8,40h64a8,8,0,0,0,0-16H104a8,8,0,0,0,0,16Zm128,48a32,32,0,0,1-32,32H88a32,32,0,0,1-32-32V64a16,16,0,0,0-32,0c0,5.74,4.83,9.62,4.88,9.66h0A8,8,0,0,1,24,88a7.89,7.89,0,0,1-4.79-1.61h0C18.05,85.54,8,77.61,8,64A32,32,0,0,1,40,32H176a32,32,0,0,1,32,32V168h8a8,8,0,0,1,4.8,1.6C222,170.46,232,178.39,232,192ZM96.26,173.48A8.07,8.07,0,0,1,104,168h88V64a16,16,0,0,0-16-16H67.69A31.71,31.71,0,0,1,72,64V192a16,16,0,0,0,32,0c0-5.74-4.83-9.62-4.88-9.66A7.82,7.82,0,0,1,96.26,173.48ZM216,192a12.58,12.58,0,0,0-3.23-8h-94a26.92,26.92,0,0,1,1.21,8,31.82,31.82,0,0,1-4.29,16H200A16,16,0,0,0,216,192Z`})});case`star`:return(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z`})});case`link`:return(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z`})});default:return(0,X.jsx)(`div`,{})}},xu=(0,x.forwardRef)(({selected:e,item:t,onClick:n},r)=>{let i=B();return(0,X.jsx)(`li`,{"aria-selected":e,role:`option`,className:t.withDivider?yu.divider:void 0,children:(0,X.jsxs)(`a`,{ref:r,type:`button`,role:`button`,tabIndex:-1,onClick:e=>{e.preventDefault(),n()},children:[(0,X.jsx)(bu,{icon:t.icon}),(0,X.jsx)(`span`,{children:i(`header.menu.${t.id}`)})]})})}),Su=(e,t)=>{let n=gu(),{menuItems:r,enableStandaloneView:i,enableTranscriptExportPdf:a,enableTranscriptExportEmail:o}=ea(e=>e.settings),s=ea(e=>e.chat.conversationRating.enabled);return(0,x.useMemo)(()=>{let c=[],l=r.filter(({visibility:t})=>e?t===`always`||t===`chat-only`:t===`always`||t===`start-screen-only`);if(e&&(c.push({id:`restart-chat`,type:`restart-chat`,icon:`arrow-counter-clockwise`,visibility:`chat-only`}),n&&i&&c.push({id:`expand-chat-window`,type:`expand-chat-window`,icon:`expand`,visibility:`always`}),t&&a&&c.push({id:`download-transcript`,type:`download-transcript`,icon:`download`,visibility:`chat-only`}),t&&o&&c.push({id:`send-transcript`,type:`send-transcript`,icon:`mail`,visibility:`chat-only`}),t&&s&&c.push({id:`rate-conversation`,type:`rate-conversation`,icon:`star`,visibility:`chat-only`}),c.length>0&&l.length)){let e=c.pop();e&&r.length&&c.push({...e,withDivider:!0})}return c.push(...l),c},[e,t,a,o,i,s,n,r])},Cu=({chatStarted:e,hasGuestMessages:t})=>{let n=$i(),r=B(),{enabled:i,opener:a}=ea(e=>e.chat.conversationRating),[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(-1),u=(0,x.useRef)(null),d=(0,x.useRef)(null),f=(0,x.useRef)([]),p=Su(e,t);(0,x.useEffect)(()=>{f.current[c]?.focus()},[c]);let m=(0,x.useCallback)(()=>{n(t&&i&&!a?Ai(`RESTART_CHAT`):Zi()),s(!1),l(0)},[t,i,a,n]),h=(0,x.useCallback)(e=>{switch(e.type){case`restart-chat`:m();break;case`expand-chat-window`:{let e=new URL(window.location.origin);e.pathname=window.location.pathname,e.search=window.location.search,e.hash=window.location.hash,window.open(e.href,`_blank`);break}case`download-transcript`:n(Mt());break;case`send-transcript`:n(ki());break;case`rate-conversation`:n(Ai(`MENU`));break;case`link`:n(Rt(e.url));break;case`action`:n(JSON.parse(JSON.stringify(e.action)));break;default:break}s(!1)},[n,m,s]);return(0,x.useEffect)(()=>{let e=e=>{if(o)switch(e.key){case`Enter`:e.preventDefault(),h(p[c]);break;case`ArrowUp`:l(e=>e>0?e-1:p.length-1);break;case`ArrowDown`:l(e=>e<p.length-1?e+1:0);break;case`Escape`:s(!1);break;case`Tab`:c>-1&&s(!1);break;default:break}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[o,c,p,l,s,h]),(0,x.useEffect)(()=>{o||l(-1)},[o,c]),Pc(d,()=>s(!1)),p.length?(0,X.jsxs)(`div`,{className:R(yu.menuContainer),ref:d,children:[(0,X.jsx)(`button`,{ref:u,className:R(o&&yu.active,o?`tooltip-hidden`:`tooltip--bottom-left`),"aria-label":r(`header.menu.title`),"data-title":r(`header.menu.title`),onClick:()=>{s(e=>!e)},onBlur:()=>{setTimeout(()=>{let e=document.activeElement;d.current&&!d.current.contains(e)&&s(!1)},0)},children:(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`})})}),o&&(0,X.jsx)(`nav`,{className:yu.menu,"aria-label":r(`header.menu.title`),children:(0,X.jsx)(`ul`,{tabIndex:0,children:p.map((e,t)=>(0,X.jsx)(xu,{ref:e=>{f.current[t]=e},selected:c===t,item:e,onClick:()=>h(e)},e.id))})})]}):null},wu=({className:e,chatStarted:t,...n})=>{let r=$i(),i=ea(e=>e.chat.conversationRating),a=ea(e=>e.chat.messages.some(e=>e.sender.type===z.GUEST)),o=()=>{i.enabled&&!i.opener&&a?r(Ai(`CLOSE_CHAT`)):r(Di())};return(0,X.jsxs)(`div`,{className:R(yu.header,e),...n,children:[(0,X.jsx)(`div`,{className:yu.logoContainer,children:(0,X.jsx)(`div`,{className:yu.logo})}),(0,X.jsxs)(`div`,{className:yu.actions,children:[(0,X.jsx)(Cu,{chatStarted:t,hasGuestMessages:a}),(0,X.jsx)(vu,{onClick:o})]})]})},Tu={chatwindow:`_chatwindow_rkbir_1`,chatwindowWithAside:`_chatwindowWithAside_rkbir_21`},Eu=()=>{let[e,t]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{let e=window.matchMedia(`(max-width: 1023px)`),n=()=>t(e.matches);return n(),e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),e},Du={sourceInfos:`_sourceInfos_vei0l_1`,waitForLoading:`_waitForLoading_vei0l_24`,loadingContent:`_loadingContent_vei0l_28`,sourceHeader:`_sourceHeader_vei0l_37`,sourceHeaderIcon:`_sourceHeaderIcon_vei0l_57`,sourceContent:`_sourceContent_vei0l_61`,openSourceButton:`_openSourceButton_vei0l_69`,sourceButtonLabel:`_sourceButtonLabel_vei0l_79`,closeSourceInfosButton:`_closeSourceInfosButton_vei0l_101`,loadingSourceInfos:`_loadingSourceInfos_vei0l_125`,loading:`_loading_vei0l_28`,rotate:`_rotate_vei0l_1`,loadingError:`_loadingError_vei0l_139`,highlightLoadingInfo:`_highlightLoadingInfo_vei0l_155`,highlightLoadingInfoInnerContainer:`_highlightLoadingInfoInnerContainer_vei0l_169`,highlightLoadingInfoContent:`_highlightLoadingInfoContent_vei0l_178`,highlightLoadingInfoCloseIcon:`_highlightLoadingInfoCloseIcon_vei0l_198`,highlightLoader:`_highlightLoader_vei0l_203`,highlightLoaderLoading:`_highlightLoaderLoading_vei0l_210`,loadingAnim:`_loadingAnim_vei0l_1`},Ou=({onClick:e})=>{let t=B();return(0,X.jsx)(`button`,{className:R(Du.closeSourceInfosButton,`tooltip--bottom-left`),"aria-label":t(`source-infos.close`),"data-title":t(`source-infos.close`),tabIndex:0,onClick:e,children:(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`})})})},ku=(0,x.forwardRef)(({sourceInfos:e,onClose:t,...n},r)=>(0,X.jsxs)(`div`,{className:Du.sourceHeader,...n,ref:r,children:[(0,X.jsx)(`div`,{children:e?(0,X.jsx)(`p`,{id:`source-info-title`,children:e.title}):(0,X.jsx)(`p`,{children:`\xA0`})}),(0,X.jsx)(Ou,{onClick:t})]})),Au=({loading:e})=>(0,X.jsx)(`div`,{className:Du.highlightLoader,children:e&&(0,X.jsx)(`div`,{className:Du.highlightLoaderLoading})}),{entries:ju,setPrototypeOf:Mu,isFrozen:Nu,getPrototypeOf:Pu,getOwnPropertyDescriptor:Fu}=Object,{freeze:Iu,seal:Lu,create:Ru}=Object,{apply:zu,construct:Bu}=typeof Reflect<`u`&&Reflect;Iu||=function(e){return e},Lu||=function(e){return e},zu||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Bu||=function(e){return new e(...[...arguments].slice(1))};var Vu=td(Array.prototype.forEach),Hu=td(Array.prototype.lastIndexOf),Uu=td(Array.prototype.pop),Wu=td(Array.prototype.push),Gu=td(Array.prototype.splice),Ku=td(String.prototype.toLowerCase),qu=td(String.prototype.toString),Ju=td(String.prototype.match),Yu=td(String.prototype.replace),Xu=td(String.prototype.indexOf),Zu=td(String.prototype.trim),Qu=td(Object.prototype.hasOwnProperty),$u=td(RegExp.prototype.test),ed=nd(TypeError);function td(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return zu(e,t,n)}}function nd(e){return function(){return Bu(e,[...arguments])}}function rd(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ku;Mu&&Mu(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Nu(t)||(t[r]=e),i=e)}e[i]=!0}return e}function id(e){for(let t=0;t<e.length;t++)Qu(e,t)||(e[t]=null);return e}function ad(e){let t=Ru(null);for(let[n,r]of ju(e))Qu(e,n)&&(Array.isArray(r)?t[n]=id(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=ad(r):t[n]=r);return t}function od(e,t){for(;e!==null;){let n=Fu(e,t);if(n){if(n.get)return td(n.get);if(typeof n.value==`function`)return td(n.value)}e=Pu(e)}function n(){return null}return n}var sd=Iu(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),cd=Iu(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),ld=Iu([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),ud=Iu([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),dd=Iu(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),fd=Iu([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),pd=Iu([`#text`]),md=Iu(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),hd=Iu(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),gd=Iu(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),_d=Iu([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),vd=Lu(/\{\{[\w\W]*|[\w\W]*\}\}/gm),yd=Lu(/<%[\w\W]*|[\w\W]*%>/gm),bd=Lu(/\$\{[\w\W]*/gm),xd=Lu(/^data-[\-\w.\u00B7-\uFFFF]+$/),Sd=Lu(/^aria-[\-\w]+$/),Cd=Lu(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wd=Lu(/^(?:\w+script|data):/i),Td=Lu(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ed=Lu(/^html$/i),Dd=Lu(/^[a-z][.\w]*(-[.\w]+)+$/i),Od=Object.freeze({__proto__:null,ARIA_ATTR:Sd,ATTR_WHITESPACE:Td,CUSTOM_ELEMENT:Dd,DATA_ATTR:xd,DOCTYPE_NAME:Ed,ERB_EXPR:yd,IS_ALLOWED_URI:Cd,IS_SCRIPT_OR_DATA:wd,MUSTACHE_EXPR:vd,TMPLIT_EXPR:bd}),kd={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ad=function(){return typeof window>`u`?null:window},jd=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Md=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Nd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ad(),t=e=>Nd(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==kd.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=od(m,`cloneNode`),g=od(m,`remove`),_=od(m,`nextSibling`),v=od(m,`childNodes`),y=od(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,{implementation:S,createNodeIterator:C,createDocumentFragment:w,getElementsByTagName:T}=n,{importNode:E}=r,D=Md();t.isSupported=typeof ju==`function`&&typeof y==`function`&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:O,ERB_EXPR:ee,TMPLIT_EXPR:te,DATA_ATTR:ne,ARIA_ATTR:k,IS_SCRIPT_OR_DATA:re,ATTR_WHITESPACE:ie,CUSTOM_ELEMENT:ae}=Od,{IS_ALLOWED_URI:A}=Od,j=null,oe=rd({},[...sd,...cd,...ld,...dd,...pd]),M=null,se=rd({},[...md,...hd,...gd,..._d]),N=Object.seal(Ru(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),P=null,F=null,I=Object.seal(Ru(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ce=!0,le=!0,ue=!1,de=!0,fe=!1,L=!0,pe=!1,me=!1,he=!1,ge=!1,_e=!1,ve=!1,ye=!0,be=!1,xe=!0,Se=!1,Ce={},we=null,Te=rd({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Ee=null,De=rd({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Oe=null,ke=rd({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ae=`http://www.w3.org/1998/Math/MathML`,je=`http://www.w3.org/2000/svg`,Me=`http://www.w3.org/1999/xhtml`,Ne=Me,Pe=!1,Fe=null,Ie=rd({},[Ae,je,Me],qu),Le=rd({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Re=rd({},[`annotation-xml`]),ze=rd({},[`title`,`style`,`font`,`a`,`script`]),Be=null,Ve=[`application/xhtml+xml`,`text/html`],He=null,Ue=null,We=n.createElement(`form`),Ge=function(e){return e instanceof RegExp||e instanceof Function},Ke=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ue&&Ue===e)){if((!e||typeof e!=`object`)&&(e={}),e=ad(e),Be=Ve.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,He=Be===`application/xhtml+xml`?qu:Ku,j=Qu(e,`ALLOWED_TAGS`)?rd({},e.ALLOWED_TAGS,He):oe,M=Qu(e,`ALLOWED_ATTR`)?rd({},e.ALLOWED_ATTR,He):se,Fe=Qu(e,`ALLOWED_NAMESPACES`)?rd({},e.ALLOWED_NAMESPACES,qu):Ie,Oe=Qu(e,`ADD_URI_SAFE_ATTR`)?rd(ad(ke),e.ADD_URI_SAFE_ATTR,He):ke,Ee=Qu(e,`ADD_DATA_URI_TAGS`)?rd(ad(De),e.ADD_DATA_URI_TAGS,He):De,we=Qu(e,`FORBID_CONTENTS`)?rd({},e.FORBID_CONTENTS,He):Te,P=Qu(e,`FORBID_TAGS`)?rd({},e.FORBID_TAGS,He):ad({}),F=Qu(e,`FORBID_ATTR`)?rd({},e.FORBID_ATTR,He):ad({}),Ce=Qu(e,`USE_PROFILES`)?e.USE_PROFILES:!1,ce=e.ALLOW_ARIA_ATTR!==!1,le=e.ALLOW_DATA_ATTR!==!1,ue=e.ALLOW_UNKNOWN_PROTOCOLS||!1,de=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,fe=e.SAFE_FOR_TEMPLATES||!1,L=e.SAFE_FOR_XML!==!1,pe=e.WHOLE_DOCUMENT||!1,ge=e.RETURN_DOM||!1,_e=e.RETURN_DOM_FRAGMENT||!1,ve=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,ye=e.SANITIZE_DOM!==!1,be=e.SANITIZE_NAMED_PROPS||!1,xe=e.KEEP_CONTENT!==!1,Se=e.IN_PLACE||!1,A=e.ALLOWED_URI_REGEXP||Cd,Ne=e.NAMESPACE||Me,Le=e.MATHML_TEXT_INTEGRATION_POINTS||Le,Re=e.HTML_INTEGRATION_POINTS||Re,N=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ge(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(N.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ge(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(N.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(N.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),fe&&(le=!1),_e&&(ge=!0),Ce&&(j=rd({},pd),M=Ru(null),Ce.html===!0&&(rd(j,sd),rd(M,md)),Ce.svg===!0&&(rd(j,cd),rd(M,hd),rd(M,_d)),Ce.svgFilters===!0&&(rd(j,ld),rd(M,hd),rd(M,_d)),Ce.mathMl===!0&&(rd(j,dd),rd(M,gd),rd(M,_d))),Qu(e,`ADD_TAGS`)||(I.tagCheck=null),Qu(e,`ADD_ATTR`)||(I.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?I.tagCheck=e.ADD_TAGS:(j===oe&&(j=ad(j)),rd(j,e.ADD_TAGS,He))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?I.attributeCheck=e.ADD_ATTR:(M===se&&(M=ad(M)),rd(M,e.ADD_ATTR,He))),e.ADD_URI_SAFE_ATTR&&rd(Oe,e.ADD_URI_SAFE_ATTR,He),e.FORBID_CONTENTS&&(we===Te&&(we=ad(we)),rd(we,e.FORBID_CONTENTS,He)),e.ADD_FORBID_CONTENTS&&(we===Te&&(we=ad(we)),rd(we,e.ADD_FORBID_CONTENTS,He)),xe&&(j[`#text`]=!0),pe&&rd(j,[`html`,`head`,`body`]),j.table&&(rd(j,[`tbody`]),delete P.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ed(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ed(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=jd(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));Iu&&Iu(e),Ue=e}},qe=rd({},[...cd,...ld,...ud]),Je=rd({},[...dd,...fd]),Ye=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:Ne,tagName:`template`});let n=Ku(e.tagName),r=Ku(t.tagName);return Fe[e.namespaceURI]?e.namespaceURI===je?t.namespaceURI===Me?n===`svg`:t.namespaceURI===Ae?n===`svg`&&(r===`annotation-xml`||Le[r]):!!qe[n]:e.namespaceURI===Ae?t.namespaceURI===Me?n===`math`:t.namespaceURI===je?n===`math`&&Re[r]:!!Je[n]:e.namespaceURI===Me?t.namespaceURI===je&&!Re[r]||t.namespaceURI===Ae&&!Le[r]?!1:!Je[n]&&(ze[n]||!qe[n]):!!(Be===`application/xhtml+xml`&&Fe[e.namespaceURI]):!1},Xe=function(e){Wu(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},Ze=function(e,n){try{Wu(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{Wu(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(ge||_e)try{Xe(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Qe=function(e){let t=null,r=null;if(he)e=`<remove></remove>`+e;else{let t=Ju(e,/^[\r\n\t ]+/);r=t&&t[0]}Be===`application/xhtml+xml`&&Ne===Me&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(Ne===Me)try{t=new f().parseFromString(i,Be)}catch{}if(!t||!t.documentElement){t=S.createDocument(Ne,`template`,null);try{t.documentElement.innerHTML=Pe?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ne===Me?T.call(t,pe?`html`:`body`)[0]:pe?t.documentElement:a},$e=function(e){return C.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},et=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},tt=function(e){return typeof s==`function`&&e instanceof s};function nt(e,n,r){Vu(e,e=>{e.call(t,n,r,Ue)})}let rt=function(e){let n=null;if(nt(D.beforeSanitizeElements,e,null),et(e))return Xe(e),!0;let r=He(e.nodeName);if(nt(D.uponSanitizeElement,e,{tagName:r,allowedTags:j}),L&&e.hasChildNodes()&&!tt(e.firstElementChild)&&$u(/<[/\w!]/g,e.innerHTML)&&$u(/<[/\w!]/g,e.textContent)||e.nodeType===kd.progressingInstruction||L&&e.nodeType===kd.comment&&$u(/<[/\w]/g,e.data))return Xe(e),!0;if(!(I.tagCheck instanceof Function&&I.tagCheck(r))&&(!j[r]||P[r])){if(!P[r]&&it(r)&&(N.tagNameCheck instanceof RegExp&&$u(N.tagNameCheck,r)||N.tagNameCheck instanceof Function&&N.tagNameCheck(r)))return!1;if(xe&&!we[r]){let t=y(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,_(e))}}}return Xe(e),!0}return e instanceof c&&!Ye(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&$u(/<\/no(script|embed|frames)/i,e.innerHTML)?(Xe(e),!0):(fe&&e.nodeType===kd.text&&(n=e.textContent,Vu([O,ee,te],e=>{n=Yu(n,e,` `)}),e.textContent!==n&&(Wu(t.removed,{element:e.cloneNode()}),e.textContent=n)),nt(D.afterSanitizeElements,e,null),!1)},R=function(e,t,r){if(F[t]||ye&&(t===`id`||t===`name`)&&(r in n||r in We))return!1;if(!(le&&!F[t]&&$u(ne,t))&&!(ce&&$u(k,t))&&!(I.attributeCheck instanceof Function&&I.attributeCheck(t,e))){if(!M[t]||F[t]){if(!(it(e)&&(N.tagNameCheck instanceof RegExp&&$u(N.tagNameCheck,e)||N.tagNameCheck instanceof Function&&N.tagNameCheck(e))&&(N.attributeNameCheck instanceof RegExp&&$u(N.attributeNameCheck,t)||N.attributeNameCheck instanceof Function&&N.attributeNameCheck(t,e))||t===`is`&&N.allowCustomizedBuiltInElements&&(N.tagNameCheck instanceof RegExp&&$u(N.tagNameCheck,r)||N.tagNameCheck instanceof Function&&N.tagNameCheck(r))))return!1}else if(!Oe[t]&&!$u(A,Yu(r,ie,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Xu(r,`data:`)===0&&Ee[e])&&!(ue&&!$u(re,Yu(r,ie,``)))&&r)return!1}return!0},it=function(e){return e!==`annotation-xml`&&Ju(e,ae)},at=function(e){nt(D.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||et(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:M,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=He(a),l=s,u=a===`value`?l:Zu(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,nt(D.uponSanitizeAttribute,e,r),u=r.attrValue,be&&(c===`id`||c===`name`)&&(Ze(a,e),u=`user-content-`+u),L&&$u(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){Ze(a,e);continue}if(c===`attributename`&&Ju(u,`href`)){Ze(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Ze(a,e);continue}if(!de&&$u(/\/>/i,u)){Ze(a,e);continue}fe&&Vu([O,ee,te],e=>{u=Yu(u,e,` `)});let d=He(e.nodeName);if(!R(d,c,u)){Ze(a,e);continue}if(b&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=b.createHTML(u);break;case`TrustedScriptURL`:u=b.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),et(e)?Xe(e):Uu(t.removed)}catch{Ze(a,e)}}nt(D.afterSanitizeAttributes,e,null)},z=function e(t){let n=null,r=$e(t);for(nt(D.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)nt(D.uponSanitizeShadowNode,n,null),rt(n),at(n),n.content instanceof a&&e(n.content);nt(D.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(Pe=!e,Pe&&(e=`<!-->`),typeof e!=`string`&&!tt(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw ed(`dirty is not a string, aborting`)}else throw ed(`toString is not a function`);if(!t.isSupported)return e;if(me||Ke(n),t.removed=[],typeof e==`string`&&(Se=!1),Se){if(e.nodeName){let t=He(e.nodeName);if(!j[t]||P[t])throw ed(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=Qe(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===kd.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!ge&&!fe&&!pe&&e.indexOf(`<`)===-1)return b&&ve?b.createHTML(e):e;if(i=Qe(e),!i)return ge?null:ve?x:``}i&&he&&Xe(i.firstChild);let u=$e(Se?e:i);for(;c=u.nextNode();)rt(c),at(c),c.content instanceof a&&z(c.content);if(Se)return e;if(ge){if(_e)for(l=w.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(M.shadowroot||M.shadowrootmode)&&(l=E.call(r,l,!0)),l}let d=pe?i.outerHTML:i.innerHTML;return pe&&j[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&$u(Ed,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
62
- `+d),fe&&Vu([O,ee,te],e=>{d=Yu(d,e,` `)}),b&&ve?b.createHTML(d):d},t.setConfig=function(){Ke(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),me=!0},t.clearConfig=function(){Ue=null,me=!1},t.isValidAttribute=function(e,t,n){return Ue||Ke({}),R(He(e),He(t),n)},t.addHook=function(e,t){typeof t==`function`&&Wu(D[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=Hu(D[e],t);return n===-1?void 0:Gu(D[e],n,1)[0]}return Uu(D[e])},t.removeHooks=function(e){D[e]=[]},t.removeAllHooks=function(){D=Md()},t}var Pd=Nd(),Fd=({onClose:e})=>{let t=B();return(0,X.jsxs)(`div`,{className:Du.highlightLoadingInfo,onClick:e,children:[(0,X.jsx)(`div`,{className:Du.highlightLoadingInfoCloseIcon,children:(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`})})}),(0,X.jsxs)(`div`,{className:Du.highlightLoadingInfoInnerContainer,children:[(0,X.jsxs)(`div`,{className:Du.highlightLoadingInfoContent,children:[(0,X.jsx)(`h3`,{children:t(`source-infos.highlight-loading.title`)}),(0,X.jsx)(`p`,{children:t(`source-infos.highlight-loading.description`)})]}),(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#000000`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M253.66,106.34a8,8,0,0,0-11.32,0L192,156.69,107.31,72l50.35-50.34a8,8,0,1,0-11.32-11.32L96,60.69A16,16,0,0,0,93.18,79.5L72,100.69a16,16,0,0,0,0,22.62L76.69,128,18.34,186.34a8,8,0,0,0,3.13,13.25l72,24A7.88,7.88,0,0,0,96,224a8,8,0,0,0,5.66-2.34L136,187.31l4.69,4.69a16,16,0,0,0,22.62,0l21.19-21.18A16,16,0,0,0,203.31,168l50.35-50.34A8,8,0,0,0,253.66,106.34ZM93.84,206.85l-55-18.35L88,139.31,124.69,176ZM152,180.69,83.31,112,104,91.31,172.69,160Z`})})]})]})},Id=({title:e,href:t,children:n})=>(0,X.jsx)(`a`,{href:t,title:e,target:`_blank`,rel:`noopener noreferrer`,children:n}),Ld=({className:e,children:t,...n})=>(0,X.jsx)(`a`,{className:R(Zc.button,Zc.buttonDefault,e),type:`button`,role:`button`,...n,children:t}),Rd=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,...e,children:(0,X.jsx)(`path`,{d:`M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z`})}),zd=({type:e,...t})=>{switch(e){case`WEBSITE`:return(0,X.jsx)(Jc,{...t});case`PDF`:return(0,X.jsx)(qc,{...t});case`DOCX`:return(0,X.jsx)(Gc,{...t});case`TEXT`:return(0,X.jsx)(Rd,{...t});default:return(0,X.jsx)(Kc,{...t})}},Bd=({url:e,knowledgeBaseType:t})=>{let n=B();return(0,X.jsx)(Ld,{className:Du.openSourceButton,href:e,target:`_blank`,children:(0,X.jsxs)(`div`,{className:Du.sourceButtonLabel,children:[(0,X.jsx)(`div`,{className:Du.sourceHeaderIcon,children:(0,X.jsx)(zd,{type:t})}),(0,X.jsx)(`p`,{children:n(`source-infos.open-source`)})]})})},Vd=({sourceInfos:{content:e,url:t,knowledgeBaseType:n,highlighted:r}})=>{let[i,a]=(0,x.useState)(!r);(0,x.useEffect)(()=>{r&&a(!1)},[r]);let o=Pd.sanitize(e,{USE_PROFILES:{html:!0}});return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:R(Du.sourceContent,ul.markdown),children:[(0,X.jsx)(Tc,{options:{overrides:{a:Id}},children:o}),i&&(0,X.jsx)(Fd,{onClose:()=>a(!1)})]}),(0,X.jsx)(Bd,{url:t,knowledgeBaseType:n})]})},Hd=``+new URL(`undraw_fixing-bugs-D_eYxJc6.svg`,import.meta.url).href,Ud=()=>{let e=B();return(0,X.jsxs)(`div`,{className:Du.loadingError,children:[(0,X.jsx)(`h1`,{children:e(`source-infos.error.title`)}),(0,X.jsx)(`img`,{src:Hd,title:e(`source-infos.error.title`)}),(0,X.jsx)(`p`,{children:e(`source-infos.error.info`)})]})},Wd=()=>(0,X.jsx)(`div`,{className:Du.loadingSourceInfos,children:(0,X.jsx)(`svg`,{className:Du.loading,xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z`})})});function Gd({sourceInfos:e,onClose:t,threshold:n=100}){let r=(0,x.useRef)(null),[i,a]=(0,x.useState)(0),[o,s]=(0,x.useState)(!1),c=(0,x.useRef)(null),l=(0,x.useRef)(null),u=(0,x.useCallback)(e=>{c.current=e,s(!0)},[]),d=(0,x.useCallback)(e=>{if(c.current!==null&&o){let t=e-c.current;t>0&&a(t)}},[o]),f=(0,x.useCallback)(()=>{s(!1),i>n&&t(),a(0),c.current=null},[i,n,t]),p=(0,x.useCallback)(e=>{let t=e=>u(e.touches[0].clientY),n=e=>d(e.touches[0].clientY),r=()=>f(),i=e=>{e.preventDefault(),u(e.clientY),window.addEventListener(`mousemove`,a),window.addEventListener(`mouseup`,o)},a=e=>d(e.clientY),o=()=>{f(),window.removeEventListener(`mousemove`,a),window.removeEventListener(`mouseup`,o)};e.addEventListener(`touchstart`,t),e.addEventListener(`touchmove`,n),e.addEventListener(`touchend`,r),e.addEventListener(`mousedown`,i),l.current=()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchmove`,n),e.removeEventListener(`touchend`,r),e.removeEventListener(`mousedown`,i),window.removeEventListener(`mousemove`,a),window.removeEventListener(`mouseup`,o)}},[u,d,f]);return(0,x.useEffect)(()=>{let e;return r.current?(l.current?.(),p(r.current)):(e=new MutationObserver(()=>{r.current&&(l.current?.(),p(r.current),e?.disconnect())}),e.observe(document.body,{childList:!0,subtree:!0})),()=>{e?.disconnect(),l.current?.()}},[p,e]),{ref:r,dragOffsetY:i,isDragging:o}}var Kd=e=>{let[t,n]=(0,x.useState)(!0);return(0,x.useEffect)(()=>{let t=null;return e?.type===`loading`?(n(!0),t=setTimeout(()=>{n(!1)},300)):n(!e),()=>{t&&clearTimeout(t)}},[e]),t},qd=()=>{let e=$i(),t=ea(e=>e.chat.sourceInfos),n=Eu(),r=(0,x.useRef)(null),i=Kd(t);(0,x.useEffect)(()=>{r.current&&t?.type===`loading`&&(n?r.current.showModal():(r.current.setAttribute(`open`,`true`),r.current?.focus()))},[t,n]);let a=(0,x.useCallback)(()=>{r.current&&(n?r.current.close():r.current.removeAttribute(`open`),e(Pi()))},[e,n]),{ref:o,dragOffsetY:s}=Gd({onClose:a,sourceInfos:t});return t?(0,X.jsx)(`dialog`,{ref:r,className:R(Du.sourceInfos,i?Du.waitForLoading:t.type===`loading`?Du.loadingContent:``),style:n&&s?{transform:`translateY(${s}px)`}:{},onClose:a,autoFocus:!0,role:`dialog`,"aria-labelledby":`source-info-title`,children:i?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ku,{ref:o,tabIndex:-1,sourceInfos:t.type===`loaded`?t:void 0,onClose:a}),t.type===`loading`?(0,X.jsx)(Wd,{}):t.type===`loading-error`?(0,X.jsx)(Ud,{}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Au,{loading:!t.highlighted}),(0,X.jsx)(Vd,{sourceInfos:t})]})]})}):null},Jd={container:`_container_5axup_1`,body:`_body_5axup_7`,intro:`_intro_5axup_14`,footer:`_footer_5axup_48`,footnote:`_footnote_5axup_52`,containerWithFootnote:`_containerWithFootnote_5axup_72`,startChatButton:`_startChatButton_5axup_87`,spinner:`_spinner_5axup_102`,spin:`_spin_5axup_102`,formFields:`_formFields_5axup_106`,formField:`_formField_5axup_106`,radio:`_radio_5axup_118`,checkbox:`_checkbox_5axup_125`,input:`_input_5axup_133`,inputLabel:`_inputLabel_5axup_167`,selectWrapper:`_selectWrapper_5axup_171`,select:`_select_5axup_171`,selectLabel:`_selectLabel_5axup_217`},Yd=({name:e,label:t,defaultValue:n,required:r,onChange:i})=>(0,X.jsxs)(`label`,{className:R(Jd.checkbox,`chat__startScreen__checkbox`),htmlFor:e,children:[(0,X.jsx)(`input`,{type:`checkbox`,id:e,name:e,defaultChecked:n===`true`,required:r,onChange:e=>{i(e.currentTarget.checked?`true`:`false`)}}),(0,X.jsx)(`div`,{children:t})]}),Xd=({type:e,name:t,label:n,defaultValue:r,placeholder:i,required:a,multiple:o,min:s,max:c,pattern:l,onChange:u})=>(0,X.jsxs)(`label`,{className:R(Jd.input,`chat__startScreen__input`),htmlFor:t,children:[(0,X.jsx)(`div`,{className:R(Jd.inputLabel),children:n}),(0,X.jsx)(`input`,{type:e,id:t,name:t,defaultValue:r,placeholder:i,required:a,multiple:o,min:s,max:c,pattern:l,onChange:e=>{u(e.target.value)}})]}),Zd=({name:e,value:t,label:n,defaultChecked:r,required:i,onChange:a})=>{let o=`${e}-${t}`;return(0,X.jsxs)(`label`,{className:R(Jd.radio,`chat__startScreen__radio`),htmlFor:o,children:[(0,X.jsx)(`input`,{id:o,type:`radio`,name:e,value:t,defaultChecked:r,required:i,onChange:e=>{a(e.target.value)}}),(0,X.jsx)(`span`,{className:R(Jd.label),children:n})]})},Qd=({name:e,label:t,defaultValue:n,required:r,multiple:i,options:a,onChange:o})=>(0,X.jsxs)(`label`,{className:R(Jd.select,`chat__startScreen__select`),htmlFor:e,children:[(0,X.jsx)(`div`,{className:R(Jd.selectLabel),children:t}),(0,X.jsx)(`div`,{className:R(Jd.selectWrapper),children:(0,X.jsx)(`select`,{id:e,name:e,defaultValue:n,required:r,multiple:i,onChange:e=>{o(e.target.value)},children:Object.entries(a||{}).map(([e,t])=>(0,X.jsx)(`option`,{value:e,selected:t===n,children:t}))})})]}),$d=`start-screen.intro`,ef=`start-screen.start-chat`,tf=`start-screen.waiting-for-login`,nf=`start-screen.footnote`,rf=`start-screen.form`,af=`${rf}.fields`,of=()=>{let e=B(),t=$i(),n=ll(),r=ea(e=>e.startScreen.loginRequestToken),i=ea(e=>e.settings.requiresUserAuthentication);(0,x.useEffect)(()=>{let e;if(r){let i=window.screenX+(window.outerWidth-600)/2,a=window.screenY+(window.outerHeight-700)/2,o=encodeURIComponent(n),s=new URL(window.location.origin);s.pathname=`/${o}/auth/login`,s.searchParams.set(`loginRequestToken`,r);let c=window.open(s.href,`Login`,`width=600,height=700,left=${i},top=${a},resizable=yes,scrollbars=yes`);e=setInterval(()=>{c?.closed&&(t(xi()),clearInterval(e))},500)}return()=>{e&&clearInterval(e)}},[n,r,t]);let[a,o]=(0,x.useState)({}),s=()=>{let e=Object.entries(a).reduce((e,[t,n])=>({...e,[t]:n.value}),{});t(i?bi({loginRequestToken:Zt(),formValues:e}):_i({formValues:e}))},c=e($d),l=e(r?tf:ef),u=e(nf),d=(0,x.useMemo)(()=>e(af)?.split(`;`).map(e=>e.trim())??[],[e(af)]);(0,x.useEffect)(()=>{d.length&&Object.keys(a).length===0&&o(d.reduce((t,n)=>({...t,[n]:cf(n,e)}),{}))},[e,d,a]);let f=e=>{e.preventDefault(),s()},p=e=>t=>{o(n=>({...n,[e]:{...n[e],value:t}}))};return(0,X.jsxs)(`form`,{onSubmit:f,className:R(Jd.container,u&&Jd.containerWithFootnote,`chat__startScreen`),children:[(0,X.jsxs)(`div`,{className:R(Jd.body,`chat__startScreen__body`),children:[c&&(0,X.jsx)(`div`,{className:R(Jd.intro,`chat__startScreen__intro`),children:(0,X.jsx)(Tc,{options:{overrides:{a:sf}},children:c})}),(0,X.jsx)(`div`,{className:R(Jd.formFields,`chat__startScreen__fields`),children:Object.values(a).map(({type:e,name:t,label:n,placeholder:r,defaultValue:i,options:a,required:o,multiple:s,min:c,max:l,pattern:u})=>(0,X.jsx)(`div`,{className:R(Jd.formField,`chat__startScreen__field`),children:(()=>{switch(e){case`radio`:return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{children:n}),Object.entries(a||{}).map(([e,n])=>(0,X.jsx)(Zd,{name:t,value:e,label:n,defaultChecked:e===i,required:o,onChange:p(t)},e))]});case`checkbox`:return(0,X.jsx)(Yd,{name:t,label:n,defaultValue:i,required:o,onChange:p(t)});case`select`:return(0,X.jsx)(Qd,{name:t,label:n,defaultValue:i,required:o,multiple:s,options:a,onChange:p(t)});default:return(0,X.jsx)(Xd,{type:e,name:t,label:n,placeholder:r,defaultValue:i,required:o,multiple:s,min:c,max:l,pattern:u,onChange:p(t)})}})()},t))})]}),(0,X.jsxs)(`div`,{className:R(Jd.footer,`chat__startScreen__footer`),children:[(0,X.jsxs)(Q,{type:`submit`,className:Jd.startChatButton,disabled:!!r,children:[!!r&&(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,className:Jd.spinner,children:(0,X.jsx)(`path`,{d:`M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm88,88H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z`})}),(0,X.jsx)(`div`,{children:l})]}),u&&(0,X.jsx)(`div`,{className:Jd.footnote,children:(0,X.jsx)(Tc,{options:{overrides:{a:sf}},children:u})})]})]})},sf=({title:e,href:t,children:n})=>(0,X.jsx)(`a`,{href:t,title:e,target:`_blank`,rel:`noopener noreferrer`,children:n}),cf=(e,t)=>{let n=t(`${rf}.${e}.type`)||`text`,r=t(`${rf}.${e}.required`)===`true`,i=t(`${rf}.${e}.multiple`)===`true`,a=t(`${rf}.${e}.placeholder`),o=t(`${rf}.${e}.label`)||``,s=t(`${rf}.${e}.defaultValue`),c=t(`${rf}.${e}.min`),l=t(`${rf}.${e}.max`),u=t(`${rf}.${e}.pattern`),d=uf(t(`${rf}.${e}.options`));return{name:e,label:o,placeholder:a,value:lf(n,s,d)||``,defaultValue:s,options:d,type:n,required:r,multiple:i,min:c,max:l,pattern:u}},lf=(e,t,n)=>t||e===`select`&&Object.keys(n)[0]||``,uf=(e=``)=>e.split(`;`).map(e=>e.trim()).reduce((e,t)=>{let[n,r]=t.split(`:`).map(e=>e.trim());return{...e,[n]:r}},{}),df=()=>{let e=ea(e=>e.intl.locale);(0,x.useEffect)(()=>{window.document.documentElement.lang=e},[e])},ff={TRIGGER_ACTION:`TRIGGER_ACTION`,TRIGGER_STORY:`TRIGGER_STORY`,CHAT_MESSAGE_FROM_GUEST:`CHAT_MESSAGE_FROM_GUEST`,ON_CHAT_WINDOW_OPEN:`ON_CHAT_WINDOW_OPEN`,ON_CHAT_WINDOW_CLOSE:`ON_CHAT_WINDOW_CLOSE`,RESTART_CHAT:`RESTART_CHAT`},pf=({clientName:e})=>{df();let t=$i(),n=ea(e=>e.intl.messages),r=B(),i=ea(e=>e.settings.enableStartScreen),a=ea(e=>e.startScreen.startScreenStatus),o=ea(e=>e.connection.queryString),s=ea(e=>e.settings.allowedEmbedOrigins),c=(0,x.useMemo)(()=>new URLSearchParams(o||`?`).get(`cssClassName`),[o]);(0,x.useEffect)(()=>{let n=new URLSearchParams(o||``);t(Wi(e,Object.fromEntries(n.entries())))},[e,o,t]),(0,x.useEffect)(()=>{let e=e=>{if(!e.data?.type||!Object.values(ff).includes(e.data.type))return;let n=e.origin===window.location.origin,r=e.source===window.parent,i=s===void 0||s.includes(e.origin);if(!(n||r&&i)){console.warn(`Rejected postMessage from untrusted origin:`,e.origin);return}switch(e.data.type){case ff.TRIGGER_ACTION:t(e.data.action);break;case ff.TRIGGER_STORY:t(Ft(e.data.story));break;case ff.ON_CHAT_WINDOW_OPEN:t({type:`webclient.chatwindow.opened`});break;case ff.ON_CHAT_WINDOW_CLOSE:t({type:`webclient.chatwindow.closed`});break;case ff.CHAT_MESSAGE_FROM_GUEST:t(ht(e.data.text));break;case ff.RESTART_CHAT:t(Zi());break}};return window.addEventListener(`message`,e,!1),()=>window.removeEventListener(`message`,e)},[s,t]),(0,x.useEffect)(()=>{let e=r(`page.title`);e&&document&&(document.title=e)},[n,r]);let l=i===void 0,u=i===!1||a===`HIDDEN`;return(0,X.jsx)(`div`,{className:R(Tu.chatwindow,u&&Tu.chatwindowWithAside,`chat__chatwindow`,c),children:l?null:u?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`header`,{children:(0,X.jsx)(wu,{chatStarted:!0})}),(0,X.jsx)(`main`,{children:(0,X.jsx)(hu,{clientName:e})}),(0,X.jsx)(`aside`,{children:(0,X.jsx)(qd,{})})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`header`,{children:(0,X.jsx)(wu,{chatStarted:!1})}),(0,X.jsx)(`main`,{children:(0,X.jsx)(of,{})})]})})},mf=()=>{let e=ll(),t=Eu();return(0,X.jsx)(`div`,{className:R([it.app,t?`chat__small`:`chat__large`]),children:(0,X.jsx)(pf,{clientName:e})})},hf={"page.title":`Bubble Chat Chatbot`,"message-input-label":`Benutzereingabe`,"message-input-placeholder":`Nachricht eingeben`,"message-input.actions.submit.label":`Nachricht senden`,"message-input.actions.start-audio-recording.label":`Spracheingabe starten`,"message-input.actions.stop-audio-recording.label":`Spracheingabe stoppen`,"message-input.actions.submit-audio-recording.label":`Spracheingabe übermitteln`,"message-input.actions.command.label":`Aktion ausführen`,"guest-bubble.label":`Ihre Nachricht`,"bot-bubble.label":`Nachricht des Chatbots`,"bot-bubble.actions.label":`Nachricht-Aktionen`,"bot-bubble.reaction.good":`Gefällt mir`,"bot-bubble.reaction.bad":`Gefällt mir nicht`,"bot-bubble.reaction.remove":`Markierung entfernen`,"bot-bubble.reaction.say-more":`Erzähle mir bitte mehr`,"bot-bubble.reaction.category.WRONG_INFORMATION":`Falsch`,"bot-bubble.reaction.category.MISSING_INFORMATION":`Unvollständig`,"bot-bubble.reaction.category.OLD_INFORMATION":`Veraltet`,"bot-bubble.reaction.category.UNCLEAR":`Unklar`,"bot-bubble.reaction.category.OFF_TOPIC":`Nicht zur Frage passend`,"bot-bubble.reaction.comment":`Gedanken mit mir teilen...`,"bot-bubble.reaction.close":`Schliessen`,"bot-bubble.copy":`Kopieren`,"bot-bubble.sources":`Quellenliste`,"bot-bubble.source.open":`Quelle öffnen`,"bot-bubble.footnote":`Fussnote`,"agent-bubble.label":`Nachricht des Live-Agenten`,"conversation.label":`Chat Verlauf`,"chatbot.typing":`Chatbot schreibt`,"export-transcript.email.title":`Chatverlauf per E-Mail versenden`,"export-transcript.email.description":`Bitte E-Mail-Adresse angeben, an die der Chatverlauf gesendet werden soll.`,"export-transcript.email.cancel":`Abbrechen`,"export-transcript.email.send":`Senden`,"export-transcript.email.placeholder":`E-Mail-Adresse`,"export-transcript.email.invalid":`Bitte gültige E-Mail-Adresse eingeben.`,"export-transcript.email.success":`Der Chatverlauf wurde an die hinterlegte E-Mail-Adresse übermittelt.`,"general-conditions.header":`**Nutzungsbedingungen**`,"general-conditions.body":`Bitte berücksichtigen Sie die folgenden Punkte:
62
+ `+d),fe&&Vu([O,ee,te],e=>{d=Yu(d,e,` `)}),b&&ve?b.createHTML(d):d},t.setConfig=function(){Ke(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),me=!0},t.clearConfig=function(){Ue=null,me=!1},t.isValidAttribute=function(e,t,n){return Ue||Ke({}),R(He(e),He(t),n)},t.addHook=function(e,t){typeof t==`function`&&Wu(D[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=Hu(D[e],t);return n===-1?void 0:Gu(D[e],n,1)[0]}return Uu(D[e])},t.removeHooks=function(e){D[e]=[]},t.removeAllHooks=function(){D=Md()},t}var Pd=Nd(),Fd=({onClose:e})=>{let t=B();return(0,X.jsxs)(`div`,{className:Du.highlightLoadingInfo,onClick:e,children:[(0,X.jsx)(`div`,{className:Du.highlightLoadingInfoCloseIcon,children:(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`})})}),(0,X.jsxs)(`div`,{className:Du.highlightLoadingInfoInnerContainer,children:[(0,X.jsxs)(`div`,{className:Du.highlightLoadingInfoContent,children:[(0,X.jsx)(`h3`,{children:t(`source-infos.highlight-loading.title`)}),(0,X.jsx)(`p`,{children:t(`source-infos.highlight-loading.description`)})]}),(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`#000000`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M253.66,106.34a8,8,0,0,0-11.32,0L192,156.69,107.31,72l50.35-50.34a8,8,0,1,0-11.32-11.32L96,60.69A16,16,0,0,0,93.18,79.5L72,100.69a16,16,0,0,0,0,22.62L76.69,128,18.34,186.34a8,8,0,0,0,3.13,13.25l72,24A7.88,7.88,0,0,0,96,224a8,8,0,0,0,5.66-2.34L136,187.31l4.69,4.69a16,16,0,0,0,22.62,0l21.19-21.18A16,16,0,0,0,203.31,168l50.35-50.34A8,8,0,0,0,253.66,106.34ZM93.84,206.85l-55-18.35L88,139.31,124.69,176ZM152,180.69,83.31,112,104,91.31,172.69,160Z`})})]})]})},Id=({title:e,href:t,children:n})=>(0,X.jsx)(`a`,{href:t,title:e,target:`_blank`,rel:`noopener noreferrer`,children:n}),Ld=({className:e,children:t,...n})=>(0,X.jsx)(`a`,{className:R(Zc.button,Zc.buttonDefault,e),type:`button`,role:`button`,...n,children:t}),Rd=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,...e,children:(0,X.jsx)(`path`,{d:`M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z`})}),zd=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,...e,children:(0,X.jsx)(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z`})}),Bd=({type:e,...t})=>{switch(e){case`WEBSITE`:return(0,X.jsx)(zd,{...t});case`PDF`:return(0,X.jsx)(Jc,{...t});case`DOCX`:return(0,X.jsx)(Kc,{...t});case`TEXT`:return(0,X.jsx)(Rd,{...t});default:return(0,X.jsx)(qc,{...t})}},Vd=({url:e,knowledgeBaseType:t})=>{let n=B();return(0,X.jsx)(Ld,{className:Du.openSourceButton,href:e,target:`_blank`,children:(0,X.jsxs)(`div`,{className:Du.sourceButtonLabel,children:[(0,X.jsx)(`div`,{className:Du.sourceHeaderIcon,children:(0,X.jsx)(Bd,{type:t})}),(0,X.jsx)(`p`,{children:n(`source-infos.open-source`)})]})})},Hd=({sourceInfos:{content:e,url:t,knowledgeBaseType:n,highlighted:r}})=>{let[i,a]=(0,x.useState)(!r);(0,x.useEffect)(()=>{r&&a(!1)},[r]);let o=Pd.sanitize(e,{USE_PROFILES:{html:!0}});return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:R(Du.sourceContent,ul.markdown),children:[(0,X.jsx)(Tc,{options:{overrides:{a:Id}},children:o}),i&&(0,X.jsx)(Fd,{onClose:()=>a(!1)})]}),(0,X.jsx)(Vd,{url:t,knowledgeBaseType:n})]})},Ud=``+new URL(`undraw_fixing-bugs-D_eYxJc6.svg`,import.meta.url).href,Wd=()=>{let e=B();return(0,X.jsxs)(`div`,{className:Du.loadingError,children:[(0,X.jsx)(`h1`,{children:e(`source-infos.error.title`)}),(0,X.jsx)(`img`,{src:Ud,title:e(`source-infos.error.title`)}),(0,X.jsx)(`p`,{children:e(`source-infos.error.info`)})]})},Gd=()=>(0,X.jsx)(`div`,{className:Du.loadingSourceInfos,children:(0,X.jsx)(`svg`,{className:Du.loading,xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,children:(0,X.jsx)(`path`,{d:`M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z`})})});function Kd({sourceInfos:e,onClose:t,threshold:n=100}){let r=(0,x.useRef)(null),[i,a]=(0,x.useState)(0),[o,s]=(0,x.useState)(!1),c=(0,x.useRef)(null),l=(0,x.useRef)(null),u=(0,x.useCallback)(e=>{c.current=e,s(!0)},[]),d=(0,x.useCallback)(e=>{if(c.current!==null&&o){let t=e-c.current;t>0&&a(t)}},[o]),f=(0,x.useCallback)(()=>{s(!1),i>n&&t(),a(0),c.current=null},[i,n,t]),p=(0,x.useCallback)(e=>{let t=e=>u(e.touches[0].clientY),n=e=>d(e.touches[0].clientY),r=()=>f(),i=e=>{e.preventDefault(),u(e.clientY),window.addEventListener(`mousemove`,a),window.addEventListener(`mouseup`,o)},a=e=>d(e.clientY),o=()=>{f(),window.removeEventListener(`mousemove`,a),window.removeEventListener(`mouseup`,o)};e.addEventListener(`touchstart`,t),e.addEventListener(`touchmove`,n),e.addEventListener(`touchend`,r),e.addEventListener(`mousedown`,i),l.current=()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchmove`,n),e.removeEventListener(`touchend`,r),e.removeEventListener(`mousedown`,i),window.removeEventListener(`mousemove`,a),window.removeEventListener(`mouseup`,o)}},[u,d,f]);return(0,x.useEffect)(()=>{let e;return r.current?(l.current?.(),p(r.current)):(e=new MutationObserver(()=>{r.current&&(l.current?.(),p(r.current),e?.disconnect())}),e.observe(document.body,{childList:!0,subtree:!0})),()=>{e?.disconnect(),l.current?.()}},[p,e]),{ref:r,dragOffsetY:i,isDragging:o}}var qd=e=>{let[t,n]=(0,x.useState)(!0);return(0,x.useEffect)(()=>{let t=null;return e?.type===`loading`?(n(!0),t=setTimeout(()=>{n(!1)},300)):n(!e),()=>{t&&clearTimeout(t)}},[e]),t},Jd=()=>{let e=$i(),t=ea(e=>e.chat.sourceInfos),n=Eu(),r=(0,x.useRef)(null),i=qd(t);(0,x.useEffect)(()=>{r.current&&t?.type===`loading`&&(n?r.current.showModal():(r.current.setAttribute(`open`,`true`),r.current?.focus()))},[t,n]);let a=(0,x.useCallback)(()=>{r.current&&(n?r.current.close():r.current.removeAttribute(`open`),e(Pi()))},[e,n]),{ref:o,dragOffsetY:s}=Kd({onClose:a,sourceInfos:t});return t?(0,X.jsx)(`dialog`,{ref:r,className:R(Du.sourceInfos,i?Du.waitForLoading:t.type===`loading`?Du.loadingContent:``),style:n&&s?{transform:`translateY(${s}px)`}:{},onClose:a,autoFocus:!0,role:`dialog`,"aria-labelledby":`source-info-title`,children:i?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ku,{ref:o,tabIndex:-1,sourceInfos:t.type===`loaded`?t:void 0,onClose:a}),t.type===`loading`?(0,X.jsx)(Gd,{}):t.type===`loading-error`?(0,X.jsx)(Wd,{}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Au,{loading:!t.highlighted}),(0,X.jsx)(Hd,{sourceInfos:t})]})]})}):null},Yd={container:`_container_5axup_1`,body:`_body_5axup_7`,intro:`_intro_5axup_14`,footer:`_footer_5axup_48`,footnote:`_footnote_5axup_52`,containerWithFootnote:`_containerWithFootnote_5axup_72`,startChatButton:`_startChatButton_5axup_87`,spinner:`_spinner_5axup_102`,spin:`_spin_5axup_102`,formFields:`_formFields_5axup_106`,formField:`_formField_5axup_106`,radio:`_radio_5axup_118`,checkbox:`_checkbox_5axup_125`,input:`_input_5axup_133`,inputLabel:`_inputLabel_5axup_167`,selectWrapper:`_selectWrapper_5axup_171`,select:`_select_5axup_171`,selectLabel:`_selectLabel_5axup_217`},Xd=({name:e,label:t,defaultValue:n,required:r,onChange:i})=>(0,X.jsxs)(`label`,{className:R(Yd.checkbox,`chat__startScreen__checkbox`),htmlFor:e,children:[(0,X.jsx)(`input`,{type:`checkbox`,id:e,name:e,defaultChecked:n===`true`,required:r,onChange:e=>{i(e.currentTarget.checked?`true`:`false`)}}),(0,X.jsx)(`div`,{children:t})]}),Zd=({type:e,name:t,label:n,defaultValue:r,placeholder:i,required:a,multiple:o,min:s,max:c,pattern:l,onChange:u})=>(0,X.jsxs)(`label`,{className:R(Yd.input,`chat__startScreen__input`),htmlFor:t,children:[(0,X.jsx)(`div`,{className:R(Yd.inputLabel),children:n}),(0,X.jsx)(`input`,{type:e,id:t,name:t,defaultValue:r,placeholder:i,required:a,multiple:o,min:s,max:c,pattern:l,onChange:e=>{u(e.target.value)}})]}),Qd=({name:e,value:t,label:n,defaultChecked:r,required:i,onChange:a})=>{let o=`${e}-${t}`;return(0,X.jsxs)(`label`,{className:R(Yd.radio,`chat__startScreen__radio`),htmlFor:o,children:[(0,X.jsx)(`input`,{id:o,type:`radio`,name:e,value:t,defaultChecked:r,required:i,onChange:e=>{a(e.target.value)}}),(0,X.jsx)(`span`,{className:R(Yd.label),children:n})]})},$d=({name:e,label:t,defaultValue:n,required:r,multiple:i,options:a,onChange:o})=>(0,X.jsxs)(`label`,{className:R(Yd.select,`chat__startScreen__select`),htmlFor:e,children:[(0,X.jsx)(`div`,{className:R(Yd.selectLabel),children:t}),(0,X.jsx)(`div`,{className:R(Yd.selectWrapper),children:(0,X.jsx)(`select`,{id:e,name:e,defaultValue:n,required:r,multiple:i,onChange:e=>{o(e.target.value)},children:Object.entries(a||{}).map(([e,t])=>(0,X.jsx)(`option`,{value:e,selected:t===n,children:t}))})})]}),ef=`start-screen.intro`,tf=`start-screen.start-chat`,nf=`start-screen.waiting-for-login`,rf=`start-screen.footnote`,af=`start-screen.form`,of=`${af}.fields`,sf=()=>{let e=B(),t=$i(),n=ll(),r=ea(e=>e.startScreen.loginRequestToken),i=ea(e=>e.settings.requiresUserAuthentication);(0,x.useEffect)(()=>{let e;if(r){let i=window.screenX+(window.outerWidth-600)/2,a=window.screenY+(window.outerHeight-700)/2,o=encodeURIComponent(n),s=new URL(window.location.origin);s.pathname=`/${o}/auth/login`,s.searchParams.set(`loginRequestToken`,r);let c=window.open(s.href,`Login`,`width=600,height=700,left=${i},top=${a},resizable=yes,scrollbars=yes`);e=setInterval(()=>{c?.closed&&(t(xi()),clearInterval(e))},500)}return()=>{e&&clearInterval(e)}},[n,r,t]);let[a,o]=(0,x.useState)({}),s=()=>{let e=Object.entries(a).reduce((e,[t,n])=>({...e,[t]:n.value}),{});t(i?bi({loginRequestToken:Zt(),formValues:e}):_i({formValues:e}))},c=e(ef),l=e(r?nf:tf),u=e(rf),d=(0,x.useMemo)(()=>e(of)?.split(`;`).map(e=>e.trim())??[],[e(of)]);(0,x.useEffect)(()=>{d.length&&Object.keys(a).length===0&&o(d.reduce((t,n)=>({...t,[n]:lf(n,e)}),{}))},[e,d,a]);let f=e=>{e.preventDefault(),s()},p=e=>t=>{o(n=>({...n,[e]:{...n[e],value:t}}))};return(0,X.jsxs)(`form`,{onSubmit:f,className:R(Yd.container,u&&Yd.containerWithFootnote,`chat__startScreen`),children:[(0,X.jsxs)(`div`,{className:R(Yd.body,`chat__startScreen__body`),children:[c&&(0,X.jsx)(`div`,{className:R(Yd.intro,`chat__startScreen__intro`),children:(0,X.jsx)(Tc,{options:{overrides:{a:cf}},children:c})}),(0,X.jsx)(`div`,{className:R(Yd.formFields,`chat__startScreen__fields`),children:Object.values(a).map(({type:e,name:t,label:n,placeholder:r,defaultValue:i,options:a,required:o,multiple:s,min:c,max:l,pattern:u})=>(0,X.jsx)(`div`,{className:R(Yd.formField,`chat__startScreen__field`),children:(()=>{switch(e){case`radio`:return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{children:n}),Object.entries(a||{}).map(([e,n])=>(0,X.jsx)(Qd,{name:t,value:e,label:n,defaultChecked:e===i,required:o,onChange:p(t)},e))]});case`checkbox`:return(0,X.jsx)(Xd,{name:t,label:n,defaultValue:i,required:o,onChange:p(t)});case`select`:return(0,X.jsx)($d,{name:t,label:n,defaultValue:i,required:o,multiple:s,options:a,onChange:p(t)});default:return(0,X.jsx)(Zd,{type:e,name:t,label:n,placeholder:r,defaultValue:i,required:o,multiple:s,min:c,max:l,pattern:u,onChange:p(t)})}})()},t))})]}),(0,X.jsxs)(`div`,{className:R(Yd.footer,`chat__startScreen__footer`),children:[(0,X.jsxs)(Q,{type:`submit`,className:Yd.startChatButton,disabled:!!r,children:[!!r&&(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,fill:`currentColor`,viewBox:`0 0 256 256`,className:Yd.spinner,children:(0,X.jsx)(`path`,{d:`M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm88,88H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z`})}),(0,X.jsx)(`div`,{children:l})]}),u&&(0,X.jsx)(`div`,{className:Yd.footnote,children:(0,X.jsx)(Tc,{options:{overrides:{a:cf}},children:u})})]})]})},cf=({title:e,href:t,children:n})=>(0,X.jsx)(`a`,{href:t,title:e,target:`_blank`,rel:`noopener noreferrer`,children:n}),lf=(e,t)=>{let n=t(`${af}.${e}.type`)||`text`,r=t(`${af}.${e}.required`)===`true`,i=t(`${af}.${e}.multiple`)===`true`,a=t(`${af}.${e}.placeholder`),o=t(`${af}.${e}.label`)||``,s=t(`${af}.${e}.defaultValue`),c=t(`${af}.${e}.min`),l=t(`${af}.${e}.max`),u=t(`${af}.${e}.pattern`),d=df(t(`${af}.${e}.options`));return{name:e,label:o,placeholder:a,value:uf(n,s,d)||``,defaultValue:s,options:d,type:n,required:r,multiple:i,min:c,max:l,pattern:u}},uf=(e,t,n)=>t||e===`select`&&Object.keys(n)[0]||``,df=(e=``)=>e.split(`;`).map(e=>e.trim()).reduce((e,t)=>{let[n,r]=t.split(`:`).map(e=>e.trim());return{...e,[n]:r}},{}),ff=()=>{let e=ea(e=>e.intl.locale);(0,x.useEffect)(()=>{window.document.documentElement.lang=e},[e])},pf={TRIGGER_ACTION:`TRIGGER_ACTION`,TRIGGER_STORY:`TRIGGER_STORY`,CHAT_MESSAGE_FROM_GUEST:`CHAT_MESSAGE_FROM_GUEST`,ON_CHAT_WINDOW_OPEN:`ON_CHAT_WINDOW_OPEN`,ON_CHAT_WINDOW_CLOSE:`ON_CHAT_WINDOW_CLOSE`,RESTART_CHAT:`RESTART_CHAT`},mf=({clientName:e})=>{ff();let t=$i(),n=ea(e=>e.intl.messages),r=B(),i=ea(e=>e.settings.enableStartScreen),a=ea(e=>e.startScreen.startScreenStatus),o=ea(e=>e.connection.queryString),s=ea(e=>e.settings.allowedEmbedOrigins),c=(0,x.useMemo)(()=>new URLSearchParams(o||`?`).get(`cssClassName`),[o]);(0,x.useEffect)(()=>{let n=new URLSearchParams(o||``);t(Wi(e,Object.fromEntries(n.entries())))},[e,o,t]),(0,x.useEffect)(()=>{let e=e=>{if(!e.data?.type||!Object.values(pf).includes(e.data.type))return;let n=e.origin===window.location.origin,r=e.source===window.parent,i=s===void 0||s.includes(e.origin);if(!(n||r&&i)){console.warn(`Rejected postMessage from untrusted origin:`,e.origin);return}switch(e.data.type){case pf.TRIGGER_ACTION:t(e.data.action);break;case pf.TRIGGER_STORY:t(Ft(e.data.story));break;case pf.ON_CHAT_WINDOW_OPEN:t({type:`webclient.chatwindow.opened`});break;case pf.ON_CHAT_WINDOW_CLOSE:t({type:`webclient.chatwindow.closed`});break;case pf.CHAT_MESSAGE_FROM_GUEST:t(ht(e.data.text));break;case pf.RESTART_CHAT:t(Zi());break}};return window.addEventListener(`message`,e,!1),()=>window.removeEventListener(`message`,e)},[s,t]),(0,x.useEffect)(()=>{let e=r(`page.title`);e&&document&&(document.title=e)},[n,r]);let l=i===void 0,u=i===!1||a===`HIDDEN`;return(0,X.jsx)(`div`,{className:R(Tu.chatwindow,u&&Tu.chatwindowWithAside,`chat__chatwindow`,c),children:l?null:u?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`header`,{children:(0,X.jsx)(wu,{chatStarted:!0})}),(0,X.jsx)(`main`,{children:(0,X.jsx)(hu,{clientName:e})}),(0,X.jsx)(`aside`,{children:(0,X.jsx)(Jd,{})})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`header`,{children:(0,X.jsx)(wu,{chatStarted:!1})}),(0,X.jsx)(`main`,{children:(0,X.jsx)(sf,{})})]})})},hf=()=>{let e=ll(),t=Eu();return(0,X.jsx)(`div`,{className:R([it.app,t?`chat__small`:`chat__large`]),children:(0,X.jsx)(mf,{clientName:e})})},gf={"page.title":`Bubble Chat Chatbot`,"message-input-label":`Benutzereingabe`,"message-input-placeholder":`Nachricht eingeben`,"message-input.actions.submit.label":`Nachricht senden`,"message-input.actions.start-audio-recording.label":`Spracheingabe starten`,"message-input.actions.stop-audio-recording.label":`Spracheingabe stoppen`,"message-input.actions.submit-audio-recording.label":`Spracheingabe übermitteln`,"message-input.actions.command.label":`Aktion ausführen`,"guest-bubble.label":`Ihre Nachricht`,"bot-bubble.label":`Nachricht des Chatbots`,"bot-bubble.actions.label":`Nachricht-Aktionen`,"bot-bubble.reaction.good":`Gefällt mir`,"bot-bubble.reaction.bad":`Gefällt mir nicht`,"bot-bubble.reaction.remove":`Markierung entfernen`,"bot-bubble.reaction.say-more":`Erzähle mir bitte mehr`,"bot-bubble.reaction.category.WRONG_INFORMATION":`Falsch`,"bot-bubble.reaction.category.MISSING_INFORMATION":`Unvollständig`,"bot-bubble.reaction.category.OLD_INFORMATION":`Veraltet`,"bot-bubble.reaction.category.UNCLEAR":`Unklar`,"bot-bubble.reaction.category.OFF_TOPIC":`Nicht zur Frage passend`,"bot-bubble.reaction.comment":`Gedanken mit mir teilen...`,"bot-bubble.reaction.close":`Schliessen`,"bot-bubble.copy":`Kopieren`,"bot-bubble.sources":`Quellenliste`,"bot-bubble.source.open":`Quelle öffnen`,"bot-bubble.footnote":`Fussnote`,"agent-bubble.label":`Nachricht des Live-Agenten`,"conversation.label":`Chat Verlauf`,"chatbot.typing":`Chatbot schreibt`,"export-transcript.email.title":`Chatverlauf per E-Mail versenden`,"export-transcript.email.description":`Bitte E-Mail-Adresse angeben, an die der Chatverlauf gesendet werden soll.`,"export-transcript.email.cancel":`Abbrechen`,"export-transcript.email.send":`Senden`,"export-transcript.email.placeholder":`E-Mail-Adresse`,"export-transcript.email.invalid":`Bitte gültige E-Mail-Adresse eingeben.`,"export-transcript.email.success":`Der Chatverlauf wurde an die hinterlegte E-Mail-Adresse übermittelt.`,"general-conditions.header":`**Nutzungsbedingungen**`,"general-conditions.body":`Bitte berücksichtigen Sie die folgenden Punkte:
63
63
 
64
64
  - Der Chatverlauf wird im EU-Raum gespeichert und kann nur von autorisierten Personen eingesehen werden.
65
- - Geben Sie im Chatfenster keine persönlichen Daten ein (Passwörter, Geburtsdatum usw.).`,"general-conditions.accept-conditions-note":`Mit der Verwendung des Chats erklären Sie sich mit den Nutzungsbedingungen einverstanden.`,"block-user-input.title":`Bitte auf die Antwort des Chatbots warten.`,"conversation-rating.call-to-action.title":`Bewerten Sie diesen Chat`,"conversation-rating.overlay.title":`Wie zufrieden sind Sie mit diesem Chat?`,"conversation-rating.overlay.guest-feedback.input-placeholder":`Feedback bitte hier eingeben (optional)`,"conversation-rating.overlay.star.very-bad":`Sehr schlecht`,"conversation-rating.overlay.star.very-good":`Sehr gut`,"conversation-rating.overlay.bot-message.rate-feedback.value-1":`Oh, das tönt nicht gut. Bitte geben Sie mir doch ein schriftliches Feedback, damit ich dazulernen kann.`,"conversation-rating.overlay.bot-message.rate-feedback.value-2":`Oh, das tönt nicht gut. Bitte geben Sie mir doch ein schriftliches Feedback, damit ich dazulernen kann.`,"conversation-rating.overlay.bot-message.rate-feedback.value-3":`Durchschnitt ist nicht mein Ziel, was kann ich noch verbessern?`,"conversation-rating.overlay.bot-message.rate-feedback.value-4":`Knapp daneben ist auch vorbei. Was kann ich noch verbessern, um das nächste Mal alle Sterne zu erreichen?`,"conversation-rating.overlay.bot-message.rate-feedback.value-5":`Perfekt! Dann hoffe ich, dass ich Sie wieder einmal so gut beraten kann.`,"conversation-rating.overlay.bot-message.submit-feedback":`Vielen Dank für die Rückmeldung. Ich bin bestrebt, mich ständig zu verbessern.`,"conversation-rating.overlay.action.submit":`Bewertung senden`,"conversation-rating.overlay.action.back-to-chat":`Zurück zum Chat`,"conversation-rating.overlay.action.close-chat":`Chat minimieren`,"conversation-rating.overlay.action.restart-chat":`Chat neu starten`,"conversation-rating.overlay.action.cancel":`Abbrechen`,"start-screen.intro":``,"start-screen.start-chat":`Chat starten`,"start-screen.waiting-for-login":`Warte auf Login ...`,"header.close-chat":`Chat minimieren`,"header.menu.title":`Menü`,"header.menu.restart-chat":`Chat neu starten`,"header.menu.expand-chat-window":`Fenster maximieren`,"header.menu.download-transcript":`Chatverlauf herunterladen`,"header.menu.send-transcript":`Chatverlauf versenden`,"header.menu.export-transcript":`Chatverlauf exportieren`,"header.menu.rate-conversation":`Chat bewerten`,"source-infos.close":`Schliessen`,"source-infos.open-source":`Quelle öffnen`,"source-infos.error.title":`Fehler`,"source-infos.error.info":`Oops! Etwas ist schiefgelaufen. Bitte versuche es erneut oder kontaktiere den Support, falls das Problem weiterhin besteht.`,"source-infos.highlight-loading.title":`Relevante Inhalte werden markiert...`,"source-infos.highlight-loading.description":`Einen Moment – die Quelle wird analysiert.`,"commands.show-more.action":`Weitere ...`,"commands.show-more.tooltip":`Weitere Befehle anzeigen`,"commands.show-less.action":`Weniger ...`,"commands.show-less.tooltip":`Weniger Befehle anzeigen`},gf={"page.title":`Bubble Chat Chatbot`,"message-input-label":`User input`,"message-input-placeholder":`Enter a message`,"message-input.actions.submit.label":`Send message`,"message-input.actions.start-audio-recording.label":`Start voice input`,"message-input.actions.stop-audio-recording.label":`Stop voice input`,"message-input.actions.submit-audio-recording.label":`Transmit voice input`,"guest-bubble.label":`Your message`,"message-input.actions.command.label":`Perform action`,"bot-bubble.label":`Message from the chatbot`,"bot-bubble.actions.label":`Message actions`,"bot-bubble.reaction.good":`I like`,"bot-bubble.reaction.bad":`I don't like it`,"bot-bubble.reaction.remove":`Remove marker`,"bot-bubble.reaction.say-more":`Please tell us more`,"bot-bubble.reaction.category.WRONG_INFORMATION":`Wrong`,"bot-bubble.reaction.category.MISSING_INFORMATION":`Incomplete`,"bot-bubble.reaction.category.OLD_INFORMATION":`Outdated`,"bot-bubble.reaction.category.UNCLEAR":`Unclear`,"bot-bubble.reaction.category.OFF_TOPIC":`Not relevant to the question`,"bot-bubble.reaction.comment":`Share your thoughts with us...`,"bot-bubble.reaction.close":`Close`,"bot-bubble.copy":`Copy`,"bot-bubble.sources":`Source list`,"bot-bubble.source.open":`Open source`,"bot-bubble.footnote":`Footnote`,"agent-bubble.label":`Message from the live agent`,"conversation.label":`Chat history`,"chatbot.typing":`Chatbot is typing`,"export-transcript.email.title":`Receive chat history`,"export-transcript.email.description":`Please enter the e-mail address to which the chat history should be sent.`,"export-transcript.email.cancel":`Cancel`,"export-transcript.email.send":`Send`,"export-transcript.email.placeholder":`E-mail address`,"export-transcript.email.invalid":`Please enter a valid e-mail address.`,"export-transcript.email.success":`The chat history was sent to the e-mail address provided.`,"general-conditions.header":`**Terms of use**`,"general-conditions.body":`Please consider the following points:
65
+ - Geben Sie im Chatfenster keine persönlichen Daten ein (Passwörter, Geburtsdatum usw.).`,"general-conditions.accept-conditions-note":`Mit der Verwendung des Chats erklären Sie sich mit den Nutzungsbedingungen einverstanden.`,"block-user-input.title":`Bitte auf die Antwort des Chatbots warten.`,"conversation-rating.call-to-action.title":`Bewerten Sie diesen Chat`,"conversation-rating.overlay.title":`Wie zufrieden sind Sie mit diesem Chat?`,"conversation-rating.overlay.guest-feedback.input-placeholder":`Feedback bitte hier eingeben (optional)`,"conversation-rating.overlay.star.very-bad":`Sehr schlecht`,"conversation-rating.overlay.star.very-good":`Sehr gut`,"conversation-rating.overlay.bot-message.rate-feedback.value-1":`Oh, das tönt nicht gut. Bitte geben Sie mir doch ein schriftliches Feedback, damit ich dazulernen kann.`,"conversation-rating.overlay.bot-message.rate-feedback.value-2":`Oh, das tönt nicht gut. Bitte geben Sie mir doch ein schriftliches Feedback, damit ich dazulernen kann.`,"conversation-rating.overlay.bot-message.rate-feedback.value-3":`Durchschnitt ist nicht mein Ziel, was kann ich noch verbessern?`,"conversation-rating.overlay.bot-message.rate-feedback.value-4":`Knapp daneben ist auch vorbei. Was kann ich noch verbessern, um das nächste Mal alle Sterne zu erreichen?`,"conversation-rating.overlay.bot-message.rate-feedback.value-5":`Perfekt! Dann hoffe ich, dass ich Sie wieder einmal so gut beraten kann.`,"conversation-rating.overlay.bot-message.submit-feedback":`Vielen Dank für die Rückmeldung. Ich bin bestrebt, mich ständig zu verbessern.`,"conversation-rating.overlay.action.submit":`Bewertung senden`,"conversation-rating.overlay.action.back-to-chat":`Zurück zum Chat`,"conversation-rating.overlay.action.close-chat":`Chat minimieren`,"conversation-rating.overlay.action.restart-chat":`Chat neu starten`,"conversation-rating.overlay.action.cancel":`Abbrechen`,"start-screen.intro":``,"start-screen.start-chat":`Chat starten`,"start-screen.waiting-for-login":`Warte auf Login ...`,"header.close-chat":`Chat minimieren`,"header.menu.title":`Menü`,"header.menu.restart-chat":`Chat neu starten`,"header.menu.expand-chat-window":`Fenster maximieren`,"header.menu.download-transcript":`Chatverlauf herunterladen`,"header.menu.send-transcript":`Chatverlauf versenden`,"header.menu.export-transcript":`Chatverlauf exportieren`,"header.menu.rate-conversation":`Chat bewerten`,"source-infos.close":`Schliessen`,"source-infos.open-source":`Quelle öffnen`,"source-infos.error.title":`Fehler`,"source-infos.error.info":`Oops! Etwas ist schiefgelaufen. Bitte versuche es erneut oder kontaktiere den Support, falls das Problem weiterhin besteht.`,"source-infos.highlight-loading.title":`Relevante Inhalte werden markiert...`,"source-infos.highlight-loading.description":`Einen Moment – die Quelle wird analysiert.`,"commands.show-more.action":`Weitere ...`,"commands.show-more.tooltip":`Weitere Befehle anzeigen`,"commands.show-less.action":`Weniger ...`,"commands.show-less.tooltip":`Weniger Befehle anzeigen`},_f={"page.title":`Bubble Chat Chatbot`,"message-input-label":`User input`,"message-input-placeholder":`Enter a message`,"message-input.actions.submit.label":`Send message`,"message-input.actions.start-audio-recording.label":`Start voice input`,"message-input.actions.stop-audio-recording.label":`Stop voice input`,"message-input.actions.submit-audio-recording.label":`Transmit voice input`,"guest-bubble.label":`Your message`,"message-input.actions.command.label":`Perform action`,"bot-bubble.label":`Message from the chatbot`,"bot-bubble.actions.label":`Message actions`,"bot-bubble.reaction.good":`I like`,"bot-bubble.reaction.bad":`I don't like it`,"bot-bubble.reaction.remove":`Remove marker`,"bot-bubble.reaction.say-more":`Please tell us more`,"bot-bubble.reaction.category.WRONG_INFORMATION":`Wrong`,"bot-bubble.reaction.category.MISSING_INFORMATION":`Incomplete`,"bot-bubble.reaction.category.OLD_INFORMATION":`Outdated`,"bot-bubble.reaction.category.UNCLEAR":`Unclear`,"bot-bubble.reaction.category.OFF_TOPIC":`Not relevant to the question`,"bot-bubble.reaction.comment":`Share your thoughts with us...`,"bot-bubble.reaction.close":`Close`,"bot-bubble.copy":`Copy`,"bot-bubble.sources":`Source list`,"bot-bubble.source.open":`Open source`,"bot-bubble.footnote":`Footnote`,"agent-bubble.label":`Message from the live agent`,"conversation.label":`Chat history`,"chatbot.typing":`Chatbot is typing`,"export-transcript.email.title":`Receive chat history`,"export-transcript.email.description":`Please enter the e-mail address to which the chat history should be sent.`,"export-transcript.email.cancel":`Cancel`,"export-transcript.email.send":`Send`,"export-transcript.email.placeholder":`E-mail address`,"export-transcript.email.invalid":`Please enter a valid e-mail address.`,"export-transcript.email.success":`The chat history was sent to the e-mail address provided.`,"general-conditions.header":`**Terms of use**`,"general-conditions.body":`Please consider the following points:
66
66
 
67
67
  - The chat history is stored in the EU area and can only be viewed by authorized personnel.
68
- - Do not enter any personal information in the chat window (passwords, date of birth, etc.)`,"general-conditions.accept-conditions-note":`By using the chat you agree to the terms of use.`,"block-user-input.title":`Please wait for the chatbot's response.`,"conversation-rating.call-to-action.title":`Rate this chat`,"conversation-rating.overlay.title":`How satisfied are you with this chat?`,"conversation-rating.overlay.guest-feedback.input-placeholder":`Please enter feedback here (optional)`,"conversation-rating.overlay.star.very-bad":`Very bad`,"conversation-rating.overlay.star.very-good":`Very good`,"conversation-rating.overlay.bot-message.rate-feedback.value-1":`Oh, that doesn't sound good. Please give me some feedback so that I can learn more.`,"conversation-rating.overlay.bot-message.rate-feedback.value-2":`Oh, that doesn't sound good. Please give me some feedback so that I can learn more.`,"conversation-rating.overlay.bot-message.rate-feedback.value-3":`Average is not my goal, what can I still improve?`,"conversation-rating.overlay.bot-message.rate-feedback.value-4":`Just missed is also over. What can I improve to achieve all stars next time?`,"conversation-rating.overlay.bot-message.rate-feedback.value-5":`Perfect! Then I hope that I can once again advise you so well.`,"conversation-rating.overlay.bot-message.submit-feedback":`Thank you for the feedback. I am constantly striving to improve.`,"conversation-rating.overlay.action.submit":`Send rating`,"conversation-rating.overlay.action.back-to-chat":`Close`,"conversation-rating.overlay.action.close-chat":`Minimize chat`,"conversation-rating.overlay.action.restart-chat":`Restart chat`,"conversation-rating.overlay.action.cancel":`Cancel`,"start-screen.intro":``,"start-screen.start-chat":`Start chat`,"start-screen.waiting-for-login":`Waiting for login ...`,"header.close-chat":`Minimize chat`,"header.menu.title":`Menu`,"header.menu.restart-chat":`Restart chat`,"header.menu.expand-chat-window":`Maximize window`,"header.menu.download-transcript":`Download chat history`,"header.menu.export-transcript":`Export chat history`,"header.menu.send-transcript":`Send chat history`,"header.menu.rate-conversation":`Rate chat`,"source-infos.close":`Close`,"source-infos.open-source":`Open source`,"source-infos.error.title":`Error`,"source-infos.error.info":`Oops! Something went wrong. Please try again or contact support if the problem persists.`,"source-infos.highlight-loading.title":`Relevant content is highlighted...`,"source-infos.highlight-loading.description":`One moment - the source is being analyzed.`,"commands.show-more.action":`More`,"commands.show-more.tooltip":`Show more commands`,"commands.show-less.action":`Less`,"commands.show-less.tooltip":`Show less commands`};function _f(e,t=``,n=`.`){let r={};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=e[i],o=t?`${t}${n}${i}`:i;typeof a==`object`&&a&&!Array.isArray(a)?Object.assign(r,_f(a,o,n)):r[o]=String(a)}return r}var vf={"page.title":`Bubble Chat Chatbot`,"message-input-label":`Input dell'utente`,"message-input-placeholder":`Saisir un message`,"message-input.actions.submit.label":`Envoyer un message`,"message-input.actions.start-audio-recording.label":`Démarrer la saisie vocale`,"message-input.actions.stop-audio-recording.label":`Arrêt de la saisie vocale`,"message-input.actions.submit-audio-recording.label":`Transmettre une entrée vocale`,"message-input.actions.command.label":`Exécuter l'action`,"guest-bubble.label":`Votre message`,"bot-bubble.label":`Message du chatbot`,"bot-bubble.actions.label":`Actions du message`,"bot-bubble.reaction.good":`J'aime bien`,"bot-bubble.reaction.bad":`Je n'aime pas`,"bot-bubble.reaction.remove":`Retirer le marqueur`,"bot-bubble.reaction.say-more":`Dis-nous en plus, s'il te plaît`,"bot-bubble.reaction.category.WRONG_INFORMATION":`Faux`,"bot-bubble.reaction.category.MISSING_INFORMATION":`Incomplet`,"bot-bubble.reaction.category.OLD_INFORMATION":`Obsolète`,"bot-bubble.reaction.category.UNCLEAR":`Peu clair`,"bot-bubble.reaction.category.OFF_TOPIC":`Hors sujet`,"bot-bubble.reaction.comment":`Partager ses pensées avec nous...`,"bot-bubble.reaction.close":`Fermer`,"bot-bubble.copy":`Copie`,"bot-bubble.sources":`Liste des sources`,"bot-bubble.source.open":`Ouvrir la source`,"bot-bubble.footnote":`Note de bas de page`,"agent-bubble.label":`Message de l'agent en direct`,"conversation.label":`Historique du chat`,"chatbot.typing":`Le chatbot écrit`,"export-transcript.email.title":`Recevoir l'historique du chat`,"export-transcript.email.description":`Veuillez indiquer l'adresse e-mail à laquelle l'historique de chat doit être envoyé.`,"export-transcript.email.cancel":`Annuler`,"export-transcript.email.send":`Envoyer`,"export-transcript.email.placeholder":`E-mail`,"export-transcript.email.invalid":`Veuillez entrer une adresse électronique valide.`,"export-transcript.email.success":`L'historique du chat a été envoyé à l'adresse e-mail fournie.`,"general-conditions.header":`**Conditions d'utilisation**`,"general-conditions.body":`Veuillez considérer les points suivants:
68
+ - Do not enter any personal information in the chat window (passwords, date of birth, etc.)`,"general-conditions.accept-conditions-note":`By using the chat you agree to the terms of use.`,"block-user-input.title":`Please wait for the chatbot's response.`,"conversation-rating.call-to-action.title":`Rate this chat`,"conversation-rating.overlay.title":`How satisfied are you with this chat?`,"conversation-rating.overlay.guest-feedback.input-placeholder":`Please enter feedback here (optional)`,"conversation-rating.overlay.star.very-bad":`Very bad`,"conversation-rating.overlay.star.very-good":`Very good`,"conversation-rating.overlay.bot-message.rate-feedback.value-1":`Oh, that doesn't sound good. Please give me some feedback so that I can learn more.`,"conversation-rating.overlay.bot-message.rate-feedback.value-2":`Oh, that doesn't sound good. Please give me some feedback so that I can learn more.`,"conversation-rating.overlay.bot-message.rate-feedback.value-3":`Average is not my goal, what can I still improve?`,"conversation-rating.overlay.bot-message.rate-feedback.value-4":`Just missed is also over. What can I improve to achieve all stars next time?`,"conversation-rating.overlay.bot-message.rate-feedback.value-5":`Perfect! Then I hope that I can once again advise you so well.`,"conversation-rating.overlay.bot-message.submit-feedback":`Thank you for the feedback. I am constantly striving to improve.`,"conversation-rating.overlay.action.submit":`Send rating`,"conversation-rating.overlay.action.back-to-chat":`Close`,"conversation-rating.overlay.action.close-chat":`Minimize chat`,"conversation-rating.overlay.action.restart-chat":`Restart chat`,"conversation-rating.overlay.action.cancel":`Cancel`,"start-screen.intro":``,"start-screen.start-chat":`Start chat`,"start-screen.waiting-for-login":`Waiting for login ...`,"header.close-chat":`Minimize chat`,"header.menu.title":`Menu`,"header.menu.restart-chat":`Restart chat`,"header.menu.expand-chat-window":`Maximize window`,"header.menu.download-transcript":`Download chat history`,"header.menu.export-transcript":`Export chat history`,"header.menu.send-transcript":`Send chat history`,"header.menu.rate-conversation":`Rate chat`,"source-infos.close":`Close`,"source-infos.open-source":`Open source`,"source-infos.error.title":`Error`,"source-infos.error.info":`Oops! Something went wrong. Please try again or contact support if the problem persists.`,"source-infos.highlight-loading.title":`Relevant content is highlighted...`,"source-infos.highlight-loading.description":`One moment - the source is being analyzed.`,"commands.show-more.action":`More`,"commands.show-more.tooltip":`Show more commands`,"commands.show-less.action":`Less`,"commands.show-less.tooltip":`Show less commands`};function vf(e,t=``,n=`.`){let r={};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=e[i],o=t?`${t}${n}${i}`:i;typeof a==`object`&&a&&!Array.isArray(a)?Object.assign(r,vf(a,o,n)):r[o]=String(a)}return r}var yf={"page.title":`Bubble Chat Chatbot`,"message-input-label":`Input dell'utente`,"message-input-placeholder":`Saisir un message`,"message-input.actions.submit.label":`Envoyer un message`,"message-input.actions.start-audio-recording.label":`Démarrer la saisie vocale`,"message-input.actions.stop-audio-recording.label":`Arrêt de la saisie vocale`,"message-input.actions.submit-audio-recording.label":`Transmettre une entrée vocale`,"message-input.actions.command.label":`Exécuter l'action`,"guest-bubble.label":`Votre message`,"bot-bubble.label":`Message du chatbot`,"bot-bubble.actions.label":`Actions du message`,"bot-bubble.reaction.good":`J'aime bien`,"bot-bubble.reaction.bad":`Je n'aime pas`,"bot-bubble.reaction.remove":`Retirer le marqueur`,"bot-bubble.reaction.say-more":`Dis-nous en plus, s'il te plaît`,"bot-bubble.reaction.category.WRONG_INFORMATION":`Faux`,"bot-bubble.reaction.category.MISSING_INFORMATION":`Incomplet`,"bot-bubble.reaction.category.OLD_INFORMATION":`Obsolète`,"bot-bubble.reaction.category.UNCLEAR":`Peu clair`,"bot-bubble.reaction.category.OFF_TOPIC":`Hors sujet`,"bot-bubble.reaction.comment":`Partager ses pensées avec nous...`,"bot-bubble.reaction.close":`Fermer`,"bot-bubble.copy":`Copie`,"bot-bubble.sources":`Liste des sources`,"bot-bubble.source.open":`Ouvrir la source`,"bot-bubble.footnote":`Note de bas de page`,"agent-bubble.label":`Message de l'agent en direct`,"conversation.label":`Historique du chat`,"chatbot.typing":`Le chatbot écrit`,"export-transcript.email.title":`Recevoir l'historique du chat`,"export-transcript.email.description":`Veuillez indiquer l'adresse e-mail à laquelle l'historique de chat doit être envoyé.`,"export-transcript.email.cancel":`Annuler`,"export-transcript.email.send":`Envoyer`,"export-transcript.email.placeholder":`E-mail`,"export-transcript.email.invalid":`Veuillez entrer une adresse électronique valide.`,"export-transcript.email.success":`L'historique du chat a été envoyé à l'adresse e-mail fournie.`,"general-conditions.header":`**Conditions d'utilisation**`,"general-conditions.body":`Veuillez considérer les points suivants:
69
69
 
70
70
  - L'historique du chat est stocké dans l'espace UE et ne peut être consulté que par les personnes autorisées.
71
- - Ne saisissez aucune information personnelle dans la fenêtre de chat (mots de passe, date de naissance, etc.).`,"general-conditions.accept-conditions-note":`En utilisant le chat, vous acceptez les conditions d'utilisation.`,"block-user-input.title":`Veuillez attendre la réponse du chatbot.`,"conversation-rating.call-to-action.title":`Notez ce chat`,"conversation-rating.overlay.title":`Dans quelle mesure êtes-vous satisfait de ce chat ?`,"conversation-rating.overlay.guest-feedback.input-placeholder":`Veuillez saisir vos commentaires ici (facultatif)`,"conversation-rating.overlay.star.very-bad":`Très mauvais`,"conversation-rating.overlay.star.very-good":`Très bien`,"conversation-rating.overlay.bot-message.rate-feedback.value-1":`Oh, ça ne sonne pas bien. Merci de me donner un feedback pour que je puisse en apprendre davantage.`,"conversation-rating.overlay.bot-message.rate-feedback.value-2":`Oh, ça ne sonne pas bien. Merci de me donner un feedback pour que je puisse en apprendre davantage.`,"conversation-rating.overlay.bot-message.rate-feedback.value-3":`La moyenne n'est pas mon objectif, que puis-je encore améliorer ?`,"conversation-rating.overlay.bot-message.rate-feedback.value-4":`Le rater de peu, c'est le rater aussi. Que puis-je encore améliorer pour obtenir toutes les étoiles la prochaine fois ?`,"conversation-rating.overlay.bot-message.rate-feedback.value-5":`Parfait ! Alors j'espère pouvoir vous conseiller aussi bien une fois de plus.`,"conversation-rating.overlay.bot-message.submit-feedback":`Merci beaucoup pour votre feed-back. Je m'efforce de m'améliorer en permanence.`,"conversation-rating.overlay.action.submit":`Envoyer`,"conversation-rating.overlay.action.back-to-chat":`Fermer`,"conversation-rating.overlay.action.close-chat":`Minimiser le chat`,"conversation-rating.overlay.action.restart-chat":`Redémarrer le chat`,"conversation-rating.overlay.action.cancel":`Annuler`,"start-screen.intro":``,"start-screen.start-chat":`Démarrer le chat`,"start-screen.waiting-for-login":`En attente de connexion ...`,"header.close-chat":`Minimiser le chat`,"header.menu.title":`Menu`,"header.menu.restart-chat":`Redémarrer le chat`,"header.menu.expand-chat-window":`Agrandir la fenêtre`,"header.menu.download-transcript":`Télécharger l'historique du chat`,"header.menu.send-transcript":`Envoyer l'historique du chat`,"header.menu.export-transcript":`Exporter l'historique du chat`,"header.menu.rate-conversation":`Évaluer le chat`,"source-infos.close":`Fermer`,"source-infos.open-source":`Ouvrir source`,"source-infos.error.title":`Erreur`,"source-infos.error.info":`Oups ! Quelque chose s'est mal passé. Merci de réessayer ou de contacter le support si le problème persiste.`,"source-infos.highlight-loading.title":`Contenus pertinents en surbrillance...`,"source-infos.highlight-loading.description":`Un instant - la source est analysée`,"commands.show-more.action":`Plus`,"commands.show-more.tooltip":`Afficher plus de commandes`,"commands.show-less.action":`Moins`,"commands.show-less.tooltip":`Afficher moins de commandes`},yf={"page.title":`Bubble Chat Chatbot`,"message-input-label":`Input dell'utente`,"message-input-placeholder":`Inserire un messaggio`,"message-input.actions.submit.label":`Invia messaggio`,"message-input.actions.start-audio-recording.label":`Avviare l'input vocale`,"message-input.actions.stop-audio-recording.label":`Interrompere l'input vocale`,"message-input.actions.submit-audio-recording.label":`Trasmettere l'input vocale`,"message-input.actions.command.label":`Esegui azione`,"guest-bubble.label":`Il tuo messaggio`,"bot-bubble.label":`Messaggio del chatbot`,"bot-bubble.actions.label":`Azioni del messaggio`,"bot-bubble.reaction.good":`Mi piace`,"bot-bubble.reaction.bad":`Non mi piace`,"bot-bubble.reaction.remove":`Rimuovere il marcatore`,"bot-bubble.reaction.say-more":`Disci più, per favore`,"bot-bubble.reaction.category.WRONG_INFORMATION":`Errate`,"bot-bubble.reaction.category.MISSING_INFORMATION":`Incompleto`,"bot-bubble.reaction.category.OLD_INFORMATION":`Obsoleta`,"bot-bubble.reaction.category.UNCLEAR":`Poco chiaro`,"bot-bubble.reaction.category.OFF_TOPIC":`Non pertinente alla domanda`,"bot-bubble.reaction.comment":`Condividete con noi i vostri pensieri...`,"bot-bubble.reaction.close":`Chiudere`,"bot-bubble.copy":`Copia`,"bot-bubble.sources":`Elenco delle fonti`,"bot-bubble.source.open":`Fonte aperta`,"bot-bubble.footnote":`Nota a piè di pagina`,"agent-bubble.label":`Messaggio dell'agente dal vivo`,"conversation.label":`Cronologia chat`,"chatbot.typing":`Il chatbot sta scrivendo`,"export-transcript.email.title":`Ricevere la cronologia della chat`,"export-transcript.email.description":`Inserire l'indirizzo e-mail a cui inviare la cronologia della chat.`,"export-transcript.email.cancel":`Annulla`,"export-transcript.email.send":`Invia`,"export-transcript.email.placeholder":`E-mail`,"export-transcript.email.invalid":`Inserire un indirizzo e-mail valido.`,"export-transcript.email.success":`La cronologia della chat è stata inviata all'indirizzo e-mail fornito.`,"general-conditions.header":`**Condizioni di utilizzo**`,"general-conditions.body":`Si prega di considerare i seguenti punti:
71
+ - Ne saisissez aucune information personnelle dans la fenêtre de chat (mots de passe, date de naissance, etc.).`,"general-conditions.accept-conditions-note":`En utilisant le chat, vous acceptez les conditions d'utilisation.`,"block-user-input.title":`Veuillez attendre la réponse du chatbot.`,"conversation-rating.call-to-action.title":`Notez ce chat`,"conversation-rating.overlay.title":`Dans quelle mesure êtes-vous satisfait de ce chat ?`,"conversation-rating.overlay.guest-feedback.input-placeholder":`Veuillez saisir vos commentaires ici (facultatif)`,"conversation-rating.overlay.star.very-bad":`Très mauvais`,"conversation-rating.overlay.star.very-good":`Très bien`,"conversation-rating.overlay.bot-message.rate-feedback.value-1":`Oh, ça ne sonne pas bien. Merci de me donner un feedback pour que je puisse en apprendre davantage.`,"conversation-rating.overlay.bot-message.rate-feedback.value-2":`Oh, ça ne sonne pas bien. Merci de me donner un feedback pour que je puisse en apprendre davantage.`,"conversation-rating.overlay.bot-message.rate-feedback.value-3":`La moyenne n'est pas mon objectif, que puis-je encore améliorer ?`,"conversation-rating.overlay.bot-message.rate-feedback.value-4":`Le rater de peu, c'est le rater aussi. Que puis-je encore améliorer pour obtenir toutes les étoiles la prochaine fois ?`,"conversation-rating.overlay.bot-message.rate-feedback.value-5":`Parfait ! Alors j'espère pouvoir vous conseiller aussi bien une fois de plus.`,"conversation-rating.overlay.bot-message.submit-feedback":`Merci beaucoup pour votre feed-back. Je m'efforce de m'améliorer en permanence.`,"conversation-rating.overlay.action.submit":`Envoyer`,"conversation-rating.overlay.action.back-to-chat":`Fermer`,"conversation-rating.overlay.action.close-chat":`Minimiser le chat`,"conversation-rating.overlay.action.restart-chat":`Redémarrer le chat`,"conversation-rating.overlay.action.cancel":`Annuler`,"start-screen.intro":``,"start-screen.start-chat":`Démarrer le chat`,"start-screen.waiting-for-login":`En attente de connexion ...`,"header.close-chat":`Minimiser le chat`,"header.menu.title":`Menu`,"header.menu.restart-chat":`Redémarrer le chat`,"header.menu.expand-chat-window":`Agrandir la fenêtre`,"header.menu.download-transcript":`Télécharger l'historique du chat`,"header.menu.send-transcript":`Envoyer l'historique du chat`,"header.menu.export-transcript":`Exporter l'historique du chat`,"header.menu.rate-conversation":`Évaluer le chat`,"source-infos.close":`Fermer`,"source-infos.open-source":`Ouvrir source`,"source-infos.error.title":`Erreur`,"source-infos.error.info":`Oups ! Quelque chose s'est mal passé. Merci de réessayer ou de contacter le support si le problème persiste.`,"source-infos.highlight-loading.title":`Contenus pertinents en surbrillance...`,"source-infos.highlight-loading.description":`Un instant - la source est analysée`,"commands.show-more.action":`Plus`,"commands.show-more.tooltip":`Afficher plus de commandes`,"commands.show-less.action":`Moins`,"commands.show-less.tooltip":`Afficher moins de commandes`},bf={"page.title":`Bubble Chat Chatbot`,"message-input-label":`Input dell'utente`,"message-input-placeholder":`Inserire un messaggio`,"message-input.actions.submit.label":`Invia messaggio`,"message-input.actions.start-audio-recording.label":`Avviare l'input vocale`,"message-input.actions.stop-audio-recording.label":`Interrompere l'input vocale`,"message-input.actions.submit-audio-recording.label":`Trasmettere l'input vocale`,"message-input.actions.command.label":`Esegui azione`,"guest-bubble.label":`Il tuo messaggio`,"bot-bubble.label":`Messaggio del chatbot`,"bot-bubble.actions.label":`Azioni del messaggio`,"bot-bubble.reaction.good":`Mi piace`,"bot-bubble.reaction.bad":`Non mi piace`,"bot-bubble.reaction.remove":`Rimuovere il marcatore`,"bot-bubble.reaction.say-more":`Disci più, per favore`,"bot-bubble.reaction.category.WRONG_INFORMATION":`Errate`,"bot-bubble.reaction.category.MISSING_INFORMATION":`Incompleto`,"bot-bubble.reaction.category.OLD_INFORMATION":`Obsoleta`,"bot-bubble.reaction.category.UNCLEAR":`Poco chiaro`,"bot-bubble.reaction.category.OFF_TOPIC":`Non pertinente alla domanda`,"bot-bubble.reaction.comment":`Condividete con noi i vostri pensieri...`,"bot-bubble.reaction.close":`Chiudere`,"bot-bubble.copy":`Copia`,"bot-bubble.sources":`Elenco delle fonti`,"bot-bubble.source.open":`Fonte aperta`,"bot-bubble.footnote":`Nota a piè di pagina`,"agent-bubble.label":`Messaggio dell'agente dal vivo`,"conversation.label":`Cronologia chat`,"chatbot.typing":`Il chatbot sta scrivendo`,"export-transcript.email.title":`Ricevere la cronologia della chat`,"export-transcript.email.description":`Inserire l'indirizzo e-mail a cui inviare la cronologia della chat.`,"export-transcript.email.cancel":`Annulla`,"export-transcript.email.send":`Invia`,"export-transcript.email.placeholder":`E-mail`,"export-transcript.email.invalid":`Inserire un indirizzo e-mail valido.`,"export-transcript.email.success":`La cronologia della chat è stata inviata all'indirizzo e-mail fornito.`,"general-conditions.header":`**Condizioni di utilizzo**`,"general-conditions.body":`Si prega di considerare i seguenti punti:
72
72
 
73
73
  - La cronologia delle chat è memorizzata nell'area UE e può essere visualizzata solo da persone autorizzate.
74
- - Non inserire dati personali nella finestra di chat (password, data di nascita, ecc.).`,"general-conditions.accept-conditions-note":`Utilizzando la chat si accettano le condizioni d'uso.`,"block-user-input.title":`Attendere la risposta del chatbot.`,"conversation-rating.call-to-action.title":`Valuta questa chat`,"conversation-rating.overlay.title":`Quanto sei soddisfatto di questa chat?`,"conversation-rating.overlay.guest-feedback.input-placeholder":`Inserisci qui il tuo feedback (opzionale)`,"conversation-rating.overlay.star.very-bad":`Molto male`,"conversation-rating.overlay.star.very-good":`Molto buono`,"conversation-rating.overlay.bot-message.rate-feedback.value-1":`Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.`,"conversation-rating.overlay.bot-message.rate-feedback.value-2":`Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.`,"conversation-rating.overlay.bot-message.rate-feedback.value-3":`La media non è il mio obiettivo, cosa posso ancora migliorare?`,"conversation-rating.overlay.bot-message.rate-feedback.value-4":`Anche l'assenza è finita. Cosa posso migliorare per ottenere tutte le stelle la prossima volta?`,"conversation-rating.overlay.bot-message.rate-feedback.value-5":`Perfetto! Allora spero di potervi consigliare ancora una volta bene.`,"conversation-rating.overlay.bot-message.submit-feedback":`Grazie mille per il feedback. Mi impegno costantemente per migliorare.`,"conversation-rating.overlay.action.submit":`Invia`,"conversation-rating.overlay.action.back-to-chat":`Chiudere`,"conversation-rating.overlay.action.close-chat":`Minimizzare la chat`,"conversation-rating.overlay.action.restart-chat":`Riavviare la chat`,"conversation-rating.overlay.action.cancel":`Annulla`,"start-screen.intro":``,"start-screen.start-chat":`Avviare la chat`,"start-screen.waiting-for-login":`In attesa di login ...`,"header.close-chat":`Minimizzare la chat`,"header.menu.title":`Menu`,"header.menu.restart-chat":`Riavviare la chat`,"header.menu.expand-chat-window":`Espandere la finestra`,"header.menu.download-transcript":`Scaricare la trascrizione`,"header.menu.send-transcript":`Inviare la trascrizione`,"header.menu.export-transcript":`Esportare la trascrizione`,"header.menu.rate-conversation":`Valutare la conversazione`,"source-infos.close":`Chiudere`,"source-infos.open-source":`Fonte aperta`,"source-infos.error.title":`Errore`,"source-infos.error.info":`Ops! Qualcosa è andato storto. Riprovare o contattare l'assistenza se il problema persiste.`,"source-infos.highlight-loading.title":`Il contenuto rilevante è evidenziato...`,"source-infos.highlight-loading.description":`Un momento - la fonte è in fase di analisi`,"commands.show-more.action":`Di più`,"commands.show-more.tooltip":`Mostra più comandi`,"commands.show-less.action":`Meno`,"commands.show-less.tooltip":`Mostra meno comandi`},bf=[`de`,`en`,`fr`,`it`],xf={locale:`de`,messages:hf},Sf=(e,t)=>{if(bf.includes(e)){let n=Cf(e),r=_f(t);return{...n,...r}}return t},Cf=e=>{switch(e.toString()){case`en`:return gf;case`fr`:return vf;case`it`:return yf;default:return hf}},wf=(e=Tf,t)=>{switch(t.type){case Ii:return Object.assign({},e,{connectionState:ta.CONNECTING});case Li:return Object.assign({},e,{connectionState:ta.CONNECTED});case Ri:return Object.assign({},e,{connectionState:ta.DISCONNECTED});case zi:return Object.assign({},e,{connectionState:ta.RECONNECTED});case Bi:return Object.assign({},e,{sessionId:t.sessionId});case Vi:return Object.assign({},e,{sessionId:t.payload.sessionId,userId:t.payload.userId});case Hi:return Object.assign({},e,{sessionId:void 0});default:return e}},Tf={connectionState:ta.DISCONNECTED,sessionId:void 0,userId:void 0,queryString:window.location.search},Ef=(e=jf,t)=>{switch(t.type){case Ci:return jf;case Vi:return Of({type:`webclient.chat.started`}),e;case Hi:return Of({type:`webclient.chat.ended`}),e;case at.TYPING_ON:return Object.assign({},e,{isBotTyping:!0});case at.TYPING_OFF:return Object.assign({},e,{isBotTyping:!1});case at.MESSAGE_FROM_GUEST:case at.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return Df(e,t.message,t.meta);case at.MESSAGE_TO_GUEST:{Of(t);let n=Object.assign({},t.message,{_id:t.meta.actionId}),r=e.messages.filter(e=>e._id===t.meta.actionId).length>0;return Object.assign({},e,{isBotTyping:!1,messages:r?e.messages:e.messages.concat([n]),quickReplies:n.quickReplies?n.quickReplies:[]})}case _t:{let n=t.messages,r=n.length?n[n.length-1]:void 0;return Object.assign({},e,{isBotTyping:!1,messages:n,quickReplies:r?.quickReplies||[]})}case gt:return Of(t.message),e;case at.EVENT_TO_GUEST:return Of(t.event),e;case at.DRAWER_OPEN:return Object.assign({},e,{drawerContentUrl:t.payload.parameters.contentUrl});case at.DRAWER_CLOSE:return Object.assign({},e,{drawerContentUrl:void 0});case at.GUEST_LOCALE_CHANGED:return Object.assign({},e,{locale:t.payload.locale});case Tt:return Of(t),e;case Et:return Of(t),{...e,conversationRating:{...e.conversationRating,opener:void 0}};case yt:{let n=new ft(t.transcription,new ut);return Df(e,Object.assign({},n,{_id:Zt()}))}case at.TRANSCRIPT_ITEM_GUEST_REACTION:{let n=e.messages.map(e=>e._id===t.payload.actionId?Object.assign({},e,t.payload.reaction?{reaction:{type:t.payload.reaction,category:t.payload.category,comment:t.payload.comment}}:{reaction:void 0}):e);return Object.assign({},e,{messages:n})}case bt:{let n={enabled:!0,rating:t.payload.rating};return Object.assign({},e,{conversationRating:n})}case at.CONVERSATION_RATING_FROM_GUEST:{let n={...e.conversationRating,rating:t.payload};return Object.assign({},e,{conversationRating:n})}case Ti:{let n={...e.conversationRating,opener:t.payload.opener,...t.payload.defaultRating?{rating:{value:t.payload.defaultRating,feedback:e.conversationRating.rating?.feedback||``}}:{}};return Object.assign({},e,{conversationRating:n})}case Ei:{let t={...e.conversationRating,opener:void 0};return Object.assign({},e,{conversationRating:t})}case Ct:return{...e,sourceInfos:{type:`loading`,chunkId:t.payload.chunkId}};case St:{let{highlighted:n}=t.payload;return e.sourceInfos?.type===`loaded`&&n?{...e,sourceInfos:{...e.sourceInfos,highlighted:!0}}:{...e,sourceInfos:{type:`loading-error`}}}case xt:{let n=e.sourceInfos?.type,{chunkId:r,knowledgeBaseType:i,title:a,content:o,highlighted:s,url:c}=t.payload,l=e.sourceInfos?.type===`loading`||e.sourceInfos?.type===`loaded`?e.sourceInfos?.chunkId:void 0;return l&&l!==r?e:n===`loading`||n===`loaded`&&s?{...e,sourceInfos:{type:`loaded`,chunkId:r,knowledgeBaseType:i,title:a,content:o,highlighted:s,url:c}}:e}case wt:return{...e,sourceInfos:void 0};case wi:return{...e,showTranscriptMailOverlay:!e.showTranscriptMailOverlay,conversationRating:{...e.conversationRating,opener:void 0}};default:return e}},Df=(e,t,n)=>{let r=e.messages[e.messages.length-1],i=r?.text===t.text,a=!!n?.actionId,o=r&&!r._id&&r.sender.type===t.sender.type;if(a&&o){let r=Object.assign({},t,{_id:n.actionId}),i=[...e.messages];return i[i.length-1]=r,Object.assign({},e,{messages:i,quickReplies:[]})}return r&&r.sender.type===t.sender.type&&i?e:Object.assign({},e,{messages:e.messages.concat([t]),quickReplies:[]})},Of=e=>{if(Af()){let t=kf();window.top?.postMessage(e,t)}else e.type===`webclient.change.url`&&window.open(e.url)},kf=()=>{try{return document.referrer?new URL(document.referrer).origin:`*`}catch{return`*`}},Af=()=>typeof window<`u`&&window.self!==window.top,jf={messages:[],quickReplies:[],isBotTyping:!1,showTranscriptMailOverlay:!1,conversationRating:{enabled:!1}},Mf=ti({name:`intl`,initialState:xf,reducers:{updateIntl:(e,t)=>{e.locale=t.payload.language,e.messages=t.payload.messages}}}),{updateIntl:Nf}=Mf.actions,Pf=Mf.reducer,Ff=ti({name:`settings`,initialState:{version:void 0,requiresUserAuthentication:!1,enableStartScreen:void 0,enableStandaloneView:!1,enableTranscriptExportEmail:!1,enableTranscriptExportPdf:!1,enableGeneralConditions:!1,enableSpeechSupport:!1,commands:[],menuItems:[],allowedEmbedOrigins:void 0},reducers:{setSettings(e,t){e.version&&e.version!==t.payload.version?(console.log(`version changed, reloading chat window`),window.location.reload()):(e.version=t.payload.version,e.requiresUserAuthentication=t.payload.requiresUserAuthentication,e.enableStartScreen=t.payload.enableStartScreen,e.enableStandaloneView=t.payload.enableStandaloneView,e.enableTranscriptExportEmail=t.payload.enableTranscriptExportEmail,e.enableTranscriptExportPdf=t.payload.enableTranscriptExportPdf,e.enableGeneralConditions=t.payload.enableGeneralConditions,e.enableSpeechSupport=t.payload.enableSpeechSupport,e.commands=t.payload.commands,e.menuItems=t.payload.menuItems||[],e.allowedEmbedOrigins=t.payload.allowedEmbedOrigins)}}}),{setSettings:If}=Ff.actions,Lf=Ff.reducer,Rf=cn({settings:Lf,chat:Ef,startScreen:Si,connection:wf,intl:Pf}),zf=`bubble-chat`,Bf=`state-last-saved-at`,Vf=`state`,Hf=e=>{try{if(!Gf()||Wf(Kf(e,Bf)))return;{let t=Kf(e,Vf);if(t===null)return;let n=JSON.parse(t),r=n.connection?.queryString;if(r!==void 0&&!Yf(r,window.location.search)){console.log(`Ignoring persisted state due to different query string`);return}else return n}}catch(e){console.error(e);return}},Uf=(e,t)=>{try{qf(e,Vf,JSON.stringify(t)),qf(e,Bf,new Date().toISOString())}catch(e){console.error(e)}},Wf=e=>{if(e===null)return!1;let t=new Date(e);return t.setHours(t.getHours()+12),new Date>t},Gf=()=>typeof localStorage<`u`,Kf=(e,t)=>{let n=Jf(e,t);return localStorage.getItem(n)},qf=(e,t,n)=>{let r=Jf(e,t);return localStorage.setItem(r,n)},Jf=(e,t)=>`${zf}-${e}-${t}`,Yf=(e,t)=>{let n=new URLSearchParams(e),r=new URLSearchParams(t);n.delete(`referrer`),r.delete(`referrer`);let i=Array.from(n.entries()).sort(),a=Array.from(r.entries()).sort();return i.length===a.length?i.every(([e,t],n)=>{let[r,i]=a[n];return e===r&&t===i}):!1},Xf=Object.create(null);Xf.open=`0`,Xf.close=`1`,Xf.ping=`2`,Xf.pong=`3`,Xf.message=`4`,Xf.upgrade=`5`,Xf.noop=`6`;var Zf=Object.create(null);Object.keys(Xf).forEach(e=>{Zf[Xf[e]]=e});var Qf={type:`error`,data:`parser error`},$f=typeof Blob==`function`||typeof Blob<`u`&&Object.prototype.toString.call(Blob)===`[object BlobConstructor]`,ep=typeof ArrayBuffer==`function`,tp=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,np=({type:e,data:t},n,r)=>$f&&t instanceof Blob?n?r(t):rp(t,r):ep&&(t instanceof ArrayBuffer||tp(t))?n?r(t):rp(new Blob([t]),r):r(Xf[e]+(t||``)),rp=(e,t)=>{let n=new FileReader;return n.onload=function(){let e=n.result.split(`,`)[1];t(`b`+(e||``))},n.readAsDataURL(e)};function ip(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var ap;function op(e,t){if($f&&e.data instanceof Blob)return e.data.arrayBuffer().then(ip).then(t);if(ep&&(e.data instanceof ArrayBuffer||tp(e.data)))return t(ip(e.data));np(e,!1,e=>{ap||=new TextEncoder,t(ap.encode(e))})}var sp=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,cp=typeof Uint8Array>`u`?[]:new Uint8Array(256);for(let e=0;e<64;e++)cp[sp.charCodeAt(e)]=e;var lp=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);let l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=cp[e.charCodeAt(r)],o=cp[e.charCodeAt(r+1)],s=cp[e.charCodeAt(r+2)],c=cp[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},up=typeof ArrayBuffer==`function`,dp=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:pp(e,t)};let n=e.charAt(0);return n===`b`?{type:`message`,data:fp(e.substring(1),t)}:Zf[n]?e.length>1?{type:Zf[n],data:e.substring(1)}:{type:Zf[n]}:Qf},fp=(e,t)=>up?pp(lp(e),t):{base64:!0,data:e},pp=(e,t)=>{switch(t){case`blob`:return e instanceof Blob?e:new Blob([e]);default:return e instanceof ArrayBuffer?e:e.buffer}},mp=``,hp=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{np(e,!1,e=>{r[a]=e,++i===n&&t(r.join(mp))})})},gp=(e,t)=>{let n=e.split(mp),r=[];for(let e=0;e<n.length;e++){let i=dp(n[e],t);if(r.push(i),i.type===`error`)break}return r};function _p(){return new TransformStream({transform(e,t){op(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var vp;function yp(e){return e.reduce((e,t)=>e+t.length,0)}function bp(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function xp(e,t){vp||=new TextDecoder;let n=[],r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(yp(n)<1)break;let e=bp(n,1);a=(e[0]&128)==128,i=e[0]&127,r=i<126?3:i===126?1:2}else if(r===1){if(yp(n)<2)break;let e=bp(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(r===2){if(yp(n)<8)break;let e=bp(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>2**21-1){s.enqueue(Qf);break}i=a*2**32+t.getUint32(4),r=3}else{if(yp(n)<i)break;let e=bp(n,i);s.enqueue(dp(a?e:vp.decode(e),t)),r=0}if(i===0||i>e){s.enqueue(Qf);break}}}})}function Sp(e){if(e)return Cp(e)}function Cp(e){for(var t in Sp.prototype)e[t]=Sp.prototype[t];return e}Sp.prototype.on=Sp.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},Sp.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Sp.prototype.off=Sp.prototype.removeListener=Sp.prototype.removeAllListeners=Sp.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},Sp.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},Sp.prototype.emitReserved=Sp.prototype.emit,Sp.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},Sp.prototype.hasListeners=function(e){return!!this.listeners(e).length};var wp=typeof Promise==`function`&&typeof Promise.resolve==`function`?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Tp=typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)(),Ep=`arraybuffer`;function Dp(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var Op=Tp.setTimeout,kp=Tp.clearTimeout;function Ap(e,t){t.useNativeTimers?(e.setTimeoutFn=Op.bind(Tp),e.clearTimeoutFn=kp.bind(Tp)):(e.setTimeoutFn=Tp.setTimeout.bind(Tp),e.clearTimeoutFn=Tp.clearTimeout.bind(Tp))}var jp=1.33;function Mp(e){return typeof e==`string`?Np(e):Math.ceil((e.byteLength||e.size)*jp)}function Np(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Pp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Fp(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function Ip(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var Lp=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},Rp=class extends Sp{constructor(e){super(),this.writable=!1,Ap(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new Lp(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`&&this.write(e)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=dp(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=Fp(e);return t.length?`?`+t:``}},zp=class extends Rp{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once(`pollComplete`,function(){--e||t()})),this.writable||(e++,this.once(`drain`,function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}onData(e){gp(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`&&this._poll())}doClose(){let e=()=>{this.write([{type:`close`}])};this.readyState===`open`?e():this.once(`open`,e)}write(e){this.writable=!1,hp(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Pp()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},Bp=!1;try{Bp=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}var Vp=Bp;function Hp(){}var Up=class extends zp{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},Wp=class e extends Sp{constructor(e,t,n){super(),this.createRequest=e,Ap(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=Dp(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(this._xhr===void 0||this._xhr===null)){if(this._xhr.onreadystatechange=Hp,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(Wp.requestsCount=0,Wp.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,Gp);else if(typeof addEventListener==`function`){let e=`onpagehide`in Tp?`pagehide`:`unload`;addEventListener(e,Gp,!1)}}function Gp(){for(let e in Wp.requests)Wp.requests.hasOwnProperty(e)&&Wp.requests[e].abort()}var Kp=(function(){let e=Jp({xdomain:!1});return e&&e.responseType!==null})(),qp=class extends Up{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=Kp&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Wp(Jp,this.uri(),e)}};function Jp(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||Vp))return new XMLHttpRequest}catch{}if(!t)try{return new Tp[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var Yp=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,Xp=class extends Rp{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=Yp?{}:Dp(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;np(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{}r&&wp(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Pp()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Zp=Tp.WebSocket||Tp.MozWebSocket,Qp={websocket:class extends Xp{createSocket(e,t,n){return Yp?new Zp(e,t,n):t?new Zp(e,t):new Zp(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends Rp{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=xp(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=_p();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&wp(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:qp},$p=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,em=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function tm(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=$p.exec(e||``),a={},o=14;for(;o--;)a[em[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=nm(a,a.path),a.queryKey=rm(a,a.query),a}function nm(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function rm(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var im=typeof addEventListener==`function`&&typeof removeEventListener==`function`,am=[];im&&addEventListener(`offline`,()=>{am.forEach(e=>e())},!1);var om=class e extends Sp{constructor(e,t){if(super(),this.binaryType=Ep,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=tm(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=tm(t.host).host);Ap(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=Ip(this.opts.query)),im&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},am.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data);break}}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=Mp(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,wp(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={},n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),im&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=am.indexOf(this._offlineEventListener);e!==-1&&am.splice(e,1)}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};om.protocol=4;var sm=class extends om{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;om.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,e=>{if(!n)if(e.type===`pong`&&e.data===`probe`){if(this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;om.priorWebsocketSuccess=t.name===`websocket`,this.transport.pause(()=>{n||this.readyState!==`closed`&&(l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error(`probe error`);e.transport=t.name,this.emitReserved(`upgradeError`,e)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=e=>{let n=Error(`probe error: `+e);n.transport=t.name,i(),this.emitReserved(`upgradeError`,n)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&i()}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},cm=class extends sm{constructor(e,t={}){let n=typeof e==`object`?e:t;(!n.transports||n.transports&&typeof n.transports[0]==`string`)&&(n.transports=(n.transports||[`polling`,`websocket`,`webtransport`]).map(e=>Qp[e]).filter(e=>!!e)),super(e,n)}};cm.protocol;function lm(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=n===void 0?`https://`+e:n.protocol+`//`+e),r=tm(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var um=typeof ArrayBuffer==`function`,dm=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,fm=Object.prototype.toString,pm=typeof Blob==`function`||typeof Blob<`u`&&fm.call(Blob)===`[object BlobConstructor]`,mm=typeof File==`function`||typeof File<`u`&&fm.call(File)===`[object FileConstructor]`;function hm(e){return um&&(e instanceof ArrayBuffer||dm(e))||pm&&e instanceof Blob||mm&&e instanceof File}function gm(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(gm(e[t]))return!0;return!1}if(hm(e))return!0;if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return gm(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&gm(e[t]))return!0;return!1}function _m(e){let t=[],n=e.data,r=e;return r.data=vm(n,t),r.attachments=t.length,{packet:r,buffers:t}}function vm(e,t){if(!e)return e;if(hm(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=vm(e[r],t);return n}else if(typeof e==`object`&&!(e instanceof Date)){let n={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=vm(e[r],t));return n}return e}function ym(e,t){return e.data=bm(e.data,t),delete e.attachments,e}function bm(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=bm(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=bm(e[n],t));return e}var xm=s({Decoder:()=>Tm,Encoder:()=>wm,PacketType:()=>Cm,isPacketValid:()=>Mm,protocol:()=>5}),Sm=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],Cm;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(Cm||={});var wm=class{constructor(e){this.replacer=e}encode(e){return(e.type===Cm.EVENT||e.type===Cm.ACK)&&gm(e)?this.encodeAsBinary({type:e.type===Cm.EVENT?Cm.BINARY_EVENT:Cm.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===Cm.BINARY_EVENT||e.type===Cm.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=_m(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},Tm=class e extends Sp{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e==`function`?{reviver:e}:e)}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===Cm.BINARY_EVENT;n||t.type===Cm.BINARY_ACK?(t.type=n?Cm.EVENT:Cm.ACK,this.reconstructor=new Em(t),t.attachments===0&&super.emitReserved(`decoded`,t)):super.emitReserved(`decoded`,t)}else if(hm(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(Cm[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===Cm.BINARY_EVENT||r.type===Cm.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);let a=Number(i);if(!Om(a)||a<0)throw Error(`Illegal attachments`);if(a>this.opts.maxAttachments)throw Error(`too many attachments`);r.attachments=a}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&!(t.charAt(n)===`,`||n===t.length););r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case Cm.CONNECT:return Am(t);case Cm.DISCONNECT:return t===void 0;case Cm.CONNECT_ERROR:return typeof t==`string`||Am(t);case Cm.EVENT:case Cm.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&Sm.indexOf(t[0])===-1);case Cm.ACK:case Cm.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},Em=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=ym(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Dm(e){return typeof e==`string`}var Om=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e};function km(e){return e===void 0||Om(e)}function Am(e){return Object.prototype.toString.call(e)===`[object Object]`}function jm(e,t){switch(e){case Cm.CONNECT:return t===void 0||Am(t);case Cm.DISCONNECT:return t===void 0;case Cm.EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&Sm.indexOf(t[0])===-1);case Cm.ACK:return Array.isArray(t);case Cm.CONNECT_ERROR:return typeof t==`string`||Am(t);default:return!1}}function Mm(e){return Dm(e.nsp)&&km(e.id)&&jm(e.type,e.data)}function Nm(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var Pm=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Fm=class extends Sp{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[Nm(e,`open`,this.onopen.bind(this)),Nm(e,`packet`,this.onpacket.bind(this)),Nm(e,`error`,this.onerror.bind(this)),Nm(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(Pm.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:Cm.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r||(i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],e===null?(this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Cm.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Cm.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case Cm.EVENT:case Cm.BINARY_EVENT:this.onevent(e);break;case Cm.ACK:case Cm.BINARY_ACK:this.onack(e);break;case Cm.DISCONNECT:this.ondisconnect();break;case Cm.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:Cm.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];typeof t==`function`&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved(`connect`)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Cm.DISCONNECT}),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function Im(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Im.prototype.duration=function(){var e=this.ms*this.factor**+ this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},Im.prototype.reset=function(){this.attempts=0},Im.prototype.setMin=function(e){this.ms=e},Im.prototype.setMax=function(e){this.max=e},Im.prototype.setJitter=function(e){this.jitter=e};var Lm=class extends Sp{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,Ap(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new Im({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||xm;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf(`open`))return this;this.engine=new cm(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=Nm(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=Nm(t,`error`,i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push(Nm(e,`ping`,this.onping.bind(this)),Nm(e,`data`,this.ondata.bind(this)),Nm(e,`error`,this.onerror.bind(this)),Nm(e,`close`,this.onclose.bind(this)),Nm(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){wp(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Fm(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},Rm={};function zm(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=lm(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=Rm[i]&&a in Rm[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?c=new Lm(r,t):(Rm[i]||(Rm[i]=new Lm(r,t)),c=Rm[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(zm,{Manager:Lm,Socket:Fm,io:zm,connect:zm});var Bm=[at.MESSAGE_TO_GUEST,at.EVENT_TO_GUEST,at.TYPING_ON,at.TYPING_OFF,at.RESTART_CHAT_REQUEST,...Ui,...Ot,`@@localize/SET_ACTIVE_LANGUAGE`,`@@localize/ADD_TRANSLATION_FOR_LANGUAGE`],Vm=({dispatch:e,getState:t})=>n=>{let r=null;return i=>{let a=n(i);if(i.type===`CONNECT`)r?.disconnect(),e(Ki()),r=zm({path:`/website-messenger/${i.clientName}/socket.io`,query:i.querystrings}),r.on(`action`,e),r.on(`connect`,()=>e(qi())),r.on(`disconnect`,()=>e(Ji())),r.on(`reconnect`,()=>e(Yi())),r.on(`set-translations`,(t,n)=>{e(Nf({language:t,messages:Sf(t,n)}))}),r.on(`set-settings`,t=>{e(If(t))}),r.on(`enable-conversation-rating`,t=>e(Nt(t))),r.on(`speech-transcription`,t=>e(At(t))),r.on(`restore-client-state`,t=>{e(Gi(t.sessionId)),e(It(t.messages))}),r.on(`expand-window`,({devices:t,initial:n=!1})=>{e({type:Tt,devices:t,initial:n})}),r.on(`restart-chat`,()=>{e(Zi())}),r.on(`login-success`,t=>{e(vi({loginToken:t.loginToken}))});else if(i.type===`start-screen/requestLogin`)r?.emit(`login-requested`,i.payload);else if(i.type===`START`)r?.emit(`start-chat`,i.payload);else if(i.type===`CLEAR_SESSION_ID`)r?.emit(`terminate-session`,i.payload);else if(i.type===`webclient.get.started`)r?.emit(`get-started`,JSON.stringify(i));else if(i.type===`AUDIO_MESSAGE_FROM_USER`)r?.emit(`audio-message`,i.buffer);else if(i.type===at.CONVERSATION_RATING_FROM_GUEST)r?.emit(`conversation-rating`,i.payload);else if(i.type===`webclient.transcript.pdf.download`){let{connection:{sessionId:e}}=t();if(e){let t=Qt(),n=new URL(`/${encodeURIComponent(t)}/transcript-pdf/${encodeURIComponent(e)}`,window.location.origin);window.location.href=n.toString()}}else Bm.indexOf(i.type)===-1&&i.meta===void 0&&r&&r.emit(`action`,JSON.stringify(i));return a}},Hm=Qt(),Um=qr({middleware:e=>e().concat(Vm),reducer:Rf,preloadedState:{...Hf(Hm),intl:xf}});Um.subscribe(Ic(()=>{let e=Um.getState();Uf(Hm,{connection:e.connection,startScreen:e.startScreen})},1e3)),(0,b.createRoot)(document.getElementById(`root`)).render((0,X.jsx)(qe,{store:Um,children:(0,X.jsx)(mf,{})}));
75
- //# sourceMappingURL=index-C0xNZWSy.js.map
74
+ - Non inserire dati personali nella finestra di chat (password, data di nascita, ecc.).`,"general-conditions.accept-conditions-note":`Utilizzando la chat si accettano le condizioni d'uso.`,"block-user-input.title":`Attendere la risposta del chatbot.`,"conversation-rating.call-to-action.title":`Valuta questa chat`,"conversation-rating.overlay.title":`Quanto sei soddisfatto di questa chat?`,"conversation-rating.overlay.guest-feedback.input-placeholder":`Inserisci qui il tuo feedback (opzionale)`,"conversation-rating.overlay.star.very-bad":`Molto male`,"conversation-rating.overlay.star.very-good":`Molto buono`,"conversation-rating.overlay.bot-message.rate-feedback.value-1":`Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.`,"conversation-rating.overlay.bot-message.rate-feedback.value-2":`Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.`,"conversation-rating.overlay.bot-message.rate-feedback.value-3":`La media non è il mio obiettivo, cosa posso ancora migliorare?`,"conversation-rating.overlay.bot-message.rate-feedback.value-4":`Anche l'assenza è finita. Cosa posso migliorare per ottenere tutte le stelle la prossima volta?`,"conversation-rating.overlay.bot-message.rate-feedback.value-5":`Perfetto! Allora spero di potervi consigliare ancora una volta bene.`,"conversation-rating.overlay.bot-message.submit-feedback":`Grazie mille per il feedback. Mi impegno costantemente per migliorare.`,"conversation-rating.overlay.action.submit":`Invia`,"conversation-rating.overlay.action.back-to-chat":`Chiudere`,"conversation-rating.overlay.action.close-chat":`Minimizzare la chat`,"conversation-rating.overlay.action.restart-chat":`Riavviare la chat`,"conversation-rating.overlay.action.cancel":`Annulla`,"start-screen.intro":``,"start-screen.start-chat":`Avviare la chat`,"start-screen.waiting-for-login":`In attesa di login ...`,"header.close-chat":`Minimizzare la chat`,"header.menu.title":`Menu`,"header.menu.restart-chat":`Riavviare la chat`,"header.menu.expand-chat-window":`Espandere la finestra`,"header.menu.download-transcript":`Scaricare la trascrizione`,"header.menu.send-transcript":`Inviare la trascrizione`,"header.menu.export-transcript":`Esportare la trascrizione`,"header.menu.rate-conversation":`Valutare la conversazione`,"source-infos.close":`Chiudere`,"source-infos.open-source":`Fonte aperta`,"source-infos.error.title":`Errore`,"source-infos.error.info":`Ops! Qualcosa è andato storto. Riprovare o contattare l'assistenza se il problema persiste.`,"source-infos.highlight-loading.title":`Il contenuto rilevante è evidenziato...`,"source-infos.highlight-loading.description":`Un momento - la fonte è in fase di analisi`,"commands.show-more.action":`Di più`,"commands.show-more.tooltip":`Mostra più comandi`,"commands.show-less.action":`Meno`,"commands.show-less.tooltip":`Mostra meno comandi`},xf=[`de`,`en`,`fr`,`it`],Sf={locale:`de`,messages:gf},Cf=(e,t)=>{if(xf.includes(e)){let n=wf(e),r=vf(t);return{...n,...r}}return t},wf=e=>{switch(e.toString()){case`en`:return _f;case`fr`:return yf;case`it`:return bf;default:return gf}},Tf=(e=Ef,t)=>{switch(t.type){case Ii:return Object.assign({},e,{connectionState:ta.CONNECTING});case Li:return Object.assign({},e,{connectionState:ta.CONNECTED});case Ri:return Object.assign({},e,{connectionState:ta.DISCONNECTED});case zi:return Object.assign({},e,{connectionState:ta.RECONNECTED});case Bi:return Object.assign({},e,{sessionId:t.sessionId});case Vi:return Object.assign({},e,{sessionId:t.payload.sessionId,userId:t.payload.userId});case Hi:return Object.assign({},e,{sessionId:void 0});default:return e}},Ef={connectionState:ta.DISCONNECTED,sessionId:void 0,userId:void 0,queryString:window.location.search},Df=(e=Mf,t)=>{switch(t.type){case Ci:return Mf;case Vi:return kf({type:`webclient.chat.started`}),e;case Hi:return kf({type:`webclient.chat.ended`}),e;case at.TYPING_ON:return Object.assign({},e,{isBotTyping:!0});case at.TYPING_OFF:return Object.assign({},e,{isBotTyping:!1});case at.MESSAGE_FROM_GUEST:case at.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return Of(e,t.message,t.meta);case at.MESSAGE_TO_GUEST:{kf(t);let n=Object.assign({},t.message,{_id:t.meta.actionId}),r=e.messages.filter(e=>e._id===t.meta.actionId).length>0;return Object.assign({},e,{isBotTyping:!1,messages:r?e.messages:e.messages.concat([n]),quickReplies:n.quickReplies?n.quickReplies:[]})}case _t:{let n=t.messages,r=n.length?n[n.length-1]:void 0;return Object.assign({},e,{isBotTyping:!1,messages:n,quickReplies:r?.quickReplies||[]})}case gt:return kf(t.message),e;case at.EVENT_TO_GUEST:return kf(t.event),e;case at.DRAWER_OPEN:return Object.assign({},e,{drawerContentUrl:t.payload.parameters.contentUrl});case at.DRAWER_CLOSE:return Object.assign({},e,{drawerContentUrl:void 0});case at.GUEST_LOCALE_CHANGED:return Object.assign({},e,{locale:t.payload.locale});case Tt:return kf(t),e;case Et:return kf(t),{...e,conversationRating:{...e.conversationRating,opener:void 0}};case yt:{let n=new ft(t.transcription,new ut);return Of(e,Object.assign({},n,{_id:Zt()}))}case at.TRANSCRIPT_ITEM_GUEST_REACTION:{let n=e.messages.map(e=>e._id===t.payload.actionId?Object.assign({},e,t.payload.reaction?{reaction:{type:t.payload.reaction,category:t.payload.category,comment:t.payload.comment}}:{reaction:void 0}):e);return Object.assign({},e,{messages:n})}case bt:{let n={enabled:!0,rating:t.payload.rating};return Object.assign({},e,{conversationRating:n})}case at.CONVERSATION_RATING_FROM_GUEST:{let n={...e.conversationRating,rating:t.payload};return Object.assign({},e,{conversationRating:n})}case Ti:{let n={...e.conversationRating,opener:t.payload.opener,...t.payload.defaultRating?{rating:{value:t.payload.defaultRating,feedback:e.conversationRating.rating?.feedback||``}}:{}};return Object.assign({},e,{conversationRating:n})}case Ei:{let t={...e.conversationRating,opener:void 0};return Object.assign({},e,{conversationRating:t})}case Ct:return{...e,sourceInfos:{type:`loading`,chunkId:t.payload.chunkId}};case St:{let{highlighted:n}=t.payload;return e.sourceInfos?.type===`loaded`&&n?{...e,sourceInfos:{...e.sourceInfos,highlighted:!0}}:{...e,sourceInfos:{type:`loading-error`}}}case xt:{let n=e.sourceInfos?.type,{chunkId:r,knowledgeBaseType:i,title:a,content:o,highlighted:s,url:c}=t.payload,l=e.sourceInfos?.type===`loading`||e.sourceInfos?.type===`loaded`?e.sourceInfos?.chunkId:void 0;return l&&l!==r?e:n===`loading`||n===`loaded`&&s?{...e,sourceInfos:{type:`loaded`,chunkId:r,knowledgeBaseType:i,title:a,content:o,highlighted:s,url:c}}:e}case wt:return{...e,sourceInfos:void 0};case wi:return{...e,showTranscriptMailOverlay:!e.showTranscriptMailOverlay,conversationRating:{...e.conversationRating,opener:void 0}};default:return e}},Of=(e,t,n)=>{let r=e.messages[e.messages.length-1],i=r?.text===t.text,a=!!n?.actionId,o=r&&!r._id&&r.sender.type===t.sender.type;if(a&&o){let r=Object.assign({},t,{_id:n.actionId}),i=[...e.messages];return i[i.length-1]=r,Object.assign({},e,{messages:i,quickReplies:[]})}return r&&r.sender.type===t.sender.type&&i?e:Object.assign({},e,{messages:e.messages.concat([t]),quickReplies:[]})},kf=e=>{if(jf()){let t=Af();window.top?.postMessage(e,t)}else e.type===`webclient.change.url`&&window.open(e.url)},Af=()=>{try{return document.referrer?new URL(document.referrer).origin:`*`}catch{return`*`}},jf=()=>typeof window<`u`&&window.self!==window.top,Mf={messages:[],quickReplies:[],isBotTyping:!1,showTranscriptMailOverlay:!1,conversationRating:{enabled:!1}},Nf=ti({name:`intl`,initialState:Sf,reducers:{updateIntl:(e,t)=>{e.locale=t.payload.language,e.messages=t.payload.messages}}}),{updateIntl:Pf}=Nf.actions,Ff=Nf.reducer,If=ti({name:`settings`,initialState:{version:void 0,requiresUserAuthentication:!1,enableStartScreen:void 0,enableStandaloneView:!1,enableTranscriptExportEmail:!1,enableTranscriptExportPdf:!1,enableGeneralConditions:!1,enableSpeechSupport:!1,commands:[],menuItems:[],allowedEmbedOrigins:void 0},reducers:{setSettings(e,t){e.version&&e.version!==t.payload.version?(console.log(`version changed, reloading chat window`),window.location.reload()):(e.version=t.payload.version,e.requiresUserAuthentication=t.payload.requiresUserAuthentication,e.enableStartScreen=t.payload.enableStartScreen,e.enableStandaloneView=t.payload.enableStandaloneView,e.enableTranscriptExportEmail=t.payload.enableTranscriptExportEmail,e.enableTranscriptExportPdf=t.payload.enableTranscriptExportPdf,e.enableGeneralConditions=t.payload.enableGeneralConditions,e.enableSpeechSupport=t.payload.enableSpeechSupport,e.commands=t.payload.commands,e.menuItems=t.payload.menuItems||[],e.allowedEmbedOrigins=t.payload.allowedEmbedOrigins)}}}),{setSettings:Lf}=If.actions,Rf=If.reducer,zf=cn({settings:Rf,chat:Df,startScreen:Si,connection:Tf,intl:Ff}),Bf=`bubble-chat`,Vf=`state-last-saved-at`,Hf=`state`,Uf=e=>{try{if(!Kf()||Gf(qf(e,Vf)))return;{let t=qf(e,Hf);if(t===null)return;let n=JSON.parse(t),r=n.connection?.queryString;if(r!==void 0&&!Xf(r,window.location.search)){console.log(`Ignoring persisted state due to different query string`);return}else return n}}catch(e){console.error(e);return}},Wf=(e,t)=>{try{Jf(e,Hf,JSON.stringify(t)),Jf(e,Vf,new Date().toISOString())}catch(e){console.error(e)}},Gf=e=>{if(e===null)return!1;let t=new Date(e);return t.setHours(t.getHours()+12),new Date>t},Kf=()=>typeof localStorage<`u`,qf=(e,t)=>{let n=Yf(e,t);return localStorage.getItem(n)},Jf=(e,t,n)=>{let r=Yf(e,t);return localStorage.setItem(r,n)},Yf=(e,t)=>`${Bf}-${e}-${t}`,Xf=(e,t)=>{let n=new URLSearchParams(e),r=new URLSearchParams(t);n.delete(`referrer`),r.delete(`referrer`);let i=Array.from(n.entries()).sort(),a=Array.from(r.entries()).sort();return i.length===a.length?i.every(([e,t],n)=>{let[r,i]=a[n];return e===r&&t===i}):!1},Zf=Object.create(null);Zf.open=`0`,Zf.close=`1`,Zf.ping=`2`,Zf.pong=`3`,Zf.message=`4`,Zf.upgrade=`5`,Zf.noop=`6`;var Qf=Object.create(null);Object.keys(Zf).forEach(e=>{Qf[Zf[e]]=e});var $f={type:`error`,data:`parser error`},ep=typeof Blob==`function`||typeof Blob<`u`&&Object.prototype.toString.call(Blob)===`[object BlobConstructor]`,tp=typeof ArrayBuffer==`function`,np=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,rp=({type:e,data:t},n,r)=>ep&&t instanceof Blob?n?r(t):ip(t,r):tp&&(t instanceof ArrayBuffer||np(t))?n?r(t):ip(new Blob([t]),r):r(Zf[e]+(t||``)),ip=(e,t)=>{let n=new FileReader;return n.onload=function(){let e=n.result.split(`,`)[1];t(`b`+(e||``))},n.readAsDataURL(e)};function ap(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var op;function sp(e,t){if(ep&&e.data instanceof Blob)return e.data.arrayBuffer().then(ap).then(t);if(tp&&(e.data instanceof ArrayBuffer||np(e.data)))return t(ap(e.data));rp(e,!1,e=>{op||=new TextEncoder,t(op.encode(e))})}var cp=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,lp=typeof Uint8Array>`u`?[]:new Uint8Array(256);for(let e=0;e<64;e++)lp[cp.charCodeAt(e)]=e;var up=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);let l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=lp[e.charCodeAt(r)],o=lp[e.charCodeAt(r+1)],s=lp[e.charCodeAt(r+2)],c=lp[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},dp=typeof ArrayBuffer==`function`,fp=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:mp(e,t)};let n=e.charAt(0);return n===`b`?{type:`message`,data:pp(e.substring(1),t)}:Qf[n]?e.length>1?{type:Qf[n],data:e.substring(1)}:{type:Qf[n]}:$f},pp=(e,t)=>dp?mp(up(e),t):{base64:!0,data:e},mp=(e,t)=>{switch(t){case`blob`:return e instanceof Blob?e:new Blob([e]);default:return e instanceof ArrayBuffer?e:e.buffer}},hp=``,gp=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{rp(e,!1,e=>{r[a]=e,++i===n&&t(r.join(hp))})})},_p=(e,t)=>{let n=e.split(hp),r=[];for(let e=0;e<n.length;e++){let i=fp(n[e],t);if(r.push(i),i.type===`error`)break}return r};function vp(){return new TransformStream({transform(e,t){sp(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var yp;function bp(e){return e.reduce((e,t)=>e+t.length,0)}function xp(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Sp(e,t){yp||=new TextDecoder;let n=[],r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(bp(n)<1)break;let e=xp(n,1);a=(e[0]&128)==128,i=e[0]&127,r=i<126?3:i===126?1:2}else if(r===1){if(bp(n)<2)break;let e=xp(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(r===2){if(bp(n)<8)break;let e=xp(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>2**21-1){s.enqueue($f);break}i=a*2**32+t.getUint32(4),r=3}else{if(bp(n)<i)break;let e=xp(n,i);s.enqueue(fp(a?e:yp.decode(e),t)),r=0}if(i===0||i>e){s.enqueue($f);break}}}})}function Cp(e){if(e)return wp(e)}function wp(e){for(var t in Cp.prototype)e[t]=Cp.prototype[t];return e}Cp.prototype.on=Cp.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},Cp.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Cp.prototype.off=Cp.prototype.removeListener=Cp.prototype.removeAllListeners=Cp.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},Cp.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},Cp.prototype.emitReserved=Cp.prototype.emit,Cp.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},Cp.prototype.hasListeners=function(e){return!!this.listeners(e).length};var Tp=typeof Promise==`function`&&typeof Promise.resolve==`function`?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Ep=typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)(),Dp=`arraybuffer`;function Op(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var kp=Ep.setTimeout,Ap=Ep.clearTimeout;function jp(e,t){t.useNativeTimers?(e.setTimeoutFn=kp.bind(Ep),e.clearTimeoutFn=Ap.bind(Ep)):(e.setTimeoutFn=Ep.setTimeout.bind(Ep),e.clearTimeoutFn=Ep.clearTimeout.bind(Ep))}var Mp=1.33;function Np(e){return typeof e==`string`?Pp(e):Math.ceil((e.byteLength||e.size)*Mp)}function Pp(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Fp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ip(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function Lp(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var Rp=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},zp=class extends Cp{constructor(e){super(),this.writable=!1,jp(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new Rp(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`&&this.write(e)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=fp(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=Ip(e);return t.length?`?`+t:``}},Bp=class extends zp{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once(`pollComplete`,function(){--e||t()})),this.writable||(e++,this.once(`drain`,function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}onData(e){_p(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`&&this._poll())}doClose(){let e=()=>{this.write([{type:`close`}])};this.readyState===`open`?e():this.once(`open`,e)}write(e){this.writable=!1,gp(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Fp()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},Vp=!1;try{Vp=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}var Hp=Vp;function Up(){}var Wp=class extends Bp{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},Gp=class e extends Cp{constructor(e,t,n){super(),this.createRequest=e,jp(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=Op(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(this._xhr===void 0||this._xhr===null)){if(this._xhr.onreadystatechange=Up,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(Gp.requestsCount=0,Gp.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,Kp);else if(typeof addEventListener==`function`){let e=`onpagehide`in Ep?`pagehide`:`unload`;addEventListener(e,Kp,!1)}}function Kp(){for(let e in Gp.requests)Gp.requests.hasOwnProperty(e)&&Gp.requests[e].abort()}var qp=(function(){let e=Yp({xdomain:!1});return e&&e.responseType!==null})(),Jp=class extends Wp{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=qp&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Gp(Yp,this.uri(),e)}};function Yp(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||Hp))return new XMLHttpRequest}catch{}if(!t)try{return new Ep[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var Xp=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,Zp=class extends zp{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=Xp?{}:Op(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;rp(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{}r&&Tp(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Fp()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Qp=Ep.WebSocket||Ep.MozWebSocket,$p={websocket:class extends Zp{createSocket(e,t,n){return Xp?new Qp(e,t,n):t?new Qp(e,t):new Qp(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends zp{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=Sp(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=vp();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&Tp(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:Jp},em=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,tm=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function nm(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=em.exec(e||``),a={},o=14;for(;o--;)a[tm[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=rm(a,a.path),a.queryKey=im(a,a.query),a}function rm(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function im(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var am=typeof addEventListener==`function`&&typeof removeEventListener==`function`,om=[];am&&addEventListener(`offline`,()=>{om.forEach(e=>e())},!1);var sm=class e extends Cp{constructor(e,t){if(super(),this.binaryType=Dp,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=nm(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=nm(t.host).host);jp(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=Lp(this.opts.query)),am&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},om.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data);break}}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=Np(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Tp(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={},n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),am&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=om.indexOf(this._offlineEventListener);e!==-1&&om.splice(e,1)}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};sm.protocol=4;var cm=class extends sm{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;sm.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,e=>{if(!n)if(e.type===`pong`&&e.data===`probe`){if(this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;sm.priorWebsocketSuccess=t.name===`websocket`,this.transport.pause(()=>{n||this.readyState!==`closed`&&(l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error(`probe error`);e.transport=t.name,this.emitReserved(`upgradeError`,e)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=e=>{let n=Error(`probe error: `+e);n.transport=t.name,i(),this.emitReserved(`upgradeError`,n)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&i()}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},lm=class extends cm{constructor(e,t={}){let n=typeof e==`object`?e:t;(!n.transports||n.transports&&typeof n.transports[0]==`string`)&&(n.transports=(n.transports||[`polling`,`websocket`,`webtransport`]).map(e=>$p[e]).filter(e=>!!e)),super(e,n)}};lm.protocol;function um(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=n===void 0?`https://`+e:n.protocol+`//`+e),r=nm(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var dm=typeof ArrayBuffer==`function`,fm=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,pm=Object.prototype.toString,mm=typeof Blob==`function`||typeof Blob<`u`&&pm.call(Blob)===`[object BlobConstructor]`,hm=typeof File==`function`||typeof File<`u`&&pm.call(File)===`[object FileConstructor]`;function gm(e){return dm&&(e instanceof ArrayBuffer||fm(e))||mm&&e instanceof Blob||hm&&e instanceof File}function _m(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(_m(e[t]))return!0;return!1}if(gm(e))return!0;if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return _m(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&_m(e[t]))return!0;return!1}function vm(e){let t=[],n=e.data,r=e;return r.data=ym(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ym(e,t){if(!e)return e;if(gm(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=ym(e[r],t);return n}else if(typeof e==`object`&&!(e instanceof Date)){let n={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=ym(e[r],t));return n}return e}function bm(e,t){return e.data=xm(e.data,t),delete e.attachments,e}function xm(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=xm(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=xm(e[n],t));return e}var Sm=s({Decoder:()=>Em,Encoder:()=>Tm,PacketType:()=>wm,isPacketValid:()=>Nm,protocol:()=>5}),Cm=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],wm;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(wm||={});var Tm=class{constructor(e){this.replacer=e}encode(e){return(e.type===wm.EVENT||e.type===wm.ACK)&&_m(e)?this.encodeAsBinary({type:e.type===wm.EVENT?wm.BINARY_EVENT:wm.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===wm.BINARY_EVENT||e.type===wm.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=vm(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},Em=class e extends Cp{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e==`function`?{reviver:e}:e)}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===wm.BINARY_EVENT;n||t.type===wm.BINARY_ACK?(t.type=n?wm.EVENT:wm.ACK,this.reconstructor=new Dm(t),t.attachments===0&&super.emitReserved(`decoded`,t)):super.emitReserved(`decoded`,t)}else if(gm(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(wm[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===wm.BINARY_EVENT||r.type===wm.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);let a=Number(i);if(!km(a)||a<0)throw Error(`Illegal attachments`);if(a>this.opts.maxAttachments)throw Error(`too many attachments`);r.attachments=a}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&!(t.charAt(n)===`,`||n===t.length););r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case wm.CONNECT:return jm(t);case wm.DISCONNECT:return t===void 0;case wm.CONNECT_ERROR:return typeof t==`string`||jm(t);case wm.EVENT:case wm.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&Cm.indexOf(t[0])===-1);case wm.ACK:case wm.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},Dm=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=bm(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Om(e){return typeof e==`string`}var km=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e};function Am(e){return e===void 0||km(e)}function jm(e){return Object.prototype.toString.call(e)===`[object Object]`}function Mm(e,t){switch(e){case wm.CONNECT:return t===void 0||jm(t);case wm.DISCONNECT:return t===void 0;case wm.EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&Cm.indexOf(t[0])===-1);case wm.ACK:return Array.isArray(t);case wm.CONNECT_ERROR:return typeof t==`string`||jm(t);default:return!1}}function Nm(e){return Om(e.nsp)&&Am(e.id)&&Mm(e.type,e.data)}function Pm(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var Fm=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Im=class extends Cp{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[Pm(e,`open`,this.onopen.bind(this)),Pm(e,`packet`,this.onpacket.bind(this)),Pm(e,`error`,this.onerror.bind(this)),Pm(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(Fm.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:wm.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r||(i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],e===null?(this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:wm.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case wm.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case wm.EVENT:case wm.BINARY_EVENT:this.onevent(e);break;case wm.ACK:case wm.BINARY_ACK:this.onack(e);break;case wm.DISCONNECT:this.ondisconnect();break;case wm.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:wm.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];typeof t==`function`&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved(`connect`)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:wm.DISCONNECT}),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function Lm(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Lm.prototype.duration=function(){var e=this.ms*this.factor**+ this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},Lm.prototype.reset=function(){this.attempts=0},Lm.prototype.setMin=function(e){this.ms=e},Lm.prototype.setMax=function(e){this.max=e},Lm.prototype.setJitter=function(e){this.jitter=e};var Rm=class extends Cp{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,jp(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new Lm({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||Sm;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf(`open`))return this;this.engine=new lm(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=Pm(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=Pm(t,`error`,i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push(Pm(e,`ping`,this.onping.bind(this)),Pm(e,`data`,this.ondata.bind(this)),Pm(e,`error`,this.onerror.bind(this)),Pm(e,`close`,this.onclose.bind(this)),Pm(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){Tp(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Im(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},zm={};function Bm(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=um(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=zm[i]&&a in zm[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?c=new Rm(r,t):(zm[i]||(zm[i]=new Rm(r,t)),c=zm[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(Bm,{Manager:Rm,Socket:Im,io:Bm,connect:Bm});var Vm=[at.MESSAGE_TO_GUEST,at.EVENT_TO_GUEST,at.TYPING_ON,at.TYPING_OFF,at.RESTART_CHAT_REQUEST,...Ui,...Ot,`@@localize/SET_ACTIVE_LANGUAGE`,`@@localize/ADD_TRANSLATION_FOR_LANGUAGE`],Hm=({dispatch:e,getState:t})=>n=>{let r=null;return i=>{let a=n(i);if(i.type===`CONNECT`)r?.disconnect(),e(Ki()),r=Bm({path:`/website-messenger/${i.clientName}/socket.io`,query:i.querystrings}),r.on(`action`,e),r.on(`connect`,()=>e(qi())),r.on(`disconnect`,()=>e(Ji())),r.on(`reconnect`,()=>e(Yi())),r.on(`set-translations`,(t,n)=>{e(Pf({language:t,messages:Cf(t,n)}))}),r.on(`set-settings`,t=>{e(Lf(t))}),r.on(`enable-conversation-rating`,t=>e(Nt(t))),r.on(`speech-transcription`,t=>e(At(t))),r.on(`restore-client-state`,t=>{e(Gi(t.sessionId)),e(It(t.messages))}),r.on(`expand-window`,({devices:t,initial:n=!1})=>{e({type:Tt,devices:t,initial:n})}),r.on(`restart-chat`,()=>{e(Zi())}),r.on(`login-success`,t=>{e(vi({loginToken:t.loginToken}))});else if(i.type===`start-screen/requestLogin`)r?.emit(`login-requested`,i.payload);else if(i.type===`START`)r?.emit(`start-chat`,i.payload);else if(i.type===`CLEAR_SESSION_ID`)r?.emit(`terminate-session`,i.payload);else if(i.type===`webclient.get.started`)r?.emit(`get-started`,JSON.stringify(i));else if(i.type===`AUDIO_MESSAGE_FROM_USER`)r?.emit(`audio-message`,i.buffer);else if(i.type===at.CONVERSATION_RATING_FROM_GUEST)r?.emit(`conversation-rating`,i.payload);else if(i.type===`webclient.transcript.pdf.download`){let{connection:{sessionId:e}}=t();if(e){let t=Qt(),n=new URL(`/${encodeURIComponent(t)}/transcript-pdf/${encodeURIComponent(e)}`,window.location.origin);window.location.href=n.toString()}}else Vm.indexOf(i.type)===-1&&i.meta===void 0&&r&&r.emit(`action`,JSON.stringify(i));return a}},Um=Qt(),Wm=qr({middleware:e=>e().concat(Hm),reducer:zf,preloadedState:{...Uf(Um),intl:Sf}});Wm.subscribe(Ic(()=>{let e=Wm.getState();Wf(Um,{connection:e.connection,startScreen:e.startScreen})},1e3)),(0,b.createRoot)(document.getElementById(`root`)).render((0,X.jsx)(qe,{store:Wm,children:(0,X.jsx)(hf,{})}));
75
+ //# sourceMappingURL=index-BN_vDBCn.js.map