@botfabrik/engine-webclient 4.96.0 → 4.96.1
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,7 +90,7 @@ 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 ly;function yA(){if(ly)return Le;ly=1;var n=typeof Symbol=="function"&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,h=n?Symbol.for("react.provider"):60109,d=n?Symbol.for("react.context"):60110,m=n?Symbol.for("react.async_mode"):60111,g=n?Symbol.for("react.concurrent_mode"):60111,y=n?Symbol.for("react.forward_ref"):60112,_=n?Symbol.for("react.suspense"):60113,T=n?Symbol.for("react.suspense_list"):60120,L=n?Symbol.for("react.memo"):60115,N=n?Symbol.for("react.lazy"):60116,V=n?Symbol.for("react.block"):60121,G=n?Symbol.for("react.fundamental"):60117,E=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function S(x){if(typeof x=="object"&&x!==null){var Z=x.$$typeof;switch(Z){case r:switch(x=x.type,x){case m:case g:case s:case c:case u:case _:return x;default:switch(x=x&&x.$$typeof,x){case d:case y:case N:case L:case h:return x;default:return Z}}case i:return Z}}}function I(x){return S(x)===g}return Le.AsyncMode=m,Le.ConcurrentMode=g,Le.ContextConsumer=d,Le.ContextProvider=h,Le.Element=r,Le.ForwardRef=y,Le.Fragment=s,Le.Lazy=N,Le.Memo=L,Le.Portal=i,Le.Profiler=c,Le.StrictMode=u,Le.Suspense=_,Le.isAsyncMode=function(x){return I(x)||S(x)===m},Le.isConcurrentMode=I,Le.isContextConsumer=function(x){return S(x)===d},Le.isContextProvider=function(x){return S(x)===h},Le.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===r},Le.isForwardRef=function(x){return S(x)===y},Le.isFragment=function(x){return S(x)===s},Le.isLazy=function(x){return S(x)===N},Le.isMemo=function(x){return S(x)===L},Le.isPortal=function(x){return S(x)===i},Le.isProfiler=function(x){return S(x)===c},Le.isStrictMode=function(x){return S(x)===u},Le.isSuspense=function(x){return S(x)===_},Le.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===s||x===g||x===c||x===u||x===_||x===T||typeof x=="object"&&x!==null&&(x.$$typeof===N||x.$$typeof===L||x.$$typeof===h||x.$$typeof===d||x.$$typeof===y||x.$$typeof===G||x.$$typeof===E||x.$$typeof===w||x.$$typeof===V)},Le.typeOf=S,Le}var oy;function vA(){return oy||(oy=1,kf.exports=yA()),kf.exports}var qf,uy;function bA(){if(uy)return qf;uy=1;var n=vA(),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[n.ForwardRef]=s,c[n.Memo]=u;function h(N){return n.isMemo(N)?u:c[N.$$typeof]||r}var d=Object.defineProperty,m=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,y=Object.getOwnPropertyDescriptor,_=Object.getPrototypeOf,T=Object.prototype;function L(N,V,G){if(typeof V!="string"){if(T){var E=_(V);E&&E!==T&&L(N,E,G)}var w=m(V);g&&(w=w.concat(g(V)));for(var S=h(N),I=h(V),x=0;x<w.length;++x){var Z=w[x];if(!i[Z]&&!(G&&G[Z])&&!(I&&I[Z])&&!(S&&S[Z])){var $=y(V,Z);try{d(N,Z,$)}catch{}}}}return N}return qf=L,qf}bA();var bd=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=H.createContext(null)):H.createContext(null);bd.Consumer;var _A=bd.Provider,EA=_A,SA=bd;function su(){var n=H.useContext(SA);return V1(n),n}var Yh;(function(n){n.formatDate="FormattedDate",n.formatTime="FormattedTime",n.formatNumber="FormattedNumber",n.formatList="FormattedList",n.formatDisplayName="FormattedDisplayName"})(Yh||(Yh={}));var Xh;(function(n){n.formatDate="FormattedDateParts",n.formatTime="FormattedTimeParts",n.formatNumber="FormattedNumberParts",n.formatList="FormattedListParts"})(Xh||(Xh={}));function X1(n){var r=function(i){var s=su(),u=i.value,c=i.children,h=iu(i,["value","children"]),d=typeof u=="string"?new Date(u||0):u,m=n==="formatDate"?s.formatDateToParts(d,h):s.formatTimeToParts(d,h);return c(m)};return r.displayName=Xh[n],r}function nl(n){var r=function(i){var s=su(),u=i.value,c=i.children,h=iu(i,["value","children"]),d=s[n](u,h);if(typeof c=="function")return c(d);var m=s.textComponent||H.Fragment;return H.createElement(m,null,d)};return r.displayName=Yh[n],r}function Z1(n){return n&&Object.keys(n).reduce(function(r,i){var s=n[i];return r[i]=z1(s)?pA(s):s,r},{})}var cy=function(n,r,i,s){for(var u=[],c=4;c<arguments.length;c++)u[c-4]=arguments[c];var h=Z1(s),d=Vh.apply(void 0,$n([n,r,i,h],u,!1));return Array.isArray(d)?mA(d):d},fy=function(n,r){var i=n.defaultRichTextElements,s=iu(n,["defaultRichTextElements"]),u=Z1(i),c=cA(ae(ae(ae({},Y1),s),{defaultRichTextElements:u}),r),h={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 ae(ae({},c),{formatMessage:cy.bind(null,h,c.formatters),$t:cy.bind(null,h,c.formatters)})};function Ff(n){return{locale:n.locale,timeZone:n.timeZone,fallbackOnEmptyString:n.fallbackOnEmptyString,formats:n.formats,textComponent:n.textComponent,messages:n.messages,defaultLocale:n.defaultLocale,defaultFormats:n.defaultFormats,onError:n.onError,onWarn:n.onWarn,wrapRichTextChunksInFragment:n.wrapRichTextChunksInFragment,defaultRichTextElements:n.defaultRichTextElements}}var TA=function(n){Tn(r,n);function r(){var i=n!==null&&n.apply(this,arguments)||this;return i.cache=q1(),i.state={cache:i.cache,intl:fy(Ff(i.props),i.cache),prevConfig:Ff(i.props)},i}return r.getDerivedStateFromProps=function(i,s){var u=s.prevConfig,c=s.cache,h=Ff(i);return gA(u,h)?null:{intl:fy(h,c),prevConfig:h}},r.prototype.render=function(){return V1(this.state.intl),H.createElement(EA,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=Y1,r}(H.PureComponent);nl("formatDate");nl("formatTime");nl("formatNumber");nl("formatList");nl("formatDisplayName");X1("formatDate");X1("formatTime");const AA="_app_1rj0t_1",xA={app:AA},ka=k2,Zt=P2,Q1="%[a-f0-9]{2}",hy=new RegExp("("+Q1+")|([^%]+?)","gi"),dy=new RegExp("("+Q1+")+","gi");function Zh(n,r){try{return[decodeURIComponent(n.join(""))]}catch{}if(n.length===1)return n;r=r||1;const i=n.slice(0,r),s=n.slice(r);return Array.prototype.concat.call([],Zh(i),Zh(s))}function OA(n){try{return decodeURIComponent(n)}catch{let r=n.match(hy)||[];for(let i=1;i<r.length;i++)n=Zh(r,i).join(""),r=n.match(hy)||[];return n}}function RA(n){const r={"%FE%FF":"��","%FF%FE":"��"};let i=dy.exec(n);for(;i;){try{r[i[0]]=decodeURIComponent(i[0])}catch{const u=OA(i[0]);u!==i[0]&&(r[i[0]]=u)}i=dy.exec(n)}r["%C2"]="�";const s=Object.keys(r);for(const u of s)n=n.replace(new RegExp(u,"g"),r[u]);return n}function wA(n){if(typeof n!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof n+"`");try{return decodeURIComponent(n)}catch{return RA(n)}}function CA(n,r){const i={};if(Array.isArray(r))for(const s of r){const u=Object.getOwnPropertyDescriptor(n,s);u?.enumerable&&Object.defineProperty(i,s,u)}else for(const s of Reflect.ownKeys(n)){const u=Object.getOwnPropertyDescriptor(n,s);if(u.enumerable){const c=n[s];r(s,c,n)&&Object.defineProperty(i,s,u)}}return i}function K1(n,r){if(!(typeof n=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(n===""||r==="")return[];const i=n.indexOf(r);return i===-1?[]:[n.slice(0,i),n.slice(i+r.length)]}const NA=n=>n==null,MA=n=>encodeURIComponent(n).replaceAll(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),Qh=Symbol("encodeFragmentIdentifier");function DA(n){switch(n.arrayFormat){case"index":return r=>(i,s)=>{const u=i.length;return s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,[ut(r,n),"[",u,"]"].join("")]:[...i,[ut(r,n),"[",ut(u,n),"]=",ut(s,n)].join("")]};case"bracket":return r=>(i,s)=>s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,[ut(r,n),"[]"].join("")]:[...i,[ut(r,n),"[]=",ut(s,n)].join("")];case"colon-list-separator":return r=>(i,s)=>s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,[ut(r,n),":list="].join("")]:[...i,[ut(r,n),":list=",ut(s,n)].join("")];case"comma":case"separator":case"bracket-separator":{const r=n.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(s,u)=>u===void 0||n.skipNull&&u===null||n.skipEmptyString&&u===""?s:(u=u===null?"":u,s.length===0?[[ut(i,n),r,ut(u,n)].join("")]:[[s,ut(u,n)].join(n.arrayFormatSeparator)])}default:return r=>(i,s)=>s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,ut(r,n)]:[...i,[ut(r,n),"=",ut(s,n)].join("")]}}function BA(n){let r;switch(n.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 c=typeof s=="string"&&s.includes(n.arrayFormatSeparator),h=typeof s=="string"&&!c&&Tr(s,n).includes(n.arrayFormatSeparator);s=h?Tr(s,n):s;const d=c||h?s.split(n.arrayFormatSeparator).map(m=>Tr(m,n)):s===null?s:Tr(s,n);u[i]=d};case"bracket-separator":return(i,s,u)=>{const c=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!c){u[i]=s&&Tr(s,n);return}const h=s===null?[]:Tr(s,n).split(n.arrayFormatSeparator);if(u[i]===void 0){u[i]=h;return}u[i]=[...u[i],...h]};default:return(i,s,u)=>{if(u[i]===void 0){u[i]=s;return}u[i]=[...[u[i]].flat(),s]}}}function $1(n){if(typeof n!="string"||n.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function ut(n,r){return r.encode?r.strict?MA(n):encodeURIComponent(n):n}function Tr(n,r){return r.decode?wA(n):n}function W1(n){return Array.isArray(n)?n.sort():typeof n=="object"?W1(Object.keys(n)).sort((r,i)=>Number(r)-Number(i)).map(r=>n[r]):n}function J1(n){const r=n.indexOf("#");return r!==-1&&(n=n.slice(0,r)),n}function LA(n){let r="";const i=n.indexOf("#");return i!==-1&&(r=n.slice(i)),r}function my(n,r,i){return i==="string"&&typeof n=="string"?n:typeof i=="function"&&typeof n=="string"?i(n):i==="boolean"&&n===null?!0:i==="boolean"&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")?n.toLowerCase()==="true":i==="boolean"&&n!==null&&(n.toLowerCase()==="1"||n.toLowerCase()==="0")?n.toLowerCase()==="1":i==="string[]"&&r.arrayFormat!=="none"&&typeof n=="string"?[n]:i==="number[]"&&r.arrayFormat!=="none"&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?[Number(n)]:i==="number"&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?Number(n):r.parseBooleans&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")?n.toLowerCase()==="true":r.parseNumbers&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?Number(n):n}function _d(n){n=J1(n);const r=n.indexOf("?");return r===-1?"":n.slice(r+1)}function Ed(n,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...r},$1(r.arrayFormatSeparator);const i=BA(r),s=Object.create(null);if(typeof n!="string"||(n=n.trim().replace(/^[?#&]/,""),!n))return s;for(const u of n.split("&")){if(u==="")continue;const c=r.decode?u.replaceAll("+"," "):u;let[h,d]=K1(c,"=");h===void 0&&(h=c),d=d===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?d:Tr(d,r),i(Tr(h,r),d,s)}for(const[u,c]of Object.entries(s))if(typeof c=="object"&&c!==null&&r.types[u]!=="string")for(const[h,d]of Object.entries(c)){const m=r.types[u]?r.types[u].replace("[]",""):void 0;c[h]=my(d,r,m)}else typeof c=="object"&&c!==null&&r.types[u]==="string"?s[u]=Object.values(c).join(r.arrayFormatSeparator):s[u]=my(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 h=s[c];return u[c]=h&&typeof h=="object"&&!Array.isArray(h)?W1(h):h,u},Object.create(null))}function eb(n,r){if(!n)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},$1(r.arrayFormatSeparator);const i=h=>r.skipNull&&NA(n[h])||r.skipEmptyString&&n[h]==="",s=DA(r),u={};for(const[h,d]of Object.entries(n))i(h)||(u[h]=d);const c=Object.keys(u);return r.sort!==!1&&c.sort(r.sort),c.map(h=>{const d=n[h];return d===void 0?"":d===null?ut(h,r):Array.isArray(d)?d.length===0&&r.arrayFormat==="bracket-separator"?ut(h,r)+"[]":d.reduce(s(h),[]).join("&"):ut(h,r)+"="+ut(d,r)}).filter(h=>h.length>0).join("&")}function tb(n,r){r={decode:!0,...r};let[i,s]=K1(n,"#");return i===void 0&&(i=n),{url:i?.split("?")?.[0]??"",query:Ed(_d(n),r),...r&&r.parseFragmentIdentifier&&s?{fragmentIdentifier:Tr(s,r)}:{}}}function nb(n,r){r={encode:!0,strict:!0,[Qh]:!0,...r};const i=J1(n.url).split("?")[0]||"",s=_d(n.url),u={...Ed(s,{sort:!1,...r}),...n.query};let c=eb(u,r);c&&=`?${c}`;let h=LA(n.url);if(typeof n.fragmentIdentifier=="string"){const d=new URL(i);d.hash=n.fragmentIdentifier,h=r[Qh]?d.hash:`#${n.fragmentIdentifier}`}return`${i}${c}${h}`}function rb(n,r,i){i={parseFragmentIdentifier:!0,[Qh]:!1,...i};const{url:s,query:u,fragmentIdentifier:c}=tb(n,i);return nb({url:s,query:CA(u,r),fragmentIdentifier:c},i)}function UA(n,r,i){const s=Array.isArray(r)?u=>!r.includes(u):(u,c)=>!r(u,c);return rb(n,s,i)}const lu=Object.freeze(Object.defineProperty({__proto__:null,exclude:UA,extract:_d,parse:Ed,parseUrl:tb,pick:rb,stringify:eb,stringifyUrl:nb},Symbol.toStringTag,{value:"Module"}));var Dn={},Bn={},Ie={},_o={},pe={},py;function cn(){return py||(py=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 gy;function HA(){if(gy)return _o;gy=1,Object.defineProperty(_o,"__esModule",{value:!0});const n=cn(),r=()=>({type:n.DRAWER_CLOSE});return _o.default=r,_o}var Eo={},yy;function jA(){if(yy)return Eo;yy=1,Object.defineProperty(Eo,"__esModule",{value:!0});const n=cn(),r=(i,s)=>({type:n.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:i,intent:s}});return Eo.default=r,Eo}var So={},vy;function IA(){if(vy)return So;vy=1,Object.defineProperty(So,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.GUEST_CONNECTED,payload:{sessionId:i}});return So.default=r,So}var To={},by;function zA(){if(by)return To;by=1,Object.defineProperty(To,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.GUEST_DISCONNECTED,payload:{sessionId:i}});return To.default=r,To}var Ao={},_y;function GA(){if(_y)return Ao;_y=1,Object.defineProperty(Ao,"__esModule",{value:!0});const n=cn(),r=(i,s)=>({type:n.GUEST_LOCALE_CHANGED,payload:{previousLocale:i,newLocale:s}});return Ao.default=r,Ao}var xo={},Ey;function kA(){if(Ey)return xo;Ey=1,Object.defineProperty(xo,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.DRAWER_OPEN,payload:{parameters:{contentUrl:i}}});return xo.default=r,xo}var Oo={},Ke={},Sy;function Sd(){if(Sy)return Ke;Sy=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.getStringRepresentationFromMessage=Ke.MessageTypeEnum=Ke.AudioMessage=Ke.FileMessage=Ke.ImageMessage=Ke.VideoMessage=Ke.MarkdownMessage=Ke.DetailMessage=Ke.TextMessage=Ke.Message=void 0;class n{type;sender;sources;quickReplies;constructor(_,T,L=[],N=[]){this.type=_,this.sender=T,this.sources=L,this.quickReplies=N}addQuickReply(_,T){this.quickReplies.push({label:_,payload:T})}}Ke.Message=n;class r extends n{text;constructor(_,T,L=[],N=[]){super(m.TEXT,T,L,N),this.text=_}}Ke.TextMessage=r;class i extends n{title;subtitle;text;imageUrl;itemUrl;buttons;constructor(_,T){super(m.DETAIL,T),this.title=_,this.text="",this.subtitle="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(_){this.imageUrl=_}setItemUrl(_){this.itemUrl=_}setSubtitle(_){this.subtitle=_}setText(_){this.text=_}addButton(_){this.buttons.push(_)}}Ke.DetailMessage=i;class s extends n{markdown;constructor(_,T,L=[],N=[]){super(m.MARKDOWN,T,L,N),this.markdown=_}}Ke.MarkdownMessage=s;class u extends n{url;constructor(_,T){super(m.VIDEO,T),this.url=_}}Ke.VideoMessage=u;class c extends n{url;constructor(_,T){super(m.IMAGE,T),this.url=_}}Ke.ImageMessage=c;class h extends n{url;constructor(_,T){super(m.FILE,T),this.url=_}}Ke.FileMessage=h;class d extends n{url;constructor(_,T){super(m.AUDIO,T),this.url=_}}Ke.AudioMessage=d;var m;(function(y){y.TEXT="TEXT",y.DETAIL="DETAIL",y.MARKDOWN="MARKDOWN",y.VIDEO="VIDEO",y.IMAGE="IMAGE",y.FILE="FILE",y.AUDIO="AUDIO"})(m||(Ke.MessageTypeEnum=m={}));const g=y=>{switch(y.type){case m.TEXT:return y.text;case m.DETAIL:{const _=y;return`${_.title} // ${_.subtitle}`}case m.MARKDOWN:return y.markdown;case m.VIDEO:return`Video Url: ${y.url}`;case m.IMAGE:return`Image Url: ${y.url}`;case m.FILE:return`File Url: ${y.url}`;case m.AUDIO:return`Audio Url: ${y.url}`;default:throw new Error("Unknown message type "+y.type)}};return Ke.getStringRepresentationFromMessage=g,Ke}var an={},Ty;function Td(){if(Ty)return an;Ty=1,Object.defineProperty(an,"__esModule",{value:!0}),an.UserType=an.PersonUser=an.GuestUser=an.BotUser=an.User=void 0;class n{type;id;name;avatar;constructor(h,d,m,g){this.type=h,this.id=d,this.name=m,this.avatar=g}}an.User=n;class r extends n{constructor(){super(u.BOT,null,"Chatbot","bot.svg")}}an.BotUser=r;class i extends n{constructor(){super(u.GUEST,null,"Guest","visitor.svg")}}an.GuestUser=i;class s extends n{constructor(h,d,m){super(u.PERSON,h,d,m)}}an.PersonUser=s;var u;return function(c){c.GUEST="GUEST",c.BOT="BOT",c.PERSON="PERSON"}(u||(an.UserType=u={})),an}var Ay;function qA(){if(Ay)return Oo;Ay=1,Object.defineProperty(Oo,"__esModule",{value:!0});const n=Sd(),r=Td(),i=cn(),s=u=>{const c=new n.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_FROM_GUEST,message:c}};return Oo.default=s,Oo}var Ro={},xy;function FA(){if(xy)return Ro;xy=1,Object.defineProperty(Ro,"__esModule",{value:!0});const n=Sd(),r=Td(),i=cn(),s=(u,c={})=>{const h=new n.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:h,payload:c}};return Ro.default=s,Ro}var wo={},Oy;function PA(){if(Oy)return wo;Oy=1,Object.defineProperty(wo,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.NLU_REQUEST_EVENT,event:i});return wo.default=r,wo}var Co={},Ry;function VA(){if(Ry)return Co;Ry=1,Object.defineProperty(Co,"__esModule",{value:!0});const n=cn(),r=()=>({type:n.RESTART_CHAT_REQUEST});return Co.default=r,Co}var No={},wy;function YA(){if(wy)return No;wy=1,Object.defineProperty(No,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.MESSAGE_TO_GUEST,message:i});return No.default=r,No}var Mo={},Cy;function XA(){if(Cy)return Mo;Cy=1,Object.defineProperty(Mo,"__esModule",{value:!0});const n=cn(),r=(i,s)=>({type:n.TRANSCRIPT_ITEM_GUEST_REACTION,payload:{actionId:i,reaction:s}});return Mo.default=r,Mo}var Ny;function ZA(){if(Ny)return Ie;Ny=1;var n=Ie&&Ie.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};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=n(HA());Ie.closeDrawer=r.default;const i=n(jA());Ie.feedbackFromGuestResponse=i.default;const s=n(IA());Ie.guestConnected=s.default;const u=n(zA());Ie.guestDisconnected=u.default;const c=n(GA());Ie.guestLocaleChanged=c.default;const h=n(kA());Ie.openDrawer=h.default;const d=n(qA());Ie.receiveTextMessageFromGuest=d.default;const m=n(FA());Ie.receiveTextMessageWithoutAnalysisFromGuest=m.default;const g=n(PA());Ie.requestNLUEvent=g.default;const y=n(VA());Ie.restartChatRequest=y.default;const _=n(YA());Ie.sendMessageToGuest=_.default;const T=n(XA());return Ie.transcriptItemGuestReaction=T.default,Ie}var Pf={},My;function QA(){return My||(My=1,Object.defineProperty(Pf,"__esModule",{value:!0})),Pf}var Dy;function KA(){return Dy||(Dy=1,function(n){var r=Bn&&Bn.__createBinding||(Object.create?function(c,h,d,m){m===void 0&&(m=d);var g=Object.getOwnPropertyDescriptor(h,d);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return h[d]}}),Object.defineProperty(c,m,g)}:function(c,h,d,m){m===void 0&&(m=d),c[m]=h[d]}),i=Bn&&Bn.__setModuleDefault||(Object.create?function(c,h){Object.defineProperty(c,"default",{enumerable:!0,value:h})}:function(c,h){c.default=h}),s=Bn&&Bn.__importStar||function(){var c=function(h){return c=Object.getOwnPropertyNames||function(d){var m=[];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(m[m.length]=g);return m},c(h)};return function(h){if(h&&h.__esModule)return h;var d={};if(h!=null)for(var m=c(h),g=0;g<m.length;g++)m[g]!=="default"&&r(d,h,m[g]);return i(d,h),d}}(),u=Bn&&Bn.__exportStar||function(c,h){for(var d in c)d!=="default"&&!Object.prototype.hasOwnProperty.call(h,d)&&r(h,c,d)};Object.defineProperty(n,"__esModule",{value:!0}),n.ActionTypes=n.Actions=void 0,n.Actions=s(ZA()),n.ActionTypes=s(cn()),u(QA(),n)}(Bn)),Bn}var sn={},Vf={},By;function $A(){return By||(By=1,Object.defineProperty(Vf,"__esModule",{value:!0})),Vf}var Ls={},Ly;function WA(){if(Ly)return Ls;Ly=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.NullableKnowledgeBaseAdapter=void 0;class n{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 Ls.NullableKnowledgeBaseAdapter=n,Ls}var Uy;function JA(){if(Uy)return sn;Uy=1;var n=sn&&sn.__createBinding||(Object.create?function(u,c,h,d){d===void 0&&(d=h);var m=Object.getOwnPropertyDescriptor(c,h);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[h]}}),Object.defineProperty(u,d,m)}:function(u,c,h,d){d===void 0&&(d=h),u[d]=c[h]}),r=sn&&sn.__setModuleDefault||(Object.create?function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}:function(u,c){u.default=c}),i=sn&&sn.__importStar||function(){var u=function(c){return u=Object.getOwnPropertyNames||function(h){var d=[];for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(d[d.length]=m);return d},u(c)};return function(c){if(c&&c.__esModule)return c;var h={};if(c!=null)for(var d=u(c),m=0;m<d.length;m++)d[m]!=="default"&&n(h,c,d[m]);return r(h,c),h}}();Object.defineProperty(sn,"__esModule",{value:!0}),sn.NullableCmsAdapter=sn.KnowledgeBase=void 0,sn.KnowledgeBase=i($A());const s=WA();return sn.NullableCmsAdapter={knowledgeBase:new s.NullableKnowledgeBaseAdapter},sn}var Na={},Yf={},Hy;function ex(){return Hy||(Hy=1,Object.defineProperty(Yf,"__esModule",{value:!0})),Yf}var Xf={},jy;function tx(){return jy||(jy=1,Object.defineProperty(Xf,"__esModule",{value:!0})),Xf}var Zf={},Iy;function nx(){return Iy||(Iy=1,Object.defineProperty(Zf,"__esModule",{value:!0})),Zf}var Qf={},zy;function rx(){return zy||(zy=1,Object.defineProperty(Qf,"__esModule",{value:!0})),Qf}var Us={},Gy;function ax(){if(Gy)return Us;Gy=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.checkMiddlewareCondition=void 0;const n=async(r,i,s)=>(Array.isArray(r)?r:[r]).reduce(async(c,h)=>await c?await h(i,s):!1,Promise.resolve(!0));return Us.checkMiddlewareCondition=n,Us}var Kf={},ky;function ix(){return ky||(ky=1,Object.defineProperty(Kf,"__esModule",{value:!0})),Kf}var $f={},qy;function sx(){return qy||(qy=1,Object.defineProperty($f,"__esModule",{value:!0})),$f}var Wf={},Fy;function lx(){return Fy||(Fy=1,Object.defineProperty(Wf,"__esModule",{value:!0})),Wf}var Py;function ox(){return Py||(Py=1,function(n){var r=Na&&Na.__createBinding||(Object.create?function(s,u,c,h){h===void 0&&(h=c);var d=Object.getOwnPropertyDescriptor(u,c);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,h,d)}:function(s,u,c,h){h===void 0&&(h=c),s[h]=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(n,"__esModule",{value:!0}),i(ex(),n),i(tx(),n),i(nx(),n),i(rx(),n),i(ax(),n),i(ix(),n),i(sx(),n),i(lx(),n)}(Na)),Na}var Ma={},Ln={},Vy;function ux(){if(Vy)return Ln;Vy=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.ButtonTypeEnum=Ln.PostbackButton=Ln.UrlButton=Ln.Button=void 0;class n{title;type;constructor(c,h){this.title=c,this.type=h}}Ln.Button=n;class r extends n{url;constructor(c,h){super(c,s.WEB_URL),this.url=h}}Ln.UrlButton=r;class i extends n{payload;constructor(c,h){super(c,s.POSTBACK),this.payload=h}}Ln.PostbackButton=i;var s;return function(u){u.WEB_URL="web_url",u.POSTBACK="postback"}(s||(Ln.ButtonTypeEnum=s={})),Ln}var Jf={},Yy;function cx(){return Yy||(Yy=1,Object.defineProperty(Jf,"__esModule",{value:!0})),Jf}var Hs={},Xy;function fx(){if(Xy)return Hs;Xy=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.SatisfactionEnum=void 0;var n;return function(r){r.GOOD="GOOD",r.BAD="BAD"}(n||(Hs.SatisfactionEnum=n={})),Hs}var Zy;function Qy(){return Zy||(Zy=1,function(n){var r=Ma&&Ma.__createBinding||(Object.create?function(s,u,c,h){h===void 0&&(h=c);var d=Object.getOwnPropertyDescriptor(u,c);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,h,d)}:function(s,u,c,h){h===void 0&&(h=c),s[h]=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(n,"__esModule",{value:!0}),i(ux(),n),i(cx(),n),i(fx(),n),i(Sd(),n),i(Td(),n)}(Ma)),Ma}var Ky;function hx(){return Ky||(Ky=1,function(n){var r=Dn&&Dn.__createBinding||(Object.create?function(c,h,d,m){m===void 0&&(m=d);var g=Object.getOwnPropertyDescriptor(h,d);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return h[d]}}),Object.defineProperty(c,m,g)}:function(c,h,d,m){m===void 0&&(m=d),c[m]=h[d]}),i=Dn&&Dn.__setModuleDefault||(Object.create?function(c,h){Object.defineProperty(c,"default",{enumerable:!0,value:h})}:function(c,h){c.default=h}),s=Dn&&Dn.__exportStar||function(c,h){for(var d in c)d!=="default"&&!Object.prototype.hasOwnProperty.call(h,d)&&r(h,c,d)},u=Dn&&Dn.__importStar||function(){var c=function(h){return c=Object.getOwnPropertyNames||function(d){var m=[];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(m[m.length]=g);return m},c(h)};return function(h){if(h&&h.__esModule)return h;var d={};if(h!=null)for(var m=c(h),g=0;g<m.length;g++)m[g]!=="default"&&r(d,h,m[g]);return i(d,h),d}}();Object.defineProperty(n,"__esModule",{value:!0}),n.Model=n.CMS=void 0,s(KA(),n),n.CMS=u(JA()),s(ox(),n),s(Qy(),n),n.Model=u(Qy())}(Dn)),Dn}var Oe=hx();const ab=n=>r=>(n.payload.type!==Oe.ActionTypes.MESSAGE_FROM_GUEST&&r(Oe.Actions.receiveTextMessageWithoutAnalysisFromGuest(n.label,n.payload)),r(n.payload)),ib=n=>(r,i)=>{const{quickReplies:s}=i().chat,u=s.find(c=>n.toLocaleLowerCase().indexOf(c.label.toLocaleLowerCase())>-1);return r(u?ab({...u,label:n}):JSON.parse(JSON.stringify(Oe.Actions.receiveTextMessageFromGuest(n))))},Ad="MESSAGE_TO_PARENT_PAGE",xd="RESTORE_PREVIOUS_CHAT_MESSAGES",Od="AUDIO_MESSAGE_FROM_USER",Rd="RECEIVE_SPEECH_TRANSCRIPTION",wd="ENABLE_CONVERSATION_RATING",sb="LOAD_SOURCE_INFOS_RESPONSE",Cd="LOAD_SOURCE_INFOS_ERROR",Nd="LOAD_SOURCE_INFOS_REQUEST",Md="CLOSE_SOURCE_INFOS",dx="webclient.get.started",lb="webclient.window.expand",ob="webclient.window.close",ub="webclient.transcript.pdf.download",mx=[Ad,xd,Od,Rd,wd,Nd,Md],px=n=>({type:Od,buffer:n}),gx=n=>({type:Rd,transcription:n}),yx=n=>({type:Oe.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:n}}}),vx=()=>({type:ub}),bx=({rating:n})=>({type:wd,payload:{rating:n}}),_x=(n,r)=>({type:Oe.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:n,feedback:r}}),cb=n=>Oe.Actions.requestNLUEvent(n),Ex=n=>({type:xd,messages:n}),Sx=n=>{switch(n.type){case Oe.ButtonTypeEnum.WEB_URL:return hb(n.url);case Oe.ButtonTypeEnum.POSTBACK:return n.payload;default:throw new Error(`unknown button type ${n.type}`)}},fb=n=>hb(n),hb=n=>({type:Ad,message:{type:"webclient.change.url",url:n}});/*! js-cookie v3.0.5 | MIT */function Do(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)n[s]=i[s]}return n}var Tx={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Kh(n,r){function i(u,c,h){if(!(typeof document>"u")){h=Do({},r,h),typeof h.expires=="number"&&(h.expires=new Date(Date.now()+h.expires*864e5)),h.expires&&(h.expires=h.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var m in h)h[m]&&(d+="; "+m,h[m]!==!0&&(d+="="+h[m].split(";")[0]));return document.cookie=u+"="+n.write(c,u)+d}}function s(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var c=document.cookie?document.cookie.split("; "):[],h={},d=0;d<c.length;d++){var m=c[d].split("="),g=m.slice(1).join("=");try{var y=decodeURIComponent(m[0]);if(h[y]=n.read(g,y),u===y)break}catch{}}return u?h[u]:h}}return Object.create({set:i,get:s,remove:function(u,c){i(u,"",Do({},c,{expires:-1}))},withAttributes:function(u){return Kh(this.converter,Do({},this.attributes,u))},withConverter:function(u){return Kh(Do({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}var Bo=Kh(Tx,{path:"/"});const xt=[];for(let n=0;n<256;++n)xt.push((n+256).toString(16).slice(1));function Ax(n,r=0){return(xt[n[r+0]]+xt[n[r+1]]+xt[n[r+2]]+xt[n[r+3]]+"-"+xt[n[r+4]]+xt[n[r+5]]+"-"+xt[n[r+6]]+xt[n[r+7]]+"-"+xt[n[r+8]]+xt[n[r+9]]+"-"+xt[n[r+10]]+xt[n[r+11]]+xt[n[r+12]]+xt[n[r+13]]+xt[n[r+14]]+xt[n[r+15]]).toLowerCase()}let eh;const xx=new Uint8Array(16);function Ox(){if(!eh){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");eh=crypto.getRandomValues.bind(crypto)}return eh(xx)}const Rx=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$y={randomUUID:Rx};function $h(n,r,i){if($y.randomUUID&&!n)return $y.randomUUID();n=n||{};const s=n.random??n.rng?.()??Ox();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,Ax(s)}function Ot(n){return`Minified Redux error #${n}; visit https://redux.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `}var wx=typeof Symbol=="function"&&Symbol.observable||"@@observable",Wy=wx,th=()=>Math.random().toString(36).substring(7).split("").join("."),Cx={INIT:`@@redux/INIT${th()}`,REPLACE:`@@redux/REPLACE${th()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${th()}`},Ko=Cx;function Dd(n){if(typeof n!="object"||n===null)return!1;let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r||Object.getPrototypeOf(n)===null}function db(n,r,i){if(typeof n!="function")throw new Error(Ot(2));if(typeof r=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Ot(0));if(typeof r=="function"&&typeof i>"u"&&(i=r,r=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Ot(1));return i(db)(n,r)}let s=n,u=r,c=new Map,h=c,d=0,m=!1;function g(){h===c&&(h=new Map,c.forEach((G,E)=>{h.set(E,G)}))}function y(){if(m)throw new Error(Ot(3));return u}function _(G){if(typeof G!="function")throw new Error(Ot(4));if(m)throw new Error(Ot(5));let E=!0;g();const w=d++;return h.set(w,G),function(){if(E){if(m)throw new Error(Ot(6));E=!1,g(),h.delete(w),c=null}}}function T(G){if(!Dd(G))throw new Error(Ot(7));if(typeof G.type>"u")throw new Error(Ot(8));if(typeof G.type!="string")throw new Error(Ot(17));if(m)throw new Error(Ot(9));try{m=!0,u=s(u,G)}finally{m=!1}return(c=h).forEach(w=>{w()}),G}function L(G){if(typeof G!="function")throw new Error(Ot(10));s=G,T({type:Ko.REPLACE})}function N(){const G=_;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(Ot(11));function w(){const I=E;I.next&&I.next(y())}return w(),{unsubscribe:G(w)}},[Wy](){return this}}}return T({type:Ko.INIT}),{dispatch:T,subscribe:_,getState:y,replaceReducer:L,[Wy]:N}}function Nx(n){Object.keys(n).forEach(r=>{const i=n[r];if(typeof i(void 0,{type:Ko.INIT})>"u")throw new Error(Ot(12));if(typeof i(void 0,{type:Ko.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ot(13))})}function mb(n){const r=Object.keys(n),i={};for(let c=0;c<r.length;c++){const h=r[c];typeof n[h]=="function"&&(i[h]=n[h])}const s=Object.keys(i);let u;try{Nx(i)}catch(c){u=c}return function(h={},d){if(u)throw u;let m=!1;const g={};for(let y=0;y<s.length;y++){const _=s[y],T=i[_],L=h[_],N=T(L,d);if(typeof N>"u")throw d&&d.type,new Error(Ot(14));g[_]=N,m=m||N!==L}return m=m||s.length!==Object.keys(h).length,m?g:h}}function $o(...n){return n.length===0?r=>r:n.length===1?n[0]:n.reduce((r,i)=>(...s)=>r(i(...s)))}function Mx(...n){return r=>(i,s)=>{const u=r(i,s);let c=()=>{throw new Error(Ot(15))};const h={getState:u.getState,dispatch:(m,...g)=>c(m,...g)},d=n.map(m=>m(h));return c=$o(...d)(u.dispatch),{...u,dispatch:c}}}function Dx(n){return Dd(n)&&"type"in n&&typeof n.type=="string"}var pb=Symbol.for("immer-nothing"),Jy=Symbol.for("immer-draftable"),on=Symbol.for("immer-state");function In(n,...r){throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var wi=Object.getPrototypeOf;function za(n){return!!n&&!!n[on]}function wr(n){return n?gb(n)||Array.isArray(n)||!!n[Jy]||!!n.constructor?.[Jy]||uu(n)||cu(n):!1}var Bx=Object.prototype.constructor.toString();function gb(n){if(!n||typeof n!="object")return!1;const r=wi(n);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)===Bx}function Wo(n,r){ou(n)===0?Reflect.ownKeys(n).forEach(i=>{r(i,n[i],n)}):n.forEach((i,s)=>r(s,i,n))}function ou(n){const r=n[on];return r?r.type_:Array.isArray(n)?1:uu(n)?2:cu(n)?3:0}function Wh(n,r){return ou(n)===2?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function yb(n,r,i){const s=ou(n);s===2?n.set(r,i):s===3?n.add(i):n[r]=i}function Lx(n,r){return n===r?n!==0||1/n===1/r:n!==n&&r!==r}function uu(n){return n instanceof Map}function cu(n){return n instanceof Set}function Ua(n){return n.copy_||n.base_}function Jh(n,r){if(uu(n))return new Map(n);if(cu(n))return new Set(n);if(Array.isArray(n))return Array.prototype.slice.call(n);const i=gb(n);if(r===!0||r==="class_only"&&!i){const s=Object.getOwnPropertyDescriptors(n);delete s[on];let u=Reflect.ownKeys(s);for(let c=0;c<u.length;c++){const h=u[c],d=s[h];d.writable===!1&&(d.writable=!0,d.configurable=!0),(d.get||d.set)&&(s[h]={configurable:!0,writable:!0,enumerable:d.enumerable,value:n[h]})}return Object.create(wi(n),s)}else{const s=wi(n);if(s!==null&&i)return{...n};const u=Object.create(s);return Object.assign(u,n)}}function Bd(n,r=!1){return fu(n)||za(n)||!wr(n)||(ou(n)>1&&(n.set=n.add=n.clear=n.delete=Ux),Object.freeze(n),r&&Object.entries(n).forEach(([i,s])=>Bd(s,!0))),n}function Ux(){In(2)}function fu(n){return Object.isFrozen(n)}var Hx={};function Ga(n){const r=Hx[n];return r||In(0,n),r}var $s;function vb(){return $s}function jx(n,r){return{drafts_:[],parent_:n,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ev(n,r){r&&(Ga("Patches"),n.patches_=[],n.inversePatches_=[],n.patchListener_=r)}function ed(n){td(n),n.drafts_.forEach(Ix),n.drafts_=null}function td(n){n===$s&&($s=n.parent_)}function tv(n){return $s=jx($s,n)}function Ix(n){const r=n[on];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function nv(n,r){r.unfinalizedDrafts_=r.drafts_.length;const i=r.drafts_[0];return n!==void 0&&n!==i?(i[on].modified_&&(ed(r),In(4)),wr(n)&&(n=Jo(r,n),r.parent_||eu(r,n)),r.patches_&&Ga("Patches").generateReplacementPatches_(i[on].base_,n,r.patches_,r.inversePatches_)):n=Jo(r,i,[]),ed(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),n!==pb?n:void 0}function Jo(n,r,i){if(fu(r))return r;const s=r[on];if(!s)return Wo(r,(u,c)=>rv(n,s,r,u,c,i)),r;if(s.scope_!==n)return r;if(!s.modified_)return eu(n,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;const u=s.copy_;let c=u,h=!1;s.type_===3&&(c=new Set(u),u.clear(),h=!0),Wo(c,(d,m)=>rv(n,s,u,d,m,i,h)),eu(n,u,!1),i&&n.patches_&&Ga("Patches").generatePatches_(s,i,n.patches_,n.inversePatches_)}return s.copy_}function rv(n,r,i,s,u,c,h){if(za(u)){const d=c&&r&&r.type_!==3&&!Wh(r.assigned_,s)?c.concat(s):void 0,m=Jo(n,u,d);if(yb(i,s,m),za(m))n.canAutoFreeze_=!1;else return}else h&&i.add(u);if(wr(u)&&!fu(u)){if(!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1)return;Jo(n,u),(!r||!r.scope_.parent_)&&typeof s!="symbol"&&Object.prototype.propertyIsEnumerable.call(i,s)&&eu(n,u)}}function eu(n,r,i=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&Bd(r,i)}function zx(n,r){const i=Array.isArray(n),s={type_:i?1:0,scope_:r?r.scope_:vb(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1};let u=s,c=Ld;i&&(u=[s],c=Ws);const{revoke:h,proxy:d}=Proxy.revocable(u,c);return s.draft_=d,s.revoke_=h,d}var Ld={get(n,r){if(r===on)return n;const i=Ua(n);if(!Wh(i,r))return Gx(n,i,r);const s=i[r];return n.finalized_||!wr(s)?s:s===nh(n.base_,r)?(rh(n),n.copy_[r]=rd(s,n)):s},has(n,r){return r in Ua(n)},ownKeys(n){return Reflect.ownKeys(Ua(n))},set(n,r,i){const s=bb(Ua(n),r);if(s?.set)return s.set.call(n.draft_,i),!0;if(!n.modified_){const u=nh(Ua(n),r),c=u?.[on];if(c&&c.base_===i)return n.copy_[r]=i,n.assigned_[r]=!1,!0;if(Lx(i,u)&&(i!==void 0||Wh(n.base_,r)))return!0;rh(n),nd(n)}return n.copy_[r]===i&&(i!==void 0||r in n.copy_)||Number.isNaN(i)&&Number.isNaN(n.copy_[r])||(n.copy_[r]=i,n.assigned_[r]=!0),!0},deleteProperty(n,r){return nh(n.base_,r)!==void 0||r in n.base_?(n.assigned_[r]=!1,rh(n),nd(n)):delete n.assigned_[r],n.copy_&&delete n.copy_[r],!0},getOwnPropertyDescriptor(n,r){const i=Ua(n),s=Reflect.getOwnPropertyDescriptor(i,r);return s&&{writable:!0,configurable:n.type_!==1||r!=="length",enumerable:s.enumerable,value:i[r]}},defineProperty(){In(11)},getPrototypeOf(n){return wi(n.base_)},setPrototypeOf(){In(12)}},Ws={};Wo(Ld,(n,r)=>{Ws[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});Ws.deleteProperty=function(n,r){return Ws.set.call(this,n,r,void 0)};Ws.set=function(n,r,i){return Ld.set.call(this,n[0],r,i,n[0])};function nh(n,r){const i=n[on];return(i?Ua(i):n)[r]}function Gx(n,r,i){const s=bb(r,i);return s?"value"in s?s.value:s.get?.call(n.draft_):void 0}function bb(n,r){if(!(r in n))return;let i=wi(n);for(;i;){const s=Object.getOwnPropertyDescriptor(i,r);if(s)return s;i=wi(i)}}function nd(n){n.modified_||(n.modified_=!0,n.parent_&&nd(n.parent_))}function rh(n){n.copy_||(n.copy_=Jh(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var kx=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,i,s)=>{if(typeof r=="function"&&typeof i!="function"){const c=i;i=r;const h=this;return function(m=c,...g){return h.produce(m,y=>i.call(this,y,...g))}}typeof i!="function"&&In(6),s!==void 0&&typeof s!="function"&&In(7);let u;if(wr(r)){const c=tv(this),h=rd(r,void 0);let d=!0;try{u=i(h),d=!1}finally{d?ed(c):td(c)}return ev(c,s),nv(u,c)}else if(!r||typeof r!="object"){if(u=i(r),u===void 0&&(u=r),u===pb&&(u=void 0),this.autoFreeze_&&Bd(u,!0),s){const c=[],h=[];Ga("Patches").generateReplacementPatches_(r,u,c,h),s(c,h)}return u}else In(1,r)},this.produceWithPatches=(r,i)=>{if(typeof r=="function")return(h,...d)=>this.produceWithPatches(h,m=>r(m,...d));let s,u;return[this.produce(r,i,(h,d)=>{s=h,u=d}),s,u]},typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze),typeof n?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(n.useStrictShallowCopy)}createDraft(n){wr(n)||In(8),za(n)&&(n=qx(n));const r=tv(this),i=rd(n,void 0);return i[on].isManual_=!0,td(r),i}finishDraft(n,r){const i=n&&n[on];(!i||!i.isManual_)&&In(9);const{scope_:s}=i;return ev(s,r),nv(void 0,s)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}applyPatches(n,r){let i;for(i=r.length-1;i>=0;i--){const u=r[i];if(u.path.length===0&&u.op==="replace"){n=u.value;break}}i>-1&&(r=r.slice(i+1));const s=Ga("Patches").applyPatches_;return za(n)?s(n,r):this.produce(n,u=>s(u,r))}};function rd(n,r){const i=uu(n)?Ga("MapSet").proxyMap_(n,r):cu(n)?Ga("MapSet").proxySet_(n,r):zx(n,r);return(r?r.scope_:vb()).drafts_.push(i),i}function qx(n){return za(n)||In(10,n),_b(n)}function _b(n){if(!wr(n)||fu(n))return n;const r=n[on];let i;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,i=Jh(n,r.scope_.immer_.useStrictShallowCopy_)}else i=Jh(n,!0);return Wo(i,(s,u)=>{yb(i,s,_b(u))}),r&&(r.finalized_=!1),i}var un=new kx,Eb=un.produce;un.produceWithPatches.bind(un);un.setAutoFreeze.bind(un);un.setUseStrictShallowCopy.bind(un);un.applyPatches.bind(un);un.createDraft.bind(un);un.finishDraft.bind(un);function Sb(n){return({dispatch:i,getState:s})=>u=>c=>typeof c=="function"?c(i,s,n):u(c)}var Fx=Sb(),Px=Sb,Vx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?$o:$o.apply(null,arguments)};function av(n,r){function i(...s){if(r){let u=r(...s);if(!u)throw new Error(Ar(0));return{type:n,payload:u.payload,..."meta"in u&&{meta:u.meta},..."error"in u&&{error:u.error}}}return{type:n,payload:s[0]}}return i.toString=()=>`${n}`,i.type=n,i.match=s=>Dx(s)&&s.type===n,i}var Tb=class Xs extends Array{constructor(...r){super(...r),Object.setPrototypeOf(this,Xs.prototype)}static get[Symbol.species](){return Xs}concat(...r){return super.concat.apply(this,r)}prepend(...r){return r.length===1&&Array.isArray(r[0])?new Xs(...r[0].concat(this)):new Xs(...r.concat(this))}};function iv(n){return wr(n)?Eb(n,()=>{}):n}function Lo(n,r,i){return n.has(r)?n.get(r):n.set(r,i(r)).get(r)}function Yx(n){return typeof n=="boolean"}var Xx=()=>function(r){const{thunk:i=!0,immutableCheck:s=!0,serializableCheck:u=!0,actionCreatorCheck:c=!0}=r??{};let h=new Tb;return i&&(Yx(i)?h.push(Fx):h.push(Px(i.extraArgument))),h},Zx="RTK_autoBatch",sv=n=>r=>{setTimeout(r,n)},Qx=(n={type:"raf"})=>r=>(...i)=>{const s=r(...i);let u=!0,c=!1,h=!1;const d=new Set,m=n.type==="tick"?queueMicrotask:n.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:sv(10):n.type==="callback"?n.queueNotification:sv(n.timeout),g=()=>{h=!1,c&&(c=!1,d.forEach(y=>y()))};return Object.assign({},s,{subscribe(y){const _=()=>u&&y(),T=s.subscribe(_);return d.add(y),()=>{T(),d.delete(y)}},dispatch(y){try{return u=!y?.meta?.[Zx],c=!u,c&&(h||(h=!0,m(g))),s.dispatch(y)}finally{u=!0}}})},Kx=n=>function(i){const{autoBatch:s=!0}=i??{};let u=new Tb(n);return s&&u.push(Qx(typeof s=="object"?s:void 0)),u};function $x(n){const r=Xx(),{reducer:i=void 0,middleware:s,devTools:u=!0,preloadedState:c=void 0,enhancers:h=void 0}=n||{};let d;if(typeof i=="function")d=i;else if(Dd(i))d=mb(i);else throw new Error(Ar(1));let m;typeof s=="function"?m=s(r):m=r();let g=$o;u&&(g=Vx({trace:!1,...typeof u=="object"&&u}));const y=Mx(...m),_=Kx(y);let T=typeof h=="function"?h(_):_();const L=g(...T);return db(d,c,L)}function Ab(n){const r={},i=[];let s;const u={addCase(c,h){const d=typeof c=="string"?c:c.type;if(!d)throw new Error(Ar(28));if(d in r)throw new Error(Ar(29));return r[d]=h,u},addMatcher(c,h){return i.push({matcher:c,reducer:h}),u},addDefaultCase(c){return s=c,u}};return n(u),[r,i,s]}function Wx(n){return typeof n=="function"}function Jx(n,r){let[i,s,u]=Ab(r),c;if(Wx(n))c=()=>iv(n());else{const d=iv(n);c=()=>d}function h(d=c(),m){let g=[i[m.type],...s.filter(({matcher:y})=>y(m)).map(({reducer:y})=>y)];return g.filter(y=>!!y).length===0&&(g=[u]),g.reduce((y,_)=>{if(_)if(za(y)){const L=_(y,m);return L===void 0?y:L}else{if(wr(y))return Eb(y,T=>_(T,m));{const T=_(y,m);if(T===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}}return y},d)}return h.getInitialState=c,h}var eO=Symbol.for("rtk-slice-createasyncthunk");function tO(n,r){return`${n}/${r}`}function nO({creators:n}={}){const r=n?.asyncThunk?.[eO];return function(s){const{name:u,reducerPath:c=u}=s;if(!u)throw new Error(Ar(11));const h=(typeof s.reducers=="function"?s.reducers(aO()):s.reducers)||{},d=Object.keys(h),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},g={addCase(S,I){const x=typeof S=="string"?S:S.type;if(!x)throw new Error(Ar(12));if(x in m.sliceCaseReducersByType)throw new Error(Ar(13));return m.sliceCaseReducersByType[x]=I,g},addMatcher(S,I){return m.sliceMatchers.push({matcher:S,reducer:I}),g},exposeAction(S,I){return m.actionCreators[S]=I,g},exposeCaseReducer(S,I){return m.sliceCaseReducersByName[S]=I,g}};d.forEach(S=>{const I=h[S],x={reducerName:S,type:tO(u,S),createNotation:typeof s.reducers=="function"};sO(I)?oO(x,I,g,r):iO(x,I,g)});function y(){const[S={},I=[],x=void 0]=typeof s.extraReducers=="function"?Ab(s.extraReducers):[s.extraReducers],Z={...S,...m.sliceCaseReducersByType};return Jx(s.initialState,$=>{for(let ie in Z)$.addCase(ie,Z[ie]);for(let ie of m.sliceMatchers)$.addMatcher(ie.matcher,ie.reducer);for(let ie of I)$.addMatcher(ie.matcher,ie.reducer);x&&$.addDefaultCase(x)})}const _=S=>S,T=new Map,L=new WeakMap;let N;function V(S,I){return N||(N=y()),N(S,I)}function G(){return N||(N=y()),N.getInitialState()}function E(S,I=!1){function x($){let ie=$[S];return typeof ie>"u"&&I&&(ie=Lo(L,x,G)),ie}function Z($=_){const ie=Lo(T,I,()=>new WeakMap);return Lo(ie,$,()=>{const _e={};for(const[Re,se]of Object.entries(s.selectors??{}))_e[Re]=rO(se,$,()=>Lo(L,$,G),I);return _e})}return{reducerPath:S,getSelectors:Z,get selectors(){return Z(x)},selectSlice:x}}const w={name:u,reducer:V,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:G,...E(c),injectInto(S,{reducerPath:I,...x}={}){const Z=I??c;return S.inject({reducerPath:Z,reducer:V},x),{...w,...E(Z,!0)}}};return w}}function rO(n,r,i,s){function u(c,...h){let d=r(c);return typeof d>"u"&&s&&(d=i()),n(d,...h)}return u.unwrapped=n,u}var Ud=nO();function aO(){function n(r,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:r,...i}}return n.withTypes=()=>n,{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:n}}function iO({type:n,reducerName:r,createNotation:i},s,u){let c,h;if("reducer"in s){if(i&&!lO(s))throw new Error(Ar(17));c=s.reducer,h=s.prepare}else c=s;u.addCase(n,c).exposeCaseReducer(r,c).exposeAction(r,h?av(n,h):av(n))}function sO(n){return n._reducerDefinitionType==="asyncThunk"}function lO(n){return n._reducerDefinitionType==="reducerWithPrepare"}function oO({type:n,reducerName:r},i,s,u){if(!u)throw new Error(Ar(18));const{payloadCreator:c,fulfilled:h,pending:d,rejected:m,settled:g,options:y}=i,_=u(n,c,y);s.exposeAction(r,_),h&&s.addCase(_.fulfilled,h),d&&s.addCase(_.pending,d),m&&s.addCase(_.rejected,m),g&&s.addMatcher(_.settled,g),s.exposeCaseReducer(r,{fulfilled:h||Uo,pending:d||Uo,rejected:m||Uo,settled:g||Uo})}function Uo(){}function Ar(n){return`Minified Redux Toolkit error #${n}; visit https://redux-toolkit.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `}const uO={formValues:{}},xb=Ud({name:"start-screen",initialState:uO,reducers:{showStartScreen(n){n.startScreenStatus="VISIBLE",n.formValues={}},startChat(n,r){n.startScreenStatus="HIDDEN",n.formValues=r.payload}}}),{startChat:cO,showStartScreen:fO}=xb.actions,hO=xb.reducer,Ob="RESET_CHAT_STATE",Rb="TOGGLE_TRANSCRIPT_MAIL_OVERLAY",dO=()=>({type:ob}),mO=()=>({type:Ob}),wb=()=>({type:Rb}),lv=(n,r,i)=>(s,u)=>{try{const c=u().connection.sessionId;if(!c)throw new Error("Session ID is not available");s({type:Nd,payload:{chunkId:i}}),ov(n,c,r,i,!1,s),ov(n,c,r,i,!0,s)}catch(c){console.error("Error loading source infos:",c),s({type:Cd})}},ov=(n,r,i,s,u,c)=>{const h=`/${n}/me/chat-widget/transcript/${i}/chunks/${s}?highlight=${u}`;fetch(h,{headers:{"x-bubble-chat-session-id":r}}).then(d=>{if(!d.ok)throw new Error(`HTTP error! Status: ${d.status}`);return d.json()}).then(d=>{const m={...d,chunkId:s,highlighted:u};c({type:sb,payload:m})}).catch(d=>{console.error("Error fetching source infos:",d),c({type:Cd,payload:{highlighted:u}})})},pO=()=>({type:Md}),Hd="CONNECT",jd="CONNECTING",Id="CONNECTED",zd="DISCONNECTED",Gd="RECONNECTED",kd="RESTORE_SESSION_ID",hu="START",du="CLEAR_SESSION_ID",gO=[Hd,jd,Id,zd,Gd,kd],yO=(n,r)=>({type:Hd,clientName:n,querystrings:r}),vO=n=>({type:kd,sessionId:n}),bO=()=>({type:jd}),_O=()=>({type:Id}),EO=()=>({type:zd}),SO=()=>({type:Gd}),Cb=(n,r)=>(i,s)=>{const u=s().connection,c=s().startScreen.formValues;let h=u.sessionId;h===void 0&&(h=$h());let d=u.userId;if(d===void 0){const m=Bo.get("bubble-chat-user-id")||Bo.get("bubble-chat-userId")||Bo.get("bf-webclient-userId");d=m||$h(),Bo.set("bubble-chat-user-id",d)}i({type:hu,payload:{sessionId:h,userId:d,clientName:n,querystrings:{...r,...c}}})},mu=(n,r)=>(i,s)=>{const u=s().connection.sessionId||"";if(i(TO(u)),i(mO()),s().settings.enableStartScreen)i(fO());else return i(Cb(n,r))},TO=n=>({type:du,payload:{sessionId:n}}),tt=()=>{const n=su();return i=>{const s=n.formatMessage({id:i});return s===i?void 0:s}};var ja=(n=>(n[n.CONNECTING=0]="CONNECTING",n[n.CONNECTED=1]="CONNECTED",n[n.RECONNECTED=2]="RECONNECTED",n[n.DISCONNECTED=3]="DISCONNECTED",n))(ja||{}),tu=(n=>(n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON",n))(tu||{});const AO="_container_q2uun_1",xO="_chatcontent_q2uun_6",OO="_accessabilityHidden_q2uun_12",ah={container:AO,chatcontent:xO,accessabilityHidden:OO},RO="_messageContainer_ofi0g_1",wO="_messages_ofi0g_12",uv={messageContainer:RO,messages:wO};function Ha(){return Ha=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])}return n},Ha.apply(this,arguments)}const CO=["children","options"],NO={footnoteReference:"7"},cv=["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((n,r)=>(n[r.toLowerCase()]=r,n),{class:"className",for:"htmlFor"}),fv={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},MO=["style","script","pre"],DO=["src","href","data","formAction","srcDoc","action"],BO=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,LO=/mailto:/i,UO=/\n{2,}$/,hv=/^(\s*>[\s\S]*?)(?=\n\n|$)/,HO=/^ *> ?/gm,jO=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,IO=/^ {2,}\n/,zO=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,dv=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,mv=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,GO=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,kO=/^(?:\n *)*\n/,qO=/\r\n?/g,FO=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,PO=/^\[\^([^\]]+)]/,VO=/\f/g,YO=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,XO=/^\s*?\[(x|\s)\]/,pv=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,gv=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,yv=/^([^\n]+)\n *(=|-){3,} *\n/,ih=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,ZO=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,vv=/^<!--[\s\S]*?(?:-->)/,QO=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,sh=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,KO=/^\{.*\}$/,$O=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,WO=/^<([^ >]+@[^ >]+)>/,JO=/^<([^ >]+:\/[^ >]+)>/,eR=/-([a-z])?/gi,bv=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,tR=/^[^\n]+(?: \n|\n{2,})/,nR=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,rR=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,aR=/^\[([^\]]*)\] ?\[([^\]]*)\]/,iR=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,sR=/\t/g,lR=/(^ *\||\| *$)/g,oR=/^ *:-+: *$/,uR=/^ *:-+ *$/,cR=/^ *-+: *$/,pu="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",fR=RegExp(`^([*_])\\1${pu}\\1\\1(?!\\1)`),hR=RegExp(`^([*_])${pu}\\1(?!\\1)`),dR=RegExp(`^(==)${pu}\\1`),mR=RegExp(`^(~~)${pu}\\1`),pR=/^\\([^0-9A-Za-z\s])/,gR=/\\([^0-9A-Za-z\s])/g,yR=/^[\s\S](?:(?! |[0-9]\.|http)[^=*_~\-\n<`\\\[!])*/,vR=/^\n+/,bR=/^([ \t]*)/,_R=/(?:^|\n)( *)$/,qd="(?:\\d+\\.)",Fd="(?:[*+-])";function Nb(n){return"( *)("+(n===1?qd:Fd)+") +"}const Mb=Nb(1),Db=Nb(2);function Bb(n){return RegExp("^"+(n===1?Mb:Db))}const ER=Bb(1),SR=Bb(2);function Lb(n){return RegExp("^"+(n===1?Mb:Db)+"[^\\n]*(?:\\n(?!\\1"+(n===1?qd:Fd)+" )[^\\n]*)*(\\n|$)","gm")}const TR=Lb(1),AR=Lb(2);function Ub(n){const r=n===1?qd:Fd;return RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}const Hb=Ub(1),jb=Ub(2);function _v(n,r){const i=r===1,s=i?Hb:jb,u=i?TR:AR,c=i?ER:SR;return{t:h=>c.test(h),o:rl(function(h,d){const m=_R.exec(d.prevCapture);return m&&(d.list||!d.inline&&!d.simple)?s.exec(h=m[1]+h):null}),i:1,u(h,d,m){const g=i?+h[2]:void 0,y=h[0].replace(UO,`
|
|
93
|
+
*/var ly;function yA(){if(ly)return Le;ly=1;var n=typeof Symbol=="function"&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,h=n?Symbol.for("react.provider"):60109,d=n?Symbol.for("react.context"):60110,m=n?Symbol.for("react.async_mode"):60111,g=n?Symbol.for("react.concurrent_mode"):60111,y=n?Symbol.for("react.forward_ref"):60112,_=n?Symbol.for("react.suspense"):60113,T=n?Symbol.for("react.suspense_list"):60120,L=n?Symbol.for("react.memo"):60115,N=n?Symbol.for("react.lazy"):60116,V=n?Symbol.for("react.block"):60121,G=n?Symbol.for("react.fundamental"):60117,E=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function S(x){if(typeof x=="object"&&x!==null){var Z=x.$$typeof;switch(Z){case r:switch(x=x.type,x){case m:case g:case s:case c:case u:case _:return x;default:switch(x=x&&x.$$typeof,x){case d:case y:case N:case L:case h:return x;default:return Z}}case i:return Z}}}function I(x){return S(x)===g}return Le.AsyncMode=m,Le.ConcurrentMode=g,Le.ContextConsumer=d,Le.ContextProvider=h,Le.Element=r,Le.ForwardRef=y,Le.Fragment=s,Le.Lazy=N,Le.Memo=L,Le.Portal=i,Le.Profiler=c,Le.StrictMode=u,Le.Suspense=_,Le.isAsyncMode=function(x){return I(x)||S(x)===m},Le.isConcurrentMode=I,Le.isContextConsumer=function(x){return S(x)===d},Le.isContextProvider=function(x){return S(x)===h},Le.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===r},Le.isForwardRef=function(x){return S(x)===y},Le.isFragment=function(x){return S(x)===s},Le.isLazy=function(x){return S(x)===N},Le.isMemo=function(x){return S(x)===L},Le.isPortal=function(x){return S(x)===i},Le.isProfiler=function(x){return S(x)===c},Le.isStrictMode=function(x){return S(x)===u},Le.isSuspense=function(x){return S(x)===_},Le.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===s||x===g||x===c||x===u||x===_||x===T||typeof x=="object"&&x!==null&&(x.$$typeof===N||x.$$typeof===L||x.$$typeof===h||x.$$typeof===d||x.$$typeof===y||x.$$typeof===G||x.$$typeof===E||x.$$typeof===w||x.$$typeof===V)},Le.typeOf=S,Le}var oy;function vA(){return oy||(oy=1,kf.exports=yA()),kf.exports}var qf,uy;function bA(){if(uy)return qf;uy=1;var n=vA(),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[n.ForwardRef]=s,c[n.Memo]=u;function h(N){return n.isMemo(N)?u:c[N.$$typeof]||r}var d=Object.defineProperty,m=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,y=Object.getOwnPropertyDescriptor,_=Object.getPrototypeOf,T=Object.prototype;function L(N,V,G){if(typeof V!="string"){if(T){var E=_(V);E&&E!==T&&L(N,E,G)}var w=m(V);g&&(w=w.concat(g(V)));for(var S=h(N),I=h(V),x=0;x<w.length;++x){var Z=w[x];if(!i[Z]&&!(G&&G[Z])&&!(I&&I[Z])&&!(S&&S[Z])){var $=y(V,Z);try{d(N,Z,$)}catch{}}}}return N}return qf=L,qf}bA();var bd=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=H.createContext(null)):H.createContext(null);bd.Consumer;var _A=bd.Provider,EA=_A,SA=bd;function su(){var n=H.useContext(SA);return V1(n),n}var Yh;(function(n){n.formatDate="FormattedDate",n.formatTime="FormattedTime",n.formatNumber="FormattedNumber",n.formatList="FormattedList",n.formatDisplayName="FormattedDisplayName"})(Yh||(Yh={}));var Xh;(function(n){n.formatDate="FormattedDateParts",n.formatTime="FormattedTimeParts",n.formatNumber="FormattedNumberParts",n.formatList="FormattedListParts"})(Xh||(Xh={}));function X1(n){var r=function(i){var s=su(),u=i.value,c=i.children,h=iu(i,["value","children"]),d=typeof u=="string"?new Date(u||0):u,m=n==="formatDate"?s.formatDateToParts(d,h):s.formatTimeToParts(d,h);return c(m)};return r.displayName=Xh[n],r}function nl(n){var r=function(i){var s=su(),u=i.value,c=i.children,h=iu(i,["value","children"]),d=s[n](u,h);if(typeof c=="function")return c(d);var m=s.textComponent||H.Fragment;return H.createElement(m,null,d)};return r.displayName=Yh[n],r}function Z1(n){return n&&Object.keys(n).reduce(function(r,i){var s=n[i];return r[i]=z1(s)?pA(s):s,r},{})}var cy=function(n,r,i,s){for(var u=[],c=4;c<arguments.length;c++)u[c-4]=arguments[c];var h=Z1(s),d=Vh.apply(void 0,$n([n,r,i,h],u,!1));return Array.isArray(d)?mA(d):d},fy=function(n,r){var i=n.defaultRichTextElements,s=iu(n,["defaultRichTextElements"]),u=Z1(i),c=cA(ae(ae(ae({},Y1),s),{defaultRichTextElements:u}),r),h={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 ae(ae({},c),{formatMessage:cy.bind(null,h,c.formatters),$t:cy.bind(null,h,c.formatters)})};function Ff(n){return{locale:n.locale,timeZone:n.timeZone,fallbackOnEmptyString:n.fallbackOnEmptyString,formats:n.formats,textComponent:n.textComponent,messages:n.messages,defaultLocale:n.defaultLocale,defaultFormats:n.defaultFormats,onError:n.onError,onWarn:n.onWarn,wrapRichTextChunksInFragment:n.wrapRichTextChunksInFragment,defaultRichTextElements:n.defaultRichTextElements}}var TA=function(n){Tn(r,n);function r(){var i=n!==null&&n.apply(this,arguments)||this;return i.cache=q1(),i.state={cache:i.cache,intl:fy(Ff(i.props),i.cache),prevConfig:Ff(i.props)},i}return r.getDerivedStateFromProps=function(i,s){var u=s.prevConfig,c=s.cache,h=Ff(i);return gA(u,h)?null:{intl:fy(h,c),prevConfig:h}},r.prototype.render=function(){return V1(this.state.intl),H.createElement(EA,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=Y1,r}(H.PureComponent);nl("formatDate");nl("formatTime");nl("formatNumber");nl("formatList");nl("formatDisplayName");X1("formatDate");X1("formatTime");const AA="_app_1rj0t_1",xA={app:AA},ka=k2,Zt=P2,Q1="%[a-f0-9]{2}",hy=new RegExp("("+Q1+")|([^%]+?)","gi"),dy=new RegExp("("+Q1+")+","gi");function Zh(n,r){try{return[decodeURIComponent(n.join(""))]}catch{}if(n.length===1)return n;r=r||1;const i=n.slice(0,r),s=n.slice(r);return Array.prototype.concat.call([],Zh(i),Zh(s))}function OA(n){try{return decodeURIComponent(n)}catch{let r=n.match(hy)||[];for(let i=1;i<r.length;i++)n=Zh(r,i).join(""),r=n.match(hy)||[];return n}}function RA(n){const r={"%FE%FF":"��","%FF%FE":"��"};let i=dy.exec(n);for(;i;){try{r[i[0]]=decodeURIComponent(i[0])}catch{const u=OA(i[0]);u!==i[0]&&(r[i[0]]=u)}i=dy.exec(n)}r["%C2"]="�";const s=Object.keys(r);for(const u of s)n=n.replace(new RegExp(u,"g"),r[u]);return n}function wA(n){if(typeof n!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof n+"`");try{return decodeURIComponent(n)}catch{return RA(n)}}function CA(n,r){const i={};if(Array.isArray(r))for(const s of r){const u=Object.getOwnPropertyDescriptor(n,s);u?.enumerable&&Object.defineProperty(i,s,u)}else for(const s of Reflect.ownKeys(n)){const u=Object.getOwnPropertyDescriptor(n,s);if(u.enumerable){const c=n[s];r(s,c,n)&&Object.defineProperty(i,s,u)}}return i}function K1(n,r){if(!(typeof n=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(n===""||r==="")return[];const i=n.indexOf(r);return i===-1?[]:[n.slice(0,i),n.slice(i+r.length)]}const NA=n=>n==null,MA=n=>encodeURIComponent(n).replaceAll(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),Qh=Symbol("encodeFragmentIdentifier");function DA(n){switch(n.arrayFormat){case"index":return r=>(i,s)=>{const u=i.length;return s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,[ut(r,n),"[",u,"]"].join("")]:[...i,[ut(r,n),"[",ut(u,n),"]=",ut(s,n)].join("")]};case"bracket":return r=>(i,s)=>s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,[ut(r,n),"[]"].join("")]:[...i,[ut(r,n),"[]=",ut(s,n)].join("")];case"colon-list-separator":return r=>(i,s)=>s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,[ut(r,n),":list="].join("")]:[...i,[ut(r,n),":list=",ut(s,n)].join("")];case"comma":case"separator":case"bracket-separator":{const r=n.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(s,u)=>u===void 0||n.skipNull&&u===null||n.skipEmptyString&&u===""?s:(u=u===null?"":u,s.length===0?[[ut(i,n),r,ut(u,n)].join("")]:[[s,ut(u,n)].join(n.arrayFormatSeparator)])}default:return r=>(i,s)=>s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,ut(r,n)]:[...i,[ut(r,n),"=",ut(s,n)].join("")]}}function BA(n){let r;switch(n.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 c=typeof s=="string"&&s.includes(n.arrayFormatSeparator),h=typeof s=="string"&&!c&&Tr(s,n).includes(n.arrayFormatSeparator);s=h?Tr(s,n):s;const d=c||h?s.split(n.arrayFormatSeparator).map(m=>Tr(m,n)):s===null?s:Tr(s,n);u[i]=d};case"bracket-separator":return(i,s,u)=>{const c=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!c){u[i]=s&&Tr(s,n);return}const h=s===null?[]:Tr(s,n).split(n.arrayFormatSeparator);if(u[i]===void 0){u[i]=h;return}u[i]=[...u[i],...h]};default:return(i,s,u)=>{if(u[i]===void 0){u[i]=s;return}u[i]=[...[u[i]].flat(),s]}}}function $1(n){if(typeof n!="string"||n.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function ut(n,r){return r.encode?r.strict?MA(n):encodeURIComponent(n):n}function Tr(n,r){return r.decode?wA(n):n}function W1(n){return Array.isArray(n)?n.sort():typeof n=="object"?W1(Object.keys(n)).sort((r,i)=>Number(r)-Number(i)).map(r=>n[r]):n}function J1(n){const r=n.indexOf("#");return r!==-1&&(n=n.slice(0,r)),n}function LA(n){let r="";const i=n.indexOf("#");return i!==-1&&(r=n.slice(i)),r}function my(n,r,i){return i==="string"&&typeof n=="string"?n:typeof i=="function"&&typeof n=="string"?i(n):i==="boolean"&&n===null?!0:i==="boolean"&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")?n.toLowerCase()==="true":i==="boolean"&&n!==null&&(n.toLowerCase()==="1"||n.toLowerCase()==="0")?n.toLowerCase()==="1":i==="string[]"&&r.arrayFormat!=="none"&&typeof n=="string"?[n]:i==="number[]"&&r.arrayFormat!=="none"&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?[Number(n)]:i==="number"&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?Number(n):r.parseBooleans&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")?n.toLowerCase()==="true":r.parseNumbers&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?Number(n):n}function _d(n){n=J1(n);const r=n.indexOf("?");return r===-1?"":n.slice(r+1)}function Ed(n,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...r},$1(r.arrayFormatSeparator);const i=BA(r),s=Object.create(null);if(typeof n!="string"||(n=n.trim().replace(/^[?#&]/,""),!n))return s;for(const u of n.split("&")){if(u==="")continue;const c=r.decode?u.replaceAll("+"," "):u;let[h,d]=K1(c,"=");h===void 0&&(h=c),d=d===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?d:Tr(d,r),i(Tr(h,r),d,s)}for(const[u,c]of Object.entries(s))if(typeof c=="object"&&c!==null&&r.types[u]!=="string")for(const[h,d]of Object.entries(c)){const m=r.types[u]?r.types[u].replace("[]",""):void 0;c[h]=my(d,r,m)}else typeof c=="object"&&c!==null&&r.types[u]==="string"?s[u]=Object.values(c).join(r.arrayFormatSeparator):s[u]=my(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 h=s[c];return u[c]=h&&typeof h=="object"&&!Array.isArray(h)?W1(h):h,u},Object.create(null))}function eb(n,r){if(!n)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},$1(r.arrayFormatSeparator);const i=h=>r.skipNull&&NA(n[h])||r.skipEmptyString&&n[h]==="",s=DA(r),u={};for(const[h,d]of Object.entries(n))i(h)||(u[h]=d);const c=Object.keys(u);return r.sort!==!1&&c.sort(r.sort),c.map(h=>{const d=n[h];return d===void 0?"":d===null?ut(h,r):Array.isArray(d)?d.length===0&&r.arrayFormat==="bracket-separator"?ut(h,r)+"[]":d.reduce(s(h),[]).join("&"):ut(h,r)+"="+ut(d,r)}).filter(h=>h.length>0).join("&")}function tb(n,r){r={decode:!0,...r};let[i,s]=K1(n,"#");return i===void 0&&(i=n),{url:i?.split("?")?.[0]??"",query:Ed(_d(n),r),...r&&r.parseFragmentIdentifier&&s?{fragmentIdentifier:Tr(s,r)}:{}}}function nb(n,r){r={encode:!0,strict:!0,[Qh]:!0,...r};const i=J1(n.url).split("?")[0]||"",s=_d(n.url),u={...Ed(s,{sort:!1,...r}),...n.query};let c=eb(u,r);c&&=`?${c}`;let h=LA(n.url);if(typeof n.fragmentIdentifier=="string"){const d=new URL(i);d.hash=n.fragmentIdentifier,h=r[Qh]?d.hash:`#${n.fragmentIdentifier}`}return`${i}${c}${h}`}function rb(n,r,i){i={parseFragmentIdentifier:!0,[Qh]:!1,...i};const{url:s,query:u,fragmentIdentifier:c}=tb(n,i);return nb({url:s,query:CA(u,r),fragmentIdentifier:c},i)}function UA(n,r,i){const s=Array.isArray(r)?u=>!r.includes(u):(u,c)=>!r(u,c);return rb(n,s,i)}const lu=Object.freeze(Object.defineProperty({__proto__:null,exclude:UA,extract:_d,parse:Ed,parseUrl:tb,pick:rb,stringify:eb,stringifyUrl:nb},Symbol.toStringTag,{value:"Module"}));var Dn={},Bn={},Ie={},_o={},pe={},py;function cn(){return py||(py=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 gy;function HA(){if(gy)return _o;gy=1,Object.defineProperty(_o,"__esModule",{value:!0});const n=cn(),r=()=>({type:n.DRAWER_CLOSE});return _o.default=r,_o}var Eo={},yy;function jA(){if(yy)return Eo;yy=1,Object.defineProperty(Eo,"__esModule",{value:!0});const n=cn(),r=(i,s)=>({type:n.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:i,intent:s}});return Eo.default=r,Eo}var So={},vy;function IA(){if(vy)return So;vy=1,Object.defineProperty(So,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.GUEST_CONNECTED,payload:{sessionId:i}});return So.default=r,So}var To={},by;function zA(){if(by)return To;by=1,Object.defineProperty(To,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.GUEST_DISCONNECTED,payload:{sessionId:i}});return To.default=r,To}var Ao={},_y;function GA(){if(_y)return Ao;_y=1,Object.defineProperty(Ao,"__esModule",{value:!0});const n=cn(),r=(i,s)=>({type:n.GUEST_LOCALE_CHANGED,payload:{previousLocale:i,newLocale:s}});return Ao.default=r,Ao}var xo={},Ey;function kA(){if(Ey)return xo;Ey=1,Object.defineProperty(xo,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.DRAWER_OPEN,payload:{parameters:{contentUrl:i}}});return xo.default=r,xo}var Oo={},Ke={},Sy;function Sd(){if(Sy)return Ke;Sy=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.getStringRepresentationFromMessage=Ke.MessageTypeEnum=Ke.AudioMessage=Ke.FileMessage=Ke.ImageMessage=Ke.VideoMessage=Ke.MarkdownMessage=Ke.DetailMessage=Ke.TextMessage=Ke.Message=void 0;class n{type;sender;sources;quickReplies;constructor(_,T,L=[],N=[]){this.type=_,this.sender=T,this.sources=L,this.quickReplies=N}addQuickReply(_,T){this.quickReplies.push({label:_,payload:T})}}Ke.Message=n;class r extends n{text;constructor(_,T,L=[],N=[]){super(m.TEXT,T,L,N),this.text=_}}Ke.TextMessage=r;class i extends n{title;text;imageUrl;itemUrl;buttons;constructor(_,T){super(m.DETAIL,T),this.title=_,this.text="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(_){this.imageUrl=_}setItemUrl(_){this.itemUrl=_}setText(_){this.text=_}addButton(_){this.buttons.push(_)}}Ke.DetailMessage=i;class s extends n{markdown;constructor(_,T,L=[],N=[]){super(m.MARKDOWN,T,L,N),this.markdown=_}}Ke.MarkdownMessage=s;class u extends n{url;constructor(_,T){super(m.VIDEO,T),this.url=_}}Ke.VideoMessage=u;class c extends n{url;constructor(_,T){super(m.IMAGE,T),this.url=_}}Ke.ImageMessage=c;class h extends n{url;constructor(_,T){super(m.FILE,T),this.url=_}}Ke.FileMessage=h;class d extends n{url;constructor(_,T){super(m.AUDIO,T),this.url=_}}Ke.AudioMessage=d;var m;(function(y){y.TEXT="TEXT",y.DETAIL="DETAIL",y.MARKDOWN="MARKDOWN",y.VIDEO="VIDEO",y.IMAGE="IMAGE",y.FILE="FILE",y.AUDIO="AUDIO"})(m||(Ke.MessageTypeEnum=m={}));const g=y=>{switch(y.type){case m.TEXT:return y.text;case m.DETAIL:return`${y.title}`;case m.MARKDOWN:return y.markdown;case m.VIDEO:return`Video Url: ${y.url}`;case m.IMAGE:return`Image Url: ${y.url}`;case m.FILE:return`File Url: ${y.url}`;case m.AUDIO:return`Audio Url: ${y.url}`;default:throw new Error("Unknown message type "+y.type)}};return Ke.getStringRepresentationFromMessage=g,Ke}var an={},Ty;function Td(){if(Ty)return an;Ty=1,Object.defineProperty(an,"__esModule",{value:!0}),an.UserType=an.PersonUser=an.GuestUser=an.BotUser=an.User=void 0;class n{type;id;name;avatar;constructor(h,d,m,g){this.type=h,this.id=d,this.name=m,this.avatar=g}}an.User=n;class r extends n{constructor(){super(u.BOT,null,"Chatbot","bot.svg")}}an.BotUser=r;class i extends n{constructor(){super(u.GUEST,null,"Guest","visitor.svg")}}an.GuestUser=i;class s extends n{constructor(h,d,m){super(u.PERSON,h,d,m)}}an.PersonUser=s;var u;return function(c){c.GUEST="GUEST",c.BOT="BOT",c.PERSON="PERSON"}(u||(an.UserType=u={})),an}var Ay;function qA(){if(Ay)return Oo;Ay=1,Object.defineProperty(Oo,"__esModule",{value:!0});const n=Sd(),r=Td(),i=cn(),s=u=>{const c=new n.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_FROM_GUEST,message:c}};return Oo.default=s,Oo}var Ro={},xy;function FA(){if(xy)return Ro;xy=1,Object.defineProperty(Ro,"__esModule",{value:!0});const n=Sd(),r=Td(),i=cn(),s=(u,c={})=>{const h=new n.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:h,payload:c}};return Ro.default=s,Ro}var wo={},Oy;function PA(){if(Oy)return wo;Oy=1,Object.defineProperty(wo,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.NLU_REQUEST_EVENT,event:i});return wo.default=r,wo}var Co={},Ry;function VA(){if(Ry)return Co;Ry=1,Object.defineProperty(Co,"__esModule",{value:!0});const n=cn(),r=()=>({type:n.RESTART_CHAT_REQUEST});return Co.default=r,Co}var No={},wy;function YA(){if(wy)return No;wy=1,Object.defineProperty(No,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.MESSAGE_TO_GUEST,message:i});return No.default=r,No}var Mo={},Cy;function XA(){if(Cy)return Mo;Cy=1,Object.defineProperty(Mo,"__esModule",{value:!0});const n=cn(),r=(i,s)=>({type:n.TRANSCRIPT_ITEM_GUEST_REACTION,payload:{actionId:i,reaction:s}});return Mo.default=r,Mo}var Ny;function ZA(){if(Ny)return Ie;Ny=1;var n=Ie&&Ie.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};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=n(HA());Ie.closeDrawer=r.default;const i=n(jA());Ie.feedbackFromGuestResponse=i.default;const s=n(IA());Ie.guestConnected=s.default;const u=n(zA());Ie.guestDisconnected=u.default;const c=n(GA());Ie.guestLocaleChanged=c.default;const h=n(kA());Ie.openDrawer=h.default;const d=n(qA());Ie.receiveTextMessageFromGuest=d.default;const m=n(FA());Ie.receiveTextMessageWithoutAnalysisFromGuest=m.default;const g=n(PA());Ie.requestNLUEvent=g.default;const y=n(VA());Ie.restartChatRequest=y.default;const _=n(YA());Ie.sendMessageToGuest=_.default;const T=n(XA());return Ie.transcriptItemGuestReaction=T.default,Ie}var Pf={},My;function QA(){return My||(My=1,Object.defineProperty(Pf,"__esModule",{value:!0})),Pf}var Dy;function KA(){return Dy||(Dy=1,function(n){var r=Bn&&Bn.__createBinding||(Object.create?function(c,h,d,m){m===void 0&&(m=d);var g=Object.getOwnPropertyDescriptor(h,d);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return h[d]}}),Object.defineProperty(c,m,g)}:function(c,h,d,m){m===void 0&&(m=d),c[m]=h[d]}),i=Bn&&Bn.__setModuleDefault||(Object.create?function(c,h){Object.defineProperty(c,"default",{enumerable:!0,value:h})}:function(c,h){c.default=h}),s=Bn&&Bn.__importStar||function(){var c=function(h){return c=Object.getOwnPropertyNames||function(d){var m=[];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(m[m.length]=g);return m},c(h)};return function(h){if(h&&h.__esModule)return h;var d={};if(h!=null)for(var m=c(h),g=0;g<m.length;g++)m[g]!=="default"&&r(d,h,m[g]);return i(d,h),d}}(),u=Bn&&Bn.__exportStar||function(c,h){for(var d in c)d!=="default"&&!Object.prototype.hasOwnProperty.call(h,d)&&r(h,c,d)};Object.defineProperty(n,"__esModule",{value:!0}),n.ActionTypes=n.Actions=void 0,n.Actions=s(ZA()),n.ActionTypes=s(cn()),u(QA(),n)}(Bn)),Bn}var sn={},Vf={},By;function $A(){return By||(By=1,Object.defineProperty(Vf,"__esModule",{value:!0})),Vf}var Ls={},Ly;function WA(){if(Ly)return Ls;Ly=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.NullableKnowledgeBaseAdapter=void 0;class n{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 Ls.NullableKnowledgeBaseAdapter=n,Ls}var Uy;function JA(){if(Uy)return sn;Uy=1;var n=sn&&sn.__createBinding||(Object.create?function(u,c,h,d){d===void 0&&(d=h);var m=Object.getOwnPropertyDescriptor(c,h);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[h]}}),Object.defineProperty(u,d,m)}:function(u,c,h,d){d===void 0&&(d=h),u[d]=c[h]}),r=sn&&sn.__setModuleDefault||(Object.create?function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}:function(u,c){u.default=c}),i=sn&&sn.__importStar||function(){var u=function(c){return u=Object.getOwnPropertyNames||function(h){var d=[];for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(d[d.length]=m);return d},u(c)};return function(c){if(c&&c.__esModule)return c;var h={};if(c!=null)for(var d=u(c),m=0;m<d.length;m++)d[m]!=="default"&&n(h,c,d[m]);return r(h,c),h}}();Object.defineProperty(sn,"__esModule",{value:!0}),sn.NullableCmsAdapter=sn.KnowledgeBase=void 0,sn.KnowledgeBase=i($A());const s=WA();return sn.NullableCmsAdapter={knowledgeBase:new s.NullableKnowledgeBaseAdapter},sn}var Na={},Yf={},Hy;function ex(){return Hy||(Hy=1,Object.defineProperty(Yf,"__esModule",{value:!0})),Yf}var Xf={},jy;function tx(){return jy||(jy=1,Object.defineProperty(Xf,"__esModule",{value:!0})),Xf}var Zf={},Iy;function nx(){return Iy||(Iy=1,Object.defineProperty(Zf,"__esModule",{value:!0})),Zf}var Qf={},zy;function rx(){return zy||(zy=1,Object.defineProperty(Qf,"__esModule",{value:!0})),Qf}var Us={},Gy;function ax(){if(Gy)return Us;Gy=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.checkMiddlewareCondition=void 0;const n=async(r,i,s)=>(Array.isArray(r)?r:[r]).reduce(async(c,h)=>await c?await h(i,s):!1,Promise.resolve(!0));return Us.checkMiddlewareCondition=n,Us}var Kf={},ky;function ix(){return ky||(ky=1,Object.defineProperty(Kf,"__esModule",{value:!0})),Kf}var $f={},qy;function sx(){return qy||(qy=1,Object.defineProperty($f,"__esModule",{value:!0})),$f}var Wf={},Fy;function lx(){return Fy||(Fy=1,Object.defineProperty(Wf,"__esModule",{value:!0})),Wf}var Py;function ox(){return Py||(Py=1,function(n){var r=Na&&Na.__createBinding||(Object.create?function(s,u,c,h){h===void 0&&(h=c);var d=Object.getOwnPropertyDescriptor(u,c);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,h,d)}:function(s,u,c,h){h===void 0&&(h=c),s[h]=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(n,"__esModule",{value:!0}),i(ex(),n),i(tx(),n),i(nx(),n),i(rx(),n),i(ax(),n),i(ix(),n),i(sx(),n),i(lx(),n)}(Na)),Na}var Ma={},Ln={},Vy;function ux(){if(Vy)return Ln;Vy=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.ButtonTypeEnum=Ln.PostbackButton=Ln.UrlButton=Ln.Button=void 0;class n{title;type;constructor(c,h){this.title=c,this.type=h}}Ln.Button=n;class r extends n{url;constructor(c,h){super(c,s.WEB_URL),this.url=h}}Ln.UrlButton=r;class i extends n{payload;constructor(c,h){super(c,s.POSTBACK),this.payload=h}}Ln.PostbackButton=i;var s;return function(u){u.WEB_URL="web_url",u.POSTBACK="postback"}(s||(Ln.ButtonTypeEnum=s={})),Ln}var Jf={},Yy;function cx(){return Yy||(Yy=1,Object.defineProperty(Jf,"__esModule",{value:!0})),Jf}var Hs={},Xy;function fx(){if(Xy)return Hs;Xy=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.SatisfactionEnum=void 0;var n;return function(r){r.GOOD="GOOD",r.BAD="BAD"}(n||(Hs.SatisfactionEnum=n={})),Hs}var Zy;function Qy(){return Zy||(Zy=1,function(n){var r=Ma&&Ma.__createBinding||(Object.create?function(s,u,c,h){h===void 0&&(h=c);var d=Object.getOwnPropertyDescriptor(u,c);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,h,d)}:function(s,u,c,h){h===void 0&&(h=c),s[h]=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(n,"__esModule",{value:!0}),i(ux(),n),i(cx(),n),i(fx(),n),i(Sd(),n),i(Td(),n)}(Ma)),Ma}var Ky;function hx(){return Ky||(Ky=1,function(n){var r=Dn&&Dn.__createBinding||(Object.create?function(c,h,d,m){m===void 0&&(m=d);var g=Object.getOwnPropertyDescriptor(h,d);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return h[d]}}),Object.defineProperty(c,m,g)}:function(c,h,d,m){m===void 0&&(m=d),c[m]=h[d]}),i=Dn&&Dn.__setModuleDefault||(Object.create?function(c,h){Object.defineProperty(c,"default",{enumerable:!0,value:h})}:function(c,h){c.default=h}),s=Dn&&Dn.__exportStar||function(c,h){for(var d in c)d!=="default"&&!Object.prototype.hasOwnProperty.call(h,d)&&r(h,c,d)},u=Dn&&Dn.__importStar||function(){var c=function(h){return c=Object.getOwnPropertyNames||function(d){var m=[];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(m[m.length]=g);return m},c(h)};return function(h){if(h&&h.__esModule)return h;var d={};if(h!=null)for(var m=c(h),g=0;g<m.length;g++)m[g]!=="default"&&r(d,h,m[g]);return i(d,h),d}}();Object.defineProperty(n,"__esModule",{value:!0}),n.Model=n.CMS=void 0,s(KA(),n),n.CMS=u(JA()),s(ox(),n),s(Qy(),n),n.Model=u(Qy())}(Dn)),Dn}var Oe=hx();const ab=n=>r=>(n.payload.type!==Oe.ActionTypes.MESSAGE_FROM_GUEST&&r(Oe.Actions.receiveTextMessageWithoutAnalysisFromGuest(n.label,n.payload)),r(n.payload)),ib=n=>(r,i)=>{const{quickReplies:s}=i().chat,u=s.find(c=>n.toLocaleLowerCase().indexOf(c.label.toLocaleLowerCase())>-1);return r(u?ab({...u,label:n}):JSON.parse(JSON.stringify(Oe.Actions.receiveTextMessageFromGuest(n))))},Ad="MESSAGE_TO_PARENT_PAGE",xd="RESTORE_PREVIOUS_CHAT_MESSAGES",Od="AUDIO_MESSAGE_FROM_USER",Rd="RECEIVE_SPEECH_TRANSCRIPTION",wd="ENABLE_CONVERSATION_RATING",sb="LOAD_SOURCE_INFOS_RESPONSE",Cd="LOAD_SOURCE_INFOS_ERROR",Nd="LOAD_SOURCE_INFOS_REQUEST",Md="CLOSE_SOURCE_INFOS",dx="webclient.get.started",lb="webclient.window.expand",ob="webclient.window.close",ub="webclient.transcript.pdf.download",mx=[Ad,xd,Od,Rd,wd,Nd,Md],px=n=>({type:Od,buffer:n}),gx=n=>({type:Rd,transcription:n}),yx=n=>({type:Oe.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:n}}}),vx=()=>({type:ub}),bx=({rating:n})=>({type:wd,payload:{rating:n}}),_x=(n,r)=>({type:Oe.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:n,feedback:r}}),cb=n=>Oe.Actions.requestNLUEvent(n),Ex=n=>({type:xd,messages:n}),Sx=n=>{switch(n.type){case Oe.ButtonTypeEnum.WEB_URL:return hb(n.url);case Oe.ButtonTypeEnum.POSTBACK:return n.payload;default:throw new Error(`unknown button type ${n.type}`)}},fb=n=>hb(n),hb=n=>({type:Ad,message:{type:"webclient.change.url",url:n}});/*! js-cookie v3.0.5 | MIT */function Do(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)n[s]=i[s]}return n}var Tx={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Kh(n,r){function i(u,c,h){if(!(typeof document>"u")){h=Do({},r,h),typeof h.expires=="number"&&(h.expires=new Date(Date.now()+h.expires*864e5)),h.expires&&(h.expires=h.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var m in h)h[m]&&(d+="; "+m,h[m]!==!0&&(d+="="+h[m].split(";")[0]));return document.cookie=u+"="+n.write(c,u)+d}}function s(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var c=document.cookie?document.cookie.split("; "):[],h={},d=0;d<c.length;d++){var m=c[d].split("="),g=m.slice(1).join("=");try{var y=decodeURIComponent(m[0]);if(h[y]=n.read(g,y),u===y)break}catch{}}return u?h[u]:h}}return Object.create({set:i,get:s,remove:function(u,c){i(u,"",Do({},c,{expires:-1}))},withAttributes:function(u){return Kh(this.converter,Do({},this.attributes,u))},withConverter:function(u){return Kh(Do({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}var Bo=Kh(Tx,{path:"/"});const xt=[];for(let n=0;n<256;++n)xt.push((n+256).toString(16).slice(1));function Ax(n,r=0){return(xt[n[r+0]]+xt[n[r+1]]+xt[n[r+2]]+xt[n[r+3]]+"-"+xt[n[r+4]]+xt[n[r+5]]+"-"+xt[n[r+6]]+xt[n[r+7]]+"-"+xt[n[r+8]]+xt[n[r+9]]+"-"+xt[n[r+10]]+xt[n[r+11]]+xt[n[r+12]]+xt[n[r+13]]+xt[n[r+14]]+xt[n[r+15]]).toLowerCase()}let eh;const xx=new Uint8Array(16);function Ox(){if(!eh){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");eh=crypto.getRandomValues.bind(crypto)}return eh(xx)}const Rx=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$y={randomUUID:Rx};function $h(n,r,i){if($y.randomUUID&&!n)return $y.randomUUID();n=n||{};const s=n.random??n.rng?.()??Ox();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,Ax(s)}function Ot(n){return`Minified Redux error #${n}; visit https://redux.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `}var wx=typeof Symbol=="function"&&Symbol.observable||"@@observable",Wy=wx,th=()=>Math.random().toString(36).substring(7).split("").join("."),Cx={INIT:`@@redux/INIT${th()}`,REPLACE:`@@redux/REPLACE${th()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${th()}`},Ko=Cx;function Dd(n){if(typeof n!="object"||n===null)return!1;let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r||Object.getPrototypeOf(n)===null}function db(n,r,i){if(typeof n!="function")throw new Error(Ot(2));if(typeof r=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Ot(0));if(typeof r=="function"&&typeof i>"u"&&(i=r,r=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Ot(1));return i(db)(n,r)}let s=n,u=r,c=new Map,h=c,d=0,m=!1;function g(){h===c&&(h=new Map,c.forEach((G,E)=>{h.set(E,G)}))}function y(){if(m)throw new Error(Ot(3));return u}function _(G){if(typeof G!="function")throw new Error(Ot(4));if(m)throw new Error(Ot(5));let E=!0;g();const w=d++;return h.set(w,G),function(){if(E){if(m)throw new Error(Ot(6));E=!1,g(),h.delete(w),c=null}}}function T(G){if(!Dd(G))throw new Error(Ot(7));if(typeof G.type>"u")throw new Error(Ot(8));if(typeof G.type!="string")throw new Error(Ot(17));if(m)throw new Error(Ot(9));try{m=!0,u=s(u,G)}finally{m=!1}return(c=h).forEach(w=>{w()}),G}function L(G){if(typeof G!="function")throw new Error(Ot(10));s=G,T({type:Ko.REPLACE})}function N(){const G=_;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(Ot(11));function w(){const I=E;I.next&&I.next(y())}return w(),{unsubscribe:G(w)}},[Wy](){return this}}}return T({type:Ko.INIT}),{dispatch:T,subscribe:_,getState:y,replaceReducer:L,[Wy]:N}}function Nx(n){Object.keys(n).forEach(r=>{const i=n[r];if(typeof i(void 0,{type:Ko.INIT})>"u")throw new Error(Ot(12));if(typeof i(void 0,{type:Ko.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ot(13))})}function mb(n){const r=Object.keys(n),i={};for(let c=0;c<r.length;c++){const h=r[c];typeof n[h]=="function"&&(i[h]=n[h])}const s=Object.keys(i);let u;try{Nx(i)}catch(c){u=c}return function(h={},d){if(u)throw u;let m=!1;const g={};for(let y=0;y<s.length;y++){const _=s[y],T=i[_],L=h[_],N=T(L,d);if(typeof N>"u")throw d&&d.type,new Error(Ot(14));g[_]=N,m=m||N!==L}return m=m||s.length!==Object.keys(h).length,m?g:h}}function $o(...n){return n.length===0?r=>r:n.length===1?n[0]:n.reduce((r,i)=>(...s)=>r(i(...s)))}function Mx(...n){return r=>(i,s)=>{const u=r(i,s);let c=()=>{throw new Error(Ot(15))};const h={getState:u.getState,dispatch:(m,...g)=>c(m,...g)},d=n.map(m=>m(h));return c=$o(...d)(u.dispatch),{...u,dispatch:c}}}function Dx(n){return Dd(n)&&"type"in n&&typeof n.type=="string"}var pb=Symbol.for("immer-nothing"),Jy=Symbol.for("immer-draftable"),on=Symbol.for("immer-state");function In(n,...r){throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var wi=Object.getPrototypeOf;function za(n){return!!n&&!!n[on]}function wr(n){return n?gb(n)||Array.isArray(n)||!!n[Jy]||!!n.constructor?.[Jy]||uu(n)||cu(n):!1}var Bx=Object.prototype.constructor.toString();function gb(n){if(!n||typeof n!="object")return!1;const r=wi(n);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)===Bx}function Wo(n,r){ou(n)===0?Reflect.ownKeys(n).forEach(i=>{r(i,n[i],n)}):n.forEach((i,s)=>r(s,i,n))}function ou(n){const r=n[on];return r?r.type_:Array.isArray(n)?1:uu(n)?2:cu(n)?3:0}function Wh(n,r){return ou(n)===2?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function yb(n,r,i){const s=ou(n);s===2?n.set(r,i):s===3?n.add(i):n[r]=i}function Lx(n,r){return n===r?n!==0||1/n===1/r:n!==n&&r!==r}function uu(n){return n instanceof Map}function cu(n){return n instanceof Set}function Ua(n){return n.copy_||n.base_}function Jh(n,r){if(uu(n))return new Map(n);if(cu(n))return new Set(n);if(Array.isArray(n))return Array.prototype.slice.call(n);const i=gb(n);if(r===!0||r==="class_only"&&!i){const s=Object.getOwnPropertyDescriptors(n);delete s[on];let u=Reflect.ownKeys(s);for(let c=0;c<u.length;c++){const h=u[c],d=s[h];d.writable===!1&&(d.writable=!0,d.configurable=!0),(d.get||d.set)&&(s[h]={configurable:!0,writable:!0,enumerable:d.enumerable,value:n[h]})}return Object.create(wi(n),s)}else{const s=wi(n);if(s!==null&&i)return{...n};const u=Object.create(s);return Object.assign(u,n)}}function Bd(n,r=!1){return fu(n)||za(n)||!wr(n)||(ou(n)>1&&(n.set=n.add=n.clear=n.delete=Ux),Object.freeze(n),r&&Object.entries(n).forEach(([i,s])=>Bd(s,!0))),n}function Ux(){In(2)}function fu(n){return Object.isFrozen(n)}var Hx={};function Ga(n){const r=Hx[n];return r||In(0,n),r}var $s;function vb(){return $s}function jx(n,r){return{drafts_:[],parent_:n,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ev(n,r){r&&(Ga("Patches"),n.patches_=[],n.inversePatches_=[],n.patchListener_=r)}function ed(n){td(n),n.drafts_.forEach(Ix),n.drafts_=null}function td(n){n===$s&&($s=n.parent_)}function tv(n){return $s=jx($s,n)}function Ix(n){const r=n[on];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function nv(n,r){r.unfinalizedDrafts_=r.drafts_.length;const i=r.drafts_[0];return n!==void 0&&n!==i?(i[on].modified_&&(ed(r),In(4)),wr(n)&&(n=Jo(r,n),r.parent_||eu(r,n)),r.patches_&&Ga("Patches").generateReplacementPatches_(i[on].base_,n,r.patches_,r.inversePatches_)):n=Jo(r,i,[]),ed(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),n!==pb?n:void 0}function Jo(n,r,i){if(fu(r))return r;const s=r[on];if(!s)return Wo(r,(u,c)=>rv(n,s,r,u,c,i)),r;if(s.scope_!==n)return r;if(!s.modified_)return eu(n,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;const u=s.copy_;let c=u,h=!1;s.type_===3&&(c=new Set(u),u.clear(),h=!0),Wo(c,(d,m)=>rv(n,s,u,d,m,i,h)),eu(n,u,!1),i&&n.patches_&&Ga("Patches").generatePatches_(s,i,n.patches_,n.inversePatches_)}return s.copy_}function rv(n,r,i,s,u,c,h){if(za(u)){const d=c&&r&&r.type_!==3&&!Wh(r.assigned_,s)?c.concat(s):void 0,m=Jo(n,u,d);if(yb(i,s,m),za(m))n.canAutoFreeze_=!1;else return}else h&&i.add(u);if(wr(u)&&!fu(u)){if(!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1)return;Jo(n,u),(!r||!r.scope_.parent_)&&typeof s!="symbol"&&Object.prototype.propertyIsEnumerable.call(i,s)&&eu(n,u)}}function eu(n,r,i=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&Bd(r,i)}function zx(n,r){const i=Array.isArray(n),s={type_:i?1:0,scope_:r?r.scope_:vb(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1};let u=s,c=Ld;i&&(u=[s],c=Ws);const{revoke:h,proxy:d}=Proxy.revocable(u,c);return s.draft_=d,s.revoke_=h,d}var Ld={get(n,r){if(r===on)return n;const i=Ua(n);if(!Wh(i,r))return Gx(n,i,r);const s=i[r];return n.finalized_||!wr(s)?s:s===nh(n.base_,r)?(rh(n),n.copy_[r]=rd(s,n)):s},has(n,r){return r in Ua(n)},ownKeys(n){return Reflect.ownKeys(Ua(n))},set(n,r,i){const s=bb(Ua(n),r);if(s?.set)return s.set.call(n.draft_,i),!0;if(!n.modified_){const u=nh(Ua(n),r),c=u?.[on];if(c&&c.base_===i)return n.copy_[r]=i,n.assigned_[r]=!1,!0;if(Lx(i,u)&&(i!==void 0||Wh(n.base_,r)))return!0;rh(n),nd(n)}return n.copy_[r]===i&&(i!==void 0||r in n.copy_)||Number.isNaN(i)&&Number.isNaN(n.copy_[r])||(n.copy_[r]=i,n.assigned_[r]=!0),!0},deleteProperty(n,r){return nh(n.base_,r)!==void 0||r in n.base_?(n.assigned_[r]=!1,rh(n),nd(n)):delete n.assigned_[r],n.copy_&&delete n.copy_[r],!0},getOwnPropertyDescriptor(n,r){const i=Ua(n),s=Reflect.getOwnPropertyDescriptor(i,r);return s&&{writable:!0,configurable:n.type_!==1||r!=="length",enumerable:s.enumerable,value:i[r]}},defineProperty(){In(11)},getPrototypeOf(n){return wi(n.base_)},setPrototypeOf(){In(12)}},Ws={};Wo(Ld,(n,r)=>{Ws[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});Ws.deleteProperty=function(n,r){return Ws.set.call(this,n,r,void 0)};Ws.set=function(n,r,i){return Ld.set.call(this,n[0],r,i,n[0])};function nh(n,r){const i=n[on];return(i?Ua(i):n)[r]}function Gx(n,r,i){const s=bb(r,i);return s?"value"in s?s.value:s.get?.call(n.draft_):void 0}function bb(n,r){if(!(r in n))return;let i=wi(n);for(;i;){const s=Object.getOwnPropertyDescriptor(i,r);if(s)return s;i=wi(i)}}function nd(n){n.modified_||(n.modified_=!0,n.parent_&&nd(n.parent_))}function rh(n){n.copy_||(n.copy_=Jh(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var kx=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,i,s)=>{if(typeof r=="function"&&typeof i!="function"){const c=i;i=r;const h=this;return function(m=c,...g){return h.produce(m,y=>i.call(this,y,...g))}}typeof i!="function"&&In(6),s!==void 0&&typeof s!="function"&&In(7);let u;if(wr(r)){const c=tv(this),h=rd(r,void 0);let d=!0;try{u=i(h),d=!1}finally{d?ed(c):td(c)}return ev(c,s),nv(u,c)}else if(!r||typeof r!="object"){if(u=i(r),u===void 0&&(u=r),u===pb&&(u=void 0),this.autoFreeze_&&Bd(u,!0),s){const c=[],h=[];Ga("Patches").generateReplacementPatches_(r,u,c,h),s(c,h)}return u}else In(1,r)},this.produceWithPatches=(r,i)=>{if(typeof r=="function")return(h,...d)=>this.produceWithPatches(h,m=>r(m,...d));let s,u;return[this.produce(r,i,(h,d)=>{s=h,u=d}),s,u]},typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze),typeof n?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(n.useStrictShallowCopy)}createDraft(n){wr(n)||In(8),za(n)&&(n=qx(n));const r=tv(this),i=rd(n,void 0);return i[on].isManual_=!0,td(r),i}finishDraft(n,r){const i=n&&n[on];(!i||!i.isManual_)&&In(9);const{scope_:s}=i;return ev(s,r),nv(void 0,s)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}applyPatches(n,r){let i;for(i=r.length-1;i>=0;i--){const u=r[i];if(u.path.length===0&&u.op==="replace"){n=u.value;break}}i>-1&&(r=r.slice(i+1));const s=Ga("Patches").applyPatches_;return za(n)?s(n,r):this.produce(n,u=>s(u,r))}};function rd(n,r){const i=uu(n)?Ga("MapSet").proxyMap_(n,r):cu(n)?Ga("MapSet").proxySet_(n,r):zx(n,r);return(r?r.scope_:vb()).drafts_.push(i),i}function qx(n){return za(n)||In(10,n),_b(n)}function _b(n){if(!wr(n)||fu(n))return n;const r=n[on];let i;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,i=Jh(n,r.scope_.immer_.useStrictShallowCopy_)}else i=Jh(n,!0);return Wo(i,(s,u)=>{yb(i,s,_b(u))}),r&&(r.finalized_=!1),i}var un=new kx,Eb=un.produce;un.produceWithPatches.bind(un);un.setAutoFreeze.bind(un);un.setUseStrictShallowCopy.bind(un);un.applyPatches.bind(un);un.createDraft.bind(un);un.finishDraft.bind(un);function Sb(n){return({dispatch:i,getState:s})=>u=>c=>typeof c=="function"?c(i,s,n):u(c)}var Fx=Sb(),Px=Sb,Vx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?$o:$o.apply(null,arguments)};function av(n,r){function i(...s){if(r){let u=r(...s);if(!u)throw new Error(Ar(0));return{type:n,payload:u.payload,..."meta"in u&&{meta:u.meta},..."error"in u&&{error:u.error}}}return{type:n,payload:s[0]}}return i.toString=()=>`${n}`,i.type=n,i.match=s=>Dx(s)&&s.type===n,i}var Tb=class Xs extends Array{constructor(...r){super(...r),Object.setPrototypeOf(this,Xs.prototype)}static get[Symbol.species](){return Xs}concat(...r){return super.concat.apply(this,r)}prepend(...r){return r.length===1&&Array.isArray(r[0])?new Xs(...r[0].concat(this)):new Xs(...r.concat(this))}};function iv(n){return wr(n)?Eb(n,()=>{}):n}function Lo(n,r,i){return n.has(r)?n.get(r):n.set(r,i(r)).get(r)}function Yx(n){return typeof n=="boolean"}var Xx=()=>function(r){const{thunk:i=!0,immutableCheck:s=!0,serializableCheck:u=!0,actionCreatorCheck:c=!0}=r??{};let h=new Tb;return i&&(Yx(i)?h.push(Fx):h.push(Px(i.extraArgument))),h},Zx="RTK_autoBatch",sv=n=>r=>{setTimeout(r,n)},Qx=(n={type:"raf"})=>r=>(...i)=>{const s=r(...i);let u=!0,c=!1,h=!1;const d=new Set,m=n.type==="tick"?queueMicrotask:n.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:sv(10):n.type==="callback"?n.queueNotification:sv(n.timeout),g=()=>{h=!1,c&&(c=!1,d.forEach(y=>y()))};return Object.assign({},s,{subscribe(y){const _=()=>u&&y(),T=s.subscribe(_);return d.add(y),()=>{T(),d.delete(y)}},dispatch(y){try{return u=!y?.meta?.[Zx],c=!u,c&&(h||(h=!0,m(g))),s.dispatch(y)}finally{u=!0}}})},Kx=n=>function(i){const{autoBatch:s=!0}=i??{};let u=new Tb(n);return s&&u.push(Qx(typeof s=="object"?s:void 0)),u};function $x(n){const r=Xx(),{reducer:i=void 0,middleware:s,devTools:u=!0,preloadedState:c=void 0,enhancers:h=void 0}=n||{};let d;if(typeof i=="function")d=i;else if(Dd(i))d=mb(i);else throw new Error(Ar(1));let m;typeof s=="function"?m=s(r):m=r();let g=$o;u&&(g=Vx({trace:!1,...typeof u=="object"&&u}));const y=Mx(...m),_=Kx(y);let T=typeof h=="function"?h(_):_();const L=g(...T);return db(d,c,L)}function Ab(n){const r={},i=[];let s;const u={addCase(c,h){const d=typeof c=="string"?c:c.type;if(!d)throw new Error(Ar(28));if(d in r)throw new Error(Ar(29));return r[d]=h,u},addMatcher(c,h){return i.push({matcher:c,reducer:h}),u},addDefaultCase(c){return s=c,u}};return n(u),[r,i,s]}function Wx(n){return typeof n=="function"}function Jx(n,r){let[i,s,u]=Ab(r),c;if(Wx(n))c=()=>iv(n());else{const d=iv(n);c=()=>d}function h(d=c(),m){let g=[i[m.type],...s.filter(({matcher:y})=>y(m)).map(({reducer:y})=>y)];return g.filter(y=>!!y).length===0&&(g=[u]),g.reduce((y,_)=>{if(_)if(za(y)){const L=_(y,m);return L===void 0?y:L}else{if(wr(y))return Eb(y,T=>_(T,m));{const T=_(y,m);if(T===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}}return y},d)}return h.getInitialState=c,h}var eO=Symbol.for("rtk-slice-createasyncthunk");function tO(n,r){return`${n}/${r}`}function nO({creators:n}={}){const r=n?.asyncThunk?.[eO];return function(s){const{name:u,reducerPath:c=u}=s;if(!u)throw new Error(Ar(11));const h=(typeof s.reducers=="function"?s.reducers(aO()):s.reducers)||{},d=Object.keys(h),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},g={addCase(S,I){const x=typeof S=="string"?S:S.type;if(!x)throw new Error(Ar(12));if(x in m.sliceCaseReducersByType)throw new Error(Ar(13));return m.sliceCaseReducersByType[x]=I,g},addMatcher(S,I){return m.sliceMatchers.push({matcher:S,reducer:I}),g},exposeAction(S,I){return m.actionCreators[S]=I,g},exposeCaseReducer(S,I){return m.sliceCaseReducersByName[S]=I,g}};d.forEach(S=>{const I=h[S],x={reducerName:S,type:tO(u,S),createNotation:typeof s.reducers=="function"};sO(I)?oO(x,I,g,r):iO(x,I,g)});function y(){const[S={},I=[],x=void 0]=typeof s.extraReducers=="function"?Ab(s.extraReducers):[s.extraReducers],Z={...S,...m.sliceCaseReducersByType};return Jx(s.initialState,$=>{for(let ie in Z)$.addCase(ie,Z[ie]);for(let ie of m.sliceMatchers)$.addMatcher(ie.matcher,ie.reducer);for(let ie of I)$.addMatcher(ie.matcher,ie.reducer);x&&$.addDefaultCase(x)})}const _=S=>S,T=new Map,L=new WeakMap;let N;function V(S,I){return N||(N=y()),N(S,I)}function G(){return N||(N=y()),N.getInitialState()}function E(S,I=!1){function x($){let ie=$[S];return typeof ie>"u"&&I&&(ie=Lo(L,x,G)),ie}function Z($=_){const ie=Lo(T,I,()=>new WeakMap);return Lo(ie,$,()=>{const _e={};for(const[Re,se]of Object.entries(s.selectors??{}))_e[Re]=rO(se,$,()=>Lo(L,$,G),I);return _e})}return{reducerPath:S,getSelectors:Z,get selectors(){return Z(x)},selectSlice:x}}const w={name:u,reducer:V,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:G,...E(c),injectInto(S,{reducerPath:I,...x}={}){const Z=I??c;return S.inject({reducerPath:Z,reducer:V},x),{...w,...E(Z,!0)}}};return w}}function rO(n,r,i,s){function u(c,...h){let d=r(c);return typeof d>"u"&&s&&(d=i()),n(d,...h)}return u.unwrapped=n,u}var Ud=nO();function aO(){function n(r,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:r,...i}}return n.withTypes=()=>n,{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:n}}function iO({type:n,reducerName:r,createNotation:i},s,u){let c,h;if("reducer"in s){if(i&&!lO(s))throw new Error(Ar(17));c=s.reducer,h=s.prepare}else c=s;u.addCase(n,c).exposeCaseReducer(r,c).exposeAction(r,h?av(n,h):av(n))}function sO(n){return n._reducerDefinitionType==="asyncThunk"}function lO(n){return n._reducerDefinitionType==="reducerWithPrepare"}function oO({type:n,reducerName:r},i,s,u){if(!u)throw new Error(Ar(18));const{payloadCreator:c,fulfilled:h,pending:d,rejected:m,settled:g,options:y}=i,_=u(n,c,y);s.exposeAction(r,_),h&&s.addCase(_.fulfilled,h),d&&s.addCase(_.pending,d),m&&s.addCase(_.rejected,m),g&&s.addMatcher(_.settled,g),s.exposeCaseReducer(r,{fulfilled:h||Uo,pending:d||Uo,rejected:m||Uo,settled:g||Uo})}function Uo(){}function Ar(n){return`Minified Redux Toolkit error #${n}; visit https://redux-toolkit.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `}const uO={formValues:{}},xb=Ud({name:"start-screen",initialState:uO,reducers:{showStartScreen(n){n.startScreenStatus="VISIBLE",n.formValues={}},startChat(n,r){n.startScreenStatus="HIDDEN",n.formValues=r.payload}}}),{startChat:cO,showStartScreen:fO}=xb.actions,hO=xb.reducer,Ob="RESET_CHAT_STATE",Rb="TOGGLE_TRANSCRIPT_MAIL_OVERLAY",dO=()=>({type:ob}),mO=()=>({type:Ob}),wb=()=>({type:Rb}),lv=(n,r,i)=>(s,u)=>{try{const c=u().connection.sessionId;if(!c)throw new Error("Session ID is not available");s({type:Nd,payload:{chunkId:i}}),ov(n,c,r,i,!1,s),ov(n,c,r,i,!0,s)}catch(c){console.error("Error loading source infos:",c),s({type:Cd})}},ov=(n,r,i,s,u,c)=>{const h=`/${n}/me/chat-widget/transcript/${i}/chunks/${s}?highlight=${u}`;fetch(h,{headers:{"x-bubble-chat-session-id":r}}).then(d=>{if(!d.ok)throw new Error(`HTTP error! Status: ${d.status}`);return d.json()}).then(d=>{const m={...d,chunkId:s,highlighted:u};c({type:sb,payload:m})}).catch(d=>{console.error("Error fetching source infos:",d),c({type:Cd,payload:{highlighted:u}})})},pO=()=>({type:Md}),Hd="CONNECT",jd="CONNECTING",Id="CONNECTED",zd="DISCONNECTED",Gd="RECONNECTED",kd="RESTORE_SESSION_ID",hu="START",du="CLEAR_SESSION_ID",gO=[Hd,jd,Id,zd,Gd,kd],yO=(n,r)=>({type:Hd,clientName:n,querystrings:r}),vO=n=>({type:kd,sessionId:n}),bO=()=>({type:jd}),_O=()=>({type:Id}),EO=()=>({type:zd}),SO=()=>({type:Gd}),Cb=(n,r)=>(i,s)=>{const u=s().connection,c=s().startScreen.formValues;let h=u.sessionId;h===void 0&&(h=$h());let d=u.userId;if(d===void 0){const m=Bo.get("bubble-chat-user-id")||Bo.get("bubble-chat-userId")||Bo.get("bf-webclient-userId");d=m||$h(),Bo.set("bubble-chat-user-id",d)}i({type:hu,payload:{sessionId:h,userId:d,clientName:n,querystrings:{...r,...c}}})},mu=(n,r)=>(i,s)=>{const u=s().connection.sessionId||"";if(i(TO(u)),i(mO()),s().settings.enableStartScreen)i(fO());else return i(Cb(n,r))},TO=n=>({type:du,payload:{sessionId:n}}),tt=()=>{const n=su();return i=>{const s=n.formatMessage({id:i});return s===i?void 0:s}};var ja=(n=>(n[n.CONNECTING=0]="CONNECTING",n[n.CONNECTED=1]="CONNECTED",n[n.RECONNECTED=2]="RECONNECTED",n[n.DISCONNECTED=3]="DISCONNECTED",n))(ja||{}),tu=(n=>(n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON",n))(tu||{});const AO="_container_q2uun_1",xO="_chatcontent_q2uun_6",OO="_accessabilityHidden_q2uun_12",ah={container:AO,chatcontent:xO,accessabilityHidden:OO},RO="_messageContainer_ofi0g_1",wO="_messages_ofi0g_12",uv={messageContainer:RO,messages:wO};function Ha(){return Ha=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])}return n},Ha.apply(this,arguments)}const CO=["children","options"],NO={footnoteReference:"7"},cv=["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((n,r)=>(n[r.toLowerCase()]=r,n),{class:"className",for:"htmlFor"}),fv={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},MO=["style","script","pre"],DO=["src","href","data","formAction","srcDoc","action"],BO=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,LO=/mailto:/i,UO=/\n{2,}$/,hv=/^(\s*>[\s\S]*?)(?=\n\n|$)/,HO=/^ *> ?/gm,jO=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,IO=/^ {2,}\n/,zO=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,dv=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,mv=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,GO=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,kO=/^(?:\n *)*\n/,qO=/\r\n?/g,FO=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,PO=/^\[\^([^\]]+)]/,VO=/\f/g,YO=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,XO=/^\s*?\[(x|\s)\]/,pv=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,gv=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,yv=/^([^\n]+)\n *(=|-){3,} *\n/,ih=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,ZO=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,vv=/^<!--[\s\S]*?(?:-->)/,QO=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,sh=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,KO=/^\{.*\}$/,$O=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,WO=/^<([^ >]+@[^ >]+)>/,JO=/^<([^ >]+:\/[^ >]+)>/,eR=/-([a-z])?/gi,bv=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,tR=/^[^\n]+(?: \n|\n{2,})/,nR=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,rR=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,aR=/^\[([^\]]*)\] ?\[([^\]]*)\]/,iR=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,sR=/\t/g,lR=/(^ *\||\| *$)/g,oR=/^ *:-+: *$/,uR=/^ *:-+ *$/,cR=/^ *-+: *$/,pu="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",fR=RegExp(`^([*_])\\1${pu}\\1\\1(?!\\1)`),hR=RegExp(`^([*_])${pu}\\1(?!\\1)`),dR=RegExp(`^(==)${pu}\\1`),mR=RegExp(`^(~~)${pu}\\1`),pR=/^\\([^0-9A-Za-z\s])/,gR=/\\([^0-9A-Za-z\s])/g,yR=/^[\s\S](?:(?! |[0-9]\.|http)[^=*_~\-\n<`\\\[!])*/,vR=/^\n+/,bR=/^([ \t]*)/,_R=/(?:^|\n)( *)$/,qd="(?:\\d+\\.)",Fd="(?:[*+-])";function Nb(n){return"( *)("+(n===1?qd:Fd)+") +"}const Mb=Nb(1),Db=Nb(2);function Bb(n){return RegExp("^"+(n===1?Mb:Db))}const ER=Bb(1),SR=Bb(2);function Lb(n){return RegExp("^"+(n===1?Mb:Db)+"[^\\n]*(?:\\n(?!\\1"+(n===1?qd:Fd)+" )[^\\n]*)*(\\n|$)","gm")}const TR=Lb(1),AR=Lb(2);function Ub(n){const r=n===1?qd:Fd;return RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}const Hb=Ub(1),jb=Ub(2);function _v(n,r){const i=r===1,s=i?Hb:jb,u=i?TR:AR,c=i?ER:SR;return{t:h=>c.test(h),o:rl(function(h,d){const m=_R.exec(d.prevCapture);return m&&(d.list||!d.inline&&!d.simple)?s.exec(h=m[1]+h):null}),i:1,u(h,d,m){const g=i?+h[2]:void 0,y=h[0].replace(UO,`
|
|
94
94
|
`).match(u);let _=!1;return{items:y.map(function(T,L){const N=c.exec(T)[0].length,V=RegExp("^ {1,"+N+"}","gm"),G=T.replace(V,"").replace(c,""),E=L===y.length-1,w=G.indexOf(`
|
|
95
95
|
|
|
96
96
|
`)!==-1||E&&_;_=w;const S=m.inline,I=m.list;let x;m.list=!0,w?(m.inline=!1,x=Ks(G)+`
|
|
@@ -121,4 +121,4 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
|
|
|
121
121
|
|
|
122
122
|
- La cronologia delle chat è memorizzata nell'area UE e può essere visualizzata solo da persone autorizzate.
|
|
123
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.close":"Chiudere","start-screen.intro":"","start-screen.start-chat":"Avviare la chat","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","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"},k3=["de","en","fr","it"],a_={locale:"de",messages:r_},q3=(n,r)=>{if(k3.includes(n)){const i=F3(n),s=j3(r);return{...i,...s}}return r},F3=n=>{switch(n.toString()){case"en":return I3;case"fr":return z3;case"it":return G3;default:return r_}},P3=(n=V3,r)=>{switch(r.type){case jd:return Object.assign({},n,{connectionState:ja.CONNECTING});case Id:return Object.assign({},n,{connectionState:ja.CONNECTED});case zd:return Object.assign({},n,{connectionState:ja.DISCONNECTED});case Gd:return Object.assign({},n,{connectionState:ja.RECONNECTED});case kd:return Object.assign({},n,{sessionId:r.sessionId});case hu:return Object.assign({},n,{sessionId:r.payload.sessionId,userId:r.payload.userId});case du:return Object.assign({},n,{sessionId:void 0});default:return n}},V3={connectionState:ja.DISCONNECTED,sessionId:void 0,userId:void 0},Y3=(n=o1,r)=>{switch(r.type){case Ob:return o1;case hu:return La({type:"webclient.chat.started"}),n;case du:return La({type:"webclient.chat.ended"}),n;case Oe.ActionTypes.TYPING_ON:return Object.assign({},n,{isBotTyping:!0});case Oe.ActionTypes.TYPING_OFF:return Object.assign({},n,{isBotTyping:!1});case Oe.ActionTypes.MESSAGE_FROM_GUEST:case Oe.ActionTypes.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return l1(n,r.message);case Oe.ActionTypes.MESSAGE_TO_GUEST:{La(r);const i=Object.assign({},r.message,{_id:r.meta.actionId}),s=n.messages.filter(u=>u._id===r.meta.actionId).length>0;return Object.assign({},n,{isBotTyping:!1,messages:s?n.messages:n.messages.concat([i]),quickReplies:i.quickReplies?i.quickReplies:[]})}case xd:{const i=r.messages,s=i.length?i[i.length-1]:void 0;return Object.assign({},n,{isBotTyping:!1,messages:i,quickReplies:s?.quickReplies||[]})}case Ad:return La(r.message),n;case Oe.ActionTypes.EVENT_TO_GUEST:return La(r.event),n;case Oe.ActionTypes.DRAWER_OPEN:return Object.assign({},n,{drawerContentUrl:r.payload.parameters.contentUrl});case Oe.ActionTypes.DRAWER_CLOSE:return Object.assign({},n,{drawerContentUrl:void 0});case Oe.ActionTypes.GUEST_LOCALE_CHANGED:return Object.assign({},n,{locale:r.payload.locale});case lb:return La(r),n;case ob:return La(r),n;case Rd:{const i=new Oe.TextMessage(r.transcription,new Oe.GuestUser),s=Object.assign({},i,{_id:$h()});return l1(n,s)}case Oe.ActionTypes.TRANSCRIPT_ITEM_GUEST_REACTION:{const i=n.messages.map(s=>s._id===r.payload.actionId?Object.assign({},s,{reaction:r.payload.reaction}):s);return Object.assign({},n,{messages:i})}case wd:{const i={enabled:!0,rating:r.payload.rating};return Object.assign({},n,{conversationRating:i})}case Oe.ActionTypes.CONVERSATION_RATING_FROM_GUEST:{const i={...n.conversationRating,rating:r.payload};return Object.assign({},n,{conversationRating:i})}case Nd:return{...n,sourceInfos:{type:"loading",chunkId:r.payload.chunkId}};case Cd:{const{highlighted:i}=r.payload;return n.sourceInfos?.type==="loaded"&&i?{...n,sourceInfos:{...n.sourceInfos,highlighted:!0}}:{...n,sourceInfos:{type:"loading-error"}}}case sb:{const i=n.sourceInfos?.type,{chunkId:s,knowledgeBaseType:u,title:c,content:h,highlighted:d,url:m}=r.payload,g=n.sourceInfos?.type==="loading"||n.sourceInfos?.type==="loaded"?n.sourceInfos?.chunkId:void 0;return g&&g!==s?n:i==="loading"||i==="loaded"&&d?{...n,sourceInfos:{type:"loaded",chunkId:s,knowledgeBaseType:u,title:c,content:h,highlighted:d,url:m}}:n}case Md:return{...n,sourceInfos:void 0};case Rb:return{...n,showTranscriptMailOverlay:!n.showTranscriptMailOverlay};default:return n}},l1=(n,r)=>{const i=n.messages[n.messages.length-1],s=i?.text===r.text;return i&&i.sender.type===r.sender.type&&s?n:Object.assign({},n,{messages:n.messages.concat([r]),quickReplies:[]})},La=n=>{X3()?window.top?.postMessage(n,"*"):n.type==="webclient.change.url"&&window.open(n.url)},X3=()=>typeof window<"u"&&window.self!==window.top,o1={messages:[],quickReplies:[],isBotTyping:!1,showTranscriptMailOverlay:!1,conversationRating:{enabled:!1}},i_=Ud({name:"intl",initialState:a_,reducers:{updateIntl:(n,r)=>{n.locale=r.payload.language,n.messages=r.payload.messages}}}),{updateIntl:Z3}=i_.actions,Q3=i_.reducer,K3={version:void 0,enableStartScreen:void 0,enableStandaloneView:!1,enableTranscriptExportEmail:!1,enableTranscriptExportPdf:!1,enableGeneralConditions:!1,enableSpeechSupport:!1,commands:[],menuItems:[]},s_=Ud({name:"settings",initialState:K3,reducers:{setSettings(n,r){n.version&&n.version!==r.payload.version?(console.log("version changed, reloading chat window"),location.replace(location.href)):(n.version=r.payload.version,n.enableStartScreen=r.payload.enableStartScreen,n.enableStandaloneView=r.payload.enableStandaloneView,n.enableTranscriptExportEmail=r.payload.enableTranscriptExportEmail,n.enableTranscriptExportPdf=r.payload.enableTranscriptExportPdf,n.enableGeneralConditions=r.payload.enableGeneralConditions,n.enableSpeechSupport=r.payload.enableSpeechSupport,n.commands=r.payload.commands,n.menuItems=r.payload.menuItems||[])}}}),{setSettings:$3}=s_.actions,W3=s_.reducer,J3=mb({settings:W3,chat:Y3,startScreen:hO,connection:P3,intl:Q3}),eM="bubble-chat",l_="state-last-saved-at",o_="state",tM=n=>{try{if(!aM())return;const r=u1(n,l_);if(rM(r))return;{const i=u1(n,o_);return i===null?void 0:JSON.parse(i)}}catch(r){console.error(r);return}},nM=(n,r)=>{try{const i=JSON.stringify(r);c1(n,o_,i);const s=new Date().toISOString();c1(n,l_,s)}catch(i){console.error(i)}},rM=n=>{if(n===null)return!1;const r=new Date(n);return r.setHours(r.getHours()+12),new Date>r},aM=()=>typeof localStorage<"u",u1=(n,r)=>{const i=u_(n,r);return localStorage.getItem(i)},c1=(n,r,i)=>{const s=u_(n,r);return localStorage.setItem(s,i)},u_=(n,r)=>`${eM}-${n}-${r}`,er=Object.create(null);er.open="0";er.close="1";er.ping="2";er.pong="3";er.message="4";er.upgrade="5";er.noop="6";const Vo=Object.create(null);Object.keys(er).forEach(n=>{Vo[er[n]]=n});const ld={type:"error",data:"parser error"},c_=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",f_=typeof ArrayBuffer=="function",h_=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Xd=({type:n,data:r},i,s)=>c_&&r instanceof Blob?i?s(r):f1(r,s):f_&&(r instanceof ArrayBuffer||h_(r))?i?s(r):f1(new Blob([r]),s):s(er[n]+(r||"")),f1=(n,r)=>{const i=new FileReader;return i.onload=function(){const s=i.result.split(",")[1];r("b"+(s||""))},i.readAsDataURL(n)};function h1(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let Bh;function iM(n,r){if(c_&&n.data instanceof Blob)return n.data.arrayBuffer().then(h1).then(r);if(f_&&(n.data instanceof ArrayBuffer||h_(n.data)))return r(h1(n.data));Xd(n,!1,i=>{Bh||(Bh=new TextEncoder),r(Bh.encode(i))})}const d1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<d1.length;n++)Qs[d1.charCodeAt(n)]=n;const sM=n=>{let r=n.length*.75,i=n.length,s,u=0,c,h,d,m;n[n.length-1]==="="&&(r--,n[n.length-2]==="="&&r--);const g=new ArrayBuffer(r),y=new Uint8Array(g);for(s=0;s<i;s+=4)c=Qs[n.charCodeAt(s)],h=Qs[n.charCodeAt(s+1)],d=Qs[n.charCodeAt(s+2)],m=Qs[n.charCodeAt(s+3)],y[u++]=c<<2|h>>4,y[u++]=(h&15)<<4|d>>2,y[u++]=(d&3)<<6|m&63;return g},lM=typeof ArrayBuffer=="function",Zd=(n,r)=>{if(typeof n!="string")return{type:"message",data:d_(n,r)};const i=n.charAt(0);return i==="b"?{type:"message",data:oM(n.substring(1),r)}:Vo[i]?n.length>1?{type:Vo[i],data:n.substring(1)}:{type:Vo[i]}:ld},oM=(n,r)=>{if(lM){const i=sM(n);return d_(i,r)}else return{base64:!0,data:n}},d_=(n,r)=>{switch(r){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},m_="",uM=(n,r)=>{const i=n.length,s=new Array(i);let u=0;n.forEach((c,h)=>{Xd(c,!1,d=>{s[h]=d,++u===i&&r(s.join(m_))})})},cM=(n,r)=>{const i=n.split(m_),s=[];for(let u=0;u<i.length;u++){const c=Zd(i[u],r);if(s.push(c),c.type==="error")break}return s};function fM(){return new TransformStream({transform(n,r){iM(n,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))}n.data&&typeof n.data!="string"&&(u[0]|=128),r.enqueue(u),r.enqueue(i)})}})}let Lh;function Go(n){return n.reduce((r,i)=>r+i.length,0)}function ko(n,r){if(n[0].length===r)return n.shift();const i=new Uint8Array(r);let s=0;for(let u=0;u<r;u++)i[u]=n[0][s++],s===n[0].length&&(n.shift(),s=0);return n.length&&s<n[0].length&&(n[0]=n[0].slice(s)),i}function hM(n,r){Lh||(Lh=new TextDecoder);const i=[];let s=0,u=-1,c=!1;return new TransformStream({transform(h,d){for(i.push(h);;){if(s===0){if(Go(i)<1)break;const m=ko(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(Go(i)<2)break;const m=ko(i,2);u=new DataView(m.buffer,m.byteOffset,m.length).getUint16(0),s=3}else if(s===2){if(Go(i)<8)break;const m=ko(i,8),g=new DataView(m.buffer,m.byteOffset,m.length),y=g.getUint32(0);if(y>Math.pow(2,21)-1){d.enqueue(ld);break}u=y*Math.pow(2,32)+g.getUint32(4),s=3}else{if(Go(i)<u)break;const m=ko(i,u);d.enqueue(Zd(c?m:Lh.decode(m),r)),s=0}if(u===0||u>n){d.enqueue(ld);break}}}})}const p_=4;function ct(n){if(n)return dM(n)}function dM(n){for(var r in ct.prototype)n[r]=ct.prototype[r];return n}ct.prototype.on=ct.prototype.addEventListener=function(n,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(r),this};ct.prototype.once=function(n,r){function i(){this.off(n,i),r.apply(this,arguments)}return i.fn=r,this.on(n,i),this};ct.prototype.off=ct.prototype.removeListener=ct.prototype.removeAllListeners=ct.prototype.removeEventListener=function(n,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+n];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+n],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["$"+n],this};ct.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),i=this._callbacks["$"+n],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};ct.prototype.emitReserved=ct.prototype.emit;ct.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};ct.prototype.hasListeners=function(n){return!!this.listeners(n).length};const yu=typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,i)=>i(r,0),En=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),mM="arraybuffer";function g_(n,...r){return r.reduce((i,s)=>(n.hasOwnProperty(s)&&(i[s]=n[s]),i),{})}const pM=En.setTimeout,gM=En.clearTimeout;function vu(n,r){r.useNativeTimers?(n.setTimeoutFn=pM.bind(En),n.clearTimeoutFn=gM.bind(En)):(n.setTimeoutFn=En.setTimeout.bind(En),n.clearTimeoutFn=En.clearTimeout.bind(En))}const yM=1.33;function vM(n){return typeof n=="string"?bM(n):Math.ceil((n.byteLength||n.size)*yM)}function bM(n){let r=0,i=0;for(let s=0,u=n.length;s<u;s++)r=n.charCodeAt(s),r<128?i+=1:r<2048?i+=2:r<55296||r>=57344?i+=3:(s++,i+=4);return i}function y_(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function _M(n){let r="";for(let i in n)n.hasOwnProperty(i)&&(r.length&&(r+="&"),r+=encodeURIComponent(i)+"="+encodeURIComponent(n[i]));return r}function EM(n){let r={},i=n.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 SM extends Error{constructor(r,i,s){super(r),this.description=i,this.context=s,this.type="TransportError"}}class Qd extends ct{constructor(r){super(),this.writable=!1,vu(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 SM(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=Zd(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=_M(r);return i.length?"?"+i:""}}class TM extends Qd{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)};cM(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,uM(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]=y_()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(r,i)}}let v_=!1;try{v_=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const AM=v_;function xM(){}class OM extends TM{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 Wn extends ct{constructor(r,i,s){super(),this.createRequest=r,vu(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=g_(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=Wn.requestsCount++,Wn.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=xM,r)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Wn.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()}}Wn.requestsCount=0;Wn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",m1);else if(typeof addEventListener=="function"){const n="onpagehide"in En?"pagehide":"unload";addEventListener(n,m1,!1)}}function m1(){for(let n in Wn.requests)Wn.requests.hasOwnProperty(n)&&Wn.requests[n].abort()}const RM=function(){const n=b_({xdomain:!1});return n&&n.responseType!==null}();class wM extends OM{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 Wn(b_,this.uri(),r)}}function b_(n){const r=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!r||AM))return new XMLHttpRequest}catch{}if(!r)try{return new En[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const __=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class CM extends Qd{get name(){return"websocket"}doOpen(){const r=this.uri(),i=this.opts.protocols,s=__?{}:g_(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;Xd(s,this.supportsBinary,c=>{try{this.doWrite(s,c)}catch{}u&&yu(()=>{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]=y_()),this.supportsBinary||(i.b64=1),this.createUri(r,i)}}const Uh=En.WebSocket||En.MozWebSocket;class NM extends CM{createSocket(r,i,s){return __?new Uh(r,i,s):i?new Uh(r,i):new Uh(r)}doWrite(r,i){this.ws.send(i)}}class MM extends Qd{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=hM(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=r.readable.pipeThrough(i).getReader(),u=fM();u.readable.pipeTo(r.writable),this._writer=u.writable.getWriter();const c=()=>{s.read().then(({done:d,value:m})=>{d||(this.onPacket(m),c())}).catch(d=>{})};c();const h={type:"open"};this.query.sid&&(h.data=`{"sid":"${this.query.sid}"}`),this._writer.write(h).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&&yu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var r;(r=this._transport)===null||r===void 0||r.close()}}const DM={websocket:NM,webtransport:MM,polling:wM},BM=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,LM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function od(n){if(n.length>8e3)throw"URI too long";const r=n,i=n.indexOf("["),s=n.indexOf("]");i!=-1&&s!=-1&&(n=n.substring(0,i)+n.substring(i,s).replace(/:/g,";")+n.substring(s,n.length));let u=BM.exec(n||""),c={},h=14;for(;h--;)c[LM[h]]=u[h]||"";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=UM(c,c.path),c.queryKey=HM(c,c.query),c}function UM(n,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(n,r){const i={};return r.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,u,c){u&&(i[u]=c)}),i}const ud=typeof addEventListener=="function"&&typeof removeEventListener=="function",Yo=[];ud&&addEventListener("offline",()=>{Yo.forEach(n=>n())},!1);class sa extends ct{constructor(r,i){if(super(),this.binaryType=mM,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=od(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=od(i.host).host);vu(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=EM(this.opts.query)),ud&&(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"})},Yo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(r){const i=Object.assign({},this.opts.query);i.EIO=p_,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+=vM(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,yu(()=>{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(),ud&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Yo.indexOf(this._offlineEventListener);s!==-1&&Yo.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",r,i),this.writeBuffer=[],this._prevBufferLen=0}}}sa.protocol=p_;class jM 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"&&(y(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=i.name,this.emitReserved("upgradeError",T)}}))};function c(){s||(s=!0,y(),i.close(),i=null)}const h=_=>{const T=new Error("probe error: "+_);T.transport=i.name,c(),this.emitReserved("upgradeError",T)};function d(){h("transport closed")}function m(){h("socket closed")}function g(_){i&&_.name!==i.name&&c()}const y=()=>{i.removeListener("open",u),i.removeListener("error",h),i.removeListener("close",d),this.off("close",m),this.off("upgrading",g)};i.once("open",u),i.once("error",h),i.once("close",d),this.once("close",m),this.once("upgrading",g),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 IM=class extends jM{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=>DM[u]).filter(u=>!!u)),super(r,s)}};function zM(n,r="",i){let s=n;i=i||typeof location<"u"&&location,n==null&&(n=i.protocol+"//"+i.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=i.protocol+n:n=i.host+n),/^(https?|wss?):\/\//.test(n)||(typeof i<"u"?n=i.protocol+"//"+n:n="https://"+n),s=od(n)),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",kM=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,E_=Object.prototype.toString,qM=typeof Blob=="function"||typeof Blob<"u"&&E_.call(Blob)==="[object BlobConstructor]",FM=typeof File=="function"||typeof File<"u"&&E_.call(File)==="[object FileConstructor]";function Kd(n){return GM&&(n instanceof ArrayBuffer||kM(n))||qM&&n instanceof Blob||FM&&n instanceof File}function Xo(n,r){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let i=0,s=n.length;i<s;i++)if(Xo(n[i]))return!0;return!1}if(Kd(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return Xo(n.toJSON(),!0);for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&Xo(n[i]))return!0;return!1}function PM(n){const r=[],i=n.data,s=n;return s.data=cd(i,r),s.attachments=r.length,{packet:s,buffers:r}}function cd(n,r){if(!n)return n;if(Kd(n)){const i={_placeholder:!0,num:r.length};return r.push(n),i}else if(Array.isArray(n)){const i=new Array(n.length);for(let s=0;s<n.length;s++)i[s]=cd(n[s],r);return i}else if(typeof n=="object"&&!(n instanceof Date)){const i={};for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=cd(n[s],r));return i}return n}function VM(n,r){return n.data=fd(n.data,r),delete n.attachments,n}function fd(n,r){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<r.length)return r[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let i=0;i<n.length;i++)n[i]=fd(n[i],r);else if(typeof n=="object")for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=fd(n[i],r));return n}const YM=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],XM=5;var Ce;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Ce||(Ce={}));class ZM{constructor(r){this.replacer=r}encode(r){return(r.type===Ce.EVENT||r.type===Ce.ACK)&&Xo(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=PM(r),s=this.encodeAsString(i.packet),u=i.buffers;return u.unshift(s),u}}function p1(n){return Object.prototype.toString.call(n)==="[object Object]"}class $d extends ct{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 QM(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(Kd(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 h=r.substring(c,i);if(h!=Number(h)||r.charAt(i)!=="-")throw new Error("Illegal attachments");s.attachments=Number(h)}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 h=r.charAt(i);if(h==null||Number(h)!=h){--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($d.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 p1(i);case Ce.DISCONNECT:return i===void 0;case Ce.CONNECT_ERROR:return typeof i=="string"||p1(i);case Ce.EVENT:case Ce.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&YM.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 QM{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=VM(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const KM=Object.freeze(Object.defineProperty({__proto__:null,Decoder:$d,Encoder:ZM,get PacketType(){return Ce},protocol:XM},Symbol.toStringTag,{value:"Module"}));function jn(n,r,i){return n.on(r,i),function(){n.off(r,i)}}const $M=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class S_ extends ct{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=[jn(r,"open",this.onopen.bind(this)),jn(r,"packet",this.onpacket.bind(this)),jn(r,"error",this.onerror.bind(this)),jn(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($M.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 h={type:Ce.EVENT,data:i};if(h.options={},h.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const y=this.ids++,_=i.pop();this._registerAckCallback(y,_),h.id=y}const d=(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&&!d||(m?(this.notifyOutgoingListeners(h),this.packet(h)):this.sendBuffer.push(h)),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 d=0;d<this.sendBuffer.length;d++)this.sendBuffer[d].id===r&&this.sendBuffer.splice(d,1);i.call(this,new Error("operation has timed out"))},u),h=(...d)=>{this.io.clearTimeoutFn(c),i.apply(this,d)};h.withError=!0,this.acks[r]=h}emitWithAck(r,...i){return new Promise((s,u)=>{const c=(h,d)=>h?u(h):s(d);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 Ni(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Ni.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),i=Math.floor(r*this.jitter*n);n=(Math.floor(r*10)&1)==0?n-i:n+i}return Math.min(n,this.max)|0};Ni.prototype.reset=function(){this.attempts=0};Ni.prototype.setMin=function(n){this.ms=n};Ni.prototype.setMax=function(n){this.max=n};Ni.prototype.setJitter=function(n){this.jitter=n};class hd extends ct{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,vu(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 Ni({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||KM;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 IM(this.uri,this.opts);const i=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const u=jn(i,"open",function(){s.onopen(),r&&r()}),c=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),r?r(d):this.maybeReconnectOnOpen()},h=jn(i,"error",c);if(this._timeout!==!1){const d=this._timeout,m=this.setTimeoutFn(()=>{u(),c(new Error("timeout")),i.close()},d);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(u),this.subs.push(h),this}connect(r){return this.open(r)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const r=this.engine;this.subs.push(jn(r,"ping",this.onping.bind(this)),jn(r,"data",this.ondata.bind(this)),jn(r,"error",this.onerror.bind(this)),jn(r,"close",this.onclose.bind(this)),jn(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){yu(()=>{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 S_(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 Ys={};function Zo(n,r){typeof n=="object"&&(r=n,n=void 0),r=r||{};const i=zM(n,r.path||"/socket.io"),s=i.source,u=i.id,c=i.path,h=Ys[u]&&c in Ys[u].nsps,d=r.forceNew||r["force new connection"]||r.multiplex===!1||h;let m;return d?m=new hd(s,r):(Ys[u]||(Ys[u]=new hd(s,r)),m=Ys[u]),i.query&&!r.query&&(r.query=i.queryKey),m.socket(i.path,r)}Object.assign(Zo,{Manager:hd,Socket:S_,io:Zo,connect:Zo});const WM=[Oe.ActionTypes.MESSAGE_TO_GUEST,Oe.ActionTypes.EVENT_TO_GUEST,Oe.ActionTypes.TYPING_ON,Oe.ActionTypes.TYPING_OFF,Oe.ActionTypes.RESTART_CHAT_REQUEST,...gO,...mx,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],JM=({dispatch:n,getState:r})=>i=>{let s=null;return u=>{const c=i(u);if(u.type===Hd){s?.disconnect(),n(bO());const h=`/chat?${lu.stringify(u.querystrings)}`;s=Zo(`/${u.clientName}${h}`),s.on("action",n),s.on("connect",()=>n(_O())),s.on("disconnect",()=>n(EO())),s.on("reconnect",()=>n(SO())),s.on("set-translations",(d,m)=>{n(Z3({language:d,messages:q3(d,m)}))}),s.on("set-settings",d=>{n($3(d))}),s.on("enable-conversation-rating",d=>n(bx(d))),s.on("speech-transcription",d=>n(gx(d))),s.on("restore-client-state",d=>{n(vO(d.sessionId)),n(Ex(d.messages))}),s.on("expand-window",({devices:d,initial:m=!1})=>{n({type:lb,devices:d,initial:m})}),s.on("restart-chat",()=>{n(mu(u.clientName,u.querystrings))})}else if(u.type===hu)s?.emit("start-chat",u.payload);else if(u.type===du)s?.emit("terminate-session",u.payload);else if(u.type===dx)s?.emit("get-started",JSON.stringify(u));else if(u.type===Od)s?.emit("audio-message",u.buffer);else if(u.type===Oe.ActionTypes.CONVERSATION_RATING_FROM_GUEST)s?.emit("conversation-rating",u.payload);else if(u.type===ub){const{connection:{sessionId:h}}=r();window.location.href=`/transcript-pdf/${h}`}else WM.indexOf(u.type)===-1&&u.meta===void 0&&s&&s.emit("action",JSON.stringify(u));return c}},T_=Vb(),e4={...tM(T_),intl:a_},dd=$x({middleware:n=>n().concat(JM),reducer:J3,preloadedState:e4});dd.subscribe(L3(()=>{const n=dd.getState();nM(T_,{connection:n.connection,startScreen:n.startScreen})},1e3));const t4=document.getElementById("root"),n4=zS.createRoot(t4);n4.render(v.jsx(I2,{store:dd,children:v.jsx(_3,{})}));
|
|
124
|
-
//# sourceMappingURL=index-
|
|
124
|
+
//# sourceMappingURL=index-DW1INPmO.js.map
|