@botfabrik/engine-webclient 4.75.4 → 4.75.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{index-2PErs8i_.js → index-BMBcFG3H.js} +3 -3
- package/dist/client/assets/{index-2PErs8i_.js.map → index-BMBcFG3H.js.map} +1 -1
- package/dist/client/assets/index-B_li01aH.css +1 -0
- package/dist/client/index.html +2 -2
- package/package.json +6 -6
- package/dist/client/assets/index-DAbCManF.css +0 -1
|
@@ -87,7 +87,7 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
87
87
|
|
|
88
88
|
`,{inline:y}));for(;typeof p[p.length-1]=="string"&&!p[p.length-1].trim();)p.pop();if(t.wrapper===null)return p;const E=t.wrapper||(y?"span":"div");let S;if(p.length>1||t.forceWrapper)S=p;else{if(p.length===1)return S=p[0],typeof S=="string"?n("span",{key:"outer"},S):S;S=null}return R.createElement(E,{key:"outer"},S)}function i(c,y){const p=y.match(yx);return p?p.reduce(function(E,S,g){const d=S.indexOf("=");if(d!==-1){const m=function(x){return x.indexOf("-")!==-1&&x.match(Px)===null&&(x=x.replace(Lx,function(T,F){return F.toUpperCase()})),x}(S.slice(0,d)).trim(),_=function(x){const T=x[0];return(T==='"'||T==="'")&&x.length>=2&&x[x.length-1]===T?x.slice(1,-1):x}(S.slice(d+1).trim()),w=fh[m]||m,b=E[w]=function(x,T,F,D){return T==="style"?F.split(/;\s?/).reduce(function(K,he){const Fe=he.slice(0,he.indexOf(":"));return K[Fe.trim().replace(/(-[a-z])/g,tr=>tr[1].toUpperCase())]=he.slice(Fe.length+1).trim(),K},{}):T==="href"||T==="src"?D(F,x,T):(F.match(Ix)&&(F=F.slice(1,F.length-1)),F==="true"||F!=="false"&&F)}(c,m,_,t.sanitizer);typeof b=="string"&&(fu.test(b)||du.test(b))&&(E[w]=R.cloneElement(r(b.trim()),{key:g}))}else S!=="style"&&(E[fh[S]||S]=!0);return E},{}):null}t.overrides=t.overrides||{},t.sanitizer=t.sanitizer||dT,t.slugify=t.slugify||go,t.namedCodesToUnicode=t.namedCodesToUnicode?Fn({},dh,t.namedCodesToUnicode):dh,t.createElement=t.createElement||R.createElement;const o=[],s={},a={[I.blockQuote]:{match:Bt(My),order:1,parse:(c,y,p)=>({children:y(c[0].replace(Ex,""),p)}),render:(c,y,p)=>n("blockquote",{key:p.key},y(c.children,p))},[I.breakLine]:{match:Qr(Sx),order:1,parse:Ba,render:(c,y,p)=>n("br",{key:p.key})},[I.breakThematic]:{match:Bt(wx),order:1,parse:Ba,render:(c,y,p)=>n("hr",{key:p.key})},[I.codeBlock]:{match:Bt(By),order:0,parse:c=>({lang:void 0,text:c[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}),render:(c,y,p)=>n("pre",{key:p.key},n("code",Fn({},c.attrs,{className:c.lang?`lang-${c.lang}`:""}),c.text))},[I.codeFenced]:{match:Bt(Ly),order:0,parse:c=>({attrs:i("code",c[3]||""),lang:c[2]||void 0,text:c[4],type:I.codeBlock})},[I.codeInline]:{match:nn(bx),order:3,parse:c=>({text:c[2]}),render:(c,y,p)=>n("code",{key:p.key},c.text)},[I.footnote]:{match:Bt(Cx),order:0,parse:c=>(o.push({footnote:c[2],identifier:c[1]}),{}),render:ja},[I.footnoteReference]:{match:tn(kx),order:1,parse:c=>({target:`#${t.slugify(c[1],go)}`,text:c[1]}),render:(c,y,p)=>n("a",{key:p.key,href:t.sanitizer(c.target,"a","href")},n("sup",{key:p.key},c.text))},[I.gfmTask]:{match:tn(Nx),order:1,parse:c=>({completed:c[1].toLowerCase()==="x"}),render:(c,y,p)=>n("input",{checked:c.completed,key:p.key,readOnly:!0,type:"checkbox"})},[I.heading]:{match:Bt(t.enforceAtxHeadings?zy:jy),order:1,parse:(c,y,p)=>({children:Io(y,c[2],p),id:t.slugify(c[2],go),level:c[1].length}),render:(c,y,p)=>n(`h${c.level}`,{id:c.id,key:p.key},y(c.children,p))},[I.headingSetext]:{match:Bt(Uy),order:0,parse:(c,y,p)=>({children:Io(y,c[1],p),level:c[2]==="="?1:2,type:I.heading})},[I.htmlBlock]:{match:Qr(fu),order:1,parse(c,y,p){const[,E]=c[3].match(tT),S=new RegExp(`^${E}`,"gm"),g=c[3].replace(S,""),d=(m=g,lT.some(T=>T.test(m))?pT:Io);var m;const _=c[1].toLowerCase(),w=gx.indexOf(_)!==-1,b=(w?_:c[1]).trim(),x={attrs:i(b,c[2]),noInnerParse:w,tag:b};return p.inAnchor=p.inAnchor||_==="a",w?x.text=c[3]:x.children=d(y,g,p),p.inAnchor=!1,x},render:(c,y,p)=>n(c.tag,Fn({key:p.key},c.attrs),c.text||y(c.children,p))},[I.htmlSelfClosing]:{match:Qr(du),order:1,parse(c){const y=c[1].trim();return{attrs:i(y,c[2]||""),tag:y}},render:(c,y,p)=>n(c.tag,Fn({},c.attrs,{key:p.key}))},[I.htmlComment]:{match:Qr($y),order:1,parse:()=>({}),render:ja},[I.image]:{match:nn(aT),order:1,parse:c=>({alt:c[1],target:yh(c[2]),title:c[3]}),render:(c,y,p)=>n("img",{key:p.key,alt:c.alt||void 0,title:c.title||void 0,src:t.sanitizer(c.target,"img","src")})},[I.link]:{match:tn(sT),order:3,parse:(c,y,p)=>({children:hT(y,c[1],p),target:yh(c[2]),title:c[3]}),render:(c,y,p)=>n("a",{key:p.key,href:t.sanitizer(c.target,"a","href"),title:c.title},y(c.children,p))},[I.linkAngleBraceStyleDetector]:{match:tn(Mx),order:0,parse:c=>({children:[{text:c[1],type:I.text}],target:c[1],type:I.link})},[I.linkBareUrlDetector]:{match:(c,y)=>y.inAnchor?null:tn(Dx)(c,y),order:0,parse:c=>({children:[{text:c[1],type:I.text}],target:c[1],title:void 0,type:I.link})},[I.linkMailtoDetector]:{match:tn(Fx),order:0,parse(c){let y=c[1],p=c[1];return vx.test(p)||(p="mailto:"+p),{children:[{text:y.replace("mailto:",""),type:I.text}],target:p,type:I.link}}},[I.orderedList]:ph(n,1),[I.unorderedList]:ph(n,2),[I.newlineCoalescer]:{match:Bt(xx),order:3,parse:Ba,render:()=>`
|
|
89
89
|
`},[I.paragraph]:{match:fT,order:3,parse:La,render:(c,y,p)=>n("p",{key:p.key},y(c.children,p))},[I.ref]:{match:tn(Bx),order:0,parse:c=>(s[c[1]]={target:c[2],title:c[4]},{}),render:ja},[I.refImage]:{match:nn(jx),order:0,parse:c=>({alt:c[1]||void 0,ref:c[2]}),render:(c,y,p)=>s[c.ref]?n("img",{key:p.key,alt:c.alt,src:t.sanitizer(s[c.ref].target,"img","src"),title:s[c.ref].title}):null},[I.refLink]:{match:tn(zx),order:0,parse:(c,y,p)=>({children:y(c[1],p),fallbackChildren:y(c[0].replace(Ux,"\\$1"),p),ref:c[2]}),render:(c,y,p)=>s[c.ref]?n("a",{key:p.key,href:t.sanitizer(s[c.ref].target,"a","href"),title:s[c.ref].title},y(c.children,p)):n("span",{key:p.key},y(c.fallbackChildren,p))},[I.table]:{match:Bt(Hy),order:1,parse:cT,render(c,y,p){const E=c;return n("table",{key:p.key},n("thead",null,n("tr",null,E.header.map(function(S,g){return n("th",{key:g,style:gh(E,g)},y(S,p))}))),n("tbody",null,E.cells.map(function(S,g){return n("tr",{key:g},S.map(function(d,m){return n("td",{key:m,style:gh(E,m)},y(d,p))}))})))}},[I.text]:{match:Qr(Jx),order:4,parse:c=>({text:c[0].replace(Ax,(y,p)=>t.namedCodesToUnicode[p]?t.namedCodesToUnicode[p]:y)}),render:c=>c.text},[I.textBolded]:{match:nn(Xx),order:2,parse:(c,y,p)=>({children:y(c[2],p)}),render:(c,y,p)=>n("strong",{key:p.key},y(c.children,p))},[I.textEmphasized]:{match:nn(Qx),order:3,parse:(c,y,p)=>({children:y(c[2],p)}),render:(c,y,p)=>n("em",{key:p.key},y(c.children,p))},[I.textEscaped]:{match:nn(Zx),order:1,parse:c=>({text:c[1],type:I.text})},[I.textMarked]:{match:nn(Kx),order:3,parse:La,render:(c,y,p)=>n("mark",{key:p.key},y(c.children,p))},[I.textStrikethroughed]:{match:nn(Yx),order:3,parse:La,render:(c,y,p)=>n("del",{key:p.key},y(c.children,p))}};t.disableParsingRawHTML===!0&&(delete a[I.htmlBlock],delete a[I.htmlSelfClosing]);const l=function(c){let y=Object.keys(c);function p(E,S){let g=[],d="";for(;E;){let m=0;for(;m<y.length;){const _=y[m],w=c[_],b=w.match(E,S,d);if(b){const x=b[0];E=E.substring(x.length);const T=w.parse(b,p,S);T.type==null&&(T.type=_),g.push(T),d=x;break}m++}}return g}return y.sort(function(E,S){let g=c[E].order,d=c[S].order;return g!==d?g-d:E<S?-1:1}),function(E,S){return p(function(g){return g.replace(Tx,`
|
|
90
|
-
`).replace(Ox,"").replace(Hx," ")}(E),S)}}(a),u=(f=function(c,y){return function(p,E,S){const g=c[p.type].render;return y?y(()=>g(p,E,S),p,E,S):g(p,E,S)}}(a,t.renderRule),function c(y,p={}){if(Array.isArray(y)){const E=p.key,S=[];let g=!1;for(let d=0;d<y.length;d++){p.key=d;const m=c(y[d],p),_=typeof m=="string";_&&g?S[S.length-1]+=m:m!==null&&S.push(m),g=_}return p.key=E,S}return f(y,c,p)});var f;const h=r(e);return o.length?n("div",null,h,n("footer",{key:"footer"},o.map(function(c){return n("div",{id:t.slugify(c.identifier,go),key:c.identifier},c.identifier,u(l(c.footnote,{inline:!0})))}))):h}const vn=e=>{let{children:t="",options:n}=e,r=function(i,o){if(i==null)return{};var s,a,l={},u=Object.keys(i);for(a=0;a<u.length;a++)o.indexOf(s=u[a])>=0||(l[s]=i[s]);return l}(e,mx);return R.cloneElement(gT(t,n),r)};var tv={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},vh=yt.createContext&&yt.createContext(tv),yT=["attr","size","title"];function vT(e,t){if(e==null)return{};var n=_T(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _T(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gs(){return gs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gs.apply(this,arguments)}function _h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ys(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_h(Object(n),!0).forEach(function(r){ET(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_h(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ET(e,t,n){return t=ST(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ST(e){var t=wT(e,"string");return typeof t=="symbol"?t:t+""}function wT(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nv(e){return e&&e.map((t,n)=>yt.createElement(t.tag,ys({key:n},t.attr),nv(t.child)))}function rv(e){return t=>yt.createElement(bT,gs({attr:ys({},e.attr)},t),nv(e.child))}function bT(e){var t=n=>{var{attr:r,size:i,title:o}=e,s=vT(e,yT),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),yt.createElement("svg",gs({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:ys(ys({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&yt.createElement("title",null,o),e.children)};return vh!==void 0?yt.createElement(vh.Consumer,null,n=>t(n)):t(tv)}function xT(e){return rv({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z"},child:[]}]})(e)}function TT(e){return rv({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M177 159.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 255.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 329.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1z"},child:[]}]})(e)}const CT="_generalConditionsContainer_1ijeb_1",kT="_generalConditions_1ijeb_1",OT="_generalConditionsHeader_1ijeb_15",RT="_generalConditionsBody_1ijeb_25",NT="_generalConditionsAccept_1ijeb_33",Kr={generalConditionsContainer:CT,generalConditions:kT,generalConditionsHeader:OT,generalConditionsBody:RT,generalConditionsAccept:NT},AT="general-conditions.header",PT="general-conditions.body",Eh="general-conditions.accept-conditions-note",IT=()=>{const e=lt(),[t,n]=R.useState(!1),r=()=>n(!t),i=a=>{a.key==="ArrowDown"||a.key==="ArrowRight"?n(!0):a.key==="ArrowUp"||a.key==="ArrowLeft"||a.key==="Escape"?n(!1):(a.key==="Enter"||a.key==="Space"||a.key===" ")&&r()},o=e(AT),s=e(Eh);return v.jsxs("div",{className:k(Kr.generalConditionsContainer,"chat__generalConditions"),children:[!!(o!=null&&o.length)&&v.jsxs("div",{className:Kr.generalConditions,children:[v.jsxs("div",{role:"button",onClick:r,onKeyDown:i,tabIndex:0,className:k(Kr.generalConditionsHeader,"chat__generalConditions__header"),"aria-controls":"general-conditions-body","aria-expanded":t?"true":"false","aria-pressed":t?"true":"false",children:[v.jsx(vn,{children:o}),t?v.jsx(TT,{}):v.jsx(xT,{})]}),v.jsx("div",{className:k(Kr.generalConditionsBody,"chat__generalConditions__body"),id:"general-conditions-body",role:"region",tabIndex:-1,children:t&&v.jsx(vn,{children:e(PT)||""})})]}),!!(s!=null&&s.length)&&v.jsx("div",{className:k(Kr.generalConditionsAccept,"chat__generalConditions__accept"),tabIndex:0,children:v.jsx(vn,{children:e(Eh)||""})})]})},DT="_message_1exlf_5",FT="_messageBot_1exlf_11",MT="_messageBotLast_1exlf_15",LT="_avatar_1exlf_15",BT="_messageBotFirst_1exlf_19",jT="_messageBotAnimated_1exlf_32",zT="_fadeInLeft_1exlf_1",UT="_messageGuest_1exlf_43",$T="_messageGuestFirst_1exlf_49",HT="_messageGuestLast_1exlf_55",GT="_botAvatar_1exlf_69",VT="_agentAvatar_1exlf_73",WT="_bubble_1exlf_77",qT="_bubbleContent_1exlf_83",XT="_bubbleLeft_1exlf_174",QT="_leftText_1exlf_183",KT="_bubbleRight_1exlf_190",YT="_rightText_1exlf_198",B={message:DT,messageBot:FT,messageBotLast:MT,avatar:LT,messageBotFirst:BT,messageBotAnimated:jT,fadeInLeft:zT,messageGuest:UT,messageGuestFirst:$T,messageGuestLast:HT,botAvatar:GT,agentAvatar:VT,bubble:WT,bubbleContent:qT,bubbleLeft:XT,leftText:QT,bubbleRight:KT,rightText:YT},ZT="_problemReport_j3gru_1",JT="_problemReportIcon_j3gru_7",eC="_problemReportIconActive_j3gru_13",tC="_problemReportIconInactive_j3gru_21",Yr={problemReport:ZT,problemReportIcon:JT,problemReportIconActive:eC,problemReportIconInactive:tC},nC=({reported:e,onReport:t})=>{const n=lt(),r=o=>()=>t(o),i=o=>s=>{s.key==="Enter"&&t(o)};return v.jsx("div",{className:Yr.problemReport,children:e?v.jsx("div",{role:"button",onClick:r(null),onKeyDown:i(null),tabIndex:0,className:k(Yr.problemReportIcon,"chat__problemReportIcon","chat_problemReportIcon",Yr.problemReportIconActive,"chat__problemReportIcon-active","chat_problemReportIcon-active"),children:v.jsx("img",{src:"problem-report-active.svg",title:n("problem-report.action.unmark"),alt:"Report"})}):v.jsx("div",{role:"button",onClick:r("unspecified"),onKeyDown:i("unspecified"),tabIndex:0,className:k(Yr.problemReportIcon,"chat_problemReportIcon",Yr.problemReportIconInactive,"chat_problemReportIcon-inactive"),"aria-label":n("problem-report.action.mark"),"data-title":n("problem-report.action.mark"),children:v.jsx("img",{src:"problem-report-inactive.svg",alt:"Report"})})})},iv=R.forwardRef(({message:e,problemReportingEnabled:t,isAnimated:n,isFirstMessageBySender:r,isLastMessageBySender:i,children:o,onProblemReport:s},a)=>{var f;const l=lt(),u=e.sender.type===j.UserType.BOT;return v.jsxs("li",{ref:a,className:k(B.message,B.messageBot,r&&B.messageBotFirst,i&&B.messageBotLast,"chat__bubbleContainer",n&&B.messageBotAnimated,n&&"chat__bubbleContainer--animated",u?"chat__botBubbleContainer":"chat__agentBubbleContainer",r&&"chat__bubbleContainer--first",i&&"chat__bubbleContainer--last"),children:[v.jsx("img",{className:k(B.avatar,u?B.botAvatar:B.agentAvatar,"chat__avatar",u?"chat__botAvatar":"chat__agentAvatar"),src:`${e.sender.avatar}`,alt:u?"Bot":"Agent",referrerPolicy:"no-referrer"}),v.jsx("div",{className:k(B.bubble,B.bubbleLeft,"chat__bubble",u?"chat__botBubble":"chat__agentBubble"),tabIndex:0,"aria-label":l(u?"bot-bubble.label":"agent-bubble.label"),children:v.jsx("div",{className:k(B.leftText),children:o})}),t&&s&&v.jsx(nC,{reported:!!((f=e.problemReport)!=null&&f.length),onReport:s})]})}),rC="_title_1mhh2_1",iC="_subtitle_1mhh2_6",oC="_buttons_1mhh2_11",sC="_button_1mhh2_11",aC="_imageContainer_1mhh2_33",lC="_image_1mhh2_33",uC="_video_container_1mhh2_44",cC="_video_1mhh2_44",fC="_only_1mhh2_54",Me={title:rC,subtitle:iC,buttons:oC,button:sC,imageContainer:aC,image:lC,video_container:uC,video:cC,only:fC},dC=({buttons:e,onButtonClick:t})=>v.jsx("div",{className:k(Me.buttons,"chat__bubbleButtons"),children:e.map((n,r)=>v.jsx("button",{className:k(Me.button,Ee.button,"chat__bubbleButton"),onClick:()=>t(n),children:n.title},r))});var ov={},af={},lf={};Object.defineProperty(lf,"__esModule",{value:!0});var hC=R,pC=mC(hC);function mC(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}lf.default=function(e,t,n){return pC.createElement("a",{href:e,key:n},t)};var uf={};Object.defineProperty(uf,"__esModule",{value:!0});uf.default=function(e){return e};var cf={},Ua,Sh;function gC(){return Sh||(Sh=1,Ua=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),Ua}var $a,wh;function yC(){return wh||(wh=1,$a=/[\0-\x1F\x7F-\x9F]/),$a}var Ha,bh;function vC(){return bh||(bh=1,Ha=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),Ha}var Ga,xh;function _C(){return xh||(xh=1,Ga=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/),Ga}var Va,Th;function EC(){return Th||(Th=1,Va=function(e){var t={};t.src_Any=gC().source,t.src_Cc=yC().source,t.src_Z=vC().source,t.src_P=_C().source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}),Va}function hu(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Ks(e){return Object.prototype.toString.call(e)}function SC(e){return Ks(e)==="[object String]"}function wC(e){return Ks(e)==="[object Object]"}function bC(e){return Ks(e)==="[object RegExp]"}function Ch(e){return Ks(e)==="[object Function]"}function xC(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var sv={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function TC(e){return Object.keys(e||{}).reduce(function(t,n){return t||sv.hasOwnProperty(n)},!1)}var CC={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},kC="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",OC="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function RC(e){e.__index__=-1,e.__text_cache__=""}function NC(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function kh(){return function(e,t){t.normalize(e)}}function vs(e){var t=e.re=EC()(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(kC),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");var i=[];e.__compiled__={};function o(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(e.__schemas__).forEach(function(a){var l=e.__schemas__[a];if(l!==null){var u={validate:null,link:null};if(e.__compiled__[a]=u,wC(l)){bC(l.validate)?u.validate=NC(l.validate):Ch(l.validate)?u.validate=l.validate:o(a,l),Ch(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=kh();return}if(SC(l)){i.push(a);return}o(a,l)}}),i.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:kh()};var s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(xC).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),RC(e)}function AC(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function Oh(e,t){var n=new AC(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function ot(e,t){if(!(this instanceof ot))return new ot(e,t);t||TC(e)&&(t=e,e={}),this.__opts__=hu({},sv,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=hu({},CC,e),this.__compiled__={},this.__tlds__=OC,this.__tlds_replaced__=!1,this.re={},vs(this)}ot.prototype.add=function(t,n){return this.__schemas__[t]=n,vs(this),this};ot.prototype.set=function(t){return this.__opts__=hu(this.__opts__,t),this};ot.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var n,r,i,o,s,a,l,u,f;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],l.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=r.index+r[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(f=t.indexOf("@"),f>=0&&(i=t.match(this.re.email_fuzzy))!==null&&(s=i.index+i[1].length,a=i.index+i[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0};ot.prototype.pretest=function(t){return this.re.pretest.test(t)};ot.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};ot.prototype.match=function(t){var n=0,r=[];this.__index__>=0&&this.__text_cache__===t&&(r.push(Oh(this,n)),n=this.__last_index__);for(var i=n?t.slice(n):t;this.test(i);)r.push(Oh(this,n)),i=i.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null};ot.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),vs(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,vs(this),this)};ot.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};ot.prototype.onCompile=function(){};var PC=ot;const IC=["aaa","aarp","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","actor","ad","ads","adult","ae","aeg","aero","aetna","af","afl","africa","ag","agakhan","agency","ai","aig","airbus","airforce","airtel","akdn","al","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","cash","casino","cat","catering","catholic","cba","cbn","cbre","cbs","cc","cd","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cool","coop","corsica","country","coupon","coupons","courses","cpa","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","dunlop","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","er","ericsson","erni","es","esq","estate","et","etisalat","eu","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","guardian","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","inc","industries","infiniti","info","ing","ink","institute","insurance","insure","int","international","intuit","investments","io","ipiranga","iq","ir","irish","is","ismaili","ist","istanbul","it","itau","itv","jaguar","java","jcb","je","jeep","jetzt","jewelry","jio","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerrylogistics","kerryproperties","kfh","kg","kh","ki","kia","kids","kim","kinder","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","lamborghini","lamer","lancaster","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","link","lipsy","live","living","lk","llc","llp","loan","loans","locker","locus","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","luxe","luxury","lv","ly","ma","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","music","mv","mw","mx","my","mz","na","nab","nagoya","name","natura","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","office","okinawa","olayan","olayangroup","oldnavy","ollo","om","omega","one","ong","onl","online","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","paris","pars","partners","parts","party","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","pramerica","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","racing","radio","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","ril","rio","rip","ro","rocher","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sb","sbi","sbs","sc","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scot","sd","se","search","seat","secure","security","seek","select","sener","services","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","sr","srl","ss","st","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiss","sx","sy","sydney","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","vermögensberater","vermögensberatung","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vn","vodka","volkswagen","volvo","vote","voting","voto","voyage","vu","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zm","zone","zuerich","zw","ελ","ευ","бг","бел","дети","ею","католик","ком","мкд","мон","москва","онлайн","орг","рус","рф","сайт","срб","укр","қаз","հայ","ישראל","קום","ابوظبي","اتصالات","ارامكو","الاردن","البحرين","الجزائر","السعودية","العليان","المغرب","امارات","ایران","بارت","بازار","بيتك","بھارت","تونس","سودان","سورية","شبكة","عراق","عرب","عمان","فلسطين","قطر","كاثوليك","كوم","مصر","مليسيا","موريتانيا","موقع","همراه","پاکستان","ڀارت","कॉम","नेट","भारत","भारतम्","भारोत","संगठन","বাংলা","ভারত","ভাৰত","ਭਾਰਤ","ભારત","ଭାରତ","இந்தியா","இலங்கை","சிங்கப்பூர்","భారత్","ಭಾರತ","ഭാരതം","ලංකා","คอม","ไทย","ລາວ","გე","みんな","アマゾン","クラウド","グーグル","コム","ストア","セール","ファッション","ポイント","世界","中信","中国","中國","中文网","亚马逊","企业","佛山","信息","健康","八卦","公司","公益","台湾","台灣","商城","商店","商标","嘉里","嘉里大酒店","在线","大拿","天主教","娱乐","家電","广东","微博","慈善","我爱你","手机","招聘","政务","政府","新加坡","新闻","时尚","書籍","机构","淡马锡","游戏","澳門","点看","移动","组织机构","网址","网店","网站","网络","联通","谷歌","购物","通販","集团","電訊盈科","飞利浦","食品","餐厅","香格里拉","香港","닷넷","닷컴","삼성","한국"];Object.defineProperty(cf,"__esModule",{value:!0});var DC=PC,FC=av(DC),MC=IC,LC=av(MC);function av(e){return e&&e.__esModule?e:{default:e}}var lv=new FC.default;lv.tlds(LC.default);cf.default=function(e){return lv.match(e)};var ff={};Object.defineProperty(ff,"__esModule",{value:!0});ff.default=function(e){return e};Object.defineProperty(af,"__esModule",{value:!0});var BC=function(){function e(t,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),jC=R,Zr=XC(jC),zC=lf,UC=Ys(zC),$C=uf,HC=Ys($C),GC=cf,VC=Ys(GC),WC=ff,qC=Ys(WC);function Ys(e){return e&&e.__esModule?e:{default:e}}function XC(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function QC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KC(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function YC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var uv=function(e){YC(t,e);function t(){return QC(this,t),KC(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return BC(t,[{key:"parseString",value:function(r){var i=this;if(r==="")return r;var o=this.props.matchDecorator(r);if(!o)return r;var s=[],a=0;return o.forEach(function(l,u){l.index>a&&s.push(r.substring(a,l.index));var f=i.props.hrefDecorator(l.url),h=i.props.textDecorator(l.text),c=i.props.componentDecorator(f,h,u);s.push(c),a=l.lastIndex}),r.length>a&&s.push(r.substring(a)),s.length===1?s[0]:s}},{key:"parse",value:function(r){var i=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof r=="string"?this.parseString(r):Zr.isValidElement(r)&&r.type!=="a"&&r.type!=="button"?Zr.cloneElement(r,{key:o},this.parse(r.props.children)):Array.isArray(r)?r.map(function(s,a){return i.parse(s,a)}):r}},{key:"render",value:function(){return Zr.createElement(Zr.Fragment,null,this.parse(this.props.children))}}]),t}(Zr.Component);uv.defaultProps={componentDecorator:UC.default,hrefDecorator:HC.default,matchDecorator:VC.default,textDecorator:qC.default};af.default=uv;Object.defineProperty(ov,"__esModule",{value:!0});var ZC=af,JC=ek(ZC);function ek(e){return e&&e.__esModule?e:{default:e}}var tk=ov.default=JC.default;const nk="_text_1k7aq_1",rk={text:nk},cv=({text:e,onLinkClick:t})=>{const n=i=>o=>(o.preventDefault(),i&&t(i),!1),r=(i,o,s)=>v.jsx("a",{onClick:n(i),role:"button",children:o},s);return v.jsx("div",{children:e.split(`
|
|
90
|
+
`).replace(Ox,"").replace(Hx," ")}(E),S)}}(a),u=(f=function(c,y){return function(p,E,S){const g=c[p.type].render;return y?y(()=>g(p,E,S),p,E,S):g(p,E,S)}}(a,t.renderRule),function c(y,p={}){if(Array.isArray(y)){const E=p.key,S=[];let g=!1;for(let d=0;d<y.length;d++){p.key=d;const m=c(y[d],p),_=typeof m=="string";_&&g?S[S.length-1]+=m:m!==null&&S.push(m),g=_}return p.key=E,S}return f(y,c,p)});var f;const h=r(e);return o.length?n("div",null,h,n("footer",{key:"footer"},o.map(function(c){return n("div",{id:t.slugify(c.identifier,go),key:c.identifier},c.identifier,u(l(c.footnote,{inline:!0})))}))):h}const vn=e=>{let{children:t="",options:n}=e,r=function(i,o){if(i==null)return{};var s,a,l={},u=Object.keys(i);for(a=0;a<u.length;a++)o.indexOf(s=u[a])>=0||(l[s]=i[s]);return l}(e,mx);return R.cloneElement(gT(t,n),r)};var tv={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},vh=yt.createContext&&yt.createContext(tv),yT=["attr","size","title"];function vT(e,t){if(e==null)return{};var n=_T(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _T(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gs(){return gs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gs.apply(this,arguments)}function _h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ys(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_h(Object(n),!0).forEach(function(r){ET(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_h(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ET(e,t,n){return t=ST(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ST(e){var t=wT(e,"string");return typeof t=="symbol"?t:t+""}function wT(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nv(e){return e&&e.map((t,n)=>yt.createElement(t.tag,ys({key:n},t.attr),nv(t.child)))}function rv(e){return t=>yt.createElement(bT,gs({attr:ys({},e.attr)},t),nv(e.child))}function bT(e){var t=n=>{var{attr:r,size:i,title:o}=e,s=vT(e,yT),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),yt.createElement("svg",gs({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:ys(ys({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&yt.createElement("title",null,o),e.children)};return vh!==void 0?yt.createElement(vh.Consumer,null,n=>t(n)):t(tv)}function xT(e){return rv({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z"},child:[]}]})(e)}function TT(e){return rv({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M177 159.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 255.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 329.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1z"},child:[]}]})(e)}const CT="_generalConditionsContainer_1ijeb_1",kT="_generalConditions_1ijeb_1",OT="_generalConditionsHeader_1ijeb_15",RT="_generalConditionsBody_1ijeb_25",NT="_generalConditionsAccept_1ijeb_33",Kr={generalConditionsContainer:CT,generalConditions:kT,generalConditionsHeader:OT,generalConditionsBody:RT,generalConditionsAccept:NT},AT="general-conditions.header",PT="general-conditions.body",Eh="general-conditions.accept-conditions-note",IT=()=>{const e=lt(),[t,n]=R.useState(!1),r=()=>n(!t),i=a=>{a.key==="ArrowDown"||a.key==="ArrowRight"?n(!0):a.key==="ArrowUp"||a.key==="ArrowLeft"||a.key==="Escape"?n(!1):(a.key==="Enter"||a.key==="Space"||a.key===" ")&&r()},o=e(AT),s=e(Eh);return v.jsxs("div",{className:k(Kr.generalConditionsContainer,"chat__generalConditions"),children:[!!(o!=null&&o.length)&&v.jsxs("div",{className:Kr.generalConditions,children:[v.jsxs("div",{role:"button",onClick:r,onKeyDown:i,tabIndex:0,className:k(Kr.generalConditionsHeader,"chat__generalConditions__header"),"aria-controls":"general-conditions-body","aria-expanded":t?"true":"false","aria-pressed":t?"true":"false",children:[v.jsx(vn,{children:o}),t?v.jsx(TT,{}):v.jsx(xT,{})]}),v.jsx("div",{className:k(Kr.generalConditionsBody,"chat__generalConditions__body"),id:"general-conditions-body",role:"region",tabIndex:-1,children:t&&v.jsx(vn,{children:e(PT)||""})})]}),!!(s!=null&&s.length)&&v.jsx("div",{className:k(Kr.generalConditionsAccept,"chat__generalConditions__accept"),tabIndex:0,children:v.jsx(vn,{children:e(Eh)||""})})]})},DT="_message_5noj3_5",FT="_messageBot_5noj3_11",MT="_messageBotLast_5noj3_15",LT="_avatar_5noj3_15",BT="_messageBotFirst_5noj3_19",jT="_messageBotAnimated_5noj3_32",zT="_fadeInLeft_5noj3_1",UT="_messageGuest_5noj3_43",$T="_messageGuestFirst_5noj3_49",HT="_messageGuestLast_5noj3_55",GT="_botAvatar_5noj3_69",VT="_agentAvatar_5noj3_73",WT="_bubble_5noj3_77",qT="_bubbleContent_5noj3_83",XT="_bubbleLeft_5noj3_186",QT="_leftText_5noj3_195",KT="_bubbleRight_5noj3_202",YT="_rightText_5noj3_210",B={message:DT,messageBot:FT,messageBotLast:MT,avatar:LT,messageBotFirst:BT,messageBotAnimated:jT,fadeInLeft:zT,messageGuest:UT,messageGuestFirst:$T,messageGuestLast:HT,botAvatar:GT,agentAvatar:VT,bubble:WT,bubbleContent:qT,bubbleLeft:XT,leftText:QT,bubbleRight:KT,rightText:YT},ZT="_problemReport_j3gru_1",JT="_problemReportIcon_j3gru_7",eC="_problemReportIconActive_j3gru_13",tC="_problemReportIconInactive_j3gru_21",Yr={problemReport:ZT,problemReportIcon:JT,problemReportIconActive:eC,problemReportIconInactive:tC},nC=({reported:e,onReport:t})=>{const n=lt(),r=o=>()=>t(o),i=o=>s=>{s.key==="Enter"&&t(o)};return v.jsx("div",{className:Yr.problemReport,children:e?v.jsx("div",{role:"button",onClick:r(null),onKeyDown:i(null),tabIndex:0,className:k(Yr.problemReportIcon,"chat__problemReportIcon","chat_problemReportIcon",Yr.problemReportIconActive,"chat__problemReportIcon-active","chat_problemReportIcon-active"),children:v.jsx("img",{src:"problem-report-active.svg",title:n("problem-report.action.unmark"),alt:"Report"})}):v.jsx("div",{role:"button",onClick:r("unspecified"),onKeyDown:i("unspecified"),tabIndex:0,className:k(Yr.problemReportIcon,"chat_problemReportIcon",Yr.problemReportIconInactive,"chat_problemReportIcon-inactive"),"aria-label":n("problem-report.action.mark"),"data-title":n("problem-report.action.mark"),children:v.jsx("img",{src:"problem-report-inactive.svg",alt:"Report"})})})},iv=R.forwardRef(({message:e,problemReportingEnabled:t,isAnimated:n,isFirstMessageBySender:r,isLastMessageBySender:i,children:o,onProblemReport:s},a)=>{var f;const l=lt(),u=e.sender.type===j.UserType.BOT;return v.jsxs("li",{ref:a,className:k(B.message,B.messageBot,r&&B.messageBotFirst,i&&B.messageBotLast,"chat__bubbleContainer",n&&B.messageBotAnimated,n&&"chat__bubbleContainer--animated",u?"chat__botBubbleContainer":"chat__agentBubbleContainer",r&&"chat__bubbleContainer--first",i&&"chat__bubbleContainer--last"),children:[v.jsx("img",{className:k(B.avatar,u?B.botAvatar:B.agentAvatar,"chat__avatar",u?"chat__botAvatar":"chat__agentAvatar"),src:`${e.sender.avatar}`,alt:u?"Bot":"Agent",referrerPolicy:"no-referrer"}),v.jsx("div",{className:k(B.bubble,B.bubbleLeft,"chat__bubble",u?"chat__botBubble":"chat__agentBubble"),tabIndex:0,"aria-label":l(u?"bot-bubble.label":"agent-bubble.label"),children:v.jsx("div",{className:k(B.leftText),children:o})}),t&&s&&v.jsx(nC,{reported:!!((f=e.problemReport)!=null&&f.length),onReport:s})]})}),rC="_title_1mhh2_1",iC="_subtitle_1mhh2_6",oC="_buttons_1mhh2_11",sC="_button_1mhh2_11",aC="_imageContainer_1mhh2_33",lC="_image_1mhh2_33",uC="_video_container_1mhh2_44",cC="_video_1mhh2_44",fC="_only_1mhh2_54",Me={title:rC,subtitle:iC,buttons:oC,button:sC,imageContainer:aC,image:lC,video_container:uC,video:cC,only:fC},dC=({buttons:e,onButtonClick:t})=>v.jsx("div",{className:k(Me.buttons,"chat__bubbleButtons"),children:e.map((n,r)=>v.jsx("button",{className:k(Me.button,Ee.button,"chat__bubbleButton"),onClick:()=>t(n),children:n.title},r))});var ov={},af={},lf={};Object.defineProperty(lf,"__esModule",{value:!0});var hC=R,pC=mC(hC);function mC(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}lf.default=function(e,t,n){return pC.createElement("a",{href:e,key:n},t)};var uf={};Object.defineProperty(uf,"__esModule",{value:!0});uf.default=function(e){return e};var cf={},Ua,Sh;function gC(){return Sh||(Sh=1,Ua=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),Ua}var $a,wh;function yC(){return wh||(wh=1,$a=/[\0-\x1F\x7F-\x9F]/),$a}var Ha,bh;function vC(){return bh||(bh=1,Ha=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),Ha}var Ga,xh;function _C(){return xh||(xh=1,Ga=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/),Ga}var Va,Th;function EC(){return Th||(Th=1,Va=function(e){var t={};t.src_Any=gC().source,t.src_Cc=yC().source,t.src_Z=vC().source,t.src_P=_C().source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}),Va}function hu(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Ks(e){return Object.prototype.toString.call(e)}function SC(e){return Ks(e)==="[object String]"}function wC(e){return Ks(e)==="[object Object]"}function bC(e){return Ks(e)==="[object RegExp]"}function Ch(e){return Ks(e)==="[object Function]"}function xC(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var sv={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function TC(e){return Object.keys(e||{}).reduce(function(t,n){return t||sv.hasOwnProperty(n)},!1)}var CC={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},kC="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",OC="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function RC(e){e.__index__=-1,e.__text_cache__=""}function NC(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function kh(){return function(e,t){t.normalize(e)}}function vs(e){var t=e.re=EC()(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(kC),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");var i=[];e.__compiled__={};function o(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(e.__schemas__).forEach(function(a){var l=e.__schemas__[a];if(l!==null){var u={validate:null,link:null};if(e.__compiled__[a]=u,wC(l)){bC(l.validate)?u.validate=NC(l.validate):Ch(l.validate)?u.validate=l.validate:o(a,l),Ch(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=kh();return}if(SC(l)){i.push(a);return}o(a,l)}}),i.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:kh()};var s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(xC).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),RC(e)}function AC(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function Oh(e,t){var n=new AC(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function ot(e,t){if(!(this instanceof ot))return new ot(e,t);t||TC(e)&&(t=e,e={}),this.__opts__=hu({},sv,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=hu({},CC,e),this.__compiled__={},this.__tlds__=OC,this.__tlds_replaced__=!1,this.re={},vs(this)}ot.prototype.add=function(t,n){return this.__schemas__[t]=n,vs(this),this};ot.prototype.set=function(t){return this.__opts__=hu(this.__opts__,t),this};ot.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var n,r,i,o,s,a,l,u,f;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],l.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=r.index+r[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(f=t.indexOf("@"),f>=0&&(i=t.match(this.re.email_fuzzy))!==null&&(s=i.index+i[1].length,a=i.index+i[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0};ot.prototype.pretest=function(t){return this.re.pretest.test(t)};ot.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};ot.prototype.match=function(t){var n=0,r=[];this.__index__>=0&&this.__text_cache__===t&&(r.push(Oh(this,n)),n=this.__last_index__);for(var i=n?t.slice(n):t;this.test(i);)r.push(Oh(this,n)),i=i.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null};ot.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),vs(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,vs(this),this)};ot.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};ot.prototype.onCompile=function(){};var PC=ot;const IC=["aaa","aarp","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","actor","ad","ads","adult","ae","aeg","aero","aetna","af","afl","africa","ag","agakhan","agency","ai","aig","airbus","airforce","airtel","akdn","al","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","cash","casino","cat","catering","catholic","cba","cbn","cbre","cbs","cc","cd","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cool","coop","corsica","country","coupon","coupons","courses","cpa","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","dunlop","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","er","ericsson","erni","es","esq","estate","et","etisalat","eu","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","guardian","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","inc","industries","infiniti","info","ing","ink","institute","insurance","insure","int","international","intuit","investments","io","ipiranga","iq","ir","irish","is","ismaili","ist","istanbul","it","itau","itv","jaguar","java","jcb","je","jeep","jetzt","jewelry","jio","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerrylogistics","kerryproperties","kfh","kg","kh","ki","kia","kids","kim","kinder","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","lamborghini","lamer","lancaster","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","link","lipsy","live","living","lk","llc","llp","loan","loans","locker","locus","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","luxe","luxury","lv","ly","ma","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","music","mv","mw","mx","my","mz","na","nab","nagoya","name","natura","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","office","okinawa","olayan","olayangroup","oldnavy","ollo","om","omega","one","ong","onl","online","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","paris","pars","partners","parts","party","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","pramerica","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","racing","radio","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","ril","rio","rip","ro","rocher","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sb","sbi","sbs","sc","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scot","sd","se","search","seat","secure","security","seek","select","sener","services","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","sr","srl","ss","st","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiss","sx","sy","sydney","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","vermögensberater","vermögensberatung","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vn","vodka","volkswagen","volvo","vote","voting","voto","voyage","vu","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zm","zone","zuerich","zw","ελ","ευ","бг","бел","дети","ею","католик","ком","мкд","мон","москва","онлайн","орг","рус","рф","сайт","срб","укр","қаз","հայ","ישראל","קום","ابوظبي","اتصالات","ارامكو","الاردن","البحرين","الجزائر","السعودية","العليان","المغرب","امارات","ایران","بارت","بازار","بيتك","بھارت","تونس","سودان","سورية","شبكة","عراق","عرب","عمان","فلسطين","قطر","كاثوليك","كوم","مصر","مليسيا","موريتانيا","موقع","همراه","پاکستان","ڀارت","कॉम","नेट","भारत","भारतम्","भारोत","संगठन","বাংলা","ভারত","ভাৰত","ਭਾਰਤ","ભારત","ଭାରତ","இந்தியா","இலங்கை","சிங்கப்பூர்","భారత్","ಭಾರತ","ഭാരതം","ලංකා","คอม","ไทย","ລາວ","გე","みんな","アマゾン","クラウド","グーグル","コム","ストア","セール","ファッション","ポイント","世界","中信","中国","中國","中文网","亚马逊","企业","佛山","信息","健康","八卦","公司","公益","台湾","台灣","商城","商店","商标","嘉里","嘉里大酒店","在线","大拿","天主教","娱乐","家電","广东","微博","慈善","我爱你","手机","招聘","政务","政府","新加坡","新闻","时尚","書籍","机构","淡马锡","游戏","澳門","点看","移动","组织机构","网址","网店","网站","网络","联通","谷歌","购物","通販","集团","電訊盈科","飞利浦","食品","餐厅","香格里拉","香港","닷넷","닷컴","삼성","한국"];Object.defineProperty(cf,"__esModule",{value:!0});var DC=PC,FC=av(DC),MC=IC,LC=av(MC);function av(e){return e&&e.__esModule?e:{default:e}}var lv=new FC.default;lv.tlds(LC.default);cf.default=function(e){return lv.match(e)};var ff={};Object.defineProperty(ff,"__esModule",{value:!0});ff.default=function(e){return e};Object.defineProperty(af,"__esModule",{value:!0});var BC=function(){function e(t,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),jC=R,Zr=XC(jC),zC=lf,UC=Ys(zC),$C=uf,HC=Ys($C),GC=cf,VC=Ys(GC),WC=ff,qC=Ys(WC);function Ys(e){return e&&e.__esModule?e:{default:e}}function XC(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function QC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KC(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function YC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var uv=function(e){YC(t,e);function t(){return QC(this,t),KC(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return BC(t,[{key:"parseString",value:function(r){var i=this;if(r==="")return r;var o=this.props.matchDecorator(r);if(!o)return r;var s=[],a=0;return o.forEach(function(l,u){l.index>a&&s.push(r.substring(a,l.index));var f=i.props.hrefDecorator(l.url),h=i.props.textDecorator(l.text),c=i.props.componentDecorator(f,h,u);s.push(c),a=l.lastIndex}),r.length>a&&s.push(r.substring(a)),s.length===1?s[0]:s}},{key:"parse",value:function(r){var i=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof r=="string"?this.parseString(r):Zr.isValidElement(r)&&r.type!=="a"&&r.type!=="button"?Zr.cloneElement(r,{key:o},this.parse(r.props.children)):Array.isArray(r)?r.map(function(s,a){return i.parse(s,a)}):r}},{key:"render",value:function(){return Zr.createElement(Zr.Fragment,null,this.parse(this.props.children))}}]),t}(Zr.Component);uv.defaultProps={componentDecorator:UC.default,hrefDecorator:HC.default,matchDecorator:VC.default,textDecorator:qC.default};af.default=uv;Object.defineProperty(ov,"__esModule",{value:!0});var ZC=af,JC=ek(ZC);function ek(e){return e&&e.__esModule?e:{default:e}}var tk=ov.default=JC.default;const nk="_text_1k7aq_1",rk={text:nk},cv=({text:e,onLinkClick:t})=>{const n=i=>o=>(o.preventDefault(),i&&t(i),!1),r=(i,o,s)=>v.jsx("a",{onClick:n(i),role:"button",children:o},s);return v.jsx("div",{children:e.split(`
|
|
91
91
|
`).map((i,o)=>v.jsxs("span",{className:rk.text,children:[v.jsx(tk,{componentDecorator:r,children:i}),v.jsx("br",{})]},o))})},ik=({subtitle:e,onLinkClick:t})=>e?v.jsx("div",{className:Me.subtitle,children:v.jsx(cv,{text:e,onLinkClick:t})}):null,Rh="newtab#",fv=({markdown:e,onLinkClick:t})=>{const n=i=>o=>(o.preventDefault(),i&&t(i),!1),r=({title:i,href:o,children:s})=>o.indexOf(Rh)===0?v.jsx("a",{href:o.slice(Rh.length),title:i,target:"_blank",rel:"noopener noreferrer",children:s}):v.jsx("a",{onClick:n(o),title:i,children:s});return v.jsx(vn,{options:{overrides:{a:r}},children:e})},ok=({text:e,onLinkClick:t})=>e?v.jsx("div",{children:v.jsx(fv,{markdown:e,onLinkClick:t})}):null,sk=({title:e})=>e?v.jsx("h1",{className:Me.title,children:e}):null,ak=({title:e,text:t,subtitle:n,buttons:r,onButtonClick:i,onLinkClick:o})=>(e==null?void 0:e.length)||(t==null?void 0:t.length)||(n==null?void 0:n.length)||(r==null?void 0:r.length)?v.jsxs("div",{className:k(B.bubbleContent),children:[v.jsx(sk,{title:e}),v.jsx(ok,{text:t,onLinkClick:o}),v.jsx(ik,{subtitle:n,onLinkClick:o}),v.jsx(dC,{buttons:r,onButtonClick:i})]}):null,lk=({alt:e,imageUrl:t,itemUrl:n,hasBody:r})=>t?n?n.indexOf("youtube.com")>-1?v.jsx("div",{className:Me.video_container,children:v.jsx("iframe",{className:k(Me.video,{[Me.only]:!r}),title:"Youtube",width:"100%",src:n+"?rel=0",frameBorder:"0",allowFullScreen:!0})}):v.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:v.jsx("div",{className:Me.imageContainer,children:v.jsx("img",{className:k(Me.image,{[Me.only]:!r}),src:t,alt:e})})}):v.jsx("div",{className:Me.imageContainer,children:v.jsx("img",{className:k(Me.image,{[Me.only]:!r}),src:t,alt:e})}):null,uk=({title:e,text:t,subtitle:n,imageUrl:r,itemUrl:i,buttons:o,onButtonClick:s,onLinkClick:a})=>{const l=!!(e!=null&&e.length)||!!(t!=null&&t.length)||!!(n!=null&&n.length)||!!(o!=null&&o.length);return v.jsxs("div",{className:k(Me.detailMessage),children:[v.jsx(lk,{hasBody:l,imageUrl:r,itemUrl:i,alt:e||n}),l&&v.jsx(ak,{title:e,text:t,subtitle:n,buttons:o,onLinkClick:a,onButtonClick:s})]})},ck=R.forwardRef(({isFirstMessageBySender:e,isLastMessageBySender:t,children:n},r)=>{const i=lt();return v.jsx("li",{ref:r,className:k(B.message,B.messageGuest,e&&B.messageGuestFirst,t&&B.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer",e&&"chat__bubbleContainer--first",t&&"chat__bubbleContainer--last"),children:v.jsx("div",{className:k(B.bubble,B.bubbleRight,"chat__bubble","chat__guestBubble"),tabIndex:0,"aria-label":i("guest-bubble.label"),children:v.jsx("div",{className:k(B.rightText),children:n})})})}),fk=({markdown:e,className:t,onLinkClick:n})=>v.jsx("div",{className:k(B.bubbleContent,t),children:v.jsx(fv,{markdown:e,onLinkClick:n})}),dk=({text:e,onLinkClick:t})=>v.jsx("div",{className:B.bubbleContent,children:v.jsx(cv,{text:e,onLinkClick:t})}),hk=R.forwardRef(({message:e,problemReportingEnabled:t,isFirstMessageBySender:n,isLastMessageBySender:r,onProblemReport:i,onButtonClick:o,onLinkClick:s},a)=>{const l=pk(e,o,s);switch(e.sender.type){case j.UserType.GUEST:return v.jsx(ck,{ref:a,isFirstMessageBySender:n,isLastMessageBySender:r,children:l});default:const u=f=>i(e._id,f);return v.jsx(iv,{ref:a,message:e,problemReportingEnabled:t,isAnimated:!1,isFirstMessageBySender:n,isLastMessageBySender:r,onProblemReport:u,children:l})}}),pk=(e,t,n)=>{switch(e.type){case j.MessageTypeEnum.TEXT:const r=e;return v.jsx(dk,{text:r.text,onLinkClick:n});case j.MessageTypeEnum.DETAIL:const i=e;return v.jsx(uk,{title:i.title,text:i.text,subtitle:i.subtitle,imageUrl:i.imageUrl,itemUrl:i.itemUrl,buttons:i.buttons,onButtonClick:t,onLinkClick:n});case j.MessageTypeEnum.MARKDOWN:const o=e;return v.jsx(fk,{markdown:o.markdown,className:o.className,onLinkClick:n})}},mk=(e,t)=>e.message._id===t.message._id&&e.message.problemReport===t.message.problemReport&&e.problemReportingEnabled===t.problemReportingEnabled&&e.isFirstMessageBySender===t.isFirstMessageBySender&&e.isLastMessageBySender===t.isLastMessageBySender,gk=yt.memo(hk,mk),yk="_ticontainer_wftg7_1",vk="_tiblock_wftg7_5",_k="_tidot_wftg7_12",Ek="_mercuryTypingAnimation_wftg7_1",Jr={ticontainer:yk,tiblock:vk,tidot:_k,mercuryTypingAnimation:Ek},Sk=({isTyping:e=!1})=>v.jsx("div",{className:Jr.ticontainer,children:v.jsx("div",{className:Jr.tiblock,children:e?v.jsxs(v.Fragment,{children:[v.jsx("div",{className:k(Jr.tidot,"chat__typingIndicator")}),v.jsx("div",{className:k(Jr.tidot,"chat__typingIndicator")}),v.jsx("div",{className:k(Jr.tidot,"chat__typingIndicator")})]}):null})}),wk=Object.assign({_id:"typing-indicator"},new j.TextMessage("",new j.BotUser)),bk=({messages:e,isBotTyping:t,showGeneralConditions:n,problemReportingEnabled:r,onProblemReport:i,onButtonClick:o,onLinkClick:s})=>{const a=R.useRef(!0),l=R.useRef(null),u=R.useRef(null),f=R.useRef(null);R.useLayoutEffect(()=>{if(e.length&&l.current){if(u.current){const y=u.current.offsetTop;l.current.scrollTop=y}else if(f.current){const y=f.current.offsetTop;l.current.scrollTop=y}a.current&&(a.current=!1)}},[e,u.current,f.current,a]);let h;const c=e.length;return v.jsxs("div",{ref:l,className:k(uh.messageContainer,"chat__messageContainer"),style:{scrollBehavior:e.length&&a.current?"auto":"smooth"},id:"MessageContainer",role:"log","aria-live":"polite",children:[n&&v.jsx(IT,{}),v.jsxs("ul",{className:uh.messages,children:[e.map((y,p)=>{const E=xk(y,h),S=Tk(y,p,e,t);h=y.sender.type;const g=p+1===c;return v.jsx(gk,{ref:g?f:null,message:y,problemReportingEnabled:r,isFirstMessageBySender:E,isLastMessageBySender:S,onButtonClick:o,onLinkClick:s,onProblemReport:i},g&&!t?"last":y._id)}),t&&v.jsx(iv,{ref:u,message:wk,problemReportingEnabled:!1,isAnimated:!0,isFirstMessageBySender:h!==j.UserType.BOT,isLastMessageBySender:!0,children:v.jsx(Sk,{isTyping:!0})},"last")]})]})},xk=(e,t)=>!t||t!==e.sender.type,Tk=(e,t,n,r)=>{var a;const i=e.sender.type,o=n.length;return t+1===o?!(i===j.UserType.BOT&&r):i!==((a=n.at(t+1))==null?void 0:a.sender.type)},Ck="_bottomSheet_8itd6_1",kk="_bottomSheetOpen_8itd6_15",Ok="_bottomSheetClose_8itd6_20",Wt={bottomSheet:Ck,bottomSheetOpen:kk,"slide-in":"_slide-in_8itd6_1",bottomSheetClose:Ok,"slide-out":"_slide-out_8itd6_1"},Rk="_container_ooyn8_1",Nh={container:Rk},Nk=({contentUrl:e})=>{const t=$n(o=>o.connection.sessionId),[n,r]=R.useState(!1);R.useEffect(()=>{r(o=>o||!!e)},[e]);const i=R.useMemo(()=>{if(e&&t){const o=new URL(e);return o.searchParams.set("sessionId",t),o.toString()}else return},[e,t]);return v.jsx("div",{className:k(Nh.container,Wt.bottomSheet,{[Wt.bottomSheetOpen]:!!e,[Wt.bottomSheetClose]:n&&!e}),children:i&&v.jsx("iframe",{title:"Drawer",src:i,className:Nh.iframe})})},Ak="_container_t5oqt_1",Pk={container:Ak},Ik=({title:e,href:t,children:n})=>v.jsx("a",{href:t,title:e,target:"_blank",rel:"noopener noreferrer",children:n}),Dk=()=>{const t=lt()("powered-by");return t&&t.length?v.jsx("div",{className:k(Pk.container,"chat__poweredBy"),children:v.jsx(vn,{options:{overrides:{a:Ik}},children:t})}):null},Fk="_container_rkqaf_1",Mk="_formContainer_rkqaf_14",Lk="_emailInput_rkqaf_19",Bk="_description_rkqaf_48",jk="_actions_rkqaf_53",zk="_validationError_rkqaf_63",Uk="_submitted_rkqaf_70",jt={container:Fk,formContainer:Mk,emailInput:Lk,description:Bk,actions:jk,validationError:zk,submitted:Uk},$k=({visible:e,methods:t,onEmailExport:n,onPdfExport:r,onClose:i})=>{const o=lt(),[s,a]=R.useState(void 0),[l,u]=R.useState(!1),[f,h]=R.useState(!1),[c,y]=R.useState(void 0),p=R.useRef(null);R.useEffect(()=>{var d;e?((d=p.current)==null||d.focus(),u(!1),h(!1),a(e)):s===!0&&a(!1)},[e,s]);const E=d=>{d.preventDefault(),c&&c.length>0&&(n(c),u(!0),setTimeout(i,3*1e3))},S=d=>{const m=d.target.value.trim(),_=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(m);y(_?m:"")},g=()=>{h(!0),r(),setTimeout(i,3*1e3)};return v.jsxs("div",{className:k(jt.container,Wt.bottomSheet,{[Wt.bottomSheetOpen]:s===!0,[Wt.bottomSheetClose]:s===!1}),children:[t.pdf&&v.jsxs(v.Fragment,{children:[v.jsx("h2",{children:o("export-transcript.pdf.title")}),v.jsx(vn,{className:jt.description,children:o("export-transcript.pdf.description")||""}),v.jsxs("div",{className:jt.actions,children:[v.jsx("button",{type:"button",className:k(Ee.button,Ee.buttonDefault),onClick:i,children:o("export-transcript.pdf.cancel")}),v.jsx("button",{className:k(Ee.button,Ee.buttonPrimary),onClick:g,disabled:f,children:o("export-transcript.pdf.download")})]})]}),t.email&&v.jsxs(v.Fragment,{children:[v.jsx("h2",{children:o("export-transcript.email.title")}),v.jsx(vn,{className:jt.description,children:o("export-transcript.email.description")||""}),v.jsxs("form",{onSubmit:E,className:jt.formContainer,children:[v.jsxs("div",{children:[v.jsx("input",{disabled:l,ref:p,type:"email",placeholder:o("export-transcript.email.placeholder"),className:jt.emailInput,onChange:S}),(c==null?void 0:c.length)===0?v.jsx("div",{className:jt.validationError,children:o("export-transcript.email.invalid")}):null]}),v.jsxs("div",{className:jt.actions,children:[v.jsx("button",{type:"button",className:k(Ee.button,Ee.buttonDefault),onClick:i,children:o("export-transcript.email.cancel")}),v.jsx("button",{type:"submit",disabled:l||c===void 0||c.length===0,className:k(Ee.button,Ee.buttonPrimary),children:o("export-transcript.email.send")})]})]}),l&&v.jsx("div",{className:jt.submitted,children:o("export-transcript.email.success")})]})]})},Hk="_inputContainer_1px77_1",Gk={inputContainer:Hk},Vk="_blockUserInput_rv0dg_1",Wk={blockUserInput:Vk,"append-animate":"_append-animate_rv0dg_1"},qk=({visible:e})=>{const t=lt();return e?v.jsx("div",{className:k(Wk.blockUserInput,"chat__blockUserInput"),children:t("block-user-input.title")}):null},Xk="_callToActionContainer_czz0p_1",Qk="_callToActionTitle_czz0p_24",Kk="_rateOverlay_czz0p_31",Yk="_body_czz0p_50",Zk="_footer_czz0p_58",Jk="_actions_czz0p_73",e2="_bubbles_czz0p_85",t2="_rateFeedbackBotBubble_czz0p_112",n2="_rateFeedbackGuestBubble_czz0p_118",r2="_avatar_czz0p_124",i2="_fadeInLeft_czz0p_1",o2="_bubble_czz0p_85",s2="_appear_czz0p_1",a2="_botBubble_czz0p_150",l2="_guestBubble_czz0p_160",u2="_rateText_czz0p_176",c2="_stars_czz0p_181",f2="_starsSmall_czz0p_194",d2="_starsLarge_czz0p_198",h2="_star_czz0p_181",p2="_starReadonly_czz0p_215",m2="_starIcon_czz0p_223",g2="_starsDescriptionContainer_czz0p_241",y2="_starsDescription_czz0p_241",Ne={callToActionContainer:Xk,"append-animate":"_append-animate_czz0p_1",callToActionTitle:Qk,rateOverlay:Kk,body:Yk,footer:Zk,actions:Jk,bubbles:e2,rateFeedbackBotBubble:t2,rateFeedbackGuestBubble:n2,avatar:r2,fadeInLeft:i2,bubble:o2,appear:s2,botBubble:a2,guestBubble:l2,rateText:u2,stars:c2,starsSmall:f2,starsLarge:d2,star:h2,starReadonly:p2,starIcon:m2,starsDescriptionContainer:g2,starsDescription:y2},v2=({value:e,index:t,count:n,readonly:r,onHover:i,onClick:o})=>{const s=a=>{o&&a.key==="Enter"&&o()};return v.jsx("li",{className:k(Ne.star,{[Ne.starReadonly]:r},"chat__conversationRating__star"),children:v.jsx("div",{role:"radio","aria-checked":e>t?"true":"false","aria-posinset":t+1,"aria-setsize":n,tabIndex:0,onMouseOver:i,onKeyDown:s,onClick:o,children:v.jsx("span",{role:"img","aria-label":"Star",className:k(Ne.starIcon),children:v.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"star",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:v.jsx("path",{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"})})})})})},Ah=5,dv=({value:e,size:t,readonly:n=!1,onChange:r})=>{const[i,o]=R.useState(void 0),s=()=>{o(void 0)},a=u=>()=>{if(!n){const f=u+1;o(f)}},l=u=>()=>{r&&!n&&(r(u===0&&e===1?0:u+1),o(void 0))};return v.jsx("ul",{tabIndex:0,role:"radiogroup",className:k(Ne.stars,{[Ne.starsSmall]:t==="small",[Ne.starsLarge]:t==="large"},"chat__conversationRating__stars",{chat__conversationRating__stars__small:t==="small",chat__conversationRating__stars__large:t==="large"}),onMouseOut:s,children:Array(Ah).fill(0).map((u,f)=>v.jsx(v2,{value:i===void 0?e:i,index:f,count:Ah,readonly:n,onHover:a(f),onClick:l(f)},f))})},_2=({visible:e,onRate:t})=>{const n=lt();return e?v.jsxs("div",{className:k(Ne.callToActionContainer,"chat__conversationRating__callToAction"),children:[v.jsx("div",{className:k(Ne.callToActionTitle,"chat__conversationRating__callToAction__title"),children:n("conversation-rating.call-to-action.title")}),v.jsx(dv,{value:0,size:"small",onChange:t})]}):null},Ph=({isFirstMessageBySender:e,isLastMessageBySender:t,children:n})=>v.jsxs("div",{className:k(B.message,B.messageBot,e&&B.messageBotFirst,t&&B.messageBotLast,"chat__bubbleContainer","chat__botBubbleContainer",e&&"chat__bubbleContainer--first",t&&"chat__bubbleContainer--last"),children:[v.jsx("img",{className:k(B.avatar,B.botAvatar),src:"bot.svg",alt:"Bot"}),v.jsx("div",{className:k(B.bubble,B.bubbleLeft,"chat__bubble","chat__botBubble"),children:v.jsx("div",{className:k(B.leftText,B.bubbleContent),children:n})})]}),E2=({children:e})=>v.jsx("div",{className:k(B.message,B.messageGuest,B.messageGuestFirst,B.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer","chat__bubbleContainer--first","chat__bubbleContainer--last"),children:v.jsx("div",{className:k(B.bubble,B.bubbleRight,"chat__bubble","chat__guestBubble"),children:v.jsx("div",{className:k(B.rightText,B.bubbleContent),children:e})})}),S2=({visible:e,rating:t,onRate:n,onClose:r})=>{const i=lt(),[o,s]=R.useState(t),[a,l]=R.useState(void 0),[u,f]=R.useState(void 0),[h,c]=R.useState({submitted:!1,feedback:""}),[y,p]=R.useState(!1),E=R.useRef(null);R.useEffect(()=>{e?(c({submitted:!1,feedback:""}),f(e)):u===!0&&f(!1)},[e,u]),R.useEffect(()=>{s(t)},[t]),R.useEffect(()=>{const g=i(`conversation-rating.overlay.bot-message.rate-feedback.value-${o}`);l(g!=null&&g.length?g:void 0)},[o,i]),R.useEffect(()=>{h.submitted?setTimeout(()=>p(!0),h.feedback.length?500:0):p(!1)},[h]);const S=g=>{var m,_;g.preventDefault();const d=((_=(m=E.current)==null?void 0:m.value)==null?void 0:_.trim())||"";n(o,d),c({submitted:!0,feedback:d})};return v.jsx("div",{className:k(Ne.rateOverlay,Wt.bottomSheet,"chat__conversationRating__overlay",{[Wt.bottomSheetOpen]:u===!0,[Wt.bottomSheetClose]:u===!1}),children:v.jsxs("form",{onSubmit:S,children:[v.jsxs("div",{className:k(Ne.body,"chat__conversationRating__overlay__body"),children:[v.jsxs("div",{children:[v.jsx("h2",{children:i("conversation-rating.overlay.title")}),v.jsxs("div",{className:k(Ne.starsDescriptionContainer),children:[v.jsx(dv,{value:o,size:"large",readonly:h.submitted,onChange:s}),v.jsxs("div",{className:k(Ne.starsDescription),children:[v.jsx("div",{children:i("conversation-rating.overlay.star.very-bad")}),v.jsx("div",{children:i("conversation-rating.overlay.star.very-good")})]})]})]}),v.jsx("div",{className:k(Ne.bubbles),children:e&&a&&v.jsxs(v.Fragment,{children:[v.jsx(Ph,{isFirstMessageBySender:!0,isLastMessageBySender:!y||!!h.feedback.length,children:v.jsx("div",{children:a})}),!!h.feedback.length&&v.jsx(E2,{children:h.feedback}),y&&v.jsx(Ph,{isFirstMessageBySender:!!h.feedback.length,isLastMessageBySender:!0,children:v.jsx("div",{children:i("conversation-rating.overlay.bot-message.submit-feedback")})})]})})]}),v.jsxs("div",{className:k(Ne.footer,"chat__conversationRating__overlay__footer"),children:[!h.submitted&&v.jsx("input",{ref:E,placeholder:i("conversation-rating.overlay.guest-feedback.input-placeholder")}),v.jsx("div",{className:k(Ne.actions,"chat__conversationRating__overlay__footer__actions"),children:h.submitted?v.jsx("button",{type:"button",className:k(Ee.button,Ee.buttonPrimary),onClick:r,children:i("conversation-rating.overlay.action.close")}):v.jsx("button",{type:"submit",className:k(Ee.button,Ee.buttonPrimary),children:i("conversation-rating.overlay.action.submit")})})]})]})})},w2=({conversationRating:{enabled:e,rating:t},numberOfMessagesFromGuest:n,showRatingOverlay:r,setShowRatingOverlay:i,onRate:o})=>{const[s,a]=R.useState(0),l=h=>{a(h),i(!0)},u=()=>i(!1),f=!t&&n>=1;return e?v.jsxs(v.Fragment,{children:[v.jsx(_2,{visible:f,onRate:l}),v.jsx(S2,{visible:r,rating:s,onRate:o,onClose:u})]}):null},b2="_inputWrapper_1o8hf_5",x2="_messageInputWrapper_1o8hf_14",T2="_messageInput_1o8hf_14",C2="_buttons_1o8hf_36",k2="_button_1o8hf_36",ir={inputWrapper:b2,messageInputWrapper:x2,messageInput:T2,buttons:C2,button:k2},O2="_audioRecorder_xps9k_5",R2="_recordButton_xps9k_10",N2="_submitButton_xps9k_37",A2="_cancelButton_xps9k_64",P2="_recorderIcon_xps9k_91",I2="_pulse_xps9k_1",D2="_spinning_xps9k_113",F2="_spin_xps9k_113",An={audioRecorder:O2,recordButton:R2,submitButton:N2,cancelButton:A2,recorderIcon:P2,pulse:I2,spinning:D2,spin:F2},Ih=2048,_s=16e3;class M2 extends yt.Component{constructor(n){super(n);W(this,"audioInput",null);W(this,"volume",null);W(this,"leftchannel",[]);W(this,"recorder",null);W(this,"recordingLength",0);W(this,"sampleRate",null);W(this,"mediaStream",null);this.state={recordingState:"none"},this.triggerAudioRecording=this.triggerAudioRecording.bind(this),this.triggerAudioRecordingSuccess=this.triggerAudioRecordingSuccess.bind(this),this.initRecording=this.initRecording.bind(this),this.processRecordingInput=this.processRecordingInput.bind(this),this.handleClickSubmitAudio=this.handleClickSubmitAudio.bind(this),this.handleClickStopAudio=this.handleClickStopAudio.bind(this)}triggerAudioRecording(){this.setState({recordingState:"connecting"}),navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(this.triggerAudioRecordingSuccess)}triggerAudioRecordingSuccess(n){this.mediaStream=n,this.leftchannel.length=0,this.recordingLength=0,this.initRecording(n)}initRecording(n){var r=window.AudioContext||window.webkitAudioContext,i=new r;this.sampleRate=i.sampleRate,this.volume=i.createGain(),this.audioInput=i.createMediaStreamSource(n),this.audioInput.connect(this.volume),this.recorder=i.createScriptProcessor(Ih,1,1),this.recorder.onaudioprocess=this.processRecordingInput,this.volume.connect(this.recorder),this.recorder.connect(i.destination)}processRecordingInput(n){if(this.state.recordingState==="connecting"&&this.setState({recordingState:"recording"}),this.state.recordingState!=="none"){const r=n.inputBuffer.getChannelData(0);this.leftchannel.push(new Float32Array(r)),this.recordingLength+=Ih}}handleClickSubmitAudio(){const n=B2(this.leftchannel,this.recordingLength),r=j2(n,this.sampleRate||0),i=L2(r);this.props.onAudioRecorded(i),this.handleClickStopAudio()}handleClickStopAudio(){var n,r,i,o;this.setState({recordingState:"none"}),(n=this.audioInput)==null||n.disconnect(),(r=this.volume)==null||r.disconnect(),(i=this.recorder)==null||i.disconnect(),this.mediaStream&&((o=this.mediaStream)==null||o.getAudioTracks().forEach(s=>{s.stop()}))}render(){return v.jsxs("div",{className:An.audioRecorder,children:[this.state.recordingState==="none"&&v.jsx("button",{className:k(An.recordButton,"chat__button"),type:"submit","aria-label":this.props.translate("message-input.actions.start-audio-recording.label"),"data-title":this.props.translate("message-input.actions.start-audio-recording.label"),tabIndex:0,onClick:this.triggerAudioRecording,children:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[v.jsx("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),v.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),this.state.recordingState==="connecting"&&v.jsxs("svg",{className:An.spinning,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[v.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),v.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]}),this.state.recordingState==="recording"&&v.jsxs("div",{className:An.audioRecorder,children:[v.jsx("button",{className:k(An.cancelButton),onClick:this.handleClickStopAudio,"aria-label":this.props.translate("message-input.actions.stop-audio-recording.label"),tabIndex:0,children:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[v.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),v.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),v.jsx("div",{className:An.recorderIcon}),v.jsx("button",{className:k(An.submitButton),type:"submit",onClick:this.handleClickSubmitAudio,"aria-label":this.props.translate("message-input.actions.submit-audio-recording.label"),tabIndex:0,autoFocus:!0,children:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[v.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),v.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})]})})]})]})}}const L2=e=>{const t=new ArrayBuffer(44+e.length*2),n=new DataView(t);yo(n,0,"RIFF"),n.setUint32(4,44+e.length*2,!0),yo(n,8,"WAVE"),yo(n,12,"fmt "),n.setUint32(16,16,!0),n.setUint16(20,1,!0),n.setUint16(22,1,!0),n.setUint32(24,_s,!0),n.setUint32(28,_s*4,!0),n.setUint16(32,4,!0),n.setUint16(34,16,!0),yo(n,36,"data"),n.setUint32(40,e.length*2,!0);const r=e.length;let i=44;const o=1;for(var s=0;s<r;s++)n.setInt16(i,e[s]*(32767*o),!0),i+=2;return new Blob([n],{type:"audio/wav"})},yo=(e,t,n)=>{for(var r=0;r<n.length;r++)e.setUint8(t+r,n.charCodeAt(r))},B2=(e,t)=>{const n=new Float32Array(t);let r=0;const i=e.length;for(var o=0;o<i;o++){const s=e[o];n.set(s,r),r+=s.length}return n},j2=(e,t)=>{if(_s===t)return e;const n=t/_s,r=Math.round(e.length/n),i=new Float32Array(r);let o=0,s=0;for(;o<i.length;){let l=Math.round((o+1)*n),u=0,f=0;for(var a=s;a<l&&a<e.length;a++)u+=e[a],f++;i[o]=u/f,o++,s=l}return i},z2=({speechSupport:e,transcriptExportEnabled:t,disabled:n,onTextInput:r,onAudioRecorded:i,onOpenTranscriptExportModal:o})=>{const s=lt(),[a,l]=R.useState(!1),u=R.useRef(null),f=()=>{const p=u.current;p&&p.value.trim().length>=1&&r(p.value.trim())&&(p.value="",p.style.height="",l(!1),p.focus())},h=p=>{p.preventDefault(),f()},c=p=>{const E=p.target.value.trim();l(E.length>0),p.target.style.height="";const{scrollHeight:S}=p.target;p.target.style.height=`${S>150?150:S}px`},y=p=>{p.code==="Enter"&&!p.shiftKey&&(p.repeat||f(),p.preventDefault())};return v.jsxs("form",{className:k(ir.inputWrapper,"chat__textInput"),onSubmit:h,children:[v.jsx("div",{className:ir.messageInputWrapper,children:v.jsx("textarea",{id:"user_input",ref:u,className:ir.messageInput,tabIndex:0,placeholder:s("message-input-placeholder"),onChange:c,onKeyDown:y,"aria-label":s("message-input-label")})}),v.jsxs("div",{className:k(ir.buttons,"chat__buttons"),children:[!a&&t&&v.jsx("button",{type:"button",className:k(ir.button,"chat__button"),"aria-label":s("message-input.actions.export-transcript.label"),"data-title":s("message-input.actions.export-transcript.label"),tabIndex:0,onClick:o,children:v.jsx("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:v.jsx("path",{d:"M456 231a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0z"})})}),a||!e||navigator.mediaDevices===void 0?v.jsx("button",{className:k(ir.button,"chat__button"),type:"submit","aria-label":s("message-input.actions.submit.label"),"data-title":s("message-input.actions.submit.label"),tabIndex:0,disabled:n,children:v.jsx("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:v.jsx("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})})}):e&&navigator.mediaDevices!==void 0&&v.jsx(M2,{translate:s,onAudioRecorded:i})]})]})},U2="_quickReplies_11l22_1",$2="_quickReply_11l22_9",Dh={quickReplies:U2,quickReply:$2},H2=({quickReplies:e,onQuickReplyClick:t})=>e.length?v.jsx("div",{className:k(Dh.quickReplies,"chat__quickReplies"),children:e.map(n=>v.jsx("button",{tabIndex:0,className:k(Dh.quickReply,Ee.button,"chat__button","chat__quickReply"),onClick:()=>t(n),children:n.label},n.label))}):null,Fh=5e3,G2=1e3,V2=({isBotTyping:e,quickReplies:t,speechSupport:n,transcriptExportEnabled:r,conversationRating:i,numberOfMessagesFromGuest:o,showRatingOverlay:s,setShowRatingOverlay:a,onTextInput:l,onRate:u,onQuickReplyClick:f,onAudioRecorded:h,onOpenTranscriptExportModal:c})=>{const[y,p]=R.useState(!1),E=R.useRef(),S=R.useRef(0);R.useEffect(()=>{if(y&&!e){const d=E.current?Date.now()-E.current:0;d>Fh?p(!1):setTimeout(()=>{p(!1)},Fh-d)}},[y,e]),R.useEffect(()=>{y&&(E.current=Date.now())},[y]);const g=d=>{const m=Date.now()-S.current<G2;return e||m?(p(!0),!1):(l(d),S.current=Date.now(),!0)};return v.jsxs("div",{className:k(Gk.inputContainer),children:[v.jsx(H2,{quickReplies:t,onQuickReplyClick:f}),v.jsx(qk,{visible:y}),!y&&v.jsx(w2,{conversationRating:i,numberOfMessagesFromGuest:o,onRate:u,showRatingOverlay:s,setShowRatingOverlay:a}),v.jsx(z2,{onTextInput:g,onAudioRecorded:h,speechSupport:n,onOpenTranscriptExportModal:c,transcriptExportEnabled:r,disabled:y})]})},W2=({clientName:e,messages:t,quickReplies:n,isBotTyping:r,drawerContentUrl:i,speechSupport:o,problemReportingEnabled:s,transcriptExportEnabled:a,conversationRating:l,showGeneralConditions:u,onMessageFromUser:f,onRate:h,onQuickReplyClick:c,onButtonClick:y,onLinkClick:p,onAudioRecorded:E,onTranscriptExport:S,onPdfExport:g,onProblemReport:d})=>{const m=bc(),_=$n(K=>K.connection.connectionState),[w,b]=R.useState(!1),[x,T]=R.useState(!1),F=a.email||a.pdf,D=t.filter(K=>K.sender.type===Fy.GUEST).length;return R.useEffect(()=>{if(_===jn.CONNECTED){const K=Cc.parse(window.location.search);m(Dy(e,K))}},[_,m]),v.jsxs("div",{children:[v.jsxs("div",{className:`${dx.chatcontent} ${w||x?Ee.accessabilityHidden:""}`,children:[v.jsx(bk,{messages:t,isBotTyping:r,showGeneralConditions:u,problemReportingEnabled:s,onButtonClick:y,onLinkClick:p,onProblemReport:d}),v.jsx(V2,{isBotTyping:r,quickReplies:r?[]:n,numberOfMessagesFromGuest:D,speechSupport:o,transcriptExportEnabled:F,conversationRating:w?{enabled:!1}:l,showRatingOverlay:x,setShowRatingOverlay:T,onRate:h,onQuickReplyClick:c,onTextInput:f,onAudioRecorded:E,onOpenTranscriptExportModal:()=>b(!w)}),v.jsx(Dk,{})]}),F&&v.jsx($k,{methods:a,visible:w,onEmailExport:S,onPdfExport:g,onClose:()=>b(!1)}),v.jsx(Nk,{contentUrl:i})]})},q2=e=>{const{messages:t,quickReplies:n,isBotTyping:r,drawerContentUrl:i,speechSupport:o,problemReportingEnabled:s,transcriptExportEnabled:a,conversationRating:l,showGeneralConditions:u}=e.chat;return{messages:t,quickReplies:n,isBotTyping:r,drawerContentUrl:i,speechSupport:o,problemReportingEnabled:s,transcriptExportEnabled:a,conversationRating:l,showGeneralConditions:u}},X2=e=>({onRestartChat:(t,n)=>e(rf(t,n)),onMessageFromUser:t=>e(hy(t)),onRate:(t,n)=>e(rb(t,n)),onAudioRecorded:t=>e(Xw(t)),onActionFromUser:t=>e(t),onQuickReplyClick:t=>e(dy(t)),onNluEvent:t=>e(gy(t)),onButtonClick:t=>e(ob(t)),onLinkClick:t=>e(sb(t)),onTranscriptExport:t=>e(Jw(t)),onPdfExport:()=>e(tb()),onProblemReport:(t,n)=>e(j.reportProblemFromGuest(t,n))}),Q2=dE(q2,X2)(W2),K2="_chatwindow_phukm_1",Y2="_chatcontent_phukm_13",Z2={chatwindow:K2,chatcontent:Y2},J2="_container_1rets_2",eO="_body_1rets_8",tO="_intro_1rets_13",nO="_footer_1rets_26",rO="_startChatButton_1rets_30",iO="_formFields_1rets_34",oO="_formField_1rets_34",sO="_radio_1rets_46",aO="_checkbox_1rets_53",lO="_input_1rets_61",uO="_inputLabel_1rets_91",cO="_selectWrapper_1rets_95",fO="_select_1rets_95",dO="_selectLabel_1rets_137",Ae={container:J2,body:eO,intro:tO,footer:nO,startChatButton:rO,formFields:iO,formField:oO,radio:sO,checkbox:aO,input:lO,inputLabel:uO,selectWrapper:cO,select:fO,selectLabel:dO},hO=({name:e,label:t,defaultValue:n,required:r,onChange:i})=>{const o=s=>{i(s.currentTarget.checked?"true":"false")};return v.jsxs("label",{className:k(Ae.checkbox,"chat__startScreen__checkbox"),htmlFor:e,children:[v.jsx("input",{type:"checkbox",id:e,name:e,defaultChecked:n==="true",required:r,onChange:o}),v.jsx("div",{children:t})]})},pO=({type:e,name:t,label:n,defaultValue:r,placeholder:i,required:o,multiple:s,min:a,max:l,pattern:u,onChange:f})=>{const h=c=>{f(c.target.value)};return v.jsxs("label",{className:k(Ae.input,"chat__startScreen__input"),htmlFor:t,children:[v.jsx("div",{className:k(Ae.inputLabel),children:n}),v.jsx("input",{type:e,id:t,name:t,defaultValue:r,placeholder:i,required:o,multiple:s,min:a,max:l,pattern:u,onChange:h})]})},mO=({name:e,value:t,label:n,defaultChecked:r,required:i,onChange:o})=>{const s=`${e}-${t}`,a=l=>{o(l.target.value)};return v.jsxs("label",{className:k(Ae.radio,"chat__startScreen__radio"),htmlFor:s,children:[v.jsx("input",{id:s,type:"radio",name:e,value:t,defaultChecked:r,required:i,onChange:a}),v.jsx("span",{className:k(Ae.label),children:n})]})},gO=({name:e,label:t,defaultValue:n,required:r,multiple:i,options:o,onChange:s})=>{const a=l=>{s(l.target.value)};return v.jsxs("label",{className:k(Ae.select,"chat__startScreen__select"),htmlFor:e,children:[v.jsx("div",{className:k(Ae.selectLabel),children:t}),v.jsx("div",{className:k(Ae.selectWrapper),children:v.jsx("select",{id:e,name:e,defaultValue:n,required:r,multiple:i,onChange:a,children:Object.entries(o||{}).map(([l,u])=>v.jsx("option",{value:l,selected:u===n,children:u}))})})]})},yO="start-screen.intro",vO="start-screen.start-chat",ft="start-screen.form",Mh=`${ft}.fields`,_O=()=>{const e=lt(),t=bc(),[n,r]=R.useState({}),i=()=>{const f=Object.entries(n).reduce((h,[c,y])=>({...h,[c]:y.value}),{});t(Xb(f))},o=e(yO),s=e(vO),a=R.useMemo(()=>{var f;return((f=e(Mh))==null?void 0:f.split(";").map(h=>h.trim()))??[]},[e(Mh)]);R.useEffect(()=>{r(a.reduce((f,h)=>({...f,[h]:SO(h,e)}),{}))},[a]);const l=f=>{f.preventDefault(),i()},u=f=>h=>{r(c=>({...c,[f]:{...c[f],value:h}}))};return v.jsxs("form",{onSubmit:l,className:k(Ae.container,"chat__startScreen"),children:[v.jsxs("div",{className:k(Ae.body,"chat__startScreen__body"),children:[o&&v.jsx("div",{className:k(Ae.intro,"chat__startScreen__intro"),children:v.jsx(vn,{options:{overrides:{a:EO}},children:o})}),v.jsx("div",{className:k(Ae.formFields,"chat__startScreen__fields"),children:Object.values(n).map(({type:f,name:h,label:c,placeholder:y,defaultValue:p,options:E,required:S,multiple:g,min:d,max:m,pattern:_})=>v.jsx("div",{className:k(Ae.formField,"chat__startScreen__field"),children:(()=>{switch(f){case"radio":return v.jsxs(v.Fragment,{children:[v.jsx("div",{children:c}),Object.entries(E||{}).map(([w,b])=>v.jsx(mO,{name:h,value:w,label:b,defaultChecked:w===p,required:S,onChange:u(h)}))]});case"checkbox":return v.jsx(hO,{name:h,label:c,defaultValue:p,required:S,onChange:u(h)});case"select":return v.jsx(gO,{name:h,label:c,defaultValue:p,required:S,multiple:g,options:E,onChange:u(h)});default:return v.jsx(pO,{type:f,name:h,label:c,placeholder:y,defaultValue:p,required:S,multiple:g,min:d,max:m,pattern:_,onChange:u(h)})}})()},h))})]}),v.jsx("div",{className:k(Ae.footer,"chat__startScreen__footer"),children:v.jsx("button",{type:"submit",className:k(Ee.button,Ee.buttonPrimary,Ae.startChatButton),children:s})})]})},EO=({title:e,href:t,children:n})=>v.jsx("a",{href:t,title:e,target:"_blank",rel:"noopener noreferrer",children:n}),SO=(e,t)=>{const n=t(`${ft}.${e}.type`)||"text",r=t(`${ft}.${e}.required`)==="true",i=t(`${ft}.${e}.multiple`)==="true",o=t(`${ft}.${e}.placeholder`),s=t(`${ft}.${e}.label`)||"",a=t(`${ft}.${e}.defaultValue`),l=t(`${ft}.${e}.min`),u=t(`${ft}.${e}.max`),f=t(`${ft}.${e}.pattern`),h=bO(t(`${ft}.${e}.options`));return{name:e,label:s,placeholder:o,value:wO(n,a,h)||"",defaultValue:a,options:h,type:n,required:r,multiple:i,min:l,max:u,pattern:f}},wO=(e,t,n)=>t||e==="select"&&Object.keys(n)[0]||"",bO=(e="")=>e.split(";").map(t=>t.trim()).reduce((t,n)=>{const[r,i]=n.split(":").map(o=>o.trim());return{...t,[r]:i}},{}),xO=()=>{const e=Bs();R.useEffect(()=>{window.document.documentElement.lang=e.locale},[e.locale])},or={TRIGGER_ACTION:"TRIGGER_ACTION",TRIGGER_STORY:"TRIGGER_STORY",CHAT_MESSAGE_FROM_GUEST:"CHAT_MESSAGE_FROM_GUEST",ON_CHAT_WINDOW_OPEN:"ON_CHAT_WINDOW_OPEN",ON_CHAT_WINDOW_CLOSE:"ON_CHAT_WINDOW_CLOSE",RESTART_CHAT:"RESTART_CHAT"},TO=({clientName:e})=>{xO();const t=bc(),n=$n(f=>f.intl.messages),r=lt(),i=$n(f=>f.startScreen.useStartScreen),o=$n(f=>f.startScreen.startScreenStatus),[s,a]=R.useState(void 0);R.useEffect(()=>{const f=Cc.parse(window.location.search);f.cssClassName&&a(f.cssClassName);const h=c=>{switch(c.data.type){case or.TRIGGER_ACTION:t(c.data.action);break;case or.TRIGGER_STORY:t(gy(c.data.story));break;case or.ON_CHAT_WINDOW_OPEN:t({type:"webclient.chatwindow.opened"});break;case or.ON_CHAT_WINDOW_CLOSE:t({type:"webclient.chatwindow.closed"});break;case or.CHAT_MESSAGE_FROM_GUEST:t(hy(c.data.text));break;case or.RESTART_CHAT:t(rf(e,f));break}};return t(Jb(e,f)),window.addEventListener("message",c=>h(c),!1),()=>window.removeEventListener("message",h)},[e,t]),R.useEffect(()=>{const f=r("header.restart-chat"),h=r("header.close-chat");t(ab({header:{restartChat:f,closeChat:h}}))},[n,t,r]);const l=i===void 0,u=i===!1||o==="HIDDEN";return v.jsx("div",{className:k(Z2.chatwindow,"chat__chatwindow",s),children:l?null:u?v.jsx(Q2,{clientName:e}):v.jsx(_O,{})})},CO=()=>{const e=Yg(),t=$n(r=>r.intl.locale),n=$n(r=>r.intl.messages);return v.jsx(BS,{locale:t,messages:n,children:v.jsx("div",{className:zS.app,children:v.jsx(TO,{clientName:e})})})};function kO(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var df=kO,OO=typeof X=="object"&&X&&X.Object===Object&&X,RO=OO,NO=RO,AO=typeof self=="object"&&self&&self.Object===Object&&self,PO=NO||AO||Function("return this")(),hv=PO,IO=hv,DO=function(){return IO.Date.now()},FO=DO,MO=/\s/;function LO(e){for(var t=e.length;t--&&MO.test(e.charAt(t)););return t}var BO=LO,jO=BO,zO=/^\s+/;function UO(e){return e&&e.slice(0,jO(e)+1).replace(zO,"")}var $O=UO,HO=hv,GO=HO.Symbol,pv=GO,Lh=pv,mv=Object.prototype,VO=mv.hasOwnProperty,WO=mv.toString,ei=Lh?Lh.toStringTag:void 0;function qO(e){var t=VO.call(e,ei),n=e[ei];try{e[ei]=void 0;var r=!0}catch{}var i=WO.call(e);return r&&(t?e[ei]=n:delete e[ei]),i}var XO=qO,QO=Object.prototype,KO=QO.toString;function YO(e){return KO.call(e)}var ZO=YO,Bh=pv,JO=XO,eR=ZO,tR="[object Null]",nR="[object Undefined]",jh=Bh?Bh.toStringTag:void 0;function rR(e){return e==null?e===void 0?nR:tR:jh&&jh in Object(e)?JO(e):eR(e)}var iR=rR;function oR(e){return e!=null&&typeof e=="object"}var sR=oR,aR=iR,lR=sR,uR="[object Symbol]";function cR(e){return typeof e=="symbol"||lR(e)&&aR(e)==uR}var fR=cR,dR=$O,zh=df,hR=fR,Uh=NaN,pR=/^[-+]0x[0-9a-f]+$/i,mR=/^0b[01]+$/i,gR=/^0o[0-7]+$/i,yR=parseInt;function vR(e){if(typeof e=="number")return e;if(hR(e))return Uh;if(zh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=zh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=dR(e);var n=mR.test(e);return n||gR.test(e)?yR(e.slice(2),n?2:8):pR.test(e)?Uh:+e}var _R=vR,ER=df,Wa=FO,$h=_R,SR="Expected a function",wR=Math.max,bR=Math.min;function xR(e,t,n){var r,i,o,s,a,l,u=0,f=!1,h=!1,c=!0;if(typeof e!="function")throw new TypeError(SR);t=$h(t)||0,ER(n)&&(f=!!n.leading,h="maxWait"in n,o=h?wR($h(n.maxWait)||0,t):o,c="trailing"in n?!!n.trailing:c);function y(b){var x=r,T=i;return r=i=void 0,u=b,s=e.apply(T,x),s}function p(b){return u=b,a=setTimeout(g,t),f?y(b):s}function E(b){var x=b-l,T=b-u,F=t-x;return h?bR(F,o-T):F}function S(b){var x=b-l,T=b-u;return l===void 0||x>=t||x<0||h&&T>=o}function g(){var b=Wa();if(S(b))return d(b);a=setTimeout(g,E(b))}function d(b){return a=void 0,c&&r?y(b):(r=i=void 0,s)}function m(){a!==void 0&&clearTimeout(a),u=0,r=l=i=a=void 0}function _(){return a===void 0?s:d(Wa())}function w(){var b=Wa(),x=S(b);if(r=arguments,i=this,l=b,x){if(a===void 0)return p(l);if(h)return clearTimeout(a),a=setTimeout(g,t),y(l)}return a===void 0&&(a=setTimeout(g,t)),s}return w.cancel=m,w.flush=_,w}var TR=xR,CR=TR,kR=df,OR="Expected a function";function RR(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(OR);return kR(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),CR(e,t,{leading:r,maxWait:t,trailing:i})}var NR=RR;const AR=Su(NR);function er(e,t){var n,r;if(typeof t=="function")r=t(e),r!==void 0&&(e=r);else if(Array.isArray(t))for(n=0;n<t.length;n++)r=t[n](e),r!==void 0&&(e=r);return e}function PR(e,t){return e[0]==="-"&&Array.isArray(t)&&/^-\d+$/.test(e)?t.length+parseInt(e,10):e}function IR(e){return/^\d+$/.test(e)}function Do(e){return Object.prototype.toString.call(e)==="[object Object]"}function ai(e){return Object(e)===e}function Fo(e){return Object.keys(e).length===0}var DR=["__proto__","prototype","constructor"],FR=function(e){return DR.indexOf(e)===-1};function Zs(e,t){e.indexOf("[")>=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t),r=n.filter(FR);if(r.length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var Hh=Object.prototype.hasOwnProperty;function V(e,t,n,r){if(!(this instanceof V))return new V(e,t,n,r);typeof t>"u"&&(t=!1),typeof n>"u"&&(n=!0),typeof r>"u"&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var Fr=new V(".",!1,!0,!0);function wt(e){return function(){return Fr[e].apply(Fr,arguments)}}V.prototype._fill=function(e,t,n,r){var i=e.shift();if(e.length>0){if(t[i]=t[i]||(this.useArray&&IR(e[0])?[]:{}),!ai(t[i]))if(this.override)t[i]={};else{if(!(ai(n)&&Fo(n)))throw new Error("Trying to redefine `"+i+"` which is a "+typeof t[i]);return}this._fill(e,t[i],n,r)}else{if(!this.override&&ai(t[i])&&!Fo(t[i])){if(!(ai(n)&&Fo(n)))throw new Error("Trying to redefine non-empty obj['"+i+"']");return}t[i]=er(n,r)}};V.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach(function(r){var i=t===void 0?null:t[r],o=Zs(r,n.separator).join(n.separator);o.indexOf(n.separator)!==-1?(n._fill(o.split(n.separator),e,e[r],i),delete e[r]):e[r]=er(e[r],i)}),e};V.prototype.str=function(e,t,n,r){var i=Zs(e,this.separator).join(this.separator);return e.indexOf(this.separator)!==-1?this._fill(i.split(this.separator),n,t,r):n[e]=er(t,r),n};V.prototype.pick=function(e,t,n,r){var i,o,s,a,l;for(o=Zs(e,this.separator),i=0;i<o.length;i++)if(a=PR(o[i],t),t&&typeof t=="object"&&a in t){if(i===o.length-1)return n?(s=t[a],r&&Array.isArray(t)?t.splice(a,1):delete t[a],Array.isArray(t)&&(l=o.slice(0,-1).join("."),this.cleanup.indexOf(l)===-1&&this.cleanup.push(l)),s):t[a];t=t[a]}else return;return n&&Array.isArray(t)&&(t=t.filter(function(u){return u!==void 0})),t};V.prototype.delete=function(e,t){return this.remove(e,t,!0)};V.prototype.remove=function(e,t,n){var r;if(this.cleanup=[],Array.isArray(e)){for(r=0;r<e.length;r++)this.pick(e[r],t,!0,n);return n||this._cleanup(t),t}else return this.pick(e,t,!0,n)};V.prototype._cleanup=function(e){var t,n,r,i;if(this.cleanup.length){for(n=0;n<this.cleanup.length;n++)r=this.cleanup[n].split("."),i=r.splice(0,-1).join("."),t=i?this.pick(i,e):e,t=t[r[0]].filter(function(o){return o!==void 0}),this.set(this.cleanup[n],t,e);this.cleanup=[]}};V.prototype.del=V.prototype.remove;V.prototype.move=function(e,t,n,r,i){return typeof r=="function"||Array.isArray(r)?this.set(t,er(this.pick(e,n,!0),r),n,i):(i=r,this.set(t,this.pick(e,n,!0),n,i)),n};V.prototype.transfer=function(e,t,n,r,i,o){return typeof i=="function"||Array.isArray(i)?this.set(t,er(this.pick(e,n,!0),i),r,o):(o=i,this.set(t,this.pick(e,n,!0),r,o)),r};V.prototype.copy=function(e,t,n,r,i,o){return typeof i=="function"||Array.isArray(i)?this.set(t,er(JSON.parse(JSON.stringify(this.pick(e,n,!1))),i),r,o):(o=i,this.set(t,this.pick(e,n,!1),r,o)),r};V.prototype.set=function(e,t,n,r){var i,o,s,a;if(typeof t>"u")return n;for(s=Zs(e,this.separator),i=0;i<s.length;i++){if(a=s[i],i===s.length-1)if(r&&Do(t)&&Do(n[a]))for(o in t)Hh.call(t,o)&&(n[a][o]=t[o]);else if(r&&Array.isArray(n[a])&&Array.isArray(t))for(var l=0;l<t.length;l++)n[s[i]].push(t[l]);else n[a]=t;else(!Hh.call(n,a)||!Do(n[a])&&!Array.isArray(n[a]))&&(/^\d+$/.test(s[i+1])?n[a]=[]:n[a]={});n=n[a]}return n};V.prototype.transform=function(e,t,n){return t=t||{},n=n||{},Object.keys(e).forEach((function(r){this.set(e[r],this.pick(r,t),n)}).bind(this)),n};V.prototype.dot=function(e,t,n){t=t||{},n=n||[];var r=Array.isArray(e);return Object.keys(e).forEach((function(i){var o=r&&this.useBrackets?"["+i+"]":i;if(ai(e[i])&&(Do(e[i])&&!Fo(e[i])||Array.isArray(e[i])&&!this.keepArray&&e[i].length!==0))if(r&&this.useBrackets){var s=n[n.length-1]||"";return this.dot(e[i],t,n.slice(0,-1).concat(s+o))}else return this.dot(e[i],t,n.concat(o));else r&&this.useBrackets?t[n.join(this.separator).concat("["+i+"]")]=e[i]:t[n.concat(o).join(this.separator)]=e[i]}).bind(this)),t};V.pick=wt("pick");V.move=wt("move");V.transfer=wt("transfer");V.transform=wt("transform");V.copy=wt("copy");V.object=wt("object");V.str=wt("str");V.set=wt("set");V.delete=wt("delete");V.del=V.remove=wt("remove");V.dot=wt("dot");["override","overwrite"].forEach(function(e){Object.defineProperty(V,e,{get:function(){return Fr.override},set:function(t){Fr.override=!!t}})});["useArray","keepArray","useBrackets"].forEach(function(e){Object.defineProperty(V,e,{get:function(){return Fr[e]},set:function(t){Fr[e]=t}})});V._process=er;var MR=V;const gv={"message-input-label":"Benutzereingabe","message-input-placeholder":"Nachricht","message-input.actions.submit.label":"Nachricht senden","message-input.actions.export-transcript.label":"Konversation exportieren","message-input.actions.start-audio-recording.label":"Spracheingabe starten","message-input.actions.stop-audio-recording.label":"Spracheingabe stoppen","message-input.actions.submit-audio-recording.label":"Spracheingabe übermitteln","guest-bubble.label":"Ihre Nachricht","bot-bubble.label":"Nachricht des Chatbots","agent-bubble.label":"Nachricht des Live-Agenten","export-transcript.email.title":"Konversation per E-Mail versenden","export-transcript.email.description":"Geben Sie Ihre E-Mail-Adresse ein, um den Chatverlauf zu erhalten.","export-transcript.email.cancel":"Abbrechen","export-transcript.email.send":"Senden","export-transcript.email.placeholder":"Ihre E-Mail-Adresse","export-transcript.email.invalid":"Bitte gültige E-Mail-Adresse eingeben.","export-transcript.email.success":"Ich habe den Chatverlauf an Ihre E-Mail-Adresse gesendet.","export-transcript.pdf.title":"Konversation als PDF erhalten","export-transcript.pdf.description":"Laden Sie die Konversation als PDF herunter.","export-transcript.pdf.cancel":"Abbrechen","export-transcript.pdf.download":"Herunterladen","general-conditions.header":"**Nutzungsbedingungen**","general-conditions.body":`Bitte berücksichtigen Sie die folgenden Punkte:
|
|
92
92
|
|
|
93
93
|
- Der Chatverlauf wird im EU-Raum gespeichert und kann nur von autorisierten Personen eingesehen werden.
|
|
@@ -100,5 +100,5 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
100
100
|
- Ne saisissez aucune information personnelle dans la fenêtre de chat (mots de passe, date de naissance, etc.).`,"general-conditions.accept-conditions-note":"En utilisant le chat, vous acceptez les conditions d'utilisation.","problem-report.action.mark":"Marquer comme incorrect","problem-report.action.unmark":"Retirer le marqueur","block-user-input.title":"Veuillez attendre la réponse du chatbot.","conversation-rating.call-to-action.title":"Notez ce chat","conversation-rating.overlay.title":"Dans quelle mesure êtes-vous satisfait de ce chat ?","conversation-rating.overlay.guest-feedback.input-placeholder":"Veuillez saisir vos commentaires ici (facultatif)","conversation-rating.overlay.star.very-bad":"Très mauvais","conversation-rating.overlay.star.very-good":"Très bien","conversation-rating.overlay.bot-message.rate-feedback.value-1":"Oh, ça ne sonne pas bien. Merci de me donner un feedback pour que je puisse en apprendre davantage.","conversation-rating.overlay.bot-message.rate-feedback.value-2":"Oh, ça ne sonne pas bien. Merci de me donner un feedback pour que je puisse en apprendre davantage.","conversation-rating.overlay.bot-message.rate-feedback.value-3":"La moyenne n'est pas mon objectif, que puis-je encore améliorer ?","conversation-rating.overlay.bot-message.rate-feedback.value-4":"Le rater de peu, c'est le rater aussi. Que puis-je encore améliorer pour obtenir toutes les étoiles la prochaine fois ?","conversation-rating.overlay.bot-message.rate-feedback.value-5":"Parfait ! Alors j'espère pouvoir vous conseiller aussi bien une fois de plus.","conversation-rating.overlay.bot-message.submit-feedback":"Merci beaucoup pour votre feed-back. Je m'efforce de m'améliorer en permanence.","conversation-rating.overlay.action.submit":"Envoyer","conversation-rating.overlay.action.close":"Fermer","start-screen.intro":"","start-screen.start-chat":"Démarrer le chat","header.restart-chat":"Redémarrer le chat","header.close-chat":"Minimiser le chat"},jR={"message-input-label":"Input dell'utente","message-input-placeholder":"Messaggio","message-input.actions.submit.label":"Invia messaggio","message-input.actions.export-transcript.label":"Esportare la conversazione","message-input.actions.start-audio-recording.label":"Avviare l'input vocale","message-input.actions.stop-audio-recording.label":"Interrompere l'input vocale","message-input.actions.submit-audio-recording.label":"Trasmettere l'input vocale","guest-bubble.label":"Il tuo messaggio","bot-bubble.label":"Messaggio del chatbot","agent-bubble.label":"Messaggio dell'agente dal vivo","export-transcript.email.title":"Ricevere la conversazione","export-transcript.email.description":"Inserisci il tuo indirizzo e-mail per ricevere la cronologia della chat.","export-transcript.email.cancel":"Annulla","export-transcript.email.send":"Invia","export-transcript.email.placeholder":"Il tuo indirizzo e-mail","export-transcript.email.invalid":"Inserire un indirizzo e-mail valido.","export-transcript.email.success":"Ho inviato la cronologia della chat al vostro indirizzo e-mail.","export-transcript.pdf.title":"Ricevi la conversazione come PDF","export-transcript.pdf.description":"Scarica questa conversazione in PDF.","export-transcript.pdf.cancel":"Annulla","export-transcript.pdf.download":"Scaricare","general-conditions.header":"**Condizioni di utilizzo**","general-conditions.body":`Si prega di considerare i seguenti punti:
|
|
101
101
|
|
|
102
102
|
- La cronologia delle chat è memorizzata nell'area UE e può essere visualizzata solo da persone autorizzate.
|
|
103
|
-
- 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.","problem-report.action.mark":"Segna come errato","problem-report.action.unmark":"Rimuovere il marcatore","block-user-input.title":"Attendere la risposta del chatbot.","conversation-rating.call-to-action.title":"Valuta questa chat","conversation-rating.overlay.title":"Quanto sei soddisfatto di questa chat?","conversation-rating.overlay.guest-feedback.input-placeholder":"Inserisci qui il tuo feedback (opzionale)","conversation-rating.overlay.star.very-bad":"Molto male","conversation-rating.overlay.star.very-good":"Molto buono","conversation-rating.overlay.bot-message.rate-feedback.value-1":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-2":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-3":"La media non è il mio obiettivo, cosa posso ancora migliorare?","conversation-rating.overlay.bot-message.rate-feedback.value-4":"Anche l'assenza è finita. Cosa posso migliorare per ottenere tutte le stelle la prossima volta?","conversation-rating.overlay.bot-message.rate-feedback.value-5":"Perfetto! Allora spero di potervi consigliare ancora una volta bene.","conversation-rating.overlay.bot-message.submit-feedback":"Grazie mille per il feedback. Mi impegno costantemente per migliorare.","conversation-rating.overlay.action.submit":"Invia","conversation-rating.overlay.action.close":"Chiudere","start-screen.intro":"","start-screen.start-chat":"Avviare la chat","header.restart-chat":"Riavviare la chat","header.close-chat":"Ridurre al minimo la chat"},zR=["de","en","fr","it"],yv={locale:"de",messages:gv},UR=(e,t)=>{if(zR.includes(e)){const n=$R(e),r=MR.dot(t);return{...n,...r}}return t},$R=e=>{switch(e.toString()){case"en":return LR;case"fr":return BR;case"it":return jR;default:return gv}},HR=(e=GR,t)=>{switch(t.type){case Zc:return Object.assign({},e,{connectionState:jn.CONNECTING});case Jc:return Object.assign({},e,{connectionState:jn.CONNECTED});case ef:return Object.assign({},e,{connectionState:jn.DISCONNECTED});case tf:return Object.assign({},e,{connectionState:jn.RECONNECTED});case nf:return Object.assign({},e,{sessionId:t.sessionId});case qs:return Object.assign({},e,{sessionId:t.payload.sessionId,userId:t.payload.userId});case Xs:return Object.assign({},e,{sessionId:void 0});default:return e}},GR={connectionState:jn.DISCONNECTED,sessionId:void 0,userId:void 0},VR=(e=Vh,t)=>{switch(t.type){case Iy:return Vh;case qs:return sr({type:"webclient.chat.started"}),e;case Xs:return sr({type:"webclient.chat.ended"}),e;case j.ActionTypes.TYPING_ON:return Object.assign({},e,{isBotTyping:!0});case j.ActionTypes.TYPING_OFF:return Object.assign({},e,{isBotTyping:!1});case j.ActionTypes.MESSAGE_FROM_GUEST:case j.ActionTypes.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return Gh(e,t.message);case j.ActionTypes.MESSAGE_TO_GUEST:sr(t);const n=Object.assign({},t.message,{_id:t.meta.actionId}),r=e.messages.filter(l=>l._id===t.meta.actionId).length>0;return Object.assign({},e,{isBotTyping:!1,messages:r?e.messages:e.messages.concat([n]),quickReplies:n.quickReplies?n.quickReplies:[]});case zc:{const l=t.messages,u=l.length?l[l.length-1]:void 0;return Object.assign({},e,{isBotTyping:!1,messages:l,quickReplies:(u==null?void 0:u.quickReplies)||[]})}case $s:return sr(t.message),e;case j.ActionTypes.EVENT_TO_GUEST:return sr(t.event),e;case j.ActionTypes.DRAWER_OPEN:return Object.assign({},e,{drawerContentUrl:t.payload.contentUrl});case j.ActionTypes.DRAWER_CLOSE:return Object.assign({},e,{drawerContentUrl:void 0});case j.ActionTypes.GUEST_LOCALE_CHANGED:return Object.assign({},e,{locale:t.payload.locale});case py:return sr(t),e;case $c:return Object.assign({},e,{speechSupport:!0});case Hc:return Object.assign({},e,{problemReportingEnabled:!0});case Vc:const i=new j.TextMessage(t.transcription,new j.GuestUser),o=Object.assign({},i,{_id:crypto.randomUUID()});return Gh(e,o);case Gc:return Object.assign({},e,{transcriptExportEnabled:t.methods});case Wc:return Object.assign({},e,{showGeneralConditions:!0});case j.ActionTypes.PROBLEM_REPORT_FROM_GUEST:const s=e.messages.map(l=>l._id===t.payload.actionId?Object.assign({},l,{problemReport:t.payload.problem}):l);return Object.assign({},e,{messages:s});case qc:const a={enabled:!0,rating:t.payload.rating};return Object.assign({},e,{conversationRating:a});case j.ActionTypes.CONVERSATION_RATING_FROM_GUEST:{const l={...e.conversationRating,rating:t.payload};return Object.assign({},e,{conversationRating:l})}default:return e}},Gh=(e,t)=>{const n=e.messages[e.messages.length-1],r=(n==null?void 0:n.text)===t.text;return n&&n.sender.type===t.sender.type&&r?e:Object.assign({},e,{messages:e.messages.concat([t]),quickReplies:[]})},sr=e=>{var t;WR()?(t=window.top)==null||t.postMessage(e,"*"):e.type==="webclient.change.url"&&window.open(e.url)},WR=()=>typeof window<"u"&&window.self!==window.top,Vh={messages:[],quickReplies:[],isBotTyping:!1,speechSupport:!1,problemReportingEnabled:!1,transcriptExportEnabled:{pdf:!1,email:!1},showGeneralConditions:!1,conversationRating:{enabled:!1}},vv=Ay({name:"intl",initialState:yv,reducers:{updateIntl:(e,t)=>{e.locale=t.payload.language,e.messages=t.payload.messages}}}),{updateIntl:qR}=vv.actions,XR=vv.reducer,QR=_y({chat:VR,startScreen:Kb,connection:HR,intl:XR}),_v="bf-webclient-state-last-saved-at",Ev="bf-webclient-state",KR=e=>{try{if(!JR())return;const t=Wh(e,_v);if(ZR(t))return;{const n=Wh(e,Ev);return n===null?void 0:JSON.parse(n)}}catch(t){console.error(t);return}},YR=(e,t)=>{try{const n=JSON.stringify(t);qh(e,Ev,n);let r=new Date().toISOString();qh(e,_v,r)}catch(n){console.error(n)}},ZR=e=>{if(e===null)return!1;let t=new Date(e);return t.setHours(t.getHours()+12),new Date>t},JR=()=>typeof localStorage<"u",Wh=(e,t)=>localStorage.getItem(`${e}_${t}`),qh=(e,t,n)=>localStorage.setItem(`${e}_${t}`,n),Lt=Object.create(null);Lt.open="0";Lt.close="1";Lt.ping="2";Lt.pong="3";Lt.message="4";Lt.upgrade="5";Lt.noop="6";const Mo=Object.create(null);Object.keys(Lt).forEach(e=>{Mo[Lt[e]]=e});const pu={type:"error",data:"parser error"},Sv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",wv=typeof ArrayBuffer=="function",bv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hf=({type:e,data:t},n,r)=>Sv&&t instanceof Blob?n?r(t):Xh(t,r):wv&&(t instanceof ArrayBuffer||bv(t))?n?r(t):Xh(new Blob([t]),r):r(Lt[e]+(t||"")),Xh=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Qh(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let qa;function eN(e,t){if(Sv&&e.data instanceof Blob)return e.data.arrayBuffer().then(Qh).then(t);if(wv&&(e.data instanceof ArrayBuffer||bv(e.data)))return t(Qh(e.data));hf(e,!1,n=>{qa||(qa=new TextEncoder),t(qa.encode(n))})}const Kh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",li=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Kh.length;e++)li[Kh.charCodeAt(e)]=e;const tN=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r<n;r+=4)o=li[e.charCodeAt(r)],s=li[e.charCodeAt(r+1)],a=li[e.charCodeAt(r+2)],l=li[e.charCodeAt(r+3)],f[i++]=o<<2|s>>4,f[i++]=(s&15)<<4|a>>2,f[i++]=(a&3)<<6|l&63;return u},nN=typeof ArrayBuffer=="function",pf=(e,t)=>{if(typeof e!="string")return{type:"message",data:xv(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:rN(e.substring(1),t)}:Mo[n]?e.length>1?{type:Mo[n],data:e.substring(1)}:{type:Mo[n]}:pu},rN=(e,t)=>{if(nN){const n=tN(e);return xv(n,t)}else return{base64:!0,data:e}},xv=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Tv="",iN=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{hf(o,!1,a=>{r[s]=a,++i===n&&t(r.join(Tv))})})},oN=(e,t)=>{const n=e.split(Tv),r=[];for(let i=0;i<n.length;i++){const o=pf(n[i],t);if(r.push(o),o.type==="error")break}return r};function sN(){return new TransformStream({transform(e,t){eN(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Xa;function vo(e){return e.reduce((t,n)=>t+n.length,0)}function _o(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function aN(e,t){Xa||(Xa=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(r===0){if(vo(n)<1)break;const l=_o(n,1);o=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(vo(n)<2)break;const l=_o(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(vo(n)<8)break;const l=_o(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),f=u.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(pu);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(vo(n)<i)break;const l=_o(n,i);a.enqueue(pf(o?l:Xa.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(pu);break}}}})}const Cv=4;function de(e){if(e)return lN(e)}function lN(e){for(var t in de.prototype)e[t]=de.prototype[t];return e}de.prototype.on=de.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};de.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};de.prototype.off=de.prototype.removeListener=de.prototype.removeAllListeners=de.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};de.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};de.prototype.emitReserved=de.prototype.emit;de.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};de.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Js=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),et=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),uN="arraybuffer";function kv(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const cN=et.setTimeout,fN=et.clearTimeout;function ea(e,t){t.useNativeTimers?(e.setTimeoutFn=cN.bind(et),e.clearTimeoutFn=fN.bind(et)):(e.setTimeoutFn=et.setTimeout.bind(et),e.clearTimeoutFn=et.clearTimeout.bind(et))}const dN=1.33;function hN(e){return typeof e=="string"?pN(e):Math.ceil((e.byteLength||e.size)*dN)}function pN(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Ov(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function mN(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function gN(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class yN extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class mf extends de{constructor(t){super(),this.writable=!1,ea(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new yN(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=pf(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=mN(t);return n.length?"?"+n:""}}class vN extends mf{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};oN(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,iN(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Ov()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Rv=!1;try{Rv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const _N=Rv;function EN(){}class SN extends vN{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ft extends de{constructor(t,n,r){super(),this.createRequest=t,ea(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=kv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Ft.requestsCount++,Ft.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=EN,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ft.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Ft.requestsCount=0;Ft.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Yh);else if(typeof addEventListener=="function"){const e="onpagehide"in et?"pagehide":"unload";addEventListener(e,Yh,!1)}}function Yh(){for(let e in Ft.requests)Ft.requests.hasOwnProperty(e)&&Ft.requests[e].abort()}const wN=function(){const e=Nv({xdomain:!1});return e&&e.responseType!==null}();class bN extends SN{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=wN&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ft(Nv,this.uri(),t)}}function Nv(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||_N))return new XMLHttpRequest}catch{}if(!t)try{return new et[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Av=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class xN extends mf{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Av?{}:kv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;hf(r,this.supportsBinary,o=>{try{this.doWrite(r,o)}catch{}i&&Js(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Ov()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Qa=et.WebSocket||et.MozWebSocket;class TN extends xN{createSocket(t,n,r){return Av?new Qa(t,n,r):n?new Qa(t,n):new Qa(t)}doWrite(t,n){this.ws.send(n)}}class CN extends mf{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=aN(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=sN();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Js(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const kN={websocket:TN,webtransport:CN,polling:bN},ON=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,RN=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mu(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=ON.exec(e||""),o={},s=14;for(;s--;)o[RN[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=NN(o,o.path),o.queryKey=AN(o,o.query),o}function NN(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function AN(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}const gu=typeof addEventListener=="function"&&typeof removeEventListener=="function",Lo=[];gu&&addEventListener("offline",()=>{Lo.forEach(e=>e())},!1);class _n extends de{constructor(t,n){if(super(),this.binaryType=uN,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=mu(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=mu(n.host).host);ea(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),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},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=gN(this.opts.query)),gu&&(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"})},Lo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Cv,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&_n.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",_n.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),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 t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=hN(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Js(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(_n.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){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(),gu&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Lo.indexOf(this._offlineEventListener);r!==-1&&Lo.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}_n.protocol=Cv;class PN extends _n{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;_n.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;_n.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const c=new Error("probe error");c.transport=n.name,this.emitReserved("upgradeError",c)}}))};function o(){r||(r=!0,f(),n.close(),n=null)}const s=h=>{const c=new Error("probe error: "+h);c.transport=n.name,o(),this.emitReserved("upgradeError",c)};function a(){s("transport closed")}function l(){s("socket closed")}function u(h){n&&h.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let IN=class extends PN{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>kN[i]).filter(i=>!!i)),super(t,r)}};function DN(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=mu(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const FN=typeof ArrayBuffer=="function",MN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Pv=Object.prototype.toString,LN=typeof Blob=="function"||typeof Blob<"u"&&Pv.call(Blob)==="[object BlobConstructor]",BN=typeof File=="function"||typeof File<"u"&&Pv.call(File)==="[object FileConstructor]";function gf(e){return FN&&(e instanceof ArrayBuffer||MN(e))||LN&&e instanceof Blob||BN&&e instanceof File}function Bo(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Bo(e[n]))return!0;return!1}if(gf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Bo(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Bo(e[n]))return!0;return!1}function jN(e){const t=[],n=e.data,r=e;return r.data=yu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function yu(e,t){if(!e)return e;if(gf(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=yu(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=yu(e[r],t));return n}return e}function zN(e,t){return e.data=vu(e.data,t),delete e.attachments,e}function vu(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=vu(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=vu(e[n],t));return e}const UN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],$N=5;var $;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})($||($={}));class HN{constructor(t){this.replacer=t}encode(t){return(t.type===$.EVENT||t.type===$.ACK)&&Bo(t)?this.encodeAsBinary({type:t.type===$.EVENT?$.BINARY_EVENT:$.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===$.BINARY_EVENT||t.type===$.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=jN(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Zh(e){return Object.prototype.toString.call(e)==="[object Object]"}class yf extends de{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===$.BINARY_EVENT;r||n.type===$.BINARY_ACK?(n.type=r?$.EVENT:$.ACK,this.reconstructor=new GN(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(gf(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if($[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===$.BINARY_EVENT||r.type===$.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(o,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(yf.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case $.CONNECT:return Zh(n);case $.DISCONNECT:return n===void 0;case $.CONNECT_ERROR:return typeof n=="string"||Zh(n);case $.EVENT:case $.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&UN.indexOf(n[0])===-1);case $.ACK:case $.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class GN{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=zN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const VN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:yf,Encoder:HN,get PacketType(){return $},protocol:$N},Symbol.toStringTag,{value:"Module"}));function pt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const WN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Iv extends de{constructor(t,n,r){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=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[pt(t,"open",this.onopen.bind(this)),pt(t,"packet",this.onpacket.bind(this)),pt(t,"error",this.onerror.bind(this)),pt(t,"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(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,o;if(WN.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:$.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,h=n.pop();this._registerAckCallback(f,h),s.id=f}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),s=(...a)=>{this.io.clearTimeoutFn(o),n.apply(this,a)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,i)=>{const o=(s,a)=>s?i(s):r(a);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:$.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case $.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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 $.EVENT:case $.BINARY_EVENT:this.onevent(t);break;case $.ACK:case $.BINARY_ACK:this.onack(t);break;case $.DISCONNECT:this.ondisconnect();break;case $.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:$.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:$.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function jr(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}jr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};jr.prototype.reset=function(){this.attempts=0};jr.prototype.setMin=function(e){this.ms=e};jr.prototype.setMax=function(e){this.max=e};jr.prototype.setJitter=function(e){this.jitter=e};class _u extends de{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ea(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new jr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||VN;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new IN(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=pt(n,"open",function(){r.onopen(),t&&t()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=pt(n,"error",o);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(pt(t,"ping",this.onping.bind(this)),pt(t,"data",this.ondata.bind(this)),pt(t,"error",this.onerror.bind(this)),pt(t,"close",this.onclose.bind(this)),pt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Js(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Iv(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ti={};function jo(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=DN(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=ti[i]&&o in ti[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new _u(r,t):(ti[i]||(ti[i]=new _u(r,t)),l=ti[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(jo,{Manager:_u,Socket:Iv,io:jo,connect:jo});const qN=[j.ActionTypes.MESSAGE_TO_GUEST,j.ActionTypes.EVENT_TO_GUEST,j.ActionTypes.TYPING_ON,j.ActionTypes.TYPING_OFF,j.ActionTypes.RESTART_CHAT_REQUEST,...Zb,...qw,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],XN=({dispatch:e,getState:t})=>n=>{let r=null;return i=>{let o=n(i);if(i.type===Yc)r!=null&&r.disconnect(),e(tx()),r=jo(`/${i.clientName}/chat?${Cc.stringify(i.querystrings)}`),r.on("action",e),r.on("connect",()=>e(nx())),r.on("disconnect",()=>e(rx())),r.on("reconnect",()=>e(ix())),r.on("set-use-start-screen",s=>{e(s?Wb():qb())}),r.on("set-translations",(s,a)=>{e(qR({language:s,messages:UR(s,a)}))}),r.on("enable-speech-support",()=>e(Qw())),r.on("enable-problem-reporting",()=>e(Kw())),r.on("enable-transcript-export",s=>e(Zw(s))),r.on("enable-conversation-rating",s=>e(nb(s))),r.on("speech-transcription",s=>e(Yw(s))),r.on("restore-client-state",s=>{e(ex(s.sessionId)),e(ib(s.messages))}),r.on("expand-window",({devices:s})=>e({type:py,devices:s})),r.on("show-general-conditions",()=>e(eb())),r.on("restart-chat",()=>{e(rf(i.clientName,i.querystrings))});else if(i.type===qs)r==null||r.emit("start-chat",i.payload);else if(i.type===Xs)r==null||r.emit("terminate-session",i.payload);else if(i.type===Ww)r==null||r.emit("get-started",JSON.stringify(i));else if(i.type===Uc)r==null||r.emit("audio-message",i.buffer);else if(i.type===j.ActionTypes.CONVERSATION_RATING_FROM_GUEST)r==null||r.emit("conversation-rating",i.payload);else if(i.type===my){const{connection:{sessionId:s}}=t();window.location.href=`/transcript-pdf/${s}`}else qN.indexOf(i.type)===-1&&i.meta===void 0&&r&&r.emit("action",JSON.stringify(i));return o}},Dv=Yg(),QN={...KR(Dv),intl:yv},Eu=Ib({middleware:e=>e().concat(XN),reducer:QR,preloadedState:QN});Eu.subscribe(AR(()=>{const e=Eu.getState();YR(Dv,{connection:e.connection,startScreen:e.startScreen})},1e3));const KN=document.getElementById("root"),YN=fg(KN);YN.render(v.jsx(pE,{store:Eu,children:v.jsx(CO,{})}));
|
|
104
|
-
//# sourceMappingURL=index-
|
|
103
|
+
- 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.","problem-report.action.mark":"Segna come errato","problem-report.action.unmark":"Rimuovere il marcatore","block-user-input.title":"Attendere la risposta del chatbot.","conversation-rating.call-to-action.title":"Valuta questa chat","conversation-rating.overlay.title":"Quanto sei soddisfatto di questa chat?","conversation-rating.overlay.guest-feedback.input-placeholder":"Inserisci qui il tuo feedback (opzionale)","conversation-rating.overlay.star.very-bad":"Molto male","conversation-rating.overlay.star.very-good":"Molto buono","conversation-rating.overlay.bot-message.rate-feedback.value-1":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-2":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-3":"La media non è il mio obiettivo, cosa posso ancora migliorare?","conversation-rating.overlay.bot-message.rate-feedback.value-4":"Anche l'assenza è finita. Cosa posso migliorare per ottenere tutte le stelle la prossima volta?","conversation-rating.overlay.bot-message.rate-feedback.value-5":"Perfetto! Allora spero di potervi consigliare ancora una volta bene.","conversation-rating.overlay.bot-message.submit-feedback":"Grazie mille per il feedback. Mi impegno costantemente per migliorare.","conversation-rating.overlay.action.submit":"Invia","conversation-rating.overlay.action.close":"Chiudere","start-screen.intro":"","start-screen.start-chat":"Avviare la chat","header.restart-chat":"Riavviare la chat","header.close-chat":"Ridurre al minimo la chat"},zR=["de","en","fr","it"],yv={locale:"de",messages:gv},UR=(e,t)=>{if(zR.includes(e)){const n=$R(e),r=MR.dot(t);return{...n,...r}}return t},$R=e=>{switch(e.toString()){case"en":return LR;case"fr":return BR;case"it":return jR;default:return gv}},HR=(e=GR,t)=>{switch(t.type){case Zc:return Object.assign({},e,{connectionState:jn.CONNECTING});case Jc:return Object.assign({},e,{connectionState:jn.CONNECTED});case ef:return Object.assign({},e,{connectionState:jn.DISCONNECTED});case tf:return Object.assign({},e,{connectionState:jn.RECONNECTED});case nf:return Object.assign({},e,{sessionId:t.sessionId});case qs:return Object.assign({},e,{sessionId:t.payload.sessionId,userId:t.payload.userId});case Xs:return Object.assign({},e,{sessionId:void 0});default:return e}},GR={connectionState:jn.DISCONNECTED,sessionId:void 0,userId:void 0},VR=(e=Vh,t)=>{switch(t.type){case Iy:return Vh;case qs:return sr({type:"webclient.chat.started"}),e;case Xs:return sr({type:"webclient.chat.ended"}),e;case j.ActionTypes.TYPING_ON:return Object.assign({},e,{isBotTyping:!0});case j.ActionTypes.TYPING_OFF:return Object.assign({},e,{isBotTyping:!1});case j.ActionTypes.MESSAGE_FROM_GUEST:case j.ActionTypes.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return Gh(e,t.message);case j.ActionTypes.MESSAGE_TO_GUEST:sr(t);const n=Object.assign({},t.message,{_id:t.meta.actionId}),r=e.messages.filter(l=>l._id===t.meta.actionId).length>0;return Object.assign({},e,{isBotTyping:!1,messages:r?e.messages:e.messages.concat([n]),quickReplies:n.quickReplies?n.quickReplies:[]});case zc:{const l=t.messages,u=l.length?l[l.length-1]:void 0;return Object.assign({},e,{isBotTyping:!1,messages:l,quickReplies:(u==null?void 0:u.quickReplies)||[]})}case $s:return sr(t.message),e;case j.ActionTypes.EVENT_TO_GUEST:return sr(t.event),e;case j.ActionTypes.DRAWER_OPEN:return Object.assign({},e,{drawerContentUrl:t.payload.parameters.contentUrl});case j.ActionTypes.DRAWER_CLOSE:return Object.assign({},e,{drawerContentUrl:void 0});case j.ActionTypes.GUEST_LOCALE_CHANGED:return Object.assign({},e,{locale:t.payload.locale});case py:return sr(t),e;case $c:return Object.assign({},e,{speechSupport:!0});case Hc:return Object.assign({},e,{problemReportingEnabled:!0});case Vc:const i=new j.TextMessage(t.transcription,new j.GuestUser),o=Object.assign({},i,{_id:crypto.randomUUID()});return Gh(e,o);case Gc:return Object.assign({},e,{transcriptExportEnabled:t.methods});case Wc:return Object.assign({},e,{showGeneralConditions:!0});case j.ActionTypes.PROBLEM_REPORT_FROM_GUEST:const s=e.messages.map(l=>l._id===t.payload.actionId?Object.assign({},l,{problemReport:t.payload.problem}):l);return Object.assign({},e,{messages:s});case qc:const a={enabled:!0,rating:t.payload.rating};return Object.assign({},e,{conversationRating:a});case j.ActionTypes.CONVERSATION_RATING_FROM_GUEST:{const l={...e.conversationRating,rating:t.payload};return Object.assign({},e,{conversationRating:l})}default:return e}},Gh=(e,t)=>{const n=e.messages[e.messages.length-1],r=(n==null?void 0:n.text)===t.text;return n&&n.sender.type===t.sender.type&&r?e:Object.assign({},e,{messages:e.messages.concat([t]),quickReplies:[]})},sr=e=>{var t;WR()?(t=window.top)==null||t.postMessage(e,"*"):e.type==="webclient.change.url"&&window.open(e.url)},WR=()=>typeof window<"u"&&window.self!==window.top,Vh={messages:[],quickReplies:[],isBotTyping:!1,speechSupport:!1,problemReportingEnabled:!1,transcriptExportEnabled:{pdf:!1,email:!1},showGeneralConditions:!1,conversationRating:{enabled:!1}},vv=Ay({name:"intl",initialState:yv,reducers:{updateIntl:(e,t)=>{e.locale=t.payload.language,e.messages=t.payload.messages}}}),{updateIntl:qR}=vv.actions,XR=vv.reducer,QR=_y({chat:VR,startScreen:Kb,connection:HR,intl:XR}),_v="bf-webclient-state-last-saved-at",Ev="bf-webclient-state",KR=e=>{try{if(!JR())return;const t=Wh(e,_v);if(ZR(t))return;{const n=Wh(e,Ev);return n===null?void 0:JSON.parse(n)}}catch(t){console.error(t);return}},YR=(e,t)=>{try{const n=JSON.stringify(t);qh(e,Ev,n);let r=new Date().toISOString();qh(e,_v,r)}catch(n){console.error(n)}},ZR=e=>{if(e===null)return!1;let t=new Date(e);return t.setHours(t.getHours()+12),new Date>t},JR=()=>typeof localStorage<"u",Wh=(e,t)=>localStorage.getItem(`${e}_${t}`),qh=(e,t,n)=>localStorage.setItem(`${e}_${t}`,n),Lt=Object.create(null);Lt.open="0";Lt.close="1";Lt.ping="2";Lt.pong="3";Lt.message="4";Lt.upgrade="5";Lt.noop="6";const Mo=Object.create(null);Object.keys(Lt).forEach(e=>{Mo[Lt[e]]=e});const pu={type:"error",data:"parser error"},Sv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",wv=typeof ArrayBuffer=="function",bv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hf=({type:e,data:t},n,r)=>Sv&&t instanceof Blob?n?r(t):Xh(t,r):wv&&(t instanceof ArrayBuffer||bv(t))?n?r(t):Xh(new Blob([t]),r):r(Lt[e]+(t||"")),Xh=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Qh(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let qa;function eN(e,t){if(Sv&&e.data instanceof Blob)return e.data.arrayBuffer().then(Qh).then(t);if(wv&&(e.data instanceof ArrayBuffer||bv(e.data)))return t(Qh(e.data));hf(e,!1,n=>{qa||(qa=new TextEncoder),t(qa.encode(n))})}const Kh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",li=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Kh.length;e++)li[Kh.charCodeAt(e)]=e;const tN=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r<n;r+=4)o=li[e.charCodeAt(r)],s=li[e.charCodeAt(r+1)],a=li[e.charCodeAt(r+2)],l=li[e.charCodeAt(r+3)],f[i++]=o<<2|s>>4,f[i++]=(s&15)<<4|a>>2,f[i++]=(a&3)<<6|l&63;return u},nN=typeof ArrayBuffer=="function",pf=(e,t)=>{if(typeof e!="string")return{type:"message",data:xv(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:rN(e.substring(1),t)}:Mo[n]?e.length>1?{type:Mo[n],data:e.substring(1)}:{type:Mo[n]}:pu},rN=(e,t)=>{if(nN){const n=tN(e);return xv(n,t)}else return{base64:!0,data:e}},xv=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Tv="",iN=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{hf(o,!1,a=>{r[s]=a,++i===n&&t(r.join(Tv))})})},oN=(e,t)=>{const n=e.split(Tv),r=[];for(let i=0;i<n.length;i++){const o=pf(n[i],t);if(r.push(o),o.type==="error")break}return r};function sN(){return new TransformStream({transform(e,t){eN(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Xa;function vo(e){return e.reduce((t,n)=>t+n.length,0)}function _o(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function aN(e,t){Xa||(Xa=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(r===0){if(vo(n)<1)break;const l=_o(n,1);o=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(vo(n)<2)break;const l=_o(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(vo(n)<8)break;const l=_o(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),f=u.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(pu);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(vo(n)<i)break;const l=_o(n,i);a.enqueue(pf(o?l:Xa.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(pu);break}}}})}const Cv=4;function de(e){if(e)return lN(e)}function lN(e){for(var t in de.prototype)e[t]=de.prototype[t];return e}de.prototype.on=de.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};de.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};de.prototype.off=de.prototype.removeListener=de.prototype.removeAllListeners=de.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};de.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};de.prototype.emitReserved=de.prototype.emit;de.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};de.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Js=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),et=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),uN="arraybuffer";function kv(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const cN=et.setTimeout,fN=et.clearTimeout;function ea(e,t){t.useNativeTimers?(e.setTimeoutFn=cN.bind(et),e.clearTimeoutFn=fN.bind(et)):(e.setTimeoutFn=et.setTimeout.bind(et),e.clearTimeoutFn=et.clearTimeout.bind(et))}const dN=1.33;function hN(e){return typeof e=="string"?pN(e):Math.ceil((e.byteLength||e.size)*dN)}function pN(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Ov(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function mN(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function gN(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class yN extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class mf extends de{constructor(t){super(),this.writable=!1,ea(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new yN(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=pf(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=mN(t);return n.length?"?"+n:""}}class vN extends mf{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};oN(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,iN(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Ov()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Rv=!1;try{Rv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const _N=Rv;function EN(){}class SN extends vN{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ft extends de{constructor(t,n,r){super(),this.createRequest=t,ea(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=kv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Ft.requestsCount++,Ft.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=EN,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ft.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Ft.requestsCount=0;Ft.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Yh);else if(typeof addEventListener=="function"){const e="onpagehide"in et?"pagehide":"unload";addEventListener(e,Yh,!1)}}function Yh(){for(let e in Ft.requests)Ft.requests.hasOwnProperty(e)&&Ft.requests[e].abort()}const wN=function(){const e=Nv({xdomain:!1});return e&&e.responseType!==null}();class bN extends SN{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=wN&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ft(Nv,this.uri(),t)}}function Nv(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||_N))return new XMLHttpRequest}catch{}if(!t)try{return new et[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Av=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class xN extends mf{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Av?{}:kv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;hf(r,this.supportsBinary,o=>{try{this.doWrite(r,o)}catch{}i&&Js(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Ov()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Qa=et.WebSocket||et.MozWebSocket;class TN extends xN{createSocket(t,n,r){return Av?new Qa(t,n,r):n?new Qa(t,n):new Qa(t)}doWrite(t,n){this.ws.send(n)}}class CN extends mf{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=aN(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=sN();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Js(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const kN={websocket:TN,webtransport:CN,polling:bN},ON=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,RN=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mu(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=ON.exec(e||""),o={},s=14;for(;s--;)o[RN[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=NN(o,o.path),o.queryKey=AN(o,o.query),o}function NN(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function AN(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}const gu=typeof addEventListener=="function"&&typeof removeEventListener=="function",Lo=[];gu&&addEventListener("offline",()=>{Lo.forEach(e=>e())},!1);class _n extends de{constructor(t,n){if(super(),this.binaryType=uN,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=mu(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=mu(n.host).host);ea(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),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},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=gN(this.opts.query)),gu&&(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"})},Lo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Cv,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&_n.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",_n.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),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 t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=hN(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Js(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(_n.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){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(),gu&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Lo.indexOf(this._offlineEventListener);r!==-1&&Lo.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}_n.protocol=Cv;class PN extends _n{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;_n.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;_n.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const c=new Error("probe error");c.transport=n.name,this.emitReserved("upgradeError",c)}}))};function o(){r||(r=!0,f(),n.close(),n=null)}const s=h=>{const c=new Error("probe error: "+h);c.transport=n.name,o(),this.emitReserved("upgradeError",c)};function a(){s("transport closed")}function l(){s("socket closed")}function u(h){n&&h.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let IN=class extends PN{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>kN[i]).filter(i=>!!i)),super(t,r)}};function DN(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=mu(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const FN=typeof ArrayBuffer=="function",MN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Pv=Object.prototype.toString,LN=typeof Blob=="function"||typeof Blob<"u"&&Pv.call(Blob)==="[object BlobConstructor]",BN=typeof File=="function"||typeof File<"u"&&Pv.call(File)==="[object FileConstructor]";function gf(e){return FN&&(e instanceof ArrayBuffer||MN(e))||LN&&e instanceof Blob||BN&&e instanceof File}function Bo(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Bo(e[n]))return!0;return!1}if(gf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Bo(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Bo(e[n]))return!0;return!1}function jN(e){const t=[],n=e.data,r=e;return r.data=yu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function yu(e,t){if(!e)return e;if(gf(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=yu(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=yu(e[r],t));return n}return e}function zN(e,t){return e.data=vu(e.data,t),delete e.attachments,e}function vu(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=vu(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=vu(e[n],t));return e}const UN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],$N=5;var $;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})($||($={}));class HN{constructor(t){this.replacer=t}encode(t){return(t.type===$.EVENT||t.type===$.ACK)&&Bo(t)?this.encodeAsBinary({type:t.type===$.EVENT?$.BINARY_EVENT:$.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===$.BINARY_EVENT||t.type===$.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=jN(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Zh(e){return Object.prototype.toString.call(e)==="[object Object]"}class yf extends de{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===$.BINARY_EVENT;r||n.type===$.BINARY_ACK?(n.type=r?$.EVENT:$.ACK,this.reconstructor=new GN(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(gf(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if($[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===$.BINARY_EVENT||r.type===$.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(o,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(yf.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case $.CONNECT:return Zh(n);case $.DISCONNECT:return n===void 0;case $.CONNECT_ERROR:return typeof n=="string"||Zh(n);case $.EVENT:case $.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&UN.indexOf(n[0])===-1);case $.ACK:case $.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class GN{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=zN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const VN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:yf,Encoder:HN,get PacketType(){return $},protocol:$N},Symbol.toStringTag,{value:"Module"}));function pt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const WN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Iv extends de{constructor(t,n,r){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=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[pt(t,"open",this.onopen.bind(this)),pt(t,"packet",this.onpacket.bind(this)),pt(t,"error",this.onerror.bind(this)),pt(t,"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(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,o;if(WN.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:$.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,h=n.pop();this._registerAckCallback(f,h),s.id=f}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),s=(...a)=>{this.io.clearTimeoutFn(o),n.apply(this,a)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,i)=>{const o=(s,a)=>s?i(s):r(a);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:$.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case $.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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 $.EVENT:case $.BINARY_EVENT:this.onevent(t);break;case $.ACK:case $.BINARY_ACK:this.onack(t);break;case $.DISCONNECT:this.ondisconnect();break;case $.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:$.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:$.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function jr(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}jr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};jr.prototype.reset=function(){this.attempts=0};jr.prototype.setMin=function(e){this.ms=e};jr.prototype.setMax=function(e){this.max=e};jr.prototype.setJitter=function(e){this.jitter=e};class _u extends de{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ea(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new jr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||VN;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new IN(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=pt(n,"open",function(){r.onopen(),t&&t()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=pt(n,"error",o);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(pt(t,"ping",this.onping.bind(this)),pt(t,"data",this.ondata.bind(this)),pt(t,"error",this.onerror.bind(this)),pt(t,"close",this.onclose.bind(this)),pt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Js(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Iv(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ti={};function jo(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=DN(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=ti[i]&&o in ti[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new _u(r,t):(ti[i]||(ti[i]=new _u(r,t)),l=ti[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(jo,{Manager:_u,Socket:Iv,io:jo,connect:jo});const qN=[j.ActionTypes.MESSAGE_TO_GUEST,j.ActionTypes.EVENT_TO_GUEST,j.ActionTypes.TYPING_ON,j.ActionTypes.TYPING_OFF,j.ActionTypes.RESTART_CHAT_REQUEST,...Zb,...qw,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],XN=({dispatch:e,getState:t})=>n=>{let r=null;return i=>{let o=n(i);if(i.type===Yc)r!=null&&r.disconnect(),e(tx()),r=jo(`/${i.clientName}/chat?${Cc.stringify(i.querystrings)}`),r.on("action",e),r.on("connect",()=>e(nx())),r.on("disconnect",()=>e(rx())),r.on("reconnect",()=>e(ix())),r.on("set-use-start-screen",s=>{e(s?Wb():qb())}),r.on("set-translations",(s,a)=>{e(qR({language:s,messages:UR(s,a)}))}),r.on("enable-speech-support",()=>e(Qw())),r.on("enable-problem-reporting",()=>e(Kw())),r.on("enable-transcript-export",s=>e(Zw(s))),r.on("enable-conversation-rating",s=>e(nb(s))),r.on("speech-transcription",s=>e(Yw(s))),r.on("restore-client-state",s=>{e(ex(s.sessionId)),e(ib(s.messages))}),r.on("expand-window",({devices:s})=>e({type:py,devices:s})),r.on("show-general-conditions",()=>e(eb())),r.on("restart-chat",()=>{e(rf(i.clientName,i.querystrings))});else if(i.type===qs)r==null||r.emit("start-chat",i.payload);else if(i.type===Xs)r==null||r.emit("terminate-session",i.payload);else if(i.type===Ww)r==null||r.emit("get-started",JSON.stringify(i));else if(i.type===Uc)r==null||r.emit("audio-message",i.buffer);else if(i.type===j.ActionTypes.CONVERSATION_RATING_FROM_GUEST)r==null||r.emit("conversation-rating",i.payload);else if(i.type===my){const{connection:{sessionId:s}}=t();window.location.href=`/transcript-pdf/${s}`}else qN.indexOf(i.type)===-1&&i.meta===void 0&&r&&r.emit("action",JSON.stringify(i));return o}},Dv=Yg(),QN={...KR(Dv),intl:yv},Eu=Ib({middleware:e=>e().concat(XN),reducer:QR,preloadedState:QN});Eu.subscribe(AR(()=>{const e=Eu.getState();YR(Dv,{connection:e.connection,startScreen:e.startScreen})},1e3));const KN=document.getElementById("root"),YN=fg(KN);YN.render(v.jsx(pE,{store:Eu,children:v.jsx(CO,{})}));
|
|
104
|
+
//# sourceMappingURL=index-BMBcFG3H.js.map
|