@botfabrik/engine-webclient 4.57.2 → 4.57.3

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.
@@ -94,7 +94,7 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
94
94
 
95
95
  `,{_:p}));for(;typeof y[y.length-1]=="string"&&!y[y.length-1].trim();)y.pop();if(t.wrapper===null)return y;const E=t.wrapper||(p?"span":"div");let h;if(y.length>1||t.forceWrapper)h=y;else{if(y.length===1)return h=y[0],typeof h=="string"?r("span",{key:"outer"},h):h;h=null}return A.createElement(E,{key:"outer"},h)}function o(f){const p=f.match(Px);return p?p.reduce(function(y,E,h){const d=E.indexOf("=");if(d!==-1){const v=function(b){return b.indexOf("-")!==-1&&b.match(Wx)===null&&(b=b.replace(Kx,function(C,F){return F.toUpperCase()})),b}(E.slice(0,d)).trim(),S=function(b){const C=b[0];return(C==='"'||C==="'")&&b.length>=2&&b[b.length-1]===C?b.slice(1,-1):b}(E.slice(d+1).trim()),w=ah[v]||v,x=y[w]=function(b,C){return b==="style"?C.split(/;\s?/).reduce(function(F,P){const re=P.slice(0,P.indexOf(":"));return F[re.replace(/(-[a-z])/g,pe=>pe[1].toUpperCase())]=P.slice(re.length+1).trim(),F},{}):b==="href"?rr(C):(C.match(qx)&&(C=C.slice(1,C.length-1)),C==="true"||C!=="false"&&C)}(v,S);typeof x=="string"&&(fu.test(x)||du.test(x))&&(y[w]=A.cloneElement(i(x.trim()),{key:h}))}else E!=="style"&&(y[ah[E]||E]=!0);return y},{}):null}const s=[],a={},l={blockQuote:{t:Ht(Ay),i:U.HIGH,l:(f,p,y)=>({v:p(f[0].replace(Mx,""),y)}),h:(f,p,y)=>r("blockquote",{key:y.k},p(f.v,y))},breakLine:{t:Xr(Fx),i:U.HIGH,l:za,h:(f,p,y)=>r("br",{key:y.k})},breakThematic:{t:Ht(Lx),i:U.HIGH,l:za,h:(f,p,y)=>r("hr",{key:y.k})},codeBlock:{t:Ht(Iy),i:U.MAX,l:f=>({v:f[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(f,p,y)=>r("pre",{key:y.k},r("code",Bn({},f.O,{className:f.M?`lang-${f.M}`:""}),f.v))},codeFenced:{t:Ht(Py),i:U.MAX,l:f=>({O:o(f[3]||""),v:f[4],M:f[2]||void 0,type:"codeBlock"})},codeInline:{t:rn(Bx),i:U.LOW,l:f=>({v:f[2]}),h:(f,p,y)=>r("code",{key:y.k},f.v)},footnote:{t:Ht(zx),i:U.MAX,l:f=>(s.push({I:f[2],j:f[1]}),{}),h:Ha},footnoteReference:{t:nn(Hx),i:U.HIGH,l:f=>({v:f[1],B:`#${t.slugify(f[1])}`}),h:(f,p,y)=>r("a",{key:y.k,href:rr(f.B)},r("sup",{key:y.k},f.v))},gfmTask:{t:nn(Gx),i:U.HIGH,l:f=>({R:f[1].toLowerCase()==="x"}),h:(f,p,y)=>r("input",{checked:f.R,key:y.k,readOnly:!0,type:"checkbox"})},heading:{t:Ht(t.enforceAtxHeadings?My:Dy),i:U.HIGH,l:(f,p,y)=>({v:Bo(p,f[2],y),T:t.slugify(f[2]),C:f[1].length}),h:(f,p,y)=>r(`h${f.C}`,{id:f.T,key:y.k},p(f.v,y))},headingSetext:{t:Ht(Fy),i:U.MAX,l:(f,p,y)=>({v:Bo(p,f[1],y),C:f[2]==="="?1:2,type:"heading"})},htmlComment:{t:Xr(Ly),i:U.HIGH,l:()=>({}),h:Ha},image:{t:rn(xb),i:U.HIGH,l:f=>({D:f[1],B:hh(f[2]),F:f[3]}),h:(f,p,y)=>r("img",{key:y.k,alt:f.D||void 0,title:f.F||void 0,src:rr(f.B)})},link:{t:nn(wb),i:U.LOW,l:(f,p,y)=>({v:Rb(p,f[1],y),B:hh(f[2]),F:f[3]}),h:(f,p,y)=>r("a",{key:y.k,href:rr(f.B),title:f.F},p(f.v,y))},linkAngleBraceStyleDetector:{t:nn(Yx),i:U.MAX,l:f=>({v:[{v:f[1],type:"text"}],B:f[1],type:"link"})},linkBareUrlDetector:{t:(f,p)=>p.N?null:nn(Xx)(f,p),i:U.MAX,l:f=>({v:[{v:f[1],type:"text"}],B:f[1],F:void 0,type:"link"})},linkMailtoDetector:{t:nn(Qx),i:U.MAX,l(f){let p=f[1],y=f[1];return Ix.test(y)||(y="mailto:"+y),{v:[{v:p.replace("mailto:",""),type:"text"}],B:y,type:"link"}}},orderedList:ch(r,1),unorderedList:ch(r,2),newlineCoalescer:{t:Ht(jx),i:U.LOW,l:za,h:()=>`
96
96
  `},paragraph:{t:Ob,i:U.LOW,l:Ua,h:(f,p,y)=>r("p",{key:y.k},p(f.v,y))},ref:{t:nn(Zx),i:U.MAX,l:f=>(a[f[1]]={B:f[2],F:f[4]},{}),h:Ha},refImage:{t:rn(Jx),i:U.MAX,l:f=>({D:f[1]||void 0,P:f[2]}),h:(f,p,y)=>r("img",{key:y.k,alt:f.D,src:rr(a[f.P].B),title:a[f.P].F})},refLink:{t:nn(eb),i:U.MAX,l:(f,p,y)=>({v:p(f[1],y),Z:p(f[0].replace(tb,"\\$1"),y),P:f[2]}),h:(f,p,y)=>a[f.P]?r("a",{key:y.k,href:rr(a[f.P].B),title:a[f.P].F},p(f.v,y)):r("span",{key:y.k},p(f.Z,y))},table:{t:Ht(By),i:U.HIGH,l:kb,h:(f,p,y)=>r("table",{key:y.k},r("thead",null,r("tr",null,f.L.map(function(E,h){return r("th",{key:h,style:dh(f,h)},p(E,y))}))),r("tbody",null,f.A.map(function(E,h){return r("tr",{key:h},E.map(function(d,v){return r("td",{key:v,style:dh(f,v)},p(d,y))}))})))},tableSeparator:{t:function(f,p){return p.$?(p._=!0,ib.exec(f)):null},i:U.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Xr(mb),i:U.MIN,l:f=>({v:f[0].replace(Vx,(p,y)=>t.namedCodesToUnicode[y]?t.namedCodesToUnicode[y]:p)}),h:f=>f.v},textBolded:{t:rn(cb),i:U.MED,l:(f,p,y)=>({v:p(f[2],y)}),h:(f,p,y)=>r("strong",{key:y.k},p(f.v,y))},textEmphasized:{t:rn(fb),i:U.LOW,l:(f,p,y)=>({v:p(f[2],y)}),h:(f,p,y)=>r("em",{key:y.k},p(f.v,y))},textEscaped:{t:rn(pb),i:U.HIGH,l:f=>({v:f[1],type:"text"})},textMarked:{t:rn(db),i:U.LOW,l:Ua,h:(f,p,y)=>r("mark",{key:y.k},p(f.v,y))},textStrikethroughed:{t:rn(hb),i:U.LOW,l:Ua,h:(f,p,y)=>r("del",{key:y.k},p(f.v,y))}};t.disableParsingRawHTML!==!0&&(l.htmlBlock={t:Xr(fu),i:U.HIGH,l(f,p,y){const[,E]=f[3].match(yb),h=new RegExp(`^${E}`,"gm"),d=f[3].replace(h,""),v=(S=d,bb.some(C=>C.test(S))?Nb:Bo);var S;const w=f[1].toLowerCase(),x=Ax.indexOf(w)!==-1;y.N=y.N||w==="a";const b=x?f[3]:v(p,d,y);return y.N=!1,{O:o(f[2]),v:b,G:x,H:x?w:f[1]}},h:(f,p,y)=>r(f.H,Bn({key:y.k},f.O),f.G?f.v:p(f.v,y))},l.htmlSelfClosing={t:Xr(du),i:U.HIGH,l:f=>({O:o(f[2]||""),H:f[1]}),h:(f,p,y)=>r(f.H,Bn({},f.O,{key:y.k}))});const u=function(f){let p=Object.keys(f);function y(E,h){let d=[],v="";for(;E;){let S=0;for(;S<p.length;){const w=p[S],x=f[w],b=x.t(E,h,v);if(b){const C=b[0];E=E.substring(C.length);const F=x.l(b,y,h);F.type==null&&(F.type=w),d.push(F),v=C;break}S++}}return d}return p.sort(function(E,h){let d=f[E].i,v=f[h].i;return d!==v?d-v:E<h?-1:1}),function(E,h){return y(function(d){return d.replace(Ux,`
97
- `).replace($x,"").replace(rb," ")}(E),h)}}(l),c=(m=function(f){return function(p,y,E){return f[p.type].h(p,y,E)}}(l),function f(p,y={}){if(Array.isArray(p)){const E=y.k,h=[];let d=!1;for(let v=0;v<p.length;v++){y.k=v;const S=f(p[v],y),w=typeof S=="string";w&&d?h[h.length-1]+=S:S!==null&&h.push(S),d=w}return y.k=E,h}return m(p,f,y)});var m;const g=i(e);return s.length?r("div",null,g,r("footer",{key:"footer"},s.map(function(f){return r("div",{id:t.slugify(f.j),key:f.j},f.j,c(u(f.I,{_:!0})))}))):g}(function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"})(U||(U={}));const Gn=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,Nx);return A.cloneElement(Pb(t,n),r)};var Yy={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ph=St.createContext&&St.createContext(Yy),_n=function(){return _n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},_n.apply(this,arguments)},Ib=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Ky(e){return e&&e.map(function(t,n){return St.createElement(t.tag,_n({key:n},t.attr),Ky(t.child))})}function Zy(e){return function(t){return St.createElement(Db,_n({attr:_n({},e.attr)},t),Ky(e.child))}}function Db(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,s=Ib(e,["attr","size","title"]),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),St.createElement("svg",_n({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:_n(_n({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&St.createElement("title",null,o),e.children)};return ph!==void 0?St.createElement(ph.Consumer,null,function(n){return t(n)}):t(Yy)}function Mb(e){return Zy({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"}}]})(e)}function Fb(e){return Zy({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"}}]})(e)}const zt=()=>{const e=Ys();return n=>{const r=e.formatMessage({id:n});return r===n?void 0:r}},Lb="_generalConditionsContainer_1ijeb_1",Bb="_generalConditions_1ijeb_1",jb="_generalConditionsHeader_1ijeb_15",Ub="_generalConditionsBody_1ijeb_25",zb="_generalConditionsAccept_1ijeb_33",Qr={generalConditionsContainer:Lb,generalConditions:Bb,generalConditionsHeader:jb,generalConditionsBody:Ub,generalConditionsAccept:zb},Hb="general-conditions.header",$b="general-conditions.body",mh="general-conditions.accept-conditions-note",Gb=()=>{const e=zt(),[t,n]=A.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(Hb),s=e(mh);return _.jsxs("div",{className:R(Qr.generalConditionsContainer,"chat__generalConditions"),children:[!!(o!=null&&o.length)&&_.jsxs("div",{className:Qr.generalConditions,children:[_.jsxs("div",{role:"button",onClick:r,onKeyDown:i,tabIndex:0,className:R(Qr.generalConditionsHeader,"chat__generalConditions__header"),"aria-controls":"general-conditions-body","aria-expanded":t?"true":"false","aria-pressed":t?"true":"false",children:[_.jsx(Gn,{children:o}),t?_.jsx(Fb,{}):_.jsx(Mb,{})]}),_.jsx("div",{className:R(Qr.generalConditionsBody,"chat__generalConditions__body"),id:"general-conditions-body",role:"region",tabIndex:-1,children:t&&_.jsx(Gn,{children:e($b)||""})})]}),!!(s!=null&&s.length)&&_.jsx("div",{className:R(Qr.generalConditionsAccept,"chat__generalConditions__accept"),tabIndex:0,children:_.jsx(Gn,{children:e(mh)||""})})]})},Vb="_message_xtsrt_5",Wb="_messageBot_xtsrt_11",qb="_messageBotLast_xtsrt_15",Xb="_avatar_xtsrt_15",Qb="_messageBotFirst_xtsrt_19",Yb="_messageBotAnimated_xtsrt_32",Kb="_fadeInLeft_xtsrt_1",Zb="_messageGuest_xtsrt_43",Jb="_messageGuestFirst_xtsrt_49",eT="_messageGuestLast_xtsrt_55",tT="_botAvatar_xtsrt_69",nT="_agentAvatar_xtsrt_73",rT="_bubble_xtsrt_77",iT="_bubbleContent_xtsrt_83",oT="_bubbleLeft_xtsrt_168",sT="_leftText_xtsrt_177",aT="_bubbleRight_xtsrt_184",lT="_rightText_xtsrt_192",L={message:Vb,messageBot:Wb,messageBotLast:qb,avatar:Xb,messageBotFirst:Qb,messageBotAnimated:Yb,fadeInLeft:Kb,messageGuest:Zb,messageGuestFirst:Jb,messageGuestLast:eT,botAvatar:tT,agentAvatar:nT,bubble:rT,bubbleContent:iT,bubbleLeft:oT,leftText:sT,bubbleRight:aT,rightText:lT},uT="_problemReport_39r57_1",cT="_problemReportIcon_39r57_7",fT="_problemReportIconActive_39r57_13",dT="_problemReportIconInactive_39r57_21",Yr={problemReport:uT,problemReportIcon:cT,problemReportIconActive:fT,problemReportIconInactive:dT},hT=({reported:e,onReport:t})=>{const n=zt(),r=o=>()=>t(o),i=o=>s=>{s.key==="Enter"&&t(o)};return _.jsx("div",{className:Yr.problemReport,children:e?_.jsx("div",{role:"button",onClick:r(null),onKeyDown:i(null),tabIndex:0,className:R(Yr.problemReportIcon,"chat__problemReportIcon","chat_problemReportIcon",Yr.problemReportIconActive,"chat__problemReportIcon-active","chat_problemReportIcon-active"),children:_.jsx("img",{src:"problem-report-active.svg",title:n("problem-report.action.unmark"),alt:"Report"})}):_.jsx("div",{role:"button",onClick:r("unspecified"),onKeyDown:i("unspecified"),tabIndex:0,className:R(Yr.problemReportIcon,"chat_problemReportIcon",Yr.problemReportIconInactive,"chat_problemReportIcon-inactive"),children:_.jsx("img",{src:"problem-report-inactive.svg",title:n("problem-report.action.mark"),alt:"Report"})})})},Jy=A.forwardRef(({message:e,problemReportingEnabled:t,isAnimated:n,isFirstMessageBySender:r,isLastMessageBySender:i,children:o,onProblemReport:s},a)=>{var c;const l=zt(),u=e.sender.type===G.UserType.BOT;return _.jsxs("li",{ref:a,className:R(L.message,L.messageBot,r&&L.messageBotFirst,i&&L.messageBotLast,"chat__bubbleContainer",n&&L.messageBotAnimated,n&&"chat__bubbleContainer--animated",u?"chat__botBubbleContainer":"chat__agentBubbleContainer",r&&"chat__bubbleContainer--first",i&&"chat__bubbleContainer--last"),children:[_.jsx("img",{className:R(L.avatar,u?L.botAvatar:L.agentAvatar,"chat__avatar",u?"chat__botAvatar":"chat__agentAvatar"),src:`${e.sender.avatar}`,alt:u?"Bot":"Agent",referrerPolicy:"no-referrer"}),_.jsx("div",{className:R(L.bubble,L.bubbleLeft,"chat__bubble",u?"chat__botBubble":"chat__agentBubble"),tabIndex:0,"aria-label":l(u?"bot-bubble.label":"agent-bubble.label"),children:_.jsx("div",{className:R(L.leftText),children:o})}),t&&s&&_.jsx(hT,{reported:!!((c=e.problemReport)!=null&&c.length),onReport:s})]})}),pT="_button_9zudy_48",mT="_buttonDefault_9zudy_60",gT="_buttonPrimary_9zudy_74",Be={button:pT,buttonDefault:mT,buttonPrimary:gT},yT="_imageContainer_1rjya_1",vT="_title_1rjya_10",_T="_subtitle_1rjya_15",ET="_buttons_1rjya_20",ST="_button_1rjya_20",wT="_image_1rjya_1",xT="_video_container_1rjya_52",bT="_video_1rjya_52",TT="_only_1rjya_68",Le={imageContainer:yT,title:vT,subtitle:_T,buttons:ET,button:ST,image:wT,video_container:xT,video:bT,only:TT},CT=({buttons:e,onButtonClick:t})=>_.jsx("div",{className:R(Le.buttons,"chat__bubbleButtons"),children:e.map((n,r)=>_.jsx("button",{className:R(Le.button,Be.button,"chat__bubbleButton"),onClick:()=>t(n),children:n.title},r))});var ev={},of={},sf={};Object.defineProperty(sf,"__esModule",{value:!0});var kT=A,OT=RT(kT);function RT(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}sf.default=function(e,t,n){return OT.createElement("a",{href:e,key:n},t)};var af={};Object.defineProperty(af,"__esModule",{value:!0});af.default=function(e){return e};var lf={},Ga,gh;function NT(){return gh||(gh=1,Ga=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),Ga}var Va,yh;function AT(){return yh||(yh=1,Va=/[\0-\x1F\x7F-\x9F]/),Va}var Wa,vh;function PT(){return vh||(vh=1,Wa=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),Wa}var qa,_h;function IT(){return _h||(_h=1,qa=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/),qa}var Xa,Eh;function DT(){return Eh||(Eh=1,Xa=function(e){var t={};t.src_Any=NT().source,t.src_Cc=AT().source,t.src_Z=PT().source,t.src_P=IT().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}),Xa}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 ea(e){return Object.prototype.toString.call(e)}function MT(e){return ea(e)==="[object String]"}function FT(e){return ea(e)==="[object Object]"}function LT(e){return ea(e)==="[object RegExp]"}function Sh(e){return ea(e)==="[object Function]"}function BT(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var tv={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function jT(e){return Object.keys(e||{}).reduce(function(t,n){return t||tv.hasOwnProperty(n)},!1)}var UT={"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}}},zT="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]",HT="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function $T(e){e.__index__=-1,e.__text_cache__=""}function GT(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function wh(){return function(e,t){t.normalize(e)}}function gs(e){var t=e.re=DT()(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(zT),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,FT(l)){LT(l.validate)?u.validate=GT(l.validate):Sh(l.validate)?u.validate=l.validate:o(a,l),Sh(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=wh();return}if(MT(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:wh()};var s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(BT).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"),$T(e)}function VT(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 xh(e,t){var n=new VT(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function ct(e,t){if(!(this instanceof ct))return new ct(e,t);t||jT(e)&&(t=e,e={}),this.__opts__=hu({},tv,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=hu({},UT,e),this.__compiled__={},this.__tlds__=HT,this.__tlds_replaced__=!1,this.re={},gs(this)}ct.prototype.add=function(t,n){return this.__schemas__[t]=n,gs(this),this};ct.prototype.set=function(t){return this.__opts__=hu(this.__opts__,t),this};ct.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,c;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:"]&&(c=t.indexOf("@"),c>=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};ct.prototype.pretest=function(t){return this.re.pretest.test(t)};ct.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};ct.prototype.match=function(t){var n=0,r=[];this.__index__>=0&&this.__text_cache__===t&&(r.push(xh(this,n)),n=this.__last_index__);for(var i=n?t.slice(n):t;this.test(i);)r.push(xh(this,n)),i=i.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null};ct.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(),gs(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,gs(this),this)};ct.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};ct.prototype.onCompile=function(){};var WT=ct;const qT=["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(lf,"__esModule",{value:!0});var XT=WT,QT=nv(XT),YT=qT,KT=nv(YT);function nv(e){return e&&e.__esModule?e:{default:e}}var rv=new QT.default;rv.tlds(KT.default);lf.default=function(e){return rv.match(e)};var uf={};Object.defineProperty(uf,"__esModule",{value:!0});uf.default=function(e){return e};Object.defineProperty(of,"__esModule",{value:!0});var ZT=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}}(),JT=A,Kr=lC(JT),eC=sf,tC=ta(eC),nC=af,rC=ta(nC),iC=lf,oC=ta(iC),sC=uf,aC=ta(sC);function ta(e){return e&&e.__esModule?e:{default:e}}function lC(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 uC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cC(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 fC(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 iv=function(e){fC(t,e);function t(){return uC(this,t),cC(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ZT(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 c=i.props.hrefDecorator(l.url),m=i.props.textDecorator(l.text),g=i.props.componentDecorator(c,m,u);s.push(g),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):Kr.isValidElement(r)&&r.type!=="a"&&r.type!=="button"?Kr.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 Kr.createElement(Kr.Fragment,null,this.parse(this.props.children))}}]),t}(Kr.Component);iv.defaultProps={componentDecorator:tC.default,hrefDecorator:rC.default,matchDecorator:oC.default,textDecorator:aC.default};of.default=iv;Object.defineProperty(ev,"__esModule",{value:!0});var dC=of,hC=pC(dC);function pC(e){return e&&e.__esModule?e:{default:e}}var mC=ev.default=hC.default;const gC="_text_1k7aq_1",yC={text:gC},ov=({text:e,onLinkClick:t})=>{const n=i=>o=>(o.preventDefault(),i&&t(i),!1),r=(i,o,s)=>_.jsx("a",{onClick:n(i),role:"button",children:o},s);return _.jsx("div",{children:e.split(`
97
+ `).replace($x,"").replace(rb," ")}(E),h)}}(l),c=(m=function(f){return function(p,y,E){return f[p.type].h(p,y,E)}}(l),function f(p,y={}){if(Array.isArray(p)){const E=y.k,h=[];let d=!1;for(let v=0;v<p.length;v++){y.k=v;const S=f(p[v],y),w=typeof S=="string";w&&d?h[h.length-1]+=S:S!==null&&h.push(S),d=w}return y.k=E,h}return m(p,f,y)});var m;const g=i(e);return s.length?r("div",null,g,r("footer",{key:"footer"},s.map(function(f){return r("div",{id:t.slugify(f.j),key:f.j},f.j,c(u(f.I,{_:!0})))}))):g}(function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"})(U||(U={}));const Gn=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,Nx);return A.cloneElement(Pb(t,n),r)};var Yy={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ph=St.createContext&&St.createContext(Yy),_n=function(){return _n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},_n.apply(this,arguments)},Ib=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Ky(e){return e&&e.map(function(t,n){return St.createElement(t.tag,_n({key:n},t.attr),Ky(t.child))})}function Zy(e){return function(t){return St.createElement(Db,_n({attr:_n({},e.attr)},t),Ky(e.child))}}function Db(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,s=Ib(e,["attr","size","title"]),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),St.createElement("svg",_n({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:_n(_n({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&St.createElement("title",null,o),e.children)};return ph!==void 0?St.createElement(ph.Consumer,null,function(n){return t(n)}):t(Yy)}function Mb(e){return Zy({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"}}]})(e)}function Fb(e){return Zy({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"}}]})(e)}const zt=()=>{const e=Ys();return n=>{const r=e.formatMessage({id:n});return r===n?void 0:r}},Lb="_generalConditionsContainer_1ijeb_1",Bb="_generalConditions_1ijeb_1",jb="_generalConditionsHeader_1ijeb_15",Ub="_generalConditionsBody_1ijeb_25",zb="_generalConditionsAccept_1ijeb_33",Qr={generalConditionsContainer:Lb,generalConditions:Bb,generalConditionsHeader:jb,generalConditionsBody:Ub,generalConditionsAccept:zb},Hb="general-conditions.header",$b="general-conditions.body",mh="general-conditions.accept-conditions-note",Gb=()=>{const e=zt(),[t,n]=A.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(Hb),s=e(mh);return _.jsxs("div",{className:R(Qr.generalConditionsContainer,"chat__generalConditions"),children:[!!(o!=null&&o.length)&&_.jsxs("div",{className:Qr.generalConditions,children:[_.jsxs("div",{role:"button",onClick:r,onKeyDown:i,tabIndex:0,className:R(Qr.generalConditionsHeader,"chat__generalConditions__header"),"aria-controls":"general-conditions-body","aria-expanded":t?"true":"false","aria-pressed":t?"true":"false",children:[_.jsx(Gn,{children:o}),t?_.jsx(Fb,{}):_.jsx(Mb,{})]}),_.jsx("div",{className:R(Qr.generalConditionsBody,"chat__generalConditions__body"),id:"general-conditions-body",role:"region",tabIndex:-1,children:t&&_.jsx(Gn,{children:e($b)||""})})]}),!!(s!=null&&s.length)&&_.jsx("div",{className:R(Qr.generalConditionsAccept,"chat__generalConditions__accept"),tabIndex:0,children:_.jsx(Gn,{children:e(mh)||""})})]})},Vb="_message_xtsrt_5",Wb="_messageBot_xtsrt_11",qb="_messageBotLast_xtsrt_15",Xb="_avatar_xtsrt_15",Qb="_messageBotFirst_xtsrt_19",Yb="_messageBotAnimated_xtsrt_32",Kb="_fadeInLeft_xtsrt_1",Zb="_messageGuest_xtsrt_43",Jb="_messageGuestFirst_xtsrt_49",eT="_messageGuestLast_xtsrt_55",tT="_botAvatar_xtsrt_69",nT="_agentAvatar_xtsrt_73",rT="_bubble_xtsrt_77",iT="_bubbleContent_xtsrt_83",oT="_bubbleLeft_xtsrt_168",sT="_leftText_xtsrt_177",aT="_bubbleRight_xtsrt_184",lT="_rightText_xtsrt_192",L={message:Vb,messageBot:Wb,messageBotLast:qb,avatar:Xb,messageBotFirst:Qb,messageBotAnimated:Yb,fadeInLeft:Kb,messageGuest:Zb,messageGuestFirst:Jb,messageGuestLast:eT,botAvatar:tT,agentAvatar:nT,bubble:rT,bubbleContent:iT,bubbleLeft:oT,leftText:sT,bubbleRight:aT,rightText:lT},uT="_problemReport_39r57_1",cT="_problemReportIcon_39r57_7",fT="_problemReportIconActive_39r57_13",dT="_problemReportIconInactive_39r57_21",Yr={problemReport:uT,problemReportIcon:cT,problemReportIconActive:fT,problemReportIconInactive:dT},hT=({reported:e,onReport:t})=>{const n=zt(),r=o=>()=>t(o),i=o=>s=>{s.key==="Enter"&&t(o)};return _.jsx("div",{className:Yr.problemReport,children:e?_.jsx("div",{role:"button",onClick:r(null),onKeyDown:i(null),tabIndex:0,className:R(Yr.problemReportIcon,"chat__problemReportIcon","chat_problemReportIcon",Yr.problemReportIconActive,"chat__problemReportIcon-active","chat_problemReportIcon-active"),children:_.jsx("img",{src:"problem-report-active.svg",title:n("problem-report.action.unmark"),alt:"Report"})}):_.jsx("div",{role:"button",onClick:r("unspecified"),onKeyDown:i("unspecified"),tabIndex:0,className:R(Yr.problemReportIcon,"chat_problemReportIcon",Yr.problemReportIconInactive,"chat_problemReportIcon-inactive"),children:_.jsx("img",{src:"problem-report-inactive.svg",title:n("problem-report.action.mark"),alt:"Report"})})})},Jy=A.forwardRef(({message:e,problemReportingEnabled:t,isAnimated:n,isFirstMessageBySender:r,isLastMessageBySender:i,children:o,onProblemReport:s},a)=>{var c;const l=zt(),u=e.sender.type===G.UserType.BOT;return _.jsxs("li",{ref:a,className:R(L.message,L.messageBot,r&&L.messageBotFirst,i&&L.messageBotLast,"chat__bubbleContainer",n&&L.messageBotAnimated,n&&"chat__bubbleContainer--animated",u?"chat__botBubbleContainer":"chat__agentBubbleContainer",r&&"chat__bubbleContainer--first",i&&"chat__bubbleContainer--last"),children:[_.jsx("img",{className:R(L.avatar,u?L.botAvatar:L.agentAvatar,"chat__avatar",u?"chat__botAvatar":"chat__agentAvatar"),src:`${e.sender.avatar}`,alt:u?"Bot":"Agent",referrerPolicy:"no-referrer"}),_.jsx("div",{className:R(L.bubble,L.bubbleLeft,"chat__bubble",u?"chat__botBubble":"chat__agentBubble"),tabIndex:0,"aria-label":l(u?"bot-bubble.label":"agent-bubble.label"),children:_.jsx("div",{className:R(L.leftText),children:o})}),t&&s&&_.jsx(hT,{reported:!!((c=e.problemReport)!=null&&c.length),onReport:s})]})}),pT="_button_nnwks_48",mT="_buttonDefault_nnwks_60",gT="_buttonPrimary_nnwks_74",Be={button:pT,buttonDefault:mT,buttonPrimary:gT},yT="_imageContainer_1rjya_1",vT="_title_1rjya_10",_T="_subtitle_1rjya_15",ET="_buttons_1rjya_20",ST="_button_1rjya_20",wT="_image_1rjya_1",xT="_video_container_1rjya_52",bT="_video_1rjya_52",TT="_only_1rjya_68",Le={imageContainer:yT,title:vT,subtitle:_T,buttons:ET,button:ST,image:wT,video_container:xT,video:bT,only:TT},CT=({buttons:e,onButtonClick:t})=>_.jsx("div",{className:R(Le.buttons,"chat__bubbleButtons"),children:e.map((n,r)=>_.jsx("button",{className:R(Le.button,Be.button,"chat__bubbleButton"),onClick:()=>t(n),children:n.title},r))});var ev={},of={},sf={};Object.defineProperty(sf,"__esModule",{value:!0});var kT=A,OT=RT(kT);function RT(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}sf.default=function(e,t,n){return OT.createElement("a",{href:e,key:n},t)};var af={};Object.defineProperty(af,"__esModule",{value:!0});af.default=function(e){return e};var lf={},Ga,gh;function NT(){return gh||(gh=1,Ga=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),Ga}var Va,yh;function AT(){return yh||(yh=1,Va=/[\0-\x1F\x7F-\x9F]/),Va}var Wa,vh;function PT(){return vh||(vh=1,Wa=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),Wa}var qa,_h;function IT(){return _h||(_h=1,qa=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/),qa}var Xa,Eh;function DT(){return Eh||(Eh=1,Xa=function(e){var t={};t.src_Any=NT().source,t.src_Cc=AT().source,t.src_Z=PT().source,t.src_P=IT().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}),Xa}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 ea(e){return Object.prototype.toString.call(e)}function MT(e){return ea(e)==="[object String]"}function FT(e){return ea(e)==="[object Object]"}function LT(e){return ea(e)==="[object RegExp]"}function Sh(e){return ea(e)==="[object Function]"}function BT(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var tv={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function jT(e){return Object.keys(e||{}).reduce(function(t,n){return t||tv.hasOwnProperty(n)},!1)}var UT={"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}}},zT="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]",HT="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function $T(e){e.__index__=-1,e.__text_cache__=""}function GT(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function wh(){return function(e,t){t.normalize(e)}}function gs(e){var t=e.re=DT()(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(zT),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,FT(l)){LT(l.validate)?u.validate=GT(l.validate):Sh(l.validate)?u.validate=l.validate:o(a,l),Sh(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=wh();return}if(MT(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:wh()};var s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(BT).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"),$T(e)}function VT(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 xh(e,t){var n=new VT(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function ct(e,t){if(!(this instanceof ct))return new ct(e,t);t||jT(e)&&(t=e,e={}),this.__opts__=hu({},tv,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=hu({},UT,e),this.__compiled__={},this.__tlds__=HT,this.__tlds_replaced__=!1,this.re={},gs(this)}ct.prototype.add=function(t,n){return this.__schemas__[t]=n,gs(this),this};ct.prototype.set=function(t){return this.__opts__=hu(this.__opts__,t),this};ct.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,c;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:"]&&(c=t.indexOf("@"),c>=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};ct.prototype.pretest=function(t){return this.re.pretest.test(t)};ct.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};ct.prototype.match=function(t){var n=0,r=[];this.__index__>=0&&this.__text_cache__===t&&(r.push(xh(this,n)),n=this.__last_index__);for(var i=n?t.slice(n):t;this.test(i);)r.push(xh(this,n)),i=i.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null};ct.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(),gs(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,gs(this),this)};ct.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};ct.prototype.onCompile=function(){};var WT=ct;const qT=["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(lf,"__esModule",{value:!0});var XT=WT,QT=nv(XT),YT=qT,KT=nv(YT);function nv(e){return e&&e.__esModule?e:{default:e}}var rv=new QT.default;rv.tlds(KT.default);lf.default=function(e){return rv.match(e)};var uf={};Object.defineProperty(uf,"__esModule",{value:!0});uf.default=function(e){return e};Object.defineProperty(of,"__esModule",{value:!0});var ZT=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}}(),JT=A,Kr=lC(JT),eC=sf,tC=ta(eC),nC=af,rC=ta(nC),iC=lf,oC=ta(iC),sC=uf,aC=ta(sC);function ta(e){return e&&e.__esModule?e:{default:e}}function lC(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 uC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cC(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 fC(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 iv=function(e){fC(t,e);function t(){return uC(this,t),cC(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ZT(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 c=i.props.hrefDecorator(l.url),m=i.props.textDecorator(l.text),g=i.props.componentDecorator(c,m,u);s.push(g),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):Kr.isValidElement(r)&&r.type!=="a"&&r.type!=="button"?Kr.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 Kr.createElement(Kr.Fragment,null,this.parse(this.props.children))}}]),t}(Kr.Component);iv.defaultProps={componentDecorator:tC.default,hrefDecorator:rC.default,matchDecorator:oC.default,textDecorator:aC.default};of.default=iv;Object.defineProperty(ev,"__esModule",{value:!0});var dC=of,hC=pC(dC);function pC(e){return e&&e.__esModule?e:{default:e}}var mC=ev.default=hC.default;const gC="_text_1k7aq_1",yC={text:gC},ov=({text:e,onLinkClick:t})=>{const n=i=>o=>(o.preventDefault(),i&&t(i),!1),r=(i,o,s)=>_.jsx("a",{onClick:n(i),role:"button",children:o},s);return _.jsx("div",{children:e.split(`
98
98
  `).map((i,o)=>_.jsxs("span",{className:yC.text,children:[_.jsx(mC,{componentDecorator:r,children:i}),_.jsx("br",{})]},o))})},vC=({subtitle:e,onLinkClick:t})=>e?_.jsx("div",{className:Le.subtitle,children:_.jsx(ov,{text:e,onLinkClick:t})}):null,bh="newtab#",sv=({markdown:e,onLinkClick:t})=>{const n=i=>o=>(o.preventDefault(),i&&t(i),!1),r=({title:i,href:o,children:s})=>o.indexOf(bh)===0?_.jsx("a",{href:o.slice(bh.length),title:i,target:"_blank",rel:"noopener noreferrer",children:s}):_.jsx("a",{onClick:n(o),title:i,children:s});return _.jsx(Gn,{options:{overrides:{a:r}},children:e})},_C=({text:e,onLinkClick:t})=>e?_.jsx("div",{children:_.jsx(sv,{markdown:e,onLinkClick:t})}):null,EC=({title:e})=>e?_.jsx("h1",{className:Le.title,children:e}):null,SC=({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)?_.jsxs("div",{className:R(L.bubbleContent),children:[_.jsx(EC,{title:e}),_.jsx(_C,{text:t,onLinkClick:o}),_.jsx(vC,{subtitle:n,onLinkClick:o}),_.jsx(CT,{buttons:r,onButtonClick:i})]}):null,wC=({alt:e,imageUrl:t,itemUrl:n,hasBody:r})=>t?n?n.indexOf("youtube.com")>-1?_.jsx("div",{className:Le.video_container,children:_.jsx("iframe",{className:R(Le.video,{[Le.only]:!r}),title:"Youtube",width:"100%",src:n+"?rel=0",frameBorder:"0",allowFullScreen:!0})}):_.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:_.jsx("div",{className:Le.imageContainer,children:_.jsx("img",{className:R(Le.image,{[Le.only]:!r}),src:t,alt:e})})}):_.jsx("div",{className:Le.imageContainer,children:_.jsx("img",{className:R(Le.image,{[Le.only]:!r}),src:t,alt:e})}):null,xC=({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 _.jsxs("div",{className:R(Le.detailMessage),children:[_.jsx(wC,{hasBody:l,imageUrl:r,itemUrl:i,alt:e||n}),l&&_.jsx(SC,{title:e,text:t,subtitle:n,buttons:o,onLinkClick:a,onButtonClick:s})]})},bC=A.forwardRef(({isFirstMessageBySender:e,isLastMessageBySender:t,children:n},r)=>{const i=zt();return _.jsx("li",{ref:r,className:R(L.message,L.messageGuest,e&&L.messageGuestFirst,t&&L.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer",e&&"chat__bubbleContainer--first",t&&"chat__bubbleContainer--last"),children:_.jsx("div",{className:R(L.bubble,L.bubbleRight,"chat__bubble","chat__guestBubble"),tabIndex:0,"aria-label":i("guest-bubble.label"),children:_.jsx("div",{className:R(L.rightText),children:n})})})}),TC=({markdown:e,className:t,onLinkClick:n})=>_.jsx("div",{className:R(L.bubbleContent,t),children:_.jsx(sv,{markdown:e,onLinkClick:n})}),CC=({text:e,onLinkClick:t})=>_.jsx("div",{className:L.bubbleContent,children:_.jsx(ov,{text:e,onLinkClick:t})}),kC=A.forwardRef(({message:e,problemReportingEnabled:t,isFirstMessageBySender:n,isLastMessageBySender:r,onProblemReport:i,onButtonClick:o,onLinkClick:s},a)=>{const l=OC(e,o,s);switch(e.sender.type){case G.UserType.GUEST:return _.jsx(bC,{ref:a,isFirstMessageBySender:n,isLastMessageBySender:r,children:l});default:const u=c=>i(e._id,c);return _.jsx(Jy,{ref:a,message:e,problemReportingEnabled:t,isAnimated:!1,isFirstMessageBySender:n,isLastMessageBySender:r,onProblemReport:u,children:l})}}),OC=(e,t,n)=>{switch(e.type){case G.MessageTypeEnum.TEXT:const r=e;return _.jsx(CC,{text:r.text,onLinkClick:n});case G.MessageTypeEnum.DETAIL:const i=e;return _.jsx(xC,{title:i.title,text:i.text,subtitle:i.subtitle,imageUrl:i.imageUrl,itemUrl:i.itemUrl,buttons:i.buttons,onButtonClick:t,onLinkClick:n});case G.MessageTypeEnum.MARKDOWN:const o=e;return _.jsx(TC,{markdown:o.markdown,className:o.className,onLinkClick:n})}},RC=(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,NC=St.memo(kC,RC),AC="_ticontainer_wftg7_1",PC="_tiblock_wftg7_5",IC="_tidot_wftg7_12",DC="_mercuryTypingAnimation_wftg7_1",Zr={ticontainer:AC,tiblock:PC,tidot:IC,mercuryTypingAnimation:DC},MC=({isTyping:e=!1})=>_.jsx("div",{className:Zr.ticontainer,children:_.jsx("div",{className:Zr.tiblock,children:e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:R(Zr.tidot,"chat__typingIndicator")}),_.jsx("div",{className:R(Zr.tidot,"chat__typingIndicator")}),_.jsx("div",{className:R(Zr.tidot,"chat__typingIndicator")})]}):null})}),FC=Object.assign({_id:"typing-indicator"},new G.TextMessage("",new G.BotUser)),LC=({messages:e,isBotTyping:t,showGeneralConditions:n,problemReportingEnabled:r,onProblemReport:i,onButtonClick:o,onLinkClick:s})=>{const a=A.useRef(!0),l=A.useRef(null),u=A.useRef(null),c=A.useRef(null);A.useLayoutEffect(()=>{if(e.length&&l.current){if(u.current){const f=u.current.offsetTop;l.current.scrollTop=f}else if(c.current){const f=c.current.offsetTop;l.current.scrollTop=f}a.current&&(a.current=!1)}},[e,u.current,c.current,a]);let m;const g=e.length;return _.jsxs("div",{ref:l,className:R(sh.messageContainer,"chat__messageContainer"),style:{scrollBehavior:e.length&&a.current?"auto":"smooth"},id:"MessageContainer",role:"log","aria-live":"polite",children:[n&&_.jsx(Gb,{}),_.jsxs("ul",{className:sh.messages,children:[e.map((f,p)=>{const y=BC(f,m),E=jC(f,p,e,t);m=f.sender.type;const h=p+1===g;return _.jsx(NC,{ref:h?c:null,message:f,problemReportingEnabled:r,isFirstMessageBySender:y,isLastMessageBySender:E,onButtonClick:o,onLinkClick:s,onProblemReport:i},h&&!t?"last":f._id)}),t&&_.jsx(Jy,{ref:u,message:FC,problemReportingEnabled:!1,isAnimated:!0,isFirstMessageBySender:m!==G.UserType.BOT,isLastMessageBySender:!0,children:_.jsx(MC,{isTyping:!0})},"last")]})]})},BC=(e,t)=>!t||t!==e.sender.type,jC=(e,t,n,r)=>{var a;const i=e.sender.type,o=n.length;return t+1===o?!(i===G.UserType.BOT&&r):i!==((a=n.at(t+1))==null?void 0:a.sender.type)},UC="_container_t5oqt_1",zC={container:UC},HC=({title:e,href:t,children:n})=>_.jsx("a",{href:t,title:e,target:"_blank",rel:"noopener noreferrer",children:n}),$C=()=>{const t=zt()("powered-by");return t&&t.length?_.jsx("div",{className:R(zC.container,"chat__poweredBy"),children:_.jsx(Gn,{options:{overrides:{a:HC}},children:t})}):null},GC="_container_rami7_1",VC="_containerOpen_rami7_40",WC="_containerClose_rami7_44",qC="_formContainer_rami7_48",XC="_emailInput_rami7_53",QC="_description_rami7_82",YC="_actions_rami7_87",KC="_validationError_rami7_97",ZC="_submitted_rami7_104",mt={container:GC,containerOpen:VC,"slide-in":"_slide-in_rami7_1",containerClose:WC,"slide-out":"_slide-out_rami7_1",formContainer:qC,emailInput:XC,description:QC,actions:YC,validationError:KC,submitted:ZC},JC=({visible:e,methods:t,onEmailExport:n,onPdfExport:r,onClose:i})=>{const o=zt(),[s,a]=A.useState(void 0),[l,u]=A.useState(!1),[c,m]=A.useState(!1),[g,f]=A.useState(void 0),p=A.useRef(null);A.useEffect(()=>{var d;e?((d=p.current)==null||d.focus(),u(!1),m(!1),a(e)):s===!0&&a(!1)},[e,s]);const y=d=>{d.preventDefault(),g&&g.length>0&&(n(g),u(!0),setTimeout(i,3*1e3))},E=d=>{const v=d.target.value.trim(),S=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v);f(S?v:"")},h=()=>{m(!0),r(),setTimeout(i,3*1e3)};return _.jsxs("div",{className:R(mt.container,{[mt.containerOpen]:s===!0,[mt.containerClose]:s===!1}),children:[t.pdf&&_.jsxs(_.Fragment,{children:[_.jsx("h2",{children:o("export-transcript.pdf.title")}),_.jsx(Gn,{className:mt.description,children:o("export-transcript.pdf.description")||""}),_.jsxs("div",{className:mt.actions,children:[_.jsx("button",{type:"button",className:R(Be.button,Be.buttonDefault),onClick:i,children:o("export-transcript.pdf.cancel")}),_.jsx("button",{className:R(Be.button,Be.buttonPrimary),onClick:h,disabled:c,children:o("export-transcript.pdf.download")})]})]}),t.email&&_.jsxs(_.Fragment,{children:[_.jsx("h2",{children:o("export-transcript.email.title")}),_.jsx(Gn,{className:mt.description,children:o("export-transcript.email.description")||""}),_.jsxs("form",{onSubmit:y,className:mt.formContainer,children:[_.jsxs("div",{children:[_.jsx("input",{disabled:l,ref:p,type:"email",placeholder:o("export-transcript.email.placeholder"),className:mt.emailInput,onChange:E}),(g==null?void 0:g.length)===0?_.jsx("div",{className:mt.validationError,children:o("export-transcript.email.invalid")}):null]}),_.jsxs("div",{className:mt.actions,children:[_.jsx("button",{type:"button",className:R(Be.button,Be.buttonDefault),onClick:i,children:o("export-transcript.email.cancel")}),_.jsx("button",{type:"submit",disabled:l||g===void 0||g.length===0,className:R(Be.button,Be.buttonPrimary),children:o("export-transcript.email.send")})]})]}),l&&_.jsx("div",{className:mt.submitted,children:o("export-transcript.email.success")})]})]})},e2="_inputContainer_1px77_1",t2={inputContainer:e2},n2="_blockUserInput_rv0dg_1",r2={blockUserInput:n2,"append-animate":"_append-animate_rv0dg_1"},i2=({visible:e})=>{const t=zt();return e?_.jsx("div",{className:R(r2.blockUserInput,"chat__blockUserInput"),children:t("block-user-input.title")}):null},o2="_callToActionContainer_10512_1",s2="_callToActionTitle_10512_24",a2="_rateOverlay_10512_31",l2="_body_10512_60",u2="_rateOverlayOpen_10512_84",c2="_rateOverlayClose_10512_88",f2="_footer_10512_92",d2="_actions_10512_107",h2="_bubbles_10512_119",p2="_rateFeedbackBotBubble_10512_146",m2="_rateFeedbackGuestBubble_10512_152",g2="_avatar_10512_158",y2="_fadeInLeft_10512_1",v2="_bubble_10512_119",_2="_appear_10512_1",E2="_botBubble_10512_184",S2="_guestBubble_10512_194",w2="_rateText_10512_210",x2="_stars_10512_215",b2="_starsSmall_10512_228",T2="_starsLarge_10512_232",C2="_star_10512_215",k2="_starReadonly_10512_249",O2="_starIcon_10512_257",R2="_starsDescriptionContainer_10512_275",N2="_starsDescription_10512_275",be={callToActionContainer:o2,"append-animate":"_append-animate_10512_1",callToActionTitle:s2,rateOverlay:a2,body:l2,rateOverlayOpen:u2,"slide-in":"_slide-in_10512_1",rateOverlayClose:c2,"slide-out":"_slide-out_10512_1",footer:f2,actions:d2,bubbles:h2,rateFeedbackBotBubble:p2,rateFeedbackGuestBubble:m2,avatar:g2,fadeInLeft:y2,bubble:v2,appear:_2,botBubble:E2,guestBubble:S2,rateText:w2,stars:x2,starsSmall:b2,starsLarge:T2,star:C2,starReadonly:k2,starIcon:O2,starsDescriptionContainer:R2,starsDescription:N2},A2=({value:e,index:t,count:n,readonly:r,onHover:i,onClick:o})=>{const s=a=>{o&&a.key==="Enter"&&o()};return _.jsx("li",{className:R(be.star,{[be.starReadonly]:r},"chat__conversationRating__star"),children:_.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:_.jsx("span",{role:"img","aria-label":"Star",className:R(be.starIcon),children:_.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"star",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:_.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"})})})})})},Th=5,av=({value:e,size:t,readonly:n=!1,onChange:r})=>{const[i,o]=A.useState(void 0),s=()=>{o(void 0)},a=u=>()=>{if(!n){const c=u+1;o(c)}},l=u=>()=>{r&&!n&&(r(u===0&&e===1?0:u+1),o(void 0))};return _.jsx("ul",{tabIndex:0,role:"radiogroup",className:R(be.stars,{[be.starsSmall]:t==="small",[be.starsLarge]:t==="large"},"chat__conversationRating__stars",{chat__conversationRating__stars__small:t==="small",chat__conversationRating__stars__large:t==="large"}),onMouseOut:s,children:Array(Th).fill(0).map((u,c)=>_.jsx(A2,{value:i===void 0?e:i,index:c,count:Th,readonly:n,onHover:a(c),onClick:l(c)},c))})},P2=({visible:e,onRate:t})=>{const n=zt();return e?_.jsxs("div",{className:R(be.callToActionContainer,"chat__conversationRating__callToAction"),children:[_.jsx("div",{className:R(be.callToActionTitle,"chat__conversationRating__callToAction__title"),children:n("conversation-rating.call-to-action.title")}),_.jsx(av,{value:0,size:"small",onChange:t})]}):null},Ch=({isFirstMessageBySender:e,isLastMessageBySender:t,children:n})=>_.jsxs("div",{className:R(L.message,L.messageBot,e&&L.messageBotFirst,t&&L.messageBotLast,"chat__bubbleContainer","chat__botBubbleContainer",e&&"chat__bubbleContainer--first",t&&"chat__bubbleContainer--last"),children:[_.jsx("img",{className:R(L.avatar,L.botAvatar),src:"bot.svg",alt:"Bot"}),_.jsx("div",{className:R(L.bubble,L.bubbleLeft,"chat__bubble","chat__botBubble"),children:_.jsx("div",{className:R(L.leftText,L.bubbleContent),children:n})})]}),I2=({children:e})=>_.jsx("div",{className:R(L.message,L.messageGuest,L.messageGuestFirst,L.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer","chat__bubbleContainer--first","chat__bubbleContainer--last"),children:_.jsx("div",{className:R(L.bubble,L.bubbleRight,"chat__bubble","chat__guestBubble"),children:_.jsx("div",{className:R(L.rightText,L.bubbleContent),children:e})})}),D2=({visible:e,rating:t,onRate:n,onClose:r})=>{const i=zt(),[o,s]=A.useState(t),[a,l]=A.useState(void 0),[u,c]=A.useState(void 0),[m,g]=A.useState({submitted:!1,feedback:""}),[f,p]=A.useState(!1),y=A.useRef(null);A.useEffect(()=>{e?(g({submitted:!1,feedback:""}),c(e)):u===!0&&c(!1)},[e,u]),A.useEffect(()=>{s(t)},[t]),A.useEffect(()=>{const h=i(`conversation-rating.overlay.bot-message.rate-feedback.value-${o}`);l(h!=null&&h.length?h:void 0)},[o,i]),A.useEffect(()=>{m.submitted?setTimeout(()=>p(!0),m.feedback.length?500:0):p(!1)},[m]);const E=h=>{var v,S;h.preventDefault();const d=((S=(v=y.current)==null?void 0:v.value)==null?void 0:S.trim())||"";n(o,d),g({submitted:!0,feedback:d})};return _.jsx("div",{className:R(be.rateOverlay,"chat__conversationRating__overlay",{[be.rateOverlayOpen]:u===!0,[be.rateOverlayClose]:u===!1}),children:_.jsxs("form",{onSubmit:E,children:[_.jsxs("div",{className:R(be.body,"chat__conversationRating__overlay__body"),children:[_.jsxs("div",{children:[_.jsx("h2",{children:i("conversation-rating.overlay.title")}),_.jsxs("div",{className:R(be.starsDescriptionContainer),children:[_.jsx(av,{value:o,size:"large",readonly:m.submitted,onChange:s}),_.jsxs("div",{className:R(be.starsDescription),children:[_.jsx("div",{children:i("conversation-rating.overlay.star.very-bad")}),_.jsx("div",{children:i("conversation-rating.overlay.star.very-good")})]})]})]}),_.jsx("div",{className:R(be.bubbles),children:e&&a&&_.jsxs(_.Fragment,{children:[_.jsx(Ch,{isFirstMessageBySender:!0,isLastMessageBySender:!f||!!m.feedback.length,children:_.jsx("div",{children:a})}),!!m.feedback.length&&_.jsx(I2,{children:m.feedback}),f&&_.jsx(Ch,{isFirstMessageBySender:!!m.feedback.length,isLastMessageBySender:!0,children:_.jsx("div",{children:i("conversation-rating.overlay.bot-message.submit-feedback")})})]})})]}),_.jsxs("div",{className:R(be.footer,"chat__conversationRating__overlay__footer"),children:[!m.submitted&&_.jsx("input",{ref:y,placeholder:i("conversation-rating.overlay.guest-feedback.input-placeholder")}),_.jsx("div",{className:R(be.actions,"chat__conversationRating__overlay__footer__actions"),children:m.submitted?_.jsx("button",{type:"button",className:R(Be.button,Be.buttonPrimary),onClick:r,children:i("conversation-rating.overlay.action.close")}):_.jsx("button",{type:"submit",className:R(Be.button,Be.buttonPrimary),children:i("conversation-rating.overlay.action.submit")})})]})]})})},M2=({conversationRating:{enabled:e,rating:t},numberOfMessagesFromGuest:n,onRate:r})=>{const[i,o]=A.useState(0),[s,a]=A.useState(!1),l=m=>{o(m),a(!0)},u=()=>a(!1),c=!t&&n>=1;return e?_.jsxs(_.Fragment,{children:[_.jsx(P2,{visible:c,onRate:l}),_.jsx(D2,{visible:s,rating:i,onRate:r,onClose:u})]}):null},F2="_inputWrapper_1j8su_5",L2="_messageInputWrapper_1j8su_14",B2="_messageInput_1j8su_14",j2="_buttons_1j8su_37",U2="_button_1j8su_37",ir={inputWrapper:F2,messageInputWrapper:L2,messageInput:B2,buttons:j2,button:U2},z2="_audioRecorder_12g22_5",H2="_recordButton_12g22_10",$2="_submitButton_12g22_37",G2="_cancelButton_12g22_64",V2="_recorderIcon_12g22_91",W2="_pulse_12g22_1",q2="_spinning_12g22_113",X2="_spin_12g22_113",In={audioRecorder:z2,recordButton:H2,submitButton:$2,cancelButton:G2,recorderIcon:V2,pulse:W2,spinning:q2,spin:X2},kh=2048,ys=16e3;class Q2 extends St.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(kh,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+=kh}}handleClickSubmitAudio(){const n=K2(this.leftchannel,this.recordingLength),r=Z2(n,this.sampleRate||0),i=Y2(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 _.jsxs("div",{className:In.audioRecorder,children:[this.state.recordingState==="none"&&_.jsx("button",{className:R(In.recordButton,"chat__button"),type:"submit","aria-label":this.props.translate("message-input.actions.start-audio-recording.label"),tabIndex:0,onClick:this.triggerAudioRecording,children:_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[_.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"}),_.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),this.state.recordingState==="connecting"&&_.jsxs("svg",{className:In.spinning,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[_.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"}),_.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]}),this.state.recordingState==="recording"&&_.jsxs("div",{className:In.audioRecorder,children:[_.jsx("button",{className:R(In.cancelButton),onClick:this.handleClickStopAudio,"aria-label":this.props.translate("message-input.actions.stop-audio-recording.label"),tabIndex:0,children:_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[_.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"}),_.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),_.jsx("div",{className:In.recorderIcon}),_.jsx("button",{className:R(In.submitButton),type:"submit",onClick:this.handleClickSubmitAudio,"aria-label":this.props.translate("message-input.actions.submit-audio-recording.label"),tabIndex:0,autoFocus:!0,children:_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[_.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),_.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})]})})]})]})}}const Y2=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,ys,!0),n.setUint32(28,ys*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))},K2=(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},Z2=(e,t)=>{if(ys===t)return e;const n=t/ys,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,c=0;for(var a=s;a<l&&a<e.length;a++)u+=e[a],c++;i[o]=u/c,o++,s=l}return i},J2=({speechSupport:e,transcriptExportEnabled:t,disabled:n,onTextInput:r,onAudioRecorded:i,onOpenTranscriptExportModal:o})=>{const s=zt(),[a,l]=A.useState(!1),u=A.useRef(null),c=()=>{const p=u.current;p&&p.value.trim().length>=1&&r(p.value.trim())&&(p.value="",p.style.height="",l(!1),p.focus())},m=p=>{p.preventDefault(),c()},g=p=>{const y=p.target.value.trim();l(y.length>0),p.target.style.height="";const{scrollHeight:E}=p.target;p.target.style.height=`${E>150?150:E}px`},f=p=>{p.code==="Enter"&&!p.shiftKey&&(p.repeat||c(),p.preventDefault())};return _.jsxs("form",{className:R(ir.inputWrapper,"chat__textInput"),onSubmit:m,children:[_.jsx("div",{className:ir.messageInputWrapper,children:_.jsx("textarea",{ref:u,className:ir.messageInput,tabIndex:0,placeholder:s("message-input-label"),onChange:g,onKeyDown:f})}),_.jsxs("div",{className:R(ir.buttons,"chat__buttons"),children:[!a&&t&&_.jsx("button",{type:"button",className:R(ir.button,"chat__button"),"aria-label":s("message-input.actions.export-transcript.label"),tabIndex:0,onClick:o,children:_.jsx("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:_.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?_.jsx("button",{className:R(ir.button,"chat__button"),type:"submit","aria-label":s("message-input.actions.submit.label"),tabIndex:0,disabled:n,children:_.jsx("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:_.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&&_.jsx(Q2,{translate:s,onAudioRecorded:i})]})]})},ek="_quickReplies_11l22_1",tk="_quickReply_11l22_9",Oh={quickReplies:ek,quickReply:tk},nk=({quickReplies:e,onQuickReplyClick:t})=>e.length?_.jsx("div",{className:R(Oh.quickReplies,"chat__quickReplies"),children:e.map(n=>_.jsx("button",{tabIndex:0,className:R(Oh.quickReply,Be.button,"chat__button","chat__quickReply"),onClick:()=>t(n),children:n.label},n.label))}):null,Rh=5e3,rk=1e3,ik=({isBotTyping:e,quickReplies:t,speechSupport:n,transcriptExportEnabled:r,conversationRating:i,numberOfMessagesFromGuest:o,onTextInput:s,onRate:a,onQuickReplyClick:l,onAudioRecorded:u,onOpenTranscriptExportModal:c})=>{const[m,g]=A.useState(!1),f=A.useRef(),p=A.useRef(0);A.useEffect(()=>{if(m&&!e){const E=f.current?Date.now()-f.current:0;E>Rh?g(!1):setTimeout(()=>{g(!1)},Rh-E)}},[m,e]),A.useEffect(()=>{m&&(f.current=Date.now())},[m]);const y=E=>{const h=Date.now()-p.current<rk;return e||h?(g(!0),!1):(s(E),p.current=Date.now(),!0)};return _.jsxs("div",{className:R(t2.inputContainer),children:[_.jsx(nk,{quickReplies:t,onQuickReplyClick:l}),_.jsx(i2,{visible:m}),!m&&_.jsx(M2,{conversationRating:i,numberOfMessagesFromGuest:o,onRate:a}),_.jsx(J2,{onTextInput:y,onAudioRecorded:u,speechSupport:n,onOpenTranscriptExportModal:c,transcriptExportEnabled:r,disabled:m})]})},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"},ok=({clientName:e,messages:t,quickReplies:n,isBotTyping:r,speechSupport:i,problemReportingEnabled:o,transcriptExportEnabled:s,conversationRating:a,showGeneralConditions:l,onConnect:u,onRestartChat:c,onNluEvent:m,onMessageFromUser:g,onRate:f,onQuickReplyClick:p,onButtonClick:y,onLinkClick:E,onAudioRecorded:h,onActionFromUser:d,onTranscriptExport:v,onPdfExport:S,onProblemReport:w})=>{const x=Ys(),[b,C]=A.useState(!1),[F,P]=A.useState(void 0);A.useEffect(()=>{window.document.documentElement.lang=x.locale},[x.locale]),A.useEffect(()=>{const Ee=window.location.search,On=lu.parse(Ee);On.cssClassName&&P(On.cssClassName);const Ve=We=>{switch(We.data.type){case or.TRIGGER_ACTION:d(We.data.action);break;case or.TRIGGER_STORY:m(We.data.story);break;case or.ON_CHAT_WINDOW_OPEN:d({type:"webclient.chatwindow.opened"});break;case or.ON_CHAT_WINDOW_CLOSE:d({type:"webclient.chatwindow.closed"});break;case or.CHAT_MESSAGE_FROM_GUEST:g(We.data.text);break;case or.RESTART_CHAT:c(e,Ee);break}};return u(e,Ee),window.addEventListener("message",We=>Ve(We),!1),()=>window.removeEventListener("message",Ve)},[e,u,c,d,g,m]);const re=s.email||s.pdf,pe=t.filter(Ee=>Ee.sender.type===Ny.GUEST).length;return _.jsxs("div",{className:R(oh.chatwindow,"chat__chatwindow",F),children:[_.jsxs("div",{className:oh.chatcontent,children:[_.jsx(LC,{messages:t,isBotTyping:r,showGeneralConditions:l,problemReportingEnabled:o,onButtonClick:y,onLinkClick:E,onProblemReport:w}),_.jsx(ik,{isBotTyping:r,quickReplies:r?[]:n,numberOfMessagesFromGuest:pe,speechSupport:i,transcriptExportEnabled:re,conversationRating:b?{enabled:!1}:a,onRate:f,onQuickReplyClick:p,onTextInput:g,onAudioRecorded:h,onOpenTranscriptExportModal:()=>C(!b)}),_.jsx($C,{})]}),re&&_.jsx(JC,{methods:s,visible:b,onEmailExport:v,onPdfExport:S,onClose:()=>C(!1)})]})},sk=e=>{const{messages:t,quickReplies:n,isBotTyping:r,speechSupport:i,problemReportingEnabled:o,transcriptExportEnabled:s,conversationRating:a,showGeneralConditions:l}=e.chat;return{messages:t,quickReplies:n,isBotTyping:r,speechSupport:i,problemReportingEnabled:o,transcriptExportEnabled:s,conversationRating:a,showGeneralConditions:l}},ak=e=>({onConnect:(t,n)=>e(Ry(t,n)),onRestartChat:(t,n)=>e(bx(t,n)),onMessageFromUser:t=>e(Xw(t)),onRate:(t,n)=>e(ax(t,n)),onAudioRecorded:t=>e(Zw(t)),onActionFromUser:t=>e(t),onQuickReplyClick:t=>e(by(t)),onNluEvent:t=>e(lx(t)),onButtonClick:t=>e(cx(t)),onLinkClick:t=>e(fx(t)),onTranscriptExport:t=>e(rx(t)),onPdfExport:()=>e(ox()),onProblemReport:(t,n)=>e(G.reportProblemFromGuest(t,n))}),lk=xE(sk,ak)(ok),lv=()=>uk(window.location.pathname),uk=e=>{const t=e.split("/"),n=e.endsWith("/");return t[t.length-(n?2:1)]},Nh=M1,ck=()=>{const e=lv(),t=Nh(r=>r.intl.locale),n=Nh(r=>r.intl.messages);return _.jsx(tw,{locale:t,messages:n,children:_.jsx("div",{className:rw.chatPage,children:_.jsx(lk,{clientName:e})})})};function we(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var fk=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ah=fk,Qa=()=>Math.random().toString(36).substring(7).split("").join("."),dk={INIT:`@@redux/INIT${Qa()}`,REPLACE:`@@redux/REPLACE${Qa()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qa()}`},vs=dk;function cf(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function uv(e,t,n){if(typeof e!="function")throw new Error(we(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(we(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(we(1));return n(uv)(e,t)}let r=e,i=t,o=new Map,s=o,a=0,l=!1;function u(){s===o&&(s=new Map,o.forEach((E,h)=>{s.set(h,E)}))}function c(){if(l)throw new Error(we(3));return i}function m(E){if(typeof E!="function")throw new Error(we(4));if(l)throw new Error(we(5));let h=!0;u();const d=a++;return s.set(d,E),function(){if(h){if(l)throw new Error(we(6));h=!1,u(),s.delete(d),o=null}}}function g(E){if(!cf(E))throw new Error(we(7));if(typeof E.type>"u")throw new Error(we(8));if(typeof E.type!="string")throw new Error(we(17));if(l)throw new Error(we(9));try{l=!0,i=r(i,E)}finally{l=!1}return(o=s).forEach(d=>{d()}),E}function f(E){if(typeof E!="function")throw new Error(we(10));r=E,g({type:vs.REPLACE})}function p(){const E=m;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(we(11));function d(){const S=h;S.next&&S.next(c())}return d(),{unsubscribe:E(d)}},[Ah](){return this}}}return g({type:vs.INIT}),{dispatch:g,subscribe:m,getState:c,replaceReducer:f,[Ah]:p}}function hk(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:vs.INIT})>"u")throw new Error(we(12));if(typeof n(void 0,{type:vs.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(we(13))})}function cv(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const s=t[o];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let i;try{hk(n)}catch(o){i=o}return function(s={},a){if(i)throw i;let l=!1;const u={};for(let c=0;c<r.length;c++){const m=r[c],g=n[m],f=s[m],p=g(f,a);if(typeof p>"u")throw a&&a.type,new Error(we(14));u[m]=p,l=l||p!==f}return l=l||r.length!==Object.keys(s).length,l?u:s}}function _s(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function pk(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(we(15))};const s={getState:i.getState,dispatch:(l,...u)=>o(l,...u)},a=e.map(l=>l(s));return o=_s(...a)(i.dispatch),{...i,dispatch:o}}}function mk(e){return cf(e)&&"type"in e&&typeof e.type=="string"}var fv=Symbol.for("immer-nothing"),Ph=Symbol.for("immer-draftable"),Ke=Symbol.for("immer-state");function Et(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ir=Object.getPrototypeOf;function wn(e){return!!e&&!!e[Ke]}function Jt(e){var t;return e?dv(e)||Array.isArray(e)||!!e[Ph]||!!((t=e.constructor)!=null&&t[Ph])||ra(e)||ia(e):!1}var gk=Object.prototype.constructor.toString();function dv(e){if(!e||typeof e!="object")return!1;const t=Ir(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===gk}function Fi(e,t){na(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function na(e){const t=e[Ke];return t?t.type_:Array.isArray(e)?1:ra(e)?2:ia(e)?3:0}function pu(e,t){return na(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function hv(e,t,n){const r=na(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function yk(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ra(e){return e instanceof Map}function ia(e){return e instanceof Set}function Fn(e){return e.copy_||e.base_}function mu(e,t){if(ra(e))return new Map(e);if(ia(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&dv(e))return Ir(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Ke];let r=Reflect.ownKeys(n);for(let i=0;i<r.length;i++){const o=r[i],s=n[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[o]})}return Object.create(Ir(e),n)}function ff(e,t=!1){return oa(e)||wn(e)||!Jt(e)||(na(e)>1&&(e.set=e.add=e.clear=e.delete=vk),Object.freeze(e),t&&Fi(e,(n,r)=>ff(r,!0))),e}function vk(){Et(2)}function oa(e){return Object.isFrozen(e)}var _k={};function Kn(e){const t=_k[e];return t||Et(0,e),t}var Li;function pv(){return Li}function Ek(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ih(e,t){t&&(Kn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function gu(e){yu(e),e.drafts_.forEach(Sk),e.drafts_=null}function yu(e){e===Li&&(Li=e.parent_)}function Dh(e){return Li=Ek(Li,e)}function Sk(e){const t=e[Ke];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Mh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ke].modified_&&(gu(t),Et(4)),Jt(e)&&(e=Es(t,e),t.parent_||Ss(t,e)),t.patches_&&Kn("Patches").generateReplacementPatches_(n[Ke].base_,e,t.patches_,t.inversePatches_)):e=Es(t,n,[]),gu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==fv?e:void 0}function Es(e,t,n){if(oa(t))return t;const r=t[Ke];if(!r)return Fi(t,(i,o)=>Fh(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ss(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),Fi(o,(a,l)=>Fh(e,r,i,a,l,n,s)),Ss(e,i,!1),n&&e.patches_&&Kn("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Fh(e,t,n,r,i,o,s){if(wn(i)){const a=o&&t&&t.type_!==3&&!pu(t.assigned_,r)?o.concat(r):void 0,l=Es(e,i,a);if(hv(n,r,l),wn(l))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(Jt(i)&&!oa(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Es(e,i),(!t||!t.scope_.parent_)&&Ss(e,i)}}function Ss(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ff(t,n)}function wk(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:pv(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=df;n&&(i=[r],o=Bi);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var df={get(e,t){if(t===Ke)return e;const n=Fn(e);if(!pu(n,t))return xk(e,n,t);const r=n[t];return e.finalized_||!Jt(r)?r:r===Ya(e.base_,t)?(Ka(e),e.copy_[t]=_u(r,e)):r},has(e,t){return t in Fn(e)},ownKeys(e){return Reflect.ownKeys(Fn(e))},set(e,t,n){const r=mv(Fn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Ya(Fn(e),t),o=i==null?void 0:i[Ke];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(yk(n,i)&&(n!==void 0||pu(e.base_,t)))return!0;Ka(e),vu(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Ya(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Ka(e),vu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Fn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Et(11)},getPrototypeOf(e){return Ir(e.base_)},setPrototypeOf(){Et(12)}},Bi={};Fi(df,(e,t)=>{Bi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Bi.deleteProperty=function(e,t){return Bi.set.call(this,e,t,void 0)};Bi.set=function(e,t,n){return df.set.call(this,e[0],t,n,e[0])};function Ya(e,t){const n=e[Ke];return(n?Fn(n):e)[t]}function xk(e,t,n){var i;const r=mv(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function mv(e,t){if(!(t in e))return;let n=Ir(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ir(n)}}function vu(e){e.modified_||(e.modified_=!0,e.parent_&&vu(e.parent_))}function Ka(e){e.copy_||(e.copy_=mu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var bk=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const s=this;return function(l=o,...u){return s.produce(l,c=>n.call(this,c,...u))}}typeof n!="function"&&Et(6),r!==void 0&&typeof r!="function"&&Et(7);let i;if(Jt(t)){const o=Dh(this),s=_u(t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?gu(o):yu(o)}return Ih(o,r),Mh(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===fv&&(i=void 0),this.autoFreeze_&&ff(i,!0),r){const o=[],s=[];Kn("Patches").generateReplacementPatches_(t,i,o,s),r(o,s)}return i}else Et(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,i;return[this.produce(t,n,(s,a)=>{r=s,i=a}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Jt(e)||Et(8),wn(e)&&(e=gv(e));const t=Dh(this),n=_u(e,void 0);return n[Ke].isManual_=!0,yu(t),n}finishDraft(e,t){const n=e&&e[Ke];(!n||!n.isManual_)&&Et(9);const{scope_:r}=n;return Ih(r,t),Mh(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Kn("Patches").applyPatches_;return wn(e)?r(e,t):this.produce(e,i=>r(i,t))}};function _u(e,t){const n=ra(e)?Kn("MapSet").proxyMap_(e,t):ia(e)?Kn("MapSet").proxySet_(e,t):wk(e,t);return(t?t.scope_:pv()).drafts_.push(n),n}function gv(e){return wn(e)||Et(10,e),yv(e)}function yv(e){if(!Jt(e)||oa(e))return e;const t=e[Ke];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=mu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=mu(e,!0);return Fi(n,(r,i)=>{hv(n,r,yv(i))}),t&&(t.finalized_=!1),n}var Ze=new bk,vv=Ze.produce;Ze.produceWithPatches.bind(Ze);Ze.setAutoFreeze.bind(Ze);Ze.setUseStrictShallowCopy.bind(Ze);Ze.applyPatches.bind(Ze);Ze.createDraft.bind(Ze);Ze.finishDraft.bind(Ze);function Tk(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Ck(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Lh=e=>Array.isArray(e)?e:[e];function kk(e){const t=Array.isArray(e[0])?e[0]:e;return Ck(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Ok(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Rk=class{constructor(e){this.value=e}deref(){return this.value}},Nk=typeof WeakRef<"u"?WeakRef:Rk,Ak=0,Bh=1;function vo(){return{s:Ak,v:void 0,o:null,p:null}}function _v(e,t={}){let n=vo();const{resultEqualityCheck:r}=t;let i,o=0;function s(){let a=n;const{length:l}=arguments;for(let m=0,g=l;m<g;m++){const f=arguments[m];if(typeof f=="function"||typeof f=="object"&&f!==null){let p=a.o;p===null&&(a.o=p=new WeakMap);const y=p.get(f);y===void 0?(a=vo(),p.set(f,a)):a=y}else{let p=a.p;p===null&&(a.p=p=new Map);const y=p.get(f);y===void 0?(a=vo(),p.set(f,a)):a=y}}const u=a;let c;if(a.s===Bh?c=a.v:(c=e.apply(null,arguments),o++),u.s=Bh,r){const m=(i==null?void 0:i.deref())??i;m!=null&&r(m,c)&&(c=m,o!==0&&o--),i=typeof c=="object"&&c!==null||typeof c=="function"?new Nk(c):c}return u.v=c,c}return s.clearCache=()=>{n=vo(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function Pk(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e;return(...i)=>{let o=0,s=0,a,l={},u=i.pop();typeof u=="object"&&(l=u,u=i.pop()),Tk(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const c={...n,...l},{memoize:m,memoizeOptions:g=[],argsMemoize:f=_v,argsMemoizeOptions:p=[],devModeChecks:y={}}=c,E=Lh(g),h=Lh(p),d=kk(i),v=m(function(){return o++,u.apply(null,arguments)},...E),S=f(function(){s++;const x=Ok(d,arguments);return a=v.apply(null,x),a},...h);return Object.assign(S,{resultFunc:u,memoizedResultFunc:v,dependencies:d,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:m,argsMemoize:f})}}function Ev(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var Ik=Ev(),Dk=Ev,Mk=(...e)=>{const t=Pk(...e);return(...n)=>{const r=t(...n),i=(o,...s)=>r(wn(o)?gv(o):o,...s);return Object.assign(i,r),i}};Mk(_v);var Fk=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_s:_s.apply(null,arguments)};function ji(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(bt(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>mk(r)&&r.type===e,n}var Sv=class oi extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,oi.prototype)}static get[Symbol.species](){return oi}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new oi(...t[0].concat(this)):new oi(...t.concat(this))}};function jh(e){return Jt(e)?vv(e,()=>{}):e}function Uh(e,t,n){if(e.has(t)){let i=e.get(t);return n.update&&(i=n.update(i,t,e),e.set(t,i)),i}if(!n.insert)throw new Error(bt(10));const r=n.insert(t,e);return e.set(t,r),r}function Lk(e){return typeof e=="boolean"}var Bk=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new Sv;return n&&(Lk(n)?s.push(Ik):s.push(Dk(n.extraArgument))),s},jk="RTK_autoBatch",wv=e=>t=>{setTimeout(t,e)},Uk=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:wv(10),zk=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,s=!1;const a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?Uk:e.type==="callback"?e.queueNotification:wv(e.timeout),u=()=>{s=!1,o&&(o=!1,a.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const m=()=>i&&c(),g=r.subscribe(m);return a.add(c),()=>{g(),a.delete(c)}},dispatch(c){var m;try{return i=!((m=c==null?void 0:c.meta)!=null&&m[jk]),o=!i,o&&(s||(s=!0,l(u))),r.dispatch(c)}finally{i=!0}}})},Hk=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new Sv(e);return r&&i.push(zk(typeof r=="object"?r:void 0)),i},$k=!0;function Gk(e){const t=Bk(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let a;if(typeof n=="function")a=n;else if(cf(n))a=cv(n);else throw new Error(bt(1));let l;typeof r=="function"?l=r(t):l=t();let u=_s;i&&(u=Fk({trace:!$k,...typeof i=="object"&&i}));const c=pk(...l),m=Hk(c);let g=typeof s=="function"?s(m):m();const f=u(...g);return uv(a,o,f)}function xv(e){const t={},n=[];let r;const i={addCase(o,s){const a=typeof o=="string"?o:o.type;if(!a)throw new Error(bt(28));if(a in t)throw new Error(bt(29));return t[a]=s,i},addMatcher(o,s){return n.push({matcher:o,reducer:s}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function Vk(e){return typeof e=="function"}function Wk(e,t){let[n,r,i]=xv(t),o;if(Vk(e))o=()=>jh(e());else{const a=jh(e);o=()=>a}function s(a=o(),l){let u=[n[l.type],...r.filter(({matcher:c})=>c(l)).map(({reducer:c})=>c)];return u.filter(c=>!!c).length===0&&(u=[i]),u.reduce((c,m)=>{if(m)if(wn(c)){const f=m(c,l);return f===void 0?c:f}else{if(Jt(c))return vv(c,g=>m(g,l));{const g=m(c,l);if(g===void 0){if(c===null)return c;throw new Error(bt(9))}return g}}return c},a)}return s.getInitialState=o,s}var qk=Symbol.for("rtk-slice-createasyncthunk");function Xk(e,t){return`${e}/${t}`}function Qk({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[qk];return function(i){const{name:o,reducerPath:s=o}=i;if(!o)throw new Error(bt(11));typeof process<"u";const a=(typeof i.reducers=="function"?i.reducers(Zk()):i.reducers)||{},l=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(E,h){const d=typeof E=="string"?E:E.type;if(!d)throw new Error(bt(12));if(d in u.sliceCaseReducersByType)throw new Error(bt(13));return u.sliceCaseReducersByType[d]=h,c},addMatcher(E,h){return u.sliceMatchers.push({matcher:E,reducer:h}),c},exposeAction(E,h){return u.actionCreators[E]=h,c},exposeCaseReducer(E,h){return u.sliceCaseReducersByName[E]=h,c}};l.forEach(E=>{const h=a[E],d={reducerName:E,type:Xk(o,E),createNotation:typeof i.reducers=="function"};eO(h)?nO(d,h,c,t):Jk(d,h,c)});function m(){const[E={},h=[],d=void 0]=typeof i.extraReducers=="function"?xv(i.extraReducers):[i.extraReducers],v={...E,...u.sliceCaseReducersByType};return Wk(i.initialState,S=>{for(let w in v)S.addCase(w,v[w]);for(let w of u.sliceMatchers)S.addMatcher(w.matcher,w.reducer);for(let w of h)S.addMatcher(w.matcher,w.reducer);d&&S.addDefaultCase(d)})}const g=E=>E,f=new WeakMap;let p;const y={name:o,reducerPath:s,reducer(E,h){return p||(p=m()),p(E,h)},actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState(){return p||(p=m()),p.getInitialState()},getSelectors(E=g){const h=Uh(f,this,{insert:()=>new WeakMap});return Uh(h,E,{insert:()=>{const d={};for(const[v,S]of Object.entries(i.selectors??{}))d[v]=Yk(this,S,E,this!==y);return d}})},selectSlice(E){let h=E[this.reducerPath];return typeof h>"u"&&this!==y&&(h=this.getInitialState()),h},get selectors(){return this.getSelectors(this.selectSlice)},injectInto(E,{reducerPath:h,...d}={}){const v=h??this.reducerPath;return E.inject({reducerPath:v,reducer:this.reducer},d),{...this,reducerPath:v}}};return y}}function Yk(e,t,n,r){function i(o,...s){let a=n.call(e,o);return typeof a>"u"&&r&&(a=e.getInitialState()),t(a,...s)}return i.unwrapped=t,i}var Kk=Qk();function Zk(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Jk({type:e,reducerName:t,createNotation:n},r,i){let o,s;if("reducer"in r){if(n&&!tO(r))throw new Error(bt(17));o=r.reducer,s=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?ji(e,s):ji(e))}function eO(e){return e._reducerDefinitionType==="asyncThunk"}function tO(e){return e._reducerDefinitionType==="reducerWithPrepare"}function nO({type:e,reducerName:t},n,r,i){if(!i)throw new Error(bt(18));const{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:u,options:c}=n,m=i(e,o,c);r.exposeAction(t,m),s&&r.addCase(m.fulfilled,s),a&&r.addCase(m.pending,a),l&&r.addCase(m.rejected,l),u&&r.addMatcher(m.settled,u),r.exposeCaseReducer(t,{fulfilled:s||_o,pending:a||_o,rejected:l||_o,settled:u||_o})}function _o(){}var hf="listenerMiddleware";ji(`${hf}/add`);ji(`${hf}/removeAll`);ji(`${hf}/remove`);function bt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function rO(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pf=rO,iO=typeof le=="object"&&le&&le.Object===Object&&le,oO=iO,sO=oO,aO=typeof self=="object"&&self&&self.Object===Object&&self,lO=sO||aO||Function("return this")(),bv=lO,uO=bv,cO=function(){return uO.Date.now()},fO=cO,dO=/\s/;function hO(e){for(var t=e.length;t--&&dO.test(e.charAt(t)););return t}var pO=hO,mO=pO,gO=/^\s+/;function yO(e){return e&&e.slice(0,mO(e)+1).replace(gO,"")}var vO=yO,_O=bv,EO=_O.Symbol,Tv=EO,zh=Tv,Cv=Object.prototype,SO=Cv.hasOwnProperty,wO=Cv.toString,Jr=zh?zh.toStringTag:void 0;function xO(e){var t=SO.call(e,Jr),n=e[Jr];try{e[Jr]=void 0;var r=!0}catch{}var i=wO.call(e);return r&&(t?e[Jr]=n:delete e[Jr]),i}var bO=xO,TO=Object.prototype,CO=TO.toString;function kO(e){return CO.call(e)}var OO=kO,Hh=Tv,RO=bO,NO=OO,AO="[object Null]",PO="[object Undefined]",$h=Hh?Hh.toStringTag:void 0;function IO(e){return e==null?e===void 0?PO:AO:$h&&$h in Object(e)?RO(e):NO(e)}var DO=IO;function MO(e){return e!=null&&typeof e=="object"}var FO=MO,LO=DO,BO=FO,jO="[object Symbol]";function UO(e){return typeof e=="symbol"||BO(e)&&LO(e)==jO}var zO=UO,HO=vO,Gh=pf,$O=zO,Vh=NaN,GO=/^[-+]0x[0-9a-f]+$/i,VO=/^0b[01]+$/i,WO=/^0o[0-7]+$/i,qO=parseInt;function XO(e){if(typeof e=="number")return e;if($O(e))return Vh;if(Gh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Gh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=HO(e);var n=VO.test(e);return n||WO.test(e)?qO(e.slice(2),n?2:8):GO.test(e)?Vh:+e}var QO=XO,YO=pf,Za=fO,Wh=QO,KO="Expected a function",ZO=Math.max,JO=Math.min;function eR(e,t,n){var r,i,o,s,a,l,u=0,c=!1,m=!1,g=!0;if(typeof e!="function")throw new TypeError(KO);t=Wh(t)||0,YO(n)&&(c=!!n.leading,m="maxWait"in n,o=m?ZO(Wh(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g);function f(x){var b=r,C=i;return r=i=void 0,u=x,s=e.apply(C,b),s}function p(x){return u=x,a=setTimeout(h,t),c?f(x):s}function y(x){var b=x-l,C=x-u,F=t-b;return m?JO(F,o-C):F}function E(x){var b=x-l,C=x-u;return l===void 0||b>=t||b<0||m&&C>=o}function h(){var x=Za();if(E(x))return d(x);a=setTimeout(h,y(x))}function d(x){return a=void 0,g&&r?f(x):(r=i=void 0,s)}function v(){a!==void 0&&clearTimeout(a),u=0,r=l=i=a=void 0}function S(){return a===void 0?s:d(Za())}function w(){var x=Za(),b=E(x);if(r=arguments,i=this,l=x,b){if(a===void 0)return p(l);if(m)return clearTimeout(a),a=setTimeout(h,t),f(l)}return a===void 0&&(a=setTimeout(h,t)),s}return w.cancel=v,w.flush=S,w}var tR=eR,nR=tR,rR=pf,iR="Expected a function";function oR(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(iR);return rR(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),nR(e,t,{leading:r,maxWait:t,trailing:i})}var sR=oR;const aR=ku(sR);function tr(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 lR(e,t){return e[0]==="-"&&Array.isArray(t)&&/^-\d+$/.test(e)?t.length+parseInt(e,10):e}function uR(e){return/^\d+$/.test(e)}function jo(e){return Object.prototype.toString.call(e)==="[object Object]"}function si(e){return Object(e)===e}function Uo(e){return Object.keys(e).length===0}var cR=["__proto__","prototype","constructor"],fR=function(e){return cR.indexOf(e)===-1};function sa(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 qh=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 Dr=new V(".",!1,!0,!0);function Ct(e){return function(){return Dr[e].apply(Dr,arguments)}}V.prototype._fill=function(e,t,n,r){var i=e.shift();if(e.length>0){if(t[i]=t[i]||(this.useArray&&uR(e[0])?[]:{}),!si(t[i]))if(this.override)t[i]={};else{if(!(si(n)&&Uo(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&&si(t[i])&&!Uo(t[i])){if(!(si(n)&&Uo(n)))throw new Error("Trying to redefine non-empty obj['"+i+"']");return}t[i]=tr(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=sa(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]=tr(e[r],i)}),e};V.prototype.str=function(e,t,n,r){var i=sa(e,this.separator).join(this.separator);return e.indexOf(this.separator)!==-1?this._fill(i.split(this.separator),n,t,r):n[e]=tr(t,r),n};V.prototype.pick=function(e,t,n,r){var i,o,s,a,l;for(o=sa(e,this.separator),i=0;i<o.length;i++)if(a=lR(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,tr(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,tr(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,tr(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=sa(e,this.separator),i=0;i<s.length;i++){if(a=s[i],i===s.length-1)if(r&&jo(t)&&jo(n[a]))for(o in t)qh.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(!qh.call(n,a)||!jo(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(si(e[i])&&(jo(e[i])&&!Uo(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=Ct("pick");V.move=Ct("move");V.transfer=Ct("transfer");V.transform=Ct("transform");V.copy=Ct("copy");V.object=Ct("object");V.str=Ct("str");V.set=Ct("set");V.delete=Ct("delete");V.del=V.remove=Ct("remove");V.dot=Ct("dot");["override","overwrite"].forEach(function(e){Object.defineProperty(V,e,{get:function(){return Dr.override},set:function(t){Dr.override=!!t}})});["useArray","keepArray","useBrackets"].forEach(function(e){Object.defineProperty(V,e,{get:function(){return Dr[e]},set:function(t){Dr[e]=t}})});V._process=tr;var dR=V;const kv={"message-input-label":"Nachricht","message-input.actions.submit.label":"Nachricht senden","message-input.actions.export-transcript.label":"Konversation per E-Mail erhalten","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:
99
99
 
100
100
  - Der Chatverlauf wird im EU-Raum gespeichert und kann nur von autorisierten Personen eingesehen werden.
@@ -108,4 +108,4 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
108
108
 
109
109
  - La cronologia delle chat è memorizzata nell'area UE e può essere visualizzata solo da persone autorizzate.
110
110
  - 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"},gR=["de","en","fr","it"],Ov={locale:"de",messages:kv},yR=(e,t)=>{if(gR.includes(e)){const n=vR(e),r=dR.dot(t);return{...n,...r}}return t},vR=e=>{switch(e.toString()){case"en":return hR;case"fr":return pR;case"it":return mR;default:return kv}},_R=(e=ER,t)=>{switch(t.type){case Js:return Object.assign({},e,{sessionId:t.sessionId,userId:t.userId});case Kc:return Object.assign({},e,{connectionState:Ln.CONNECTING});case Zc:return Object.assign({},e,{connectionState:Ln.CONNECTED});case Jc:return Object.assign({},e,{connectionState:Ln.DISCONNECTED});case ef:return Object.assign({},e,{connectionState:Ln.RECONNECTED});case tf:return Object.assign({},e,{sessionId:t.sessionId});case Oy:return Object.assign({},e,{connectionState:Ln.DISCONNECTED,sessionId:void 0});default:return e}},ER={connectionState:Ln.DISCONNECTED,sessionId:void 0,userId:void 0},SR=(e=Ja,t)=>{switch(t.type){case G.ActionTypes.TYPING_ON:return Object.assign({},e,{isBotTyping:!0});case G.ActionTypes.TYPING_OFF:return Object.assign({},e,{isBotTyping:!1});case G.ActionTypes.MESSAGE_FROM_GUEST:case G.ActionTypes.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return Xh(e,t.message);case G.ActionTypes.MESSAGE_TO_GUEST:Eo(t);const n=Object.assign({},t.message,{_id:t.meta.actionId}),r=e.messages.filter(u=>u._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 $c:const i=t.messages;if(i.length>0){const u=i[i.length-1];return Object.assign({},Ja,{messages:i,quickReplies:u.quickReplies?u.quickReplies:[]})}else return Ja;case Hc:return Eo(t.message),e;case G.ActionTypes.EVENT_TO_GUEST:return Eo(t.event),e;case Ty:return Eo(t),e;case Vc:return Object.assign({},e,{speechSupport:!0});case Wc:return Object.assign({},e,{problemReportingEnabled:!0});case Xc:const o=new G.TextMessage(t.transcription,new G.GuestUser),s=Object.assign({},o,{_id:cu()});return Xh(e,s);case qc:return Object.assign({},e,{transcriptExportEnabled:t.methods});case Qc:return Object.assign({},e,{showGeneralConditions:!0});case G.ActionTypes.PROBLEM_REPORT_FROM_GUEST:const a=e.messages.map(u=>u._id===t.payload.actionId?Object.assign({},u,{problemReport:t.payload.problem}):u);return Object.assign({},e,{messages:a});case Yc:const l={enabled:!0,rating:t.payload.rating};return Object.assign({},e,{conversationRating:l});case G.ActionTypes.CONVERSATION_RATING_FROM_GUEST:{const u={...e.conversationRating,rating:t.payload};return Object.assign({},e,{conversationRating:u})}default:return e}},Xh=(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:[]})},Eo=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,Ja={messages:[],quickReplies:[],isBotTyping:!1,speechSupport:!1,problemReportingEnabled:!1,transcriptExportEnabled:{pdf:!1,email:!1},showGeneralConditions:!1,conversationRating:{enabled:!1}},Rv=Kk({name:"intl",initialState:Ov,reducers:{updateIntl:(e,t)=>{e.locale=t.payload.language,e.messages=t.payload.messages}}}),{updateIntl:xR}=Rv.actions,bR=Rv.reducer,TR=cv({chat:SR,connection:_R,intl:bR}),Nv="bf-webclient-state-last-saved-at",Av="bf-webclient-state",CR=e=>{try{if(!RR())return;const t=Qh(e,Nv);if(OR(t))return;{const n=Qh(e,Av);return n===null?void 0:JSON.parse(n)}}catch(t){console.error(t);return}},kR=(e,t)=>{try{const n=JSON.stringify(t);Yh(e,Av,n);let r=new Date().toISOString();Yh(e,Nv,r)}catch(n){console.error(n)}},OR=e=>{if(e===null)return!1;let t=new Date(e);return t.setHours(t.getHours()+12),new Date>t},RR=()=>typeof localStorage<"u",Qh=(e,t)=>localStorage.getItem(`${e}_${t}`),Yh=(e,t,n)=>localStorage.setItem(`${e}_${t}`,n),Ut=Object.create(null);Ut.open="0";Ut.close="1";Ut.ping="2";Ut.pong="3";Ut.message="4";Ut.upgrade="5";Ut.noop="6";const zo=Object.create(null);Object.keys(Ut).forEach(e=>{zo[Ut[e]]=e});const Eu={type:"error",data:"parser error"},Pv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Iv=typeof ArrayBuffer=="function",Dv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,mf=({type:e,data:t},n,r)=>Pv&&t instanceof Blob?n?r(t):Kh(t,r):Iv&&(t instanceof ArrayBuffer||Dv(t))?n?r(t):Kh(new Blob([t]),r):r(Ut[e]+(t||"")),Kh=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Zh(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let el;function NR(e,t){if(Pv&&e.data instanceof Blob)return e.data.arrayBuffer().then(Zh).then(t);if(Iv&&(e.data instanceof ArrayBuffer||Dv(e.data)))return t(Zh(e.data));mf(e,!1,n=>{el||(el=new TextEncoder),t(el.encode(n))})}const Jh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ai=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Jh.length;e++)ai[Jh.charCodeAt(e)]=e;const AR=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),c=new Uint8Array(u);for(r=0;r<n;r+=4)o=ai[e.charCodeAt(r)],s=ai[e.charCodeAt(r+1)],a=ai[e.charCodeAt(r+2)],l=ai[e.charCodeAt(r+3)],c[i++]=o<<2|s>>4,c[i++]=(s&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u},PR=typeof ArrayBuffer=="function",gf=(e,t)=>{if(typeof e!="string")return{type:"message",data:Mv(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:IR(e.substring(1),t)}:zo[n]?e.length>1?{type:zo[n],data:e.substring(1)}:{type:zo[n]}:Eu},IR=(e,t)=>{if(PR){const n=AR(e);return Mv(n,t)}else return{base64:!0,data:e}},Mv=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Fv="",DR=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{mf(o,!1,a=>{r[s]=a,++i===n&&t(r.join(Fv))})})},MR=(e,t)=>{const n=e.split(Fv),r=[];for(let i=0;i<n.length;i++){const o=gf(n[i],t);if(r.push(o),o.type==="error")break}return r};function FR(){return new TransformStream({transform(e,t){NR(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 tl;function So(e){return e.reduce((t,n)=>t+n.length,0)}function wo(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 LR(e,t){tl||(tl=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(So(n)<1)break;const l=wo(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(So(n)<2)break;const l=wo(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(So(n)<8)break;const l=wo(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(Eu);break}i=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(So(n)<i)break;const l=wo(n,i);a.enqueue(gf(o?l:tl.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(Eu);break}}}})}const Lv=4;function he(e){if(e)return BR(e)}function BR(e){for(var t in he.prototype)e[t]=he.prototype[t];return e}he.prototype.on=he.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};he.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};he.prototype.off=he.prototype.removeListener=he.prototype.removeAllListeners=he.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};he.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};he.prototype.emitReserved=he.prototype.emit;he.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};he.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ot=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function Bv(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const jR=ot.setTimeout,UR=ot.clearTimeout;function aa(e,t){t.useNativeTimers?(e.setTimeoutFn=jR.bind(ot),e.clearTimeoutFn=UR.bind(ot)):(e.setTimeoutFn=ot.setTimeout.bind(ot),e.clearTimeoutFn=ot.clearTimeout.bind(ot))}const zR=1.33;function HR(e){return typeof e=="string"?$R(e):Math.ceil((e.byteLength||e.size)*zR)}function $R(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 GR(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function VR(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 WR extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class yf extends he{constructor(t){super(),this.writable=!1,aa(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new WR(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=gf(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=GR(t);return n.length?"?"+n:""}}const jv="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Su=64,qR={};let ep=0,xo=0,tp;function np(e){let t="";do t=jv[e%Su]+t,e=Math.floor(e/Su);while(e>0);return t}function Uv(){const e=np(+new Date);return e!==tp?(ep=0,tp=e):e+"."+np(ep++)}for(;xo<Su;xo++)qR[jv[xo]]=xo;let zv=!1;try{zv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const XR=zv;function Hv(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||XR))return new XMLHttpRequest}catch{}if(!t)try{return new ot[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function QR(){}const YR=function(){return new Hv({xdomain:!1}).responseType!=null}();class KR extends yf{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}const n=t&&t.forceBase64;this.supportsBinary=YR&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}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)};MR(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,DR(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]=Uv()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Bt(this.uri(),t)}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 Bt extends he{constructor(t,n){super(),aa(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=Bv(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Hv(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)),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=Bt.requestsCount++,Bt.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=QR,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Bt.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()}}Bt.requestsCount=0;Bt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",rp);else if(typeof addEventListener=="function"){const e="onpagehide"in ot?"pagehide":"unload";addEventListener(e,rp,!1)}}function rp(){for(let e in Bt.requests)Bt.requests.hasOwnProperty(e)&&Bt.requests[e].abort()}const vf=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),bo=ot.WebSocket||ot.MozWebSocket,ip=!0,ZR="arraybuffer",op=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class JR extends yf{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=op?{}:Bv(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=ip&&!op?n?new bo(t,n):new bo(t):new bo(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;mf(r,this.supportsBinary,o=>{const s={};try{ip&&this.ws.send(o)}catch{}i&&vf(()=>{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]=Uv()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!bo}}class eN extends yf{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=LR(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=FR();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&&vf(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const tN={websocket:JR,webtransport:eN,polling:KR},nN=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(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 wu(e){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=nN.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=iN(o,o.path),o.queryKey=oN(o,o.query),o}function iN(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 oN(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let $v=class sr extends he{constructor(t,n={}){super(),this.binaryType=ZR,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=wu(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=wu(n.host).host),aa(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=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,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=VR(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(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"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Lv,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 tN[t](r)}open(){let t;if(this.opts.rememberUpgrade&&sr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}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))}probe(t){let n=this.createTransport(t),r=!1;sr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;sr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=n.name,this.emitReserved("upgradeError",g)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const s=m=>{const g=new Error("probe error: "+m);g.transport=n.name,o(),this.emitReserved("upgradeError",g)};function a(){s("transport closed")}function l(){s("socket closed")}function u(m){n&&m.name!==n.name&&o()}const c=()=>{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()}onOpen(){if(this.readyState="open",sr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");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.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),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+=HR(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}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){sr.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}};$v.protocol=Lv;function sN(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=wu(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 aN=typeof ArrayBuffer=="function",lN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Gv=Object.prototype.toString,uN=typeof Blob=="function"||typeof Blob<"u"&&Gv.call(Blob)==="[object BlobConstructor]",cN=typeof File=="function"||typeof File<"u"&&Gv.call(File)==="[object FileConstructor]";function _f(e){return aN&&(e instanceof ArrayBuffer||lN(e))||uN&&e instanceof Blob||cN&&e instanceof File}function Ho(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ho(e[n]))return!0;return!1}if(_f(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ho(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ho(e[n]))return!0;return!1}function fN(e){const t=[],n=e.data,r=e;return r.data=xu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function xu(e,t){if(!e)return e;if(_f(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]=xu(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]=xu(e[r],t));return n}return e}function dN(e,t){return e.data=bu(e.data,t),delete e.attachments,e}function bu(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]=bu(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=bu(e[n],t));return e}const hN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],pN=5;var H;(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"})(H||(H={}));class mN{constructor(t){this.replacer=t}encode(t){return(t.type===H.EVENT||t.type===H.ACK)&&Ho(t)?this.encodeAsBinary({type:t.type===H.EVENT?H.BINARY_EVENT:H.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===H.BINARY_EVENT||t.type===H.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=fN(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function sp(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ef extends he{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===H.BINARY_EVENT;r||n.type===H.BINARY_ACK?(n.type=r?H.EVENT:H.ACK,this.reconstructor=new gN(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(_f(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(H[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===H.BINARY_EVENT||r.type===H.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(Ef.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 H.CONNECT:return sp(n);case H.DISCONNECT:return n===void 0;case H.CONNECT_ERROR:return typeof n=="string"||sp(n);case H.EVENT:case H.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&hN.indexOf(n[0])===-1);case H.ACK:case H.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=dN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const yN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ef,Encoder:mN,get PacketType(){return H},protocol:pN},Symbol.toStringTag,{value:"Module"}));function vt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const vN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Vv extends he{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=[vt(t,"open",this.onopen.bind(this)),vt(t,"packet",this.onpacket.bind(this)),vt(t,"error",this.onerror.bind(this)),vt(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){if(vN.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 r={type:H.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,a=n.pop();this._registerAckCallback(s,a),r.id=s}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),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 s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===t&&this.sendBuffer.splice(s,1);n.call(this,new Error("operation has timed out"))},i);this.acks[t]=(...s)=>{this.io.clearTimeoutFn(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,a)=>r?s?o(s):i(a):i(s)),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:H.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)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case H.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 H.EVENT:case H.BINARY_EVENT:this.onevent(t);break;case H.ACK:case H.BINARY_ACK:this.onack(t);break;case H.DISCONNECT:this.ondisconnect();break;case H.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:H.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}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:H.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 Br(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}Br.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};Br.prototype.reset=function(){this.attempts=0};Br.prototype.setMin=function(e){this.ms=e};Br.prototype.setMax=function(e){this.max=e};Br.prototype.setJitter=function(e){this.jitter=e};class Tu extends he{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,aa(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 Br({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||yN;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,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 $v(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vt(n,"open",function(){r.onopen(),t&&t()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=vt(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(vt(t,"ping",this.onping.bind(this)),vt(t,"data",this.ondata.bind(this)),vt(t,"error",this.onerror.bind(this)),vt(t,"close",this.onclose.bind(this)),vt(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){vf(()=>{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 Vv(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"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),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 ei={};function $o(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=sN(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=ei[i]&&o in ei[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new Tu(r,t):(ei[i]||(ei[i]=new Tu(r,t)),l=ei[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign($o,{Manager:Tu,Socket:Vv,io:$o,connect:$o});const _N=[G.ActionTypes.MESSAGE_TO_GUEST,G.ActionTypes.EVENT_TO_GUEST,G.ActionTypes.TYPING_ON,G.ActionTypes.TYPING_OFF,...yx,...Kw,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],EN=({dispatch:e,getState:t})=>n=>{let r=null;return i=>{let o=n(i);if(i.type===Js)r!=null&&r.disconnect(),e(Ex()),r=$o(`/${i.clientName}/chat?${i.querystrings}`),r.on("action",e),r.on("connect",()=>e(Sx())),r.on("disconnect",()=>e(wx())),r.on("reconnect",()=>e(xx())),r.on("set-translations",(s,a)=>{e(xR({language:s,messages:yR(s,a)}))}),r.on("enable-speech-support",()=>e(Jw())),r.on("enable-problem-reporting",()=>e(ex())),r.on("enable-transcript-export",s=>e(nx(s))),r.on("enable-conversation-rating",s=>e(sx(s))),r.on("speech-transcription",s=>e(tx(s))),r.on("restore-client-state",s=>{e(_x(s.sessionId)),e(ux(s.messages))}),r.on("expand-window",({devices:s})=>e({type:Ty,devices:s})),r.on("show-general-conditions",()=>e(ix()));else if(i.type===Yw)r==null||r.emit("get-started",JSON.stringify(i));else if(i.type===Gc)r==null||r.emit("audio-message",i.buffer);else if(i.type===G.ActionTypes.CONVERSATION_RATING_FROM_GUEST)r==null||r.emit("conversation-rating",i.payload);else if(i.type===Cy){const{connection:{sessionId:s}}=t();window.location.href=`/transcript-pdf/${s}`}else _N.indexOf(i.type)===-1&&i.meta===void 0&&r&&r.emit("action",JSON.stringify(i));return o}},Wv=lv(),SN={...CR(Wv),intl:Ov},Cu=Gk({middleware:e=>e().concat(EN),reducer:TR,preloadedState:SN});Cu.subscribe(aR(()=>{const e=Cu.getState();kR(Wv,{connection:e.connection})},1e3));const wN=document.getElementById("root"),xN=Eg(wN);xN.render(_.jsx(TE,{store:Cu,children:_.jsx(ck,{})}));
111
- //# sourceMappingURL=index-YXMTMBlp.js.map
111
+ //# sourceMappingURL=index-LfSuX_mF.js.map