@botfabrik/engine-webclient 4.99.6 → 4.99.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -90,35 +90,35 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
|
|
|
90
90
|
*
|
|
91
91
|
* This source code is licensed under the MIT license found in the
|
|
92
92
|
* LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/var dy;function xA(){if(dy)return Be;dy=1;var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,i=t?Symbol.for("react.portal"):60106,s=t?Symbol.for("react.fragment"):60107,u=t?Symbol.for("react.strict_mode"):60108,c=t?Symbol.for("react.profiler"):60114,d=t?Symbol.for("react.provider"):60109,h=t?Symbol.for("react.context"):60110,m=t?Symbol.for("react.async_mode"):60111,p=t?Symbol.for("react.concurrent_mode"):60111,b=t?Symbol.for("react.forward_ref"):60112,_=t?Symbol.for("react.suspense"):60113,x=t?Symbol.for("react.suspense_list"):60120,U=t?Symbol.for("react.memo"):60115,R=t?Symbol.for("react.lazy"):60116,q=t?Symbol.for("react.block"):60121,z=t?Symbol.for("react.fundamental"):60117,E=t?Symbol.for("react.responder"):60118,w=t?Symbol.for("react.scope"):60119;function S(A){if(typeof A=="object"&&A!==null){var Z=A.$$typeof;switch(Z){case r:switch(A=A.type,A){case m:case p:case s:case c:case u:case _:return A;default:switch(A=A&&A.$$typeof,A){case h:case b:case R:case U:case d:return A;default:return Z}}case i:return Z}}}function H(A){return S(A)===p}return Be.AsyncMode=m,Be.ConcurrentMode=p,Be.ContextConsumer=h,Be.ContextProvider=d,Be.Element=r,Be.ForwardRef=b,Be.Fragment=s,Be.Lazy=R,Be.Memo=U,Be.Portal=i,Be.Profiler=c,Be.StrictMode=u,Be.Suspense=_,Be.isAsyncMode=function(A){return H(A)||S(A)===m},Be.isConcurrentMode=H,Be.isContextConsumer=function(A){return S(A)===h},Be.isContextProvider=function(A){return S(A)===d},Be.isElement=function(A){return typeof A=="object"&&A!==null&&A.$$typeof===r},Be.isForwardRef=function(A){return S(A)===b},Be.isFragment=function(A){return S(A)===s},Be.isLazy=function(A){return S(A)===R},Be.isMemo=function(A){return S(A)===U},Be.isPortal=function(A){return S(A)===i},Be.isProfiler=function(A){return S(A)===c},Be.isStrictMode=function(A){return S(A)===u},Be.isSuspense=function(A){return S(A)===_},Be.isValidElementType=function(A){return typeof A=="string"||typeof A=="function"||A===s||A===p||A===c||A===u||A===_||A===x||typeof A=="object"&&A!==null&&(A.$$typeof===R||A.$$typeof===U||A.$$typeof===d||A.$$typeof===h||A.$$typeof===b||A.$$typeof===z||A.$$typeof===E||A.$$typeof===w||A.$$typeof===q)},Be.typeOf=S,Be}var hy;function OA(){return hy||(hy=1,Xf.exports=xA()),Xf.exports}var Zf,my;function RA(){if(my)return Zf;my=1;var t=OA(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};c[t.ForwardRef]=s,c[t.Memo]=u;function d(R){return t.isMemo(R)?u:c[R.$$typeof]||r}var h=Object.defineProperty,m=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,b=Object.getOwnPropertyDescriptor,_=Object.getPrototypeOf,x=Object.prototype;function U(R,q,z){if(typeof q!="string"){if(x){var E=_(q);E&&E!==x&&U(R,E,z)}var w=m(q);p&&(w=w.concat(p(q)));for(var S=d(R),H=d(q),A=0;A<w.length;++A){var Z=w[A];if(!i[Z]&&!(z&&z[Z])&&!(H&&H[Z])&&!(S&&S[Z])){var W=b(q,Z);try{h(R,Z,W)}catch{}}}}return R}return Zf=U,Zf}RA();var Sh=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=B.createContext(null)):B.createContext(null);Sh.Consumer;var wA=Sh.Provider,CA=wA,NA=Sh;function du(){var t=B.useContext(NA);return K1(t),t}var Wd;(function(t){t.formatDate="FormattedDate",t.formatTime="FormattedTime",t.formatNumber="FormattedNumber",t.formatList="FormattedList",t.formatDisplayName="FormattedDisplayName"})(Wd||(Wd={}));var Jd;(function(t){t.formatDate="FormattedDateParts",t.formatTime="FormattedTimeParts",t.formatNumber="FormattedNumberParts",t.formatList="FormattedListParts"})(Jd||(Jd={}));function W1(t){var r=function(i){var s=du(),u=i.value,c=i.children,d=fu(i,["value","children"]),h=typeof u=="string"?new Date(u||0):u,m=t==="formatDate"?s.formatDateToParts(h,d):s.formatTimeToParts(h,d);return c(m)};return r.displayName=Jd[t],r}function rl(t){var r=function(i){var s=du(),u=i.value,c=i.children,d=fu(i,["value","children"]),h=s[t](u,d);if(typeof c=="function")return c(h);var m=s.textComponent||B.Fragment;return B.createElement(m,null,h)};return r.displayName=Wd[t],r}function J1(t){return t&&Object.keys(t).reduce(function(r,i){var s=t[i];return r[i]=V1(s)?TA(s):s,r},{})}var py=function(t,r,i,s){for(var u=[],c=4;c<arguments.length;c++)u[c-4]=arguments[c];var d=J1(s),h=$d.apply(void 0,Wn([t,r,i,d],u,!1));return Array.isArray(h)?SA(h):h},gy=function(t,r){var i=t.defaultRichTextElements,s=fu(t,["defaultRichTextElements"]),u=J1(i),c=bA(ie(ie(ie({},$1),s),{defaultRichTextElements:u}),r),d={locale:c.locale,timeZone:c.timeZone,fallbackOnEmptyString:c.fallbackOnEmptyString,formats:c.formats,defaultLocale:c.defaultLocale,defaultFormats:c.defaultFormats,messages:c.messages,onError:c.onError,defaultRichTextElements:u};return ie(ie({},c),{formatMessage:py.bind(null,d,c.formatters),$t:py.bind(null,d,c.formatters)})};function Qf(t){return{locale:t.locale,timeZone:t.timeZone,fallbackOnEmptyString:t.fallbackOnEmptyString,formats:t.formats,textComponent:t.textComponent,messages:t.messages,defaultLocale:t.defaultLocale,defaultFormats:t.defaultFormats,onError:t.onError,onWarn:t.onWarn,wrapRichTextChunksInFragment:t.wrapRichTextChunksInFragment,defaultRichTextElements:t.defaultRichTextElements}}var MA=(function(t){An(r,t);function r(){var i=t!==null&&t.apply(this,arguments)||this;return i.cache=X1(),i.state={cache:i.cache,intl:gy(Qf(i.props),i.cache),prevConfig:Qf(i.props)},i}return r.getDerivedStateFromProps=function(i,s){var u=s.prevConfig,c=s.cache,d=Qf(i);return AA(u,d)?null:{intl:gy(d,c),prevConfig:d}},r.prototype.render=function(){return K1(this.state.intl),B.createElement(CA,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=$1,r})(B.PureComponent);rl("formatDate");rl("formatTime");rl("formatNumber");rl("formatList");rl("formatDisplayName");W1("formatDate");W1("formatTime");const DA="_app_1rj0t_1",LA={app:DA},Cr=QS,st=WS,ev="%[a-f0-9]{2}",yy=new RegExp("("+ev+")|([^%]+?)","gi"),by=new RegExp("("+ev+")+","gi");function eh(t,r){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;r=r||1;const i=t.slice(0,r),s=t.slice(r);return Array.prototype.concat.call([],eh(i),eh(s))}function BA(t){try{return decodeURIComponent(t)}catch{let r=t.match(yy)||[];for(let i=1;i<r.length;i++)t=eh(r,i).join(""),r=t.match(yy)||[];return t}}function UA(t){const r={"%FE%FF":"��","%FF%FE":"��"};let i=by.exec(t);for(;i;){try{r[i[0]]=decodeURIComponent(i[0])}catch{const u=BA(i[0]);u!==i[0]&&(r[i[0]]=u)}i=by.exec(t)}r["%C2"]="�";const s=Object.keys(r);for(const u of s)t=t.replace(new RegExp(u,"g"),r[u]);return t}function jA(t){if(typeof t!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return decodeURIComponent(t)}catch{return UA(t)}}function HA(t,r){const i={};if(Array.isArray(r))for(const s of r){const u=Object.getOwnPropertyDescriptor(t,s);u?.enumerable&&Object.defineProperty(i,s,u)}else for(const s of Reflect.ownKeys(t)){const u=Object.getOwnPropertyDescriptor(t,s);if(u.enumerable){const c=t[s];r(s,c,t)&&Object.defineProperty(i,s,u)}}return i}function tv(t,r){if(!(typeof t=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t===""||r==="")return[];const i=t.indexOf(r);return i===-1?[]:[t.slice(0,i),t.slice(i+r.length)]}const IA=t=>t==null,zA=t=>encodeURIComponent(t).replaceAll(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),th=Symbol("encodeFragmentIdentifier");function GA(t){switch(t.arrayFormat){case"index":return r=>(i,s)=>{const u=i.length;return s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,[ft(r,t),"[",u,"]"].join("")]:[...i,[ft(r,t),"[",ft(u,t),"]=",ft(s,t)].join("")]};case"bracket":return r=>(i,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,[ft(r,t),"[]"].join("")]:[...i,[ft(r,t),"[]=",ft(s,t)].join("")];case"colon-list-separator":return r=>(i,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,[ft(r,t),":list="].join("")]:[...i,[ft(r,t),":list=",ft(s,t)].join("")];case"comma":case"separator":case"bracket-separator":{const r=t.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(s,u)=>u===void 0||t.skipNull&&u===null||t.skipEmptyString&&u===""?s:(u=u===null?"":u,s.length===0?[[ft(i,t),r,ft(u,t)].join("")]:[[s,ft(u,t)].join(t.arrayFormatSeparator)])}default:return r=>(i,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,ft(r,t)]:[...i,[ft(r,t),"=",ft(s,t)].join("")]}}function kA(t){let r;switch(t.arrayFormat){case"index":return(i,s,u)=>{if(r=/\[(\d*)]$/.exec(i),i=i.replace(/\[\d*]$/,""),!r){u[i]=s;return}u[i]===void 0&&(u[i]={}),u[i][r[1]]=s};case"bracket":return(i,s,u)=>{if(r=/(\[])$/.exec(i),i=i.replace(/\[]$/,""),!r){u[i]=s;return}if(u[i]===void 0){u[i]=[s];return}u[i]=[...u[i],s]};case"colon-list-separator":return(i,s,u)=>{if(r=/(:list)$/.exec(i),i=i.replace(/:list$/,""),!r){u[i]=s;return}if(u[i]===void 0){u[i]=[s];return}u[i]=[...u[i],s]};case"comma":case"separator":return(i,s,u)=>{const d=typeof s=="string"&&s.includes(t.arrayFormatSeparator)?s.split(t.arrayFormatSeparator).map(h=>Ha(h,t)):s===null?s:Ha(s,t);u[i]=d};case"bracket-separator":return(i,s,u)=>{const c=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!c){u[i]=s&&Ha(s,t);return}const d=s===null?[]:Ha(s,t).split(t.arrayFormatSeparator);if(u[i]===void 0){u[i]=d;return}u[i]=[...u[i],...d]};default:return(i,s,u)=>{if(u[i]===void 0){u[i]=s;return}u[i]=[...[u[i]].flat(),s]}}}function nv(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function ft(t,r){return r.encode?r.strict?zA(t):encodeURIComponent(t):t}function Ha(t,r){return r.decode?jA(t):t}function rv(t){return Array.isArray(t)?t.sort():typeof t=="object"?rv(Object.keys(t)).sort((r,i)=>Number(r)-Number(i)).map(r=>t[r]):t}function av(t){const r=t.indexOf("#");return r!==-1&&(t=t.slice(0,r)),t}function qA(t){let r="";const i=t.indexOf("#");return i!==-1&&(r=t.slice(i)),r}function vy(t,r,i){return i==="string"&&typeof t=="string"?t:typeof i=="function"&&typeof t=="string"?i(t):i==="boolean"&&t===null?!0:i==="boolean"&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")?t.toLowerCase()==="true":i==="boolean"&&t!==null&&(t.toLowerCase()==="1"||t.toLowerCase()==="0")?t.toLowerCase()==="1":i==="string[]"&&r.arrayFormat!=="none"&&typeof t=="string"?[t]:i==="number[]"&&r.arrayFormat!=="none"&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?[Number(t)]:i==="number"&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?Number(t):r.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")?t.toLowerCase()==="true":r.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?Number(t):t}function Th(t){t=av(t);const r=t.indexOf("?");return r===-1?"":t.slice(r+1)}function Ah(t,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...r},nv(r.arrayFormatSeparator);const i=kA(r),s=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return s;for(const u of t.split("&")){if(u==="")continue;const c=r.decode?u.replaceAll("+"," "):u;let[d,h]=tv(c,"=");d===void 0&&(d=c),h=h===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?h:Ha(h,r),i(Ha(d,r),h,s)}for(const[u,c]of Object.entries(s))if(typeof c=="object"&&c!==null&&r.types[u]!=="string")for(const[d,h]of Object.entries(c)){const m=r.types[u]?r.types[u].replace("[]",""):void 0;c[d]=vy(h,r,m)}else typeof c=="object"&&c!==null&&r.types[u]==="string"?s[u]=Object.values(c).join(r.arrayFormatSeparator):s[u]=vy(c,r,r.types[u]);return r.sort===!1?s:(r.sort===!0?Object.keys(s).sort():Object.keys(s).sort(r.sort)).reduce((u,c)=>{const d=s[c];return u[c]=d&&typeof d=="object"&&!Array.isArray(d)?rv(d):d,u},Object.create(null))}function iv(t,r){if(!t)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},nv(r.arrayFormatSeparator);const i=d=>r.skipNull&&IA(t[d])||r.skipEmptyString&&t[d]==="",s=GA(r),u={};for(const[d,h]of Object.entries(t))i(d)||(u[d]=h);const c=Object.keys(u);return r.sort!==!1&&c.sort(r.sort),c.map(d=>{let h=t[d];if(r.replacer&&(h=r.replacer(d,h),h===void 0)||h===void 0)return"";if(h===null)return ft(d,r);if(Array.isArray(h)){if(h.length===0&&r.arrayFormat==="bracket-separator")return ft(d,r)+"[]";let m=h;return r.replacer&&(m=h.map((p,b)=>r.replacer(`${d}[${b}]`,p)).filter(p=>p!==void 0)),m.reduce(s(d),[]).join("&")}return ft(d,r)+"="+ft(h,r)}).filter(d=>d.length>0).join("&")}function sv(t,r){r={decode:!0,...r};let[i,s]=tv(t,"#");return i===void 0&&(i=t),{url:i?.split("?")?.[0]??"",query:Ah(Th(t),r),...r&&r.parseFragmentIdentifier&&s?{fragmentIdentifier:Ha(s,r)}:{}}}function lv(t,r){r={encode:!0,strict:!0,[th]:!0,...r};const i=av(t.url).split("?")[0]||"",s=Th(t.url),u={...Ah(s,{sort:!1,...r}),...t.query};let c=iv(u,r);c&&=`?${c}`;let d=qA(t.url);if(typeof t.fragmentIdentifier=="string"){const h=new URL(i);h.hash=t.fragmentIdentifier,d=r[th]?h.hash:`#${t.fragmentIdentifier}`}return`${i}${c}${d}`}function ov(t,r,i){i={parseFragmentIdentifier:!0,[th]:!1,...i};const{url:s,query:u,fragmentIdentifier:c}=sv(t,i);return lv({url:s,query:HA(u,r),fragmentIdentifier:c},i)}function FA(t,r,i){const s=Array.isArray(r)?u=>!r.includes(u):(u,c)=>!r(u,c);return ov(t,s,i)}const hu=Object.freeze(Object.defineProperty({__proto__:null,exclude:FA,extract:Th,parse:Ah,parseUrl:sv,pick:ov,stringify:iv,stringifyUrl:lv},Symbol.toStringTag,{value:"Module"}));var Ln={},Bn={},Ie={},Eo={},pe={},_y;function fn(){return _y||(_y=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.GUEST_LOCALE_CHANGED=pe.DRAWER_CLOSE=pe.DRAWER_OPEN=pe.CONVERSATION_RATING_FROM_GUEST=pe.TRANSCRIPT_ITEM_GUEST_REACTION=pe.TRANSCRIPT_MAIL_REQUEST=pe.INBOX_CONNECT_REQUEST=pe.RESTART_CHAT_REQUEST=pe.EVENT_TO_GUEST=pe.NLU_REQUEST_EVENT=pe.EXPERTS_DISCONNECTED=pe.EXPERTS_DISCONNECT_REQUEST=pe.EXPERTS_CONNECTED=pe.EXPERTS_CONNECT_REQUEST=pe.MESSAGE_TO_GUEST=pe.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST=pe.MESSAGE_FROM_GUEST=pe.GUEST_FEEDBACK_RESPONSE=pe.GUEST_DISCONNECTED=pe.GUEST_CONNECTED=pe.TYPING_OFF=pe.TYPING_ON=void 0,pe.TYPING_ON="core.typing.on",pe.TYPING_OFF="core.typing.off",pe.GUEST_CONNECTED="core.guest.connected",pe.GUEST_DISCONNECTED="core.guest.disconnected",pe.GUEST_FEEDBACK_RESPONSE="core.guest.feedback.response",pe.MESSAGE_FROM_GUEST="core.message.from.guest",pe.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST="core.message.without.analysis.from.guest",pe.MESSAGE_TO_GUEST="core.message.to.guest",pe.EXPERTS_CONNECT_REQUEST="core.experts.connect.request",pe.EXPERTS_CONNECTED="core.experts.connected",pe.EXPERTS_DISCONNECT_REQUEST="core.experts.disconnect.request",pe.EXPERTS_DISCONNECTED="core.experts.disconnected",pe.NLU_REQUEST_EVENT="core.nlu.request.event",pe.EVENT_TO_GUEST="core.event.to.guest",pe.RESTART_CHAT_REQUEST="core.chat.restart.request",pe.INBOX_CONNECT_REQUEST="core.inbox.connect.request",pe.TRANSCRIPT_MAIL_REQUEST="core.transcript.mail.request",pe.TRANSCRIPT_ITEM_GUEST_REACTION="core.transcript.item.guest.reaction",pe.CONVERSATION_RATING_FROM_GUEST="core.conversation.rating.from.guest",pe.DRAWER_OPEN="core.drawer.open",pe.DRAWER_CLOSE="core.drawer.close",pe.GUEST_LOCALE_CHANGED="core.guest.locale.changed"),pe}var Ey;function VA(){if(Ey)return Eo;Ey=1,Object.defineProperty(Eo,"__esModule",{value:!0});const t=fn(),r=()=>({type:t.DRAWER_CLOSE});return Eo.default=r,Eo}var So={},Sy;function PA(){if(Sy)return So;Sy=1,Object.defineProperty(So,"__esModule",{value:!0});const t=fn(),r=(i,s)=>({type:t.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:i,intent:s}});return So.default=r,So}var To={},Ty;function YA(){if(Ty)return To;Ty=1,Object.defineProperty(To,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.GUEST_CONNECTED,payload:{sessionId:i}});return To.default=r,To}var Ao={},Ay;function XA(){if(Ay)return Ao;Ay=1,Object.defineProperty(Ao,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.GUEST_DISCONNECTED,payload:{sessionId:i}});return Ao.default=r,Ao}var xo={},xy;function ZA(){if(xy)return xo;xy=1,Object.defineProperty(xo,"__esModule",{value:!0});const t=fn(),r=(i,s)=>({type:t.GUEST_LOCALE_CHANGED,payload:{previousLocale:i,newLocale:s}});return xo.default=r,xo}var Oo={},Oy;function QA(){if(Oy)return Oo;Oy=1,Object.defineProperty(Oo,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.DRAWER_OPEN,payload:{parameters:{contentUrl:i}}});return Oo.default=r,Oo}var Ro={},$e={},Ry;function xh(){if(Ry)return $e;Ry=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.getStringRepresentationFromMessage=$e.MessageTypeEnum=$e.AudioMessage=$e.FileMessage=$e.ImageMessage=$e.VideoMessage=$e.MarkdownMessage=$e.DetailMessage=$e.TextMessage=$e.Message=void 0;class t{type;sender;sources;quickReplies;constructor(_,x,U=[],R=[]){this.type=_,this.sender=x,this.sources=U,this.quickReplies=R}addQuickReply(_,x){this.quickReplies.push({label:_,payload:x})}}$e.Message=t;class r extends t{text;constructor(_,x,U=[],R=[]){super(m.TEXT,x,U,R),this.text=_}}$e.TextMessage=r;class i extends t{title;text;imageUrl;itemUrl;buttons;constructor(_,x){super(m.DETAIL,x),this.title=_,this.text="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(_){this.imageUrl=_}setItemUrl(_){this.itemUrl=_}setText(_){this.text=_}addButton(_){this.buttons.push(_)}}$e.DetailMessage=i;class s extends t{markdown;constructor(_,x,U=[],R=[]){super(m.MARKDOWN,x,U,R),this.markdown=_}}$e.MarkdownMessage=s;class u extends t{url;constructor(_,x){super(m.VIDEO,x),this.url=_}}$e.VideoMessage=u;class c extends t{url;constructor(_,x){super(m.IMAGE,x),this.url=_}}$e.ImageMessage=c;class d extends t{url;constructor(_,x){super(m.FILE,x),this.url=_}}$e.FileMessage=d;class h extends t{url;constructor(_,x){super(m.AUDIO,x),this.url=_}}$e.AudioMessage=h;var m;(function(b){b.TEXT="TEXT",b.DETAIL="DETAIL",b.MARKDOWN="MARKDOWN",b.VIDEO="VIDEO",b.IMAGE="IMAGE",b.FILE="FILE",b.AUDIO="AUDIO"})(m||($e.MessageTypeEnum=m={}));const p=b=>{switch(b.type){case m.TEXT:return b.text;case m.DETAIL:return`${b.title}`;case m.MARKDOWN:return b.markdown;case m.VIDEO:return`Video Url: ${b.url}`;case m.IMAGE:return`Image Url: ${b.url}`;case m.FILE:return`File Url: ${b.url}`;case m.AUDIO:return`Audio Url: ${b.url}`;default:throw new Error("Unknown message type "+b.type)}};return $e.getStringRepresentationFromMessage=p,$e}var sn={},wy;function Oh(){if(wy)return sn;wy=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.UserType=sn.PersonUser=sn.GuestUser=sn.BotUser=sn.User=void 0;class t{type;id;name;avatar;constructor(d,h,m,p){this.type=d,this.id=h,this.name=m,this.avatar=p}}sn.User=t;class r extends t{constructor(){super(u.BOT,null,"Chatbot","bot.svg")}}sn.BotUser=r;class i extends t{constructor(){super(u.GUEST,null,"Guest","visitor.svg")}}sn.GuestUser=i;class s extends t{constructor(d,h,m){super(u.PERSON,d,h,m)}}sn.PersonUser=s;var u;return(function(c){c.GUEST="GUEST",c.BOT="BOT",c.PERSON="PERSON"})(u||(sn.UserType=u={})),sn}var Cy;function KA(){if(Cy)return Ro;Cy=1,Object.defineProperty(Ro,"__esModule",{value:!0});const t=xh(),r=Oh(),i=fn(),s=u=>{const c=new t.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_FROM_GUEST,message:c}};return Ro.default=s,Ro}var wo={},Ny;function $A(){if(Ny)return wo;Ny=1,Object.defineProperty(wo,"__esModule",{value:!0});const t=xh(),r=Oh(),i=fn(),s=(u,c={})=>{const d=new t.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:d,payload:c}};return wo.default=s,wo}var Co={},My;function WA(){if(My)return Co;My=1,Object.defineProperty(Co,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.NLU_REQUEST_EVENT,event:i});return Co.default=r,Co}var No={},Dy;function JA(){if(Dy)return No;Dy=1,Object.defineProperty(No,"__esModule",{value:!0});const t=fn(),r=()=>({type:t.RESTART_CHAT_REQUEST});return No.default=r,No}var Mo={},Ly;function ex(){if(Ly)return Mo;Ly=1,Object.defineProperty(Mo,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.MESSAGE_TO_GUEST,message:i});return Mo.default=r,Mo}var Do={},By;function tx(){if(By)return Do;By=1,Object.defineProperty(Do,"__esModule",{value:!0});const t=fn(),r=(i,s,u=null,c=null)=>({type:t.TRANSCRIPT_ITEM_GUEST_REACTION,payload:{actionId:i,reaction:s,category:u,comment:c}});return Do.default=r,Do}var Uy;function nx(){if(Uy)return Ie;Uy=1;var t=Ie&&Ie.__importDefault||function(U){return U&&U.__esModule?U:{default:U}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.transcriptItemGuestReaction=Ie.sendMessageToGuest=Ie.restartChatRequest=Ie.requestNLUEvent=Ie.receiveTextMessageWithoutAnalysisFromGuest=Ie.receiveTextMessageFromGuest=Ie.openDrawer=Ie.guestLocaleChanged=Ie.guestDisconnected=Ie.guestConnected=Ie.feedbackFromGuestResponse=Ie.closeDrawer=void 0;const r=t(VA());Ie.closeDrawer=r.default;const i=t(PA());Ie.feedbackFromGuestResponse=i.default;const s=t(YA());Ie.guestConnected=s.default;const u=t(XA());Ie.guestDisconnected=u.default;const c=t(ZA());Ie.guestLocaleChanged=c.default;const d=t(QA());Ie.openDrawer=d.default;const h=t(KA());Ie.receiveTextMessageFromGuest=h.default;const m=t($A());Ie.receiveTextMessageWithoutAnalysisFromGuest=m.default;const p=t(WA());Ie.requestNLUEvent=p.default;const b=t(JA());Ie.restartChatRequest=b.default;const _=t(ex());Ie.sendMessageToGuest=_.default;const x=t(tx());return Ie.transcriptItemGuestReaction=x.default,Ie}var Kf={},jy;function rx(){return jy||(jy=1,Object.defineProperty(Kf,"__esModule",{value:!0})),Kf}var Hy;function ax(){return Hy||(Hy=1,(function(t){var r=Bn&&Bn.__createBinding||(Object.create?(function(c,d,h,m){m===void 0&&(m=h);var p=Object.getOwnPropertyDescriptor(d,h);(!p||("get"in p?!d.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,p)}):(function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]})),i=Bn&&Bn.__setModuleDefault||(Object.create?(function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}):function(c,d){c.default=d}),s=Bn&&Bn.__importStar||(function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(m[m.length]=p);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),p=0;p<m.length;p++)m[p]!=="default"&&r(h,d,m[p]);return i(h,d),h}})(),u=Bn&&Bn.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&r(d,c,h)};Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTypes=t.Actions=void 0,t.Actions=s(nx()),t.ActionTypes=s(fn()),u(rx(),t)})(Bn)),Bn}var ln={},$f={},Iy;function ix(){return Iy||(Iy=1,Object.defineProperty($f,"__esModule",{value:!0})),$f}var Us={},zy;function sx(){if(zy)return Us;zy=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.NullableKnowledgeBaseAdapter=void 0;class t{async createApiKnowledgeBase(i){throw new Error("Method not implemented.")}async updateApiKnowledgeBase(i,s){throw new Error("Method not implemented.")}async deleteApiKnowledgeBase(i){throw new Error("Method not implemented.")}async upsertApiKnowledgeBase(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseById(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findApiKnowledgeBases(){throw new Error("Method not implemented.")}async deleteApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findKnowledgeBaseEntries(i){throw new Error("Method not implemented.")}async createKnowledgeBaseEntry(i,s){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntry(i,s,u){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntry(i,s){throw new Error("Method not implemented.")}async upsertKnowledgeBaseEntry(i,s){throw new Error("Method not implemented.")}async retrieveKnowledgeBaseEntryConfig(i,s){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryByUriAlias(i,s){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntriesIndexedBeforeDate(i,s){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryAttachments(i,s){throw new Error("Method not implemented.")}async createKnowledgeBaseEntryAttachment(i,s,u){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntryAttachment(i,s,u,c){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntryAttachment(i,s,u){throw new Error("Method not implemented.")}async setIndexingStatus(i,s){throw new Error("Method not implemented.")}async subscribeToReindex(i,s){throw new Error("Method not implemented.")}isContentTypeSupported(i){throw new Error("Method not implemented.")}registerTool(i,s){throw new Error("Method not implemented.")}async getTools(i){throw new Error("Method not implemented.")}}return Us.NullableKnowledgeBaseAdapter=t,Us}var Gy;function lx(){if(Gy)return ln;Gy=1;var t=ln&&ln.__createBinding||(Object.create?(function(u,c,d,h){h===void 0&&(h=d);var m=Object.getOwnPropertyDescriptor(c,d);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(u,h,m)}):(function(u,c,d,h){h===void 0&&(h=d),u[h]=c[d]})),r=ln&&ln.__setModuleDefault||(Object.create?(function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}):function(u,c){u.default=c}),i=ln&&ln.__importStar||(function(){var u=function(c){return u=Object.getOwnPropertyNames||function(d){var h=[];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(h[h.length]=m);return h},u(c)};return function(c){if(c&&c.__esModule)return c;var d={};if(c!=null)for(var h=u(c),m=0;m<h.length;m++)h[m]!=="default"&&t(d,c,h[m]);return r(d,c),d}})();Object.defineProperty(ln,"__esModule",{value:!0}),ln.NullableCmsAdapter=ln.KnowledgeBase=void 0,ln.KnowledgeBase=i(ix());const s=sx();return ln.NullableCmsAdapter={knowledgeBase:new s.NullableKnowledgeBaseAdapter},ln}var Na={},Wf={},ky;function ox(){return ky||(ky=1,Object.defineProperty(Wf,"__esModule",{value:!0})),Wf}var Jf={},qy;function ux(){return qy||(qy=1,Object.defineProperty(Jf,"__esModule",{value:!0})),Jf}var ed={},Fy;function cx(){return Fy||(Fy=1,Object.defineProperty(ed,"__esModule",{value:!0})),ed}var td={},Vy;function fx(){return Vy||(Vy=1,Object.defineProperty(td,"__esModule",{value:!0})),td}var js={},Py;function dx(){if(Py)return js;Py=1,Object.defineProperty(js,"__esModule",{value:!0}),js.checkMiddlewareCondition=void 0;const t=async(r,i,s)=>(Array.isArray(r)?r:[r]).reduce(async(c,d)=>await c?await d(i,s):!1,Promise.resolve(!0));return js.checkMiddlewareCondition=t,js}var nd={},Yy;function hx(){return Yy||(Yy=1,Object.defineProperty(nd,"__esModule",{value:!0})),nd}var rd={},Xy;function mx(){return Xy||(Xy=1,Object.defineProperty(rd,"__esModule",{value:!0})),rd}var ad={},Zy;function px(){return Zy||(Zy=1,Object.defineProperty(ad,"__esModule",{value:!0})),ad}var Qy;function gx(){return Qy||(Qy=1,(function(t){var r=Na&&Na.__createBinding||(Object.create?(function(s,u,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,d,h)}):(function(s,u,c,d){d===void 0&&(d=c),s[d]=u[c]})),i=Na&&Na.__exportStar||function(s,u){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&r(u,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),i(ox(),t),i(ux(),t),i(cx(),t),i(fx(),t),i(dx(),t),i(hx(),t),i(mx(),t),i(px(),t)})(Na)),Na}var Ma={},Un={},Ky;function yx(){if(Ky)return Un;Ky=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.ButtonTypeEnum=Un.PostbackButton=Un.UrlButton=Un.Button=void 0;class t{title;type;constructor(c,d){this.title=c,this.type=d}}Un.Button=t;class r extends t{url;constructor(c,d){super(c,s.WEB_URL),this.url=d}}Un.UrlButton=r;class i extends t{payload;constructor(c,d){super(c,s.POSTBACK),this.payload=d}}Un.PostbackButton=i;var s;return(function(u){u.WEB_URL="web_url",u.POSTBACK="postback"})(s||(Un.ButtonTypeEnum=s={})),Un}var id={},$y;function bx(){return $y||($y=1,Object.defineProperty(id,"__esModule",{value:!0})),id}var Hs={},Wy;function vx(){if(Wy)return Hs;Wy=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.SatisfactionEnum=void 0;var t;return(function(r){r.GOOD="GOOD",r.BAD="BAD"})(t||(Hs.SatisfactionEnum=t={})),Hs}var Jy;function eb(){return Jy||(Jy=1,(function(t){var r=Ma&&Ma.__createBinding||(Object.create?(function(s,u,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,d,h)}):(function(s,u,c,d){d===void 0&&(d=c),s[d]=u[c]})),i=Ma&&Ma.__exportStar||function(s,u){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&r(u,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),i(yx(),t),i(bx(),t),i(vx(),t),i(xh(),t),i(Oh(),t)})(Ma)),Ma}var tb;function _x(){return tb||(tb=1,(function(t){var r=Ln&&Ln.__createBinding||(Object.create?(function(c,d,h,m){m===void 0&&(m=h);var p=Object.getOwnPropertyDescriptor(d,h);(!p||("get"in p?!d.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,p)}):(function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]})),i=Ln&&Ln.__setModuleDefault||(Object.create?(function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}):function(c,d){c.default=d}),s=Ln&&Ln.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&r(d,c,h)},u=Ln&&Ln.__importStar||(function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(m[m.length]=p);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),p=0;p<m.length;p++)m[p]!=="default"&&r(h,d,m[p]);return i(h,d),h}})();Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.CMS=void 0,s(ax(),t),t.CMS=u(lx()),s(gx(),t),t.Model=u(eb()),s(eb(),t)})(Ln)),Ln}var Te=_x();const uv=t=>r=>(t.payload.type!==Te.ActionTypes.MESSAGE_FROM_GUEST&&r(Te.Actions.receiveTextMessageWithoutAnalysisFromGuest(t.label,t.payload)),r(t.payload)),cv=t=>(r,i)=>{const{quickReplies:s}=i().chat,u=s.find(c=>t.toLocaleLowerCase().indexOf(c.label.toLocaleLowerCase())>-1);return r(u?uv({...u,label:t}):JSON.parse(JSON.stringify(Te.Actions.receiveTextMessageFromGuest(t))))},Rh="MESSAGE_TO_PARENT_PAGE",wh="RESTORE_PREVIOUS_CHAT_MESSAGES",Ch="AUDIO_MESSAGE_FROM_USER",Nh="RECEIVE_SPEECH_TRANSCRIPTION",Mh="ENABLE_CONVERSATION_RATING",fv="LOAD_SOURCE_INFOS_RESPONSE",Dh="LOAD_SOURCE_INFOS_ERROR",Lh="LOAD_SOURCE_INFOS_REQUEST",Bh="CLOSE_SOURCE_INFOS",Ex="webclient.get.started",dv="webclient.window.expand",hv="webclient.window.close",mv="webclient.transcript.pdf.download",Sx=[Rh,wh,Ch,Nh,Mh,Lh,Bh],Tx=t=>({type:Ch,buffer:t}),Ax=t=>({type:Nh,transcription:t}),xx=t=>({type:Te.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:t}}}),Ox=()=>({type:mv}),Rx=({rating:t})=>({type:Mh,payload:{rating:t}}),wx=(t,r)=>({type:Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:t,feedback:r}}),pv=t=>Te.Actions.requestNLUEvent(t),Cx=t=>({type:wh,messages:t}),Nx=t=>{switch(t.type){case Te.ButtonTypeEnum.WEB_URL:return yv(t.url);case Te.ButtonTypeEnum.POSTBACK:return t.payload;default:throw new Error(`unknown button type ${t.type}`)}},gv=t=>yv(t),yv=t=>({type:Rh,message:{type:"webclient.change.url",url:t}});/*! js-cookie v3.0.5 | MIT */function Lo(t){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)t[s]=i[s]}return t}var Mx={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function nh(t,r){function i(u,c,d){if(!(typeof document>"u")){d=Lo({},r,d),typeof d.expires=="number"&&(d.expires=new Date(Date.now()+d.expires*864e5)),d.expires&&(d.expires=d.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var h="";for(var m in d)d[m]&&(h+="; "+m,d[m]!==!0&&(h+="="+d[m].split(";")[0]));return document.cookie=u+"="+t.write(c,u)+h}}function s(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var c=document.cookie?document.cookie.split("; "):[],d={},h=0;h<c.length;h++){var m=c[h].split("="),p=m.slice(1).join("=");try{var b=decodeURIComponent(m[0]);if(d[b]=t.read(p,b),u===b)break}catch{}}return u?d[u]:d}}return Object.create({set:i,get:s,remove:function(u,c){i(u,"",Lo({},c,{expires:-1}))},withAttributes:function(u){return nh(this.converter,Lo({},this.attributes,u))},withConverter:function(u){return nh(Lo({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}var Bo=nh(Mx,{path:"/"});const wt=[];for(let t=0;t<256;++t)wt.push((t+256).toString(16).slice(1));function Dx(t,r=0){return(wt[t[r+0]]+wt[t[r+1]]+wt[t[r+2]]+wt[t[r+3]]+"-"+wt[t[r+4]]+wt[t[r+5]]+"-"+wt[t[r+6]]+wt[t[r+7]]+"-"+wt[t[r+8]]+wt[t[r+9]]+"-"+wt[t[r+10]]+wt[t[r+11]]+wt[t[r+12]]+wt[t[r+13]]+wt[t[r+14]]+wt[t[r+15]]).toLowerCase()}let sd;const Lx=new Uint8Array(16);function Bx(){if(!sd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");sd=crypto.getRandomValues.bind(crypto)}return sd(Lx)}const Ux=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nb={randomUUID:Ux};function Jo(t,r,i){if(nb.randomUUID&&!t)return nb.randomUUID();t=t||{};const s=t.random??t.rng?.()??Bx();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Dx(s)}const Uh=()=>jx(window.location.pathname),jx=t=>{const r=t.split("/"),i=t.endsWith("/");return r[r.length-(i?2:1)]};function Ct(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Hx=typeof Symbol=="function"&&Symbol.observable||"@@observable",rb=Hx,ld=()=>Math.random().toString(36).substring(7).split("").join("."),Ix={INIT:`@@redux/INIT${ld()}`,REPLACE:`@@redux/REPLACE${ld()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ld()}`},eu=Ix;function jh(t){if(typeof t!="object"||t===null)return!1;let r=t;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r||Object.getPrototypeOf(t)===null}function bv(t,r,i){if(typeof t!="function")throw new Error(Ct(2));if(typeof r=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Ct(0));if(typeof r=="function"&&typeof i>"u"&&(i=r,r=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Ct(1));return i(bv)(t,r)}let s=t,u=r,c=new Map,d=c,h=0,m=!1;function p(){d===c&&(d=new Map,c.forEach((z,E)=>{d.set(E,z)}))}function b(){if(m)throw new Error(Ct(3));return u}function _(z){if(typeof z!="function")throw new Error(Ct(4));if(m)throw new Error(Ct(5));let E=!0;p();const w=h++;return d.set(w,z),function(){if(E){if(m)throw new Error(Ct(6));E=!1,p(),d.delete(w),c=null}}}function x(z){if(!jh(z))throw new Error(Ct(7));if(typeof z.type>"u")throw new Error(Ct(8));if(typeof z.type!="string")throw new Error(Ct(17));if(m)throw new Error(Ct(9));try{m=!0,u=s(u,z)}finally{m=!1}return(c=d).forEach(w=>{w()}),z}function U(z){if(typeof z!="function")throw new Error(Ct(10));s=z,x({type:eu.REPLACE})}function R(){const z=_;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(Ct(11));function w(){const H=E;H.next&&H.next(b())}return w(),{unsubscribe:z(w)}},[rb](){return this}}}return x({type:eu.INIT}),{dispatch:x,subscribe:_,getState:b,replaceReducer:U,[rb]:R}}function zx(t){Object.keys(t).forEach(r=>{const i=t[r];if(typeof i(void 0,{type:eu.INIT})>"u")throw new Error(Ct(12));if(typeof i(void 0,{type:eu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ct(13))})}function vv(t){const r=Object.keys(t),i={};for(let c=0;c<r.length;c++){const d=r[c];typeof t[d]=="function"&&(i[d]=t[d])}const s=Object.keys(i);let u;try{zx(i)}catch(c){u=c}return function(d={},h){if(u)throw u;let m=!1;const p={};for(let b=0;b<s.length;b++){const _=s[b],x=i[_],U=d[_],R=x(U,h);if(typeof R>"u")throw h&&h.type,new Error(Ct(14));p[_]=R,m=m||R!==U}return m=m||s.length!==Object.keys(d).length,m?p:d}}function tu(...t){return t.length===0?r=>r:t.length===1?t[0]:t.reduce((r,i)=>(...s)=>r(i(...s)))}function Gx(...t){return r=>(i,s)=>{const u=r(i,s);let c=()=>{throw new Error(Ct(15))};const d={getState:u.getState,dispatch:(m,...p)=>c(m,...p)},h=t.map(m=>m(d));return c=tu(...h)(u.dispatch),{...u,dispatch:c}}}function kx(t){return jh(t)&&"type"in t&&typeof t.type=="string"}var _v=Symbol.for("immer-nothing"),ab=Symbol.for("immer-draftable"),un=Symbol.for("immer-state");function zn(t,...r){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var wi=Object.getPrototypeOf;function Ga(t){return!!t&&!!t[un]}function wr(t){return t?Ev(t)||Array.isArray(t)||!!t[ab]||!!t.constructor?.[ab]||pu(t)||gu(t):!1}var qx=Object.prototype.constructor.toString();function Ev(t){if(!t||typeof t!="object")return!1;const r=wi(t);if(r===null)return!0;const i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object?!0:typeof i=="function"&&Function.toString.call(i)===qx}function nu(t,r){mu(t)===0?Reflect.ownKeys(t).forEach(i=>{r(i,t[i],t)}):t.forEach((i,s)=>r(s,i,t))}function mu(t){const r=t[un];return r?r.type_:Array.isArray(t)?1:pu(t)?2:gu(t)?3:0}function rh(t,r){return mu(t)===2?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function Sv(t,r,i){const s=mu(t);s===2?t.set(r,i):s===3?t.add(i):t[r]=i}function Fx(t,r){return t===r?t!==0||1/t===1/r:t!==t&&r!==r}function pu(t){return t instanceof Map}function gu(t){return t instanceof Set}function Ua(t){return t.copy_||t.base_}function ah(t,r){if(pu(t))return new Map(t);if(gu(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const i=Ev(t);if(r===!0||r==="class_only"&&!i){const s=Object.getOwnPropertyDescriptors(t);delete s[un];let u=Reflect.ownKeys(s);for(let c=0;c<u.length;c++){const d=u[c],h=s[d];h.writable===!1&&(h.writable=!0,h.configurable=!0),(h.get||h.set)&&(s[d]={configurable:!0,writable:!0,enumerable:h.enumerable,value:t[d]})}return Object.create(wi(t),s)}else{const s=wi(t);if(s!==null&&i)return{...t};const u=Object.create(s);return Object.assign(u,t)}}function Hh(t,r=!1){return yu(t)||Ga(t)||!wr(t)||(mu(t)>1&&(t.set=t.add=t.clear=t.delete=Vx),Object.freeze(t),r&&Object.entries(t).forEach(([i,s])=>Hh(s,!0))),t}function Vx(){zn(2)}function yu(t){return Object.isFrozen(t)}var Px={};function ka(t){const r=Px[t];return r||zn(0,t),r}var Ws;function Tv(){return Ws}function Yx(t,r){return{drafts_:[],parent_:t,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ib(t,r){r&&(ka("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=r)}function ih(t){sh(t),t.drafts_.forEach(Xx),t.drafts_=null}function sh(t){t===Ws&&(Ws=t.parent_)}function sb(t){return Ws=Yx(Ws,t)}function Xx(t){const r=t[un];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function lb(t,r){r.unfinalizedDrafts_=r.drafts_.length;const i=r.drafts_[0];return t!==void 0&&t!==i?(i[un].modified_&&(ih(r),zn(4)),wr(t)&&(t=ru(r,t),r.parent_||au(r,t)),r.patches_&&ka("Patches").generateReplacementPatches_(i[un].base_,t,r.patches_,r.inversePatches_)):t=ru(r,i,[]),ih(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),t!==_v?t:void 0}function ru(t,r,i){if(yu(r))return r;const s=r[un];if(!s)return nu(r,(u,c)=>ob(t,s,r,u,c,i)),r;if(s.scope_!==t)return r;if(!s.modified_)return au(t,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;const u=s.copy_;let c=u,d=!1;s.type_===3&&(c=new Set(u),u.clear(),d=!0),nu(c,(h,m)=>ob(t,s,u,h,m,i,d)),au(t,u,!1),i&&t.patches_&&ka("Patches").generatePatches_(s,i,t.patches_,t.inversePatches_)}return s.copy_}function ob(t,r,i,s,u,c,d){if(Ga(u)){const h=c&&r&&r.type_!==3&&!rh(r.assigned_,s)?c.concat(s):void 0,m=ru(t,u,h);if(Sv(i,s,m),Ga(m))t.canAutoFreeze_=!1;else return}else d&&i.add(u);if(wr(u)&&!yu(u)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;ru(t,u),(!r||!r.scope_.parent_)&&typeof s!="symbol"&&Object.prototype.propertyIsEnumerable.call(i,s)&&au(t,u)}}function au(t,r,i=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Hh(r,i)}function Zx(t,r){const i=Array.isArray(t),s={type_:i?1:0,scope_:r?r.scope_:Tv(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let u=s,c=Ih;i&&(u=[s],c=Js);const{revoke:d,proxy:h}=Proxy.revocable(u,c);return s.draft_=h,s.revoke_=d,h}var Ih={get(t,r){if(r===un)return t;const i=Ua(t);if(!rh(i,r))return Qx(t,i,r);const s=i[r];return t.finalized_||!wr(s)?s:s===od(t.base_,r)?(ud(t),t.copy_[r]=oh(s,t)):s},has(t,r){return r in Ua(t)},ownKeys(t){return Reflect.ownKeys(Ua(t))},set(t,r,i){const s=Av(Ua(t),r);if(s?.set)return s.set.call(t.draft_,i),!0;if(!t.modified_){const u=od(Ua(t),r),c=u?.[un];if(c&&c.base_===i)return t.copy_[r]=i,t.assigned_[r]=!1,!0;if(Fx(i,u)&&(i!==void 0||rh(t.base_,r)))return!0;ud(t),lh(t)}return t.copy_[r]===i&&(i!==void 0||r in t.copy_)||Number.isNaN(i)&&Number.isNaN(t.copy_[r])||(t.copy_[r]=i,t.assigned_[r]=!0),!0},deleteProperty(t,r){return od(t.base_,r)!==void 0||r in t.base_?(t.assigned_[r]=!1,ud(t),lh(t)):delete t.assigned_[r],t.copy_&&delete t.copy_[r],!0},getOwnPropertyDescriptor(t,r){const i=Ua(t),s=Reflect.getOwnPropertyDescriptor(i,r);return s&&{writable:!0,configurable:t.type_!==1||r!=="length",enumerable:s.enumerable,value:i[r]}},defineProperty(){zn(11)},getPrototypeOf(t){return wi(t.base_)},setPrototypeOf(){zn(12)}},Js={};nu(Ih,(t,r)=>{Js[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});Js.deleteProperty=function(t,r){return Js.set.call(this,t,r,void 0)};Js.set=function(t,r,i){return Ih.set.call(this,t[0],r,i,t[0])};function od(t,r){const i=t[un];return(i?Ua(i):t)[r]}function Qx(t,r,i){const s=Av(r,i);return s?"value"in s?s.value:s.get?.call(t.draft_):void 0}function Av(t,r){if(!(r in t))return;let i=wi(t);for(;i;){const s=Object.getOwnPropertyDescriptor(i,r);if(s)return s;i=wi(i)}}function lh(t){t.modified_||(t.modified_=!0,t.parent_&&lh(t.parent_))}function ud(t){t.copy_||(t.copy_=ah(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Kx=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,i,s)=>{if(typeof r=="function"&&typeof i!="function"){const c=i;i=r;const d=this;return function(m=c,...p){return d.produce(m,b=>i.call(this,b,...p))}}typeof i!="function"&&zn(6),s!==void 0&&typeof s!="function"&&zn(7);let u;if(wr(r)){const c=sb(this),d=oh(r,void 0);let h=!0;try{u=i(d),h=!1}finally{h?ih(c):sh(c)}return ib(c,s),lb(u,c)}else if(!r||typeof r!="object"){if(u=i(r),u===void 0&&(u=r),u===_v&&(u=void 0),this.autoFreeze_&&Hh(u,!0),s){const c=[],d=[];ka("Patches").generateReplacementPatches_(r,u,c,d),s(c,d)}return u}else zn(1,r)},this.produceWithPatches=(r,i)=>{if(typeof r=="function")return(d,...h)=>this.produceWithPatches(d,m=>r(m,...h));let s,u;return[this.produce(r,i,(d,h)=>{s=d,u=h}),s,u]},typeof t?.autoFreeze=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof t?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){wr(t)||zn(8),Ga(t)&&(t=$x(t));const r=sb(this),i=oh(t,void 0);return i[un].isManual_=!0,sh(r),i}finishDraft(t,r){const i=t&&t[un];(!i||!i.isManual_)&&zn(9);const{scope_:s}=i;return ib(s,r),lb(void 0,s)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,r){let i;for(i=r.length-1;i>=0;i--){const u=r[i];if(u.path.length===0&&u.op==="replace"){t=u.value;break}}i>-1&&(r=r.slice(i+1));const s=ka("Patches").applyPatches_;return Ga(t)?s(t,r):this.produce(t,u=>s(u,r))}};function oh(t,r){const i=pu(t)?ka("MapSet").proxyMap_(t,r):gu(t)?ka("MapSet").proxySet_(t,r):Zx(t,r);return(r?r.scope_:Tv()).drafts_.push(i),i}function $x(t){return Ga(t)||zn(10,t),xv(t)}function xv(t){if(!wr(t)||yu(t))return t;const r=t[un];let i;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,i=ah(t,r.scope_.immer_.useStrictShallowCopy_)}else i=ah(t,!0);return nu(i,(s,u)=>{Sv(i,s,xv(u))}),r&&(r.finalized_=!1),i}var cn=new Kx,Ov=cn.produce;cn.produceWithPatches.bind(cn);cn.setAutoFreeze.bind(cn);cn.setUseStrictShallowCopy.bind(cn);cn.applyPatches.bind(cn);cn.createDraft.bind(cn);cn.finishDraft.bind(cn);function Rv(t){return({dispatch:i,getState:s})=>u=>c=>typeof c=="function"?c(i,s,t):u(c)}var Wx=Rv(),Jx=Rv,eO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?tu:tu.apply(null,arguments)};function ub(t,r){function i(...s){if(r){let u=r(...s);if(!u)throw new Error(Ar(0));return{type:t,payload:u.payload,..."meta"in u&&{meta:u.meta},..."error"in u&&{error:u.error}}}return{type:t,payload:s[0]}}return i.toString=()=>`${t}`,i.type=t,i.match=s=>kx(s)&&s.type===t,i}var wv=class Zs extends Array{constructor(...r){super(...r),Object.setPrototypeOf(this,Zs.prototype)}static get[Symbol.species](){return Zs}concat(...r){return super.concat.apply(this,r)}prepend(...r){return r.length===1&&Array.isArray(r[0])?new Zs(...r[0].concat(this)):new Zs(...r.concat(this))}};function cb(t){return wr(t)?Ov(t,()=>{}):t}function Uo(t,r,i){return t.has(r)?t.get(r):t.set(r,i(r)).get(r)}function tO(t){return typeof t=="boolean"}var nO=()=>function(r){const{thunk:i=!0,immutableCheck:s=!0,serializableCheck:u=!0,actionCreatorCheck:c=!0}=r??{};let d=new wv;return i&&(tO(i)?d.push(Wx):d.push(Jx(i.extraArgument))),d},rO="RTK_autoBatch",fb=t=>r=>{setTimeout(r,t)},aO=(t={type:"raf"})=>r=>(...i)=>{const s=r(...i);let u=!0,c=!1,d=!1;const h=new Set,m=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:fb(10):t.type==="callback"?t.queueNotification:fb(t.timeout),p=()=>{d=!1,c&&(c=!1,h.forEach(b=>b()))};return Object.assign({},s,{subscribe(b){const _=()=>u&&b(),x=s.subscribe(_);return h.add(b),()=>{x(),h.delete(b)}},dispatch(b){try{return u=!b?.meta?.[rO],c=!u,c&&(d||(d=!0,m(p))),s.dispatch(b)}finally{u=!0}}})},iO=t=>function(i){const{autoBatch:s=!0}=i??{};let u=new wv(t);return s&&u.push(aO(typeof s=="object"?s:void 0)),u};function sO(t){const r=nO(),{reducer:i=void 0,middleware:s,devTools:u=!0,preloadedState:c=void 0,enhancers:d=void 0}=t||{};let h;if(typeof i=="function")h=i;else if(jh(i))h=vv(i);else throw new Error(Ar(1));let m;typeof s=="function"?m=s(r):m=r();let p=tu;u&&(p=eO({trace:!1,...typeof u=="object"&&u}));const b=Gx(...m),_=iO(b);let x=typeof d=="function"?d(_):_();const U=p(...x);return bv(h,c,U)}function Cv(t){const r={},i=[];let s;const u={addCase(c,d){const h=typeof c=="string"?c:c.type;if(!h)throw new Error(Ar(28));if(h in r)throw new Error(Ar(29));return r[h]=d,u},addAsyncThunk(c,d){return d.pending&&(r[c.pending.type]=d.pending),d.rejected&&(r[c.rejected.type]=d.rejected),d.fulfilled&&(r[c.fulfilled.type]=d.fulfilled),d.settled&&i.push({matcher:c.settled,reducer:d.settled}),u},addMatcher(c,d){return i.push({matcher:c,reducer:d}),u},addDefaultCase(c){return s=c,u}};return t(u),[r,i,s]}function lO(t){return typeof t=="function"}function oO(t,r){let[i,s,u]=Cv(r),c;if(lO(t))c=()=>cb(t());else{const h=cb(t);c=()=>h}function d(h=c(),m){let p=[i[m.type],...s.filter(({matcher:b})=>b(m)).map(({reducer:b})=>b)];return p.filter(b=>!!b).length===0&&(p=[u]),p.reduce((b,_)=>{if(_)if(Ga(b)){const U=_(b,m);return U===void 0?b:U}else{if(wr(b))return Ov(b,x=>_(x,m));{const x=_(b,m);if(x===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return b},h)}return d.getInitialState=c,d}var uO=Symbol.for("rtk-slice-createasyncthunk");function cO(t,r){return`${t}/${r}`}function fO({creators:t}={}){const r=t?.asyncThunk?.[uO];return function(s){const{name:u,reducerPath:c=u}=s;if(!u)throw new Error(Ar(11));const d=(typeof s.reducers=="function"?s.reducers(hO()):s.reducers)||{},h=Object.keys(d),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(S,H){const A=typeof S=="string"?S:S.type;if(!A)throw new Error(Ar(12));if(A in m.sliceCaseReducersByType)throw new Error(Ar(13));return m.sliceCaseReducersByType[A]=H,p},addMatcher(S,H){return m.sliceMatchers.push({matcher:S,reducer:H}),p},exposeAction(S,H){return m.actionCreators[S]=H,p},exposeCaseReducer(S,H){return m.sliceCaseReducersByName[S]=H,p}};h.forEach(S=>{const H=d[S],A={reducerName:S,type:cO(u,S),createNotation:typeof s.reducers=="function"};pO(H)?yO(A,H,p,r):mO(A,H,p)});function b(){const[S={},H=[],A=void 0]=typeof s.extraReducers=="function"?Cv(s.extraReducers):[s.extraReducers],Z={...S,...m.sliceCaseReducersByType};return oO(s.initialState,W=>{for(let ae in Z)W.addCase(ae,Z[ae]);for(let ae of m.sliceMatchers)W.addMatcher(ae.matcher,ae.reducer);for(let ae of H)W.addMatcher(ae.matcher,ae.reducer);A&&W.addDefaultCase(A)})}const _=S=>S,x=new Map,U=new WeakMap;let R;function q(S,H){return R||(R=b()),R(S,H)}function z(){return R||(R=b()),R.getInitialState()}function E(S,H=!1){function A(W){let ae=W[S];return typeof ae>"u"&&H&&(ae=Uo(U,A,z)),ae}function Z(W=_){const ae=Uo(x,H,()=>new WeakMap);return Uo(ae,W,()=>{const ye={};for(const[Ee,se]of Object.entries(s.selectors??{}))ye[Ee]=dO(se,W,()=>Uo(U,W,z),H);return ye})}return{reducerPath:S,getSelectors:Z,get selectors(){return Z(A)},selectSlice:A}}const w={name:u,reducer:q,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:z,...E(c),injectInto(S,{reducerPath:H,...A}={}){const Z=H??c;return S.inject({reducerPath:Z,reducer:q},A),{...w,...E(Z,!0)}}};return w}}function dO(t,r,i,s){function u(c,...d){let h=r(c);return typeof h>"u"&&s&&(h=i()),t(h,...d)}return u.unwrapped=t,u}var zh=fO();function hO(){function t(r,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:r,...i}}return t.withTypes=()=>t,{reducer(r){return Object.assign({[r.name](...i){return r(...i)}}[r.name],{_reducerDefinitionType:"reducer"})},preparedReducer(r,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:r,reducer:i}},asyncThunk:t}}function mO({type:t,reducerName:r,createNotation:i},s,u){let c,d;if("reducer"in s){if(i&&!gO(s))throw new Error(Ar(17));c=s.reducer,d=s.prepare}else c=s;u.addCase(t,c).exposeCaseReducer(r,c).exposeAction(r,d?ub(t,d):ub(t))}function pO(t){return t._reducerDefinitionType==="asyncThunk"}function gO(t){return t._reducerDefinitionType==="reducerWithPrepare"}function yO({type:t,reducerName:r},i,s,u){if(!u)throw new Error(Ar(18));const{payloadCreator:c,fulfilled:d,pending:h,rejected:m,settled:p,options:b}=i,_=u(t,c,b);s.exposeAction(r,_),d&&s.addCase(_.fulfilled,d),h&&s.addCase(_.pending,h),m&&s.addCase(_.rejected,m),p&&s.addMatcher(_.settled,p),s.exposeCaseReducer(r,{fulfilled:d||jo,pending:h||jo,rejected:m||jo,settled:p||jo})}function jo(){}function Ar(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}const bO={formValues:{}},Nv=zh({name:"start-screen",initialState:bO,reducers:{showStartScreen(t){t.startScreenStatus="VISIBLE",t.formValues={}},startChat(t,r){t.startScreenStatus="HIDDEN",t.formValues=r.payload.formValues},startAuthenticatedChat(t,r){t.startScreenStatus="HIDDEN",t.loginToken=r.payload.loginToken,t.loginRequestToken=void 0},requestLogin(t,r){t.loginRequestToken=r.payload.loginRequestToken,t.formValues=r.payload.formValues},loginWindowClosed(t){t.loginRequestToken=void 0}}}),{startChat:vO,startAuthenticatedChat:_O,showStartScreen:EO,requestLogin:SO,loginWindowClosed:TO}=Nv.actions,AO=Nv.reducer,Mv="RESET_CHAT_STATE",Dv="TOGGLE_TRANSCRIPT_MAIL_OVERLAY",Lv="SHOW_CONVERSATION_RATING_OVERLAY",Bv="HIDE_CONVERSATION_RATING_OVERLAY",Uv=()=>({type:hv}),xO=()=>({type:Mv}),jv=()=>({type:Dv}),iu=(t,r=void 0)=>({type:Lv,payload:{opener:t,defaultRating:r}}),OO=()=>({type:Bv}),db=(t,r,i)=>(s,u)=>{try{const c=u().connection.sessionId;if(!c)throw new Error("Session ID is not available");s({type:Lh,payload:{chunkId:i}}),hb(t,c,r,i,!1,s),hb(t,c,r,i,!0,s)}catch(c){console.error("Error loading source infos:",c),s({type:Dh})}},hb=(t,r,i,s,u,c)=>{const d=`/${t}/me/chat-widget/transcript/${i}/chunks/${s}?highlight=${u}`;fetch(d,{headers:{"x-bubble-chat-session-id":r}}).then(h=>{if(!h.ok)throw new Error(`HTTP error! Status: ${h.status}`);return h.json()}).then(h=>{const m={...h,chunkId:s,highlighted:u};c({type:fv,payload:m})}).catch(h=>{console.error("Error fetching source infos:",h),c({type:Dh,payload:{highlighted:u}})})},RO=()=>({type:Bh}),Gh="CONNECT",kh="CONNECTING",qh="CONNECTED",Fh="DISCONNECTED",Vh="RECONNECTED",Ph="RESTORE_SESSION_ID",bu="START",vu="CLEAR_SESSION_ID",wO=[Gh,kh,qh,Fh,Vh,Ph],CO=(t,r)=>({type:Gh,clientName:t,querystrings:r}),NO=t=>({type:Ph,sessionId:t}),MO=()=>({type:kh}),DO=()=>({type:qh}),LO=()=>({type:Fh}),BO=()=>({type:Vh}),Hv=(t,r)=>(i,s)=>{const u=s().connection,{formValues:c,loginToken:d}=s().startScreen;let h=u.sessionId;h===void 0&&(h=Jo());let m=u.userId;if(m===void 0){const p=Bo.get("bubble-chat-user-id")||Bo.get("bubble-chat-userId")||Bo.get("bf-webclient-userId");m=p||Jo(),Bo.set("bubble-chat-user-id",m)}i({type:bu,payload:{sessionId:h,userId:m,clientName:t,loginToken:d,querystrings:{...r,...c}}})},al=()=>(t,r)=>{const i=r().connection.sessionId||"";if(t(UO(i)),t(xO()),r().settings.enableStartScreen)t(EO());else{const s=Uh(),u=hu.parse(window.location.search);return t(Hv(s,u))}},UO=t=>({type:vu,payload:{sessionId:t}}),Ze=()=>{const t=du();return i=>{const s=t.formatMessage({id:i});return s===i?void 0:s}};var Ia=(t=>(t[t.CONNECTING=0]="CONNECTING",t[t.CONNECTED=1]="CONNECTED",t[t.RECONNECTED=2]="RECONNECTED",t[t.DISCONNECTED=3]="DISCONNECTED",t))(Ia||{}),su=(t=>(t.GUEST="GUEST",t.BOT="BOT",t.PERSON="PERSON",t))(su||{});const jO="_container_q2uun_1",HO="_chatcontent_q2uun_6",IO="_accessabilityHidden_q2uun_12",cd={container:jO,chatcontent:HO,accessabilityHidden:IO},zO="_messageContainer_ofi0g_1",GO="_messages_ofi0g_12",mb={messageContainer:zO,messages:GO};function ja(){return ja=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t},ja.apply(this,arguments)}const kO=["children","options"],qO={footnoteReference:"7"},pb=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((t,r)=>(t[r.toLowerCase()]=r,t),{class:"className",for:"htmlFor"}),gb={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},FO=["style","script","pre"],VO=["src","href","data","formAction","srcDoc","action"],PO=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,YO=/mailto:/i,XO=/\n{2,}$/,yb=/^(\s*>[\s\S]*?)(?=\n\n|$)/,ZO=/^ *> ?/gm,QO=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,KO=/^ {2,}\n/,$O=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,bb=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,vb=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,WO=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,JO=/^(?:\n *)*\n/,eR=/\r\n?/g,tR=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,nR=/^\[\^([^\]]+)]/,rR=/\f/g,aR=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,iR=/^\s*?\[(x|\s)\]/,_b=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Eb=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Sb=/^([^\n]+)\n *(=|-){3,} *\n/,fd=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,sR=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Tb=/^<!--[\s\S]*?(?:-->)/,lR=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,dd=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,oR=/^\{.*\}$/,uR=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,cR=/^<([^ >]+@[^ >]+)>/,fR=/^<([^ >]+:\/[^ >]+)>/,dR=/-([a-z])?/gi,Ab=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,hR=/^[^\n]+(?: \n|\n{2,})/,mR=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,pR=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,gR=/^\[([^\]]*)\] ?\[([^\]]*)\]/,yR=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,bR=/\t/g,vR=/(^ *\||\| *$)/g,_R=/^ *:-+: *$/,ER=/^ *:-+ *$/,SR=/^ *-+: *$/,_u=t=>`(?=[\\s\\S]+?\\1${t?"\\1":""})`,Eu="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",TR=RegExp(`^([*_])\\1${_u(1)}${Eu}\\1\\1(?!\\1)`),AR=RegExp(`^([*_])${_u(0)}${Eu}\\1(?!\\1)`),xR=RegExp(`^(==)${_u(0)}${Eu}\\1`),OR=RegExp(`^(~~)${_u(0)}${Eu}\\1`),RR=/^(:[a-zA-Z0-9-_]+:)/,wR=/^\\([^0-9A-Za-z\s])/,CR=/\\([^0-9A-Za-z\s])/g,NR=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,MR=/^\n+/,DR=/^([ \t]*)/,LR=/(?:^|\n)( *)$/,Yh="(?:\\d+\\.)",Xh="(?:[*+-])";function Iv(t){return"( *)("+(t===1?Yh:Xh)+") +"}const zv=Iv(1),Gv=Iv(2);function kv(t){return RegExp("^"+(t===1?zv:Gv))}const BR=kv(1),UR=kv(2);function qv(t){return RegExp("^"+(t===1?zv:Gv)+"[^\\n]*(?:\\n(?!\\1"+(t===1?Yh:Xh)+" )[^\\n]*)*(\\n|$)","gm")}const jR=qv(1),HR=qv(2);function Fv(t){const r=t===1?Yh:Xh;return RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}const Vv=Fv(1),Pv=Fv(2);function xb(t,r){const i=r===1,s=i?Vv:Pv,u=i?jR:HR,c=i?BR:UR;return{t:d=>c.test(d),o:Ci(function(d,h){const m=LR.exec(h.prevCapture);return m&&(h.list||!h.inline&&!h.simple)?s.exec(d=m[1]+d):null}),i:1,u(d,h,m){const p=i?+d[2]:void 0,b=d[0].replace(XO,`
|
|
93
|
+
*/var dy;function xA(){if(dy)return Be;dy=1;var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,i=t?Symbol.for("react.portal"):60106,s=t?Symbol.for("react.fragment"):60107,u=t?Symbol.for("react.strict_mode"):60108,c=t?Symbol.for("react.profiler"):60114,d=t?Symbol.for("react.provider"):60109,h=t?Symbol.for("react.context"):60110,m=t?Symbol.for("react.async_mode"):60111,p=t?Symbol.for("react.concurrent_mode"):60111,b=t?Symbol.for("react.forward_ref"):60112,_=t?Symbol.for("react.suspense"):60113,x=t?Symbol.for("react.suspense_list"):60120,U=t?Symbol.for("react.memo"):60115,R=t?Symbol.for("react.lazy"):60116,q=t?Symbol.for("react.block"):60121,z=t?Symbol.for("react.fundamental"):60117,E=t?Symbol.for("react.responder"):60118,w=t?Symbol.for("react.scope"):60119;function S(A){if(typeof A=="object"&&A!==null){var Z=A.$$typeof;switch(Z){case r:switch(A=A.type,A){case m:case p:case s:case c:case u:case _:return A;default:switch(A=A&&A.$$typeof,A){case h:case b:case R:case U:case d:return A;default:return Z}}case i:return Z}}}function H(A){return S(A)===p}return Be.AsyncMode=m,Be.ConcurrentMode=p,Be.ContextConsumer=h,Be.ContextProvider=d,Be.Element=r,Be.ForwardRef=b,Be.Fragment=s,Be.Lazy=R,Be.Memo=U,Be.Portal=i,Be.Profiler=c,Be.StrictMode=u,Be.Suspense=_,Be.isAsyncMode=function(A){return H(A)||S(A)===m},Be.isConcurrentMode=H,Be.isContextConsumer=function(A){return S(A)===h},Be.isContextProvider=function(A){return S(A)===d},Be.isElement=function(A){return typeof A=="object"&&A!==null&&A.$$typeof===r},Be.isForwardRef=function(A){return S(A)===b},Be.isFragment=function(A){return S(A)===s},Be.isLazy=function(A){return S(A)===R},Be.isMemo=function(A){return S(A)===U},Be.isPortal=function(A){return S(A)===i},Be.isProfiler=function(A){return S(A)===c},Be.isStrictMode=function(A){return S(A)===u},Be.isSuspense=function(A){return S(A)===_},Be.isValidElementType=function(A){return typeof A=="string"||typeof A=="function"||A===s||A===p||A===c||A===u||A===_||A===x||typeof A=="object"&&A!==null&&(A.$$typeof===R||A.$$typeof===U||A.$$typeof===d||A.$$typeof===h||A.$$typeof===b||A.$$typeof===z||A.$$typeof===E||A.$$typeof===w||A.$$typeof===q)},Be.typeOf=S,Be}var hy;function OA(){return hy||(hy=1,Xf.exports=xA()),Xf.exports}var Zf,my;function RA(){if(my)return Zf;my=1;var t=OA(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};c[t.ForwardRef]=s,c[t.Memo]=u;function d(R){return t.isMemo(R)?u:c[R.$$typeof]||r}var h=Object.defineProperty,m=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,b=Object.getOwnPropertyDescriptor,_=Object.getPrototypeOf,x=Object.prototype;function U(R,q,z){if(typeof q!="string"){if(x){var E=_(q);E&&E!==x&&U(R,E,z)}var w=m(q);p&&(w=w.concat(p(q)));for(var S=d(R),H=d(q),A=0;A<w.length;++A){var Z=w[A];if(!i[Z]&&!(z&&z[Z])&&!(H&&H[Z])&&!(S&&S[Z])){var W=b(q,Z);try{h(R,Z,W)}catch{}}}}return R}return Zf=U,Zf}RA();var Sh=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=B.createContext(null)):B.createContext(null);Sh.Consumer;var wA=Sh.Provider,CA=wA,NA=Sh;function du(){var t=B.useContext(NA);return K1(t),t}var Wd;(function(t){t.formatDate="FormattedDate",t.formatTime="FormattedTime",t.formatNumber="FormattedNumber",t.formatList="FormattedList",t.formatDisplayName="FormattedDisplayName"})(Wd||(Wd={}));var Jd;(function(t){t.formatDate="FormattedDateParts",t.formatTime="FormattedTimeParts",t.formatNumber="FormattedNumberParts",t.formatList="FormattedListParts"})(Jd||(Jd={}));function W1(t){var r=function(i){var s=du(),u=i.value,c=i.children,d=fu(i,["value","children"]),h=typeof u=="string"?new Date(u||0):u,m=t==="formatDate"?s.formatDateToParts(h,d):s.formatTimeToParts(h,d);return c(m)};return r.displayName=Jd[t],r}function rl(t){var r=function(i){var s=du(),u=i.value,c=i.children,d=fu(i,["value","children"]),h=s[t](u,d);if(typeof c=="function")return c(h);var m=s.textComponent||B.Fragment;return B.createElement(m,null,h)};return r.displayName=Wd[t],r}function J1(t){return t&&Object.keys(t).reduce(function(r,i){var s=t[i];return r[i]=V1(s)?TA(s):s,r},{})}var py=function(t,r,i,s){for(var u=[],c=4;c<arguments.length;c++)u[c-4]=arguments[c];var d=J1(s),h=$d.apply(void 0,Wn([t,r,i,d],u,!1));return Array.isArray(h)?SA(h):h},gy=function(t,r){var i=t.defaultRichTextElements,s=fu(t,["defaultRichTextElements"]),u=J1(i),c=bA(ie(ie(ie({},$1),s),{defaultRichTextElements:u}),r),d={locale:c.locale,timeZone:c.timeZone,fallbackOnEmptyString:c.fallbackOnEmptyString,formats:c.formats,defaultLocale:c.defaultLocale,defaultFormats:c.defaultFormats,messages:c.messages,onError:c.onError,defaultRichTextElements:u};return ie(ie({},c),{formatMessage:py.bind(null,d,c.formatters),$t:py.bind(null,d,c.formatters)})};function Qf(t){return{locale:t.locale,timeZone:t.timeZone,fallbackOnEmptyString:t.fallbackOnEmptyString,formats:t.formats,textComponent:t.textComponent,messages:t.messages,defaultLocale:t.defaultLocale,defaultFormats:t.defaultFormats,onError:t.onError,onWarn:t.onWarn,wrapRichTextChunksInFragment:t.wrapRichTextChunksInFragment,defaultRichTextElements:t.defaultRichTextElements}}var MA=(function(t){An(r,t);function r(){var i=t!==null&&t.apply(this,arguments)||this;return i.cache=X1(),i.state={cache:i.cache,intl:gy(Qf(i.props),i.cache),prevConfig:Qf(i.props)},i}return r.getDerivedStateFromProps=function(i,s){var u=s.prevConfig,c=s.cache,d=Qf(i);return AA(u,d)?null:{intl:gy(d,c),prevConfig:d}},r.prototype.render=function(){return K1(this.state.intl),B.createElement(CA,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=$1,r})(B.PureComponent);rl("formatDate");rl("formatTime");rl("formatNumber");rl("formatList");rl("formatDisplayName");W1("formatDate");W1("formatTime");const DA="_app_1rj0t_1",LA={app:DA},Cr=QS,st=WS,ev="%[a-f0-9]{2}",yy=new RegExp("("+ev+")|([^%]+?)","gi"),by=new RegExp("("+ev+")+","gi");function eh(t,r){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;r=r||1;const i=t.slice(0,r),s=t.slice(r);return Array.prototype.concat.call([],eh(i),eh(s))}function BA(t){try{return decodeURIComponent(t)}catch{let r=t.match(yy)||[];for(let i=1;i<r.length;i++)t=eh(r,i).join(""),r=t.match(yy)||[];return t}}function UA(t){const r={"%FE%FF":"��","%FF%FE":"��"};let i=by.exec(t);for(;i;){try{r[i[0]]=decodeURIComponent(i[0])}catch{const u=BA(i[0]);u!==i[0]&&(r[i[0]]=u)}i=by.exec(t)}r["%C2"]="�";const s=Object.keys(r);for(const u of s)t=t.replace(new RegExp(u,"g"),r[u]);return t}function jA(t){if(typeof t!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return decodeURIComponent(t)}catch{return UA(t)}}function HA(t,r){const i={};if(Array.isArray(r))for(const s of r){const u=Object.getOwnPropertyDescriptor(t,s);u?.enumerable&&Object.defineProperty(i,s,u)}else for(const s of Reflect.ownKeys(t)){const u=Object.getOwnPropertyDescriptor(t,s);if(u.enumerable){const c=t[s];r(s,c,t)&&Object.defineProperty(i,s,u)}}return i}function tv(t,r){if(!(typeof t=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t===""||r==="")return[];const i=t.indexOf(r);return i===-1?[]:[t.slice(0,i),t.slice(i+r.length)]}const IA=t=>t==null,zA=t=>encodeURIComponent(t).replaceAll(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),th=Symbol("encodeFragmentIdentifier");function GA(t){switch(t.arrayFormat){case"index":return r=>(i,s)=>{const u=i.length;return s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,[ft(r,t),"[",u,"]"].join("")]:[...i,[ft(r,t),"[",ft(u,t),"]=",ft(s,t)].join("")]};case"bracket":return r=>(i,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,[ft(r,t),"[]"].join("")]:[...i,[ft(r,t),"[]=",ft(s,t)].join("")];case"colon-list-separator":return r=>(i,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,[ft(r,t),":list="].join("")]:[...i,[ft(r,t),":list=",ft(s,t)].join("")];case"comma":case"separator":case"bracket-separator":{const r=t.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(s,u)=>u===void 0||t.skipNull&&u===null||t.skipEmptyString&&u===""?s:(u=u===null?"":u,s.length===0?[[ft(i,t),r,ft(u,t)].join("")]:[[s,ft(u,t)].join(t.arrayFormatSeparator)])}default:return r=>(i,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,ft(r,t)]:[...i,[ft(r,t),"=",ft(s,t)].join("")]}}function kA(t){let r;switch(t.arrayFormat){case"index":return(i,s,u)=>{if(r=/\[(\d*)]$/.exec(i),i=i.replace(/\[\d*]$/,""),!r){u[i]=s;return}u[i]===void 0&&(u[i]={}),u[i][r[1]]=s};case"bracket":return(i,s,u)=>{if(r=/(\[])$/.exec(i),i=i.replace(/\[]$/,""),!r){u[i]=s;return}if(u[i]===void 0){u[i]=[s];return}u[i]=[...u[i],s]};case"colon-list-separator":return(i,s,u)=>{if(r=/(:list)$/.exec(i),i=i.replace(/:list$/,""),!r){u[i]=s;return}if(u[i]===void 0){u[i]=[s];return}u[i]=[...u[i],s]};case"comma":case"separator":return(i,s,u)=>{const d=typeof s=="string"&&s.includes(t.arrayFormatSeparator)?s.split(t.arrayFormatSeparator).map(h=>Ha(h,t)):s===null?s:Ha(s,t);u[i]=d};case"bracket-separator":return(i,s,u)=>{const c=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!c){u[i]=s&&Ha(s,t);return}const d=s===null?[]:Ha(s,t).split(t.arrayFormatSeparator);if(u[i]===void 0){u[i]=d;return}u[i]=[...u[i],...d]};default:return(i,s,u)=>{if(u[i]===void 0){u[i]=s;return}u[i]=[...[u[i]].flat(),s]}}}function nv(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function ft(t,r){return r.encode?r.strict?zA(t):encodeURIComponent(t):t}function Ha(t,r){return r.decode?jA(t):t}function rv(t){return Array.isArray(t)?t.sort():typeof t=="object"?rv(Object.keys(t)).sort((r,i)=>Number(r)-Number(i)).map(r=>t[r]):t}function av(t){const r=t.indexOf("#");return r!==-1&&(t=t.slice(0,r)),t}function qA(t){let r="";const i=t.indexOf("#");return i!==-1&&(r=t.slice(i)),r}function vy(t,r,i){return i==="string"&&typeof t=="string"?t:typeof i=="function"&&typeof t=="string"?i(t):i==="boolean"&&t===null?!0:i==="boolean"&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")?t.toLowerCase()==="true":i==="boolean"&&t!==null&&(t.toLowerCase()==="1"||t.toLowerCase()==="0")?t.toLowerCase()==="1":i==="string[]"&&r.arrayFormat!=="none"&&typeof t=="string"?[t]:i==="number[]"&&r.arrayFormat!=="none"&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?[Number(t)]:i==="number"&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?Number(t):r.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")?t.toLowerCase()==="true":r.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?Number(t):t}function Th(t){t=av(t);const r=t.indexOf("?");return r===-1?"":t.slice(r+1)}function Ah(t,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...r},nv(r.arrayFormatSeparator);const i=kA(r),s=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return s;for(const u of t.split("&")){if(u==="")continue;const c=r.decode?u.replaceAll("+"," "):u;let[d,h]=tv(c,"=");d===void 0&&(d=c),h=h===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?h:Ha(h,r),i(Ha(d,r),h,s)}for(const[u,c]of Object.entries(s))if(typeof c=="object"&&c!==null&&r.types[u]!=="string")for(const[d,h]of Object.entries(c)){const m=r.types[u]?r.types[u].replace("[]",""):void 0;c[d]=vy(h,r,m)}else typeof c=="object"&&c!==null&&r.types[u]==="string"?s[u]=Object.values(c).join(r.arrayFormatSeparator):s[u]=vy(c,r,r.types[u]);return r.sort===!1?s:(r.sort===!0?Object.keys(s).sort():Object.keys(s).sort(r.sort)).reduce((u,c)=>{const d=s[c];return u[c]=d&&typeof d=="object"&&!Array.isArray(d)?rv(d):d,u},Object.create(null))}function iv(t,r){if(!t)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},nv(r.arrayFormatSeparator);const i=d=>r.skipNull&&IA(t[d])||r.skipEmptyString&&t[d]==="",s=GA(r),u={};for(const[d,h]of Object.entries(t))i(d)||(u[d]=h);const c=Object.keys(u);return r.sort!==!1&&c.sort(r.sort),c.map(d=>{let h=t[d];if(r.replacer&&(h=r.replacer(d,h),h===void 0)||h===void 0)return"";if(h===null)return ft(d,r);if(Array.isArray(h)){if(h.length===0&&r.arrayFormat==="bracket-separator")return ft(d,r)+"[]";let m=h;return r.replacer&&(m=h.map((p,b)=>r.replacer(`${d}[${b}]`,p)).filter(p=>p!==void 0)),m.reduce(s(d),[]).join("&")}return ft(d,r)+"="+ft(h,r)}).filter(d=>d.length>0).join("&")}function sv(t,r){r={decode:!0,...r};let[i,s]=tv(t,"#");return i===void 0&&(i=t),{url:i?.split("?")?.[0]??"",query:Ah(Th(t),r),...r&&r.parseFragmentIdentifier&&s?{fragmentIdentifier:Ha(s,r)}:{}}}function lv(t,r){r={encode:!0,strict:!0,[th]:!0,...r};const i=av(t.url).split("?")[0]||"",s=Th(t.url),u={...Ah(s,{sort:!1,...r}),...t.query};let c=iv(u,r);c&&=`?${c}`;let d=qA(t.url);if(typeof t.fragmentIdentifier=="string"){const h=new URL(i);h.hash=t.fragmentIdentifier,d=r[th]?h.hash:`#${t.fragmentIdentifier}`}return`${i}${c}${d}`}function ov(t,r,i){i={parseFragmentIdentifier:!0,[th]:!1,...i};const{url:s,query:u,fragmentIdentifier:c}=sv(t,i);return lv({url:s,query:HA(u,r),fragmentIdentifier:c},i)}function FA(t,r,i){const s=Array.isArray(r)?u=>!r.includes(u):(u,c)=>!r(u,c);return ov(t,s,i)}const hu=Object.freeze(Object.defineProperty({__proto__:null,exclude:FA,extract:Th,parse:Ah,parseUrl:sv,pick:ov,stringify:iv,stringifyUrl:lv},Symbol.toStringTag,{value:"Module"}));var Ln={},Bn={},Ie={},Eo={},pe={},_y;function fn(){return _y||(_y=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.GUEST_LOCALE_CHANGED=pe.DRAWER_CLOSE=pe.DRAWER_OPEN=pe.CONVERSATION_RATING_FROM_GUEST=pe.TRANSCRIPT_ITEM_GUEST_REACTION=pe.TRANSCRIPT_MAIL_REQUEST=pe.INBOX_CONNECT_REQUEST=pe.RESTART_CHAT_REQUEST=pe.EVENT_TO_GUEST=pe.NLU_REQUEST_EVENT=pe.EXPERTS_DISCONNECTED=pe.EXPERTS_DISCONNECT_REQUEST=pe.EXPERTS_CONNECTED=pe.EXPERTS_CONNECT_REQUEST=pe.MESSAGE_TO_GUEST=pe.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST=pe.MESSAGE_FROM_GUEST=pe.GUEST_FEEDBACK_RESPONSE=pe.GUEST_DISCONNECTED=pe.GUEST_CONNECTED=pe.TYPING_OFF=pe.TYPING_ON=void 0,pe.TYPING_ON="core.typing.on",pe.TYPING_OFF="core.typing.off",pe.GUEST_CONNECTED="core.guest.connected",pe.GUEST_DISCONNECTED="core.guest.disconnected",pe.GUEST_FEEDBACK_RESPONSE="core.guest.feedback.response",pe.MESSAGE_FROM_GUEST="core.message.from.guest",pe.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST="core.message.without.analysis.from.guest",pe.MESSAGE_TO_GUEST="core.message.to.guest",pe.EXPERTS_CONNECT_REQUEST="core.experts.connect.request",pe.EXPERTS_CONNECTED="core.experts.connected",pe.EXPERTS_DISCONNECT_REQUEST="core.experts.disconnect.request",pe.EXPERTS_DISCONNECTED="core.experts.disconnected",pe.NLU_REQUEST_EVENT="core.nlu.request.event",pe.EVENT_TO_GUEST="core.event.to.guest",pe.RESTART_CHAT_REQUEST="core.chat.restart.request",pe.INBOX_CONNECT_REQUEST="core.inbox.connect.request",pe.TRANSCRIPT_MAIL_REQUEST="core.transcript.mail.request",pe.TRANSCRIPT_ITEM_GUEST_REACTION="core.transcript.item.guest.reaction",pe.CONVERSATION_RATING_FROM_GUEST="core.conversation.rating.from.guest",pe.DRAWER_OPEN="core.drawer.open",pe.DRAWER_CLOSE="core.drawer.close",pe.GUEST_LOCALE_CHANGED="core.guest.locale.changed"),pe}var Ey;function VA(){if(Ey)return Eo;Ey=1,Object.defineProperty(Eo,"__esModule",{value:!0});const t=fn(),r=()=>({type:t.DRAWER_CLOSE});return Eo.default=r,Eo}var So={},Sy;function PA(){if(Sy)return So;Sy=1,Object.defineProperty(So,"__esModule",{value:!0});const t=fn(),r=(i,s)=>({type:t.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:i,intent:s}});return So.default=r,So}var To={},Ty;function YA(){if(Ty)return To;Ty=1,Object.defineProperty(To,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.GUEST_CONNECTED,payload:{sessionId:i}});return To.default=r,To}var Ao={},Ay;function XA(){if(Ay)return Ao;Ay=1,Object.defineProperty(Ao,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.GUEST_DISCONNECTED,payload:{sessionId:i}});return Ao.default=r,Ao}var xo={},xy;function ZA(){if(xy)return xo;xy=1,Object.defineProperty(xo,"__esModule",{value:!0});const t=fn(),r=(i,s)=>({type:t.GUEST_LOCALE_CHANGED,payload:{previousLocale:i,newLocale:s}});return xo.default=r,xo}var Oo={},Oy;function QA(){if(Oy)return Oo;Oy=1,Object.defineProperty(Oo,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.DRAWER_OPEN,payload:{parameters:{contentUrl:i}}});return Oo.default=r,Oo}var Ro={},$e={},Ry;function xh(){if(Ry)return $e;Ry=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.getStringRepresentationFromMessage=$e.MessageTypeEnum=$e.AudioMessage=$e.FileMessage=$e.ImageMessage=$e.VideoMessage=$e.MarkdownMessage=$e.DetailMessage=$e.TextMessage=$e.Message=void 0;class t{type;sender;sources;quickReplies;constructor(_,x,U=[],R=[]){this.type=_,this.sender=x,this.sources=U,this.quickReplies=R}addQuickReply(_,x){this.quickReplies.push({label:_,payload:x})}}$e.Message=t;class r extends t{text;constructor(_,x,U=[],R=[]){super(m.TEXT,x,U,R),this.text=_}}$e.TextMessage=r;class i extends t{title;text;imageUrl;itemUrl;buttons;constructor(_,x){super(m.DETAIL,x),this.title=_,this.text="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(_){this.imageUrl=_}setItemUrl(_){this.itemUrl=_}setText(_){this.text=_}addButton(_){this.buttons.push(_)}}$e.DetailMessage=i;class s extends t{markdown;constructor(_,x,U=[],R=[]){super(m.MARKDOWN,x,U,R),this.markdown=_}}$e.MarkdownMessage=s;class u extends t{url;constructor(_,x){super(m.VIDEO,x),this.url=_}}$e.VideoMessage=u;class c extends t{url;constructor(_,x){super(m.IMAGE,x),this.url=_}}$e.ImageMessage=c;class d extends t{url;constructor(_,x){super(m.FILE,x),this.url=_}}$e.FileMessage=d;class h extends t{url;constructor(_,x){super(m.AUDIO,x),this.url=_}}$e.AudioMessage=h;var m;(function(b){b.TEXT="TEXT",b.DETAIL="DETAIL",b.MARKDOWN="MARKDOWN",b.VIDEO="VIDEO",b.IMAGE="IMAGE",b.FILE="FILE",b.AUDIO="AUDIO"})(m||($e.MessageTypeEnum=m={}));const p=b=>{switch(b.type){case m.TEXT:return b.text;case m.DETAIL:return`${b.title}`;case m.MARKDOWN:return b.markdown;case m.VIDEO:return`Video Url: ${b.url}`;case m.IMAGE:return`Image Url: ${b.url}`;case m.FILE:return`File Url: ${b.url}`;case m.AUDIO:return`Audio Url: ${b.url}`;default:throw new Error("Unknown message type "+b.type)}};return $e.getStringRepresentationFromMessage=p,$e}var sn={},wy;function Oh(){if(wy)return sn;wy=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.UserType=sn.PersonUser=sn.GuestUser=sn.BotUser=sn.User=void 0;class t{type;id;name;avatar;constructor(d,h,m,p){this.type=d,this.id=h,this.name=m,this.avatar=p}}sn.User=t;class r extends t{constructor(){super(u.BOT,null,"Chatbot","bot.svg")}}sn.BotUser=r;class i extends t{constructor(){super(u.GUEST,null,"Guest","visitor.svg")}}sn.GuestUser=i;class s extends t{constructor(d,h,m){super(u.PERSON,d,h,m)}}sn.PersonUser=s;var u;return(function(c){c.GUEST="GUEST",c.BOT="BOT",c.PERSON="PERSON"})(u||(sn.UserType=u={})),sn}var Cy;function KA(){if(Cy)return Ro;Cy=1,Object.defineProperty(Ro,"__esModule",{value:!0});const t=xh(),r=Oh(),i=fn(),s=u=>{const c=new t.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_FROM_GUEST,message:c}};return Ro.default=s,Ro}var wo={},Ny;function $A(){if(Ny)return wo;Ny=1,Object.defineProperty(wo,"__esModule",{value:!0});const t=xh(),r=Oh(),i=fn(),s=(u,c={})=>{const d=new t.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:d,payload:c}};return wo.default=s,wo}var Co={},My;function WA(){if(My)return Co;My=1,Object.defineProperty(Co,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.NLU_REQUEST_EVENT,event:i});return Co.default=r,Co}var No={},Dy;function JA(){if(Dy)return No;Dy=1,Object.defineProperty(No,"__esModule",{value:!0});const t=fn(),r=()=>({type:t.RESTART_CHAT_REQUEST});return No.default=r,No}var Mo={},Ly;function ex(){if(Ly)return Mo;Ly=1,Object.defineProperty(Mo,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.MESSAGE_TO_GUEST,message:i});return Mo.default=r,Mo}var Do={},By;function tx(){if(By)return Do;By=1,Object.defineProperty(Do,"__esModule",{value:!0});const t=fn(),r=(i,s,u=null,c=null)=>({type:t.TRANSCRIPT_ITEM_GUEST_REACTION,payload:{actionId:i,reaction:s,category:u,comment:c}});return Do.default=r,Do}var Uy;function nx(){if(Uy)return Ie;Uy=1;var t=Ie&&Ie.__importDefault||function(U){return U&&U.__esModule?U:{default:U}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.transcriptItemGuestReaction=Ie.sendMessageToGuest=Ie.restartChatRequest=Ie.requestNLUEvent=Ie.receiveTextMessageWithoutAnalysisFromGuest=Ie.receiveTextMessageFromGuest=Ie.openDrawer=Ie.guestLocaleChanged=Ie.guestDisconnected=Ie.guestConnected=Ie.feedbackFromGuestResponse=Ie.closeDrawer=void 0;const r=t(VA());Ie.closeDrawer=r.default;const i=t(PA());Ie.feedbackFromGuestResponse=i.default;const s=t(YA());Ie.guestConnected=s.default;const u=t(XA());Ie.guestDisconnected=u.default;const c=t(ZA());Ie.guestLocaleChanged=c.default;const d=t(QA());Ie.openDrawer=d.default;const h=t(KA());Ie.receiveTextMessageFromGuest=h.default;const m=t($A());Ie.receiveTextMessageWithoutAnalysisFromGuest=m.default;const p=t(WA());Ie.requestNLUEvent=p.default;const b=t(JA());Ie.restartChatRequest=b.default;const _=t(ex());Ie.sendMessageToGuest=_.default;const x=t(tx());return Ie.transcriptItemGuestReaction=x.default,Ie}var Kf={},jy;function rx(){return jy||(jy=1,Object.defineProperty(Kf,"__esModule",{value:!0})),Kf}var Hy;function ax(){return Hy||(Hy=1,(function(t){var r=Bn&&Bn.__createBinding||(Object.create?(function(c,d,h,m){m===void 0&&(m=h);var p=Object.getOwnPropertyDescriptor(d,h);(!p||("get"in p?!d.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,p)}):(function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]})),i=Bn&&Bn.__setModuleDefault||(Object.create?(function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}):function(c,d){c.default=d}),s=Bn&&Bn.__importStar||(function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(m[m.length]=p);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),p=0;p<m.length;p++)m[p]!=="default"&&r(h,d,m[p]);return i(h,d),h}})(),u=Bn&&Bn.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&r(d,c,h)};Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTypes=t.Actions=void 0,t.Actions=s(nx()),t.ActionTypes=s(fn()),u(rx(),t)})(Bn)),Bn}var ln={},$f={},Iy;function ix(){return Iy||(Iy=1,Object.defineProperty($f,"__esModule",{value:!0})),$f}var Us={},zy;function sx(){if(zy)return Us;zy=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.NullableKnowledgeBaseAdapter=void 0;class t{async createApiKnowledgeBase(i){throw new Error("Method not implemented.")}async updateApiKnowledgeBase(i,s){throw new Error("Method not implemented.")}async deleteApiKnowledgeBase(i){throw new Error("Method not implemented.")}async upsertApiKnowledgeBase(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseById(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findApiKnowledgeBases(){throw new Error("Method not implemented.")}async deleteApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findKnowledgeBaseEntries(i){throw new Error("Method not implemented.")}async createKnowledgeBaseEntry(i,s){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntry(i,s,u){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntry(i,s){throw new Error("Method not implemented.")}async upsertKnowledgeBaseEntry(i,s){throw new Error("Method not implemented.")}async retrieveKnowledgeBaseEntryConfig(i,s){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryByUriAlias(i,s){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntriesIndexedBeforeDate(i,s){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryAttachments(i,s){throw new Error("Method not implemented.")}async createKnowledgeBaseEntryAttachment(i,s,u){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntryAttachment(i,s,u,c){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntryAttachment(i,s,u){throw new Error("Method not implemented.")}async setIndexingStatus(i,s){throw new Error("Method not implemented.")}async subscribeToReindex(i,s){throw new Error("Method not implemented.")}isContentTypeSupported(i){throw new Error("Method not implemented.")}registerTool(i,s){throw new Error("Method not implemented.")}async getTools(i){throw new Error("Method not implemented.")}}return Us.NullableKnowledgeBaseAdapter=t,Us}var Gy;function lx(){if(Gy)return ln;Gy=1;var t=ln&&ln.__createBinding||(Object.create?(function(u,c,d,h){h===void 0&&(h=d);var m=Object.getOwnPropertyDescriptor(c,d);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(u,h,m)}):(function(u,c,d,h){h===void 0&&(h=d),u[h]=c[d]})),r=ln&&ln.__setModuleDefault||(Object.create?(function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}):function(u,c){u.default=c}),i=ln&&ln.__importStar||(function(){var u=function(c){return u=Object.getOwnPropertyNames||function(d){var h=[];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(h[h.length]=m);return h},u(c)};return function(c){if(c&&c.__esModule)return c;var d={};if(c!=null)for(var h=u(c),m=0;m<h.length;m++)h[m]!=="default"&&t(d,c,h[m]);return r(d,c),d}})();Object.defineProperty(ln,"__esModule",{value:!0}),ln.NullableCmsAdapter=ln.KnowledgeBase=void 0,ln.KnowledgeBase=i(ix());const s=sx();return ln.NullableCmsAdapter={knowledgeBase:new s.NullableKnowledgeBaseAdapter},ln}var Na={},Wf={},ky;function ox(){return ky||(ky=1,Object.defineProperty(Wf,"__esModule",{value:!0})),Wf}var Jf={},qy;function ux(){return qy||(qy=1,Object.defineProperty(Jf,"__esModule",{value:!0})),Jf}var ed={},Fy;function cx(){return Fy||(Fy=1,Object.defineProperty(ed,"__esModule",{value:!0})),ed}var td={},Vy;function fx(){return Vy||(Vy=1,Object.defineProperty(td,"__esModule",{value:!0})),td}var js={},Py;function dx(){if(Py)return js;Py=1,Object.defineProperty(js,"__esModule",{value:!0}),js.checkMiddlewareCondition=void 0;const t=async(r,i,s)=>(Array.isArray(r)?r:[r]).reduce(async(c,d)=>await c?await d(i,s):!1,Promise.resolve(!0));return js.checkMiddlewareCondition=t,js}var nd={},Yy;function hx(){return Yy||(Yy=1,Object.defineProperty(nd,"__esModule",{value:!0})),nd}var rd={},Xy;function mx(){return Xy||(Xy=1,Object.defineProperty(rd,"__esModule",{value:!0})),rd}var ad={},Zy;function px(){return Zy||(Zy=1,Object.defineProperty(ad,"__esModule",{value:!0})),ad}var Qy;function gx(){return Qy||(Qy=1,(function(t){var r=Na&&Na.__createBinding||(Object.create?(function(s,u,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,d,h)}):(function(s,u,c,d){d===void 0&&(d=c),s[d]=u[c]})),i=Na&&Na.__exportStar||function(s,u){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&r(u,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),i(ox(),t),i(ux(),t),i(cx(),t),i(fx(),t),i(dx(),t),i(hx(),t),i(mx(),t),i(px(),t)})(Na)),Na}var Ma={},Un={},Ky;function yx(){if(Ky)return Un;Ky=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.ButtonTypeEnum=Un.PostbackButton=Un.UrlButton=Un.Button=void 0;class t{title;type;constructor(c,d){this.title=c,this.type=d}}Un.Button=t;class r extends t{url;constructor(c,d){super(c,s.WEB_URL),this.url=d}}Un.UrlButton=r;class i extends t{payload;constructor(c,d){super(c,s.POSTBACK),this.payload=d}}Un.PostbackButton=i;var s;return(function(u){u.WEB_URL="web_url",u.POSTBACK="postback"})(s||(Un.ButtonTypeEnum=s={})),Un}var id={},$y;function bx(){return $y||($y=1,Object.defineProperty(id,"__esModule",{value:!0})),id}var Hs={},Wy;function vx(){if(Wy)return Hs;Wy=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.SatisfactionEnum=void 0;var t;return(function(r){r.GOOD="GOOD",r.BAD="BAD"})(t||(Hs.SatisfactionEnum=t={})),Hs}var Jy;function eb(){return Jy||(Jy=1,(function(t){var r=Ma&&Ma.__createBinding||(Object.create?(function(s,u,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,d,h)}):(function(s,u,c,d){d===void 0&&(d=c),s[d]=u[c]})),i=Ma&&Ma.__exportStar||function(s,u){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&r(u,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),i(yx(),t),i(bx(),t),i(vx(),t),i(xh(),t),i(Oh(),t)})(Ma)),Ma}var tb;function _x(){return tb||(tb=1,(function(t){var r=Ln&&Ln.__createBinding||(Object.create?(function(c,d,h,m){m===void 0&&(m=h);var p=Object.getOwnPropertyDescriptor(d,h);(!p||("get"in p?!d.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,p)}):(function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]})),i=Ln&&Ln.__setModuleDefault||(Object.create?(function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}):function(c,d){c.default=d}),s=Ln&&Ln.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&r(d,c,h)},u=Ln&&Ln.__importStar||(function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(m[m.length]=p);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),p=0;p<m.length;p++)m[p]!=="default"&&r(h,d,m[p]);return i(h,d),h}})();Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.CMS=void 0,s(ax(),t),t.CMS=u(lx()),s(gx(),t),t.Model=u(eb()),s(eb(),t)})(Ln)),Ln}var Te=_x();const uv=t=>r=>(t.payload.type!==Te.ActionTypes.MESSAGE_FROM_GUEST&&r(Te.Actions.receiveTextMessageWithoutAnalysisFromGuest(t.label,t.payload)),r(t.payload)),cv=t=>(r,i)=>{const{quickReplies:s}=i().chat,u=s.find(c=>t.toLocaleLowerCase().indexOf(c.label.toLocaleLowerCase())>-1);return r(u?uv({...u,label:t}):JSON.parse(JSON.stringify(Te.Actions.receiveTextMessageFromGuest(t))))},Rh="MESSAGE_TO_PARENT_PAGE",wh="RESTORE_PREVIOUS_CHAT_MESSAGES",Ch="AUDIO_MESSAGE_FROM_USER",Nh="RECEIVE_SPEECH_TRANSCRIPTION",Mh="ENABLE_CONVERSATION_RATING",fv="LOAD_SOURCE_INFOS_RESPONSE",Dh="LOAD_SOURCE_INFOS_ERROR",Lh="LOAD_SOURCE_INFOS_REQUEST",Bh="CLOSE_SOURCE_INFOS",Ex="webclient.get.started",dv="webclient.window.expand",hv="webclient.window.close",mv="webclient.transcript.pdf.download",Sx=[Rh,wh,Ch,Nh,Mh,Lh,Bh],Tx=t=>({type:Ch,buffer:t}),Ax=t=>({type:Nh,transcription:t}),xx=t=>({type:Te.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:t}}}),Ox=()=>({type:mv}),Rx=({rating:t})=>({type:Mh,payload:{rating:t}}),wx=(t,r)=>({type:Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:t,feedback:r}}),pv=t=>Te.Actions.requestNLUEvent(t),Cx=t=>({type:wh,messages:t}),Nx=t=>{switch(t.type){case Te.ButtonTypeEnum.WEB_URL:return yv(t.url);case Te.ButtonTypeEnum.POSTBACK:return t.payload;default:throw new Error(`unknown button type ${t.type}`)}},gv=t=>yv(t),yv=t=>({type:Rh,message:{type:"webclient.change.url",url:t}});/*! js-cookie v3.0.5 | MIT */function Lo(t){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)t[s]=i[s]}return t}var Mx={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function nh(t,r){function i(u,c,d){if(!(typeof document>"u")){d=Lo({},r,d),typeof d.expires=="number"&&(d.expires=new Date(Date.now()+d.expires*864e5)),d.expires&&(d.expires=d.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var h="";for(var m in d)d[m]&&(h+="; "+m,d[m]!==!0&&(h+="="+d[m].split(";")[0]));return document.cookie=u+"="+t.write(c,u)+h}}function s(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var c=document.cookie?document.cookie.split("; "):[],d={},h=0;h<c.length;h++){var m=c[h].split("="),p=m.slice(1).join("=");try{var b=decodeURIComponent(m[0]);if(d[b]=t.read(p,b),u===b)break}catch{}}return u?d[u]:d}}return Object.create({set:i,get:s,remove:function(u,c){i(u,"",Lo({},c,{expires:-1}))},withAttributes:function(u){return nh(this.converter,Lo({},this.attributes,u))},withConverter:function(u){return nh(Lo({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}var Bo=nh(Mx,{path:"/"});const wt=[];for(let t=0;t<256;++t)wt.push((t+256).toString(16).slice(1));function Dx(t,r=0){return(wt[t[r+0]]+wt[t[r+1]]+wt[t[r+2]]+wt[t[r+3]]+"-"+wt[t[r+4]]+wt[t[r+5]]+"-"+wt[t[r+6]]+wt[t[r+7]]+"-"+wt[t[r+8]]+wt[t[r+9]]+"-"+wt[t[r+10]]+wt[t[r+11]]+wt[t[r+12]]+wt[t[r+13]]+wt[t[r+14]]+wt[t[r+15]]).toLowerCase()}let sd;const Lx=new Uint8Array(16);function Bx(){if(!sd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");sd=crypto.getRandomValues.bind(crypto)}return sd(Lx)}const Ux=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nb={randomUUID:Ux};function jx(t,r,i){t=t||{};const s=t.random??t.rng?.()??Bx();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Dx(s)}function Jo(t,r,i){return nb.randomUUID&&!t?nb.randomUUID():jx(t)}const Uh=()=>Hx(window.location.pathname),Hx=t=>{const r=t.split("/"),i=t.endsWith("/");return r[r.length-(i?2:1)]};function Ct(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Ix=typeof Symbol=="function"&&Symbol.observable||"@@observable",rb=Ix,ld=()=>Math.random().toString(36).substring(7).split("").join("."),zx={INIT:`@@redux/INIT${ld()}`,REPLACE:`@@redux/REPLACE${ld()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ld()}`},eu=zx;function jh(t){if(typeof t!="object"||t===null)return!1;let r=t;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r||Object.getPrototypeOf(t)===null}function bv(t,r,i){if(typeof t!="function")throw new Error(Ct(2));if(typeof r=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Ct(0));if(typeof r=="function"&&typeof i>"u"&&(i=r,r=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Ct(1));return i(bv)(t,r)}let s=t,u=r,c=new Map,d=c,h=0,m=!1;function p(){d===c&&(d=new Map,c.forEach((z,E)=>{d.set(E,z)}))}function b(){if(m)throw new Error(Ct(3));return u}function _(z){if(typeof z!="function")throw new Error(Ct(4));if(m)throw new Error(Ct(5));let E=!0;p();const w=h++;return d.set(w,z),function(){if(E){if(m)throw new Error(Ct(6));E=!1,p(),d.delete(w),c=null}}}function x(z){if(!jh(z))throw new Error(Ct(7));if(typeof z.type>"u")throw new Error(Ct(8));if(typeof z.type!="string")throw new Error(Ct(17));if(m)throw new Error(Ct(9));try{m=!0,u=s(u,z)}finally{m=!1}return(c=d).forEach(w=>{w()}),z}function U(z){if(typeof z!="function")throw new Error(Ct(10));s=z,x({type:eu.REPLACE})}function R(){const z=_;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(Ct(11));function w(){const H=E;H.next&&H.next(b())}return w(),{unsubscribe:z(w)}},[rb](){return this}}}return x({type:eu.INIT}),{dispatch:x,subscribe:_,getState:b,replaceReducer:U,[rb]:R}}function Gx(t){Object.keys(t).forEach(r=>{const i=t[r];if(typeof i(void 0,{type:eu.INIT})>"u")throw new Error(Ct(12));if(typeof i(void 0,{type:eu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ct(13))})}function vv(t){const r=Object.keys(t),i={};for(let c=0;c<r.length;c++){const d=r[c];typeof t[d]=="function"&&(i[d]=t[d])}const s=Object.keys(i);let u;try{Gx(i)}catch(c){u=c}return function(d={},h){if(u)throw u;let m=!1;const p={};for(let b=0;b<s.length;b++){const _=s[b],x=i[_],U=d[_],R=x(U,h);if(typeof R>"u")throw h&&h.type,new Error(Ct(14));p[_]=R,m=m||R!==U}return m=m||s.length!==Object.keys(d).length,m?p:d}}function tu(...t){return t.length===0?r=>r:t.length===1?t[0]:t.reduce((r,i)=>(...s)=>r(i(...s)))}function kx(...t){return r=>(i,s)=>{const u=r(i,s);let c=()=>{throw new Error(Ct(15))};const d={getState:u.getState,dispatch:(m,...p)=>c(m,...p)},h=t.map(m=>m(d));return c=tu(...h)(u.dispatch),{...u,dispatch:c}}}function qx(t){return jh(t)&&"type"in t&&typeof t.type=="string"}var _v=Symbol.for("immer-nothing"),ab=Symbol.for("immer-draftable"),un=Symbol.for("immer-state");function zn(t,...r){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var wi=Object.getPrototypeOf;function Ga(t){return!!t&&!!t[un]}function wr(t){return t?Ev(t)||Array.isArray(t)||!!t[ab]||!!t.constructor?.[ab]||pu(t)||gu(t):!1}var Fx=Object.prototype.constructor.toString();function Ev(t){if(!t||typeof t!="object")return!1;const r=wi(t);if(r===null)return!0;const i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object?!0:typeof i=="function"&&Function.toString.call(i)===Fx}function nu(t,r){mu(t)===0?Reflect.ownKeys(t).forEach(i=>{r(i,t[i],t)}):t.forEach((i,s)=>r(s,i,t))}function mu(t){const r=t[un];return r?r.type_:Array.isArray(t)?1:pu(t)?2:gu(t)?3:0}function rh(t,r){return mu(t)===2?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function Sv(t,r,i){const s=mu(t);s===2?t.set(r,i):s===3?t.add(i):t[r]=i}function Vx(t,r){return t===r?t!==0||1/t===1/r:t!==t&&r!==r}function pu(t){return t instanceof Map}function gu(t){return t instanceof Set}function Ua(t){return t.copy_||t.base_}function ah(t,r){if(pu(t))return new Map(t);if(gu(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const i=Ev(t);if(r===!0||r==="class_only"&&!i){const s=Object.getOwnPropertyDescriptors(t);delete s[un];let u=Reflect.ownKeys(s);for(let c=0;c<u.length;c++){const d=u[c],h=s[d];h.writable===!1&&(h.writable=!0,h.configurable=!0),(h.get||h.set)&&(s[d]={configurable:!0,writable:!0,enumerable:h.enumerable,value:t[d]})}return Object.create(wi(t),s)}else{const s=wi(t);if(s!==null&&i)return{...t};const u=Object.create(s);return Object.assign(u,t)}}function Hh(t,r=!1){return yu(t)||Ga(t)||!wr(t)||(mu(t)>1&&(t.set=t.add=t.clear=t.delete=Px),Object.freeze(t),r&&Object.entries(t).forEach(([i,s])=>Hh(s,!0))),t}function Px(){zn(2)}function yu(t){return Object.isFrozen(t)}var Yx={};function ka(t){const r=Yx[t];return r||zn(0,t),r}var Ws;function Tv(){return Ws}function Xx(t,r){return{drafts_:[],parent_:t,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ib(t,r){r&&(ka("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=r)}function ih(t){sh(t),t.drafts_.forEach(Zx),t.drafts_=null}function sh(t){t===Ws&&(Ws=t.parent_)}function sb(t){return Ws=Xx(Ws,t)}function Zx(t){const r=t[un];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function lb(t,r){r.unfinalizedDrafts_=r.drafts_.length;const i=r.drafts_[0];return t!==void 0&&t!==i?(i[un].modified_&&(ih(r),zn(4)),wr(t)&&(t=ru(r,t),r.parent_||au(r,t)),r.patches_&&ka("Patches").generateReplacementPatches_(i[un].base_,t,r.patches_,r.inversePatches_)):t=ru(r,i,[]),ih(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),t!==_v?t:void 0}function ru(t,r,i){if(yu(r))return r;const s=r[un];if(!s)return nu(r,(u,c)=>ob(t,s,r,u,c,i)),r;if(s.scope_!==t)return r;if(!s.modified_)return au(t,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;const u=s.copy_;let c=u,d=!1;s.type_===3&&(c=new Set(u),u.clear(),d=!0),nu(c,(h,m)=>ob(t,s,u,h,m,i,d)),au(t,u,!1),i&&t.patches_&&ka("Patches").generatePatches_(s,i,t.patches_,t.inversePatches_)}return s.copy_}function ob(t,r,i,s,u,c,d){if(Ga(u)){const h=c&&r&&r.type_!==3&&!rh(r.assigned_,s)?c.concat(s):void 0,m=ru(t,u,h);if(Sv(i,s,m),Ga(m))t.canAutoFreeze_=!1;else return}else d&&i.add(u);if(wr(u)&&!yu(u)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;ru(t,u),(!r||!r.scope_.parent_)&&typeof s!="symbol"&&Object.prototype.propertyIsEnumerable.call(i,s)&&au(t,u)}}function au(t,r,i=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Hh(r,i)}function Qx(t,r){const i=Array.isArray(t),s={type_:i?1:0,scope_:r?r.scope_:Tv(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let u=s,c=Ih;i&&(u=[s],c=Js);const{revoke:d,proxy:h}=Proxy.revocable(u,c);return s.draft_=h,s.revoke_=d,h}var Ih={get(t,r){if(r===un)return t;const i=Ua(t);if(!rh(i,r))return Kx(t,i,r);const s=i[r];return t.finalized_||!wr(s)?s:s===od(t.base_,r)?(ud(t),t.copy_[r]=oh(s,t)):s},has(t,r){return r in Ua(t)},ownKeys(t){return Reflect.ownKeys(Ua(t))},set(t,r,i){const s=Av(Ua(t),r);if(s?.set)return s.set.call(t.draft_,i),!0;if(!t.modified_){const u=od(Ua(t),r),c=u?.[un];if(c&&c.base_===i)return t.copy_[r]=i,t.assigned_[r]=!1,!0;if(Vx(i,u)&&(i!==void 0||rh(t.base_,r)))return!0;ud(t),lh(t)}return t.copy_[r]===i&&(i!==void 0||r in t.copy_)||Number.isNaN(i)&&Number.isNaN(t.copy_[r])||(t.copy_[r]=i,t.assigned_[r]=!0),!0},deleteProperty(t,r){return od(t.base_,r)!==void 0||r in t.base_?(t.assigned_[r]=!1,ud(t),lh(t)):delete t.assigned_[r],t.copy_&&delete t.copy_[r],!0},getOwnPropertyDescriptor(t,r){const i=Ua(t),s=Reflect.getOwnPropertyDescriptor(i,r);return s&&{writable:!0,configurable:t.type_!==1||r!=="length",enumerable:s.enumerable,value:i[r]}},defineProperty(){zn(11)},getPrototypeOf(t){return wi(t.base_)},setPrototypeOf(){zn(12)}},Js={};nu(Ih,(t,r)=>{Js[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});Js.deleteProperty=function(t,r){return Js.set.call(this,t,r,void 0)};Js.set=function(t,r,i){return Ih.set.call(this,t[0],r,i,t[0])};function od(t,r){const i=t[un];return(i?Ua(i):t)[r]}function Kx(t,r,i){const s=Av(r,i);return s?"value"in s?s.value:s.get?.call(t.draft_):void 0}function Av(t,r){if(!(r in t))return;let i=wi(t);for(;i;){const s=Object.getOwnPropertyDescriptor(i,r);if(s)return s;i=wi(i)}}function lh(t){t.modified_||(t.modified_=!0,t.parent_&&lh(t.parent_))}function ud(t){t.copy_||(t.copy_=ah(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var $x=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,i,s)=>{if(typeof r=="function"&&typeof i!="function"){const c=i;i=r;const d=this;return function(m=c,...p){return d.produce(m,b=>i.call(this,b,...p))}}typeof i!="function"&&zn(6),s!==void 0&&typeof s!="function"&&zn(7);let u;if(wr(r)){const c=sb(this),d=oh(r,void 0);let h=!0;try{u=i(d),h=!1}finally{h?ih(c):sh(c)}return ib(c,s),lb(u,c)}else if(!r||typeof r!="object"){if(u=i(r),u===void 0&&(u=r),u===_v&&(u=void 0),this.autoFreeze_&&Hh(u,!0),s){const c=[],d=[];ka("Patches").generateReplacementPatches_(r,u,c,d),s(c,d)}return u}else zn(1,r)},this.produceWithPatches=(r,i)=>{if(typeof r=="function")return(d,...h)=>this.produceWithPatches(d,m=>r(m,...h));let s,u;return[this.produce(r,i,(d,h)=>{s=d,u=h}),s,u]},typeof t?.autoFreeze=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof t?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){wr(t)||zn(8),Ga(t)&&(t=Wx(t));const r=sb(this),i=oh(t,void 0);return i[un].isManual_=!0,sh(r),i}finishDraft(t,r){const i=t&&t[un];(!i||!i.isManual_)&&zn(9);const{scope_:s}=i;return ib(s,r),lb(void 0,s)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,r){let i;for(i=r.length-1;i>=0;i--){const u=r[i];if(u.path.length===0&&u.op==="replace"){t=u.value;break}}i>-1&&(r=r.slice(i+1));const s=ka("Patches").applyPatches_;return Ga(t)?s(t,r):this.produce(t,u=>s(u,r))}};function oh(t,r){const i=pu(t)?ka("MapSet").proxyMap_(t,r):gu(t)?ka("MapSet").proxySet_(t,r):Qx(t,r);return(r?r.scope_:Tv()).drafts_.push(i),i}function Wx(t){return Ga(t)||zn(10,t),xv(t)}function xv(t){if(!wr(t)||yu(t))return t;const r=t[un];let i;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,i=ah(t,r.scope_.immer_.useStrictShallowCopy_)}else i=ah(t,!0);return nu(i,(s,u)=>{Sv(i,s,xv(u))}),r&&(r.finalized_=!1),i}var cn=new $x,Ov=cn.produce;cn.produceWithPatches.bind(cn);cn.setAutoFreeze.bind(cn);cn.setUseStrictShallowCopy.bind(cn);cn.applyPatches.bind(cn);cn.createDraft.bind(cn);cn.finishDraft.bind(cn);function Rv(t){return({dispatch:i,getState:s})=>u=>c=>typeof c=="function"?c(i,s,t):u(c)}var Jx=Rv(),eO=Rv,tO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?tu:tu.apply(null,arguments)};function ub(t,r){function i(...s){if(r){let u=r(...s);if(!u)throw new Error(Ar(0));return{type:t,payload:u.payload,..."meta"in u&&{meta:u.meta},..."error"in u&&{error:u.error}}}return{type:t,payload:s[0]}}return i.toString=()=>`${t}`,i.type=t,i.match=s=>qx(s)&&s.type===t,i}var wv=class Zs extends Array{constructor(...r){super(...r),Object.setPrototypeOf(this,Zs.prototype)}static get[Symbol.species](){return Zs}concat(...r){return super.concat.apply(this,r)}prepend(...r){return r.length===1&&Array.isArray(r[0])?new Zs(...r[0].concat(this)):new Zs(...r.concat(this))}};function cb(t){return wr(t)?Ov(t,()=>{}):t}function Uo(t,r,i){return t.has(r)?t.get(r):t.set(r,i(r)).get(r)}function nO(t){return typeof t=="boolean"}var rO=()=>function(r){const{thunk:i=!0,immutableCheck:s=!0,serializableCheck:u=!0,actionCreatorCheck:c=!0}=r??{};let d=new wv;return i&&(nO(i)?d.push(Jx):d.push(eO(i.extraArgument))),d},aO="RTK_autoBatch",fb=t=>r=>{setTimeout(r,t)},iO=(t={type:"raf"})=>r=>(...i)=>{const s=r(...i);let u=!0,c=!1,d=!1;const h=new Set,m=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:fb(10):t.type==="callback"?t.queueNotification:fb(t.timeout),p=()=>{d=!1,c&&(c=!1,h.forEach(b=>b()))};return Object.assign({},s,{subscribe(b){const _=()=>u&&b(),x=s.subscribe(_);return h.add(b),()=>{x(),h.delete(b)}},dispatch(b){try{return u=!b?.meta?.[aO],c=!u,c&&(d||(d=!0,m(p))),s.dispatch(b)}finally{u=!0}}})},sO=t=>function(i){const{autoBatch:s=!0}=i??{};let u=new wv(t);return s&&u.push(iO(typeof s=="object"?s:void 0)),u};function lO(t){const r=rO(),{reducer:i=void 0,middleware:s,devTools:u=!0,preloadedState:c=void 0,enhancers:d=void 0}=t||{};let h;if(typeof i=="function")h=i;else if(jh(i))h=vv(i);else throw new Error(Ar(1));let m;typeof s=="function"?m=s(r):m=r();let p=tu;u&&(p=tO({trace:!1,...typeof u=="object"&&u}));const b=kx(...m),_=sO(b);let x=typeof d=="function"?d(_):_();const U=p(...x);return bv(h,c,U)}function Cv(t){const r={},i=[];let s;const u={addCase(c,d){const h=typeof c=="string"?c:c.type;if(!h)throw new Error(Ar(28));if(h in r)throw new Error(Ar(29));return r[h]=d,u},addAsyncThunk(c,d){return d.pending&&(r[c.pending.type]=d.pending),d.rejected&&(r[c.rejected.type]=d.rejected),d.fulfilled&&(r[c.fulfilled.type]=d.fulfilled),d.settled&&i.push({matcher:c.settled,reducer:d.settled}),u},addMatcher(c,d){return i.push({matcher:c,reducer:d}),u},addDefaultCase(c){return s=c,u}};return t(u),[r,i,s]}function oO(t){return typeof t=="function"}function uO(t,r){let[i,s,u]=Cv(r),c;if(oO(t))c=()=>cb(t());else{const h=cb(t);c=()=>h}function d(h=c(),m){let p=[i[m.type],...s.filter(({matcher:b})=>b(m)).map(({reducer:b})=>b)];return p.filter(b=>!!b).length===0&&(p=[u]),p.reduce((b,_)=>{if(_)if(Ga(b)){const U=_(b,m);return U===void 0?b:U}else{if(wr(b))return Ov(b,x=>_(x,m));{const x=_(b,m);if(x===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return b},h)}return d.getInitialState=c,d}var cO=Symbol.for("rtk-slice-createasyncthunk");function fO(t,r){return`${t}/${r}`}function dO({creators:t}={}){const r=t?.asyncThunk?.[cO];return function(s){const{name:u,reducerPath:c=u}=s;if(!u)throw new Error(Ar(11));const d=(typeof s.reducers=="function"?s.reducers(mO()):s.reducers)||{},h=Object.keys(d),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(S,H){const A=typeof S=="string"?S:S.type;if(!A)throw new Error(Ar(12));if(A in m.sliceCaseReducersByType)throw new Error(Ar(13));return m.sliceCaseReducersByType[A]=H,p},addMatcher(S,H){return m.sliceMatchers.push({matcher:S,reducer:H}),p},exposeAction(S,H){return m.actionCreators[S]=H,p},exposeCaseReducer(S,H){return m.sliceCaseReducersByName[S]=H,p}};h.forEach(S=>{const H=d[S],A={reducerName:S,type:fO(u,S),createNotation:typeof s.reducers=="function"};gO(H)?bO(A,H,p,r):pO(A,H,p)});function b(){const[S={},H=[],A=void 0]=typeof s.extraReducers=="function"?Cv(s.extraReducers):[s.extraReducers],Z={...S,...m.sliceCaseReducersByType};return uO(s.initialState,W=>{for(let ae in Z)W.addCase(ae,Z[ae]);for(let ae of m.sliceMatchers)W.addMatcher(ae.matcher,ae.reducer);for(let ae of H)W.addMatcher(ae.matcher,ae.reducer);A&&W.addDefaultCase(A)})}const _=S=>S,x=new Map,U=new WeakMap;let R;function q(S,H){return R||(R=b()),R(S,H)}function z(){return R||(R=b()),R.getInitialState()}function E(S,H=!1){function A(W){let ae=W[S];return typeof ae>"u"&&H&&(ae=Uo(U,A,z)),ae}function Z(W=_){const ae=Uo(x,H,()=>new WeakMap);return Uo(ae,W,()=>{const ye={};for(const[Ee,se]of Object.entries(s.selectors??{}))ye[Ee]=hO(se,W,()=>Uo(U,W,z),H);return ye})}return{reducerPath:S,getSelectors:Z,get selectors(){return Z(A)},selectSlice:A}}const w={name:u,reducer:q,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:z,...E(c),injectInto(S,{reducerPath:H,...A}={}){const Z=H??c;return S.inject({reducerPath:Z,reducer:q},A),{...w,...E(Z,!0)}}};return w}}function hO(t,r,i,s){function u(c,...d){let h=r(c);return typeof h>"u"&&s&&(h=i()),t(h,...d)}return u.unwrapped=t,u}var zh=dO();function mO(){function t(r,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:r,...i}}return t.withTypes=()=>t,{reducer(r){return Object.assign({[r.name](...i){return r(...i)}}[r.name],{_reducerDefinitionType:"reducer"})},preparedReducer(r,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:r,reducer:i}},asyncThunk:t}}function pO({type:t,reducerName:r,createNotation:i},s,u){let c,d;if("reducer"in s){if(i&&!yO(s))throw new Error(Ar(17));c=s.reducer,d=s.prepare}else c=s;u.addCase(t,c).exposeCaseReducer(r,c).exposeAction(r,d?ub(t,d):ub(t))}function gO(t){return t._reducerDefinitionType==="asyncThunk"}function yO(t){return t._reducerDefinitionType==="reducerWithPrepare"}function bO({type:t,reducerName:r},i,s,u){if(!u)throw new Error(Ar(18));const{payloadCreator:c,fulfilled:d,pending:h,rejected:m,settled:p,options:b}=i,_=u(t,c,b);s.exposeAction(r,_),d&&s.addCase(_.fulfilled,d),h&&s.addCase(_.pending,h),m&&s.addCase(_.rejected,m),p&&s.addMatcher(_.settled,p),s.exposeCaseReducer(r,{fulfilled:d||jo,pending:h||jo,rejected:m||jo,settled:p||jo})}function jo(){}function Ar(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}const vO={formValues:{}},Nv=zh({name:"start-screen",initialState:vO,reducers:{showStartScreen(t){t.startScreenStatus="VISIBLE",t.formValues={}},startChat(t,r){t.startScreenStatus="HIDDEN",t.formValues=r.payload.formValues},startAuthenticatedChat(t,r){t.startScreenStatus="HIDDEN",t.loginToken=r.payload.loginToken,t.loginRequestToken=void 0},requestLogin(t,r){t.loginRequestToken=r.payload.loginRequestToken,t.formValues=r.payload.formValues},loginWindowClosed(t){t.loginRequestToken=void 0}}}),{startChat:_O,startAuthenticatedChat:EO,showStartScreen:SO,requestLogin:TO,loginWindowClosed:AO}=Nv.actions,xO=Nv.reducer,Mv="RESET_CHAT_STATE",Dv="TOGGLE_TRANSCRIPT_MAIL_OVERLAY",Lv="SHOW_CONVERSATION_RATING_OVERLAY",Bv="HIDE_CONVERSATION_RATING_OVERLAY",Uv=()=>({type:hv}),OO=()=>({type:Mv}),jv=()=>({type:Dv}),iu=(t,r=void 0)=>({type:Lv,payload:{opener:t,defaultRating:r}}),RO=()=>({type:Bv}),db=(t,r,i)=>(s,u)=>{try{const c=u().connection.sessionId;if(!c)throw new Error("Session ID is not available");s({type:Lh,payload:{chunkId:i}}),hb(t,c,r,i,!1,s),hb(t,c,r,i,!0,s)}catch(c){console.error("Error loading source infos:",c),s({type:Dh})}},hb=(t,r,i,s,u,c)=>{const d=`/${t}/me/chat-widget/transcript/${i}/chunks/${s}?highlight=${u}`;fetch(d,{headers:{"x-bubble-chat-session-id":r}}).then(h=>{if(!h.ok)throw new Error(`HTTP error! Status: ${h.status}`);return h.json()}).then(h=>{const m={...h,chunkId:s,highlighted:u};c({type:fv,payload:m})}).catch(h=>{console.error("Error fetching source infos:",h),c({type:Dh,payload:{highlighted:u}})})},wO=()=>({type:Bh}),Gh="CONNECT",kh="CONNECTING",qh="CONNECTED",Fh="DISCONNECTED",Vh="RECONNECTED",Ph="RESTORE_SESSION_ID",bu="START",vu="CLEAR_SESSION_ID",CO=[Gh,kh,qh,Fh,Vh,Ph],NO=(t,r)=>({type:Gh,clientName:t,querystrings:r}),MO=t=>({type:Ph,sessionId:t}),DO=()=>({type:kh}),LO=()=>({type:qh}),BO=()=>({type:Fh}),UO=()=>({type:Vh}),Hv=(t,r)=>(i,s)=>{const u=s().connection,{formValues:c,loginToken:d}=s().startScreen;let h=u.sessionId;h===void 0&&(h=Jo());let m=u.userId;if(m===void 0){const p=Bo.get("bubble-chat-user-id")||Bo.get("bubble-chat-userId")||Bo.get("bf-webclient-userId");m=p||Jo(),Bo.set("bubble-chat-user-id",m)}i({type:bu,payload:{sessionId:h,userId:m,clientName:t,loginToken:d,querystrings:{...r,...c}}})},al=()=>(t,r)=>{const i=r().connection.sessionId||"";if(t(jO(i)),t(OO()),r().settings.enableStartScreen)t(SO());else{const s=Uh(),u=hu.parse(window.location.search);return t(Hv(s,u))}},jO=t=>({type:vu,payload:{sessionId:t}}),Ze=()=>{const t=du();return i=>{const s=t.formatMessage({id:i});return s===i?void 0:s}};var Ia=(t=>(t[t.CONNECTING=0]="CONNECTING",t[t.CONNECTED=1]="CONNECTED",t[t.RECONNECTED=2]="RECONNECTED",t[t.DISCONNECTED=3]="DISCONNECTED",t))(Ia||{}),su=(t=>(t.GUEST="GUEST",t.BOT="BOT",t.PERSON="PERSON",t))(su||{});const HO="_container_q2uun_1",IO="_chatcontent_q2uun_6",zO="_accessabilityHidden_q2uun_12",cd={container:HO,chatcontent:IO,accessabilityHidden:zO},GO="_messageContainer_ofi0g_1",kO="_messages_ofi0g_12",mb={messageContainer:GO,messages:kO};function ja(){return ja=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t},ja.apply(this,arguments)}const qO=["children","options"],FO={footnoteReference:"7"},pb=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((t,r)=>(t[r.toLowerCase()]=r,t),{class:"className",for:"htmlFor"}),gb={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},VO=["style","script","pre"],PO=["src","href","data","formAction","srcDoc","action"],YO=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,XO=/mailto:/i,ZO=/\n{2,}$/,yb=/^(\s*>[\s\S]*?)(?=\n\n|$)/,QO=/^ *> ?/gm,KO=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,$O=/^ {2,}\n/,WO=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,bb=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,vb=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,JO=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,eR=/^(?:\n *)*\n/,tR=/\r\n?/g,nR=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,rR=/^\[\^([^\]]+)]/,aR=/\f/g,iR=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,sR=/^\s*?\[(x|\s)\]/,_b=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Eb=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Sb=/^([^\n]+)\n *(=|-){3,} *\n/,fd=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,lR=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Tb=/^<!--[\s\S]*?(?:-->)/,oR=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,dd=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,uR=/^\{.*\}$/,cR=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,fR=/^<([^ >]+@[^ >]+)>/,dR=/^<([^ >]+:\/[^ >]+)>/,hR=/-([a-z])?/gi,Ab=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,mR=/^[^\n]+(?: \n|\n{2,})/,pR=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,gR=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,yR=/^\[([^\]]*)\] ?\[([^\]]*)\]/,bR=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,vR=/\t/g,_R=/(^ *\||\| *$)/g,ER=/^ *:-+: *$/,SR=/^ *:-+ *$/,TR=/^ *-+: *$/,_u=t=>`(?=[\\s\\S]+?\\1${t?"\\1":""})`,Eu="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",AR=RegExp(`^([*_])\\1${_u(1)}${Eu}\\1\\1(?!\\1)`),xR=RegExp(`^([*_])${_u(0)}${Eu}\\1(?!\\1)`),OR=RegExp(`^(==)${_u(0)}${Eu}\\1`),RR=RegExp(`^(~~)${_u(0)}${Eu}\\1`),wR=/^(:[a-zA-Z0-9-_]+:)/,CR=/^\\([^0-9A-Za-z\s])/,NR=/\\([^0-9A-Za-z\s])/g,MR=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,DR=/^\n+/,LR=/^([ \t]*)/,BR=/(?:^|\n)( *)$/,Yh="(?:\\d+\\.)",Xh="(?:[*+-])";function Iv(t){return"( *)("+(t===1?Yh:Xh)+") +"}const zv=Iv(1),Gv=Iv(2);function kv(t){return RegExp("^"+(t===1?zv:Gv))}const UR=kv(1),jR=kv(2);function qv(t){return RegExp("^"+(t===1?zv:Gv)+"[^\\n]*(?:\\n(?!\\1"+(t===1?Yh:Xh)+" )[^\\n]*)*(\\n|$)","gm")}const HR=qv(1),IR=qv(2);function Fv(t){const r=t===1?Yh:Xh;return RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}const Vv=Fv(1),Pv=Fv(2);function xb(t,r){const i=r===1,s=i?Vv:Pv,u=i?HR:IR,c=i?UR:jR;return{t:d=>c.test(d),o:Ci(function(d,h){const m=BR.exec(h.prevCapture);return m&&(h.list||!h.inline&&!h.simple)?s.exec(d=m[1]+d):null}),i:1,u(d,h,m){const p=i?+d[2]:void 0,b=d[0].replace(ZO,`
|
|
94
94
|
`).match(u);let _=!1;return{items:b.map(function(x,U){const R=c.exec(x)[0].length,q=RegExp("^ {1,"+R+"}","gm"),z=x.replace(q,"").replace(c,""),E=U===b.length-1,w=z.indexOf(`
|
|
95
95
|
|
|
96
96
|
`)!==-1||E&&_;_=w;const S=m.inline,H=m.list;let A;m.list=!0,w?(m.inline=!1,A=$s(z)+`
|
|
97
97
|
|
|
98
|
-
`):(m.inline=!0,A=$s(z));const Z=h(A,m);return m.inline=S,m.list=H,Z}),ordered:i,start:p}},l:(d,h,m)=>t(d.ordered?"ol":"ul",{key:m.key,start:d.type==="20"?d.start:void 0},d.items.map(function(p,b){return t("li",{key:b},h(p,m))}))}}const
|
|
99
|
-
`).map(function(p){return Ob(p,h,m,!0)})})(t[3],r,i):[],c=Ob(t[1],r,i,!!u.length);return i.inline=!1,u.length?{align:s,cells:u,header:c,type:"25"}:{children:c,type:"21"}}function Rb(t,r){return t.align[r]==null?{}:{textAlign:t.align[r]}}function Ci(t){return t.inline=1,t}function ra(t){return Ci(function(r,i){return i.inline?t.exec(r):null})}function aa(t){return Ci(function(r,i){return i.inline||i.simple?t.exec(r):null})}function Sr(t){return function(r,i){return i.inline||i.simple?null:t.exec(r)}}function Ho(t){return Ci(function(r){return t.exec(r)})}const
|
|
98
|
+
`):(m.inline=!0,A=$s(z));const Z=h(A,m);return m.inline=S,m.list=H,Z}),ordered:i,start:p}},l:(d,h,m)=>t(d.ordered?"ol":"ul",{key:m.key,start:d.type==="20"?d.start:void 0},d.items.map(function(p,b){return t("li",{key:b},h(p,m))}))}}const zR=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),GR=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function $s(t){let r=t.length;for(;r>0&&t[r-1]<=" ";)r--;return t.slice(0,r)}function Po(t,r){return t.startsWith(r)}function kR(t,r,i){if(Array.isArray(i)){for(let s=0;s<i.length;s++)if(Po(t,i[s]))return!0;return!1}return i(t,r)}function Is(t){return t.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function qR(t){return TR.test(t)?"right":ER.test(t)?"center":SR.test(t)?"left":null}function Ob(t,r,i,s){const u=i.inTable;i.inTable=!0;let c=[[]],d="";function h(){if(!d)return;const m=c[c.length-1];m.push.apply(m,r(d,i)),d=""}return t.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((m,p,b)=>{m.trim()==="|"&&(h(),s)?p!==0&&p!==b.length-1&&c.push([]):d+=m}),h(),i.inTable=u,c}function FR(t,r,i){i.inline=!0;const s=t[2]?t[2].replace(_R,"").split("|").map(qR):[],u=t[3]?(function(d,h,m){return d.trim().split(`
|
|
99
|
+
`).map(function(p){return Ob(p,h,m,!0)})})(t[3],r,i):[],c=Ob(t[1],r,i,!!u.length);return i.inline=!1,u.length?{align:s,cells:u,header:c,type:"25"}:{children:c,type:"21"}}function Rb(t,r){return t.align[r]==null?{}:{textAlign:t.align[r]}}function Ci(t){return t.inline=1,t}function ra(t){return Ci(function(r,i){return i.inline?t.exec(r):null})}function aa(t){return Ci(function(r,i){return i.inline||i.simple?t.exec(r):null})}function Sr(t){return function(r,i){return i.inline||i.simple?null:t.exec(r)}}function Ho(t){return Ci(function(r){return t.exec(r)})}const VR=/(javascript|vbscript|data(?!:image)):/i;function PR(t){try{const r=decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,"");if(VR.test(r))return null}catch{return null}return t}function Qn(t){return t&&t.replace(NR,"$1")}function Yo(t,r,i){const s=i.inline||!1,u=i.simple||!1;i.inline=!0,i.simple=!0;const c=t(r,i);return i.inline=s,i.simple=u,c}function YR(t,r,i){const s=i.inline||!1,u=i.simple||!1;i.inline=!1,i.simple=!0;const c=t(r,i);return i.inline=s,i.simple=u,c}function XR(t,r,i){const s=i.inline||!1;i.inline=!1;const u=t(r,i);return i.inline=s,u}const hd=(t,r,i)=>({children:Yo(r,t[2],i)});function md(){return{}}function pd(){return null}function ZR(...t){return t.filter(Boolean).join(" ")}function gd(t,r,i){let s=t;const u=r.split(".");for(;u.length&&(s=s[u[0]],s!==void 0);)u.shift();return s||i}function QR(t="",r={}){r.overrides=r.overrides||{},r.namedCodesToUnicode=r.namedCodesToUnicode?ja({},gb,r.namedCodesToUnicode):gb;const i=r.slugify||Is,s=r.sanitizer||PR,u=r.createElement||B.createElement,c=[yb,bb,vb,r.enforceAtxHeadings?Eb:_b,Sb,Ab,Vv,Pv],d=[...c,mR,fd,Tb,dd];function h(E,w,...S){const H=gd(r.overrides,E+".props",{});return u((function(A,Z){const W=gd(Z,A);return W?typeof W=="function"||typeof W=="object"&&"render"in W?W:gd(Z,A+".component",A):A})(E,r.overrides),ja({},w,H,{className:ZR(w?.className,H.className)||void 0}),...S)}function m(E){E=E.replace(iR,"");let w=!1;r.forceInline?w=!0:r.forceBlock||(w=bR.test(E)===!1);const S=R(U(w?E:$s(E).replace(DR,"")+`
|
|
100
100
|
|
|
101
|
-
`,{inline:w}));for(;typeof S[S.length-1]=="string"&&!S[S.length-1].trim();)S.pop();if(r.wrapper===null)return S;const H=r.wrapper||(w?"span":"div");let A;if(S.length>1||r.forceWrapper)A=S;else{if(S.length===1)return A=S[0],typeof A=="string"?h("span",{key:"outer"},A):A;A=null}return u(H,{key:"outer"},A)}function p(E,w){if(!w||!w.trim())return null;const S=w.match(
|
|
101
|
+
`,{inline:w}));for(;typeof S[S.length-1]=="string"&&!S[S.length-1].trim();)S.pop();if(r.wrapper===null)return S;const H=r.wrapper||(w?"span":"div");let A;if(S.length>1||r.forceWrapper)A=S;else{if(S.length===1)return A=S[0],typeof A=="string"?h("span",{key:"outer"},A):A;A=null}return u(H,{key:"outer"},A)}function p(E,w){if(!w||!w.trim())return null;const S=w.match(YO);return S?S.reduce(function(H,A){const Z=A.indexOf("=");if(Z!==-1){const W=(function(se){return se.indexOf("-")!==-1&&se.match(oR)===null&&(se=se.replace(hR,function(me,ce){return ce.toUpperCase()})),se})(A.slice(0,Z)).trim(),ae=(function(se){const me=se[0];return(me==='"'||me==="'")&&se.length>=2&&se[se.length-1]===me?se.slice(1,-1):se})(A.slice(Z+1).trim()),ye=pb[W]||W;if(ye==="ref")return H;const Ee=H[ye]=(function(se,me,ce,Pe){return me==="style"?(function(ve){const G=[];let K="",ee=!1,Ae=!1,O="";if(!ve)return G;for(let $=0;$<ve.length;$++){const Y=ve[$];if(Y!=='"'&&Y!=="'"||ee||(Ae?Y===O&&(Ae=!1,O=""):(Ae=!0,O=Y)),Y==="("&&K.endsWith("url")?ee=!0:Y===")"&&ee&&(ee=!1),Y!==";"||Ae||ee)K+=Y;else{const te=K.trim();if(te){const re=te.indexOf(":");if(re>0){const ue=te.slice(0,re).trim(),We=te.slice(re+1).trim();G.push([ue,We])}}K=""}}const k=K.trim();if(k){const $=k.indexOf(":");if($>0){const Y=k.slice(0,$).trim(),te=k.slice($+1).trim();G.push([Y,te])}}return G})(ce).reduce(function(ve,[G,K]){return ve[G.replace(/(-[a-z])/g,ee=>ee[1].toUpperCase())]=Pe(K,se,G),ve},{}):PO.indexOf(me)!==-1?Pe(Qn(ce),se,me):(ce.match(uR)&&(ce=Qn(ce.slice(1,ce.length-1))),ce==="true"||ce!=="false"&&ce)})(E,W,ae,s);typeof Ee=="string"&&(fd.test(Ee)||dd.test(Ee))&&(H[ye]=m(Ee.trim()))}else A!=="style"&&(H[pb[A]||A]=!0);return H},{}):null}const b=[],_={},x={0:{t:[">"],o:Sr(yb),i:1,u(E,w,S){const[,H,A]=E[0].replace(QO,"").match(KO);return{alert:H,children:w(A,S)}},l(E,w,S){const H={key:S.key};return E.alert&&(H.className="markdown-alert-"+i(E.alert.toLowerCase(),Is),E.children.unshift({attrs:{},children:[{type:"27",text:E.alert}],noInnerParse:!0,type:"11",tag:"header"})),h("blockquote",H,w(E.children,S))}},1:{o:Ho($O),i:1,u:md,l:(E,w,S)=>h("br",{key:S.key})},2:{t:E=>{const w=E[0];return w==="-"||w==="*"||w==="_"},o:Sr(WO),i:1,u:md,l:(E,w,S)=>h("hr",{key:S.key})},3:{t:[" "],o:Sr(vb),i:0,u:E=>({lang:void 0,text:Qn($s(E[0].replace(/^ {4}/gm,"")))}),l:(E,w,S)=>h("pre",{key:S.key},h("code",ja({},E.attrs,{className:E.lang?"lang-"+E.lang:""}),E.text))},4:{t:["```","~~~"],o:Sr(bb),i:0,u:E=>({attrs:p("code",E[3]||""),lang:E[2]||void 0,text:E[4],type:"3"})},5:{t:["`"],o:aa(JO),i:3,u:E=>({text:Qn(E[2])}),l:(E,w,S)=>h("code",{key:S.key},E.text)},6:{t:["[^"],o:Sr(nR),i:0,u:E=>(b.push({footnote:E[2],identifier:E[1]}),{}),l:pd},7:{t:["[^"],o:ra(rR),i:1,u:E=>({target:"#"+i(E[1],Is),text:E[1]}),l:(E,w,S)=>h("a",{key:S.key,href:s(E.target,"a","href")},h("sup",{key:S.key},E.text))},8:{t:["[ ]","[x]"],o:ra(sR),i:1,u:E=>({completed:E[1].toLowerCase()==="x"}),l:(E,w,S)=>h("input",{checked:E.completed,key:S.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:Sr(r.enforceAtxHeadings?Eb:_b),i:1,u:(E,w,S)=>({children:Yo(w,E[2],S),id:i(E[2],Is),level:E[1].length}),l:(E,w,S)=>h("h"+E.level,{id:E.id,key:S.key},w(E.children,S))},10:{o:Sr(Sb),i:0,u:(E,w,S)=>({children:Yo(w,E[1],S),level:E[2]==="="?1:2,type:"9"})},11:{t:["<"],o:Ho(fd),i:1,u(E,w,S){const[,H]=E[3].match(LR),A=RegExp("^"+H,"gm"),Z=E[3].replace(A,""),W=(ae=Z,d.some(ce=>ce.test(ae))?XR:Yo);var ae;const ye=E[1].toLowerCase(),Ee=VO.indexOf(ye)!==-1,se=(Ee?ye:E[1]).trim(),me={attrs:p(se,E[2]),noInnerParse:Ee,tag:se};if(S.inAnchor=S.inAnchor||ye==="a",Ee)me.text=E[3];else{const ce=S.inHTML;S.inHTML=!0,me.children=W(w,Z,S),S.inHTML=ce}return S.inAnchor=!1,me},l:(E,w,S)=>h(E.tag,ja({key:S.key},E.attrs),E.text||(E.children?w(E.children,S):""))},13:{t:["<"],o:Ho(dd),i:1,u(E){const w=E[1].trim();return{attrs:p(w,E[2]||""),tag:w}},l:(E,w,S)=>h(E.tag,ja({},E.attrs,{key:S.key}))},12:{t:["<!--"],o:Ho(Tb),i:1,u:()=>({}),l:pd},14:{t:["!["],o:aa(GR),i:1,u:E=>({alt:Qn(E[1]),target:Qn(E[2]),title:Qn(E[3])}),l:(E,w,S)=>h("img",{key:S.key,alt:E.alt||void 0,title:E.title||void 0,src:s(E.target,"img","src")})},15:{t:["["],o:ra(zR),i:3,u:(E,w,S)=>({children:YR(w,E[1],S),target:Qn(E[2]),title:Qn(E[3])}),l:(E,w,S)=>h("a",{key:S.key,href:s(E.target,"a","href"),title:E.title},w(E.children,S))},16:{t:["<"],o:ra(dR),i:0,u:E=>({children:[{text:E[1],type:"27"}],target:E[1],type:"15"})},17:{t:(E,w)=>!w.inAnchor&&!r.disableAutoLink&&(Po(E,"http://")||Po(E,"https://")),o:ra(cR),i:0,u:E=>({children:[{text:E[1],type:"27"}],target:E[1],title:void 0,type:"15"})},18:{t:["<"],o:ra(fR),i:0,u(E){let w=E[1],S=E[1];return XO.test(S)||(S="mailto:"+S),{children:[{text:w.replace("mailto:",""),type:"27"}],target:S,type:"15"}}},20:xb(h,1),33:xb(h,2),19:{o:Sr(eR),i:3,u:md,l:()=>`
|
|
102
102
|
`},21:{o:Ci(function(E,w){if(w.inline||w.simple||w.inHTML&&E.indexOf(`
|
|
103
103
|
|
|
104
104
|
`)===-1&&w.prevCapture.indexOf(`
|
|
105
105
|
|
|
106
106
|
`)===-1)return null;let S="";E.split(`
|
|
107
107
|
`).every(A=>(A+=`
|
|
108
|
-
`,!c.some(Z=>Z.test(A))&&(S+=A,!!A.trim())));const H=$s(S);return H===""?null:[S,,H]}),i:3,u:hd,l:(E,w,S)=>h("p",{key:S.key},w(E.children,S))},22:{t:["["],o:ra(
|
|
109
|
-
`).replace(rR,"").replace(bR," ")})(H),A)}})(x),R=(q=(function(E,w){return function(S,H,A){const Z=E[S.type].l;return w?w(()=>Z(S,H,A),S,H,A):Z(S,H,A)}})(x,r.renderRule),function E(w,S={}){if(Array.isArray(w)){const H=S.key,A=[];let Z=!1;for(let W=0;W<w.length;W++){S.key=W;const ae=E(w[W],S),ye=typeof ae=="string";ye&&Z?A[A.length-1]+=ae:ae!==null&&A.push(ae),Z=ye}return S.key=H,A}return q(w,E,S)});var q;const z=m(t);return b.length?h("div",null,z,h("footer",{key:"footer"},b.map(function(E){return h("div",{id:i(E.identifier,Is),key:E.identifier},E.identifier,R(U(E.footnote,{inline:!0})))}))):z}const xr=t=>{let{children:r="",options:i}=t,s=(function(u,c){if(u==null)return{};var d,h,m={},p=Object.keys(u);for(h=0;h<p.length;h++)c.indexOf(d=p[h])>=0||(m[d]=u[d]);return m})(t,kO);return B.cloneElement(ZR(r,i),s)},QR="_generalConditionsContainer_55hjg_1",KR="_generalConditions_55hjg_1",$R="_generalConditionsHeader_55hjg_15",WR="_generalConditionsBody_55hjg_26",JR="_generalConditionsAccept_55hjg_35",zs={generalConditionsContainer:QR,generalConditions:KR,generalConditionsHeader:$R,generalConditionsBody:WR,generalConditionsAccept:JR},ew=()=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:y.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"})}),tw=()=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:y.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"})}),nw="general-conditions.header",rw="general-conditions.body",wb="general-conditions.accept-conditions-note",aw=()=>{const t=Ze(),[r,i]=B.useState(!1),s=()=>i(!r),u=h=>{h.key==="ArrowDown"||h.key==="ArrowRight"?i(!0):h.key==="ArrowUp"||h.key==="ArrowLeft"||h.key==="Escape"?i(!1):(h.key==="Enter"||h.key==="Space"||h.key===" ")&&s()},c=t(nw),d=t(wb);return y.jsxs("div",{className:Q(zs.generalConditionsContainer,"chat__generalConditions"),children:[!!c?.length&&y.jsxs("div",{className:zs.generalConditions,children:[y.jsxs("div",{role:"button",onClick:s,onKeyDown:u,tabIndex:0,className:Q(zs.generalConditionsHeader,"chat__generalConditions__header"),"aria-controls":"general-conditions-body","aria-expanded":r?"true":"false","aria-pressed":r?"true":"false",children:[y.jsx(xr,{children:c}),r?y.jsx(tw,{}):y.jsx(ew,{})]}),y.jsx("div",{className:Q(zs.generalConditionsBody,"chat__generalConditions__body"),id:"general-conditions-body",role:"region",tabIndex:-1,children:r&&y.jsx(xr,{children:t(rw)||""})})]}),!!d?.length&&y.jsx("div",{className:Q(zs.generalConditionsAccept,"chat__generalConditions__accept"),tabIndex:0,children:y.jsx(xr,{children:t(wb)||""})})]})},iw="_messageContainer_1rxi5_1",sw="_message_1rxi5_1",lw="_messageBot_1rxi5_14",ow="_messageBotLast_1rxi5_45",uw="_avatar_1rxi5_45",cw="_messageBotFirst_1rxi5_54",fw="_messageBotAnimated_1rxi5_67",dw="_messageGuest_1rxi5_78",hw="_messageGuestFirst_1rxi5_84",mw="_messageGuestLast_1rxi5_90",pw="_botAvatar_1rxi5_104",gw="_agentAvatar_1rxi5_108",yw="_bubble_1rxi5_112",bw="_bubbleContent_1rxi5_118",vw="_bubbleLeft_1rxi5_132",_w="_leftText_1rxi5_143",Ew="_bubbleRight_1rxi5_150",Sw="_rightText_1rxi5_160",Tw="_sourceInfoReference_1rxi5_192",Aw="_sourceInfoReferenceActive_1rxi5_204",ge={messageContainer:iw,message:sw,messageBot:lw,messageBotLast:ow,avatar:uw,messageBotFirst:cw,messageBotAnimated:fw,messageGuest:dw,messageGuestFirst:hw,messageGuestLast:mw,botAvatar:pw,agentAvatar:gw,bubble:yw,bubbleContent:bw,bubbleLeft:vw,leftText:_w,bubbleRight:Ew,rightText:Sw,sourceInfoReference:Tw,sourceInfoReferenceActive:Aw},Zh=(t,r)=>{B.useEffect(()=>{const i=s=>{t.current&&!t.current.contains(s.target)&&r()};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[t,r])};var yd,Cb;function Qh(){if(Cb)return yd;Cb=1;function t(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}return yd=t,yd}var bd,Nb;function xw(){if(Nb)return bd;Nb=1;var t=typeof bo=="object"&&bo&&bo.Object===Object&&bo;return bd=t,bd}var vd,Mb;function Yv(){if(Mb)return vd;Mb=1;var t=xw(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=t||r||Function("return this")();return vd=i,vd}var _d,Db;function Ow(){if(Db)return _d;Db=1;var t=Yv(),r=function(){return t.Date.now()};return _d=r,_d}var Ed,Lb;function Rw(){if(Lb)return Ed;Lb=1;var t=/\s/;function r(i){for(var s=i.length;s--&&t.test(i.charAt(s)););return s}return Ed=r,Ed}var Sd,Bb;function ww(){if(Bb)return Sd;Bb=1;var t=Rw(),r=/^\s+/;function i(s){return s&&s.slice(0,t(s)+1).replace(r,"")}return Sd=i,Sd}var Td,Ub;function Xv(){if(Ub)return Td;Ub=1;var t=Yv(),r=t.Symbol;return Td=r,Td}var Ad,jb;function Cw(){if(jb)return Ad;jb=1;var t=Xv(),r=Object.prototype,i=r.hasOwnProperty,s=r.toString,u=t?t.toStringTag:void 0;function c(d){var h=i.call(d,u),m=d[u];try{d[u]=void 0;var p=!0}catch{}var b=s.call(d);return p&&(h?d[u]=m:delete d[u]),b}return Ad=c,Ad}var xd,Hb;function Nw(){if(Hb)return xd;Hb=1;var t=Object.prototype,r=t.toString;function i(s){return r.call(s)}return xd=i,xd}var Od,Ib;function Mw(){if(Ib)return Od;Ib=1;var t=Xv(),r=Cw(),i=Nw(),s="[object Null]",u="[object Undefined]",c=t?t.toStringTag:void 0;function d(h){return h==null?h===void 0?u:s:c&&c in Object(h)?r(h):i(h)}return Od=d,Od}var Rd,zb;function Dw(){if(zb)return Rd;zb=1;function t(r){return r!=null&&typeof r=="object"}return Rd=t,Rd}var wd,Gb;function Lw(){if(Gb)return wd;Gb=1;var t=Mw(),r=Dw(),i="[object Symbol]";function s(u){return typeof u=="symbol"||r(u)&&t(u)==i}return wd=s,wd}var Cd,kb;function Bw(){if(kb)return Cd;kb=1;var t=ww(),r=Qh(),i=Lw(),s=NaN,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,d=/^0o[0-7]+$/i,h=parseInt;function m(p){if(typeof p=="number")return p;if(i(p))return s;if(r(p)){var b=typeof p.valueOf=="function"?p.valueOf():p;p=r(b)?b+"":b}if(typeof p!="string")return p===0?p:+p;p=t(p);var _=c.test(p);return _||d.test(p)?h(p.slice(2),_?2:8):u.test(p)?s:+p}return Cd=m,Cd}var Nd,qb;function Zv(){if(qb)return Nd;qb=1;var t=Qh(),r=Ow(),i=Bw(),s="Expected a function",u=Math.max,c=Math.min;function d(h,m,p){var b,_,x,U,R,q,z=0,E=!1,w=!1,S=!0;if(typeof h!="function")throw new TypeError(s);m=i(m)||0,t(p)&&(E=!!p.leading,w="maxWait"in p,x=w?u(i(p.maxWait)||0,m):x,S="trailing"in p?!!p.trailing:S);function H(ce){var Pe=b,ve=_;return b=_=void 0,z=ce,U=h.apply(ve,Pe),U}function A(ce){return z=ce,R=setTimeout(ae,m),E?H(ce):U}function Z(ce){var Pe=ce-q,ve=ce-z,G=m-Pe;return w?c(G,x-ve):G}function W(ce){var Pe=ce-q,ve=ce-z;return q===void 0||Pe>=m||Pe<0||w&&ve>=x}function ae(){var ce=r();if(W(ce))return ye(ce);R=setTimeout(ae,Z(ce))}function ye(ce){return R=void 0,S&&b?H(ce):(b=_=void 0,U)}function Ee(){R!==void 0&&clearTimeout(R),z=0,b=q=_=R=void 0}function se(){return R===void 0?U:ye(r())}function me(){var ce=r(),Pe=W(ce);if(b=arguments,_=this,q=ce,Pe){if(R===void 0)return A(q);if(w)return clearTimeout(R),R=setTimeout(ae,m),H(q)}return R===void 0&&(R=setTimeout(ae,m)),U}return me.cancel=Ee,me.flush=se,me}return Nd=d,Nd}var Uw=Zv();const jw=uu(Uw),Hw="_container_131ib_1",Iw="_categoryContainer_131ib_13",zw="_categoryButton_131ib_20",Gw="_active_131ib_35",kw="_commentTextarea_131ib_44",Gs={container:Hw,categoryContainer:Iw,categoryButton:zw,active:Gw,commentTextarea:kw},qw=(t,r,i)=>{B.useEffect(()=>{if(t){const s=()=>{const c=["button:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])',"a[href]","input:not([disabled])","select:not([disabled])"].join(","),d=r.current?Array.from(r.current.querySelectorAll(c)):[],h=i.current?Array.from(i.current.querySelectorAll(c)):[];return[...d,...h]},u=c=>{if(c.key==="Tab"){const d=s();if(d.length>0){const h=d[0],m=d[d.length-1],p=document.activeElement;!c.shiftKey&&p===m?(c.preventDefault(),h.focus()):c.shiftKey&&p===h&&(c.preventDefault(),m.focus())}}};return document.addEventListener("keydown",u,!0),()=>{document.removeEventListener("keydown",u,!0)}}},[t,r,i])},Fw=({open:t,actionsRef:r,reaction:i,onReaction:s})=>{const u=Ze(),c=B.useRef(null),d=jw(p=>{s({...i,comment:p})},300);B.useEffect(()=>()=>d.flush(),[d]),qw(t,r,c);const h=p=>{s({...i,category:i.category===p?void 0:p})},m=p=>d(p.target.value);return t?y.jsxs("div",{ref:c,className:Gs.container,role:"dialog","aria-modal":"true","aria-labelledby":"bad-reaction-title",children:[y.jsx("h2",{id:"bad-reaction-title",children:u("bot-bubble.reaction.say-more")}),y.jsx("div",{className:Gs.categoryContainer,role:"radiogroup",children:["WRONG_INFORMATION","MISSING_INFORMATION","OLD_INFORMATION","UNCLEAR","OFF_TOPIC"].map(p=>y.jsx("button",{className:Q(Gs.categoryButton,i?.category===p&&Gs.active),onClick:()=>h(p),"aria-pressed":i?.category===p,"aria-label":u(`bot-bubble.reaction.category.${p}`),tabIndex:0,role:"radio",children:u(`bot-bubble.reaction.category.${p}`)},p))}),y.jsx("textarea",{id:"comment",name:"comment",placeholder:u("bot-bubble.reaction.comment"),defaultValue:i?.comment,onChange:m,className:Gs.commentTextarea,rows:3,"aria-label":u("bot-bubble.reaction.comment")})]}):null},Vw="_botMessageActionContainer_18fjb_1",Pw="_alwaysVisible_18fjb_15",Yw="_active_18fjb_19",Xw="_botMessageActionInnerContainer_18fjb_27",Zw="_header_18fjb_52",Qw="_botMessageActions_18fjb_57",Kw="_reported_18fjb_68",$w="_action_18fjb_72",Ww="_wave_18fjb_86",Jw="_anyReport_18fjb_156",e6="_closeButton_18fjb_172",nt={botMessageActionContainer:Vw,alwaysVisible:Pw,active:Yw,botMessageActionInnerContainer:Xw,header:Zw,botMessageActions:Qw,reported:Kw,action:$w,wave:Ww,anyReport:Jw,closeButton:e6},t6=({isSubmitting:t,onClick:r})=>{const i=Ze();return y.jsx("button",{className:Q(nt.action,nt.closeButton,"tooltip--bottom-left"),"aria-label":i("bot-bubble.reaction.close"),"data-title":i("bot-bubble.reaction.close"),tabIndex:0,onClick:r,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:t?y.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"}):y.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"})})})},n6=({alwaysVisible:t,senderType:r,reaction:i,botMessageRef:s,message:u,onReaction:c})=>{const d=Ze(),[h,m]=B.useState(!1),[p,b]=B.useState(!1),[_,x]=B.useState(!1),U=B.useRef(null),R=B.useRef(null);Zh(U,()=>{x(!1)});const q=A=>{A.key==="Escape"&&x(!1)};B.useEffect(()=>(document.addEventListener("keydown",q),()=>{document.removeEventListener("keydown",q)}),[]),B.useEffect(()=>{_&&U.current?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},[_]);const z=A=>{R.current&&clearTimeout(R.current),b(!0),c(A),R.current=setTimeout(()=>{b(!1)},1e3)},E=B.useCallback(async()=>{if(s.current)try{m(!0);const A=s.current.innerHTML,Z=s.current.innerText;await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([A],{type:"text/html"}),"text/plain":new Blob([Z],{type:"text/plain"})})]),await new Promise(W=>setTimeout(W,1500))}finally{m(!1)}},[s]),w=()=>{x(!1),c(i?.type==="GOOD"?null:{type:"GOOD"})},S=()=>{c({...u.reaction,type:"BAD"}),x(!_)},H=A=>Z=>{(Z.key==="Enter"||Z.key===" ")&&A()};return y.jsx("div",{ref:U,className:Q(nt.botMessageActionContainer,t&&nt.alwaysVisible,_&&nt.active),children:y.jsxs("div",{className:Q(nt.botMessageActionInnerContainer,t&&nt.alwaysVisible,_&&nt.active,i&&nt.reported),role:"group",children:[y.jsxs("div",{className:nt.header,children:[y.jsxs("div",{className:Q(nt.botMessageActions,i&&nt.reported),children:[r===su.BOT&&y.jsx("button",{className:Q(nt.action,nt.wave,i?.type&&nt.anyReport,i?.type==="GOOD"&&nt.reported,"tooltip--top-right"),tabIndex:0,"aria-label":d(i?.type==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),"aria-pressed":i?.type==="GOOD","data-title":d(i?.type==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),onPointerDown:w,onKeyDown:H(w),children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:i?.type==="GOOD"?y.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"}):y.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"})})}),r===su.BOT&&y.jsx("button",{className:Q(nt.action,nt.wave,i?.type&&nt.anyReport,i?.type==="BAD"&&nt.reported,"tooltip--top-right"),tabIndex:0,"aria-label":d("bot-bubble.reaction.bad"),"aria-pressed":i?.type==="BAD","data-title":d("bot-bubble.reaction.bad"),onPointerDown:S,onKeyDown:H(S),children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:i?.type==="BAD"?y.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"}):y.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"})})}),y.jsx("button",{className:Q(nt.action,nt.wave,"tooltip--top-right"),style:{visibility:_?"hidden":"visible"},tabIndex:0,"aria-label":d("bot-bubble.copy"),"data-title":d("bot-bubble.copy"),onClick:E,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:h?y.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"}):y.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"})})})]}),_&&y.jsx(t6,{isSubmitting:p,onClick:()=>x(!1)})]}),u.reaction&&y.jsx(Fw,{open:_,actionsRef:U,reaction:u.reaction,onReaction:z})]})})},Qv=B.forwardRef(({message:t,isAnimated:r,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,children:c,onReaction:d},h)=>{const m=Ze(),p=B.useRef(null),b=t.sender.type===Te.UserType.BOT;return y.jsxs("li",{ref:h,className:Q(ge.message,ge.messageBot,i&&ge.lastMessage,s&&ge.messageBotFirst,u&&ge.messageBotLast,"chat__bubbleContainer",r&&ge.messageBotAnimated,r&&"chat__bubbleContainer--animated",b?"chat__botBubbleContainer":"chat__agentBubbleContainer",s&&"chat__bubbleContainer--first",u&&"chat__bubbleContainer--last"),children:[y.jsx("img",{className:Q(ge.avatar,b?ge.botAvatar:ge.agentAvatar,"chat__avatar",b?"chat__botAvatar":"chat__agentAvatar"),src:`${t.sender.avatar}`,alt:b?"Bot":"Agent",referrerPolicy:"no-referrer"}),y.jsxs("div",{className:ge.messageContainer,children:[y.jsx("div",{ref:p,className:Q(ge.bubble,ge.bubbleLeft,"chat__bubble",b?"chat__botBubble":"chat__agentBubble"),tabIndex:0,"aria-label":m(b?"bot-bubble.label":"agent-bubble.label"),children:y.jsx("div",{className:Q(ge.leftText),children:c})}),d&&y.jsx(n6,{alwaysVisible:i&&u,senderType:t.sender.type,reaction:t.reaction,message:t,botMessageRef:p,onReaction:d})]})]})}),r6="_sourceList_1n31h_1",a6="_source_1n31h_1",i6="_label_1n31h_37",Md={sourceList:r6,source:a6,label:i6},Kv=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.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"})}),$v=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.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"})}),Wv=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.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"})}),Jv=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.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"})}),s6=({type:t,...r})=>{switch(t){case"WEBSITE":return y.jsx(Jv,{...r});case"PDF":return y.jsx(Wv,{...r});case"DOCX":return y.jsx(Kv,{...r});default:return y.jsx($v,{...r})}},Kh=({sources:t,onLinkClick:r})=>{const i=Ze(),s=c=>()=>{r(c.url)},u=c=>d=>{(d.key==="Enter"||d.key===" ")&&r(c.url)};return t.length?y.jsx("ul",{className:Md.sourceList,"aria-label":i("bot-bubble.sources"),children:t.map(c=>y.jsx("li",{className:Md.source,children:y.jsxs("a",{role:"button",tabIndex:0,"aria-label":`${i("bot-bubble.source.open")}: ${c.label}`,onClick:s(c),onKeyDown:u(c),children:[y.jsx(s6,{type:c.type,"aria-hidden":"true"}),y.jsx("div",{className:Md.label,children:c.label})]})},c.url))}):null},l6="_button_3ui4g_1",o6="_buttonDefault_3ui4g_13",u6="_buttonPrimary_3ui4g_28",el={button:l6,buttonDefault:o6,buttonPrimary:u6},Su=({className:t,children:r,...i})=>y.jsx("button",{className:Q(el.button,t),type:"button",role:"button",...i,children:r}),c6="_title_137pi_1",f6="_buttons_137pi_6",d6="_button_137pi_6",h6="_imageContainer_137pi_29",m6="_image_137pi_29",p6="_video_container_137pi_44",g6="_video_137pi_44",y6="_only_137pi_58",on={title:c6,buttons:f6,button:d6,imageContainer:h6,image:m6,video_container:p6,video:g6,only:y6},b6=({buttons:t,onButtonClick:r})=>y.jsx("div",{className:Q(on.buttons,"chat__bubbleButtons"),children:t.map((i,s)=>y.jsx(Su,{className:Q(on.button,"chat__bubbleButton"),onClick:()=>r(i),children:i.title},s))}),Fb="newtab#",e_=({markdown:t,markdownOptions:r={},onLinkClick:i})=>{const s=c=>d=>(d.preventDefault(),c&&i(c),!1),u=({title:c,href:d,children:h})=>d.indexOf(Fb)===0?y.jsx("a",{href:d.slice(Fb.length),title:c,target:"_blank",rel:"noopener noreferrer",children:h}):y.jsx("a",{onClick:s(d),title:c,href:d,children:h});return y.jsx(xr,{options:{...r,overrides:{a:u}},children:t})},v6=({text:t,onLinkClick:r})=>t?y.jsx("div",{children:y.jsx(e_,{markdown:t,onLinkClick:r})}):null,_6=({title:t})=>t?y.jsx("h1",{className:on.title,children:t}):null,E6=({title:t,text:r,buttons:i,onButtonClick:s,onLinkClick:u})=>t?.length||r?.length||i?.length?y.jsxs("div",{className:Q(ge.bubbleContent),children:[y.jsx(_6,{title:t}),y.jsx(v6,{text:r,onLinkClick:u}),y.jsx(b6,{buttons:i,onButtonClick:s})]}):null,S6=({alt:t,imageUrl:r,itemUrl:i,hasBody:s})=>r?i?i.indexOf("youtube.com")>-1?y.jsx("div",{className:on.video_container,children:y.jsx("iframe",{className:Q(on.video,{[on.only]:!s}),title:"Youtube",width:"100%",src:i+"?rel=0",frameBorder:"0",allowFullScreen:!0})}):y.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:y.jsx("div",{className:on.imageContainer,children:y.jsx("img",{className:Q(on.image,{[on.only]:!s}),src:r,alt:t})})}):y.jsx("div",{className:on.imageContainer,children:y.jsx("img",{className:Q(on.image,{[on.only]:!s}),src:r,alt:t})}):null,T6=({title:t,text:r,imageUrl:i,itemUrl:s,buttons:u,sources:c,onButtonClick:d,onLinkClick:h})=>{const m=!!t?.length||!!r?.length||!!u?.length;return y.jsxs("div",{className:Q(on.detailMessage),children:[y.jsx(S6,{hasBody:m,imageUrl:i,itemUrl:s,alt:t||""}),m&&y.jsx(E6,{title:t,text:r,buttons:u,onLinkClick:h,onButtonClick:d}),y.jsx(Kh,{sources:c,onLinkClick:h})]})},A6=B.forwardRef(({isFirstMessageBySender:t,isLastMessageBySender:r,children:i},s)=>{const u=Ze();return y.jsx("li",{ref:s,className:Q(ge.message,ge.messageGuest,t&&ge.messageGuestFirst,r&&ge.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer",t&&"chat__bubbleContainer--first",r&&"chat__bubbleContainer--last"),children:y.jsx("div",{className:Q(ge.bubble,ge.bubbleRight,"chat__bubble","chat__guestBubble"),tabIndex:0,"aria-label":u("guest-bubble.label"),children:y.jsx("div",{className:Q(ge.rightText),children:i})})})}),x6="_markdown_nw7vg_1",t_={markdown:x6},$h=()=>B.useMemo(()=>Uh(),[]),Io="source-info-reference",O6=({actionId:t,markdown:r,sources:i,onLinkClick:s})=>{const u=$h(),c=Cr(),d=R6(),h=st(b=>{const _=b.chat.sourceInfos;if(_?.type==="loaded"||_?.type==="loading")return _.chunkId}),m=b=>_=>{const x=_.key;(x==="ArrowDown"||x==="ArrowRight"||x==="Enter"||x===" "||x==="Space")&&(_.stopPropagation(),c(db(u,t,b)))},p=b=>()=>{c(db(u,t,b))};return B.useLayoutEffect(()=>{document.querySelectorAll(`.${Io}`).forEach(b=>{const _=b.previousSibling;_&&_.nodeType===Node.TEXT_NODE&&_.textContent?.endsWith(" ")&&_.textContent?.trim().length&&b.classList.add(`${Io}--before-space`);const x=b.nextSibling;x&&x.nodeType===Node.TEXT_NODE&&x.textContent?.startsWith(" ")&&x.textContent?.trim().length&&b.classList.add(`${Io}--after-space`)})},[r]),y.jsxs("div",{className:ge.bubbleContent,children:[y.jsx("div",{className:t_.markdown,children:y.jsx(e_,{markdown:r,onLinkClick:s,markdownOptions:{renderRule(b,_,x,U){if(_.type===qO.footnoteReference){const R=_.text===h;return y.jsx("span",{className:Q(ge.sourceInfoReference,R&&ge.sourceInfoReferenceActive,Io),children:y.jsx("a",{type:"button",tabIndex:0,onClick:p(_.text),onKeyDown:m(_.text),children:d(_.text)})},U.key)}return b()}}})}),y.jsx(Kh,{sources:i,onLinkClick:s})]})},R6=()=>{const t=[];return i=>{const s=t.indexOf(i);return s>-1?s+1:(t.push(i),t.length)}},w6="_text_gp0s0_1",C6="_command_gp0s0_5",Vb={text:w6,command:C6},N6=({text:t,commands:r=[]})=>{const i=r.find(u=>t.startsWith(`/${u}`)),s=i?t.slice(i.length+1):t;return y.jsxs("div",{children:[i&&y.jsxs("code",{className:Vb.command,children:["/",i]}),s.split(`
|
|
110
|
-
`).map((u,c)=>y.jsxs("span",{className:Vb.text,children:[u,y.jsx("br",{})]},c))]})},M6=({text:t,commands:r,sources:i,onLinkClick:s})=>y.jsxs("div",{className:ge.bubbleContent,children:[y.jsx(N6,{text:t,commands:r}),y.jsx(Kh,{sources:i,onLinkClick:s})]}),D6=B.forwardRef(({message:t,commands:r,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,onReaction:c,onButtonClick:d,onLinkClick:h},m)=>{const p=L6(t._id,t,r,d,h),b=_=>{c(t._id,_)};switch(t.sender.type){case Te.UserType.GUEST:return y.jsx(A6,{ref:m,isFirstMessageBySender:s,isLastMessageBySender:u,children:p});default:return y.jsx(Qv,{ref:m,message:t,isAnimated:!1,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,onReaction:b,children:p})}}),L6=(t,r,i,s,u)=>{switch(r.type){case Te.MessageTypeEnum.TEXT:{const c=r;return y.jsx(M6,{text:c.text,commands:i,sources:r.sources||[],onLinkClick:u})}case Te.MessageTypeEnum.DETAIL:{const c=r;return y.jsx(T6,{title:c.title,text:c.text,imageUrl:c.imageUrl,itemUrl:c.itemUrl,buttons:c.buttons,sources:r.sources||[],onButtonClick:s,onLinkClick:u})}case Te.MessageTypeEnum.MARKDOWN:{const c=r;return y.jsx(O6,{actionId:t,markdown:c.markdown,sources:c.sources||[],onLinkClick:u})}}},B6=(t,r)=>t.message._id===r.message._id&&t.message.reaction===r.message.reaction&&t.isLastMessage===r.isLastMessage&&t.isFirstMessageBySender===r.isFirstMessageBySender&&t.isLastMessageBySender===r.isLastMessageBySender,U6=E1.memo(D6,B6),j6="_ticontainer_xg0dn_1",H6="_tiblock_xg0dn_5",I6="_tidot_xg0dn_12",ks={ticontainer:j6,tiblock:H6,tidot:I6},z6=({isTyping:t=!1})=>y.jsx("div",{className:ks.ticontainer,children:y.jsx("div",{className:ks.tiblock,children:t?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:Q(ks.tidot,"chat__typingIndicator")}),y.jsx("div",{className:Q(ks.tidot,"chat__typingIndicator")}),y.jsx("div",{className:Q(ks.tidot,"chat__typingIndicator")})]}):null})}),G6=Object.assign({_id:"typing-indicator"},new Te.TextMessage("",new Te.BotUser)),k6=({messages:t,isBotTyping:r,commands:i,onTranscriptItemReaction:s,onButtonClick:u,onLinkClick:c})=>{const d=B.useRef(0),h=B.useRef(!0),m=B.useRef(null),p=B.useRef(null),b=B.useRef(null),_=st(R=>R.settings.enableGeneralConditions);B.useLayoutEffect(()=>{if(t.length&&m.current&&(d.current<t.length||r)){if(p.current){const R=p.current.offsetTop;m.current.scrollTop=R}else if(b.current){const R=b.current.offsetTop;m.current.scrollTop=R}h.current&&(h.current=!1),d.current=t.length}},[t,h,r]);let x;const U=t.length;return y.jsxs("div",{ref:m,className:Q(mb.messageContainer,"chat__messageContainer"),style:{scrollBehavior:t.length&&h.current?"auto":"smooth"},id:"MessageContainer",role:"log","aria-live":"polite",children:[_&&y.jsx(aw,{}),y.jsxs("ul",{className:mb.messages,children:[t.map((R,q)=>{const z=q6(R,x),E=F6(R,q,t,r);x=R.sender.type;const w=q+1===U,S=R._id||`added-${q}`;return y.jsx(U6,{ref:w?b:null,message:R,commands:i,isLastMessage:w,isFirstMessageBySender:z,isLastMessageBySender:E,onButtonClick:u,onLinkClick:c,onReaction:s},w&&!r?"last":S)}),r&&y.jsx(Qv,{ref:p,message:G6,isLastMessage:!1,isAnimated:!0,isFirstMessageBySender:x!==Te.UserType.BOT,isLastMessageBySender:!0,children:y.jsx(z6,{isTyping:!0})},"last")]})]})},q6=(t,r)=>!r||r!==t.sender.type,F6=(t,r,i,s)=>{const u=t.sender.type,c=i.length;return r+1===c?!(u===Te.UserType.BOT&&s):u!==i.at(r+1)?.sender.type},V6="_bottomSheet_jp8dl_1",P6="_bottomSheetOpen_jp8dl_15",Y6="_bottomSheetClose_jp8dl_20",Or={bottomSheet:V6,bottomSheetOpen:P6,bottomSheetClose:Y6},X6="_container_xc2nx_1",Pb={container:X6},Z6=({contentUrl:t})=>{const r=st(c=>c.connection.sessionId),[i,s]=B.useState(!1);B.useEffect(()=>{s(c=>c||!!t)},[t]);const u=B.useMemo(()=>{if(t&&r){const c=new URL(t,document.baseURI);return c.searchParams.set("sessionId",r),c.toString()}else return},[t,r]);return y.jsx("div",{className:Q(Pb.container,Or.bottomSheet,{[Or.bottomSheetOpen]:!!t,[Or.bottomSheetClose]:i&&!t}),children:u&&y.jsx("iframe",{title:"Drawer",src:u,className:Pb.iframe})})},Q6="_container_6tt4m_1",K6={container:Q6},$6=({title:t,href:r,children:i})=>y.jsx("a",{href:r,title:t,target:"_blank",rel:"noopener noreferrer",children:i}),W6=()=>{const r=Ze()("powered-by");return r&&r.length?y.jsx("div",{className:Q(K6.container,"chat__poweredBy"),children:y.jsx(xr,{options:{overrides:{a:$6}},children:r})}):null},n_=({className:t,children:r,...i})=>y.jsx(Su,{className:Q(el.buttonDefault,t),type:"button",...i,children:r}),lu=({className:t,children:r,...i})=>y.jsx(Su,{className:Q(el.buttonPrimary,t),...i,children:r}),J6="_container_h23mk_1",eC="_formContainer_h23mk_17",tC="_emailInput_h23mk_22",nC="_description_h23mk_52",rC="_actions_h23mk_57",aC="_validationError_h23mk_67",iC="_submitted_h23mk_74",Da={container:J6,formContainer:eC,emailInput:tC,description:nC,actions:rC,validationError:aC,submitted:iC},sC=({visible:t,onEmailExport:r,onClose:i})=>{const s=Ze(),[u,c]=B.useState(void 0),[d,h]=B.useState(!1),[m,p]=B.useState(void 0),b=B.useRef(null);B.useEffect(()=>{t?(b.current?.focus(),h(!1),c(t)):u===!0&&c(!1)},[t,u]);const _=U=>{U.preventDefault(),m&&m.length>0&&(r(m),h(!0),setTimeout(i,3*1e3))},x=U=>{const R=U.target.value.trim(),q=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(R);p(q?R:"")};return y.jsxs("div",{className:Q(Da.container,Or.bottomSheet,{[Or.bottomSheetOpen]:u===!0,[Or.bottomSheetClose]:u===!1}),children:[y.jsx("h2",{children:s("export-transcript.email.title")}),y.jsx(xr,{className:Da.description,children:s("export-transcript.email.description")||""}),y.jsxs("form",{onSubmit:_,className:Da.formContainer,children:[y.jsxs("div",{children:[y.jsx("input",{disabled:d,ref:b,type:"email",placeholder:s("export-transcript.email.placeholder"),className:Da.emailInput,onChange:x}),m?.length===0?y.jsx("div",{className:Da.validationError,children:s("export-transcript.email.invalid")}):null]}),y.jsxs("div",{className:Da.actions,children:[y.jsx(n_,{onClick:i,children:s("export-transcript.email.cancel")}),y.jsx(lu,{type:"submit",disabled:d||m===void 0||m.length===0,children:s("export-transcript.email.send")})]})]}),d&&y.jsx("div",{className:Da.submitted,children:s("export-transcript.email.success")})]})},lC="_inputContainer_fi5ao_1",oC={inputContainer:lC},uC="_blockUserInput_pot9c_1",cC={blockUserInput:uC},fC=({visible:t})=>{const r=Ze();return t?y.jsx("div",{className:Q(cC.blockUserInput,"chat__blockUserInput"),children:r("block-user-input.title")}):null},dC="_commandsDropdown_5ytuv_1",hC="_commands_5ytuv_1",mC="_command_5ytuv_1",pC="_commandActive_5ytuv_46",gC="_commandsSelections_5ytuv_55",Qs={commandsDropdown:dC,commands:hC,command:mC,commandActive:pC,commandsSelections:gC},yC=(t,r,i,s,u)=>{B.useEffect(()=>{const c=d=>{if(t.length)switch(d.key){case"Enter":i(t[r]);break;case"ArrowUp":s(h=>h>0?h-1:t.length-1);break;case"ArrowDown":s(h=>h<t.length-1?h+1:0);break;case"Escape":u([]);break}};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[t,r,i,s,u])},bC=({text:t,commands:r,onSelectCommand:i,onVisibilityChange:s})=>{const u=B.useRef(null),c=Ze(),[d,h]=B.useState([]),[m,p]=B.useState(Yb(r)),[b,_]=B.useState(0),x=U=>i(`/${U}`);return Zh(u,()=>h([])),yC(d,b,x,_,h),B.useEffect(()=>{p(Yb(r))},[r]),B.useEffect(()=>{const U=t.length||0;U===0||U>m||!t.startsWith("/")?h([]):h(r.filter(vC(t))),_(0)},[r,t,m]),B.useEffect(()=>{s(!!d.length)},[d,s]),d.length?y.jsx("div",{ref:u,className:Qs.commandsDropdown,children:y.jsx("ul",{id:"command-list",className:Qs.commands,role:"listbox",children:d.map((U,R)=>y.jsxs("li",{className:Q([Qs.command,b===R&&Qs.commandActive]),role:"option",onClick:()=>x(U),onMouseOver:()=>_(R),children:[y.jsxs("h1",{children:["/",U]}),y.jsx("p",{children:c(`commands.${U}`)})]},U))})}):null},Yb=t=>Math.max(...t.map(r=>r.length+1)),vC=t=>r=>{const i=`/${r}`;return i.startsWith(t)&&i.length>=t.length},Xb=3,_C=({commands:t,onSelectCommand:r})=>{const i=Ze(),[s,u]=B.useState(!1),c=p=>()=>{r(`/${p}`),u(!1)},d=()=>{u(!0)},h=()=>{u(!1)},m=s?t:t.slice(0,Xb);return y.jsxs("div",{className:Qs.commandsSelections,children:[m.map(p=>y.jsxs("button",{className:"tooltip--top-center","aria-label":i(`commands.${p}`),"data-title":i(`commands.${p}`),tabIndex:0,onClick:c(p),children:["/",p]},p)),m.length<t.length?y.jsx("button",{"aria-label":i("commands.show-more.tooltip"),"data-title":i("commands.show-more.tooltip"),tabIndex:0,onClick:d,children:i("commands.show-more.action")},"show-more"):m.length>Xb?y.jsx("button",{"aria-label":i("commands.show-less.tooltip"),"data-title":i("commands.show-less.tooltip"),tabIndex:0,onClick:h,children:i("commands.show-less.action")},"show-less"):null]})},EC="_callToActionContainer_d8izj_1",SC="_callToActionTitle_d8izj_23",TC="_rateOverlay_d8izj_30",AC="_body_d8izj_52",xC="_footer_d8izj_60",OC="_actions_d8izj_75",RC="_bubbles_d8izj_89",wC="_stars_d8izj_191",CC="_starsSmall_d8izj_205",NC="_starsLarge_d8izj_211",MC="_star_d8izj_191",DC="_starReadonly_d8izj_225",LC="_starIcon_d8izj_235",BC="_starsDescriptionContainer_d8izj_253",UC="_starsDescription_d8izj_253",zt={callToActionContainer:EC,callToActionTitle:SC,rateOverlay:TC,body:AC,footer:xC,actions:OC,bubbles:RC,stars:wC,starsSmall:CC,starsLarge:NC,star:MC,starReadonly:DC,starIcon:LC,starsDescriptionContainer:BC,starsDescription:UC},jC=({value:t,index:r,count:i,readonly:s,onHover:u,onClick:c})=>{const d=h=>{c&&h.key==="Enter"&&c()};return y.jsx("li",{className:Q(zt.star,{[zt.starReadonly]:s},"chat__conversationRating__star"),children:y.jsx("div",{role:"radio","aria-checked":t>r?"true":"false","aria-posinset":r+1,"aria-setsize":i,tabIndex:0,onMouseOver:u,onKeyDown:d,onClick:c,children:y.jsx("span",{role:"img","aria-label":"Star",className:Q(zt.starIcon),children:y.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"star",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:y.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"})})})})})},Zb=5,r_=({value:t,size:r,readonly:i=!1,onChange:s})=>{const[u,c]=B.useState(void 0),d=()=>{c(void 0)},h=p=>()=>{if(!i){const b=p+1;c(b)}},m=p=>()=>{s&&!i&&(s(p===0&&t===1?0:p+1),c(void 0))};return y.jsx("ul",{tabIndex:0,role:"radiogroup",className:Q(zt.stars,{[zt.starsSmall]:r==="small",[zt.starsLarge]:r==="large"},"chat__conversationRating__stars",{chat__conversationRating__stars__small:r==="small",chat__conversationRating__stars__large:r==="large"}),onMouseOut:d,children:Array(Zb).fill(0).map((p,b)=>y.jsx(jC,{value:u===void 0?t:u,index:b,count:Zb,readonly:i,onHover:h(b),onClick:m(b)},b))})},HC=({visible:t,onRate:r})=>{const i=Ze();return t?y.jsxs("div",{className:Q(zt.callToActionContainer,"chat__conversationRating__callToAction"),children:[y.jsx("div",{className:Q(zt.callToActionTitle,"chat__conversationRating__callToAction__title"),children:i("conversation-rating.call-to-action.title")}),y.jsx(r_,{value:0,size:"small",onChange:r})]}):null},Dd=({isFirstMessageBySender:t,isLastMessageBySender:r,children:i})=>y.jsxs("div",{className:Q(ge.message,ge.messageBot,t&&ge.messageBotFirst,r&&ge.messageBotLast,"chat__bubbleContainer","chat__botBubbleContainer",t&&"chat__bubbleContainer--first",r&&"chat__bubbleContainer--last"),children:[y.jsx("img",{className:Q(ge.avatar,ge.botAvatar),src:"bot.svg",alt:"Bot"}),y.jsx("div",{className:Q(ge.bubble,ge.bubbleLeft,"chat__bubble","chat__botBubble"),children:y.jsx("div",{className:Q(ge.leftText,ge.bubbleContent),children:i})})]}),IC=({children:t})=>y.jsx("div",{className:Q(ge.message,ge.messageGuest,ge.messageGuestFirst,ge.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer","chat__bubbleContainer--first","chat__bubbleContainer--last"),children:y.jsx("div",{className:Q(ge.bubble,ge.bubbleRight,"chat__bubble","chat__guestBubble"),children:y.jsx("div",{className:Q(ge.rightText,ge.bubbleContent),children:t})})}),zC=()=>{const t=Ze(),r=Cr(),i=st(z=>z.chat.conversationRating),[s,u]=B.useState(i.rating?.value||0),[c,d]=B.useState(void 0),[h,m]=B.useState(void 0),[p,b]=B.useState({submitted:!1,feedback:""}),_=B.useRef(null),[x,U]=B.useState(!1);B.useEffect(()=>{i.opener?(b({submitted:!1,feedback:""}),m(!0)):h===!0&&m(!1)},[i.opener,h]),B.useEffect(()=>{u(i.rating?.value||0)},[i.rating?.value,i.opener]),B.useEffect(()=>{_.current&&(_.current.value=i.rating?.feedback||"")},[i.rating?.feedback]),B.useEffect(()=>{const z=s>0?t(`conversation-rating.overlay.bot-message.rate-feedback.value-${s}`):void 0;d(z?.length?z:void 0)},[s,t]),B.useEffect(()=>{p.submitted?setTimeout(()=>U(!0),p.feedback.length?500:0):U(!1)},[p]);const R=z=>{z.preventDefault();const E=_.current?.value?.trim()||"";r(wx(s,E)),b({submitted:!0,feedback:E})},q=()=>{i.opener==="CLOSE_CHAT"?r(Uv()):i.opener==="RESTART_CHAT"?r(al()):r(OO())};return y.jsx("div",{className:Q(zt.rateOverlay,Or.bottomSheet,"chat__conversationRating__overlay",{[Or.bottomSheetOpen]:h===!0,[Or.bottomSheetClose]:h===!1}),children:y.jsxs("form",{onSubmit:R,children:[y.jsxs("div",{className:Q(zt.body,"chat__conversationRating__overlay__body"),children:[y.jsx("div",{}),y.jsx("div",{className:Q(zt.bubbles),children:i.opener&&y.jsxs(y.Fragment,{children:[y.jsxs(Dd,{isFirstMessageBySender:!0,isLastMessageBySender:!c,children:[y.jsx("h2",{children:t("conversation-rating.overlay.title")}),y.jsxs("div",{className:Q(zt.starsDescriptionContainer),children:[y.jsx(r_,{value:s,size:"large",readonly:p.submitted,onChange:u}),y.jsxs("div",{className:Q(zt.starsDescription),children:[y.jsx("div",{children:t("conversation-rating.overlay.star.very-bad")}),y.jsx("div",{children:t("conversation-rating.overlay.star.very-good")})]})]})]}),c&&y.jsx(Dd,{isFirstMessageBySender:!1,isLastMessageBySender:!x||!!p.feedback.length,children:y.jsx("div",{children:c})}),!!p.feedback.length&&y.jsx(IC,{children:p.feedback}),x&&y.jsx(Dd,{isFirstMessageBySender:!!p.feedback.length,isLastMessageBySender:!0,children:y.jsx("div",{children:t("conversation-rating.overlay.bot-message.submit-feedback")})})]})})]}),y.jsxs("div",{className:Q(zt.footer,"chat__conversationRating__overlay__footer"),children:[!p.submitted&&y.jsx("input",{ref:_,defaultValue:i.rating?.feedback||"",placeholder:t("conversation-rating.overlay.guest-feedback.input-placeholder")}),y.jsxs("div",{className:Q(zt.actions,"chat__conversationRating__overlay__footer__actions"),children:[p.submitted?y.jsx(lu,{type:"button",disabled:!s,onClick:q,children:i.opener==="CLOSE_CHAT"?t("conversation-rating.overlay.action.close-chat"):i.opener==="RESTART_CHAT"?t("conversation-rating.overlay.action.restart-chat"):t("conversation-rating.overlay.action.back-to-chat")},"close-button"):y.jsx(lu,{type:"submit",disabled:!s,children:t("conversation-rating.overlay.action.submit")},"submit-button"),i.opener!=="CHAT"&&!p.submitted&&y.jsx(n_,{onClick:q,children:i.opener==="CLOSE_CHAT"?t("conversation-rating.overlay.action.close-chat"):i.opener==="RESTART_CHAT"?t("conversation-rating.overlay.action.restart-chat"):t("conversation-rating.overlay.action.cancel")})]})]})]})})},GC=({numberOfMessagesFromGuest:t})=>{const r=Cr(),i=st(c=>c.chat.conversationRating),s=c=>{r(iu("CHAT",c))},u=!i.rating?.value&&t>=1;return i.enabled?y.jsxs(y.Fragment,{children:[y.jsx(HC,{visible:u,onRate:s}),y.jsx(zC,{})]}):null},kC=B.memo(GC),qC="_inputWrapper_e3h44_1",FC="_withOpenCommands_e3h44_14",VC="_messageInputWrapper_e3h44_20",PC="_messageInput_e3h44_20",YC="_buttons_e3h44_44",XC="_button_e3h44_44",xi={inputWrapper:qC,withOpenCommands:FC,messageInputWrapper:VC,messageInput:PC,buttons:YC,button:XC},ZC="_audioRecorder_g845f_1",QC="_audioButton_g845f_6",KC="_recorderIcon_g845f_37",$C="_spinning_g845f_60",La={audioRecorder:ZC,audioButton:QC,recorderIcon:KC,spinning:$C},Qb=2048,ou=16e3;class WC extends E1.Component{audioInput=null;volume=null;leftchannel=[];recorder=null;recordingLength=0;sampleRate=null;mediaStream=null;constructor(r){super(r),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(r){this.mediaStream=r,this.leftchannel.length=0,this.recordingLength=0,this.initRecording(r)}initRecording(r){const i=window.AudioContext||window.webkitAudioContext,s=new i;this.sampleRate=s.sampleRate,this.volume=s.createGain(),this.audioInput=s.createMediaStreamSource(r),this.audioInput.connect(this.volume),this.recorder=s.createScriptProcessor(Qb,1,1),this.recorder.onaudioprocess=this.processRecordingInput,this.volume.connect(this.recorder),this.recorder.connect(s.destination)}processRecordingInput(r){if(this.state.recordingState==="connecting"&&this.setState({recordingState:"recording"}),this.state.recordingState!=="none"){const i=r.inputBuffer.getChannelData(0);this.leftchannel.push(new Float32Array(i)),this.recordingLength+=Qb}}handleClickSubmitAudio(){const r=eN(this.leftchannel,this.recordingLength),i=tN(r,this.sampleRate||0),s=JC(i);this.props.onAudioRecorded(s),this.handleClickStopAudio()}handleClickStopAudio(){this.setState({recordingState:"none"}),this.audioInput?.disconnect(),this.volume?.disconnect(),this.recorder?.disconnect(),this.mediaStream&&this.mediaStream?.getAudioTracks().forEach(r=>{r.stop()})}render(){return y.jsxs("div",{className:La.audioRecorder,children:[this.state.recordingState==="none"&&y.jsx("button",{className:Q(La.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:y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[y.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"}),y.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),this.state.recordingState==="connecting"&&y.jsxs("svg",{className:La.spinning,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[y.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"}),y.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]}),this.state.recordingState==="recording"&&y.jsxs("div",{className:La.audioRecorder,children:[y.jsx("button",{className:Q(La.audioButton),onClick:this.handleClickStopAudio,"aria-label":this.props.translate("message-input.actions.stop-audio-recording.label"),tabIndex:0,children:y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[y.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"}),y.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),y.jsx("div",{className:La.recorderIcon}),y.jsx("button",{className:Q(La.audioButton),type:"submit",onClick:this.handleClickSubmitAudio,"aria-label":this.props.translate("message-input.actions.submit-audio-recording.label"),tabIndex:0,autoFocus:!0,children:y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[y.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),y.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})]})})]})]})}}const JC=t=>{const r=new ArrayBuffer(44+t.length*2),i=new DataView(r);zo(i,0,"RIFF"),i.setUint32(4,44+t.length*2,!0),zo(i,8,"WAVE"),zo(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,ou,!0),i.setUint32(28,ou*4,!0),i.setUint16(32,4,!0),i.setUint16(34,16,!0),zo(i,36,"data"),i.setUint32(40,t.length*2,!0);const s=t.length;let u=44;const c=1;for(let d=0;d<s;d++)i.setInt16(u,t[d]*(32767*c),!0),u+=2;return new Blob([i],{type:"audio/wav"})},zo=(t,r,i)=>{for(let s=0;s<i.length;s++)t.setUint8(r+s,i.charCodeAt(s))},eN=(t,r)=>{const i=new Float32Array(r);let s=0;const u=t.length;for(let c=0;c<u;c++){const d=t[c];i.set(d,s),s+=d.length}return i},tN=(t,r)=>{if(ou===r)return t;const i=r/ou,s=Math.round(t.length/i),u=new Float32Array(s);let c=0,d=0;for(;c<u.length;){const h=Math.round((c+1)*i);let m=0,p=0;for(let b=d;b<h&&b<t.length;b++)m+=t[b],p++;u[c]=m/p,c++,d=h}return u},nN=({disabled:t,textInput:r,commandsVisible:i,hasCommands:s,onTextInput:u,onTextInputSubmit:c,onAudioRecorded:d})=>{const h=Ze(),m=B.useRef(null),{enableSpeechSupport:p}=st(R=>R.settings);B.useEffect(()=>{m.current?.focus()},[r]);const b=()=>{const R=m.current;R&&r.trim().length>=1&&c(r.trim())&&(R.value="",R.style.height="",R.focus())},_=R=>{R.preventDefault(),b()},x=R=>{const q=R.target.value;u(q),R.target.style.height="";const{scrollHeight:z}=R.target;R.target.style.height=`${z>150?150:z}px`},U=R=>{R.code==="Enter"&&!R.shiftKey?(R.repeat||b(),R.preventDefault()):i&&(R.code==="ArrowUp"||R.code==="ArrowDown")&&R.preventDefault()};return y.jsxs("form",{className:Q(xi.inputWrapper,i&&xi.withOpenCommands,"chat__textInput"),onSubmit:_,children:[y.jsx("div",{className:xi.messageInputWrapper,children:y.jsx("textarea",{id:"user_input",ref:m,className:xi.messageInput,tabIndex:0,placeholder:h("message-input-placeholder"),value:r,onChange:x,onKeyDown:U,"aria-label":h("message-input-label"),"aria-controls":s?"command-list":void 0,"aria-haspopup":s?"listbox":void 0})}),y.jsx("div",{className:Q(xi.buttons,"chat__buttons"),children:r.length||!p||navigator.mediaDevices===void 0?y.jsx("button",{className:Q(xi.button,"chat__button"),type:"submit","aria-label":h("message-input.actions.submit.label"),"data-title":h("message-input.actions.submit.label"),tabIndex:0,disabled:t,children:y.jsx("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:y.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"})})}):p&&navigator.mediaDevices!==void 0&&y.jsx(WC,{translate:h,onAudioRecorded:d})})]})},rN="_quickReplies_83npe_1",aN="_quickReply_83npe_9",Kb={quickReplies:rN,quickReply:aN},iN=({quickReplies:t,onQuickReplyClick:r})=>t.length?y.jsx("div",{className:Q(Kb.quickReplies,"chat__quickReplies"),children:t.map(i=>y.jsx(Su,{tabIndex:0,className:Q(Kb.quickReply,"chat__button","chat__quickReply"),onClick:()=>r(i),children:i.label},i.label))}):null,$b=5e3,sN=1e3,lN=({isBotTyping:t,quickReplies:r,numberOfMessagesFromGuest:i,commands:s,onTextInput:u,onQuickReplyClick:c,onAudioRecorded:d})=>{const[h,m]=B.useState(""),[p,b]=B.useState(!1),[_,x]=B.useState(!1),U=B.useRef(0),R=B.useRef(0);B.useEffect(()=>{if(p&&!t){const E=U.current?Date.now()-U.current:0;E>$b?b(!1):setTimeout(()=>{b(!1)},$b-E)}},[p,t]),B.useEffect(()=>{p&&(U.current=Date.now())},[p]);const q=E=>{const w=Date.now()-R.current<sN;return _?!1:t||w?(b(!0),!1):(u(E),m(""),R.current=Date.now(),!0)},z=E=>{m(E+" ")};return y.jsxs("div",{className:Q(oC.inputContainer),children:[y.jsx(iN,{quickReplies:r,onQuickReplyClick:c}),y.jsx(fC,{visible:p}),!p&&y.jsx(kC,{numberOfMessagesFromGuest:i}),!!s?.length&&y.jsx(bC,{text:h,commands:s,onSelectCommand:z,onVisibilityChange:x}),y.jsx(nN,{textInput:h,disabled:p,commandsVisible:_,hasCommands:!!s?.length,onTextInput:m,onTextInputSubmit:q,onAudioRecorded:d}),!!s?.length&&y.jsx(_C,{commands:s,onSelectCommand:m})]})},oN=({clientName:t,messages:r,quickReplies:i,isBotTyping:s,drawerContentUrl:u,onMessageFromUser:c,onQuickReplyClick:d,onButtonClick:h,onLinkClick:m,onAudioRecorded:p,onTranscriptExport:b,onTranscriptItemReaction:_})=>{const x=Cr(),U=st(H=>H.connection.connectionState),{enableTranscriptExportEmail:R,commands:q}=st(H=>H.settings),{showTranscriptMailOverlay:z,conversationRating:E}=st(H=>H.chat),w=r.filter(H=>H.sender.type===su.GUEST).length;B.useEffect(()=>{if(U===Ia.CONNECTED){const H=hu.parse(window.location.search);x(Hv(t,H))}},[t,U,x]);const S=()=>{x(jv())};return y.jsxs("div",{className:cd.container,children:[y.jsxs("div",{className:Q([cd.chatcontent,(z||E?.opener)&&cd.accessabilityHidden]),children:[y.jsx(k6,{messages:r,isBotTyping:s,commands:q,onButtonClick:h,onLinkClick:m,onTranscriptItemReaction:_}),y.jsx(lN,{isBotTyping:s,quickReplies:s?[]:i,numberOfMessagesFromGuest:w,commands:q,onQuickReplyClick:d,onTextInput:c,onAudioRecorded:p}),y.jsx(W6,{})]}),R&&y.jsx(sC,{visible:!!z,onEmailExport:b,onClose:S}),y.jsx(Z6,{contentUrl:u})]})},uN=t=>{const{messages:r,quickReplies:i,isBotTyping:s,drawerContentUrl:u}=t.chat;return{messages:r,quickReplies:i,isBotTyping:s,drawerContentUrl:u}},cN=t=>({onRestartChat:()=>t(al()),onMessageFromUser:r=>t(cv(r)),onAudioRecorded:r=>t(Tx(r)),onActionFromUser:r=>t(r),onQuickReplyClick:r=>t(uv(r)),onNluEvent:r=>t(pv(r)),onButtonClick:r=>t(Nx(r)),onLinkClick:r=>t(gv(r)),onTranscriptExport:r=>t(xx(r)),onTranscriptItemReaction:(r,i)=>{t(Te.Actions.transcriptItemGuestReaction(r,i?.type||null,i?.category,i?.comment))}}),fN=VS(uN,cN)(oN),a_=()=>{const[t,r]=B.useState(!1);return B.useEffect(()=>{r((()=>{try{return window.self!==window.top}catch{return!0}})())},[]),t},dN=t=>r=>{const i=r.key;(i==="ArrowDown"||i==="ArrowRight"||i==="Enter"||i===" "||i==="Space")&&(r.stopPropagation(),t())},hN=({onClick:t})=>{const r=Ze();return a_()?y.jsx("button",{className:"tooltip--bottom-left","aria-label":r("header.close-chat"),"data-title":r("header.close-chat"),tabIndex:0,onClick:t,onKeyDown:dN(t),children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.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},mN="_header_3gvbz_1",pN="_logoContainer_3gvbz_14",gN="_logo_3gvbz_14",yN="_actions_3gvbz_28",bN="_active_3gvbz_43",vN="_menuContainer_3gvbz_56",_N="_menu_3gvbz_56",EN="_divider_3gvbz_86",ia={header:mN,logoContainer:pN,logo:gN,actions:yN,active:bN,menuContainer:vN,menu:_N,divider:EN},SN=({icon:t})=>{switch(t){case"arrow-counter-clockwise":return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("div",{})}},TN=B.forwardRef(({selected:t,item:r,onClick:i},s)=>{const u=Ze(),c=d=>{d.preventDefault(),i()};return y.jsx("li",{"aria-selected":t,role:"option",className:r.withDivider?ia.divider:void 0,children:y.jsxs("a",{ref:s,type:"button",role:"button",tabIndex:-1,onClick:c,children:[y.jsx(SN,{icon:r.icon}),y.jsx("span",{children:u(`header.menu.${r.id}`)})]})})}),AN=(t,r)=>{const i=a_(),{menuItems:s,enableStandaloneView:u,enableTranscriptExportPdf:c,enableTranscriptExportEmail:d}=st(p=>p.settings),h=st(p=>p.chat.conversationRating.enabled);return B.useMemo(()=>{const p=[],b=s.filter(({visibility:_})=>t?_==="always"||_==="chat-only":_==="always"||_==="start-screen-only");if(t&&(p.push({id:"restart-chat",type:"restart-chat",icon:"arrow-counter-clockwise",visibility:"chat-only"}),i&&u&&p.push({id:"expand-chat-window",type:"expand-chat-window",icon:"expand",visibility:"always"}),r&&c&&p.push({id:"download-transcript",type:"download-transcript",icon:"download",visibility:"chat-only"}),r&&d&&p.push({id:"send-transcript",type:"send-transcript",icon:"mail",visibility:"chat-only"}),r&&h&&p.push({id:"rate-conversation",type:"rate-conversation",icon:"star",visibility:"chat-only"}),p.length>0&&b.length)){const _=p.pop();_&&s.length&&p.push({..._,withDivider:!0})}return p.push(...b),p},[t,r,c,d,u,h,i,s])},xN=({chatStarted:t,hasGuestMessages:r})=>{const i=Cr(),s=Ze(),[u,c]=B.useState(!1),[d,h]=B.useState(-1),m=B.useRef(null),p=B.useRef(null),b=B.useRef([]),_=AN(t,r);B.useEffect(()=>{b.current[d]?.focus()},[d]);const x=B.useCallback(()=>{i(r?iu("RESTART_CHAT"):al()),c(!1),h(0)},[r,i]),U=B.useCallback(z=>{switch(z.type){case"restart-chat":x();break;case"expand-chat-window":window.open(window.location.href,"_blank");break;case"download-transcript":i(Ox());break;case"send-transcript":i(jv());break;case"rate-conversation":i(iu("MENU"));break;case"link":i(gv(z.url));break;case"action":i(JSON.parse(JSON.stringify(z.action)));break}c(!1)},[i,x,c]);B.useEffect(()=>{const z=E=>{if(u)switch(E.key){case"Enter":E.preventDefault(),U(_[d]);break;case"ArrowUp":h(w=>w>0?w-1:_.length-1);break;case"ArrowDown":h(w=>w<_.length-1?w+1:0);break;case"Escape":c(!1);break;case"Tab":d>-1&&c(!1);break}};return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}},[u,d,_,h,c,U]),B.useEffect(()=>{u||h(-1)},[u,d]),Zh(p,()=>c(!1));const R=()=>{c(z=>!z)},q=()=>{setTimeout(()=>{const z=document.activeElement;p.current&&!p.current.contains(z)&&c(!1)},0)};return _.length?y.jsxs("div",{className:Q(ia.menuContainer),ref:p,children:[y.jsx("button",{ref:m,className:Q(u&&ia.active,u?"tooltip-hidden":"tooltip--bottom-left"),"aria-label":s("header.menu.title"),"data-title":s("header.menu.title"),onClick:R,onBlur:q,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.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"})})}),u&&y.jsx("nav",{className:ia.menu,"aria-label":s("header.menu.title"),children:y.jsx("ul",{tabIndex:0,children:_.map((z,E)=>y.jsx(TN,{ref:w=>{b.current[E]=w},selected:d===E,item:z,onClick:()=>U(z)},z.id))})})]}):null},Wb=({className:t,chatStarted:r,...i})=>{const s=Cr(),u=st(h=>h.chat.conversationRating),c=st(h=>h.chat.messages.some(m=>m.sender.type===Te.UserType.GUEST)),d=()=>{u.enabled&&!u.opener&&c?s(iu("CLOSE_CHAT")):s(Uv())};return y.jsxs("div",{className:Q([ia.header,t]),...i,children:[y.jsx("div",{className:ia.logoContainer,children:y.jsx("div",{className:ia.logo})}),y.jsxs("div",{className:ia.actions,children:[y.jsx(xN,{chatStarted:r,hasGuestMessages:c}),y.jsx(hN,{onClick:d})]})]})},ON="_chatwindow_rkbir_1",RN="_chatwindowWithAside_rkbir_21",Jb={chatwindow:ON,chatwindowWithAside:RN},i_=()=>{const[t,r]=B.useState(!1);return B.useEffect(()=>{const i=window.matchMedia("(max-width: 1023px)"),s=()=>r(i.matches);return s(),i.addEventListener("change",s),()=>i.removeEventListener("change",s)},[]),t},wN="_sourceInfos_vei0l_1",CN="_waitForLoading_vei0l_24",NN="_loadingContent_vei0l_28",MN="_sourceHeader_vei0l_37",DN="_sourceHeaderIcon_vei0l_57",LN="_sourceContent_vei0l_61",BN="_openSourceButton_vei0l_69",UN="_sourceButtonLabel_vei0l_79",jN="_closeSourceInfosButton_vei0l_101",HN="_loadingSourceInfos_vei0l_125",IN="_loading_vei0l_28",zN="_loadingError_vei0l_139",GN="_highlightLoadingInfo_vei0l_155",kN="_highlightLoadingInfoInnerContainer_vei0l_169",qN="_highlightLoadingInfoContent_vei0l_178",FN="_highlightLoadingInfoCloseIcon_vei0l_198",VN="_highlightLoader_vei0l_203",PN="_highlightLoaderLoading_vei0l_210",Et={sourceInfos:wN,waitForLoading:CN,loadingContent:NN,sourceHeader:MN,sourceHeaderIcon:DN,sourceContent:LN,openSourceButton:BN,sourceButtonLabel:UN,closeSourceInfosButton:jN,loadingSourceInfos:HN,loading:IN,loadingError:zN,highlightLoadingInfo:GN,highlightLoadingInfoInnerContainer:kN,highlightLoadingInfoContent:qN,highlightLoadingInfoCloseIcon:FN,highlightLoader:VN,highlightLoaderLoading:PN},YN=({onClick:t})=>{const r=Ze();return y.jsx("button",{className:Q(Et.closeSourceInfosButton,"tooltip--bottom-left"),"aria-label":r("source-infos.close"),"data-title":r("source-infos.close"),tabIndex:0,onClick:t,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.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"})})})},XN=B.forwardRef(({sourceInfos:t,onClose:r,...i},s)=>y.jsxs("div",{className:Et.sourceHeader,...i,ref:s,children:[y.jsx("div",{children:t?y.jsx("p",{id:"source-info-title",children:t.title}):y.jsx("p",{children:" "})}),y.jsx(YN,{onClick:r})]})),ZN=({loading:t})=>y.jsx("div",{className:Et.highlightLoader,children:t&&y.jsx("div",{className:Et.highlightLoaderLoading})});/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:s_,setPrototypeOf:e1,isFrozen:QN,getPrototypeOf:KN,getOwnPropertyDescriptor:$N}=Object;let{freeze:Gt,seal:Tn,create:l_}=Object,{apply:uh,construct:ch}=typeof Reflect<"u"&&Reflect;Gt||(Gt=function(r){return r});Tn||(Tn=function(r){return r});uh||(uh=function(r,i,s){return r.apply(i,s)});ch||(ch=function(r,i){return new r(...i)});const Go=kt(Array.prototype.forEach),WN=kt(Array.prototype.lastIndexOf),t1=kt(Array.prototype.pop),qs=kt(Array.prototype.push),JN=kt(Array.prototype.splice),Xo=kt(String.prototype.toLowerCase),Ld=kt(String.prototype.toString),n1=kt(String.prototype.match),Fs=kt(String.prototype.replace),e3=kt(String.prototype.indexOf),t3=kt(String.prototype.trim),Hn=kt(Object.prototype.hasOwnProperty),Ht=kt(RegExp.prototype.test),Vs=n3(TypeError);function kt(t){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),u=1;u<i;u++)s[u-1]=arguments[u];return uh(t,r,s)}}function n3(t){return function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return ch(t,i)}}function Re(t,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xo;e1&&e1(t,null);let s=r.length;for(;s--;){let u=r[s];if(typeof u=="string"){const c=i(u);c!==u&&(QN(r)||(r[s]=c),u=c)}t[u]=!0}return t}function r3(t){for(let r=0;r<t.length;r++)Hn(t,r)||(t[r]=null);return t}function Tr(t){const r=l_(null);for(const[i,s]of s_(t))Hn(t,i)&&(Array.isArray(s)?r[i]=r3(s):s&&typeof s=="object"&&s.constructor===Object?r[i]=Tr(s):r[i]=s);return r}function Ps(t,r){for(;t!==null;){const s=$N(t,r);if(s){if(s.get)return kt(s.get);if(typeof s.value=="function")return kt(s.value)}t=KN(t)}function i(){return null}return i}const r1=Gt(["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","section","select","shadow","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"]),Bd=Gt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ud=Gt(["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"]),a3=Gt(["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"]),jd=Gt(["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"]),i3=Gt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),a1=Gt(["#text"]),i1=Gt(["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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Hd=Gt(["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","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"]),s1=Gt(["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"]),ko=Gt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),s3=Tn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),l3=Tn(/<%[\w\W]*|[\w\W]*%>/gm),o3=Tn(/\$\{[\w\W]*/gm),u3=Tn(/^data-[\-\w.\u00B7-\uFFFF]+$/),c3=Tn(/^aria-[\-\w]+$/),o_=Tn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),f3=Tn(/^(?:\w+script|data):/i),d3=Tn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),u_=Tn(/^html$/i),h3=Tn(/^[a-z][.\w]*(-[.\w]+)+$/i);var l1=Object.freeze({__proto__:null,ARIA_ATTR:c3,ATTR_WHITESPACE:d3,CUSTOM_ELEMENT:h3,DATA_ATTR:u3,DOCTYPE_NAME:u_,ERB_EXPR:l3,IS_ALLOWED_URI:o_,IS_SCRIPT_OR_DATA:f3,MUSTACHE_EXPR:s3,TMPLIT_EXPR:o3});const Ys={element:1,text:3,progressingInstruction:7,comment:8,document:9},m3=function(){return typeof window>"u"?null:window},p3=function(r,i){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let s=null;const u="data-tt-policy-suffix";i&&i.hasAttribute(u)&&(s=i.getAttribute(u));const c="dompurify"+(s?"#"+s:"");try{return r.createPolicy(c,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}},o1=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function c_(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m3();const r=le=>c_(le);if(r.version="3.2.6",r.removed=[],!t||!t.document||t.document.nodeType!==Ys.document||!t.Element)return r.isSupported=!1,r;let{document:i}=t;const s=i,u=s.currentScript,{DocumentFragment:c,HTMLTemplateElement:d,Node:h,Element:m,NodeFilter:p,NamedNodeMap:b=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:_,DOMParser:x,trustedTypes:U}=t,R=m.prototype,q=Ps(R,"cloneNode"),z=Ps(R,"remove"),E=Ps(R,"nextSibling"),w=Ps(R,"childNodes"),S=Ps(R,"parentNode");if(typeof d=="function"){const le=i.createElement("template");le.content&&le.content.ownerDocument&&(i=le.content.ownerDocument)}let H,A="";const{implementation:Z,createNodeIterator:W,createDocumentFragment:ae,getElementsByTagName:ye}=i,{importNode:Ee}=s;let se=o1();r.isSupported=typeof s_=="function"&&typeof S=="function"&&Z&&Z.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:me,ERB_EXPR:ce,TMPLIT_EXPR:Pe,DATA_ATTR:ve,ARIA_ATTR:G,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:ee,CUSTOM_ELEMENT:Ae}=l1;let{IS_ALLOWED_URI:O}=l1,k=null;const $=Re({},[...r1,...Bd,...Ud,...jd,...a1]);let Y=null;const te=Re({},[...i1,...Hd,...s1,...ko]);let re=Object.seal(l_(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}})),ue=null,We=null,Ue=!0,St=!0,Gn=!1,Nr=!0,Qe=!1,qt=!0,On=!1,Di=!1,Li=!1,Tt=!1,qa=!1,oa=!1,Bi=!0,ua=!1;const xu="user-content-";let Fa=!0,ca=!1,Mr={},dn=null;const Nt=Re({},["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"]);let Rn=null;const Mt=Re({},["audio","video","img","source","image","track"]);let Ui=null;const il=Re({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Va="http://www.w3.org/1998/Math/MathML",nr="http://www.w3.org/2000/svg",Ft="http://www.w3.org/1999/xhtml";let Vt=Ft,Dr=!1,rr=null;const Ou=Re({},[Va,nr,Ft],Ld);let fa=Re({},["mi","mo","mn","ms","mtext"]),da=Re({},["annotation-xml"]);const ji=Re({},["title","style","font","a","script"]);let wn=null;const Ru=["application/xhtml+xml","text/html"],sl="text/html";let rt=null,kn=null;const Hi=i.createElement("form"),Ii=function(N){return N instanceof RegExp||N instanceof Function},zi=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kn&&kn===N)){if((!N||typeof N!="object")&&(N={}),N=Tr(N),wn=Ru.indexOf(N.PARSER_MEDIA_TYPE)===-1?sl:N.PARSER_MEDIA_TYPE,rt=wn==="application/xhtml+xml"?Ld:Xo,k=Hn(N,"ALLOWED_TAGS")?Re({},N.ALLOWED_TAGS,rt):$,Y=Hn(N,"ALLOWED_ATTR")?Re({},N.ALLOWED_ATTR,rt):te,rr=Hn(N,"ALLOWED_NAMESPACES")?Re({},N.ALLOWED_NAMESPACES,Ld):Ou,Ui=Hn(N,"ADD_URI_SAFE_ATTR")?Re(Tr(il),N.ADD_URI_SAFE_ATTR,rt):il,Rn=Hn(N,"ADD_DATA_URI_TAGS")?Re(Tr(Mt),N.ADD_DATA_URI_TAGS,rt):Mt,dn=Hn(N,"FORBID_CONTENTS")?Re({},N.FORBID_CONTENTS,rt):Nt,ue=Hn(N,"FORBID_TAGS")?Re({},N.FORBID_TAGS,rt):Tr({}),We=Hn(N,"FORBID_ATTR")?Re({},N.FORBID_ATTR,rt):Tr({}),Mr=Hn(N,"USE_PROFILES")?N.USE_PROFILES:!1,Ue=N.ALLOW_ARIA_ATTR!==!1,St=N.ALLOW_DATA_ATTR!==!1,Gn=N.ALLOW_UNKNOWN_PROTOCOLS||!1,Nr=N.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qe=N.SAFE_FOR_TEMPLATES||!1,qt=N.SAFE_FOR_XML!==!1,On=N.WHOLE_DOCUMENT||!1,Tt=N.RETURN_DOM||!1,qa=N.RETURN_DOM_FRAGMENT||!1,oa=N.RETURN_TRUSTED_TYPE||!1,Li=N.FORCE_BODY||!1,Bi=N.SANITIZE_DOM!==!1,ua=N.SANITIZE_NAMED_PROPS||!1,Fa=N.KEEP_CONTENT!==!1,ca=N.IN_PLACE||!1,O=N.ALLOWED_URI_REGEXP||o_,Vt=N.NAMESPACE||Ft,fa=N.MATHML_TEXT_INTEGRATION_POINTS||fa,da=N.HTML_INTEGRATION_POINTS||da,re=N.CUSTOM_ELEMENT_HANDLING||{},N.CUSTOM_ELEMENT_HANDLING&&Ii(N.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(re.tagNameCheck=N.CUSTOM_ELEMENT_HANDLING.tagNameCheck),N.CUSTOM_ELEMENT_HANDLING&&Ii(N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(re.attributeNameCheck=N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),N.CUSTOM_ELEMENT_HANDLING&&typeof N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(re.allowCustomizedBuiltInElements=N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Qe&&(St=!1),qa&&(Tt=!0),Mr&&(k=Re({},a1),Y=[],Mr.html===!0&&(Re(k,r1),Re(Y,i1)),Mr.svg===!0&&(Re(k,Bd),Re(Y,Hd),Re(Y,ko)),Mr.svgFilters===!0&&(Re(k,Ud),Re(Y,Hd),Re(Y,ko)),Mr.mathMl===!0&&(Re(k,jd),Re(Y,s1),Re(Y,ko))),N.ADD_TAGS&&(k===$&&(k=Tr(k)),Re(k,N.ADD_TAGS,rt)),N.ADD_ATTR&&(Y===te&&(Y=Tr(Y)),Re(Y,N.ADD_ATTR,rt)),N.ADD_URI_SAFE_ATTR&&Re(Ui,N.ADD_URI_SAFE_ATTR,rt),N.FORBID_CONTENTS&&(dn===Nt&&(dn=Tr(dn)),Re(dn,N.FORBID_CONTENTS,rt)),Fa&&(k["#text"]=!0),On&&Re(k,["html","head","body"]),k.table&&(Re(k,["tbody"]),delete ue.tbody),N.TRUSTED_TYPES_POLICY){if(typeof N.TRUSTED_TYPES_POLICY.createHTML!="function")throw Vs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof N.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Vs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');H=N.TRUSTED_TYPES_POLICY,A=H.createHTML("")}else H===void 0&&(H=p3(U,u)),H!==null&&typeof A=="string"&&(A=H.createHTML(""));Gt&&Gt(N),kn=N}},Cn=Re({},[...Bd,...Ud,...a3]),ht=Re({},[...jd,...i3]),Dt=function(N){let X=S(N);(!X||!X.tagName)&&(X={namespaceURI:Vt,tagName:"template"});const J=Xo(N.tagName),Fe=Xo(X.tagName);return rr[N.namespaceURI]?N.namespaceURI===nr?X.namespaceURI===Ft?J==="svg":X.namespaceURI===Va?J==="svg"&&(Fe==="annotation-xml"||fa[Fe]):!!Cn[J]:N.namespaceURI===Va?X.namespaceURI===Ft?J==="math":X.namespaceURI===nr?J==="math"&&da[Fe]:!!ht[J]:N.namespaceURI===Ft?X.namespaceURI===nr&&!da[Fe]||X.namespaceURI===Va&&!fa[Fe]?!1:!ht[J]&&(ji[J]||!Cn[J]):!!(wn==="application/xhtml+xml"&&rr[N.namespaceURI]):!1},At=function(N){qs(r.removed,{element:N});try{S(N).removeChild(N)}catch{z(N)}},qn=function(N,X){try{qs(r.removed,{attribute:X.getAttributeNode(N),from:X})}catch{qs(r.removed,{attribute:null,from:X})}if(X.removeAttribute(N),N==="is")if(Tt||qa)try{At(X)}catch{}else try{X.setAttribute(N,"")}catch{}},ll=function(N){let X=null,J=null;if(Li)N="<remove></remove>"+N;else{const Je=n1(N,/^[\r\n\t ]+/);J=Je&&Je[0]}wn==="application/xhtml+xml"&&Vt===Ft&&(N='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+N+"</body></html>");const Fe=H?H.createHTML(N):N;if(Vt===Ft)try{X=new x().parseFromString(Fe,wn)}catch{}if(!X||!X.documentElement){X=Z.createDocument(Vt,"template",null);try{X.documentElement.innerHTML=Dr?A:Fe}catch{}}const mt=X.body||X.documentElement;return N&&J&&mt.insertBefore(i.createTextNode(J),mt.childNodes[0]||null),Vt===Ft?ye.call(X,On?"html":"body")[0]:On?X.documentElement:mt},ol=function(N){return W.call(N.ownerDocument||N,N,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},Pa=function(N){return N instanceof _&&(typeof N.nodeName!="string"||typeof N.textContent!="string"||typeof N.removeChild!="function"||!(N.attributes instanceof b)||typeof N.removeAttribute!="function"||typeof N.setAttribute!="function"||typeof N.namespaceURI!="string"||typeof N.insertBefore!="function"||typeof N.hasChildNodes!="function")},Lr=function(N){return typeof h=="function"&&N instanceof h};function Kt(le,N,X){Go(le,J=>{J.call(r,N,X,kn)})}const ar=function(N){let X=null;if(Kt(se.beforeSanitizeElements,N,null),Pa(N))return At(N),!0;const J=rt(N.nodeName);if(Kt(se.uponSanitizeElement,N,{tagName:J,allowedTags:k}),qt&&N.hasChildNodes()&&!Lr(N.firstElementChild)&&Ht(/<[/\w!]/g,N.innerHTML)&&Ht(/<[/\w!]/g,N.textContent)||N.nodeType===Ys.progressingInstruction||qt&&N.nodeType===Ys.comment&&Ht(/<[/\w]/g,N.data))return At(N),!0;if(!k[J]||ue[J]){if(!ue[J]&&Br(J)&&(re.tagNameCheck instanceof RegExp&&Ht(re.tagNameCheck,J)||re.tagNameCheck instanceof Function&&re.tagNameCheck(J)))return!1;if(Fa&&!dn[J]){const Fe=S(N)||N.parentNode,mt=w(N)||N.childNodes;if(mt&&Fe){const Je=mt.length;for(let Lt=Je-1;Lt>=0;--Lt){const Pt=q(mt[Lt],!0);Pt.__removalCount=(N.__removalCount||0)+1,Fe.insertBefore(Pt,E(N))}}}return At(N),!0}return N instanceof m&&!Dt(N)||(J==="noscript"||J==="noembed"||J==="noframes")&&Ht(/<\/no(script|embed|frames)/i,N.innerHTML)?(At(N),!0):(Qe&&N.nodeType===Ys.text&&(X=N.textContent,Go([me,ce,Pe],Fe=>{X=Fs(X,Fe," ")}),N.textContent!==X&&(qs(r.removed,{element:N.cloneNode()}),N.textContent=X)),Kt(se.afterSanitizeElements,N,null),!1)},ir=function(N,X,J){if(Bi&&(X==="id"||X==="name")&&(J in i||J in Hi))return!1;if(!(St&&!We[X]&&Ht(ve,X))){if(!(Ue&&Ht(G,X))){if(!Y[X]||We[X]){if(!(Br(N)&&(re.tagNameCheck instanceof RegExp&&Ht(re.tagNameCheck,N)||re.tagNameCheck instanceof Function&&re.tagNameCheck(N))&&(re.attributeNameCheck instanceof RegExp&&Ht(re.attributeNameCheck,X)||re.attributeNameCheck instanceof Function&&re.attributeNameCheck(X))||X==="is"&&re.allowCustomizedBuiltInElements&&(re.tagNameCheck instanceof RegExp&&Ht(re.tagNameCheck,J)||re.tagNameCheck instanceof Function&&re.tagNameCheck(J))))return!1}else if(!Ui[X]){if(!Ht(O,Fs(J,ee,""))){if(!((X==="src"||X==="xlink:href"||X==="href")&&N!=="script"&&e3(J,"data:")===0&&Rn[N])){if(!(Gn&&!Ht(K,Fs(J,ee,"")))){if(J)return!1}}}}}}return!0},Br=function(N){return N!=="annotation-xml"&&n1(N,Ae)},sr=function(N){Kt(se.beforeSanitizeAttributes,N,null);const{attributes:X}=N;if(!X||Pa(N))return;const J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let Fe=X.length;for(;Fe--;){const mt=X[Fe],{name:Je,namespaceURI:Lt,value:Pt}=mt,Fn=rt(Je),$t=Pt;let ot=Je==="value"?$t:t3($t);if(J.attrName=Fn,J.attrValue=ot,J.keepAttr=!0,J.forceKeepAttr=void 0,Kt(se.uponSanitizeAttribute,N,J),ot=J.attrValue,ua&&(Fn==="id"||Fn==="name")&&(qn(Je,N),ot=xu+ot),qt&&Ht(/((--!?|])>)|<\/(style|title)/i,ot)){qn(Je,N);continue}if(J.forceKeepAttr)continue;if(!J.keepAttr){qn(Je,N);continue}if(!Nr&&Ht(/\/>/i,ot)){qn(Je,N);continue}Qe&&Go([me,ce,Pe],lr=>{ot=Fs(ot,lr," ")});const Gi=rt(N.nodeName);if(!ir(Gi,Fn,ot)){qn(Je,N);continue}if(H&&typeof U=="object"&&typeof U.getAttributeType=="function"&&!Lt)switch(U.getAttributeType(Gi,Fn)){case"TrustedHTML":{ot=H.createHTML(ot);break}case"TrustedScriptURL":{ot=H.createScriptURL(ot);break}}if(ot!==$t)try{Lt?N.setAttributeNS(Lt,Je,ot):N.setAttribute(Je,ot),Pa(N)?At(N):t1(r.removed)}catch{qn(Je,N)}}Kt(se.afterSanitizeAttributes,N,null)},lt=function le(N){let X=null;const J=ol(N);for(Kt(se.beforeSanitizeShadowDOM,N,null);X=J.nextNode();)Kt(se.uponSanitizeShadowNode,X,null),ar(X),sr(X),X.content instanceof c&&le(X.content);Kt(se.afterSanitizeShadowDOM,N,null)};return r.sanitize=function(le){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,J=null,Fe=null,mt=null;if(Dr=!le,Dr&&(le="<!-->"),typeof le!="string"&&!Lr(le))if(typeof le.toString=="function"){if(le=le.toString(),typeof le!="string")throw Vs("dirty is not a string, aborting")}else throw Vs("toString is not a function");if(!r.isSupported)return le;if(Di||zi(N),r.removed=[],typeof le=="string"&&(ca=!1),ca){if(le.nodeName){const Pt=rt(le.nodeName);if(!k[Pt]||ue[Pt])throw Vs("root node is forbidden and cannot be sanitized in-place")}}else if(le instanceof h)X=ll("<!---->"),J=X.ownerDocument.importNode(le,!0),J.nodeType===Ys.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?X=J:X.appendChild(J);else{if(!Tt&&!Qe&&!On&&le.indexOf("<")===-1)return H&&oa?H.createHTML(le):le;if(X=ll(le),!X)return Tt?null:oa?A:""}X&&Li&&At(X.firstChild);const Je=ol(ca?le:X);for(;Fe=Je.nextNode();)ar(Fe),sr(Fe),Fe.content instanceof c&<(Fe.content);if(ca)return le;if(Tt){if(qa)for(mt=ae.call(X.ownerDocument);X.firstChild;)mt.appendChild(X.firstChild);else mt=X;return(Y.shadowroot||Y.shadowrootmode)&&(mt=Ee.call(s,mt,!0)),mt}let Lt=On?X.outerHTML:X.innerHTML;return On&&k["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&Ht(u_,X.ownerDocument.doctype.name)&&(Lt="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
|
|
111
|
-
`+Lt),Qe&&Go([me,ce,Pe],Pt=>{Lt=Fs(Lt,Pt," ")}),H&&oa?H.createHTML(Lt):Lt},r.setConfig=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};zi(le),Di=!0},r.clearConfig=function(){kn=null,Di=!1},r.isValidAttribute=function(le,N,X){kn||zi({});const J=rt(le),Fe=rt(N);return ir(J,Fe,X)},r.addHook=function(le,N){typeof N=="function"&&qs(se[le],N)},r.removeHook=function(le,N){if(N!==void 0){const X=WN(se[le],N);return X===-1?void 0:JN(se[le],X,1)[0]}return t1(se[le])},r.removeHooks=function(le){se[le]=[]},r.removeAllHooks=function(){se=o1()},r}var g3=c_();const y3=({onClose:t})=>{const r=Ze();return y.jsxs("div",{className:Et.highlightLoadingInfo,onClick:t,children:[y.jsx("div",{className:Et.highlightLoadingInfoCloseIcon,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.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"})})}),y.jsxs("div",{className:Et.highlightLoadingInfoInnerContainer,children:[y.jsxs("div",{className:Et.highlightLoadingInfoContent,children:[y.jsx("h3",{children:r("source-infos.highlight-loading.title")}),y.jsx("p",{children:r("source-infos.highlight-loading.description")})]}),y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#000000",viewBox:"0 0 256 256",children:y.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"})})]})]})},b3=({title:t,href:r,children:i})=>y.jsx("a",{href:r,title:t,target:"_blank",rel:"noopener noreferrer",children:i}),v3=({className:t,children:r,...i})=>y.jsx("a",{className:Q(el.button,el.buttonDefault,t),type:"button",role:"button",...i,children:r}),_3=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.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"})}),E3=({type:t,...r})=>{switch(t){case"WEBSITE":return y.jsx(Jv,{...r});case"PDF":return y.jsx(Wv,{...r});case"DOCX":return y.jsx(Kv,{...r});case"TEXT":return y.jsx(_3,{...r});default:return y.jsx($v,{...r})}},S3=({url:t,knowledgeBaseType:r})=>{const i=Ze();return y.jsx(v3,{className:Et.openSourceButton,href:t,target:"_blank",children:y.jsxs("div",{className:Et.sourceButtonLabel,children:[y.jsx("div",{className:Et.sourceHeaderIcon,children:y.jsx(E3,{type:r})}),y.jsx("p",{children:i("source-infos.open-source")})]})})},T3=({sourceInfos:{content:t,url:r,knowledgeBaseType:i,highlighted:s}})=>{const[u,c]=B.useState(!s);B.useEffect(()=>{s&&c(!1)},[s]);const d=g3.sanitize(t,{USE_PROFILES:{html:!0}});return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:Q(Et.sourceContent,t_.markdown),children:[y.jsx(xr,{options:{overrides:{a:b3}},children:d}),u&&y.jsx(y3,{onClose:()=>c(!1)})]}),y.jsx(S3,{url:r,knowledgeBaseType:i})]})},A3=""+new URL("undraw_fixing-bugs-D_eYxJc6.svg",import.meta.url).href,x3=()=>{const t=Ze();return y.jsxs("div",{className:Et.loadingError,children:[y.jsx("h1",{children:t("source-infos.error.title")}),y.jsx("img",{src:A3,title:t("source-infos.error.title")}),y.jsx("p",{children:t("source-infos.error.info")})]})},O3=()=>y.jsx("div",{className:Et.loadingSourceInfos,children:y.jsx("svg",{className:Et.loading,xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.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 R3({sourceInfos:t,onClose:r,threshold:i=100}){const s=B.useRef(null),[u,c]=B.useState(0),[d,h]=B.useState(!1),m=B.useRef(null),p=B.useRef(null),b=B.useCallback(R=>{m.current=R,h(!0)},[]),_=B.useCallback(R=>{if(m.current!==null&&d){const q=R-m.current;q>0&&c(q)}},[d]),x=B.useCallback(()=>{h(!1),u>i&&r(),c(0),m.current=null},[u,i,r]),U=B.useCallback(R=>{const q=A=>b(A.touches[0].clientY),z=A=>_(A.touches[0].clientY),E=()=>x(),w=A=>{A.preventDefault(),b(A.clientY),window.addEventListener("mousemove",S),window.addEventListener("mouseup",H)},S=A=>_(A.clientY),H=()=>{x(),window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",H)};R.addEventListener("touchstart",q),R.addEventListener("touchmove",z),R.addEventListener("touchend",E),R.addEventListener("mousedown",w),p.current=()=>{R.removeEventListener("touchstart",q),R.removeEventListener("touchmove",z),R.removeEventListener("touchend",E),R.removeEventListener("mousedown",w),window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",H)}},[b,_,x]);return B.useEffect(()=>{let R;return(()=>{s.current?(p.current?.(),U(s.current)):(R=new MutationObserver(()=>{s.current&&(p.current?.(),U(s.current),R?.disconnect())}),R.observe(document.body,{childList:!0,subtree:!0}))})(),()=>{R?.disconnect(),p.current?.()}},[U,t]),{ref:s,dragOffsetY:u,isDragging:d}}const w3=t=>{const[r,i]=B.useState(!0);return B.useEffect(()=>{let s=null;return t?.type==="loading"?(i(!0),s=setTimeout(()=>{i(!1)},300)):i(!t),()=>{s&&clearTimeout(s)}},[t]),r},C3=()=>{const t=Cr(),r=st(m=>m.chat.sourceInfos),i=i_(),s=B.useRef(null),u=w3(r);B.useEffect(()=>{s.current&&r?.type==="loading"&&(i?s.current.showModal():(s.current.setAttribute("open","true"),s.current?.focus()))},[r,i]);const c=B.useCallback(()=>{s.current&&(i?s.current.close():s.current.removeAttribute("open"),t(RO()))},[t,i]),{ref:d,dragOffsetY:h}=R3({onClose:c,sourceInfos:r});return r?y.jsx("dialog",{ref:s,className:Q(Et.sourceInfos,u?Et.waitForLoading:r.type==="loading"?Et.loadingContent:""),style:i&&h?{transform:`translateY(${h}px)`}:{},onClose:c,autoFocus:!0,role:"dialog","aria-labelledby":"source-info-title",children:u?null:y.jsxs(y.Fragment,{children:[y.jsx(XN,{ref:d,tabIndex:-1,sourceInfos:r.type==="loaded"?r:void 0,onClose:c}),r.type==="loading"?y.jsx(O3,{}):r.type==="loading-error"?y.jsx(x3,{}):y.jsxs(y.Fragment,{children:[y.jsx(ZN,{loading:!r.highlighted}),y.jsx(T3,{sourceInfos:r})]})]})}):null},N3="_container_1aof3_1",M3="_body_1aof3_7",D3="_intro_1aof3_14",L3="_footer_1aof3_39",B3="_footnote_1aof3_43",U3="_containerWithFootnote_1aof3_58",j3="_startChatButton_1aof3_73",H3="_spinner_1aof3_88",I3="_formFields_1aof3_92",z3="_formField_1aof3_92",G3="_radio_1aof3_104",k3="_checkbox_1aof3_111",q3="_input_1aof3_119",F3="_inputLabel_1aof3_153",V3="_selectWrapper_1aof3_157",P3="_select_1aof3_157",Y3="_selectLabel_1aof3_203",_t={container:N3,body:M3,intro:D3,footer:L3,footnote:B3,containerWithFootnote:U3,startChatButton:j3,spinner:H3,formFields:I3,formField:z3,radio:G3,checkbox:k3,input:q3,inputLabel:F3,selectWrapper:V3,select:P3,selectLabel:Y3},X3=({name:t,label:r,defaultValue:i,required:s,onChange:u})=>{const c=d=>{u(d.currentTarget.checked?"true":"false")};return y.jsxs("label",{className:Q(_t.checkbox,"chat__startScreen__checkbox"),htmlFor:t,children:[y.jsx("input",{type:"checkbox",id:t,name:t,defaultChecked:i==="true",required:s,onChange:c}),y.jsx("div",{children:r})]})},Z3=({type:t,name:r,label:i,defaultValue:s,placeholder:u,required:c,multiple:d,min:h,max:m,pattern:p,onChange:b})=>{const _=x=>{b(x.target.value)};return y.jsxs("label",{className:Q(_t.input,"chat__startScreen__input"),htmlFor:r,children:[y.jsx("div",{className:Q(_t.inputLabel),children:i}),y.jsx("input",{type:t,id:r,name:r,defaultValue:s,placeholder:u,required:c,multiple:d,min:h,max:m,pattern:p,onChange:_})]})},Q3=({name:t,value:r,label:i,defaultChecked:s,required:u,onChange:c})=>{const d=`${t}-${r}`,h=m=>{c(m.target.value)};return y.jsxs("label",{className:Q(_t.radio,"chat__startScreen__radio"),htmlFor:d,children:[y.jsx("input",{id:d,type:"radio",name:t,value:r,defaultChecked:s,required:u,onChange:h}),y.jsx("span",{className:Q(_t.label),children:i})]})},K3=({name:t,label:r,defaultValue:i,required:s,multiple:u,options:c,onChange:d})=>{const h=m=>{d(m.target.value)};return y.jsxs("label",{className:Q(_t.select,"chat__startScreen__select"),htmlFor:t,children:[y.jsx("div",{className:Q(_t.selectLabel),children:r}),y.jsx("div",{className:Q(_t.selectWrapper),children:y.jsx("select",{id:t,name:t,defaultValue:i,required:s,multiple:u,onChange:h,children:Object.entries(c||{}).map(([m,p])=>y.jsx("option",{value:m,selected:p===i,children:p}))})})]})},$3="start-screen.intro",W3="start-screen.start-chat",J3="start-screen.waiting-for-login",e8="start-screen.footnote",jn="start-screen.form",u1=`${jn}.fields`,t8=()=>{const t=Ze(),r=Cr(),i=$h(),s=st(R=>R.startScreen.loginRequestToken),u=st(R=>R.settings.requiresUserAuthentication);B.useEffect(()=>{let R;if(s){const E=window.screenX+(window.outerWidth-600)/2,w=window.screenY+(window.outerHeight-700)/2,S=window.open(`/${i}/auth/login?loginRequestToken=${s}`,"Login",`width=600,height=700,left=${E},top=${w},resizable=yes,scrollbars=yes`);R=setInterval(()=>{S?.closed&&(r(TO()),clearInterval(R))},500)}return()=>{R&&clearInterval(R)}},[i,s,r]);const[c,d]=B.useState({}),h=()=>{const R=Object.entries(c).reduce((q,[z,E])=>({...q,[z]:E.value}),{});r(u?SO({loginRequestToken:Jo(),formValues:R}):vO({formValues:R}))},m=t($3),p=t(s?J3:W3),b=t(e8),_=B.useMemo(()=>t(u1)?.split(";").map(R=>R.trim())??[],[t(u1)]);B.useEffect(()=>{_.length&&Object.keys(c).length===0&&d(_.reduce((R,q)=>({...R,[q]:n8(q,t)}),{}))},[t,_,c]);const x=R=>{R.preventDefault(),h()},U=R=>q=>{d(z=>({...z,[R]:{...z[R],value:q}}))};return y.jsxs("form",{onSubmit:x,className:Q(_t.container,b&&_t.containerWithFootnote,"chat__startScreen"),children:[y.jsxs("div",{className:Q(_t.body,"chat__startScreen__body"),children:[m&&y.jsx("div",{className:Q(_t.intro,"chat__startScreen__intro"),children:y.jsx(xr,{options:{overrides:{a:c1}},children:m})}),y.jsx("div",{className:Q(_t.formFields,"chat__startScreen__fields"),children:Object.values(c).map(({type:R,name:q,label:z,placeholder:E,defaultValue:w,options:S,required:H,multiple:A,min:Z,max:W,pattern:ae})=>y.jsx("div",{className:Q(_t.formField,"chat__startScreen__field"),children:(()=>{switch(R){case"radio":return y.jsxs(y.Fragment,{children:[y.jsx("div",{children:z}),Object.entries(S||{}).map(([ye,Ee])=>y.jsx(Q3,{name:q,value:ye,label:Ee,defaultChecked:ye===w,required:H,onChange:U(q)},ye))]});case"checkbox":return y.jsx(X3,{name:q,label:z,defaultValue:w,required:H,onChange:U(q)});case"select":return y.jsx(K3,{name:q,label:z,defaultValue:w,required:H,multiple:A,options:S,onChange:U(q)});default:return y.jsx(Z3,{type:R,name:q,label:z,placeholder:E,defaultValue:w,required:H,multiple:A,min:Z,max:W,pattern:ae,onChange:U(q)})}})()},q))})]}),y.jsxs("div",{className:Q(_t.footer,"chat__startScreen__footer"),children:[y.jsxs(lu,{type:"submit",className:_t.startChatButton,disabled:!!s,children:[!!s&&y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",className:_t.spinner,children:y.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"})}),y.jsx("div",{children:p})]}),b&&y.jsx("div",{className:_t.footnote,children:y.jsx(xr,{options:{overrides:{a:c1}},children:b})})]})]})},c1=({title:t,href:r,children:i})=>y.jsx("a",{href:r,title:t,target:"_blank",rel:"noopener noreferrer",children:i}),n8=(t,r)=>{const i=r(`${jn}.${t}.type`)||"text",s=r(`${jn}.${t}.required`)==="true",u=r(`${jn}.${t}.multiple`)==="true",c=r(`${jn}.${t}.placeholder`),d=r(`${jn}.${t}.label`)||"",h=r(`${jn}.${t}.defaultValue`),m=r(`${jn}.${t}.min`),p=r(`${jn}.${t}.max`),b=r(`${jn}.${t}.pattern`),_=a8(r(`${jn}.${t}.options`));return{name:t,label:d,placeholder:c,value:r8(i,h,_)||"",defaultValue:h,options:_,type:i,required:s,multiple:u,min:m,max:p,pattern:b}},r8=(t,r,i)=>r||t==="select"&&Object.keys(i)[0]||"",a8=(t="")=>t.split(";").map(r=>r.trim()).reduce((r,i)=>{const[s,u]=i.split(":").map(c=>c.trim());return{...r,[s]:u}},{}),i8=()=>{const t=du();B.useEffect(()=>{window.document.documentElement.lang=t.locale},[t.locale])},Oi={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"},s8=({clientName:t})=>{i8();const r=Cr(),i=st(b=>b.intl.messages),s=Ze(),u=st(b=>b.settings.enableStartScreen),c=st(b=>b.startScreen.startScreenStatus),[d,h]=B.useState(void 0);B.useEffect(()=>{const b=hu.parse(window.location.search);b.cssClassName&&h(b.cssClassName);const _=x=>{switch(x.data.type){case Oi.TRIGGER_ACTION:r(x.data.action);break;case Oi.TRIGGER_STORY:r(pv(x.data.story));break;case Oi.ON_CHAT_WINDOW_OPEN:r({type:"webclient.chatwindow.opened"});break;case Oi.ON_CHAT_WINDOW_CLOSE:r({type:"webclient.chatwindow.closed"});break;case Oi.CHAT_MESSAGE_FROM_GUEST:r(cv(x.data.text));break;case Oi.RESTART_CHAT:r(al());break}};return r(CO(t,b)),window.addEventListener("message",x=>_(x),!1),()=>window.removeEventListener("message",_)},[t,r]),B.useEffect(()=>{const b=s("page.title");b&&document&&(document.title=b)},[i,s]);const m=u===void 0,p=u===!1||c==="HIDDEN";return y.jsx("div",{className:Q(Jb.chatwindow,p&&Jb.chatwindowWithAside,"chat__chatwindow",d),children:m?null:p?y.jsxs(y.Fragment,{children:[y.jsx("header",{children:y.jsx(Wb,{chatStarted:!0})}),y.jsx("main",{children:y.jsx(fN,{clientName:t})}),y.jsx("aside",{children:y.jsx(C3,{})})]}):y.jsxs(y.Fragment,{children:[y.jsx("header",{children:y.jsx(Wb,{chatStarted:!1})}),y.jsx("main",{children:y.jsx(t8,{})})]})})},l8=()=>{const t=$h(),r=i_(),i=st(u=>u.intl.locale),s=st(u=>u.intl.messages);return y.jsx(MA,{locale:i,messages:s,onError:()=>{},children:y.jsx("div",{className:Q([LA.app,r?"chat__small":"chat__large"]),children:y.jsx(s8,{clientName:t})})})};var Id,f1;function o8(){if(f1)return Id;f1=1;var t=Zv(),r=Qh(),i="Expected a function";function s(u,c,d){var h=!0,m=!0;if(typeof u!="function")throw new TypeError(i);return r(d)&&(h="leading"in d?!!d.leading:h,m="trailing"in d?!!d.trailing:m),t(u,c,{leading:h,maxWait:c,trailing:m})}return Id=s,Id}var u8=o8();const c8=uu(u8);function f8(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function d8(t){return t}function h8(t,r){r=r||{};const i=r.delimiter||".",s=r.maxDepth,u=r.transformKey||d8,c={};function d(h,m,p){p=p||1,Object.keys(h).forEach(function(b){const _=h[b],x=r.safe&&Array.isArray(_),U=Object.prototype.toString.call(_),R=f8(_),q=U==="[object Object]"||U==="[object Array]",z=m?m+i+u(b):u(b);if(!x&&!R&&q&&Object.keys(_).length&&(!r.maxDepth||p<s))return d(_,z,p+1);c[z]=_})}return d(t),c}const f_={"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","guest-bubble.label":"Ihre Nachricht","bot-bubble.label":"Nachricht des Chatbots","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","agent-bubble.label":"Nachricht des Live-Agenten","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:
|
|
108
|
+
`,!c.some(Z=>Z.test(A))&&(S+=A,!!A.trim())));const H=$s(S);return H===""?null:[S,,H]}),i:3,u:hd,l:(E,w,S)=>h("p",{key:S.key},w(E.children,S))},22:{t:["["],o:ra(pR),i:0,u:E=>(_[E[1]]={target:E[2],title:E[4]},{}),l:pd},23:{t:["!["],o:aa(gR),i:0,u:E=>({alt:E[1]?Qn(E[1]):void 0,ref:E[2]}),l:(E,w,S)=>_[E.ref]?h("img",{key:S.key,alt:E.alt,src:s(_[E.ref].target,"img","src"),title:_[E.ref].title}):null},24:{t:E=>E[0]==="["&&E.indexOf("](")===-1,o:ra(yR),i:0,u:(E,w,S)=>({children:w(E[1],S),fallbackChildren:E[0],ref:E[2]}),l:(E,w,S)=>_[E.ref]?h("a",{key:S.key,href:s(_[E.ref].target,"a","href"),title:_[E.ref].title},w(E.children,S)):h("span",{key:S.key},E.fallbackChildren)},25:{t:["|"],o:Sr(Ab),i:1,u:FR,l(E,w,S){const H=E;return h("table",{key:S.key},h("thead",null,h("tr",null,H.header.map(function(A,Z){return h("th",{key:Z,style:Rb(H,Z)},w(A,S))}))),h("tbody",null,H.cells.map(function(A,Z){return h("tr",{key:Z},A.map(function(W,ae){return h("td",{key:ae,style:Rb(H,ae)},w(W,S))}))})))}},27:{o:Ci(function(E,w){let S;return Po(E,":")&&(S=wR.exec(E)),S||MR.exec(E)}),i:4,u(E){const w=E[0];return{text:w.indexOf("&")===-1?w:w.replace(lR,(S,H)=>r.namedCodesToUnicode[H]||S)}},l:E=>E.text},28:{t:["**","__"],o:aa(AR),i:2,u:(E,w,S)=>({children:w(E[2],S)}),l:(E,w,S)=>h("strong",{key:S.key},w(E.children,S))},29:{t:E=>{const w=E[0];return(w==="*"||w==="_")&&E[1]!==w},o:aa(xR),i:3,u:(E,w,S)=>({children:w(E[2],S)}),l:(E,w,S)=>h("em",{key:S.key},w(E.children,S))},30:{t:["\\"],o:aa(CR),i:1,u:E=>({text:E[1],type:"27"})},31:{t:["=="],o:aa(OR),i:3,u:hd,l:(E,w,S)=>h("mark",{key:S.key},w(E.children,S))},32:{t:["~~"],o:aa(RR),i:3,u:hd,l:(E,w,S)=>h("del",{key:S.key},w(E.children,S))}};r.disableParsingRawHTML===!0&&(delete x[11],delete x[13]);const U=(function(E){var w=Object.keys(E);function S(H,A){var Z=[];if(A.prevCapture=A.prevCapture||"",H.trim())for(;H;)for(var W=0;W<w.length;){var ae=w[W],ye=E[ae];if(!ye.t||kR(H,A,ye.t)){var Ee=ye.o(H,A);if(Ee&&Ee[0]){H=H.substring(Ee[0].length);var se=ye.u(Ee,S,A);A.prevCapture+=Ee[0],se.type||(se.type=ae),Z.push(se);break}W++}else W++}return A.prevCapture="",Z}return w.sort(function(H,A){return E[H].i-E[A].i||(H<A?-1:1)}),function(H,A){return S((function(Z){return Z.replace(tR,`
|
|
109
|
+
`).replace(aR,"").replace(vR," ")})(H),A)}})(x),R=(q=(function(E,w){return function(S,H,A){const Z=E[S.type].l;return w?w(()=>Z(S,H,A),S,H,A):Z(S,H,A)}})(x,r.renderRule),function E(w,S={}){if(Array.isArray(w)){const H=S.key,A=[];let Z=!1;for(let W=0;W<w.length;W++){S.key=W;const ae=E(w[W],S),ye=typeof ae=="string";ye&&Z?A[A.length-1]+=ae:ae!==null&&A.push(ae),Z=ye}return S.key=H,A}return q(w,E,S)});var q;const z=m(t);return b.length?h("div",null,z,h("footer",{key:"footer"},b.map(function(E){return h("div",{id:i(E.identifier,Is),key:E.identifier},E.identifier,R(U(E.footnote,{inline:!0})))}))):z}const xr=t=>{let{children:r="",options:i}=t,s=(function(u,c){if(u==null)return{};var d,h,m={},p=Object.keys(u);for(h=0;h<p.length;h++)c.indexOf(d=p[h])>=0||(m[d]=u[d]);return m})(t,qO);return B.cloneElement(QR(r,i),s)},KR="_generalConditionsContainer_55hjg_1",$R="_generalConditions_55hjg_1",WR="_generalConditionsHeader_55hjg_15",JR="_generalConditionsBody_55hjg_26",ew="_generalConditionsAccept_55hjg_35",zs={generalConditionsContainer:KR,generalConditions:$R,generalConditionsHeader:WR,generalConditionsBody:JR,generalConditionsAccept:ew},tw=()=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:y.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"})}),nw=()=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:y.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"})}),rw="general-conditions.header",aw="general-conditions.body",wb="general-conditions.accept-conditions-note",iw=()=>{const t=Ze(),[r,i]=B.useState(!1),s=()=>i(!r),u=h=>{h.key==="ArrowDown"||h.key==="ArrowRight"?i(!0):h.key==="ArrowUp"||h.key==="ArrowLeft"||h.key==="Escape"?i(!1):(h.key==="Enter"||h.key==="Space"||h.key===" ")&&s()},c=t(rw),d=t(wb);return y.jsxs("div",{className:Q(zs.generalConditionsContainer,"chat__generalConditions"),children:[!!c?.length&&y.jsxs("div",{className:zs.generalConditions,children:[y.jsxs("div",{role:"button",onClick:s,onKeyDown:u,tabIndex:0,className:Q(zs.generalConditionsHeader,"chat__generalConditions__header"),"aria-controls":"general-conditions-body","aria-expanded":r?"true":"false","aria-pressed":r?"true":"false",children:[y.jsx(xr,{children:c}),r?y.jsx(nw,{}):y.jsx(tw,{})]}),y.jsx("div",{className:Q(zs.generalConditionsBody,"chat__generalConditions__body"),id:"general-conditions-body",role:"region",tabIndex:-1,children:r&&y.jsx(xr,{children:t(aw)||""})})]}),!!d?.length&&y.jsx("div",{className:Q(zs.generalConditionsAccept,"chat__generalConditions__accept"),tabIndex:0,children:y.jsx(xr,{children:t(wb)||""})})]})},sw="_messageContainer_1rxi5_1",lw="_message_1rxi5_1",ow="_messageBot_1rxi5_14",uw="_messageBotLast_1rxi5_45",cw="_avatar_1rxi5_45",fw="_messageBotFirst_1rxi5_54",dw="_messageBotAnimated_1rxi5_67",hw="_messageGuest_1rxi5_78",mw="_messageGuestFirst_1rxi5_84",pw="_messageGuestLast_1rxi5_90",gw="_botAvatar_1rxi5_104",yw="_agentAvatar_1rxi5_108",bw="_bubble_1rxi5_112",vw="_bubbleContent_1rxi5_118",_w="_bubbleLeft_1rxi5_132",Ew="_leftText_1rxi5_143",Sw="_bubbleRight_1rxi5_150",Tw="_rightText_1rxi5_160",Aw="_sourceInfoReference_1rxi5_192",xw="_sourceInfoReferenceActive_1rxi5_204",ge={messageContainer:sw,message:lw,messageBot:ow,messageBotLast:uw,avatar:cw,messageBotFirst:fw,messageBotAnimated:dw,messageGuest:hw,messageGuestFirst:mw,messageGuestLast:pw,botAvatar:gw,agentAvatar:yw,bubble:bw,bubbleContent:vw,bubbleLeft:_w,leftText:Ew,bubbleRight:Sw,rightText:Tw,sourceInfoReference:Aw,sourceInfoReferenceActive:xw},Zh=(t,r)=>{B.useEffect(()=>{const i=s=>{t.current&&!t.current.contains(s.target)&&r()};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[t,r])};var yd,Cb;function Qh(){if(Cb)return yd;Cb=1;function t(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}return yd=t,yd}var bd,Nb;function Ow(){if(Nb)return bd;Nb=1;var t=typeof bo=="object"&&bo&&bo.Object===Object&&bo;return bd=t,bd}var vd,Mb;function Yv(){if(Mb)return vd;Mb=1;var t=Ow(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=t||r||Function("return this")();return vd=i,vd}var _d,Db;function Rw(){if(Db)return _d;Db=1;var t=Yv(),r=function(){return t.Date.now()};return _d=r,_d}var Ed,Lb;function ww(){if(Lb)return Ed;Lb=1;var t=/\s/;function r(i){for(var s=i.length;s--&&t.test(i.charAt(s)););return s}return Ed=r,Ed}var Sd,Bb;function Cw(){if(Bb)return Sd;Bb=1;var t=ww(),r=/^\s+/;function i(s){return s&&s.slice(0,t(s)+1).replace(r,"")}return Sd=i,Sd}var Td,Ub;function Xv(){if(Ub)return Td;Ub=1;var t=Yv(),r=t.Symbol;return Td=r,Td}var Ad,jb;function Nw(){if(jb)return Ad;jb=1;var t=Xv(),r=Object.prototype,i=r.hasOwnProperty,s=r.toString,u=t?t.toStringTag:void 0;function c(d){var h=i.call(d,u),m=d[u];try{d[u]=void 0;var p=!0}catch{}var b=s.call(d);return p&&(h?d[u]=m:delete d[u]),b}return Ad=c,Ad}var xd,Hb;function Mw(){if(Hb)return xd;Hb=1;var t=Object.prototype,r=t.toString;function i(s){return r.call(s)}return xd=i,xd}var Od,Ib;function Dw(){if(Ib)return Od;Ib=1;var t=Xv(),r=Nw(),i=Mw(),s="[object Null]",u="[object Undefined]",c=t?t.toStringTag:void 0;function d(h){return h==null?h===void 0?u:s:c&&c in Object(h)?r(h):i(h)}return Od=d,Od}var Rd,zb;function Lw(){if(zb)return Rd;zb=1;function t(r){return r!=null&&typeof r=="object"}return Rd=t,Rd}var wd,Gb;function Bw(){if(Gb)return wd;Gb=1;var t=Dw(),r=Lw(),i="[object Symbol]";function s(u){return typeof u=="symbol"||r(u)&&t(u)==i}return wd=s,wd}var Cd,kb;function Uw(){if(kb)return Cd;kb=1;var t=Cw(),r=Qh(),i=Bw(),s=NaN,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,d=/^0o[0-7]+$/i,h=parseInt;function m(p){if(typeof p=="number")return p;if(i(p))return s;if(r(p)){var b=typeof p.valueOf=="function"?p.valueOf():p;p=r(b)?b+"":b}if(typeof p!="string")return p===0?p:+p;p=t(p);var _=c.test(p);return _||d.test(p)?h(p.slice(2),_?2:8):u.test(p)?s:+p}return Cd=m,Cd}var Nd,qb;function Zv(){if(qb)return Nd;qb=1;var t=Qh(),r=Rw(),i=Uw(),s="Expected a function",u=Math.max,c=Math.min;function d(h,m,p){var b,_,x,U,R,q,z=0,E=!1,w=!1,S=!0;if(typeof h!="function")throw new TypeError(s);m=i(m)||0,t(p)&&(E=!!p.leading,w="maxWait"in p,x=w?u(i(p.maxWait)||0,m):x,S="trailing"in p?!!p.trailing:S);function H(ce){var Pe=b,ve=_;return b=_=void 0,z=ce,U=h.apply(ve,Pe),U}function A(ce){return z=ce,R=setTimeout(ae,m),E?H(ce):U}function Z(ce){var Pe=ce-q,ve=ce-z,G=m-Pe;return w?c(G,x-ve):G}function W(ce){var Pe=ce-q,ve=ce-z;return q===void 0||Pe>=m||Pe<0||w&&ve>=x}function ae(){var ce=r();if(W(ce))return ye(ce);R=setTimeout(ae,Z(ce))}function ye(ce){return R=void 0,S&&b?H(ce):(b=_=void 0,U)}function Ee(){R!==void 0&&clearTimeout(R),z=0,b=q=_=R=void 0}function se(){return R===void 0?U:ye(r())}function me(){var ce=r(),Pe=W(ce);if(b=arguments,_=this,q=ce,Pe){if(R===void 0)return A(q);if(w)return clearTimeout(R),R=setTimeout(ae,m),H(q)}return R===void 0&&(R=setTimeout(ae,m)),U}return me.cancel=Ee,me.flush=se,me}return Nd=d,Nd}var jw=Zv();const Hw=uu(jw),Iw="_container_131ib_1",zw="_categoryContainer_131ib_13",Gw="_categoryButton_131ib_20",kw="_active_131ib_35",qw="_commentTextarea_131ib_44",Gs={container:Iw,categoryContainer:zw,categoryButton:Gw,active:kw,commentTextarea:qw},Fw=(t,r,i)=>{B.useEffect(()=>{if(t){const s=()=>{const c=["button:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])',"a[href]","input:not([disabled])","select:not([disabled])"].join(","),d=r.current?Array.from(r.current.querySelectorAll(c)):[],h=i.current?Array.from(i.current.querySelectorAll(c)):[];return[...d,...h]},u=c=>{if(c.key==="Tab"){const d=s();if(d.length>0){const h=d[0],m=d[d.length-1],p=document.activeElement;!c.shiftKey&&p===m?(c.preventDefault(),h.focus()):c.shiftKey&&p===h&&(c.preventDefault(),m.focus())}}};return document.addEventListener("keydown",u,!0),()=>{document.removeEventListener("keydown",u,!0)}}},[t,r,i])},Vw=({open:t,actionsRef:r,reaction:i,onReaction:s})=>{const u=Ze(),c=B.useRef(null),d=Hw(p=>{s({...i,comment:p})},300);B.useEffect(()=>()=>d.flush(),[d]),Fw(t,r,c);const h=p=>{s({...i,category:i.category===p?void 0:p})},m=p=>d(p.target.value);return t?y.jsxs("div",{ref:c,className:Gs.container,role:"dialog","aria-modal":"true","aria-labelledby":"bad-reaction-title",children:[y.jsx("h2",{id:"bad-reaction-title",children:u("bot-bubble.reaction.say-more")}),y.jsx("div",{className:Gs.categoryContainer,role:"radiogroup",children:["WRONG_INFORMATION","MISSING_INFORMATION","OLD_INFORMATION","UNCLEAR","OFF_TOPIC"].map(p=>y.jsx("button",{className:Q(Gs.categoryButton,i?.category===p&&Gs.active),onClick:()=>h(p),"aria-pressed":i?.category===p,"aria-label":u(`bot-bubble.reaction.category.${p}`),tabIndex:0,role:"radio",children:u(`bot-bubble.reaction.category.${p}`)},p))}),y.jsx("textarea",{id:"comment",name:"comment",placeholder:u("bot-bubble.reaction.comment"),defaultValue:i?.comment,onChange:m,className:Gs.commentTextarea,rows:3,"aria-label":u("bot-bubble.reaction.comment")})]}):null},Pw="_botMessageActionContainer_18fjb_1",Yw="_alwaysVisible_18fjb_15",Xw="_active_18fjb_19",Zw="_botMessageActionInnerContainer_18fjb_27",Qw="_header_18fjb_52",Kw="_botMessageActions_18fjb_57",$w="_reported_18fjb_68",Ww="_action_18fjb_72",Jw="_wave_18fjb_86",e6="_anyReport_18fjb_156",t6="_closeButton_18fjb_172",nt={botMessageActionContainer:Pw,alwaysVisible:Yw,active:Xw,botMessageActionInnerContainer:Zw,header:Qw,botMessageActions:Kw,reported:$w,action:Ww,wave:Jw,anyReport:e6,closeButton:t6},n6=({isSubmitting:t,onClick:r})=>{const i=Ze();return y.jsx("button",{className:Q(nt.action,nt.closeButton,"tooltip--bottom-left"),"aria-label":i("bot-bubble.reaction.close"),"data-title":i("bot-bubble.reaction.close"),tabIndex:0,onClick:r,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:t?y.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"}):y.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"})})})},r6=({alwaysVisible:t,senderType:r,reaction:i,botMessageRef:s,message:u,onReaction:c})=>{const d=Ze(),[h,m]=B.useState(!1),[p,b]=B.useState(!1),[_,x]=B.useState(!1),U=B.useRef(null),R=B.useRef(null);Zh(U,()=>{x(!1)});const q=A=>{A.key==="Escape"&&x(!1)};B.useEffect(()=>(document.addEventListener("keydown",q),()=>{document.removeEventListener("keydown",q)}),[]),B.useEffect(()=>{_&&U.current?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},[_]);const z=A=>{R.current&&clearTimeout(R.current),b(!0),c(A),R.current=setTimeout(()=>{b(!1)},1e3)},E=B.useCallback(async()=>{if(s.current)try{m(!0);const A=s.current.innerHTML,Z=s.current.innerText;await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([A],{type:"text/html"}),"text/plain":new Blob([Z],{type:"text/plain"})})]),await new Promise(W=>setTimeout(W,1500))}finally{m(!1)}},[s]),w=()=>{x(!1),c(i?.type==="GOOD"?null:{type:"GOOD"})},S=()=>{c({...u.reaction,type:"BAD"}),x(!_)},H=A=>Z=>{(Z.key==="Enter"||Z.key===" ")&&A()};return y.jsx("div",{ref:U,className:Q(nt.botMessageActionContainer,t&&nt.alwaysVisible,_&&nt.active),children:y.jsxs("div",{className:Q(nt.botMessageActionInnerContainer,t&&nt.alwaysVisible,_&&nt.active,i&&nt.reported),role:"group",children:[y.jsxs("div",{className:nt.header,children:[y.jsxs("div",{className:Q(nt.botMessageActions,i&&nt.reported),children:[r===su.BOT&&y.jsx("button",{className:Q(nt.action,nt.wave,i?.type&&nt.anyReport,i?.type==="GOOD"&&nt.reported,"tooltip--top-right"),tabIndex:0,"aria-label":d(i?.type==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),"aria-pressed":i?.type==="GOOD","data-title":d(i?.type==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),onPointerDown:w,onKeyDown:H(w),children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:i?.type==="GOOD"?y.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"}):y.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"})})}),r===su.BOT&&y.jsx("button",{className:Q(nt.action,nt.wave,i?.type&&nt.anyReport,i?.type==="BAD"&&nt.reported,"tooltip--top-right"),tabIndex:0,"aria-label":d("bot-bubble.reaction.bad"),"aria-pressed":i?.type==="BAD","data-title":d("bot-bubble.reaction.bad"),onPointerDown:S,onKeyDown:H(S),children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:i?.type==="BAD"?y.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"}):y.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"})})}),y.jsx("button",{className:Q(nt.action,nt.wave,"tooltip--top-right"),style:{visibility:_?"hidden":"visible"},tabIndex:0,"aria-label":d("bot-bubble.copy"),"data-title":d("bot-bubble.copy"),onClick:E,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:h?y.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"}):y.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"})})})]}),_&&y.jsx(n6,{isSubmitting:p,onClick:()=>x(!1)})]}),u.reaction&&y.jsx(Vw,{open:_,actionsRef:U,reaction:u.reaction,onReaction:z})]})})},Qv=B.forwardRef(({message:t,isAnimated:r,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,children:c,onReaction:d},h)=>{const m=Ze(),p=B.useRef(null),b=t.sender.type===Te.UserType.BOT;return y.jsxs("li",{ref:h,className:Q(ge.message,ge.messageBot,i&&ge.lastMessage,s&&ge.messageBotFirst,u&&ge.messageBotLast,"chat__bubbleContainer",r&&ge.messageBotAnimated,r&&"chat__bubbleContainer--animated",b?"chat__botBubbleContainer":"chat__agentBubbleContainer",s&&"chat__bubbleContainer--first",u&&"chat__bubbleContainer--last"),children:[y.jsx("img",{className:Q(ge.avatar,b?ge.botAvatar:ge.agentAvatar,"chat__avatar",b?"chat__botAvatar":"chat__agentAvatar"),src:`${t.sender.avatar}`,alt:b?"Bot":"Agent",referrerPolicy:"no-referrer"}),y.jsxs("div",{className:ge.messageContainer,children:[y.jsx("div",{ref:p,className:Q(ge.bubble,ge.bubbleLeft,"chat__bubble",b?"chat__botBubble":"chat__agentBubble"),tabIndex:0,"aria-label":m(b?"bot-bubble.label":"agent-bubble.label"),children:y.jsx("div",{className:Q(ge.leftText),children:c})}),d&&y.jsx(r6,{alwaysVisible:i&&u,senderType:t.sender.type,reaction:t.reaction,message:t,botMessageRef:p,onReaction:d})]})]})}),a6="_sourceList_1n31h_1",i6="_source_1n31h_1",s6="_label_1n31h_37",Md={sourceList:a6,source:i6,label:s6},Kv=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.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"})}),$v=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.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"})}),Wv=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.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"})}),Jv=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.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"})}),l6=({type:t,...r})=>{switch(t){case"WEBSITE":return y.jsx(Jv,{...r});case"PDF":return y.jsx(Wv,{...r});case"DOCX":return y.jsx(Kv,{...r});default:return y.jsx($v,{...r})}},Kh=({sources:t,onLinkClick:r})=>{const i=Ze(),s=c=>()=>{r(c.url)},u=c=>d=>{(d.key==="Enter"||d.key===" ")&&r(c.url)};return t.length?y.jsx("ul",{className:Md.sourceList,"aria-label":i("bot-bubble.sources"),children:t.map(c=>y.jsx("li",{className:Md.source,children:y.jsxs("a",{role:"button",tabIndex:0,"aria-label":`${i("bot-bubble.source.open")}: ${c.label}`,onClick:s(c),onKeyDown:u(c),children:[y.jsx(l6,{type:c.type,"aria-hidden":"true"}),y.jsx("div",{className:Md.label,children:c.label})]})},c.url))}):null},o6="_button_3ui4g_1",u6="_buttonDefault_3ui4g_13",c6="_buttonPrimary_3ui4g_28",el={button:o6,buttonDefault:u6,buttonPrimary:c6},Su=({className:t,children:r,...i})=>y.jsx("button",{className:Q(el.button,t),type:"button",role:"button",...i,children:r}),f6="_title_137pi_1",d6="_buttons_137pi_6",h6="_button_137pi_6",m6="_imageContainer_137pi_29",p6="_image_137pi_29",g6="_video_container_137pi_44",y6="_video_137pi_44",b6="_only_137pi_58",on={title:f6,buttons:d6,button:h6,imageContainer:m6,image:p6,video_container:g6,video:y6,only:b6},v6=({buttons:t,onButtonClick:r})=>y.jsx("div",{className:Q(on.buttons,"chat__bubbleButtons"),children:t.map((i,s)=>y.jsx(Su,{className:Q(on.button,"chat__bubbleButton"),onClick:()=>r(i),children:i.title},s))}),Fb="newtab#",e_=({markdown:t,markdownOptions:r={},onLinkClick:i})=>{const s=c=>d=>(d.preventDefault(),c&&i(c),!1),u=({title:c,href:d,children:h})=>d.indexOf(Fb)===0?y.jsx("a",{href:d.slice(Fb.length),title:c,target:"_blank",rel:"noopener noreferrer",children:h}):y.jsx("a",{onClick:s(d),title:c,href:d,children:h});return y.jsx(xr,{options:{...r,overrides:{a:u}},children:t})},_6=({text:t,onLinkClick:r})=>t?y.jsx("div",{children:y.jsx(e_,{markdown:t,onLinkClick:r})}):null,E6=({title:t})=>t?y.jsx("h1",{className:on.title,children:t}):null,S6=({title:t,text:r,buttons:i,onButtonClick:s,onLinkClick:u})=>t?.length||r?.length||i?.length?y.jsxs("div",{className:Q(ge.bubbleContent),children:[y.jsx(E6,{title:t}),y.jsx(_6,{text:r,onLinkClick:u}),y.jsx(v6,{buttons:i,onButtonClick:s})]}):null,T6=({alt:t,imageUrl:r,itemUrl:i,hasBody:s})=>r?i?i.indexOf("youtube.com")>-1?y.jsx("div",{className:on.video_container,children:y.jsx("iframe",{className:Q(on.video,{[on.only]:!s}),title:"Youtube",width:"100%",src:i+"?rel=0",frameBorder:"0",allowFullScreen:!0})}):y.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:y.jsx("div",{className:on.imageContainer,children:y.jsx("img",{className:Q(on.image,{[on.only]:!s}),src:r,alt:t})})}):y.jsx("div",{className:on.imageContainer,children:y.jsx("img",{className:Q(on.image,{[on.only]:!s}),src:r,alt:t})}):null,A6=({title:t,text:r,imageUrl:i,itemUrl:s,buttons:u,sources:c,onButtonClick:d,onLinkClick:h})=>{const m=!!t?.length||!!r?.length||!!u?.length;return y.jsxs("div",{className:Q(on.detailMessage),children:[y.jsx(T6,{hasBody:m,imageUrl:i,itemUrl:s,alt:t||""}),m&&y.jsx(S6,{title:t,text:r,buttons:u,onLinkClick:h,onButtonClick:d}),y.jsx(Kh,{sources:c,onLinkClick:h})]})},x6=B.forwardRef(({isFirstMessageBySender:t,isLastMessageBySender:r,children:i},s)=>{const u=Ze();return y.jsx("li",{ref:s,className:Q(ge.message,ge.messageGuest,t&&ge.messageGuestFirst,r&&ge.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer",t&&"chat__bubbleContainer--first",r&&"chat__bubbleContainer--last"),children:y.jsx("div",{className:Q(ge.bubble,ge.bubbleRight,"chat__bubble","chat__guestBubble"),tabIndex:0,"aria-label":u("guest-bubble.label"),children:y.jsx("div",{className:Q(ge.rightText),children:i})})})}),O6="_markdown_nw7vg_1",t_={markdown:O6},$h=()=>B.useMemo(()=>Uh(),[]),Io="source-info-reference",R6=({actionId:t,markdown:r,sources:i,onLinkClick:s})=>{const u=$h(),c=Cr(),d=w6(),h=st(b=>{const _=b.chat.sourceInfos;if(_?.type==="loaded"||_?.type==="loading")return _.chunkId}),m=b=>_=>{const x=_.key;(x==="ArrowDown"||x==="ArrowRight"||x==="Enter"||x===" "||x==="Space")&&(_.stopPropagation(),c(db(u,t,b)))},p=b=>()=>{c(db(u,t,b))};return B.useLayoutEffect(()=>{document.querySelectorAll(`.${Io}`).forEach(b=>{const _=b.previousSibling;_&&_.nodeType===Node.TEXT_NODE&&_.textContent?.endsWith(" ")&&_.textContent?.trim().length&&b.classList.add(`${Io}--before-space`);const x=b.nextSibling;x&&x.nodeType===Node.TEXT_NODE&&x.textContent?.startsWith(" ")&&x.textContent?.trim().length&&b.classList.add(`${Io}--after-space`)})},[r]),y.jsxs("div",{className:ge.bubbleContent,children:[y.jsx("div",{className:t_.markdown,children:y.jsx(e_,{markdown:r,onLinkClick:s,markdownOptions:{renderRule(b,_,x,U){if(_.type===FO.footnoteReference){const R=_.text===h;return y.jsx("span",{className:Q(ge.sourceInfoReference,R&&ge.sourceInfoReferenceActive,Io),children:y.jsx("a",{type:"button",tabIndex:0,onClick:p(_.text),onKeyDown:m(_.text),children:d(_.text)})},U.key)}return b()}}})}),y.jsx(Kh,{sources:i,onLinkClick:s})]})},w6=()=>{const t=[];return i=>{const s=t.indexOf(i);return s>-1?s+1:(t.push(i),t.length)}},C6="_text_gp0s0_1",N6="_command_gp0s0_5",Vb={text:C6,command:N6},M6=({text:t,commands:r=[]})=>{const i=r.find(u=>t.startsWith(`/${u}`)),s=i?t.slice(i.length+1):t;return y.jsxs("div",{children:[i&&y.jsxs("code",{className:Vb.command,children:["/",i]}),s.split(`
|
|
110
|
+
`).map((u,c)=>y.jsxs("span",{className:Vb.text,children:[u,y.jsx("br",{})]},c))]})},D6=({text:t,commands:r,sources:i,onLinkClick:s})=>y.jsxs("div",{className:ge.bubbleContent,children:[y.jsx(M6,{text:t,commands:r}),y.jsx(Kh,{sources:i,onLinkClick:s})]}),L6=B.forwardRef(({message:t,commands:r,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,onReaction:c,onButtonClick:d,onLinkClick:h},m)=>{const p=B6(t._id,t,r,d,h),b=_=>{c(t._id,_)};switch(t.sender.type){case Te.UserType.GUEST:return y.jsx(x6,{ref:m,isFirstMessageBySender:s,isLastMessageBySender:u,children:p});default:return y.jsx(Qv,{ref:m,message:t,isAnimated:!1,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,onReaction:b,children:p})}}),B6=(t,r,i,s,u)=>{switch(r.type){case Te.MessageTypeEnum.TEXT:{const c=r;return y.jsx(D6,{text:c.text,commands:i,sources:r.sources||[],onLinkClick:u})}case Te.MessageTypeEnum.DETAIL:{const c=r;return y.jsx(A6,{title:c.title,text:c.text,imageUrl:c.imageUrl,itemUrl:c.itemUrl,buttons:c.buttons,sources:r.sources||[],onButtonClick:s,onLinkClick:u})}case Te.MessageTypeEnum.MARKDOWN:{const c=r;return y.jsx(R6,{actionId:t,markdown:c.markdown,sources:c.sources||[],onLinkClick:u})}}},U6=(t,r)=>t.message._id===r.message._id&&t.message.reaction===r.message.reaction&&t.isLastMessage===r.isLastMessage&&t.isFirstMessageBySender===r.isFirstMessageBySender&&t.isLastMessageBySender===r.isLastMessageBySender,j6=E1.memo(L6,U6),H6="_ticontainer_xg0dn_1",I6="_tiblock_xg0dn_5",z6="_tidot_xg0dn_12",ks={ticontainer:H6,tiblock:I6,tidot:z6},G6=({isTyping:t=!1})=>y.jsx("div",{className:ks.ticontainer,children:y.jsx("div",{className:ks.tiblock,children:t?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:Q(ks.tidot,"chat__typingIndicator")}),y.jsx("div",{className:Q(ks.tidot,"chat__typingIndicator")}),y.jsx("div",{className:Q(ks.tidot,"chat__typingIndicator")})]}):null})}),k6=Object.assign({_id:"typing-indicator"},new Te.TextMessage("",new Te.BotUser)),q6=({messages:t,isBotTyping:r,commands:i,onTranscriptItemReaction:s,onButtonClick:u,onLinkClick:c})=>{const d=B.useRef(0),h=B.useRef(!0),m=B.useRef(null),p=B.useRef(null),b=B.useRef(null),_=st(R=>R.settings.enableGeneralConditions);B.useLayoutEffect(()=>{if(t.length&&m.current&&(d.current<t.length||r)){if(p.current){const R=p.current.offsetTop;m.current.scrollTop=R}else if(b.current){const R=b.current.offsetTop;m.current.scrollTop=R}h.current&&(h.current=!1),d.current=t.length}},[t,h,r]);let x;const U=t.length;return y.jsxs("div",{ref:m,className:Q(mb.messageContainer,"chat__messageContainer"),style:{scrollBehavior:t.length&&h.current?"auto":"smooth"},id:"MessageContainer",role:"log","aria-live":"polite",children:[_&&y.jsx(iw,{}),y.jsxs("ul",{className:mb.messages,children:[t.map((R,q)=>{const z=F6(R,x),E=V6(R,q,t,r);x=R.sender.type;const w=q+1===U,S=R._id||`added-${q}`;return y.jsx(j6,{ref:w?b:null,message:R,commands:i,isLastMessage:w,isFirstMessageBySender:z,isLastMessageBySender:E,onButtonClick:u,onLinkClick:c,onReaction:s},w&&!r?"last":S)}),r&&y.jsx(Qv,{ref:p,message:k6,isLastMessage:!1,isAnimated:!0,isFirstMessageBySender:x!==Te.UserType.BOT,isLastMessageBySender:!0,children:y.jsx(G6,{isTyping:!0})},"last")]})]})},F6=(t,r)=>!r||r!==t.sender.type,V6=(t,r,i,s)=>{const u=t.sender.type,c=i.length;return r+1===c?!(u===Te.UserType.BOT&&s):u!==i.at(r+1)?.sender.type},P6="_bottomSheet_jp8dl_1",Y6="_bottomSheetOpen_jp8dl_15",X6="_bottomSheetClose_jp8dl_20",Or={bottomSheet:P6,bottomSheetOpen:Y6,bottomSheetClose:X6},Z6="_container_xc2nx_1",Pb={container:Z6},Q6=({contentUrl:t})=>{const r=st(c=>c.connection.sessionId),[i,s]=B.useState(!1);B.useEffect(()=>{s(c=>c||!!t)},[t]);const u=B.useMemo(()=>{if(t&&r){const c=new URL(t,document.baseURI);return c.searchParams.set("sessionId",r),c.toString()}else return},[t,r]);return y.jsx("div",{className:Q(Pb.container,Or.bottomSheet,{[Or.bottomSheetOpen]:!!t,[Or.bottomSheetClose]:i&&!t}),children:u&&y.jsx("iframe",{title:"Drawer",src:u,className:Pb.iframe})})},K6="_container_6tt4m_1",$6={container:K6},W6=({title:t,href:r,children:i})=>y.jsx("a",{href:r,title:t,target:"_blank",rel:"noopener noreferrer",children:i}),J6=()=>{const r=Ze()("powered-by");return r&&r.length?y.jsx("div",{className:Q($6.container,"chat__poweredBy"),children:y.jsx(xr,{options:{overrides:{a:W6}},children:r})}):null},n_=({className:t,children:r,...i})=>y.jsx(Su,{className:Q(el.buttonDefault,t),type:"button",...i,children:r}),lu=({className:t,children:r,...i})=>y.jsx(Su,{className:Q(el.buttonPrimary,t),...i,children:r}),eC="_container_h23mk_1",tC="_formContainer_h23mk_17",nC="_emailInput_h23mk_22",rC="_description_h23mk_52",aC="_actions_h23mk_57",iC="_validationError_h23mk_67",sC="_submitted_h23mk_74",Da={container:eC,formContainer:tC,emailInput:nC,description:rC,actions:aC,validationError:iC,submitted:sC},lC=({visible:t,onEmailExport:r,onClose:i})=>{const s=Ze(),[u,c]=B.useState(void 0),[d,h]=B.useState(!1),[m,p]=B.useState(void 0),b=B.useRef(null);B.useEffect(()=>{t?(b.current?.focus(),h(!1),c(t)):u===!0&&c(!1)},[t,u]);const _=U=>{U.preventDefault(),m&&m.length>0&&(r(m),h(!0),setTimeout(i,3*1e3))},x=U=>{const R=U.target.value.trim(),q=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(R);p(q?R:"")};return y.jsxs("div",{className:Q(Da.container,Or.bottomSheet,{[Or.bottomSheetOpen]:u===!0,[Or.bottomSheetClose]:u===!1}),children:[y.jsx("h2",{children:s("export-transcript.email.title")}),y.jsx(xr,{className:Da.description,children:s("export-transcript.email.description")||""}),y.jsxs("form",{onSubmit:_,className:Da.formContainer,children:[y.jsxs("div",{children:[y.jsx("input",{disabled:d,ref:b,type:"email",placeholder:s("export-transcript.email.placeholder"),className:Da.emailInput,onChange:x}),m?.length===0?y.jsx("div",{className:Da.validationError,children:s("export-transcript.email.invalid")}):null]}),y.jsxs("div",{className:Da.actions,children:[y.jsx(n_,{onClick:i,children:s("export-transcript.email.cancel")}),y.jsx(lu,{type:"submit",disabled:d||m===void 0||m.length===0,children:s("export-transcript.email.send")})]})]}),d&&y.jsx("div",{className:Da.submitted,children:s("export-transcript.email.success")})]})},oC="_inputContainer_fi5ao_1",uC={inputContainer:oC},cC="_blockUserInput_pot9c_1",fC={blockUserInput:cC},dC=({visible:t})=>{const r=Ze();return t?y.jsx("div",{className:Q(fC.blockUserInput,"chat__blockUserInput"),children:r("block-user-input.title")}):null},hC="_commandsDropdown_5ytuv_1",mC="_commands_5ytuv_1",pC="_command_5ytuv_1",gC="_commandActive_5ytuv_46",yC="_commandsSelections_5ytuv_55",Qs={commandsDropdown:hC,commands:mC,command:pC,commandActive:gC,commandsSelections:yC},bC=(t,r,i,s,u)=>{B.useEffect(()=>{const c=d=>{if(t.length)switch(d.key){case"Enter":i(t[r]);break;case"ArrowUp":s(h=>h>0?h-1:t.length-1);break;case"ArrowDown":s(h=>h<t.length-1?h+1:0);break;case"Escape":u([]);break}};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[t,r,i,s,u])},vC=({text:t,commands:r,onSelectCommand:i,onVisibilityChange:s})=>{const u=B.useRef(null),c=Ze(),[d,h]=B.useState([]),[m,p]=B.useState(Yb(r)),[b,_]=B.useState(0),x=U=>i(`/${U}`);return Zh(u,()=>h([])),bC(d,b,x,_,h),B.useEffect(()=>{p(Yb(r))},[r]),B.useEffect(()=>{const U=t.length||0;U===0||U>m||!t.startsWith("/")?h([]):h(r.filter(_C(t))),_(0)},[r,t,m]),B.useEffect(()=>{s(!!d.length)},[d,s]),d.length?y.jsx("div",{ref:u,className:Qs.commandsDropdown,children:y.jsx("ul",{id:"command-list",className:Qs.commands,role:"listbox",children:d.map((U,R)=>y.jsxs("li",{className:Q([Qs.command,b===R&&Qs.commandActive]),role:"option",onClick:()=>x(U),onMouseOver:()=>_(R),children:[y.jsxs("h1",{children:["/",U]}),y.jsx("p",{children:c(`commands.${U}`)})]},U))})}):null},Yb=t=>Math.max(...t.map(r=>r.length+1)),_C=t=>r=>{const i=`/${r}`;return i.startsWith(t)&&i.length>=t.length},Xb=3,EC=({commands:t,onSelectCommand:r})=>{const i=Ze(),[s,u]=B.useState(!1),c=p=>()=>{r(`/${p}`),u(!1)},d=()=>{u(!0)},h=()=>{u(!1)},m=s?t:t.slice(0,Xb);return y.jsxs("div",{className:Qs.commandsSelections,children:[m.map(p=>y.jsxs("button",{className:"tooltip--top-center","aria-label":i(`commands.${p}`),"data-title":i(`commands.${p}`),tabIndex:0,onClick:c(p),children:["/",p]},p)),m.length<t.length?y.jsx("button",{"aria-label":i("commands.show-more.tooltip"),"data-title":i("commands.show-more.tooltip"),tabIndex:0,onClick:d,children:i("commands.show-more.action")},"show-more"):m.length>Xb?y.jsx("button",{"aria-label":i("commands.show-less.tooltip"),"data-title":i("commands.show-less.tooltip"),tabIndex:0,onClick:h,children:i("commands.show-less.action")},"show-less"):null]})},SC="_callToActionContainer_d8izj_1",TC="_callToActionTitle_d8izj_23",AC="_rateOverlay_d8izj_30",xC="_body_d8izj_52",OC="_footer_d8izj_60",RC="_actions_d8izj_75",wC="_bubbles_d8izj_89",CC="_stars_d8izj_191",NC="_starsSmall_d8izj_205",MC="_starsLarge_d8izj_211",DC="_star_d8izj_191",LC="_starReadonly_d8izj_225",BC="_starIcon_d8izj_235",UC="_starsDescriptionContainer_d8izj_253",jC="_starsDescription_d8izj_253",zt={callToActionContainer:SC,callToActionTitle:TC,rateOverlay:AC,body:xC,footer:OC,actions:RC,bubbles:wC,stars:CC,starsSmall:NC,starsLarge:MC,star:DC,starReadonly:LC,starIcon:BC,starsDescriptionContainer:UC,starsDescription:jC},HC=({value:t,index:r,count:i,readonly:s,onHover:u,onClick:c})=>{const d=h=>{c&&h.key==="Enter"&&c()};return y.jsx("li",{className:Q(zt.star,{[zt.starReadonly]:s},"chat__conversationRating__star"),children:y.jsx("div",{role:"radio","aria-checked":t>r?"true":"false","aria-posinset":r+1,"aria-setsize":i,tabIndex:0,onMouseOver:u,onKeyDown:d,onClick:c,children:y.jsx("span",{role:"img","aria-label":"Star",className:Q(zt.starIcon),children:y.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"star",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:y.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"})})})})})},Zb=5,r_=({value:t,size:r,readonly:i=!1,onChange:s})=>{const[u,c]=B.useState(void 0),d=()=>{c(void 0)},h=p=>()=>{if(!i){const b=p+1;c(b)}},m=p=>()=>{s&&!i&&(s(p===0&&t===1?0:p+1),c(void 0))};return y.jsx("ul",{tabIndex:0,role:"radiogroup",className:Q(zt.stars,{[zt.starsSmall]:r==="small",[zt.starsLarge]:r==="large"},"chat__conversationRating__stars",{chat__conversationRating__stars__small:r==="small",chat__conversationRating__stars__large:r==="large"}),onMouseOut:d,children:Array(Zb).fill(0).map((p,b)=>y.jsx(HC,{value:u===void 0?t:u,index:b,count:Zb,readonly:i,onHover:h(b),onClick:m(b)},b))})},IC=({visible:t,onRate:r})=>{const i=Ze();return t?y.jsxs("div",{className:Q(zt.callToActionContainer,"chat__conversationRating__callToAction"),children:[y.jsx("div",{className:Q(zt.callToActionTitle,"chat__conversationRating__callToAction__title"),children:i("conversation-rating.call-to-action.title")}),y.jsx(r_,{value:0,size:"small",onChange:r})]}):null},Dd=({isFirstMessageBySender:t,isLastMessageBySender:r,children:i})=>y.jsxs("div",{className:Q(ge.message,ge.messageBot,t&&ge.messageBotFirst,r&&ge.messageBotLast,"chat__bubbleContainer","chat__botBubbleContainer",t&&"chat__bubbleContainer--first",r&&"chat__bubbleContainer--last"),children:[y.jsx("img",{className:Q(ge.avatar,ge.botAvatar),src:"bot.svg",alt:"Bot"}),y.jsx("div",{className:Q(ge.bubble,ge.bubbleLeft,"chat__bubble","chat__botBubble"),children:y.jsx("div",{className:Q(ge.leftText,ge.bubbleContent),children:i})})]}),zC=({children:t})=>y.jsx("div",{className:Q(ge.message,ge.messageGuest,ge.messageGuestFirst,ge.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer","chat__bubbleContainer--first","chat__bubbleContainer--last"),children:y.jsx("div",{className:Q(ge.bubble,ge.bubbleRight,"chat__bubble","chat__guestBubble"),children:y.jsx("div",{className:Q(ge.rightText,ge.bubbleContent),children:t})})}),GC=()=>{const t=Ze(),r=Cr(),i=st(z=>z.chat.conversationRating),[s,u]=B.useState(i.rating?.value||0),[c,d]=B.useState(void 0),[h,m]=B.useState(void 0),[p,b]=B.useState({submitted:!1,feedback:""}),_=B.useRef(null),[x,U]=B.useState(!1);B.useEffect(()=>{i.opener?(b({submitted:!1,feedback:""}),m(!0)):h===!0&&m(!1)},[i.opener,h]),B.useEffect(()=>{u(i.rating?.value||0)},[i.rating?.value,i.opener]),B.useEffect(()=>{_.current&&(_.current.value=i.rating?.feedback||"")},[i.rating?.feedback]),B.useEffect(()=>{const z=s>0?t(`conversation-rating.overlay.bot-message.rate-feedback.value-${s}`):void 0;d(z?.length?z:void 0)},[s,t]),B.useEffect(()=>{p.submitted?setTimeout(()=>U(!0),p.feedback.length?500:0):U(!1)},[p]);const R=z=>{z.preventDefault();const E=_.current?.value?.trim()||"";r(wx(s,E)),b({submitted:!0,feedback:E})},q=()=>{i.opener==="CLOSE_CHAT"?r(Uv()):i.opener==="RESTART_CHAT"?r(al()):r(RO())};return y.jsx("div",{className:Q(zt.rateOverlay,Or.bottomSheet,"chat__conversationRating__overlay",{[Or.bottomSheetOpen]:h===!0,[Or.bottomSheetClose]:h===!1}),children:y.jsxs("form",{onSubmit:R,children:[y.jsxs("div",{className:Q(zt.body,"chat__conversationRating__overlay__body"),children:[y.jsx("div",{}),y.jsx("div",{className:Q(zt.bubbles),children:i.opener&&y.jsxs(y.Fragment,{children:[y.jsxs(Dd,{isFirstMessageBySender:!0,isLastMessageBySender:!c,children:[y.jsx("h2",{children:t("conversation-rating.overlay.title")}),y.jsxs("div",{className:Q(zt.starsDescriptionContainer),children:[y.jsx(r_,{value:s,size:"large",readonly:p.submitted,onChange:u}),y.jsxs("div",{className:Q(zt.starsDescription),children:[y.jsx("div",{children:t("conversation-rating.overlay.star.very-bad")}),y.jsx("div",{children:t("conversation-rating.overlay.star.very-good")})]})]})]}),c&&y.jsx(Dd,{isFirstMessageBySender:!1,isLastMessageBySender:!x||!!p.feedback.length,children:y.jsx("div",{children:c})}),!!p.feedback.length&&y.jsx(zC,{children:p.feedback}),x&&y.jsx(Dd,{isFirstMessageBySender:!!p.feedback.length,isLastMessageBySender:!0,children:y.jsx("div",{children:t("conversation-rating.overlay.bot-message.submit-feedback")})})]})})]}),y.jsxs("div",{className:Q(zt.footer,"chat__conversationRating__overlay__footer"),children:[!p.submitted&&y.jsx("input",{ref:_,defaultValue:i.rating?.feedback||"",placeholder:t("conversation-rating.overlay.guest-feedback.input-placeholder")}),y.jsxs("div",{className:Q(zt.actions,"chat__conversationRating__overlay__footer__actions"),children:[p.submitted?y.jsx(lu,{type:"button",disabled:!s,onClick:q,children:i.opener==="CLOSE_CHAT"?t("conversation-rating.overlay.action.close-chat"):i.opener==="RESTART_CHAT"?t("conversation-rating.overlay.action.restart-chat"):t("conversation-rating.overlay.action.back-to-chat")},"close-button"):y.jsx(lu,{type:"submit",disabled:!s,children:t("conversation-rating.overlay.action.submit")},"submit-button"),i.opener!=="CHAT"&&!p.submitted&&y.jsx(n_,{onClick:q,children:i.opener==="CLOSE_CHAT"?t("conversation-rating.overlay.action.close-chat"):i.opener==="RESTART_CHAT"?t("conversation-rating.overlay.action.restart-chat"):t("conversation-rating.overlay.action.cancel")})]})]})]})})},kC=({numberOfMessagesFromGuest:t})=>{const r=Cr(),i=st(c=>c.chat.conversationRating),s=c=>{r(iu("CHAT",c))},u=!i.rating?.value&&t>=1;return i.enabled?y.jsxs(y.Fragment,{children:[y.jsx(IC,{visible:u,onRate:s}),y.jsx(GC,{})]}):null},qC=B.memo(kC),FC="_inputWrapper_e3h44_1",VC="_withOpenCommands_e3h44_14",PC="_messageInputWrapper_e3h44_20",YC="_messageInput_e3h44_20",XC="_buttons_e3h44_44",ZC="_button_e3h44_44",xi={inputWrapper:FC,withOpenCommands:VC,messageInputWrapper:PC,messageInput:YC,buttons:XC,button:ZC},QC="_audioRecorder_g845f_1",KC="_audioButton_g845f_6",$C="_recorderIcon_g845f_37",WC="_spinning_g845f_60",La={audioRecorder:QC,audioButton:KC,recorderIcon:$C,spinning:WC},Qb=2048,ou=16e3;class JC extends E1.Component{audioInput=null;volume=null;leftchannel=[];recorder=null;recordingLength=0;sampleRate=null;mediaStream=null;constructor(r){super(r),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(r){this.mediaStream=r,this.leftchannel.length=0,this.recordingLength=0,this.initRecording(r)}initRecording(r){const i=window.AudioContext||window.webkitAudioContext,s=new i;this.sampleRate=s.sampleRate,this.volume=s.createGain(),this.audioInput=s.createMediaStreamSource(r),this.audioInput.connect(this.volume),this.recorder=s.createScriptProcessor(Qb,1,1),this.recorder.onaudioprocess=this.processRecordingInput,this.volume.connect(this.recorder),this.recorder.connect(s.destination)}processRecordingInput(r){if(this.state.recordingState==="connecting"&&this.setState({recordingState:"recording"}),this.state.recordingState!=="none"){const i=r.inputBuffer.getChannelData(0);this.leftchannel.push(new Float32Array(i)),this.recordingLength+=Qb}}handleClickSubmitAudio(){const r=tN(this.leftchannel,this.recordingLength),i=nN(r,this.sampleRate||0),s=eN(i);this.props.onAudioRecorded(s),this.handleClickStopAudio()}handleClickStopAudio(){this.setState({recordingState:"none"}),this.audioInput?.disconnect(),this.volume?.disconnect(),this.recorder?.disconnect(),this.mediaStream&&this.mediaStream?.getAudioTracks().forEach(r=>{r.stop()})}render(){return y.jsxs("div",{className:La.audioRecorder,children:[this.state.recordingState==="none"&&y.jsx("button",{className:Q(La.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:y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[y.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"}),y.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),this.state.recordingState==="connecting"&&y.jsxs("svg",{className:La.spinning,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[y.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"}),y.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]}),this.state.recordingState==="recording"&&y.jsxs("div",{className:La.audioRecorder,children:[y.jsx("button",{className:Q(La.audioButton),onClick:this.handleClickStopAudio,"aria-label":this.props.translate("message-input.actions.stop-audio-recording.label"),tabIndex:0,children:y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[y.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"}),y.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),y.jsx("div",{className:La.recorderIcon}),y.jsx("button",{className:Q(La.audioButton),type:"submit",onClick:this.handleClickSubmitAudio,"aria-label":this.props.translate("message-input.actions.submit-audio-recording.label"),tabIndex:0,autoFocus:!0,children:y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[y.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),y.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})]})})]})]})}}const eN=t=>{const r=new ArrayBuffer(44+t.length*2),i=new DataView(r);zo(i,0,"RIFF"),i.setUint32(4,44+t.length*2,!0),zo(i,8,"WAVE"),zo(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,ou,!0),i.setUint32(28,ou*4,!0),i.setUint16(32,4,!0),i.setUint16(34,16,!0),zo(i,36,"data"),i.setUint32(40,t.length*2,!0);const s=t.length;let u=44;const c=1;for(let d=0;d<s;d++)i.setInt16(u,t[d]*(32767*c),!0),u+=2;return new Blob([i],{type:"audio/wav"})},zo=(t,r,i)=>{for(let s=0;s<i.length;s++)t.setUint8(r+s,i.charCodeAt(s))},tN=(t,r)=>{const i=new Float32Array(r);let s=0;const u=t.length;for(let c=0;c<u;c++){const d=t[c];i.set(d,s),s+=d.length}return i},nN=(t,r)=>{if(ou===r)return t;const i=r/ou,s=Math.round(t.length/i),u=new Float32Array(s);let c=0,d=0;for(;c<u.length;){const h=Math.round((c+1)*i);let m=0,p=0;for(let b=d;b<h&&b<t.length;b++)m+=t[b],p++;u[c]=m/p,c++,d=h}return u},rN=({disabled:t,textInput:r,commandsVisible:i,hasCommands:s,onTextInput:u,onTextInputSubmit:c,onAudioRecorded:d})=>{const h=Ze(),m=B.useRef(null),{enableSpeechSupport:p}=st(R=>R.settings);B.useEffect(()=>{m.current?.focus()},[r]);const b=()=>{const R=m.current;R&&r.trim().length>=1&&c(r.trim())&&(R.value="",R.style.height="",R.focus())},_=R=>{R.preventDefault(),b()},x=R=>{const q=R.target.value;u(q),R.target.style.height="";const{scrollHeight:z}=R.target;R.target.style.height=`${z>150?150:z}px`},U=R=>{R.code==="Enter"&&!R.shiftKey?(R.repeat||b(),R.preventDefault()):i&&(R.code==="ArrowUp"||R.code==="ArrowDown")&&R.preventDefault()};return y.jsxs("form",{className:Q(xi.inputWrapper,i&&xi.withOpenCommands,"chat__textInput"),onSubmit:_,children:[y.jsx("div",{className:xi.messageInputWrapper,children:y.jsx("textarea",{id:"user_input",ref:m,className:xi.messageInput,tabIndex:0,placeholder:h("message-input-placeholder"),value:r,onChange:x,onKeyDown:U,"aria-label":h("message-input-label"),"aria-controls":s?"command-list":void 0,"aria-haspopup":s?"listbox":void 0})}),y.jsx("div",{className:Q(xi.buttons,"chat__buttons"),children:r.length||!p||navigator.mediaDevices===void 0?y.jsx("button",{className:Q(xi.button,"chat__button"),type:"submit","aria-label":h("message-input.actions.submit.label"),"data-title":h("message-input.actions.submit.label"),tabIndex:0,disabled:t,children:y.jsx("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:y.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"})})}):p&&navigator.mediaDevices!==void 0&&y.jsx(JC,{translate:h,onAudioRecorded:d})})]})},aN="_quickReplies_83npe_1",iN="_quickReply_83npe_9",Kb={quickReplies:aN,quickReply:iN},sN=({quickReplies:t,onQuickReplyClick:r})=>t.length?y.jsx("div",{className:Q(Kb.quickReplies,"chat__quickReplies"),children:t.map(i=>y.jsx(Su,{tabIndex:0,className:Q(Kb.quickReply,"chat__button","chat__quickReply"),onClick:()=>r(i),children:i.label},i.label))}):null,$b=5e3,lN=1e3,oN=({isBotTyping:t,quickReplies:r,numberOfMessagesFromGuest:i,commands:s,onTextInput:u,onQuickReplyClick:c,onAudioRecorded:d})=>{const[h,m]=B.useState(""),[p,b]=B.useState(!1),[_,x]=B.useState(!1),U=B.useRef(0),R=B.useRef(0);B.useEffect(()=>{if(p&&!t){const E=U.current?Date.now()-U.current:0;E>$b?b(!1):setTimeout(()=>{b(!1)},$b-E)}},[p,t]),B.useEffect(()=>{p&&(U.current=Date.now())},[p]);const q=E=>{const w=Date.now()-R.current<lN;return _?!1:t||w?(b(!0),!1):(u(E),m(""),R.current=Date.now(),!0)},z=E=>{m(E+" ")};return y.jsxs("div",{className:Q(uC.inputContainer),children:[y.jsx(sN,{quickReplies:r,onQuickReplyClick:c}),y.jsx(dC,{visible:p}),!p&&y.jsx(qC,{numberOfMessagesFromGuest:i}),!!s?.length&&y.jsx(vC,{text:h,commands:s,onSelectCommand:z,onVisibilityChange:x}),y.jsx(rN,{textInput:h,disabled:p,commandsVisible:_,hasCommands:!!s?.length,onTextInput:m,onTextInputSubmit:q,onAudioRecorded:d}),!!s?.length&&y.jsx(EC,{commands:s,onSelectCommand:m})]})},uN=({clientName:t,messages:r,quickReplies:i,isBotTyping:s,drawerContentUrl:u,onMessageFromUser:c,onQuickReplyClick:d,onButtonClick:h,onLinkClick:m,onAudioRecorded:p,onTranscriptExport:b,onTranscriptItemReaction:_})=>{const x=Cr(),U=st(H=>H.connection.connectionState),{enableTranscriptExportEmail:R,commands:q}=st(H=>H.settings),{showTranscriptMailOverlay:z,conversationRating:E}=st(H=>H.chat),w=r.filter(H=>H.sender.type===su.GUEST).length;B.useEffect(()=>{if(U===Ia.CONNECTED){const H=hu.parse(window.location.search);x(Hv(t,H))}},[t,U,x]);const S=()=>{x(jv())};return y.jsxs("div",{className:cd.container,children:[y.jsxs("div",{className:Q([cd.chatcontent,(z||E?.opener)&&cd.accessabilityHidden]),children:[y.jsx(q6,{messages:r,isBotTyping:s,commands:q,onButtonClick:h,onLinkClick:m,onTranscriptItemReaction:_}),y.jsx(oN,{isBotTyping:s,quickReplies:s?[]:i,numberOfMessagesFromGuest:w,commands:q,onQuickReplyClick:d,onTextInput:c,onAudioRecorded:p}),y.jsx(J6,{})]}),R&&y.jsx(lC,{visible:!!z,onEmailExport:b,onClose:S}),y.jsx(Q6,{contentUrl:u})]})},cN=t=>{const{messages:r,quickReplies:i,isBotTyping:s,drawerContentUrl:u}=t.chat;return{messages:r,quickReplies:i,isBotTyping:s,drawerContentUrl:u}},fN=t=>({onRestartChat:()=>t(al()),onMessageFromUser:r=>t(cv(r)),onAudioRecorded:r=>t(Tx(r)),onActionFromUser:r=>t(r),onQuickReplyClick:r=>t(uv(r)),onNluEvent:r=>t(pv(r)),onButtonClick:r=>t(Nx(r)),onLinkClick:r=>t(gv(r)),onTranscriptExport:r=>t(xx(r)),onTranscriptItemReaction:(r,i)=>{t(Te.Actions.transcriptItemGuestReaction(r,i?.type||null,i?.category,i?.comment))}}),dN=VS(cN,fN)(uN),a_=()=>{const[t,r]=B.useState(!1);return B.useEffect(()=>{r((()=>{try{return window.self!==window.top}catch{return!0}})())},[]),t},hN=t=>r=>{const i=r.key;(i==="ArrowDown"||i==="ArrowRight"||i==="Enter"||i===" "||i==="Space")&&(r.stopPropagation(),t())},mN=({onClick:t})=>{const r=Ze();return a_()?y.jsx("button",{className:"tooltip--bottom-left","aria-label":r("header.close-chat"),"data-title":r("header.close-chat"),tabIndex:0,onClick:t,onKeyDown:hN(t),children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.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},pN="_header_3gvbz_1",gN="_logoContainer_3gvbz_14",yN="_logo_3gvbz_14",bN="_actions_3gvbz_28",vN="_active_3gvbz_43",_N="_menuContainer_3gvbz_56",EN="_menu_3gvbz_56",SN="_divider_3gvbz_86",ia={header:pN,logoContainer:gN,logo:yN,actions:bN,active:vN,menuContainer:_N,menu:EN,divider:SN},TN=({icon:t})=>{switch(t){case"arrow-counter-clockwise":return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.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 y.jsx("div",{})}},AN=B.forwardRef(({selected:t,item:r,onClick:i},s)=>{const u=Ze(),c=d=>{d.preventDefault(),i()};return y.jsx("li",{"aria-selected":t,role:"option",className:r.withDivider?ia.divider:void 0,children:y.jsxs("a",{ref:s,type:"button",role:"button",tabIndex:-1,onClick:c,children:[y.jsx(TN,{icon:r.icon}),y.jsx("span",{children:u(`header.menu.${r.id}`)})]})})}),xN=(t,r)=>{const i=a_(),{menuItems:s,enableStandaloneView:u,enableTranscriptExportPdf:c,enableTranscriptExportEmail:d}=st(p=>p.settings),h=st(p=>p.chat.conversationRating.enabled);return B.useMemo(()=>{const p=[],b=s.filter(({visibility:_})=>t?_==="always"||_==="chat-only":_==="always"||_==="start-screen-only");if(t&&(p.push({id:"restart-chat",type:"restart-chat",icon:"arrow-counter-clockwise",visibility:"chat-only"}),i&&u&&p.push({id:"expand-chat-window",type:"expand-chat-window",icon:"expand",visibility:"always"}),r&&c&&p.push({id:"download-transcript",type:"download-transcript",icon:"download",visibility:"chat-only"}),r&&d&&p.push({id:"send-transcript",type:"send-transcript",icon:"mail",visibility:"chat-only"}),r&&h&&p.push({id:"rate-conversation",type:"rate-conversation",icon:"star",visibility:"chat-only"}),p.length>0&&b.length)){const _=p.pop();_&&s.length&&p.push({..._,withDivider:!0})}return p.push(...b),p},[t,r,c,d,u,h,i,s])},ON=({chatStarted:t,hasGuestMessages:r})=>{const i=Cr(),s=Ze(),[u,c]=B.useState(!1),[d,h]=B.useState(-1),m=B.useRef(null),p=B.useRef(null),b=B.useRef([]),_=xN(t,r);B.useEffect(()=>{b.current[d]?.focus()},[d]);const x=B.useCallback(()=>{i(r?iu("RESTART_CHAT"):al()),c(!1),h(0)},[r,i]),U=B.useCallback(z=>{switch(z.type){case"restart-chat":x();break;case"expand-chat-window":window.open(window.location.href,"_blank");break;case"download-transcript":i(Ox());break;case"send-transcript":i(jv());break;case"rate-conversation":i(iu("MENU"));break;case"link":i(gv(z.url));break;case"action":i(JSON.parse(JSON.stringify(z.action)));break}c(!1)},[i,x,c]);B.useEffect(()=>{const z=E=>{if(u)switch(E.key){case"Enter":E.preventDefault(),U(_[d]);break;case"ArrowUp":h(w=>w>0?w-1:_.length-1);break;case"ArrowDown":h(w=>w<_.length-1?w+1:0);break;case"Escape":c(!1);break;case"Tab":d>-1&&c(!1);break}};return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}},[u,d,_,h,c,U]),B.useEffect(()=>{u||h(-1)},[u,d]),Zh(p,()=>c(!1));const R=()=>{c(z=>!z)},q=()=>{setTimeout(()=>{const z=document.activeElement;p.current&&!p.current.contains(z)&&c(!1)},0)};return _.length?y.jsxs("div",{className:Q(ia.menuContainer),ref:p,children:[y.jsx("button",{ref:m,className:Q(u&&ia.active,u?"tooltip-hidden":"tooltip--bottom-left"),"aria-label":s("header.menu.title"),"data-title":s("header.menu.title"),onClick:R,onBlur:q,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.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"})})}),u&&y.jsx("nav",{className:ia.menu,"aria-label":s("header.menu.title"),children:y.jsx("ul",{tabIndex:0,children:_.map((z,E)=>y.jsx(AN,{ref:w=>{b.current[E]=w},selected:d===E,item:z,onClick:()=>U(z)},z.id))})})]}):null},Wb=({className:t,chatStarted:r,...i})=>{const s=Cr(),u=st(h=>h.chat.conversationRating),c=st(h=>h.chat.messages.some(m=>m.sender.type===Te.UserType.GUEST)),d=()=>{u.enabled&&!u.opener&&c?s(iu("CLOSE_CHAT")):s(Uv())};return y.jsxs("div",{className:Q([ia.header,t]),...i,children:[y.jsx("div",{className:ia.logoContainer,children:y.jsx("div",{className:ia.logo})}),y.jsxs("div",{className:ia.actions,children:[y.jsx(ON,{chatStarted:r,hasGuestMessages:c}),y.jsx(mN,{onClick:d})]})]})},RN="_chatwindow_rkbir_1",wN="_chatwindowWithAside_rkbir_21",Jb={chatwindow:RN,chatwindowWithAside:wN},i_=()=>{const[t,r]=B.useState(!1);return B.useEffect(()=>{const i=window.matchMedia("(max-width: 1023px)"),s=()=>r(i.matches);return s(),i.addEventListener("change",s),()=>i.removeEventListener("change",s)},[]),t},CN="_sourceInfos_vei0l_1",NN="_waitForLoading_vei0l_24",MN="_loadingContent_vei0l_28",DN="_sourceHeader_vei0l_37",LN="_sourceHeaderIcon_vei0l_57",BN="_sourceContent_vei0l_61",UN="_openSourceButton_vei0l_69",jN="_sourceButtonLabel_vei0l_79",HN="_closeSourceInfosButton_vei0l_101",IN="_loadingSourceInfos_vei0l_125",zN="_loading_vei0l_28",GN="_loadingError_vei0l_139",kN="_highlightLoadingInfo_vei0l_155",qN="_highlightLoadingInfoInnerContainer_vei0l_169",FN="_highlightLoadingInfoContent_vei0l_178",VN="_highlightLoadingInfoCloseIcon_vei0l_198",PN="_highlightLoader_vei0l_203",YN="_highlightLoaderLoading_vei0l_210",Et={sourceInfos:CN,waitForLoading:NN,loadingContent:MN,sourceHeader:DN,sourceHeaderIcon:LN,sourceContent:BN,openSourceButton:UN,sourceButtonLabel:jN,closeSourceInfosButton:HN,loadingSourceInfos:IN,loading:zN,loadingError:GN,highlightLoadingInfo:kN,highlightLoadingInfoInnerContainer:qN,highlightLoadingInfoContent:FN,highlightLoadingInfoCloseIcon:VN,highlightLoader:PN,highlightLoaderLoading:YN},XN=({onClick:t})=>{const r=Ze();return y.jsx("button",{className:Q(Et.closeSourceInfosButton,"tooltip--bottom-left"),"aria-label":r("source-infos.close"),"data-title":r("source-infos.close"),tabIndex:0,onClick:t,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.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"})})})},ZN=B.forwardRef(({sourceInfos:t,onClose:r,...i},s)=>y.jsxs("div",{className:Et.sourceHeader,...i,ref:s,children:[y.jsx("div",{children:t?y.jsx("p",{id:"source-info-title",children:t.title}):y.jsx("p",{children:" "})}),y.jsx(XN,{onClick:r})]})),QN=({loading:t})=>y.jsx("div",{className:Et.highlightLoader,children:t&&y.jsx("div",{className:Et.highlightLoaderLoading})});/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:s_,setPrototypeOf:e1,isFrozen:KN,getPrototypeOf:$N,getOwnPropertyDescriptor:WN}=Object;let{freeze:Gt,seal:Tn,create:l_}=Object,{apply:uh,construct:ch}=typeof Reflect<"u"&&Reflect;Gt||(Gt=function(r){return r});Tn||(Tn=function(r){return r});uh||(uh=function(r,i,s){return r.apply(i,s)});ch||(ch=function(r,i){return new r(...i)});const Go=kt(Array.prototype.forEach),JN=kt(Array.prototype.lastIndexOf),t1=kt(Array.prototype.pop),qs=kt(Array.prototype.push),e3=kt(Array.prototype.splice),Xo=kt(String.prototype.toLowerCase),Ld=kt(String.prototype.toString),n1=kt(String.prototype.match),Fs=kt(String.prototype.replace),t3=kt(String.prototype.indexOf),n3=kt(String.prototype.trim),Hn=kt(Object.prototype.hasOwnProperty),Ht=kt(RegExp.prototype.test),Vs=r3(TypeError);function kt(t){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),u=1;u<i;u++)s[u-1]=arguments[u];return uh(t,r,s)}}function r3(t){return function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return ch(t,i)}}function Re(t,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xo;e1&&e1(t,null);let s=r.length;for(;s--;){let u=r[s];if(typeof u=="string"){const c=i(u);c!==u&&(KN(r)||(r[s]=c),u=c)}t[u]=!0}return t}function a3(t){for(let r=0;r<t.length;r++)Hn(t,r)||(t[r]=null);return t}function Tr(t){const r=l_(null);for(const[i,s]of s_(t))Hn(t,i)&&(Array.isArray(s)?r[i]=a3(s):s&&typeof s=="object"&&s.constructor===Object?r[i]=Tr(s):r[i]=s);return r}function Ps(t,r){for(;t!==null;){const s=WN(t,r);if(s){if(s.get)return kt(s.get);if(typeof s.value=="function")return kt(s.value)}t=$N(t)}function i(){return null}return i}const r1=Gt(["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","section","select","shadow","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"]),Bd=Gt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ud=Gt(["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"]),i3=Gt(["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"]),jd=Gt(["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"]),s3=Gt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),a1=Gt(["#text"]),i1=Gt(["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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Hd=Gt(["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","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"]),s1=Gt(["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"]),ko=Gt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),l3=Tn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),o3=Tn(/<%[\w\W]*|[\w\W]*%>/gm),u3=Tn(/\$\{[\w\W]*/gm),c3=Tn(/^data-[\-\w.\u00B7-\uFFFF]+$/),f3=Tn(/^aria-[\-\w]+$/),o_=Tn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),d3=Tn(/^(?:\w+script|data):/i),h3=Tn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),u_=Tn(/^html$/i),m3=Tn(/^[a-z][.\w]*(-[.\w]+)+$/i);var l1=Object.freeze({__proto__:null,ARIA_ATTR:f3,ATTR_WHITESPACE:h3,CUSTOM_ELEMENT:m3,DATA_ATTR:c3,DOCTYPE_NAME:u_,ERB_EXPR:o3,IS_ALLOWED_URI:o_,IS_SCRIPT_OR_DATA:d3,MUSTACHE_EXPR:l3,TMPLIT_EXPR:u3});const Ys={element:1,text:3,progressingInstruction:7,comment:8,document:9},p3=function(){return typeof window>"u"?null:window},g3=function(r,i){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let s=null;const u="data-tt-policy-suffix";i&&i.hasAttribute(u)&&(s=i.getAttribute(u));const c="dompurify"+(s?"#"+s:"");try{return r.createPolicy(c,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}},o1=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function c_(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p3();const r=le=>c_(le);if(r.version="3.2.6",r.removed=[],!t||!t.document||t.document.nodeType!==Ys.document||!t.Element)return r.isSupported=!1,r;let{document:i}=t;const s=i,u=s.currentScript,{DocumentFragment:c,HTMLTemplateElement:d,Node:h,Element:m,NodeFilter:p,NamedNodeMap:b=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:_,DOMParser:x,trustedTypes:U}=t,R=m.prototype,q=Ps(R,"cloneNode"),z=Ps(R,"remove"),E=Ps(R,"nextSibling"),w=Ps(R,"childNodes"),S=Ps(R,"parentNode");if(typeof d=="function"){const le=i.createElement("template");le.content&&le.content.ownerDocument&&(i=le.content.ownerDocument)}let H,A="";const{implementation:Z,createNodeIterator:W,createDocumentFragment:ae,getElementsByTagName:ye}=i,{importNode:Ee}=s;let se=o1();r.isSupported=typeof s_=="function"&&typeof S=="function"&&Z&&Z.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:me,ERB_EXPR:ce,TMPLIT_EXPR:Pe,DATA_ATTR:ve,ARIA_ATTR:G,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:ee,CUSTOM_ELEMENT:Ae}=l1;let{IS_ALLOWED_URI:O}=l1,k=null;const $=Re({},[...r1,...Bd,...Ud,...jd,...a1]);let Y=null;const te=Re({},[...i1,...Hd,...s1,...ko]);let re=Object.seal(l_(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}})),ue=null,We=null,Ue=!0,St=!0,Gn=!1,Nr=!0,Qe=!1,qt=!0,On=!1,Di=!1,Li=!1,Tt=!1,qa=!1,oa=!1,Bi=!0,ua=!1;const xu="user-content-";let Fa=!0,ca=!1,Mr={},dn=null;const Nt=Re({},["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"]);let Rn=null;const Mt=Re({},["audio","video","img","source","image","track"]);let Ui=null;const il=Re({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Va="http://www.w3.org/1998/Math/MathML",nr="http://www.w3.org/2000/svg",Ft="http://www.w3.org/1999/xhtml";let Vt=Ft,Dr=!1,rr=null;const Ou=Re({},[Va,nr,Ft],Ld);let fa=Re({},["mi","mo","mn","ms","mtext"]),da=Re({},["annotation-xml"]);const ji=Re({},["title","style","font","a","script"]);let wn=null;const Ru=["application/xhtml+xml","text/html"],sl="text/html";let rt=null,kn=null;const Hi=i.createElement("form"),Ii=function(N){return N instanceof RegExp||N instanceof Function},zi=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kn&&kn===N)){if((!N||typeof N!="object")&&(N={}),N=Tr(N),wn=Ru.indexOf(N.PARSER_MEDIA_TYPE)===-1?sl:N.PARSER_MEDIA_TYPE,rt=wn==="application/xhtml+xml"?Ld:Xo,k=Hn(N,"ALLOWED_TAGS")?Re({},N.ALLOWED_TAGS,rt):$,Y=Hn(N,"ALLOWED_ATTR")?Re({},N.ALLOWED_ATTR,rt):te,rr=Hn(N,"ALLOWED_NAMESPACES")?Re({},N.ALLOWED_NAMESPACES,Ld):Ou,Ui=Hn(N,"ADD_URI_SAFE_ATTR")?Re(Tr(il),N.ADD_URI_SAFE_ATTR,rt):il,Rn=Hn(N,"ADD_DATA_URI_TAGS")?Re(Tr(Mt),N.ADD_DATA_URI_TAGS,rt):Mt,dn=Hn(N,"FORBID_CONTENTS")?Re({},N.FORBID_CONTENTS,rt):Nt,ue=Hn(N,"FORBID_TAGS")?Re({},N.FORBID_TAGS,rt):Tr({}),We=Hn(N,"FORBID_ATTR")?Re({},N.FORBID_ATTR,rt):Tr({}),Mr=Hn(N,"USE_PROFILES")?N.USE_PROFILES:!1,Ue=N.ALLOW_ARIA_ATTR!==!1,St=N.ALLOW_DATA_ATTR!==!1,Gn=N.ALLOW_UNKNOWN_PROTOCOLS||!1,Nr=N.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qe=N.SAFE_FOR_TEMPLATES||!1,qt=N.SAFE_FOR_XML!==!1,On=N.WHOLE_DOCUMENT||!1,Tt=N.RETURN_DOM||!1,qa=N.RETURN_DOM_FRAGMENT||!1,oa=N.RETURN_TRUSTED_TYPE||!1,Li=N.FORCE_BODY||!1,Bi=N.SANITIZE_DOM!==!1,ua=N.SANITIZE_NAMED_PROPS||!1,Fa=N.KEEP_CONTENT!==!1,ca=N.IN_PLACE||!1,O=N.ALLOWED_URI_REGEXP||o_,Vt=N.NAMESPACE||Ft,fa=N.MATHML_TEXT_INTEGRATION_POINTS||fa,da=N.HTML_INTEGRATION_POINTS||da,re=N.CUSTOM_ELEMENT_HANDLING||{},N.CUSTOM_ELEMENT_HANDLING&&Ii(N.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(re.tagNameCheck=N.CUSTOM_ELEMENT_HANDLING.tagNameCheck),N.CUSTOM_ELEMENT_HANDLING&&Ii(N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(re.attributeNameCheck=N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),N.CUSTOM_ELEMENT_HANDLING&&typeof N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(re.allowCustomizedBuiltInElements=N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Qe&&(St=!1),qa&&(Tt=!0),Mr&&(k=Re({},a1),Y=[],Mr.html===!0&&(Re(k,r1),Re(Y,i1)),Mr.svg===!0&&(Re(k,Bd),Re(Y,Hd),Re(Y,ko)),Mr.svgFilters===!0&&(Re(k,Ud),Re(Y,Hd),Re(Y,ko)),Mr.mathMl===!0&&(Re(k,jd),Re(Y,s1),Re(Y,ko))),N.ADD_TAGS&&(k===$&&(k=Tr(k)),Re(k,N.ADD_TAGS,rt)),N.ADD_ATTR&&(Y===te&&(Y=Tr(Y)),Re(Y,N.ADD_ATTR,rt)),N.ADD_URI_SAFE_ATTR&&Re(Ui,N.ADD_URI_SAFE_ATTR,rt),N.FORBID_CONTENTS&&(dn===Nt&&(dn=Tr(dn)),Re(dn,N.FORBID_CONTENTS,rt)),Fa&&(k["#text"]=!0),On&&Re(k,["html","head","body"]),k.table&&(Re(k,["tbody"]),delete ue.tbody),N.TRUSTED_TYPES_POLICY){if(typeof N.TRUSTED_TYPES_POLICY.createHTML!="function")throw Vs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof N.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Vs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');H=N.TRUSTED_TYPES_POLICY,A=H.createHTML("")}else H===void 0&&(H=g3(U,u)),H!==null&&typeof A=="string"&&(A=H.createHTML(""));Gt&&Gt(N),kn=N}},Cn=Re({},[...Bd,...Ud,...i3]),ht=Re({},[...jd,...s3]),Dt=function(N){let X=S(N);(!X||!X.tagName)&&(X={namespaceURI:Vt,tagName:"template"});const J=Xo(N.tagName),Fe=Xo(X.tagName);return rr[N.namespaceURI]?N.namespaceURI===nr?X.namespaceURI===Ft?J==="svg":X.namespaceURI===Va?J==="svg"&&(Fe==="annotation-xml"||fa[Fe]):!!Cn[J]:N.namespaceURI===Va?X.namespaceURI===Ft?J==="math":X.namespaceURI===nr?J==="math"&&da[Fe]:!!ht[J]:N.namespaceURI===Ft?X.namespaceURI===nr&&!da[Fe]||X.namespaceURI===Va&&!fa[Fe]?!1:!ht[J]&&(ji[J]||!Cn[J]):!!(wn==="application/xhtml+xml"&&rr[N.namespaceURI]):!1},At=function(N){qs(r.removed,{element:N});try{S(N).removeChild(N)}catch{z(N)}},qn=function(N,X){try{qs(r.removed,{attribute:X.getAttributeNode(N),from:X})}catch{qs(r.removed,{attribute:null,from:X})}if(X.removeAttribute(N),N==="is")if(Tt||qa)try{At(X)}catch{}else try{X.setAttribute(N,"")}catch{}},ll=function(N){let X=null,J=null;if(Li)N="<remove></remove>"+N;else{const Je=n1(N,/^[\r\n\t ]+/);J=Je&&Je[0]}wn==="application/xhtml+xml"&&Vt===Ft&&(N='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+N+"</body></html>");const Fe=H?H.createHTML(N):N;if(Vt===Ft)try{X=new x().parseFromString(Fe,wn)}catch{}if(!X||!X.documentElement){X=Z.createDocument(Vt,"template",null);try{X.documentElement.innerHTML=Dr?A:Fe}catch{}}const mt=X.body||X.documentElement;return N&&J&&mt.insertBefore(i.createTextNode(J),mt.childNodes[0]||null),Vt===Ft?ye.call(X,On?"html":"body")[0]:On?X.documentElement:mt},ol=function(N){return W.call(N.ownerDocument||N,N,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},Pa=function(N){return N instanceof _&&(typeof N.nodeName!="string"||typeof N.textContent!="string"||typeof N.removeChild!="function"||!(N.attributes instanceof b)||typeof N.removeAttribute!="function"||typeof N.setAttribute!="function"||typeof N.namespaceURI!="string"||typeof N.insertBefore!="function"||typeof N.hasChildNodes!="function")},Lr=function(N){return typeof h=="function"&&N instanceof h};function Kt(le,N,X){Go(le,J=>{J.call(r,N,X,kn)})}const ar=function(N){let X=null;if(Kt(se.beforeSanitizeElements,N,null),Pa(N))return At(N),!0;const J=rt(N.nodeName);if(Kt(se.uponSanitizeElement,N,{tagName:J,allowedTags:k}),qt&&N.hasChildNodes()&&!Lr(N.firstElementChild)&&Ht(/<[/\w!]/g,N.innerHTML)&&Ht(/<[/\w!]/g,N.textContent)||N.nodeType===Ys.progressingInstruction||qt&&N.nodeType===Ys.comment&&Ht(/<[/\w]/g,N.data))return At(N),!0;if(!k[J]||ue[J]){if(!ue[J]&&Br(J)&&(re.tagNameCheck instanceof RegExp&&Ht(re.tagNameCheck,J)||re.tagNameCheck instanceof Function&&re.tagNameCheck(J)))return!1;if(Fa&&!dn[J]){const Fe=S(N)||N.parentNode,mt=w(N)||N.childNodes;if(mt&&Fe){const Je=mt.length;for(let Lt=Je-1;Lt>=0;--Lt){const Pt=q(mt[Lt],!0);Pt.__removalCount=(N.__removalCount||0)+1,Fe.insertBefore(Pt,E(N))}}}return At(N),!0}return N instanceof m&&!Dt(N)||(J==="noscript"||J==="noembed"||J==="noframes")&&Ht(/<\/no(script|embed|frames)/i,N.innerHTML)?(At(N),!0):(Qe&&N.nodeType===Ys.text&&(X=N.textContent,Go([me,ce,Pe],Fe=>{X=Fs(X,Fe," ")}),N.textContent!==X&&(qs(r.removed,{element:N.cloneNode()}),N.textContent=X)),Kt(se.afterSanitizeElements,N,null),!1)},ir=function(N,X,J){if(Bi&&(X==="id"||X==="name")&&(J in i||J in Hi))return!1;if(!(St&&!We[X]&&Ht(ve,X))){if(!(Ue&&Ht(G,X))){if(!Y[X]||We[X]){if(!(Br(N)&&(re.tagNameCheck instanceof RegExp&&Ht(re.tagNameCheck,N)||re.tagNameCheck instanceof Function&&re.tagNameCheck(N))&&(re.attributeNameCheck instanceof RegExp&&Ht(re.attributeNameCheck,X)||re.attributeNameCheck instanceof Function&&re.attributeNameCheck(X))||X==="is"&&re.allowCustomizedBuiltInElements&&(re.tagNameCheck instanceof RegExp&&Ht(re.tagNameCheck,J)||re.tagNameCheck instanceof Function&&re.tagNameCheck(J))))return!1}else if(!Ui[X]){if(!Ht(O,Fs(J,ee,""))){if(!((X==="src"||X==="xlink:href"||X==="href")&&N!=="script"&&t3(J,"data:")===0&&Rn[N])){if(!(Gn&&!Ht(K,Fs(J,ee,"")))){if(J)return!1}}}}}}return!0},Br=function(N){return N!=="annotation-xml"&&n1(N,Ae)},sr=function(N){Kt(se.beforeSanitizeAttributes,N,null);const{attributes:X}=N;if(!X||Pa(N))return;const J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let Fe=X.length;for(;Fe--;){const mt=X[Fe],{name:Je,namespaceURI:Lt,value:Pt}=mt,Fn=rt(Je),$t=Pt;let ot=Je==="value"?$t:n3($t);if(J.attrName=Fn,J.attrValue=ot,J.keepAttr=!0,J.forceKeepAttr=void 0,Kt(se.uponSanitizeAttribute,N,J),ot=J.attrValue,ua&&(Fn==="id"||Fn==="name")&&(qn(Je,N),ot=xu+ot),qt&&Ht(/((--!?|])>)|<\/(style|title)/i,ot)){qn(Je,N);continue}if(J.forceKeepAttr)continue;if(!J.keepAttr){qn(Je,N);continue}if(!Nr&&Ht(/\/>/i,ot)){qn(Je,N);continue}Qe&&Go([me,ce,Pe],lr=>{ot=Fs(ot,lr," ")});const Gi=rt(N.nodeName);if(!ir(Gi,Fn,ot)){qn(Je,N);continue}if(H&&typeof U=="object"&&typeof U.getAttributeType=="function"&&!Lt)switch(U.getAttributeType(Gi,Fn)){case"TrustedHTML":{ot=H.createHTML(ot);break}case"TrustedScriptURL":{ot=H.createScriptURL(ot);break}}if(ot!==$t)try{Lt?N.setAttributeNS(Lt,Je,ot):N.setAttribute(Je,ot),Pa(N)?At(N):t1(r.removed)}catch{qn(Je,N)}}Kt(se.afterSanitizeAttributes,N,null)},lt=function le(N){let X=null;const J=ol(N);for(Kt(se.beforeSanitizeShadowDOM,N,null);X=J.nextNode();)Kt(se.uponSanitizeShadowNode,X,null),ar(X),sr(X),X.content instanceof c&&le(X.content);Kt(se.afterSanitizeShadowDOM,N,null)};return r.sanitize=function(le){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,J=null,Fe=null,mt=null;if(Dr=!le,Dr&&(le="<!-->"),typeof le!="string"&&!Lr(le))if(typeof le.toString=="function"){if(le=le.toString(),typeof le!="string")throw Vs("dirty is not a string, aborting")}else throw Vs("toString is not a function");if(!r.isSupported)return le;if(Di||zi(N),r.removed=[],typeof le=="string"&&(ca=!1),ca){if(le.nodeName){const Pt=rt(le.nodeName);if(!k[Pt]||ue[Pt])throw Vs("root node is forbidden and cannot be sanitized in-place")}}else if(le instanceof h)X=ll("<!---->"),J=X.ownerDocument.importNode(le,!0),J.nodeType===Ys.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?X=J:X.appendChild(J);else{if(!Tt&&!Qe&&!On&&le.indexOf("<")===-1)return H&&oa?H.createHTML(le):le;if(X=ll(le),!X)return Tt?null:oa?A:""}X&&Li&&At(X.firstChild);const Je=ol(ca?le:X);for(;Fe=Je.nextNode();)ar(Fe),sr(Fe),Fe.content instanceof c&<(Fe.content);if(ca)return le;if(Tt){if(qa)for(mt=ae.call(X.ownerDocument);X.firstChild;)mt.appendChild(X.firstChild);else mt=X;return(Y.shadowroot||Y.shadowrootmode)&&(mt=Ee.call(s,mt,!0)),mt}let Lt=On?X.outerHTML:X.innerHTML;return On&&k["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&Ht(u_,X.ownerDocument.doctype.name)&&(Lt="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
|
|
111
|
+
`+Lt),Qe&&Go([me,ce,Pe],Pt=>{Lt=Fs(Lt,Pt," ")}),H&&oa?H.createHTML(Lt):Lt},r.setConfig=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};zi(le),Di=!0},r.clearConfig=function(){kn=null,Di=!1},r.isValidAttribute=function(le,N,X){kn||zi({});const J=rt(le),Fe=rt(N);return ir(J,Fe,X)},r.addHook=function(le,N){typeof N=="function"&&qs(se[le],N)},r.removeHook=function(le,N){if(N!==void 0){const X=JN(se[le],N);return X===-1?void 0:e3(se[le],X,1)[0]}return t1(se[le])},r.removeHooks=function(le){se[le]=[]},r.removeAllHooks=function(){se=o1()},r}var y3=c_();const b3=({onClose:t})=>{const r=Ze();return y.jsxs("div",{className:Et.highlightLoadingInfo,onClick:t,children:[y.jsx("div",{className:Et.highlightLoadingInfoCloseIcon,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.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"})})}),y.jsxs("div",{className:Et.highlightLoadingInfoInnerContainer,children:[y.jsxs("div",{className:Et.highlightLoadingInfoContent,children:[y.jsx("h3",{children:r("source-infos.highlight-loading.title")}),y.jsx("p",{children:r("source-infos.highlight-loading.description")})]}),y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#000000",viewBox:"0 0 256 256",children:y.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"})})]})]})},v3=({title:t,href:r,children:i})=>y.jsx("a",{href:r,title:t,target:"_blank",rel:"noopener noreferrer",children:i}),_3=({className:t,children:r,...i})=>y.jsx("a",{className:Q(el.button,el.buttonDefault,t),type:"button",role:"button",...i,children:r}),E3=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.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"})}),S3=({type:t,...r})=>{switch(t){case"WEBSITE":return y.jsx(Jv,{...r});case"PDF":return y.jsx(Wv,{...r});case"DOCX":return y.jsx(Kv,{...r});case"TEXT":return y.jsx(E3,{...r});default:return y.jsx($v,{...r})}},T3=({url:t,knowledgeBaseType:r})=>{const i=Ze();return y.jsx(_3,{className:Et.openSourceButton,href:t,target:"_blank",children:y.jsxs("div",{className:Et.sourceButtonLabel,children:[y.jsx("div",{className:Et.sourceHeaderIcon,children:y.jsx(S3,{type:r})}),y.jsx("p",{children:i("source-infos.open-source")})]})})},A3=({sourceInfos:{content:t,url:r,knowledgeBaseType:i,highlighted:s}})=>{const[u,c]=B.useState(!s);B.useEffect(()=>{s&&c(!1)},[s]);const d=y3.sanitize(t,{USE_PROFILES:{html:!0}});return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:Q(Et.sourceContent,t_.markdown),children:[y.jsx(xr,{options:{overrides:{a:v3}},children:d}),u&&y.jsx(b3,{onClose:()=>c(!1)})]}),y.jsx(T3,{url:r,knowledgeBaseType:i})]})},x3=""+new URL("undraw_fixing-bugs-D_eYxJc6.svg",import.meta.url).href,O3=()=>{const t=Ze();return y.jsxs("div",{className:Et.loadingError,children:[y.jsx("h1",{children:t("source-infos.error.title")}),y.jsx("img",{src:x3,title:t("source-infos.error.title")}),y.jsx("p",{children:t("source-infos.error.info")})]})},R3=()=>y.jsx("div",{className:Et.loadingSourceInfos,children:y.jsx("svg",{className:Et.loading,xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.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 w3({sourceInfos:t,onClose:r,threshold:i=100}){const s=B.useRef(null),[u,c]=B.useState(0),[d,h]=B.useState(!1),m=B.useRef(null),p=B.useRef(null),b=B.useCallback(R=>{m.current=R,h(!0)},[]),_=B.useCallback(R=>{if(m.current!==null&&d){const q=R-m.current;q>0&&c(q)}},[d]),x=B.useCallback(()=>{h(!1),u>i&&r(),c(0),m.current=null},[u,i,r]),U=B.useCallback(R=>{const q=A=>b(A.touches[0].clientY),z=A=>_(A.touches[0].clientY),E=()=>x(),w=A=>{A.preventDefault(),b(A.clientY),window.addEventListener("mousemove",S),window.addEventListener("mouseup",H)},S=A=>_(A.clientY),H=()=>{x(),window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",H)};R.addEventListener("touchstart",q),R.addEventListener("touchmove",z),R.addEventListener("touchend",E),R.addEventListener("mousedown",w),p.current=()=>{R.removeEventListener("touchstart",q),R.removeEventListener("touchmove",z),R.removeEventListener("touchend",E),R.removeEventListener("mousedown",w),window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",H)}},[b,_,x]);return B.useEffect(()=>{let R;return(()=>{s.current?(p.current?.(),U(s.current)):(R=new MutationObserver(()=>{s.current&&(p.current?.(),U(s.current),R?.disconnect())}),R.observe(document.body,{childList:!0,subtree:!0}))})(),()=>{R?.disconnect(),p.current?.()}},[U,t]),{ref:s,dragOffsetY:u,isDragging:d}}const C3=t=>{const[r,i]=B.useState(!0);return B.useEffect(()=>{let s=null;return t?.type==="loading"?(i(!0),s=setTimeout(()=>{i(!1)},300)):i(!t),()=>{s&&clearTimeout(s)}},[t]),r},N3=()=>{const t=Cr(),r=st(m=>m.chat.sourceInfos),i=i_(),s=B.useRef(null),u=C3(r);B.useEffect(()=>{s.current&&r?.type==="loading"&&(i?s.current.showModal():(s.current.setAttribute("open","true"),s.current?.focus()))},[r,i]);const c=B.useCallback(()=>{s.current&&(i?s.current.close():s.current.removeAttribute("open"),t(wO()))},[t,i]),{ref:d,dragOffsetY:h}=w3({onClose:c,sourceInfos:r});return r?y.jsx("dialog",{ref:s,className:Q(Et.sourceInfos,u?Et.waitForLoading:r.type==="loading"?Et.loadingContent:""),style:i&&h?{transform:`translateY(${h}px)`}:{},onClose:c,autoFocus:!0,role:"dialog","aria-labelledby":"source-info-title",children:u?null:y.jsxs(y.Fragment,{children:[y.jsx(ZN,{ref:d,tabIndex:-1,sourceInfos:r.type==="loaded"?r:void 0,onClose:c}),r.type==="loading"?y.jsx(R3,{}):r.type==="loading-error"?y.jsx(O3,{}):y.jsxs(y.Fragment,{children:[y.jsx(QN,{loading:!r.highlighted}),y.jsx(A3,{sourceInfos:r})]})]})}):null},M3="_container_1aof3_1",D3="_body_1aof3_7",L3="_intro_1aof3_14",B3="_footer_1aof3_39",U3="_footnote_1aof3_43",j3="_containerWithFootnote_1aof3_58",H3="_startChatButton_1aof3_73",I3="_spinner_1aof3_88",z3="_formFields_1aof3_92",G3="_formField_1aof3_92",k3="_radio_1aof3_104",q3="_checkbox_1aof3_111",F3="_input_1aof3_119",V3="_inputLabel_1aof3_153",P3="_selectWrapper_1aof3_157",Y3="_select_1aof3_157",X3="_selectLabel_1aof3_203",_t={container:M3,body:D3,intro:L3,footer:B3,footnote:U3,containerWithFootnote:j3,startChatButton:H3,spinner:I3,formFields:z3,formField:G3,radio:k3,checkbox:q3,input:F3,inputLabel:V3,selectWrapper:P3,select:Y3,selectLabel:X3},Z3=({name:t,label:r,defaultValue:i,required:s,onChange:u})=>{const c=d=>{u(d.currentTarget.checked?"true":"false")};return y.jsxs("label",{className:Q(_t.checkbox,"chat__startScreen__checkbox"),htmlFor:t,children:[y.jsx("input",{type:"checkbox",id:t,name:t,defaultChecked:i==="true",required:s,onChange:c}),y.jsx("div",{children:r})]})},Q3=({type:t,name:r,label:i,defaultValue:s,placeholder:u,required:c,multiple:d,min:h,max:m,pattern:p,onChange:b})=>{const _=x=>{b(x.target.value)};return y.jsxs("label",{className:Q(_t.input,"chat__startScreen__input"),htmlFor:r,children:[y.jsx("div",{className:Q(_t.inputLabel),children:i}),y.jsx("input",{type:t,id:r,name:r,defaultValue:s,placeholder:u,required:c,multiple:d,min:h,max:m,pattern:p,onChange:_})]})},K3=({name:t,value:r,label:i,defaultChecked:s,required:u,onChange:c})=>{const d=`${t}-${r}`,h=m=>{c(m.target.value)};return y.jsxs("label",{className:Q(_t.radio,"chat__startScreen__radio"),htmlFor:d,children:[y.jsx("input",{id:d,type:"radio",name:t,value:r,defaultChecked:s,required:u,onChange:h}),y.jsx("span",{className:Q(_t.label),children:i})]})},$3=({name:t,label:r,defaultValue:i,required:s,multiple:u,options:c,onChange:d})=>{const h=m=>{d(m.target.value)};return y.jsxs("label",{className:Q(_t.select,"chat__startScreen__select"),htmlFor:t,children:[y.jsx("div",{className:Q(_t.selectLabel),children:r}),y.jsx("div",{className:Q(_t.selectWrapper),children:y.jsx("select",{id:t,name:t,defaultValue:i,required:s,multiple:u,onChange:h,children:Object.entries(c||{}).map(([m,p])=>y.jsx("option",{value:m,selected:p===i,children:p}))})})]})},W3="start-screen.intro",J3="start-screen.start-chat",e8="start-screen.waiting-for-login",t8="start-screen.footnote",jn="start-screen.form",u1=`${jn}.fields`,n8=()=>{const t=Ze(),r=Cr(),i=$h(),s=st(R=>R.startScreen.loginRequestToken),u=st(R=>R.settings.requiresUserAuthentication);B.useEffect(()=>{let R;if(s){const E=window.screenX+(window.outerWidth-600)/2,w=window.screenY+(window.outerHeight-700)/2,S=window.open(`/${i}/auth/login?loginRequestToken=${s}`,"Login",`width=600,height=700,left=${E},top=${w},resizable=yes,scrollbars=yes`);R=setInterval(()=>{S?.closed&&(r(AO()),clearInterval(R))},500)}return()=>{R&&clearInterval(R)}},[i,s,r]);const[c,d]=B.useState({}),h=()=>{const R=Object.entries(c).reduce((q,[z,E])=>({...q,[z]:E.value}),{});r(u?TO({loginRequestToken:Jo(),formValues:R}):_O({formValues:R}))},m=t(W3),p=t(s?e8:J3),b=t(t8),_=B.useMemo(()=>t(u1)?.split(";").map(R=>R.trim())??[],[t(u1)]);B.useEffect(()=>{_.length&&Object.keys(c).length===0&&d(_.reduce((R,q)=>({...R,[q]:r8(q,t)}),{}))},[t,_,c]);const x=R=>{R.preventDefault(),h()},U=R=>q=>{d(z=>({...z,[R]:{...z[R],value:q}}))};return y.jsxs("form",{onSubmit:x,className:Q(_t.container,b&&_t.containerWithFootnote,"chat__startScreen"),children:[y.jsxs("div",{className:Q(_t.body,"chat__startScreen__body"),children:[m&&y.jsx("div",{className:Q(_t.intro,"chat__startScreen__intro"),children:y.jsx(xr,{options:{overrides:{a:c1}},children:m})}),y.jsx("div",{className:Q(_t.formFields,"chat__startScreen__fields"),children:Object.values(c).map(({type:R,name:q,label:z,placeholder:E,defaultValue:w,options:S,required:H,multiple:A,min:Z,max:W,pattern:ae})=>y.jsx("div",{className:Q(_t.formField,"chat__startScreen__field"),children:(()=>{switch(R){case"radio":return y.jsxs(y.Fragment,{children:[y.jsx("div",{children:z}),Object.entries(S||{}).map(([ye,Ee])=>y.jsx(K3,{name:q,value:ye,label:Ee,defaultChecked:ye===w,required:H,onChange:U(q)},ye))]});case"checkbox":return y.jsx(Z3,{name:q,label:z,defaultValue:w,required:H,onChange:U(q)});case"select":return y.jsx($3,{name:q,label:z,defaultValue:w,required:H,multiple:A,options:S,onChange:U(q)});default:return y.jsx(Q3,{type:R,name:q,label:z,placeholder:E,defaultValue:w,required:H,multiple:A,min:Z,max:W,pattern:ae,onChange:U(q)})}})()},q))})]}),y.jsxs("div",{className:Q(_t.footer,"chat__startScreen__footer"),children:[y.jsxs(lu,{type:"submit",className:_t.startChatButton,disabled:!!s,children:[!!s&&y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",className:_t.spinner,children:y.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"})}),y.jsx("div",{children:p})]}),b&&y.jsx("div",{className:_t.footnote,children:y.jsx(xr,{options:{overrides:{a:c1}},children:b})})]})]})},c1=({title:t,href:r,children:i})=>y.jsx("a",{href:r,title:t,target:"_blank",rel:"noopener noreferrer",children:i}),r8=(t,r)=>{const i=r(`${jn}.${t}.type`)||"text",s=r(`${jn}.${t}.required`)==="true",u=r(`${jn}.${t}.multiple`)==="true",c=r(`${jn}.${t}.placeholder`),d=r(`${jn}.${t}.label`)||"",h=r(`${jn}.${t}.defaultValue`),m=r(`${jn}.${t}.min`),p=r(`${jn}.${t}.max`),b=r(`${jn}.${t}.pattern`),_=i8(r(`${jn}.${t}.options`));return{name:t,label:d,placeholder:c,value:a8(i,h,_)||"",defaultValue:h,options:_,type:i,required:s,multiple:u,min:m,max:p,pattern:b}},a8=(t,r,i)=>r||t==="select"&&Object.keys(i)[0]||"",i8=(t="")=>t.split(";").map(r=>r.trim()).reduce((r,i)=>{const[s,u]=i.split(":").map(c=>c.trim());return{...r,[s]:u}},{}),s8=()=>{const t=du();B.useEffect(()=>{window.document.documentElement.lang=t.locale},[t.locale])},Oi={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"},l8=({clientName:t})=>{s8();const r=Cr(),i=st(b=>b.intl.messages),s=Ze(),u=st(b=>b.settings.enableStartScreen),c=st(b=>b.startScreen.startScreenStatus),[d,h]=B.useState(void 0);B.useEffect(()=>{const b=hu.parse(window.location.search);b.cssClassName&&h(b.cssClassName);const _=x=>{switch(x.data.type){case Oi.TRIGGER_ACTION:r(x.data.action);break;case Oi.TRIGGER_STORY:r(pv(x.data.story));break;case Oi.ON_CHAT_WINDOW_OPEN:r({type:"webclient.chatwindow.opened"});break;case Oi.ON_CHAT_WINDOW_CLOSE:r({type:"webclient.chatwindow.closed"});break;case Oi.CHAT_MESSAGE_FROM_GUEST:r(cv(x.data.text));break;case Oi.RESTART_CHAT:r(al());break}};return r(NO(t,b)),window.addEventListener("message",x=>_(x),!1),()=>window.removeEventListener("message",_)},[t,r]),B.useEffect(()=>{const b=s("page.title");b&&document&&(document.title=b)},[i,s]);const m=u===void 0,p=u===!1||c==="HIDDEN";return y.jsx("div",{className:Q(Jb.chatwindow,p&&Jb.chatwindowWithAside,"chat__chatwindow",d),children:m?null:p?y.jsxs(y.Fragment,{children:[y.jsx("header",{children:y.jsx(Wb,{chatStarted:!0})}),y.jsx("main",{children:y.jsx(dN,{clientName:t})}),y.jsx("aside",{children:y.jsx(N3,{})})]}):y.jsxs(y.Fragment,{children:[y.jsx("header",{children:y.jsx(Wb,{chatStarted:!1})}),y.jsx("main",{children:y.jsx(n8,{})})]})})},o8=()=>{const t=$h(),r=i_(),i=st(u=>u.intl.locale),s=st(u=>u.intl.messages);return y.jsx(MA,{locale:i,messages:s,onError:()=>{},children:y.jsx("div",{className:Q([LA.app,r?"chat__small":"chat__large"]),children:y.jsx(l8,{clientName:t})})})};var Id,f1;function u8(){if(f1)return Id;f1=1;var t=Zv(),r=Qh(),i="Expected a function";function s(u,c,d){var h=!0,m=!0;if(typeof u!="function")throw new TypeError(i);return r(d)&&(h="leading"in d?!!d.leading:h,m="trailing"in d?!!d.trailing:m),t(u,c,{leading:h,maxWait:c,trailing:m})}return Id=s,Id}var c8=u8();const f8=uu(c8);function d8(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function h8(t){return t}function m8(t,r){r=r||{};const i=r.delimiter||".",s=r.maxDepth,u=r.transformKey||h8,c={};function d(h,m,p){p=p||1,Object.keys(h).forEach(function(b){const _=h[b],x=r.safe&&Array.isArray(_),U=Object.prototype.toString.call(_),R=d8(_),q=U==="[object Object]"||U==="[object Array]",z=m?m+i+u(b):u(b);if(!x&&!R&&q&&Object.keys(_).length&&(!r.maxDepth||p<s))return d(_,z,p+1);c[z]=_})}return d(t),c}const f_={"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","guest-bubble.label":"Ihre Nachricht","bot-bubble.label":"Nachricht des Chatbots","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","agent-bubble.label":"Nachricht des Live-Agenten","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:
|
|
112
112
|
|
|
113
113
|
- Der Chatverlauf wird im EU-Raum gespeichert und kann nur von autorisierten Personen eingesehen werden.
|
|
114
|
-
- 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"},
|
|
114
|
+
- 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"},p8={"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","bot-bubble.label":"Message from the chatbot","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","agent-bubble.label":"Message from the live agent","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:
|
|
115
115
|
|
|
116
116
|
- The chat history is stored in the EU area and can only be viewed by authorized personnel.
|
|
117
|
-
- 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"},
|
|
117
|
+
- 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"},g8={"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","guest-bubble.label":"Votre message","bot-bubble.label":"Message du chatbot","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","agent-bubble.label":"Message de l'agent en direct","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:
|
|
118
118
|
|
|
119
119
|
- L'historique du chat est stocké dans l'espace UE et ne peut être consulté que par les personnes autorisées.
|
|
120
|
-
- 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"},
|
|
120
|
+
- 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"},y8={"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","guest-bubble.label":"Il tuo messaggio","bot-bubble.label":"Messaggio del chatbot","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","agent-bubble.label":"Messaggio dell'agente dal vivo","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:
|
|
121
121
|
|
|
122
122
|
- La cronologia delle chat è memorizzata nell'area UE e può essere visualizzata solo da persone autorizzate.
|
|
123
|
-
- 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"},y8=["de","en","fr","it"],d_={locale:"de",messages:f_},b8=(t,r)=>{if(y8.includes(t)){const i=v8(t),s=h8(r);return{...i,...s}}return r},v8=t=>{switch(t.toString()){case"en":return m8;case"fr":return p8;case"it":return g8;default:return f_}},_8=(t=E8,r)=>{switch(r.type){case kh:return Object.assign({},t,{connectionState:Ia.CONNECTING});case qh:return Object.assign({},t,{connectionState:Ia.CONNECTED});case Fh:return Object.assign({},t,{connectionState:Ia.DISCONNECTED});case Vh:return Object.assign({},t,{connectionState:Ia.RECONNECTED});case Ph:return Object.assign({},t,{sessionId:r.sessionId});case bu:return Object.assign({},t,{sessionId:r.payload.sessionId,userId:r.payload.userId});case vu:return Object.assign({},t,{sessionId:void 0});default:return t}},E8={connectionState:Ia.DISCONNECTED,sessionId:void 0,userId:void 0},S8=(t=h1,r)=>{switch(r.type){case Mv:return h1;case bu:return Ba({type:"webclient.chat.started"}),t;case vu:return Ba({type:"webclient.chat.ended"}),t;case Te.ActionTypes.TYPING_ON:return Object.assign({},t,{isBotTyping:!0});case Te.ActionTypes.TYPING_OFF:return Object.assign({},t,{isBotTyping:!1});case Te.ActionTypes.MESSAGE_FROM_GUEST:case Te.ActionTypes.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return d1(t,r.message);case Te.ActionTypes.MESSAGE_TO_GUEST:{Ba(r);const i=Object.assign({},r.message,{_id:r.meta.actionId}),s=t.messages.filter(u=>u._id===r.meta.actionId).length>0;return Object.assign({},t,{isBotTyping:!1,messages:s?t.messages:t.messages.concat([i]),quickReplies:i.quickReplies?i.quickReplies:[]})}case wh:{const i=r.messages,s=i.length?i[i.length-1]:void 0;return Object.assign({},t,{isBotTyping:!1,messages:i,quickReplies:s?.quickReplies||[]})}case Rh:return Ba(r.message),t;case Te.ActionTypes.EVENT_TO_GUEST:return Ba(r.event),t;case Te.ActionTypes.DRAWER_OPEN:return Object.assign({},t,{drawerContentUrl:r.payload.parameters.contentUrl});case Te.ActionTypes.DRAWER_CLOSE:return Object.assign({},t,{drawerContentUrl:void 0});case Te.ActionTypes.GUEST_LOCALE_CHANGED:return Object.assign({},t,{locale:r.payload.locale});case dv:return Ba(r),t;case hv:return Ba(r),{...t,conversationRating:{...t.conversationRating,opener:void 0}};case Nh:{const i=new Te.TextMessage(r.transcription,new Te.GuestUser),s=Object.assign({},i,{_id:Jo()});return d1(t,s)}case Te.ActionTypes.TRANSCRIPT_ITEM_GUEST_REACTION:{const i=t.messages.map(s=>s._id===r.payload.actionId?Object.assign({},s,r.payload.reaction?{reaction:{type:r.payload.reaction,category:r.payload.category,comment:r.payload.comment}}:{reaction:void 0}):s);return Object.assign({},t,{messages:i})}case Mh:{const i={enabled:!0,rating:r.payload.rating};return Object.assign({},t,{conversationRating:i})}case Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST:{const i={...t.conversationRating,rating:r.payload};return Object.assign({},t,{conversationRating:i})}case Lv:{const i={...t.conversationRating,opener:r.payload.opener,...r.payload.defaultRating?{rating:{value:r.payload.defaultRating,feedback:t.conversationRating.rating?.feedback||""}}:{}};return Object.assign({},t,{conversationRating:i})}case Bv:{const i={...t.conversationRating,opener:void 0};return Object.assign({},t,{conversationRating:i})}case Lh:return{...t,sourceInfos:{type:"loading",chunkId:r.payload.chunkId}};case Dh:{const{highlighted:i}=r.payload;return t.sourceInfos?.type==="loaded"&&i?{...t,sourceInfos:{...t.sourceInfos,highlighted:!0}}:{...t,sourceInfos:{type:"loading-error"}}}case fv:{const i=t.sourceInfos?.type,{chunkId:s,knowledgeBaseType:u,title:c,content:d,highlighted:h,url:m}=r.payload,p=t.sourceInfos?.type==="loading"||t.sourceInfos?.type==="loaded"?t.sourceInfos?.chunkId:void 0;return p&&p!==s?t:i==="loading"||i==="loaded"&&h?{...t,sourceInfos:{type:"loaded",chunkId:s,knowledgeBaseType:u,title:c,content:d,highlighted:h,url:m}}:t}case Bh:return{...t,sourceInfos:void 0};case Dv:return{...t,showTranscriptMailOverlay:!t.showTranscriptMailOverlay,conversationRating:{...t.conversationRating,opener:void 0}};default:return t}},d1=(t,r)=>{const i=t.messages[t.messages.length-1],s=i?.text===r.text;return i&&i.sender.type===r.sender.type&&s?t:Object.assign({},t,{messages:t.messages.concat([r]),quickReplies:[]})},Ba=t=>{T8()?window.top?.postMessage(t,"*"):t.type==="webclient.change.url"&&window.open(t.url)},T8=()=>typeof window<"u"&&window.self!==window.top,h1={messages:[],quickReplies:[],isBotTyping:!1,showTranscriptMailOverlay:!1,conversationRating:{enabled:!1}},h_=zh({name:"intl",initialState:d_,reducers:{updateIntl:(t,r)=>{t.locale=r.payload.language,t.messages=r.payload.messages}}}),{updateIntl:A8}=h_.actions,x8=h_.reducer,O8={version:void 0,requiresUserAuthentication:!1,enableStartScreen:void 0,enableStandaloneView:!1,enableTranscriptExportEmail:!1,enableTranscriptExportPdf:!1,enableGeneralConditions:!1,enableSpeechSupport:!1,commands:[],menuItems:[]},m_=zh({name:"settings",initialState:O8,reducers:{setSettings(t,r){t.version&&t.version!==r.payload.version?(console.log("version changed, reloading chat window"),window.location.reload()):(t.version=r.payload.version,t.requiresUserAuthentication=r.payload.requiresUserAuthentication,t.enableStartScreen=r.payload.enableStartScreen,t.enableStandaloneView=r.payload.enableStandaloneView,t.enableTranscriptExportEmail=r.payload.enableTranscriptExportEmail,t.enableTranscriptExportPdf=r.payload.enableTranscriptExportPdf,t.enableGeneralConditions=r.payload.enableGeneralConditions,t.enableSpeechSupport=r.payload.enableSpeechSupport,t.commands=r.payload.commands,t.menuItems=r.payload.menuItems||[])}}}),{setSettings:R8}=m_.actions,w8=m_.reducer,C8=vv({settings:w8,chat:S8,startScreen:AO,connection:_8,intl:x8}),N8="bubble-chat",p_="state-last-saved-at",g_="state",M8=t=>{try{if(!B8())return;const r=m1(t,p_);if(L8(r))return;{const i=m1(t,g_);return i===null?void 0:JSON.parse(i)}}catch(r){console.error(r);return}},D8=(t,r)=>{try{const i=JSON.stringify(r);p1(t,g_,i);const s=new Date().toISOString();p1(t,p_,s)}catch(i){console.error(i)}},L8=t=>{if(t===null)return!1;const r=new Date(t);return r.setHours(r.getHours()+12),new Date>r},B8=()=>typeof localStorage<"u",m1=(t,r)=>{const i=y_(t,r);return localStorage.getItem(i)},p1=(t,r,i)=>{const s=y_(t,r);return localStorage.setItem(s,i)},y_=(t,r)=>`${N8}-${t}-${r}`,tr=Object.create(null);tr.open="0";tr.close="1";tr.ping="2";tr.pong="3";tr.message="4";tr.upgrade="5";tr.noop="6";const Zo=Object.create(null);Object.keys(tr).forEach(t=>{Zo[tr[t]]=t});const fh={type:"error",data:"parser error"},b_=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",v_=typeof ArrayBuffer=="function",__=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Wh=({type:t,data:r},i,s)=>b_&&r instanceof Blob?i?s(r):g1(r,s):v_&&(r instanceof ArrayBuffer||__(r))?i?s(r):g1(new Blob([r]),s):s(tr[t]+(r||"")),g1=(t,r)=>{const i=new FileReader;return i.onload=function(){const s=i.result.split(",")[1];r("b"+(s||""))},i.readAsDataURL(t)};function y1(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let zd;function U8(t,r){if(b_&&t.data instanceof Blob)return t.data.arrayBuffer().then(y1).then(r);if(v_&&(t.data instanceof ArrayBuffer||__(t.data)))return r(y1(t.data));Wh(t,!1,i=>{zd||(zd=new TextEncoder),r(zd.encode(i))})}const b1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ks=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<b1.length;t++)Ks[b1.charCodeAt(t)]=t;const j8=t=>{let r=t.length*.75,i=t.length,s,u=0,c,d,h,m;t[t.length-1]==="="&&(r--,t[t.length-2]==="="&&r--);const p=new ArrayBuffer(r),b=new Uint8Array(p);for(s=0;s<i;s+=4)c=Ks[t.charCodeAt(s)],d=Ks[t.charCodeAt(s+1)],h=Ks[t.charCodeAt(s+2)],m=Ks[t.charCodeAt(s+3)],b[u++]=c<<2|d>>4,b[u++]=(d&15)<<4|h>>2,b[u++]=(h&3)<<6|m&63;return p},H8=typeof ArrayBuffer=="function",Jh=(t,r)=>{if(typeof t!="string")return{type:"message",data:E_(t,r)};const i=t.charAt(0);return i==="b"?{type:"message",data:I8(t.substring(1),r)}:Zo[i]?t.length>1?{type:Zo[i],data:t.substring(1)}:{type:Zo[i]}:fh},I8=(t,r)=>{if(H8){const i=j8(t);return E_(i,r)}else return{base64:!0,data:t}},E_=(t,r)=>{switch(r){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},S_="",z8=(t,r)=>{const i=t.length,s=new Array(i);let u=0;t.forEach((c,d)=>{Wh(c,!1,h=>{s[d]=h,++u===i&&r(s.join(S_))})})},G8=(t,r)=>{const i=t.split(S_),s=[];for(let u=0;u<i.length;u++){const c=Jh(i[u],r);if(s.push(c),c.type==="error")break}return s};function k8(){return new TransformStream({transform(t,r){U8(t,i=>{const s=i.length;let u;if(s<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,s);else if(s<65536){u=new Uint8Array(3);const c=new DataView(u.buffer);c.setUint8(0,126),c.setUint16(1,s)}else{u=new Uint8Array(9);const c=new DataView(u.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(s))}t.data&&typeof t.data!="string"&&(u[0]|=128),r.enqueue(u),r.enqueue(i)})}})}let Gd;function qo(t){return t.reduce((r,i)=>r+i.length,0)}function Fo(t,r){if(t[0].length===r)return t.shift();const i=new Uint8Array(r);let s=0;for(let u=0;u<r;u++)i[u]=t[0][s++],s===t[0].length&&(t.shift(),s=0);return t.length&&s<t[0].length&&(t[0]=t[0].slice(s)),i}function q8(t,r){Gd||(Gd=new TextDecoder);const i=[];let s=0,u=-1,c=!1;return new TransformStream({transform(d,h){for(i.push(d);;){if(s===0){if(qo(i)<1)break;const m=Fo(i,1);c=(m[0]&128)===128,u=m[0]&127,u<126?s=3:u===126?s=1:s=2}else if(s===1){if(qo(i)<2)break;const m=Fo(i,2);u=new DataView(m.buffer,m.byteOffset,m.length).getUint16(0),s=3}else if(s===2){if(qo(i)<8)break;const m=Fo(i,8),p=new DataView(m.buffer,m.byteOffset,m.length),b=p.getUint32(0);if(b>Math.pow(2,21)-1){h.enqueue(fh);break}u=b*Math.pow(2,32)+p.getUint32(4),s=3}else{if(qo(i)<u)break;const m=Fo(i,u);h.enqueue(Jh(c?m:Gd.decode(m),r)),s=0}if(u===0||u>t){h.enqueue(fh);break}}}})}const T_=4;function dt(t){if(t)return F8(t)}function F8(t){for(var r in dt.prototype)t[r]=dt.prototype[r];return t}dt.prototype.on=dt.prototype.addEventListener=function(t,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(r),this};dt.prototype.once=function(t,r){function i(){this.off(t,i),r.apply(this,arguments)}return i.fn=r,this.on(t,i),this};dt.prototype.off=dt.prototype.removeListener=dt.prototype.removeAllListeners=dt.prototype.removeEventListener=function(t,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+t];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var s,u=0;u<i.length;u++)if(s=i[u],s===r||s.fn===r){i.splice(u,1);break}return i.length===0&&delete this._callbacks["$"+t],this};dt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),i=this._callbacks["$"+t],s=1;s<arguments.length;s++)r[s-1]=arguments[s];if(i){i=i.slice(0);for(var s=0,u=i.length;s<u;++s)i[s].apply(this,r)}return this};dt.prototype.emitReserved=dt.prototype.emit;dt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};dt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const Tu=typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,i)=>i(r,0),Sn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),V8="arraybuffer";function A_(t,...r){return r.reduce((i,s)=>(t.hasOwnProperty(s)&&(i[s]=t[s]),i),{})}const P8=Sn.setTimeout,Y8=Sn.clearTimeout;function Au(t,r){r.useNativeTimers?(t.setTimeoutFn=P8.bind(Sn),t.clearTimeoutFn=Y8.bind(Sn)):(t.setTimeoutFn=Sn.setTimeout.bind(Sn),t.clearTimeoutFn=Sn.clearTimeout.bind(Sn))}const X8=1.33;function Z8(t){return typeof t=="string"?Q8(t):Math.ceil((t.byteLength||t.size)*X8)}function Q8(t){let r=0,i=0;for(let s=0,u=t.length;s<u;s++)r=t.charCodeAt(s),r<128?i+=1:r<2048?i+=2:r<55296||r>=57344?i+=3:(s++,i+=4);return i}function x_(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function K8(t){let r="";for(let i in t)t.hasOwnProperty(i)&&(r.length&&(r+="&"),r+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return r}function $8(t){let r={},i=t.split("&");for(let s=0,u=i.length;s<u;s++){let c=i[s].split("=");r[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return r}class W8 extends Error{constructor(r,i,s){super(r),this.description=i,this.context=s,this.type="TransportError"}}class em extends dt{constructor(r){super(),this.writable=!1,Au(this,r),this.opts=r,this.query=r.query,this.socket=r.socket,this.supportsBinary=!r.forceBase64}onError(r,i,s){return super.emitReserved("error",new W8(r,i,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(r){this.readyState==="open"&&this.write(r)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(r){const i=Jh(r,this.socket.binaryType);this.onPacket(i)}onPacket(r){super.emitReserved("packet",r)}onClose(r){this.readyState="closed",super.emitReserved("close",r)}pause(r){}createUri(r,i={}){return r+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const r=this.opts.hostname;return r.indexOf(":")===-1?r:"["+r+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(r){const i=K8(r);return i.length?"?"+i:""}}class J8 extends em{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(r){this.readyState="pausing";const i=()=>{this.readyState="paused",r()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||i()})),this.writable||(s++,this.once("drain",function(){--s||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(r){const i=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};G8(r,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const r=()=>{this.write([{type:"close"}])};this.readyState==="open"?r():this.once("open",r)}write(r){this.writable=!1,z8(r,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const r=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=x_()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(r,i)}}let O_=!1;try{O_=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const eM=O_;function tM(){}class nM extends J8{constructor(r){if(super(r),typeof location<"u"){const i=location.protocol==="https:";let s=location.port;s||(s=i?"443":"80"),this.xd=typeof location<"u"&&r.hostname!==location.hostname||s!==r.port}}doWrite(r,i){const s=this.request({method:"POST",data:r});s.on("success",i),s.on("error",(u,c)=>{this.onError("xhr post error",u,c)})}doPoll(){const r=this.request();r.on("data",this.onData.bind(this)),r.on("error",(i,s)=>{this.onError("xhr poll error",i,s)}),this.pollXhr=r}}class Jn extends dt{constructor(r,i,s){super(),this.createRequest=r,Au(this,s),this._opts=s,this._method=s.method||"GET",this._uri=i,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var r;const i=A_(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(i);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let u in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(u)&&s.setRequestHeader(u,this._opts.extraHeaders[u])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(r=this._opts.cookieJar)===null||r===void 0||r.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var u;s.readyState===3&&((u=this._opts.cookieJar)===null||u===void 0||u.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(u){this.setTimeoutFn(()=>{this._onError(u)},0);return}typeof document<"u"&&(this._index=Jn.requestsCount++,Jn.requests[this._index]=this)}_onError(r){this.emitReserved("error",r,this._xhr),this._cleanup(!0)}_cleanup(r){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=tM,r)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Jn.requests[this._index],this._xhr=null}}_onLoad(){const r=this._xhr.responseText;r!==null&&(this.emitReserved("data",r),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Jn.requestsCount=0;Jn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",v1);else if(typeof addEventListener=="function"){const t="onpagehide"in Sn?"pagehide":"unload";addEventListener(t,v1,!1)}}function v1(){for(let t in Jn.requests)Jn.requests.hasOwnProperty(t)&&Jn.requests[t].abort()}const rM=(function(){const t=R_({xdomain:!1});return t&&t.responseType!==null})();class aM extends nM{constructor(r){super(r);const i=r&&r.forceBase64;this.supportsBinary=rM&&!i}request(r={}){return Object.assign(r,{xd:this.xd},this.opts),new Jn(R_,this.uri(),r)}}function R_(t){const r=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!r||eM))return new XMLHttpRequest}catch{}if(!r)try{return new Sn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const w_=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class iM extends em{get name(){return"websocket"}doOpen(){const r=this.uri(),i=this.opts.protocols,s=w_?{}:A_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(r,i,s)}catch(u){return this.emitReserved("error",u)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=r=>this.onClose({description:"websocket connection closed",context:r}),this.ws.onmessage=r=>this.onData(r.data),this.ws.onerror=r=>this.onError("websocket error",r)}write(r){this.writable=!1;for(let i=0;i<r.length;i++){const s=r[i],u=i===r.length-1;Wh(s,this.supportsBinary,c=>{try{this.doWrite(s,c)}catch{}u&&Tu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const r=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=x_()),this.supportsBinary||(i.b64=1),this.createUri(r,i)}}const kd=Sn.WebSocket||Sn.MozWebSocket;class sM extends iM{createSocket(r,i,s){return w_?new kd(r,i,s):i?new kd(r,i):new kd(r)}doWrite(r,i){this.ws.send(i)}}class lM extends em{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(r){return this.emitReserved("error",r)}this._transport.closed.then(()=>{this.onClose()}).catch(r=>{this.onError("webtransport error",r)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(r=>{const i=q8(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=r.readable.pipeThrough(i).getReader(),u=k8();u.readable.pipeTo(r.writable),this._writer=u.writable.getWriter();const c=()=>{s.read().then(({done:h,value:m})=>{h||(this.onPacket(m),c())}).catch(h=>{})};c();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(r){this.writable=!1;for(let i=0;i<r.length;i++){const s=r[i],u=i===r.length-1;this._writer.write(s).then(()=>{u&&Tu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var r;(r=this._transport)===null||r===void 0||r.close()}}const oM={websocket:sM,webtransport:lM,polling:aM},uM=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,cM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function dh(t){if(t.length>8e3)throw"URI too long";const r=t,i=t.indexOf("["),s=t.indexOf("]");i!=-1&&s!=-1&&(t=t.substring(0,i)+t.substring(i,s).replace(/:/g,";")+t.substring(s,t.length));let u=uM.exec(t||""),c={},d=14;for(;d--;)c[cM[d]]=u[d]||"";return i!=-1&&s!=-1&&(c.source=r,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=fM(c,c.path),c.queryKey=dM(c,c.query),c}function fM(t,r){const i=/\/{2,9}/g,s=r.replace(i,"/").split("/");return(r.slice(0,1)=="/"||r.length===0)&&s.splice(0,1),r.slice(-1)=="/"&&s.splice(s.length-1,1),s}function dM(t,r){const i={};return r.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,u,c){u&&(i[u]=c)}),i}const hh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Qo=[];hh&&addEventListener("offline",()=>{Qo.forEach(t=>t())},!1);class sa extends dt{constructor(r,i){if(super(),this.binaryType=V8,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,r&&typeof r=="object"&&(i=r,r=null),r){const s=dh(r);i.hostname=s.host,i.secure=s.protocol==="https"||s.protocol==="wss",i.port=s.port,s.query&&(i.query=s.query)}else i.host&&(i.hostname=dh(i.host).host);Au(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(s=>{const u=s.prototype.name;this.transports.push(u),this._transportsByName[u]=s}),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},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=$8(this.opts.query)),hh&&(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"})},Qo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(r){const i=Object.assign({},this.opts.query);i.EIO=T_,i.transport=r,this.id&&(i.sid=this.id);const s=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[r]);return new this._transportsByName[r](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const r=this.opts.rememberUpgrade&&sa.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(r);i.open(),this.setTransport(i)}setTransport(r){this.transport&&this.transport.removeAllListeners(),this.transport=r,r.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",sa.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",r),this.emitReserved("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const i=new Error("server error");i.code=r.data,this._onError(i);break;case"message":this.emitReserved("data",r.data),this.emitReserved("message",r.data);break}}onHandshake(r){this.emitReserved("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this._pingInterval=r.pingInterval,this._pingTimeout=r.pingTimeout,this._maxPayload=r.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const r=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+r,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},r),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){const r=this._getWritablePackets();this.transport.send(r),this._prevBufferLen=r.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let s=0;s<this.writeBuffer.length;s++){const u=this.writeBuffer[s].data;if(u&&(i+=Z8(u)),s>0&&i>this._maxPayload)return this.writeBuffer.slice(0,s);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const r=Date.now()>this._pingTimeoutTime;return r&&(this._pingTimeoutTime=0,Tu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),r}write(r,i,s){return this._sendPacket("message",r,i,s),this}send(r,i,s){return this._sendPacket("message",r,i,s),this}_sendPacket(r,i,s,u){if(typeof i=="function"&&(u=i,i=void 0),typeof s=="function"&&(u=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const c={type:r,data:i,options:s};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),u&&this.once("flush",u),this.flush()}close(){const r=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),r()},s=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():r()}):this.upgrading?s():r()),this}_onError(r){if(sa.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",r),this._onClose("transport error",r)}_onClose(r,i){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(),hh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Qo.indexOf(this._offlineEventListener);s!==-1&&Qo.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",r,i),this.writeBuffer=[],this._prevBufferLen=0}}}sa.protocol=T_;class hM extends sa{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let r=0;r<this._upgrades.length;r++)this._probe(this._upgrades[r])}_probe(r){let i=this.createTransport(r),s=!1;sa.priorWebsocketSuccess=!1;const u=()=>{s||(i.send([{type:"ping",data:"probe"}]),i.once("packet",_=>{if(!s)if(_.type==="pong"&&_.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;sa.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(b(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const x=new Error("probe error");x.transport=i.name,this.emitReserved("upgradeError",x)}}))};function c(){s||(s=!0,b(),i.close(),i=null)}const d=_=>{const x=new Error("probe error: "+_);x.transport=i.name,c(),this.emitReserved("upgradeError",x)};function h(){d("transport closed")}function m(){d("socket closed")}function p(_){i&&_.name!==i.name&&c()}const b=()=>{i.removeListener("open",u),i.removeListener("error",d),i.removeListener("close",h),this.off("close",m),this.off("upgrading",p)};i.once("open",u),i.once("error",d),i.once("close",h),this.once("close",m),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&r!=="webtransport"?this.setTimeoutFn(()=>{s||i.open()},200):i.open()}onHandshake(r){this._upgrades=this._filterUpgrades(r.upgrades),super.onHandshake(r)}_filterUpgrades(r){const i=[];for(let s=0;s<r.length;s++)~this.transports.indexOf(r[s])&&i.push(r[s]);return i}}let mM=class extends hM{constructor(r,i={}){const s=typeof r=="object"?r:i;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(u=>oM[u]).filter(u=>!!u)),super(r,s)}};function pM(t,r="",i){let s=t;i=i||typeof location<"u"&&location,t==null&&(t=i.protocol+"//"+i.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=i.protocol+t:t=i.host+t),/^(https?|wss?):\/\//.test(t)||(typeof i<"u"?t=i.protocol+"//"+t:t="https://"+t),s=dh(t)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const c=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+c+":"+s.port+r,s.href=s.protocol+"://"+c+(i&&i.port===s.port?"":":"+s.port),s}const gM=typeof ArrayBuffer=="function",yM=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,C_=Object.prototype.toString,bM=typeof Blob=="function"||typeof Blob<"u"&&C_.call(Blob)==="[object BlobConstructor]",vM=typeof File=="function"||typeof File<"u"&&C_.call(File)==="[object FileConstructor]";function tm(t){return gM&&(t instanceof ArrayBuffer||yM(t))||bM&&t instanceof Blob||vM&&t instanceof File}function Ko(t,r){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let i=0,s=t.length;i<s;i++)if(Ko(t[i]))return!0;return!1}if(tm(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ko(t.toJSON(),!0);for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&Ko(t[i]))return!0;return!1}function _M(t){const r=[],i=t.data,s=t;return s.data=mh(i,r),s.attachments=r.length,{packet:s,buffers:r}}function mh(t,r){if(!t)return t;if(tm(t)){const i={_placeholder:!0,num:r.length};return r.push(t),i}else if(Array.isArray(t)){const i=new Array(t.length);for(let s=0;s<t.length;s++)i[s]=mh(t[s],r);return i}else if(typeof t=="object"&&!(t instanceof Date)){const i={};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=mh(t[s],r));return i}return t}function EM(t,r){return t.data=ph(t.data,r),delete t.attachments,t}function ph(t,r){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<r.length)return r[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let i=0;i<t.length;i++)t[i]=ph(t[i],r);else if(typeof t=="object")for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=ph(t[i],r));return t}const SM=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],TM=5;var Ce;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(Ce||(Ce={}));class AM{constructor(r){this.replacer=r}encode(r){return(r.type===Ce.EVENT||r.type===Ce.ACK)&&Ko(r)?this.encodeAsBinary({type:r.type===Ce.EVENT?Ce.BINARY_EVENT:Ce.BINARY_ACK,nsp:r.nsp,data:r.data,id:r.id}):[this.encodeAsString(r)]}encodeAsString(r){let i=""+r.type;return(r.type===Ce.BINARY_EVENT||r.type===Ce.BINARY_ACK)&&(i+=r.attachments+"-"),r.nsp&&r.nsp!=="/"&&(i+=r.nsp+","),r.id!=null&&(i+=r.id),r.data!=null&&(i+=JSON.stringify(r.data,this.replacer)),i}encodeAsBinary(r){const i=_M(r),s=this.encodeAsString(i.packet),u=i.buffers;return u.unshift(s),u}}function _1(t){return Object.prototype.toString.call(t)==="[object Object]"}class nm extends dt{constructor(r){super(),this.reviver=r}add(r){let i;if(typeof r=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(r);const s=i.type===Ce.BINARY_EVENT;s||i.type===Ce.BINARY_ACK?(i.type=s?Ce.EVENT:Ce.ACK,this.reconstructor=new xM(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(tm(r)||r.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(r),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+r)}decodeString(r){let i=0;const s={type:Number(r.charAt(0))};if(Ce[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===Ce.BINARY_EVENT||s.type===Ce.BINARY_ACK){const c=i+1;for(;r.charAt(++i)!=="-"&&i!=r.length;);const d=r.substring(c,i);if(d!=Number(d)||r.charAt(i)!=="-")throw new Error("Illegal attachments");s.attachments=Number(d)}if(r.charAt(i+1)==="/"){const c=i+1;for(;++i&&!(r.charAt(i)===","||i===r.length););s.nsp=r.substring(c,i)}else s.nsp="/";const u=r.charAt(i+1);if(u!==""&&Number(u)==u){const c=i+1;for(;++i;){const d=r.charAt(i);if(d==null||Number(d)!=d){--i;break}if(i===r.length)break}s.id=Number(r.substring(c,i+1))}if(r.charAt(++i)){const c=this.tryParse(r.substr(i));if(nm.isPayloadValid(s.type,c))s.data=c;else throw new Error("invalid payload")}return s}tryParse(r){try{return JSON.parse(r,this.reviver)}catch{return!1}}static isPayloadValid(r,i){switch(r){case Ce.CONNECT:return _1(i);case Ce.DISCONNECT:return i===void 0;case Ce.CONNECT_ERROR:return typeof i=="string"||_1(i);case Ce.EVENT:case Ce.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&SM.indexOf(i[0])===-1);case Ce.ACK:case Ce.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class xM{constructor(r){this.packet=r,this.buffers=[],this.reconPack=r}takeBinaryData(r){if(this.buffers.push(r),this.buffers.length===this.reconPack.attachments){const i=EM(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const OM=Object.freeze(Object.defineProperty({__proto__:null,Decoder:nm,Encoder:AM,get PacketType(){return Ce},protocol:TM},Symbol.toStringTag,{value:"Module"}));function In(t,r,i){return t.on(r,i),function(){t.off(r,i)}}const RM=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class N_ extends dt{constructor(r,i,s){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=r,this.nsp=i,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const r=this.io;this.subs=[In(r,"open",this.onopen.bind(this)),In(r,"packet",this.onpacket.bind(this)),In(r,"error",this.onerror.bind(this)),In(r,"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(...r){return r.unshift("message"),this.emit.apply(this,r),this}emit(r,...i){var s,u,c;if(RM.hasOwnProperty(r))throw new Error('"'+r.toString()+'" is a reserved event name');if(i.unshift(r),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const d={type:Ce.EVENT,data:i};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const b=this.ids++,_=i.pop();this._registerAckCallback(b,_),d.id=b}const h=(u=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||u===void 0?void 0:u.writable,m=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!h||(m?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(r,i){var s;const u=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(u===void 0){this.acks[r]=i;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[r];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===r&&this.sendBuffer.splice(h,1);i.call(this,new Error("operation has timed out"))},u),d=(...h)=>{this.io.clearTimeoutFn(c),i.apply(this,h)};d.withError=!0,this.acks[r]=d}emitWithAck(r,...i){return new Promise((s,u)=>{const c=(d,h)=>d?u(d):s(h);c.withError=!0,i.push(c),this.emit(r,...i)})}_addToQueue(r){let i;typeof r[r.length-1]=="function"&&(i=r.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:r,flags:Object.assign({fromQueue:!0},this.flags)};r.push((u,...c)=>s!==this._queue[0]?void 0:(u!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(u)):(this._queue.shift(),i&&i(null,...c)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(r=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!r||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(r){r.nsp=this.nsp,this.io._packet(r)}onopen(){typeof this.auth=="function"?this.auth(r=>{this._sendConnectPacket(r)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(r){this.packet({type:Ce.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},r):r})}onerror(r){this.connected||this.emitReserved("connect_error",r)}onclose(r,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",r,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(r=>{if(!this.sendBuffer.some(s=>String(s.id)===r)){const s=this.acks[r];delete this.acks[r],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(r){if(r.nsp===this.nsp)switch(r.type){case Ce.CONNECT:r.data&&r.data.sid?this.onconnect(r.data.sid,r.data.pid):this.emitReserved("connect_error",new 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 Ce.EVENT:case Ce.BINARY_EVENT:this.onevent(r);break;case Ce.ACK:case Ce.BINARY_ACK:this.onack(r);break;case Ce.DISCONNECT:this.ondisconnect();break;case Ce.CONNECT_ERROR:this.destroy();const s=new Error(r.data.message);s.data=r.data.data,this.emitReserved("connect_error",s);break}}onevent(r){const i=r.data||[];r.id!=null&&i.push(this.ack(r.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(r){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const s of i)s.apply(this,r)}super.emit.apply(this,r),this._pid&&r.length&&typeof r[r.length-1]=="string"&&(this._lastOffset=r[r.length-1])}ack(r){const i=this;let s=!1;return function(...u){s||(s=!0,i.packet({type:Ce.ACK,id:r,data:u}))}}onack(r){const i=this.acks[r.id];typeof i=="function"&&(delete this.acks[r.id],i.withError&&r.data.unshift(null),i.apply(this,r.data))}onconnect(r,i){this.id=r,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(r=>this.emitEvent(r)),this.receiveBuffer=[],this.sendBuffer.forEach(r=>{this.notifyOutgoingListeners(r),this.packet(r)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(r=>r()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ce.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(r){return this.flags.compress=r,this}get volatile(){return this.flags.volatile=!0,this}timeout(r){return this.flags.timeout=r,this}onAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(r),this}prependAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(r),this}offAny(r){if(!this._anyListeners)return this;if(r){const i=this._anyListeners;for(let s=0;s<i.length;s++)if(r===i[s])return i.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(r),this}prependAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(r),this}offAnyOutgoing(r){if(!this._anyOutgoingListeners)return this;if(r){const i=this._anyOutgoingListeners;for(let s=0;s<i.length;s++)if(r===i[s])return i.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(r){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const s of i)s.apply(this,r.data)}}}function Mi(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Mi.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),i=Math.floor(r*this.jitter*t);t=(Math.floor(r*10)&1)==0?t-i:t+i}return Math.min(t,this.max)|0};Mi.prototype.reset=function(){this.attempts=0};Mi.prototype.setMin=function(t){this.ms=t};Mi.prototype.setMax=function(t){this.max=t};Mi.prototype.setJitter=function(t){this.jitter=t};class gh extends dt{constructor(r,i){var s;super(),this.nsps={},this.subs=[],r&&typeof r=="object"&&(i=r,r=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,Au(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((s=i.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Mi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=r;const u=i.parser||OM;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(r){return arguments.length?(this._reconnection=!!r,r||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(r){return r===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=r,this)}reconnectionDelay(r){var i;return r===void 0?this._reconnectionDelay:(this._reconnectionDelay=r,(i=this.backoff)===null||i===void 0||i.setMin(r),this)}randomizationFactor(r){var i;return r===void 0?this._randomizationFactor:(this._randomizationFactor=r,(i=this.backoff)===null||i===void 0||i.setJitter(r),this)}reconnectionDelayMax(r){var i;return r===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=r,(i=this.backoff)===null||i===void 0||i.setMax(r),this)}timeout(r){return arguments.length?(this._timeout=r,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(r){if(~this._readyState.indexOf("open"))return this;this.engine=new mM(this.uri,this.opts);const i=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const u=In(i,"open",function(){s.onopen(),r&&r()}),c=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),r?r(h):this.maybeReconnectOnOpen()},d=In(i,"error",c);if(this._timeout!==!1){const h=this._timeout,m=this.setTimeoutFn(()=>{u(),c(new Error("timeout")),i.close()},h);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(u),this.subs.push(d),this}connect(r){return this.open(r)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const r=this.engine;this.subs.push(In(r,"ping",this.onping.bind(this)),In(r,"data",this.ondata.bind(this)),In(r,"error",this.onerror.bind(this)),In(r,"close",this.onclose.bind(this)),In(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(r){try{this.decoder.add(r)}catch(i){this.onclose("parse error",i)}}ondecoded(r){Tu(()=>{this.emitReserved("packet",r)},this.setTimeoutFn)}onerror(r){this.emitReserved("error",r)}socket(r,i){let s=this.nsps[r];return s?this._autoConnect&&!s.active&&s.connect():(s=new N_(this,r,i),this.nsps[r]=s),s}_destroy(r){const i=Object.keys(this.nsps);for(const s of i)if(this.nsps[s].active)return;this._close()}_packet(r){const i=this.encoder.encode(r);for(let s=0;s<i.length;s++)this.engine.write(i[s],r.options)}cleanup(){this.subs.forEach(r=>r()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(r,i){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",r,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const r=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const i=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{r.skipReconnect||(this.emitReserved("reconnect_attempt",r.backoff.attempts),!r.skipReconnect&&r.open(u=>{u?(r._reconnecting=!1,r.reconnect(),this.emitReserved("reconnect_error",u)):r.onreconnect()}))},i);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const r=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",r)}}const Xs={};function $o(t,r){typeof t=="object"&&(r=t,t=void 0),r=r||{};const i=pM(t,r.path||"/socket.io"),s=i.source,u=i.id,c=i.path,d=Xs[u]&&c in Xs[u].nsps,h=r.forceNew||r["force new connection"]||r.multiplex===!1||d;let m;return h?m=new gh(s,r):(Xs[u]||(Xs[u]=new gh(s,r)),m=Xs[u]),i.query&&!r.query&&(r.query=i.queryKey),m.socket(i.path,r)}Object.assign($o,{Manager:gh,Socket:N_,io:$o,connect:$o});const wM=[Te.ActionTypes.MESSAGE_TO_GUEST,Te.ActionTypes.EVENT_TO_GUEST,Te.ActionTypes.TYPING_ON,Te.ActionTypes.TYPING_OFF,Te.ActionTypes.RESTART_CHAT_REQUEST,...wO,...Sx,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],CM=({dispatch:t,getState:r})=>i=>{let s=null;return u=>{const c=i(u);if(u.type===Gh){s?.disconnect(),t(MO());const d=`/chat?${hu.stringify(u.querystrings)}`;s=$o(`/${u.clientName}${d}`),s.on("action",t),s.on("connect",()=>t(DO())),s.on("disconnect",()=>t(LO())),s.on("reconnect",()=>t(BO())),s.on("set-translations",(h,m)=>{t(A8({language:h,messages:b8(h,m)}))}),s.on("set-settings",h=>{t(R8(h))}),s.on("enable-conversation-rating",h=>t(Rx(h))),s.on("speech-transcription",h=>t(Ax(h))),s.on("restore-client-state",h=>{t(NO(h.sessionId)),t(Cx(h.messages))}),s.on("expand-window",({devices:h,initial:m=!1})=>{t({type:dv,devices:h,initial:m})}),s.on("restart-chat",()=>{t(al())}),s.on("login-success",h=>{t(_O({loginToken:h.loginToken}))})}else if(u.type==="start-screen/requestLogin")s?.emit("login-requested",u.payload);else if(u.type===bu)s?.emit("start-chat",u.payload);else if(u.type===vu)s?.emit("terminate-session",u.payload);else if(u.type===Ex)s?.emit("get-started",JSON.stringify(u));else if(u.type===Ch)s?.emit("audio-message",u.buffer);else if(u.type===Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST)s?.emit("conversation-rating",u.payload);else if(u.type===mv){const{connection:{sessionId:d}}=r();window.location.href=`/transcript-pdf/${d}`}else wM.indexOf(u.type)===-1&&u.meta===void 0&&s&&s.emit("action",JSON.stringify(u));return c}},M_=Uh(),NM={...M8(M_),intl:d_},yh=sO({middleware:t=>t().concat(CM),reducer:C8,preloadedState:NM});yh.subscribe(c8(()=>{const t=yh.getState();D8(M_,{connection:t.connection,startScreen:t.startScreen})},1e3));const MM=document.getElementById("root"),DM=X2.createRoot(MM);DM.render(y.jsx(YS,{store:yh,children:y.jsx(l8,{})}));
|
|
124
|
-
//# sourceMappingURL=index-
|
|
123
|
+
- 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"},b8=["de","en","fr","it"],d_={locale:"de",messages:f_},v8=(t,r)=>{if(b8.includes(t)){const i=_8(t),s=m8(r);return{...i,...s}}return r},_8=t=>{switch(t.toString()){case"en":return p8;case"fr":return g8;case"it":return y8;default:return f_}},E8=(t=S8,r)=>{switch(r.type){case kh:return Object.assign({},t,{connectionState:Ia.CONNECTING});case qh:return Object.assign({},t,{connectionState:Ia.CONNECTED});case Fh:return Object.assign({},t,{connectionState:Ia.DISCONNECTED});case Vh:return Object.assign({},t,{connectionState:Ia.RECONNECTED});case Ph:return Object.assign({},t,{sessionId:r.sessionId});case bu:return Object.assign({},t,{sessionId:r.payload.sessionId,userId:r.payload.userId});case vu:return Object.assign({},t,{sessionId:void 0});default:return t}},S8={connectionState:Ia.DISCONNECTED,sessionId:void 0,userId:void 0},T8=(t=h1,r)=>{switch(r.type){case Mv:return h1;case bu:return Ba({type:"webclient.chat.started"}),t;case vu:return Ba({type:"webclient.chat.ended"}),t;case Te.ActionTypes.TYPING_ON:return Object.assign({},t,{isBotTyping:!0});case Te.ActionTypes.TYPING_OFF:return Object.assign({},t,{isBotTyping:!1});case Te.ActionTypes.MESSAGE_FROM_GUEST:case Te.ActionTypes.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return d1(t,r.message);case Te.ActionTypes.MESSAGE_TO_GUEST:{Ba(r);const i=Object.assign({},r.message,{_id:r.meta.actionId}),s=t.messages.filter(u=>u._id===r.meta.actionId).length>0;return Object.assign({},t,{isBotTyping:!1,messages:s?t.messages:t.messages.concat([i]),quickReplies:i.quickReplies?i.quickReplies:[]})}case wh:{const i=r.messages,s=i.length?i[i.length-1]:void 0;return Object.assign({},t,{isBotTyping:!1,messages:i,quickReplies:s?.quickReplies||[]})}case Rh:return Ba(r.message),t;case Te.ActionTypes.EVENT_TO_GUEST:return Ba(r.event),t;case Te.ActionTypes.DRAWER_OPEN:return Object.assign({},t,{drawerContentUrl:r.payload.parameters.contentUrl});case Te.ActionTypes.DRAWER_CLOSE:return Object.assign({},t,{drawerContentUrl:void 0});case Te.ActionTypes.GUEST_LOCALE_CHANGED:return Object.assign({},t,{locale:r.payload.locale});case dv:return Ba(r),t;case hv:return Ba(r),{...t,conversationRating:{...t.conversationRating,opener:void 0}};case Nh:{const i=new Te.TextMessage(r.transcription,new Te.GuestUser),s=Object.assign({},i,{_id:Jo()});return d1(t,s)}case Te.ActionTypes.TRANSCRIPT_ITEM_GUEST_REACTION:{const i=t.messages.map(s=>s._id===r.payload.actionId?Object.assign({},s,r.payload.reaction?{reaction:{type:r.payload.reaction,category:r.payload.category,comment:r.payload.comment}}:{reaction:void 0}):s);return Object.assign({},t,{messages:i})}case Mh:{const i={enabled:!0,rating:r.payload.rating};return Object.assign({},t,{conversationRating:i})}case Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST:{const i={...t.conversationRating,rating:r.payload};return Object.assign({},t,{conversationRating:i})}case Lv:{const i={...t.conversationRating,opener:r.payload.opener,...r.payload.defaultRating?{rating:{value:r.payload.defaultRating,feedback:t.conversationRating.rating?.feedback||""}}:{}};return Object.assign({},t,{conversationRating:i})}case Bv:{const i={...t.conversationRating,opener:void 0};return Object.assign({},t,{conversationRating:i})}case Lh:return{...t,sourceInfos:{type:"loading",chunkId:r.payload.chunkId}};case Dh:{const{highlighted:i}=r.payload;return t.sourceInfos?.type==="loaded"&&i?{...t,sourceInfos:{...t.sourceInfos,highlighted:!0}}:{...t,sourceInfos:{type:"loading-error"}}}case fv:{const i=t.sourceInfos?.type,{chunkId:s,knowledgeBaseType:u,title:c,content:d,highlighted:h,url:m}=r.payload,p=t.sourceInfos?.type==="loading"||t.sourceInfos?.type==="loaded"?t.sourceInfos?.chunkId:void 0;return p&&p!==s?t:i==="loading"||i==="loaded"&&h?{...t,sourceInfos:{type:"loaded",chunkId:s,knowledgeBaseType:u,title:c,content:d,highlighted:h,url:m}}:t}case Bh:return{...t,sourceInfos:void 0};case Dv:return{...t,showTranscriptMailOverlay:!t.showTranscriptMailOverlay,conversationRating:{...t.conversationRating,opener:void 0}};default:return t}},d1=(t,r)=>{const i=t.messages[t.messages.length-1],s=i?.text===r.text;return i&&i.sender.type===r.sender.type&&s?t:Object.assign({},t,{messages:t.messages.concat([r]),quickReplies:[]})},Ba=t=>{A8()?window.top?.postMessage(t,"*"):t.type==="webclient.change.url"&&window.open(t.url)},A8=()=>typeof window<"u"&&window.self!==window.top,h1={messages:[],quickReplies:[],isBotTyping:!1,showTranscriptMailOverlay:!1,conversationRating:{enabled:!1}},h_=zh({name:"intl",initialState:d_,reducers:{updateIntl:(t,r)=>{t.locale=r.payload.language,t.messages=r.payload.messages}}}),{updateIntl:x8}=h_.actions,O8=h_.reducer,R8={version:void 0,requiresUserAuthentication:!1,enableStartScreen:void 0,enableStandaloneView:!1,enableTranscriptExportEmail:!1,enableTranscriptExportPdf:!1,enableGeneralConditions:!1,enableSpeechSupport:!1,commands:[],menuItems:[]},m_=zh({name:"settings",initialState:R8,reducers:{setSettings(t,r){t.version&&t.version!==r.payload.version?(console.log("version changed, reloading chat window"),window.location.reload()):(t.version=r.payload.version,t.requiresUserAuthentication=r.payload.requiresUserAuthentication,t.enableStartScreen=r.payload.enableStartScreen,t.enableStandaloneView=r.payload.enableStandaloneView,t.enableTranscriptExportEmail=r.payload.enableTranscriptExportEmail,t.enableTranscriptExportPdf=r.payload.enableTranscriptExportPdf,t.enableGeneralConditions=r.payload.enableGeneralConditions,t.enableSpeechSupport=r.payload.enableSpeechSupport,t.commands=r.payload.commands,t.menuItems=r.payload.menuItems||[])}}}),{setSettings:w8}=m_.actions,C8=m_.reducer,N8=vv({settings:C8,chat:T8,startScreen:xO,connection:E8,intl:O8}),M8="bubble-chat",p_="state-last-saved-at",g_="state",D8=t=>{try{if(!U8())return;const r=m1(t,p_);if(B8(r))return;{const i=m1(t,g_);return i===null?void 0:JSON.parse(i)}}catch(r){console.error(r);return}},L8=(t,r)=>{try{const i=JSON.stringify(r);p1(t,g_,i);const s=new Date().toISOString();p1(t,p_,s)}catch(i){console.error(i)}},B8=t=>{if(t===null)return!1;const r=new Date(t);return r.setHours(r.getHours()+12),new Date>r},U8=()=>typeof localStorage<"u",m1=(t,r)=>{const i=y_(t,r);return localStorage.getItem(i)},p1=(t,r,i)=>{const s=y_(t,r);return localStorage.setItem(s,i)},y_=(t,r)=>`${M8}-${t}-${r}`,tr=Object.create(null);tr.open="0";tr.close="1";tr.ping="2";tr.pong="3";tr.message="4";tr.upgrade="5";tr.noop="6";const Zo=Object.create(null);Object.keys(tr).forEach(t=>{Zo[tr[t]]=t});const fh={type:"error",data:"parser error"},b_=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",v_=typeof ArrayBuffer=="function",__=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Wh=({type:t,data:r},i,s)=>b_&&r instanceof Blob?i?s(r):g1(r,s):v_&&(r instanceof ArrayBuffer||__(r))?i?s(r):g1(new Blob([r]),s):s(tr[t]+(r||"")),g1=(t,r)=>{const i=new FileReader;return i.onload=function(){const s=i.result.split(",")[1];r("b"+(s||""))},i.readAsDataURL(t)};function y1(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let zd;function j8(t,r){if(b_&&t.data instanceof Blob)return t.data.arrayBuffer().then(y1).then(r);if(v_&&(t.data instanceof ArrayBuffer||__(t.data)))return r(y1(t.data));Wh(t,!1,i=>{zd||(zd=new TextEncoder),r(zd.encode(i))})}const b1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ks=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<b1.length;t++)Ks[b1.charCodeAt(t)]=t;const H8=t=>{let r=t.length*.75,i=t.length,s,u=0,c,d,h,m;t[t.length-1]==="="&&(r--,t[t.length-2]==="="&&r--);const p=new ArrayBuffer(r),b=new Uint8Array(p);for(s=0;s<i;s+=4)c=Ks[t.charCodeAt(s)],d=Ks[t.charCodeAt(s+1)],h=Ks[t.charCodeAt(s+2)],m=Ks[t.charCodeAt(s+3)],b[u++]=c<<2|d>>4,b[u++]=(d&15)<<4|h>>2,b[u++]=(h&3)<<6|m&63;return p},I8=typeof ArrayBuffer=="function",Jh=(t,r)=>{if(typeof t!="string")return{type:"message",data:E_(t,r)};const i=t.charAt(0);return i==="b"?{type:"message",data:z8(t.substring(1),r)}:Zo[i]?t.length>1?{type:Zo[i],data:t.substring(1)}:{type:Zo[i]}:fh},z8=(t,r)=>{if(I8){const i=H8(t);return E_(i,r)}else return{base64:!0,data:t}},E_=(t,r)=>{switch(r){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},S_="",G8=(t,r)=>{const i=t.length,s=new Array(i);let u=0;t.forEach((c,d)=>{Wh(c,!1,h=>{s[d]=h,++u===i&&r(s.join(S_))})})},k8=(t,r)=>{const i=t.split(S_),s=[];for(let u=0;u<i.length;u++){const c=Jh(i[u],r);if(s.push(c),c.type==="error")break}return s};function q8(){return new TransformStream({transform(t,r){j8(t,i=>{const s=i.length;let u;if(s<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,s);else if(s<65536){u=new Uint8Array(3);const c=new DataView(u.buffer);c.setUint8(0,126),c.setUint16(1,s)}else{u=new Uint8Array(9);const c=new DataView(u.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(s))}t.data&&typeof t.data!="string"&&(u[0]|=128),r.enqueue(u),r.enqueue(i)})}})}let Gd;function qo(t){return t.reduce((r,i)=>r+i.length,0)}function Fo(t,r){if(t[0].length===r)return t.shift();const i=new Uint8Array(r);let s=0;for(let u=0;u<r;u++)i[u]=t[0][s++],s===t[0].length&&(t.shift(),s=0);return t.length&&s<t[0].length&&(t[0]=t[0].slice(s)),i}function F8(t,r){Gd||(Gd=new TextDecoder);const i=[];let s=0,u=-1,c=!1;return new TransformStream({transform(d,h){for(i.push(d);;){if(s===0){if(qo(i)<1)break;const m=Fo(i,1);c=(m[0]&128)===128,u=m[0]&127,u<126?s=3:u===126?s=1:s=2}else if(s===1){if(qo(i)<2)break;const m=Fo(i,2);u=new DataView(m.buffer,m.byteOffset,m.length).getUint16(0),s=3}else if(s===2){if(qo(i)<8)break;const m=Fo(i,8),p=new DataView(m.buffer,m.byteOffset,m.length),b=p.getUint32(0);if(b>Math.pow(2,21)-1){h.enqueue(fh);break}u=b*Math.pow(2,32)+p.getUint32(4),s=3}else{if(qo(i)<u)break;const m=Fo(i,u);h.enqueue(Jh(c?m:Gd.decode(m),r)),s=0}if(u===0||u>t){h.enqueue(fh);break}}}})}const T_=4;function dt(t){if(t)return V8(t)}function V8(t){for(var r in dt.prototype)t[r]=dt.prototype[r];return t}dt.prototype.on=dt.prototype.addEventListener=function(t,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(r),this};dt.prototype.once=function(t,r){function i(){this.off(t,i),r.apply(this,arguments)}return i.fn=r,this.on(t,i),this};dt.prototype.off=dt.prototype.removeListener=dt.prototype.removeAllListeners=dt.prototype.removeEventListener=function(t,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+t];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var s,u=0;u<i.length;u++)if(s=i[u],s===r||s.fn===r){i.splice(u,1);break}return i.length===0&&delete this._callbacks["$"+t],this};dt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),i=this._callbacks["$"+t],s=1;s<arguments.length;s++)r[s-1]=arguments[s];if(i){i=i.slice(0);for(var s=0,u=i.length;s<u;++s)i[s].apply(this,r)}return this};dt.prototype.emitReserved=dt.prototype.emit;dt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};dt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const Tu=typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,i)=>i(r,0),Sn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),P8="arraybuffer";function A_(t,...r){return r.reduce((i,s)=>(t.hasOwnProperty(s)&&(i[s]=t[s]),i),{})}const Y8=Sn.setTimeout,X8=Sn.clearTimeout;function Au(t,r){r.useNativeTimers?(t.setTimeoutFn=Y8.bind(Sn),t.clearTimeoutFn=X8.bind(Sn)):(t.setTimeoutFn=Sn.setTimeout.bind(Sn),t.clearTimeoutFn=Sn.clearTimeout.bind(Sn))}const Z8=1.33;function Q8(t){return typeof t=="string"?K8(t):Math.ceil((t.byteLength||t.size)*Z8)}function K8(t){let r=0,i=0;for(let s=0,u=t.length;s<u;s++)r=t.charCodeAt(s),r<128?i+=1:r<2048?i+=2:r<55296||r>=57344?i+=3:(s++,i+=4);return i}function x_(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function $8(t){let r="";for(let i in t)t.hasOwnProperty(i)&&(r.length&&(r+="&"),r+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return r}function W8(t){let r={},i=t.split("&");for(let s=0,u=i.length;s<u;s++){let c=i[s].split("=");r[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return r}class J8 extends Error{constructor(r,i,s){super(r),this.description=i,this.context=s,this.type="TransportError"}}class em extends dt{constructor(r){super(),this.writable=!1,Au(this,r),this.opts=r,this.query=r.query,this.socket=r.socket,this.supportsBinary=!r.forceBase64}onError(r,i,s){return super.emitReserved("error",new J8(r,i,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(r){this.readyState==="open"&&this.write(r)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(r){const i=Jh(r,this.socket.binaryType);this.onPacket(i)}onPacket(r){super.emitReserved("packet",r)}onClose(r){this.readyState="closed",super.emitReserved("close",r)}pause(r){}createUri(r,i={}){return r+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const r=this.opts.hostname;return r.indexOf(":")===-1?r:"["+r+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(r){const i=$8(r);return i.length?"?"+i:""}}class eM extends em{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(r){this.readyState="pausing";const i=()=>{this.readyState="paused",r()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||i()})),this.writable||(s++,this.once("drain",function(){--s||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(r){const i=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};k8(r,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const r=()=>{this.write([{type:"close"}])};this.readyState==="open"?r():this.once("open",r)}write(r){this.writable=!1,G8(r,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const r=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=x_()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(r,i)}}let O_=!1;try{O_=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const tM=O_;function nM(){}class rM extends eM{constructor(r){if(super(r),typeof location<"u"){const i=location.protocol==="https:";let s=location.port;s||(s=i?"443":"80"),this.xd=typeof location<"u"&&r.hostname!==location.hostname||s!==r.port}}doWrite(r,i){const s=this.request({method:"POST",data:r});s.on("success",i),s.on("error",(u,c)=>{this.onError("xhr post error",u,c)})}doPoll(){const r=this.request();r.on("data",this.onData.bind(this)),r.on("error",(i,s)=>{this.onError("xhr poll error",i,s)}),this.pollXhr=r}}class Jn extends dt{constructor(r,i,s){super(),this.createRequest=r,Au(this,s),this._opts=s,this._method=s.method||"GET",this._uri=i,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var r;const i=A_(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(i);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let u in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(u)&&s.setRequestHeader(u,this._opts.extraHeaders[u])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(r=this._opts.cookieJar)===null||r===void 0||r.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var u;s.readyState===3&&((u=this._opts.cookieJar)===null||u===void 0||u.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(u){this.setTimeoutFn(()=>{this._onError(u)},0);return}typeof document<"u"&&(this._index=Jn.requestsCount++,Jn.requests[this._index]=this)}_onError(r){this.emitReserved("error",r,this._xhr),this._cleanup(!0)}_cleanup(r){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=nM,r)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Jn.requests[this._index],this._xhr=null}}_onLoad(){const r=this._xhr.responseText;r!==null&&(this.emitReserved("data",r),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Jn.requestsCount=0;Jn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",v1);else if(typeof addEventListener=="function"){const t="onpagehide"in Sn?"pagehide":"unload";addEventListener(t,v1,!1)}}function v1(){for(let t in Jn.requests)Jn.requests.hasOwnProperty(t)&&Jn.requests[t].abort()}const aM=(function(){const t=R_({xdomain:!1});return t&&t.responseType!==null})();class iM extends rM{constructor(r){super(r);const i=r&&r.forceBase64;this.supportsBinary=aM&&!i}request(r={}){return Object.assign(r,{xd:this.xd},this.opts),new Jn(R_,this.uri(),r)}}function R_(t){const r=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!r||tM))return new XMLHttpRequest}catch{}if(!r)try{return new Sn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const w_=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class sM extends em{get name(){return"websocket"}doOpen(){const r=this.uri(),i=this.opts.protocols,s=w_?{}:A_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(r,i,s)}catch(u){return this.emitReserved("error",u)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=r=>this.onClose({description:"websocket connection closed",context:r}),this.ws.onmessage=r=>this.onData(r.data),this.ws.onerror=r=>this.onError("websocket error",r)}write(r){this.writable=!1;for(let i=0;i<r.length;i++){const s=r[i],u=i===r.length-1;Wh(s,this.supportsBinary,c=>{try{this.doWrite(s,c)}catch{}u&&Tu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const r=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=x_()),this.supportsBinary||(i.b64=1),this.createUri(r,i)}}const kd=Sn.WebSocket||Sn.MozWebSocket;class lM extends sM{createSocket(r,i,s){return w_?new kd(r,i,s):i?new kd(r,i):new kd(r)}doWrite(r,i){this.ws.send(i)}}class oM extends em{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(r){return this.emitReserved("error",r)}this._transport.closed.then(()=>{this.onClose()}).catch(r=>{this.onError("webtransport error",r)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(r=>{const i=F8(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=r.readable.pipeThrough(i).getReader(),u=q8();u.readable.pipeTo(r.writable),this._writer=u.writable.getWriter();const c=()=>{s.read().then(({done:h,value:m})=>{h||(this.onPacket(m),c())}).catch(h=>{})};c();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(r){this.writable=!1;for(let i=0;i<r.length;i++){const s=r[i],u=i===r.length-1;this._writer.write(s).then(()=>{u&&Tu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var r;(r=this._transport)===null||r===void 0||r.close()}}const uM={websocket:lM,webtransport:oM,polling:iM},cM=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,fM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function dh(t){if(t.length>8e3)throw"URI too long";const r=t,i=t.indexOf("["),s=t.indexOf("]");i!=-1&&s!=-1&&(t=t.substring(0,i)+t.substring(i,s).replace(/:/g,";")+t.substring(s,t.length));let u=cM.exec(t||""),c={},d=14;for(;d--;)c[fM[d]]=u[d]||"";return i!=-1&&s!=-1&&(c.source=r,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=dM(c,c.path),c.queryKey=hM(c,c.query),c}function dM(t,r){const i=/\/{2,9}/g,s=r.replace(i,"/").split("/");return(r.slice(0,1)=="/"||r.length===0)&&s.splice(0,1),r.slice(-1)=="/"&&s.splice(s.length-1,1),s}function hM(t,r){const i={};return r.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,u,c){u&&(i[u]=c)}),i}const hh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Qo=[];hh&&addEventListener("offline",()=>{Qo.forEach(t=>t())},!1);class sa extends dt{constructor(r,i){if(super(),this.binaryType=P8,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,r&&typeof r=="object"&&(i=r,r=null),r){const s=dh(r);i.hostname=s.host,i.secure=s.protocol==="https"||s.protocol==="wss",i.port=s.port,s.query&&(i.query=s.query)}else i.host&&(i.hostname=dh(i.host).host);Au(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(s=>{const u=s.prototype.name;this.transports.push(u),this._transportsByName[u]=s}),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},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=W8(this.opts.query)),hh&&(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"})},Qo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(r){const i=Object.assign({},this.opts.query);i.EIO=T_,i.transport=r,this.id&&(i.sid=this.id);const s=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[r]);return new this._transportsByName[r](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const r=this.opts.rememberUpgrade&&sa.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(r);i.open(),this.setTransport(i)}setTransport(r){this.transport&&this.transport.removeAllListeners(),this.transport=r,r.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",sa.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",r),this.emitReserved("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const i=new Error("server error");i.code=r.data,this._onError(i);break;case"message":this.emitReserved("data",r.data),this.emitReserved("message",r.data);break}}onHandshake(r){this.emitReserved("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this._pingInterval=r.pingInterval,this._pingTimeout=r.pingTimeout,this._maxPayload=r.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const r=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+r,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},r),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){const r=this._getWritablePackets();this.transport.send(r),this._prevBufferLen=r.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let s=0;s<this.writeBuffer.length;s++){const u=this.writeBuffer[s].data;if(u&&(i+=Q8(u)),s>0&&i>this._maxPayload)return this.writeBuffer.slice(0,s);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const r=Date.now()>this._pingTimeoutTime;return r&&(this._pingTimeoutTime=0,Tu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),r}write(r,i,s){return this._sendPacket("message",r,i,s),this}send(r,i,s){return this._sendPacket("message",r,i,s),this}_sendPacket(r,i,s,u){if(typeof i=="function"&&(u=i,i=void 0),typeof s=="function"&&(u=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const c={type:r,data:i,options:s};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),u&&this.once("flush",u),this.flush()}close(){const r=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),r()},s=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():r()}):this.upgrading?s():r()),this}_onError(r){if(sa.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",r),this._onClose("transport error",r)}_onClose(r,i){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(),hh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Qo.indexOf(this._offlineEventListener);s!==-1&&Qo.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",r,i),this.writeBuffer=[],this._prevBufferLen=0}}}sa.protocol=T_;class mM extends sa{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let r=0;r<this._upgrades.length;r++)this._probe(this._upgrades[r])}_probe(r){let i=this.createTransport(r),s=!1;sa.priorWebsocketSuccess=!1;const u=()=>{s||(i.send([{type:"ping",data:"probe"}]),i.once("packet",_=>{if(!s)if(_.type==="pong"&&_.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;sa.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(b(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const x=new Error("probe error");x.transport=i.name,this.emitReserved("upgradeError",x)}}))};function c(){s||(s=!0,b(),i.close(),i=null)}const d=_=>{const x=new Error("probe error: "+_);x.transport=i.name,c(),this.emitReserved("upgradeError",x)};function h(){d("transport closed")}function m(){d("socket closed")}function p(_){i&&_.name!==i.name&&c()}const b=()=>{i.removeListener("open",u),i.removeListener("error",d),i.removeListener("close",h),this.off("close",m),this.off("upgrading",p)};i.once("open",u),i.once("error",d),i.once("close",h),this.once("close",m),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&r!=="webtransport"?this.setTimeoutFn(()=>{s||i.open()},200):i.open()}onHandshake(r){this._upgrades=this._filterUpgrades(r.upgrades),super.onHandshake(r)}_filterUpgrades(r){const i=[];for(let s=0;s<r.length;s++)~this.transports.indexOf(r[s])&&i.push(r[s]);return i}}let pM=class extends mM{constructor(r,i={}){const s=typeof r=="object"?r:i;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(u=>uM[u]).filter(u=>!!u)),super(r,s)}};function gM(t,r="",i){let s=t;i=i||typeof location<"u"&&location,t==null&&(t=i.protocol+"//"+i.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=i.protocol+t:t=i.host+t),/^(https?|wss?):\/\//.test(t)||(typeof i<"u"?t=i.protocol+"//"+t:t="https://"+t),s=dh(t)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const c=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+c+":"+s.port+r,s.href=s.protocol+"://"+c+(i&&i.port===s.port?"":":"+s.port),s}const yM=typeof ArrayBuffer=="function",bM=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,C_=Object.prototype.toString,vM=typeof Blob=="function"||typeof Blob<"u"&&C_.call(Blob)==="[object BlobConstructor]",_M=typeof File=="function"||typeof File<"u"&&C_.call(File)==="[object FileConstructor]";function tm(t){return yM&&(t instanceof ArrayBuffer||bM(t))||vM&&t instanceof Blob||_M&&t instanceof File}function Ko(t,r){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let i=0,s=t.length;i<s;i++)if(Ko(t[i]))return!0;return!1}if(tm(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ko(t.toJSON(),!0);for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&Ko(t[i]))return!0;return!1}function EM(t){const r=[],i=t.data,s=t;return s.data=mh(i,r),s.attachments=r.length,{packet:s,buffers:r}}function mh(t,r){if(!t)return t;if(tm(t)){const i={_placeholder:!0,num:r.length};return r.push(t),i}else if(Array.isArray(t)){const i=new Array(t.length);for(let s=0;s<t.length;s++)i[s]=mh(t[s],r);return i}else if(typeof t=="object"&&!(t instanceof Date)){const i={};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=mh(t[s],r));return i}return t}function SM(t,r){return t.data=ph(t.data,r),delete t.attachments,t}function ph(t,r){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<r.length)return r[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let i=0;i<t.length;i++)t[i]=ph(t[i],r);else if(typeof t=="object")for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=ph(t[i],r));return t}const TM=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],AM=5;var Ce;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(Ce||(Ce={}));class xM{constructor(r){this.replacer=r}encode(r){return(r.type===Ce.EVENT||r.type===Ce.ACK)&&Ko(r)?this.encodeAsBinary({type:r.type===Ce.EVENT?Ce.BINARY_EVENT:Ce.BINARY_ACK,nsp:r.nsp,data:r.data,id:r.id}):[this.encodeAsString(r)]}encodeAsString(r){let i=""+r.type;return(r.type===Ce.BINARY_EVENT||r.type===Ce.BINARY_ACK)&&(i+=r.attachments+"-"),r.nsp&&r.nsp!=="/"&&(i+=r.nsp+","),r.id!=null&&(i+=r.id),r.data!=null&&(i+=JSON.stringify(r.data,this.replacer)),i}encodeAsBinary(r){const i=EM(r),s=this.encodeAsString(i.packet),u=i.buffers;return u.unshift(s),u}}function _1(t){return Object.prototype.toString.call(t)==="[object Object]"}class nm extends dt{constructor(r){super(),this.reviver=r}add(r){let i;if(typeof r=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(r);const s=i.type===Ce.BINARY_EVENT;s||i.type===Ce.BINARY_ACK?(i.type=s?Ce.EVENT:Ce.ACK,this.reconstructor=new OM(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(tm(r)||r.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(r),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+r)}decodeString(r){let i=0;const s={type:Number(r.charAt(0))};if(Ce[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===Ce.BINARY_EVENT||s.type===Ce.BINARY_ACK){const c=i+1;for(;r.charAt(++i)!=="-"&&i!=r.length;);const d=r.substring(c,i);if(d!=Number(d)||r.charAt(i)!=="-")throw new Error("Illegal attachments");s.attachments=Number(d)}if(r.charAt(i+1)==="/"){const c=i+1;for(;++i&&!(r.charAt(i)===","||i===r.length););s.nsp=r.substring(c,i)}else s.nsp="/";const u=r.charAt(i+1);if(u!==""&&Number(u)==u){const c=i+1;for(;++i;){const d=r.charAt(i);if(d==null||Number(d)!=d){--i;break}if(i===r.length)break}s.id=Number(r.substring(c,i+1))}if(r.charAt(++i)){const c=this.tryParse(r.substr(i));if(nm.isPayloadValid(s.type,c))s.data=c;else throw new Error("invalid payload")}return s}tryParse(r){try{return JSON.parse(r,this.reviver)}catch{return!1}}static isPayloadValid(r,i){switch(r){case Ce.CONNECT:return _1(i);case Ce.DISCONNECT:return i===void 0;case Ce.CONNECT_ERROR:return typeof i=="string"||_1(i);case Ce.EVENT:case Ce.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&TM.indexOf(i[0])===-1);case Ce.ACK:case Ce.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class OM{constructor(r){this.packet=r,this.buffers=[],this.reconPack=r}takeBinaryData(r){if(this.buffers.push(r),this.buffers.length===this.reconPack.attachments){const i=SM(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const RM=Object.freeze(Object.defineProperty({__proto__:null,Decoder:nm,Encoder:xM,get PacketType(){return Ce},protocol:AM},Symbol.toStringTag,{value:"Module"}));function In(t,r,i){return t.on(r,i),function(){t.off(r,i)}}const wM=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class N_ extends dt{constructor(r,i,s){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=r,this.nsp=i,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const r=this.io;this.subs=[In(r,"open",this.onopen.bind(this)),In(r,"packet",this.onpacket.bind(this)),In(r,"error",this.onerror.bind(this)),In(r,"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(...r){return r.unshift("message"),this.emit.apply(this,r),this}emit(r,...i){var s,u,c;if(wM.hasOwnProperty(r))throw new Error('"'+r.toString()+'" is a reserved event name');if(i.unshift(r),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const d={type:Ce.EVENT,data:i};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const b=this.ids++,_=i.pop();this._registerAckCallback(b,_),d.id=b}const h=(u=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||u===void 0?void 0:u.writable,m=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!h||(m?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(r,i){var s;const u=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(u===void 0){this.acks[r]=i;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[r];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===r&&this.sendBuffer.splice(h,1);i.call(this,new Error("operation has timed out"))},u),d=(...h)=>{this.io.clearTimeoutFn(c),i.apply(this,h)};d.withError=!0,this.acks[r]=d}emitWithAck(r,...i){return new Promise((s,u)=>{const c=(d,h)=>d?u(d):s(h);c.withError=!0,i.push(c),this.emit(r,...i)})}_addToQueue(r){let i;typeof r[r.length-1]=="function"&&(i=r.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:r,flags:Object.assign({fromQueue:!0},this.flags)};r.push((u,...c)=>s!==this._queue[0]?void 0:(u!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(u)):(this._queue.shift(),i&&i(null,...c)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(r=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!r||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(r){r.nsp=this.nsp,this.io._packet(r)}onopen(){typeof this.auth=="function"?this.auth(r=>{this._sendConnectPacket(r)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(r){this.packet({type:Ce.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},r):r})}onerror(r){this.connected||this.emitReserved("connect_error",r)}onclose(r,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",r,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(r=>{if(!this.sendBuffer.some(s=>String(s.id)===r)){const s=this.acks[r];delete this.acks[r],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(r){if(r.nsp===this.nsp)switch(r.type){case Ce.CONNECT:r.data&&r.data.sid?this.onconnect(r.data.sid,r.data.pid):this.emitReserved("connect_error",new 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 Ce.EVENT:case Ce.BINARY_EVENT:this.onevent(r);break;case Ce.ACK:case Ce.BINARY_ACK:this.onack(r);break;case Ce.DISCONNECT:this.ondisconnect();break;case Ce.CONNECT_ERROR:this.destroy();const s=new Error(r.data.message);s.data=r.data.data,this.emitReserved("connect_error",s);break}}onevent(r){const i=r.data||[];r.id!=null&&i.push(this.ack(r.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(r){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const s of i)s.apply(this,r)}super.emit.apply(this,r),this._pid&&r.length&&typeof r[r.length-1]=="string"&&(this._lastOffset=r[r.length-1])}ack(r){const i=this;let s=!1;return function(...u){s||(s=!0,i.packet({type:Ce.ACK,id:r,data:u}))}}onack(r){const i=this.acks[r.id];typeof i=="function"&&(delete this.acks[r.id],i.withError&&r.data.unshift(null),i.apply(this,r.data))}onconnect(r,i){this.id=r,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(r=>this.emitEvent(r)),this.receiveBuffer=[],this.sendBuffer.forEach(r=>{this.notifyOutgoingListeners(r),this.packet(r)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(r=>r()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ce.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(r){return this.flags.compress=r,this}get volatile(){return this.flags.volatile=!0,this}timeout(r){return this.flags.timeout=r,this}onAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(r),this}prependAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(r),this}offAny(r){if(!this._anyListeners)return this;if(r){const i=this._anyListeners;for(let s=0;s<i.length;s++)if(r===i[s])return i.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(r),this}prependAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(r),this}offAnyOutgoing(r){if(!this._anyOutgoingListeners)return this;if(r){const i=this._anyOutgoingListeners;for(let s=0;s<i.length;s++)if(r===i[s])return i.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(r){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const s of i)s.apply(this,r.data)}}}function Mi(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Mi.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),i=Math.floor(r*this.jitter*t);t=(Math.floor(r*10)&1)==0?t-i:t+i}return Math.min(t,this.max)|0};Mi.prototype.reset=function(){this.attempts=0};Mi.prototype.setMin=function(t){this.ms=t};Mi.prototype.setMax=function(t){this.max=t};Mi.prototype.setJitter=function(t){this.jitter=t};class gh extends dt{constructor(r,i){var s;super(),this.nsps={},this.subs=[],r&&typeof r=="object"&&(i=r,r=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,Au(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((s=i.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Mi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=r;const u=i.parser||RM;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(r){return arguments.length?(this._reconnection=!!r,r||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(r){return r===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=r,this)}reconnectionDelay(r){var i;return r===void 0?this._reconnectionDelay:(this._reconnectionDelay=r,(i=this.backoff)===null||i===void 0||i.setMin(r),this)}randomizationFactor(r){var i;return r===void 0?this._randomizationFactor:(this._randomizationFactor=r,(i=this.backoff)===null||i===void 0||i.setJitter(r),this)}reconnectionDelayMax(r){var i;return r===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=r,(i=this.backoff)===null||i===void 0||i.setMax(r),this)}timeout(r){return arguments.length?(this._timeout=r,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(r){if(~this._readyState.indexOf("open"))return this;this.engine=new pM(this.uri,this.opts);const i=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const u=In(i,"open",function(){s.onopen(),r&&r()}),c=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),r?r(h):this.maybeReconnectOnOpen()},d=In(i,"error",c);if(this._timeout!==!1){const h=this._timeout,m=this.setTimeoutFn(()=>{u(),c(new Error("timeout")),i.close()},h);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(u),this.subs.push(d),this}connect(r){return this.open(r)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const r=this.engine;this.subs.push(In(r,"ping",this.onping.bind(this)),In(r,"data",this.ondata.bind(this)),In(r,"error",this.onerror.bind(this)),In(r,"close",this.onclose.bind(this)),In(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(r){try{this.decoder.add(r)}catch(i){this.onclose("parse error",i)}}ondecoded(r){Tu(()=>{this.emitReserved("packet",r)},this.setTimeoutFn)}onerror(r){this.emitReserved("error",r)}socket(r,i){let s=this.nsps[r];return s?this._autoConnect&&!s.active&&s.connect():(s=new N_(this,r,i),this.nsps[r]=s),s}_destroy(r){const i=Object.keys(this.nsps);for(const s of i)if(this.nsps[s].active)return;this._close()}_packet(r){const i=this.encoder.encode(r);for(let s=0;s<i.length;s++)this.engine.write(i[s],r.options)}cleanup(){this.subs.forEach(r=>r()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(r,i){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",r,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const r=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const i=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{r.skipReconnect||(this.emitReserved("reconnect_attempt",r.backoff.attempts),!r.skipReconnect&&r.open(u=>{u?(r._reconnecting=!1,r.reconnect(),this.emitReserved("reconnect_error",u)):r.onreconnect()}))},i);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const r=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",r)}}const Xs={};function $o(t,r){typeof t=="object"&&(r=t,t=void 0),r=r||{};const i=gM(t,r.path||"/socket.io"),s=i.source,u=i.id,c=i.path,d=Xs[u]&&c in Xs[u].nsps,h=r.forceNew||r["force new connection"]||r.multiplex===!1||d;let m;return h?m=new gh(s,r):(Xs[u]||(Xs[u]=new gh(s,r)),m=Xs[u]),i.query&&!r.query&&(r.query=i.queryKey),m.socket(i.path,r)}Object.assign($o,{Manager:gh,Socket:N_,io:$o,connect:$o});const CM=[Te.ActionTypes.MESSAGE_TO_GUEST,Te.ActionTypes.EVENT_TO_GUEST,Te.ActionTypes.TYPING_ON,Te.ActionTypes.TYPING_OFF,Te.ActionTypes.RESTART_CHAT_REQUEST,...CO,...Sx,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],NM=({dispatch:t,getState:r})=>i=>{let s=null;return u=>{const c=i(u);if(u.type===Gh){s?.disconnect(),t(DO());const d=`/chat?${hu.stringify(u.querystrings)}`;s=$o(`/${u.clientName}${d}`),s.on("action",t),s.on("connect",()=>t(LO())),s.on("disconnect",()=>t(BO())),s.on("reconnect",()=>t(UO())),s.on("set-translations",(h,m)=>{t(x8({language:h,messages:v8(h,m)}))}),s.on("set-settings",h=>{t(w8(h))}),s.on("enable-conversation-rating",h=>t(Rx(h))),s.on("speech-transcription",h=>t(Ax(h))),s.on("restore-client-state",h=>{t(MO(h.sessionId)),t(Cx(h.messages))}),s.on("expand-window",({devices:h,initial:m=!1})=>{t({type:dv,devices:h,initial:m})}),s.on("restart-chat",()=>{t(al())}),s.on("login-success",h=>{t(EO({loginToken:h.loginToken}))})}else if(u.type==="start-screen/requestLogin")s?.emit("login-requested",u.payload);else if(u.type===bu)s?.emit("start-chat",u.payload);else if(u.type===vu)s?.emit("terminate-session",u.payload);else if(u.type===Ex)s?.emit("get-started",JSON.stringify(u));else if(u.type===Ch)s?.emit("audio-message",u.buffer);else if(u.type===Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST)s?.emit("conversation-rating",u.payload);else if(u.type===mv){const{connection:{sessionId:d}}=r();window.location.href=`/transcript-pdf/${d}`}else CM.indexOf(u.type)===-1&&u.meta===void 0&&s&&s.emit("action",JSON.stringify(u));return c}},M_=Uh(),MM={...D8(M_),intl:d_},yh=lO({middleware:t=>t().concat(NM),reducer:N8,preloadedState:MM});yh.subscribe(f8(()=>{const t=yh.getState();L8(M_,{connection:t.connection,startScreen:t.startScreen})},1e3));const DM=document.getElementById("root"),LM=X2.createRoot(DM);LM.render(y.jsx(YS,{store:yh,children:y.jsx(o8,{})}));
|
|
124
|
+
//# sourceMappingURL=index-BJKe2if_.js.map
|