@botfabrik/engine-webclient 4.96.18 → 4.96.20
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 oy;function vA(){if(oy)return Le;oy=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,d=n?Symbol.for("react.provider"):60109,h=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,E=n?Symbol.for("react.suspense"):60113,x=n?Symbol.for("react.suspense_list"):60120,L=n?Symbol.for("react.memo"):60115,R=n?Symbol.for("react.lazy"):60116,F=n?Symbol.for("react.block"):60121,z=n?Symbol.for("react.fundamental"):60117,_=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function S(A){if(typeof A=="object"&&A!==null){var Z=A.$$typeof;switch(Z){case r:switch(A=A.type,A){case m:case g:case s:case c:case u:case E:return A;default:switch(A=A&&A.$$typeof,A){case h:case y:case R:case L:case d:return A;default:return Z}}case i:return Z}}}function I(A){return S(A)===g}return Le.AsyncMode=m,Le.ConcurrentMode=g,Le.ContextConsumer=h,Le.ContextProvider=d,Le.Element=r,Le.ForwardRef=y,Le.Fragment=s,Le.Lazy=R,Le.Memo=L,Le.Portal=i,Le.Profiler=c,Le.StrictMode=u,Le.Suspense=E,Le.isAsyncMode=function(A){return I(A)||S(A)===m},Le.isConcurrentMode=I,Le.isContextConsumer=function(A){return S(A)===h},Le.isContextProvider=function(A){return S(A)===d},Le.isElement=function(A){return typeof A=="object"&&A!==null&&A.$$typeof===r},Le.isForwardRef=function(A){return S(A)===y},Le.isFragment=function(A){return S(A)===s},Le.isLazy=function(A){return S(A)===R},Le.isMemo=function(A){return S(A)===L},Le.isPortal=function(A){return S(A)===i},Le.isProfiler=function(A){return S(A)===c},Le.isStrictMode=function(A){return S(A)===u},Le.isSuspense=function(A){return S(A)===E},Le.isValidElementType=function(A){return typeof A=="string"||typeof A=="function"||A===s||A===g||A===c||A===u||A===E||A===x||typeof A=="object"&&A!==null&&(A.$$typeof===R||A.$$typeof===L||A.$$typeof===d||A.$$typeof===h||A.$$typeof===y||A.$$typeof===z||A.$$typeof===_||A.$$typeof===w||A.$$typeof===F)},Le.typeOf=S,Le}var uy;function bA(){return uy||(uy=1,Pf.exports=vA()),Pf.exports}var Yf,cy;function _A(){if(cy)return Yf;cy=1;var n=bA(),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 d(R){return n.isMemo(R)?u:c[R.$$typeof]||r}var h=Object.defineProperty,m=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,y=Object.getOwnPropertyDescriptor,E=Object.getPrototypeOf,x=Object.prototype;function L(R,F,z){if(typeof F!="string"){if(x){var _=E(F);_&&_!==x&&L(R,_,z)}var w=m(F);g&&(w=w.concat(g(F)));for(var S=d(R),I=d(F),A=0;A<w.length;++A){var Z=w[A];if(!i[Z]&&!(z&&z[Z])&&!(I&&I[Z])&&!(S&&S[Z])){var $=y(F,Z);try{h(R,Z,$)}catch{}}}}return R}return Yf=L,Yf}_A();var Eh=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=H.createContext(null)):H.createContext(null);Eh.Consumer;var EA=Eh.Provider,SA=EA,TA=Eh;function ou(){var n=H.useContext(TA);return Y1(n),n}var Kd;(function(n){n.formatDate="FormattedDate",n.formatTime="FormattedTime",n.formatNumber="FormattedNumber",n.formatList="FormattedList",n.formatDisplayName="FormattedDisplayName"})(Kd||(Kd={}));var $d;(function(n){n.formatDate="FormattedDateParts",n.formatTime="FormattedTimeParts",n.formatNumber="FormattedNumberParts",n.formatList="FormattedListParts"})($d||($d={}));function Z1(n){var r=function(i){var s=ou(),u=i.value,c=i.children,d=lu(i,["value","children"]),h=typeof u=="string"?new Date(u||0):u,m=n==="formatDate"?s.formatDateToParts(h,d):s.formatTimeToParts(h,d);return c(m)};return r.displayName=$d[n],r}function nl(n){var r=function(i){var s=ou(),u=i.value,c=i.children,d=lu(i,["value","children"]),h=s[n](u,d);if(typeof c=="function")return c(h);var m=s.textComponent||H.Fragment;return H.createElement(m,null,h)};return r.displayName=Kd[n],r}function Q1(n){return n&&Object.keys(n).reduce(function(r,i){var s=n[i];return r[i]=G1(s)?gA(s):s,r},{})}var fy=function(n,r,i,s){for(var u=[],c=4;c<arguments.length;c++)u[c-4]=arguments[c];var d=Q1(s),h=Qd.apply(void 0,$n([n,r,i,d],u,!1));return Array.isArray(h)?pA(h):h},dy=function(n,r){var i=n.defaultRichTextElements,s=lu(n,["defaultRichTextElements"]),u=Q1(i),c=fA(ie(ie(ie({},X1),s),{defaultRichTextElements:u}),r),d={locale:c.locale,timeZone:c.timeZone,fallbackOnEmptyString:c.fallbackOnEmptyString,formats:c.formats,defaultLocale:c.defaultLocale,defaultFormats:c.defaultFormats,messages:c.messages,onError:c.onError,defaultRichTextElements:u};return ie(ie({},c),{formatMessage:fy.bind(null,d,c.formatters),$t:fy.bind(null,d,c.formatters)})};function Xf(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 AA=function(n){Tn(r,n);function r(){var i=n!==null&&n.apply(this,arguments)||this;return i.cache=F1(),i.state={cache:i.cache,intl:dy(Xf(i.props),i.cache),prevConfig:Xf(i.props)},i}return r.getDerivedStateFromProps=function(i,s){var u=s.prevConfig,c=s.cache,d=Xf(i);return yA(u,d)?null:{intl:dy(d,c),prevConfig:d}},r.prototype.render=function(){return Y1(this.state.intl),H.createElement(SA,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=X1,r}(H.PureComponent);nl("formatDate");nl("formatTime");nl("formatNumber");nl("formatList");nl("formatDisplayName");Z1("formatDate");Z1("formatTime");const xA="_app_1rj0t_1",OA={app:xA},ka=q2,Lt=P2,K1="%[a-f0-9]{2}",hy=new RegExp("("+K1+")|([^%]+?)","gi"),my=new RegExp("("+K1+")+","gi");function Wd(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([],Wd(i),Wd(s))}function RA(n){try{return decodeURIComponent(n)}catch{let r=n.match(hy)||[];for(let i=1;i<r.length;i++)n=Wd(r,i).join(""),r=n.match(hy)||[];return n}}function wA(n){const r={"%FE%FF":"��","%FF%FE":"��"};let i=my.exec(n);for(;i;){try{r[i[0]]=decodeURIComponent(i[0])}catch{const u=RA(i[0]);u!==i[0]&&(r[i[0]]=u)}i=my.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 CA(n){if(typeof n!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof n+"`");try{return decodeURIComponent(n)}catch{return wA(n)}}function NA(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 $1(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 MA=n=>n==null,DA=n=>encodeURIComponent(n).replaceAll(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),Jd=Symbol("encodeFragmentIdentifier");function BA(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 LA(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),d=typeof s=="string"&&!c&&Tr(s,n).includes(n.arrayFormatSeparator);s=d?Tr(s,n):s;const h=c||d?s.split(n.arrayFormatSeparator).map(m=>Tr(m,n)):s===null?s:Tr(s,n);u[i]=h};case"bracket-separator":return(i,s,u)=>{const c=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!c){u[i]=s&&Tr(s,n);return}const d=s===null?[]:Tr(s,n).split(n.arrayFormatSeparator);if(u[i]===void 0){u[i]=d;return}u[i]=[...u[i],...d]};default:return(i,s,u)=>{if(u[i]===void 0){u[i]=s;return}u[i]=[...[u[i]].flat(),s]}}}function W1(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?DA(n):encodeURIComponent(n):n}function Tr(n,r){return r.decode?CA(n):n}function J1(n){return Array.isArray(n)?n.sort():typeof n=="object"?J1(Object.keys(n)).sort((r,i)=>Number(r)-Number(i)).map(r=>n[r]):n}function eb(n){const r=n.indexOf("#");return r!==-1&&(n=n.slice(0,r)),n}function UA(n){let r="";const i=n.indexOf("#");return i!==-1&&(r=n.slice(i)),r}function py(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 Sh(n){n=eb(n);const r=n.indexOf("?");return r===-1?"":n.slice(r+1)}function Th(n,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...r},W1(r.arrayFormatSeparator);const i=LA(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[d,h]=$1(c,"=");d===void 0&&(d=c),h=h===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?h:Tr(h,r),i(Tr(d,r),h,s)}for(const[u,c]of Object.entries(s))if(typeof c=="object"&&c!==null&&r.types[u]!=="string")for(const[d,h]of Object.entries(c)){const m=r.types[u]?r.types[u].replace("[]",""):void 0;c[d]=py(h,r,m)}else typeof c=="object"&&c!==null&&r.types[u]==="string"?s[u]=Object.values(c).join(r.arrayFormatSeparator):s[u]=py(c,r,r.types[u]);return r.sort===!1?s:(r.sort===!0?Object.keys(s).sort():Object.keys(s).sort(r.sort)).reduce((u,c)=>{const d=s[c];return u[c]=d&&typeof d=="object"&&!Array.isArray(d)?J1(d):d,u},Object.create(null))}function tb(n,r){if(!n)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},W1(r.arrayFormatSeparator);const i=d=>r.skipNull&&MA(n[d])||r.skipEmptyString&&n[d]==="",s=BA(r),u={};for(const[d,h]of Object.entries(n))i(d)||(u[d]=h);const c=Object.keys(u);return r.sort!==!1&&c.sort(r.sort),c.map(d=>{const h=n[d];return h===void 0?"":h===null?ut(d,r):Array.isArray(h)?h.length===0&&r.arrayFormat==="bracket-separator"?ut(d,r)+"[]":h.reduce(s(d),[]).join("&"):ut(d,r)+"="+ut(h,r)}).filter(d=>d.length>0).join("&")}function nb(n,r){r={decode:!0,...r};let[i,s]=$1(n,"#");return i===void 0&&(i=n),{url:i?.split("?")?.[0]??"",query:Th(Sh(n),r),...r&&r.parseFragmentIdentifier&&s?{fragmentIdentifier:Tr(s,r)}:{}}}function rb(n,r){r={encode:!0,strict:!0,[Jd]:!0,...r};const i=eb(n.url).split("?")[0]||"",s=Sh(n.url),u={...Th(s,{sort:!1,...r}),...n.query};let c=tb(u,r);c&&=`?${c}`;let d=UA(n.url);if(typeof n.fragmentIdentifier=="string"){const h=new URL(i);h.hash=n.fragmentIdentifier,d=r[Jd]?h.hash:`#${n.fragmentIdentifier}`}return`${i}${c}${d}`}function ab(n,r,i){i={parseFragmentIdentifier:!0,[Jd]:!1,...i};const{url:s,query:u,fragmentIdentifier:c}=nb(n,i);return rb({url:s,query:NA(u,r),fragmentIdentifier:c},i)}function HA(n,r,i){const s=Array.isArray(r)?u=>!r.includes(u):(u,c)=>!r(u,c);return ab(n,s,i)}const uu=Object.freeze(Object.defineProperty({__proto__:null,exclude:HA,extract:Sh,parse:Th,parseUrl:nb,pick:ab,stringify:tb,stringifyUrl:rb},Symbol.toStringTag,{value:"Module"}));var Dn={},Bn={},Ie={},bo={},pe={},gy;function cn(){return gy||(gy=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 yy;function jA(){if(yy)return bo;yy=1,Object.defineProperty(bo,"__esModule",{value:!0});const n=cn(),r=()=>({type:n.DRAWER_CLOSE});return bo.default=r,bo}var _o={},vy;function IA(){if(vy)return _o;vy=1,Object.defineProperty(_o,"__esModule",{value:!0});const n=cn(),r=(i,s)=>({type:n.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:i,intent:s}});return _o.default=r,_o}var Eo={},by;function zA(){if(by)return Eo;by=1,Object.defineProperty(Eo,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.GUEST_CONNECTED,payload:{sessionId:i}});return Eo.default=r,Eo}var So={},_y;function GA(){if(_y)return So;_y=1,Object.defineProperty(So,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.GUEST_DISCONNECTED,payload:{sessionId:i}});return So.default=r,So}var To={},Ey;function kA(){if(Ey)return To;Ey=1,Object.defineProperty(To,"__esModule",{value:!0});const n=cn(),r=(i,s)=>({type:n.GUEST_LOCALE_CHANGED,payload:{previousLocale:i,newLocale:s}});return To.default=r,To}var Ao={},Sy;function qA(){if(Sy)return Ao;Sy=1,Object.defineProperty(Ao,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.DRAWER_OPEN,payload:{parameters:{contentUrl:i}}});return Ao.default=r,Ao}var xo={},Ke={},Ty;function Ah(){if(Ty)return Ke;Ty=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(E,x,L=[],R=[]){this.type=E,this.sender=x,this.sources=L,this.quickReplies=R}addQuickReply(E,x){this.quickReplies.push({label:E,payload:x})}}Ke.Message=n;class r extends n{text;constructor(E,x,L=[],R=[]){super(m.TEXT,x,L,R),this.text=E}}Ke.TextMessage=r;class i extends n{title;text;imageUrl;itemUrl;buttons;constructor(E,x){super(m.DETAIL,x),this.title=E,this.text="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(E){this.imageUrl=E}setItemUrl(E){this.itemUrl=E}setText(E){this.text=E}addButton(E){this.buttons.push(E)}}Ke.DetailMessage=i;class s extends n{markdown;constructor(E,x,L=[],R=[]){super(m.MARKDOWN,x,L,R),this.markdown=E}}Ke.MarkdownMessage=s;class u extends n{url;constructor(E,x){super(m.VIDEO,x),this.url=E}}Ke.VideoMessage=u;class c extends n{url;constructor(E,x){super(m.IMAGE,x),this.url=E}}Ke.ImageMessage=c;class d extends n{url;constructor(E,x){super(m.FILE,x),this.url=E}}Ke.FileMessage=d;class h extends n{url;constructor(E,x){super(m.AUDIO,x),this.url=E}}Ke.AudioMessage=h;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={},Ay;function xh(){if(Ay)return an;Ay=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(d,h,m,g){this.type=d,this.id=h,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(d,h,m){super(u.PERSON,d,h,m)}}an.PersonUser=s;var u;return function(c){c.GUEST="GUEST",c.BOT="BOT",c.PERSON="PERSON"}(u||(an.UserType=u={})),an}var xy;function FA(){if(xy)return xo;xy=1,Object.defineProperty(xo,"__esModule",{value:!0});const n=Ah(),r=xh(),i=cn(),s=u=>{const c=new n.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_FROM_GUEST,message:c}};return xo.default=s,xo}var Oo={},Oy;function VA(){if(Oy)return Oo;Oy=1,Object.defineProperty(Oo,"__esModule",{value:!0});const n=Ah(),r=xh(),i=cn(),s=(u,c={})=>{const d=new n.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:d,payload:c}};return Oo.default=s,Oo}var Ro={},Ry;function PA(){if(Ry)return Ro;Ry=1,Object.defineProperty(Ro,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.NLU_REQUEST_EVENT,event:i});return Ro.default=r,Ro}var wo={},wy;function YA(){if(wy)return wo;wy=1,Object.defineProperty(wo,"__esModule",{value:!0});const n=cn(),r=()=>({type:n.RESTART_CHAT_REQUEST});return wo.default=r,wo}var Co={},Cy;function XA(){if(Cy)return Co;Cy=1,Object.defineProperty(Co,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.MESSAGE_TO_GUEST,message:i});return Co.default=r,Co}var No={},Ny;function ZA(){if(Ny)return No;Ny=1,Object.defineProperty(No,"__esModule",{value:!0});const n=cn(),r=(i,s)=>({type:n.TRANSCRIPT_ITEM_GUEST_REACTION,payload:{actionId:i,reaction:s}});return No.default=r,No}var My;function QA(){if(My)return Ie;My=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(jA());Ie.closeDrawer=r.default;const i=n(IA());Ie.feedbackFromGuestResponse=i.default;const s=n(zA());Ie.guestConnected=s.default;const u=n(GA());Ie.guestDisconnected=u.default;const c=n(kA());Ie.guestLocaleChanged=c.default;const d=n(qA());Ie.openDrawer=d.default;const h=n(FA());Ie.receiveTextMessageFromGuest=h.default;const m=n(VA());Ie.receiveTextMessageWithoutAnalysisFromGuest=m.default;const g=n(PA());Ie.requestNLUEvent=g.default;const y=n(YA());Ie.restartChatRequest=y.default;const E=n(XA());Ie.sendMessageToGuest=E.default;const x=n(ZA());return Ie.transcriptItemGuestReaction=x.default,Ie}var Zf={},Dy;function KA(){return Dy||(Dy=1,Object.defineProperty(Zf,"__esModule",{value:!0})),Zf}var By;function $A(){return By||(By=1,function(n){var r=Bn&&Bn.__createBinding||(Object.create?function(c,d,h,m){m===void 0&&(m=h);var g=Object.getOwnPropertyDescriptor(d,h);(!g||("get"in g?!d.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,g)}:function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]}),i=Bn&&Bn.__setModuleDefault||(Object.create?function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}:function(c,d){c.default=d}),s=Bn&&Bn.__importStar||function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&(m[m.length]=g);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),g=0;g<m.length;g++)m[g]!=="default"&&r(h,d,m[g]);return i(h,d),h}}(),u=Bn&&Bn.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&r(d,c,h)};Object.defineProperty(n,"__esModule",{value:!0}),n.ActionTypes=n.Actions=void 0,n.Actions=s(QA()),n.ActionTypes=s(cn()),u(KA(),n)}(Bn)),Bn}var sn={},Qf={},Ly;function WA(){return Ly||(Ly=1,Object.defineProperty(Qf,"__esModule",{value:!0})),Qf}var Us={},Uy;function JA(){if(Uy)return Us;Uy=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.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 Us.NullableKnowledgeBaseAdapter=n,Us}var Hy;function ex(){if(Hy)return sn;Hy=1;var n=sn&&sn.__createBinding||(Object.create?function(u,c,d,h){h===void 0&&(h=d);var m=Object.getOwnPropertyDescriptor(c,d);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(u,h,m)}:function(u,c,d,h){h===void 0&&(h=d),u[h]=c[d]}),r=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(d){var h=[];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(h[h.length]=m);return h},u(c)};return function(c){if(c&&c.__esModule)return c;var d={};if(c!=null)for(var h=u(c),m=0;m<h.length;m++)h[m]!=="default"&&n(d,c,h[m]);return r(d,c),d}}();Object.defineProperty(sn,"__esModule",{value:!0}),sn.NullableCmsAdapter=sn.KnowledgeBase=void 0,sn.KnowledgeBase=i(WA());const s=JA();return sn.NullableCmsAdapter={knowledgeBase:new s.NullableKnowledgeBaseAdapter},sn}var Na={},Kf={},jy;function tx(){return jy||(jy=1,Object.defineProperty(Kf,"__esModule",{value:!0})),Kf}var $f={},Iy;function nx(){return Iy||(Iy=1,Object.defineProperty($f,"__esModule",{value:!0})),$f}var Wf={},zy;function rx(){return zy||(zy=1,Object.defineProperty(Wf,"__esModule",{value:!0})),Wf}var Jf={},Gy;function ax(){return Gy||(Gy=1,Object.defineProperty(Jf,"__esModule",{value:!0})),Jf}var Hs={},ky;function ix(){if(ky)return Hs;ky=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.checkMiddlewareCondition=void 0;const n=async(r,i,s)=>(Array.isArray(r)?r:[r]).reduce(async(c,d)=>await c?await d(i,s):!1,Promise.resolve(!0));return Hs.checkMiddlewareCondition=n,Hs}var ed={},qy;function sx(){return qy||(qy=1,Object.defineProperty(ed,"__esModule",{value:!0})),ed}var td={},Fy;function lx(){return Fy||(Fy=1,Object.defineProperty(td,"__esModule",{value:!0})),td}var nd={},Vy;function ox(){return Vy||(Vy=1,Object.defineProperty(nd,"__esModule",{value:!0})),nd}var Py;function ux(){return Py||(Py=1,function(n){var r=Na&&Na.__createBinding||(Object.create?function(s,u,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,d,h)}:function(s,u,c,d){d===void 0&&(d=c),s[d]=u[c]}),i=Na&&Na.__exportStar||function(s,u){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&r(u,s,c)};Object.defineProperty(n,"__esModule",{value:!0}),i(tx(),n),i(nx(),n),i(rx(),n),i(ax(),n),i(ix(),n),i(sx(),n),i(lx(),n),i(ox(),n)}(Na)),Na}var Ma={},Ln={},Yy;function cx(){if(Yy)return Ln;Yy=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.ButtonTypeEnum=Ln.PostbackButton=Ln.UrlButton=Ln.Button=void 0;class n{title;type;constructor(c,d){this.title=c,this.type=d}}Ln.Button=n;class r extends n{url;constructor(c,d){super(c,s.WEB_URL),this.url=d}}Ln.UrlButton=r;class i extends n{payload;constructor(c,d){super(c,s.POSTBACK),this.payload=d}}Ln.PostbackButton=i;var s;return function(u){u.WEB_URL="web_url",u.POSTBACK="postback"}(s||(Ln.ButtonTypeEnum=s={})),Ln}var rd={},Xy;function fx(){return Xy||(Xy=1,Object.defineProperty(rd,"__esModule",{value:!0})),rd}var js={},Zy;function dx(){if(Zy)return js;Zy=1,Object.defineProperty(js,"__esModule",{value:!0}),js.SatisfactionEnum=void 0;var n;return function(r){r.GOOD="GOOD",r.BAD="BAD"}(n||(js.SatisfactionEnum=n={})),js}var Qy;function Ky(){return Qy||(Qy=1,function(n){var r=Ma&&Ma.__createBinding||(Object.create?function(s,u,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,d,h)}:function(s,u,c,d){d===void 0&&(d=c),s[d]=u[c]}),i=Ma&&Ma.__exportStar||function(s,u){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&r(u,s,c)};Object.defineProperty(n,"__esModule",{value:!0}),i(cx(),n),i(fx(),n),i(dx(),n),i(Ah(),n),i(xh(),n)}(Ma)),Ma}var $y;function hx(){return $y||($y=1,function(n){var r=Dn&&Dn.__createBinding||(Object.create?function(c,d,h,m){m===void 0&&(m=h);var g=Object.getOwnPropertyDescriptor(d,h);(!g||("get"in g?!d.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,g)}:function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]}),i=Dn&&Dn.__setModuleDefault||(Object.create?function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}:function(c,d){c.default=d}),s=Dn&&Dn.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&r(d,c,h)},u=Dn&&Dn.__importStar||function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&(m[m.length]=g);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),g=0;g<m.length;g++)m[g]!=="default"&&r(h,d,m[g]);return i(h,d),h}}();Object.defineProperty(n,"__esModule",{value:!0}),n.Model=n.CMS=void 0,s($A(),n),n.CMS=u(ex()),s(ux(),n),s(Ky(),n),n.Model=u(Ky())}(Dn)),Dn}var Re=hx();const ib=n=>r=>(n.payload.type!==Re.ActionTypes.MESSAGE_FROM_GUEST&&r(Re.Actions.receiveTextMessageWithoutAnalysisFromGuest(n.label,n.payload)),r(n.payload)),sb=n=>(r,i)=>{const{quickReplies:s}=i().chat,u=s.find(c=>n.toLocaleLowerCase().indexOf(c.label.toLocaleLowerCase())>-1);return r(u?ib({...u,label:n}):JSON.parse(JSON.stringify(Re.Actions.receiveTextMessageFromGuest(n))))},Oh="MESSAGE_TO_PARENT_PAGE",Rh="RESTORE_PREVIOUS_CHAT_MESSAGES",wh="AUDIO_MESSAGE_FROM_USER",Ch="RECEIVE_SPEECH_TRANSCRIPTION",Nh="ENABLE_CONVERSATION_RATING",lb="LOAD_SOURCE_INFOS_RESPONSE",Mh="LOAD_SOURCE_INFOS_ERROR",Dh="LOAD_SOURCE_INFOS_REQUEST",Bh="CLOSE_SOURCE_INFOS",mx="webclient.get.started",ob="webclient.window.expand",ub="webclient.window.close",cb="webclient.transcript.pdf.download",px=[Oh,Rh,wh,Ch,Nh,Dh,Bh],gx=n=>({type:wh,buffer:n}),yx=n=>({type:Ch,transcription:n}),vx=n=>({type:Re.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:n}}}),bx=()=>({type:cb}),_x=({rating:n})=>({type:Nh,payload:{rating:n}}),Ex=(n,r)=>({type:Re.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:n,feedback:r}}),fb=n=>Re.Actions.requestNLUEvent(n),Sx=n=>({type:Rh,messages:n}),Tx=n=>{switch(n.type){case Re.ButtonTypeEnum.WEB_URL:return hb(n.url);case Re.ButtonTypeEnum.POSTBACK:return n.payload;default:throw new Error(`unknown button type ${n.type}`)}},db=n=>hb(n),hb=n=>({type:Oh,message:{type:"webclient.change.url",url:n}});/*! js-cookie v3.0.5 | MIT */function Mo(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 Ax={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 eh(n,r){function i(u,c,d){if(!(typeof document>"u")){d=Mo({},r,d),typeof d.expires=="number"&&(d.expires=new Date(Date.now()+d.expires*864e5)),d.expires&&(d.expires=d.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var h="";for(var m in d)d[m]&&(h+="; "+m,d[m]!==!0&&(h+="="+d[m].split(";")[0]));return document.cookie=u+"="+n.write(c,u)+h}}function s(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var c=document.cookie?document.cookie.split("; "):[],d={},h=0;h<c.length;h++){var m=c[h].split("="),g=m.slice(1).join("=");try{var y=decodeURIComponent(m[0]);if(d[y]=n.read(g,y),u===y)break}catch{}}return u?d[u]:d}}return Object.create({set:i,get:s,remove:function(u,c){i(u,"",Mo({},c,{expires:-1}))},withAttributes:function(u){return eh(this.converter,Mo({},this.attributes,u))},withConverter:function(u){return eh(Mo({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}var Do=eh(Ax,{path:"/"});const Ot=[];for(let n=0;n<256;++n)Ot.push((n+256).toString(16).slice(1));function xx(n,r=0){return(Ot[n[r+0]]+Ot[n[r+1]]+Ot[n[r+2]]+Ot[n[r+3]]+"-"+Ot[n[r+4]]+Ot[n[r+5]]+"-"+Ot[n[r+6]]+Ot[n[r+7]]+"-"+Ot[n[r+8]]+Ot[n[r+9]]+"-"+Ot[n[r+10]]+Ot[n[r+11]]+Ot[n[r+12]]+Ot[n[r+13]]+Ot[n[r+14]]+Ot[n[r+15]]).toLowerCase()}let ad;const Ox=new Uint8Array(16);function Rx(){if(!ad){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ad=crypto.getRandomValues.bind(crypto)}return ad(Ox)}const wx=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Wy={randomUUID:wx};function $o(n,r,i){if(Wy.randomUUID&&!n)return Wy.randomUUID();n=n||{};const s=n.random??n.rng?.()??Rx();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,xx(s)}function Rt(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 Cx=typeof Symbol=="function"&&Symbol.observable||"@@observable",Jy=Cx,id=()=>Math.random().toString(36).substring(7).split("").join("."),Nx={INIT:`@@redux/INIT${id()}`,REPLACE:`@@redux/REPLACE${id()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${id()}`},Wo=Nx;function Lh(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 mb(n,r,i){if(typeof n!="function")throw new Error(Rt(2));if(typeof r=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Rt(0));if(typeof r=="function"&&typeof i>"u"&&(i=r,r=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Rt(1));return i(mb)(n,r)}let s=n,u=r,c=new Map,d=c,h=0,m=!1;function g(){d===c&&(d=new Map,c.forEach((z,_)=>{d.set(_,z)}))}function y(){if(m)throw new Error(Rt(3));return u}function E(z){if(typeof z!="function")throw new Error(Rt(4));if(m)throw new Error(Rt(5));let _=!0;g();const w=h++;return d.set(w,z),function(){if(_){if(m)throw new Error(Rt(6));_=!1,g(),d.delete(w),c=null}}}function x(z){if(!Lh(z))throw new Error(Rt(7));if(typeof z.type>"u")throw new Error(Rt(8));if(typeof z.type!="string")throw new Error(Rt(17));if(m)throw new Error(Rt(9));try{m=!0,u=s(u,z)}finally{m=!1}return(c=d).forEach(w=>{w()}),z}function L(z){if(typeof z!="function")throw new Error(Rt(10));s=z,x({type:Wo.REPLACE})}function R(){const z=E;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(Rt(11));function w(){const I=_;I.next&&I.next(y())}return w(),{unsubscribe:z(w)}},[Jy](){return this}}}return x({type:Wo.INIT}),{dispatch:x,subscribe:E,getState:y,replaceReducer:L,[Jy]:R}}function Mx(n){Object.keys(n).forEach(r=>{const i=n[r];if(typeof i(void 0,{type:Wo.INIT})>"u")throw new Error(Rt(12));if(typeof i(void 0,{type:Wo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Rt(13))})}function pb(n){const r=Object.keys(n),i={};for(let c=0;c<r.length;c++){const d=r[c];typeof n[d]=="function"&&(i[d]=n[d])}const s=Object.keys(i);let u;try{Mx(i)}catch(c){u=c}return function(d={},h){if(u)throw u;let m=!1;const g={};for(let y=0;y<s.length;y++){const E=s[y],x=i[E],L=d[E],R=x(L,h);if(typeof R>"u")throw h&&h.type,new Error(Rt(14));g[E]=R,m=m||R!==L}return m=m||s.length!==Object.keys(d).length,m?g:d}}function Jo(...n){return n.length===0?r=>r:n.length===1?n[0]:n.reduce((r,i)=>(...s)=>r(i(...s)))}function Dx(...n){return r=>(i,s)=>{const u=r(i,s);let c=()=>{throw new Error(Rt(15))};const d={getState:u.getState,dispatch:(m,...g)=>c(m,...g)},h=n.map(m=>m(d));return c=Jo(...h)(u.dispatch),{...u,dispatch:c}}}function Bx(n){return Lh(n)&&"type"in n&&typeof n.type=="string"}var gb=Symbol.for("immer-nothing"),ev=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?yb(n)||Array.isArray(n)||!!n[ev]||!!n.constructor?.[ev]||fu(n)||du(n):!1}var Lx=Object.prototype.constructor.toString();function yb(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)===Lx}function eu(n,r){cu(n)===0?Reflect.ownKeys(n).forEach(i=>{r(i,n[i],n)}):n.forEach((i,s)=>r(s,i,n))}function cu(n){const r=n[on];return r?r.type_:Array.isArray(n)?1:fu(n)?2:du(n)?3:0}function th(n,r){return cu(n)===2?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function vb(n,r,i){const s=cu(n);s===2?n.set(r,i):s===3?n.add(i):n[r]=i}function Ux(n,r){return n===r?n!==0||1/n===1/r:n!==n&&r!==r}function fu(n){return n instanceof Map}function du(n){return n instanceof Set}function Ua(n){return n.copy_||n.base_}function nh(n,r){if(fu(n))return new Map(n);if(du(n))return new Set(n);if(Array.isArray(n))return Array.prototype.slice.call(n);const i=yb(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 d=u[c],h=s[d];h.writable===!1&&(h.writable=!0,h.configurable=!0),(h.get||h.set)&&(s[d]={configurable:!0,writable:!0,enumerable:h.enumerable,value:n[d]})}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 Uh(n,r=!1){return hu(n)||za(n)||!wr(n)||(cu(n)>1&&(n.set=n.add=n.clear=n.delete=Hx),Object.freeze(n),r&&Object.entries(n).forEach(([i,s])=>Uh(s,!0))),n}function Hx(){In(2)}function hu(n){return Object.isFrozen(n)}var jx={};function Ga(n){const r=jx[n];return r||In(0,n),r}var $s;function bb(){return $s}function Ix(n,r){return{drafts_:[],parent_:n,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function tv(n,r){r&&(Ga("Patches"),n.patches_=[],n.inversePatches_=[],n.patchListener_=r)}function rh(n){ah(n),n.drafts_.forEach(zx),n.drafts_=null}function ah(n){n===$s&&($s=n.parent_)}function nv(n){return $s=Ix($s,n)}function zx(n){const r=n[on];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function rv(n,r){r.unfinalizedDrafts_=r.drafts_.length;const i=r.drafts_[0];return n!==void 0&&n!==i?(i[on].modified_&&(rh(r),In(4)),wr(n)&&(n=tu(r,n),r.parent_||nu(r,n)),r.patches_&&Ga("Patches").generateReplacementPatches_(i[on].base_,n,r.patches_,r.inversePatches_)):n=tu(r,i,[]),rh(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),n!==gb?n:void 0}function tu(n,r,i){if(hu(r))return r;const s=r[on];if(!s)return eu(r,(u,c)=>av(n,s,r,u,c,i)),r;if(s.scope_!==n)return r;if(!s.modified_)return nu(n,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;const u=s.copy_;let c=u,d=!1;s.type_===3&&(c=new Set(u),u.clear(),d=!0),eu(c,(h,m)=>av(n,s,u,h,m,i,d)),nu(n,u,!1),i&&n.patches_&&Ga("Patches").generatePatches_(s,i,n.patches_,n.inversePatches_)}return s.copy_}function av(n,r,i,s,u,c,d){if(za(u)){const h=c&&r&&r.type_!==3&&!th(r.assigned_,s)?c.concat(s):void 0,m=tu(n,u,h);if(vb(i,s,m),za(m))n.canAutoFreeze_=!1;else return}else d&&i.add(u);if(wr(u)&&!hu(u)){if(!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1)return;tu(n,u),(!r||!r.scope_.parent_)&&typeof s!="symbol"&&Object.prototype.propertyIsEnumerable.call(i,s)&&nu(n,u)}}function nu(n,r,i=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&Uh(r,i)}function Gx(n,r){const i=Array.isArray(n),s={type_:i?1:0,scope_:r?r.scope_:bb(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1};let u=s,c=Hh;i&&(u=[s],c=Ws);const{revoke:d,proxy:h}=Proxy.revocable(u,c);return s.draft_=h,s.revoke_=d,h}var Hh={get(n,r){if(r===on)return n;const i=Ua(n);if(!th(i,r))return kx(n,i,r);const s=i[r];return n.finalized_||!wr(s)?s:s===sd(n.base_,r)?(ld(n),n.copy_[r]=sh(s,n)):s},has(n,r){return r in Ua(n)},ownKeys(n){return Reflect.ownKeys(Ua(n))},set(n,r,i){const s=_b(Ua(n),r);if(s?.set)return s.set.call(n.draft_,i),!0;if(!n.modified_){const u=sd(Ua(n),r),c=u?.[on];if(c&&c.base_===i)return n.copy_[r]=i,n.assigned_[r]=!1,!0;if(Ux(i,u)&&(i!==void 0||th(n.base_,r)))return!0;ld(n),ih(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 sd(n.base_,r)!==void 0||r in n.base_?(n.assigned_[r]=!1,ld(n),ih(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={};eu(Hh,(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 Hh.set.call(this,n[0],r,i,n[0])};function sd(n,r){const i=n[on];return(i?Ua(i):n)[r]}function kx(n,r,i){const s=_b(r,i);return s?"value"in s?s.value:s.get?.call(n.draft_):void 0}function _b(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 ih(n){n.modified_||(n.modified_=!0,n.parent_&&ih(n.parent_))}function ld(n){n.copy_||(n.copy_=nh(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var qx=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 d=this;return function(m=c,...g){return d.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=nv(this),d=sh(r,void 0);let h=!0;try{u=i(d),h=!1}finally{h?rh(c):ah(c)}return tv(c,s),rv(u,c)}else if(!r||typeof r!="object"){if(u=i(r),u===void 0&&(u=r),u===gb&&(u=void 0),this.autoFreeze_&&Uh(u,!0),s){const c=[],d=[];Ga("Patches").generateReplacementPatches_(r,u,c,d),s(c,d)}return u}else In(1,r)},this.produceWithPatches=(r,i)=>{if(typeof r=="function")return(d,...h)=>this.produceWithPatches(d,m=>r(m,...h));let s,u;return[this.produce(r,i,(d,h)=>{s=d,u=h}),s,u]},typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze),typeof n?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(n.useStrictShallowCopy)}createDraft(n){wr(n)||In(8),za(n)&&(n=Fx(n));const r=nv(this),i=sh(n,void 0);return i[on].isManual_=!0,ah(r),i}finishDraft(n,r){const i=n&&n[on];(!i||!i.isManual_)&&In(9);const{scope_:s}=i;return tv(s,r),rv(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 sh(n,r){const i=fu(n)?Ga("MapSet").proxyMap_(n,r):du(n)?Ga("MapSet").proxySet_(n,r):Gx(n,r);return(r?r.scope_:bb()).drafts_.push(i),i}function Fx(n){return za(n)||In(10,n),Eb(n)}function Eb(n){if(!wr(n)||hu(n))return n;const r=n[on];let i;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,i=nh(n,r.scope_.immer_.useStrictShallowCopy_)}else i=nh(n,!0);return eu(i,(s,u)=>{vb(i,s,Eb(u))}),r&&(r.finalized_=!1),i}var un=new qx,Sb=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 Tb(n){return({dispatch:i,getState:s})=>u=>c=>typeof c=="function"?c(i,s,n):u(c)}var Vx=Tb(),Px=Tb,Yx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Jo:Jo.apply(null,arguments)};function iv(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=>Bx(s)&&s.type===n,i}var Ab=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 sv(n){return wr(n)?Sb(n,()=>{}):n}function Bo(n,r,i){return n.has(r)?n.get(r):n.set(r,i(r)).get(r)}function Xx(n){return typeof n=="boolean"}var Zx=()=>function(r){const{thunk:i=!0,immutableCheck:s=!0,serializableCheck:u=!0,actionCreatorCheck:c=!0}=r??{};let d=new Ab;return i&&(Xx(i)?d.push(Vx):d.push(Px(i.extraArgument))),d},Qx="RTK_autoBatch",lv=n=>r=>{setTimeout(r,n)},Kx=(n={type:"raf"})=>r=>(...i)=>{const s=r(...i);let u=!0,c=!1,d=!1;const h=new Set,m=n.type==="tick"?queueMicrotask:n.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:lv(10):n.type==="callback"?n.queueNotification:lv(n.timeout),g=()=>{d=!1,c&&(c=!1,h.forEach(y=>y()))};return Object.assign({},s,{subscribe(y){const E=()=>u&&y(),x=s.subscribe(E);return h.add(y),()=>{x(),h.delete(y)}},dispatch(y){try{return u=!y?.meta?.[Qx],c=!u,c&&(d||(d=!0,m(g))),s.dispatch(y)}finally{u=!0}}})},$x=n=>function(i){const{autoBatch:s=!0}=i??{};let u=new Ab(n);return s&&u.push(Kx(typeof s=="object"?s:void 0)),u};function Wx(n){const r=Zx(),{reducer:i=void 0,middleware:s,devTools:u=!0,preloadedState:c=void 0,enhancers:d=void 0}=n||{};let h;if(typeof i=="function")h=i;else if(Lh(i))h=pb(i);else throw new Error(Ar(1));let m;typeof s=="function"?m=s(r):m=r();let g=Jo;u&&(g=Yx({trace:!1,...typeof u=="object"&&u}));const y=Dx(...m),E=$x(y);let x=typeof d=="function"?d(E):E();const L=g(...x);return mb(h,c,L)}function xb(n){const r={},i=[];let s;const u={addCase(c,d){const h=typeof c=="string"?c:c.type;if(!h)throw new Error(Ar(28));if(h in r)throw new Error(Ar(29));return r[h]=d,u},addMatcher(c,d){return i.push({matcher:c,reducer:d}),u},addDefaultCase(c){return s=c,u}};return n(u),[r,i,s]}function Jx(n){return typeof n=="function"}function eO(n,r){let[i,s,u]=xb(r),c;if(Jx(n))c=()=>sv(n());else{const h=sv(n);c=()=>h}function d(h=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,E)=>{if(E)if(za(y)){const L=E(y,m);return L===void 0?y:L}else{if(wr(y))return Sb(y,x=>E(x,m));{const x=E(y,m);if(x===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return y},h)}return d.getInitialState=c,d}var tO=Symbol.for("rtk-slice-createasyncthunk");function nO(n,r){return`${n}/${r}`}function rO({creators:n}={}){const r=n?.asyncThunk?.[tO];return function(s){const{name:u,reducerPath:c=u}=s;if(!u)throw new Error(Ar(11));const d=(typeof s.reducers=="function"?s.reducers(iO()):s.reducers)||{},h=Object.keys(d),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},g={addCase(S,I){const A=typeof S=="string"?S:S.type;if(!A)throw new Error(Ar(12));if(A in m.sliceCaseReducersByType)throw new Error(Ar(13));return m.sliceCaseReducersByType[A]=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}};h.forEach(S=>{const I=d[S],A={reducerName:S,type:nO(u,S),createNotation:typeof s.reducers=="function"};lO(I)?uO(A,I,g,r):sO(A,I,g)});function y(){const[S={},I=[],A=void 0]=typeof s.extraReducers=="function"?xb(s.extraReducers):[s.extraReducers],Z={...S,...m.sliceCaseReducersByType};return eO(s.initialState,$=>{for(let ae in Z)$.addCase(ae,Z[ae]);for(let ae of m.sliceMatchers)$.addMatcher(ae.matcher,ae.reducer);for(let ae of I)$.addMatcher(ae.matcher,ae.reducer);A&&$.addDefaultCase(A)})}const E=S=>S,x=new Map,L=new WeakMap;let R;function F(S,I){return R||(R=y()),R(S,I)}function z(){return R||(R=y()),R.getInitialState()}function _(S,I=!1){function A($){let ae=$[S];return typeof ae>"u"&&I&&(ae=Bo(L,A,z)),ae}function Z($=E){const ae=Bo(x,I,()=>new WeakMap);return Bo(ae,$,()=>{const ge={};for(const[Ee,se]of Object.entries(s.selectors??{}))ge[Ee]=aO(se,$,()=>Bo(L,$,z),I);return ge})}return{reducerPath:S,getSelectors:Z,get selectors(){return Z(A)},selectSlice:A}}const w={name:u,reducer:F,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:z,..._(c),injectInto(S,{reducerPath:I,...A}={}){const Z=I??c;return S.inject({reducerPath:Z,reducer:F},A),{...w,..._(Z,!0)}}};return w}}function aO(n,r,i,s){function u(c,...d){let h=r(c);return typeof h>"u"&&s&&(h=i()),n(h,...d)}return u.unwrapped=n,u}var jh=rO();function iO(){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 sO({type:n,reducerName:r,createNotation:i},s,u){let c,d;if("reducer"in s){if(i&&!oO(s))throw new Error(Ar(17));c=s.reducer,d=s.prepare}else c=s;u.addCase(n,c).exposeCaseReducer(r,c).exposeAction(r,d?iv(n,d):iv(n))}function lO(n){return n._reducerDefinitionType==="asyncThunk"}function oO(n){return n._reducerDefinitionType==="reducerWithPrepare"}function uO({type:n,reducerName:r},i,s,u){if(!u)throw new Error(Ar(18));const{payloadCreator:c,fulfilled:d,pending:h,rejected:m,settled:g,options:y}=i,E=u(n,c,y);s.exposeAction(r,E),d&&s.addCase(E.fulfilled,d),h&&s.addCase(E.pending,h),m&&s.addCase(E.rejected,m),g&&s.addMatcher(E.settled,g),s.exposeCaseReducer(r,{fulfilled:d||Lo,pending:h||Lo,rejected:m||Lo,settled:g||Lo})}function Lo(){}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 cO={formValues:{}},Ob=jh({name:"start-screen",initialState:cO,reducers:{showStartScreen(n){n.startScreenStatus="VISIBLE",n.formValues={}},startChat(n,r){n.startScreenStatus="HIDDEN",n.formValues=r.payload.formValues},startAuthenticatedChat(n,r){n.startScreenStatus="HIDDEN",n.loginToken=r.payload.loginToken,n.loginRequestToken=void 0},requestLogin(n,r){n.loginRequestToken=r.payload.loginRequestToken,n.formValues=r.payload.formValues},loginWindowClosed(n){n.loginRequestToken=void 0}}}),{startChat:fO,startAuthenticatedChat:dO,showStartScreen:hO,requestLogin:mO,loginWindowClosed:pO}=Ob.actions,gO=Ob.reducer,Rb="RESET_CHAT_STATE",wb="TOGGLE_TRANSCRIPT_MAIL_OVERLAY",yO=()=>({type:ub}),vO=()=>({type:Rb}),Cb=()=>({type:wb}),ov=(n,r,i)=>(s,u)=>{try{const c=u().connection.sessionId;if(!c)throw new Error("Session ID is not available");s({type:Dh,payload:{chunkId:i}}),uv(n,c,r,i,!1,s),uv(n,c,r,i,!0,s)}catch(c){console.error("Error loading source infos:",c),s({type:Mh})}},uv=(n,r,i,s,u,c)=>{const d=`/${n}/me/chat-widget/transcript/${i}/chunks/${s}?highlight=${u}`;fetch(d,{headers:{"x-bubble-chat-session-id":r}}).then(h=>{if(!h.ok)throw new Error(`HTTP error! Status: ${h.status}`);return h.json()}).then(h=>{const m={...h,chunkId:s,highlighted:u};c({type:lb,payload:m})}).catch(h=>{console.error("Error fetching source infos:",h),c({type:Mh,payload:{highlighted:u}})})},bO=()=>({type:Bh}),Ih="CONNECT",zh="CONNECTING",Gh="CONNECTED",kh="DISCONNECTED",qh="RECONNECTED",Fh="RESTORE_SESSION_ID",mu="START",pu="CLEAR_SESSION_ID",_O=[Ih,zh,Gh,kh,qh,Fh],EO=(n,r)=>({type:Ih,clientName:n,querystrings:r}),SO=n=>({type:Fh,sessionId:n}),TO=()=>({type:zh}),AO=()=>({type:Gh}),xO=()=>({type:kh}),OO=()=>({type:qh}),Nb=(n,r)=>(i,s)=>{const u=s().connection,{formValues:c,loginToken:d}=s().startScreen;let h=u.sessionId;h===void 0&&(h=$o());let m=u.userId;if(m===void 0){const g=Do.get("bubble-chat-user-id")||Do.get("bubble-chat-userId")||Do.get("bf-webclient-userId");m=g||$o(),Do.set("bubble-chat-user-id",m)}i({type:mu,payload:{sessionId:h,userId:m,clientName:n,loginToken:d,querystrings:{...r,...c}}})},gu=(n,r)=>(i,s)=>{const u=s().connection.sessionId||"";if(i(RO(u)),i(vO()),s().settings.enableStartScreen)i(hO());else return i(Nb(n,r))},RO=n=>({type:pu,payload:{sessionId:n}}),tt=()=>{const n=ou();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||{}),ru=(n=>(n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON",n))(ru||{});const wO="_container_q2uun_1",CO="_chatcontent_q2uun_6",NO="_accessabilityHidden_q2uun_12",od={container:wO,chatcontent:CO,accessabilityHidden:NO},MO="_messageContainer_ofi0g_1",DO="_messages_ofi0g_12",cv={messageContainer:MO,messages:DO};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 BO=["children","options"],LO={footnoteReference:"7"},fv=["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"}),dv={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},UO=["style","script","pre"],HO=["src","href","data","formAction","srcDoc","action"],jO=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,IO=/mailto:/i,zO=/\n{2,}$/,hv=/^(\s*>[\s\S]*?)(?=\n\n|$)/,GO=/^ *> ?/gm,kO=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,qO=/^ {2,}\n/,FO=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,mv=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,pv=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,VO=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,PO=/^(?:\n *)*\n/,YO=/\r\n?/g,XO=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,ZO=/^\[\^([^\]]+)]/,QO=/\f/g,KO=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,$O=/^\s*?\[(x|\s)\]/,gv=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,yv=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,vv=/^([^\n]+)\n *(=|-){3,} *\n/,ud=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,WO=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,bv=/^<!--[\s\S]*?(?:-->)/,JO=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,cd=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,eR=/^\{.*\}$/,tR=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,nR=/^<([^ >]+@[^ >]+)>/,rR=/^<([^ >]+:\/[^ >]+)>/,aR=/-([a-z])?/gi,_v=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,iR=/^[^\n]+(?: \n|\n{2,})/,sR=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,lR=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,oR=/^\[([^\]]*)\] ?\[([^\]]*)\]/,uR=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,cR=/\t/g,fR=/(^ *\||\| *$)/g,dR=/^ *:-+: *$/,hR=/^ *:-+ *$/,mR=/^ *-+: *$/,yu=n=>`(?=[\\s\\S]+?\\1${n?"\\1":""})`,vu="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",pR=RegExp(`^([*_])\\1${yu(1)}${vu}\\1\\1(?!\\1)`),gR=RegExp(`^([*_])${yu(0)}${vu}\\1(?!\\1)`),yR=RegExp(`^(==)${yu(0)}${vu}\\1`),vR=RegExp(`^(~~)${yu(0)}${vu}\\1`),bR=/^(:[a-zA-Z0-9-_]+:)/,_R=/^\\([^0-9A-Za-z\s])/,ER=/\\([^0-9A-Za-z\s])/g,SR=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,TR=/^\n+/,AR=/^([ \t]*)/,xR=/(?:^|\n)( *)$/,Vh="(?:\\d+\\.)",Ph="(?:[*+-])";function Mb(n){return"( *)("+(n===1?Vh:Ph)+") +"}const Db=Mb(1),Bb=Mb(2);function Lb(n){return RegExp("^"+(n===1?Db:Bb))}const OR=Lb(1),RR=Lb(2);function Ub(n){return RegExp("^"+(n===1?Db:Bb)+"[^\\n]*(?:\\n(?!\\1"+(n===1?Vh:Ph)+" )[^\\n]*)*(\\n|$)","gm")}const wR=Ub(1),CR=Ub(2);function Hb(n){const r=n===1?Vh:Ph;return RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}const jb=Hb(1),Ib=Hb(2);function Ev(n,r){const i=r===1,s=i?jb:Ib,u=i?wR:CR,c=i?OR:RR;return{t:d=>c.test(d),o:Ci(function(d,h){const m=xR.exec(h.prevCapture);return m&&(h.list||!h.inline&&!h.simple)?s.exec(d=m[1]+d):null}),i:1,u(d,h,m){const g=i?+d[2]:void 0,y=d[0].replace(zO,`
|
|
93
|
+
*/var oy;function vA(){if(oy)return Le;oy=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,d=n?Symbol.for("react.provider"):60109,h=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,E=n?Symbol.for("react.suspense"):60113,x=n?Symbol.for("react.suspense_list"):60120,L=n?Symbol.for("react.memo"):60115,R=n?Symbol.for("react.lazy"):60116,F=n?Symbol.for("react.block"):60121,z=n?Symbol.for("react.fundamental"):60117,_=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function S(A){if(typeof A=="object"&&A!==null){var Z=A.$$typeof;switch(Z){case r:switch(A=A.type,A){case m:case g:case s:case c:case u:case E:return A;default:switch(A=A&&A.$$typeof,A){case h:case y:case R:case L:case d:return A;default:return Z}}case i:return Z}}}function I(A){return S(A)===g}return Le.AsyncMode=m,Le.ConcurrentMode=g,Le.ContextConsumer=h,Le.ContextProvider=d,Le.Element=r,Le.ForwardRef=y,Le.Fragment=s,Le.Lazy=R,Le.Memo=L,Le.Portal=i,Le.Profiler=c,Le.StrictMode=u,Le.Suspense=E,Le.isAsyncMode=function(A){return I(A)||S(A)===m},Le.isConcurrentMode=I,Le.isContextConsumer=function(A){return S(A)===h},Le.isContextProvider=function(A){return S(A)===d},Le.isElement=function(A){return typeof A=="object"&&A!==null&&A.$$typeof===r},Le.isForwardRef=function(A){return S(A)===y},Le.isFragment=function(A){return S(A)===s},Le.isLazy=function(A){return S(A)===R},Le.isMemo=function(A){return S(A)===L},Le.isPortal=function(A){return S(A)===i},Le.isProfiler=function(A){return S(A)===c},Le.isStrictMode=function(A){return S(A)===u},Le.isSuspense=function(A){return S(A)===E},Le.isValidElementType=function(A){return typeof A=="string"||typeof A=="function"||A===s||A===g||A===c||A===u||A===E||A===x||typeof A=="object"&&A!==null&&(A.$$typeof===R||A.$$typeof===L||A.$$typeof===d||A.$$typeof===h||A.$$typeof===y||A.$$typeof===z||A.$$typeof===_||A.$$typeof===w||A.$$typeof===F)},Le.typeOf=S,Le}var uy;function bA(){return uy||(uy=1,Pf.exports=vA()),Pf.exports}var Yf,cy;function _A(){if(cy)return Yf;cy=1;var n=bA(),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 d(R){return n.isMemo(R)?u:c[R.$$typeof]||r}var h=Object.defineProperty,m=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,y=Object.getOwnPropertyDescriptor,E=Object.getPrototypeOf,x=Object.prototype;function L(R,F,z){if(typeof F!="string"){if(x){var _=E(F);_&&_!==x&&L(R,_,z)}var w=m(F);g&&(w=w.concat(g(F)));for(var S=d(R),I=d(F),A=0;A<w.length;++A){var Z=w[A];if(!i[Z]&&!(z&&z[Z])&&!(I&&I[Z])&&!(S&&S[Z])){var $=y(F,Z);try{h(R,Z,$)}catch{}}}}return R}return Yf=L,Yf}_A();var Eh=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=H.createContext(null)):H.createContext(null);Eh.Consumer;var EA=Eh.Provider,SA=EA,TA=Eh;function ou(){var n=H.useContext(TA);return Y1(n),n}var Kd;(function(n){n.formatDate="FormattedDate",n.formatTime="FormattedTime",n.formatNumber="FormattedNumber",n.formatList="FormattedList",n.formatDisplayName="FormattedDisplayName"})(Kd||(Kd={}));var $d;(function(n){n.formatDate="FormattedDateParts",n.formatTime="FormattedTimeParts",n.formatNumber="FormattedNumberParts",n.formatList="FormattedListParts"})($d||($d={}));function Z1(n){var r=function(i){var s=ou(),u=i.value,c=i.children,d=lu(i,["value","children"]),h=typeof u=="string"?new Date(u||0):u,m=n==="formatDate"?s.formatDateToParts(h,d):s.formatTimeToParts(h,d);return c(m)};return r.displayName=$d[n],r}function nl(n){var r=function(i){var s=ou(),u=i.value,c=i.children,d=lu(i,["value","children"]),h=s[n](u,d);if(typeof c=="function")return c(h);var m=s.textComponent||H.Fragment;return H.createElement(m,null,h)};return r.displayName=Kd[n],r}function Q1(n){return n&&Object.keys(n).reduce(function(r,i){var s=n[i];return r[i]=G1(s)?gA(s):s,r},{})}var fy=function(n,r,i,s){for(var u=[],c=4;c<arguments.length;c++)u[c-4]=arguments[c];var d=Q1(s),h=Qd.apply(void 0,$n([n,r,i,d],u,!1));return Array.isArray(h)?pA(h):h},dy=function(n,r){var i=n.defaultRichTextElements,s=lu(n,["defaultRichTextElements"]),u=Q1(i),c=fA(ie(ie(ie({},X1),s),{defaultRichTextElements:u}),r),d={locale:c.locale,timeZone:c.timeZone,fallbackOnEmptyString:c.fallbackOnEmptyString,formats:c.formats,defaultLocale:c.defaultLocale,defaultFormats:c.defaultFormats,messages:c.messages,onError:c.onError,defaultRichTextElements:u};return ie(ie({},c),{formatMessage:fy.bind(null,d,c.formatters),$t:fy.bind(null,d,c.formatters)})};function Xf(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 AA=function(n){Tn(r,n);function r(){var i=n!==null&&n.apply(this,arguments)||this;return i.cache=F1(),i.state={cache:i.cache,intl:dy(Xf(i.props),i.cache),prevConfig:Xf(i.props)},i}return r.getDerivedStateFromProps=function(i,s){var u=s.prevConfig,c=s.cache,d=Xf(i);return yA(u,d)?null:{intl:dy(d,c),prevConfig:d}},r.prototype.render=function(){return Y1(this.state.intl),H.createElement(SA,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=X1,r}(H.PureComponent);nl("formatDate");nl("formatTime");nl("formatNumber");nl("formatList");nl("formatDisplayName");Z1("formatDate");Z1("formatTime");const xA="_app_1rj0t_1",OA={app:xA},ka=q2,Lt=P2,K1="%[a-f0-9]{2}",hy=new RegExp("("+K1+")|([^%]+?)","gi"),my=new RegExp("("+K1+")+","gi");function Wd(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([],Wd(i),Wd(s))}function RA(n){try{return decodeURIComponent(n)}catch{let r=n.match(hy)||[];for(let i=1;i<r.length;i++)n=Wd(r,i).join(""),r=n.match(hy)||[];return n}}function wA(n){const r={"%FE%FF":"��","%FF%FE":"��"};let i=my.exec(n);for(;i;){try{r[i[0]]=decodeURIComponent(i[0])}catch{const u=RA(i[0]);u!==i[0]&&(r[i[0]]=u)}i=my.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 CA(n){if(typeof n!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof n+"`");try{return decodeURIComponent(n)}catch{return wA(n)}}function NA(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 $1(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 MA=n=>n==null,DA=n=>encodeURIComponent(n).replaceAll(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),Jd=Symbol("encodeFragmentIdentifier");function BA(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 LA(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),d=typeof s=="string"&&!c&&Tr(s,n).includes(n.arrayFormatSeparator);s=d?Tr(s,n):s;const h=c||d?s.split(n.arrayFormatSeparator).map(m=>Tr(m,n)):s===null?s:Tr(s,n);u[i]=h};case"bracket-separator":return(i,s,u)=>{const c=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!c){u[i]=s&&Tr(s,n);return}const d=s===null?[]:Tr(s,n).split(n.arrayFormatSeparator);if(u[i]===void 0){u[i]=d;return}u[i]=[...u[i],...d]};default:return(i,s,u)=>{if(u[i]===void 0){u[i]=s;return}u[i]=[...[u[i]].flat(),s]}}}function W1(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?DA(n):encodeURIComponent(n):n}function Tr(n,r){return r.decode?CA(n):n}function J1(n){return Array.isArray(n)?n.sort():typeof n=="object"?J1(Object.keys(n)).sort((r,i)=>Number(r)-Number(i)).map(r=>n[r]):n}function eb(n){const r=n.indexOf("#");return r!==-1&&(n=n.slice(0,r)),n}function UA(n){let r="";const i=n.indexOf("#");return i!==-1&&(r=n.slice(i)),r}function py(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 Sh(n){n=eb(n);const r=n.indexOf("?");return r===-1?"":n.slice(r+1)}function Th(n,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...r},W1(r.arrayFormatSeparator);const i=LA(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[d,h]=$1(c,"=");d===void 0&&(d=c),h=h===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?h:Tr(h,r),i(Tr(d,r),h,s)}for(const[u,c]of Object.entries(s))if(typeof c=="object"&&c!==null&&r.types[u]!=="string")for(const[d,h]of Object.entries(c)){const m=r.types[u]?r.types[u].replace("[]",""):void 0;c[d]=py(h,r,m)}else typeof c=="object"&&c!==null&&r.types[u]==="string"?s[u]=Object.values(c).join(r.arrayFormatSeparator):s[u]=py(c,r,r.types[u]);return r.sort===!1?s:(r.sort===!0?Object.keys(s).sort():Object.keys(s).sort(r.sort)).reduce((u,c)=>{const d=s[c];return u[c]=d&&typeof d=="object"&&!Array.isArray(d)?J1(d):d,u},Object.create(null))}function tb(n,r){if(!n)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},W1(r.arrayFormatSeparator);const i=d=>r.skipNull&&MA(n[d])||r.skipEmptyString&&n[d]==="",s=BA(r),u={};for(const[d,h]of Object.entries(n))i(d)||(u[d]=h);const c=Object.keys(u);return r.sort!==!1&&c.sort(r.sort),c.map(d=>{const h=n[d];return h===void 0?"":h===null?ut(d,r):Array.isArray(h)?h.length===0&&r.arrayFormat==="bracket-separator"?ut(d,r)+"[]":h.reduce(s(d),[]).join("&"):ut(d,r)+"="+ut(h,r)}).filter(d=>d.length>0).join("&")}function nb(n,r){r={decode:!0,...r};let[i,s]=$1(n,"#");return i===void 0&&(i=n),{url:i?.split("?")?.[0]??"",query:Th(Sh(n),r),...r&&r.parseFragmentIdentifier&&s?{fragmentIdentifier:Tr(s,r)}:{}}}function rb(n,r){r={encode:!0,strict:!0,[Jd]:!0,...r};const i=eb(n.url).split("?")[0]||"",s=Sh(n.url),u={...Th(s,{sort:!1,...r}),...n.query};let c=tb(u,r);c&&=`?${c}`;let d=UA(n.url);if(typeof n.fragmentIdentifier=="string"){const h=new URL(i);h.hash=n.fragmentIdentifier,d=r[Jd]?h.hash:`#${n.fragmentIdentifier}`}return`${i}${c}${d}`}function ab(n,r,i){i={parseFragmentIdentifier:!0,[Jd]:!1,...i};const{url:s,query:u,fragmentIdentifier:c}=nb(n,i);return rb({url:s,query:NA(u,r),fragmentIdentifier:c},i)}function HA(n,r,i){const s=Array.isArray(r)?u=>!r.includes(u):(u,c)=>!r(u,c);return ab(n,s,i)}const uu=Object.freeze(Object.defineProperty({__proto__:null,exclude:HA,extract:Sh,parse:Th,parseUrl:nb,pick:ab,stringify:tb,stringifyUrl:rb},Symbol.toStringTag,{value:"Module"}));var Dn={},Bn={},Ie={},bo={},pe={},gy;function cn(){return gy||(gy=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 yy;function jA(){if(yy)return bo;yy=1,Object.defineProperty(bo,"__esModule",{value:!0});const n=cn(),r=()=>({type:n.DRAWER_CLOSE});return bo.default=r,bo}var _o={},vy;function IA(){if(vy)return _o;vy=1,Object.defineProperty(_o,"__esModule",{value:!0});const n=cn(),r=(i,s)=>({type:n.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:i,intent:s}});return _o.default=r,_o}var Eo={},by;function zA(){if(by)return Eo;by=1,Object.defineProperty(Eo,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.GUEST_CONNECTED,payload:{sessionId:i}});return Eo.default=r,Eo}var So={},_y;function GA(){if(_y)return So;_y=1,Object.defineProperty(So,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.GUEST_DISCONNECTED,payload:{sessionId:i}});return So.default=r,So}var To={},Ey;function kA(){if(Ey)return To;Ey=1,Object.defineProperty(To,"__esModule",{value:!0});const n=cn(),r=(i,s)=>({type:n.GUEST_LOCALE_CHANGED,payload:{previousLocale:i,newLocale:s}});return To.default=r,To}var Ao={},Sy;function qA(){if(Sy)return Ao;Sy=1,Object.defineProperty(Ao,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.DRAWER_OPEN,payload:{parameters:{contentUrl:i}}});return Ao.default=r,Ao}var xo={},Ke={},Ty;function Ah(){if(Ty)return Ke;Ty=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(E,x,L=[],R=[]){this.type=E,this.sender=x,this.sources=L,this.quickReplies=R}addQuickReply(E,x){this.quickReplies.push({label:E,payload:x})}}Ke.Message=n;class r extends n{text;constructor(E,x,L=[],R=[]){super(m.TEXT,x,L,R),this.text=E}}Ke.TextMessage=r;class i extends n{title;text;imageUrl;itemUrl;buttons;constructor(E,x){super(m.DETAIL,x),this.title=E,this.text="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(E){this.imageUrl=E}setItemUrl(E){this.itemUrl=E}setText(E){this.text=E}addButton(E){this.buttons.push(E)}}Ke.DetailMessage=i;class s extends n{markdown;constructor(E,x,L=[],R=[]){super(m.MARKDOWN,x,L,R),this.markdown=E}}Ke.MarkdownMessage=s;class u extends n{url;constructor(E,x){super(m.VIDEO,x),this.url=E}}Ke.VideoMessage=u;class c extends n{url;constructor(E,x){super(m.IMAGE,x),this.url=E}}Ke.ImageMessage=c;class d extends n{url;constructor(E,x){super(m.FILE,x),this.url=E}}Ke.FileMessage=d;class h extends n{url;constructor(E,x){super(m.AUDIO,x),this.url=E}}Ke.AudioMessage=h;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={},Ay;function xh(){if(Ay)return an;Ay=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(d,h,m,g){this.type=d,this.id=h,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(d,h,m){super(u.PERSON,d,h,m)}}an.PersonUser=s;var u;return function(c){c.GUEST="GUEST",c.BOT="BOT",c.PERSON="PERSON"}(u||(an.UserType=u={})),an}var xy;function FA(){if(xy)return xo;xy=1,Object.defineProperty(xo,"__esModule",{value:!0});const n=Ah(),r=xh(),i=cn(),s=u=>{const c=new n.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_FROM_GUEST,message:c}};return xo.default=s,xo}var Oo={},Oy;function VA(){if(Oy)return Oo;Oy=1,Object.defineProperty(Oo,"__esModule",{value:!0});const n=Ah(),r=xh(),i=cn(),s=(u,c={})=>{const d=new n.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:d,payload:c}};return Oo.default=s,Oo}var Ro={},Ry;function PA(){if(Ry)return Ro;Ry=1,Object.defineProperty(Ro,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.NLU_REQUEST_EVENT,event:i});return Ro.default=r,Ro}var wo={},wy;function YA(){if(wy)return wo;wy=1,Object.defineProperty(wo,"__esModule",{value:!0});const n=cn(),r=()=>({type:n.RESTART_CHAT_REQUEST});return wo.default=r,wo}var Co={},Cy;function XA(){if(Cy)return Co;Cy=1,Object.defineProperty(Co,"__esModule",{value:!0});const n=cn(),r=i=>({type:n.MESSAGE_TO_GUEST,message:i});return Co.default=r,Co}var No={},Ny;function ZA(){if(Ny)return No;Ny=1,Object.defineProperty(No,"__esModule",{value:!0});const n=cn(),r=(i,s)=>({type:n.TRANSCRIPT_ITEM_GUEST_REACTION,payload:{actionId:i,reaction:s}});return No.default=r,No}var My;function QA(){if(My)return Ie;My=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(jA());Ie.closeDrawer=r.default;const i=n(IA());Ie.feedbackFromGuestResponse=i.default;const s=n(zA());Ie.guestConnected=s.default;const u=n(GA());Ie.guestDisconnected=u.default;const c=n(kA());Ie.guestLocaleChanged=c.default;const d=n(qA());Ie.openDrawer=d.default;const h=n(FA());Ie.receiveTextMessageFromGuest=h.default;const m=n(VA());Ie.receiveTextMessageWithoutAnalysisFromGuest=m.default;const g=n(PA());Ie.requestNLUEvent=g.default;const y=n(YA());Ie.restartChatRequest=y.default;const E=n(XA());Ie.sendMessageToGuest=E.default;const x=n(ZA());return Ie.transcriptItemGuestReaction=x.default,Ie}var Zf={},Dy;function KA(){return Dy||(Dy=1,Object.defineProperty(Zf,"__esModule",{value:!0})),Zf}var By;function $A(){return By||(By=1,function(n){var r=Bn&&Bn.__createBinding||(Object.create?function(c,d,h,m){m===void 0&&(m=h);var g=Object.getOwnPropertyDescriptor(d,h);(!g||("get"in g?!d.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,g)}:function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]}),i=Bn&&Bn.__setModuleDefault||(Object.create?function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}:function(c,d){c.default=d}),s=Bn&&Bn.__importStar||function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&(m[m.length]=g);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),g=0;g<m.length;g++)m[g]!=="default"&&r(h,d,m[g]);return i(h,d),h}}(),u=Bn&&Bn.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&r(d,c,h)};Object.defineProperty(n,"__esModule",{value:!0}),n.ActionTypes=n.Actions=void 0,n.Actions=s(QA()),n.ActionTypes=s(cn()),u(KA(),n)}(Bn)),Bn}var sn={},Qf={},Ly;function WA(){return Ly||(Ly=1,Object.defineProperty(Qf,"__esModule",{value:!0})),Qf}var Us={},Uy;function JA(){if(Uy)return Us;Uy=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.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 Us.NullableKnowledgeBaseAdapter=n,Us}var Hy;function ex(){if(Hy)return sn;Hy=1;var n=sn&&sn.__createBinding||(Object.create?function(u,c,d,h){h===void 0&&(h=d);var m=Object.getOwnPropertyDescriptor(c,d);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(u,h,m)}:function(u,c,d,h){h===void 0&&(h=d),u[h]=c[d]}),r=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(d){var h=[];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(h[h.length]=m);return h},u(c)};return function(c){if(c&&c.__esModule)return c;var d={};if(c!=null)for(var h=u(c),m=0;m<h.length;m++)h[m]!=="default"&&n(d,c,h[m]);return r(d,c),d}}();Object.defineProperty(sn,"__esModule",{value:!0}),sn.NullableCmsAdapter=sn.KnowledgeBase=void 0,sn.KnowledgeBase=i(WA());const s=JA();return sn.NullableCmsAdapter={knowledgeBase:new s.NullableKnowledgeBaseAdapter},sn}var Na={},Kf={},jy;function tx(){return jy||(jy=1,Object.defineProperty(Kf,"__esModule",{value:!0})),Kf}var $f={},Iy;function nx(){return Iy||(Iy=1,Object.defineProperty($f,"__esModule",{value:!0})),$f}var Wf={},zy;function rx(){return zy||(zy=1,Object.defineProperty(Wf,"__esModule",{value:!0})),Wf}var Jf={},Gy;function ax(){return Gy||(Gy=1,Object.defineProperty(Jf,"__esModule",{value:!0})),Jf}var Hs={},ky;function ix(){if(ky)return Hs;ky=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.checkMiddlewareCondition=void 0;const n=async(r,i,s)=>(Array.isArray(r)?r:[r]).reduce(async(c,d)=>await c?await d(i,s):!1,Promise.resolve(!0));return Hs.checkMiddlewareCondition=n,Hs}var ed={},qy;function sx(){return qy||(qy=1,Object.defineProperty(ed,"__esModule",{value:!0})),ed}var td={},Fy;function lx(){return Fy||(Fy=1,Object.defineProperty(td,"__esModule",{value:!0})),td}var nd={},Vy;function ox(){return Vy||(Vy=1,Object.defineProperty(nd,"__esModule",{value:!0})),nd}var Py;function ux(){return Py||(Py=1,function(n){var r=Na&&Na.__createBinding||(Object.create?function(s,u,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,d,h)}:function(s,u,c,d){d===void 0&&(d=c),s[d]=u[c]}),i=Na&&Na.__exportStar||function(s,u){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&r(u,s,c)};Object.defineProperty(n,"__esModule",{value:!0}),i(tx(),n),i(nx(),n),i(rx(),n),i(ax(),n),i(ix(),n),i(sx(),n),i(lx(),n),i(ox(),n)}(Na)),Na}var Ma={},Ln={},Yy;function cx(){if(Yy)return Ln;Yy=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.ButtonTypeEnum=Ln.PostbackButton=Ln.UrlButton=Ln.Button=void 0;class n{title;type;constructor(c,d){this.title=c,this.type=d}}Ln.Button=n;class r extends n{url;constructor(c,d){super(c,s.WEB_URL),this.url=d}}Ln.UrlButton=r;class i extends n{payload;constructor(c,d){super(c,s.POSTBACK),this.payload=d}}Ln.PostbackButton=i;var s;return function(u){u.WEB_URL="web_url",u.POSTBACK="postback"}(s||(Ln.ButtonTypeEnum=s={})),Ln}var rd={},Xy;function fx(){return Xy||(Xy=1,Object.defineProperty(rd,"__esModule",{value:!0})),rd}var js={},Zy;function dx(){if(Zy)return js;Zy=1,Object.defineProperty(js,"__esModule",{value:!0}),js.SatisfactionEnum=void 0;var n;return function(r){r.GOOD="GOOD",r.BAD="BAD"}(n||(js.SatisfactionEnum=n={})),js}var Qy;function Ky(){return Qy||(Qy=1,function(n){var r=Ma&&Ma.__createBinding||(Object.create?function(s,u,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,d,h)}:function(s,u,c,d){d===void 0&&(d=c),s[d]=u[c]}),i=Ma&&Ma.__exportStar||function(s,u){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&r(u,s,c)};Object.defineProperty(n,"__esModule",{value:!0}),i(cx(),n),i(fx(),n),i(dx(),n),i(Ah(),n),i(xh(),n)}(Ma)),Ma}var $y;function hx(){return $y||($y=1,function(n){var r=Dn&&Dn.__createBinding||(Object.create?function(c,d,h,m){m===void 0&&(m=h);var g=Object.getOwnPropertyDescriptor(d,h);(!g||("get"in g?!d.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,g)}:function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]}),i=Dn&&Dn.__setModuleDefault||(Object.create?function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}:function(c,d){c.default=d}),s=Dn&&Dn.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&r(d,c,h)},u=Dn&&Dn.__importStar||function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&(m[m.length]=g);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),g=0;g<m.length;g++)m[g]!=="default"&&r(h,d,m[g]);return i(h,d),h}}();Object.defineProperty(n,"__esModule",{value:!0}),n.Model=n.CMS=void 0,s($A(),n),n.CMS=u(ex()),s(ux(),n),n.Model=u(Ky()),s(Ky(),n)}(Dn)),Dn}var Re=hx();const ib=n=>r=>(n.payload.type!==Re.ActionTypes.MESSAGE_FROM_GUEST&&r(Re.Actions.receiveTextMessageWithoutAnalysisFromGuest(n.label,n.payload)),r(n.payload)),sb=n=>(r,i)=>{const{quickReplies:s}=i().chat,u=s.find(c=>n.toLocaleLowerCase().indexOf(c.label.toLocaleLowerCase())>-1);return r(u?ib({...u,label:n}):JSON.parse(JSON.stringify(Re.Actions.receiveTextMessageFromGuest(n))))},Oh="MESSAGE_TO_PARENT_PAGE",Rh="RESTORE_PREVIOUS_CHAT_MESSAGES",wh="AUDIO_MESSAGE_FROM_USER",Ch="RECEIVE_SPEECH_TRANSCRIPTION",Nh="ENABLE_CONVERSATION_RATING",lb="LOAD_SOURCE_INFOS_RESPONSE",Mh="LOAD_SOURCE_INFOS_ERROR",Dh="LOAD_SOURCE_INFOS_REQUEST",Bh="CLOSE_SOURCE_INFOS",mx="webclient.get.started",ob="webclient.window.expand",ub="webclient.window.close",cb="webclient.transcript.pdf.download",px=[Oh,Rh,wh,Ch,Nh,Dh,Bh],gx=n=>({type:wh,buffer:n}),yx=n=>({type:Ch,transcription:n}),vx=n=>({type:Re.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:n}}}),bx=()=>({type:cb}),_x=({rating:n})=>({type:Nh,payload:{rating:n}}),Ex=(n,r)=>({type:Re.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:n,feedback:r}}),fb=n=>Re.Actions.requestNLUEvent(n),Sx=n=>({type:Rh,messages:n}),Tx=n=>{switch(n.type){case Re.ButtonTypeEnum.WEB_URL:return hb(n.url);case Re.ButtonTypeEnum.POSTBACK:return n.payload;default:throw new Error(`unknown button type ${n.type}`)}},db=n=>hb(n),hb=n=>({type:Oh,message:{type:"webclient.change.url",url:n}});/*! js-cookie v3.0.5 | MIT */function Mo(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 Ax={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 eh(n,r){function i(u,c,d){if(!(typeof document>"u")){d=Mo({},r,d),typeof d.expires=="number"&&(d.expires=new Date(Date.now()+d.expires*864e5)),d.expires&&(d.expires=d.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var h="";for(var m in d)d[m]&&(h+="; "+m,d[m]!==!0&&(h+="="+d[m].split(";")[0]));return document.cookie=u+"="+n.write(c,u)+h}}function s(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var c=document.cookie?document.cookie.split("; "):[],d={},h=0;h<c.length;h++){var m=c[h].split("="),g=m.slice(1).join("=");try{var y=decodeURIComponent(m[0]);if(d[y]=n.read(g,y),u===y)break}catch{}}return u?d[u]:d}}return Object.create({set:i,get:s,remove:function(u,c){i(u,"",Mo({},c,{expires:-1}))},withAttributes:function(u){return eh(this.converter,Mo({},this.attributes,u))},withConverter:function(u){return eh(Mo({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}var Do=eh(Ax,{path:"/"});const Ot=[];for(let n=0;n<256;++n)Ot.push((n+256).toString(16).slice(1));function xx(n,r=0){return(Ot[n[r+0]]+Ot[n[r+1]]+Ot[n[r+2]]+Ot[n[r+3]]+"-"+Ot[n[r+4]]+Ot[n[r+5]]+"-"+Ot[n[r+6]]+Ot[n[r+7]]+"-"+Ot[n[r+8]]+Ot[n[r+9]]+"-"+Ot[n[r+10]]+Ot[n[r+11]]+Ot[n[r+12]]+Ot[n[r+13]]+Ot[n[r+14]]+Ot[n[r+15]]).toLowerCase()}let ad;const Ox=new Uint8Array(16);function Rx(){if(!ad){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ad=crypto.getRandomValues.bind(crypto)}return ad(Ox)}const wx=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Wy={randomUUID:wx};function $o(n,r,i){if(Wy.randomUUID&&!n)return Wy.randomUUID();n=n||{};const s=n.random??n.rng?.()??Rx();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,xx(s)}function Rt(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 Cx=typeof Symbol=="function"&&Symbol.observable||"@@observable",Jy=Cx,id=()=>Math.random().toString(36).substring(7).split("").join("."),Nx={INIT:`@@redux/INIT${id()}`,REPLACE:`@@redux/REPLACE${id()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${id()}`},Wo=Nx;function Lh(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 mb(n,r,i){if(typeof n!="function")throw new Error(Rt(2));if(typeof r=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Rt(0));if(typeof r=="function"&&typeof i>"u"&&(i=r,r=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Rt(1));return i(mb)(n,r)}let s=n,u=r,c=new Map,d=c,h=0,m=!1;function g(){d===c&&(d=new Map,c.forEach((z,_)=>{d.set(_,z)}))}function y(){if(m)throw new Error(Rt(3));return u}function E(z){if(typeof z!="function")throw new Error(Rt(4));if(m)throw new Error(Rt(5));let _=!0;g();const w=h++;return d.set(w,z),function(){if(_){if(m)throw new Error(Rt(6));_=!1,g(),d.delete(w),c=null}}}function x(z){if(!Lh(z))throw new Error(Rt(7));if(typeof z.type>"u")throw new Error(Rt(8));if(typeof z.type!="string")throw new Error(Rt(17));if(m)throw new Error(Rt(9));try{m=!0,u=s(u,z)}finally{m=!1}return(c=d).forEach(w=>{w()}),z}function L(z){if(typeof z!="function")throw new Error(Rt(10));s=z,x({type:Wo.REPLACE})}function R(){const z=E;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(Rt(11));function w(){const I=_;I.next&&I.next(y())}return w(),{unsubscribe:z(w)}},[Jy](){return this}}}return x({type:Wo.INIT}),{dispatch:x,subscribe:E,getState:y,replaceReducer:L,[Jy]:R}}function Mx(n){Object.keys(n).forEach(r=>{const i=n[r];if(typeof i(void 0,{type:Wo.INIT})>"u")throw new Error(Rt(12));if(typeof i(void 0,{type:Wo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Rt(13))})}function pb(n){const r=Object.keys(n),i={};for(let c=0;c<r.length;c++){const d=r[c];typeof n[d]=="function"&&(i[d]=n[d])}const s=Object.keys(i);let u;try{Mx(i)}catch(c){u=c}return function(d={},h){if(u)throw u;let m=!1;const g={};for(let y=0;y<s.length;y++){const E=s[y],x=i[E],L=d[E],R=x(L,h);if(typeof R>"u")throw h&&h.type,new Error(Rt(14));g[E]=R,m=m||R!==L}return m=m||s.length!==Object.keys(d).length,m?g:d}}function Jo(...n){return n.length===0?r=>r:n.length===1?n[0]:n.reduce((r,i)=>(...s)=>r(i(...s)))}function Dx(...n){return r=>(i,s)=>{const u=r(i,s);let c=()=>{throw new Error(Rt(15))};const d={getState:u.getState,dispatch:(m,...g)=>c(m,...g)},h=n.map(m=>m(d));return c=Jo(...h)(u.dispatch),{...u,dispatch:c}}}function Bx(n){return Lh(n)&&"type"in n&&typeof n.type=="string"}var gb=Symbol.for("immer-nothing"),ev=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?yb(n)||Array.isArray(n)||!!n[ev]||!!n.constructor?.[ev]||fu(n)||du(n):!1}var Lx=Object.prototype.constructor.toString();function yb(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)===Lx}function eu(n,r){cu(n)===0?Reflect.ownKeys(n).forEach(i=>{r(i,n[i],n)}):n.forEach((i,s)=>r(s,i,n))}function cu(n){const r=n[on];return r?r.type_:Array.isArray(n)?1:fu(n)?2:du(n)?3:0}function th(n,r){return cu(n)===2?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function vb(n,r,i){const s=cu(n);s===2?n.set(r,i):s===3?n.add(i):n[r]=i}function Ux(n,r){return n===r?n!==0||1/n===1/r:n!==n&&r!==r}function fu(n){return n instanceof Map}function du(n){return n instanceof Set}function Ua(n){return n.copy_||n.base_}function nh(n,r){if(fu(n))return new Map(n);if(du(n))return new Set(n);if(Array.isArray(n))return Array.prototype.slice.call(n);const i=yb(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 d=u[c],h=s[d];h.writable===!1&&(h.writable=!0,h.configurable=!0),(h.get||h.set)&&(s[d]={configurable:!0,writable:!0,enumerable:h.enumerable,value:n[d]})}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 Uh(n,r=!1){return hu(n)||za(n)||!wr(n)||(cu(n)>1&&(n.set=n.add=n.clear=n.delete=Hx),Object.freeze(n),r&&Object.entries(n).forEach(([i,s])=>Uh(s,!0))),n}function Hx(){In(2)}function hu(n){return Object.isFrozen(n)}var jx={};function Ga(n){const r=jx[n];return r||In(0,n),r}var $s;function bb(){return $s}function Ix(n,r){return{drafts_:[],parent_:n,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function tv(n,r){r&&(Ga("Patches"),n.patches_=[],n.inversePatches_=[],n.patchListener_=r)}function rh(n){ah(n),n.drafts_.forEach(zx),n.drafts_=null}function ah(n){n===$s&&($s=n.parent_)}function nv(n){return $s=Ix($s,n)}function zx(n){const r=n[on];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function rv(n,r){r.unfinalizedDrafts_=r.drafts_.length;const i=r.drafts_[0];return n!==void 0&&n!==i?(i[on].modified_&&(rh(r),In(4)),wr(n)&&(n=tu(r,n),r.parent_||nu(r,n)),r.patches_&&Ga("Patches").generateReplacementPatches_(i[on].base_,n,r.patches_,r.inversePatches_)):n=tu(r,i,[]),rh(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),n!==gb?n:void 0}function tu(n,r,i){if(hu(r))return r;const s=r[on];if(!s)return eu(r,(u,c)=>av(n,s,r,u,c,i)),r;if(s.scope_!==n)return r;if(!s.modified_)return nu(n,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;const u=s.copy_;let c=u,d=!1;s.type_===3&&(c=new Set(u),u.clear(),d=!0),eu(c,(h,m)=>av(n,s,u,h,m,i,d)),nu(n,u,!1),i&&n.patches_&&Ga("Patches").generatePatches_(s,i,n.patches_,n.inversePatches_)}return s.copy_}function av(n,r,i,s,u,c,d){if(za(u)){const h=c&&r&&r.type_!==3&&!th(r.assigned_,s)?c.concat(s):void 0,m=tu(n,u,h);if(vb(i,s,m),za(m))n.canAutoFreeze_=!1;else return}else d&&i.add(u);if(wr(u)&&!hu(u)){if(!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1)return;tu(n,u),(!r||!r.scope_.parent_)&&typeof s!="symbol"&&Object.prototype.propertyIsEnumerable.call(i,s)&&nu(n,u)}}function nu(n,r,i=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&Uh(r,i)}function Gx(n,r){const i=Array.isArray(n),s={type_:i?1:0,scope_:r?r.scope_:bb(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1};let u=s,c=Hh;i&&(u=[s],c=Ws);const{revoke:d,proxy:h}=Proxy.revocable(u,c);return s.draft_=h,s.revoke_=d,h}var Hh={get(n,r){if(r===on)return n;const i=Ua(n);if(!th(i,r))return kx(n,i,r);const s=i[r];return n.finalized_||!wr(s)?s:s===sd(n.base_,r)?(ld(n),n.copy_[r]=sh(s,n)):s},has(n,r){return r in Ua(n)},ownKeys(n){return Reflect.ownKeys(Ua(n))},set(n,r,i){const s=_b(Ua(n),r);if(s?.set)return s.set.call(n.draft_,i),!0;if(!n.modified_){const u=sd(Ua(n),r),c=u?.[on];if(c&&c.base_===i)return n.copy_[r]=i,n.assigned_[r]=!1,!0;if(Ux(i,u)&&(i!==void 0||th(n.base_,r)))return!0;ld(n),ih(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 sd(n.base_,r)!==void 0||r in n.base_?(n.assigned_[r]=!1,ld(n),ih(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={};eu(Hh,(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 Hh.set.call(this,n[0],r,i,n[0])};function sd(n,r){const i=n[on];return(i?Ua(i):n)[r]}function kx(n,r,i){const s=_b(r,i);return s?"value"in s?s.value:s.get?.call(n.draft_):void 0}function _b(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 ih(n){n.modified_||(n.modified_=!0,n.parent_&&ih(n.parent_))}function ld(n){n.copy_||(n.copy_=nh(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var qx=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 d=this;return function(m=c,...g){return d.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=nv(this),d=sh(r,void 0);let h=!0;try{u=i(d),h=!1}finally{h?rh(c):ah(c)}return tv(c,s),rv(u,c)}else if(!r||typeof r!="object"){if(u=i(r),u===void 0&&(u=r),u===gb&&(u=void 0),this.autoFreeze_&&Uh(u,!0),s){const c=[],d=[];Ga("Patches").generateReplacementPatches_(r,u,c,d),s(c,d)}return u}else In(1,r)},this.produceWithPatches=(r,i)=>{if(typeof r=="function")return(d,...h)=>this.produceWithPatches(d,m=>r(m,...h));let s,u;return[this.produce(r,i,(d,h)=>{s=d,u=h}),s,u]},typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze),typeof n?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(n.useStrictShallowCopy)}createDraft(n){wr(n)||In(8),za(n)&&(n=Fx(n));const r=nv(this),i=sh(n,void 0);return i[on].isManual_=!0,ah(r),i}finishDraft(n,r){const i=n&&n[on];(!i||!i.isManual_)&&In(9);const{scope_:s}=i;return tv(s,r),rv(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 sh(n,r){const i=fu(n)?Ga("MapSet").proxyMap_(n,r):du(n)?Ga("MapSet").proxySet_(n,r):Gx(n,r);return(r?r.scope_:bb()).drafts_.push(i),i}function Fx(n){return za(n)||In(10,n),Eb(n)}function Eb(n){if(!wr(n)||hu(n))return n;const r=n[on];let i;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,i=nh(n,r.scope_.immer_.useStrictShallowCopy_)}else i=nh(n,!0);return eu(i,(s,u)=>{vb(i,s,Eb(u))}),r&&(r.finalized_=!1),i}var un=new qx,Sb=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 Tb(n){return({dispatch:i,getState:s})=>u=>c=>typeof c=="function"?c(i,s,n):u(c)}var Vx=Tb(),Px=Tb,Yx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Jo:Jo.apply(null,arguments)};function iv(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=>Bx(s)&&s.type===n,i}var Ab=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 sv(n){return wr(n)?Sb(n,()=>{}):n}function Bo(n,r,i){return n.has(r)?n.get(r):n.set(r,i(r)).get(r)}function Xx(n){return typeof n=="boolean"}var Zx=()=>function(r){const{thunk:i=!0,immutableCheck:s=!0,serializableCheck:u=!0,actionCreatorCheck:c=!0}=r??{};let d=new Ab;return i&&(Xx(i)?d.push(Vx):d.push(Px(i.extraArgument))),d},Qx="RTK_autoBatch",lv=n=>r=>{setTimeout(r,n)},Kx=(n={type:"raf"})=>r=>(...i)=>{const s=r(...i);let u=!0,c=!1,d=!1;const h=new Set,m=n.type==="tick"?queueMicrotask:n.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:lv(10):n.type==="callback"?n.queueNotification:lv(n.timeout),g=()=>{d=!1,c&&(c=!1,h.forEach(y=>y()))};return Object.assign({},s,{subscribe(y){const E=()=>u&&y(),x=s.subscribe(E);return h.add(y),()=>{x(),h.delete(y)}},dispatch(y){try{return u=!y?.meta?.[Qx],c=!u,c&&(d||(d=!0,m(g))),s.dispatch(y)}finally{u=!0}}})},$x=n=>function(i){const{autoBatch:s=!0}=i??{};let u=new Ab(n);return s&&u.push(Kx(typeof s=="object"?s:void 0)),u};function Wx(n){const r=Zx(),{reducer:i=void 0,middleware:s,devTools:u=!0,preloadedState:c=void 0,enhancers:d=void 0}=n||{};let h;if(typeof i=="function")h=i;else if(Lh(i))h=pb(i);else throw new Error(Ar(1));let m;typeof s=="function"?m=s(r):m=r();let g=Jo;u&&(g=Yx({trace:!1,...typeof u=="object"&&u}));const y=Dx(...m),E=$x(y);let x=typeof d=="function"?d(E):E();const L=g(...x);return mb(h,c,L)}function xb(n){const r={},i=[];let s;const u={addCase(c,d){const h=typeof c=="string"?c:c.type;if(!h)throw new Error(Ar(28));if(h in r)throw new Error(Ar(29));return r[h]=d,u},addMatcher(c,d){return i.push({matcher:c,reducer:d}),u},addDefaultCase(c){return s=c,u}};return n(u),[r,i,s]}function Jx(n){return typeof n=="function"}function eO(n,r){let[i,s,u]=xb(r),c;if(Jx(n))c=()=>sv(n());else{const h=sv(n);c=()=>h}function d(h=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,E)=>{if(E)if(za(y)){const L=E(y,m);return L===void 0?y:L}else{if(wr(y))return Sb(y,x=>E(x,m));{const x=E(y,m);if(x===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return y},h)}return d.getInitialState=c,d}var tO=Symbol.for("rtk-slice-createasyncthunk");function nO(n,r){return`${n}/${r}`}function rO({creators:n}={}){const r=n?.asyncThunk?.[tO];return function(s){const{name:u,reducerPath:c=u}=s;if(!u)throw new Error(Ar(11));const d=(typeof s.reducers=="function"?s.reducers(iO()):s.reducers)||{},h=Object.keys(d),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},g={addCase(S,I){const A=typeof S=="string"?S:S.type;if(!A)throw new Error(Ar(12));if(A in m.sliceCaseReducersByType)throw new Error(Ar(13));return m.sliceCaseReducersByType[A]=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}};h.forEach(S=>{const I=d[S],A={reducerName:S,type:nO(u,S),createNotation:typeof s.reducers=="function"};lO(I)?uO(A,I,g,r):sO(A,I,g)});function y(){const[S={},I=[],A=void 0]=typeof s.extraReducers=="function"?xb(s.extraReducers):[s.extraReducers],Z={...S,...m.sliceCaseReducersByType};return eO(s.initialState,$=>{for(let ae in Z)$.addCase(ae,Z[ae]);for(let ae of m.sliceMatchers)$.addMatcher(ae.matcher,ae.reducer);for(let ae of I)$.addMatcher(ae.matcher,ae.reducer);A&&$.addDefaultCase(A)})}const E=S=>S,x=new Map,L=new WeakMap;let R;function F(S,I){return R||(R=y()),R(S,I)}function z(){return R||(R=y()),R.getInitialState()}function _(S,I=!1){function A($){let ae=$[S];return typeof ae>"u"&&I&&(ae=Bo(L,A,z)),ae}function Z($=E){const ae=Bo(x,I,()=>new WeakMap);return Bo(ae,$,()=>{const ge={};for(const[Ee,se]of Object.entries(s.selectors??{}))ge[Ee]=aO(se,$,()=>Bo(L,$,z),I);return ge})}return{reducerPath:S,getSelectors:Z,get selectors(){return Z(A)},selectSlice:A}}const w={name:u,reducer:F,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:z,..._(c),injectInto(S,{reducerPath:I,...A}={}){const Z=I??c;return S.inject({reducerPath:Z,reducer:F},A),{...w,..._(Z,!0)}}};return w}}function aO(n,r,i,s){function u(c,...d){let h=r(c);return typeof h>"u"&&s&&(h=i()),n(h,...d)}return u.unwrapped=n,u}var jh=rO();function iO(){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 sO({type:n,reducerName:r,createNotation:i},s,u){let c,d;if("reducer"in s){if(i&&!oO(s))throw new Error(Ar(17));c=s.reducer,d=s.prepare}else c=s;u.addCase(n,c).exposeCaseReducer(r,c).exposeAction(r,d?iv(n,d):iv(n))}function lO(n){return n._reducerDefinitionType==="asyncThunk"}function oO(n){return n._reducerDefinitionType==="reducerWithPrepare"}function uO({type:n,reducerName:r},i,s,u){if(!u)throw new Error(Ar(18));const{payloadCreator:c,fulfilled:d,pending:h,rejected:m,settled:g,options:y}=i,E=u(n,c,y);s.exposeAction(r,E),d&&s.addCase(E.fulfilled,d),h&&s.addCase(E.pending,h),m&&s.addCase(E.rejected,m),g&&s.addMatcher(E.settled,g),s.exposeCaseReducer(r,{fulfilled:d||Lo,pending:h||Lo,rejected:m||Lo,settled:g||Lo})}function Lo(){}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 cO={formValues:{}},Ob=jh({name:"start-screen",initialState:cO,reducers:{showStartScreen(n){n.startScreenStatus="VISIBLE",n.formValues={}},startChat(n,r){n.startScreenStatus="HIDDEN",n.formValues=r.payload.formValues},startAuthenticatedChat(n,r){n.startScreenStatus="HIDDEN",n.loginToken=r.payload.loginToken,n.loginRequestToken=void 0},requestLogin(n,r){n.loginRequestToken=r.payload.loginRequestToken,n.formValues=r.payload.formValues},loginWindowClosed(n){n.loginRequestToken=void 0}}}),{startChat:fO,startAuthenticatedChat:dO,showStartScreen:hO,requestLogin:mO,loginWindowClosed:pO}=Ob.actions,gO=Ob.reducer,Rb="RESET_CHAT_STATE",wb="TOGGLE_TRANSCRIPT_MAIL_OVERLAY",yO=()=>({type:ub}),vO=()=>({type:Rb}),Cb=()=>({type:wb}),ov=(n,r,i)=>(s,u)=>{try{const c=u().connection.sessionId;if(!c)throw new Error("Session ID is not available");s({type:Dh,payload:{chunkId:i}}),uv(n,c,r,i,!1,s),uv(n,c,r,i,!0,s)}catch(c){console.error("Error loading source infos:",c),s({type:Mh})}},uv=(n,r,i,s,u,c)=>{const d=`/${n}/me/chat-widget/transcript/${i}/chunks/${s}?highlight=${u}`;fetch(d,{headers:{"x-bubble-chat-session-id":r}}).then(h=>{if(!h.ok)throw new Error(`HTTP error! Status: ${h.status}`);return h.json()}).then(h=>{const m={...h,chunkId:s,highlighted:u};c({type:lb,payload:m})}).catch(h=>{console.error("Error fetching source infos:",h),c({type:Mh,payload:{highlighted:u}})})},bO=()=>({type:Bh}),Ih="CONNECT",zh="CONNECTING",Gh="CONNECTED",kh="DISCONNECTED",qh="RECONNECTED",Fh="RESTORE_SESSION_ID",mu="START",pu="CLEAR_SESSION_ID",_O=[Ih,zh,Gh,kh,qh,Fh],EO=(n,r)=>({type:Ih,clientName:n,querystrings:r}),SO=n=>({type:Fh,sessionId:n}),TO=()=>({type:zh}),AO=()=>({type:Gh}),xO=()=>({type:kh}),OO=()=>({type:qh}),Nb=(n,r)=>(i,s)=>{const u=s().connection,{formValues:c,loginToken:d}=s().startScreen;let h=u.sessionId;h===void 0&&(h=$o());let m=u.userId;if(m===void 0){const g=Do.get("bubble-chat-user-id")||Do.get("bubble-chat-userId")||Do.get("bf-webclient-userId");m=g||$o(),Do.set("bubble-chat-user-id",m)}i({type:mu,payload:{sessionId:h,userId:m,clientName:n,loginToken:d,querystrings:{...r,...c}}})},gu=(n,r)=>(i,s)=>{const u=s().connection.sessionId||"";if(i(RO(u)),i(vO()),s().settings.enableStartScreen)i(hO());else return i(Nb(n,r))},RO=n=>({type:pu,payload:{sessionId:n}}),tt=()=>{const n=ou();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||{}),ru=(n=>(n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON",n))(ru||{});const wO="_container_q2uun_1",CO="_chatcontent_q2uun_6",NO="_accessabilityHidden_q2uun_12",od={container:wO,chatcontent:CO,accessabilityHidden:NO},MO="_messageContainer_ofi0g_1",DO="_messages_ofi0g_12",cv={messageContainer:MO,messages:DO};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 BO=["children","options"],LO={footnoteReference:"7"},fv=["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"}),dv={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},UO=["style","script","pre"],HO=["src","href","data","formAction","srcDoc","action"],jO=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,IO=/mailto:/i,zO=/\n{2,}$/,hv=/^(\s*>[\s\S]*?)(?=\n\n|$)/,GO=/^ *> ?/gm,kO=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,qO=/^ {2,}\n/,FO=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,mv=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,pv=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,VO=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,PO=/^(?:\n *)*\n/,YO=/\r\n?/g,XO=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,ZO=/^\[\^([^\]]+)]/,QO=/\f/g,KO=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,$O=/^\s*?\[(x|\s)\]/,gv=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,yv=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,vv=/^([^\n]+)\n *(=|-){3,} *\n/,ud=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,WO=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,bv=/^<!--[\s\S]*?(?:-->)/,JO=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,cd=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,eR=/^\{.*\}$/,tR=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,nR=/^<([^ >]+@[^ >]+)>/,rR=/^<([^ >]+:\/[^ >]+)>/,aR=/-([a-z])?/gi,_v=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,iR=/^[^\n]+(?: \n|\n{2,})/,sR=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,lR=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,oR=/^\[([^\]]*)\] ?\[([^\]]*)\]/,uR=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,cR=/\t/g,fR=/(^ *\||\| *$)/g,dR=/^ *:-+: *$/,hR=/^ *:-+ *$/,mR=/^ *-+: *$/,yu=n=>`(?=[\\s\\S]+?\\1${n?"\\1":""})`,vu="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",pR=RegExp(`^([*_])\\1${yu(1)}${vu}\\1\\1(?!\\1)`),gR=RegExp(`^([*_])${yu(0)}${vu}\\1(?!\\1)`),yR=RegExp(`^(==)${yu(0)}${vu}\\1`),vR=RegExp(`^(~~)${yu(0)}${vu}\\1`),bR=/^(:[a-zA-Z0-9-_]+:)/,_R=/^\\([^0-9A-Za-z\s])/,ER=/\\([^0-9A-Za-z\s])/g,SR=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,TR=/^\n+/,AR=/^([ \t]*)/,xR=/(?:^|\n)( *)$/,Vh="(?:\\d+\\.)",Ph="(?:[*+-])";function Mb(n){return"( *)("+(n===1?Vh:Ph)+") +"}const Db=Mb(1),Bb=Mb(2);function Lb(n){return RegExp("^"+(n===1?Db:Bb))}const OR=Lb(1),RR=Lb(2);function Ub(n){return RegExp("^"+(n===1?Db:Bb)+"[^\\n]*(?:\\n(?!\\1"+(n===1?Vh:Ph)+" )[^\\n]*)*(\\n|$)","gm")}const wR=Ub(1),CR=Ub(2);function Hb(n){const r=n===1?Vh:Ph;return RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}const jb=Hb(1),Ib=Hb(2);function Ev(n,r){const i=r===1,s=i?jb:Ib,u=i?wR:CR,c=i?OR:RR;return{t:d=>c.test(d),o:Ci(function(d,h){const m=xR.exec(h.prevCapture);return m&&(h.list||!h.inline&&!h.simple)?s.exec(d=m[1]+d):null}),i:1,u(d,h,m){const g=i?+d[2]:void 0,y=d[0].replace(zO,`
|
|
94
94
|
`).match(u);let E=!1;return{items:y.map(function(x,L){const R=c.exec(x)[0].length,F=RegExp("^ {1,"+R+"}","gm"),z=x.replace(F,"").replace(c,""),_=L===y.length-1,w=z.indexOf(`
|
|
95
95
|
|
|
96
96
|
`)!==-1||_&&E;E=w;const S=m.inline,I=m.list;let A;m.list=!0,w?(m.inline=!1,A=Ks(z)+`
|
|
@@ -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","start-screen.waiting-for-login":"In attesa di login ...","header.close-chat":"Minimizzare la chat","header.menu.title":"Menu","header.menu.restart-chat":"Riavviare la chat","header.menu.expand-chat-window":"Espandere la finestra","header.menu.download-transcript":"Scaricare la trascrizione","header.menu.send-transcript":"Inviare la trascrizione","header.menu.export-transcript":"Esportare la trascrizione","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"},Z3=["de","en","fr","it"],i_={locale:"de",messages:a_},Q3=(n,r)=>{if(Z3.includes(n)){const i=K3(n),s=V3(r);return{...i,...s}}return r},K3=n=>{switch(n.toString()){case"en":return P3;case"fr":return Y3;case"it":return X3;default:return a_}},$3=(n=W3,r)=>{switch(r.type){case zh:return Object.assign({},n,{connectionState:ja.CONNECTING});case Gh:return Object.assign({},n,{connectionState:ja.CONNECTED});case kh:return Object.assign({},n,{connectionState:ja.DISCONNECTED});case qh:return Object.assign({},n,{connectionState:ja.RECONNECTED});case Fh:return Object.assign({},n,{sessionId:r.sessionId});case mu:return Object.assign({},n,{sessionId:r.payload.sessionId,userId:r.payload.userId});case pu:return Object.assign({},n,{sessionId:void 0});default:return n}},W3={connectionState:ja.DISCONNECTED,sessionId:void 0,userId:void 0},J3=(n=u1,r)=>{switch(r.type){case Rb:return u1;case mu:return La({type:"webclient.chat.started"}),n;case pu:return La({type:"webclient.chat.ended"}),n;case Re.ActionTypes.TYPING_ON:return Object.assign({},n,{isBotTyping:!0});case Re.ActionTypes.TYPING_OFF:return Object.assign({},n,{isBotTyping:!1});case Re.ActionTypes.MESSAGE_FROM_GUEST:case Re.ActionTypes.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return o1(n,r.message);case Re.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 Rh:{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 Oh:return La(r.message),n;case Re.ActionTypes.EVENT_TO_GUEST:return La(r.event),n;case Re.ActionTypes.DRAWER_OPEN:return Object.assign({},n,{drawerContentUrl:r.payload.parameters.contentUrl});case Re.ActionTypes.DRAWER_CLOSE:return Object.assign({},n,{drawerContentUrl:void 0});case Re.ActionTypes.GUEST_LOCALE_CHANGED:return Object.assign({},n,{locale:r.payload.locale});case ob:return La(r),n;case ub:return La(r),n;case Ch:{const i=new Re.TextMessage(r.transcription,new Re.GuestUser),s=Object.assign({},i,{_id:$o()});return o1(n,s)}case Re.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 Nh:{const i={enabled:!0,rating:r.payload.rating};return Object.assign({},n,{conversationRating:i})}case Re.ActionTypes.CONVERSATION_RATING_FROM_GUEST:{const i={...n.conversationRating,rating:r.payload};return Object.assign({},n,{conversationRating:i})}case Dh:return{...n,sourceInfos:{type:"loading",chunkId:r.payload.chunkId}};case Mh:{const{highlighted:i}=r.payload;return n.sourceInfos?.type==="loaded"&&i?{...n,sourceInfos:{...n.sourceInfos,highlighted:!0}}:{...n,sourceInfos:{type:"loading-error"}}}case lb:{const i=n.sourceInfos?.type,{chunkId:s,knowledgeBaseType:u,title:c,content:d,highlighted:h,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"&&h?{...n,sourceInfos:{type:"loaded",chunkId:s,knowledgeBaseType:u,title:c,content:d,highlighted:h,url:m}}:n}case Bh:return{...n,sourceInfos:void 0};case wb:return{...n,showTranscriptMailOverlay:!n.showTranscriptMailOverlay};default:return n}},o1=(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=>{eM()?window.top?.postMessage(n,"*"):n.type==="webclient.change.url"&&window.open(n.url)},eM=()=>typeof window<"u"&&window.self!==window.top,u1={messages:[],quickReplies:[],isBotTyping:!1,showTranscriptMailOverlay:!1,conversationRating:{enabled:!1}},s_=jh({name:"intl",initialState:i_,reducers:{updateIntl:(n,r)=>{n.locale=r.payload.language,n.messages=r.payload.messages}}}),{updateIntl:tM}=s_.actions,nM=s_.reducer,rM={version:void 0,requiresUserAuthentication:!1,enableStartScreen:void 0,enableStandaloneView:!1,enableTranscriptExportEmail:!1,enableTranscriptExportPdf:!1,enableGeneralConditions:!1,enableSpeechSupport:!1,commands:[],menuItems:[]},l_=jh({name:"settings",initialState:rM,reducers:{setSettings(n,r){n.version&&n.version!==r.payload.version?(console.log("version changed, reloading chat window"),window.location.reload()):(n.version=r.payload.version,n.requiresUserAuthentication=r.payload.requiresUserAuthentication,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:aM}=l_.actions,iM=l_.reducer,sM=pb({settings:iM,chat:J3,startScreen:gO,connection:$3,intl:nM}),lM="bubble-chat",o_="state-last-saved-at",u_="state",oM=n=>{try{if(!fM())return;const r=c1(n,o_);if(cM(r))return;{const i=c1(n,u_);return i===null?void 0:JSON.parse(i)}}catch(r){console.error(r);return}},uM=(n,r)=>{try{const i=JSON.stringify(r);f1(n,u_,i);const s=new Date().toISOString();f1(n,o_,s)}catch(i){console.error(i)}},cM=n=>{if(n===null)return!1;const r=new Date(n);return r.setHours(r.getHours()+12),new Date>r},fM=()=>typeof localStorage<"u",c1=(n,r)=>{const i=c_(n,r);return localStorage.getItem(i)},f1=(n,r,i)=>{const s=c_(n,r);return localStorage.setItem(s,i)},c_=(n,r)=>`${lM}-${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 Yo=Object.create(null);Object.keys(er).forEach(n=>{Yo[er[n]]=n});const uh={type:"error",data:"parser error"},f_=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",d_=typeof ArrayBuffer=="function",h_=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Zh=({type:n,data:r},i,s)=>f_&&r instanceof Blob?i?s(r):d1(r,s):d_&&(r instanceof ArrayBuffer||h_(r))?i?s(r):d1(new Blob([r]),s):s(er[n]+(r||"")),d1=(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 jd;function dM(n,r){if(f_&&n.data instanceof Blob)return n.data.arrayBuffer().then(h1).then(r);if(d_&&(n.data instanceof ArrayBuffer||h_(n.data)))return r(h1(n.data));Zh(n,!1,i=>{jd||(jd=new TextEncoder),r(jd.encode(i))})}const m1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<m1.length;n++)Qs[m1.charCodeAt(n)]=n;const hM=n=>{let r=n.length*.75,i=n.length,s,u=0,c,d,h,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)],d=Qs[n.charCodeAt(s+1)],h=Qs[n.charCodeAt(s+2)],m=Qs[n.charCodeAt(s+3)],y[u++]=c<<2|d>>4,y[u++]=(d&15)<<4|h>>2,y[u++]=(h&3)<<6|m&63;return g},mM=typeof ArrayBuffer=="function",Qh=(n,r)=>{if(typeof n!="string")return{type:"message",data:m_(n,r)};const i=n.charAt(0);return i==="b"?{type:"message",data:pM(n.substring(1),r)}:Yo[i]?n.length>1?{type:Yo[i],data:n.substring(1)}:{type:Yo[i]}:uh},pM=(n,r)=>{if(mM){const i=hM(n);return m_(i,r)}else return{base64:!0,data:n}},m_=(n,r)=>{switch(r){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},p_="",gM=(n,r)=>{const i=n.length,s=new Array(i);let u=0;n.forEach((c,d)=>{Zh(c,!1,h=>{s[d]=h,++u===i&&r(s.join(p_))})})},yM=(n,r)=>{const i=n.split(p_),s=[];for(let u=0;u<i.length;u++){const c=Qh(i[u],r);if(s.push(c),c.type==="error")break}return s};function vM(){return new TransformStream({transform(n,r){dM(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 Id;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 bM(n,r){Id||(Id=new TextDecoder);const i=[];let s=0,u=-1,c=!1;return new TransformStream({transform(d,h){for(i.push(d);;){if(s===0){if(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){h.enqueue(uh);break}u=y*Math.pow(2,32)+g.getUint32(4),s=3}else{if(Go(i)<u)break;const m=ko(i,u);h.enqueue(Qh(c?m:Id.decode(m),r)),s=0}if(u===0||u>n){h.enqueue(uh);break}}}})}const g_=4;function ct(n){if(n)return _M(n)}function _M(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 Eu=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")(),EM="arraybuffer";function y_(n,...r){return r.reduce((i,s)=>(n.hasOwnProperty(s)&&(i[s]=n[s]),i),{})}const SM=En.setTimeout,TM=En.clearTimeout;function Su(n,r){r.useNativeTimers?(n.setTimeoutFn=SM.bind(En),n.clearTimeoutFn=TM.bind(En)):(n.setTimeoutFn=En.setTimeout.bind(En),n.clearTimeoutFn=En.clearTimeout.bind(En))}const AM=1.33;function xM(n){return typeof n=="string"?OM(n):Math.ceil((n.byteLength||n.size)*AM)}function OM(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 v_(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function RM(n){let r="";for(let i in n)n.hasOwnProperty(i)&&(r.length&&(r+="&"),r+=encodeURIComponent(i)+"="+encodeURIComponent(n[i]));return r}function wM(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 CM extends Error{constructor(r,i,s){super(r),this.description=i,this.context=s,this.type="TransportError"}}class Kh extends ct{constructor(r){super(),this.writable=!1,Su(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 CM(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=Qh(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=RM(r);return i.length?"?"+i:""}}class NM extends Kh{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)};yM(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,gM(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]=v_()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(r,i)}}let b_=!1;try{b_=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const MM=b_;function DM(){}class BM extends NM{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,Su(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=y_(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=DM,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",p1);else if(typeof addEventListener=="function"){const n="onpagehide"in En?"pagehide":"unload";addEventListener(n,p1,!1)}}function p1(){for(let n in Wn.requests)Wn.requests.hasOwnProperty(n)&&Wn.requests[n].abort()}const LM=function(){const n=__({xdomain:!1});return n&&n.responseType!==null}();class UM extends BM{constructor(r){super(r);const i=r&&r.forceBase64;this.supportsBinary=LM&&!i}request(r={}){return Object.assign(r,{xd:this.xd},this.opts),new Wn(__,this.uri(),r)}}function __(n){const r=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!r||MM))return new XMLHttpRequest}catch{}if(!r)try{return new En[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const E_=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class HM extends Kh{get name(){return"websocket"}doOpen(){const r=this.uri(),i=this.opts.protocols,s=E_?{}:y_(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;Zh(s,this.supportsBinary,c=>{try{this.doWrite(s,c)}catch{}u&&Eu(()=>{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]=v_()),this.supportsBinary||(i.b64=1),this.createUri(r,i)}}const zd=En.WebSocket||En.MozWebSocket;class jM extends HM{createSocket(r,i,s){return E_?new zd(r,i,s):i?new zd(r,i):new zd(r)}doWrite(r,i){this.ws.send(i)}}class IM extends Kh{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=bM(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=r.readable.pipeThrough(i).getReader(),u=vM();u.readable.pipeTo(r.writable),this._writer=u.writable.getWriter();const c=()=>{s.read().then(({done:h,value:m})=>{h||(this.onPacket(m),c())}).catch(h=>{})};c();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(r){this.writable=!1;for(let i=0;i<r.length;i++){const s=r[i],u=i===r.length-1;this._writer.write(s).then(()=>{u&&Eu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var r;(r=this._transport)===null||r===void 0||r.close()}}const zM={websocket:jM,webtransport:IM,polling:UM},GM=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,kM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ch(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=GM.exec(n||""),c={},d=14;for(;d--;)c[kM[d]]=u[d]||"";return i!=-1&&s!=-1&&(c.source=r,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=qM(c,c.path),c.queryKey=FM(c,c.query),c}function qM(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 FM(n,r){const i={};return r.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,u,c){u&&(i[u]=c)}),i}const fh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Xo=[];fh&&addEventListener("offline",()=>{Xo.forEach(n=>n())},!1);class sa extends ct{constructor(r,i){if(super(),this.binaryType=EM,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=ch(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=ch(i.host).host);Su(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=wM(this.opts.query)),fh&&(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"})},Xo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(r){const i=Object.assign({},this.opts.query);i.EIO=g_,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+=xM(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,Eu(()=>{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(),fh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Xo.indexOf(this._offlineEventListener);s!==-1&&Xo.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",r,i),this.writeBuffer=[],this._prevBufferLen=0}}}sa.protocol=g_;class VM 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",E=>{if(!s)if(E.type==="pong"&&E.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 x=new Error("probe error");x.transport=i.name,this.emitReserved("upgradeError",x)}}))};function c(){s||(s=!0,y(),i.close(),i=null)}const d=E=>{const x=new Error("probe error: "+E);x.transport=i.name,c(),this.emitReserved("upgradeError",x)};function h(){d("transport closed")}function m(){d("socket closed")}function g(E){i&&E.name!==i.name&&c()}const y=()=>{i.removeListener("open",u),i.removeListener("error",d),i.removeListener("close",h),this.off("close",m),this.off("upgrading",g)};i.once("open",u),i.once("error",d),i.once("close",h),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 PM=class extends VM{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=>zM[u]).filter(u=>!!u)),super(r,s)}};function YM(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=ch(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 XM=typeof ArrayBuffer=="function",ZM=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,S_=Object.prototype.toString,QM=typeof Blob=="function"||typeof Blob<"u"&&S_.call(Blob)==="[object BlobConstructor]",KM=typeof File=="function"||typeof File<"u"&&S_.call(File)==="[object FileConstructor]";function $h(n){return XM&&(n instanceof ArrayBuffer||ZM(n))||QM&&n instanceof Blob||KM&&n instanceof File}function Zo(n,r){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let i=0,s=n.length;i<s;i++)if(Zo(n[i]))return!0;return!1}if($h(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return Zo(n.toJSON(),!0);for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&Zo(n[i]))return!0;return!1}function $M(n){const r=[],i=n.data,s=n;return s.data=dh(i,r),s.attachments=r.length,{packet:s,buffers:r}}function dh(n,r){if(!n)return n;if($h(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]=dh(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]=dh(n[s],r));return i}return n}function WM(n,r){return n.data=hh(n.data,r),delete n.attachments,n}function hh(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]=hh(n[i],r);else if(typeof n=="object")for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=hh(n[i],r));return n}const JM=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],e8=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 t8{constructor(r){this.replacer=r}encode(r){return(r.type===Ce.EVENT||r.type===Ce.ACK)&&Zo(r)?this.encodeAsBinary({type:r.type===Ce.EVENT?Ce.BINARY_EVENT:Ce.BINARY_ACK,nsp:r.nsp,data:r.data,id:r.id}):[this.encodeAsString(r)]}encodeAsString(r){let i=""+r.type;return(r.type===Ce.BINARY_EVENT||r.type===Ce.BINARY_ACK)&&(i+=r.attachments+"-"),r.nsp&&r.nsp!=="/"&&(i+=r.nsp+","),r.id!=null&&(i+=r.id),r.data!=null&&(i+=JSON.stringify(r.data,this.replacer)),i}encodeAsBinary(r){const i=$M(r),s=this.encodeAsString(i.packet),u=i.buffers;return u.unshift(s),u}}function g1(n){return Object.prototype.toString.call(n)==="[object Object]"}class Wh 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 n8(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if($h(r)||r.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(r),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+r)}decodeString(r){let i=0;const s={type:Number(r.charAt(0))};if(Ce[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===Ce.BINARY_EVENT||s.type===Ce.BINARY_ACK){const c=i+1;for(;r.charAt(++i)!=="-"&&i!=r.length;);const d=r.substring(c,i);if(d!=Number(d)||r.charAt(i)!=="-")throw new Error("Illegal attachments");s.attachments=Number(d)}if(r.charAt(i+1)==="/"){const c=i+1;for(;++i&&!(r.charAt(i)===","||i===r.length););s.nsp=r.substring(c,i)}else s.nsp="/";const u=r.charAt(i+1);if(u!==""&&Number(u)==u){const c=i+1;for(;++i;){const d=r.charAt(i);if(d==null||Number(d)!=d){--i;break}if(i===r.length)break}s.id=Number(r.substring(c,i+1))}if(r.charAt(++i)){const c=this.tryParse(r.substr(i));if(Wh.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 g1(i);case Ce.DISCONNECT:return i===void 0;case Ce.CONNECT_ERROR:return typeof i=="string"||g1(i);case Ce.EVENT:case Ce.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&JM.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 n8{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=WM(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const r8=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Wh,Encoder:t8,get PacketType(){return Ce},protocol:e8},Symbol.toStringTag,{value:"Module"}));function jn(n,r,i){return n.on(r,i),function(){n.off(r,i)}}const a8=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class T_ 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(a8.hasOwnProperty(r))throw new Error('"'+r.toString()+'" is a reserved event name');if(i.unshift(r),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const d={type:Ce.EVENT,data:i};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const y=this.ids++,E=i.pop();this._registerAckCallback(y,E),d.id=y}const h=(u=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||u===void 0?void 0:u.writable,m=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!h||(m?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(r,i){var s;const u=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(u===void 0){this.acks[r]=i;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[r];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===r&&this.sendBuffer.splice(h,1);i.call(this,new Error("operation has timed out"))},u),d=(...h)=>{this.io.clearTimeoutFn(c),i.apply(this,h)};d.withError=!0,this.acks[r]=d}emitWithAck(r,...i){return new Promise((s,u)=>{const c=(d,h)=>d?u(d):s(h);c.withError=!0,i.push(c),this.emit(r,...i)})}_addToQueue(r){let i;typeof r[r.length-1]=="function"&&(i=r.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:r,flags:Object.assign({fromQueue:!0},this.flags)};r.push((u,...c)=>s!==this._queue[0]?void 0:(u!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(u)):(this._queue.shift(),i&&i(null,...c)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(r=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!r||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(r){r.nsp=this.nsp,this.io._packet(r)}onopen(){typeof this.auth=="function"?this.auth(r=>{this._sendConnectPacket(r)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(r){this.packet({type:Ce.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},r):r})}onerror(r){this.connected||this.emitReserved("connect_error",r)}onclose(r,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",r,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(r=>{if(!this.sendBuffer.some(s=>String(s.id)===r)){const s=this.acks[r];delete this.acks[r],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(r){if(r.nsp===this.nsp)switch(r.type){case Ce.CONNECT:r.data&&r.data.sid?this.onconnect(r.data.sid,r.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ce.EVENT:case Ce.BINARY_EVENT:this.onevent(r);break;case Ce.ACK:case Ce.BINARY_ACK:this.onack(r);break;case Ce.DISCONNECT:this.ondisconnect();break;case Ce.CONNECT_ERROR:this.destroy();const s=new Error(r.data.message);s.data=r.data.data,this.emitReserved("connect_error",s);break}}onevent(r){const i=r.data||[];r.id!=null&&i.push(this.ack(r.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(r){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const s of i)s.apply(this,r)}super.emit.apply(this,r),this._pid&&r.length&&typeof r[r.length-1]=="string"&&(this._lastOffset=r[r.length-1])}ack(r){const i=this;let s=!1;return function(...u){s||(s=!0,i.packet({type:Ce.ACK,id:r,data:u}))}}onack(r){const i=this.acks[r.id];typeof i=="function"&&(delete this.acks[r.id],i.withError&&r.data.unshift(null),i.apply(this,r.data))}onconnect(r,i){this.id=r,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(r=>this.emitEvent(r)),this.receiveBuffer=[],this.sendBuffer.forEach(r=>{this.notifyOutgoingListeners(r),this.packet(r)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(r=>r()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ce.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(r){return this.flags.compress=r,this}get volatile(){return this.flags.volatile=!0,this}timeout(r){return this.flags.timeout=r,this}onAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(r),this}prependAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(r),this}offAny(r){if(!this._anyListeners)return this;if(r){const i=this._anyListeners;for(let s=0;s<i.length;s++)if(r===i[s])return i.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(r),this}prependAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(r),this}offAnyOutgoing(r){if(!this._anyOutgoingListeners)return this;if(r){const i=this._anyOutgoingListeners;for(let s=0;s<i.length;s++)if(r===i[s])return i.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(r){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const s of i)s.apply(this,r.data)}}}function Mi(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}Mi.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};Mi.prototype.reset=function(){this.attempts=0};Mi.prototype.setMin=function(n){this.ms=n};Mi.prototype.setMax=function(n){this.max=n};Mi.prototype.setJitter=function(n){this.jitter=n};class mh 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,Su(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((s=i.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Mi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=r;const u=i.parser||r8;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(r){return arguments.length?(this._reconnection=!!r,r||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(r){return r===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=r,this)}reconnectionDelay(r){var i;return r===void 0?this._reconnectionDelay:(this._reconnectionDelay=r,(i=this.backoff)===null||i===void 0||i.setMin(r),this)}randomizationFactor(r){var i;return r===void 0?this._randomizationFactor:(this._randomizationFactor=r,(i=this.backoff)===null||i===void 0||i.setJitter(r),this)}reconnectionDelayMax(r){var i;return r===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=r,(i=this.backoff)===null||i===void 0||i.setMax(r),this)}timeout(r){return arguments.length?(this._timeout=r,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(r){if(~this._readyState.indexOf("open"))return this;this.engine=new PM(this.uri,this.opts);const i=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const u=jn(i,"open",function(){s.onopen(),r&&r()}),c=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),r?r(h):this.maybeReconnectOnOpen()},d=jn(i,"error",c);if(this._timeout!==!1){const h=this._timeout,m=this.setTimeoutFn(()=>{u(),c(new Error("timeout")),i.close()},h);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(u),this.subs.push(d),this}connect(r){return this.open(r)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const r=this.engine;this.subs.push(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){Eu(()=>{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 T_(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 Qo(n,r){typeof n=="object"&&(r=n,n=void 0),r=r||{};const i=YM(n,r.path||"/socket.io"),s=i.source,u=i.id,c=i.path,d=Ys[u]&&c in Ys[u].nsps,h=r.forceNew||r["force new connection"]||r.multiplex===!1||d;let m;return h?m=new mh(s,r):(Ys[u]||(Ys[u]=new mh(s,r)),m=Ys[u]),i.query&&!r.query&&(r.query=i.queryKey),m.socket(i.path,r)}Object.assign(Qo,{Manager:mh,Socket:T_,io:Qo,connect:Qo});const i8=[Re.ActionTypes.MESSAGE_TO_GUEST,Re.ActionTypes.EVENT_TO_GUEST,Re.ActionTypes.TYPING_ON,Re.ActionTypes.TYPING_OFF,Re.ActionTypes.RESTART_CHAT_REQUEST,..._O,...px,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],s8=({dispatch:n,getState:r})=>i=>{let s=null;return u=>{const c=i(u);if(u.type===Ih){s?.disconnect(),n(TO());const d=`/chat?${uu.stringify(u.querystrings)}`;s=Qo(`/${u.clientName}${d}`),s.on("action",n),s.on("connect",()=>n(AO())),s.on("disconnect",()=>n(xO())),s.on("reconnect",()=>n(OO())),s.on("set-translations",(h,m)=>{n(tM({language:h,messages:Q3(h,m)}))}),s.on("set-settings",h=>{n(aM(h))}),s.on("enable-conversation-rating",h=>n(_x(h))),s.on("speech-transcription",h=>n(yx(h))),s.on("restore-client-state",h=>{n(SO(h.sessionId)),n(Sx(h.messages))}),s.on("expand-window",({devices:h,initial:m=!1})=>{n({type:ob,devices:h,initial:m})}),s.on("restart-chat",()=>{n(gu(u.clientName,u.querystrings))}),s.on("login-success",h=>{n(dO({loginToken:h.loginToken}))})}else if(u.type==="start-screen/requestLogin")s?.emit("login-requested",u.payload);else if(u.type===mu)s?.emit("start-chat",u.payload);else if(u.type===pu)s?.emit("terminate-session",u.payload);else if(u.type===mx)s?.emit("get-started",JSON.stringify(u));else if(u.type===wh)s?.emit("audio-message",u.buffer);else if(u.type===Re.ActionTypes.CONVERSATION_RATING_FROM_GUEST)s?.emit("conversation-rating",u.payload);else if(u.type===cb){const{connection:{sessionId:d}}=r();window.location.href=`/transcript-pdf/${d}`}else i8.indexOf(u.type)===-1&&u.meta===void 0&&s&&s.emit("action",JSON.stringify(u));return c}},A_=Yb(),l8={...oM(A_),intl:i_},ph=Wx({middleware:n=>n().concat(s8),reducer:sM,preloadedState:l8});ph.subscribe(k3(()=>{const n=ph.getState();uM(A_,{connection:n.connection,startScreen:n.startScreen})},1e3));const o8=document.getElementById("root"),u8=GS.createRoot(o8);u8.render(v.jsx(z2,{store:ph,children:v.jsx(R3,{})}));
|
|
124
|
-
//# sourceMappingURL=index-
|
|
124
|
+
//# sourceMappingURL=index-t__CTdhX.js.map
|