@snf/access-qa-bot 3.7.4 โ†’ 3.8.0

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.
@@ -1,64 +1,94 @@
1
- var AccessQABot=function(Yn){"use strict";var bn,Y,si,xt,Ai,li,ci,Qr,$n,_n,ui,Mr,Or,Nr,di,Vn={},Kn=[],RA=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,En=Array.isArray;function dt(e,t){for(var n in t)e[n]=t[n];return e}function Lr(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Ae(e,t,n){var r,o,i,A={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:A[i]=t[i];if(arguments.length>2&&(A.children=arguments.length>3?bn.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)A[i]===void 0&&(A[i]=e.defaultProps[i]);return Pn(e,A,r,o,null)}function Pn(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++si,__i:-1,__u:0};return o==null&&Y.vnode!=null&&Y.vnode(i),i}function fi(){return{current:null}}function ce(e){return e.children}function ft(e,t){this.props=e,this.context=t}function Xt(e,t){if(t==null)return e.__?Xt(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Xt(e):null}function HA(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],o=[],i=dt({},t);i.__v=t.__v+1,Y.vnode&&Y.vnode(i),Hr(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??Xt(t),!!(32&t.__u),o),i.__v=t.__v,i.__.__k[i.__i]=i,vi(r,i,o),t.__e=t.__=null,i.__e!=n&&pi(i)}}function pi(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),pi(e)}function Rr(e){(!e.__d&&(e.__d=!0)&&xt.push(e)&&!Xn.__r++||Ai!=Y.debounceRendering)&&((Ai=Y.debounceRendering)||li)(Xn)}function Xn(){try{for(var e,t=1;xt.length;)xt.length>t&&xt.sort(ci),e=xt.shift(),t=xt.length,HA(e)}finally{xt.length=Xn.__r=0}}function hi(e,t,n,r,o,i,A,s,a,l,c){var u,d,f,h,m,p,v,y=r&&r.__k||Kn,g=t.length;for(a=UA(n,t,y,a,g),u=0;u<g;u++)(f=n.__k[u])!=null&&(d=f.__i!=-1&&y[f.__i]||Vn,f.__i=u,p=Hr(e,f,d,o,i,A,s,a,l,c),h=f.__e,f.ref&&d.ref!=f.ref&&(d.ref&&Fr(d.ref,null,f),c.push(f.ref,f.__c||h,f)),m==null&&h!=null&&(m=h),(v=!!(4&f.__u))||d.__k===f.__k?(a=gi(f,a,e,v),v&&d.__e&&(d.__e=null)):typeof f.type=="function"&&p!==void 0?a=p:h&&(a=h.nextSibling),f.__u&=-7);return n.__e=m,a}function UA(e,t,n,r,o){var i,A,s,a,l,c=n.length,u=c,d=0;for(e.__k=new Array(o),i=0;i<o;i++)(A=t[i])!=null&&typeof A!="boolean"&&typeof A!="function"?(typeof A=="string"||typeof A=="number"||typeof A=="bigint"||A.constructor==String?A=e.__k[i]=Pn(null,A,null,null,null):En(A)?A=e.__k[i]=Pn(ce,{children:A},null,null,null):A.constructor===void 0&&A.__b>0?A=e.__k[i]=Pn(A.type,A.props,A.key,A.ref?A.ref:null,A.__v):e.__k[i]=A,a=i+d,A.__=e,A.__b=e.__b+1,s=null,(l=A.__i=FA(A,n,a,u))!=-1&&(u--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(o>c?d--:o<c&&d++),typeof A.type!="function"&&(A.__u|=4)):l!=a&&(l==a-1?d--:l==a+1?d++:(l>a?d--:d++,A.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<c;i++)(s=n[i])!=null&&!(2&s.__u)&&(s.__e==r&&(r=Xt(s)),bi(s,s));return r}function gi(e,t,n,r){var o,i;if(typeof e.type=="function"){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=gi(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Xt(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ct(e,t){return t=t||[],e==null||typeof e=="boolean"||(En(e)?e.some(function(n){Ct(n,t)}):t.push(e)),t}function FA(e,t,n,r){var o,i,A,s=e.key,a=e.type,l=t[n],c=l!=null&&(2&l.__u)==0;if(l===null&&s==null||c&&s==l.key&&a==l.type)return n;if(r>(c?1:0)){for(o=n-1,i=n+1;o>=0||i<t.length;)if((l=t[A=o>=0?o--:i++])!=null&&!(2&l.__u)&&s==l.key&&a==l.type)return A}return-1}function mi(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||RA.test(t)?n:n+"px"}function Jn(e,t,n,r,o){var i,A;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||mi(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||mi(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(ui,"$1")),A=t.toLowerCase(),t=A in e||t=="onFocusOut"||t=="onFocusIn"?A.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n[_n]=r[_n]:(n[_n]=Mr,e.addEventListener(t,i?Nr:Or,i)):e.removeEventListener(t,i?Nr:Or,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function yi(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[$n]==null)t[$n]=Mr++;else if(t[$n]<n[_n])return;return n(Y.event?Y.event(t):t)}}}function Hr(e,t,n,r,o,i,A,s,a,l){var c,u,d,f,h,m,p,v,y,g,_,P,E,k,B,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(a=!!(32&n.__u),i=[s=t.__e=n.__e]),(c=Y.__b)&&c(t);e:if(typeof T=="function")try{if(v=t.props,y=T.prototype&&T.prototype.render,g=(c=T.contextType)&&r[c.__c],_=c?g?g.props.value:c.__:r,n.__c?p=(u=t.__c=n.__c).__=u.__E:(y?t.__c=u=new T(v,_):(t.__c=u=new ft(v,_),u.constructor=T,u.render=jA),g&&g.sub(u),u.state||(u.state={}),u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),y&&u.__s==null&&(u.__s=u.state),y&&T.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=dt({},u.__s)),dt(u.__s,T.getDerivedStateFromProps(v,u.__s))),f=u.props,h=u.state,u.__v=t,d)y&&T.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),y&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(y&&T.getDerivedStateFromProps==null&&v!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(v,_),t.__v==n.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(v,u.__s,_)===!1){t.__v!=n.__v&&(u.props=v,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(D){D&&(D.__=t)}),Kn.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&A.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(v,u.__s,_),y&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,h,m)})}if(u.context=_,u.props=v,u.__P=e,u.__e=!1,P=Y.__r,E=0,y)u.state=u.__s,u.__d=!1,P&&P(t),c=u.render(u.props,u.state,u.context),Kn.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,P&&P(t),c=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++E<25);u.state=u.__s,u.getChildContext!=null&&(r=dt(dt({},r),u.getChildContext())),y&&!d&&u.getSnapshotBeforeUpdate!=null&&(m=u.getSnapshotBeforeUpdate(f,h)),k=c!=null&&c.type===ce&&c.key==null?wi(c.props.children):c,s=hi(e,En(k)?k:[k],t,n,r,o,i,A,s,a,l),u.base=t.__e,t.__u&=-161,u.__h.length&&A.push(u),p&&(u.__E=u.__=null)}catch(D){if(t.__v=null,a||i!=null)if(D.then){for(t.__u|=a?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;i[i.indexOf(s)]=null,t.__e=s}else{for(B=i.length;B--;)Lr(i[B]);Ur(t)}else t.__e=n.__e,t.__k=n.__k,D.then||Ur(t);Y.__e(D,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=zA(n.__e,t,n,r,o,i,A,a,l);return(c=Y.diffed)&&c(t),128&t.__u?void 0:s}function Ur(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ur))}function vi(e,t,n){for(var r=0;r<n.length;r++)Fr(n[r],n[++r],n[++r]);Y.__c&&Y.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){Y.__e(i,o.__v)}})}function wi(e){return typeof e!="object"||e==null||e.__b>0?e:En(e)?e.map(wi):dt({},e)}function zA(e,t,n,r,o,i,A,s,a){var l,c,u,d,f,h,m,p=n.props||Vn,v=t.props,y=t.type;if(y=="svg"?o="http://www.w3.org/2000/svg":y=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(l=0;l<i.length;l++)if((f=i[l])&&"setAttribute"in f==!!y&&(y?f.localName==y:f.nodeType==3)){e=f,i[l]=null;break}}if(e==null){if(y==null)return document.createTextNode(v);e=document.createElementNS(o,y,v.is&&v),s&&(Y.__m&&Y.__m(t,i),s=!1),i=null}if(y==null)p===v||s&&e.data==v||(e.data=v);else{if(i=i&&bn.call(e.childNodes),!s&&i!=null)for(p={},l=0;l<e.attributes.length;l++)p[(f=e.attributes[l]).name]=f.value;for(l in p)f=p[l],l=="dangerouslySetInnerHTML"?u=f:l=="children"||l in v||l=="value"&&"defaultValue"in v||l=="checked"&&"defaultChecked"in v||Jn(e,l,null,f,o);for(l in v)f=v[l],l=="children"?d=f:l=="dangerouslySetInnerHTML"?c=f:l=="value"?h=f:l=="checked"?m=f:s&&typeof f!="function"||p[l]===f||Jn(e,l,f,p[l],o);if(c)s||u&&(c.__html==u.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(u&&(e.innerHTML=""),hi(t.type=="template"?e.content:e,En(d)?d:[d],t,n,r,y=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,A,i?i[0]:n.__k&&Xt(n,0),s,a),i!=null)for(l=i.length;l--;)Lr(i[l]);s||(l="value",y=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[l]||y=="progress"&&!h||y=="option"&&h!=p[l])&&Jn(e,l,h,p[l],o),l="checked",m!=null&&m!=e[l]&&Jn(e,l,m,p[l],o))}return e}function Fr(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){Y.__e(o,n)}}function bi(e,t,n){var r,o;if(Y.unmount&&Y.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Fr(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){Y.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&bi(r[o],t,n||typeof e.type!="function");n||Lr(e.__e),e.__c=e.__=e.__e=void 0}function jA(e,t,n){return this.constructor(e,n)}function Cn(e,t,n){var r,o,i,A;t==document&&(t=document.documentElement),Y.__&&Y.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],A=[],Hr(t,e=(!r&&n||t).__k=Ae(ce,null,[e]),o||Vn,Vn,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?bn.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,A),vi(i,e,A)}function _i(e,t){Cn(e,t,_i)}function qA(e,t,n){var r,o,i,A,s=dt({},e.props);for(i in e.type&&e.type.defaultProps&&(A=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i]===void 0&&A!=null?A[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?bn.call(arguments,2):n),Pn(e.type,s,r||e.key,o||e.ref,null)}function At(e){function t(n){var r,o;return this.getChildContext||(r=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&r.forEach(function(A){A.__e=!0,Rr(A)})},this.sub=function(i){r.add(i);var A=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),A&&A.call(i)}}),n.children}return t.__c="__cC"+di++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}bn=Kn.slice,Y={__e:function(e,t,n,r){for(var o,i,A;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),A=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),A=o.__d),A)return o.__E=o}catch(s){e=s}throw e}},si=0,ft.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=dt({},this.state),typeof e=="function"&&(e=e(dt({},n),this.props)),e&&dt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Rr(this))},ft.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Rr(this))},ft.prototype.render=ce,xt=[],li=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ci=function(e,t){return e.__v.__b-t.__v.__b},Xn.__r=0,Qr=Math.random().toString(8),$n="__d"+Qr,_n="__a"+Qr,ui=/(PointerCapture)$|Capture$/i,Mr=0,Or=yi(!1),Nr=yi(!0),di=0;var It,Pe,zr,Ei,Jt=0,Pi=[],Se=Y,Ci=Se.__b,ki=Se.__r,Si=Se.diffed,Di=Se.__c,Bi=Se.unmount,xi=Se.__;function Zt(e,t){Se.__h&&Se.__h(Pe,e,Jt||t),Jt=0;var n=Pe.__H||(Pe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ee(e){return Jt=1,jr(Mi,e)}function jr(e,t,n){var r=Zt(It++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Mi(void 0,t),function(s){var a=r.__N?r.__N[0]:r.__[0],l=r.t(a,s);a!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=Pe,!Pe.__f)){var o=function(s,a,l){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(d){return d.__c});if(c.every(function(d){return!d.__N}))return!i||i.call(this,s,a,l);var u=r.__c.props!==s;return c.some(function(d){if(d.__N){var f=d.__[0];d.__=d.__N,d.__N=void 0,f!==d.__[0]&&(u=!0)}}),i&&i.call(this,s,a,l)||u};Pe.__f=!0;var i=Pe.shouldComponentUpdate,A=Pe.componentWillUpdate;Pe.componentWillUpdate=function(s,a,l){if(this.__e){var c=i;i=void 0,o(s,a,l),i=c}A&&A.call(this,s,a,l)},Pe.shouldComponentUpdate=o}return r.__N||r.__}function X(e,t){var n=Zt(It++,3);!Se.__s&&Wr(n.__H,t)&&(n.__=e,n.u=t,Pe.__H.__h.push(n))}function kn(e,t){var n=Zt(It++,4);!Se.__s&&Wr(n.__H,t)&&(n.__=e,n.u=t,Pe.__h.push(n))}function ne(e){return Jt=5,Ie(function(){return{current:e}},[])}function Zn(e,t,n){Jt=6,kn(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function Ie(e,t){var n=Zt(It++,7);return Wr(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function q(e,t){return Jt=8,Ie(function(){return e},t)}function rt(e){var t=Pe.context[e.__c],n=Zt(It++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Pe)),t.props.value):e.__}function Ii(e,t){Se.useDebugValue&&Se.useDebugValue(t?t(e):e)}function Ti(){var e=Zt(It++,11);if(!e.__){for(var t=Pe.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function WA(){for(var e;e=Pi.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(er),t.__h.some(qr),t.__h=[]}catch(n){t.__h=[],Se.__e(n,e.__v)}}}Se.__b=function(e){Pe=null,Ci&&Ci(e)},Se.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),xi&&xi(e,t)},Se.__r=function(e){ki&&ki(e),It=0;var t=(Pe=e.__c).__H;t&&(zr===Pe?(t.__h=[],Pe.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(er),t.__h.some(qr),t.__h=[],It=0)),zr=Pe},Se.diffed=function(e){Si&&Si(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Pi.push(t)!==1&&Ei===Se.requestAnimationFrame||((Ei=Se.requestAnimationFrame)||GA)(WA)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),zr=Pe=null},Se.__c=function(e,t){t.some(function(n){try{n.__h.some(er),n.__h=n.__h.filter(function(r){return!r.__||qr(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],Se.__e(r,n.__v)}}),Di&&Di(e,t)},Se.unmount=function(e){Bi&&Bi(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{er(r)}catch(o){t=o}}),n.__H=void 0,t&&Se.__e(t,n.__v))};var Qi=typeof requestAnimationFrame=="function";function GA(e){var t,n=function(){clearTimeout(r),Qi&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Qi&&(t=requestAnimationFrame(n))}function er(e){var t=Pe,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Pe=t}function qr(e){var t=Pe;e.__c=e.__(),Pe=t}function Wr(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Mi(e,t){return typeof t=="function"?t(e):t}function Oi(e,t){for(var n in t)e[n]=t[n];return e}function Gr(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Ni(e,t){var n=t(),r=ee({t:{__:n,u:t}}),o=r[0].t,i=r[1];return kn(function(){o.__=n,o.u=t,Yr(o)&&i({t:o})},[e,n,t]),X(function(){return Yr(o)&&i({t:o}),e(function(){Yr(o)&&i({t:o})})},[e]),n}function Yr(e){try{return!((t=e.__)===(n=e.u())&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}var t,n}function Li(e){e()}function Ri(e){return e}function Hi(){return[!1,Li]}var Ui=kn;function $r(e,t){this.props=e,this.context=t}function YA(e,t){function n(o){var i=this.props.ref;return i!=o.ref&&i&&(typeof i=="function"?i(null):i.current=null),t?!t(this.props,o)||i!=o.ref:Gr(this.props,o)}function r(o){return this.shouldComponentUpdate=n,Ae(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.__f=r.prototype.isReactComponent=!0,r.type=e,r}($r.prototype=new ft).isPureReactComponent=!0,$r.prototype.shouldComponentUpdate=function(e,t){return Gr(this.props,e)||Gr(this.state,t)};var Fi=Y.__b;Y.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Fi&&Fi(e)};var $A=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ye(e){function t(n){var r=Oi({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=$A,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var zi=function(e,t){return e==null?null:Ct(Ct(e).map(t))},VA={map:zi,forEach:zi,count:function(e){return e?Ct(e).length:0},only:function(e){var t=Ct(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Ct},KA=Y.__e;Y.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}KA(e,t,n,r)};var ji=Y.unmount;function qi(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Oi({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return qi(r,t,n)})),e}function Wi(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Wi(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function tr(){this.__u=0,this.o=null,this.__b=null}function Gi(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function XA(e){var t,n,r,o=null;function i(A){if(t||(t=e()).then(function(s){s&&(o=s.default||s),r=!0},function(s){n=s,r=!0}),n)throw n;if(!r)throw t;return o?Ae(o,A):null}return i.displayName="Lazy",i.__f=!0,i}function Sn(){this.i=null,this.l=null}Y.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ji&&ji(e)},(tr.prototype=new ft).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var o=Gi(r.__v),i=!1,A=function(){i||r.__z||(i=!0,n.__R=null,o?o(a):a())};n.__R=A;var s=n.__P;n.__P=null;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=Wi(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.o.pop();)c.__P=s,c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(A,A)},tr.prototype.componentWillUnmount=function(){this.o=[]},tr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=qi(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&Ae(ce,null,e.fallback);return o&&(o.__u&=-33),[Ae(ce,null,t.__a?null:e.children),o]};var Yi=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function JA(e){return this.getChildContext=function(){return e.context},e.children}function ZA(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Cn(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(o,i){this.childNodes.push(o),t.h.insertBefore(o,i)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.h.removeChild(o)}}}Cn(Ae(JA,{context:t.context},e.__v),t.v)}function $i(e,t){var n=Ae(ZA,{__v:e,h:t});return n.containerInfo=t,n}(Sn.prototype=new ft).__a=function(e){var t=this,n=Gi(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Yi(t,e,r)):o()};n?n(i):i()}},Sn.prototype.render=function(e){this.i=null,this.l=new Map;var t=Ct(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Sn.prototype.componentDidUpdate=Sn.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Yi(e,n,t)})};var Vi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,el=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,tl=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,nl=/[A-Z0-9]/g,rl=typeof document<"u",ol=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ki(e,t,n){return t.__k==null&&(t.textContent=""),Cn(e,t),typeof n=="function"&&n(),e?e.__c:null}function il(e,t,n){return _i(e,t),typeof n=="function"&&n(),e?e.__c:null}ft.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ft.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Xi=Y.event;Y.event=function(e){return Xi&&(e=Xi(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Vr,al={configurable:!0,get:function(){return this.class}},Ji=Y.vnode;Y.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={},i=r.indexOf("-")==-1;for(var A in n){var s=n[A];if(!(A==="value"&&"defaultValue"in n&&s==null||rl&&A==="children"&&r==="noscript"||A==="class"||A==="className")){var a=A.toLowerCase();A==="defaultValue"&&"value"in n&&n.value==null?A="value":A==="download"&&s===!0?s="":a==="translate"&&s==="no"?s=!1:a[0]==="o"&&a[1]==="n"?a==="ondoubleclick"?A="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||ol(n.type)?a==="onfocus"?A="onfocusin":a==="onblur"?A="onfocusout":tl.test(A)&&(A=a):a=A="oninput":i&&el.test(A)?A=A.replace(nl,"-$&").toLowerCase():s===null&&(s=void 0),a==="oninput"&&o[A=a]&&(A="oninputCapture"),o[A]=s}}r=="select"&&(o.multiple&&Array.isArray(o.value)&&(o.value=Ct(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),o.defaultValue!=null&&(o.value=Ct(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value}))),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",al)):n.className&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=Vi,Ji&&Ji(e)};var Zi=Y.__r;Y.__r=function(e){Zi&&Zi(e),Vr=e.__c};var ea=Y.diffed;Y.diffed=function(e){ea&&ea(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Vr=null};var sl={ReactCurrentDispatcher:{current:{readContext:function(e){return Vr.__n[e.__c].props.value},useCallback:q,useContext:rt,useDebugValue:Ii,useDeferredValue:Ri,useEffect:X,useId:Ti,useImperativeHandle:Zn,useInsertionEffect:Ui,useLayoutEffect:kn,useMemo:Ie,useReducer:jr,useRef:ne,useState:ee,useSyncExternalStore:Ni,useTransition:Hi}}};function Al(e){return Ae.bind(null,e)}function zt(e){return!!e&&e.$$typeof===Vi}function ll(e){return zt(e)&&e.type===ce}function cl(e){return!!e&&typeof e.displayName=="string"&&e.displayName.indexOf("Memo(")==0}function ul(e){return zt(e)?qA.apply(null,arguments):e}function ta(e){return!!e.__k&&(Cn(null,e),!0)}function dl(e){return e&&(e.base||e.nodeType===1&&e)||null}var fl=function(e,t){return e(t)},pl=function(e,t){var n=Y.debounceRendering;Y.debounceRendering=function(o){return o()};var r=e(t);return Y.debounceRendering=n,r},hl=zt,M={useState:ee,useId:Ti,useReducer:jr,useEffect:X,useLayoutEffect:kn,useInsertionEffect:Ui,useTransition:Hi,useDeferredValue:Ri,useSyncExternalStore:Ni,startTransition:Li,useRef:ne,useImperativeHandle:Zn,useMemo:Ie,useCallback:q,useContext:rt,useDebugValue:Ii,version:"18.3.1",Children:VA,render:Ki,hydrate:il,unmountComponentAtNode:ta,createPortal:$i,createElement:Ae,createContext:At,createFactory:Al,cloneElement:ul,createRef:fi,Fragment:ce,isValidElement:zt,isElement:hl,isFragment:ll,isMemo:cl,findDOMNode:dl,Component:ft,PureComponent:$r,memo:YA,forwardRef:Ye,flushSync:pl,unstable_batchedUpdates:fl,StrictMode:ce,Suspense:tr,SuspenseList:Sn,lazy:XA,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:sl},gl=0;function C(e,t,n,r,o,i){t||(t={});var A,s,a=t;if("ref"in a)for(s in a={},t)s=="ref"?A=t[s]:a[s]=t[s];var l={type:e,props:a,key:n,ref:A,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--gl,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(A=e.defaultProps))for(s in A)a[s]===void 0&&(a[s]=A[s]);return Y.vnode&&Y.vnode(l),l}function ml(e){return{render:function(t){Ki(t,e)},unmount:function(){ta(e)}}}var yl="diffed",na="__c",Kr="__s",en="__c",ra="__k",Xr="__d",tn="__s",oa=/[\s\n\\/='"\0<>]/,ia=/^(xlink|xmlns|xml)([A-Z])/,vl=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,wl=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,bl=new Set(["draggable","spellcheck"]);function aa(e){e.__g!==void 0?e.__g|=8:e[Xr]=!0}function _l(e){e.__g!==void 0?e.__g&=-9:e[Xr]=!1}function sa(e){return e.__g!==void 0?!!(8&e.__g):e[Xr]===!0}var El=/["&<]/;function nr(e){if(e.length===0||El.test(e)===!1)return e;for(var t=0,n=0,r="",o="";n<e.length;n++){switch(e.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=o,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var Aa={},Pl=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),Cl=/[A-Z]/g;function kl(e){var t="";for(var n in e){var r=e[n];if(r!=null&&r!==""){var o=n[0]=="-"?n:Aa[n]||(Aa[n]=n.replace(Cl,"-$&").toLowerCase()),i=";";typeof r!="number"||o.startsWith("--")||Pl.has(o)||(i="px;"),t=t+o+":"+r+i}}return t||void 0}function la(){this.__d=!0}function Sl(e,t){return{__v:e,context:t,props:e.props,setState:la,forceUpdate:la,__d:!0,__h:new Array(0)}}var Jr,jt,Dn,Bn,Zr={},ca=[],nn=Array.isArray,eo=Object.assign,$e="",to="<!--$s-->",no="<!--/$s-->";function ua(e,t,n){var r=Y[Kr];Y[Kr]=!0,Jr=Y.__b,jt=Y[yl],Dn=Y.__r,Bn=Y.unmount;var o=Ae(ce,null);o[ra]=[e];try{var i=Tt(e,t||Zr,!1,void 0,o,!1,n);return nn(i)?i.join($e):i}catch(A){throw A.then?new Error('Use "renderToStringAsync" for suspenseful rendering.'):A}finally{Y[na]&&Y[na](e,ca),Y[Kr]=r,ca.length=0}}function da(e,t){var n,r=e.type,o=!0;return e[en]?(o=!1,(n=e[en]).state=n[tn]):n=new r(e.props,t),e[en]=n,n.__v=e,n.props=e.props,n.context=t,aa(n),n.state==null&&(n.state=Zr),n[tn]==null&&(n[tn]=n.state),r.getDerivedStateFromProps?n.state=eo({},n.state,r.getDerivedStateFromProps(n.props,n.state)):o&&n.componentWillMount?(n.componentWillMount(),n.state=n[tn]!==n.state?n[tn]:n.state):!o&&n.componentWillUpdate&&n.componentWillUpdate(),Dn&&Dn(e),n.render(n.props,n.state,t)}function Tt(e,t,n,r,o,i,A){if(e==null||e===!0||e===!1||e===$e)return $e;var s=typeof e;if(s!="object")return s=="function"?$e:s=="string"?nr(e):e+$e;if(nn(e)){var a,l=$e;o[ra]=e;for(var c=e.length,u=0;u<c;u++){var d=e[u];if(d!=null&&typeof d!="boolean"){var f,h=Tt(d,t,n,r,o,i,A);typeof h=="string"?l+=h:(a||(a=new Array(c)),l&&a.push(l),l=$e,nn(h)?(f=a).push.apply(f,h):a.push(h))}}return a?(l&&a.push(l),a):l}if(e.constructor!==void 0)return $e;e.__=o,Jr&&Jr(e);var m=e.type,p=e.props;if(typeof m=="function"){var v,y,g,_=t;if(m===ce){if("tpl"in p){for(var P=$e,E=0;E<p.tpl.length;E++)if(P+=p.tpl[E],p.exprs&&E<p.exprs.length){var k=p.exprs[E];if(k==null)continue;typeof k!="object"||k.constructor!==void 0&&!nn(k)?P+=k:P+=Tt(k,t,n,r,e,i,A)}return P}if("UNSTABLE_comment"in p)return"<!--"+nr(p.UNSTABLE_comment)+"-->";y=p.children}else{if((v=m.contextType)!=null){var B=t[v.__c];_=B?B.props.value:v.__}var T=m.prototype&&typeof m.prototype.render=="function";if(T)y=da(e,_),g=e[en];else{e[en]=g=Sl(e,_);for(var D=0;sa(g)&&D++<25;){_l(g),Dn&&Dn(e);try{y=m.call(g,p,_)}catch(b){throw b}}aa(g)}if(g.getChildContext!=null&&(t=eo({},t,g.getChildContext())),T&&Y.errorBoundaries&&(m.getDerivedStateFromError||g.componentDidCatch)){y=y!=null&&y.type===ce&&y.key==null&&y.props.tpl==null?y.props.children:y;try{return Tt(y,t,n,r,e,i,!1)}catch(b){return m.getDerivedStateFromError&&(g[tn]=m.getDerivedStateFromError(b)),g.componentDidCatch&&g.componentDidCatch(b,Zr),sa(g)?(y=da(e,t),(g=e[en]).getChildContext!=null&&(t=eo({},t,g.getChildContext())),Tt(y=y!=null&&y.type===ce&&y.key==null&&y.props.tpl==null?y.props.children:y,t,n,r,e,i,A)):$e}finally{jt&&jt(e),Bn&&Bn(e)}}}y=y!=null&&y.type===ce&&y.key==null&&y.props.tpl==null?y.props.children:y;try{var O=Tt(y,t,n,r,e,i,A);return jt&&jt(e),Y.unmount&&Y.unmount(e),e._suspended?typeof O=="string"?to+O+no:nn(O)?(O.unshift(to),O.push(no),O):O.then(function(b){return to+b+no}):O}catch(b){if(A&&A.onError){var S=A.onError(b,e,function(F,J){return Tt(F,t,n,r,J,i,A)});if(S!==void 0)return S;var N=Y.__e;return N&&N(b,e),$e}throw b}}var R,L="<"+m,U=$e;for(var x in p){var Q=p[x];if(typeof(Q=Bl(Q)?Q.value:Q)!="function"||x==="class"||x==="className"){switch(x){case"children":R=Q;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in p)continue;x="for";break;case"className":if("class"in p)continue;x="class";break;case"defaultChecked":x="checked";break;case"defaultSelected":x="selected";break;case"defaultValue":case"value":switch(x="value",m){case"textarea":R=Q;continue;case"select":r=Q;continue;case"option":r!=Q||"selected"in p||(L+=" selected")}break;case"dangerouslySetInnerHTML":U=Q&&Q.__html;continue;case"style":typeof Q=="object"&&(Q=kl(Q));break;case"acceptCharset":x="accept-charset";break;case"httpEquiv":x="http-equiv";break;default:if(ia.test(x))x=x.replace(ia,"$1:$2").toLowerCase();else{if(oa.test(x))continue;x[4]!=="-"&&!bl.has(x)||Q==null?n?wl.test(x)&&(x=x==="panose1"?"panose-1":x.replace(/([A-Z])/g,"-$1").toLowerCase()):vl.test(x)&&(x=x.toLowerCase()):Q+=$e}}Q!=null&&Q!==!1&&(L=Q===!0||Q===$e?L+" "+x:L+" "+x+'="'+(typeof Q=="string"?nr(Q):Q+$e)+'"')}}if(oa.test(m))throw new Error(m+" is not a valid HTML tag name in "+L+">");if(U||(typeof R=="string"?U=nr(R):R!=null&&R!==!1&&R!==!0&&(U=Tt(R,t,m==="svg"||m!=="foreignObject"&&n,r,e,i,A))),jt&&jt(e),Bn&&Bn(e),!U&&Dl.has(m))return L+"/>";var w="</"+m+">",V=L+">";return nn(U)?[V].concat(U,[w]):typeof U!="string"?[V,U,w]:V+U+w}var Dl=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function Bl(e){return e!==null&&typeof e=="object"&&typeof e.peek=="function"&&"value"in e}const xl={renderToString:ua,renderToStaticMarkup:ua},Il={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_AGENT_ENDPOINT:"https://qa.access-ci.org/api/v1",VITE_ALLOW_ANON_ACCESS:"true",VITE_API_KEY:"4nn5l4T4TnkMdzsK0AwAtnGRcheBDnjawuAT42LaOLc",VITE_NETLIFY_BASE_URL:"https://access-jsm-api.netlify.app",VITE_RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/chat/rating/",VITE_TURNSTILE_SITE_KEY:"0x4AAAAAAC2toq7FThjGplVx"};function rr(){return rr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rr.apply(null,arguments)}function fa(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"){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}typeof SuppressedError=="function"&&SuppressedError;const De={AUDIO_BUTTON:"audio-button",NOTIFICATION_BUTTON:"notification-button",CLOSE_CHAT_BUTTON:"close-chat-button",SEND_MESSAGE_BUTTON:"send-button",VOICE_MESSAGE_BUTTON:"voice-button",FILE_ATTACHMENT_BUTTON:"file-attachment-button",EMOJI_PICKER_BUTTON:"emoji-button"},pa="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20viewBox='0%200%201000%201000'%3e%3crect%20width='100%25'%20height='100%25'%20fill='%23fff'/%3e%3cg%3e%3crect%20width='45'%20height='30'%20x='-22.5'%20y='-15'%20rx='1.5'%20ry='1.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-99%20362)%20scale(3.4003)'/%3e%3cpath%20d='M0%2075q14%200%2014%2017%200%2016-14%2016Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(180%20106%20386)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='4'%20x='-12.5'%20y='-2'%20rx='.2'%20ry='.2'%20style='stroke:%2346648c;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-46%20282)%20scale(3.4003)'/%3e%3cpath%20d='M19%2065h4l5%204v1H14v-1Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='2'%20x='-12.5'%20y='-1'%20rx='.1'%20ry='.1'%20style='stroke:%2398b0ca;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-3%20240)%20scale(3.4003)'/%3e%3ccircle%20r='7.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(236%20175)%20scale(3.4003)'/%3e%3crect%20width='45'%20height='30'%20x='-22.5'%20y='-15'%20rx='1.5'%20ry='1.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20139%20600)%20scale(3.4003)'/%3e%3cpath%20d='M184%2075q14%200%2014%2017%200%2016-14%2016Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='4'%20x='-12.5'%20y='-2'%20rx='.2'%20ry='.2'%20style='stroke:%2346648c;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20219%20548)%20scale(3.4003)'/%3e%3cpath%20d='M175%2065h4l5%204v1h-14v-1Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='2'%20x='-12.5'%20y='-1'%20rx='.1'%20ry='.1'%20style='stroke:%2398b0ca;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20262%20505)%20scale(3.4003)'/%3e%3ccircle%20r='7.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(767%20175)%20scale(3.4003)'/%3e%3crect%20width='116.7'%20height='70'%20x='-58.4'%20y='-35'%20rx='31.5'%20ry='31.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2371c9fc;fill-rule:nonzero;opacity:1'%20transform='translate(502%20877)%20scale(3.4003)'/%3e%3crect%20width='60'%20height='20'%20x='-30'%20y='-10'%20rx='3'%20ry='3'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='translate(502%20728)%20scale(3.4003)'/%3e%3ccircle%20r='75'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2371c9fc;fill-rule:nonzero;opacity:1'%20transform='translate(502%20473)%20scale(3.4003)'/%3e%3crect%20width='129.4'%20height='82.3'%20x='-64.7'%20y='-41.1'%20rx='37'%20ry='37'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23fff;fill-rule:nonzero;opacity:1'%20transform='translate(502%20464)%20scale(3.4003)'/%3e%3crect%20width='108'%20height='68.6'%20x='-54'%20y='-34.3'%20rx='30.9'%20ry='30.9'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23162334;fill-rule:nonzero;opacity:1'%20transform='translate(502%20464)%20scale(3.4003)'/%3e%3ccircle%20r='19.4'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(415%20464)%20scale(3.4003)'/%3e%3ccircle%20r='19.4'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(591%20464)%20scale(3.4003)'/%3e%3crect%20width='96'%20height='53.2'%20x='-48'%20y='-26.6'%20rx='23.9'%20ry='23.9'%20style='stroke:%23162334;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23162334;fill-rule:nonzero;opacity:1'%20transform='translate(503%20875)%20scale(3.4003)'/%3e%3cpath%20stroke-linecap='round'%20d='m68%20215%207-15M81%20222l-7-22M81%20222l7-14M101%20208H87M114%20219l-7-24M113%20219l13-22M131%20214l-5-17M148%20214h-18M69%20214H51M100%20209l7-15'%20style='stroke:%23a478fc;stroke-width:3;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:10;is-custom-font:none;font-file-url:none;fill:none;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3c/g%3e%3c/svg%3e",ha=Ye((e,t)=>Ae("svg",{viewBox:"0 0 637 637",ref:t,...e},Ae("path",{d:"m478 113-13 2-4 1h4l14-2c10-2 35-2 42-1l6 3 3 1c3 0-4-3-8-5-7-1-34-1-44 1m56 6 8 6c7 5 20 17 20 19s7 12 8 12l-3-6-4-6c0-3-15-17-25-24-5-3-8-4-4-1m-198 16-9 1a512 512 0 0 1 9-1m-180 30a412 412 0 0 0-23 4 167 167 0 0 0-32 8 439 439 0 0 1 46-9 304 304 0 0 1 11-2l6-1h-8m369 8 4 3-7-6c-1 0 0 2 3 3m-439 9c-7 3-18 13-18 15l6-5c5-5 9-8 14-10l6-4-8 4m442 12-10 11-7 6 7-6c7-5 14-14 13-16l-3 5M65 205l-1 11c0 9 0 10 4 17 5 10 7 12 22 11 10 0 15 0 38-5l5-1-6 1-16 2-21 2c-13 1-16-1-21-10-3-5-4-6-4-15l1-12c1-4 1-5-1-1m335 1c3 0 3 1 3 3l-2 6c-2 5-35 39-76 80-53 51-120 117-138 137-21 24-22 25-22 27 0 3 6 9 9 9 4 0 14-8 38-27a5073 5073 0 0 1 15-16 1421 1421 0 0 0-17 15l-31 25-6 2-4-3c-3-3-3-4-2-6 3-8 79-85 160-163 57-57 79-80 79-86 0-2-3-4-7-4-2 0-2 0 1 1m165 18c-9 17-25 32-57 53l-10 8 16-11 12-8c15-10 27-22 39-39 5-7 6-8 4-8l-4 5m-221 2a199 199 0 0 0-19 10 183 183 0 0 1 27-12c0-1-1-1-8 2m-34 16c-3 3-2 3 2 0l1-2-3 2m151 3-1 2 2-2c3-3 2-3-1 0m-16 12-11 10a281 281 0 0 0 11-10m-24 18-7 5-7 5-42 31c-10 7-24 19-22 19l7-6 16-12a343 343 0 0 0 35-25 573 573 0 0 0 20-17m-187 0-2 2 4-2 3-2-5 2m-14 6-3 2 4-1 4-3-5 2m-7 3-8 4-18 8 18-7 7-3 3-1c1-2 0-2-2-1m254 24a2672 2672 0 0 1-71 54 601 601 0 0 0 39-29 1352 1352 0 0 1 32-25m-291-8-2 2 4-2 3-2-5 2m-13 5-2 2h3c5-3 4-4-1-2m-19 9-7 3-13 6c-10 5-13 7-14 10-3 4-2 5 1 0 2-3 5-5 14-9l13-6 12-6-6 2m178 36c-17 12-21 16-21 17a390 390 0 0 1 20-17m-206 34 1 4 1 3 1 5 2 8 1 5v-6l-1-8-2-5-1-4-1-2c-1-2-1-2-1 0m222 23-9 7a683 683 0 0 0-56 44 261 261 0 0 0-26 20 1345 1345 0 0 0-46 34c-6 3-7 3-19 3-11 0-12 0-18-3-8-4-10-8-17-20l-5-10 4 10c5 10 12 18 19 22 4 2 6 2 17 2 13 0 14 0 21-3l26-19 42-33a2183 2183 0 0 0 43-34 643 643 0 0 1 24-20",fill:"#fff",fillRule:"evenodd"}),Ae("path",{d:"M478 114a620 620 0 0 1-39 6l-21 3a5481 5481 0 0 0-19 3 870 870 0 0 1-54 8l-1 1-6 1-12 2-13 2a992 992 0 0 0-76 12 400 400 0 0 1-45 8l-6 1-5 1h-3l-3 1-2 1-26 4-13 2-17 3c-23 5-33 9-43 19-7 8-9 13-9 27 0 8 1 9 4 14 5 9 8 11 21 10l21-2a1133 1133 0 0 1 23-4 659 659 0 0 0 74-14l3-1h3l3-1h3l2-1 2-1h3l2-1h2l24-5 38-7a2100 2100 0 0 1 93-18l3-1 10-1a2082 2082 0 0 1 120-17l2 1c2 0 8 5 8 7l1 2 1 6c0 4 0 6-3 10-2 4-16 16-18 16l-7 5-10 8a1070 1070 0 0 0-11 7 113 113 0 0 1-20 14l-2 2-3 2-2 2h-1a154 154 0 0 1-28 21l-5 4-5 4a573 573 0 0 1-50 37 175 175 0 0 0-24 18l-1 2-2 1-2 1-2 1-1 1-12 10a396 396 0 0 0-32 25l-8 6-6 5-9 7a326 326 0 0 1-25 20l-13 12a5073 5073 0 0 0-17 15c-24 20-34 27-39 27-2 0-8-6-8-9 0-2 1-3 22-27 18-20 85-86 138-137 41-41 74-75 76-80l2-6c0-2 0-3-2-3l-7 1a233 233 0 0 1-26 9l-1 1-1 1h-1l-1 1h-2l-3 2-1 1h-2l-3 2h-1l-5 2-22 10-9 4-4 2-5 2-10 4-2 1-2 1-2 1-13 6a334 334 0 0 1-38 17 75 75 0 0 0-14 6l-5 2-4 1-2 1-3 2-7 3-16 6a247 247 0 0 0-32 14l-1 1h-2l-1 1h-2l-1 1-12 6a103 103 0 0 0-27 15l-2 5-1 1v11l1 5 1 5 1 4c0 3 0 4 2 4v3l1 3 1 2 2 10 1 4 1 5 2 10 2 8 1 4 1 4c3 3 9 25 11 38l1 7v2l1 4v1l1 1v2l1 2 1 3v1l5 10c7 13 9 16 17 20 6 3 7 3 18 3 12 0 13 0 19-3 8-4 11-6 26-18a1345 1345 0 0 1 85-67 683 683 0 0 1 50-39l12-9a513 513 0 0 1 44-33 201 201 0 0 0 22-17 2270 2270 0 0 0 73-54 158 158 0 0 0 58-59c2 0 3-9 4-27l-1-19-1-4-1-6-1-3-4-6-4-6c0-2-6-8-13-14a77 77 0 0 0-28-18c-6-1-34-1-43 1"}))),ga=Ye((e,t)=>Ae("svg",{viewBox:"0 -960 960 960",ref:t,...e},Ae("path",{d:"M765-321q0 117-84 196-83 80-200 80-118 0-200-80t-83-196v-392q0-85 61-144 61-58 146-58 86 0 147 58 61 59 61 144v374q0 54-39 92-39 37-93 37-55 0-93-37-38-38-38-92v-372h110v372q0 9 6 14t15 5q8 0 15-5t7-14v-374q0-39-29-66t-68-27q-40 0-69 27t-29 66v392q0 71 51 119t122 48q71 0 122-48t51-119v-426h111v426Z"}))),Tl=Ye((e,t)=>Ae("svg",{viewBox:"0 -960 960 960",ref:t,...e},Ae("path",{d:"M125-165v-113h77v-273q0-93 55-167 56-75 146-100v-19q0-32 22-55 23-23 55-23t55 23q22 23 22 55v19q90 25 146 99 56 73 56 168v273h77v113H125ZM480-32q-38 0-66-27-27-27-27-66h186q0 39-27 66t-66 27Z"}))),Ql=Ye((e,t)=>Ae("svg",{viewBox:"0 -960 960 960",ref:t,...e},Ae("path",{d:"M137-190v-113h78v-253q0-41 11-79 11-39 35-71l-9 150h10L17-802l74-74L873-92l-74 74-175-172H137Zm609-149L319-769q20-15 41-25t44-16v-28q0-32 22-54t54-22q32 0 55 22t22 54v28q85 23 137 94t52 160v217ZM481-47q-38 0-65-27t-27-65h184q0 38-27 65t-65 27Z"}))),Ml=Ye((e,t)=>Ae("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",ref:t,...e},Ae("g",{strokeLinecap:"round",strokeWidth:10},Ae("path",{d:"m19 19 61 61M80 19 19 80"})))),Ol=Ye((e,t)=>Ae("svg",{viewBox:"0 -960 960 960",ref:t,...e},Ae("path",{d:"M94-136v-255l351-93-351-92v-253l816 346L94-136Z"}))),Nl=Ye((e,t)=>Ae("svg",{viewBox:"0 -960 960 960",ref:t,...e},Ae("path",{d:"M480-372q-61 0-105-43-43-43-43-105v-240q0-61 43-105 43-43 105-43 61 0 105 43 43 44 43 105v240q0 62-43 105t-105 43ZM425-76v-122q-121-16-197-108t-76-214h109q0 91 64 154t155 63q91 0 155-63t64-154h109q0 122-77 214T534-198v122H425Z"}))),Ll=Ye((e,t)=>Ae("svg",{viewBox:"0 -960 960 960",ref:t,...e},Ae("path",{d:"m763-343-80-79q8-20 13-44 5-23 5-54h109q0 49-11 95t-36 82ZM625-482 336-770v-2q3-56 45-96t101-40q62 0 105 43t43 105v249l-1 17q-1 7-4 12ZM427-76v-122q-120-16-196-108-77-92-77-214h109q0 91 64 154t155 63q43 0 80-14 37-15 67-41l78 79q-35 32-78 53t-93 28v122H427Zm362 27L41-796l75-75 748 748-75 74Z"}))),ma=Ye((e,t)=>Ae("svg",{viewBox:"0 -960 960 960",ref:t,...e},Ae("path",{d:"M625-511q29 0 50-21t20-50q0-29-20-50-21-20-50-20t-50 20-20 50q0 29 20 50 21 21 50 21Zm-290 0q29 0 50-21t20-49q0-30-20-50t-50-21q-29 0-50 20-20 21-20 50 0 30 20 50 21 21 50 21Zm145 268q75 0 137-43t85-115H258q24 72 85 115 62 43 137 43Zm0 198q-90 0-170-34-79-34-138-93T79-310q-34-80-34-170t34-170q34-79 93-138t138-93q80-34 170-34t170 34q79 34 138 93t93 138q34 80 34 170t-34 170q-34 79-93 138T650-79q-80 34-170 34Zm0-435Zm0 322q134 0 228-94t94-228q0-134-94-228t-228-94q-134 0-228 94t-94 228q0 134 94 228t228 94Z"}))),Rl=Ye((e,t)=>Ae("svg",{viewBox:"0 -960 960 960",ref:t,...e},Ae("path",{d:"M553-64v-108q107-27 173-113 67-87 67-197 0-109-67-195T553-789v-108q152 26 249 144 97 117 97 271 0 155-97 273T553-64ZM61-335v-290h176l236-237v764L237-335H61Zm492 28v-346q51 23 82 70t31 103-31 103q-31 47-82 70Z"}))),Hl=Ye((e,t)=>Ae("svg",{viewBox:"0 -960 960 960",ref:t,...e},Ae("path",{d:"M807-15 700-123q-33 21-71 37-38 15-80 22v-108q20-4 38-12l35-17-153-154v257L234-335H57v-290h144L10-818l74-75L882-90l-75 75Zm37-264-80-79q13-30 19-60 7-31 7-64 0-109-68-195-67-86-173-112v-108q152 26 249 144 98 117 98 271 0 55-14 107-13 51-38 96ZM661-462 549-575v-78q51 23 83 70 31 47 31 103l-1 9-1 9ZM469-655 366-759l103-103v207Z"}))),ya={general:{primaryColor:"#42b0c5",secondaryColor:"#491d8d",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",showHeader:!0,showFooter:!0,showInputRow:!0,actionDisabledIcon:"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2042%2042'%3e%3cpath%20style='fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:%23b00000;stroke-opacity:1;stroke-miterlimit:4'%20d='M17%209a8%208%200%200%201-8%208%208%208%200%200%201-8-8%208%208%200%200%201%208-8%208%208%200%200%201%208%208Zm0%200'%20transform='rotate(.086)%20scale(1.77778)'/%3e%3cpath%20style='fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:%23b00000;stroke-opacity:1;stroke-miterlimit:10'%20d='M14.66%2014.66%203.34%203.34'%20transform='rotate(.086)%20scale(1.77778)'/%3e%3c/svg%3e",embedded:!1,flowStartTrigger:"ON_LOAD"},tooltip:{mode:"CLOSE",text:"Talk to me! ๐Ÿ˜Š"},chatButton:{icon:ha},header:{title:C("div",{style:{cursor:"pointer",margin:0,fontSize:20,fontWeight:"bold"},onClick:()=>window.open("https://github.com/tjtanjin/","_blank","noopener,noreferrer"),children:"Tan Jin"}),showAvatar:!0,avatar:pa,buttons:[De.NOTIFICATION_BUTTON,De.AUDIO_BUTTON,De.CLOSE_CHAT_BUTTON],closeChatIcon:Ml},notification:{disabled:!1,defaultToggledOn:!0,volume:.2,icon:Tl,iconDisabled:Ql,sound:"data:audio/wav;base64,UklGRmaIAABXQVZFZm10IBAAAAABAAIAQB8AAAB9AAAEABAATElTVBoAAABJTkZPSVNGVA4AAABMYXZmNjAuMTYuMTAwAGRhdGEgiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAAA//////7/////////AAABAAAAAgABAAEAAQAAAAIAAQABAP//AAD+////AAD+//7////+////AAD//wAA/v8AAAAA/v8AAP//AAAAAAAAAgD////////+////AAABAAEAAgD/////AQABAAAA//8CAP//AAAAAAAA/v8AAAAA//8AAAEA//8EAAAAAAAAAAAA//8BAP//AQABAAEA/////wEA/v///wAAAAACAAAAAAABAAAA//8AAP//AAACAP//////////AAAAAAEAAAAAAAEA//8AAAEAAQADAAIAAgAAAAAA/v///wEAAAAAAAEAAAAAAAEA//8AAAEAAQD//wAA//8AAAEAAAABAAEAAAABAP//AAD//wAAAgAAAP//AQD/////AAAAAP7/AgAAAAIAAAAAAAAAAAABAAAAAQABAP//AAABAP///v8AAP////8AAP//AAD//wAA//8BAP//AAD///7///8BAP7///8AAAIAAgABAAEA/v8AAP//AQADAAEAAAACAAEA/////////v///wEA/v////7/AAD+////AAAAAAAAAgAAAAAAAAD//wEAAAAAAAAAAQABAAIA/v8AAAAA//8AAAEAAAAAAP//AgD//wEA/////wAAAQACAAAAAAAAAP//AQD/////AQAAAAEA/v8AAAEAAQABAAEA///+////AQD//wEAAgD+//7/AAAAAAAAAQAAAAAAAQAAAAAAAAAAAP//AAD//wEAAQD//wAAAQABAP7///8AAP7/AAABAP7/AQABAAEAAAABAAEAAAD+/wIAAAABAAAAAQD/////AQACAP////8AAP//AQD//wEA/v8CAAEAAAAAAAAAAQAAAAIAAQAAAAEAAgD//wEAAAAAAP7///8BAP//AgAAAP///v8CAAAAAgD///////////7/AAACAAEAAgD//wAAAAABAP//AwAAAAMA//8AAAAAAQD+/wAAAAD//wAAAQD//wEA//8BAP7/AAABAAAA//8BAAAA//8AAP//AQADAP3////+////AgD+/////v8BAAEAAQACAAAAAAAAAAAA//8AAP//AAD+/wEA/v8AAP7/AAD//wAAAQACAAAAAQAAAP//AQAAAAAAAAABAAAAAAD+//////8AAAAAAAD//wAAAAABAAEA//8AAAEA//8AAP//AgD+/wAA///+/wAA/v///wAAAQABAAAAAQD//wAA//8AAAEA//8BAAAAAgABAP//AAACAAIAAQABAP//AAAAAAAA//8BAAIAAAABAAAA//8CAAEA/v//////AAAAAAEA////////AQAAAP//AAD//wAAAAAAAP3/AAAAAAEAAAACAAAAAAAAAP//AAD//wAAAAAAAAAAAAAAAP///v///wAAAAABAAAAAAD//wEAAAABAAEAAQD//wAAAAACAAAAAQD+/wAA//8BAAEAAAD+/wAA/////wAAAAABAAAAAAD//////v8AAAAA//8AAAAAAAAAAAIAAAABAAEAAAABAP7/AAD9//////////7///8BAP//AAD///3/AQABAP//AAD//wAAAAABAAAA//8AAP//AAD/////AQABAAEA//8AAAAA//8BAAMA//8AAAAA//8AAP7/AAD//wAAAAAAAP7/AQAAAAAA/v8CAP//AAABAAIAAQABAAAA//8BAAEAAQD///7/AQD//wAAAQABAP//AAD//wEAAAAAAAAAAQAAAAIA//8AAP////8AAP//AQD//////v///wEA/v8AAAIAAgACAAEAAAAAAAEAAAAAAAAAAAAAAAAAAQD//wAA/////wAAAQACAP////8AAAAAAAD//wAAAQD+/wEA//8AAAEAAwD//wEAAQAAAAAAAAABAP////8AAAAAAQAAAAAAAAAAAAEAAQAAAP////////7/AQABAAEAAQD///////8BAAAA//8AAAAAAgABAAEA/v8BAP7///8BAP3/AQABAAIAAAD//wEAAAAAAP//AAABAAIA//8CAAAAAQAAAAEA//8BAAAA/////wAAAAD//wEAAQD//wAAAAAAAP//AAAAAAAAAQABAAAAAQAAAP//AQD//////v8AAAEAAAAAAAAA//8AAAAAAAACAAEAAQAAAP//AAABAAEA/////wAAAgABAAAAAAAAAAEAAAABAP//AQABAP7////+/wEAAAAAAP//AAABAAAAAAABAAEAAAAAAAAA//8BAP///f/+/wEAAQD///7///8AAAAAAQAAAP////8AAAAAAAABAAAAAQD/////AAD//wEA//8AAAIA//8CAAAA//8AAAAAAAD+/wEAAAD+/wAA/////wAA////////AAAAAAAA//8BAAAAAAD//wAAAAD//wEA//8AAP//AQD+/wAAAAAAAP7/AAD+/wEAAQABAP//AAABAAEAAQD//wAA/////wEA//8AAAAAAgAAAAAA//8BAAAAAgAAAAAAAAAAAP7/AQD//wAAAAD+/wAAAAADAAIA/////wAAAQD//wIA//8BAAEA/v8AAAIAAAAAAP3///8AAAAAAAAAAAAAAAABAP///////wAA//8AAAEAAQABAAEAAQABAAAAAQAAAAAAAQABAP7/AQD//wAAAQABAAEA//8BAAAAAgAAAAEAAAABAP//AAD/////AAD//wIA/////wIAAAD///7/AAAAAAAAAAACAP//AAABAP////8AAAAAAAABAAAAAgAAAAAAAQD+/wEA/////wAA/////wAAAAAAAAAA/v//////AAAAAP//AAABAAAAAQAAAAIAAAACAAAA//8AAAAA//8AAP7/AAAAAP//AAACAP//AQABAP//AQABAAAA/////////v8AAP//AQAAAAAA///+/wAAAQD+/wEAAQAAAAEA/////wAAAQD//wAA//8AAAAA/v8BAAEA//8AAP7//v8BAAAAAAAAAAEA//8AAAEA/////wAAAAD//////////wEAAAABAAEA//8CAAEA/f8AAAAA//8BAAAABAABAAEAAQAAAAAAAAAAAP7///8AAAAA/v8BAAAA//8AAAIA//8AAP////8BAP//AAAAAAAAAAD/////AQD///7/////////AQD8////AgABAAIA////////AAD//wAAAAABAAAAAAAAAAEAAgAAAP//AQD//wAAAAAAAP/////+/wAAAAABAAAAAwABAP///////wEAAAADAP//AQACAAAA//8CAAEAAAAAAP///////wIAAAAAAAAAAQAAAAAAAgD//wEAAAABAAAA/v8AAAAAAAAAAAAAAAAAAAEA/v8AAP//AQD//wAA//////7///8AAAAAAAAAAP7/AQD//wAA//8AAAEAAAABAAEAAQD/////AAD//wEAAAD/////AQAAAAEAAAD//wEAAAD/////AgD//wAAAQD//////////wAAAAD//wAAAAABAAAAAAD//wAAAQD///7/AQD//wEAAAD/////AAD//wEA//8AAAEA//8CAAAAAQD//wEAAgAAAAEAAwAAAAAA/v8BAAEAAgD//wEAAAAAAAAAAAD//wEA//8AAAAAAQACAP///////wAAAQABAAEAAAAAAAEAAQD+/wEA/f////////8AAAAA//8AAAEA//8BAAAA/v///wEAAAAAAAEA/////wAAAAAAAP//AAAAAAIAAAABAAAA/////wAAAAD//wAA/v8AAAMAAQD+/wEAAAABAAEA//8BAP//AgAAAAAAAAD//wAA/////wEA/v8CAP3/AAACAP3/AQABAAAAAQACAAEA/v8AAAAA//8BAAAAAgAAAAAAAgACAAEA/v/9/wAAAQABAP7///8AAP//AgD+/////v8CAP////8BAP//AQACAAEAAQABAP//AAD///7/AAABAAEAAgD//wEA//8CAAEAAQABAAEAAAABAAAA/v8AAAEA/v8AAP//AAABAP//AQAAAAEAAgAAAAAA/v///wEAAQAAAAIAAAD/////AgAAAAEA/v8AAP7/AQAAAAAAAQAAAAEAAAACAAEA//8BAP////8AAAIAAAAAAP//AAAAAAIAAAAAAAAAAwABAP///v8BAAAAAAAAAP3/AAABAAEA/v////////////3//v8AAAAAAQABAAIAAAD+/////v8AAAAAAQABAAEAAQAAAP//AAAAAP//AQAAAP//AAABAAAAAAAAAAAA////////AAAAAP//AQD/////AAABAAEA//8CAP7///8AAP7//v8BAAEAAAD+/////////wEAAAAAAAAAAgD//wAAAQAAAP7/AQABAP//AQAAAAAAAAD/////AAACAP////8BAAAAAAD//wAA//8AAAEAAQABAAAAAAABAAAAAQD+/wEA/v8AAAEAAQD/////AAD//wAAAQABAP7//v//////AAACAAAAAAAAAAAAAAACAAAAAQAAAAAA//8BAP//AQD//wAA///+/wIAAQD//wAAAAD//wAA/v8AAP3///8AAAAAAAAAAAAA/f8AAAAA//8CAP7/AAD///7/AAAAAAAAAAD//wEAAAAAAAEAAAAAAAAA//8BAP////8BAP7///8CAAEA//8BAP3///////////8BAAAAAAAAAAEAAgD+//////8BAAMAAQADAAEAAAACAAAAAQD/////AAABAAMAAQAAAP//AQD//wAA//8AAAAA//8CAP7//////wAAAAAAAAIA/v8AAP//AAACAP//AwD//wAA//8AAP//AwD//wEAAQABAAEAAQACAAEAAAD//wAA//8AAAIAAAAAAP///////wAAAQD//wIA//8BAP7/AAD///////8AAAAAAAAAAAEAAAD//wAAAQD//wEA//8BAAAAAAD/////AgABAAIAAAABAAAAAAAAAP//AAAAAAAA//8AAAAAAAD/////AQAAAAAAAQD//wAA///+////AAAAAAEAAgABAAEAAAAAAP//AQAAAAAAAQD+/wAAAAABAAEAAAD/////AQABAP7///8AAAIAAAACAAAA//8AAP//AgACAAAA///+/wAAAAABAAAAAQAAAAEA/v8BAAEA//8CAP//AQD+/////v8AAAAAAAACAP//AAD+/wIA/v8BAAAAAAD/////AAAAAP7///8AAP7//////wEAAAABAAAAAAD//wAAAAAAAAAAAgACAAAAAAABAAAA/f8AAP7/AgAAAAEA//8BAAAAAAD///7/AQD//wAAAAAAAAEAAAAAAAEAAAAAAAAAAQAAAAAA//8AAAAAAAABAP///////wAAAgABAAEA//8AAP//AAACAP//AQABAAEA//8BAAAAAAABAAAA//8AAAEAAAAAAAIA/v8BAP//AQD//wEAAAABAAEAAQACAAEAAAAAAAEAAAABAAAAAAD/////AAABAAEA//8AAAAAAQABAP//AAAAAP//AAD/////AQD//wAAAAABAAEA//8BAAAA//8AAP///f/+/wAA/////wAAAQAAAAIAAAAAAAAAAAD+/wEA/f8CAAAA//8AAAEAAgAAAAMAAAABAAAAAAAAAP//AQAAAAAAAQABAAAAAQAAAP//AAAAAAAA//8AAAAAAAABAAAAAQAAAAAAAAABAAIAAAAAAP7/AQD//wAAAAD+////AAAAAAAAAAABAAAA/////wAA//8AAAAAAAD/////AgD//wAA//8CAP//AQACAAEA/f////////8BAAIAAQABAP//AAD//wAA///+////AAD+/wAAAQD/////AAAAAAAA/////wAAAAABAAAAAQAAAAAA//8AAAIAAAABAP//AQABAAEA//8AAAAAAAADAAEAAAABAP//AgD//wMA//8AAAAAAAD//wAAAAD9/wEA///+/wAA//8BAAEA//8BAAAA//8AAP///v8BAP///////////v8BAAAAAQABAAAAAAAAAAAA//8AAP7/AQAAAAAAAAAAAP7/AQAAAAAAAgABAAEAAAABAAEAAAAAAAAAAAD+/wAAAAD//wEAAAAAAAAAAAAAAP//AgABAAAAAAABAAEAAAD/////AAAAAP//AAABAP////8BAAAAAQABAP7//v/+////AQAAAAAAAQAAAAEAAgAAAAAAAQAAAAEAAAD+/////v8BAP//AAABAP//AQABAAAAAAD//wAA//8CAP//AAAAAAEAAAABAAAAAAAAAP//AAD+////AwAAAAAAAQD//wEAAAACAAEAAAADAAAAAAD/////AAAAAAEAAAABAAAA//8AAAEA//8BAP///v8AAP//AAD//wAAAQABAP//AQAAAAAA/////wEAAQAAAP////8AAAEA//8BAAAAAQAAAP////8AAAAAAQAAAAIAAQAAAAEAAAAAAAEAAAD//wEAAAAAAP////8AAAAA//8BAAEAAAAAAAIA///+/wIA/v8BAAAAAQACAAAAAQAAAP7///8AAP//AAAAAAEAAAAAAP7/AAD+////AAAAAAAAAAD//wAA/v8BAAMAAAABAAIAAgD//wAA//8BAAEA//8BAP7/AAAAAP7///8BAAAAAQAAAP7/AQD/////AAAAAAEAAAABAP//AQABAAAAAgABAAAAAAAAAP///////wEA//8AAAEA//8AAAAAAQAAAAIAAAABAP7//////wAAAQABAAAAAAABAAEA///+/wAA//8BAP///v8AAP///v8BAAAA//8CAAAAAQAAAAEAAQABAAAAAAD+/wAAAAD+/wAAAAAAAAAA/f////////8AAAAAAQABAP///////wEA//8BAAEAAAAAAAAA/////wEA/v//////AAAAAP//AAABAAAAAAD+/wAAAAD9////AQAAAAEAAwD//wEAAQAAAP//AgAAAAAAAAD+/wIAAAAAAAAAAAAAAAIA//8AAAEAAQACAAAAAQD//wAAAAD//wIAAQABAAAAAAD//wEA//8BAAEAAQAAAAAAAQABAP7/AAD//wEAAAACAP7/AQAAAAAAAAD//wIAAQACAAIAAQAAAAAAAAAAAP3///8BAAAAAQACAP//AgD9/wAAAAD//wEA/v////////8AAAAAAAD//wEAAQD//wMAAQAAAAEA//8AAAEA//8AAAAAAAACAAAAAAD//wAAAQD///////8AAAAA//8BAAIA/v8BAAEA/f8AAAAAAAAAAAAAAgD/////AAD+/wAAAAD//wAAAAAAAP//////////AgABAP///v8AAAIAAQAAAP//AAABAAAA/////wAAAAAAAAEAAAABAP///v///wIA//8BAAEAAQAAAAAA///+/wEAAAAAAAAA/////////v8BAP3/AAAAAAAAAAAAAAAA//8AAP//AAAAAP//AAABAAIAAAACAP////8DAAAAAAABAAAAAwABAP//AAABAP//AAAAAP////8BAAAAAgD//wAA///+/wAAAQD//wAA//8AAP7///8AAAAA/v8AAAAAAQD//wEA/v////////8AAAAAAQAAAP//AQACAAAAAAAAAP//AAD//wAAAAD//wAAAAD+/wAAAAAAAP//AQD//wAAAgAAAAAAAQABAAAAAwD+/wAAAAD///7/AQD//wIAAQAAAP//AAD//wAA//8CAAEAAAAAAAAA/////wAAAAD//wEAAQD///////8BAAAA//8BAAEAAAAAAAAA/v///wEAAAAAAAAAAAADAAAAAAAAAAAAAQABAAEAAAD+//7//v8AAP//AQAAAAAAAAABAAEAAgAAAAAAAQD//wAA/f8AAAAAAAABAAAAAQAAAAAAAAAAAAIA//8BAP///////wIA/////wAAAAABAAEA//8BAAAAAAD//wAAAQD//wEAAAAAAAIA/v8BAP//AAAAAAEAAAABAP//AAAAAAAAAQABAP7/AAABAAAAAQD//wIAAAAAAAEA///+/wAA//8AAP//AAAAAAAAAAABAP///////wIAAQAAAAEAAQAAAP7/AQAAAAAAAQAAAAAAAQD/////AQAAAAAA///+//7/AAD+/wEA//8AAAAA///+/wEAAAABAAIAAQABAAAA//8AAP//AAD//wAAAAD//wAAAAAAAP//AQAAAAAA////////AQAAAAAAAQD+////AQABAP7/AAD///7/AgD//wAAAAAAAP//AAAAAAEA//8BAAEAAgAAAAIAAAD//wEA/////wAAAQD///7/AQD//wEAAQD/////AAAAAAEAAgAAAAAAAQD//wEA//8AAP7//////wAA//8BAAEA//8BAAAAAQD/////AAABAP//AAACAP//AQAAAP//AAABAP////8AAAAAAAABAAEAAwABAAAAAgD//wAAAAD//wEAAAABAAAAAAABAAEA/////wAA//8AAAIAAAAAAAEAAQABAAEAAQABAP//AgAAAAAA//8BAP3//v///wAA//8AAAAAAQAAAP//AQD//wEAAAACAAIAAAABAAAA//8BAAEA//8BAP//AAAAAP//AQAAAAIAAAD//wAAAAAAAAEA////////AQAAAP//AQD//wAAAQD+/wEAAAABAP///v///wAAAAAAAP//AAAAAAIAAQD//wAAAgD+/wAAAAD//wAAAAABAP///P//////AAACAP////8AAAIAAAABAAAAAAAAAAAA//8AAAAAAQADAP//AQAAAAAAAAABAAEAAQAAAAAA/v8AAAAAAAD//wAAAQD//wAAAAD//wAA/v////////8CAAEA/v8BAP7/AAAAAAAA//8AAAEAAAD//wIAAQAAAAIAAQAAAAAAAAD///7/AQABAP//AAAAAP//AAACAAEA//8BAAAAAwAAAAAAAAD//wEAAAD//wAA///////////+/wAAAQABAAIAAAABAAEAAAD//wEAAAD/////AAD+/wIAAwABAAEA/v8BAAEAAAD//wAA//8AAP//AAAAAAEAAAAAAP//AAAAAAEAAQABAAEA/v///wAAAAD//wEAAAACAAAA/f/+/wAA/v///wAA//8AAAEAAQD///7/AAAAAAAAAAABAAAAAAACAAAAAAABAAAAAAABAP//AQD//wAA//8BAP7/AgABAAEAAQAAAAAAAQD//wEA/v8AAP////8AAP///////wIAAQD//wAAAAD//wAA/v///wAAAQD//wIA/////wEAAAAAAAIAAAABAAAAAAD//wEA//8AAAAA/////wAAAQAAAAAAAAD//wEAAQAAAAAAAAACAP///////wAAAgD//wAA/v8AAAIAAAAAAAEAAAABAP//AQABAAEAAQAAAP///v8BAAEAAAAAAP////8AAAAAAQD//wIAAQAAAAEAAAAAAAAA//8BAP//AAAAAP7//v///wEAAAAAAAIAAAAAAP//AAD//wEA//8BAAAAAAABAAEAAAABAP7///8AAAIAAAABAP//AAD//wEAAAAAAP//AAAAAAEAAAAAAAAAAAAAAP7/AQD//wAAAQD+/wEA/v8BAP7/AAABAAEAAAACAAIAAAADAAAA//8AAAEAAAABAP//AQD//wIA/////wEA//8AAAEA//8AAAEAAAAAAAAAAQABAAAAAAAAAAAAAAD//////////wAA//8AAP7/AAD+/wAAAQAAAAAA/////wAABAAAAAAA//8AAAEAAAAAAAAA/v8AAP//AAAAAAAAAAD//wAAAAD///////8BAAEAAAD/////AgABAAEA/v/+/wAAAQACAAEAAAD//wAAAwABAP//AgD+/wAA/v8AAAAAAAAAAAEA//8AAAEAAAD+/wEAAAAAAAEAAgAAAAEAAAABAP//AQD+/wIA/////wAAAQD//wAAAQD+/wAAAQABAAAA////////AAACAAAAAQAAAAIA//8BAP///v///wEA//8BAAEAAQD+/wAAAQD9/wAAAQAAAAEAAAABAAAAAgAAAP//AAD+/wAA/f8AAAAA////////AgAAAAcAAQD7/wEA/f8AAAIA//8GAP7//v/+//b/AQD//wQADgD///3/9/8FAPr/6/8EABAACQD9/wIA/P/5/w4A///t/wQA/P8LAB0ACQD5////AQD2/+7/AgD6//r//v/z/xIA9f8oAAMA4f8OANz/EQAdAAAA5P/w/2MAAQDq/w0A1/8bALz/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n/CwAIAA0AHAAjADQAHAAkAP//GQDy/wQA5v/i//b/0P/7/8f/AADh/wMAAAD+/yUAAAA7AAEAOAAAABwAAAD6/wAA1/8CAMr/AADb/+3/5f8BAAIACAAVABcALwAfACgA+/8XAPn/DgDe/+//7v/Q/wMAz/8JAOP/CwDx////EAAHADEAAQArAAIAHQAEAAcAAADr/wEAzv8CANj//f/k/wEA+f/+/xQABwAqAB4ALAD+/x4A8P8SAOb/8//f/9j//f/N/wEA3v8LAO7/AgAMAAQALAAEAC0AAQAdAAQADwABAPP/BADV/wMA0/8AAOH/AQD1/wAAEAADACQAGwAwAAQAHwD0/xUA8f/4/+L/2//7/8z/AwDc/woA6f8AAAQAAwAoAAcANAAAACcAAgAUAAEA+P8CANv/AgDR/wEA4v8BAOz/AgAIAPv/JAAVADMAFAAhAPP/GQDz//7/3P/l/+3/z/8BANf/CgDn/wkA/P///xoABwAwAAIAJwACABcAAwABAAIA4f8BAND/AgDd//3/6P8CAAYA/f8YAAwALwAZACUA9v8bAPj/AwDq/+r/7P/S//7/1/8EAOX/CQD6//7/GQAFAC8AAQApAAEAGQACAAMAAgDm/wEAzv8BANv//v/p/wIA//8BABMABQArACAALAABAB4A8f8NAOv/7v/m/9n/+P/R/wMA4f8OAPT/AQATAAMAKwAHACoAAwAbAAMABQADAO7/AQDU/wEA2f8AAOL////3////EgAAACUAGgAvAAUAHQD2/xIA9f/0//T/3P/4/8///f/h/wIA7f8AAAoAAQApAAQALQADACAAAgAPAP//9P///9r//f/T/wAA3f/9//D/AQAQAP//HAAHAC8ACQAfAPv/GAD+//f/+P/j/wEA0v/+/9n/AADq/wIABgD//x0AAQAuAAEAIwAAABQAAwD8/wEA3/8AAM//AADe////7f8BAAwA//8ZAAMALwAAACEA//8dAP3//v/9/+n////U//z/1v8BAOT/AAD+/wAAGwD+/ywA/v8kAAIAGAD///3////q/wEA0P///97/AADk/wAABAAAABUAAQAqAAEAKQAAABwAAAAFAP//6f8AANr////X/wAA4/8AAPj/AgAUAAAAKgD//ywAAAAcAP7/AQAAAOv/AADU/wAA2v8CAOP/AAABAAAAFgABABsAAAAqAAEAHwAAABQAAgDv/wEA3v///9H////f////7/8BAAoAAQApAAAALgD//yEAAQAIAAAA8P8BANr//v/V////4f8AAPf//v8UAAAAFAAAACYAAQAhAP7/GwD+//T/AADo/wIA1v8CANr/AgDp/wEABgAAAB8AAQAsAAEAJAAAAAwA///z/wEA3/8AANT/AADh/wEA9P///xQAAgASAAAAJQAAACEAAAAaAP//+v8BAOj////W////2P8BAOf///8DAAAAHwAAAC4AAAAlAAAAEgAAAPL/AQDm////0f8CAN3/AADr//7/EQD//xAAAQAhAAIAJQAAAB8AAAABAP//6v8CAN//AQDX/wAA4/8AAPr/AAAXAAAAKgABACgAAAAbAP///f8AAOj/AADU/wAA2v///+f/AQANAAMAEQD+/xwA/v8kAP7/IQABAAgA/v/p////5/8AANf/AQDd/wEA8v8BABMAAQAjAAAALgAAACAAAQADAAEA7f8BANn/AgDY//7/4P/+/wEAAAAXAAIAFAAFACUA/P8jAP//EgAAAO//AQDo////1/8AAN3/AADx//7/DgAAAB0AAQAoAAAAIwAAAAoAAQDv/wMA4f8AANn/AQDi/wEA+v///xgAAAAQAP3/IwD//yUA/v8XAAAA7/8AAOv/AADc/wAA3P/+/+v/AQALAAEAGgACACkAAAAkAP7/EAABAO/////q//7/1/8AANz/AgDw/wEAEgD//w8AAAAcAAIAJQAAAB0AAAD2////7P8AAOP/AgDa/wAA5P8BAAQAAQAWAAAAIgAAACMAAAAaAP//+P///+v/AQDZ/wAA2////+7/AAARAAAADgAAABYAAAAhAAAAIAABAPz/AQDt/wAA5P8AANr/AQDg/wEA/P8BABcAAAAhAP//KQD//xwAAAD8/wEA7v8AAN3////Z/wAA6f8BAA0AAAARAAEAEQAAACMAAAAgAAEA/f8CAO3/AADv/wAA3v8BANv////1////EgAAABkA//8nAAAAIgAAAAMAAADu/wAA6P8CANn/AQDg////BQD//xMAAQAOAP//IAABACYAAAAGAAAA6f////H/AADg/wEA2f8AAO3///8PAAAAFQACACQAAAAkAAEADQABAO//AADp/wAA2////9z/AQD7/wEAFgAAAAwAAQAXAP7/JQD9/xMAAADx/wAA8f8AAOr/AADc/wEA4/8BAAkAAAAVAAAAIQD//yYA//8UAAEA9P8BAOz/AADf/wAA3P8AAPP/AAAQAAAADQABAA0AAAAlAAEAGAD///H//v/0/wEA7v8CAN//AADg//3/BAACABUAAQAfAAAAJwABABgAAQD0//7/7f///+L/AADa/wIA8P///w4A//8SAAMACQAAACAAAQAgAP//+v////P////y/wEA4/8BANr/AQD9/wAAEwD//xkAAQAjAAAAIgABAPz////s/wAA6v8BANX/AQDr//7/BwABABMAAAAHAP//FwAAACYAAAD//wEA9P8BAPb/AQDu////2v8BAPn/AAATAP//FwD//yEAAAAjAAAAAgAAAOn/AQDr//7/2P8CAOT/AAABAP//FgABAAUAAQATAP//IwAAAAEAAgDy/wEA9/8AAPb/AADb/wAA6/8BABAAAAATAP7/IQAAACYA//8UAP//7/8AAPD/AADd/wEA3P/+//7///8OAAAACgAAAAgAAAAhAP//CQACAPT/AQD2/wAA9v///97////m/wIADgABABMAAQAfAP//JwAAABMAAADw/wAA8P///+r/AQDb/wAA9f8AAA8AAAARAAIABAD//wYA/v8HAAAAAQD//wMAAgAGAAAA7f8AAOz/AAALAP//DwACABQA//8bAAAAHgD///f/AADq/wEA6/8BANj//v/t/wAACAD+/xAAAgAEAAAABAABAAcAAQADAAAA//8AAAUA///1/wAA5f///wIAAAAOAAAAEAAAABsAAAAhAAAA/v8BAOj////y////3f8AAOf/AQAGAAEADAAAAAcA//8BAP//CQABAAMA//8BAP//BQAAAAAAAADo/wAA+/8AAAoAAAALAAAAFAAAACAAAQAGAAIA7f8BAPH/AADm/wMA3P8CAP7/AgASAP//CgD//wAAAAAIAP//BQD//wEAAAACAP7/BAAAAPz/AwD8////BAAAAAEA//8HAAAAHQAAAAgA/v/x//7/8f///+f/AQDg/////P///woAAAAMAP//AAABAAYA//8EAAAAAgAAAAUAAAACAAAAAwAAAAIAAAABAAAAAQABAAAAAgAcAP//DgD///T/AQDx/wAA9P8CAOH/AAD3/wAACQAAAAoAAQABAP//AwAAAAcAAAD+/wAAAgACAAEAAAD+////AwD+/wAAAAABAP//+v8BABEAAQATAAAA9f/+//L//f/z/wIA6f8AAPb/AQAFAP//DAAAAAAAAAAFAP//BQD//wEA//8DAAEAAQAAAP7///8AAAAA//8BAAIAAAD+/wAAEAABABYAAgD6/wEA8v8BAPX/AwDp/wAA8////wMA//8JAAEABAABAAEA//8FAAEA//8AAAMAAQACAP//AQAAAAEAAgAFAP//AQABAAAAAQAAAP//EQABAAAAAAD5/wEA+P8AAPr////6/wAA+/8BAAIA//8BAAAA//8CAAUA//8BAP7/AAABAAEAAgAAAAAAAwAAAAEA/v8DAAIAAAACAAQA//8TAAAA/P8BAPr////3//////8AAPz/AQD7/wEAAgD/////AAABAAEABAAAAP//////////AAAAAAAAAAADAAAAAwAAAAAA//8EAP///v/+/xAA//8HAAAA+/////j/AQD8////AAD///n///8AAAAA//8AAP////8DAP//AgAAAAAAAAACAAIAAAD+/wAAAQD//wAA/////wIAAgD9////CQACAAYA///9////+f8BAPr/AQAAAAIA/v///wAA//8AAAAAAAAAAAEAAAABAAAAAgAAAAEAAAAAAAEAAQABAAAAAgABAP//AAD//wEAAAD///////8BAAIAAQAAAAAA/v/+//////8BAAAAAQABAP//AAD///////8BAAAAAQABAP////8CAAEAAQD//wEA/v//////AQAAAAAAAAAAAAAAAAD9/wMA/////wAAAQD+/wEA/v/+//7/AQD//wMAAAAAAAAAAAABAAEA//////7/AAACAP3/AAD//wAAAQAAAP//AQD//wAAAAAAAAEA//8CAP//AAAAAAAA/v8AAAAA//8BAP//AAABAP//AAAAAP//AQD//wAAAQABAAAAAAABAAEA/v///wAAAAD//////////wAAAAAAAP//AAD////////8/wIAAAADAAEA/////wEA/v8BAP7/AgAAAAEAAgAAAP//AgD/////AQD//wEA//////7/AQD//wMAAAAAAAAA//8CAP//AQAAAP//AAACAAAAAAABAP//AQD+/wAA/////wAA/f///wAAAAAAAP7/AAAAAAAAAgD//wEAAQACAP//AAAAAAEAAQD//wAAAAAAAAAA//8BAAMA/v8AAP7/AQAAAAAAAQAAAAAA///+//7/AAAAAAAA//8BAP7/AQAAAP//AQABAAAAAQAAAP//AAD//wIA/v///wAAAQABAP//AAD//wEA//8BAP//AgAAAP///////wAAAQABAP//AwABAAAAAAAAAAAA/////wIAAwACAAAA/v8BAAAAAAAAAAAA//8AAP////8AAAAA/////wAA/////wEA/v8CAAEAAQD//wAAAAABAAAAAAD//wEAAQABAAAA//8CAAAAAAAAAP7/AAABAAAAAQABAAAAAgABAAAAAQD//wEAAwD+/wAA/v8AAAEAAAAAAAAAAAAAAAEAAAD//wMA/v///wAAAAACAAEAAAAAAP7///8DAAEAAQD//wEA/f8BAAEAAQD//wEAAQABAAMAAgAAAAEA//8AAP//BAAAAAIA/v//////AQABAAAAAAD//wEAAAACAAIAAQAAAAAAAgAAAAAAAAABAAIAAAABAAIAAQAAAP////8AAAAAAAD//wAAAQACAP//AAAAAAAAAQAAAAEA//8AAAAAAAD/////AQD//wAAAQD9////AQAAAAAA//8BAAAA///+/////v8BAAAAAQAAAAAAAAAAAAIA//8BAAAAAAACAP//AQD//wAAAAD/////AAD9/wAAAAACAAAAAgAAAAEAAQABAAEAAAAAAAEA//8AAAEAAQACAAAAAQAAAAEA//8BAAIAAAACAP//AAABAAAAAAAAAAAAAAD//wAAAQD/////AAAAAP////8AAAEAAAAAAP7///8BAAIAAQD//wEAAQAAAP//AgAAAAAAAAD//wAA//8CAP7/AQAAAP7/AAD+////AAAAAAAAAQABAAAA//8AAAEAAAABAP7/AAAAAP7/AAD+/wAAAQABAAEA/////////v8BAP///v///wIAAAAAAAAAAQAAAAIAAQAAAAAAAAABAAEAAAAAAAAAAAD//wEAAQD//wAAAQABAAAA/v/+/////////wAAAAD//wAAAAD/////AAAAAP7/AAD//wIA//8CAP//AQAAAP////8AAAAAAQABAP////8AAP//AQACAAAAAQAAAAAAAAAAAAAA//8BAAAAAAD+/wAA/v///wEAAAD+//7///8CAP7/AAABAP3/AwAAAAAAAAABAAIAAAABAAAAAQABAAIAAAAAAP//AAAAAAEAAAACAAEAAAACAAAAAAABAAAAAwAAAAAAAAD+/wAAAQD9//////8BAAAA/v8AAAAAAAAAAAAAAAD//wMA/v8BAAEAAQACAAAA/v8BAP//AwABAAIAAQABAP//AQAAAAEAAAAAAAEA//8AAAAAAAD/////AAABAAEAAAAAAP////8AAAAAAAAAAAAA/v8AAP//AQAAAP//AAABAAIAAQAAAAAAAgABAAAA/////wAAAQABAP//AQABAAEA/////wAAAAAAAAAAAAABAAEAAQAAAAAAAAAAAAAA//8AAP7/AQD9/wAAAgD//wEAAQABAAEA/v8AAAEA/////wAAAAAAAP//AAABAAAAAAAAAAAA//8CAP//AAABAAEAAQABAAAA//8BAAIAAgD//wAA/v8AAAEAAAD///7/AAAAAAEAAAABAAAAAQABAAAAAQACAAAA///+/wAAAQABAP7////+/wAA//8AAAAAAgAAAP//AQD9/wAAAAD//wAA//8AAAAAAQAAAAAAAQD//wAAAAAAAP//AQABAAAA/v8CAP//AAD///////8AAAAAAAACAAEA//8BAP7/AAAAAAEA//8BAAAAAQD//wAAAQD+/wAA/////wAAAAD//wAAAQABAAAA//8AAAEA/////wAA//8AAAAA/v/+/wEAAgABAP//AgD//wIA/////wAA//8AAAEAAQAAAAAAAQAAAAMAAAACAP//",showCount:!0},audio:{disabled:!0,defaultToggledOn:!1,language:"en-US",voiceNames:["Microsoft David - English (United States)","Alex (English - United States)"],rate:1,volume:1,icon:Rl,iconDisabled:Hl},chatHistory:{disabled:!1,maxEntries:30,storageKey:"rcb-history",storageType:"LOCAL_STORAGE",viewChatHistoryButtonText:"Load Chat History โŸณ",chatHistoryLineBreakText:"----- Previous Chat History -----",autoLoad:!1},chatInput:{disabled:!1,allowNewline:!1,enabledPlaceholderText:"Type your message...",disabledPlaceholderText:"",showCharacterCount:!1,characterLimit:-1,botDelay:1e3,sendButtonIcon:Ol,blockSpam:!0,sendOptionOutput:!0,sendCheckboxOutput:!0,buttons:[De.VOICE_MESSAGE_BUTTON,De.SEND_MESSAGE_BUTTON]},chatWindow:{showScrollbar:!1,showTypingIndicator:!0,autoJumpToBottom:!1,showMessagePrompt:!0,messagePromptText:"New Messages โ†“",messagePromptOffset:30,defaultOpen:!1},sensitiveInput:{maskInTextArea:!0,maskInUserBubble:!0,asterisksCount:10,hideInUserBubble:!1},userBubble:{animate:!0,showAvatar:!1,avatar:"data:image/svg+xml,%3csvg%20width='140'%20height='140'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cy='60.044'%20cx='70'%20fill='%235c5c5c'%20r='29'/%3e%3cpath%20d='m16.36%20156.186-.01-30.5c-.005-16.844%2024.168-30.507%2053.991-30.516%2029.823-.009%2054.004%2013.64%2054.01%2030.484l.008%2030.5-108%20.032z'%20fill='%235c5c5c'/%3e%3c/svg%3e",simulateStream:!1,streamSpeed:30},botBubble:{animate:!0,showAvatar:!1,avatar:pa,simulateStream:!1,streamSpeed:30},voice:{disabled:!0,defaultToggledOn:!1,language:"en-US",timeoutPeriod:1e4,autoSendDisabled:!1,autoSendPeriod:1e3,sendAsAudio:!1,icon:Nl,iconDisabled:Ll},footer:{text:C("div",{style:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",columnGap:3},onClick:()=>window.open("https://react-chatbotify.com","_blank","noopener,noreferrer"),children:[C("span",{children:"Powered By "},0),C("div",{style:{borderRadius:"50%",width:14,height:14,display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to right, #42b0c5, #491d8d)"},children:C(ha,{style:{width:"80%",height:"80%",fill:"#fff"}})},1),C("span",{style:{fontWeight:"bold"},children:" React ChatBotify"},2)]}),buttons:[De.FILE_ATTACHMENT_BUTTON,De.EMOJI_PICKER_BUTTON]},fileAttachment:{disabled:!1,multiple:!0,accept:".png",icon:ga,iconDisabled:ga,sendFileName:!0,showMediaDisplay:!1},emoji:{disabled:!1,icon:ma,iconDisabled:ma,list:["๐Ÿ˜€","๐Ÿ˜ƒ","๐Ÿ˜„","๐Ÿ˜…","๐Ÿ˜Š","๐Ÿ˜Œ","๐Ÿ˜‡","๐Ÿ™ƒ","๐Ÿคฃ","๐Ÿ˜","๐Ÿฅฐ","๐Ÿฅณ","๐ŸŽ‰","๐ŸŽˆ","๐Ÿš€","โญ๏ธ"]},toast:{maxCount:3,forbidOnMax:!1,dismissOnClick:!0},event:{rcbPreInjectMessage:!1,rcbPostInjectMessage:!1,rcbStartSimulateStreamMessage:!1,rcbStopSimulateStreamMessage:!1,rcbStartStreamMessage:!1,rcbChunkStreamMessage:!1,rcbStopStreamMessage:!1,rcbRemoveMessage:!1,rcbSaveChatHistory:!1,rcbLoadChatHistory:!1,rcbToggleChatWindow:!1,rcbStartSpeakAudio:!1,rcbToggleAudio:!1,rcbToggleNotifications:!1,rcbToggleVoice:!1,rcbChangePath:!1,rcbShowToast:!1,rcbDismissToast:!1,rcbUserSubmitText:!1,rcbUserUploadFile:!1,rcbTextAreaChangeValue:!1,rcbPreLoadChatBot:!1,rcbPostLoadChatBot:!1,rcbPreProcessBlock:!1,rcbPostProcessBlock:!1},ariaLabel:{chatButton:"open chat",audioButton:"toggle audio",closeChatButton:"close chat",emojiButton:"emoji picker",fileAttachmentButton:"upload file",notificationButton:"toggle notifications",sendButton:"send message",voiceButton:"toggle voice",inputTextArea:"input text area"},device:{desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!0}},va=At({settings:{},setSyncedSettings:()=>null,syncedSettingsRef:{current:{}}}),ae=()=>rt(va),Ul=({children:e,settings:t=ya,setSyncedSettings:n,syncedSettingsRef:r})=>C(va.Provider,{value:{settings:t,setSyncedSettings:n,syncedSettingsRef:r},children:e}),wa={tooltipStyle:{},notificationBadgeStyle:{},chatWindowStyle:{},headerStyle:{},bodyStyle:{},chatInputContainerStyle:{},chatInputAreaStyle:{},chatInputAreaFocusedStyle:{},chatInputAreaDisabledStyle:{},userBubbleStyle:{},botBubbleStyle:{},botOptionStyle:{},botOptionHoveredStyle:{},botCheckboxRowStyle:{},botCheckboxNextStyle:{},botCheckMarkStyle:{},botCheckMarkSelectedStyle:{},characterLimitStyle:{},characterLimitReachedStyle:{},chatHistoryLineBreakStyle:{},chatMessagePromptStyle:{},chatMessagePromptHoveredStyle:{},footerStyle:{},loadingSpinnerStyle:{},mediaDisplayContainerStyle:{},chatButtonStyle:{},chatButtonHoveredStyle:{},chatHistoryButtonStyle:{},chatHistoryButtonHoveredStyle:{},sendButtonStyle:{},sendButtonHoveredStyle:{},sendButtonDisabledStyle:{},audioButtonStyle:{},audioButtonDisabledStyle:{},closeChatButtonStyle:{},emojiButtonStyle:{},emojiButtonDisabledStyle:{},fileAttachmentButtonStyle:{},fileAttachmentButtonDisabledStyle:{},notificationButtonStyle:{},notificationButtonDisabledStyle:{},voiceButtonStyle:{},voiceButtonDisabledStyle:{},chatIconStyle:{},audioIconStyle:{},audioIconDisabledStyle:{},closeChatIconStyle:{},emojiIconStyle:{},emojiIconDisabledStyle:{},fileAttachmentIconStyle:{},fileAttachmentIconDisabledStyle:{},notificationIconStyle:{},notificationIconDisabledStyle:{},voiceIconStyle:{},voiceIconDisabledStyle:{},sendIconStyle:{},sendIconDisabledStyle:{},sendIconHoveredStyle:{},rcbTypingIndicatorContainerStyle:{},rcbTypingIndicatorDotStyle:{},toastPromptContainerStyle:{},toastPromptStyle:{},toastPromptHoveredStyle:{}},ba=At({styles:{},setSyncedStyles:()=>null,syncedStylesRef:{current:{}}}),ye=()=>rt(ba),Fl=({children:e,styles:t=wa,setSyncedStyles:n,syncedStylesRef:r})=>C(ba.Provider,{value:{styles:t,setSyncedStyles:n,syncedStylesRef:r},children:e}),zl=({buttons:e})=>{var t,n,r,o,i,A,s;const{settings:a}=ae(),{styles:l}=ye(),c={backgroundImage:`linear-gradient(to right, ${(t=a.general)==null?void 0:t.secondaryColor},
2
- ${(n=a.general)==null?void 0:n.primaryColor})`,...l.headerStyle};return C("div",{style:c,className:"rcb-chat-header-container",children:[C("div",{className:"rcb-chat-header",children:[((r=a.header)==null?void 0:r.showAvatar)&&C("div",{style:{backgroundImage:`url("${(o=a.header)==null?void 0:o.avatar}")`},className:"rcb-bot-avatar"}),zt((i=a.header)==null?void 0:i.title)?(A=a.header)==null?void 0:A.title:C("div",{style:{margin:0,fontSize:20,fontWeight:"bold"},children:(s=a.header)==null?void 0:s.title})]}),C("div",{className:"rcb-chat-header",children:e==null?void 0:e.map((u,d)=>C(ce,{children:u},d))})]})},_a=At({}),Te=()=>rt(_a),jl=({children:e,botIdRef:t,flowRef:n})=>{const r=ne(null),o=ne(""),i=ne(null),A=ne(new Map),s=ne(null),a=ne(""),l=ne(!1),c=ne(null),u=ne(null),d=ne(null);return C(_a.Provider,{value:{botIdRef:t,flowRef:n,inputRef:r,timeoutIdRef:i,streamMessageMap:A,chatBodyRef:s,paramsInputRef:a,keepVoiceOnRef:l,audioContextRef:c,audioBufferRef:u,gainNodeRef:d,prevInputRef:o},children:e})},Je=e=>{const[t,n]=ee(e),r=ne(e);return[t,o=>{const i=typeof o=="function"?o(r.current):o;r.current=i,n(i)},r]},Ea=At({}),Oe=()=>rt(Ea),ql=({children:e,settings:t})=>{var n,r,o,i,A,s;const[a,l,c]=Je(!1),[u,d,f]=Je(((n=t==null?void 0:t.chatWindow)==null?void 0:n.defaultOpen)??!1),[h,m,p]=Je(((r=t==null?void 0:t.audio)==null?void 0:r.defaultToggledOn)??!1),[v,y,g]=Je(((o=t==null?void 0:t.voice)==null?void 0:o.defaultToggledOn)??!1),[_,P,E]=Je(((i=t==null?void 0:t.notification)==null?void 0:i.defaultToggledOn)??!0),[k,B]=ee(!1),[T,D]=ee(!1),[O,S,N]=Je(!1),[R,L,U]=Je(!0),[x,Q,w]=Je(!1),[V,b]=ee(!1),[F,J]=ee(!1),[K,oe]=ee(0),[ve,ue]=ee(0),[Ve,Me]=ee(!1),[Re,st]=ee(((A=window.visualViewport)==null?void 0:A.height)??window.innerHeight),[j,W]=ee(((s=window.visualViewport)==null?void 0:s.width)??window.innerWidth);return C(Ea.Provider,{value:{isBotTyping:a,setSyncedIsBotTyping:l,syncedIsBotTypingRef:c,isChatWindowOpen:u,setSyncedIsChatWindowOpen:d,syncedIsChatWindowOpenRef:f,audioToggledOn:h,setSyncedAudioToggledOn:m,syncedAudioToggledOnRef:p,voiceToggledOn:v,setSyncedVoiceToggledOn:y,syncedVoiceToggledOnRef:g,notificationsToggledOn:_,setSyncedNotificationsToggledOn:P,syncedNotificationsToggledOnRef:E,isLoadingChatHistory:k,setIsLoadingChatHistory:B,hasChatHistoryLoaded:T,setHasChatHistoryLoaded:D,isScrolling:O,setSyncedIsScrolling:S,syncedIsScrollingRef:N,textAreaDisabled:R,setSyncedTextAreaDisabled:L,syncedTextAreaDisabledRef:U,textAreaSensitiveMode:x,setSyncedTextAreaSensitiveMode:Q,syncedTextAreaSensitiveModeRef:w,hasInteractedPage:V,setHasInteractedPage:b,hasFlowStarted:F,setHasFlowStarted:J,unreadCount:K,setUnreadCount:oe,inputLength:ve,setInputLength:ue,blockAllowsAttachment:Ve,setBlockAllowsAttachment:Me,viewportHeight:Re,setViewportHeight:st,viewportWidth:j,setViewportWidth:W},children:e})};var z=(e=>(e.START_SPEAK_AUDIO="rcb-start-speak-audio",e.TOGGLE_AUDIO="rcb-toggle-audio",e.TOGGLE_NOTIFICATIONS="rcb-toggle-notifications",e.TOGGLE_VOICE="rcb-toggle-voice",e.TOGGLE_CHAT_WINDOW="rcb-toggle-chat-window",e.PRE_INJECT_MESSAGE="rcb-pre-inject-message",e.POST_INJECT_MESSAGE="rcb-post-inject-message",e.START_SIMULATE_STREAM_MESSAGE="rcb-start-simulate-stream-message",e.STOP_SIMULATE_STREAM_MESSAGE="rcb-stop-simulate-stream-message",e.START_STREAM_MESSAGE="rcb-start-stream-message",e.CHUNK_STREAM_MESSAGE="rcb-chunk-stream-message",e.STOP_STREAM_MESSAGE="rcb-stop-stream-message",e.REMOVE_MESSAGE="rcb-remove-message",e.SAVE_CHAT_HISTORY="rcb-save-chat-history",e.LOAD_CHAT_HISTORY="rcb-load-chat-history",e.CHANGE_PATH="rcb-change-path",e.SHOW_TOAST="rcb-show-toast",e.DISMISS_TOAST="rcb-dismiss-toast",e.USER_SUBMIT_TEXT="rcb-user-submit-text",e.USER_UPLOAD_FILE="rcb-user-upload-file",e.TEXT_AREA_CHANGE_VALUE="rcb-text-area-change-value",e.PRE_LOAD_CHATBOT="rcb-pre-load-chatbot",e.POST_LOAD_CHATBOT="rcb-post-load-chatbot",e.PRE_PROCESS_BLOCK="rcb-pre-process-block",e.POST_PROCESS_BLOCK="rcb-post-process-block",e))(z||{});const Wl={[z.START_SPEAK_AUDIO]:!0,[z.TOGGLE_AUDIO]:!0,[z.TOGGLE_VOICE]:!0,[z.TOGGLE_NOTIFICATIONS]:!0,[z.TOGGLE_CHAT_WINDOW]:!0,[z.PRE_INJECT_MESSAGE]:!0,[z.POST_INJECT_MESSAGE]:!1,[z.PRE_LOAD_CHATBOT]:!0,[z.POST_LOAD_CHATBOT]:!1,[z.START_SIMULATE_STREAM_MESSAGE]:!0,[z.STOP_SIMULATE_STREAM_MESSAGE]:!1,[z.START_STREAM_MESSAGE]:!0,[z.CHUNK_STREAM_MESSAGE]:!0,[z.STOP_STREAM_MESSAGE]:!0,[z.REMOVE_MESSAGE]:!0,[z.SAVE_CHAT_HISTORY]:!0,[z.LOAD_CHAT_HISTORY]:!0,[z.CHANGE_PATH]:!0,[z.SHOW_TOAST]:!0,[z.DISMISS_TOAST]:!0,[z.USER_SUBMIT_TEXT]:!0,[z.USER_UPLOAD_FILE]:!0,[z.TEXT_AREA_CHANGE_VALUE]:!0,[z.PRE_PROCESS_BLOCK]:!0,[z.POST_PROCESS_BLOCK]:!0},ro=async(e,t,n)=>{const r=new CustomEvent(e,{detail:t,cancelable:Wl[e]});return r.data=n,r.promises=[],window.dispatchEvent(r),await Promise.all(r.promises),r},Pa=At({paths:[],setSyncedPaths:()=>{},syncedPathsRef:{current:[]}}),xn=()=>rt(Pa),Gl=({children:e})=>{const[t,n,r]=Je([]);return C(Pa.Provider,{value:{paths:t,setSyncedPaths:n,syncedPathsRef:r},children:e})},lt=()=>{const{botIdRef:e}=Te(),{syncedPathsRef:t}=xn(),n=q(()=>t.current.length>0?t.current.at(-1)??null:null,[]),r=q(()=>t.current.length>1?t.current.at(-2)??null:null,[]);return{dispatchRcbEvent:q(async(o,i)=>{const A={botId:e.current,currPath:n(),prevPath:r()};return await ro(o,A,i)},[e])}},Ze=()=>{const{settings:e}=ae(),{isChatWindowOpen:t,setSyncedIsChatWindowOpen:n,viewportHeight:r,setViewportHeight:o,viewportWidth:i,setViewportWidth:A,setUnreadCount:s,setSyncedIsBotTyping:a,setSyncedIsScrolling:l,syncedIsBotTypingRef:c,syncedIsChatWindowOpenRef:u}=Oe(),{chatBodyRef:d}=Te(),{dispatchRcbEvent:f}=lt(),h=q(()=>{if(!d.current)return!1;const g=d.current.getBoundingClientRect(),_=window.innerHeight??document.documentElement.clientHeight,P=window.innerWidth??document.documentElement.clientWidth;return g.top>=0&&g.left>=0&&g.bottom<=_&&g.right<=P},[d]),m=q(async g=>{var _;g!==u.current&&((_=e.event)!=null&&_.rcbToggleChatWindow&&(await f(z.TOGGLE_CHAT_WINDOW,{currState:u.current,newState:!u.current})).defaultPrevented||n(P=>(P||s(0),!P)))},[u]),p=q(async g=>{g!==c.current&&a(_=>!_)},[c]),v=q((g,_,P,E)=>(g/=E/2)<1?P/2*g*g+_:-P/2*(--g*(g-2)-1)+_,[]),y=q((g=0)=>{if(!d.current)return;const _=d.current.scrollHeight-d.current.clientHeight;if(g<=0)return d.current.scrollTop=_,void l(!1);const P=d.current.scrollTop,E=_-P;let k=0;const B=()=>{if(!d.current)return;k+=20;const T=v(k,P,E,g);d.current.scrollTop=T,k<g?requestAnimationFrame(B):l(!1)};B()},[d]);return{isChatWindowOpen:t,setSyncedIsChatWindowOpen:n,toggleChatWindow:m,viewportHeight:r,setViewportHeight:o,viewportWidth:i,setViewportWidth:A,toggleIsBotTyping:p,scrollToBottom:y,getIsChatBotVisible:h}},Yl=()=>{var e,t,n;const{settings:r}=ae(),{styles:o}=ye(),{unreadCount:i,isScrolling:A}=Oe(),{chatBodyRef:s}=Te(),{scrollToBottom:a}=Ze(),[l,c]=ee(!1),u={color:(e=r.general)==null?void 0:e.primaryColor,borderColor:(t=r.general)==null?void 0:t.primaryColor,...o.chatMessagePromptHoveredStyle};return C("div",{className:"rcb-message-prompt-container "+(s.current&&((d=r.chatWindow)!=null&&d.showMessagePrompt)&&A&&i>0?"visible":"hidden"),children:C("div",{onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},style:l?u:{...o.chatMessagePromptStyle},onMouseDown:f=>{f.preventDefault(),a(600)},className:"rcb-message-prompt-text",children:(n=r.chatWindow)==null?void 0:n.messagePromptText})});var d},Ca=At({messages:[],setSyncedMessages:()=>{},syncedMessagesRef:{current:[]}}),oo=()=>rt(Ca),$l=({children:e})=>{const[t,n,r]=Je([]);return C(Ca.Provider,{value:{messages:t,setSyncedMessages:n,syncedMessagesRef:r},children:e})},Vl=({message:e,isNewSender:t})=>{var n,r,o,i,A,s;const{settings:a}=ae(),{styles:l}=ye(),c=typeof e.content=="string",u=e.content,d=e.contentWrapper?C(e.contentWrapper,{children:u}):u,f={backgroundColor:(n=a.general)==null?void 0:n.primaryColor,color:"#fff",maxWidth:(r=a.userBubble)!=null&&r.showAvatar?"65%":"70%",...l.userBubbleStyle},h=(o=a.userBubble)!=null&&o.animate?"rcb-user-message-entry":"",m=((i=a.userBubble)==null?void 0:i.showAvatar)&&t,p="rcb-user-message"+(!t&&(A=a.userBubble)!=null&&A.showAvatar?" rcb-user-message-offset":"");return C("div",{className:"rcb-user-message-container",children:[c?C("div",{style:f,className:`${p} ${h}`,children:d}):C(ce,{children:d}),m&&C("div",{style:{backgroundImage:`url("${(s=a.userBubble)==null?void 0:s.avatar}")`},className:"rcb-message-user-avatar"})]})},Kl=({message:e,isNewSender:t})=>{var n,r,o,i,A,s;const{settings:a}=ae(),{styles:l}=ye(),c=typeof e.content=="string",u=e.content,d=e.contentWrapper?C(e.contentWrapper,{children:u}):u,f={backgroundColor:(n=a.general)==null?void 0:n.secondaryColor,color:"#fff",maxWidth:(r=a.botBubble)!=null&&r.showAvatar?"65%":"70%",...l.botBubbleStyle},h=(o=a.botBubble)!=null&&o.animate?"rcb-bot-message-entry":"",m=((i=a.botBubble)==null?void 0:i.showAvatar)&&t,p="rcb-bot-message"+(!t&&(A=a.botBubble)!=null&&A.showAvatar?" rcb-bot-message-offset":"");return C("div",{className:"rcb-bot-message-container",children:[m&&C("div",{style:{backgroundImage:`url("${(s=a.botBubble)==null?void 0:s.avatar}")`},className:"rcb-message-bot-avatar"}),c?C("div",{style:f,className:`${p} ${h}`,children:d}):C(ce,{children:d})]})},Xl=()=>{var e,t,n;const{settings:r}=ae(),{styles:o}=ye(),i=(e=r.botBubble)!=null&&e.animate?"rcb-bot-message-entry":"";return C("div",{className:"rcb-bot-message-container",children:[((t=r.botBubble)==null?void 0:t.showAvatar)&&C("div",{style:{backgroundImage:`url("${(n=r.botBubble)==null?void 0:n.avatar}")`},className:"rcb-message-bot-avatar"}),C("div",{onMouseDown:A=>{A.preventDefault()},className:`rcb-bot-message ${i}`,children:C("div",{className:"rcb-typing-indicator",style:{...o==null?void 0:o.rcbTypingIndicatorContainerStyle},children:[C("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),C("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),C("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}})]})})]})},Jl=()=>{var e,t,n;const{settings:r}=ae(),{styles:o}=ye(),{messages:i}=oo(),{scrollToBottom:A}=Ze(),{isBotTyping:s,syncedIsScrollingRef:a}=Oe(),{chatBodyRef:l}=Te(),c={...o==null?void 0:o.bodyStyle,scrollbarWidth:(e=r.chatWindow)!=null&&e.showScrollbar?"auto":"none"};return X(()=>{a.current||A()},[(t=l.current)==null?void 0:t.scrollHeight]),C("div",{style:c,className:"rcb-chat-body-container",ref:l,children:[i.map((u,d)=>{const f=(h=>h===0||i[h].sender!==i[h-1].sender)(d);return u.sender.toUpperCase()==="USER"?C(Vl,{message:u,isNewSender:f},d):u.sender.toUpperCase()==="BOT"?C(Kl,{message:u,isNewSender:f},d):C("div",{children:u.content},d)}),s&&((n=r.chatWindow)==null?void 0:n.showTypingIndicator)&&C(Xl,{}),C(Yl,{})]})},Zl=({checkboxes:e,checkedItems:t,path:n})=>{var r,o,i,A,s,a,l,c,u,d,f;const{settings:h}=ae(),{styles:m}=ye(),{paths:p}=xn(),{handleSubmitText:v}=on(),[y,g]=ee(new Set),[_,P]=ee(!1),E={cursor:_?`url("${(r=h.general)==null?void 0:r.actionDisabledIcon}"), auto`:"pointer",color:(o=h.general)==null?void 0:o.primaryColor,borderColor:(i=h.general)==null?void 0:i.primaryColor,...m.botCheckboxRowStyle},k={cursor:_||y.size<e.min?`url("${(A=h.general)==null?void 0:A.actionDisabledIcon}"), auto`:"pointer",color:(s=h.general)==null?void 0:s.primaryColor,borderColor:(a=h.general)==null?void 0:a.primaryColor,...m.botCheckboxNextStyle},B={cursor:_?`url("${(l=h.general)==null?void 0:l.actionDisabledIcon}"), auto`:"pointer",color:"transparent",...m.botCheckMarkStyle},T={cursor:_?`url("${(c=h.general)==null?void 0:c.actionDisabledIcon}"), auto`:"pointer",color:"#fff",borderColor:(u=h.general)==null?void 0:u.primaryColor,backgroundColor:(d=h.general)==null?void 0:d.primaryColor,...m.botCheckMarkSelectedStyle};return X(()=>{p.length>0&&p[p.length-1]!==n&&P(!e.reusable)},[p]),C("div",{className:"rcb-checkbox-container "+((f=h.botBubble)!=null&&f.showAvatar?"rcb-checkbox-offset":""),children:[e.items.map(D=>C("div",{onMouseDown:O=>{O.preventDefault(),(S=>{_||g(N=>{const R=new Set(N);if(R.has(S))t.delete(S),R.delete(S);else{if(y.size==e.max)return N;t.add(S),R.add(S)}return R})})(D)},style:E,className:"rcb-checkbox-row-container",children:C("div",{className:"rcb-checkbox-row",children:[C("div",{style:y.has(D)?T:B,className:"rcb-checkbox-mark"}),C("div",{className:"rcb-checkbox-label",children:D})]})},D)),C("div",{style:k,className:"rcb-checkbox-next-button",onMouseDown:D=>{var O;if(D.preventDefault(),_||y.size<e.min)return;const S=Array.from(t).join(", ");let N;P(!e.reusable),N=e.sendOutput!=null?e.sendOutput:((O=h.chatInput)==null?void 0:O.sendCheckboxOutput)??!0,v(S,N)}})]})},ec=async(e,t)=>{const n=e.checkboxes;if(!n)return;let r;if(typeof n=="function"?(r=n(t),r instanceof Promise&&(r=await r)):r=n,Array.isArray(r)&&(r={items:r}),!("items"in r)||r.items.length==0)return;r.min==null&&(r.min=1),r.max==null&&(r.max=r.items.length),r.min>r.max&&(r.min=r.max),r.reusable==null&&(r.reusable=!1);const o=new Set,i=t.currPath,A=C(Zl,{checkboxes:r,checkedItems:o,path:i});await t.injectMessage(A)},tc=async(e,t)=>{const n=e.function;if(!n)return;const r=n(t);return r instanceof Promise?await r:r},nc=async(e,t,n)=>{const r=e.message;if(!r)return;if(typeof r=="string")return void(r.trim()!==""&&(n?await t.simulateStreamMessage(r):await t.injectMessage(r)));let o=r(t);o instanceof Promise&&(o=await o),typeof o=="string"&&o.trim()!==""&&(n?await t.simulateStreamMessage(o):await t.injectMessage(o))},rc=({options:e,path:t})=>{var n,r,o,i,A,s;const{settings:a}=ae(),{styles:l}=ye(),{paths:c}=xn(),{handleSubmitText:u}=on(),[d,f]=ee([]),[h,m]=ee(!1),p={cursor:h?`url("${(n=a.general)==null?void 0:n.actionDisabledIcon}"), auto`:"pointer",color:(r=a.general)==null?void 0:r.primaryColor,borderColor:(o=a.general)==null?void 0:o.primaryColor,backgroundColor:"#fff",...l.botOptionStyle},v={color:"#fff",borderColor:(i=a.general)==null?void 0:i.primaryColor,backgroundColor:(A=a.general)==null?void 0:A.primaryColor,...l.botOptionHoveredStyle};return X(()=>{c.length>0&&c[c.length-1]!==t&&m(!e.reusable)},[c]),C("div",{className:"rcb-options-container "+((s=a.botBubble)!=null&&s.showAvatar?"rcb-options-offset":""),children:e.items.map((y,g)=>{const _=d[g]&&!h;return C("div",{className:"rcb-options",style:_?v:p,onMouseEnter:()=>(P=>{f(E=>{const k=[...E];return k[P]=!0,k})})(g),onMouseLeave:()=>(P=>{f(E=>{const k=[...E];return k[P]=!1,k})})(g),onMouseDown:P=>{var E;if(P.preventDefault(),h)return;let k;m(!e.reusable),k=e.sendOutput!=null?e.sendOutput:((E=a.chatInput)==null?void 0:E.sendOptionOutput)??!0,u(y,k)},children:y},y)})})},oc=async(e,t)=>{const n=e.options;if(!n)return;let r;if(typeof n=="function"?(r=n(t),r instanceof Promise&&(r=await r)):r=n,Array.isArray(r)&&(r={items:r}),!("items"in r)||r.items.length==0)return;r.reusable==null&&(r.reusable=!1);const o=t.currPath,i=C(rc,{options:r,path:o});await t.injectMessage(i)},ic=async(e,t)=>{const n=e.component;if(n){if(typeof n=="function"){let r=n(t);return r instanceof Promise&&(r=await r),r?void await t.injectMessage(r):void 0}await t.injectMessage(n)}},ac=async(e,t,n,r)=>{const o=e.transition;let i;if(typeof o=="function"?(i=o(t),i instanceof Promise&&(i=await i)):i=o,typeof i=="number"&&(i={duration:i}),!i||i instanceof Promise||i.duration==null||typeof i.duration!="number")return;i.interruptable==null&&(i.interruptable=!1);const A=setTimeout(async()=>{const s=await r(e);s&&await Sa(s,t)},i.duration);i.interruptable&&(n.current=A)},sc=async(e,t,n)=>{const r=e.chatDisabled;if(r==null)return;let o;typeof r=="function"?(o=r(t),o instanceof Promise&&(o=await o)):o=r,n(o)},ka=async(e,t,n)=>{const r=e.isSensitive;if(!r)return void n(!1);let o;typeof r=="function"?(o=r(t),o instanceof Promise&&(o=await o)):o=r,n(o)},Sa=async(e,t)=>{if(!e)throw new Error("Block is not valid.");const n=Object.keys(e);for(const r of n)r==="function"&&await tc(e,t);n.includes("path")&&await(async(r,o)=>{const i=r.path;if(!i)return!1;if(typeof i=="string")return await o.goToPath(i),!0;let A=i(o);if(A instanceof Promise&&(A=await A),!A)return!1;const s=A;return await o.goToPath(s),!0})(e,t)},Ac=()=>{var e;const{settings:t}=ae(),{styles:n}=ye();return C("div",{className:"rcb-line-break-container",children:C("div",{style:{...n.chatHistoryLineBreakStyle},className:"rcb-line-break-text","data-testid":"chat-history-line-break-text",children:(e=t.chatHistory)==null?void 0:e.chatHistoryLineBreakText})})},lc=()=>{var e;const{settings:t}=ae(),{styles:n}=ye(),r={borderTop:`4px solid ${(e=t.general)==null?void 0:e.primaryColor}`,...n.loadingSpinnerStyle};return C("div",{className:"rcb-spinner-container",children:C("div",{style:r,className:"rcb-spinner"})})},or=()=>{try{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();throw new Error("crypto.randomUUID not available")}catch(e){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function")return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const n=crypto.getRandomValues(new Uint8Array(1))[0]%16;return(t==="x"?n:3&n|8).toString(16)});throw console.error(e),new Error("crypto.getRandomValues is also not available")}},Qt=(e,t)=>({id:or(),content:e,sender:t,type:typeof e=="string"?"string":"object",timestamp:new Date().toUTCString(),tags:[]});let Mt,Da=!1,ir="rcb-history",ar=30,Ba=!1,sr=[];const In=()=>sr,io=e=>{xa(e),sr=e},xa=e=>{Mt&&Mt.setItem(ir,JSON.stringify(e))},ao=e=>{var t,n,r,o,i;Mt=((n=(t=e.chatHistory)==null?void 0:t.storageType)==null?void 0:n.toUpperCase())==="SESSION_STORAGE"?sessionStorage:localStorage,ir=(r=e.chatHistory)==null?void 0:r.storageKey,ar=(o=e.chatHistory)==null?void 0:o.maxEntries,Ba=(i=e.chatHistory)==null?void 0:i.disabled,sr=(A=>{if(A!=null)try{return JSON.parse(A)}catch{return[]}return[]})(Mt.getItem(ir))},cc=e=>zt(e.content)?structuredClone({id:e.id,content:xl.renderToString(e.content),type:e.type,sender:e.sender.toUpperCase(),timestamp:e.timestamp,tags:e.tags}):e,Ia=(e,t,n)=>{const r=new DOMParser().parseFromString(e,"text/html");return Array.from(r.body.childNodes).map((o,i)=>{var A;if(o.nodeType===Node.TEXT_NODE)return o.textContent;{const s=o.tagName.toLowerCase();let a=Array.from(o.attributes).reduce((l,c)=>{const u=c.name.toLowerCase();if(u==="style"){const d=c.value.split(";").filter(h=>h.trim()!==""),f={};d.forEach(h=>{const[m,p]=h.split(":").map(y=>y.trim()),v=m.replace(/-([a-z])/g,(y,g)=>g.toUpperCase());f[v]=p}),l[u]=f}else s!=="audio"&&s!=="video"||u!=="controls"||c.value!==""?l[u]=c.value:l[u]="true";return l},{});if(Object.prototype.hasOwnProperty.call(a,"class")){const l=o.classList;a.className=l.toString(),delete a.class,(A=t.botBubble)!=null&&A.showAvatar&&(a=uc(l,a)),a=dc(l,a,t,n),a=fc(l,a,t,n),a=pc(l,a,t,n),a=hc(l,a,t,n)}if(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"].includes(s))return Ae(s,{key:i,...a});{const l=Ia(o.innerHTML,t,n);return Ae(s,{key:i,...a},...l)}}})},uc=(e,t)=>((e.contains("rcb-options-container")||e.contains("rcb-checkbox-container"))&&(t.className=`${e.toString()} rcb-options-offset`),t),dc=(e,t,n,r)=>{var o,i,A,s,a;return e.contains("rcb-options")&&(t.style={...t.style,color:((o=r.botOptionStyle)==null?void 0:o.color)??((i=n.general)==null?void 0:i.primaryColor),borderColor:((A=r.botOptionStyle)==null?void 0:A.color)??((s=n.general)==null?void 0:s.primaryColor),cursor:`url("${(a=n.general)==null?void 0:a.actionDisabledIcon}"), auto`,...r.botOptionStyle}),t},fc=(e,t,n,r)=>{var o,i,A,s,a;return e.contains("rcb-checkbox-row-container")&&(t.style={...t.style,color:((o=r.botCheckboxRowStyle)==null?void 0:o.color)??((i=n.general)==null?void 0:i.primaryColor),borderColor:((A=r.botCheckboxRowStyle)==null?void 0:A.color)??((s=n.general)==null?void 0:s.primaryColor),cursor:`url("${(a=n.general)==null?void 0:a.actionDisabledIcon}"), auto`,...r.botCheckboxRowStyle}),t},pc=(e,t,n,r)=>{var o,i,A,s,a;return e.contains("rcb-checkbox-next-button")&&(t.style={...t.style,color:((o=r.botCheckboxNextStyle)==null?void 0:o.color)??((i=n.general)==null?void 0:i.primaryColor),borderColor:((A=r.botCheckboxNextStyle)==null?void 0:A.color)??((s=n.general)==null?void 0:s.primaryColor),cursor:`url("${(a=n.general)==null?void 0:a.actionDisabledIcon}"), auto`,...r.botCheckboxNextStyle}),t},hc=(e,t,n,r)=>{var o,i;return(e.contains("rcb-media-display-image-container")||e.contains("rcb-media-display-video-container"))&&(t.style={...t.style,backgroundColor:(o=n.general)==null?void 0:o.primaryColor,maxWidth:(i=n.userBubble)!=null&&i.showAvatar?"65%":"70%",...r.mediaDisplayContainerStyle}),t},so=()=>{const{settings:e}=ae(),{notificationsToggledOn:t,setSyncedNotificationsToggledOn:n,hasInteractedPage:r,unreadCount:o,setUnreadCount:i,syncedNotificationsToggledOnRef:A}=Oe(),{audioBufferRef:s,audioContextRef:a,gainNodeRef:l}=Te(),{dispatchRcbEvent:c}=lt(),u=q(async()=>{var f,h;const m=(f=e.notification)==null?void 0:f.sound;a.current=new AudioContext;const p=a.current.createGain();let v;if(p.gain.value=((h=e.notification)==null?void 0:h.volume)??.2,l.current=p,m!=null&&m.startsWith("data:audio")){const y=atob(m.split(",")[1]),g=new ArrayBuffer(y.length),_=new Uint8Array(g);for(let P=0;P<y.length;P++)_[P]=y.charCodeAt(P);v=g}else v=await(await fetch(m)).arrayBuffer();s.current=await a.current.decodeAudioData(v)},[e.notification]),d=q(()=>{var f;if((f=e.notification)!=null&&f.disabled||!A.current||!r||!a.current||!s.current)return;const h=a.current.createBufferSource();h.buffer=s.current,h.connect(l.current).connect(a.current.destination),h.start()},[e.notification,A,r,a,s,l]);return{unreadCount:o,setUnreadCount:i,notificationsToggledOn:t,toggleNotifications:q(async f=>{var h;f!==A.current&&((h=e.event)!=null&&h.rcbToggleNotifications&&(await c(z.TOGGLE_NOTIFICATIONS,{currState:A.current,newState:!A.current})).defaultPrevented||n(m=>!m))},[A]),playNotificationSound:d,setUpNotifications:u}},gc=(e,t)=>{var n,r,o,i;((A,s,a,l,c)=>{if(!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const u=new window.SpeechSynthesisUtterance;u.text=A,u.lang=s,u.rate=l,u.volume=c;let d=!1;for(const f of a){const h=window.speechSynthesis.getVoices().find(m=>m.name===f);if(h){u.voice=h,window.speechSynthesis.speak(u),d=!0;break}}d||window.speechSynthesis.speak(u)})(t,(n=e.audio)==null?void 0:n.language,(r=e.audio)==null?void 0:r.voiceNames,(o=e.audio)==null?void 0:o.rate,(i=e.audio)==null?void 0:i.volume)},Ta=()=>{const{settings:e}=ae(),{audioToggledOn:t,setSyncedAudioToggledOn:n,syncedAudioToggledOnRef:r}=Oe(),{dispatchRcbEvent:o}=lt(),i=q(async s=>{var a;s!==r.current&&((a=e.event)!=null&&a.rcbToggleAudio&&(await o(z.TOGGLE_AUDIO,{currState:r.current,newState:!r.current})).defaultPrevented||n(l=>!l))},[r]),A=q(async s=>{var a,l;if((a=e.audio)!=null&&a.disabled||!r.current)return;let c=s;if((l=e.event)!=null&&l.rcbStartSpeakAudio){const u=await o(z.START_SPEAK_AUDIO,{textToRead:c});if(u.defaultPrevented)return;c=u.data.textToRead}gc(e,c)},[e,r]);return{audioToggledOn:t,speakAudio:A,toggleAudio:i}},qt=()=>{var e,t,n;const{settings:r}=ae(),{messages:o,setSyncedMessages:i,syncedMessagesRef:A}=oo(),{setSyncedIsBotTyping:s,setUnreadCount:a,syncedIsScrollingRef:l,syncedIsChatWindowOpenRef:c}=Oe(),{streamMessageMap:u,chatBodyRef:d,paramsInputRef:f}=Te(),{scrollToBottom:h,getIsChatBotVisible:m}=Ze(),{dispatchRcbEvent:p}=lt(),{speakAudio:v}=Ta(),{playNotificationSound:y}=so(),g=q(async S=>{var N,R;if((N=r.event)!=null&&N.rcbSaveChatHistory){const L=await p(z.SAVE_CHAT_HISTORY,{messages:S});if(L.defaultPrevented)return;S=((R=L.data)==null?void 0:R.messages)??S}await(async L=>{if(Ba||!Mt)return;const U=[];for(let Q=L.length-1;Q>=0;Q--){const w=L[Q];if(w.sender.toUpperCase()!=="SYSTEM"&&(w.content!==""&&U.unshift(w),U.length===ar))break}let x=U.map(cc);if(!Da&&x.length<ar){const Q=ar-x.length;x=[...sr.slice(-Q),...x]}xa(x)})(S)},[p,(e=r.event)==null?void 0:e.rcbSaveChatHistory]),_=q((S,N=!1)=>{var R,L;g(S);let U=!0;const x=S[S.length-1];if(!x)return;const Q=x.sender.toUpperCase();Q==="USER"&&(U=!1),(R=r.general)!=null&&R.embedded&&m()&&(U=!1),(c.current&&!l.current||N)&&(U=!1),U&&y(),!N&&(Q!=="USER"&&(L=r.chatWindow)!=null&&L.autoJumpToBottom||Q==="USER"||!l.current)&&setTimeout(()=>h(),1)},[r,d,c,l,y,h,m]),P=q(async(S,N="BOT",R=null)=>{var L,U,x,Q,w;if(typeof S!="string")throw new Error("Content must be of type string to simulate stream.");N=N.toUpperCase();let V=Qt(S,N);if((L=r.event)!=null&&L.rcbStartSimulateStreamMessage){const ue=await p(z.START_SIMULATE_STREAM_MESSAGE,{message:V});if(ue.defaultPrevented)return null;R=ue.data.simulateStreamChunker||R,V=ue.data.message}s(!1);let b=30;b=N==="BOT"?(U=r.botBubble)==null?void 0:U.streamSpeed:(x=r.userBubble)==null?void 0:x.streamSpeed;const F={...V,content:""};i(ue=>[...ue,F]),_(A.current);let J=V.content;R&&(J=R(J));let K=0;const oe=J.length;V.sender.toUpperCase()==="BOT"&&(c.current||(Q=r.general)!=null&&Q.embedded)&&typeof V.content=="string"&&V.content.trim()!==""&&v(V.content);const ve=new Promise(ue=>{const Ve=setInterval(()=>{if(K>=oe)return clearInterval(Ve),void ue();i(Me=>{const Re=[...Me];for(let st=Re.length-1;st>=0;st--)if(Re[st].id===F.id){const j=J[K];j&&(F.content+=j,Re[st]=F),K++;break}return Re})},b)});return(l.current||!c.current)&&a(ue=>ue+1),await ve,g(A.current),(w=r.event)!=null&&w.rcbStopSimulateStreamMessage&&await p(z.STOP_SIMULATE_STREAM_MESSAGE,{message:V}),N==="USER"&&(f.current=S),V},[r,p,_,A,f,s,a,c,v]),E=q(async(S,N="BOT")=>{var R,L,U;N=N.toUpperCase();let x=Qt(S,N);if((R=r.event)!=null&&R.rcbPreInjectMessage){const Q=await p(z.PRE_INJECT_MESSAGE,{message:x});if(Q.defaultPrevented)return null;x=Q.data.message}return x.sender.toUpperCase()==="BOT"&&(c.current||(L=r.general)!=null&&L.embedded)&&typeof x.content=="string"&&x.content.trim()!==""&&v(x.content),(l.current||!c.current)&&a(Q=>Q+1),(U=r.event)!=null&&U.rcbPostInjectMessage&&await p(z.POST_INJECT_MESSAGE,{message:x}),i(Q=>[...Q,x]),_(A.current),N==="USER"&&typeof S=="string"&&(f.current=S),x},[r,p,_,f,A,c,v,a]),k=q(async S=>{var N;let R=A.current.find(x=>x.id===S),L=null,U=!1;return R||(L=In(),R=L.find(x=>x.id===S),R&&(U=!0)),!R||(N=r.event)!=null&&N.rcbRemoveMessage&&(await p(z.REMOVE_MESSAGE,{message:R})).defaultPrevented?null:U?(L&&io(L.filter(x=>x.id!==S)),R):(i(x=>x.filter(Q=>Q.id!==S)),_(A.current),a(x=>Math.max(x-1,0)),R)},[p,(t=r.event)==null?void 0:t.rcbRemoveMessage,_,A,a,In,io]),B=q(async(S,N="BOT")=>{var R,L;if(N=N.toUpperCase(),!u.current.has(N)){const x=Qt(S,N);return(R=r.event)!=null&&R.rcbStartStreamMessage&&(await p(z.START_STREAM_MESSAGE,{message:x})).defaultPrevented?null:(s(!1),i(Q=>[...Q,x]),_(A.current),u.current.set(N,x.id),(l.current||!c.current)&&a(Q=>Q+1),x)}const U={...Qt(S,N),id:u.current.get(N)};return(L=r.event)!=null&&L.rcbChunkStreamMessage&&(await p(z.CHUNK_STREAM_MESSAGE,{message:U})).defaultPrevented?null:(i(x=>x.map(Q=>Q.id===U.id?U:Q)),_(A.current,!0),U)},[p,r.event,_,A,s,a,u]),T=q(async(S="BOT")=>{var N;if(S=S.toUpperCase(),!u.current.has(S))return!0;const R=u.current.get(S);let L;for(let U=0;U<3;U++){const x=A.current.find(Q=>Q.id===R);x&&(L=x),await new Promise(Q=>setTimeout(Q,20))}return((N=r.event)==null||!N.rcbStopStreamMessage||!(await p(z.STOP_STREAM_MESSAGE,{message:L})).defaultPrevented)&&(u.current.delete(S),g(A.current),S==="USER"&&typeof(L==null?void 0:L.content)=="string"&&(f.current=L.content),!0)},[p,(n=r.event)==null?void 0:n.rcbStopStreamMessage,u,f]),D=q(S=>{const N=typeof S=="function"?S(A.current):S;i(N),_(N)},[_,A]),O=q((S,N,R=0)=>{var L;const U=A.current,x=S?S.toUpperCase():null,Q=[];let w=R;for(let V=U.length-1;V>=0;V--){const b=U[V];if(!x||((L=b==null?void 0:b.sender)==null?void 0:L.toUpperCase())===x){if(w>0){w--;continue}if(Q.push(b),N!==void 0&&Q.length===N)break}}return Q.length>0?Q:null},[A]);return{simulateStreamMessage:P,injectMessage:E,removeMessage:k,streamMessage:B,endStreamMessage:T,replaceMessages:D,getMessages:O,messages:o}};let Ao,pt,Ar,Ot=!1,ht=null;const lo=()=>{if(!Ao){const e=window.SpeechRecognition||window.webkitSpeechRecognition;Ao=e!=null?new e:null}return Ao},mc=(e,t,n,r,o,i)=>{var A,s,a;const l=lo();if(!l)return;if(!Ot)try{Ot=!0,l.lang=(A=e.voice)==null?void 0:A.language,l.start()}catch{}const c=(s=e.voice)==null?void 0:s.timeoutPeriod,u=(a=e.voice)==null?void 0:a.autoSendPeriod;l.onresult=d=>{var f,h;clearTimeout(pt),pt=null,clearTimeout(Ar);const m=d.results[d.results.length-1][0].transcript;if(i.current){const p=(f=e.chatInput)==null?void 0:f.characterLimit,v=i.current.value+m;p!=null&&p>=0&&v.length>p?r(v.slice(0,p)):r(v),o(i.current.value.length)}c&&(pt=setTimeout(async()=>await uo(t,i),c)),(h=e.voice)!=null&&h.autoSendDisabled||(Ar=setTimeout(n,u))},l.onend=()=>{Ot?(l.start(),!pt&&c&&(pt=setTimeout(async()=>await uo(t,i),c))):(clearTimeout(pt),pt=null,clearTimeout(Ar))},c&&(pt=setTimeout(async()=>await uo(t,i),c))},yc=(e,t)=>{navigator.mediaDevices.getUserMedia({audio:!0}).then(n=>{if(ht=new MediaRecorder(n),!Ot)try{Ot=!0,ht.start()}catch{}ht.ondataavailable=r=>{t.current&&t.current.push(r.data)},ht.onstop=()=>{e(),n.getTracks().forEach(r=>r.stop())}}).catch(n=>{console.error("Unable to use microphone:",n)})},co=()=>{const e=lo();e&&(Ot=!1,e&&e.stop(),ht&&ht.state!=="inactive"&&(ht.stop(),ht=null),clearTimeout(pt),pt=null,clearTimeout(Ar))},uo=async(e,t)=>{var n;(n=t.current)!=null&&n.disabled||await e(),co()},fo=()=>{const{settings:e}=ae(),{voiceToggledOn:t,setSyncedVoiceToggledOn:n,syncedVoiceToggledOnRef:r}=Oe(),{dispatchRcbEvent:o}=lt(),i=q(async s=>{var a;s!==r.current&&((a=e.event)!=null&&a.rcbToggleVoice&&(await o(z.TOGGLE_VOICE,{currState:r.current,newState:!r.current})).defaultPrevented||n(l=>!l))},[r]),A=q(s=>{((a,l)=>{var c,u,d;const f=lo();(c=l.voice)!=null&&c.disabled||(u=l.chatInput)==null||!u.blockSpam||!f||(a&&!Ot?(Ot=!0,(d=l.voice)!=null&&d.sendAsAudio?ht==null||ht.start():f.start()):a||co())})(s,e)},[e]);return{voiceToggledOn:t,toggleVoice:i,syncVoice:A}},Wt=()=>{var e;const{settings:t}=ae(),{inputLength:n,setInputLength:r,textAreaDisabled:o,setSyncedTextAreaDisabled:i,textAreaSensitiveMode:A,setSyncedTextAreaSensitiveMode:s,syncedTextAreaDisabledRef:a,syncedTextAreaSensitiveModeRef:l}=Oe(),{inputRef:c,chatBodyRef:u,prevInputRef:d}=Te(),{dispatchRcbEvent:f}=lt(),{getIsChatBotVisible:h}=Ze(),m=q(async E=>{var k,B,T;if(a.current&&c.current)c.current.value="";else if(c.current&&d.current!==null){const D=(k=t.chatInput)==null?void 0:k.characterLimit,O=(B=t.chatInput)!=null&&B.allowNewline?E:E.replace(/\n/g," ");if(D!=null&&D>=0&&O.length>D?c.current.value=O.slice(0,D):c.current.value=O,(T=t.event)!=null&&T.rcbTextAreaChangeValue&&(await f(z.TEXT_AREA_CHANGE_VALUE,{currValue:c.current.value,prevValue:d.current})).defaultPrevented)return void(c.current.value=d.current);d.current=c.current.value}},[a,c,d,t,f]),p=q(E=>{var k;(k=c.current)!=null&&k.disabled||setTimeout(()=>{var B,T,D;(B=t.general)!=null&&B.embedded?h()&&((T=c.current)==null||T.focus()):E!=="start"&&((D=c.current)==null||D.focus())},100)},[c,(e=t.general)==null?void 0:e.embedded,u,h]),v=q(()=>{c.current&&c.current.focus()},[]),y=q(()=>{c.current&&c.current.blur()},[]),g=q(()=>c&&c.current?c.current.value:"",[]),_=q(E=>{E!==a.current&&i(k=>!k)},[a]),P=q(E=>{E!==l.current&&s(k=>!k)},[l]);return{textAreaDisabled:o,setSyncedTextAreaDisabled:i,textAreaSensitiveMode:A,setSyncedTextAreaSensitiveMode:s,inputLength:n,setInputLength:r,getTextAreaValue:g,setTextAreaValue:m,updateTextAreaFocus:p,focusTextArea:v,blurTextArea:y,toggleTextAreaDisabled:_,toggleTextAreaSensitiveMode:P}},Qa=At({toasts:[],setSyncedToasts:()=>{},syncedToastsRef:{current:[]}}),Ma=()=>rt(Qa),vc=({children:e})=>{const[t,n,r]=Je([]);return C(Qa.Provider,{value:{toasts:t,setSyncedToasts:n,syncedToastsRef:r},children:e})},rn=()=>{const{settings:e}=ae(),{toasts:t,setSyncedToasts:n,syncedToastsRef:r}=Ma(),{dispatchRcbEvent:o}=lt(),i=q(async(a,l)=>{var c,u,d,f;let h=null;if(r.current.length>=(((c=e.toast)==null?void 0:c.maxCount)??3)){if((u=e.toast)!=null&&u.forbidOnMax)return null;h=or();let p={id:h,content:a,timeout:l};if((d=e.event)!=null&&d.rcbShowToast){const v=await o(z.SHOW_TOAST,{toast:p});if(v.defaultPrevented)return null;p=v.data.toast}return n(v=>[...v.slice(1),p]),h}h=or();let m={id:h,content:a,timeout:l};if((f=e.event)!=null&&f.rcbShowToast){const p=await o(z.SHOW_TOAST,{toast:m});if(p.defaultPrevented)return null;m=p.data.toast}return n(p=>[...p,m]),h},[e,o]),A=q(async a=>{var l;const c=r.current.find(u=>u.id===a);return!c||(l=e.event)!=null&&l.rcbDismissToast&&(await o(z.DISMISS_TOAST,{toast:c})).defaultPrevented?null:(n(u=>u.filter(d=>d.id!==a)),a)},[o]),s=q(a=>{const l=typeof a=="function"?a(r.current):a;n(l)},[r]);return{showToast:i,dismissToast:A,toasts:t,replaceToasts:s}},lr=()=>{var e,t,n,r,o;const{settings:i}=ae(),{paths:A,setSyncedPaths:s,syncedPathsRef:a}=xn(),{flowRef:l,streamMessageMap:c,paramsInputRef:u,keepVoiceOnRef:d,timeoutIdRef:f}=Te(),{setSyncedIsBotTyping:h,setSyncedTextAreaDisabled:m,setSyncedTextAreaSensitiveMode:p,blockAllowsAttachment:v,setBlockAllowsAttachment:y}=Oe(),{dispatchRcbEvent:g}=lt(),{endStreamMessage:_,injectMessage:P,removeMessage:E,simulateStreamMessage:k,streamMessage:B}=qt(),{showToast:T,dismissToast:D}=rn(),{toggleChatWindow:O}=Ze(),{updateTextAreaFocus:S,setTextAreaValue:N}=Wt(),{syncVoice:R}=fo(),L=q(async b=>{var F;if((F=i.event)!=null&&F.rcbPostProcessBlock){const J=await g(z.POST_PROCESS_BLOCK,{block:b});if(J.defaultPrevented)return null;b=J.data.block}return b},[(e=i.event)==null?void 0:e.rcbPostProcessBlock,g]),U=q(async(b,F)=>{var J,K,oe,ve;if(!b)return;let ue=l.current[b];if(!ue)return void h(!1);if((J=i.event)!=null&&J.rcbPreProcessBlock){const Me=await g(z.PRE_PROCESS_BLOCK,{block:ue});if(Me.defaultPrevented)return;ue=Me.data.block}h(!0),(K=i.chatInput)!=null&&K.blockSpam&&m(!0),p(!1);const Ve={prevPath:F,currPath:b,goToPath:w,setTextAreaValue:N,userInput:u.current,endStreamMessage:_,injectMessage:P,removeMessage:E,simulateStreamMessage:k,streamMessage:B,toggleChatWindow:O,showToast:T,dismissToast:D};await(async(Me,Re,st,j,W,he,se)=>{if(!Me)throw new Error("Block is not valid.");for(const Ce of Object.keys(Me))switch(Ce){case"message":await nc(Me,Re,st);break;case"options":await oc(Me,Re);break;case"checkboxes":await ec(Me,Re);break;case"component":await ic(Me,Re);break;case"chatDisabled":await sc(Me,Re,W);break;case"isSensitive":await ka(Me,Re,he);break;case"transition":await ac(Me,Re,j,se)}})(ue,Ve,((oe=i.botBubble)==null?void 0:oe.simulateStream)??!1,f,m,p,L),h(!1),"chatDisabled"in ue||m((ve=i.chatInput)==null?void 0:ve.disabled),"isSensitive"in ue||p(!1),y(typeof ue.file=="function"),S(b),R(d.current&&!ue.chatDisabled),b!==F&&c.current.clear()},[l,S,R,(t=i.botBubble)==null?void 0:t.simulateStream,(n=i.chatInput)==null?void 0:n.disabled,u,_,P,E,k,B,O,T,D,d,c]),x=q(()=>a.current.length>0?a.current.at(-1)??null:null,[]),Q=q(()=>a.current.length>1?a.current.at(-2)??null:null,[]),w=q(async b=>{var F;const J=x(),K=Q();return((F=i.event)==null||!F.rcbChangePath||!(await g(z.CHANGE_PATH,{currPath:J,prevPath:K,nextPath:b})).defaultPrevented)&&(s(oe=>[...oe,b]),await U(b,J),!0)},[(r=i.chatInput)==null?void 0:r.blockSpam,(o=i.event)==null?void 0:o.rcbChangePath,U,g]),V=q(b=>{const F=typeof b=="function"?b(a.current):b;s(F)},[a]);return{getCurrPath:x,getPrevPath:Q,goToPath:w,blockAllowsAttachment:v,setBlockAllowsAttachment:y,paths:A,replacePaths:V,firePostProcessBlockEvent:L}},on=()=>{var e,t,n,r;const{settings:o}=ae(),{endStreamMessage:i,injectMessage:A,removeMessage:s,simulateStreamMessage:a,streamMessage:l}=qt(),{syncedPathsRef:c}=xn(),{getCurrPath:u,getPrevPath:d,goToPath:f,firePostProcessBlockEvent:h}=lr(),{setSyncedTextAreaSensitiveMode:m,setSyncedTextAreaDisabled:p,setSyncedIsBotTyping:v,setBlockAllowsAttachment:y,setInputLength:g,syncedVoiceToggledOnRef:_,syncedTextAreaSensitiveModeRef:P}=Oe(),{flowRef:E,inputRef:k,keepVoiceOnRef:B,paramsInputRef:T,timeoutIdRef:D}=Te(),{showToast:O,dismissToast:S}=rn(),{dispatchRcbEvent:N}=lt(),{syncVoice:R}=fo(),{setTextAreaValue:L}=Wt(),{toggleChatWindow:U}=Ze(),x=q(async w=>{var V,b,F,J,K,oe;const ve=u();if(ve&&E.current[ve]){if(P.current){if((V=o==null?void 0:o.sensitiveInput)!=null&&V.hideInUserBubble)return;if((b=o==null?void 0:o.sensitiveInput)!=null&&b.maskInUserBubble)return void((F=o.userBubble)!=null&&F.simulateStream?await a("*".repeat(((J=o.sensitiveInput)==null?void 0:J.asterisksCount)??10),"USER"):await A("*".repeat(((K=o.sensitiveInput)==null?void 0:K.asterisksCount)??10),"USER"))}(oe=o.userBubble)!=null&&oe.simulateStream?await a(w,"USER"):await A(w,"USER")}},[E,u,o,A,a,P]),Q=q(async(w,V=!0)=>{var b,F;if((w=w.trim())==="")return;V&&await x(w),D.current&&clearTimeout(D.current),k.current&&(L(""),g(0));const J=u();if(!J)return;let K=E.current[J];const oe=await h(K);oe&&((b=o.chatInput)!=null&&b.blockSpam&&p(!0),B.current=_.current,R(!1),setTimeout(()=>{v(!0)},400),m(!1),setTimeout(async()=>{var ve;const ue={prevPath:d(),currPath:u(),goToPath:f,setTextAreaValue:L,userInput:T.current,injectMessage:A,simulateStreamMessage:a,streamMessage:l,removeMessage:s,endStreamMessage:i,toggleChatWindow:U,showToast:O,dismissToast:S},Ve=c.current.length;await Sa(oe,ue),c.current.length===Ve&&(p("chatDisabled"in K?!!K.chatDisabled:!((ve=o.chatInput)==null||!ve.disabled)),ka(K,ue,m),y(typeof K.file=="function"),R(B.current),v(!1))},(F=o.chatInput)==null?void 0:F.botDelay))},[D,(e=o.chatInput)==null?void 0:e.blockSpam,(t=o.chatInput)==null?void 0:t.botDelay,(n=o.chatInput)==null?void 0:n.disabled,B,_,R,x,d,u,f,A,a,l,s,i,U,O,S,E]);return{handleSubmitText:q(async(w,V=!0)=>{var b,F;w=w??((b=k.current)==null?void 0:b.value),!((F=o.event)!=null&&F.rcbUserSubmitText&&(await N(z.USER_SUBMIT_TEXT,{inputText:w,sendInChat:V})).defaultPrevented||!u())&&Q(w,V)},[N,u,Q,k,(r=o.event)==null?void 0:r.rcbUserSubmitText])}},cr=()=>{var e;const{settings:t}=ae();return Ie(()=>{var n;if(typeof window>"u"||!window.navigator)return!1;if((n=t.device)==null||!n.applyMobileOptimizations)return!0;const r=navigator.userAgent,o=!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(r),i=window.innerWidth>=768;return o&&i},[(e=t.device)==null?void 0:e.applyMobileOptimizations])},wc=({buttons:e})=>{var t,n,r,o,i,A,s,a,l,c,u;const d=cr(),{settings:f}=ae(),{styles:h}=ye(),{textAreaDisabled:m,textAreaSensitiveMode:p,inputLength:v,hasFlowStarted:y,setHasFlowStarted:g,setInputLength:_}=Oe(),{inputRef:P}=Te(),[E,k]=ee(!1),[B,T]=ee(!1),{handleSubmitText:D}=on(),{setTextAreaValue:O}=Wt(),S={boxSizing:d?"content-box":"border-box",...h.chatInputAreaStyle},N={outline:m?"":"none",boxShadow:m?"":`0 0 5px ${(t=f.general)==null?void 0:t.primaryColor}`,boxSizing:d?"content-box":"border-box",...h.chatInputAreaStyle,...h.chatInputAreaFocusedStyle},R={cursor:`url("${(n=f.general)==null?void 0:n.actionDisabledIcon}"), auto`,caretColor:"transparent",boxSizing:d?"content-box":"border-box",...h.chatInputAreaStyle,...h.chatInputAreaDisabledStyle},L={color:"#989898",...h.characterLimitStyle},U={color:"#ff0000",...h.characterLimitReachedStyle},x=m?(r=f.chatInput)==null?void 0:r.disabledPlaceholderText:(o=f.chatInput)==null?void 0:o.enabledPlaceholderText,Q=()=>{m||k(!0)},w=()=>{k(!1)},V=()=>{T(!0)},b=()=>{T(!1)},F=async K=>{var oe;if(!B&&K.key==="Enter"){if(K.shiftKey)return void((oe=f.chatInput)!=null&&oe.allowNewline||K.preventDefault());K.preventDefault(),await D()}},J=K=>{P.current&&(O(K.target.value),_(P.current.value.length))};return C("div",{"aria-label":((i=f.ariaLabel)==null?void 0:i.inputTextArea)??"input text area",role:"textbox",onMouseDown:K=>{var oe;K.stopPropagation(),!y&&((oe=f.general)==null?void 0:oe.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&g(!0)},style:{...h.chatInputContainerStyle},className:"rcb-chat-input",children:[p&&(A=f.sensitiveInput)!=null&&A.maskInTextArea?C("input",{ref:P,type:"password",className:"rcb-chat-input-textarea",style:m?R:E?N:S,placeholder:x,onChange:J,onKeyDown:F,onFocus:Q,onBlur:w,onCompositionStart:V,onCompositionEnd:b}):C("textarea",{ref:P,style:m?R:E?N:S,rows:1,className:"rcb-chat-input-textarea",placeholder:x,onChange:J,onKeyDown:F,onFocus:Q,onBlur:w,onCompositionStart:V,onCompositionEnd:b}),C(ce,{children:[e==null?void 0:e.map((K,oe)=>C(ce,{children:K},oe)),((s=f.chatInput)==null?void 0:s.showCharacterCount)&&((a=f.chatInput)==null?void 0:a.characterLimit)!=null&&((l=f.chatInput)==null?void 0:l.characterLimit)>0&&C("div",{className:"rcb-chat-input-char-counter",style:v>=((c=f.chatInput)==null?void 0:c.characterLimit)?U:L,children:[v,"/",(u=f.chatInput)==null?void 0:u.characterLimit]})]})]})},bc=({buttons:e})=>{var t;const{settings:n}=ae(),{styles:r}=ye();return C("div",{"data-testid":"chatbot-footer-container",style:{...r.footerStyle},className:"rcb-chat-footer-container",children:[C("div",{className:"rcb-chat-footer",children:e==null?void 0:e.map((o,i)=>C(ce,{children:o},i))}),C("span",{children:(t=n.footer)==null?void 0:t.text})]})},_c=()=>{var e,t,n,r,o,i,A;const{settings:s}=ae(),{styles:a}=ye(),{unreadCount:l}=Oe(),{isChatWindowOpen:c,toggleChatWindow:u}=Ze(),[d,f]=ee(!1),h={backgroundImage:`linear-gradient(to right, ${(e=s.general)==null?void 0:e.secondaryColor},
3
- ${(t=s.general)==null?void 0:t.primaryColor})`,...a.chatButtonStyle},m={transform:"scale(1.05)",...h,...a.chatButtonHoveredStyle},p={backgroundImage:`url(${(n=s.chatButton)==null?void 0:n.icon})`,fill:"#fff",width:75,height:75,...a.chatIconStyle};return C(ce,{children:!((r=s.general)!=null&&r.embedded)&&C("div",{"aria-label":((o=s.ariaLabel)==null?void 0:o.chatButton)??"open chat",role:"button",style:d?m:h,className:"rcb-toggle-button "+(c?"rcb-button-hide":"rcb-button-show"),onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onClick:()=>u(!0),children:[(()=>{var v;const y=(v=s.chatButton)==null?void 0:v.icon;return y&&typeof y!="string"?y&&C("span",{className:"rcb-toggle-icon",children:C(y,{style:p})}):C("span",{className:"rcb-toggle-icon",style:p})})(),!((i=s.notification)!=null&&i.disabled)&&((A=s.notification)==null?void 0:A.showCount)&&C("span",{style:{...a.notificationBadgeStyle},className:"rcb-badge",children:l})]})})},Ec=()=>{var e,t,n,r,o,i;const A=cr(),{settings:s}=ae(),{styles:a}=ye(),{chatBodyRef:l}=Te(),{isChatWindowOpen:c,toggleChatWindow:u}=Ze(),[d,f]=ee(!1),[h,m]=ee(!1),[p,v]=ee(0);X(()=>{var _,P,E;const k=(_=s.tooltip)==null?void 0:_.mode;if(k==="ALWAYS")if(A){let B;B=c?(((P=l.current)==null?void 0:P.offsetWidth)??375)-(typeof((E=a.chatButtonStyle)==null?void 0:E.width)=="number"?a.chatButtonStyle.width:75):0,v(B),f(!0)}else f(!c);else k==="NEVER"?f(!1):k==="START"?h?f(!1):(m(!0),f(!0)):k==="CLOSE"&&f(!c)},[c,A,h,(e=a.chatButtonStyle)==null?void 0:e.width,(t=s.tooltip)==null?void 0:t.mode]);const y={transform:`translateX(-${p}px)`,right:(((n=a.chatButtonStyle)==null?void 0:n.width)??75)+40,bottom:30,backgroundColor:(r=s.general)==null?void 0:r.secondaryColor,color:"#fff",...a.tooltipStyle},g={borderColor:`transparent transparent transparent ${y.backgroundColor}`};return C(ce,{children:!((o=s.general)!=null&&o.embedded)&&C("div",{"data-testid":"chat-tooltip",style:y,className:"rcb-chat-tooltip "+(d?"rcb-tooltip-show":"rcb-tooltip-hide"),onClick:()=>u(!0),children:[C("span",{children:(i=s.tooltip)==null?void 0:i.text}),C("span",{className:"rcb-chat-tooltip-tail",style:g})]})})},Pc=({id:e,content:t,timeout:n})=>{var r,o;const{settings:i}=ae(),{styles:A}=ye(),[s]=ee({toastPromptStyle:{...A.toastPromptStyle},toastPromptHoveredStyle:{...A.toastPromptHoveredStyle}}),{dismissToast:a}=rn(),[l,c]=ee(!1),u={color:(r=i.general)==null?void 0:r.primaryColor,borderColor:(o=i.general)==null?void 0:o.primaryColor,...s.toastPromptHoveredStyle};return X(()=>{if(n){const d=setTimeout(()=>{a(e)},n);return()=>clearTimeout(d)}},[e,a,n]),typeof t=="string"?C("div",{onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},style:l?u:s.toastPromptStyle,onMouseDown:async d=>{var f;(f=i.toast)!=null&&f.dismissOnClick&&(d.preventDefault(),await a(e))},className:"rcb-toast-prompt",children:t}):C(ce,{children:t})},Cc=()=>{var e,t,n,r,o,i,A,s,a,l,c,u;const{styles:d}=ye(),{toasts:f}=Ma(),h={bottom:`calc(${typeof((e=d.footerStyle)==null?void 0:e.height)=="number"?`${(t=d.footerStyle)==null?void 0:t.height}px`:((n=d.footerStyle)==null?void 0:n.height)??"50px"} + ${typeof((r=d.chatInputContainerStyle)==null?void 0:r.height)=="number"?`${(o=d.chatInputContainerStyle)==null?void 0:o.height}px`:((i=d.chatInputContainerStyle)==null?void 0:i.height)??"70px"} + 20px)`,width:300,minWidth:`calc(${typeof((A=d.chatWindowStyle)==null?void 0:A.width)=="number"?`${(s=d.chatWindowStyle)==null?void 0:s.width}px`:((a=d.chatWindowStyle)==null?void 0:a.width)??"375px"} / 2)`,maxWidth:`calc(${typeof((l=d.chatWindowStyle)==null?void 0:l.width)=="number"?`${(c=d.chatWindowStyle)==null?void 0:c.width}px`:((u=d.chatWindowStyle)==null?void 0:u.width)??"375px"} - 50px)`,...d.toastPromptContainerStyle};return C("div",{className:"rcb-toast-prompt-container",style:h,children:f.map(m=>C(Pc,{id:m.id,content:m.content,timeout:m.timeout},m.id))})},Oa=({file:e,fileType:t,fileUrl:n})=>{var r,o,i;const{settings:A}=ae(),{styles:s}=ye(),a={backgroundColor:(r=A.general)==null?void 0:r.primaryColor,maxWidth:(o=A.userBubble)!=null&&o.showAvatar?"65%":"70%",...s.mediaDisplayContainerStyle};return C(ce,{children:n?C(ce,{children:[t==="image"&&n&&C("div",{style:a,className:"rcb-media-display-image-container rcb-media-entry","data-testid":"media-display-image-container",children:C("img",{src:n,alt:"Image Display",className:"rcb-media-display-image"})}),t==="video"&&n&&C("div",{style:a,className:"rcb-media-display-video-container rcb-media-entry","data-testid":"media-display-video-container",children:C("video",{controls:!0,className:"rcb-media-display-video",children:[C("source",{src:n,type:e.type}),"Your browser does not support the video tag."]})}),t==="audio"&&n&&C("audio",{"data-testid":"media-display-audio-container",style:{maxWidth:(i=A.userBubble)!=null&&i.showAvatar?"65%":"70%"},controls:!0,className:"rcb-media-display-audio rcb-media-entry",children:[C("source",{src:n,type:e.type}),"Your browser does not support the audio tag."]})]}):C(ce,{})})},Na=async e=>{if(!e)return{fileType:null,fileUrl:null};const t=e.type.split("/")[0];if(!["image","video","audio"].includes(t))return{fileType:null,fileUrl:null};try{return{fileType:t,fileUrl:await new Promise((n,r)=>{const o=new FileReader;o.onload=()=>n(o.result),o.onerror=()=>r(new Error("File reading failed")),o.readAsDataURL(e)})}}catch(n){return console.error(n),{fileType:null,fileUrl:null}}},kc=()=>{var e,t,n,r,o,i;const{settings:A}=ae(),{styles:s}=ye(),{injectMessage:a,simulateStreamMessage:l,streamMessage:c,removeMessage:u,endStreamMessage:d}=qt(),{getCurrPath:f,getPrevPath:h,goToPath:m,blockAllowsAttachment:p}=lr(),{flowRef:v,inputRef:y}=Te(),g=v.current,{showToast:_,dismissToast:P}=rn(),{dispatchRcbEvent:E}=lt(),{toggleChatWindow:k}=Ze(),{setTextAreaValue:B}=Wt(),{handleSubmitText:T}=on(),D={cursor:`url("${(e=A.general)==null?void 0:e.actionDisabledIcon}"), auto`,...s.fileAttachmentButtonStyle,...s.fileAttachmentButtonDisabledStyle},O={backgroundImage:`url(${(t=A.fileAttachment)==null?void 0:t.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle},S={backgroundImage:`url(${(n=A.fileAttachment)==null?void 0:n.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle,...s.fileAttachmentIconDisabledStyle};return C("label",{"aria-label":((r=A.ariaLabel)==null?void 0:r.fileAttachmentButton)??"upload file",role:"button",className:p?"rcb-attach-button-enabled":"rcb-attach-button-disabled",style:p?{...s.fileAttachmentButtonStyle}:D,children:[C("input",{className:"rcb-attach-input",role:"file",type:"file",onChange:async N=>{var R,L,U,x;const Q=N.target.files;if(!Q)return;const w=Array.from(Q);if(N.target.value="",(R=A.event)!=null&&R.rcbUserUploadFile&&(await E(z.USER_UPLOAD_FILE,{files:w})).defaultPrevented)return;const V=f();if(!V)return;const b=g[V];if(!b)return;const F=b.file;if(F!=null){const J=[];for(let K=0;K<w.length;K++){if(J.push(w[K].name),(L=A.fileAttachment)==null||!L.showMediaDisplay)continue;const oe=await Na(w[K]);!oe.fileType||!oe.fileUrl||await a(C(Oa,{file:w[K],fileType:oe.fileType,fileUrl:oe.fileUrl}),"USER")}await T("๐Ÿ“„ "+J.join(", "),(U=A.fileAttachment)==null?void 0:U.sendFileName),await F({userInput:(x=y.current)==null?void 0:x.value,prevPath:h(),currPath:f(),goToPath:m,setTextAreaValue:B,injectMessage:a,simulateStreamMessage:l,streamMessage:c,removeMessage:u,endStreamMessage:d,toggleChatWindow:k,showToast:_,dismissToast:P,files:w})}},multiple:(o=A.fileAttachment)==null?void 0:o.multiple,accept:(i=A.fileAttachment)==null?void 0:i.accept,disabled:!p}),(()=>{var N,R;const L=p?(N=A.fileAttachment)==null?void 0:N.icon:(R=A.fileAttachment)==null?void 0:R.iconDisabled;return L&&typeof L!="string"?L&&C("span",{className:p?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",children:C(L,{style:p?O:S})}):C("span",{className:p?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",style:p?O:S})})()]})},Sc=()=>{var e,t,n,r,o,i;const{settings:A}=ae(),{styles:s}=ye(),{syncedTextAreaDisabledRef:a}=Oe(),{inputRef:l}=Te(),{textAreaDisabled:c,setTextAreaValue:u}=Wt(),d=ne(null),f=ne(null),[h,m]=ee(!1),p={cursor:`url("${(e=A.general)==null?void 0:e.actionDisabledIcon}"), auto`,...s.emojiButtonStyle,...s.emojiButtonDisabledStyle},v={backgroundImage:`url(${(t=A.emoji)==null?void 0:t.icon})`,fill:"#a6a6a6",...s.emojiIconStyle},y={backgroundImage:`url(${(n=A.emoji)==null?void 0:n.icon})`,fill:"#a6a6a6",...s.emojiIconStyle,...s.emojiIconDisabledStyle};return X(()=>{const g=P=>{const E=P.composedPath();d.current&&!E.includes(d.current)&&f.current&&!E.includes(f.current)&&m(!1)},_=()=>{(()=>{if(d.current&&f.current){const P=f.current.getBoundingClientRect(),E=d.current.offsetHeight,k=P.top-E-8;d.current.style.left=`${P.left}px`,d.current.style.top=`${k}px`}})()};return document.addEventListener("mousedown",g),window.addEventListener("resize",_),()=>{document.removeEventListener("mousedown",g),window.removeEventListener("resize",_)}},[]),C(ce,{children:[C("div",{"aria-label":((r=A.ariaLabel)==null?void 0:r.emojiButton)??"emoji picker",role:"button",ref:f,className:c?"rcb-emoji-button-disabled":"rcb-emoji-button-enabled",style:c?p:{...s.emojiButtonStyle},onMouseDown:g=>{g.preventDefault(),a.current?m(!1):m(_=>!_)},children:(()=>{var g,_;const P=c?(g=A.emoji)==null?void 0:g.iconDisabled:(_=A.emoji)==null?void 0:_.icon;return P&&typeof P!="string"?P&&C("span",{className:c?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",children:C(P,{style:c?y:v})}):C("span",{className:c?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",style:c?y:v})})()}),h&&C("div",{className:"rcb-emoji-button-popup",ref:d,children:(i=(o=A.emoji)==null?void 0:o.list)==null?void 0:i.map((g,_)=>C("span",{className:"rcb-emoji",onMouseDown:P=>((E,k)=>{E.preventDefault(),l.current&&(u(l.current.value+k),setTimeout(()=>{const B=l.current;if(B){B.focus();const T=B.value.length;B.setSelectionRange(T,T)}},50)),m(!1)})(P,g),children:g},_))})]})},Dc=()=>{var e,t,n;const{settings:r}=ae(),{styles:o}=ye(),{audioToggledOn:i,toggleAudio:A}=Ta(),s={backgroundImage:`url(${(e=r.audio)==null?void 0:e.icon})`,fill:"#fcec3d",...o.audioIconStyle},a={backgroundImage:`url(${(t=r.audio)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.audioIconStyle,...o.audioIconDisabledStyle};return C("div",{"aria-label":((n=r.ariaLabel)==null?void 0:n.audioButton)??"toggle audio",role:"button",onMouseDown:async l=>{l.preventDefault(),await A()},style:i?{...o.audioButtonStyle}:{...o.audioButtonStyle,...o.audioButtonDisabledStyle},children:(()=>{var l,c;const u=i?(l=r.audio)==null?void 0:l.icon:(c=r.audio)==null?void 0:c.iconDisabled;return u&&typeof u!="string"?u&&C("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",children:C(u,{style:i?s:a,"data-testid":"rcb-audio-icon-svg"})}):C("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",style:i?s:a})})()})},Bc=()=>{var e,t;const{settings:n}=ae(),{styles:r}=ye(),{toggleChatWindow:o}=Ze(),i={backgroundImage:`url(${(e=n.header)==null?void 0:e.closeChatIcon})`,fill:"#e8eaed",stroke:"#e8eaed",...r.closeChatIconStyle};return C("div",{"aria-label":((t=n.ariaLabel)==null?void 0:t.closeChatButton)??"close chat",role:"button",onMouseDown:A=>{A.stopPropagation(),o(!1)},style:{...r.closeChatButtonStyle},children:(()=>{var A;const s=(A=n.header)==null?void 0:A.closeChatIcon;return s&&typeof s!="string"?s&&C("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",children:C(s,{style:i})}):C("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",style:i})})()})},xc=()=>{var e,t,n;const{settings:r}=ae(),{styles:o}=ye(),{notificationsToggledOn:i,toggleNotifications:A}=(()=>{const{notificationsToggledOn:l,toggleNotifications:c,playNotificationSound:u}=so();return{notificationsToggledOn:l,toggleNotifications:c,playNotificationSound:u}})(),s={backgroundImage:`url(${(e=r.notification)==null?void 0:e.icon})`,fill:"#fcec3d",...o.notificationIconStyle},a={backgroundImage:`url(${(t=r.notification)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.notificationIconStyle,...o.notificationIconDisabledStyle};return C("div",{"aria-label":((n=r.ariaLabel)==null?void 0:n.notificationButton)??"toggle notifications",role:"button",onMouseDown:async l=>{l.preventDefault(),await A()},style:i?{...o.notificationButtonStyle}:{...o.notificationButtonStyle,...o.notificationButtonDisabledStyle},children:(()=>{var l,c;const u=i?(l=r.notification)==null?void 0:l.icon:(c=r.notification)==null?void 0:c.iconDisabled;return u&&typeof u!="string"?u&&C("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",children:C(u,{style:i?s:a,"data-testid":"rcb-notification-icon-svg"})}):C("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",style:i?s:a})})()})},Ic=()=>{var e,t,n;const{settings:r}=ae(),{styles:o}=ye(),{injectMessage:i}=qt(),{inputRef:A}=Te(),{voiceToggledOn:s,toggleVoice:a}=fo(),{setInputLength:l,setTextAreaValue:c,textAreaDisabled:u}=Wt(),{handleSubmitText:d}=on(),f=ne([]),[h,m]=ee(!1);X(()=>{var _;(_=r.voice)!=null&&_.sendAsAudio?(g(),f.current=[]):d()},[h]),X(()=>{s?((_,P,E,k,B,T,D)=>{var O;(O=_.voice)!=null&&O.sendAsAudio?yc(E,T):mc(_,P,E,k,B,D)})(r,a,y,c,l,f,A):co()},[s]);const p={backgroundImage:`url(${(e=r.voice)==null?void 0:e.icon})`,fill:"#9aa0a6",...o.voiceIconStyle},v={backgroundImage:`url(${(t=r.voice)==null?void 0:t.iconDisabled})`,fill:"#9aa0a6",...o.voiceIconStyle,...o.voiceIconDisabledStyle},y=()=>{m(_=>!_)},g=async()=>{const _=new Blob(f.current,{type:"audio/wav"}),P=new File([_],"voice-input.wav",{type:"audio/wav"}),E=await Na(P);!E.fileType||!E.fileUrl||await i(C(Oa,{file:P,fileType:E.fileType,fileUrl:E.fileUrl}),"USER")};return C("div",{"aria-label":((n=r.ariaLabel)==null?void 0:n.voiceButton)??"toggle voice",role:"button",onMouseDown:async _=>{_.preventDefault(),!u&&await a()},style:s&&!u?{...o.voiceButtonStyle}:{...o.voiceButtonStyle,...o.voiceButtonDisabledStyle},className:s&&!u?"rcb-voice-button-enabled":"rcb-voice-button-disabled",children:(()=>{var _,P;const E=s?(_=r.voice)==null?void 0:_.icon:(P=r.voice)==null?void 0:P.iconDisabled;return E&&typeof E!="string"?E&&C("span",{className:"rcb-voice-icon "+(s&&!u?"on":""),children:C(E,{style:s&&!u?p:v})}):C("span",{className:"rcb-voice-icon"+(s&&!u?"-on":""),"data-testid":"rcb-voice-icon",style:s&&!u?p:v})})()})},Tc=()=>{var e,t,n,r,o,i,A,s;const{settings:a}=ae(),{styles:l}=ye(),{textAreaDisabled:c}=Oe(),[u,d]=ee(!1),{handleSubmitText:f}=on(),h={backgroundColor:(e=a.general)==null?void 0:e.primaryColor,...l.sendButtonStyle},m={cursor:`url("${(t=a.general)==null?void 0:t.actionDisabledIcon}"), auto`,backgroundColor:(n=a.general)==null?void 0:n.primaryColor,...l.sendButtonStyle,...l.sendButtonDisabledStyle},p={backgroundColor:(r=a.general)==null?void 0:r.secondaryColor,...l.sendButtonStyle,...l.sendButtonHoveredStyle},v={backgroundImage:`url(${(o=a.chatInput)==null?void 0:o.sendButtonIcon})`,fill:"#fff",...l.sendIconStyle},y={backgroundImage:`url(${(i=a.chatInput)==null?void 0:i.sendButtonIcon})`,fill:"#fff",...l.sendIconStyle,...l.sendIconDisabledStyle},g={backgroundImage:`url(${(A=a.chatInput)==null?void 0:A.sendButtonIcon})`,fill:"#fff",...l.sendIconStyle,...l.sendIconHoveredStyle};return C("div",{"aria-label":((s=a.ariaLabel)==null?void 0:s.sendButton)??"send message",role:"button",onMouseEnter:()=>{d(!0)},onMouseLeave:()=>{d(!1)},onMouseDown:async _=>{_==null||_.preventDefault(),!c&&await f()},style:c?m:u?p:h,className:"rcb-send-button",children:(()=>{var _;const P=(_=a.chatInput)==null?void 0:_.sendButtonIcon;return P&&typeof P!="string"?P&&C("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",children:C(P,{style:c?y:u?g:v})}):C("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",style:c?y:u?g:v})})()})},Qc=(e,t)=>{var n,r,o,i,A,s,a,l,c;const u={[De.AUDIO_BUTTON]:(n=e.audio)==null?void 0:n.disabled,[De.CLOSE_CHAT_BUTTON]:(r=e.general)==null?void 0:r.embedded,[De.EMOJI_PICKER_BUTTON]:(o=e.emoji)==null?void 0:o.disabled,[De.FILE_ATTACHMENT_BUTTON]:(i=e.fileAttachment)==null?void 0:i.disabled,[De.NOTIFICATION_BUTTON]:(A=e.notification)==null?void 0:A.disabled,[De.SEND_MESSAGE_BUTTON]:!1,[De.VOICE_MESSAGE_BUTTON]:(s=e.voice)==null?void 0:s.disabled},d={},f=h=>h?h.map(m=>{if(typeof m=="string"){if((p=>Object.values(De).includes(p))(m)&&!u[m]){if(d[m])return d[m];const p=t[m];if(typeof p=="function"){const v=p();return d[m]=v,v}return null}return null}return m}).filter(m=>m!==null):[];return{header:f((a=e.header)==null?void 0:a.buttons),chatInput:f((l=e.chatInput)==null?void 0:l.buttons),footer:f((c=e.footer)==null?void 0:c.buttons)}},Mc=()=>{const{settings:e}=ae(),t=Ie(()=>({[De.CLOSE_CHAT_BUTTON]:()=>C(Bc,{}),[De.AUDIO_BUTTON]:()=>C(Dc,{}),[De.NOTIFICATION_BUTTON]:()=>C(xc,{}),[De.EMOJI_PICKER_BUTTON]:()=>C(Sc,{}),[De.FILE_ATTACHMENT_BUTTON]:()=>C(kc,{}),[De.SEND_MESSAGE_BUTTON]:()=>C(Tc,{}),[De.VOICE_MESSAGE_BUTTON]:()=>C(Ic,{})}),[]),{header:n,chatInput:r,footer:o}=Ie(()=>Qc(e,t),[e,t]);return{headerButtons:Ie(()=>n,[n]),chatInputButtons:Ie(()=>r,[r]),footerButtons:Ie(()=>o,[o])}},po=()=>{const{settings:e}=ae(),{styles:t}=ye(),{setSyncedMessages:n,syncedMessagesRef:r}=oo(),{isLoadingChatHistory:o,setIsLoadingChatHistory:i,hasChatHistoryLoaded:A,setHasChatHistoryLoaded:s}=Oe(),{chatBodyRef:a}=Te(),{dispatchRcbEvent:l}=lt(),c=q(async()=>{var u,d;const f=In();if(!f||(u=e.event)!=null&&u.rcbLoadChatHistory&&(await l(z.LOAD_CHAT_HISTORY,{})).defaultPrevented)return;i(!0);const h=((d=a.current)==null?void 0:d.scrollHeight)??0;((m,p,v,y,g,_,P,E,k)=>{var B;if(Da=!0,v!=null)try{const T=Qt(C(lc,{}),"SYSTEM"),D=g.current.slice(1);y([T,...D]);const O=v.map(S=>{if(S.type==="object"){const N=Ia(S.content,m,p);return{...S,content:N}}return S});setTimeout(()=>{var S;const N=g.current.slice(1);let R=(S=m.chatHistory)!=null&&S.autoLoad?Qt(C(ce,{}),"SYSTEM"):Qt(C(Ac,{}),"SYSTEM");y([...O,R,...N]),k(!0)},500),setTimeout(()=>{if(!_.current)return;const{scrollHeight:S}=_.current,N=S-P;_.current.scrollTop+=N,E(!1)},510)}catch{Mt.removeItem((B=m.chatHistory)==null?void 0:B.storageKey)}})(e,t,f,n,r,a,h,i,s)},[e,t,l,r,a,i,s]);return{isLoadingChatHistory:o,setIsLoadingChatHistory:i,hasChatHistoryLoaded:A,showChatHistory:c}},Oc=()=>{var e,t,n;const{settings:r}=ae(),{styles:o}=ye(),{showChatHistory:i}=po(),[A,s]=ee(!1),a={color:(e=r.general)==null?void 0:e.primaryColor,borderColor:(t=r.general)==null?void 0:t.primaryColor,...o.chatHistoryButtonStyle,...o.chatHistoryButtonHoveredStyle};return C("div",{className:"rcb-view-history-container",children:C("div",{onMouseEnter:()=>{s(!0)},onMouseLeave:()=>{s(!1)},style:A?a:{...o.chatHistoryButtonStyle},onMouseDown:l=>{l.preventDefault(),i()},className:"rcb-view-history-button",role:"button",tabIndex:0,children:C("p",{children:(n=r.chatHistory)==null?void 0:n.viewChatHistoryButtonText})})})},Nc=()=>{var e,t,n,r;const o=cr(),{settings:i}=ae(),{replaceMessages:A}=qt(),{isBotTyping:s,isChatWindowOpen:a,setUnreadCount:l,setSyncedIsChatWindowOpen:c,setSyncedTextAreaDisabled:u,setSyncedAudioToggledOn:d,setSyncedVoiceToggledOn:f,setSyncedIsScrolling:h,syncedIsScrollingRef:m,syncedIsChatWindowOpenRef:p}=Oe(),{chatBodyRef:v}=Te(),{viewportHeight:y,setViewportHeight:g,setViewportWidth:_,scrollToBottom:P}=Ze(),{setUpNotifications:E}=so(),{handleFirstInteraction:k}=(()=>{var O;const{settings:S}=ae(),{hasInteractedPage:N,setHasInteractedPage:R,hasFlowStarted:L,setHasFlowStarted:U}=Oe(),x=q(()=>{var Q;if(R(!0),!L&&((Q=S.general)==null?void 0:Q.flowStartTrigger)==="ON_PAGE_INTERACT"&&U(!0),!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const w=new window.SpeechSynthesisUtterance;w.text="",w.onend=()=>{window.removeEventListener("click",x),window.removeEventListener("keydown",x),window.removeEventListener("touchstart",x)},window.speechSynthesis.speak(w)},[L,(O=S.general)==null?void 0:O.flowStartTrigger]);return{hasInteractedPage:N,handleFirstInteraction:x}})(),{showChatHistory:B}=po(),T=ne(0),D=ne(!1);X(()=>(window.addEventListener("click",k),window.addEventListener("keydown",k),window.addEventListener("touchstart",k),()=>{window.removeEventListener("click",k),window.removeEventListener("keydown",k),window.removeEventListener("touchstart",k)}),[]),X(()=>{const O=v.current;if(!O)return;const S=()=>{D.current||(D.current=!0,requestAnimationFrame(()=>{var N,R;if(!O)return;const{scrollTop:L,clientHeight:U,scrollHeight:x}=O,Q=L+U<x-(((N=i.chatWindow)==null?void 0:N.messagePromptOffset)??30);h(Q),m.current=Q,Q||(L+U>=x-1&&(O.scrollTop=x-U-1),(p.current||(R=i.general)!=null&&R.embedded)&&l(0)),D.current=!1}))};return O.addEventListener("wheel",S,{passive:!0}),O.addEventListener("touchmove",S,{passive:!0}),()=>{O.removeEventListener("wheel",S),O.removeEventListener("touchmove",S)}},[]),X(()=>{var O,S,N;u((O=i.chatInput)==null?void 0:O.disabled),c((S=i.chatWindow)==null?void 0:S.defaultOpen),d((N=i.audio)==null?void 0:N.defaultToggledOn),setTimeout(()=>{var R;f((R=i.voice)==null?void 0:R.defaultToggledOn)},1)},[]),X(()=>{var O;(O=i.notification)!=null&&O.disabled||E()},[(e=i.notification)==null?void 0:e.disabled]),X(()=>{!m.current&&v!=null&&v.current&&P()},[s]),X(()=>{var O,S;if((O=i.chatHistory)!=null&&O.disabled)Mt&&Mt.removeItem(ir);else if(ao(i),In().length>0){const N=Qt(C(Oc,{}),"SYSTEM");A([N]),(S=i.chatHistory)!=null&&S.autoLoad&&B()}},[(t=i.chatHistory)==null?void 0:t.storageKey,(n=i.chatHistory)==null?void 0:n.maxEntries,(r=i.chatHistory)==null?void 0:r.disabled]),X(()=>{var O;o||(O=i.general)!=null&&O.embedded||!navigator.virtualKeyboard||(navigator.virtualKeyboard.overlaysContent=!0,navigator.virtualKeyboard.addEventListener("geometrychange",S=>{if(!S.target)return;const{x:N,y:R,width:L,height:U}=S.target.boundingRect;N==0&&R==0&&L==0&&U==0?(setTimeout(()=>{var x;g((x=window.visualViewport)==null?void 0:x.height)},101),setTimeout(()=>{var x,Q;y!=((x=window.visualViewport)==null?void 0:x.height)&&g((Q=window.visualViewport)==null?void 0:Q.height)},1001)):setTimeout(()=>{var x;g(((x=window.visualViewport)==null?void 0:x.height)-U)},101)}))},[o]),X(()=>{var O,S,N,R;if(o)return;a&&(g((O=window.visualViewport)==null?void 0:O.height),_((S=window.visualViewport)==null?void 0:S.width));const L=()=>window.scrollTo({top:0,left:0,behavior:"auto"}),U=()=>T.current=window.scrollY,x=()=>{var w,V;g((w=window.visualViewport)==null?void 0:w.height),_((V=window.visualViewport)==null?void 0:V.width)},Q=()=>{var w;window.removeEventListener("scroll",L),window.removeEventListener("scroll",U),(w=window.visualViewport)==null||w.removeEventListener("resize",x)};return a?(Q(),document.body.style.position="fixed",window.addEventListener("scroll",L),(N=window.visualViewport)==null||N.addEventListener("resize",x)):(document.body.style.position="static",Q(),window.scrollTo({top:T.current,left:0,behavior:"auto"}),window.addEventListener("scroll",U),(R=window.visualViewport)==null||R.removeEventListener("resize",x)),Q},[a,o])},Lc="https://cdn.jsdelivr.net/gh/react-chatbotify/community-themes/themes",Rc="2592000",La="RCB_THEME_CACHE_DATA",Ra=async(e,t)=>{const{id:n,version:r,baseUrl:o=Lc,cacheDuration:i=Rc}=t,A=r||await(async(v,y)=>{const g=`${y}/${v}/meta.json`;try{const _=await fetch(g);return _.ok?(await _.json()).version:(console.error(`Failed to fetch meta.json from ${g}`),null)}catch(_){return console.error(`Failed to fetch meta.json from ${g}`,_),null}})(n,o);if(!A)return console.error(`Unable to find version for theme: ${n}`),{settings:{},inlineStyles:{},cssStylesText:""};const s=((v,y,g)=>{const _=localStorage.getItem(`${La}_${v}_${y}`);if(!_)return null;try{const P=JSON.parse(_),E=new Date().getTime(),k=Math.floor(E/1e3);return P.cacheDate+g>=k?P:null}catch(P){return console.error(`Unable to fetch cache for ${v}`,P),null}})(n,A,i);if(s){const v=Ha(e,s.cssStylesText);return{settings:s.settings,inlineStyles:s.inlineStyles,cssStylesText:v}}const a=`${o}/${n}/${A}/styles.css`,l=`${o}/${n}/${A}/settings.json`,c=`${o}/${n}/${A}/styles.json`;let u="";const d=await fetch(a);d.ok?u=await d.text():console.info(`Could not fetch styles.css from ${a}`);const f=await fetch(l);let h={};f.ok?h=await f.json():console.info(`Could not fetch settings.json from ${l}`);const m=await fetch(c);let p={};return m.ok?p=await m.json():console.info(`Could not fetch styles.json from ${c}`),((v,y,g,_,P)=>{const E=new Date().getTime(),k={settings:g,inlineStyles:_,cssStylesText:P,cacheDate:Math.floor(E/1e3)};localStorage.setItem(`${La}_${v}_${y}`,JSON.stringify(k))})(n,A,h,p,u),{settings:h,inlineStyles:p,cssStylesText:Ha(e,u)}},Ha=(e,t)=>t.split(new RegExp("(?<=})")).map(n=>{const r=n.trim();return r.startsWith("@import")||r.startsWith("@keyframes")||r.startsWith("@media")?r:r?`#${e} ${r}`:""}).join(`
4
- `),Hc=async(e,t,n,r)=>{var o,i;let A=ur(ya),s=ur(wa),a="";if(r!=null)if(Array.isArray(r))for(const l of r){const c=await Ra(e,l);A=gt(c.settings,A),s=gt(c.inlineStyles,s),a+=c.cssStylesText}else{const l=await Ra(e,r);A=gt(l.settings,A),s=gt(l.inlineStyles,s),a+=l.cssStylesText}return t!=null&&(A=gt(t,A)),n!=null&&(s=gt(n,s)),((o=A.chatInput)==null?void 0:o.botDelay)!=null&&((i=A.chatInput)==null?void 0:i.botDelay)<500&&(A.chatInput.botDelay=500),{settings:A,inlineStyles:s,cssStylesText:a}},gt=(e,t)=>{const n=[{source:e,target:t}];for(;n.length;){const r=n.pop();if(r==null)continue;const{source:o,target:i}=r;for(const A of Object.keys(o)){const s=A;if(zt(o[s]))i[s]=o[s];else if(typeof o[s]!="object"||o[s]===null||Array.isArray(o[s]))try{i[s]=o[s]}catch{}else(typeof i[s]!="object"||i[s]===null)&&(i[s]={}),n.push({source:o[s],target:i[s]})}}return t},ur=e=>{if(e===null||typeof e!="object")return e;const t=Array.isArray(e)?[]:{},n=[{source:e,target:t}],r=new WeakMap;for(r.set(e,t);n.length;){const o=n.pop();if(o==null)continue;const{source:i,target:A}=o;for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const a=i[s];if(a&&typeof a=="object")if(r.has(a))A[s]=r.get(a);else{const l=Array.isArray(a)?[]:{};r.set(a,l),A[s]=l,n.push({source:a,target:l})}else A[s]=a}}return t},Ua=()=>{const{settings:e,setSyncedSettings:t,syncedSettingsRef:n}=ae(),r=q(i=>{!i||Object.keys(i).length===0||t(ur(gt(i,e)))},[e]),o=q(i=>{const A=typeof i=="function"?i(n.current):i;t(A)},[n]);return{settings:e,replaceSettings:o,updateSettings:r}},Fa=()=>{const{styles:e,setSyncedStyles:t,syncedStylesRef:n}=ye(),r=q(i=>{!i||Object.keys(i).length===0||t(ur(gt(i,e)))},[e]),o=q(i=>{const A=typeof i=="function"?i(n.current):i;t(A)},[n]);return{styles:e,replaceStyles:o,updateStyles:r}},Uc=({plugins:e,slots:t})=>{var n,r;const o=cr(),{settings:i}=ae(),{styles:A}=ye(),{hasFlowStarted:s,setHasFlowStarted:a}=Oe(),{inputRef:l}=Te(),{viewportHeight:c,viewportWidth:u,isChatWindowOpen:d}=Ze(),{goToPath:f}=lr(),{headerButtons:h,chatInputButtons:m,footerButtons:p}=Mc();Nc(),(y=>{const{updateSettings:g}=Ua(),{updateStyles:_}=Fa(),P=y==null?void 0:y.map(E=>E());X(()=>{let E={},k={};P==null||P.forEach(B=>{B!=null&&B.settings&&Object.keys(B==null?void 0:B.settings).length!==0&&(E=gt(B.settings,E)),B!=null&&B.styles&&Object.keys(B==null?void 0:B.styles).length!==0&&(k=gt(B.styles,k))}),g(E),_(k)},[])})(e),X(()=>{var y;(s||((y=i.general)==null?void 0:y.flowStartTrigger)==="ON_LOAD")&&f("start")},[s,(n=i.general)==null?void 0:n.flowStartTrigger]);const v=Ie(()=>{var y;const g="rcb-chatbot-global ";return(y=i.general)!=null&&y.embedded?g+"rcb-window-embedded":d?g+"rcb-window-open":g+"rcb-window-close"},[i,d]);return C(ce,{children:(()=>{var y,g;return o&&((y=i.device)==null?void 0:y.desktopEnabled)||!o&&((g=i.device)==null?void 0:g.mobileEnabled)})()&&C("div",{onMouseDown:y=>{var g,_;!s&&((g=i.general)==null?void 0:g.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&a(!0),o?(_=l.current)==null||_.blur():y==null||y.preventDefault()},className:v,children:[C(Ec,{}),C(_c,{}),d&&!o&&!((r=i.general)!=null&&r.embedded)&&C(ce,{children:[C("style",{children:`
1
+ var AccessQABot=function(Tr){"use strict";var Zn,J,Xl,Xt,Jl,Zl,es,Lo,Mr,er,ts,No,Ro,Fo,ns,Or={},Qr=[],_d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,tr=Array.isArray;function Bt(e,t){for(var n in t)e[n]=t[n];return e}function Ho(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function he(e,t,n){var r,o,i,l={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?Zn.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)l[i]===void 0&&(l[i]=e.defaultProps[i]);return nr(e,l,r,o,null)}function nr(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Xl,__i:-1,__u:0};return o==null&&J.vnode!=null&&J.vnode(i),i}function rs(){return{current:null}}function ge(e){return e.children}function Tt(e,t){this.props=e,this.context=t}function Cn(e,t){if(t==null)return e.__?Cn(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Cn(e):null}function Sd(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],o=[],i=Bt({},t);i.__v=t.__v+1,J.vnode&&J.vnode(i),zo(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??Cn(t),!!(32&t.__u),o),i.__v=t.__v,i.__.__k[i.__i]=i,cs(r,i,o),t.__e=t.__=null,i.__e!=n&&os(i)}}function os(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),os(e)}function Uo(e){(!e.__d&&(e.__d=!0)&&Xt.push(e)&&!Lr.__r++||Jl!=J.debounceRendering)&&((Jl=J.debounceRendering)||Zl)(Lr)}function Lr(){try{for(var e,t=1;Xt.length;)Xt.length>t&&Xt.sort(es),e=Xt.shift(),t=Xt.length,Sd(e)}finally{Xt.length=Lr.__r=0}}function is(e,t,n,r,o,i,l,s,a,c,u){var A,d,f,p,v,h,w,b=r&&r.__k||Qr,g=t.length;for(a=Cd(n,t,b,a,g),A=0;A<g;A++)(f=n.__k[A])!=null&&(d=f.__i!=-1&&b[f.__i]||Or,f.__i=A,h=zo(e,f,d,o,i,l,s,a,c,u),p=f.__e,f.ref&&d.ref!=f.ref&&(d.ref&&qo(d.ref,null,f),u.push(f.ref,f.__c||p,f)),v==null&&p!=null&&(v=p),(w=!!(4&f.__u))||d.__k===f.__k?(a=ls(f,a,e,w),w&&d.__e&&(d.__e=null)):typeof f.type=="function"&&h!==void 0?a=h:p&&(a=p.nextSibling),f.__u&=-7);return n.__e=v,a}function Cd(e,t,n,r,o){var i,l,s,a,c,u=n.length,A=u,d=0;for(e.__k=new Array(o),i=0;i<o;i++)(l=t[i])!=null&&typeof l!="boolean"&&typeof l!="function"?(typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?l=e.__k[i]=nr(null,l,null,null,null):tr(l)?l=e.__k[i]=nr(ge,{children:l},null,null,null):l.constructor===void 0&&l.__b>0?l=e.__k[i]=nr(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[i]=l,a=i+d,l.__=e,l.__b=e.__b+1,s=null,(c=l.__i=Pd(l,n,a,A))!=-1&&(A--,(s=n[c])&&(s.__u|=2)),s==null||s.__v==null?(c==-1&&(o>u?d--:o<u&&d++),typeof l.type!="function"&&(l.__u|=4)):c!=a&&(c==a-1?d--:c==a+1?d++:(c>a?d--:d++,l.__u|=4))):e.__k[i]=null;if(A)for(i=0;i<u;i++)(s=n[i])!=null&&!(2&s.__u)&&(s.__e==r&&(r=Cn(s)),As(s,s));return r}function ls(e,t,n,r){var o,i;if(typeof e.type=="function"){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=ls(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Cn(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Gt(e,t){return t=t||[],e==null||typeof e=="boolean"||(tr(e)?e.some(function(n){Gt(n,t)}):t.push(e)),t}function Pd(e,t,n,r){var o,i,l,s=e.key,a=e.type,c=t[n],u=c!=null&&(2&c.__u)==0;if(c===null&&s==null||u&&s==c.key&&a==c.type)return n;if(r>(u?1:0)){for(o=n-1,i=n+1;o>=0||i<t.length;)if((c=t[l=o>=0?o--:i++])!=null&&!(2&c.__u)&&s==c.key&&a==c.type)return l}return-1}function ss(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||_d.test(t)?n:n+"px"}function Nr(e,t,n,r,o){var i,l;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ss(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||ss(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(ts,"$1")),l=t.toLowerCase(),t=l in e||t=="onFocusOut"||t=="onFocusIn"?l.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n[er]=r[er]:(n[er]=No,e.addEventListener(t,i?Fo:Ro,i)):e.removeEventListener(t,i?Fo:Ro,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function as(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[Mr]==null)t[Mr]=No++;else if(t[Mr]<n[er])return;return n(J.event?J.event(t):t)}}}function zo(e,t,n,r,o,i,l,s,a,c){var u,A,d,f,p,v,h,w,b,g,k,_,E,P,x,B=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(a=!!(32&n.__u),i=[s=t.__e=n.__e]),(u=J.__b)&&u(t);e:if(typeof B=="function")try{if(w=t.props,b=B.prototype&&B.prototype.render,g=(u=B.contextType)&&r[u.__c],k=u?g?g.props.value:u.__:r,n.__c?h=(A=t.__c=n.__c).__=A.__E:(b?t.__c=A=new B(w,k):(t.__c=A=new Tt(w,k),A.constructor=B,A.render=Id),g&&g.sub(A),A.state||(A.state={}),A.__n=r,d=A.__d=!0,A.__h=[],A._sb=[]),b&&A.__s==null&&(A.__s=A.state),b&&B.getDerivedStateFromProps!=null&&(A.__s==A.state&&(A.__s=Bt({},A.__s)),Bt(A.__s,B.getDerivedStateFromProps(w,A.__s))),f=A.props,p=A.state,A.__v=t,d)b&&B.getDerivedStateFromProps==null&&A.componentWillMount!=null&&A.componentWillMount(),b&&A.componentDidMount!=null&&A.__h.push(A.componentDidMount);else{if(b&&B.getDerivedStateFromProps==null&&w!==f&&A.componentWillReceiveProps!=null&&A.componentWillReceiveProps(w,k),t.__v==n.__v||!A.__e&&A.shouldComponentUpdate!=null&&A.shouldComponentUpdate(w,A.__s,k)===!1){t.__v!=n.__v&&(A.props=w,A.state=A.__s,A.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(D){D&&(D.__=t)}),Qr.push.apply(A.__h,A._sb),A._sb=[],A.__h.length&&l.push(A);break e}A.componentWillUpdate!=null&&A.componentWillUpdate(w,A.__s,k),b&&A.componentDidUpdate!=null&&A.__h.push(function(){A.componentDidUpdate(f,p,v)})}if(A.context=k,A.props=w,A.__P=e,A.__e=!1,_=J.__r,E=0,b)A.state=A.__s,A.__d=!1,_&&_(t),u=A.render(A.props,A.state,A.context),Qr.push.apply(A.__h,A._sb),A._sb=[];else do A.__d=!1,_&&_(t),u=A.render(A.props,A.state,A.context),A.state=A.__s;while(A.__d&&++E<25);A.state=A.__s,A.getChildContext!=null&&(r=Bt(Bt({},r),A.getChildContext())),b&&!d&&A.getSnapshotBeforeUpdate!=null&&(v=A.getSnapshotBeforeUpdate(f,p)),P=u!=null&&u.type===ge&&u.key==null?us(u.props.children):u,s=is(e,tr(P)?P:[P],t,n,r,o,i,l,s,a,c),A.base=t.__e,t.__u&=-161,A.__h.length&&l.push(A),h&&(A.__E=A.__=null)}catch(D){if(t.__v=null,a||i!=null)if(D.then){for(t.__u|=a?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;i[i.indexOf(s)]=null,t.__e=s}else{for(x=i.length;x--;)Ho(i[x]);jo(t)}else t.__e=n.__e,t.__k=n.__k,D.then||jo(t);J.__e(D,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=Dd(n.__e,t,n,r,o,i,l,a,c);return(u=J.diffed)&&u(t),128&t.__u?void 0:s}function jo(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(jo))}function cs(e,t,n){for(var r=0;r<n.length;r++)qo(n[r],n[++r],n[++r]);J.__c&&J.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){J.__e(i,o.__v)}})}function us(e){return typeof e!="object"||e==null||e.__b>0?e:tr(e)?e.map(us):Bt({},e)}function Dd(e,t,n,r,o,i,l,s,a){var c,u,A,d,f,p,v,h=n.props||Or,w=t.props,b=t.type;if(b=="svg"?o="http://www.w3.org/2000/svg":b=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((f=i[c])&&"setAttribute"in f==!!b&&(b?f.localName==b:f.nodeType==3)){e=f,i[c]=null;break}}if(e==null){if(b==null)return document.createTextNode(w);e=document.createElementNS(o,b,w.is&&w),s&&(J.__m&&J.__m(t,i),s=!1),i=null}if(b==null)h===w||s&&e.data==w||(e.data=w);else{if(i=i&&Zn.call(e.childNodes),!s&&i!=null)for(h={},c=0;c<e.attributes.length;c++)h[(f=e.attributes[c]).name]=f.value;for(c in h)f=h[c],c=="dangerouslySetInnerHTML"?A=f:c=="children"||c in w||c=="value"&&"defaultValue"in w||c=="checked"&&"defaultChecked"in w||Nr(e,c,null,f,o);for(c in w)f=w[c],c=="children"?d=f:c=="dangerouslySetInnerHTML"?u=f:c=="value"?p=f:c=="checked"?v=f:s&&typeof f!="function"||h[c]===f||Nr(e,c,f,h[c],o);if(u)s||A&&(u.__html==A.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(A&&(e.innerHTML=""),is(t.type=="template"?e.content:e,tr(d)?d:[d],t,n,r,b=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,l,i?i[0]:n.__k&&Cn(n,0),s,a),i!=null)for(c=i.length;c--;)Ho(i[c]);s||(c="value",b=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[c]||b=="progress"&&!p||b=="option"&&p!=h[c])&&Nr(e,c,p,h[c],o),c="checked",v!=null&&v!=e[c]&&Nr(e,c,v,h[c],o))}return e}function qo(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){J.__e(o,n)}}function As(e,t,n){var r,o;if(J.unmount&&J.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||qo(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){J.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&As(r[o],t,n||typeof e.type!="function");n||Ho(e.__e),e.__c=e.__=e.__e=void 0}function Id(e,t,n){return this.constructor(e,n)}function rr(e,t,n){var r,o,i,l;t==document&&(t=document.documentElement),J.__&&J.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],l=[],zo(t,e=(!r&&n||t).__k=he(ge,null,[e]),o||Or,Or,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?Zn.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,l),cs(i,e,l)}function ds(e,t){rr(e,t,ds)}function Bd(e,t,n){var r,o,i,l,s=Bt({},e.props);for(i in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i]===void 0&&l!=null?l[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?Zn.call(arguments,2):n),nr(e.type,s,r||e.key,o||e.ref,null)}function Ct(e){function t(n){var r,o;return this.getChildContext||(r=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&r.forEach(function(l){l.__e=!0,Uo(l)})},this.sub=function(i){r.add(i);var l=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),l&&l.call(i)}}),n.children}return t.__c="__cC"+ns++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}Zn=Qr.slice,J={__e:function(e,t,n,r){for(var o,i,l;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),l=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),l=o.__d),l)return o.__E=o}catch(s){e=s}throw e}},Xl=0,Tt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Bt({},this.state),typeof e=="function"&&(e=e(Bt({},n),this.props)),e&&Bt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Uo(this))},Tt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Uo(this))},Tt.prototype.render=ge,Xt=[],Zl=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,es=function(e,t){return e.__v.__b-t.__v.__b},Lr.__r=0,Lo=Math.random().toString(8),Mr="__d"+Lo,er="__a"+Lo,ts=/(PointerCapture)$|Capture$/i,No=0,Ro=as(!1),Fo=as(!0),ns=0;var Jt,Me,Wo,fs,Pn=0,ps=[],Re=J,hs=Re.__b,gs=Re.__r,ms=Re.diffed,ys=Re.__c,vs=Re.unmount,ws=Re.__;function Dn(e,t){Re.__h&&Re.__h(Me,e,Pn||t),Pn=0;var n=Me.__H||(Me.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ne(e){return Pn=1,Go(Es,e)}function Go(e,t,n){var r=Dn(Jt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Es(void 0,t),function(s){var a=r.__N?r.__N[0]:r.__[0],c=r.t(a,s);a!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=Me,!Me.__f)){var o=function(s,a,c){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(d){return d.__c});if(u.every(function(d){return!d.__N}))return!i||i.call(this,s,a,c);var A=r.__c.props!==s;return u.some(function(d){if(d.__N){var f=d.__[0];d.__=d.__N,d.__N=void 0,f!==d.__[0]&&(A=!0)}}),i&&i.call(this,s,a,c)||A};Me.__f=!0;var i=Me.shouldComponentUpdate,l=Me.componentWillUpdate;Me.componentWillUpdate=function(s,a,c){if(this.__e){var u=i;i=void 0,o(s,a,c),i=u}l&&l.call(this,s,a,c)},Me.shouldComponentUpdate=o}return r.__N||r.__}function ee(e,t){var n=Dn(Jt++,3);!Re.__s&&Vo(n.__H,t)&&(n.__=e,n.u=t,Me.__H.__h.push(n))}function or(e,t){var n=Dn(Jt++,4);!Re.__s&&Vo(n.__H,t)&&(n.__=e,n.u=t,Me.__h.push(n))}function le(e){return Pn=5,qe(function(){return{current:e}},[])}function Rr(e,t,n){Pn=6,or(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function qe(e,t){var n=Dn(Jt++,7);return Vo(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function X(e,t){return Pn=8,qe(function(){return e},t)}function wt(e){var t=Me.context[e.__c],n=Dn(Jt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Me)),t.props.value):e.__}function bs(e,t){Re.useDebugValue&&Re.useDebugValue(t?t(e):e)}function ks(){var e=Dn(Jt++,11);if(!e.__){for(var t=Me.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Td(){for(var e;e=ps.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Fr),t.__h.some(Yo),t.__h=[]}catch(n){t.__h=[],Re.__e(n,e.__v)}}}Re.__b=function(e){Me=null,hs&&hs(e)},Re.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ws&&ws(e,t)},Re.__r=function(e){gs&&gs(e),Jt=0;var t=(Me=e.__c).__H;t&&(Wo===Me?(t.__h=[],Me.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(Fr),t.__h.some(Yo),t.__h=[],Jt=0)),Wo=Me},Re.diffed=function(e){ms&&ms(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ps.push(t)!==1&&fs===Re.requestAnimationFrame||((fs=Re.requestAnimationFrame)||Md)(Td)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Wo=Me=null},Re.__c=function(e,t){t.some(function(n){try{n.__h.some(Fr),n.__h=n.__h.filter(function(r){return!r.__||Yo(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],Re.__e(r,n.__v)}}),ys&&ys(e,t)},Re.unmount=function(e){vs&&vs(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Fr(r)}catch(o){t=o}}),n.__H=void 0,t&&Re.__e(t,n.__v))};var xs=typeof requestAnimationFrame=="function";function Md(e){var t,n=function(){clearTimeout(r),xs&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);xs&&(t=requestAnimationFrame(n))}function Fr(e){var t=Me,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Me=t}function Yo(e){var t=Me;e.__c=e.__(),Me=t}function Vo(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Es(e,t){return typeof t=="function"?t(e):t}function _s(e,t){for(var n in t)e[n]=t[n];return e}function $o(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Ss(e,t){var n=t(),r=ne({t:{__:n,u:t}}),o=r[0].t,i=r[1];return or(function(){o.__=n,o.u=t,Ko(o)&&i({t:o})},[e,n,t]),ee(function(){return Ko(o)&&i({t:o}),e(function(){Ko(o)&&i({t:o})})},[e]),n}function Ko(e){try{return!((t=e.__)===(n=e.u())&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}var t,n}function Cs(e){e()}function Ps(e){return e}function Ds(){return[!1,Cs]}var Is=or;function Xo(e,t){this.props=e,this.context=t}function Od(e,t){function n(o){var i=this.props.ref;return i!=o.ref&&i&&(typeof i=="function"?i(null):i.current=null),t?!t(this.props,o)||i!=o.ref:$o(this.props,o)}function r(o){return this.shouldComponentUpdate=n,he(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.__f=r.prototype.isReactComponent=!0,r.type=e,r}(Xo.prototype=new Tt).isPureReactComponent=!0,Xo.prototype.shouldComponentUpdate=function(e,t){return $o(this.props,e)||$o(this.state,t)};var Bs=J.__b;J.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Bs&&Bs(e)};var Qd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ot(e){function t(n){var r=_s({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Qd,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ts=function(e,t){return e==null?null:Gt(Gt(e).map(t))},Ld={map:Ts,forEach:Ts,count:function(e){return e?Gt(e).length:0},only:function(e){var t=Gt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Gt},Nd=J.__e;J.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}Nd(e,t,n,r)};var Ms=J.unmount;function Os(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=_s({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Os(r,t,n)})),e}function Qs(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Qs(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Hr(){this.__u=0,this.o=null,this.__b=null}function Ls(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function Rd(e){var t,n,r,o=null;function i(l){if(t||(t=e()).then(function(s){s&&(o=s.default||s),r=!0},function(s){n=s,r=!0}),n)throw n;if(!r)throw t;return o?he(o,l):null}return i.displayName="Lazy",i.__f=!0,i}function ir(){this.i=null,this.l=null}J.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ms&&Ms(e)},(Hr.prototype=new Tt).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var o=Ls(r.__v),i=!1,l=function(){i||r.__z||(i=!0,n.__R=null,o?o(a):a())};n.__R=l;var s=n.__P;n.__P=null;var a=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=Qs(c,c.__c.__P,c.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.o.pop();)u.__P=s,u.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(l,l)},Hr.prototype.componentWillUnmount=function(){this.o=[]},Hr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Os(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&he(ge,null,e.fallback);return o&&(o.__u&=-33),[he(ge,null,t.__a?null:e.children),o]};var Ns=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function Fd(e){return this.getChildContext=function(){return e.context},e.children}function Hd(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){rr(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(o,i){this.childNodes.push(o),t.h.insertBefore(o,i)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.h.removeChild(o)}}}rr(he(Fd,{context:t.context},e.__v),t.v)}function Rs(e,t){var n=he(Hd,{__v:e,h:t});return n.containerInfo=t,n}(ir.prototype=new Tt).__a=function(e){var t=this,n=Ls(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Ns(t,e,r)):o()};n?n(i):i()}},ir.prototype.render=function(e){this.i=null,this.l=new Map;var t=Gt(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},ir.prototype.componentDidUpdate=ir.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Ns(e,n,t)})};var Fs=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ud=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,zd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,jd=/[A-Z0-9]/g,qd=typeof document<"u",Wd=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Hs(e,t,n){return t.__k==null&&(t.textContent=""),rr(e,t),typeof n=="function"&&n(),e?e.__c:null}function Gd(e,t,n){return ds(e,t),typeof n=="function"&&n(),e?e.__c:null}Tt.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Tt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Us=J.event;J.event=function(e){return Us&&(e=Us(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Jo,Yd={configurable:!0,get:function(){return this.class}},zs=J.vnode;J.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={},i=r.indexOf("-")==-1;for(var l in n){var s=n[l];if(!(l==="value"&&"defaultValue"in n&&s==null||qd&&l==="children"&&r==="noscript"||l==="class"||l==="className")){var a=l.toLowerCase();l==="defaultValue"&&"value"in n&&n.value==null?l="value":l==="download"&&s===!0?s="":a==="translate"&&s==="no"?s=!1:a[0]==="o"&&a[1]==="n"?a==="ondoubleclick"?l="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||Wd(n.type)?a==="onfocus"?l="onfocusin":a==="onblur"?l="onfocusout":zd.test(l)&&(l=a):a=l="oninput":i&&Ud.test(l)?l=l.replace(jd,"-$&").toLowerCase():s===null&&(s=void 0),a==="oninput"&&o[l=a]&&(l="oninputCapture"),o[l]=s}}r=="select"&&(o.multiple&&Array.isArray(o.value)&&(o.value=Gt(n.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),o.defaultValue!=null&&(o.value=Gt(n.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value}))),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Yd)):n.className&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=Fs,zs&&zs(e)};var js=J.__r;J.__r=function(e){js&&js(e),Jo=e.__c};var qs=J.diffed;J.diffed=function(e){qs&&qs(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Jo=null};var Vd={ReactCurrentDispatcher:{current:{readContext:function(e){return Jo.__n[e.__c].props.value},useCallback:X,useContext:wt,useDebugValue:bs,useDeferredValue:Ps,useEffect:ee,useId:ks,useImperativeHandle:Rr,useInsertionEffect:Is,useLayoutEffect:or,useMemo:qe,useReducer:Go,useRef:le,useState:ne,useSyncExternalStore:Ss,useTransition:Ds}}};function $d(e){return he.bind(null,e)}function pn(e){return!!e&&e.$$typeof===Fs}function Kd(e){return pn(e)&&e.type===ge}function Xd(e){return!!e&&typeof e.displayName=="string"&&e.displayName.indexOf("Memo(")==0}function Jd(e){return pn(e)?Bd.apply(null,arguments):e}function Ws(e){return!!e.__k&&(rr(null,e),!0)}function Zd(e){return e&&(e.base||e.nodeType===1&&e)||null}var ef=function(e,t){return e(t)},tf=function(e,t){var n=J.debounceRendering;J.debounceRendering=function(o){return o()};var r=e(t);return J.debounceRendering=n,r},nf=pn,N={useState:ne,useId:ks,useReducer:Go,useEffect:ee,useLayoutEffect:or,useInsertionEffect:Is,useTransition:Ds,useDeferredValue:Ps,useSyncExternalStore:Ss,startTransition:Cs,useRef:le,useImperativeHandle:Rr,useMemo:qe,useCallback:X,useContext:wt,useDebugValue:bs,version:"18.3.1",Children:Ld,render:Hs,hydrate:Gd,unmountComponentAtNode:Ws,createPortal:Rs,createElement:he,createContext:Ct,createFactory:$d,cloneElement:Jd,createRef:rs,Fragment:ge,isValidElement:pn,isElement:nf,isFragment:Kd,isMemo:Xd,findDOMNode:Zd,Component:Tt,PureComponent:Xo,memo:Od,forwardRef:ot,flushSync:tf,unstable_batchedUpdates:ef,StrictMode:ge,Suspense:Hr,SuspenseList:ir,lazy:Rd,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Vd},rf=0;function I(e,t,n,r,o,i){t||(t={});var l,s,a=t;if("ref"in a)for(s in a={},t)s=="ref"?l=t[s]:a[s]=t[s];var c={type:e,props:a,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--rf,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(l=e.defaultProps))for(s in l)a[s]===void 0&&(a[s]=l[s]);return J.vnode&&J.vnode(c),c}function of(e){return{render:function(t){Hs(t,e)},unmount:function(){Ws(e)}}}var lf="diffed",Gs="__c",Zo="__s",In="__c",Ys="__k",ei="__d",Bn="__s",Vs=/[\s\n\\/='"\0<>]/,$s=/^(xlink|xmlns|xml)([A-Z])/,sf=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,af=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,cf=new Set(["draggable","spellcheck"]);function Ks(e){e.__g!==void 0?e.__g|=8:e[ei]=!0}function uf(e){e.__g!==void 0?e.__g&=-9:e[ei]=!1}function Xs(e){return e.__g!==void 0?!!(8&e.__g):e[ei]===!0}var Af=/["&<]/;function Ur(e){if(e.length===0||Af.test(e)===!1)return e;for(var t=0,n=0,r="",o="";n<e.length;n++){switch(e.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=o,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var Js={},df=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),ff=/[A-Z]/g;function pf(e){var t="";for(var n in e){var r=e[n];if(r!=null&&r!==""){var o=n[0]=="-"?n:Js[n]||(Js[n]=n.replace(ff,"-$&").toLowerCase()),i=";";typeof r!="number"||o.startsWith("--")||df.has(o)||(i="px;"),t=t+o+":"+r+i}}return t||void 0}function Zs(){this.__d=!0}function hf(e,t){return{__v:e,context:t,props:e.props,setState:Zs,forceUpdate:Zs,__d:!0,__h:new Array(0)}}var ti,hn,lr,sr,ni={},ea=[],Tn=Array.isArray,ri=Object.assign,it="",oi="<!--$s-->",ii="<!--/$s-->";function ta(e,t,n){var r=J[Zo];J[Zo]=!0,ti=J.__b,hn=J[lf],lr=J.__r,sr=J.unmount;var o=he(ge,null);o[Ys]=[e];try{var i=Zt(e,t||ni,!1,void 0,o,!1,n);return Tn(i)?i.join(it):i}catch(l){throw l.then?new Error('Use "renderToStringAsync" for suspenseful rendering.'):l}finally{J[Gs]&&J[Gs](e,ea),J[Zo]=r,ea.length=0}}function na(e,t){var n,r=e.type,o=!0;return e[In]?(o=!1,(n=e[In]).state=n[Bn]):n=new r(e.props,t),e[In]=n,n.__v=e,n.props=e.props,n.context=t,Ks(n),n.state==null&&(n.state=ni),n[Bn]==null&&(n[Bn]=n.state),r.getDerivedStateFromProps?n.state=ri({},n.state,r.getDerivedStateFromProps(n.props,n.state)):o&&n.componentWillMount?(n.componentWillMount(),n.state=n[Bn]!==n.state?n[Bn]:n.state):!o&&n.componentWillUpdate&&n.componentWillUpdate(),lr&&lr(e),n.render(n.props,n.state,t)}function Zt(e,t,n,r,o,i,l){if(e==null||e===!0||e===!1||e===it)return it;var s=typeof e;if(s!="object")return s=="function"?it:s=="string"?Ur(e):e+it;if(Tn(e)){var a,c=it;o[Ys]=e;for(var u=e.length,A=0;A<u;A++){var d=e[A];if(d!=null&&typeof d!="boolean"){var f,p=Zt(d,t,n,r,o,i,l);typeof p=="string"?c+=p:(a||(a=new Array(u)),c&&a.push(c),c=it,Tn(p)?(f=a).push.apply(f,p):a.push(p))}}return a?(c&&a.push(c),a):c}if(e.constructor!==void 0)return it;e.__=o,ti&&ti(e);var v=e.type,h=e.props;if(typeof v=="function"){var w,b,g,k=t;if(v===ge){if("tpl"in h){for(var _=it,E=0;E<h.tpl.length;E++)if(_+=h.tpl[E],h.exprs&&E<h.exprs.length){var P=h.exprs[E];if(P==null)continue;typeof P!="object"||P.constructor!==void 0&&!Tn(P)?_+=P:_+=Zt(P,t,n,r,e,i,l)}return _}if("UNSTABLE_comment"in h)return"<!--"+Ur(h.UNSTABLE_comment)+"-->";b=h.children}else{if((w=v.contextType)!=null){var x=t[w.__c];k=x?x.props.value:w.__}var B=v.prototype&&typeof v.prototype.render=="function";if(B)b=na(e,k),g=e[In];else{e[In]=g=hf(e,k);for(var D=0;Xs(g)&&D++<25;){uf(g),lr&&lr(e);try{b=v.call(g,h,k)}catch(y){throw y}}Ks(g)}if(g.getChildContext!=null&&(t=ri({},t,g.getChildContext())),B&&J.errorBoundaries&&(v.getDerivedStateFromError||g.componentDidCatch)){b=b!=null&&b.type===ge&&b.key==null&&b.props.tpl==null?b.props.children:b;try{return Zt(b,t,n,r,e,i,!1)}catch(y){return v.getDerivedStateFromError&&(g[Bn]=v.getDerivedStateFromError(y)),g.componentDidCatch&&g.componentDidCatch(y,ni),Xs(g)?(b=na(e,t),(g=e[In]).getChildContext!=null&&(t=ri({},t,g.getChildContext())),Zt(b=b!=null&&b.type===ge&&b.key==null&&b.props.tpl==null?b.props.children:b,t,n,r,e,i,l)):it}finally{hn&&hn(e),sr&&sr(e)}}}b=b!=null&&b.type===ge&&b.key==null&&b.props.tpl==null?b.props.children:b;try{var T=Zt(b,t,n,r,e,i,l);return hn&&hn(e),J.unmount&&J.unmount(e),e._suspended?typeof T=="string"?oi+T+ii:Tn(T)?(T.unshift(oi),T.push(ii),T):T.then(function(y){return oi+y+ii}):T}catch(y){if(l&&l.onError){var C=l.onError(y,e,function(q,re){return Zt(q,t,n,r,re,i,l)});if(C!==void 0)return C;var L=J.__e;return L&&L(y,e),it}throw y}}var H,R="<"+v,Q=it;for(var M in h){var O=h[M];if(typeof(O=mf(O)?O.value:O)!="function"||M==="class"||M==="className"){switch(M){case"children":H=O;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in h)continue;M="for";break;case"className":if("class"in h)continue;M="class";break;case"defaultChecked":M="checked";break;case"defaultSelected":M="selected";break;case"defaultValue":case"value":switch(M="value",v){case"textarea":H=O;continue;case"select":r=O;continue;case"option":r!=O||"selected"in h||(R+=" selected")}break;case"dangerouslySetInnerHTML":Q=O&&O.__html;continue;case"style":typeof O=="object"&&(O=pf(O));break;case"acceptCharset":M="accept-charset";break;case"httpEquiv":M="http-equiv";break;default:if($s.test(M))M=M.replace($s,"$1:$2").toLowerCase();else{if(Vs.test(M))continue;M[4]!=="-"&&!cf.has(M)||O==null?n?af.test(M)&&(M=M==="panose1"?"panose-1":M.replace(/([A-Z])/g,"-$1").toLowerCase()):sf.test(M)&&(M=M.toLowerCase()):O+=it}}O!=null&&O!==!1&&(R=O===!0||O===it?R+" "+M:R+" "+M+'="'+(typeof O=="string"?Ur(O):O+it)+'"')}}if(Vs.test(v))throw new Error(v+" is not a valid HTML tag name in "+R+">");if(Q||(typeof H=="string"?Q=Ur(H):H!=null&&H!==!1&&H!==!0&&(Q=Zt(H,t,v==="svg"||v!=="foreignObject"&&n,r,e,i,l))),hn&&hn(e),sr&&sr(e),!Q&&gf.has(v))return R+"/>";var m="</"+v+">",G=R+">";return Tn(Q)?[G].concat(Q,[m]):typeof Q!="string"?[G,Q,m]:G+Q+m}var gf=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function mf(e){return e!==null&&typeof e=="object"&&typeof e.peek=="function"&&"value"in e}const yf={renderToString:ta,renderToStaticMarkup:ta},vf={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_ALLOW_ANON_ACCESS:"true",VITE_API_KEY:"4nn5l4T4TnkMdzsK0AwAtnGRcheBDnjawuAT42LaOLc",VITE_TURNSTILE_SITE_KEY:"0x4AAAAAACyJamk8FS7-RSMr"};function zr(){return zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zr.apply(null,arguments)}function ra(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"){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}typeof SuppressedError=="function"&&SuppressedError;const Fe={AUDIO_BUTTON:"audio-button",NOTIFICATION_BUTTON:"notification-button",CLOSE_CHAT_BUTTON:"close-chat-button",SEND_MESSAGE_BUTTON:"send-button",VOICE_MESSAGE_BUTTON:"voice-button",FILE_ATTACHMENT_BUTTON:"file-attachment-button",EMOJI_PICKER_BUTTON:"emoji-button"},oa="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20viewBox='0%200%201000%201000'%3e%3crect%20width='100%25'%20height='100%25'%20fill='%23fff'/%3e%3cg%3e%3crect%20width='45'%20height='30'%20x='-22.5'%20y='-15'%20rx='1.5'%20ry='1.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-99%20362)%20scale(3.4003)'/%3e%3cpath%20d='M0%2075q14%200%2014%2017%200%2016-14%2016Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(180%20106%20386)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='4'%20x='-12.5'%20y='-2'%20rx='.2'%20ry='.2'%20style='stroke:%2346648c;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-46%20282)%20scale(3.4003)'/%3e%3cpath%20d='M19%2065h4l5%204v1H14v-1Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='2'%20x='-12.5'%20y='-1'%20rx='.1'%20ry='.1'%20style='stroke:%2398b0ca;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-3%20240)%20scale(3.4003)'/%3e%3ccircle%20r='7.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(236%20175)%20scale(3.4003)'/%3e%3crect%20width='45'%20height='30'%20x='-22.5'%20y='-15'%20rx='1.5'%20ry='1.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20139%20600)%20scale(3.4003)'/%3e%3cpath%20d='M184%2075q14%200%2014%2017%200%2016-14%2016Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='4'%20x='-12.5'%20y='-2'%20rx='.2'%20ry='.2'%20style='stroke:%2346648c;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20219%20548)%20scale(3.4003)'/%3e%3cpath%20d='M175%2065h4l5%204v1h-14v-1Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='2'%20x='-12.5'%20y='-1'%20rx='.1'%20ry='.1'%20style='stroke:%2398b0ca;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20262%20505)%20scale(3.4003)'/%3e%3ccircle%20r='7.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(767%20175)%20scale(3.4003)'/%3e%3crect%20width='116.7'%20height='70'%20x='-58.4'%20y='-35'%20rx='31.5'%20ry='31.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2371c9fc;fill-rule:nonzero;opacity:1'%20transform='translate(502%20877)%20scale(3.4003)'/%3e%3crect%20width='60'%20height='20'%20x='-30'%20y='-10'%20rx='3'%20ry='3'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='translate(502%20728)%20scale(3.4003)'/%3e%3ccircle%20r='75'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2371c9fc;fill-rule:nonzero;opacity:1'%20transform='translate(502%20473)%20scale(3.4003)'/%3e%3crect%20width='129.4'%20height='82.3'%20x='-64.7'%20y='-41.1'%20rx='37'%20ry='37'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23fff;fill-rule:nonzero;opacity:1'%20transform='translate(502%20464)%20scale(3.4003)'/%3e%3crect%20width='108'%20height='68.6'%20x='-54'%20y='-34.3'%20rx='30.9'%20ry='30.9'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23162334;fill-rule:nonzero;opacity:1'%20transform='translate(502%20464)%20scale(3.4003)'/%3e%3ccircle%20r='19.4'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(415%20464)%20scale(3.4003)'/%3e%3ccircle%20r='19.4'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(591%20464)%20scale(3.4003)'/%3e%3crect%20width='96'%20height='53.2'%20x='-48'%20y='-26.6'%20rx='23.9'%20ry='23.9'%20style='stroke:%23162334;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23162334;fill-rule:nonzero;opacity:1'%20transform='translate(503%20875)%20scale(3.4003)'/%3e%3cpath%20stroke-linecap='round'%20d='m68%20215%207-15M81%20222l-7-22M81%20222l7-14M101%20208H87M114%20219l-7-24M113%20219l13-22M131%20214l-5-17M148%20214h-18M69%20214H51M100%20209l7-15'%20style='stroke:%23a478fc;stroke-width:3;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:10;is-custom-font:none;font-file-url:none;fill:none;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3c/g%3e%3c/svg%3e",ia=ot((e,t)=>he("svg",{viewBox:"0 0 637 637",ref:t,...e},he("path",{d:"m478 113-13 2-4 1h4l14-2c10-2 35-2 42-1l6 3 3 1c3 0-4-3-8-5-7-1-34-1-44 1m56 6 8 6c7 5 20 17 20 19s7 12 8 12l-3-6-4-6c0-3-15-17-25-24-5-3-8-4-4-1m-198 16-9 1a512 512 0 0 1 9-1m-180 30a412 412 0 0 0-23 4 167 167 0 0 0-32 8 439 439 0 0 1 46-9 304 304 0 0 1 11-2l6-1h-8m369 8 4 3-7-6c-1 0 0 2 3 3m-439 9c-7 3-18 13-18 15l6-5c5-5 9-8 14-10l6-4-8 4m442 12-10 11-7 6 7-6c7-5 14-14 13-16l-3 5M65 205l-1 11c0 9 0 10 4 17 5 10 7 12 22 11 10 0 15 0 38-5l5-1-6 1-16 2-21 2c-13 1-16-1-21-10-3-5-4-6-4-15l1-12c1-4 1-5-1-1m335 1c3 0 3 1 3 3l-2 6c-2 5-35 39-76 80-53 51-120 117-138 137-21 24-22 25-22 27 0 3 6 9 9 9 4 0 14-8 38-27a5073 5073 0 0 1 15-16 1421 1421 0 0 0-17 15l-31 25-6 2-4-3c-3-3-3-4-2-6 3-8 79-85 160-163 57-57 79-80 79-86 0-2-3-4-7-4-2 0-2 0 1 1m165 18c-9 17-25 32-57 53l-10 8 16-11 12-8c15-10 27-22 39-39 5-7 6-8 4-8l-4 5m-221 2a199 199 0 0 0-19 10 183 183 0 0 1 27-12c0-1-1-1-8 2m-34 16c-3 3-2 3 2 0l1-2-3 2m151 3-1 2 2-2c3-3 2-3-1 0m-16 12-11 10a281 281 0 0 0 11-10m-24 18-7 5-7 5-42 31c-10 7-24 19-22 19l7-6 16-12a343 343 0 0 0 35-25 573 573 0 0 0 20-17m-187 0-2 2 4-2 3-2-5 2m-14 6-3 2 4-1 4-3-5 2m-7 3-8 4-18 8 18-7 7-3 3-1c1-2 0-2-2-1m254 24a2672 2672 0 0 1-71 54 601 601 0 0 0 39-29 1352 1352 0 0 1 32-25m-291-8-2 2 4-2 3-2-5 2m-13 5-2 2h3c5-3 4-4-1-2m-19 9-7 3-13 6c-10 5-13 7-14 10-3 4-2 5 1 0 2-3 5-5 14-9l13-6 12-6-6 2m178 36c-17 12-21 16-21 17a390 390 0 0 1 20-17m-206 34 1 4 1 3 1 5 2 8 1 5v-6l-1-8-2-5-1-4-1-2c-1-2-1-2-1 0m222 23-9 7a683 683 0 0 0-56 44 261 261 0 0 0-26 20 1345 1345 0 0 0-46 34c-6 3-7 3-19 3-11 0-12 0-18-3-8-4-10-8-17-20l-5-10 4 10c5 10 12 18 19 22 4 2 6 2 17 2 13 0 14 0 21-3l26-19 42-33a2183 2183 0 0 0 43-34 643 643 0 0 1 24-20",fill:"#fff",fillRule:"evenodd"}),he("path",{d:"M478 114a620 620 0 0 1-39 6l-21 3a5481 5481 0 0 0-19 3 870 870 0 0 1-54 8l-1 1-6 1-12 2-13 2a992 992 0 0 0-76 12 400 400 0 0 1-45 8l-6 1-5 1h-3l-3 1-2 1-26 4-13 2-17 3c-23 5-33 9-43 19-7 8-9 13-9 27 0 8 1 9 4 14 5 9 8 11 21 10l21-2a1133 1133 0 0 1 23-4 659 659 0 0 0 74-14l3-1h3l3-1h3l2-1 2-1h3l2-1h2l24-5 38-7a2100 2100 0 0 1 93-18l3-1 10-1a2082 2082 0 0 1 120-17l2 1c2 0 8 5 8 7l1 2 1 6c0 4 0 6-3 10-2 4-16 16-18 16l-7 5-10 8a1070 1070 0 0 0-11 7 113 113 0 0 1-20 14l-2 2-3 2-2 2h-1a154 154 0 0 1-28 21l-5 4-5 4a573 573 0 0 1-50 37 175 175 0 0 0-24 18l-1 2-2 1-2 1-2 1-1 1-12 10a396 396 0 0 0-32 25l-8 6-6 5-9 7a326 326 0 0 1-25 20l-13 12a5073 5073 0 0 0-17 15c-24 20-34 27-39 27-2 0-8-6-8-9 0-2 1-3 22-27 18-20 85-86 138-137 41-41 74-75 76-80l2-6c0-2 0-3-2-3l-7 1a233 233 0 0 1-26 9l-1 1-1 1h-1l-1 1h-2l-3 2-1 1h-2l-3 2h-1l-5 2-22 10-9 4-4 2-5 2-10 4-2 1-2 1-2 1-13 6a334 334 0 0 1-38 17 75 75 0 0 0-14 6l-5 2-4 1-2 1-3 2-7 3-16 6a247 247 0 0 0-32 14l-1 1h-2l-1 1h-2l-1 1-12 6a103 103 0 0 0-27 15l-2 5-1 1v11l1 5 1 5 1 4c0 3 0 4 2 4v3l1 3 1 2 2 10 1 4 1 5 2 10 2 8 1 4 1 4c3 3 9 25 11 38l1 7v2l1 4v1l1 1v2l1 2 1 3v1l5 10c7 13 9 16 17 20 6 3 7 3 18 3 12 0 13 0 19-3 8-4 11-6 26-18a1345 1345 0 0 1 85-67 683 683 0 0 1 50-39l12-9a513 513 0 0 1 44-33 201 201 0 0 0 22-17 2270 2270 0 0 0 73-54 158 158 0 0 0 58-59c2 0 3-9 4-27l-1-19-1-4-1-6-1-3-4-6-4-6c0-2-6-8-13-14a77 77 0 0 0-28-18c-6-1-34-1-43 1"}))),la=ot((e,t)=>he("svg",{viewBox:"0 -960 960 960",ref:t,...e},he("path",{d:"M765-321q0 117-84 196-83 80-200 80-118 0-200-80t-83-196v-392q0-85 61-144 61-58 146-58 86 0 147 58 61 59 61 144v374q0 54-39 92-39 37-93 37-55 0-93-37-38-38-38-92v-372h110v372q0 9 6 14t15 5q8 0 15-5t7-14v-374q0-39-29-66t-68-27q-40 0-69 27t-29 66v392q0 71 51 119t122 48q71 0 122-48t51-119v-426h111v426Z"}))),wf=ot((e,t)=>he("svg",{viewBox:"0 -960 960 960",ref:t,...e},he("path",{d:"M125-165v-113h77v-273q0-93 55-167 56-75 146-100v-19q0-32 22-55 23-23 55-23t55 23q22 23 22 55v19q90 25 146 99 56 73 56 168v273h77v113H125ZM480-32q-38 0-66-27-27-27-27-66h186q0 39-27 66t-66 27Z"}))),bf=ot((e,t)=>he("svg",{viewBox:"0 -960 960 960",ref:t,...e},he("path",{d:"M137-190v-113h78v-253q0-41 11-79 11-39 35-71l-9 150h10L17-802l74-74L873-92l-74 74-175-172H137Zm609-149L319-769q20-15 41-25t44-16v-28q0-32 22-54t54-22q32 0 55 22t22 54v28q85 23 137 94t52 160v217ZM481-47q-38 0-65-27t-27-65h184q0 38-27 65t-65 27Z"}))),kf=ot((e,t)=>he("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",ref:t,...e},he("g",{strokeLinecap:"round",strokeWidth:10},he("path",{d:"m19 19 61 61M80 19 19 80"})))),xf=ot((e,t)=>he("svg",{viewBox:"0 -960 960 960",ref:t,...e},he("path",{d:"M94-136v-255l351-93-351-92v-253l816 346L94-136Z"}))),Ef=ot((e,t)=>he("svg",{viewBox:"0 -960 960 960",ref:t,...e},he("path",{d:"M480-372q-61 0-105-43-43-43-43-105v-240q0-61 43-105 43-43 105-43 61 0 105 43 43 44 43 105v240q0 62-43 105t-105 43ZM425-76v-122q-121-16-197-108t-76-214h109q0 91 64 154t155 63q91 0 155-63t64-154h109q0 122-77 214T534-198v122H425Z"}))),_f=ot((e,t)=>he("svg",{viewBox:"0 -960 960 960",ref:t,...e},he("path",{d:"m763-343-80-79q8-20 13-44 5-23 5-54h109q0 49-11 95t-36 82ZM625-482 336-770v-2q3-56 45-96t101-40q62 0 105 43t43 105v249l-1 17q-1 7-4 12ZM427-76v-122q-120-16-196-108-77-92-77-214h109q0 91 64 154t155 63q43 0 80-14 37-15 67-41l78 79q-35 32-78 53t-93 28v122H427Zm362 27L41-796l75-75 748 748-75 74Z"}))),sa=ot((e,t)=>he("svg",{viewBox:"0 -960 960 960",ref:t,...e},he("path",{d:"M625-511q29 0 50-21t20-50q0-29-20-50-21-20-50-20t-50 20-20 50q0 29 20 50 21 21 50 21Zm-290 0q29 0 50-21t20-49q0-30-20-50t-50-21q-29 0-50 20-20 21-20 50 0 30 20 50 21 21 50 21Zm145 268q75 0 137-43t85-115H258q24 72 85 115 62 43 137 43Zm0 198q-90 0-170-34-79-34-138-93T79-310q-34-80-34-170t34-170q34-79 93-138t138-93q80-34 170-34t170 34q79 34 138 93t93 138q34 80 34 170t-34 170q-34 79-93 138T650-79q-80 34-170 34Zm0-435Zm0 322q134 0 228-94t94-228q0-134-94-228t-228-94q-134 0-228 94t-94 228q0 134 94 228t228 94Z"}))),Sf=ot((e,t)=>he("svg",{viewBox:"0 -960 960 960",ref:t,...e},he("path",{d:"M553-64v-108q107-27 173-113 67-87 67-197 0-109-67-195T553-789v-108q152 26 249 144 97 117 97 271 0 155-97 273T553-64ZM61-335v-290h176l236-237v764L237-335H61Zm492 28v-346q51 23 82 70t31 103-31 103q-31 47-82 70Z"}))),Cf=ot((e,t)=>he("svg",{viewBox:"0 -960 960 960",ref:t,...e},he("path",{d:"M807-15 700-123q-33 21-71 37-38 15-80 22v-108q20-4 38-12l35-17-153-154v257L234-335H57v-290h144L10-818l74-75L882-90l-75 75Zm37-264-80-79q13-30 19-60 7-31 7-64 0-109-68-195-67-86-173-112v-108q152 26 249 144 98 117 98 271 0 55-14 107-13 51-38 96ZM661-462 549-575v-78q51 23 83 70 31 47 31 103l-1 9-1 9ZM469-655 366-759l103-103v207Z"}))),aa={general:{primaryColor:"#42b0c5",secondaryColor:"#491d8d",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",showHeader:!0,showFooter:!0,showInputRow:!0,actionDisabledIcon:"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2042%2042'%3e%3cpath%20style='fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:%23b00000;stroke-opacity:1;stroke-miterlimit:4'%20d='M17%209a8%208%200%200%201-8%208%208%208%200%200%201-8-8%208%208%200%200%201%208-8%208%208%200%200%201%208%208Zm0%200'%20transform='rotate(.086)%20scale(1.77778)'/%3e%3cpath%20style='fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:%23b00000;stroke-opacity:1;stroke-miterlimit:10'%20d='M14.66%2014.66%203.34%203.34'%20transform='rotate(.086)%20scale(1.77778)'/%3e%3c/svg%3e",embedded:!1,flowStartTrigger:"ON_LOAD"},tooltip:{mode:"CLOSE",text:"Talk to me! ๐Ÿ˜Š"},chatButton:{icon:ia},header:{title:I("div",{style:{cursor:"pointer",margin:0,fontSize:20,fontWeight:"bold"},onClick:()=>window.open("https://github.com/tjtanjin/","_blank","noopener,noreferrer"),children:"Tan Jin"}),showAvatar:!0,avatar:oa,buttons:[Fe.NOTIFICATION_BUTTON,Fe.AUDIO_BUTTON,Fe.CLOSE_CHAT_BUTTON],closeChatIcon:kf},notification:{disabled:!1,defaultToggledOn:!0,volume:.2,icon:wf,iconDisabled:bf,sound:"data:audio/wav;base64,UklGRmaIAABXQVZFZm10IBAAAAABAAIAQB8AAAB9AAAEABAATElTVBoAAABJTkZPSVNGVA4AAABMYXZmNjAuMTYuMTAwAGRhdGEgiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAAA//////7/////////AAABAAAAAgABAAEAAQAAAAIAAQABAP//AAD+////AAD+//7////+////AAD//wAA/v8AAAAA/v8AAP//AAAAAAAAAgD////////+////AAABAAEAAgD/////AQABAAAA//8CAP//AAAAAAAA/v8AAAAA//8AAAEA//8EAAAAAAAAAAAA//8BAP//AQABAAEA/////wEA/v///wAAAAACAAAAAAABAAAA//8AAP//AAACAP//////////AAAAAAEAAAAAAAEA//8AAAEAAQADAAIAAgAAAAAA/v///wEAAAAAAAEAAAAAAAEA//8AAAEAAQD//wAA//8AAAEAAAABAAEAAAABAP//AAD//wAAAgAAAP//AQD/////AAAAAP7/AgAAAAIAAAAAAAAAAAABAAAAAQABAP//AAABAP///v8AAP////8AAP//AAD//wAA//8BAP//AAD///7///8BAP7///8AAAIAAgABAAEA/v8AAP//AQADAAEAAAACAAEA/////////v///wEA/v////7/AAD+////AAAAAAAAAgAAAAAAAAD//wEAAAAAAAAAAQABAAIA/v8AAAAA//8AAAEAAAAAAP//AgD//wEA/////wAAAQACAAAAAAAAAP//AQD/////AQAAAAEA/v8AAAEAAQABAAEA///+////AQD//wEAAgD+//7/AAAAAAAAAQAAAAAAAQAAAAAAAAAAAP//AAD//wEAAQD//wAAAQABAP7///8AAP7/AAABAP7/AQABAAEAAAABAAEAAAD+/wIAAAABAAAAAQD/////AQACAP////8AAP//AQD//wEA/v8CAAEAAAAAAAAAAQAAAAIAAQAAAAEAAgD//wEAAAAAAP7///8BAP//AgAAAP///v8CAAAAAgD///////////7/AAACAAEAAgD//wAAAAABAP//AwAAAAMA//8AAAAAAQD+/wAAAAD//wAAAQD//wEA//8BAP7/AAABAAAA//8BAAAA//8AAP//AQADAP3////+////AgD+/////v8BAAEAAQACAAAAAAAAAAAA//8AAP//AAD+/wEA/v8AAP7/AAD//wAAAQACAAAAAQAAAP//AQAAAAAAAAABAAAAAAD+//////8AAAAAAAD//wAAAAABAAEA//8AAAEA//8AAP//AgD+/wAA///+/wAA/v///wAAAQABAAAAAQD//wAA//8AAAEA//8BAAAAAgABAP//AAACAAIAAQABAP//AAAAAAAA//8BAAIAAAABAAAA//8CAAEA/v//////AAAAAAEA////////AQAAAP//AAD//wAAAAAAAP3/AAAAAAEAAAACAAAAAAAAAP//AAD//wAAAAAAAAAAAAAAAP///v///wAAAAABAAAAAAD//wEAAAABAAEAAQD//wAAAAACAAAAAQD+/wAA//8BAAEAAAD+/wAA/////wAAAAABAAAAAAD//////v8AAAAA//8AAAAAAAAAAAIAAAABAAEAAAABAP7/AAD9//////////7///8BAP//AAD///3/AQABAP//AAD//wAAAAABAAAA//8AAP//AAD/////AQABAAEA//8AAAAA//8BAAMA//8AAAAA//8AAP7/AAD//wAAAAAAAP7/AQAAAAAA/v8CAP//AAABAAIAAQABAAAA//8BAAEAAQD///7/AQD//wAAAQABAP//AAD//wEAAAAAAAAAAQAAAAIA//8AAP////8AAP//AQD//////v///wEA/v8AAAIAAgACAAEAAAAAAAEAAAAAAAAAAAAAAAAAAQD//wAA/////wAAAQACAP////8AAAAAAAD//wAAAQD+/wEA//8AAAEAAwD//wEAAQAAAAAAAAABAP////8AAAAAAQAAAAAAAAAAAAEAAQAAAP////////7/AQABAAEAAQD///////8BAAAA//8AAAAAAgABAAEA/v8BAP7///8BAP3/AQABAAIAAAD//wEAAAAAAP//AAABAAIA//8CAAAAAQAAAAEA//8BAAAA/////wAAAAD//wEAAQD//wAAAAAAAP//AAAAAAAAAQABAAAAAQAAAP//AQD//////v8AAAEAAAAAAAAA//8AAAAAAAACAAEAAQAAAP//AAABAAEA/////wAAAgABAAAAAAAAAAEAAAABAP//AQABAP7////+/wEAAAAAAP//AAABAAAAAAABAAEAAAAAAAAA//8BAP///f/+/wEAAQD///7///8AAAAAAQAAAP////8AAAAAAAABAAAAAQD/////AAD//wEA//8AAAIA//8CAAAA//8AAAAAAAD+/wEAAAD+/wAA/////wAA////////AAAAAAAA//8BAAAAAAD//wAAAAD//wEA//8AAP//AQD+/wAAAAAAAP7/AAD+/wEAAQABAP//AAABAAEAAQD//wAA/////wEA//8AAAAAAgAAAAAA//8BAAAAAgAAAAAAAAAAAP7/AQD//wAAAAD+/wAAAAADAAIA/////wAAAQD//wIA//8BAAEA/v8AAAIAAAAAAP3///8AAAAAAAAAAAAAAAABAP///////wAA//8AAAEAAQABAAEAAQABAAAAAQAAAAAAAQABAP7/AQD//wAAAQABAAEA//8BAAAAAgAAAAEAAAABAP//AAD/////AAD//wIA/////wIAAAD///7/AAAAAAAAAAACAP//AAABAP////8AAAAAAAABAAAAAgAAAAAAAQD+/wEA/////wAA/////wAAAAAAAAAA/v//////AAAAAP//AAABAAAAAQAAAAIAAAACAAAA//8AAAAA//8AAP7/AAAAAP//AAACAP//AQABAP//AQABAAAA/////////v8AAP//AQAAAAAA///+/wAAAQD+/wEAAQAAAAEA/////wAAAQD//wAA//8AAAAA/v8BAAEA//8AAP7//v8BAAAAAAAAAAEA//8AAAEA/////wAAAAD//////////wEAAAABAAEA//8CAAEA/f8AAAAA//8BAAAABAABAAEAAQAAAAAAAAAAAP7///8AAAAA/v8BAAAA//8AAAIA//8AAP////8BAP//AAAAAAAAAAD/////AQD///7/////////AQD8////AgABAAIA////////AAD//wAAAAABAAAAAAAAAAEAAgAAAP//AQD//wAAAAAAAP/////+/wAAAAABAAAAAwABAP///////wEAAAADAP//AQACAAAA//8CAAEAAAAAAP///////wIAAAAAAAAAAQAAAAAAAgD//wEAAAABAAAA/v8AAAAAAAAAAAAAAAAAAAEA/v8AAP//AQD//wAA//////7///8AAAAAAAAAAP7/AQD//wAA//8AAAEAAAABAAEAAQD/////AAD//wEAAAD/////AQAAAAEAAAD//wEAAAD/////AgD//wAAAQD//////////wAAAAD//wAAAAABAAAAAAD//wAAAQD///7/AQD//wEAAAD/////AAD//wEA//8AAAEA//8CAAAAAQD//wEAAgAAAAEAAwAAAAAA/v8BAAEAAgD//wEAAAAAAAAAAAD//wEA//8AAAAAAQACAP///////wAAAQABAAEAAAAAAAEAAQD+/wEA/f////////8AAAAA//8AAAEA//8BAAAA/v///wEAAAAAAAEA/////wAAAAAAAP//AAAAAAIAAAABAAAA/////wAAAAD//wAA/v8AAAMAAQD+/wEAAAABAAEA//8BAP//AgAAAAAAAAD//wAA/////wEA/v8CAP3/AAACAP3/AQABAAAAAQACAAEA/v8AAAAA//8BAAAAAgAAAAAAAgACAAEA/v/9/wAAAQABAP7///8AAP//AgD+/////v8CAP////8BAP//AQACAAEAAQABAP//AAD///7/AAABAAEAAgD//wEA//8CAAEAAQABAAEAAAABAAAA/v8AAAEA/v8AAP//AAABAP//AQAAAAEAAgAAAAAA/v///wEAAQAAAAIAAAD/////AgAAAAEA/v8AAP7/AQAAAAAAAQAAAAEAAAACAAEA//8BAP////8AAAIAAAAAAP//AAAAAAIAAAAAAAAAAwABAP///v8BAAAAAAAAAP3/AAABAAEA/v////////////3//v8AAAAAAQABAAIAAAD+/////v8AAAAAAQABAAEAAQAAAP//AAAAAP//AQAAAP//AAABAAAAAAAAAAAA////////AAAAAP//AQD/////AAABAAEA//8CAP7///8AAP7//v8BAAEAAAD+/////////wEAAAAAAAAAAgD//wAAAQAAAP7/AQABAP//AQAAAAAAAAD/////AAACAP////8BAAAAAAD//wAA//8AAAEAAQABAAAAAAABAAAAAQD+/wEA/v8AAAEAAQD/////AAD//wAAAQABAP7//v//////AAACAAAAAAAAAAAAAAACAAAAAQAAAAAA//8BAP//AQD//wAA///+/wIAAQD//wAAAAD//wAA/v8AAP3///8AAAAAAAAAAAAA/f8AAAAA//8CAP7/AAD///7/AAAAAAAAAAD//wEAAAAAAAEAAAAAAAAA//8BAP////8BAP7///8CAAEA//8BAP3///////////8BAAAAAAAAAAEAAgD+//////8BAAMAAQADAAEAAAACAAAAAQD/////AAABAAMAAQAAAP//AQD//wAA//8AAAAA//8CAP7//////wAAAAAAAAIA/v8AAP//AAACAP//AwD//wAA//8AAP//AwD//wEAAQABAAEAAQACAAEAAAD//wAA//8AAAIAAAAAAP///////wAAAQD//wIA//8BAP7/AAD///////8AAAAAAAAAAAEAAAD//wAAAQD//wEA//8BAAAAAAD/////AgABAAIAAAABAAAAAAAAAP//AAAAAAAA//8AAAAAAAD/////AQAAAAAAAQD//wAA///+////AAAAAAEAAgABAAEAAAAAAP//AQAAAAAAAQD+/wAAAAABAAEAAAD/////AQABAP7///8AAAIAAAACAAAA//8AAP//AgACAAAA///+/wAAAAABAAAAAQAAAAEA/v8BAAEA//8CAP//AQD+/////v8AAAAAAAACAP//AAD+/wIA/v8BAAAAAAD/////AAAAAP7///8AAP7//////wEAAAABAAAAAAD//wAAAAAAAAAAAgACAAAAAAABAAAA/f8AAP7/AgAAAAEA//8BAAAAAAD///7/AQD//wAAAAAAAAEAAAAAAAEAAAAAAAAAAQAAAAAA//8AAAAAAAABAP///////wAAAgABAAEA//8AAP//AAACAP//AQABAAEA//8BAAAAAAABAAAA//8AAAEAAAAAAAIA/v8BAP//AQD//wEAAAABAAEAAQACAAEAAAAAAAEAAAABAAAAAAD/////AAABAAEA//8AAAAAAQABAP//AAAAAP//AAD/////AQD//wAAAAABAAEA//8BAAAA//8AAP///f/+/wAA/////wAAAQAAAAIAAAAAAAAAAAD+/wEA/f8CAAAA//8AAAEAAgAAAAMAAAABAAAAAAAAAP//AQAAAAAAAQABAAAAAQAAAP//AAAAAAAA//8AAAAAAAABAAAAAQAAAAAAAAABAAIAAAAAAP7/AQD//wAAAAD+////AAAAAAAAAAABAAAA/////wAA//8AAAAAAAD/////AgD//wAA//8CAP//AQACAAEA/f////////8BAAIAAQABAP//AAD//wAA///+////AAD+/wAAAQD/////AAAAAAAA/////wAAAAABAAAAAQAAAAAA//8AAAIAAAABAP//AQABAAEA//8AAAAAAAADAAEAAAABAP//AgD//wMA//8AAAAAAAD//wAAAAD9/wEA///+/wAA//8BAAEA//8BAAAA//8AAP///v8BAP///////////v8BAAAAAQABAAAAAAAAAAAA//8AAP7/AQAAAAAAAAAAAP7/AQAAAAAAAgABAAEAAAABAAEAAAAAAAAAAAD+/wAAAAD//wEAAAAAAAAAAAAAAP//AgABAAAAAAABAAEAAAD/////AAAAAP//AAABAP////8BAAAAAQABAP7//v/+////AQAAAAAAAQAAAAEAAgAAAAAAAQAAAAEAAAD+/////v8BAP//AAABAP//AQABAAAAAAD//wAA//8CAP//AAAAAAEAAAABAAAAAAAAAP//AAD+////AwAAAAAAAQD//wEAAAACAAEAAAADAAAAAAD/////AAAAAAEAAAABAAAA//8AAAEA//8BAP///v8AAP//AAD//wAAAQABAP//AQAAAAAA/////wEAAQAAAP////8AAAEA//8BAAAAAQAAAP////8AAAAAAQAAAAIAAQAAAAEAAAAAAAEAAAD//wEAAAAAAP////8AAAAA//8BAAEAAAAAAAIA///+/wIA/v8BAAAAAQACAAAAAQAAAP7///8AAP//AAAAAAEAAAAAAP7/AAD+////AAAAAAAAAAD//wAA/v8BAAMAAAABAAIAAgD//wAA//8BAAEA//8BAP7/AAAAAP7///8BAAAAAQAAAP7/AQD/////AAAAAAEAAAABAP//AQABAAAAAgABAAAAAAAAAP///////wEA//8AAAEA//8AAAAAAQAAAAIAAAABAP7//////wAAAQABAAAAAAABAAEA///+/wAA//8BAP///v8AAP///v8BAAAA//8CAAAAAQAAAAEAAQABAAAAAAD+/wAAAAD+/wAAAAAAAAAA/f////////8AAAAAAQABAP///////wEA//8BAAEAAAAAAAAA/////wEA/v//////AAAAAP//AAABAAAAAAD+/wAAAAD9////AQAAAAEAAwD//wEAAQAAAP//AgAAAAAAAAD+/wIAAAAAAAAAAAAAAAIA//8AAAEAAQACAAAAAQD//wAAAAD//wIAAQABAAAAAAD//wEA//8BAAEAAQAAAAAAAQABAP7/AAD//wEAAAACAP7/AQAAAAAAAAD//wIAAQACAAIAAQAAAAAAAAAAAP3///8BAAAAAQACAP//AgD9/wAAAAD//wEA/v////////8AAAAAAAD//wEAAQD//wMAAQAAAAEA//8AAAEA//8AAAAAAAACAAAAAAD//wAAAQD///////8AAAAA//8BAAIA/v8BAAEA/f8AAAAAAAAAAAAAAgD/////AAD+/wAAAAD//wAAAAAAAP//////////AgABAP///v8AAAIAAQAAAP//AAABAAAA/////wAAAAAAAAEAAAABAP///v///wIA//8BAAEAAQAAAAAA///+/wEAAAAAAAAA/////////v8BAP3/AAAAAAAAAAAAAAAA//8AAP//AAAAAP//AAABAAIAAAACAP////8DAAAAAAABAAAAAwABAP//AAABAP//AAAAAP////8BAAAAAgD//wAA///+/wAAAQD//wAA//8AAP7///8AAAAA/v8AAAAAAQD//wEA/v////////8AAAAAAQAAAP//AQACAAAAAAAAAP//AAD//wAAAAD//wAAAAD+/wAAAAAAAP//AQD//wAAAgAAAAAAAQABAAAAAwD+/wAAAAD///7/AQD//wIAAQAAAP//AAD//wAA//8CAAEAAAAAAAAA/////wAAAAD//wEAAQD///////8BAAAA//8BAAEAAAAAAAAA/v///wEAAAAAAAAAAAADAAAAAAAAAAAAAQABAAEAAAD+//7//v8AAP//AQAAAAAAAAABAAEAAgAAAAAAAQD//wAA/f8AAAAAAAABAAAAAQAAAAAAAAAAAAIA//8BAP///////wIA/////wAAAAABAAEA//8BAAAAAAD//wAAAQD//wEAAAAAAAIA/v8BAP//AAAAAAEAAAABAP//AAAAAAAAAQABAP7/AAABAAAAAQD//wIAAAAAAAEA///+/wAA//8AAP//AAAAAAAAAAABAP///////wIAAQAAAAEAAQAAAP7/AQAAAAAAAQAAAAAAAQD/////AQAAAAAA///+//7/AAD+/wEA//8AAAAA///+/wEAAAABAAIAAQABAAAA//8AAP//AAD//wAAAAD//wAAAAAAAP//AQAAAAAA////////AQAAAAAAAQD+////AQABAP7/AAD///7/AgD//wAAAAAAAP//AAAAAAEA//8BAAEAAgAAAAIAAAD//wEA/////wAAAQD///7/AQD//wEAAQD/////AAAAAAEAAgAAAAAAAQD//wEA//8AAP7//////wAA//8BAAEA//8BAAAAAQD/////AAABAP//AAACAP//AQAAAP//AAABAP////8AAAAAAAABAAEAAwABAAAAAgD//wAAAAD//wEAAAABAAAAAAABAAEA/////wAA//8AAAIAAAAAAAEAAQABAAEAAQABAP//AgAAAAAA//8BAP3//v///wAA//8AAAAAAQAAAP//AQD//wEAAAACAAIAAAABAAAA//8BAAEA//8BAP//AAAAAP//AQAAAAIAAAD//wAAAAAAAAEA////////AQAAAP//AQD//wAAAQD+/wEAAAABAP///v///wAAAAAAAP//AAAAAAIAAQD//wAAAgD+/wAAAAD//wAAAAABAP///P//////AAACAP////8AAAIAAAABAAAAAAAAAAAA//8AAAAAAQADAP//AQAAAAAAAAABAAEAAQAAAAAA/v8AAAAAAAD//wAAAQD//wAAAAD//wAA/v////////8CAAEA/v8BAP7/AAAAAAAA//8AAAEAAAD//wIAAQAAAAIAAQAAAAAAAAD///7/AQABAP//AAAAAP//AAACAAEA//8BAAAAAwAAAAAAAAD//wEAAAD//wAA///////////+/wAAAQABAAIAAAABAAEAAAD//wEAAAD/////AAD+/wIAAwABAAEA/v8BAAEAAAD//wAA//8AAP//AAAAAAEAAAAAAP//AAAAAAEAAQABAAEA/v///wAAAAD//wEAAAACAAAA/f/+/wAA/v///wAA//8AAAEAAQD///7/AAAAAAAAAAABAAAAAAACAAAAAAABAAAAAAABAP//AQD//wAA//8BAP7/AgABAAEAAQAAAAAAAQD//wEA/v8AAP////8AAP///////wIAAQD//wAAAAD//wAA/v///wAAAQD//wIA/////wEAAAAAAAIAAAABAAAAAAD//wEA//8AAAAA/////wAAAQAAAAAAAAD//wEAAQAAAAAAAAACAP///////wAAAgD//wAA/v8AAAIAAAAAAAEAAAABAP//AQABAAEAAQAAAP///v8BAAEAAAAAAP////8AAAAAAQD//wIAAQAAAAEAAAAAAAAA//8BAP//AAAAAP7//v///wEAAAAAAAIAAAAAAP//AAD//wEA//8BAAAAAAABAAEAAAABAP7///8AAAIAAAABAP//AAD//wEAAAAAAP//AAAAAAEAAAAAAAAAAAAAAP7/AQD//wAAAQD+/wEA/v8BAP7/AAABAAEAAAACAAIAAAADAAAA//8AAAEAAAABAP//AQD//wIA/////wEA//8AAAEA//8AAAEAAAAAAAAAAQABAAAAAAAAAAAAAAD//////////wAA//8AAP7/AAD+/wAAAQAAAAAA/////wAABAAAAAAA//8AAAEAAAAAAAAA/v8AAP//AAAAAAAAAAD//wAAAAD///////8BAAEAAAD/////AgABAAEA/v/+/wAAAQACAAEAAAD//wAAAwABAP//AgD+/wAA/v8AAAAAAAAAAAEA//8AAAEAAAD+/wEAAAAAAAEAAgAAAAEAAAABAP//AQD+/wIA/////wAAAQD//wAAAQD+/wAAAQABAAAA////////AAACAAAAAQAAAAIA//8BAP///v///wEA//8BAAEAAQD+/wAAAQD9/wAAAQAAAAEAAAABAAAAAgAAAP//AAD+/wAA/f8AAAAA////////AgAAAAcAAQD7/w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M//AADe////7f8BAAwA//8ZAAMALwAAACEA//8dAP3//v/9/+n////U//z/1v8BAOT/AAD+/wAAGwD+/ywA/v8kAAIAGAD///3////q/wEA0P///97/AADk/wAABAAAABUAAQAqAAEAKQAAABwAAAAFAP//6f8AANr////X/wAA4/8AAPj/AgAUAAAAKgD//ywAAAAcAP7/AQAAAOv/AADU/wAA2v8CAOP/AAABAAAAFgABABsAAAAqAAEAHwAAABQAAgDv/wEA3v///9H////f////7/8BAAoAAQApAAAALgD//yEAAQAIAAAA8P8BANr//v/V////4f8AAPf//v8UAAAAFAAAACYAAQAhAP7/GwD+//T/AADo/wIA1v8CANr/AgDp/wEABgAAAB8AAQAsAAEAJAAAAAwA///z/wEA3/8AANT/AADh/wEA9P///xQAAgASAAAAJQAAACEAAAAaAP//+v8BAOj////W////2P8BAOf///8DAAAAHwAAAC4AAAAlAAAAEgAAAPL/AQDm////0f8CAN3/AADr//7/EQD//xAAAQAhAAIAJQAAAB8AAAABAP//6v8CAN//AQDX/wAA4/8AAPr/AAAXAAAAKgABACgAAAAbAP///f8AAOj/AADU/wAA2v///+f/AQANAAMAEQD+/xwA/v8kAP7/IQABAAgA/v/p////5/8AANf/AQDd/wEA8v8BABMAAQAjAAAALgAAACAAAQADAAEA7f8BANn/AgDY//7/4P/+/wEAAAAXAAIAFAAFACUA/P8jAP//EgAAAO//AQDo////1/8AAN3/AADx//7/DgAAAB0AAQAoAAAAIwAAAAoAAQDv/wMA4f8AANn/AQDi/wEA+v///xgAAAAQAP3/IwD//yUA/v8XAAAA7/8AAOv/AADc/wAA3P/+/+v/AQALAAEAGgACACkAAAAkAP7/EAABAO/////q//7/1/8AANz/AgDw/wEAEgD//w8AAAAcAAIAJQAAAB0AAAD2////7P8AAOP/AgDa/wAA5P8BAAQAAQAWAAAAIgAAACMAAAAaAP//+P///+v/AQDZ/wAA2////+7/AAARAAAADgAAABYAAAAhAAAAIAABAPz/AQDt/wAA5P8AANr/AQDg/wEA/P8BABcAAAAhAP//KQD//xwAAAD8/wEA7v8AAN3////Z/wAA6f8BAA0AAAARAAEAEQAAACMAAAAgAAEA/f8CAO3/AADv/wAA3v8BANv////1////EgAAABkA//8nAAAAIgAAAAMAAADu/wAA6P8CANn/AQDg////BQD//xMAAQAOAP//IAABACYAAAAGAAAA6f////H/AADg/wEA2f8AAO3///8PAAAAFQACACQAAAAkAAEADQABAO//AADp/wAA2////9z/AQD7/wEAFgAAAAwAAQAXAP7/JQD9/xMAAADx/wAA8f8AAOr/AADc/wEA4/8BAAkAAAAVAAAAIQD//yYA//8UAAEA9P8BAOz/AADf/wAA3P8AAPP/AAAQAAAADQABAA0AAAAlAAEAGAD///H//v/0/wEA7v8CAN//AADg//3/BAACABUAAQAfAAAAJwABABgAAQD0//7/7f///+L/AADa/wIA8P///w4A//8SAAMACQAAACAAAQAgAP//+v////P////y/wEA4/8BANr/AQD9/wAAEwD//xkAAQAjAAAAIgABAPz////s/wAA6v8BANX/AQDr//7/BwABABMAAAAHAP//FwAAACYAAAD//wEA9P8BAPb/AQDu////2v8BAPn/AAATAP//FwD//yEAAAAjAAAAAgAAAOn/AQDr//7/2P8CAOT/AAABAP//FgABAAUAAQATAP//IwAAAAEAAgDy/wEA9/8AAPb/AADb/wAA6/8BABAAAAATAP7/IQAAACYA//8UAP//7/8AAPD/AADd/wEA3P/+//7///8OAAAACgAAAAgAAAAhAP//CQACAPT/AQD2/wAA9v///97////m/wIADgABABMAAQAfAP//JwAAABMAAADw/wAA8P///+r/AQDb/wAA9f8AAA8AAAARAAIABAD//wYA/v8HAAAAAQD//wMAAgAGAAAA7f8AAOz/AAALAP//DwACABQA//8bAAAAHgD///f/AADq/wEA6/8BANj//v/t/wAACAD+/xAAAgAEAAAABAABAAcAAQADAAAA//8AAAUA///1/wAA5f///wIAAAAOAAAAEAAAABsAAAAhAAAA/v8BAOj////y////3f8AAOf/AQAGAAEADAAAAAcA//8BAP//CQABAAMA//8BAP//BQAAAAAAAADo/wAA+/8AAAoAAAALAAAAFAAAACAAAQAGAAIA7f8BAPH/AADm/wMA3P8CAP7/AgASAP//CgD//wAAAAAIAP//BQD//wEAAAACAP7/BAAAAPz/AwD8////BAAAAAEA//8HAAAAHQAAAAgA/v/x//7/8f///+f/AQDg/////P///woAAAAMAP//AAABAAYA//8EAAAAAgAAAAUAAAACAAAAAwAAAAIAAAABAAAAAQABAAAAAgAcAP//DgD///T/AQDx/wAA9P8CAOH/AAD3/wAACQAAAAoAAQABAP//AwAAAAcAAAD+/wAAAgACAAEAAAD+////AwD+/wAAAAABAP//+v8BABEAAQATAAAA9f/+//L//f/z/wIA6f8AAPb/AQAFAP//DAAAAAAAAAAFAP//BQD//wEA//8DAAEAAQAAAP7///8AAAAA//8BAAIAAAD+/wAAEAABABYAAgD6/wEA8v8BAPX/AwDp/wAA8////wMA//8JAAEABAABAAEA//8FAAEA//8AAAMAAQACAP//AQAAAAEAAgAFAP//AQABAAAAAQAAAP//EQABAAAAAAD5/wEA+P8AAPr////6/wAA+/8BAAIA//8BAAAA//8CAAUA//8BAP7/AAABAAEAAgAAAAAAAwAAAAEA/v8DAAIAAAACAAQA//8TAAAA/P8BAPr////3//////8AAPz/AQD7/wEAAgD/////AAABAAEABAAAAP//////////AAAAAAAAAAADAAAAAwAAAAAA//8EAP///v/+/xAA//8HAAAA+/////j/AQD8////AAD///n///8AAAAA//8AAP////8DAP//AgAAAAAAAAACAAIAAAD+/wAAAQD//wAA/////wIAAgD9////CQACAAYA///9////+f8BAPr/AQAAAAIA/v///wAA//8AAAAAAAAAAAEAAAABAAAAAgAAAAEAAAAAAAEAAQABAAAAAgABAP//AAD//wEAAAD///////8BAAIAAQAAAAAA/v/+//////8BAAAAAQABAP//AAD///////8BAAAAAQABAP////8CAAEAAQD//wEA/v//////AQAAAAAAAAAAAAAAAAD9/wMA/////wAAAQD+/wEA/v/+//7/AQD//wMAAAAAAAAAAAABAAEA//////7/AAACAP3/AAD//wAAAQAAAP//AQD//wAAAAAAAAEA//8CAP//AAAAAAAA/v8AAAAA//8BAP//AAABAP//AAAAAP//AQD//wAAAQABAAAAAAABAAEA/v///wAAAAD//////////wAAAAAAAP//AAD////////8/wIAAAADAAEA/////wEA/v8BAP7/AgAAAAEAAgAAAP//AgD/////AQD//wEA//////7/AQD//wMAAAAAAAAA//8CAP//AQAAAP//AAACAAAAAAABAP//AQD+/wAA/////wAA/f///wAAAAAAAP7/AAAAAAAAAgD//wEAAQACAP//AAAAAAEAAQD//wAAAAAAAAAA//8BAAMA/v8AAP7/AQAAAAAAAQAAAAAA///+//7/AAAAAAAA//8BAP7/AQAAAP//AQABAAAAAQAAAP//AAD//wIA/v///wAAAQABAP//AAD//wEA//8BAP//AgAAAP///////wAAAQABAP//AwABAAAAAAAAAAAA/////wIAAwACAAAA/v8BAAAAAAAAAAAA//8AAP////8AAAAA/////wAA/////wEA/v8CAAEAAQD//wAAAAABAAAAAAD//wEAAQABAAAA//8CAAAAAAAAAP7/AAABAAAAAQABAAAAAgABAAAAAQD//wEAAwD+/wAA/v8AAAEAAAAAAAAAAAAAAAEAAAD//wMA/v///wAAAAACAAEAAAAAAP7///8DAAEAAQD//wEA/f8BAAEAAQD//wEAAQABAAMAAgAAAAEA//8AAP//BAAAAAIA/v//////AQABAAAAAAD//wEAAAACAAIAAQAAAAAAAgAAAAAAAAABAAIAAAABAAIAAQAAAP////8AAAAAAAD//wAAAQACAP//AAAAAAAAAQAAAAEA//8AAAAAAAD/////AQD//wAAAQD9////AQAAAAAA//8BAAAA///+/////v8BAAAAAQAAAAAAAAAAAAIA//8BAAAAAAACAP//AQD//wAAAAD/////AAD9/wAAAAACAAAAAgAAAAEAAQABAAEAAAAAAAEA//8AAAEAAQACAAAAAQAAAAEA//8BAAIAAAACAP//AAABAAAAAAAAAAAAAAD//wAAAQD/////AAAAAP////8AAAEAAAAAAP7///8BAAIAAQD//wEAAQAAAP//AgAAAAAAAAD//wAA//8CAP7/AQAAAP7/AAD+////AAAAAAAAAQABAAAA//8AAAEAAAABAP7/AAAAAP7/AAD+/wAAAQABAAEA/////////v8BAP///v///wIAAAAAAAAAAQAAAAIAAQAAAAAAAAABAAEAAAAAAAAAAAD//wEAAQD//wAAAQABAAAA/v/+/////////wAAAAD//wAAAAD/////AAAAAP7/AAD//wIA//8CAP//AQAAAP////8AAAAAAQABAP////8AAP//AQACAAAAAQAAAAAAAAAAAAAA//8BAAAAAAD+/wAA/v///wEAAAD+//7///8CAP7/AAABAP3/AwAAAAAAAAABAAIAAAABAAAAAQABAAIAAAAAAP//AAAAAAEAAAACAAEAAAACAAAAAAABAAAAAwAAAAAAAAD+/wAAAQD9//////8BAAAA/v8AAAAAAAAAAAAAAAD//wMA/v8BAAEAAQACAAAA/v8BAP//AwABAAIAAQABAP//AQAAAAEAAAAAAAEA//8AAAAAAAD/////AAABAAEAAAAAAP////8AAAAAAAAAAAAA/v8AAP//AQAAAP//AAABAAIAAQAAAAAAAgABAAAA/////wAAAQABAP//AQABAAEA/////wAAAAAAAAAAAAABAAEAAQAAAAAAAAAAAAAA//8AAP7/AQD9/wAAAgD//wEAAQABAAEA/v8AAAEA/////wAAAAAAAP//AAABAAAAAAAAAAAA//8CAP//AAABAAEAAQABAAAA//8BAAIAAgD//wAA/v8AAAEAAAD///7/AAAAAAEAAAABAAAAAQABAAAAAQACAAAA///+/wAAAQABAP7////+/wAA//8AAAAAAgAAAP//AQD9/wAAAAD//wAA//8AAAAAAQAAAAAAAQD//wAAAAAAAP//AQABAAAA/v8CAP//AAD///////8AAAAAAAACAAEA//8BAP7/AAAAAAEA//8BAAAAAQD//wAAAQD+/wAA/////wAAAAD//wAAAQABAAAA//8AAAEA/////wAA//8AAAAA/v/+/wEAAgABAP//AgD//wIA/////wAA//8AAAEAAQAAAAAAAQAAAAMAAAACAP//",showCount:!0},audio:{disabled:!0,defaultToggledOn:!1,language:"en-US",voiceNames:["Microsoft David - English (United States)","Alex (English - United States)"],rate:1,volume:1,icon:Sf,iconDisabled:Cf},chatHistory:{disabled:!1,maxEntries:30,storageKey:"rcb-history",storageType:"LOCAL_STORAGE",viewChatHistoryButtonText:"Load Chat History โŸณ",chatHistoryLineBreakText:"----- Previous Chat History -----",autoLoad:!1},chatInput:{disabled:!1,allowNewline:!1,enabledPlaceholderText:"Type your message...",disabledPlaceholderText:"",showCharacterCount:!1,characterLimit:-1,botDelay:1e3,sendButtonIcon:xf,blockSpam:!0,sendOptionOutput:!0,sendCheckboxOutput:!0,buttons:[Fe.VOICE_MESSAGE_BUTTON,Fe.SEND_MESSAGE_BUTTON]},chatWindow:{showScrollbar:!1,showTypingIndicator:!0,autoJumpToBottom:!1,showMessagePrompt:!0,messagePromptText:"New Messages โ†“",messagePromptOffset:30,defaultOpen:!1},sensitiveInput:{maskInTextArea:!0,maskInUserBubble:!0,asterisksCount:10,hideInUserBubble:!1},userBubble:{animate:!0,showAvatar:!1,avatar:"data:image/svg+xml,%3csvg%20width='140'%20height='140'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cy='60.044'%20cx='70'%20fill='%235c5c5c'%20r='29'/%3e%3cpath%20d='m16.36%20156.186-.01-30.5c-.005-16.844%2024.168-30.507%2053.991-30.516%2029.823-.009%2054.004%2013.64%2054.01%2030.484l.008%2030.5-108%20.032z'%20fill='%235c5c5c'/%3e%3c/svg%3e",simulateStream:!1,streamSpeed:30},botBubble:{animate:!0,showAvatar:!1,avatar:oa,simulateStream:!1,streamSpeed:30},voice:{disabled:!0,defaultToggledOn:!1,language:"en-US",timeoutPeriod:1e4,autoSendDisabled:!1,autoSendPeriod:1e3,sendAsAudio:!1,icon:Ef,iconDisabled:_f},footer:{text:I("div",{style:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",columnGap:3},onClick:()=>window.open("https://react-chatbotify.com","_blank","noopener,noreferrer"),children:[I("span",{children:"Powered By "},0),I("div",{style:{borderRadius:"50%",width:14,height:14,display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to right, #42b0c5, #491d8d)"},children:I(ia,{style:{width:"80%",height:"80%",fill:"#fff"}})},1),I("span",{style:{fontWeight:"bold"},children:" React ChatBotify"},2)]}),buttons:[Fe.FILE_ATTACHMENT_BUTTON,Fe.EMOJI_PICKER_BUTTON]},fileAttachment:{disabled:!1,multiple:!0,accept:".png",icon:la,iconDisabled:la,sendFileName:!0,showMediaDisplay:!1},emoji:{disabled:!1,icon:sa,iconDisabled:sa,list:["๐Ÿ˜€","๐Ÿ˜ƒ","๐Ÿ˜„","๐Ÿ˜…","๐Ÿ˜Š","๐Ÿ˜Œ","๐Ÿ˜‡","๐Ÿ™ƒ","๐Ÿคฃ","๐Ÿ˜","๐Ÿฅฐ","๐Ÿฅณ","๐ŸŽ‰","๐ŸŽˆ","๐Ÿš€","โญ๏ธ"]},toast:{maxCount:3,forbidOnMax:!1,dismissOnClick:!0},event:{rcbPreInjectMessage:!1,rcbPostInjectMessage:!1,rcbStartSimulateStreamMessage:!1,rcbStopSimulateStreamMessage:!1,rcbStartStreamMessage:!1,rcbChunkStreamMessage:!1,rcbStopStreamMessage:!1,rcbRemoveMessage:!1,rcbSaveChatHistory:!1,rcbLoadChatHistory:!1,rcbToggleChatWindow:!1,rcbStartSpeakAudio:!1,rcbToggleAudio:!1,rcbToggleNotifications:!1,rcbToggleVoice:!1,rcbChangePath:!1,rcbShowToast:!1,rcbDismissToast:!1,rcbUserSubmitText:!1,rcbUserUploadFile:!1,rcbTextAreaChangeValue:!1,rcbPreLoadChatBot:!1,rcbPostLoadChatBot:!1,rcbPreProcessBlock:!1,rcbPostProcessBlock:!1},ariaLabel:{chatButton:"open chat",audioButton:"toggle audio",closeChatButton:"close chat",emojiButton:"emoji picker",fileAttachmentButton:"upload file",notificationButton:"toggle notifications",sendButton:"send message",voiceButton:"toggle voice",inputTextArea:"input text area"},device:{desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!0}},ca=Ct({settings:{},setSyncedSettings:()=>null,syncedSettingsRef:{current:{}}}),Ae=()=>wt(ca),Pf=({children:e,settings:t=aa,setSyncedSettings:n,syncedSettingsRef:r})=>I(ca.Provider,{value:{settings:t,setSyncedSettings:n,syncedSettingsRef:r},children:e}),ua={tooltipStyle:{},notificationBadgeStyle:{},chatWindowStyle:{},headerStyle:{},bodyStyle:{},chatInputContainerStyle:{},chatInputAreaStyle:{},chatInputAreaFocusedStyle:{},chatInputAreaDisabledStyle:{},userBubbleStyle:{},botBubbleStyle:{},botOptionStyle:{},botOptionHoveredStyle:{},botCheckboxRowStyle:{},botCheckboxNextStyle:{},botCheckMarkStyle:{},botCheckMarkSelectedStyle:{},characterLimitStyle:{},characterLimitReachedStyle:{},chatHistoryLineBreakStyle:{},chatMessagePromptStyle:{},chatMessagePromptHoveredStyle:{},footerStyle:{},loadingSpinnerStyle:{},mediaDisplayContainerStyle:{},chatButtonStyle:{},chatButtonHoveredStyle:{},chatHistoryButtonStyle:{},chatHistoryButtonHoveredStyle:{},sendButtonStyle:{},sendButtonHoveredStyle:{},sendButtonDisabledStyle:{},audioButtonStyle:{},audioButtonDisabledStyle:{},closeChatButtonStyle:{},emojiButtonStyle:{},emojiButtonDisabledStyle:{},fileAttachmentButtonStyle:{},fileAttachmentButtonDisabledStyle:{},notificationButtonStyle:{},notificationButtonDisabledStyle:{},voiceButtonStyle:{},voiceButtonDisabledStyle:{},chatIconStyle:{},audioIconStyle:{},audioIconDisabledStyle:{},closeChatIconStyle:{},emojiIconStyle:{},emojiIconDisabledStyle:{},fileAttachmentIconStyle:{},fileAttachmentIconDisabledStyle:{},notificationIconStyle:{},notificationIconDisabledStyle:{},voiceIconStyle:{},voiceIconDisabledStyle:{},sendIconStyle:{},sendIconDisabledStyle:{},sendIconHoveredStyle:{},rcbTypingIndicatorContainerStyle:{},rcbTypingIndicatorDotStyle:{},toastPromptContainerStyle:{},toastPromptStyle:{},toastPromptHoveredStyle:{}},Aa=Ct({styles:{},setSyncedStyles:()=>null,syncedStylesRef:{current:{}}}),Ee=()=>wt(Aa),Df=({children:e,styles:t=ua,setSyncedStyles:n,syncedStylesRef:r})=>I(Aa.Provider,{value:{styles:t,setSyncedStyles:n,syncedStylesRef:r},children:e}),If=({buttons:e})=>{var t,n,r,o,i,l,s;const{settings:a}=Ae(),{styles:c}=Ee(),u={backgroundImage:`linear-gradient(to right, ${(t=a.general)==null?void 0:t.secondaryColor},
2
+ ${(n=a.general)==null?void 0:n.primaryColor})`,...c.headerStyle};return I("div",{style:u,className:"rcb-chat-header-container",children:[I("div",{className:"rcb-chat-header",children:[((r=a.header)==null?void 0:r.showAvatar)&&I("div",{style:{backgroundImage:`url("${(o=a.header)==null?void 0:o.avatar}")`},className:"rcb-bot-avatar"}),pn((i=a.header)==null?void 0:i.title)?(l=a.header)==null?void 0:l.title:I("div",{style:{margin:0,fontSize:20,fontWeight:"bold"},children:(s=a.header)==null?void 0:s.title})]}),I("div",{className:"rcb-chat-header",children:e==null?void 0:e.map((A,d)=>I(ge,{children:A},d))})]})},da=Ct({}),We=()=>wt(da),Bf=({children:e,botIdRef:t,flowRef:n})=>{const r=le(null),o=le(""),i=le(null),l=le(new Map),s=le(null),a=le(""),c=le(!1),u=le(null),A=le(null),d=le(null);return I(da.Provider,{value:{botIdRef:t,flowRef:n,inputRef:r,timeoutIdRef:i,streamMessageMap:l,chatBodyRef:s,paramsInputRef:a,keepVoiceOnRef:c,audioContextRef:u,audioBufferRef:A,gainNodeRef:d,prevInputRef:o},children:e})},pt=e=>{const[t,n]=ne(e),r=le(e);return[t,o=>{const i=typeof o=="function"?o(r.current):o;r.current=i,n(i)},r]},fa=Ct({}),$e=()=>wt(fa),Tf=({children:e,settings:t})=>{var n,r,o,i,l,s;const[a,c,u]=pt(!1),[A,d,f]=pt(((n=t==null?void 0:t.chatWindow)==null?void 0:n.defaultOpen)??!1),[p,v,h]=pt(((r=t==null?void 0:t.audio)==null?void 0:r.defaultToggledOn)??!1),[w,b,g]=pt(((o=t==null?void 0:t.voice)==null?void 0:o.defaultToggledOn)??!1),[k,_,E]=pt(((i=t==null?void 0:t.notification)==null?void 0:i.defaultToggledOn)??!0),[P,x]=ne(!1),[B,D]=ne(!1),[T,C,L]=pt(!1),[H,R,Q]=pt(!0),[M,O,m]=pt(!1),[G,y]=ne(!1),[q,re]=ne(!1),[Z,ce]=ne(0),[Oe,ye]=ne(0),[st,Ue]=ne(!1),[Ve,Y]=ne(((l=window.visualViewport)==null?void 0:l.height)??window.innerHeight),[$,we]=ne(((s=window.visualViewport)==null?void 0:s.width)??window.innerWidth);return I(fa.Provider,{value:{isBotTyping:a,setSyncedIsBotTyping:c,syncedIsBotTypingRef:u,isChatWindowOpen:A,setSyncedIsChatWindowOpen:d,syncedIsChatWindowOpenRef:f,audioToggledOn:p,setSyncedAudioToggledOn:v,syncedAudioToggledOnRef:h,voiceToggledOn:w,setSyncedVoiceToggledOn:b,syncedVoiceToggledOnRef:g,notificationsToggledOn:k,setSyncedNotificationsToggledOn:_,syncedNotificationsToggledOnRef:E,isLoadingChatHistory:P,setIsLoadingChatHistory:x,hasChatHistoryLoaded:B,setHasChatHistoryLoaded:D,isScrolling:T,setSyncedIsScrolling:C,syncedIsScrollingRef:L,textAreaDisabled:H,setSyncedTextAreaDisabled:R,syncedTextAreaDisabledRef:Q,textAreaSensitiveMode:M,setSyncedTextAreaSensitiveMode:O,syncedTextAreaSensitiveModeRef:m,hasInteractedPage:G,setHasInteractedPage:y,hasFlowStarted:q,setHasFlowStarted:re,unreadCount:Z,setUnreadCount:ce,inputLength:Oe,setInputLength:ye,blockAllowsAttachment:st,setBlockAllowsAttachment:Ue,viewportHeight:Ve,setViewportHeight:Y,viewportWidth:$,setViewportWidth:we},children:e})};var V=(e=>(e.START_SPEAK_AUDIO="rcb-start-speak-audio",e.TOGGLE_AUDIO="rcb-toggle-audio",e.TOGGLE_NOTIFICATIONS="rcb-toggle-notifications",e.TOGGLE_VOICE="rcb-toggle-voice",e.TOGGLE_CHAT_WINDOW="rcb-toggle-chat-window",e.PRE_INJECT_MESSAGE="rcb-pre-inject-message",e.POST_INJECT_MESSAGE="rcb-post-inject-message",e.START_SIMULATE_STREAM_MESSAGE="rcb-start-simulate-stream-message",e.STOP_SIMULATE_STREAM_MESSAGE="rcb-stop-simulate-stream-message",e.START_STREAM_MESSAGE="rcb-start-stream-message",e.CHUNK_STREAM_MESSAGE="rcb-chunk-stream-message",e.STOP_STREAM_MESSAGE="rcb-stop-stream-message",e.REMOVE_MESSAGE="rcb-remove-message",e.SAVE_CHAT_HISTORY="rcb-save-chat-history",e.LOAD_CHAT_HISTORY="rcb-load-chat-history",e.CHANGE_PATH="rcb-change-path",e.SHOW_TOAST="rcb-show-toast",e.DISMISS_TOAST="rcb-dismiss-toast",e.USER_SUBMIT_TEXT="rcb-user-submit-text",e.USER_UPLOAD_FILE="rcb-user-upload-file",e.TEXT_AREA_CHANGE_VALUE="rcb-text-area-change-value",e.PRE_LOAD_CHATBOT="rcb-pre-load-chatbot",e.POST_LOAD_CHATBOT="rcb-post-load-chatbot",e.PRE_PROCESS_BLOCK="rcb-pre-process-block",e.POST_PROCESS_BLOCK="rcb-post-process-block",e))(V||{});const Mf={[V.START_SPEAK_AUDIO]:!0,[V.TOGGLE_AUDIO]:!0,[V.TOGGLE_VOICE]:!0,[V.TOGGLE_NOTIFICATIONS]:!0,[V.TOGGLE_CHAT_WINDOW]:!0,[V.PRE_INJECT_MESSAGE]:!0,[V.POST_INJECT_MESSAGE]:!1,[V.PRE_LOAD_CHATBOT]:!0,[V.POST_LOAD_CHATBOT]:!1,[V.START_SIMULATE_STREAM_MESSAGE]:!0,[V.STOP_SIMULATE_STREAM_MESSAGE]:!1,[V.START_STREAM_MESSAGE]:!0,[V.CHUNK_STREAM_MESSAGE]:!0,[V.STOP_STREAM_MESSAGE]:!0,[V.REMOVE_MESSAGE]:!0,[V.SAVE_CHAT_HISTORY]:!0,[V.LOAD_CHAT_HISTORY]:!0,[V.CHANGE_PATH]:!0,[V.SHOW_TOAST]:!0,[V.DISMISS_TOAST]:!0,[V.USER_SUBMIT_TEXT]:!0,[V.USER_UPLOAD_FILE]:!0,[V.TEXT_AREA_CHANGE_VALUE]:!0,[V.PRE_PROCESS_BLOCK]:!0,[V.POST_PROCESS_BLOCK]:!0},li=async(e,t,n)=>{const r=new CustomEvent(e,{detail:t,cancelable:Mf[e]});return r.data=n,r.promises=[],window.dispatchEvent(r),await Promise.all(r.promises),r},pa=Ct({paths:[],setSyncedPaths:()=>{},syncedPathsRef:{current:[]}}),ar=()=>wt(pa),Of=({children:e})=>{const[t,n,r]=pt([]);return I(pa.Provider,{value:{paths:t,setSyncedPaths:n,syncedPathsRef:r},children:e})},Pt=()=>{const{botIdRef:e}=We(),{syncedPathsRef:t}=ar(),n=X(()=>t.current.length>0?t.current.at(-1)??null:null,[]),r=X(()=>t.current.length>1?t.current.at(-2)??null:null,[]);return{dispatchRcbEvent:X(async(o,i)=>{const l={botId:e.current,currPath:n(),prevPath:r()};return await li(o,l,i)},[e])}},ht=()=>{const{settings:e}=Ae(),{isChatWindowOpen:t,setSyncedIsChatWindowOpen:n,viewportHeight:r,setViewportHeight:o,viewportWidth:i,setViewportWidth:l,setUnreadCount:s,setSyncedIsBotTyping:a,setSyncedIsScrolling:c,syncedIsBotTypingRef:u,syncedIsChatWindowOpenRef:A}=$e(),{chatBodyRef:d}=We(),{dispatchRcbEvent:f}=Pt(),p=X(()=>{if(!d.current)return!1;const g=d.current.getBoundingClientRect(),k=window.innerHeight??document.documentElement.clientHeight,_=window.innerWidth??document.documentElement.clientWidth;return g.top>=0&&g.left>=0&&g.bottom<=k&&g.right<=_},[d]),v=X(async g=>{var k;g!==A.current&&((k=e.event)!=null&&k.rcbToggleChatWindow&&(await f(V.TOGGLE_CHAT_WINDOW,{currState:A.current,newState:!A.current})).defaultPrevented||n(_=>(_||s(0),!_)))},[A]),h=X(async g=>{g!==u.current&&a(k=>!k)},[u]),w=X((g,k,_,E)=>(g/=E/2)<1?_/2*g*g+k:-_/2*(--g*(g-2)-1)+k,[]),b=X((g=0)=>{if(!d.current)return;const k=d.current.scrollHeight-d.current.clientHeight;if(g<=0)return d.current.scrollTop=k,void c(!1);const _=d.current.scrollTop,E=k-_;let P=0;const x=()=>{if(!d.current)return;P+=20;const B=w(P,_,E,g);d.current.scrollTop=B,P<g?requestAnimationFrame(x):c(!1)};x()},[d]);return{isChatWindowOpen:t,setSyncedIsChatWindowOpen:n,toggleChatWindow:v,viewportHeight:r,setViewportHeight:o,viewportWidth:i,setViewportWidth:l,toggleIsBotTyping:h,scrollToBottom:b,getIsChatBotVisible:p}},Qf=()=>{var e,t,n;const{settings:r}=Ae(),{styles:o}=Ee(),{unreadCount:i,isScrolling:l}=$e(),{chatBodyRef:s}=We(),{scrollToBottom:a}=ht(),[c,u]=ne(!1),A={color:(e=r.general)==null?void 0:e.primaryColor,borderColor:(t=r.general)==null?void 0:t.primaryColor,...o.chatMessagePromptHoveredStyle};return I("div",{className:"rcb-message-prompt-container "+(s.current&&((d=r.chatWindow)!=null&&d.showMessagePrompt)&&l&&i>0?"visible":"hidden"),children:I("div",{onMouseEnter:()=>{u(!0)},onMouseLeave:()=>{u(!1)},style:c?A:{...o.chatMessagePromptStyle},onMouseDown:f=>{f.preventDefault(),a(600)},className:"rcb-message-prompt-text",children:(n=r.chatWindow)==null?void 0:n.messagePromptText})});var d},ha=Ct({messages:[],setSyncedMessages:()=>{},syncedMessagesRef:{current:[]}}),si=()=>wt(ha),Lf=({children:e})=>{const[t,n,r]=pt([]);return I(ha.Provider,{value:{messages:t,setSyncedMessages:n,syncedMessagesRef:r},children:e})},Nf=({message:e,isNewSender:t})=>{var n,r,o,i,l,s;const{settings:a}=Ae(),{styles:c}=Ee(),u=typeof e.content=="string",A=e.content,d=e.contentWrapper?I(e.contentWrapper,{children:A}):A,f={backgroundColor:(n=a.general)==null?void 0:n.primaryColor,color:"#fff",maxWidth:(r=a.userBubble)!=null&&r.showAvatar?"65%":"70%",...c.userBubbleStyle},p=(o=a.userBubble)!=null&&o.animate?"rcb-user-message-entry":"",v=((i=a.userBubble)==null?void 0:i.showAvatar)&&t,h="rcb-user-message"+(!t&&(l=a.userBubble)!=null&&l.showAvatar?" rcb-user-message-offset":"");return I("div",{className:"rcb-user-message-container",children:[u?I("div",{style:f,className:`${h} ${p}`,children:d}):I(ge,{children:d}),v&&I("div",{style:{backgroundImage:`url("${(s=a.userBubble)==null?void 0:s.avatar}")`},className:"rcb-message-user-avatar"})]})},Rf=({message:e,isNewSender:t})=>{var n,r,o,i,l,s;const{settings:a}=Ae(),{styles:c}=Ee(),u=typeof e.content=="string",A=e.content,d=e.contentWrapper?I(e.contentWrapper,{children:A}):A,f={backgroundColor:(n=a.general)==null?void 0:n.secondaryColor,color:"#fff",maxWidth:(r=a.botBubble)!=null&&r.showAvatar?"65%":"70%",...c.botBubbleStyle},p=(o=a.botBubble)!=null&&o.animate?"rcb-bot-message-entry":"",v=((i=a.botBubble)==null?void 0:i.showAvatar)&&t,h="rcb-bot-message"+(!t&&(l=a.botBubble)!=null&&l.showAvatar?" rcb-bot-message-offset":"");return I("div",{className:"rcb-bot-message-container",children:[v&&I("div",{style:{backgroundImage:`url("${(s=a.botBubble)==null?void 0:s.avatar}")`},className:"rcb-message-bot-avatar"}),u?I("div",{style:f,className:`${h} ${p}`,children:d}):I(ge,{children:d})]})},Ff=()=>{var e,t,n;const{settings:r}=Ae(),{styles:o}=Ee(),i=(e=r.botBubble)!=null&&e.animate?"rcb-bot-message-entry":"";return I("div",{className:"rcb-bot-message-container",children:[((t=r.botBubble)==null?void 0:t.showAvatar)&&I("div",{style:{backgroundImage:`url("${(n=r.botBubble)==null?void 0:n.avatar}")`},className:"rcb-message-bot-avatar"}),I("div",{onMouseDown:l=>{l.preventDefault()},className:`rcb-bot-message ${i}`,children:I("div",{className:"rcb-typing-indicator",style:{...o==null?void 0:o.rcbTypingIndicatorContainerStyle},children:[I("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),I("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),I("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}})]})})]})},Hf=()=>{var e,t,n;const{settings:r}=Ae(),{styles:o}=Ee(),{messages:i}=si(),{scrollToBottom:l}=ht(),{isBotTyping:s,syncedIsScrollingRef:a}=$e(),{chatBodyRef:c}=We(),u={...o==null?void 0:o.bodyStyle,scrollbarWidth:(e=r.chatWindow)!=null&&e.showScrollbar?"auto":"none"};return ee(()=>{a.current||l()},[(t=c.current)==null?void 0:t.scrollHeight]),I("div",{style:u,className:"rcb-chat-body-container",ref:c,children:[i.map((A,d)=>{const f=(p=>p===0||i[p].sender!==i[p-1].sender)(d);return A.sender.toUpperCase()==="USER"?I(Nf,{message:A,isNewSender:f},d):A.sender.toUpperCase()==="BOT"?I(Rf,{message:A,isNewSender:f},d):I("div",{children:A.content},d)}),s&&((n=r.chatWindow)==null?void 0:n.showTypingIndicator)&&I(Ff,{}),I(Qf,{})]})},Uf=({checkboxes:e,checkedItems:t,path:n})=>{var r,o,i,l,s,a,c,u,A,d,f;const{settings:p}=Ae(),{styles:v}=Ee(),{paths:h}=ar(),{handleSubmitText:w}=On(),[b,g]=ne(new Set),[k,_]=ne(!1),E={cursor:k?`url("${(r=p.general)==null?void 0:r.actionDisabledIcon}"), auto`:"pointer",color:(o=p.general)==null?void 0:o.primaryColor,borderColor:(i=p.general)==null?void 0:i.primaryColor,...v.botCheckboxRowStyle},P={cursor:k||b.size<e.min?`url("${(l=p.general)==null?void 0:l.actionDisabledIcon}"), auto`:"pointer",color:(s=p.general)==null?void 0:s.primaryColor,borderColor:(a=p.general)==null?void 0:a.primaryColor,...v.botCheckboxNextStyle},x={cursor:k?`url("${(c=p.general)==null?void 0:c.actionDisabledIcon}"), auto`:"pointer",color:"transparent",...v.botCheckMarkStyle},B={cursor:k?`url("${(u=p.general)==null?void 0:u.actionDisabledIcon}"), auto`:"pointer",color:"#fff",borderColor:(A=p.general)==null?void 0:A.primaryColor,backgroundColor:(d=p.general)==null?void 0:d.primaryColor,...v.botCheckMarkSelectedStyle};return ee(()=>{h.length>0&&h[h.length-1]!==n&&_(!e.reusable)},[h]),I("div",{className:"rcb-checkbox-container "+((f=p.botBubble)!=null&&f.showAvatar?"rcb-checkbox-offset":""),children:[e.items.map(D=>I("div",{onMouseDown:T=>{T.preventDefault(),(C=>{k||g(L=>{const H=new Set(L);if(H.has(C))t.delete(C),H.delete(C);else{if(b.size==e.max)return L;t.add(C),H.add(C)}return H})})(D)},style:E,className:"rcb-checkbox-row-container",children:I("div",{className:"rcb-checkbox-row",children:[I("div",{style:b.has(D)?B:x,className:"rcb-checkbox-mark"}),I("div",{className:"rcb-checkbox-label",children:D})]})},D)),I("div",{style:P,className:"rcb-checkbox-next-button",onMouseDown:D=>{var T;if(D.preventDefault(),k||b.size<e.min)return;const C=Array.from(t).join(", ");let L;_(!e.reusable),L=e.sendOutput!=null?e.sendOutput:((T=p.chatInput)==null?void 0:T.sendCheckboxOutput)??!0,w(C,L)}})]})},zf=async(e,t)=>{const n=e.checkboxes;if(!n)return;let r;if(typeof n=="function"?(r=n(t),r instanceof Promise&&(r=await r)):r=n,Array.isArray(r)&&(r={items:r}),!("items"in r)||r.items.length==0)return;r.min==null&&(r.min=1),r.max==null&&(r.max=r.items.length),r.min>r.max&&(r.min=r.max),r.reusable==null&&(r.reusable=!1);const o=new Set,i=t.currPath,l=I(Uf,{checkboxes:r,checkedItems:o,path:i});await t.injectMessage(l)},jf=async(e,t)=>{const n=e.function;if(!n)return;const r=n(t);return r instanceof Promise?await r:r},qf=async(e,t,n)=>{const r=e.message;if(!r)return;if(typeof r=="string")return void(r.trim()!==""&&(n?await t.simulateStreamMessage(r):await t.injectMessage(r)));let o=r(t);o instanceof Promise&&(o=await o),typeof o=="string"&&o.trim()!==""&&(n?await t.simulateStreamMessage(o):await t.injectMessage(o))},Wf=({options:e,path:t})=>{var n,r,o,i,l,s;const{settings:a}=Ae(),{styles:c}=Ee(),{paths:u}=ar(),{handleSubmitText:A}=On(),[d,f]=ne([]),[p,v]=ne(!1),h={cursor:p?`url("${(n=a.general)==null?void 0:n.actionDisabledIcon}"), auto`:"pointer",color:(r=a.general)==null?void 0:r.primaryColor,borderColor:(o=a.general)==null?void 0:o.primaryColor,backgroundColor:"#fff",...c.botOptionStyle},w={color:"#fff",borderColor:(i=a.general)==null?void 0:i.primaryColor,backgroundColor:(l=a.general)==null?void 0:l.primaryColor,...c.botOptionHoveredStyle};return ee(()=>{u.length>0&&u[u.length-1]!==t&&v(!e.reusable)},[u]),I("div",{className:"rcb-options-container "+((s=a.botBubble)!=null&&s.showAvatar?"rcb-options-offset":""),children:e.items.map((b,g)=>{const k=d[g]&&!p;return I("div",{className:"rcb-options",style:k?w:h,onMouseEnter:()=>(_=>{f(E=>{const P=[...E];return P[_]=!0,P})})(g),onMouseLeave:()=>(_=>{f(E=>{const P=[...E];return P[_]=!1,P})})(g),onMouseDown:_=>{var E;if(_.preventDefault(),p)return;let P;v(!e.reusable),P=e.sendOutput!=null?e.sendOutput:((E=a.chatInput)==null?void 0:E.sendOptionOutput)??!0,A(b,P)},children:b},b)})})},Gf=async(e,t)=>{const n=e.options;if(!n)return;let r;if(typeof n=="function"?(r=n(t),r instanceof Promise&&(r=await r)):r=n,Array.isArray(r)&&(r={items:r}),!("items"in r)||r.items.length==0)return;r.reusable==null&&(r.reusable=!1);const o=t.currPath,i=I(Wf,{options:r,path:o});await t.injectMessage(i)},Yf=async(e,t)=>{const n=e.component;if(n){if(typeof n=="function"){let r=n(t);return r instanceof Promise&&(r=await r),r?void await t.injectMessage(r):void 0}await t.injectMessage(n)}},Vf=async(e,t,n,r)=>{const o=e.transition;let i;if(typeof o=="function"?(i=o(t),i instanceof Promise&&(i=await i)):i=o,typeof i=="number"&&(i={duration:i}),!i||i instanceof Promise||i.duration==null||typeof i.duration!="number")return;i.interruptable==null&&(i.interruptable=!1);const l=setTimeout(async()=>{const s=await r(e);s&&await ma(s,t)},i.duration);i.interruptable&&(n.current=l)},$f=async(e,t,n)=>{const r=e.chatDisabled;if(r==null)return;let o;typeof r=="function"?(o=r(t),o instanceof Promise&&(o=await o)):o=r,n(o)},ga=async(e,t,n)=>{const r=e.isSensitive;if(!r)return void n(!1);let o;typeof r=="function"?(o=r(t),o instanceof Promise&&(o=await o)):o=r,n(o)},ma=async(e,t)=>{if(!e)throw new Error("Block is not valid.");const n=Object.keys(e);for(const r of n)r==="function"&&await jf(e,t);n.includes("path")&&await(async(r,o)=>{const i=r.path;if(!i)return!1;if(typeof i=="string")return await o.goToPath(i),!0;let l=i(o);if(l instanceof Promise&&(l=await l),!l)return!1;const s=l;return await o.goToPath(s),!0})(e,t)},Kf=()=>{var e;const{settings:t}=Ae(),{styles:n}=Ee();return I("div",{className:"rcb-line-break-container",children:I("div",{style:{...n.chatHistoryLineBreakStyle},className:"rcb-line-break-text","data-testid":"chat-history-line-break-text",children:(e=t.chatHistory)==null?void 0:e.chatHistoryLineBreakText})})},Xf=()=>{var e;const{settings:t}=Ae(),{styles:n}=Ee(),r={borderTop:`4px solid ${(e=t.general)==null?void 0:e.primaryColor}`,...n.loadingSpinnerStyle};return I("div",{className:"rcb-spinner-container",children:I("div",{style:r,className:"rcb-spinner"})})},jr=()=>{try{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();throw new Error("crypto.randomUUID not available")}catch(e){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function")return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const n=crypto.getRandomValues(new Uint8Array(1))[0]%16;return(t==="x"?n:3&n|8).toString(16)});throw console.error(e),new Error("crypto.getRandomValues is also not available")}},en=(e,t)=>({id:jr(),content:e,sender:t,type:typeof e=="string"?"string":"object",timestamp:new Date().toUTCString(),tags:[]});let tn,ya=!1,qr="rcb-history",Wr=30,va=!1,Gr=[];const cr=()=>Gr,ai=e=>{wa(e),Gr=e},wa=e=>{tn&&tn.setItem(qr,JSON.stringify(e))},ci=e=>{var t,n,r,o,i;tn=((n=(t=e.chatHistory)==null?void 0:t.storageType)==null?void 0:n.toUpperCase())==="SESSION_STORAGE"?sessionStorage:localStorage,qr=(r=e.chatHistory)==null?void 0:r.storageKey,Wr=(o=e.chatHistory)==null?void 0:o.maxEntries,va=(i=e.chatHistory)==null?void 0:i.disabled,Gr=(l=>{if(l!=null)try{return JSON.parse(l)}catch{return[]}return[]})(tn.getItem(qr))},Jf=e=>pn(e.content)?structuredClone({id:e.id,content:yf.renderToString(e.content),type:e.type,sender:e.sender.toUpperCase(),timestamp:e.timestamp,tags:e.tags}):e,ba=(e,t,n)=>{const r=new DOMParser().parseFromString(e,"text/html");return Array.from(r.body.childNodes).map((o,i)=>{var l;if(o.nodeType===Node.TEXT_NODE)return o.textContent;{const s=o.tagName.toLowerCase();let a=Array.from(o.attributes).reduce((c,u)=>{const A=u.name.toLowerCase();if(A==="style"){const d=u.value.split(";").filter(p=>p.trim()!==""),f={};d.forEach(p=>{const[v,h]=p.split(":").map(b=>b.trim()),w=v.replace(/-([a-z])/g,(b,g)=>g.toUpperCase());f[w]=h}),c[A]=f}else s!=="audio"&&s!=="video"||A!=="controls"||u.value!==""?c[A]=u.value:c[A]="true";return c},{});if(Object.prototype.hasOwnProperty.call(a,"class")){const c=o.classList;a.className=c.toString(),delete a.class,(l=t.botBubble)!=null&&l.showAvatar&&(a=Zf(c,a)),a=ep(c,a,t,n),a=tp(c,a,t,n),a=np(c,a,t,n),a=rp(c,a,t,n)}if(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"].includes(s))return he(s,{key:i,...a});{const c=ba(o.innerHTML,t,n);return he(s,{key:i,...a},...c)}}})},Zf=(e,t)=>((e.contains("rcb-options-container")||e.contains("rcb-checkbox-container"))&&(t.className=`${e.toString()} rcb-options-offset`),t),ep=(e,t,n,r)=>{var o,i,l,s,a;return e.contains("rcb-options")&&(t.style={...t.style,color:((o=r.botOptionStyle)==null?void 0:o.color)??((i=n.general)==null?void 0:i.primaryColor),borderColor:((l=r.botOptionStyle)==null?void 0:l.color)??((s=n.general)==null?void 0:s.primaryColor),cursor:`url("${(a=n.general)==null?void 0:a.actionDisabledIcon}"), auto`,...r.botOptionStyle}),t},tp=(e,t,n,r)=>{var o,i,l,s,a;return e.contains("rcb-checkbox-row-container")&&(t.style={...t.style,color:((o=r.botCheckboxRowStyle)==null?void 0:o.color)??((i=n.general)==null?void 0:i.primaryColor),borderColor:((l=r.botCheckboxRowStyle)==null?void 0:l.color)??((s=n.general)==null?void 0:s.primaryColor),cursor:`url("${(a=n.general)==null?void 0:a.actionDisabledIcon}"), auto`,...r.botCheckboxRowStyle}),t},np=(e,t,n,r)=>{var o,i,l,s,a;return e.contains("rcb-checkbox-next-button")&&(t.style={...t.style,color:((o=r.botCheckboxNextStyle)==null?void 0:o.color)??((i=n.general)==null?void 0:i.primaryColor),borderColor:((l=r.botCheckboxNextStyle)==null?void 0:l.color)??((s=n.general)==null?void 0:s.primaryColor),cursor:`url("${(a=n.general)==null?void 0:a.actionDisabledIcon}"), auto`,...r.botCheckboxNextStyle}),t},rp=(e,t,n,r)=>{var o,i;return(e.contains("rcb-media-display-image-container")||e.contains("rcb-media-display-video-container"))&&(t.style={...t.style,backgroundColor:(o=n.general)==null?void 0:o.primaryColor,maxWidth:(i=n.userBubble)!=null&&i.showAvatar?"65%":"70%",...r.mediaDisplayContainerStyle}),t},ui=()=>{const{settings:e}=Ae(),{notificationsToggledOn:t,setSyncedNotificationsToggledOn:n,hasInteractedPage:r,unreadCount:o,setUnreadCount:i,syncedNotificationsToggledOnRef:l}=$e(),{audioBufferRef:s,audioContextRef:a,gainNodeRef:c}=We(),{dispatchRcbEvent:u}=Pt(),A=X(async()=>{var f,p;const v=(f=e.notification)==null?void 0:f.sound;a.current=new AudioContext;const h=a.current.createGain();let w;if(h.gain.value=((p=e.notification)==null?void 0:p.volume)??.2,c.current=h,v!=null&&v.startsWith("data:audio")){const b=atob(v.split(",")[1]),g=new ArrayBuffer(b.length),k=new Uint8Array(g);for(let _=0;_<b.length;_++)k[_]=b.charCodeAt(_);w=g}else w=await(await fetch(v)).arrayBuffer();s.current=await a.current.decodeAudioData(w)},[e.notification]),d=X(()=>{var f;if((f=e.notification)!=null&&f.disabled||!l.current||!r||!a.current||!s.current)return;const p=a.current.createBufferSource();p.buffer=s.current,p.connect(c.current).connect(a.current.destination),p.start()},[e.notification,l,r,a,s,c]);return{unreadCount:o,setUnreadCount:i,notificationsToggledOn:t,toggleNotifications:X(async f=>{var p;f!==l.current&&((p=e.event)!=null&&p.rcbToggleNotifications&&(await u(V.TOGGLE_NOTIFICATIONS,{currState:l.current,newState:!l.current})).defaultPrevented||n(v=>!v))},[l]),playNotificationSound:d,setUpNotifications:A}},op=(e,t)=>{var n,r,o,i;((l,s,a,c,u)=>{if(!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const A=new window.SpeechSynthesisUtterance;A.text=l,A.lang=s,A.rate=c,A.volume=u;let d=!1;for(const f of a){const p=window.speechSynthesis.getVoices().find(v=>v.name===f);if(p){A.voice=p,window.speechSynthesis.speak(A),d=!0;break}}d||window.speechSynthesis.speak(A)})(t,(n=e.audio)==null?void 0:n.language,(r=e.audio)==null?void 0:r.voiceNames,(o=e.audio)==null?void 0:o.rate,(i=e.audio)==null?void 0:i.volume)},ka=()=>{const{settings:e}=Ae(),{audioToggledOn:t,setSyncedAudioToggledOn:n,syncedAudioToggledOnRef:r}=$e(),{dispatchRcbEvent:o}=Pt(),i=X(async s=>{var a;s!==r.current&&((a=e.event)!=null&&a.rcbToggleAudio&&(await o(V.TOGGLE_AUDIO,{currState:r.current,newState:!r.current})).defaultPrevented||n(c=>!c))},[r]),l=X(async s=>{var a,c;if((a=e.audio)!=null&&a.disabled||!r.current)return;let u=s;if((c=e.event)!=null&&c.rcbStartSpeakAudio){const A=await o(V.START_SPEAK_AUDIO,{textToRead:u});if(A.defaultPrevented)return;u=A.data.textToRead}op(e,u)},[e,r]);return{audioToggledOn:t,speakAudio:l,toggleAudio:i}},gn=()=>{var e,t,n;const{settings:r}=Ae(),{messages:o,setSyncedMessages:i,syncedMessagesRef:l}=si(),{setSyncedIsBotTyping:s,setUnreadCount:a,syncedIsScrollingRef:c,syncedIsChatWindowOpenRef:u}=$e(),{streamMessageMap:A,chatBodyRef:d,paramsInputRef:f}=We(),{scrollToBottom:p,getIsChatBotVisible:v}=ht(),{dispatchRcbEvent:h}=Pt(),{speakAudio:w}=ka(),{playNotificationSound:b}=ui(),g=X(async C=>{var L,H;if((L=r.event)!=null&&L.rcbSaveChatHistory){const R=await h(V.SAVE_CHAT_HISTORY,{messages:C});if(R.defaultPrevented)return;C=((H=R.data)==null?void 0:H.messages)??C}await(async R=>{if(va||!tn)return;const Q=[];for(let O=R.length-1;O>=0;O--){const m=R[O];if(m.sender.toUpperCase()!=="SYSTEM"&&(m.content!==""&&Q.unshift(m),Q.length===Wr))break}let M=Q.map(Jf);if(!ya&&M.length<Wr){const O=Wr-M.length;M=[...Gr.slice(-O),...M]}wa(M)})(C)},[h,(e=r.event)==null?void 0:e.rcbSaveChatHistory]),k=X((C,L=!1)=>{var H,R;g(C);let Q=!0;const M=C[C.length-1];if(!M)return;const O=M.sender.toUpperCase();O==="USER"&&(Q=!1),(H=r.general)!=null&&H.embedded&&v()&&(Q=!1),(u.current&&!c.current||L)&&(Q=!1),Q&&b(),!L&&(O!=="USER"&&(R=r.chatWindow)!=null&&R.autoJumpToBottom||O==="USER"||!c.current)&&setTimeout(()=>p(),1)},[r,d,u,c,b,p,v]),_=X(async(C,L="BOT",H=null)=>{var R,Q,M,O,m;if(typeof C!="string")throw new Error("Content must be of type string to simulate stream.");L=L.toUpperCase();let G=en(C,L);if((R=r.event)!=null&&R.rcbStartSimulateStreamMessage){const ye=await h(V.START_SIMULATE_STREAM_MESSAGE,{message:G});if(ye.defaultPrevented)return null;H=ye.data.simulateStreamChunker||H,G=ye.data.message}s(!1);let y=30;y=L==="BOT"?(Q=r.botBubble)==null?void 0:Q.streamSpeed:(M=r.userBubble)==null?void 0:M.streamSpeed;const q={...G,content:""};i(ye=>[...ye,q]),k(l.current);let re=G.content;H&&(re=H(re));let Z=0;const ce=re.length;G.sender.toUpperCase()==="BOT"&&(u.current||(O=r.general)!=null&&O.embedded)&&typeof G.content=="string"&&G.content.trim()!==""&&w(G.content);const Oe=new Promise(ye=>{const st=setInterval(()=>{if(Z>=ce)return clearInterval(st),void ye();i(Ue=>{const Ve=[...Ue];for(let Y=Ve.length-1;Y>=0;Y--)if(Ve[Y].id===q.id){const $=re[Z];$&&(q.content+=$,Ve[Y]=q),Z++;break}return Ve})},y)});return(c.current||!u.current)&&a(ye=>ye+1),await Oe,g(l.current),(m=r.event)!=null&&m.rcbStopSimulateStreamMessage&&await h(V.STOP_SIMULATE_STREAM_MESSAGE,{message:G}),L==="USER"&&(f.current=C),G},[r,h,k,l,f,s,a,u,w]),E=X(async(C,L="BOT")=>{var H,R,Q;L=L.toUpperCase();let M=en(C,L);if((H=r.event)!=null&&H.rcbPreInjectMessage){const O=await h(V.PRE_INJECT_MESSAGE,{message:M});if(O.defaultPrevented)return null;M=O.data.message}return M.sender.toUpperCase()==="BOT"&&(u.current||(R=r.general)!=null&&R.embedded)&&typeof M.content=="string"&&M.content.trim()!==""&&w(M.content),(c.current||!u.current)&&a(O=>O+1),(Q=r.event)!=null&&Q.rcbPostInjectMessage&&await h(V.POST_INJECT_MESSAGE,{message:M}),i(O=>[...O,M]),k(l.current),L==="USER"&&typeof C=="string"&&(f.current=C),M},[r,h,k,f,l,u,w,a]),P=X(async C=>{var L;let H=l.current.find(M=>M.id===C),R=null,Q=!1;return H||(R=cr(),H=R.find(M=>M.id===C),H&&(Q=!0)),!H||(L=r.event)!=null&&L.rcbRemoveMessage&&(await h(V.REMOVE_MESSAGE,{message:H})).defaultPrevented?null:Q?(R&&ai(R.filter(M=>M.id!==C)),H):(i(M=>M.filter(O=>O.id!==C)),k(l.current),a(M=>Math.max(M-1,0)),H)},[h,(t=r.event)==null?void 0:t.rcbRemoveMessage,k,l,a,cr,ai]),x=X(async(C,L="BOT")=>{var H,R;if(L=L.toUpperCase(),!A.current.has(L)){const M=en(C,L);return(H=r.event)!=null&&H.rcbStartStreamMessage&&(await h(V.START_STREAM_MESSAGE,{message:M})).defaultPrevented?null:(s(!1),i(O=>[...O,M]),k(l.current),A.current.set(L,M.id),(c.current||!u.current)&&a(O=>O+1),M)}const Q={...en(C,L),id:A.current.get(L)};return(R=r.event)!=null&&R.rcbChunkStreamMessage&&(await h(V.CHUNK_STREAM_MESSAGE,{message:Q})).defaultPrevented?null:(i(M=>M.map(O=>O.id===Q.id?Q:O)),k(l.current,!0),Q)},[h,r.event,k,l,s,a,A]),B=X(async(C="BOT")=>{var L;if(C=C.toUpperCase(),!A.current.has(C))return!0;const H=A.current.get(C);let R;for(let Q=0;Q<3;Q++){const M=l.current.find(O=>O.id===H);M&&(R=M),await new Promise(O=>setTimeout(O,20))}return((L=r.event)==null||!L.rcbStopStreamMessage||!(await h(V.STOP_STREAM_MESSAGE,{message:R})).defaultPrevented)&&(A.current.delete(C),g(l.current),C==="USER"&&typeof(R==null?void 0:R.content)=="string"&&(f.current=R.content),!0)},[h,(n=r.event)==null?void 0:n.rcbStopStreamMessage,A,f]),D=X(C=>{const L=typeof C=="function"?C(l.current):C;i(L),k(L)},[k,l]),T=X((C,L,H=0)=>{var R;const Q=l.current,M=C?C.toUpperCase():null,O=[];let m=H;for(let G=Q.length-1;G>=0;G--){const y=Q[G];if(!M||((R=y==null?void 0:y.sender)==null?void 0:R.toUpperCase())===M){if(m>0){m--;continue}if(O.push(y),L!==void 0&&O.length===L)break}}return O.length>0?O:null},[l]);return{simulateStreamMessage:_,injectMessage:E,removeMessage:P,streamMessage:x,endStreamMessage:B,replaceMessages:D,getMessages:T,messages:o}};let Ai,Mt,Yr,nn=!1,Ot=null;const di=()=>{if(!Ai){const e=window.SpeechRecognition||window.webkitSpeechRecognition;Ai=e!=null?new e:null}return Ai},ip=(e,t,n,r,o,i)=>{var l,s,a;const c=di();if(!c)return;if(!nn)try{nn=!0,c.lang=(l=e.voice)==null?void 0:l.language,c.start()}catch{}const u=(s=e.voice)==null?void 0:s.timeoutPeriod,A=(a=e.voice)==null?void 0:a.autoSendPeriod;c.onresult=d=>{var f,p;clearTimeout(Mt),Mt=null,clearTimeout(Yr);const v=d.results[d.results.length-1][0].transcript;if(i.current){const h=(f=e.chatInput)==null?void 0:f.characterLimit,w=i.current.value+v;h!=null&&h>=0&&w.length>h?r(w.slice(0,h)):r(w),o(i.current.value.length)}u&&(Mt=setTimeout(async()=>await pi(t,i),u)),(p=e.voice)!=null&&p.autoSendDisabled||(Yr=setTimeout(n,A))},c.onend=()=>{nn?(c.start(),!Mt&&u&&(Mt=setTimeout(async()=>await pi(t,i),u))):(clearTimeout(Mt),Mt=null,clearTimeout(Yr))},u&&(Mt=setTimeout(async()=>await pi(t,i),u))},lp=(e,t)=>{navigator.mediaDevices.getUserMedia({audio:!0}).then(n=>{if(Ot=new MediaRecorder(n),!nn)try{nn=!0,Ot.start()}catch{}Ot.ondataavailable=r=>{t.current&&t.current.push(r.data)},Ot.onstop=()=>{e(),n.getTracks().forEach(r=>r.stop())}}).catch(n=>{console.error("Unable to use microphone:",n)})},fi=()=>{const e=di();e&&(nn=!1,e&&e.stop(),Ot&&Ot.state!=="inactive"&&(Ot.stop(),Ot=null),clearTimeout(Mt),Mt=null,clearTimeout(Yr))},pi=async(e,t)=>{var n;(n=t.current)!=null&&n.disabled||await e(),fi()},hi=()=>{const{settings:e}=Ae(),{voiceToggledOn:t,setSyncedVoiceToggledOn:n,syncedVoiceToggledOnRef:r}=$e(),{dispatchRcbEvent:o}=Pt(),i=X(async s=>{var a;s!==r.current&&((a=e.event)!=null&&a.rcbToggleVoice&&(await o(V.TOGGLE_VOICE,{currState:r.current,newState:!r.current})).defaultPrevented||n(c=>!c))},[r]),l=X(s=>{((a,c)=>{var u,A,d;const f=di();(u=c.voice)!=null&&u.disabled||(A=c.chatInput)==null||!A.blockSpam||!f||(a&&!nn?(nn=!0,(d=c.voice)!=null&&d.sendAsAudio?Ot==null||Ot.start():f.start()):a||fi())})(s,e)},[e]);return{voiceToggledOn:t,toggleVoice:i,syncVoice:l}},mn=()=>{var e;const{settings:t}=Ae(),{inputLength:n,setInputLength:r,textAreaDisabled:o,setSyncedTextAreaDisabled:i,textAreaSensitiveMode:l,setSyncedTextAreaSensitiveMode:s,syncedTextAreaDisabledRef:a,syncedTextAreaSensitiveModeRef:c}=$e(),{inputRef:u,chatBodyRef:A,prevInputRef:d}=We(),{dispatchRcbEvent:f}=Pt(),{getIsChatBotVisible:p}=ht(),v=X(async E=>{var P,x,B;if(a.current&&u.current)u.current.value="";else if(u.current&&d.current!==null){const D=(P=t.chatInput)==null?void 0:P.characterLimit,T=(x=t.chatInput)!=null&&x.allowNewline?E:E.replace(/\n/g," ");if(D!=null&&D>=0&&T.length>D?u.current.value=T.slice(0,D):u.current.value=T,(B=t.event)!=null&&B.rcbTextAreaChangeValue&&(await f(V.TEXT_AREA_CHANGE_VALUE,{currValue:u.current.value,prevValue:d.current})).defaultPrevented)return void(u.current.value=d.current);d.current=u.current.value}},[a,u,d,t,f]),h=X(E=>{var P;(P=u.current)!=null&&P.disabled||setTimeout(()=>{var x,B,D;(x=t.general)!=null&&x.embedded?p()&&((B=u.current)==null||B.focus()):E!=="start"&&((D=u.current)==null||D.focus())},100)},[u,(e=t.general)==null?void 0:e.embedded,A,p]),w=X(()=>{u.current&&u.current.focus()},[]),b=X(()=>{u.current&&u.current.blur()},[]),g=X(()=>u&&u.current?u.current.value:"",[]),k=X(E=>{E!==a.current&&i(P=>!P)},[a]),_=X(E=>{E!==c.current&&s(P=>!P)},[c]);return{textAreaDisabled:o,setSyncedTextAreaDisabled:i,textAreaSensitiveMode:l,setSyncedTextAreaSensitiveMode:s,inputLength:n,setInputLength:r,getTextAreaValue:g,setTextAreaValue:v,updateTextAreaFocus:h,focusTextArea:w,blurTextArea:b,toggleTextAreaDisabled:k,toggleTextAreaSensitiveMode:_}},xa=Ct({toasts:[],setSyncedToasts:()=>{},syncedToastsRef:{current:[]}}),Ea=()=>wt(xa),sp=({children:e})=>{const[t,n,r]=pt([]);return I(xa.Provider,{value:{toasts:t,setSyncedToasts:n,syncedToastsRef:r},children:e})},Mn=()=>{const{settings:e}=Ae(),{toasts:t,setSyncedToasts:n,syncedToastsRef:r}=Ea(),{dispatchRcbEvent:o}=Pt(),i=X(async(a,c)=>{var u,A,d,f;let p=null;if(r.current.length>=(((u=e.toast)==null?void 0:u.maxCount)??3)){if((A=e.toast)!=null&&A.forbidOnMax)return null;p=jr();let h={id:p,content:a,timeout:c};if((d=e.event)!=null&&d.rcbShowToast){const w=await o(V.SHOW_TOAST,{toast:h});if(w.defaultPrevented)return null;h=w.data.toast}return n(w=>[...w.slice(1),h]),p}p=jr();let v={id:p,content:a,timeout:c};if((f=e.event)!=null&&f.rcbShowToast){const h=await o(V.SHOW_TOAST,{toast:v});if(h.defaultPrevented)return null;v=h.data.toast}return n(h=>[...h,v]),p},[e,o]),l=X(async a=>{var c;const u=r.current.find(A=>A.id===a);return!u||(c=e.event)!=null&&c.rcbDismissToast&&(await o(V.DISMISS_TOAST,{toast:u})).defaultPrevented?null:(n(A=>A.filter(d=>d.id!==a)),a)},[o]),s=X(a=>{const c=typeof a=="function"?a(r.current):a;n(c)},[r]);return{showToast:i,dismissToast:l,toasts:t,replaceToasts:s}},Vr=()=>{var e,t,n,r,o;const{settings:i}=Ae(),{paths:l,setSyncedPaths:s,syncedPathsRef:a}=ar(),{flowRef:c,streamMessageMap:u,paramsInputRef:A,keepVoiceOnRef:d,timeoutIdRef:f}=We(),{setSyncedIsBotTyping:p,setSyncedTextAreaDisabled:v,setSyncedTextAreaSensitiveMode:h,blockAllowsAttachment:w,setBlockAllowsAttachment:b}=$e(),{dispatchRcbEvent:g}=Pt(),{endStreamMessage:k,injectMessage:_,removeMessage:E,simulateStreamMessage:P,streamMessage:x}=gn(),{showToast:B,dismissToast:D}=Mn(),{toggleChatWindow:T}=ht(),{updateTextAreaFocus:C,setTextAreaValue:L}=mn(),{syncVoice:H}=hi(),R=X(async y=>{var q;if((q=i.event)!=null&&q.rcbPostProcessBlock){const re=await g(V.POST_PROCESS_BLOCK,{block:y});if(re.defaultPrevented)return null;y=re.data.block}return y},[(e=i.event)==null?void 0:e.rcbPostProcessBlock,g]),Q=X(async(y,q)=>{var re,Z,ce,Oe;if(!y)return;let ye=c.current[y];if(!ye)return void p(!1);if((re=i.event)!=null&&re.rcbPreProcessBlock){const Ue=await g(V.PRE_PROCESS_BLOCK,{block:ye});if(Ue.defaultPrevented)return;ye=Ue.data.block}p(!0),(Z=i.chatInput)!=null&&Z.blockSpam&&v(!0),h(!1);const st={prevPath:q,currPath:y,goToPath:m,setTextAreaValue:L,userInput:A.current,endStreamMessage:k,injectMessage:_,removeMessage:E,simulateStreamMessage:P,streamMessage:x,toggleChatWindow:T,showToast:B,dismissToast:D};await(async(Ue,Ve,Y,$,we,ae,_e)=>{if(!Ue)throw new Error("Block is not valid.");for(const xe of Object.keys(Ue))switch(xe){case"message":await qf(Ue,Ve,Y);break;case"options":await Gf(Ue,Ve);break;case"checkboxes":await zf(Ue,Ve);break;case"component":await Yf(Ue,Ve);break;case"chatDisabled":await $f(Ue,Ve,we);break;case"isSensitive":await ga(Ue,Ve,ae);break;case"transition":await Vf(Ue,Ve,$,_e)}})(ye,st,((ce=i.botBubble)==null?void 0:ce.simulateStream)??!1,f,v,h,R),p(!1),"chatDisabled"in ye||v((Oe=i.chatInput)==null?void 0:Oe.disabled),"isSensitive"in ye||h(!1),b(typeof ye.file=="function"),C(y),H(d.current&&!ye.chatDisabled),y!==q&&u.current.clear()},[c,C,H,(t=i.botBubble)==null?void 0:t.simulateStream,(n=i.chatInput)==null?void 0:n.disabled,A,k,_,E,P,x,T,B,D,d,u]),M=X(()=>a.current.length>0?a.current.at(-1)??null:null,[]),O=X(()=>a.current.length>1?a.current.at(-2)??null:null,[]),m=X(async y=>{var q;const re=M(),Z=O();return((q=i.event)==null||!q.rcbChangePath||!(await g(V.CHANGE_PATH,{currPath:re,prevPath:Z,nextPath:y})).defaultPrevented)&&(s(ce=>[...ce,y]),await Q(y,re),!0)},[(r=i.chatInput)==null?void 0:r.blockSpam,(o=i.event)==null?void 0:o.rcbChangePath,Q,g]),G=X(y=>{const q=typeof y=="function"?y(a.current):y;s(q)},[a]);return{getCurrPath:M,getPrevPath:O,goToPath:m,blockAllowsAttachment:w,setBlockAllowsAttachment:b,paths:l,replacePaths:G,firePostProcessBlockEvent:R}},On=()=>{var e,t,n,r;const{settings:o}=Ae(),{endStreamMessage:i,injectMessage:l,removeMessage:s,simulateStreamMessage:a,streamMessage:c}=gn(),{syncedPathsRef:u}=ar(),{getCurrPath:A,getPrevPath:d,goToPath:f,firePostProcessBlockEvent:p}=Vr(),{setSyncedTextAreaSensitiveMode:v,setSyncedTextAreaDisabled:h,setSyncedIsBotTyping:w,setBlockAllowsAttachment:b,setInputLength:g,syncedVoiceToggledOnRef:k,syncedTextAreaSensitiveModeRef:_}=$e(),{flowRef:E,inputRef:P,keepVoiceOnRef:x,paramsInputRef:B,timeoutIdRef:D}=We(),{showToast:T,dismissToast:C}=Mn(),{dispatchRcbEvent:L}=Pt(),{syncVoice:H}=hi(),{setTextAreaValue:R}=mn(),{toggleChatWindow:Q}=ht(),M=X(async m=>{var G,y,q,re,Z,ce;const Oe=A();if(Oe&&E.current[Oe]){if(_.current){if((G=o==null?void 0:o.sensitiveInput)!=null&&G.hideInUserBubble)return;if((y=o==null?void 0:o.sensitiveInput)!=null&&y.maskInUserBubble)return void((q=o.userBubble)!=null&&q.simulateStream?await a("*".repeat(((re=o.sensitiveInput)==null?void 0:re.asterisksCount)??10),"USER"):await l("*".repeat(((Z=o.sensitiveInput)==null?void 0:Z.asterisksCount)??10),"USER"))}(ce=o.userBubble)!=null&&ce.simulateStream?await a(m,"USER"):await l(m,"USER")}},[E,A,o,l,a,_]),O=X(async(m,G=!0)=>{var y,q;if((m=m.trim())==="")return;G&&await M(m),D.current&&clearTimeout(D.current),P.current&&(R(""),g(0));const re=A();if(!re)return;let Z=E.current[re];const ce=await p(Z);ce&&((y=o.chatInput)!=null&&y.blockSpam&&h(!0),x.current=k.current,H(!1),setTimeout(()=>{w(!0)},400),v(!1),setTimeout(async()=>{var Oe;const ye={prevPath:d(),currPath:A(),goToPath:f,setTextAreaValue:R,userInput:B.current,injectMessage:l,simulateStreamMessage:a,streamMessage:c,removeMessage:s,endStreamMessage:i,toggleChatWindow:Q,showToast:T,dismissToast:C},st=u.current.length;await ma(ce,ye),u.current.length===st&&(h("chatDisabled"in Z?!!Z.chatDisabled:!((Oe=o.chatInput)==null||!Oe.disabled)),ga(Z,ye,v),b(typeof Z.file=="function"),H(x.current),w(!1))},(q=o.chatInput)==null?void 0:q.botDelay))},[D,(e=o.chatInput)==null?void 0:e.blockSpam,(t=o.chatInput)==null?void 0:t.botDelay,(n=o.chatInput)==null?void 0:n.disabled,x,k,H,M,d,A,f,l,a,c,s,i,Q,T,C,E]);return{handleSubmitText:X(async(m,G=!0)=>{var y,q;m=m??((y=P.current)==null?void 0:y.value),!((q=o.event)!=null&&q.rcbUserSubmitText&&(await L(V.USER_SUBMIT_TEXT,{inputText:m,sendInChat:G})).defaultPrevented||!A())&&O(m,G)},[L,A,O,P,(r=o.event)==null?void 0:r.rcbUserSubmitText])}},$r=()=>{var e;const{settings:t}=Ae();return qe(()=>{var n;if(typeof window>"u"||!window.navigator)return!1;if((n=t.device)==null||!n.applyMobileOptimizations)return!0;const r=navigator.userAgent,o=!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(r),i=window.innerWidth>=768;return o&&i},[(e=t.device)==null?void 0:e.applyMobileOptimizations])},ap=({buttons:e})=>{var t,n,r,o,i,l,s,a,c,u,A;const d=$r(),{settings:f}=Ae(),{styles:p}=Ee(),{textAreaDisabled:v,textAreaSensitiveMode:h,inputLength:w,hasFlowStarted:b,setHasFlowStarted:g,setInputLength:k}=$e(),{inputRef:_}=We(),[E,P]=ne(!1),[x,B]=ne(!1),{handleSubmitText:D}=On(),{setTextAreaValue:T}=mn(),C={boxSizing:d?"content-box":"border-box",...p.chatInputAreaStyle},L={outline:v?"":"none",boxShadow:v?"":`0 0 5px ${(t=f.general)==null?void 0:t.primaryColor}`,boxSizing:d?"content-box":"border-box",...p.chatInputAreaStyle,...p.chatInputAreaFocusedStyle},H={cursor:`url("${(n=f.general)==null?void 0:n.actionDisabledIcon}"), auto`,caretColor:"transparent",boxSizing:d?"content-box":"border-box",...p.chatInputAreaStyle,...p.chatInputAreaDisabledStyle},R={color:"#989898",...p.characterLimitStyle},Q={color:"#ff0000",...p.characterLimitReachedStyle},M=v?(r=f.chatInput)==null?void 0:r.disabledPlaceholderText:(o=f.chatInput)==null?void 0:o.enabledPlaceholderText,O=()=>{v||P(!0)},m=()=>{P(!1)},G=()=>{B(!0)},y=()=>{B(!1)},q=async Z=>{var ce;if(!x&&Z.key==="Enter"){if(Z.shiftKey)return void((ce=f.chatInput)!=null&&ce.allowNewline||Z.preventDefault());Z.preventDefault(),await D()}},re=Z=>{_.current&&(T(Z.target.value),k(_.current.value.length))};return I("div",{"aria-label":((i=f.ariaLabel)==null?void 0:i.inputTextArea)??"input text area",role:"textbox",onMouseDown:Z=>{var ce;Z.stopPropagation(),!b&&((ce=f.general)==null?void 0:ce.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&g(!0)},style:{...p.chatInputContainerStyle},className:"rcb-chat-input",children:[h&&(l=f.sensitiveInput)!=null&&l.maskInTextArea?I("input",{ref:_,type:"password",className:"rcb-chat-input-textarea",style:v?H:E?L:C,placeholder:M,onChange:re,onKeyDown:q,onFocus:O,onBlur:m,onCompositionStart:G,onCompositionEnd:y}):I("textarea",{ref:_,style:v?H:E?L:C,rows:1,className:"rcb-chat-input-textarea",placeholder:M,onChange:re,onKeyDown:q,onFocus:O,onBlur:m,onCompositionStart:G,onCompositionEnd:y}),I(ge,{children:[e==null?void 0:e.map((Z,ce)=>I(ge,{children:Z},ce)),((s=f.chatInput)==null?void 0:s.showCharacterCount)&&((a=f.chatInput)==null?void 0:a.characterLimit)!=null&&((c=f.chatInput)==null?void 0:c.characterLimit)>0&&I("div",{className:"rcb-chat-input-char-counter",style:w>=((u=f.chatInput)==null?void 0:u.characterLimit)?Q:R,children:[w,"/",(A=f.chatInput)==null?void 0:A.characterLimit]})]})]})},cp=({buttons:e})=>{var t;const{settings:n}=Ae(),{styles:r}=Ee();return I("div",{"data-testid":"chatbot-footer-container",style:{...r.footerStyle},className:"rcb-chat-footer-container",children:[I("div",{className:"rcb-chat-footer",children:e==null?void 0:e.map((o,i)=>I(ge,{children:o},i))}),I("span",{children:(t=n.footer)==null?void 0:t.text})]})},up=()=>{var e,t,n,r,o,i,l;const{settings:s}=Ae(),{styles:a}=Ee(),{unreadCount:c}=$e(),{isChatWindowOpen:u,toggleChatWindow:A}=ht(),[d,f]=ne(!1),p={backgroundImage:`linear-gradient(to right, ${(e=s.general)==null?void 0:e.secondaryColor},
3
+ ${(t=s.general)==null?void 0:t.primaryColor})`,...a.chatButtonStyle},v={transform:"scale(1.05)",...p,...a.chatButtonHoveredStyle},h={backgroundImage:`url(${(n=s.chatButton)==null?void 0:n.icon})`,fill:"#fff",width:75,height:75,...a.chatIconStyle};return I(ge,{children:!((r=s.general)!=null&&r.embedded)&&I("div",{"aria-label":((o=s.ariaLabel)==null?void 0:o.chatButton)??"open chat",role:"button",style:d?v:p,className:"rcb-toggle-button "+(u?"rcb-button-hide":"rcb-button-show"),onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onClick:()=>A(!0),children:[(()=>{var w;const b=(w=s.chatButton)==null?void 0:w.icon;return b&&typeof b!="string"?b&&I("span",{className:"rcb-toggle-icon",children:I(b,{style:h})}):I("span",{className:"rcb-toggle-icon",style:h})})(),!((i=s.notification)!=null&&i.disabled)&&((l=s.notification)==null?void 0:l.showCount)&&I("span",{style:{...a.notificationBadgeStyle},className:"rcb-badge",children:c})]})})},Ap=()=>{var e,t,n,r,o,i;const l=$r(),{settings:s}=Ae(),{styles:a}=Ee(),{chatBodyRef:c}=We(),{isChatWindowOpen:u,toggleChatWindow:A}=ht(),[d,f]=ne(!1),[p,v]=ne(!1),[h,w]=ne(0);ee(()=>{var k,_,E;const P=(k=s.tooltip)==null?void 0:k.mode;if(P==="ALWAYS")if(l){let x;x=u?(((_=c.current)==null?void 0:_.offsetWidth)??375)-(typeof((E=a.chatButtonStyle)==null?void 0:E.width)=="number"?a.chatButtonStyle.width:75):0,w(x),f(!0)}else f(!u);else P==="NEVER"?f(!1):P==="START"?p?f(!1):(v(!0),f(!0)):P==="CLOSE"&&f(!u)},[u,l,p,(e=a.chatButtonStyle)==null?void 0:e.width,(t=s.tooltip)==null?void 0:t.mode]);const b={transform:`translateX(-${h}px)`,right:(((n=a.chatButtonStyle)==null?void 0:n.width)??75)+40,bottom:30,backgroundColor:(r=s.general)==null?void 0:r.secondaryColor,color:"#fff",...a.tooltipStyle},g={borderColor:`transparent transparent transparent ${b.backgroundColor}`};return I(ge,{children:!((o=s.general)!=null&&o.embedded)&&I("div",{"data-testid":"chat-tooltip",style:b,className:"rcb-chat-tooltip "+(d?"rcb-tooltip-show":"rcb-tooltip-hide"),onClick:()=>A(!0),children:[I("span",{children:(i=s.tooltip)==null?void 0:i.text}),I("span",{className:"rcb-chat-tooltip-tail",style:g})]})})},dp=({id:e,content:t,timeout:n})=>{var r,o;const{settings:i}=Ae(),{styles:l}=Ee(),[s]=ne({toastPromptStyle:{...l.toastPromptStyle},toastPromptHoveredStyle:{...l.toastPromptHoveredStyle}}),{dismissToast:a}=Mn(),[c,u]=ne(!1),A={color:(r=i.general)==null?void 0:r.primaryColor,borderColor:(o=i.general)==null?void 0:o.primaryColor,...s.toastPromptHoveredStyle};return ee(()=>{if(n){const d=setTimeout(()=>{a(e)},n);return()=>clearTimeout(d)}},[e,a,n]),typeof t=="string"?I("div",{onMouseEnter:()=>{u(!0)},onMouseLeave:()=>{u(!1)},style:c?A:s.toastPromptStyle,onMouseDown:async d=>{var f;(f=i.toast)!=null&&f.dismissOnClick&&(d.preventDefault(),await a(e))},className:"rcb-toast-prompt",children:t}):I(ge,{children:t})},fp=()=>{var e,t,n,r,o,i,l,s,a,c,u,A;const{styles:d}=Ee(),{toasts:f}=Ea(),p={bottom:`calc(${typeof((e=d.footerStyle)==null?void 0:e.height)=="number"?`${(t=d.footerStyle)==null?void 0:t.height}px`:((n=d.footerStyle)==null?void 0:n.height)??"50px"} + ${typeof((r=d.chatInputContainerStyle)==null?void 0:r.height)=="number"?`${(o=d.chatInputContainerStyle)==null?void 0:o.height}px`:((i=d.chatInputContainerStyle)==null?void 0:i.height)??"70px"} + 20px)`,width:300,minWidth:`calc(${typeof((l=d.chatWindowStyle)==null?void 0:l.width)=="number"?`${(s=d.chatWindowStyle)==null?void 0:s.width}px`:((a=d.chatWindowStyle)==null?void 0:a.width)??"375px"} / 2)`,maxWidth:`calc(${typeof((c=d.chatWindowStyle)==null?void 0:c.width)=="number"?`${(u=d.chatWindowStyle)==null?void 0:u.width}px`:((A=d.chatWindowStyle)==null?void 0:A.width)??"375px"} - 50px)`,...d.toastPromptContainerStyle};return I("div",{className:"rcb-toast-prompt-container",style:p,children:f.map(v=>I(dp,{id:v.id,content:v.content,timeout:v.timeout},v.id))})},_a=({file:e,fileType:t,fileUrl:n})=>{var r,o,i;const{settings:l}=Ae(),{styles:s}=Ee(),a={backgroundColor:(r=l.general)==null?void 0:r.primaryColor,maxWidth:(o=l.userBubble)!=null&&o.showAvatar?"65%":"70%",...s.mediaDisplayContainerStyle};return I(ge,{children:n?I(ge,{children:[t==="image"&&n&&I("div",{style:a,className:"rcb-media-display-image-container rcb-media-entry","data-testid":"media-display-image-container",children:I("img",{src:n,alt:"Image Display",className:"rcb-media-display-image"})}),t==="video"&&n&&I("div",{style:a,className:"rcb-media-display-video-container rcb-media-entry","data-testid":"media-display-video-container",children:I("video",{controls:!0,className:"rcb-media-display-video",children:[I("source",{src:n,type:e.type}),"Your browser does not support the video tag."]})}),t==="audio"&&n&&I("audio",{"data-testid":"media-display-audio-container",style:{maxWidth:(i=l.userBubble)!=null&&i.showAvatar?"65%":"70%"},controls:!0,className:"rcb-media-display-audio rcb-media-entry",children:[I("source",{src:n,type:e.type}),"Your browser does not support the audio tag."]})]}):I(ge,{})})},Sa=async e=>{if(!e)return{fileType:null,fileUrl:null};const t=e.type.split("/")[0];if(!["image","video","audio"].includes(t))return{fileType:null,fileUrl:null};try{return{fileType:t,fileUrl:await new Promise((n,r)=>{const o=new FileReader;o.onload=()=>n(o.result),o.onerror=()=>r(new Error("File reading failed")),o.readAsDataURL(e)})}}catch(n){return console.error(n),{fileType:null,fileUrl:null}}},pp=()=>{var e,t,n,r,o,i;const{settings:l}=Ae(),{styles:s}=Ee(),{injectMessage:a,simulateStreamMessage:c,streamMessage:u,removeMessage:A,endStreamMessage:d}=gn(),{getCurrPath:f,getPrevPath:p,goToPath:v,blockAllowsAttachment:h}=Vr(),{flowRef:w,inputRef:b}=We(),g=w.current,{showToast:k,dismissToast:_}=Mn(),{dispatchRcbEvent:E}=Pt(),{toggleChatWindow:P}=ht(),{setTextAreaValue:x}=mn(),{handleSubmitText:B}=On(),D={cursor:`url("${(e=l.general)==null?void 0:e.actionDisabledIcon}"), auto`,...s.fileAttachmentButtonStyle,...s.fileAttachmentButtonDisabledStyle},T={backgroundImage:`url(${(t=l.fileAttachment)==null?void 0:t.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle},C={backgroundImage:`url(${(n=l.fileAttachment)==null?void 0:n.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle,...s.fileAttachmentIconDisabledStyle};return I("label",{"aria-label":((r=l.ariaLabel)==null?void 0:r.fileAttachmentButton)??"upload file",role:"button",className:h?"rcb-attach-button-enabled":"rcb-attach-button-disabled",style:h?{...s.fileAttachmentButtonStyle}:D,children:[I("input",{className:"rcb-attach-input",role:"file",type:"file",onChange:async L=>{var H,R,Q,M;const O=L.target.files;if(!O)return;const m=Array.from(O);if(L.target.value="",(H=l.event)!=null&&H.rcbUserUploadFile&&(await E(V.USER_UPLOAD_FILE,{files:m})).defaultPrevented)return;const G=f();if(!G)return;const y=g[G];if(!y)return;const q=y.file;if(q!=null){const re=[];for(let Z=0;Z<m.length;Z++){if(re.push(m[Z].name),(R=l.fileAttachment)==null||!R.showMediaDisplay)continue;const ce=await Sa(m[Z]);!ce.fileType||!ce.fileUrl||await a(I(_a,{file:m[Z],fileType:ce.fileType,fileUrl:ce.fileUrl}),"USER")}await B("๐Ÿ“„ "+re.join(", "),(Q=l.fileAttachment)==null?void 0:Q.sendFileName),await q({userInput:(M=b.current)==null?void 0:M.value,prevPath:p(),currPath:f(),goToPath:v,setTextAreaValue:x,injectMessage:a,simulateStreamMessage:c,streamMessage:u,removeMessage:A,endStreamMessage:d,toggleChatWindow:P,showToast:k,dismissToast:_,files:m})}},multiple:(o=l.fileAttachment)==null?void 0:o.multiple,accept:(i=l.fileAttachment)==null?void 0:i.accept,disabled:!h}),(()=>{var L,H;const R=h?(L=l.fileAttachment)==null?void 0:L.icon:(H=l.fileAttachment)==null?void 0:H.iconDisabled;return R&&typeof R!="string"?R&&I("span",{className:h?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",children:I(R,{style:h?T:C})}):I("span",{className:h?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",style:h?T:C})})()]})},hp=()=>{var e,t,n,r,o,i;const{settings:l}=Ae(),{styles:s}=Ee(),{syncedTextAreaDisabledRef:a}=$e(),{inputRef:c}=We(),{textAreaDisabled:u,setTextAreaValue:A}=mn(),d=le(null),f=le(null),[p,v]=ne(!1),h={cursor:`url("${(e=l.general)==null?void 0:e.actionDisabledIcon}"), auto`,...s.emojiButtonStyle,...s.emojiButtonDisabledStyle},w={backgroundImage:`url(${(t=l.emoji)==null?void 0:t.icon})`,fill:"#a6a6a6",...s.emojiIconStyle},b={backgroundImage:`url(${(n=l.emoji)==null?void 0:n.icon})`,fill:"#a6a6a6",...s.emojiIconStyle,...s.emojiIconDisabledStyle};return ee(()=>{const g=_=>{const E=_.composedPath();d.current&&!E.includes(d.current)&&f.current&&!E.includes(f.current)&&v(!1)},k=()=>{(()=>{if(d.current&&f.current){const _=f.current.getBoundingClientRect(),E=d.current.offsetHeight,P=_.top-E-8;d.current.style.left=`${_.left}px`,d.current.style.top=`${P}px`}})()};return document.addEventListener("mousedown",g),window.addEventListener("resize",k),()=>{document.removeEventListener("mousedown",g),window.removeEventListener("resize",k)}},[]),I(ge,{children:[I("div",{"aria-label":((r=l.ariaLabel)==null?void 0:r.emojiButton)??"emoji picker",role:"button",ref:f,className:u?"rcb-emoji-button-disabled":"rcb-emoji-button-enabled",style:u?h:{...s.emojiButtonStyle},onMouseDown:g=>{g.preventDefault(),a.current?v(!1):v(k=>!k)},children:(()=>{var g,k;const _=u?(g=l.emoji)==null?void 0:g.iconDisabled:(k=l.emoji)==null?void 0:k.icon;return _&&typeof _!="string"?_&&I("span",{className:u?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",children:I(_,{style:u?b:w})}):I("span",{className:u?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",style:u?b:w})})()}),p&&I("div",{className:"rcb-emoji-button-popup",ref:d,children:(i=(o=l.emoji)==null?void 0:o.list)==null?void 0:i.map((g,k)=>I("span",{className:"rcb-emoji",onMouseDown:_=>((E,P)=>{E.preventDefault(),c.current&&(A(c.current.value+P),setTimeout(()=>{const x=c.current;if(x){x.focus();const B=x.value.length;x.setSelectionRange(B,B)}},50)),v(!1)})(_,g),children:g},k))})]})},gp=()=>{var e,t,n;const{settings:r}=Ae(),{styles:o}=Ee(),{audioToggledOn:i,toggleAudio:l}=ka(),s={backgroundImage:`url(${(e=r.audio)==null?void 0:e.icon})`,fill:"#fcec3d",...o.audioIconStyle},a={backgroundImage:`url(${(t=r.audio)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.audioIconStyle,...o.audioIconDisabledStyle};return I("div",{"aria-label":((n=r.ariaLabel)==null?void 0:n.audioButton)??"toggle audio",role:"button",onMouseDown:async c=>{c.preventDefault(),await l()},style:i?{...o.audioButtonStyle}:{...o.audioButtonStyle,...o.audioButtonDisabledStyle},children:(()=>{var c,u;const A=i?(c=r.audio)==null?void 0:c.icon:(u=r.audio)==null?void 0:u.iconDisabled;return A&&typeof A!="string"?A&&I("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",children:I(A,{style:i?s:a,"data-testid":"rcb-audio-icon-svg"})}):I("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",style:i?s:a})})()})},mp=()=>{var e,t;const{settings:n}=Ae(),{styles:r}=Ee(),{toggleChatWindow:o}=ht(),i={backgroundImage:`url(${(e=n.header)==null?void 0:e.closeChatIcon})`,fill:"#e8eaed",stroke:"#e8eaed",...r.closeChatIconStyle};return I("div",{"aria-label":((t=n.ariaLabel)==null?void 0:t.closeChatButton)??"close chat",role:"button",onMouseDown:l=>{l.stopPropagation(),o(!1)},style:{...r.closeChatButtonStyle},children:(()=>{var l;const s=(l=n.header)==null?void 0:l.closeChatIcon;return s&&typeof s!="string"?s&&I("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",children:I(s,{style:i})}):I("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",style:i})})()})},yp=()=>{var e,t,n;const{settings:r}=Ae(),{styles:o}=Ee(),{notificationsToggledOn:i,toggleNotifications:l}=(()=>{const{notificationsToggledOn:c,toggleNotifications:u,playNotificationSound:A}=ui();return{notificationsToggledOn:c,toggleNotifications:u,playNotificationSound:A}})(),s={backgroundImage:`url(${(e=r.notification)==null?void 0:e.icon})`,fill:"#fcec3d",...o.notificationIconStyle},a={backgroundImage:`url(${(t=r.notification)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.notificationIconStyle,...o.notificationIconDisabledStyle};return I("div",{"aria-label":((n=r.ariaLabel)==null?void 0:n.notificationButton)??"toggle notifications",role:"button",onMouseDown:async c=>{c.preventDefault(),await l()},style:i?{...o.notificationButtonStyle}:{...o.notificationButtonStyle,...o.notificationButtonDisabledStyle},children:(()=>{var c,u;const A=i?(c=r.notification)==null?void 0:c.icon:(u=r.notification)==null?void 0:u.iconDisabled;return A&&typeof A!="string"?A&&I("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",children:I(A,{style:i?s:a,"data-testid":"rcb-notification-icon-svg"})}):I("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",style:i?s:a})})()})},vp=()=>{var e,t,n;const{settings:r}=Ae(),{styles:o}=Ee(),{injectMessage:i}=gn(),{inputRef:l}=We(),{voiceToggledOn:s,toggleVoice:a}=hi(),{setInputLength:c,setTextAreaValue:u,textAreaDisabled:A}=mn(),{handleSubmitText:d}=On(),f=le([]),[p,v]=ne(!1);ee(()=>{var k;(k=r.voice)!=null&&k.sendAsAudio?(g(),f.current=[]):d()},[p]),ee(()=>{s?((k,_,E,P,x,B,D)=>{var T;(T=k.voice)!=null&&T.sendAsAudio?lp(E,B):ip(k,_,E,P,x,D)})(r,a,b,u,c,f,l):fi()},[s]);const h={backgroundImage:`url(${(e=r.voice)==null?void 0:e.icon})`,fill:"#9aa0a6",...o.voiceIconStyle},w={backgroundImage:`url(${(t=r.voice)==null?void 0:t.iconDisabled})`,fill:"#9aa0a6",...o.voiceIconStyle,...o.voiceIconDisabledStyle},b=()=>{v(k=>!k)},g=async()=>{const k=new Blob(f.current,{type:"audio/wav"}),_=new File([k],"voice-input.wav",{type:"audio/wav"}),E=await Sa(_);!E.fileType||!E.fileUrl||await i(I(_a,{file:_,fileType:E.fileType,fileUrl:E.fileUrl}),"USER")};return I("div",{"aria-label":((n=r.ariaLabel)==null?void 0:n.voiceButton)??"toggle voice",role:"button",onMouseDown:async k=>{k.preventDefault(),!A&&await a()},style:s&&!A?{...o.voiceButtonStyle}:{...o.voiceButtonStyle,...o.voiceButtonDisabledStyle},className:s&&!A?"rcb-voice-button-enabled":"rcb-voice-button-disabled",children:(()=>{var k,_;const E=s?(k=r.voice)==null?void 0:k.icon:(_=r.voice)==null?void 0:_.iconDisabled;return E&&typeof E!="string"?E&&I("span",{className:"rcb-voice-icon "+(s&&!A?"on":""),children:I(E,{style:s&&!A?h:w})}):I("span",{className:"rcb-voice-icon"+(s&&!A?"-on":""),"data-testid":"rcb-voice-icon",style:s&&!A?h:w})})()})},wp=()=>{var e,t,n,r,o,i,l,s;const{settings:a}=Ae(),{styles:c}=Ee(),{textAreaDisabled:u}=$e(),[A,d]=ne(!1),{handleSubmitText:f}=On(),p={backgroundColor:(e=a.general)==null?void 0:e.primaryColor,...c.sendButtonStyle},v={cursor:`url("${(t=a.general)==null?void 0:t.actionDisabledIcon}"), auto`,backgroundColor:(n=a.general)==null?void 0:n.primaryColor,...c.sendButtonStyle,...c.sendButtonDisabledStyle},h={backgroundColor:(r=a.general)==null?void 0:r.secondaryColor,...c.sendButtonStyle,...c.sendButtonHoveredStyle},w={backgroundImage:`url(${(o=a.chatInput)==null?void 0:o.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle},b={backgroundImage:`url(${(i=a.chatInput)==null?void 0:i.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle,...c.sendIconDisabledStyle},g={backgroundImage:`url(${(l=a.chatInput)==null?void 0:l.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle,...c.sendIconHoveredStyle};return I("div",{"aria-label":((s=a.ariaLabel)==null?void 0:s.sendButton)??"send message",role:"button",onMouseEnter:()=>{d(!0)},onMouseLeave:()=>{d(!1)},onMouseDown:async k=>{k==null||k.preventDefault(),!u&&await f()},style:u?v:A?h:p,className:"rcb-send-button",children:(()=>{var k;const _=(k=a.chatInput)==null?void 0:k.sendButtonIcon;return _&&typeof _!="string"?_&&I("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",children:I(_,{style:u?b:A?g:w})}):I("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",style:u?b:A?g:w})})()})},bp=(e,t)=>{var n,r,o,i,l,s,a,c,u;const A={[Fe.AUDIO_BUTTON]:(n=e.audio)==null?void 0:n.disabled,[Fe.CLOSE_CHAT_BUTTON]:(r=e.general)==null?void 0:r.embedded,[Fe.EMOJI_PICKER_BUTTON]:(o=e.emoji)==null?void 0:o.disabled,[Fe.FILE_ATTACHMENT_BUTTON]:(i=e.fileAttachment)==null?void 0:i.disabled,[Fe.NOTIFICATION_BUTTON]:(l=e.notification)==null?void 0:l.disabled,[Fe.SEND_MESSAGE_BUTTON]:!1,[Fe.VOICE_MESSAGE_BUTTON]:(s=e.voice)==null?void 0:s.disabled},d={},f=p=>p?p.map(v=>{if(typeof v=="string"){if((h=>Object.values(Fe).includes(h))(v)&&!A[v]){if(d[v])return d[v];const h=t[v];if(typeof h=="function"){const w=h();return d[v]=w,w}return null}return null}return v}).filter(v=>v!==null):[];return{header:f((a=e.header)==null?void 0:a.buttons),chatInput:f((c=e.chatInput)==null?void 0:c.buttons),footer:f((u=e.footer)==null?void 0:u.buttons)}},kp=()=>{const{settings:e}=Ae(),t=qe(()=>({[Fe.CLOSE_CHAT_BUTTON]:()=>I(mp,{}),[Fe.AUDIO_BUTTON]:()=>I(gp,{}),[Fe.NOTIFICATION_BUTTON]:()=>I(yp,{}),[Fe.EMOJI_PICKER_BUTTON]:()=>I(hp,{}),[Fe.FILE_ATTACHMENT_BUTTON]:()=>I(pp,{}),[Fe.SEND_MESSAGE_BUTTON]:()=>I(wp,{}),[Fe.VOICE_MESSAGE_BUTTON]:()=>I(vp,{})}),[]),{header:n,chatInput:r,footer:o}=qe(()=>bp(e,t),[e,t]);return{headerButtons:qe(()=>n,[n]),chatInputButtons:qe(()=>r,[r]),footerButtons:qe(()=>o,[o])}},gi=()=>{const{settings:e}=Ae(),{styles:t}=Ee(),{setSyncedMessages:n,syncedMessagesRef:r}=si(),{isLoadingChatHistory:o,setIsLoadingChatHistory:i,hasChatHistoryLoaded:l,setHasChatHistoryLoaded:s}=$e(),{chatBodyRef:a}=We(),{dispatchRcbEvent:c}=Pt(),u=X(async()=>{var A,d;const f=cr();if(!f||(A=e.event)!=null&&A.rcbLoadChatHistory&&(await c(V.LOAD_CHAT_HISTORY,{})).defaultPrevented)return;i(!0);const p=((d=a.current)==null?void 0:d.scrollHeight)??0;((v,h,w,b,g,k,_,E,P)=>{var x;if(ya=!0,w!=null)try{const B=en(I(Xf,{}),"SYSTEM"),D=g.current.slice(1);b([B,...D]);const T=w.map(C=>{if(C.type==="object"){const L=ba(C.content,v,h);return{...C,content:L}}return C});setTimeout(()=>{var C;const L=g.current.slice(1);let H=(C=v.chatHistory)!=null&&C.autoLoad?en(I(ge,{}),"SYSTEM"):en(I(Kf,{}),"SYSTEM");b([...T,H,...L]),P(!0)},500),setTimeout(()=>{if(!k.current)return;const{scrollHeight:C}=k.current,L=C-_;k.current.scrollTop+=L,E(!1)},510)}catch{tn.removeItem((x=v.chatHistory)==null?void 0:x.storageKey)}})(e,t,f,n,r,a,p,i,s)},[e,t,c,r,a,i,s]);return{isLoadingChatHistory:o,setIsLoadingChatHistory:i,hasChatHistoryLoaded:l,showChatHistory:u}},xp=()=>{var e,t,n;const{settings:r}=Ae(),{styles:o}=Ee(),{showChatHistory:i}=gi(),[l,s]=ne(!1),a={color:(e=r.general)==null?void 0:e.primaryColor,borderColor:(t=r.general)==null?void 0:t.primaryColor,...o.chatHistoryButtonStyle,...o.chatHistoryButtonHoveredStyle};return I("div",{className:"rcb-view-history-container",children:I("div",{onMouseEnter:()=>{s(!0)},onMouseLeave:()=>{s(!1)},style:l?a:{...o.chatHistoryButtonStyle},onMouseDown:c=>{c.preventDefault(),i()},className:"rcb-view-history-button",role:"button",tabIndex:0,children:I("p",{children:(n=r.chatHistory)==null?void 0:n.viewChatHistoryButtonText})})})},Ep=()=>{var e,t,n,r;const o=$r(),{settings:i}=Ae(),{replaceMessages:l}=gn(),{isBotTyping:s,isChatWindowOpen:a,setUnreadCount:c,setSyncedIsChatWindowOpen:u,setSyncedTextAreaDisabled:A,setSyncedAudioToggledOn:d,setSyncedVoiceToggledOn:f,setSyncedIsScrolling:p,syncedIsScrollingRef:v,syncedIsChatWindowOpenRef:h}=$e(),{chatBodyRef:w}=We(),{viewportHeight:b,setViewportHeight:g,setViewportWidth:k,scrollToBottom:_}=ht(),{setUpNotifications:E}=ui(),{handleFirstInteraction:P}=(()=>{var T;const{settings:C}=Ae(),{hasInteractedPage:L,setHasInteractedPage:H,hasFlowStarted:R,setHasFlowStarted:Q}=$e(),M=X(()=>{var O;if(H(!0),!R&&((O=C.general)==null?void 0:O.flowStartTrigger)==="ON_PAGE_INTERACT"&&Q(!0),!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const m=new window.SpeechSynthesisUtterance;m.text="",m.onend=()=>{window.removeEventListener("click",M),window.removeEventListener("keydown",M),window.removeEventListener("touchstart",M)},window.speechSynthesis.speak(m)},[R,(T=C.general)==null?void 0:T.flowStartTrigger]);return{hasInteractedPage:L,handleFirstInteraction:M}})(),{showChatHistory:x}=gi(),B=le(0),D=le(!1);ee(()=>(window.addEventListener("click",P),window.addEventListener("keydown",P),window.addEventListener("touchstart",P),()=>{window.removeEventListener("click",P),window.removeEventListener("keydown",P),window.removeEventListener("touchstart",P)}),[]),ee(()=>{const T=w.current;if(!T)return;const C=()=>{D.current||(D.current=!0,requestAnimationFrame(()=>{var L,H;if(!T)return;const{scrollTop:R,clientHeight:Q,scrollHeight:M}=T,O=R+Q<M-(((L=i.chatWindow)==null?void 0:L.messagePromptOffset)??30);p(O),v.current=O,O||(R+Q>=M-1&&(T.scrollTop=M-Q-1),(h.current||(H=i.general)!=null&&H.embedded)&&c(0)),D.current=!1}))};return T.addEventListener("wheel",C,{passive:!0}),T.addEventListener("touchmove",C,{passive:!0}),()=>{T.removeEventListener("wheel",C),T.removeEventListener("touchmove",C)}},[]),ee(()=>{var T,C,L;A((T=i.chatInput)==null?void 0:T.disabled),u((C=i.chatWindow)==null?void 0:C.defaultOpen),d((L=i.audio)==null?void 0:L.defaultToggledOn),setTimeout(()=>{var H;f((H=i.voice)==null?void 0:H.defaultToggledOn)},1)},[]),ee(()=>{var T;(T=i.notification)!=null&&T.disabled||E()},[(e=i.notification)==null?void 0:e.disabled]),ee(()=>{!v.current&&w!=null&&w.current&&_()},[s]),ee(()=>{var T,C;if((T=i.chatHistory)!=null&&T.disabled)tn&&tn.removeItem(qr);else if(ci(i),cr().length>0){const L=en(I(xp,{}),"SYSTEM");l([L]),(C=i.chatHistory)!=null&&C.autoLoad&&x()}},[(t=i.chatHistory)==null?void 0:t.storageKey,(n=i.chatHistory)==null?void 0:n.maxEntries,(r=i.chatHistory)==null?void 0:r.disabled]),ee(()=>{var T;o||(T=i.general)!=null&&T.embedded||!navigator.virtualKeyboard||(navigator.virtualKeyboard.overlaysContent=!0,navigator.virtualKeyboard.addEventListener("geometrychange",C=>{if(!C.target)return;const{x:L,y:H,width:R,height:Q}=C.target.boundingRect;L==0&&H==0&&R==0&&Q==0?(setTimeout(()=>{var M;g((M=window.visualViewport)==null?void 0:M.height)},101),setTimeout(()=>{var M,O;b!=((M=window.visualViewport)==null?void 0:M.height)&&g((O=window.visualViewport)==null?void 0:O.height)},1001)):setTimeout(()=>{var M;g(((M=window.visualViewport)==null?void 0:M.height)-Q)},101)}))},[o]),ee(()=>{var T,C,L,H;if(o)return;a&&(g((T=window.visualViewport)==null?void 0:T.height),k((C=window.visualViewport)==null?void 0:C.width));const R=()=>window.scrollTo({top:0,left:0,behavior:"auto"}),Q=()=>B.current=window.scrollY,M=()=>{var m,G;g((m=window.visualViewport)==null?void 0:m.height),k((G=window.visualViewport)==null?void 0:G.width)},O=()=>{var m;window.removeEventListener("scroll",R),window.removeEventListener("scroll",Q),(m=window.visualViewport)==null||m.removeEventListener("resize",M)};return a?(O(),document.body.style.position="fixed",window.addEventListener("scroll",R),(L=window.visualViewport)==null||L.addEventListener("resize",M)):(document.body.style.position="static",O(),window.scrollTo({top:B.current,left:0,behavior:"auto"}),window.addEventListener("scroll",Q),(H=window.visualViewport)==null||H.removeEventListener("resize",M)),O},[a,o])},_p="https://cdn.jsdelivr.net/gh/react-chatbotify/community-themes/themes",Sp="2592000",Ca="RCB_THEME_CACHE_DATA",Pa=async(e,t)=>{const{id:n,version:r,baseUrl:o=_p,cacheDuration:i=Sp}=t,l=r||await(async(w,b)=>{const g=`${b}/${w}/meta.json`;try{const k=await fetch(g);return k.ok?(await k.json()).version:(console.error(`Failed to fetch meta.json from ${g}`),null)}catch(k){return console.error(`Failed to fetch meta.json from ${g}`,k),null}})(n,o);if(!l)return console.error(`Unable to find version for theme: ${n}`),{settings:{},inlineStyles:{},cssStylesText:""};const s=((w,b,g)=>{const k=localStorage.getItem(`${Ca}_${w}_${b}`);if(!k)return null;try{const _=JSON.parse(k),E=new Date().getTime(),P=Math.floor(E/1e3);return _.cacheDate+g>=P?_:null}catch(_){return console.error(`Unable to fetch cache for ${w}`,_),null}})(n,l,i);if(s){const w=Da(e,s.cssStylesText);return{settings:s.settings,inlineStyles:s.inlineStyles,cssStylesText:w}}const a=`${o}/${n}/${l}/styles.css`,c=`${o}/${n}/${l}/settings.json`,u=`${o}/${n}/${l}/styles.json`;let A="";const d=await fetch(a);d.ok?A=await d.text():console.info(`Could not fetch styles.css from ${a}`);const f=await fetch(c);let p={};f.ok?p=await f.json():console.info(`Could not fetch settings.json from ${c}`);const v=await fetch(u);let h={};return v.ok?h=await v.json():console.info(`Could not fetch styles.json from ${u}`),((w,b,g,k,_)=>{const E=new Date().getTime(),P={settings:g,inlineStyles:k,cssStylesText:_,cacheDate:Math.floor(E/1e3)};localStorage.setItem(`${Ca}_${w}_${b}`,JSON.stringify(P))})(n,l,p,h,A),{settings:p,inlineStyles:h,cssStylesText:Da(e,A)}},Da=(e,t)=>t.split(new RegExp("(?<=})")).map(n=>{const r=n.trim();return r.startsWith("@import")||r.startsWith("@keyframes")||r.startsWith("@media")?r:r?`#${e} ${r}`:""}).join(`
4
+ `),Cp=async(e,t,n,r)=>{var o,i;let l=Kr(aa),s=Kr(ua),a="";if(r!=null)if(Array.isArray(r))for(const c of r){const u=await Pa(e,c);l=Qt(u.settings,l),s=Qt(u.inlineStyles,s),a+=u.cssStylesText}else{const c=await Pa(e,r);l=Qt(c.settings,l),s=Qt(c.inlineStyles,s),a+=c.cssStylesText}return t!=null&&(l=Qt(t,l)),n!=null&&(s=Qt(n,s)),((o=l.chatInput)==null?void 0:o.botDelay)!=null&&((i=l.chatInput)==null?void 0:i.botDelay)<500&&(l.chatInput.botDelay=500),{settings:l,inlineStyles:s,cssStylesText:a}},Qt=(e,t)=>{const n=[{source:e,target:t}];for(;n.length;){const r=n.pop();if(r==null)continue;const{source:o,target:i}=r;for(const l of Object.keys(o)){const s=l;if(pn(o[s]))i[s]=o[s];else if(typeof o[s]!="object"||o[s]===null||Array.isArray(o[s]))try{i[s]=o[s]}catch{}else(typeof i[s]!="object"||i[s]===null)&&(i[s]={}),n.push({source:o[s],target:i[s]})}}return t},Kr=e=>{if(e===null||typeof e!="object")return e;const t=Array.isArray(e)?[]:{},n=[{source:e,target:t}],r=new WeakMap;for(r.set(e,t);n.length;){const o=n.pop();if(o==null)continue;const{source:i,target:l}=o;for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const a=i[s];if(a&&typeof a=="object")if(r.has(a))l[s]=r.get(a);else{const c=Array.isArray(a)?[]:{};r.set(a,c),l[s]=c,n.push({source:a,target:c})}else l[s]=a}}return t},Ia=()=>{const{settings:e,setSyncedSettings:t,syncedSettingsRef:n}=Ae(),r=X(i=>{!i||Object.keys(i).length===0||t(Kr(Qt(i,e)))},[e]),o=X(i=>{const l=typeof i=="function"?i(n.current):i;t(l)},[n]);return{settings:e,replaceSettings:o,updateSettings:r}},Ba=()=>{const{styles:e,setSyncedStyles:t,syncedStylesRef:n}=Ee(),r=X(i=>{!i||Object.keys(i).length===0||t(Kr(Qt(i,e)))},[e]),o=X(i=>{const l=typeof i=="function"?i(n.current):i;t(l)},[n]);return{styles:e,replaceStyles:o,updateStyles:r}},Pp=({plugins:e,slots:t})=>{var n,r;const o=$r(),{settings:i}=Ae(),{styles:l}=Ee(),{hasFlowStarted:s,setHasFlowStarted:a}=$e(),{inputRef:c}=We(),{viewportHeight:u,viewportWidth:A,isChatWindowOpen:d}=ht(),{goToPath:f}=Vr(),{headerButtons:p,chatInputButtons:v,footerButtons:h}=kp();Ep(),(b=>{const{updateSettings:g}=Ia(),{updateStyles:k}=Ba(),_=b==null?void 0:b.map(E=>E());ee(()=>{let E={},P={};_==null||_.forEach(x=>{x!=null&&x.settings&&Object.keys(x==null?void 0:x.settings).length!==0&&(E=Qt(x.settings,E)),x!=null&&x.styles&&Object.keys(x==null?void 0:x.styles).length!==0&&(P=Qt(x.styles,P))}),g(E),k(P)},[])})(e),ee(()=>{var b;(s||((b=i.general)==null?void 0:b.flowStartTrigger)==="ON_LOAD")&&f("start")},[s,(n=i.general)==null?void 0:n.flowStartTrigger]);const w=qe(()=>{var b;const g="rcb-chatbot-global ";return(b=i.general)!=null&&b.embedded?g+"rcb-window-embedded":d?g+"rcb-window-open":g+"rcb-window-close"},[i,d]);return I(ge,{children:(()=>{var b,g;return o&&((b=i.device)==null?void 0:b.desktopEnabled)||!o&&((g=i.device)==null?void 0:g.mobileEnabled)})()&&I("div",{onMouseDown:b=>{var g,k;!s&&((g=i.general)==null?void 0:g.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&a(!0),o?(k=c.current)==null||k.blur():b==null||b.preventDefault()},className:w,children:[I(Ap,{}),I(up,{}),d&&!o&&!((r=i.general)!=null&&r.embedded)&&I(ge,{children:[I("style",{children:`
5
5
  html {
6
6
  overflow: hidden !important;
7
7
  touch-action: none !important;
8
8
  scroll-behavior: auto !important;
9
9
  }
10
- `}),C("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#fff",zIndex:9999}})]}),C("div",{style:(()=>{var y,g;return o||(y=i.general)!=null&&y.embedded?(g=i.general)!=null&&g.embedded?{...A.chatWindowStyle}:{...A.chatWindowStyle,zIndex:1e4}:{...A.chatWindowStyle,borderRadius:"0px",left:"0px",right:"auto",top:"0px",bottom:"auto",width:`${u}px`,height:`${c}px`,zIndex:1e4}})(),className:"rcb-chat-window",children:(()=>{var y,g,_;const P=(t==null?void 0:t.chatBotHeader)||zl,E=(t==null?void 0:t.chatBotBody)||Jl,k=(t==null?void 0:t.chatBotInput)||wc,B=(t==null?void 0:t.chatBotFooter)||bc;return C(ce,{children:[((y=i.general)==null?void 0:y.showHeader)&&C(P,{buttons:h}),C(E,{}),C(Cc,{}),((g=i.general)==null?void 0:g.showInputRow)&&C(k,{buttons:m}),((_=i.general)==null?void 0:_.showFooter)&&C(B,{buttons:p})]})})()})]})})},za=At(void 0),ja=()=>rt(za),qa=({children:e})=>{var t;const n=ne(""),r=ne({}),[o,i,A]=Je({}),[s,a,l]=Je({}),[c,u]=ee(!1);return X(()=>{u(!0)},[]),c?C("div",{style:{fontFamily:(t=o.general)==null?void 0:t.fontFamily},children:C(za.Provider,{value:{loadConfig:async(d,f,h,m,p,v)=>{n.current=d,r.current=f;const y=await Hc(d,h,m,p);v.current&&(v.current.textContent=y.cssStylesText),i(y.settings),a(y.inlineStyles)}},children:C(Ul,{settings:o,setSyncedSettings:i,syncedSettingsRef:A,children:C(Fl,{styles:s,setSyncedStyles:a,syncedStylesRef:l,children:C(vc,{children:C(jl,{botIdRef:n,flowRef:r,children:C(Gl,{children:C(ql,{settings:o,children:C($l,{children:e})})})})})})})})}):null},Fc=({id:e,flow:t,settings:n,styles:r,themes:o,plugins:i,setConfigLoaded:A,styleRootRef:s})=>{const a=Ie(()=>e,[]),l=ja(),{flowRef:c}=Te();return c&&c.current!==t&&(c.current=t),X(()=>{(async()=>{var u,d;(u=n.event)!=null&&u.rcbPreLoadChatBot&&(await ro(z.PRE_LOAD_CHATBOT,{botId:a,currPath:null,prevPath:null},{flow:t,settings:n,styles:r,themes:o,plugins:i})).defaultPrevented||(l!=null&&l.loadConfig&&(await l.loadConfig(a,t,n,r,o,s),A(!0)),(d=n.event)!=null&&d.rcbPostLoadChatBot&&ro(z.POST_LOAD_CHATBOT,{botId:a,currPath:null,prevPath:null},{flow:t,settings:n,styles:r,themes:o,plugins:i}))})()},[o]),null},ho=["Quickstart","API Docs","Examples","Github","Discord"],zc={start:{message:"Hello, I am Tan Jin ๐Ÿ‘‹! Welcome to React ChatBotify, I'm excited that you are using our chatbot ๐Ÿ˜Š!",transition:{duration:1e3},chatDisabled:!0,path:"show_options"},show_options:{message:"It looks like you have not set up a conversation flow yet. No worries! Here are a few helpful things you can check out to get started:",options:ho,path:"process_options"},prompt_again:{message:"Do you need any other help?",options:ho,path:"process_options"},unknown_input:{message:"Sorry, I do not understand your message ๐Ÿ˜ข! If you require further assistance, you may click on the Github option and open an issue there or visit our discord.",options:ho,path:"process_options"},process_options:{transition:{duration:0},path:e=>{let t="";switch(e.userInput){case"Quickstart":t="https://react-chatbotify.com/docs/introduction/quickstart/";break;case"API Docs":t="https://react-chatbotify.com/docs/api/bot_options";break;case"Examples":t="https://react-chatbotify.com/docs/examples/basic_form";break;case"Github":t="https://github.com/react-chatbotify/react-chatbotify/";break;case"Discord":t="https://discord.gg/6R4DK4G5Zh";break;default:return"unknown_input"}return e.injectMessage("Sit tight! I'll send you right there!"),setTimeout(()=>{window.open(t)},1e3),"repeat"}},repeat:{transition:{duration:3e3},path:"prompt_again"}},jc=({id:e,flow:t,settings:n,styles:r,themes:o,plugins:i,slots:A})=>{const s=Ie(()=>e||"rcb-"+or(),[]),a=t&&Object.keys(t).length!==0?t:zc,l=n||{},c=r||{},u=i||[],[d,f]=ee(!1),h=ja(),m=ne(null),[p,v]=ee(o||[]);X(()=>{o&&v(o)},[o]);const y=()=>C(ce,{children:[C(Fc,{styleRootRef:m,id:s,flow:a,settings:l,styles:c,themes:p,plugins:u,setConfigLoaded:f}),d&&C(Uc,{plugins:i,slots:A})]});return C(h==null?qa:ce,{children:[C("style",{ref:m}),C("div",{id:s,children:y()})]})},qc=()=>{const{getBotId:e}=(()=>{const{botIdRef:t}=Te();return{getBotId:q(()=>t.current,[t])}})();return{getBotId:e}},dr=()=>{const{hasFlowStarted:e,restartFlow:t,getFlow:n}=(()=>{const{replaceMessages:r}=qt(),{replacePaths:o,goToPath:i}=lr(),{replaceToasts:A}=rn(),{hasFlowStarted:s}=Oe(),{flowRef:a,timeoutIdRef:l}=Te(),{settings:c}=ae();return{hasFlowStarted:s,restartFlow:q(async()=>{ao(c),l.current&&clearTimeout(l.current),r([]),A([]),o([]),await i("start")},[l,c,r,A,o,ao,i]),getFlow:q(()=>(a==null?void 0:a.current)??{},[a])}})();return{hasFlowStarted:e,restartFlow:t,getFlow:n}},Tn=()=>{const{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:o,messages:i,replaceMessages:A,getMessages:s}=qt();return{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:o,messages:i,replaceMessages:A,getMessages:s}},ot=(e,t)=>{const{getBotId:n}=qc();X(()=>{const r=o=>{o.detail.botId===n()&&t(o)};return window.addEventListener(e,r),()=>{window.removeEventListener(e,r)}},[n,e,t])},Wa=()=>{const{settings:e,replaceSettings:t,updateSettings:n}=Ua();return{settings:e,replaceSettings:t,updateSettings:n}},Ga=()=>{const{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:n,toggleTextAreaSensitiveMode:r,getTextAreaValue:o,setTextAreaValue:i,focusTextArea:A,blurTextArea:s}=Wt();return{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:n,toggleTextAreaSensitiveMode:r,getTextAreaValue:o,setTextAreaValue:i,focusTextArea:A,blurTextArea:s}},Ya=()=>{const{showChatHistory:e,hasChatHistoryLoaded:t}=po();return{showChatHistory:e,getHistoryMessages:In,setHistoryMessages:io,hasChatHistoryLoaded:t}},go={a:{content:9,self:!1,type:105},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:9,void:!0},body:{content:127},button:{content:8,type:105},caption:{content:1,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:97},dd:{content:1,parent:["dl"]},dl:{children:["dt","dd"],type:1},dt:{content:1,invalid:["footer","header"],parent:["dl"]},figcaption:{content:1,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:1,void:!0},img:{void:!0},li:{content:1,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:1},picture:{children:["source","img"],type:25},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:8,parent:["ruby","rtc"]},rtc:{content:8,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:8,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:1},tbody:{parent:["table"],children:["tr"]},td:{content:1,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:1,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:1},video:{children:["track","source"]},wbr:{type:9,void:!0}};function Gt(e){return t=>{go[t]={...e,...go[t]}}}["address","main","div","figure","p","pre"].forEach(Gt({content:1,type:65})),["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Gt({content:8,type:73})),["p","pre"].forEach(Gt({content:8,type:65})),["s","small","span","del","ins"].forEach(Gt({content:8,type:9})),["article","aside","footer","header","nav","section","blockquote"].forEach(Gt({content:1,type:67})),["h1","h2","h3","h4","h5","h6"].forEach(Gt({content:8,type:69})),["audio","canvas","iframe","img","video"].forEach(Gt({type:89}));const mo=Object.freeze(go),Wc=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Gc=Object.keys(mo).filter(e=>e!=="canvas"&&e!=="iframe"),$a=Object.freeze({alt:1,cite:1,class:1,colspan:3,controls:4,datetime:1,default:4,disabled:4,dir:1,height:1,href:1,id:1,kind:1,label:1,lang:1,loading:1,loop:4,media:1,muted:4,poster:1,rel:1,role:1,rowspan:3,scope:1,sizes:1,span:3,start:3,style:5,src:1,srclang:1,srcset:1,tabindex:1,target:1,title:1,type:1,width:1}),Yc=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function fr(){return fr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fr.apply(this,arguments)}function Va({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){const i=o;return r?M.createElement(i,fr({className:t},e)):M.createElement(i,fr({className:t},e),n)}class $c{attribute(t,n){return n}node(t,n){return n}}function Vc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}/*!
10
+ `}),I("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#fff",zIndex:9999}})]}),I("div",{style:(()=>{var b,g;return o||(b=i.general)!=null&&b.embedded?(g=i.general)!=null&&g.embedded?{...l.chatWindowStyle}:{...l.chatWindowStyle,zIndex:1e4}:{...l.chatWindowStyle,borderRadius:"0px",left:"0px",right:"auto",top:"0px",bottom:"auto",width:`${A}px`,height:`${u}px`,zIndex:1e4}})(),className:"rcb-chat-window",children:(()=>{var b,g,k;const _=(t==null?void 0:t.chatBotHeader)||If,E=(t==null?void 0:t.chatBotBody)||Hf,P=(t==null?void 0:t.chatBotInput)||ap,x=(t==null?void 0:t.chatBotFooter)||cp;return I(ge,{children:[((b=i.general)==null?void 0:b.showHeader)&&I(_,{buttons:p}),I(E,{}),I(fp,{}),((g=i.general)==null?void 0:g.showInputRow)&&I(P,{buttons:v}),((k=i.general)==null?void 0:k.showFooter)&&I(x,{buttons:h})]})})()})]})})},Ta=Ct(void 0),Ma=()=>wt(Ta),Oa=({children:e})=>{var t;const n=le(""),r=le({}),[o,i,l]=pt({}),[s,a,c]=pt({}),[u,A]=ne(!1);return ee(()=>{A(!0)},[]),u?I("div",{style:{fontFamily:(t=o.general)==null?void 0:t.fontFamily},children:I(Ta.Provider,{value:{loadConfig:async(d,f,p,v,h,w)=>{n.current=d,r.current=f;const b=await Cp(d,p,v,h);w.current&&(w.current.textContent=b.cssStylesText),i(b.settings),a(b.inlineStyles)}},children:I(Pf,{settings:o,setSyncedSettings:i,syncedSettingsRef:l,children:I(Df,{styles:s,setSyncedStyles:a,syncedStylesRef:c,children:I(sp,{children:I(Bf,{botIdRef:n,flowRef:r,children:I(Of,{children:I(Tf,{settings:o,children:I(Lf,{children:e})})})})})})})})}):null},Dp=({id:e,flow:t,settings:n,styles:r,themes:o,plugins:i,setConfigLoaded:l,styleRootRef:s})=>{const a=qe(()=>e,[]),c=Ma(),{flowRef:u}=We();return u&&u.current!==t&&(u.current=t),ee(()=>{(async()=>{var A,d;(A=n.event)!=null&&A.rcbPreLoadChatBot&&(await li(V.PRE_LOAD_CHATBOT,{botId:a,currPath:null,prevPath:null},{flow:t,settings:n,styles:r,themes:o,plugins:i})).defaultPrevented||(c!=null&&c.loadConfig&&(await c.loadConfig(a,t,n,r,o,s),l(!0)),(d=n.event)!=null&&d.rcbPostLoadChatBot&&li(V.POST_LOAD_CHATBOT,{botId:a,currPath:null,prevPath:null},{flow:t,settings:n,styles:r,themes:o,plugins:i}))})()},[o]),null},mi=["Quickstart","API Docs","Examples","Github","Discord"],Ip={start:{message:"Hello, I am Tan Jin ๐Ÿ‘‹! Welcome to React ChatBotify, I'm excited that you are using our chatbot ๐Ÿ˜Š!",transition:{duration:1e3},chatDisabled:!0,path:"show_options"},show_options:{message:"It looks like you have not set up a conversation flow yet. No worries! Here are a few helpful things you can check out to get started:",options:mi,path:"process_options"},prompt_again:{message:"Do you need any other help?",options:mi,path:"process_options"},unknown_input:{message:"Sorry, I do not understand your message ๐Ÿ˜ข! If you require further assistance, you may click on the Github option and open an issue there or visit our discord.",options:mi,path:"process_options"},process_options:{transition:{duration:0},path:e=>{let t="";switch(e.userInput){case"Quickstart":t="https://react-chatbotify.com/docs/introduction/quickstart/";break;case"API Docs":t="https://react-chatbotify.com/docs/api/bot_options";break;case"Examples":t="https://react-chatbotify.com/docs/examples/basic_form";break;case"Github":t="https://github.com/react-chatbotify/react-chatbotify/";break;case"Discord":t="https://discord.gg/6R4DK4G5Zh";break;default:return"unknown_input"}return e.injectMessage("Sit tight! I'll send you right there!"),setTimeout(()=>{window.open(t)},1e3),"repeat"}},repeat:{transition:{duration:3e3},path:"prompt_again"}},Bp=({id:e,flow:t,settings:n,styles:r,themes:o,plugins:i,slots:l})=>{const s=qe(()=>e||"rcb-"+jr(),[]),a=t&&Object.keys(t).length!==0?t:Ip,c=n||{},u=r||{},A=i||[],[d,f]=ne(!1),p=Ma(),v=le(null),[h,w]=ne(o||[]);ee(()=>{o&&w(o)},[o]);const b=()=>I(ge,{children:[I(Dp,{styleRootRef:v,id:s,flow:a,settings:c,styles:u,themes:h,plugins:A,setConfigLoaded:f}),d&&I(Pp,{plugins:i,slots:l})]});return I(p==null?Oa:ge,{children:[I("style",{ref:v}),I("div",{id:s,children:b()})]})},Tp=()=>{const{getBotId:e}=(()=>{const{botIdRef:t}=We();return{getBotId:X(()=>t.current,[t])}})();return{getBotId:e}},Xr=()=>{const{hasFlowStarted:e,restartFlow:t,getFlow:n}=(()=>{const{replaceMessages:r}=gn(),{replacePaths:o,goToPath:i}=Vr(),{replaceToasts:l}=Mn(),{hasFlowStarted:s}=$e(),{flowRef:a,timeoutIdRef:c}=We(),{settings:u}=Ae();return{hasFlowStarted:s,restartFlow:X(async()=>{ci(u),c.current&&clearTimeout(c.current),r([]),l([]),o([]),await i("start")},[c,u,r,l,o,ci,i]),getFlow:X(()=>(a==null?void 0:a.current)??{},[a])}})();return{hasFlowStarted:e,restartFlow:t,getFlow:n}},Jr=()=>{const{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:o,messages:i,replaceMessages:l,getMessages:s}=gn();return{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:o,messages:i,replaceMessages:l,getMessages:s}},bt=(e,t)=>{const{getBotId:n}=Tp();ee(()=>{const r=o=>{o.detail.botId===n()&&t(o)};return window.addEventListener(e,r),()=>{window.removeEventListener(e,r)}},[n,e,t])},Qa=()=>{const{settings:e,replaceSettings:t,updateSettings:n}=Ia();return{settings:e,replaceSettings:t,updateSettings:n}},La=()=>{const{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:n,toggleTextAreaSensitiveMode:r,getTextAreaValue:o,setTextAreaValue:i,focusTextArea:l,blurTextArea:s}=mn();return{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:n,toggleTextAreaSensitiveMode:r,getTextAreaValue:o,setTextAreaValue:i,focusTextArea:l,blurTextArea:s}},Na=()=>{const{showChatHistory:e,hasChatHistoryLoaded:t}=gi();return{showChatHistory:e,getHistoryMessages:cr,setHistoryMessages:ai,hasChatHistoryLoaded:t}},yi={a:{content:9,self:!1,type:105},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:9,void:!0},body:{content:127},button:{content:8,type:105},caption:{content:1,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:97},dd:{content:1,parent:["dl"]},dl:{children:["dt","dd"],type:1},dt:{content:1,invalid:["footer","header"],parent:["dl"]},figcaption:{content:1,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:1,void:!0},img:{void:!0},li:{content:1,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:1},picture:{children:["source","img"],type:25},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:8,parent:["ruby","rtc"]},rtc:{content:8,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:8,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:1},tbody:{parent:["table"],children:["tr"]},td:{content:1,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:1,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:1},video:{children:["track","source"]},wbr:{type:9,void:!0}};function yn(e){return t=>{yi[t]={...e,...yi[t]}}}["address","main","div","figure","p","pre"].forEach(yn({content:1,type:65})),["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(yn({content:8,type:73})),["p","pre"].forEach(yn({content:8,type:65})),["s","small","span","del","ins"].forEach(yn({content:8,type:9})),["article","aside","footer","header","nav","section","blockquote"].forEach(yn({content:1,type:67})),["h1","h2","h3","h4","h5","h6"].forEach(yn({content:8,type:69})),["audio","canvas","iframe","img","video"].forEach(yn({type:89}));const vi=Object.freeze(yi),Mp=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Op=Object.keys(vi).filter(e=>e!=="canvas"&&e!=="iframe"),Ra=Object.freeze({alt:1,cite:1,class:1,colspan:3,controls:4,datetime:1,default:4,disabled:4,dir:1,height:1,href:1,id:1,kind:1,label:1,lang:1,loading:1,loop:4,media:1,muted:4,poster:1,rel:1,role:1,rowspan:3,scope:1,sizes:1,span:3,start:3,style:5,src:1,srclang:1,srcset:1,tabindex:1,target:1,title:1,type:1,width:1}),Qp=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Zr(){return Zr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zr.apply(this,arguments)}function Fa({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){const i=o;return r?N.createElement(i,Zr({className:t},e)):N.createElement(i,Zr({className:t},e),n)}class Lp{attribute(t,n){return n}node(t,n){return n}}function Np(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}/*!
11
11
  * escape-html
12
12
  * Copyright(c) 2012-2013 TJ Holowaychuk
13
13
  * Copyright(c) 2015 Andreas Lubbe
14
14
  * Copyright(c) 2015 Tiancheng "Timothy" Gu
15
15
  * MIT Licensed
16
- */var Ka,Xa;const Kc=Vc(function(){if(Xa)return Ka;Xa=1;var e=/["'&<>]/;return Ka=function(t){var n=""+t,r=e.exec(n);if(!r)return n;var o,i="",A=0,s=0;for(A=r.index;A<n.length;A++){switch(n.charCodeAt(A)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 39:o="&#39;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}s!==A&&(i+=n.substring(s,A)),s=A+1,i+=o}return s!==A?i+n.substring(s,A):i}}());function kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Xc=/(url|image|image-set)\(/i;class Jc extends $c{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(Xc)&&delete n[r]}),n}}const Zc=/^<(!doctype|(html|head|body)(\s|>))/i,eu=/^(aria-|data-|\w+:)/iu,tu=/{{{(\w+)\/?}}}/;function nu(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}let Ja=class{constructor(e,t={},n=[],r=[]){var o;if(kt(this,"allowed",void 0),kt(this,"banned",void 0),kt(this,"blocked",void 0),kt(this,"container",void 0),kt(this,"content",[]),kt(this,"props",void 0),kt(this,"matchers",void 0),kt(this,"filters",void 0),kt(this,"keyIndex",void 0),process.env.NODE_ENV!=="production"&&e&&typeof e!="string")throw new TypeError("Interweave parser requires a valid string.");this.props=t,this.matchers=n,this.filters=[...r,new Jc],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set((o=t.allowList)!==null&&o!==void 0?o:Gc),this.banned=new Set(Wc),this.blocked=new Set(t.blockList)}applyAttributeFilters(e,t){return this.filters.reduce((n,r)=>n!==null&&typeof r.attribute=="function"?r.attribute(e,n):n,t)}applyNodeFilters(e,t){return this.filters.reduce((n,r)=>n!==null&&typeof r.node=="function"?r.node(e,n):n,t)}applyMatchers(e,t){const n={},{props:r}=this;let o=e,i=0,A=null;return this.matchers.forEach(s=>{const a=s.asTag().toLowerCase(),l=this.getTagConfig(a);if(r[s.inverseName]||!this.isTagAllowed(a)||!this.canRenderChild(t,l))return;let c="";for(;o&&(A=s.match(o));){const{index:u,length:d,match:f,valid:h,void:m,...p}=A,v=s.propName+String(i);u>0&&(c+=o.slice(0,u)),h?(c+=m?`{{{${v}/}}}`:`{{{${v}}}}${f}{{{/${v}}}}`,this.keyIndex+=1,i+=1,n[v]={children:f,matcher:s,props:{...r,...p,key:this.keyIndex}}):c+=f,s.greedy?(o=c+o.slice(u+d),c=""):o=o.slice(u+(d||f.length))}s.greedy||(o=c+o)}),i===0?e:this.replaceTokens(o,n)}canRenderChild(e,t){return!(!e.tagName||!t.tagName||e.void)&&(e.children.length>0?e.children.includes(t.tagName):!(e.invalid.length>0&&e.invalid.includes(t.tagName))&&(t.parent.length>0?t.parent.includes(e.tagName):!(!e.self&&e.tagName===t.tagName)&&!!(e&&e.content&t.type)))}convertLineBreaks(e){const{noHtml:t,disableLineBreaks:n}=this.props;if(t||n||e.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return e;let r=e.replace(/\r\n/g,`
16
+ */var Ha,Ua;const Rp=Np(function(){if(Ua)return Ha;Ua=1;var e=/["'&<>]/;return Ha=function(t){var n=""+t,r=e.exec(n);if(!r)return n;var o,i="",l=0,s=0;for(l=r.index;l<n.length;l++){switch(n.charCodeAt(l)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 39:o="&#39;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}s!==l&&(i+=n.substring(s,l)),s=l+1,i+=o}return s!==l?i+n.substring(s,l):i}}());function Yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Fp=/(url|image|image-set)\(/i;class Hp extends Lp{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(Fp)&&delete n[r]}),n}}const Up=/^<(!doctype|(html|head|body)(\s|>))/i,zp=/^(aria-|data-|\w+:)/iu,jp=/{{{(\w+)\/?}}}/;function qp(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}let za=class{constructor(e,t={},n=[],r=[]){var o;if(Yt(this,"allowed",void 0),Yt(this,"banned",void 0),Yt(this,"blocked",void 0),Yt(this,"container",void 0),Yt(this,"content",[]),Yt(this,"props",void 0),Yt(this,"matchers",void 0),Yt(this,"filters",void 0),Yt(this,"keyIndex",void 0),process.env.NODE_ENV!=="production"&&e&&typeof e!="string")throw new TypeError("Interweave parser requires a valid string.");this.props=t,this.matchers=n,this.filters=[...r,new Hp],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set((o=t.allowList)!==null&&o!==void 0?o:Op),this.banned=new Set(Mp),this.blocked=new Set(t.blockList)}applyAttributeFilters(e,t){return this.filters.reduce((n,r)=>n!==null&&typeof r.attribute=="function"?r.attribute(e,n):n,t)}applyNodeFilters(e,t){return this.filters.reduce((n,r)=>n!==null&&typeof r.node=="function"?r.node(e,n):n,t)}applyMatchers(e,t){const n={},{props:r}=this;let o=e,i=0,l=null;return this.matchers.forEach(s=>{const a=s.asTag().toLowerCase(),c=this.getTagConfig(a);if(r[s.inverseName]||!this.isTagAllowed(a)||!this.canRenderChild(t,c))return;let u="";for(;o&&(l=s.match(o));){const{index:A,length:d,match:f,valid:p,void:v,...h}=l,w=s.propName+String(i);A>0&&(u+=o.slice(0,A)),p?(u+=v?`{{{${w}/}}}`:`{{{${w}}}}${f}{{{/${w}}}}`,this.keyIndex+=1,i+=1,n[w]={children:f,matcher:s,props:{...r,...h,key:this.keyIndex}}):u+=f,s.greedy?(o=u+o.slice(A+d),u=""):o=o.slice(A+(d||f.length))}s.greedy||(o=u+o)}),i===0?e:this.replaceTokens(o,n)}canRenderChild(e,t){return!(!e.tagName||!t.tagName||e.void)&&(e.children.length>0?e.children.includes(t.tagName):!(e.invalid.length>0&&e.invalid.includes(t.tagName))&&(t.parent.length>0?t.parent.includes(e.tagName):!(!e.self&&e.tagName===t.tagName)&&!!(e&&e.content&t.type)))}convertLineBreaks(e){const{noHtml:t,disableLineBreaks:n}=this.props;if(t||n||e.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return e;let r=e.replace(/\r\n/g,`
17
17
  `);return r=r.replace(/\n{3,}/g,`
18
18
 
19
19
 
20
- `),r=r.replace(/\n/g,"<br/>"),r}createContainer(e){var t;const n=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||nu)();if(!n)return;const r=(t=this.props.containerTagName)!==null&&t!==void 0?t:"body",o=r==="body"||r==="fragment"?n.body:n.createElement(r);if(e.match(Zc)){if(process.env.NODE_ENV!=="production")throw new Error("HTML documents as Interweave content are not supported.")}else o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?Kc(e):e);return o}extractAttributes(e){const{allowAttributes:t}=this.props,n={};let r=0;return e.nodeType===1&&e.attributes&&([...e.attributes].forEach(o=>{const{name:i,value:A}=o,s=i.toLowerCase(),a=$a[s]||$a[i];if(!this.isSafe(e)||!s.match(eu)&&(!t&&(!a||a===2)||s.startsWith("on")||A.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let l=s==="style"?this.extractStyleAttribute(e):A;a===4?l=!0:a===3?l=Number.parseFloat(String(l)):a!==5&&(l=String(l)),n[Yc[s]||s]=this.applyAttributeFilters(s,l),r+=1}),r!==0)?n:null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach(n=>{const r=e.style[n];(typeof r=="string"||typeof r=="number")&&(t[n.replace(/-([a-z])/g,(o,i)=>String(i).toUpperCase())]=r)}),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return mo[e]?{...t,...mo[e],tagName:e}:t}isSafe(e){if(typeof HTMLAnchorElement<"u"&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(t!=null&&t.startsWith("#"))return!0;const n=e.protocol.toLowerCase();return n===":"||n==="http:"||n==="https:"||n==="mailto:"||n==="tel:"}return!0}isTagAllowed(e){return!this.banned.has(e)&&!this.blocked.has(e)&&(this.props.allowElements||this.allowed.has(e))}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(e,t){const{noHtml:n,noHtmlExceptMatchers:r,allowElements:o,transform:i,transformOnlyAllowList:A}=this.props;let s=[],a="";return[...e.childNodes].forEach(l=>{if(l.nodeType===1){const u=l.nodeName.toLowerCase(),d=this.getTagConfig(u);a&&(s.push(a),a="");const f=this.applyNodeFilters(u,l);if(!f)return;let h;if(i&&(!A||this.isTagAllowed(u))){this.keyIndex+=1;const m=this.keyIndex;h=this.parseNode(f,d);const p=i(f,h,d);if(p===null)return;if(typeof p<"u")return void s.push(M.cloneElement(p,{key:m}));this.keyIndex=m-1}if(this.banned.has(u))return;if(n||r&&u!=="br"||!this.isTagAllowed(u)||!o&&!this.canRenderChild(t,d))s=[...s,...this.parseNode(f,d.tagName?d:t)];else{var c;this.keyIndex+=1;const m=this.extractAttributes(f),p={tagName:u};m&&(p.attributes=m),d.void&&(p.selfClose=d.void),s.push(M.createElement(Va,{...p,key:this.keyIndex},(c=h)!==null&&c!==void 0?c:this.parseNode(f,d)))}}else if(l.nodeType===3){const u=n&&!r?l.textContent:this.applyMatchers(l.textContent||"",t);Array.isArray(u)?s=[...s,...u]:a+=u}}),a&&s.push(a),s}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(tu);){const[i,A]=o,s=o.index,a=i.includes("/");if(process.env.NODE_ENV!=="production"&&!t[A])throw new Error(`Token "${A}" found but no matching element to replace with.`);s>0&&(n.push(r.slice(0,s)),r=r.slice(s));const{children:l,matcher:c,props:u}=t[A];let d;if(a)d=i.length,n.push(c.createElement(l,u));else{const f=r.match(new RegExp(`{{{/${A}}}}`));if(process.env.NODE_ENV!=="production"&&!f)throw new Error(`Closing token missing for interpolated element "${A}".`);d=f.index+f[0].length,n.push(c.createElement(this.replaceTokens(r.slice(i.length,f.index),t),u))}r=r.slice(d)}return r.length>0&&n.push(r),n.length===0?"":n.length===1&&typeof n[0]=="string"?n[0]:n}};function ru(e){var t;const{attributes:n,className:r,containerTagName:o,content:i,emptyContent:A,parsedContent:s,tagName:a,noWrap:l}=e,c=(t=o??a)!==null&&t!==void 0?t:"span",u=c==="fragment"||l;let d;if(s)d=s;else{const f=new Ja(i??"",e).parse();f.length>0&&(d=f)}return d||(d=A),u?M.createElement(M.Fragment,null,d):M.createElement(Va,{attributes:n,className:r,tagName:c},d)}function ou(e){const{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:A=null,filters:s=[],matchers:a=[],onAfterParse:l=null,onBeforeParse:c=null,tagName:u="span",noWrap:d=!1,...f}=e,h=i?[]:a,m=o?[]:s,p=c?[c]:[],v=l?[l]:[];h.forEach(P=>{P.onBeforeParse&&p.push(P.onBeforeParse.bind(P)),P.onAfterParse&&v.push(P.onAfterParse.bind(P))});const y=p.reduce((P,E)=>{const k=E(P,e);if(process.env.NODE_ENV!=="production"&&typeof k!="string")throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return k},r??""),g=new Ja(y,f,h,m),_=v.reduce((P,E)=>{const k=E(P,e);if(process.env.NODE_ENV!=="production"&&!Array.isArray(k))throw new TypeError("Interweave `onAfterParse` must return an array of strings and React elements.");return k},g.parse());return M.createElement(ru,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:A,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:u})}const iu=({children:e})=>C("div",{style:{whiteSpace:"normal"},children:C(ou,{content:typeof e=="string"?e:""})}),au={autoConfig:!0},Za=(e,t,n)=>{var r;if(!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&(((r=o.renderHtml)==null?void 0:r.map(i=>i.toUpperCase()).includes(n))??!1)},su=e=>{const t=[];let n="",r=!1;for(let o=0;o<e.length;o++){const i=e[o];i==="<"?r?(t.push(n),n=i):(r=!0,n=i):i===">"?(n+=i,t.push(n),n="",r=!1):r?n+=i:t.push(i)}return n!==""&&t.push(n),t},Au=e=>{const{getFlow:t}=dr(),{messages:n,replaceMessages:r}=Tn(),{settings:o}=Wa(),{hasChatHistoryLoaded:i}=Ya(),A={...e,...au},s=A.htmlComponent?A.htmlComponent:iu;X(()=>{var c,u;if(i){const d=[...n];for(let f=0;f<d.length&&f<(((c=o.chatHistory)==null?void 0:c.maxEntries)??30);f++){const h=d[f];(u=h.tags)!=null&&u.includes("rcb-html-renderer-plugin:parsed")&&(h.contentWrapper=s)}r(d)}},[i]);const a=async c=>{var u;const d=(u=c.data.message)==null?void 0:u.sender.toUpperCase();typeof c.data.message.content=="string"&&Za(c,t(),d)&&(c.type==="rcb-start-simulate-stream-message"&&(c.data.simulateStreamChunker=su),c.data.message.contentWrapper=s,c.data.message.tags||(c.data.message.tags=[]),c.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};ot(z.PRE_INJECT_MESSAGE,a),ot(z.CHUNK_STREAM_MESSAGE,a),ot(z.START_STREAM_MESSAGE,a),ot(z.START_SIMULATE_STREAM_MESSAGE,a),ot(z.START_SPEAK_AUDIO,async c=>{Za(c,t(),"BOT")&&(c.data.textToRead=(u=>typeof window.DOMParser<"u"?new DOMParser().parseFromString(u,"text/html").body.textContent||"":u.replace(/<\/?[^>]+(>|$)/g,""))(c.data.textToRead))});const l={name:"@rcb-plugins/html-renderer"};return A!=null&&A.autoConfig&&(l.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),l},lu=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cu=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uu={};function es(e,t){return(uu.jsx?cu:lu).test(e)}const du=/[ \t\n\f\r]/g;function ts(e){return e.replace(du,"")===""}class Qn{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}function ns(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Qn(n,r,t)}function yo(e){return e.toLowerCase()}Qn.prototype.property={},Qn.prototype.normal={},Qn.prototype.space=null;class it{constructor(t,n){this.property=t,this.attribute=n}}it.prototype.space=null,it.prototype.boolean=!1,it.prototype.booleanish=!1,it.prototype.overloadedBoolean=!1,it.prototype.number=!1,it.prototype.commaSeparated=!1,it.prototype.spaceSeparated=!1,it.prototype.commaOrSpaceSeparated=!1,it.prototype.mustUseProperty=!1,it.prototype.defined=!1;let fu=0;const ie=Yt(),Qe=Yt(),rs=Yt(),H=Yt(),_e=Yt(),an=Yt(),et=Yt();function Yt(){return 2**++fu}const vo=Object.freeze(Object.defineProperty({__proto__:null,boolean:ie,booleanish:Qe,commaOrSpaceSeparated:et,commaSeparated:an,number:H,overloadedBoolean:rs,spaceSeparated:_e},Symbol.toStringTag,{value:"Module"})),wo=Object.keys(vo);class bo extends it{constructor(t,n,r,o){let i=-1;if(super(t,n),os(this,"space",o),typeof r=="number")for(;++i<wo.length;){const A=wo[i];os(this,wo[i],(r&vo[A])===vo[A])}}}function os(e,t,n){n&&(e[t]=n)}bo.prototype.defined=!0;const pu={}.hasOwnProperty;function sn(e){const t={},n={};let r;for(r in e.properties)if(pu.call(e.properties,r)){const o=e.properties[r],i=new bo(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[yo(r)]=r,n[yo(i.attribute)]=r}return new Qn(t,n,e.space)}const is=sn({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),as=sn({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function ss(e,t){return t in e?e[t]:t}function As(e,t){return ss(e,t.toLowerCase())}const ls=sn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:As,properties:{xmlns:null,xmlnsXLink:null}}),cs=sn({transform:(e,t)=>t==="role"?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Qe,ariaAutoComplete:null,ariaBusy:Qe,ariaChecked:Qe,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:_e,ariaCurrent:null,ariaDescribedBy:_e,ariaDetails:null,ariaDisabled:Qe,ariaDropEffect:_e,ariaErrorMessage:null,ariaExpanded:Qe,ariaFlowTo:_e,ariaGrabbed:Qe,ariaHasPopup:null,ariaHidden:Qe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_e,ariaLevel:H,ariaLive:null,ariaModal:Qe,ariaMultiLine:Qe,ariaMultiSelectable:Qe,ariaOrientation:null,ariaOwns:_e,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Qe,ariaReadOnly:Qe,ariaRelevant:null,ariaRequired:Qe,ariaRoleDescription:_e,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Qe,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null}}),hu=sn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:As,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:an,acceptCharset:_e,accessKey:_e,action:null,allow:null,allowFullScreen:ie,allowPaymentRequest:ie,allowUserMedia:ie,alt:null,as:null,async:ie,autoCapitalize:null,autoComplete:_e,autoFocus:ie,autoPlay:ie,blocking:_e,capture:null,charSet:null,checked:ie,cite:null,className:_e,cols:H,colSpan:null,content:null,contentEditable:Qe,controls:ie,controlsList:_e,coords:H|an,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ie,defer:ie,dir:null,dirName:null,disabled:ie,download:rs,draggable:Qe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ie,formTarget:null,headers:_e,height:H,hidden:ie,high:H,href:null,hrefLang:null,htmlFor:_e,httpEquiv:_e,id:null,imageSizes:null,imageSrcSet:null,inert:ie,inputMode:null,integrity:null,is:null,isMap:ie,itemId:null,itemProp:_e,itemRef:_e,itemScope:ie,itemType:_e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ie,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:ie,muted:ie,name:null,nonce:null,noModule:ie,noValidate:ie,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ie,optimum:H,pattern:null,ping:_e,placeholder:null,playsInline:ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ie,referrerPolicy:null,rel:_e,required:ie,reversed:ie,rows:H,rowSpan:H,sandbox:_e,scope:null,scoped:ie,seamless:ie,selected:ie,shadowRootClonable:ie,shadowRootDelegatesFocus:ie,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Qe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:ie,useMap:null,value:Qe,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_e,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ie,declare:ie,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:ie,noHref:ie,noShade:ie,noWrap:ie,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Qe,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ie,disableRemotePlayback:ie,prefix:null,property:null,results:H,security:null,unselectable:null}}),gu=sn({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:ss,properties:{about:et,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:_e,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:an,g2:an,glyphName:an,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:et,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:H,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:et,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:et,rev:et,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:et,requiredFeatures:et,requiredFonts:et,requiredFormats:et,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:et,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:et,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:et,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),mu=/^data[-\w.:]+$/i,us=/-[a-z]/g,yu=/[A-Z]/g;function vu(e){return"-"+e.toLowerCase()}function wu(e){return e.charAt(1).toUpperCase()}const bu={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},_u=ns([as,is,ls,cs,hu],"html"),_o=ns([as,is,ls,cs,gu],"svg");function ds(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Eo,fs,ps,An={},Eu=function(){if(ps)return An;ps=1;var e=An&&An.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(An,"__esModule",{value:!0}),An.default=function(n,r){var o=null;if(!n||typeof n!="string")return o;var i=(0,t.default)(n),A=typeof r=="function";return i.forEach(function(s){if(s.type==="declaration"){var a=s.property,l=s.value;A?r(a,l,s):l&&((o=o||{})[a]=l)}}),o};var t=e(function(){if(fs)return Eo;fs=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,o=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,A=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(d){return d?d.replace(l,c):c}return Eo=function(d,f){if(typeof d!="string")throw new TypeError("First argument must be a string");if(!d)return[];f=f||{};var h=1,m=1;function p(T){var D=T.match(r);D&&(h+=D.length);var O=T.lastIndexOf(`
21
- `);m=~O?T.length-O:m+T.length}function v(){var T={line:h,column:m};return function(D){return D.position=new y(T),P(),D}}function y(T){this.start=T,this.end={line:h,column:m},this.source=f.source}function g(T){var D=new Error(f.source+":"+h+":"+m+": "+T);if(D.reason=T,D.filename=f.source,D.line=h,D.column=m,D.source=d,!f.silent)throw D}function _(T){var D=T.exec(d);if(D){var O=D[0];return p(O),d=d.slice(O.length),D}}function P(){_(o)}function E(T){var D;for(T=T||[];D=k();)D!==!1&&T.push(D);return T}function k(){var T=v();if(d.charAt(0)=="/"&&d.charAt(1)=="*"){for(var D=2;c!=d.charAt(D)&&(d.charAt(D)!="*"||d.charAt(D+1)!="/");)++D;if(D+=2,c===d.charAt(D-1))return g("End of comment missing");var O=d.slice(2,D-2);return m+=2,p(O),d=d.slice(D),m+=2,T({type:"comment",comment:O})}}function B(){var T=v(),D=_(i);if(D){if(k(),!_(A))return g("property missing ':'");var O=_(s),S=T({type:"declaration",property:u(D[0].replace(n,c)),value:O?u(O[0].replace(n,c)):c});return _(a),S}}return y.prototype.content=d,P(),function(){var T,D=[];for(E(D);T=B();)T!==!1&&(D.push(T),E(D));return D}()},Eo}());return An}();const hs=ds(Eu),Pu=hs.default||hs,gs=ms("end"),Po=ms("start");function ms(e){return function(t){const n=t&&t.position&&t.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Mn(e){return e&&typeof e=="object"?"position"in e||"type"in e?ys(e.position):"start"in e||"end"in e?ys(e):"line"in e||"column"in e?Co(e):"":""}function Co(e){return vs(e&&e.line)+":"+vs(e&&e.column)}function ys(e){return Co(e&&e.start)+"-"+Co(e&&e.end)}function vs(e){return e&&typeof e=="number"?e:1}class We extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},A=!1;if(n&&(i="line"in n&&"column"in n||"start"in n&&"end"in n?{place:n}:"type"in n?{ancestors:[n],place:n.position}:{...n}),typeof t=="string"?o=t:!i.cause&&t&&(A=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?i.ruleId=r:(i.source=r.slice(0,a),i.ruleId=r.slice(a+1))}if(!i.place&&i.ancestors&&i.ancestors){const a=i.ancestors[i.ancestors.length-1];a&&(i.place=a.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=Mn(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=A&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}We.prototype.file="",We.prototype.name="",We.prototype.reason="",We.prototype.message="",We.prototype.stack="",We.prototype.column=void 0,We.prototype.line=void 0,We.prototype.ancestors=void 0,We.prototype.cause=void 0,We.prototype.fatal=void 0,We.prototype.place=void 0,We.prototype.ruleId=void 0,We.prototype.source=void 0;const ko={}.hasOwnProperty,Cu=new Map,ku=/[A-Z]/g,Su=/-([a-z])/g,Du=new Set(["table","tbody","thead","tfoot","tr"]),Bu=new Set(["td","th"]),ws="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xu(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(A,s){return a;function a(l,c,u,d){const f=Array.isArray(u.children),h=Po(l);return s(c,u,d,f,{columnNumber:h?h.column-1:void 0,fileName:A,lineNumber:h?h.line:void 0},void 0)}}(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=function(A,s,a){return l;function l(c,u,d,f){const h=Array.isArray(d.children)?a:s;return f?h(u,d,f):h(u,d)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?_o:_u,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=bs(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function bs(e,t,n){return t.type==="element"?function(r,o,i){const A=r.schema;let s=A;o.tagName.toLowerCase()==="svg"&&A.space==="html"&&(s=_o,r.schema=s),r.ancestors.push(o);const a=Es(r,o.tagName,!1),l=function(u,d){const f={};let h,m;for(m in d.properties)if(m!=="children"&&ko.call(d.properties,m)){const p=Iu(u,m,d.properties[m]);if(p){const[v,y]=p;u.tableCellAlignToStyle&&v==="align"&&typeof y=="string"&&Bu.has(d.tagName)?h=y:f[v]=y}}return h&&((f.style||(f.style={}))[u.stylePropertyNameCase==="css"?"text-align":"textAlign"]=h),f}(r,o);let c=Do(r,o);return Du.has(o.tagName)&&(c=c.filter(function(u){return typeof u!="string"||!function(d){return typeof d=="object"?d.type==="text"&&ts(d.value):ts(d)}(u)})),_s(r,l,a,o),So(l,c),r.ancestors.pop(),r.schema=A,r.create(o,a,l,i)}(e,t,n):t.type==="mdxFlowExpression"||t.type==="mdxTextExpression"?function(r,o){if(o.data&&o.data.estree&&r.evaluater){const i=o.data.estree.body[0];return i.type,r.evaluater.evaluateExpression(i.expression)}On(r,o.position)}(e,t):t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement"?function(r,o,i){const A=r.schema;let s=A;o.name==="svg"&&A.space==="html"&&(s=_o,r.schema=s),r.ancestors.push(o);const a=o.name===null?r.Fragment:Es(r,o.name,!0),l=function(u,d){const f={};for(const h of d.attributes)if(h.type==="mdxJsxExpressionAttribute")if(h.data&&h.data.estree&&u.evaluater){const m=h.data.estree.body[0];m.type;const p=m.expression;p.type;const v=p.properties[0];v.type,Object.assign(f,u.evaluater.evaluateExpression(v.argument))}else On(u,d.position);else{const m=h.name;let p;if(h.value&&typeof h.value=="object")if(h.value.data&&h.value.data.estree&&u.evaluater){const v=h.value.data.estree.body[0];v.type,p=u.evaluater.evaluateExpression(v.expression)}else On(u,d.position);else p=h.value===null||h.value;f[m]=p}return f}(r,o),c=Do(r,o);return _s(r,l,a,o),So(l,c),r.ancestors.pop(),r.schema=A,r.create(o,a,l,i)}(e,t,n):t.type==="mdxjsEsm"?function(r,o){if(o.data&&o.data.estree&&r.evaluater)return r.evaluater.evaluateProgram(o.data.estree);On(r,o.position)}(e,t):t.type==="root"?function(r,o,i){const A={};return So(A,Do(r,o)),r.create(o,r.Fragment,A,i)}(e,t,n):t.type==="text"?function(r,o){return o.value}(0,t):void 0}function _s(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function So(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Do(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Cu;for(;++r<t.children.length;){const i=t.children[r];let A;if(e.passKeys){const a=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(a){const l=o.get(a)||0;A=a+"-"+l,o.set(a,l+1)}}const s=bs(e,i,A);s!==void 0&&n.push(s)}return n}function Iu(e,t,n){const r=function(o,i){const A=yo(i);let s=i,a=it;if(A in o.normal)return o.property[o.normal[A]];if(A.length>4&&A.slice(0,4)==="data"&&mu.test(i)){if(i.charAt(4)==="-"){const l=i.slice(5).replace(us,wu);s="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=i.slice(4);if(!us.test(l)){let c=l.replace(yu,vu);c.charAt(0)!=="-"&&(c="-"+c),i="data"+c}}a=bo}return new a(s,i)}(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(o){const i={};return(o[o.length-1]===""?[...o,""]:o).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}(n):function(o){return o.join(" ").trim()}(n)),r.property==="style"){let o=typeof n=="object"?n:function(i,A){const s={};try{Pu(A,a)}catch(l){if(!i.ignoreInvalidStyle){const c=l,u=new We("Cannot parse `style` attribute",{ancestors:i.ancestors,cause:c,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw u.file=i.filePath||void 0,u.url=ws+"#cannot-parse-style-attribute",u}}return s;function a(l,c){let u=l;u.slice(0,2)!=="--"&&(u.slice(0,4)==="-ms-"&&(u="ms-"+u.slice(4)),u=u.replace(Su,Qu)),s[u]=c}}(e,String(n));return e.stylePropertyNameCase==="css"&&(o=function(i){const A={};let s;for(s in i)ko.call(i,s)&&(A[Tu(s)]=i[s]);return A}(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?bu[r.property]||r.property:r.attribute,n]}}function Es(e,t,n){let r;if(n)if(t.includes(".")){const o=t.split(".");let i,A=-1;for(;++A<o.length;){const s=es(o[A])?{type:"Identifier",name:o[A]}:{type:"Literal",value:o[A]};i=i?{type:"MemberExpression",object:i,property:s,computed:!(!A||s.type!=="Literal"),optional:!1}:s}r=i}else r=es(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return ko.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);On(e)}function On(e,t){const n=new We("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ws+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Tu(e){let t=e.replace(ku,Mu);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Qu(e,t){return t.toUpperCase()}function Mu(e){return"-"+e.toLowerCase()}const Bo={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},pr={};function Ps(e,t,n){if(function(r){return!(!r||typeof r!="object")}(e)){if("value"in e)return e.type!=="html"||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cs(e.children,t,n)}return Array.isArray(e)?Cs(e,t,n):""}function Cs(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Ps(e[o],t,n);return r.join("")}const ks=document.createElement("i");function xo(e){const t="&"+e+";";ks.innerHTML=t;const n=ks.textContent;return(n.charCodeAt(n.length-1)!==59||e==="semi")&&n!==t&&n}function mt(e,t,n,r){const o=e.length;let i,A=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);A<r.length;)i=r.slice(A,A+1e4),i.unshift(t,0),e.splice(...i),A+=1e4,t+=1e4}function at(e,t){return e.length>0?(mt(e,e.length,0,t),e):t}const Ss={}.hasOwnProperty;function Ou(e){const t={};let n=-1;for(;++n<e.length;)Nu(t,e[n]);return t}function Nu(e,t){let n;for(n in t){const r=(Ss.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Ss.call(r,i)||(r[i]=[]);const A=o[i];Lu(r[i],Array.isArray(A)?A:A?[A]:[])}}}function Lu(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);mt(e,0,0,r)}function Ds(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||(65535&n)==65534||n>1114111?"๏ฟฝ":String.fromCodePoint(n)}function ln(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yt=Nt(/[A-Za-z]/),tt=Nt(/[\dA-Za-z]/),Ru=Nt(/[#-'*+\--9=?A-Z^-~]/);function Io(e){return e!==null&&(e<32||e===127)}const To=Nt(/\d/),Hu=Nt(/[\dA-Fa-f]/),Uu=Nt(/[!-/:-@[-`{-~]/);function re(e){return e!==null&&e<-2}function Ke(e){return e!==null&&(e<0||e===32)}function pe(e){return e===-2||e===-1||e===32}const Fu=Nt(new RegExp("\\p{P}|\\p{S}","u")),zu=Nt(/\s/);function Nt(e){return function(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function cn(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let A="";if(i===37&&tt(e.charCodeAt(n+1))&&tt(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(A=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(A=String.fromCharCode(i,s),o=1):A="๏ฟฝ"}else A=String.fromCharCode(i);A&&(t.push(e.slice(r,n),encodeURIComponent(A)),r=n+o+1,A=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ee(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(s){return pe(s)?(e.enter(n),A(s)):t(s)};function A(s){return pe(s)&&i++<o?(e.consume(s),A):(e.exit(n),t(s))}}const ju={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(i){return i===null?void e.consume(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ee(e,t,"linePrefix"))},function(i){return e.enter("paragraph"),r(i)});let n;return t;function r(i){const A=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=A),n=A,o(i)}function o(i){return i===null?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(i)):re(i)?(e.consume(i),e.exit("chunkText"),r):(e.consume(i),o)}}},qu={tokenize:function(e){const t=this,n=[];let r,o,i,A=0;return s;function s(g){if(A<n.length){const _=n[A];return t.containerState=_[1],e.attempt(_[0].continuation,a,l)(g)}return l(g)}function a(g){if(A++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&y();const _=t.events.length;let P,E=_;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){P=t.events[E][1].end;break}v(A);let k=_;for(;k<t.events.length;)t.events[k][1].end={...P},k++;return mt(t.events,E+1,0,t.events.slice(_)),t.events.length=k,l(g)}return s(g)}function l(g){if(A===n.length){if(!r)return d(g);if(r.currentConstruct&&r.currentConstruct.concrete)return h(g);t.interrupt=!(!r.currentConstruct||r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Bs,c,u)(g)}function c(g){return r&&y(),v(A),d(g)}function u(g){return t.parser.lazy[t.now().line]=A!==n.length,i=t.now().offset,h(g)}function d(g){return t.containerState={},e.attempt(Bs,f,h)(g)}function f(g){return A++,n.push([t.currentConstruct,t.containerState]),d(g)}function h(g){return g===null?(r&&y(),v(0),void e.consume(g)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(g))}function m(g){return g===null?(p(e.exit("chunkFlow"),!0),v(0),void e.consume(g)):re(g)?(e.consume(g),p(e.exit("chunkFlow")),A=0,t.interrupt=void 0,s):(e.consume(g),m)}function p(g,_){const P=t.sliceStream(g);if(_&&P.push(null),g.previous=o,o&&(o.next=g),o=g,r.defineSkip(g.start),r.write(P),t.parser.lazy[g.start.line]){let E=r.events.length;for(;E--;)if(r.events[E][1].start.offset<i&&(!r.events[E][1].end||r.events[E][1].end.offset>i))return;const k=t.events.length;let B,T,D=k;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(B){T=t.events[D][1].end;break}B=!0}for(v(A),E=k;E<t.events.length;)t.events[E][1].end={...T},E++;mt(t.events,D+1,0,t.events.slice(k)),t.events.length=E}}function v(g){let _=n.length;for(;_-- >g;){const P=n[_];t.containerState=P[1],P[0].exit.call(t,e)}n.length=g}function y(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Bs={tokenize:function(e,t,n){return Ee(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function xs(e){return e===null||Ke(e)||zu(e)?1:Fu(e)?2:void 0}function Qo(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Mo={name:"attention",resolveAll:function(e,t){let n,r,o,i,A,s,a,l,c=-1;for(;++c<e.length;)if(e[c][0]==="enter"&&e[c][1].type==="attentionSequence"&&e[c][1]._close){for(n=c;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const u={...e[n][1].end},d={...e[c][1].start};Is(u,-s),Is(d,s),i={type:s>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},A={type:s>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...A.end}},e[n][1].end={...i.start},e[c][1].start={...A.end},a=[],e[n][1].end.offset-e[n][1].start.offset&&(a=at(a,[["enter",e[n][1],t],["exit",e[n][1],t]])),a=at(a,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),a=at(a,Qo(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),a=at(a,[["exit",o,t],["enter",A,t],["exit",A,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(l=2,a=at(a,[["enter",e[c][1],t],["exit",e[c][1],t]])):l=0,mt(e,n-1,c-n+3,a),c=n+a.length-l-2;break}}for(c=-1;++c<e.length;)e[c][1].type==="attentionSequence"&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=xs(r);let i;return function(s){return i=s,e.enter("attentionSequence"),A(s)};function A(s){if(s===i)return e.consume(s),A;const a=e.exit("attentionSequence"),l=xs(s),c=!l||l===2&&o||n.includes(s),u=!o||o===2&&l||n.includes(r);return a._open=!!(i===42?c:c&&(o||!u)),a._close=!!(i===42?u:u&&(l||!c)),t(s)}}};function Is(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Wu={name:"autolink",tokenize:function(e,t,n){let r=0;return function(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(d){return yt(d)?(e.consume(d),i):d===64?n(d):a(d)}function i(d){return d===43||d===45||d===46||tt(d)?(r=1,A(d)):a(d)}function A(d){return d===58?(e.consume(d),r=0,s):(d===43||d===45||d===46||tt(d))&&r++<32?(e.consume(d),A):(r=0,a(d))}function s(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Io(d)?n(d):(e.consume(d),s)}function a(d){return d===64?(e.consume(d),l):Ru(d)?(e.consume(d),a):n(d)}function l(d){return tt(d)?c(d):n(d)}function c(d){return d===46?(e.consume(d),r=0,l):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):u(d)}function u(d){if((d===45||tt(d))&&r++<63){const f=d===45?u:c;return e.consume(d),f}return n(d)}}},hr={partial:!0,tokenize:function(e,t,n){return function(o){return pe(o)?Ee(e,r,"linePrefix")(o):r(o)};function r(o){return o===null||re(o)?t(o):n(o)}}},Ts={continuation:{tokenize:function(e,t,n){const r=this;return function(i){return pe(i)?Ee(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):o(i)};function o(i){return e.attempt(Ts,t,n)(i)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(i){if(i===62){const A=r.containerState;return A.open||(e.enter("blockQuote",{_container:!0}),A.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),o}return n(i)};function o(i){return pe(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}},Qs={name:"characterEscape",tokenize:function(e,t,n){return function(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),r};function r(o){return Uu(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}},Ms={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,A=0;return function(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s};function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),o=31,i=tt,l(c))}function a(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=Hu,l):(e.enter("characterReferenceValue"),o=7,i=To,l(c))}function l(c){if(c===59&&A){const u=e.exit("characterReferenceValue");return i!==tt||xo(r.sliceSerialize(u))?(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(c)}return i(c)&&A++<o?(e.consume(c),l):n(c)}}},Os={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o)};function o(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}},Ns={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(g,_,P){let E=0;return k;function k(S){return g.enter("lineEnding"),g.consume(S),g.exit("lineEnding"),B}function B(S){return g.enter("codeFencedFence"),pe(S)?Ee(g,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):T(S)}function T(S){return S===i?(g.enter("codeFencedFenceSequence"),D(S)):P(S)}function D(S){return S===i?(E++,g.consume(S),D):E>=s?(g.exit("codeFencedFenceSequence"),pe(S)?Ee(g,O,"whitespace")(S):O(S)):P(S)}function O(S){return S===null||re(S)?(g.exit("codeFencedFence"),_(S)):P(S)}}};let i,A=0,s=0;return function(g){return function(_){const P=r.events[r.events.length-1];return A=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,i=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),a(_)}(g)};function a(g){return g===i?(s++,e.consume(g),a):s<3?n(g):(e.exit("codeFencedFenceSequence"),pe(g)?Ee(e,l,"whitespace")(g):l(g))}function l(g){return g===null||re(g)?(e.exit("codeFencedFence"),r.interrupt?t(g):e.check(Os,f,y)(g)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(g))}function c(g){return g===null||re(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(g)):pe(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ee(e,u,"whitespace")(g)):g===96&&g===i?n(g):(e.consume(g),c)}function u(g){return g===null||re(g)?l(g):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===null||re(g)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(g)):g===96&&g===i?n(g):(e.consume(g),d)}function f(g){return e.attempt(o,y,h)(g)}function h(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),m}function m(g){return A>0&&pe(g)?Ee(e,p,"linePrefix",A+1)(g):p(g)}function p(g){return g===null||re(g)?e.check(Os,f,y)(g):(e.enter("codeFlowValue"),v(g))}function v(g){return g===null||re(g)?(e.exit("codeFlowValue"),p(g)):(e.consume(g),v)}function y(g){return e.exit("codeFenced"),t(g)}}},Oo={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(a){return e.enter("codeIndented"),Ee(e,o,"linePrefix",5)(a)};function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?i(a):n(a)}function i(a){return a===null?s(a):re(a)?e.attempt(Gu,i,s)(a):(e.enter("codeFlowValue"),A(a))}function A(a){return a===null||re(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),A)}function s(a){return e.exit("codeIndented"),t(a)}}},Gu={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(A){return r.parser.lazy[r.now().line]?n(A):re(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),o):Ee(e,i,"linePrefix",5)(A)}function i(A){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(A):re(A)?o(A):n(A)}}},Yu={name:"codeText",previous:function(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"},resolve:function(e){let t,n,r=e.length-4,o=3;if(!(e[o][1].type!=="lineEnding"&&e[o][1].type!=="space"||e[r][1].type!=="lineEnding"&&e[r][1].type!=="space")){for(t=o;++t<r;)if(e[t][1].type==="codeTextData"){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}}for(t=o-1,r++;++t<=r;)n===void 0?t!==r&&e[t][1].type!=="lineEnding"&&(n=t):(t===r||e[t][1].type==="lineEnding")&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(c){return e.enter("codeText"),e.enter("codeTextSequence"),A(c)};function A(c){return c===96?(e.consume(c),i++,A):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),r=0,l(c)):re(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),a(c))}function a(c){return c===null||c===32||c===96||re(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),a)}function l(c){return c===96?(e.consume(c),r++,l):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",a(c))}}};class $u{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Nn(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Nn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Nn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Nn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Nn(this.left,n.reverse())}}}function Nn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ls(e){const t={};let n,r,o,i,A,s,a,l=-1;const c=new $u(e);for(;++l<c.length;){for(;l in t;)l=t[l];if(n=c.get(l),l&&n[1].type==="chunkFlow"&&c.get(l-1)[1].type==="listItemPrefix"&&(s=n[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,Vu(c,l)),l=t[l],a=!0);else if(n[1]._container){for(o=l,r=void 0;o--;)if(i=c.get(o),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(r&&(c.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if(i[1].type!=="linePrefix")break;r&&(n[1].end={...c.get(r)[1].start},A=c.slice(r,l),A.unshift(n),c.splice(r,l-r+1,A))}}return mt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!a}function Vu(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],A=n._tokenizer||r.parser[n.contentType](n.start),s=A.events,a=[],l={};let c,u,d=-1,f=n,h=0,m=0;const p=[m];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),u&&A.defineSkip(f.start),f._isInFirstContentOfListItem&&(A._gfmTasklistFirstContentOfListItem=!0),A.write(c),f._isInFirstContentOfListItem&&(A._gfmTasklistFirstContentOfListItem=void 0)),u=f,f=f.next}for(f=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(m=d+1,p.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(A.events=[],f?(f._tokenizer=void 0,f.previous=void 0):p.pop(),d=p.length;d--;){const v=s.slice(p[d],p[d+1]),y=i.pop();a.push([y,y+v.length-1]),e.splice(y,2,v)}for(a.reverse(),d=-1;++d<a.length;)l[h+a[d][0]]=h+a[d][1],h+=a[d][1]-a[d][0]-1;return l}const Ku={resolve:function(e){return Ls(e),e},tokenize:function(e,t){let n;return function(A){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(A)};function r(A){return A===null?o(A):re(A)?e.check(Xu,i,o)(A):(e.consume(A),r)}function o(A){return e.exit("chunkContent"),e.exit("content"),t(A)}function i(A){return e.consume(A),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Xu={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ee(e,o,"linePrefix")};function o(i){if(i===null||re(i))return n(i);const A=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&A&&A[1].type==="linePrefix"&&A[2].sliceSerialize(A[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};function Rs(e,t,n,r,o,i,A,s,a){const l=a||Number.POSITIVE_INFINITY;let c=0;return function(p){return p===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(p),e.exit(i),u):p===null||p===32||p===41||Io(p)?n(p):(e.enter(r),e.enter(A),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(p))};function u(p){return p===62?(e.enter(i),e.consume(p),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===62?(e.exit("chunkString"),e.exit(s),u(p)):p===null||p===60||re(p)?n(p):(e.consume(p),p===92?f:d)}function f(p){return p===60||p===62||p===92?(e.consume(p),d):d(p)}function h(p){return c||p!==null&&p!==41&&!Ke(p)?c<l&&p===40?(e.consume(p),c++,h):p===41?(e.consume(p),c--,h):p===null||p===32||p===40||Io(p)?n(p):(e.consume(p),p===92?m:h):(e.exit("chunkString"),e.exit(s),e.exit(A),e.exit(r),t(p))}function m(p){return p===40||p===41||p===92?(e.consume(p),h):h(p)}}function Hs(e,t,n,r,o,i){const A=this;let s,a=0;return function(d){return e.enter(r),e.enter(o),e.consume(d),e.exit(o),e.enter(i),l};function l(d){return a>999||d===null||d===91||d===93&&!s||d===94&&!a&&"_hiddenFootnoteSupport"in A.parser.constructs?n(d):d===93?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):re(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===null||d===91||d===93||re(d)||a++>999?(e.exit("chunkString"),l(d)):(e.consume(d),s||(s=!pe(d)),d===92?u:c)}function u(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function Us(e,t,n,r,o,i){let A;return function(u){return u===34||u===39||u===40?(e.enter(r),e.enter(o),e.consume(u),e.exit(o),A=u===40?41:u,s):n(u)};function s(u){return u===A?(e.enter(o),e.consume(u),e.exit(o),e.exit(r),t):(e.enter(i),a(u))}function a(u){return u===A?(e.exit(i),s(A)):u===null?n(u):re(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ee(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(u))}function l(u){return u===A||u===null||re(u)?(e.exit("chunkString"),a(u)):(e.consume(u),u===92?c:l)}function c(u){return u===A||u===92?(e.consume(u),l):l(u)}}function Ln(e,t){let n;return function r(o){return re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):pe(o)?Ee(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Ju={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(u){return e.enter("definition"),function(d){return Hs.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}(u)};function i(u){return o=ln(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),u===58?(e.enter("definitionMarker"),e.consume(u),e.exit("definitionMarker"),A):n(u)}function A(u){return Ke(u)?Ln(e,s)(u):s(u)}function s(u){return Rs(e,a,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(u)}function a(u){return e.attempt(Zu,l,l)(u)}function l(u){return pe(u)?Ee(e,c,"whitespace")(u):c(u)}function c(u){return u===null||re(u)?(e.exit("definition"),r.parser.defined.push(o),t(u)):n(u)}}},Zu={partial:!0,tokenize:function(e,t,n){return function(A){return Ke(A)?Ln(e,r)(A):n(A)};function r(A){return Us(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(A)}function o(A){return pe(A)?Ee(e,i,"whitespace")(A):i(A)}function i(A){return A===null||re(A)?t(A):n(A)}}},ed={name:"hardBreakEscape",tokenize:function(e,t,n){return function(o){return e.enter("hardBreakEscape"),e.consume(o),r};function r(o){return re(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}},td={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;return e[i][1].type==="whitespace"&&(i+=2),o-2>i&&e[o][1].type==="whitespace"&&(o-=2),e[o][1].type==="atxHeadingSequence"&&(i===o-1||o-4>i&&e[o-2][1].type==="whitespace")&&(o-=i+1===o?2:4),o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},mt(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(a){return e.enter("atxHeading"),function(l){return e.enter("atxHeadingSequence"),o(l)}(a)};function o(a){return a===35&&r++<6?(e.consume(a),o):a===null||Ke(a)?(e.exit("atxHeadingSequence"),i(a)):n(a)}function i(a){return a===35?(e.enter("atxHeadingSequence"),A(a)):a===null||re(a)?(e.exit("atxHeading"),t(a)):pe(a)?Ee(e,i,"whitespace")(a):(e.enter("atxHeadingText"),s(a))}function A(a){return a===35?(e.consume(a),A):(e.exit("atxHeadingSequence"),i(a))}function s(a){return a===null||a===35||Ke(a)?(e.exit("atxHeadingText"),i(a)):(e.consume(a),s)}}},nd=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Fs=["pre","script","style","textarea"],rd={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&(e[t][0]!=="enter"||e[t][1].type!=="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){const r=this;let o,i,A,s,a;return function(b){return function(F){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(F),l}(b)};function l(b){return b===33?(e.consume(b),c):b===47?(e.consume(b),i=!0,f):b===63?(e.consume(b),o=3,r.interrupt?t:Q):yt(b)?(e.consume(b),A=String.fromCharCode(b),h):n(b)}function c(b){return b===45?(e.consume(b),o=2,u):b===91?(e.consume(b),o=5,s=0,d):yt(b)?(e.consume(b),o=4,r.interrupt?t:Q):n(b)}function u(b){return b===45?(e.consume(b),r.interrupt?t:Q):n(b)}function d(b){return b==="CDATA[".charCodeAt(s++)?(e.consume(b),s===6?r.interrupt?t:D:d):n(b)}function f(b){return yt(b)?(e.consume(b),A=String.fromCharCode(b),h):n(b)}function h(b){if(b===null||b===47||b===62||Ke(b)){const F=b===47,J=A.toLowerCase();return F||i||!Fs.includes(J)?nd.includes(A.toLowerCase())?(o=6,F?(e.consume(b),m):r.interrupt?t(b):D(b)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(b):i?p(b):v(b)):(o=1,r.interrupt?t(b):D(b))}return b===45||tt(b)?(e.consume(b),A+=String.fromCharCode(b),h):n(b)}function m(b){return b===62?(e.consume(b),r.interrupt?t:D):n(b)}function p(b){return pe(b)?(e.consume(b),p):B(b)}function v(b){return b===47?(e.consume(b),B):b===58||b===95||yt(b)?(e.consume(b),y):pe(b)?(e.consume(b),v):B(b)}function y(b){return b===45||b===46||b===58||b===95||tt(b)?(e.consume(b),y):g(b)}function g(b){return b===61?(e.consume(b),_):pe(b)?(e.consume(b),g):v(b)}function _(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),a=b,P):pe(b)?(e.consume(b),_):E(b)}function P(b){return b===a?(e.consume(b),a=null,k):b===null||re(b)?n(b):(e.consume(b),P)}function E(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||Ke(b)?g(b):(e.consume(b),E)}function k(b){return b===47||b===62||pe(b)?v(b):n(b)}function B(b){return b===62?(e.consume(b),T):n(b)}function T(b){return b===null||re(b)?D(b):pe(b)?(e.consume(b),T):n(b)}function D(b){return b===45&&o===2?(e.consume(b),R):b===60&&o===1?(e.consume(b),L):b===62&&o===4?(e.consume(b),w):b===63&&o===3?(e.consume(b),Q):b===93&&o===5?(e.consume(b),x):!re(b)||o!==6&&o!==7?b===null||re(b)?(e.exit("htmlFlowData"),O(b)):(e.consume(b),D):(e.exit("htmlFlowData"),e.check(od,V,O)(b))}function O(b){return e.check(id,S,V)(b)}function S(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),N}function N(b){return b===null||re(b)?O(b):(e.enter("htmlFlowData"),D(b))}function R(b){return b===45?(e.consume(b),Q):D(b)}function L(b){return b===47?(e.consume(b),A="",U):D(b)}function U(b){if(b===62){const F=A.toLowerCase();return Fs.includes(F)?(e.consume(b),w):D(b)}return yt(b)&&A.length<8?(e.consume(b),A+=String.fromCharCode(b),U):D(b)}function x(b){return b===93?(e.consume(b),Q):D(b)}function Q(b){return b===62?(e.consume(b),w):b===45&&o===2?(e.consume(b),Q):D(b)}function w(b){return b===null||re(b)?(e.exit("htmlFlowData"),V(b)):(e.consume(b),w)}function V(b){return e.exit("htmlFlow"),t(b)}}},od={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(hr,t,n)}}},id={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o):n(i)};function o(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}},ad={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,A;return function(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),s};function s(w){return w===33?(e.consume(w),a):w===47?(e.consume(w),_):w===63?(e.consume(w),y):yt(w)?(e.consume(w),k):n(w)}function a(w){return w===45?(e.consume(w),l):w===91?(e.consume(w),i=0,f):yt(w)?(e.consume(w),v):n(w)}function l(w){return w===45?(e.consume(w),d):n(w)}function c(w){return w===null?n(w):w===45?(e.consume(w),u):re(w)?(A=c,U(w)):(e.consume(w),c)}function u(w){return w===45?(e.consume(w),d):c(w)}function d(w){return w===62?L(w):w===45?u(w):c(w)}function f(w){return w==="CDATA[".charCodeAt(i++)?(e.consume(w),i===6?h:f):n(w)}function h(w){return w===null?n(w):w===93?(e.consume(w),m):re(w)?(A=h,U(w)):(e.consume(w),h)}function m(w){return w===93?(e.consume(w),p):h(w)}function p(w){return w===62?L(w):w===93?(e.consume(w),p):h(w)}function v(w){return w===null||w===62?L(w):re(w)?(A=v,U(w)):(e.consume(w),v)}function y(w){return w===null?n(w):w===63?(e.consume(w),g):re(w)?(A=y,U(w)):(e.consume(w),y)}function g(w){return w===62?L(w):y(w)}function _(w){return yt(w)?(e.consume(w),P):n(w)}function P(w){return w===45||tt(w)?(e.consume(w),P):E(w)}function E(w){return re(w)?(A=E,U(w)):pe(w)?(e.consume(w),E):L(w)}function k(w){return w===45||tt(w)?(e.consume(w),k):w===47||w===62||Ke(w)?B(w):n(w)}function B(w){return w===47?(e.consume(w),L):w===58||w===95||yt(w)?(e.consume(w),T):re(w)?(A=B,U(w)):pe(w)?(e.consume(w),B):L(w)}function T(w){return w===45||w===46||w===58||w===95||tt(w)?(e.consume(w),T):D(w)}function D(w){return w===61?(e.consume(w),O):re(w)?(A=D,U(w)):pe(w)?(e.consume(w),D):B(w)}function O(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,S):re(w)?(A=O,U(w)):pe(w)?(e.consume(w),O):(e.consume(w),N)}function S(w){return w===o?(e.consume(w),o=void 0,R):w===null?n(w):re(w)?(A=S,U(w)):(e.consume(w),S)}function N(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||Ke(w)?B(w):(e.consume(w),N)}function R(w){return w===47||w===62||Ke(w)?B(w):n(w)}function L(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function U(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),x}function x(w){return pe(w)?Ee(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):Q(w)}function Q(w){return e.enter("htmlTextData"),A(w)}}},No={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&mt(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,i,A=e.length,s=0;for(;A--;)if(n=e[A][1],r){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[A][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(o){if(e[A][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(r=A,n.type!=="labelLink")){s=2;break}}else n.type==="labelEnd"&&(o=A);const a={type:e[r][1].type==="labelLink"?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",a,t],["enter",l,t]],i=at(i,e.slice(r+1,r+s+3)),i=at(i,[["enter",c,t]]),i=at(i,Qo(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=at(i,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),i=at(i,e.slice(o+1)),i=at(i,[["exit",a,t]]),mt(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,A=r.events.length;for(;A--;)if((r.events[A][1].type==="labelImage"||r.events[A][1].type==="labelLink")&&!r.events[A][1]._balanced){o=r.events[A][1];break}return function(u){return o?o._inactive?c(u):(i=r.parser.defined.includes(ln(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelEnd"),s):n(u)};function s(u){return u===40?e.attempt(sd,l,i?l:c)(u):u===91?e.attempt(Ad,l,i?a:c)(u):i?l(u):c(u)}function a(u){return e.attempt(ld,l,c)(u)}function l(u){return t(u)}function c(u){return o._balanced=!0,n(u)}}},sd={tokenize:function(e,t,n){return function(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),r};function r(c){return Ke(c)?Ln(e,o)(c):o(c)}function o(c){return c===41?l(c):Rs(e,i,A,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function i(c){return Ke(c)?Ln(e,s)(c):l(c)}function A(c){return n(c)}function s(c){return c===34||c===39||c===40?Us(e,a,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):l(c)}function a(c){return Ke(c)?Ln(e,l)(c):l(c)}function l(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}},Ad={tokenize:function(e,t,n){const r=this;return function(A){return Hs.call(r,e,o,i,"reference","referenceMarker","referenceString")(A)};function o(A){return r.parser.defined.includes(ln(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(A):n(A)}function i(A){return n(A)}}},ld={tokenize:function(e,t,n){return function(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),r};function r(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}},cd={name:"labelStartImage",resolveAll:No.resolveAll,tokenize:function(e,t,n){const r=this;return function(A){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(A),e.exit("labelImageMarker"),o};function o(A){return A===91?(e.enter("labelMarker"),e.consume(A),e.exit("labelMarker"),e.exit("labelImage"),i):n(A)}function i(A){return A===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(A):t(A)}}},ud={name:"labelStartLink",resolveAll:No.resolveAll,tokenize:function(e,t,n){const r=this;return function(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),o};function o(i){return i===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(i):t(i)}}},Lo={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ee(e,t,"linePrefix")}}},gr={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(s){return e.enter("thematicBreak"),function(a){return r=a,i(a)}(s)};function i(s){return s===r?(e.enter("thematicBreakSequence"),A(s)):o>=3&&(s===null||re(s))?(e.exit("thematicBreak"),t(s)):n(s)}function A(s){return s===r?(e.consume(s),o++,A):(e.exit("thematicBreakSequence"),pe(s)?Ee(e,i,"whitespace")(s):i(s))}}},Xe={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(hr,function(i){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ee(e,t,"listItemIndent",r.containerState.size+1)(i)},function(i){return r.containerState.furtherBlankLines||!pe(i)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(i)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(fd,t,o)(i))});function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ee(e,e.attempt(Xe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,A=0;return function(d){const f=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(f==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:To(d)){if(r.containerState.type||(r.containerState.type=f,e.enter(f,{_container:!0})),f==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(gr,n,a)(d):a(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(d)}return n(d)};function s(d){return To(d)&&++A<10?(e.consume(d),s):(!r.interrupt||A<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),a(d)):n(d)}function a(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(hr,r.interrupt?n:l,e.attempt(dd,u,c))}function l(d){return r.containerState.initialBlankLine=!0,i++,u(d)}function c(d){return pe(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),u):n(d)}function u(d){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}},dd={partial:!0,tokenize:function(e,t,n){const r=this;return Ee(e,function(o){const i=r.events[r.events.length-1];return!pe(o)&&i&&i[1].type==="listItemPrefixWhitespace"?t(o):n(o)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},fd={partial:!0,tokenize:function(e,t,n){const r=this;return Ee(e,function(o){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(o):n(o)},"listItemIndent",r.containerState.size+1)}},zs={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){n=i;break}e[i][1].type==="paragraph"&&(r=i)}else e[i][1].type==="content"&&e.splice(i,1),!o&&e[i][1].type==="definition"&&(o=i);const A={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",A,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=A,e.push(["exit",A,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(s){let a,l=r.events.length;for(;l--;)if(r.events[l][1].type!=="lineEnding"&&r.events[l][1].type!=="linePrefix"&&r.events[l][1].type!=="content"){a=r.events[l][1].type==="paragraph";break}return r.parser.lazy[r.now().line]||!r.interrupt&&!a?n(s):(e.enter("setextHeadingLine"),o=s,function(c){return e.enter("setextHeadingLineSequence"),i(c)}(s))};function i(s){return s===o?(e.consume(s),i):(e.exit("setextHeadingLineSequence"),pe(s)?Ee(e,A,"lineSuffix")(s):A(s))}function A(s){return s===null||re(s)?(e.exit("setextHeadingLine"),t(s)):n(s)}}},pd={tokenize:function(e){const t=this,n=e.attempt(hr,function(o){return o===null?void e.consume(o):(e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,Ee(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Ku,r)),"linePrefix")));return n;function r(o){if(o!==null)return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(o)}}},hd={resolveAll:qs()},gd=js("string"),md=js("text");function js(e){return{resolveAll:qs(e==="text"?yd:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,A);return i;function i(l){return a(l)?o(l):A(l)}function A(l){if(l!==null)return t.enter("data"),t.consume(l),s;t.consume(l)}function s(l){return a(l)?(t.exit("data"),o(l)):(t.consume(l),s)}function a(l){if(l===null)return!0;const c=r[l];let u=-1;if(c)for(;++u<c.length;){const d=c[u];if(!d.previous||d.previous.call(n,n.previous))return!0}return!1}}}}function qs(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)r===void 0?t[o]&&t[o][1].type==="data"&&(r=o,o++):(!t[o]||t[o][1].type!=="data")&&(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function yd(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i,A=o.length,s=-1,a=0;for(;A--;){const l=o[A];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(l===-2)i=!0,a++;else if(l!==-1){A++;break}}if(a){const l={type:n===e.length||i||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:A?s:r.start._bufferIndex+s,_index:r.start._index+A,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const vd={42:Xe,43:Xe,45:Xe,48:Xe,49:Xe,50:Xe,51:Xe,52:Xe,53:Xe,54:Xe,55:Xe,56:Xe,57:Xe,62:Ts},wd={91:Ju},bd={[-2]:Oo,[-1]:Oo,32:Oo},_d={35:td,42:gr,45:[zs,gr],60:rd,61:zs,95:gr,96:Ns,126:Ns},Ed={38:Ms,92:Qs},Pd={[-5]:Lo,[-4]:Lo,[-3]:Lo,33:cd,38:Ms,42:Mo,60:[Wu,ad],91:ud,92:[ed,Qs],93:No,95:Mo,96:Yu},Cd={null:[Mo,hd]},kd=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:wd,disable:{null:[]},document:vd,flow:_d,flowInitial:bd,insideSpan:Cd,string:Ed,text:Pd},Symbol.toStringTag,{value:"Module"}));function Sd(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let A=[],s=[];const a={attempt:m(function(y,g){p(y,g.from)}),check:m(h),consume:function(y){re(y)?(r.line++,r.column=1,r.offset+=y===-3?2:1,v()):y!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===A[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=y},enter:function(y,g){const _=g||{};return _.type=y,_.start=d(),l.events.push(["enter",_,l]),s.push(_),_},exit:function(y){const g=s.pop();return g.end=d(),l.events.push(["exit",g,l]),g},interrupt:m(h,{interrupt:!0})},l={code:null,containerState:{},defineSkip:function(y){o[y.line]=y.column,v()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(y,g){return function(_,P){let E=-1;const k=[];let B;for(;++E<_.length;){const T=_[E];let D;if(typeof T=="string")D=T;else switch(T){case-5:D="\r";break;case-4:D=`
20
+ `),r=r.replace(/\n/g,"<br/>"),r}createContainer(e){var t;const n=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||qp)();if(!n)return;const r=(t=this.props.containerTagName)!==null&&t!==void 0?t:"body",o=r==="body"||r==="fragment"?n.body:n.createElement(r);if(e.match(Up)){if(process.env.NODE_ENV!=="production")throw new Error("HTML documents as Interweave content are not supported.")}else o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?Rp(e):e);return o}extractAttributes(e){const{allowAttributes:t}=this.props,n={};let r=0;return e.nodeType===1&&e.attributes&&([...e.attributes].forEach(o=>{const{name:i,value:l}=o,s=i.toLowerCase(),a=Ra[s]||Ra[i];if(!this.isSafe(e)||!s.match(zp)&&(!t&&(!a||a===2)||s.startsWith("on")||l.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=s==="style"?this.extractStyleAttribute(e):l;a===4?c=!0:a===3?c=Number.parseFloat(String(c)):a!==5&&(c=String(c)),n[Qp[s]||s]=this.applyAttributeFilters(s,c),r+=1}),r!==0)?n:null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach(n=>{const r=e.style[n];(typeof r=="string"||typeof r=="number")&&(t[n.replace(/-([a-z])/g,(o,i)=>String(i).toUpperCase())]=r)}),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return vi[e]?{...t,...vi[e],tagName:e}:t}isSafe(e){if(typeof HTMLAnchorElement<"u"&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(t!=null&&t.startsWith("#"))return!0;const n=e.protocol.toLowerCase();return n===":"||n==="http:"||n==="https:"||n==="mailto:"||n==="tel:"}return!0}isTagAllowed(e){return!this.banned.has(e)&&!this.blocked.has(e)&&(this.props.allowElements||this.allowed.has(e))}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(e,t){const{noHtml:n,noHtmlExceptMatchers:r,allowElements:o,transform:i,transformOnlyAllowList:l}=this.props;let s=[],a="";return[...e.childNodes].forEach(c=>{if(c.nodeType===1){const A=c.nodeName.toLowerCase(),d=this.getTagConfig(A);a&&(s.push(a),a="");const f=this.applyNodeFilters(A,c);if(!f)return;let p;if(i&&(!l||this.isTagAllowed(A))){this.keyIndex+=1;const v=this.keyIndex;p=this.parseNode(f,d);const h=i(f,p,d);if(h===null)return;if(typeof h<"u")return void s.push(N.cloneElement(h,{key:v}));this.keyIndex=v-1}if(this.banned.has(A))return;if(n||r&&A!=="br"||!this.isTagAllowed(A)||!o&&!this.canRenderChild(t,d))s=[...s,...this.parseNode(f,d.tagName?d:t)];else{var u;this.keyIndex+=1;const v=this.extractAttributes(f),h={tagName:A};v&&(h.attributes=v),d.void&&(h.selfClose=d.void),s.push(N.createElement(Fa,{...h,key:this.keyIndex},(u=p)!==null&&u!==void 0?u:this.parseNode(f,d)))}}else if(c.nodeType===3){const A=n&&!r?c.textContent:this.applyMatchers(c.textContent||"",t);Array.isArray(A)?s=[...s,...A]:a+=A}}),a&&s.push(a),s}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(jp);){const[i,l]=o,s=o.index,a=i.includes("/");if(process.env.NODE_ENV!=="production"&&!t[l])throw new Error(`Token "${l}" found but no matching element to replace with.`);s>0&&(n.push(r.slice(0,s)),r=r.slice(s));const{children:c,matcher:u,props:A}=t[l];let d;if(a)d=i.length,n.push(u.createElement(c,A));else{const f=r.match(new RegExp(`{{{/${l}}}}`));if(process.env.NODE_ENV!=="production"&&!f)throw new Error(`Closing token missing for interpolated element "${l}".`);d=f.index+f[0].length,n.push(u.createElement(this.replaceTokens(r.slice(i.length,f.index),t),A))}r=r.slice(d)}return r.length>0&&n.push(r),n.length===0?"":n.length===1&&typeof n[0]=="string"?n[0]:n}};function Wp(e){var t;const{attributes:n,className:r,containerTagName:o,content:i,emptyContent:l,parsedContent:s,tagName:a,noWrap:c}=e,u=(t=o??a)!==null&&t!==void 0?t:"span",A=u==="fragment"||c;let d;if(s)d=s;else{const f=new za(i??"",e).parse();f.length>0&&(d=f)}return d||(d=l),A?N.createElement(N.Fragment,null,d):N.createElement(Fa,{attributes:n,className:r,tagName:u},d)}function Gp(e){const{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:l=null,filters:s=[],matchers:a=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:A="span",noWrap:d=!1,...f}=e,p=i?[]:a,v=o?[]:s,h=u?[u]:[],w=c?[c]:[];p.forEach(_=>{_.onBeforeParse&&h.push(_.onBeforeParse.bind(_)),_.onAfterParse&&w.push(_.onAfterParse.bind(_))});const b=h.reduce((_,E)=>{const P=E(_,e);if(process.env.NODE_ENV!=="production"&&typeof P!="string")throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return P},r??""),g=new za(b,f,p,v),k=w.reduce((_,E)=>{const P=E(_,e);if(process.env.NODE_ENV!=="production"&&!Array.isArray(P))throw new TypeError("Interweave `onAfterParse` must return an array of strings and React elements.");return P},g.parse());return N.createElement(Wp,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:l,noWrap:d,parsedContent:k.length===0?void 0:k,tagName:A})}const Yp=({children:e})=>I("div",{style:{whiteSpace:"normal"},children:I(Gp,{content:typeof e=="string"?e:""})}),Vp={autoConfig:!0},ja=(e,t,n)=>{var r;if(!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&(((r=o.renderHtml)==null?void 0:r.map(i=>i.toUpperCase()).includes(n))??!1)},$p=e=>{const t=[];let n="",r=!1;for(let o=0;o<e.length;o++){const i=e[o];i==="<"?r?(t.push(n),n=i):(r=!0,n=i):i===">"?(n+=i,t.push(n),n="",r=!1):r?n+=i:t.push(i)}return n!==""&&t.push(n),t},Kp=e=>{const{getFlow:t}=Xr(),{messages:n,replaceMessages:r}=Jr(),{settings:o}=Qa(),{hasChatHistoryLoaded:i}=Na(),l={...e,...Vp},s=l.htmlComponent?l.htmlComponent:Yp;ee(()=>{var u,A;if(i){const d=[...n];for(let f=0;f<d.length&&f<(((u=o.chatHistory)==null?void 0:u.maxEntries)??30);f++){const p=d[f];(A=p.tags)!=null&&A.includes("rcb-html-renderer-plugin:parsed")&&(p.contentWrapper=s)}r(d)}},[i]);const a=async u=>{var A;const d=(A=u.data.message)==null?void 0:A.sender.toUpperCase();typeof u.data.message.content=="string"&&ja(u,t(),d)&&(u.type==="rcb-start-simulate-stream-message"&&(u.data.simulateStreamChunker=$p),u.data.message.contentWrapper=s,u.data.message.tags||(u.data.message.tags=[]),u.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};bt(V.PRE_INJECT_MESSAGE,a),bt(V.CHUNK_STREAM_MESSAGE,a),bt(V.START_STREAM_MESSAGE,a),bt(V.START_SIMULATE_STREAM_MESSAGE,a),bt(V.START_SPEAK_AUDIO,async u=>{ja(u,t(),"BOT")&&(u.data.textToRead=(A=>typeof window.DOMParser<"u"?new DOMParser().parseFromString(A,"text/html").body.textContent||"":A.replace(/<\/?[^>]+(>|$)/g,""))(u.data.textToRead))});const c={name:"@rcb-plugins/html-renderer"};return l!=null&&l.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),c},Xp=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Jp=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zp={};function qa(e,t){return(Zp.jsx?Jp:Xp).test(e)}const eh=/[ \t\n\f\r]/g;function Wa(e){return e.replace(eh,"")===""}class ur{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}function Ga(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new ur(n,r,t)}function wi(e){return e.toLowerCase()}ur.prototype.property={},ur.prototype.normal={},ur.prototype.space=null;class kt{constructor(t,n){this.property=t,this.attribute=n}}kt.prototype.space=null,kt.prototype.boolean=!1,kt.prototype.booleanish=!1,kt.prototype.overloadedBoolean=!1,kt.prototype.number=!1,kt.prototype.commaSeparated=!1,kt.prototype.spaceSeparated=!1,kt.prototype.commaOrSpaceSeparated=!1,kt.prototype.mustUseProperty=!1,kt.prototype.defined=!1;let th=0;const ue=vn(),Ge=vn(),Ya=vn(),z=vn(),De=vn(),Qn=vn(),gt=vn();function vn(){return 2**++th}const bi=Object.freeze(Object.defineProperty({__proto__:null,boolean:ue,booleanish:Ge,commaOrSpaceSeparated:gt,commaSeparated:Qn,number:z,overloadedBoolean:Ya,spaceSeparated:De},Symbol.toStringTag,{value:"Module"})),ki=Object.keys(bi);class xi extends kt{constructor(t,n,r,o){let i=-1;if(super(t,n),Va(this,"space",o),typeof r=="number")for(;++i<ki.length;){const l=ki[i];Va(this,ki[i],(r&bi[l])===bi[l])}}}function Va(e,t,n){n&&(e[t]=n)}xi.prototype.defined=!0;const nh={}.hasOwnProperty;function Ln(e){const t={},n={};let r;for(r in e.properties)if(nh.call(e.properties,r)){const o=e.properties[r],i=new xi(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[wi(r)]=r,n[wi(i.attribute)]=r}return new ur(t,n,e.space)}const $a=Ln({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Ka=Ln({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Xa(e,t){return t in e?e[t]:t}function Ja(e,t){return Xa(e,t.toLowerCase())}const Za=Ln({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ja,properties:{xmlns:null,xmlnsXLink:null}}),ec=Ln({transform:(e,t)=>t==="role"?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Ge,ariaAutoComplete:null,ariaBusy:Ge,ariaChecked:Ge,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:De,ariaCurrent:null,ariaDescribedBy:De,ariaDetails:null,ariaDisabled:Ge,ariaDropEffect:De,ariaErrorMessage:null,ariaExpanded:Ge,ariaFlowTo:De,ariaGrabbed:Ge,ariaHasPopup:null,ariaHidden:Ge,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:De,ariaLevel:z,ariaLive:null,ariaModal:Ge,ariaMultiLine:Ge,ariaMultiSelectable:Ge,ariaOrientation:null,ariaOwns:De,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:Ge,ariaReadOnly:Ge,ariaRelevant:null,ariaRequired:Ge,ariaRoleDescription:De,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:Ge,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null}}),rh=Ln({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ja,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Qn,acceptCharset:De,accessKey:De,action:null,allow:null,allowFullScreen:ue,allowPaymentRequest:ue,allowUserMedia:ue,alt:null,as:null,async:ue,autoCapitalize:null,autoComplete:De,autoFocus:ue,autoPlay:ue,blocking:De,capture:null,charSet:null,checked:ue,cite:null,className:De,cols:z,colSpan:null,content:null,contentEditable:Ge,controls:ue,controlsList:De,coords:z|Qn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ue,defer:ue,dir:null,dirName:null,disabled:ue,download:Ya,draggable:Ge,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ue,formTarget:null,headers:De,height:z,hidden:ue,high:z,href:null,hrefLang:null,htmlFor:De,httpEquiv:De,id:null,imageSizes:null,imageSrcSet:null,inert:ue,inputMode:null,integrity:null,is:null,isMap:ue,itemId:null,itemProp:De,itemRef:De,itemScope:ue,itemType:De,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ue,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:ue,muted:ue,name:null,nonce:null,noModule:ue,noValidate:ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ue,optimum:z,pattern:null,ping:De,placeholder:null,playsInline:ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ue,referrerPolicy:null,rel:De,required:ue,reversed:ue,rows:z,rowSpan:z,sandbox:De,scope:null,scoped:ue,seamless:ue,selected:ue,shadowRootClonable:ue,shadowRootDelegatesFocus:ue,shadowRootMode:null,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:Ge,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:ue,useMap:null,value:Ge,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:De,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ue,declare:ue,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:ue,noHref:ue,noShade:ue,noWrap:ue,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:Ge,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ue,disableRemotePlayback:ue,prefix:null,property:null,results:z,security:null,unselectable:null}}),oh=Ln({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Xa,properties:{about:gt,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:De,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Qn,g2:Qn,glyphName:Qn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:gt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:De,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gt,rev:gt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gt,requiredFeatures:gt,requiredFonts:gt,requiredFormats:gt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:gt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gt,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),ih=/^data[-\w.:]+$/i,tc=/-[a-z]/g,lh=/[A-Z]/g;function sh(e){return"-"+e.toLowerCase()}function ah(e){return e.charAt(1).toUpperCase()}const ch={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},uh=Ga([Ka,$a,Za,ec,rh],"html"),Ei=Ga([Ka,$a,Za,ec,oh],"svg");function nc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _i,rc,oc,Nn={},Ah=function(){if(oc)return Nn;oc=1;var e=Nn&&Nn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.default=function(n,r){var o=null;if(!n||typeof n!="string")return o;var i=(0,t.default)(n),l=typeof r=="function";return i.forEach(function(s){if(s.type==="declaration"){var a=s.property,c=s.value;l?r(a,c,s):c&&((o=o||{})[a]=c)}}),o};var t=e(function(){if(rc)return _i;rc=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,o=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,u="";function A(d){return d?d.replace(c,u):u}return _i=function(d,f){if(typeof d!="string")throw new TypeError("First argument must be a string");if(!d)return[];f=f||{};var p=1,v=1;function h(B){var D=B.match(r);D&&(p+=D.length);var T=B.lastIndexOf(`
21
+ `);v=~T?B.length-T:v+B.length}function w(){var B={line:p,column:v};return function(D){return D.position=new b(B),_(),D}}function b(B){this.start=B,this.end={line:p,column:v},this.source=f.source}function g(B){var D=new Error(f.source+":"+p+":"+v+": "+B);if(D.reason=B,D.filename=f.source,D.line=p,D.column=v,D.source=d,!f.silent)throw D}function k(B){var D=B.exec(d);if(D){var T=D[0];return h(T),d=d.slice(T.length),D}}function _(){k(o)}function E(B){var D;for(B=B||[];D=P();)D!==!1&&B.push(D);return B}function P(){var B=w();if(d.charAt(0)=="/"&&d.charAt(1)=="*"){for(var D=2;u!=d.charAt(D)&&(d.charAt(D)!="*"||d.charAt(D+1)!="/");)++D;if(D+=2,u===d.charAt(D-1))return g("End of comment missing");var T=d.slice(2,D-2);return v+=2,h(T),d=d.slice(D),v+=2,B({type:"comment",comment:T})}}function x(){var B=w(),D=k(i);if(D){if(P(),!k(l))return g("property missing ':'");var T=k(s),C=B({type:"declaration",property:A(D[0].replace(n,u)),value:T?A(T[0].replace(n,u)):u});return k(a),C}}return b.prototype.content=d,_(),function(){var B,D=[];for(E(D);B=x();)B!==!1&&(D.push(B),E(D));return D}()},_i}());return Nn}();const ic=nc(Ah),dh=ic.default||ic,lc=sc("end"),Si=sc("start");function sc(e){return function(t){const n=t&&t.position&&t.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Ar(e){return e&&typeof e=="object"?"position"in e||"type"in e?ac(e.position):"start"in e||"end"in e?ac(e):"line"in e||"column"in e?Ci(e):"":""}function Ci(e){return cc(e&&e.line)+":"+cc(e&&e.column)}function ac(e){return Ci(e&&e.start)+"-"+Ci(e&&e.end)}function cc(e){return e&&typeof e=="number"?e:1}class et extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},l=!1;if(n&&(i="line"in n&&"column"in n||"start"in n&&"end"in n?{place:n}:"type"in n?{ancestors:[n],place:n.position}:{...n}),typeof t=="string"?o=t:!i.cause&&t&&(l=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?i.ruleId=r:(i.source=r.slice(0,a),i.ruleId=r.slice(a+1))}if(!i.place&&i.ancestors&&i.ancestors){const a=i.ancestors[i.ancestors.length-1];a&&(i.place=a.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=Ar(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=l&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}et.prototype.file="",et.prototype.name="",et.prototype.reason="",et.prototype.message="",et.prototype.stack="",et.prototype.column=void 0,et.prototype.line=void 0,et.prototype.ancestors=void 0,et.prototype.cause=void 0,et.prototype.fatal=void 0,et.prototype.place=void 0,et.prototype.ruleId=void 0,et.prototype.source=void 0;const Pi={}.hasOwnProperty,fh=new Map,ph=/[A-Z]/g,hh=/-([a-z])/g,gh=new Set(["table","tbody","thead","tfoot","tr"]),mh=new Set(["td","th"]),uc="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yh(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(l,s){return a;function a(c,u,A,d){const f=Array.isArray(A.children),p=Si(c);return s(u,A,d,f,{columnNumber:p?p.column-1:void 0,fileName:l,lineNumber:p?p.line:void 0},void 0)}}(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=function(l,s,a){return c;function c(u,A,d,f){const p=Array.isArray(d.children)?a:s;return f?p(A,d,f):p(A,d)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ei:uh,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Ac(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Ac(e,t,n){return t.type==="element"?function(r,o,i){const l=r.schema;let s=l;o.tagName.toLowerCase()==="svg"&&l.space==="html"&&(s=Ei,r.schema=s),r.ancestors.push(o);const a=fc(r,o.tagName,!1),c=function(A,d){const f={};let p,v;for(v in d.properties)if(v!=="children"&&Pi.call(d.properties,v)){const h=vh(A,v,d.properties[v]);if(h){const[w,b]=h;A.tableCellAlignToStyle&&w==="align"&&typeof b=="string"&&mh.has(d.tagName)?p=b:f[w]=b}}return p&&((f.style||(f.style={}))[A.stylePropertyNameCase==="css"?"text-align":"textAlign"]=p),f}(r,o);let u=Ii(r,o);return gh.has(o.tagName)&&(u=u.filter(function(A){return typeof A!="string"||!function(d){return typeof d=="object"?d.type==="text"&&Wa(d.value):Wa(d)}(A)})),dc(r,c,a,o),Di(c,u),r.ancestors.pop(),r.schema=l,r.create(o,a,c,i)}(e,t,n):t.type==="mdxFlowExpression"||t.type==="mdxTextExpression"?function(r,o){if(o.data&&o.data.estree&&r.evaluater){const i=o.data.estree.body[0];return i.type,r.evaluater.evaluateExpression(i.expression)}dr(r,o.position)}(e,t):t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement"?function(r,o,i){const l=r.schema;let s=l;o.name==="svg"&&l.space==="html"&&(s=Ei,r.schema=s),r.ancestors.push(o);const a=o.name===null?r.Fragment:fc(r,o.name,!0),c=function(A,d){const f={};for(const p of d.attributes)if(p.type==="mdxJsxExpressionAttribute")if(p.data&&p.data.estree&&A.evaluater){const v=p.data.estree.body[0];v.type;const h=v.expression;h.type;const w=h.properties[0];w.type,Object.assign(f,A.evaluater.evaluateExpression(w.argument))}else dr(A,d.position);else{const v=p.name;let h;if(p.value&&typeof p.value=="object")if(p.value.data&&p.value.data.estree&&A.evaluater){const w=p.value.data.estree.body[0];w.type,h=A.evaluater.evaluateExpression(w.expression)}else dr(A,d.position);else h=p.value===null||p.value;f[v]=h}return f}(r,o),u=Ii(r,o);return dc(r,c,a,o),Di(c,u),r.ancestors.pop(),r.schema=l,r.create(o,a,c,i)}(e,t,n):t.type==="mdxjsEsm"?function(r,o){if(o.data&&o.data.estree&&r.evaluater)return r.evaluater.evaluateProgram(o.data.estree);dr(r,o.position)}(e,t):t.type==="root"?function(r,o,i){const l={};return Di(l,Ii(r,o)),r.create(o,r.Fragment,l,i)}(e,t,n):t.type==="text"?function(r,o){return o.value}(0,t):void 0}function dc(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Di(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ii(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:fh;for(;++r<t.children.length;){const i=t.children[r];let l;if(e.passKeys){const a=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(a){const c=o.get(a)||0;l=a+"-"+c,o.set(a,c+1)}}const s=Ac(e,i,l);s!==void 0&&n.push(s)}return n}function vh(e,t,n){const r=function(o,i){const l=wi(i);let s=i,a=kt;if(l in o.normal)return o.property[o.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&ih.test(i)){if(i.charAt(4)==="-"){const c=i.slice(5).replace(tc,ah);s="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=i.slice(4);if(!tc.test(c)){let u=c.replace(lh,sh);u.charAt(0)!=="-"&&(u="-"+u),i="data"+u}}a=xi}return new a(s,i)}(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(o){const i={};return(o[o.length-1]===""?[...o,""]:o).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}(n):function(o){return o.join(" ").trim()}(n)),r.property==="style"){let o=typeof n=="object"?n:function(i,l){const s={};try{dh(l,a)}catch(c){if(!i.ignoreInvalidStyle){const u=c,A=new et("Cannot parse `style` attribute",{ancestors:i.ancestors,cause:u,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw A.file=i.filePath||void 0,A.url=uc+"#cannot-parse-style-attribute",A}}return s;function a(c,u){let A=c;A.slice(0,2)!=="--"&&(A.slice(0,4)==="-ms-"&&(A="ms-"+A.slice(4)),A=A.replace(hh,bh)),s[A]=u}}(e,String(n));return e.stylePropertyNameCase==="css"&&(o=function(i){const l={};let s;for(s in i)Pi.call(i,s)&&(l[wh(s)]=i[s]);return l}(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?ch[r.property]||r.property:r.attribute,n]}}function fc(e,t,n){let r;if(n)if(t.includes(".")){const o=t.split(".");let i,l=-1;for(;++l<o.length;){const s=qa(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};i=i?{type:"MemberExpression",object:i,property:s,computed:!(!l||s.type!=="Literal"),optional:!1}:s}r=i}else r=qa(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Pi.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);dr(e)}function dr(e,t){const n=new et("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=uc+"#cannot-handle-mdx-estrees-without-createevaluater",n}function wh(e){let t=e.replace(ph,kh);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function bh(e,t){return t.toUpperCase()}function kh(e){return"-"+e.toLowerCase()}const Bi={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},eo={};function pc(e,t,n){if(function(r){return!(!r||typeof r!="object")}(e)){if("value"in e)return e.type!=="html"||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return hc(e.children,t,n)}return Array.isArray(e)?hc(e,t,n):""}function hc(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=pc(e[o],t,n);return r.join("")}const gc=document.createElement("i");function Ti(e){const t="&"+e+";";gc.innerHTML=t;const n=gc.textContent;return(n.charCodeAt(n.length-1)!==59||e==="semi")&&n!==t&&n}function Lt(e,t,n,r){const o=e.length;let i,l=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);l<r.length;)i=r.slice(l,l+1e4),i.unshift(t,0),e.splice(...i),l+=1e4,t+=1e4}function xt(e,t){return e.length>0?(Lt(e,e.length,0,t),e):t}const mc={}.hasOwnProperty;function xh(e){const t={};let n=-1;for(;++n<e.length;)Eh(t,e[n]);return t}function Eh(e,t){let n;for(n in t){const r=(mc.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){mc.call(r,i)||(r[i]=[]);const l=o[i];_h(r[i],Array.isArray(l)?l:l?[l]:[])}}}function _h(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Lt(e,0,0,r)}function yc(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||(65535&n)==65534||n>1114111?"๏ฟฝ":String.fromCodePoint(n)}function Rn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nt=rn(/[A-Za-z]/),mt=rn(/[\dA-Za-z]/),Sh=rn(/[#-'*+\--9=?A-Z^-~]/);function Mi(e){return e!==null&&(e<32||e===127)}const Oi=rn(/\d/),Ch=rn(/[\dA-Fa-f]/),Ph=rn(/[!-/:-@[-`{-~]/);function se(e){return e!==null&&e<-2}function at(e){return e!==null&&(e<0||e===32)}function ve(e){return e===-2||e===-1||e===32}const Dh=rn(new RegExp("\\p{P}|\\p{S}","u")),Ih=rn(/\s/);function rn(e){return function(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Fn(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let l="";if(i===37&&mt(e.charCodeAt(n+1))&&mt(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(l=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(l=String.fromCharCode(i,s),o=1):l="๏ฟฝ"}else l=String.fromCharCode(i);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ie(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(s){return ve(s)?(e.enter(n),l(s)):t(s)};function l(s){return ve(s)&&i++<o?(e.consume(s),l):(e.exit(n),t(s))}}const Bh={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(i){return i===null?void e.consume(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ie(e,t,"linePrefix"))},function(i){return e.enter("paragraph"),r(i)});let n;return t;function r(i){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(i)}function o(i){return i===null?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(i)):se(i)?(e.consume(i),e.exit("chunkText"),r):(e.consume(i),o)}}},Th={tokenize:function(e){const t=this,n=[];let r,o,i,l=0;return s;function s(g){if(l<n.length){const k=n[l];return t.containerState=k[1],e.attempt(k[0].continuation,a,c)(g)}return c(g)}function a(g){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const k=t.events.length;let _,E=k;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){_=t.events[E][1].end;break}w(l);let P=k;for(;P<t.events.length;)t.events[P][1].end={..._},P++;return Lt(t.events,E+1,0,t.events.slice(k)),t.events.length=P,c(g)}return s(g)}function c(g){if(l===n.length){if(!r)return d(g);if(r.currentConstruct&&r.currentConstruct.concrete)return p(g);t.interrupt=!(!r.currentConstruct||r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(vc,u,A)(g)}function u(g){return r&&b(),w(l),d(g)}function A(g){return t.parser.lazy[t.now().line]=l!==n.length,i=t.now().offset,p(g)}function d(g){return t.containerState={},e.attempt(vc,f,p)(g)}function f(g){return l++,n.push([t.currentConstruct,t.containerState]),d(g)}function p(g){return g===null?(r&&b(),w(0),void e.consume(g)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),v(g))}function v(g){return g===null?(h(e.exit("chunkFlow"),!0),w(0),void e.consume(g)):se(g)?(e.consume(g),h(e.exit("chunkFlow")),l=0,t.interrupt=void 0,s):(e.consume(g),v)}function h(g,k){const _=t.sliceStream(g);if(k&&_.push(null),g.previous=o,o&&(o.next=g),o=g,r.defineSkip(g.start),r.write(_),t.parser.lazy[g.start.line]){let E=r.events.length;for(;E--;)if(r.events[E][1].start.offset<i&&(!r.events[E][1].end||r.events[E][1].end.offset>i))return;const P=t.events.length;let x,B,D=P;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(x){B=t.events[D][1].end;break}x=!0}for(w(l),E=P;E<t.events.length;)t.events[E][1].end={...B},E++;Lt(t.events,D+1,0,t.events.slice(P)),t.events.length=E}}function w(g){let k=n.length;for(;k-- >g;){const _=n[k];t.containerState=_[1],_[0].exit.call(t,e)}n.length=g}function b(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},vc={tokenize:function(e,t,n){return Ie(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function wc(e){return e===null||at(e)||Ih(e)?1:Dh(e)?2:void 0}function Qi(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Li={name:"attention",resolveAll:function(e,t){let n,r,o,i,l,s,a,c,u=-1;for(;++u<e.length;)if(e[u][0]==="enter"&&e[u][1].type==="attentionSequence"&&e[u][1]._close){for(n=u;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const A={...e[n][1].end},d={...e[u][1].start};bc(A,-s),bc(d,s),i={type:s>1?"strongSequence":"emphasisSequence",start:A,end:{...e[n][1].end}},l={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:d},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...l.end}},e[n][1].end={...i.start},e[u][1].start={...l.end},a=[],e[n][1].end.offset-e[n][1].start.offset&&(a=xt(a,[["enter",e[n][1],t],["exit",e[n][1],t]])),a=xt(a,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),a=xt(a,Qi(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),a=xt(a,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,a=xt(a,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Lt(e,n-1,u-n+3,a),u=n+a.length-c-2;break}}for(u=-1;++u<e.length;)e[u][1].type==="attentionSequence"&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=wc(r);let i;return function(s){return i=s,e.enter("attentionSequence"),l(s)};function l(s){if(s===i)return e.consume(s),l;const a=e.exit("attentionSequence"),c=wc(s),u=!c||c===2&&o||n.includes(s),A=!o||o===2&&c||n.includes(r);return a._open=!!(i===42?u:u&&(o||!A)),a._close=!!(i===42?A:A&&(c||!u)),t(s)}}};function bc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Mh={name:"autolink",tokenize:function(e,t,n){let r=0;return function(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(d){return Nt(d)?(e.consume(d),i):d===64?n(d):a(d)}function i(d){return d===43||d===45||d===46||mt(d)?(r=1,l(d)):a(d)}function l(d){return d===58?(e.consume(d),r=0,s):(d===43||d===45||d===46||mt(d))&&r++<32?(e.consume(d),l):(r=0,a(d))}function s(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Mi(d)?n(d):(e.consume(d),s)}function a(d){return d===64?(e.consume(d),c):Sh(d)?(e.consume(d),a):n(d)}function c(d){return mt(d)?u(d):n(d)}function u(d){return d===46?(e.consume(d),r=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):A(d)}function A(d){if((d===45||mt(d))&&r++<63){const f=d===45?A:u;return e.consume(d),f}return n(d)}}},to={partial:!0,tokenize:function(e,t,n){return function(o){return ve(o)?Ie(e,r,"linePrefix")(o):r(o)};function r(o){return o===null||se(o)?t(o):n(o)}}},kc={continuation:{tokenize:function(e,t,n){const r=this;return function(i){return ve(i)?Ie(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):o(i)};function o(i){return e.attempt(kc,t,n)(i)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(i){if(i===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),o}return n(i)};function o(i){return ve(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}},xc={name:"characterEscape",tokenize:function(e,t,n){return function(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),r};function r(o){return Ph(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}},Ec={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,l=0;return function(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),s};function s(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),o=31,i=mt,c(u))}function a(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=Ch,c):(e.enter("characterReferenceValue"),o=7,i=Oi,c(u))}function c(u){if(u===59&&l){const A=e.exit("characterReferenceValue");return i!==mt||Ti(r.sliceSerialize(A))?(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(u)}return i(u)&&l++<o?(e.consume(u),c):n(u)}}},_c={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o)};function o(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}},Sc={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(g,k,_){let E=0;return P;function P(C){return g.enter("lineEnding"),g.consume(C),g.exit("lineEnding"),x}function x(C){return g.enter("codeFencedFence"),ve(C)?Ie(g,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):B(C)}function B(C){return C===i?(g.enter("codeFencedFenceSequence"),D(C)):_(C)}function D(C){return C===i?(E++,g.consume(C),D):E>=s?(g.exit("codeFencedFenceSequence"),ve(C)?Ie(g,T,"whitespace")(C):T(C)):_(C)}function T(C){return C===null||se(C)?(g.exit("codeFencedFence"),k(C)):_(C)}}};let i,l=0,s=0;return function(g){return function(k){const _=r.events[r.events.length-1];return l=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,i=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),a(k)}(g)};function a(g){return g===i?(s++,e.consume(g),a):s<3?n(g):(e.exit("codeFencedFenceSequence"),ve(g)?Ie(e,c,"whitespace")(g):c(g))}function c(g){return g===null||se(g)?(e.exit("codeFencedFence"),r.interrupt?t(g):e.check(_c,f,b)(g)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(g))}function u(g){return g===null||se(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(g)):ve(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ie(e,A,"whitespace")(g)):g===96&&g===i?n(g):(e.consume(g),u)}function A(g){return g===null||se(g)?c(g):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===null||se(g)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(g)):g===96&&g===i?n(g):(e.consume(g),d)}function f(g){return e.attempt(o,b,p)(g)}function p(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),v}function v(g){return l>0&&ve(g)?Ie(e,h,"linePrefix",l+1)(g):h(g)}function h(g){return g===null||se(g)?e.check(_c,f,b)(g):(e.enter("codeFlowValue"),w(g))}function w(g){return g===null||se(g)?(e.exit("codeFlowValue"),h(g)):(e.consume(g),w)}function b(g){return e.exit("codeFenced"),t(g)}}},Ni={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(a){return e.enter("codeIndented"),Ie(e,o,"linePrefix",5)(a)};function o(a){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(a):n(a)}function i(a){return a===null?s(a):se(a)?e.attempt(Oh,i,s)(a):(e.enter("codeFlowValue"),l(a))}function l(a){return a===null||se(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),l)}function s(a){return e.exit("codeIndented"),t(a)}}},Oh={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):se(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):Ie(e,i,"linePrefix",5)(l)}function i(l){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):se(l)?o(l):n(l)}}},Qh={name:"codeText",previous:function(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"},resolve:function(e){let t,n,r=e.length-4,o=3;if(!(e[o][1].type!=="lineEnding"&&e[o][1].type!=="space"||e[r][1].type!=="lineEnding"&&e[r][1].type!=="space")){for(t=o;++t<r;)if(e[t][1].type==="codeTextData"){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}}for(t=o-1,r++;++t<=r;)n===void 0?t!==r&&e[t][1].type!=="lineEnding"&&(n=t):(t===r||e[t][1].type==="lineEnding")&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(u){return e.enter("codeText"),e.enter("codeTextSequence"),l(u)};function l(u){return u===96?(e.consume(u),i++,l):(e.exit("codeTextSequence"),s(u))}function s(u){return u===null?n(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),s):u===96?(o=e.enter("codeTextSequence"),r=0,c(u)):se(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):(e.enter("codeTextData"),a(u))}function a(u){return u===null||u===32||u===96||se(u)?(e.exit("codeTextData"),s(u)):(e.consume(u),a)}function c(u){return u===96?(e.consume(u),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(u)):(o.type="codeTextData",a(u))}}};class Lh{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&fr(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),fr(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),fr(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);fr(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);fr(this.left,n.reverse())}}}function fr(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Cc(e){const t={};let n,r,o,i,l,s,a,c=-1;const u=new Lh(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&n[1].type==="chunkFlow"&&u.get(c-1)[1].type==="listItemPrefix"&&(s=n[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,Nh(u,c)),c=t[c],a=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if(i[1].type!=="linePrefix")break;r&&(n[1].end={...u.get(r)[1].start},l=u.slice(r,c),l.unshift(n),u.splice(r,c-r+1,l))}}return Lt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!a}function Nh(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],l=n._tokenizer||r.parser[n.contentType](n.start),s=l.events,a=[],c={};let u,A,d=-1,f=n,p=0,v=0;const h=[v];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),A&&l.defineSkip(f.start),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(u),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),A=f,f=f.next}for(f=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(v=d+1,h.push(v),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(l.events=[],f?(f._tokenizer=void 0,f.previous=void 0):h.pop(),d=h.length;d--;){const w=s.slice(h[d],h[d+1]),b=i.pop();a.push([b,b+w.length-1]),e.splice(b,2,w)}for(a.reverse(),d=-1;++d<a.length;)c[p+a[d][0]]=p+a[d][1],p+=a[d][1]-a[d][0]-1;return c}const Rh={resolve:function(e){return Cc(e),e},tokenize:function(e,t){let n;return function(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(l)};function r(l){return l===null?o(l):se(l)?e.check(Fh,i,o)(l):(e.consume(l),r)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function i(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Fh={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ie(e,o,"linePrefix")};function o(i){if(i===null||se(i))return n(i);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};function Pc(e,t,n,r,o,i,l,s,a){const c=a||Number.POSITIVE_INFINITY;let u=0;return function(h){return h===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(h),e.exit(i),A):h===null||h===32||h===41||Mi(h)?n(h):(e.enter(r),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),p(h))};function A(h){return h===62?(e.enter(i),e.consume(h),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===62?(e.exit("chunkString"),e.exit(s),A(h)):h===null||h===60||se(h)?n(h):(e.consume(h),h===92?f:d)}function f(h){return h===60||h===62||h===92?(e.consume(h),d):d(h)}function p(h){return u||h!==null&&h!==41&&!at(h)?u<c&&h===40?(e.consume(h),u++,p):h===41?(e.consume(h),u--,p):h===null||h===32||h===40||Mi(h)?n(h):(e.consume(h),h===92?v:p):(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(r),t(h))}function v(h){return h===40||h===41||h===92?(e.consume(h),p):p(h)}}function Dc(e,t,n,r,o,i){const l=this;let s,a=0;return function(d){return e.enter(r),e.enter(o),e.consume(d),e.exit(o),e.enter(i),c};function c(d){return a>999||d===null||d===91||d===93&&!s||d===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(d):d===93?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):se(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===null||d===91||d===93||se(d)||a++>999?(e.exit("chunkString"),c(d)):(e.consume(d),s||(s=!ve(d)),d===92?A:u)}function A(d){return d===91||d===92||d===93?(e.consume(d),a++,u):u(d)}}function Ic(e,t,n,r,o,i){let l;return function(A){return A===34||A===39||A===40?(e.enter(r),e.enter(o),e.consume(A),e.exit(o),l=A===40?41:A,s):n(A)};function s(A){return A===l?(e.enter(o),e.consume(A),e.exit(o),e.exit(r),t):(e.enter(i),a(A))}function a(A){return A===l?(e.exit(i),s(l)):A===null?n(A):se(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),Ie(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(A))}function c(A){return A===l||A===null||se(A)?(e.exit("chunkString"),a(A)):(e.consume(A),A===92?u:c)}function u(A){return A===l||A===92?(e.consume(A),c):c(A)}}function pr(e,t){let n;return function r(o){return se(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):ve(o)?Ie(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Hh={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(A){return e.enter("definition"),function(d){return Dc.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}(A)};function i(A){return o=Rn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),A===58?(e.enter("definitionMarker"),e.consume(A),e.exit("definitionMarker"),l):n(A)}function l(A){return at(A)?pr(e,s)(A):s(A)}function s(A){return Pc(e,a,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(A)}function a(A){return e.attempt(Uh,c,c)(A)}function c(A){return ve(A)?Ie(e,u,"whitespace")(A):u(A)}function u(A){return A===null||se(A)?(e.exit("definition"),r.parser.defined.push(o),t(A)):n(A)}}},Uh={partial:!0,tokenize:function(e,t,n){return function(l){return at(l)?pr(e,r)(l):n(l)};function r(l){return Ic(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return ve(l)?Ie(e,i,"whitespace")(l):i(l)}function i(l){return l===null||se(l)?t(l):n(l)}}},zh={name:"hardBreakEscape",tokenize:function(e,t,n){return function(o){return e.enter("hardBreakEscape"),e.consume(o),r};function r(o){return se(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}},jh={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;return e[i][1].type==="whitespace"&&(i+=2),o-2>i&&e[o][1].type==="whitespace"&&(o-=2),e[o][1].type==="atxHeadingSequence"&&(i===o-1||o-4>i&&e[o-2][1].type==="whitespace")&&(o-=i+1===o?2:4),o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},Lt(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(a){return e.enter("atxHeading"),function(c){return e.enter("atxHeadingSequence"),o(c)}(a)};function o(a){return a===35&&r++<6?(e.consume(a),o):a===null||at(a)?(e.exit("atxHeadingSequence"),i(a)):n(a)}function i(a){return a===35?(e.enter("atxHeadingSequence"),l(a)):a===null||se(a)?(e.exit("atxHeading"),t(a)):ve(a)?Ie(e,i,"whitespace")(a):(e.enter("atxHeadingText"),s(a))}function l(a){return a===35?(e.consume(a),l):(e.exit("atxHeadingSequence"),i(a))}function s(a){return a===null||a===35||at(a)?(e.exit("atxHeadingText"),i(a)):(e.consume(a),s)}}},qh=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Bc=["pre","script","style","textarea"],Wh={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&(e[t][0]!=="enter"||e[t][1].type!=="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){const r=this;let o,i,l,s,a;return function(y){return function(q){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(q),c}(y)};function c(y){return y===33?(e.consume(y),u):y===47?(e.consume(y),i=!0,f):y===63?(e.consume(y),o=3,r.interrupt?t:O):Nt(y)?(e.consume(y),l=String.fromCharCode(y),p):n(y)}function u(y){return y===45?(e.consume(y),o=2,A):y===91?(e.consume(y),o=5,s=0,d):Nt(y)?(e.consume(y),o=4,r.interrupt?t:O):n(y)}function A(y){return y===45?(e.consume(y),r.interrupt?t:O):n(y)}function d(y){return y==="CDATA[".charCodeAt(s++)?(e.consume(y),s===6?r.interrupt?t:D:d):n(y)}function f(y){return Nt(y)?(e.consume(y),l=String.fromCharCode(y),p):n(y)}function p(y){if(y===null||y===47||y===62||at(y)){const q=y===47,re=l.toLowerCase();return q||i||!Bc.includes(re)?qh.includes(l.toLowerCase())?(o=6,q?(e.consume(y),v):r.interrupt?t(y):D(y)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(y):i?h(y):w(y)):(o=1,r.interrupt?t(y):D(y))}return y===45||mt(y)?(e.consume(y),l+=String.fromCharCode(y),p):n(y)}function v(y){return y===62?(e.consume(y),r.interrupt?t:D):n(y)}function h(y){return ve(y)?(e.consume(y),h):x(y)}function w(y){return y===47?(e.consume(y),x):y===58||y===95||Nt(y)?(e.consume(y),b):ve(y)?(e.consume(y),w):x(y)}function b(y){return y===45||y===46||y===58||y===95||mt(y)?(e.consume(y),b):g(y)}function g(y){return y===61?(e.consume(y),k):ve(y)?(e.consume(y),g):w(y)}function k(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),a=y,_):ve(y)?(e.consume(y),k):E(y)}function _(y){return y===a?(e.consume(y),a=null,P):y===null||se(y)?n(y):(e.consume(y),_)}function E(y){return y===null||y===34||y===39||y===47||y===60||y===61||y===62||y===96||at(y)?g(y):(e.consume(y),E)}function P(y){return y===47||y===62||ve(y)?w(y):n(y)}function x(y){return y===62?(e.consume(y),B):n(y)}function B(y){return y===null||se(y)?D(y):ve(y)?(e.consume(y),B):n(y)}function D(y){return y===45&&o===2?(e.consume(y),H):y===60&&o===1?(e.consume(y),R):y===62&&o===4?(e.consume(y),m):y===63&&o===3?(e.consume(y),O):y===93&&o===5?(e.consume(y),M):!se(y)||o!==6&&o!==7?y===null||se(y)?(e.exit("htmlFlowData"),T(y)):(e.consume(y),D):(e.exit("htmlFlowData"),e.check(Gh,G,T)(y))}function T(y){return e.check(Yh,C,G)(y)}function C(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),L}function L(y){return y===null||se(y)?T(y):(e.enter("htmlFlowData"),D(y))}function H(y){return y===45?(e.consume(y),O):D(y)}function R(y){return y===47?(e.consume(y),l="",Q):D(y)}function Q(y){if(y===62){const q=l.toLowerCase();return Bc.includes(q)?(e.consume(y),m):D(y)}return Nt(y)&&l.length<8?(e.consume(y),l+=String.fromCharCode(y),Q):D(y)}function M(y){return y===93?(e.consume(y),O):D(y)}function O(y){return y===62?(e.consume(y),m):y===45&&o===2?(e.consume(y),O):D(y)}function m(y){return y===null||se(y)?(e.exit("htmlFlowData"),G(y)):(e.consume(y),m)}function G(y){return e.exit("htmlFlow"),t(y)}}},Gh={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(to,t,n)}}},Yh={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return se(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o):n(i)};function o(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}},Vh={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,l;return function(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),s};function s(m){return m===33?(e.consume(m),a):m===47?(e.consume(m),k):m===63?(e.consume(m),b):Nt(m)?(e.consume(m),P):n(m)}function a(m){return m===45?(e.consume(m),c):m===91?(e.consume(m),i=0,f):Nt(m)?(e.consume(m),w):n(m)}function c(m){return m===45?(e.consume(m),d):n(m)}function u(m){return m===null?n(m):m===45?(e.consume(m),A):se(m)?(l=u,Q(m)):(e.consume(m),u)}function A(m){return m===45?(e.consume(m),d):u(m)}function d(m){return m===62?R(m):m===45?A(m):u(m)}function f(m){return m==="CDATA[".charCodeAt(i++)?(e.consume(m),i===6?p:f):n(m)}function p(m){return m===null?n(m):m===93?(e.consume(m),v):se(m)?(l=p,Q(m)):(e.consume(m),p)}function v(m){return m===93?(e.consume(m),h):p(m)}function h(m){return m===62?R(m):m===93?(e.consume(m),h):p(m)}function w(m){return m===null||m===62?R(m):se(m)?(l=w,Q(m)):(e.consume(m),w)}function b(m){return m===null?n(m):m===63?(e.consume(m),g):se(m)?(l=b,Q(m)):(e.consume(m),b)}function g(m){return m===62?R(m):b(m)}function k(m){return Nt(m)?(e.consume(m),_):n(m)}function _(m){return m===45||mt(m)?(e.consume(m),_):E(m)}function E(m){return se(m)?(l=E,Q(m)):ve(m)?(e.consume(m),E):R(m)}function P(m){return m===45||mt(m)?(e.consume(m),P):m===47||m===62||at(m)?x(m):n(m)}function x(m){return m===47?(e.consume(m),R):m===58||m===95||Nt(m)?(e.consume(m),B):se(m)?(l=x,Q(m)):ve(m)?(e.consume(m),x):R(m)}function B(m){return m===45||m===46||m===58||m===95||mt(m)?(e.consume(m),B):D(m)}function D(m){return m===61?(e.consume(m),T):se(m)?(l=D,Q(m)):ve(m)?(e.consume(m),D):x(m)}function T(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),o=m,C):se(m)?(l=T,Q(m)):ve(m)?(e.consume(m),T):(e.consume(m),L)}function C(m){return m===o?(e.consume(m),o=void 0,H):m===null?n(m):se(m)?(l=C,Q(m)):(e.consume(m),C)}function L(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||at(m)?x(m):(e.consume(m),L)}function H(m){return m===47||m===62||at(m)?x(m):n(m)}function R(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function Q(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),M}function M(m){return ve(m)?Ie(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):O(m)}function O(m){return e.enter("htmlTextData"),l(m)}}},Ri={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Lt(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,i,l=e.length,s=0;for(;l--;)if(n=e[l][1],r){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[l][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(o){if(e[l][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(r=l,n.type!=="labelLink")){s=2;break}}else n.type==="labelEnd"&&(o=l);const a={type:e[r][1].type==="labelLink"?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",a,t],["enter",c,t]],i=xt(i,e.slice(r+1,r+s+3)),i=xt(i,[["enter",u,t]]),i=xt(i,Qi(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=xt(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=xt(i,e.slice(o+1)),i=xt(i,[["exit",a,t]]),Lt(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,l=r.events.length;for(;l--;)if((r.events[l][1].type==="labelImage"||r.events[l][1].type==="labelLink")&&!r.events[l][1]._balanced){o=r.events[l][1];break}return function(A){return o?o._inactive?u(A):(i=r.parser.defined.includes(Rn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(A),e.exit("labelMarker"),e.exit("labelEnd"),s):n(A)};function s(A){return A===40?e.attempt($h,c,i?c:u)(A):A===91?e.attempt(Kh,c,i?a:u)(A):i?c(A):u(A)}function a(A){return e.attempt(Xh,c,u)(A)}function c(A){return t(A)}function u(A){return o._balanced=!0,n(A)}}},$h={tokenize:function(e,t,n){return function(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),r};function r(u){return at(u)?pr(e,o)(u):o(u)}function o(u){return u===41?c(u):Pc(e,i,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function i(u){return at(u)?pr(e,s)(u):c(u)}function l(u){return n(u)}function s(u){return u===34||u===39||u===40?Ic(e,a,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):c(u)}function a(u){return at(u)?pr(e,c)(u):c(u)}function c(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):n(u)}}},Kh={tokenize:function(e,t,n){const r=this;return function(l){return Dc.call(r,e,o,i,"reference","referenceMarker","referenceString")(l)};function o(l){return r.parser.defined.includes(Rn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function i(l){return n(l)}}},Xh={tokenize:function(e,t,n){return function(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),r};function r(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}},Jh={name:"labelStartImage",resolveAll:Ri.resolveAll,tokenize:function(e,t,n){const r=this;return function(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o};function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),i):n(l)}function i(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}},Zh={name:"labelStartLink",resolveAll:Ri.resolveAll,tokenize:function(e,t,n){const r=this;return function(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),o};function o(i){return i===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(i):t(i)}}},Fi={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ie(e,t,"linePrefix")}}},no={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(s){return e.enter("thematicBreak"),function(a){return r=a,i(a)}(s)};function i(s){return s===r?(e.enter("thematicBreakSequence"),l(s)):o>=3&&(s===null||se(s))?(e.exit("thematicBreak"),t(s)):n(s)}function l(s){return s===r?(e.consume(s),o++,l):(e.exit("thematicBreakSequence"),ve(s)?Ie(e,i,"whitespace")(s):i(s))}}},ct={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(to,function(i){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ie(e,t,"listItemIndent",r.containerState.size+1)(i)},function(i){return r.containerState.furtherBlankLines||!ve(i)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(i)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(tg,t,o)(i))});function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ie(e,e.attempt(ct,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return function(d){const f=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(f==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Oi(d)){if(r.containerState.type||(r.containerState.type=f,e.enter(f,{_container:!0})),f==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(no,n,a)(d):a(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(d)}return n(d)};function s(d){return Oi(d)&&++l<10?(e.consume(d),s):(!r.interrupt||l<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),a(d)):n(d)}function a(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(to,r.interrupt?n:c,e.attempt(eg,A,u))}function c(d){return r.containerState.initialBlankLine=!0,i++,A(d)}function u(d){return ve(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),A):n(d)}function A(d){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}},eg={partial:!0,tokenize:function(e,t,n){const r=this;return Ie(e,function(o){const i=r.events[r.events.length-1];return!ve(o)&&i&&i[1].type==="listItemPrefixWhitespace"?t(o):n(o)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},tg={partial:!0,tokenize:function(e,t,n){const r=this;return Ie(e,function(o){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(o):n(o)},"listItemIndent",r.containerState.size+1)}},Tc={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){n=i;break}e[i][1].type==="paragraph"&&(r=i)}else e[i][1].type==="content"&&e.splice(i,1),!o&&e[i][1].type==="definition"&&(o=i);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",l,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=l,e.push(["exit",l,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(s){let a,c=r.events.length;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){a=r.events[c][1].type==="paragraph";break}return r.parser.lazy[r.now().line]||!r.interrupt&&!a?n(s):(e.enter("setextHeadingLine"),o=s,function(u){return e.enter("setextHeadingLineSequence"),i(u)}(s))};function i(s){return s===o?(e.consume(s),i):(e.exit("setextHeadingLineSequence"),ve(s)?Ie(e,l,"lineSuffix")(s):l(s))}function l(s){return s===null||se(s)?(e.exit("setextHeadingLine"),t(s)):n(s)}}},ng={tokenize:function(e){const t=this,n=e.attempt(to,function(o){return o===null?void e.consume(o):(e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,Ie(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Rh,r)),"linePrefix")));return n;function r(o){if(o!==null)return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(o)}}},rg={resolveAll:Oc()},og=Mc("string"),ig=Mc("text");function Mc(e){return{resolveAll:Oc(e==="text"?lg:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,l);return i;function i(c){return a(c)?o(c):l(c)}function l(c){if(c!==null)return t.enter("data"),t.consume(c),s;t.consume(c)}function s(c){return a(c)?(t.exit("data"),o(c)):(t.consume(c),s)}function a(c){if(c===null)return!0;const u=r[c];let A=-1;if(u)for(;++A<u.length;){const d=u[A];if(!d.previous||d.previous.call(n,n.previous))return!0}return!1}}}}function Oc(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)r===void 0?t[o]&&t[o][1].type==="data"&&(r=o,o++):(!t[o]||t[o][1].type!=="data")&&(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function lg(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i,l=o.length,s=-1,a=0;for(;l--;){const c=o[l];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(c===-2)i=!0,a++;else if(c!==-1){l++;break}}if(a){const c={type:n===e.length||i||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?s:r.start._bufferIndex+s,_index:r.start._index+l,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const sg={42:ct,43:ct,45:ct,48:ct,49:ct,50:ct,51:ct,52:ct,53:ct,54:ct,55:ct,56:ct,57:ct,62:kc},ag={91:Hh},cg={[-2]:Ni,[-1]:Ni,32:Ni},ug={35:jh,42:no,45:[Tc,no],60:Wh,61:Tc,95:no,96:Sc,126:Sc},Ag={38:Ec,92:xc},dg={[-5]:Fi,[-4]:Fi,[-3]:Fi,33:Jh,38:Ec,42:Li,60:[Mh,Vh],91:Zh,92:[zh,xc],93:Ri,95:Li,96:Qh},fg={null:[Li,rg]},pg=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:ag,disable:{null:[]},document:sg,flow:ug,flowInitial:cg,insideSpan:fg,string:Ag,text:dg},Symbol.toStringTag,{value:"Module"}));function hg(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let l=[],s=[];const a={attempt:v(function(b,g){h(b,g.from)}),check:v(p),consume:function(b){se(b)?(r.line++,r.column=1,r.offset+=b===-3?2:1,w()):b!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=b},enter:function(b,g){const k=g||{};return k.type=b,k.start=d(),c.events.push(["enter",k,c]),s.push(k),k},exit:function(b){const g=s.pop();return g.end=d(),c.events.push(["exit",g,c]),g},interrupt:v(p,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(b){o[b.line]=b.column,w()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(b,g){return function(k,_){let E=-1;const P=[];let x;for(;++E<k.length;){const B=k[E];let D;if(typeof B=="string")D=B;else switch(B){case-5:D="\r";break;case-4:D=`
22
22
  `;break;case-3:D=`\r
23
- `;break;case-2:D=P?" ":" ";break;case-1:if(!P&&B)continue;D=" ";break;default:D=String.fromCharCode(T)}B=T===-2,k.push(D)}return k.join("")}(u(y),g)},sliceStream:u,write:function(y){return A=at(A,y),function(){let g;for(;r._index<A.length;){const _=A[r._index];if(typeof _=="string")for(g=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===g&&r._bufferIndex<_.length;)f(_.charCodeAt(r._bufferIndex));else f(_)}}(),A[A.length-1]!==null?[]:(p(t,0),l.events=Qo(i,l.events,l),l.events)}};let c=t.tokenize.call(l,a);return t.resolveAll&&i.push(t),l;function u(y){return function(g,_){const P=_.start._index,E=_.start._bufferIndex,k=_.end._index,B=_.end._bufferIndex;let T;if(P===k)T=[g[P].slice(E,B)];else{if(T=g.slice(P,k),E>-1){const D=T[0];typeof D=="string"?T[0]=D.slice(E):T.shift()}B>0&&T.push(g[k].slice(0,B))}return T}(A,y)}function d(){const{_bufferIndex:y,_index:g,line:_,column:P,offset:E}=r;return{_bufferIndex:y,_index:g,line:_,column:P,offset:E}}function f(y){c=c(y)}function h(y,g){g.restore()}function m(y,g){return function(_,P,E){let k,B,T,D;return Array.isArray(_)?O(_):"tokenize"in _?O([_]):function(L){return U;function U(x){const Q=x!==null&&L[x],w=x!==null&&L.null;return O([...Array.isArray(Q)?Q:Q?[Q]:[],...Array.isArray(w)?w:w?[w]:[]])(x)}}(_);function O(L){return k=L,B=0,L.length===0?E:S(L[B])}function S(L){return function(U){return D=function(){const x=d(),Q=l.previous,w=l.currentConstruct,V=l.events.length,b=Array.from(s);return{from:V,restore:F};function F(){r=x,l.previous=Q,l.currentConstruct=w,l.events.length=V,s=b,v()}}(),T=L,L.partial||(l.currentConstruct=L),L.name&&l.parser.constructs.disable.null.includes(L.name)?R():L.tokenize.call(g?Object.assign(Object.create(l),g):l,a,N,R)(U)}}function N(L){return y(T,D),P}function R(L){return D.restore(),++B<k.length?S(k[B]):E}}}function p(y,g){y.resolveAll&&!i.includes(y)&&i.push(y),y.resolve&&mt(l.events,g,l.events.length-g,y.resolve(l.events.slice(g),l)),y.resolveTo&&(l.events=y.resolveTo(l.events,l))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const Ws=/[\0\t\n\r]/g,Dd=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Bd(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),o=r===120||r===88;return Ds(n.slice(o?2:1),o?16:10)}return xo(n)||e}const Gs={}.hasOwnProperty;function xd(e,t,n){return typeof t!="string"&&(n=t,t=void 0),function(r){const o={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(xe),autolinkProtocol:S,autolinkEmail:S,atxHeading:a(ge),blockQuote:a(W),characterEscape:S,characterReference:S,codeFenced:a(he),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(he,l),codeText:a(se,l),codeTextData:S,data:S,codeFlowValue:S,definition:a(Ce),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(we),hardBreakEscape:a(ze),hardBreakTrailing:a(ze),htmlFlow:a(Ne,l),htmlFlowData:S,htmlText:a(Ne,l),htmlTextData:S,image:a(fn),label:l,link:a(xe),listItem:a(Be),listItemValue:m,listOrdered:a(ut,h),listUnordered:a(ut),paragraph:a(St),reference:ve,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(ge),strong:a(pn),thematicBreak:a(bt)},exit:{atxHeading:u(),atxHeadingSequence:B,autolink:u(),autolinkEmail:j,autolinkProtocol:st,blockQuote:u(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:Ve,characterReferenceMarkerNumeric:Ve,characterReferenceValue:Me,characterReference:Re,codeFenced:u(g),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:v,codeFlowValue:N,codeIndented:u(_),codeText:u(Q),codeTextData:N,data:N,definition:u(),definitionDestinationString:k,definitionLabelString:P,definitionTitleString:E,emphasis:u(),hardBreakEscape:u(L),hardBreakTrailing:u(L),htmlFlow:u(U),htmlFlowData:N,htmlText:u(x),htmlTextData:N,image:u(V),label:F,labelText:b,lineEnding:R,link:u(w),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ue,resourceDestinationString:J,resourceTitleString:K,resource:oe,setextHeading:u(O),setextHeadingLineSequence:D,setextHeadingText:T,strong:u(),thematicBreak:u()}};Ys(o,(r||{}).mdastExtensions||[]);const i={};return A;function A(I){let G={type:"root",children:[]};const Z={stack:[G],tokenStack:[],config:o,enter:c,exit:d,buffer:l,resume:f,data:i},$=[];let le=-1;for(;++le<I.length;)(I[le][1].type==="listOrdered"||I[le][1].type==="listUnordered")&&(I[le][0]==="enter"?$.push(le):le=s(I,$.pop(),le));for(le=-1;++le<I.length;){const de=o[I[le][0]];Gs.call(de,I[le][1].type)&&de[I[le][1].type].call(Object.assign({sliceSerialize:I[le][2].sliceSerialize},Z),I[le][1])}if(Z.tokenStack.length>0){const de=Z.tokenStack[Z.tokenStack.length-1];(de[1]||$s).call(Z,void 0,de[0])}for(G.position={start:Lt(I.length>0?I[0][1].start:{line:1,column:1,offset:0}),end:Lt(I.length>0?I[I.length-2][1].end:{line:1,column:1,offset:0})},le=-1;++le<o.transforms.length;)G=o.transforms[le](G)||G;return G}function s(I,G,Z){let $,le,de,nt,ke=G-1,me=-1,je=!1;for(;++ke<=Z;){const fe=I[ke];switch(fe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":fe[0]==="enter"?me++:me--,nt=void 0;break;case"lineEndingBlank":fe[0]==="enter"&&($&&!nt&&!me&&!de&&(de=ke),nt=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:nt=void 0}if(!me&&fe[0]==="enter"&&fe[1].type==="listItemPrefix"||me===-1&&fe[0]==="exit"&&(fe[1].type==="listUnordered"||fe[1].type==="listOrdered")){if($){let be=ke;for(le=void 0;be--;){const qe=I[be];if(qe[1].type==="lineEnding"||qe[1].type==="lineEndingBlank"){if(qe[0]==="exit")continue;le&&(I[le][1].type="lineEndingBlank",je=!0),qe[1].type="lineEnding",le=be}else if(qe[1].type!=="linePrefix"&&qe[1].type!=="blockQuotePrefix"&&qe[1].type!=="blockQuotePrefixWhitespace"&&qe[1].type!=="blockQuoteMarker"&&qe[1].type!=="listItemIndent")break}de&&(!le||de<le)&&($._spread=!0),$.end=Object.assign({},le?I[le][1].start:fe[1].end),I.splice(le||ke,0,["exit",$,fe[2]]),ke++,Z++}if(fe[1].type==="listItemPrefix"){const be={type:"listItem",_spread:!1,start:Object.assign({},fe[1].start),end:void 0};$=be,I.splice(ke,0,["enter",be,fe[2]]),ke++,Z++,de=void 0,nt=!0}}}return I[G][1]._spread=je,Z}function a(I,G){return Z;function Z($){c.call(this,I($),$),G&&G.call(this,$)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(I,G,Z){this.stack[this.stack.length-1].children.push(I),this.stack.push(I),this.tokenStack.push([G,Z||void 0]),I.position={start:Lt(G.start),end:void 0}}function u(I){return G;function G(Z){I&&I.call(this,Z),d.call(this,Z)}}function d(I,G){const Z=this.stack.pop(),$=this.tokenStack.pop();if(!$)throw new Error("Cannot close `"+I.type+"` ("+Mn({start:I.start,end:I.end})+"): itโ€™s not open");$[0].type!==I.type&&(G?G.call(this,I,$[0]):($[1]||$s).call(this,I,$[0])),Z.position.end=Lt(I.end)}function f(){return function(I){return Ps(I,typeof pr.includeImageAlt!="boolean"||pr.includeImageAlt,typeof pr.includeHtml!="boolean"||pr.includeHtml)}(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function m(I){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(I),10),this.data.expectingFirstListItemValue=void 0)}function p(){const I=this.resume();this.stack[this.stack.length-1].lang=I}function v(){const I=this.resume();this.stack[this.stack.length-1].meta=I}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const I=this.resume();this.stack[this.stack.length-1].value=I.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const I=this.resume();this.stack[this.stack.length-1].value=I.replace(/(\r?\n|\r)$/g,"")}function P(I){const G=this.resume(),Z=this.stack[this.stack.length-1];Z.label=G,Z.identifier=ln(this.sliceSerialize(I)).toLowerCase()}function E(){const I=this.resume();this.stack[this.stack.length-1].title=I}function k(){const I=this.resume();this.stack[this.stack.length-1].url=I}function B(I){const G=this.stack[this.stack.length-1];if(!G.depth){const Z=this.sliceSerialize(I).length;G.depth=Z}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function D(I){this.stack[this.stack.length-1].depth=this.sliceSerialize(I).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function S(I){const G=this.stack[this.stack.length-1].children;let Z=G[G.length-1];(!Z||Z.type!=="text")&&(Z=hn(),Z.position={start:Lt(I.start),end:void 0},G.push(Z)),this.stack.push(Z)}function N(I){const G=this.stack.pop();G.value+=this.sliceSerialize(I),G.position.end=Lt(I.end)}function R(I){const G=this.stack[this.stack.length-1];if(this.data.atHardBreak)return G.children[G.children.length-1].position.end=Lt(I.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&o.canContainEols.includes(G.type)&&(S.call(this,I),N.call(this,I))}function L(){this.data.atHardBreak=!0}function U(){const I=this.resume();this.stack[this.stack.length-1].value=I}function x(){const I=this.resume();this.stack[this.stack.length-1].value=I}function Q(){const I=this.resume();this.stack[this.stack.length-1].value=I}function w(){const I=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";I.type+="Reference",I.referenceType=G,delete I.url,delete I.title}else delete I.identifier,delete I.label;this.data.referenceType=void 0}function V(){const I=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";I.type+="Reference",I.referenceType=G,delete I.url,delete I.title}else delete I.identifier,delete I.label;this.data.referenceType=void 0}function b(I){const G=this.sliceSerialize(I),Z=this.stack[this.stack.length-2];Z.label=function($){return $.replace(Dd,Bd)}(G),Z.identifier=ln(G).toLowerCase()}function F(){const I=this.stack[this.stack.length-1],G=this.resume(),Z=this.stack[this.stack.length-1];if(this.data.inReference=!0,Z.type==="link"){const $=I.children;Z.children=$}else Z.alt=G}function J(){const I=this.resume();this.stack[this.stack.length-1].url=I}function K(){const I=this.resume();this.stack[this.stack.length-1].title=I}function oe(){this.data.inReference=void 0}function ve(){this.data.referenceType="collapsed"}function ue(I){const G=this.resume(),Z=this.stack[this.stack.length-1];Z.label=G,Z.identifier=ln(this.sliceSerialize(I)).toLowerCase(),this.data.referenceType="full"}function Ve(I){this.data.characterReferenceType=I.type}function Me(I){const G=this.sliceSerialize(I),Z=this.data.characterReferenceType;let $;Z?($=Ds(G,Z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$=xo(G),this.stack[this.stack.length-1].value+=$}function Re(I){this.stack.pop().position.end=Lt(I.end)}function st(I){N.call(this,I),this.stack[this.stack.length-1].url=this.sliceSerialize(I)}function j(I){N.call(this,I),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(I)}function W(){return{type:"blockquote",children:[]}}function he(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function Ce(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function ge(){return{type:"heading",depth:0,children:[]}}function ze(){return{type:"break"}}function Ne(){return{type:"html",value:""}}function fn(){return{type:"image",title:null,url:"",alt:null}}function xe(){return{type:"link",title:null,url:"",children:[]}}function ut(I){return{type:"list",ordered:I.type==="listOrdered",start:null,spread:I._spread,children:[]}}function Be(I){return{type:"listItem",spread:I._spread,checked:null,children:[]}}function St(){return{type:"paragraph",children:[]}}function pn(){return{type:"strong",children:[]}}function hn(){return{type:"text",value:""}}function bt(){return{type:"thematicBreak"}}}(n)(function(r){for(;!Ls(r););return r}(function(r){const o={constructs:Ou([kd,...(r||{}).extensions||[]]),content:i(ju),defined:[],document:i(qu),flow:i(pd),lazy:{},string:i(gd),text:i(md)};return o;function i(A){return function(s){return Sd(o,A,s)}}}(n).document().write(function(){let r,o=1,i="",A=!0;return function(s,a,l){const c=[];let u,d,f,h,m;for(s=i+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),f=0,i="",A&&(s.charCodeAt(0)===65279&&f++,A=void 0);f<s.length;){if(Ws.lastIndex=f,u=Ws.exec(s),h=u&&u.index!==void 0?u.index:s.length,m=s.charCodeAt(h),!u){i=s.slice(f);break}if(m===10&&f===h&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<h&&(c.push(s.slice(f,h)),o+=h-f),m){case 0:c.push(65533),o++;break;case 9:for(d=4*Math.ceil(o/4),c.push(-2);o++<d;)c.push(-1);break;case 10:c.push(-4),o=1;break;default:r=!0,o=1}f=h+1}return l&&(r&&c.push(-5),i&&c.push(i),c.push(null)),c}}()(e,t,!0))))}function Lt(e){return{line:e.line,column:e.column,offset:e.offset}}function Ys(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ys(e,r):Id(e,r)}}function Id(e,t){let n;for(n in t)if(Gs.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function $s(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Mn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Mn({start:t.start,end:t.end})+") is still open")}function Td(e){const t=this;t.parser=function(n){return xd(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Vs(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const A=o[o.length-1];return A&&A.type==="text"?A.value+=r:o.push({type:"text",value:r}),o}function Ks(e){return e.spread??e.children.length>1}function Qd(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Xs(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Xs(t.slice(o),o>0,!1)),i.join("")}function Xs(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===9||i===32;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===9||i===32;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const Md={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
23
+ `;break;case-2:D=_?" ":" ";break;case-1:if(!_&&x)continue;D=" ";break;default:D=String.fromCharCode(B)}x=B===-2,P.push(D)}return P.join("")}(A(b),g)},sliceStream:A,write:function(b){return l=xt(l,b),function(){let g;for(;r._index<l.length;){const k=l[r._index];if(typeof k=="string")for(g=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===g&&r._bufferIndex<k.length;)f(k.charCodeAt(r._bufferIndex));else f(k)}}(),l[l.length-1]!==null?[]:(h(t,0),c.events=Qi(i,c.events,c),c.events)}};let u=t.tokenize.call(c,a);return t.resolveAll&&i.push(t),c;function A(b){return function(g,k){const _=k.start._index,E=k.start._bufferIndex,P=k.end._index,x=k.end._bufferIndex;let B;if(_===P)B=[g[_].slice(E,x)];else{if(B=g.slice(_,P),E>-1){const D=B[0];typeof D=="string"?B[0]=D.slice(E):B.shift()}x>0&&B.push(g[P].slice(0,x))}return B}(l,b)}function d(){const{_bufferIndex:b,_index:g,line:k,column:_,offset:E}=r;return{_bufferIndex:b,_index:g,line:k,column:_,offset:E}}function f(b){u=u(b)}function p(b,g){g.restore()}function v(b,g){return function(k,_,E){let P,x,B,D;return Array.isArray(k)?T(k):"tokenize"in k?T([k]):function(R){return Q;function Q(M){const O=M!==null&&R[M],m=M!==null&&R.null;return T([...Array.isArray(O)?O:O?[O]:[],...Array.isArray(m)?m:m?[m]:[]])(M)}}(k);function T(R){return P=R,x=0,R.length===0?E:C(R[x])}function C(R){return function(Q){return D=function(){const M=d(),O=c.previous,m=c.currentConstruct,G=c.events.length,y=Array.from(s);return{from:G,restore:q};function q(){r=M,c.previous=O,c.currentConstruct=m,c.events.length=G,s=y,w()}}(),B=R,R.partial||(c.currentConstruct=R),R.name&&c.parser.constructs.disable.null.includes(R.name)?H():R.tokenize.call(g?Object.assign(Object.create(c),g):c,a,L,H)(Q)}}function L(R){return b(B,D),_}function H(R){return D.restore(),++x<P.length?C(P[x]):E}}}function h(b,g){b.resolveAll&&!i.includes(b)&&i.push(b),b.resolve&&Lt(c.events,g,c.events.length-g,b.resolve(c.events.slice(g),c)),b.resolveTo&&(c.events=b.resolveTo(c.events,c))}function w(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const Qc=/[\0\t\n\r]/g,gg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mg(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),o=r===120||r===88;return yc(n.slice(o?2:1),o?16:10)}return Ti(n)||e}const Lc={}.hasOwnProperty;function yg(e,t,n){return typeof t!="string"&&(n=t,t=void 0),function(r){const o={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(dt),autolinkProtocol:C,autolinkEmail:C,atxHeading:a(Le),blockQuote:a(we),characterEscape:C,characterReference:C,codeFenced:a(ae),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(ae,c),codeText:a(_e,c),codeTextData:C,data:C,codeFlowValue:C,definition:a(xe),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(ke),hardBreakEscape:a(ze),hardBreakTrailing:a(ze),htmlFlow:a(zt,c),htmlFlowData:C,htmlText:a(zt,c),htmlTextData:C,image:a(He),label:c,link:a(dt),listItem:a(It),listItemValue:v,listOrdered:a(Pe,p),listUnordered:a(Pe),paragraph:a(an),reference:Oe,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a(Le),strong:a(cn),thematicBreak:a(ft)},exit:{atxHeading:A(),atxHeadingSequence:x,autolink:A(),autolinkEmail:$,autolinkProtocol:Y,blockQuote:A(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:st,characterReferenceMarkerNumeric:st,characterReferenceValue:Ue,characterReference:Ve,codeFenced:A(g),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:w,codeFlowValue:L,codeIndented:A(k),codeText:A(O),codeTextData:L,data:L,definition:A(),definitionDestinationString:P,definitionLabelString:_,definitionTitleString:E,emphasis:A(),hardBreakEscape:A(R),hardBreakTrailing:A(R),htmlFlow:A(Q),htmlFlowData:L,htmlText:A(M),htmlTextData:L,image:A(G),label:q,labelText:y,lineEnding:H,link:A(m),listItem:A(),listOrdered:A(),listUnordered:A(),paragraph:A(),referenceString:ye,resourceDestinationString:re,resourceTitleString:Z,resource:ce,setextHeading:A(T),setextHeadingLineSequence:D,setextHeadingText:B,strong:A(),thematicBreak:A()}};Nc(o,(r||{}).mdastExtensions||[]);const i={};return l;function l(S){let U={type:"root",children:[]};const F={stack:[U],tokenStack:[],config:o,enter:u,exit:d,buffer:c,resume:f,data:i},K=[];let W=-1;for(;++W<S.length;)(S[W][1].type==="listOrdered"||S[W][1].type==="listUnordered")&&(S[W][0]==="enter"?K.push(W):W=s(S,K.pop(),W));for(W=-1;++W<S.length;){const be=o[S[W][0]];Lc.call(be,S[W][1].type)&&be[S[W][1].type].call(Object.assign({sliceSerialize:S[W][2].sliceSerialize},F),S[W][1])}if(F.tokenStack.length>0){const be=F.tokenStack[F.tokenStack.length-1];(be[1]||Rc).call(F,void 0,be[0])}for(U.position={start:on(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:on(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},W=-1;++W<o.transforms.length;)U=o.transforms[W](U)||U;return U}function s(S,U,F){let K,W,be,Se,fe=U-1,Te=-1,Ne=!1;for(;++fe<=F;){const ie=S[fe];switch(ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":ie[0]==="enter"?Te++:Te--,Se=void 0;break;case"lineEndingBlank":ie[0]==="enter"&&(K&&!Se&&!Te&&!be&&(be=fe),Se=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Se=void 0}if(!Te&&ie[0]==="enter"&&ie[1].type==="listItemPrefix"||Te===-1&&ie[0]==="exit"&&(ie[1].type==="listUnordered"||ie[1].type==="listOrdered")){if(K){let je=fe;for(W=void 0;je--;){const Qe=S[je];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;W&&(S[W][1].type="lineEndingBlank",Ne=!0),Qe[1].type="lineEnding",W=je}else if(Qe[1].type!=="linePrefix"&&Qe[1].type!=="blockQuotePrefix"&&Qe[1].type!=="blockQuotePrefixWhitespace"&&Qe[1].type!=="blockQuoteMarker"&&Qe[1].type!=="listItemIndent")break}be&&(!W||be<W)&&(K._spread=!0),K.end=Object.assign({},W?S[W][1].start:ie[1].end),S.splice(W||fe,0,["exit",K,ie[2]]),fe++,F++}if(ie[1].type==="listItemPrefix"){const je={type:"listItem",_spread:!1,start:Object.assign({},ie[1].start),end:void 0};K=je,S.splice(fe,0,["enter",je,ie[2]]),fe++,F++,be=void 0,Se=!0}}}return S[U][1]._spread=Ne,F}function a(S,U){return F;function F(K){u.call(this,S(K),K),U&&U.call(this,K)}}function c(){this.stack.push({type:"fragment",children:[]})}function u(S,U,F){this.stack[this.stack.length-1].children.push(S),this.stack.push(S),this.tokenStack.push([U,F||void 0]),S.position={start:on(U.start),end:void 0}}function A(S){return U;function U(F){S&&S.call(this,F),d.call(this,F)}}function d(S,U){const F=this.stack.pop(),K=this.tokenStack.pop();if(!K)throw new Error("Cannot close `"+S.type+"` ("+Ar({start:S.start,end:S.end})+"): itโ€™s not open");K[0].type!==S.type&&(U?U.call(this,S,K[0]):(K[1]||Rc).call(this,S,K[0])),F.position.end=on(S.end)}function f(){return function(S){return pc(S,typeof eo.includeImageAlt!="boolean"||eo.includeImageAlt,typeof eo.includeHtml!="boolean"||eo.includeHtml)}(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function v(S){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(S),10),this.data.expectingFirstListItemValue=void 0)}function h(){const S=this.resume();this.stack[this.stack.length-1].lang=S}function w(){const S=this.resume();this.stack[this.stack.length-1].meta=S}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const S=this.resume();this.stack[this.stack.length-1].value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const S=this.resume();this.stack[this.stack.length-1].value=S.replace(/(\r?\n|\r)$/g,"")}function _(S){const U=this.resume(),F=this.stack[this.stack.length-1];F.label=U,F.identifier=Rn(this.sliceSerialize(S)).toLowerCase()}function E(){const S=this.resume();this.stack[this.stack.length-1].title=S}function P(){const S=this.resume();this.stack[this.stack.length-1].url=S}function x(S){const U=this.stack[this.stack.length-1];if(!U.depth){const F=this.sliceSerialize(S).length;U.depth=F}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function D(S){this.stack[this.stack.length-1].depth=this.sliceSerialize(S).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function C(S){const U=this.stack[this.stack.length-1].children;let F=U[U.length-1];(!F||F.type!=="text")&&(F=St(),F.position={start:on(S.start),end:void 0},U.push(F)),this.stack.push(F)}function L(S){const U=this.stack.pop();U.value+=this.sliceSerialize(S),U.position.end=on(S.end)}function H(S){const U=this.stack[this.stack.length-1];if(this.data.atHardBreak)return U.children[U.children.length-1].position.end=on(S.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&o.canContainEols.includes(U.type)&&(C.call(this,S),L.call(this,S))}function R(){this.data.atHardBreak=!0}function Q(){const S=this.resume();this.stack[this.stack.length-1].value=S}function M(){const S=this.resume();this.stack[this.stack.length-1].value=S}function O(){const S=this.resume();this.stack[this.stack.length-1].value=S}function m(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const U=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=U,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function G(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const U=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=U,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function y(S){const U=this.sliceSerialize(S),F=this.stack[this.stack.length-2];F.label=function(K){return K.replace(gg,mg)}(U),F.identifier=Rn(U).toLowerCase()}function q(){const S=this.stack[this.stack.length-1],U=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const K=S.children;F.children=K}else F.alt=U}function re(){const S=this.resume();this.stack[this.stack.length-1].url=S}function Z(){const S=this.resume();this.stack[this.stack.length-1].title=S}function ce(){this.data.inReference=void 0}function Oe(){this.data.referenceType="collapsed"}function ye(S){const U=this.resume(),F=this.stack[this.stack.length-1];F.label=U,F.identifier=Rn(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function st(S){this.data.characterReferenceType=S.type}function Ue(S){const U=this.sliceSerialize(S),F=this.data.characterReferenceType;let K;F?(K=yc(U,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):K=Ti(U),this.stack[this.stack.length-1].value+=K}function Ve(S){this.stack.pop().position.end=on(S.end)}function Y(S){L.call(this,S),this.stack[this.stack.length-1].url=this.sliceSerialize(S)}function $(S){L.call(this,S),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(S)}function we(){return{type:"blockquote",children:[]}}function ae(){return{type:"code",lang:null,meta:null,value:""}}function _e(){return{type:"inlineCode",value:""}}function xe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ke(){return{type:"emphasis",children:[]}}function Le(){return{type:"heading",depth:0,children:[]}}function ze(){return{type:"break"}}function zt(){return{type:"html",value:""}}function He(){return{type:"image",title:null,url:"",alt:null}}function dt(){return{type:"link",title:null,url:"",children:[]}}function Pe(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function It(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function an(){return{type:"paragraph",children:[]}}function cn(){return{type:"strong",children:[]}}function St(){return{type:"text",value:""}}function ft(){return{type:"thematicBreak"}}}(n)(function(r){for(;!Cc(r););return r}(function(r){const o={constructs:xh([pg,...(r||{}).extensions||[]]),content:i(Bh),defined:[],document:i(Th),flow:i(ng),lazy:{},string:i(og),text:i(ig)};return o;function i(l){return function(s){return hg(o,l,s)}}}(n).document().write(function(){let r,o=1,i="",l=!0;return function(s,a,c){const u=[];let A,d,f,p,v;for(s=i+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),f=0,i="",l&&(s.charCodeAt(0)===65279&&f++,l=void 0);f<s.length;){if(Qc.lastIndex=f,A=Qc.exec(s),p=A&&A.index!==void 0?A.index:s.length,v=s.charCodeAt(p),!A){i=s.slice(f);break}if(v===10&&f===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<p&&(u.push(s.slice(f,p)),o+=p-f),v){case 0:u.push(65533),o++;break;case 9:for(d=4*Math.ceil(o/4),u.push(-2);o++<d;)u.push(-1);break;case 10:u.push(-4),o=1;break;default:r=!0,o=1}f=p+1}return c&&(r&&u.push(-5),i&&u.push(i),u.push(null)),u}}()(e,t,!0))))}function on(e){return{line:e.line,column:e.column,offset:e.offset}}function Nc(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Nc(e,r):vg(e,r)}}function vg(e,t){let n;for(n in t)if(Lc.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Rc(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ar({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ar({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ar({start:t.start,end:t.end})+") is still open")}function wg(e){const t=this;t.parser=function(n){return yg(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Fc(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}function Hc(e){return e.spread??e.children.length>1}function bg(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Uc(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Uc(t.slice(o),o>0,!1)),i.join("")}function Uc(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===9||i===32;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===9||i===32;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const kg={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
24
24
  `}]},code:function(e,t){const n=t.value?t.value+`
25
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=cn(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let A,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),A=e.footnoteOrder.length):A=i+1,s+=1,e.footnoteCounts.set(r,s);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(A)}]};e.patch(t,a);const l={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,l),e.applyData(t,l)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vs(e,t);const o={src:cn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:cn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vs(e,t);const o={href:cn(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:cn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(c){let u=!1;if(c.type==="list"){u=c.spread||!1;const d=c.children;let f=-1;for(;!u&&++f<d.length;)u=Ks(d[f])}return u}(n):Ks(t),i={},A=[];if(typeof t.checked=="boolean"){const c=r[0];let u;c&&c.type==="element"&&c.tagName==="p"?u=c:(u={type:"element",tagName:"p",properties:{},children:[]},r.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(o||s!==0||c.type!=="element"||c.tagName!=="p")&&A.push({type:"text",value:`
26
- `}),c.type!=="element"||c.tagName!=="p"||o?A.push(c):A.push(...c.children)}const a=r[r.length-1];a&&(o||a.type!=="element"||a.tagName!=="p")&&A.push({type:"text",value:`
27
- `});const l={type:"element",tagName:"li",properties:i,children:A};return e.patch(t,l),e.applyData(t,l)},list:function(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const A=r[o];if(A.type==="element"&&A.tagName==="li"&&A.properties&&Array.isArray(A.properties.className)&&A.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const A={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],A),o.push(A)}if(n.length>0){const A={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Po(t.children[1]),a=gs(t.children[t.children.length-1]);s&&a&&(A.position={start:s,end:a}),o.push(A)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",i=n&&n.type==="table"?n.align:void 0,A=i?i.length:t.children.length;let s=-1;const a=[];for(;++s<A;){const c=t.children[s],u={},d=i?i[s]:void 0;d&&(u.align=d);let f={type:"element",tagName:o,properties:u,children:[]};c&&(f.children=e.all(c),e.patch(c,f),f=e.applyData(c,f)),a.push(f)}const l={type:"element",tagName:"tr",properties:{},children:e.wrap(a,!0)};return e.patch(t,l),e.applyData(t,l)},text:function(e,t){const n={type:"text",value:Qd(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:mr,yaml:mr,definition:mr,footnoteDefinition:mr};function mr(){}const Js=typeof self=="object"?self:globalThis,Zs=e=>((t,n)=>{const r=(i,A)=>(t.set(A,i),i),o=i=>{if(t.has(i))return t.get(i);const[A,s]=n[i];switch(A){case 0:case-1:return r(s,i);case 1:{const a=r([],i);for(const l of s)a.push(o(l));return a}case 2:{const a=r({},i);for(const[l,c]of s)a[o(l)]=o(c);return a}case 3:return r(new Date(s),i);case 4:{const{source:a,flags:l}=s;return r(new RegExp(a,l),i)}case 5:{const a=r(new Map,i);for(const[l,c]of s)a.set(o(l),o(c));return a}case 6:{const a=r(new Set,i);for(const l of s)a.add(o(l));return a}case 7:{const{name:a,message:l}=s;return r(new Js[a](l),i)}case 8:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:a}=new Uint8Array(s);return r(new DataView(a),s)}}return r(new Js[A](s),i)};return o})(new Map,e)(0),un="",{toString:Od}={},{keys:Nd}=Object,Rn=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const n=Od.call(e).slice(8,-1);switch(n){case"Array":return[1,un];case"Object":return[2,un];case"Date":return[3,un];case"RegExp":return[4,un];case"Map":return[5,un];case"Set":return[6,un];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},yr=([e,t])=>e===0&&(t==="function"||t==="symbol"),eA=(e,{json:t,lossy:n}={})=>{const r=[];return((o,i,A,s)=>{const a=(c,u)=>{const d=s.push(c)-1;return A.set(u,d),d},l=c=>{if(A.has(c))return A.get(c);let[u,d]=Rn(c);switch(u){case 0:{let h=c;switch(d){case"bigint":u=8,h=c.toString();break;case"function":case"symbol":if(o)throw new TypeError("unable to serialize "+d);h=null;break;case"undefined":return a([-1],c)}return a([u,h],c)}case 1:{if(d){let p=c;return d==="DataView"?p=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(p=new Uint8Array(c)),a([d,[...p]],c)}const h=[],m=a([u,h],c);for(const p of c)h.push(l(p));return m}case 2:{if(d)switch(d){case"BigInt":return a([d,c.toString()],c);case"Boolean":case"Number":case"String":return a([d,c.valueOf()],c)}if(i&&"toJSON"in c)return l(c.toJSON());const h=[],m=a([u,h],c);for(const p of Nd(c))(o||!yr(Rn(c[p])))&&h.push([l(p),l(c[p])]);return m}case 3:return a([u,c.toISOString()],c);case 4:{const{source:h,flags:m}=c;return a([u,{source:h,flags:m}],c)}case 5:{const h=[],m=a([u,h],c);for(const[p,v]of c)(o||!yr(Rn(p))&&!yr(Rn(v)))&&h.push([l(p),l(v)]);return m}case 6:{const h=[],m=a([u,h],c);for(const p of c)(o||!yr(Rn(p)))&&h.push(l(p));return m}}const{message:f}=c;return a([u,{name:d,message:f}],c)};return l})(!(t||n),!!t,new Map,r)(e),r},vr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Zs(eA(e,t)):structuredClone(e):(e,t)=>Zs(eA(e,t));function Ld(e,t){const n=[{type:"text",value:"โ†ฉ"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Rd(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const tA=function(e){if(e==null)return Hd;if(typeof e=="function")return wr(e);if(typeof e=="object")return Array.isArray(e)?function(t){const n=[];let r=-1;for(;++r<t.length;)n[r]=tA(t[r]);return wr(o);function o(...i){let A=-1;for(;++A<n.length;)if(n[A].apply(this,i))return!0;return!1}}(e):function(t){const n=t;return wr(r);function r(o){const i=o;let A;for(A in t)if(i[A]!==n[A])return!1;return!0}}(e);if(typeof e=="string")return function(t){return wr(n);function n(r){return r&&r.type===t}}(e);throw new Error("Expected function, string, or object as test")};function wr(e){return function(t,n,r){return!(!function(o){return o!==null&&typeof o=="object"&&"type"in o}(t)||!e.call(this,t,typeof n=="number"?n:void 0,r||void 0))}}function Hd(){return!0}const nA=[],Ud=!0,rA=!1;function Fd(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=tA(o),A=r?-1:1;(function s(a,l,c){const u=a&&typeof a=="object"?a:{};if(typeof u.type=="string"){const f=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(d,"name",{value:"node ("+a.type+(f?"<"+f+">":"")+")"})}return d;function d(){let f,h,m,p=nA;if((!t||i(a,l,c[c.length-1]||void 0))&&(p=function(v){return Array.isArray(v)?v:typeof v=="number"?[Ud,v]:v==null?nA:[v]}(n(a,c)),p[0]===rA))return p;if("children"in a&&a.children){const v=a;if(v.children&&p[0]!=="skip")for(h=(r?v.children.length:-1)+A,m=c.concat(v);h>-1&&h<v.children.length;){const y=v.children[h];if(f=s(y,h,m)(),f[0]===rA)return f;h=typeof f[1]=="number"?f[1]:h+A}}return p}})(e,void 0,[])()}function oA(e,t,n,r){let o,i,A;typeof t=="function"?(i=void 0,A=t,o=n):(i=t,A=n,o=r),Fd(e,i,function(s,a){const l=a[a.length-1],c=l?l.children.indexOf(s):void 0;return A(s,c,l)},o)}const Ro={}.hasOwnProperty,zd={};function jd(e,t){const n=t||zd,r=new Map,o=new Map,i=new Map,A={...Md,...n.handlers},s={all:function(a){const l=[];if("children"in a){const c=a.children;let u=-1;for(;++u<c.length;){const d=s.one(c[u],a);if(d){if(u&&c[u-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=iA(d.value)),!Array.isArray(d)&&d.type==="element")){const f=d.children[0];f&&f.type==="text"&&(f.value=iA(f.value))}Array.isArray(d)?l.push(...d):l.push(d)}}}return l},applyData:Wd,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:A,one:function(a,l){const c=a.type,u=s.handlers[c];if(Ro.call(s.handlers,c)&&u)return u(s,a,l);if(s.options.passThrough&&s.options.passThrough.includes(c)){if("children"in a){const{children:d,...f}=a,h=vr(f);return h.children=s.all(a),h}return vr(a)}return(s.options.unknownHandler||Gd)(s,a,l)},options:n,patch:qd,wrap:Yd};return oA(e,function(a){if(a.type==="definition"||a.type==="footnoteDefinition"){const l=a.type==="definition"?r:o,c=String(a.identifier).toUpperCase();l.has(c)||l.set(c,a)}}),s}function qd(e,t){e.position&&(t.position=function(n){const r=Po(n),o=gs(n);if(r&&o)return{start:r,end:o}}(e))}function Wd(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:"children"in n?n.children:[n]}),n.type==="element"&&i&&Object.assign(n.properties,vr(i)),"children"in n&&n.children&&o!=null&&(n.children=o)}return n}function Gd(e,t){const n=t.data||{},r=!("value"in t)||Ro.call(n,"hProperties")||Ro.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Yd(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
25
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Fn(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let l,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=i+1,s+=1,e.footnoteCounts.set(r,s);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,a);const c={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Fc(e,t);const o={src:Fn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:Fn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Fc(e,t);const o={href:Fn(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:Fn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(u){let A=!1;if(u.type==="list"){A=u.spread||!1;const d=u.children;let f=-1;for(;!A&&++f<d.length;)A=Hc(d[f])}return A}(n):Hc(t),i={},l=[];if(typeof t.checked=="boolean"){const u=r[0];let A;u&&u.type==="element"&&u.tagName==="p"?A=u:(A={type:"element",tagName:"p",properties:{},children:[]},r.unshift(A)),A.children.length>0&&A.children.unshift({type:"text",value:" "}),A.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(o||s!==0||u.type!=="element"||u.tagName!=="p")&&l.push({type:"text",value:`
26
+ `}),u.type!=="element"||u.tagName!=="p"||o?l.push(u):l.push(...u.children)}const a=r[r.length-1];a&&(o||a.type!=="element"||a.tagName!=="p")&&l.push({type:"text",value:`
27
+ `});const c={type:"element",tagName:"li",properties:i,children:l};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const l=r[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Si(t.children[1]),a=lc(t.children[t.children.length-1]);s&&a&&(l.position={start:s,end:a}),o.push(l)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",i=n&&n.type==="table"?n.align:void 0,l=i?i.length:t.children.length;let s=-1;const a=[];for(;++s<l;){const u=t.children[s],A={},d=i?i[s]:void 0;d&&(A.align=d);let f={type:"element",tagName:o,properties:A,children:[]};u&&(f.children=e.all(u),e.patch(u,f),f=e.applyData(u,f)),a.push(f)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(a,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:bg(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:ro,yaml:ro,definition:ro,footnoteDefinition:ro};function ro(){}const zc=typeof self=="object"?self:globalThis,jc=e=>((t,n)=>{const r=(i,l)=>(t.set(l,i),i),o=i=>{if(t.has(i))return t.get(i);const[l,s]=n[i];switch(l){case 0:case-1:return r(s,i);case 1:{const a=r([],i);for(const c of s)a.push(o(c));return a}case 2:{const a=r({},i);for(const[c,u]of s)a[o(c)]=o(u);return a}case 3:return r(new Date(s),i);case 4:{const{source:a,flags:c}=s;return r(new RegExp(a,c),i)}case 5:{const a=r(new Map,i);for(const[c,u]of s)a.set(o(c),o(u));return a}case 6:{const a=r(new Set,i);for(const c of s)a.add(o(c));return a}case 7:{const{name:a,message:c}=s;return r(new zc[a](c),i)}case 8:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:a}=new Uint8Array(s);return r(new DataView(a),s)}}return r(new zc[l](s),i)};return o})(new Map,e)(0),Hn="",{toString:xg}={},{keys:Eg}=Object,hr=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const n=xg.call(e).slice(8,-1);switch(n){case"Array":return[1,Hn];case"Object":return[2,Hn];case"Date":return[3,Hn];case"RegExp":return[4,Hn];case"Map":return[5,Hn];case"Set":return[6,Hn];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},oo=([e,t])=>e===0&&(t==="function"||t==="symbol"),qc=(e,{json:t,lossy:n}={})=>{const r=[];return((o,i,l,s)=>{const a=(u,A)=>{const d=s.push(u)-1;return l.set(A,d),d},c=u=>{if(l.has(u))return l.get(u);let[A,d]=hr(u);switch(A){case 0:{let p=u;switch(d){case"bigint":A=8,p=u.toString();break;case"function":case"symbol":if(o)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return a([-1],u)}return a([A,p],u)}case 1:{if(d){let h=u;return d==="DataView"?h=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(h=new Uint8Array(u)),a([d,[...h]],u)}const p=[],v=a([A,p],u);for(const h of u)p.push(c(h));return v}case 2:{if(d)switch(d){case"BigInt":return a([d,u.toString()],u);case"Boolean":case"Number":case"String":return a([d,u.valueOf()],u)}if(i&&"toJSON"in u)return c(u.toJSON());const p=[],v=a([A,p],u);for(const h of Eg(u))(o||!oo(hr(u[h])))&&p.push([c(h),c(u[h])]);return v}case 3:return a([A,u.toISOString()],u);case 4:{const{source:p,flags:v}=u;return a([A,{source:p,flags:v}],u)}case 5:{const p=[],v=a([A,p],u);for(const[h,w]of u)(o||!oo(hr(h))&&!oo(hr(w)))&&p.push([c(h),c(w)]);return v}case 6:{const p=[],v=a([A,p],u);for(const h of u)(o||!oo(hr(h)))&&p.push(c(h));return v}}const{message:f}=u;return a([A,{name:d,message:f}],u)};return c})(!(t||n),!!t,new Map,r)(e),r},io=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?jc(qc(e,t)):structuredClone(e):(e,t)=>jc(qc(e,t));function _g(e,t){const n=[{type:"text",value:"โ†ฉ"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Sg(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Wc=function(e){if(e==null)return Cg;if(typeof e=="function")return lo(e);if(typeof e=="object")return Array.isArray(e)?function(t){const n=[];let r=-1;for(;++r<t.length;)n[r]=Wc(t[r]);return lo(o);function o(...i){let l=-1;for(;++l<n.length;)if(n[l].apply(this,i))return!0;return!1}}(e):function(t){const n=t;return lo(r);function r(o){const i=o;let l;for(l in t)if(i[l]!==n[l])return!1;return!0}}(e);if(typeof e=="string")return function(t){return lo(n);function n(r){return r&&r.type===t}}(e);throw new Error("Expected function, string, or object as test")};function lo(e){return function(t,n,r){return!(!function(o){return o!==null&&typeof o=="object"&&"type"in o}(t)||!e.call(this,t,typeof n=="number"?n:void 0,r||void 0))}}function Cg(){return!0}const Gc=[],Pg=!0,Yc=!1;function Dg(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Wc(o),l=r?-1:1;(function s(a,c,u){const A=a&&typeof a=="object"?a:{};if(typeof A.type=="string"){const f=typeof A.tagName=="string"?A.tagName:typeof A.name=="string"?A.name:void 0;Object.defineProperty(d,"name",{value:"node ("+a.type+(f?"<"+f+">":"")+")"})}return d;function d(){let f,p,v,h=Gc;if((!t||i(a,c,u[u.length-1]||void 0))&&(h=function(w){return Array.isArray(w)?w:typeof w=="number"?[Pg,w]:w==null?Gc:[w]}(n(a,u)),h[0]===Yc))return h;if("children"in a&&a.children){const w=a;if(w.children&&h[0]!=="skip")for(p=(r?w.children.length:-1)+l,v=u.concat(w);p>-1&&p<w.children.length;){const b=w.children[p];if(f=s(b,p,v)(),f[0]===Yc)return f;p=typeof f[1]=="number"?f[1]:p+l}}return h}})(e,void 0,[])()}function Vc(e,t,n,r){let o,i,l;typeof t=="function"?(i=void 0,l=t,o=n):(i=t,l=n,o=r),Dg(e,i,function(s,a){const c=a[a.length-1],u=c?c.children.indexOf(s):void 0;return l(s,u,c)},o)}const Hi={}.hasOwnProperty,Ig={};function Bg(e,t){const n=t||Ig,r=new Map,o=new Map,i=new Map,l={...kg,...n.handlers},s={all:function(a){const c=[];if("children"in a){const u=a.children;let A=-1;for(;++A<u.length;){const d=s.one(u[A],a);if(d){if(A&&u[A-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=$c(d.value)),!Array.isArray(d)&&d.type==="element")){const f=d.children[0];f&&f.type==="text"&&(f.value=$c(f.value))}Array.isArray(d)?c.push(...d):c.push(d)}}}return c},applyData:Mg,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:l,one:function(a,c){const u=a.type,A=s.handlers[u];if(Hi.call(s.handlers,u)&&A)return A(s,a,c);if(s.options.passThrough&&s.options.passThrough.includes(u)){if("children"in a){const{children:d,...f}=a,p=io(f);return p.children=s.all(a),p}return io(a)}return(s.options.unknownHandler||Og)(s,a,c)},options:n,patch:Tg,wrap:Qg};return Vc(e,function(a){if(a.type==="definition"||a.type==="footnoteDefinition"){const c=a.type==="definition"?r:o,u=String(a.identifier).toUpperCase();c.has(u)||c.set(u,a)}}),s}function Tg(e,t){e.position&&(t.position=function(n){const r=Si(n),o=lc(n);if(r&&o)return{start:r,end:o}}(e))}function Mg(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:"children"in n?n.children:[n]}),n.type==="element"&&i&&Object.assign(n.properties,io(i)),"children"in n&&n.children&&o!=null&&(n.children=o)}return n}function Og(e,t){const n=t.data||{},r=!("value"in t)||Hi.call(n,"hProperties")||Hi.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Qg(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
28
28
  `});++r<e.length;)r&&n.push({type:"text",value:`
29
29
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
30
- `}),n}function iA(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function aA(e,t){const n=jd(e,t),r=n.one(e,void 0),o=function(A){const s=typeof A.options.clobberPrefix=="string"?A.options.clobberPrefix:"user-content-",a=A.options.footnoteBackContent||Ld,l=A.options.footnoteBackLabel||Rd,c=A.options.footnoteLabel||"Footnotes",u=A.options.footnoteLabelTagName||"h2",d=A.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<A.footnoteOrder.length;){const m=A.footnoteById.get(A.footnoteOrder[h]);if(!m)continue;const p=A.all(m),v=String(m.identifier).toUpperCase(),y=cn(v.toLowerCase());let g=0;const _=[],P=A.footnoteCounts.get(v);for(;P!==void 0&&++g<=P;){_.length>0&&_.push({type:"text",value:" "});let B=typeof a=="string"?a:a(h,g);typeof B=="string"&&(B={type:"text",value:B}),_.push({type:"element",tagName:"a",properties:{href:"#"+s+"fnref-"+y+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(h,g),className:["data-footnote-backref"]},children:Array.isArray(B)?B:[B]})}const E=p[p.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const B=E.children[E.children.length-1];B&&B.type==="text"?B.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(..._)}else p.push(..._);const k={type:"element",tagName:"li",properties:{id:s+"fn-"+y},children:A.wrap(p,!0)};A.patch(m,k),f.push(k)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...vr(d),id:"footnote-label"},children:[{type:"text",value:c}]},{type:"text",value:`
31
- `},{type:"element",tagName:"ol",properties:{},children:A.wrap(f,!0)},{type:"text",value:`
30
+ `}),n}function $c(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Kc(e,t){const n=Bg(e,t),r=n.one(e,void 0),o=function(l){const s=typeof l.options.clobberPrefix=="string"?l.options.clobberPrefix:"user-content-",a=l.options.footnoteBackContent||_g,c=l.options.footnoteBackLabel||Sg,u=l.options.footnoteLabel||"Footnotes",A=l.options.footnoteLabelTagName||"h2",d=l.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p<l.footnoteOrder.length;){const v=l.footnoteById.get(l.footnoteOrder[p]);if(!v)continue;const h=l.all(v),w=String(v.identifier).toUpperCase(),b=Fn(w.toLowerCase());let g=0;const k=[],_=l.footnoteCounts.get(w);for(;_!==void 0&&++g<=_;){k.length>0&&k.push({type:"text",value:" "});let x=typeof a=="string"?a:a(p,g);typeof x=="string"&&(x={type:"text",value:x}),k.push({type:"element",tagName:"a",properties:{href:"#"+s+"fnref-"+b+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof c=="string"?c:c(p,g),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const E=h[h.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const x=E.children[E.children.length-1];x&&x.type==="text"?x.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...k)}else h.push(...k);const P={type:"element",tagName:"li",properties:{id:s+"fn-"+b},children:l.wrap(h,!0)};l.patch(v,P),f.push(P)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:A,properties:{...io(d),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
31
+ `},{type:"element",tagName:"ol",properties:{},children:l.wrap(f,!0)},{type:"text",value:`
32
32
  `}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
33
- `},o),i}function $d(e,t){return e&&"run"in e?async function(n,r){const o=aA(n,{file:r,...t});await e.run(o,r)}:function(n,r){return aA(n,{file:r,...e||t})}}function sA(e){if(e)throw e}var Ho,AA,Vd=function(){if(AA)return Ho;AA=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(a){return typeof Array.isArray=="function"?Array.isArray(a):t.call(a)==="[object Array]"},i=function(a){if(!a||t.call(a)!=="[object Object]")return!1;var l,c=e.call(a,"constructor"),u=a.constructor&&a.constructor.prototype&&e.call(a.constructor.prototype,"isPrototypeOf");if(a.constructor&&!c&&!u)return!1;for(l in a);return typeof l>"u"||e.call(a,l)},A=function(a,l){n&&l.name==="__proto__"?n(a,l.name,{enumerable:!0,configurable:!0,value:l.newValue,writable:!0}):a[l.name]=l.newValue},s=function(a,l){if(l==="__proto__"){if(!e.call(a,l))return;if(r)return r(a,l).value}return a[l]};return Ho=function a(){var l,c,u,d,f,h,m=arguments[0],p=1,v=arguments.length,y=!1;for(typeof m=="boolean"&&(y=m,m=arguments[1]||{},p=2),(m==null||typeof m!="object"&&typeof m!="function")&&(m={});p<v;++p)if((l=arguments[p])!=null)for(c in l)u=s(m,c),m!==(d=s(l,c))&&(y&&d&&(i(d)||(f=o(d)))?(f?(f=!1,h=u&&o(u)?u:[]):h=u&&i(u)?u:{},A(m,{name:c,newValue:a(y,h,d)})):typeof d<"u"&&A(m,{name:c,newValue:d}));return m},Ho}();const Uo=ds(Vd);function Fo(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return!(t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.toStringTag in e||Symbol.iterator in e)}function Kd(){const e=[],t={run:function(...n){let r=-1;const o=n.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);(function i(A,...s){const a=e[++r];let l=-1;if(A)o(A);else{for(;++l<n.length;)(s[l]===null||s[l]===void 0)&&(s[l]=n[l]);n=s,a?function(c,u){let d;return f;function f(...p){const v=c.length>p.length;let y;v&&p.push(h);try{y=c.apply(this,p)}catch(g){if(v&&d)throw g;return h(g)}v||(y&&y.then&&typeof y.then=="function"?y.then(m,h):y instanceof Error?h(y):m(y))}function h(p,...v){d||(d=!0,u(p,...v))}function m(p){h(null,p)}}(a,i)(...s):o(null,...s)}})(null,...n)},use:function(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const vt={basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Hn(e);let n,r=0,o=-1,i=e.length;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let A=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(n){r=i+1;break}}else A<0&&(n=!0,A=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=A));return r===o?o=A:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(Hn(e),e.length===0)return".";let t,n=-1,r=e.length;for(;--r;)if(e.codePointAt(r)===47){if(t){n=r;break}}else t||(t=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)},extname:function(e){Hn(e);let t,n=e.length,r=-1,o=0,i=-1,A=0;for(;n--;){const s=e.codePointAt(n);if(s!==47)r<0&&(t=!0,r=n+1),s===46?i<0?i=n:A!==1&&(A=1):i>-1&&(A=-1);else if(t){o=n+1;break}}return i<0||r<0||A===0||A===1&&i===r-1&&i===o+1?"":e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Hn(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":function(r){Hn(r);const o=r.codePointAt(0)===47;let i=function(A,s){let a,l,c="",u=0,d=-1,f=0,h=-1;for(;++h<=A.length;){if(h<A.length)a=A.codePointAt(h);else{if(a===47)break;a=47}if(a===47){if(d!==h-1&&f!==1)if(d!==h-1&&f===2){if(c.length<2||u!==2||c.codePointAt(c.length-1)!==46||c.codePointAt(c.length-2)!==46){if(c.length>2){if(l=c.lastIndexOf("/"),l!==c.length-1){l<0?(c="",u=0):(c=c.slice(0,l),u=c.length-1-c.lastIndexOf("/")),d=h,f=0;continue}}else if(c.length>0){c="",u=0,d=h,f=0;continue}}s&&(c=c.length>0?c+"/..":"..",u=2)}else c.length>0?c+="/"+A.slice(d+1,h):c=A.slice(d+1,h),u=h-d-1;d=h,f=0}else a===46&&f>-1?f++:f=-1}return c}(r,!o);return i.length===0&&!o&&(i="."),i.length>0&&r.codePointAt(r.length-1)===47&&(i+="/"),o?"/"+i:i}(t)},sep:"/"};function Hn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Xd={cwd:function(){return"/"}};function zo(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Jd(e){if(typeof e=="string")e=new URL(e);else if(!zo(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return function(t){if(t.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const n=t.pathname;let r=-1;for(;++r<n.length;)if(n.codePointAt(r)===37&&n.codePointAt(r+1)===50){const o=n.codePointAt(r+2);if(o===70||o===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}(e)}const jo=["history","path","basename","stem","extname","dirname"];class lA{constructor(t){let n;var r;n=t?zo(t)?{path:t}:typeof t=="string"||(r=t)&&typeof r=="object"&&"byteLength"in r&&"byteOffset"in r?{value:t}:t:{},this.cwd="cwd"in n?"":Xd.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o,i=-1;for(;++i<jo.length;){const A=jo[i];A in n&&n[A]!==void 0&&n[A]!==null&&(this[A]=A==="history"?[...n[A]]:n[A])}for(o in n)jo.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?vt.basename(this.path):void 0}set basename(t){Wo(t,"basename"),qo(t,"basename"),this.path=vt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vt.dirname(this.path):void 0}set dirname(t){cA(this.basename,"dirname"),this.path=vt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vt.extname(this.path):void 0}set extname(t){if(qo(t,"extname"),cA(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=vt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){zo(t)&&(t=Jd(t)),Wo(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vt.basename(this.path,this.extname):void 0}set stem(t){Wo(t,"stem"),qo(t,"stem"),this.path=vt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new We(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function qo(e,t){if(e&&e.includes(vt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vt.sep+"`")}function Wo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function cA(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Zd=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},ef={}.hasOwnProperty;class Go extends Zd{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Kd()}copy(){const t=new Go;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Uo(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Vo("data",this.frozen),this.namespace[t]=n,this):ef.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Vo("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=br(t),r=this.parser||this.Parser;return Yo("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Yo("process",this.parser||this.Parser),$o("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,A){const s=br(t),a=r.parse(s);function l(c,u){c||!u?A(c):i?i(u):n(void 0,u)}r.run(a,s,function(c,u,d){if(c||!u||!d)return l(c);const f=u,h=r.stringify(f,d);var m;typeof(m=h)=="string"||function(p){return!!(p&&typeof p=="object"&&"byteLength"in p&&"byteOffset"in p)}(m)?d.value=h:d.result=h,l(c,d)})}}processSync(t){let n,r=!1;return this.freeze(),Yo("processSync",this.parser||this.Parser),$o("processSync",this.compiler||this.Compiler),this.process(t,function(o,i){r=!0,sA(o),n=i}),dA("processSync","process",r),n}run(t,n,r){uA(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(A,s){const a=br(n);o.run(t,a,function(l,c,u){const d=c||t;l?s(l):A?A(d):r(void 0,d,u)})}}runSync(t,n){let r,o=!1;return this.run(t,n,function(i,A){sA(i),r=A,o=!0}),dA("runSync","run",o),r}stringify(t,n){this.freeze();const r=br(n),o=this.compiler||this.Compiler;return $o("stringify",o),uA(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Vo("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else{if(typeof t!="object")throw new TypeError("Expected usable value, not `"+t+"`");Array.isArray(t)?s(t):A(t)}return this;function i(l){if(typeof l=="function")a(l,[]);else{if(typeof l!="object")throw new TypeError("Expected usable value, not `"+l+"`");if(Array.isArray(l)){const[c,...u]=l;a(c,u)}else A(l)}}function A(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(l.plugins),l.settings&&(o.settings=Uo(!0,o.settings,l.settings))}function s(l){let c=-1;if(l!=null){if(!Array.isArray(l))throw new TypeError("Expected a list of plugins, not `"+l+"`");for(;++c<l.length;)i(l[c])}}function a(l,c){let u=-1,d=-1;for(;++u<r.length;)if(r[u][0]===l){d=u;break}if(d===-1)r.push([l,...c]);else if(c.length>0){let[f,...h]=c;const m=r[d][1];Fo(m)&&Fo(f)&&(f=Uo(!0,m,f)),r[d]=[l,f,...h]}}}}const tf=new Go().freeze();function Yo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function $o(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Vo(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function uA(e){if(!Fo(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function dA(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function br(e){return function(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}(e)?e:new lA(e)}const fA=[],pA={allowDangerousHtml:!0},nf=/^(https?|ircs?|mailto|xmpp)$/i,rf=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function of(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,A=e.disallowedElements,s=e.rehypePlugins||fA,a=e.remarkPlugins||fA,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...pA}:pA,c=e.skipHtml,u=e.unwrapDisallowed,d=e.urlTransform||af,f=tf().use(Td).use(a).use($d,l).use(s),h=new lA;typeof r=="string"&&(h.value=r);for(const v of rf)Object.hasOwn(e,v.from)&&(v.from,v.to&&v.to,v.id);const m=f.parse(h);let p=f.runSync(m,h);return o&&(p={type:"element",tagName:"div",properties:{className:o},children:p.type==="root"?p.children:[p]}),oA(p,function(v,y,g){if(v.type==="raw"&&g&&typeof y=="number")return c?g.children.splice(y,1):g.children[y]={type:"text",value:v.value},y;if(v.type==="element"){let _;for(_ in Bo)if(Object.hasOwn(Bo,_)&&Object.hasOwn(v.properties,_)){const P=v.properties[_],E=Bo[_];(E===null||E.includes(v.tagName))&&(v.properties[_]=d(String(P||""),_,v))}}if(v.type==="element"){let _=t?!t.includes(v.tagName):!!A&&A.includes(v.tagName);if(!_&&n&&typeof y=="number"&&(_=!n(v,y,g)),_&&g&&typeof y=="number")return u&&v.children?g.children.splice(y,1,...v.children):g.children.splice(y,1),y}}),xu(p,{Fragment:ce,components:i,ignoreInvalidStyle:!0,jsx:C,jsxs:C,passKeys:!0,passNode:!0})}function af(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||nf.test(e.slice(0,t))?e:""}const sf=({children:e})=>C("div",{style:{whiteSpace:"normal"},children:C(of,{components:{p:({...t})=>C("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:t.children}),ul:({...t})=>C("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),ol:({...t})=>C("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),li:({...t})=>C("li",{style:{marginBottom:"1px",lineHeight:1.4},children:t.children}),code:({inline:t,children:n})=>t?C("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:n}):C("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:C("code",{children:n})}),blockquote:({...t})=>C("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:t.children})},children:typeof e=="string"?e:""})}),Af={autoConfig:!0},lf=e=>()=>(t=>{const{getFlow:n}=dr(),{messages:r,replaceMessages:o}=Tn(),{settings:i}=Wa(),{hasChatHistoryLoaded:A}=Ya(),s={...t,...Af},a=s.markdownComponent?s.markdownComponent:sf;X(()=>{var u,d;if(A){const f=[...r];for(let h=0;h<f.length&&h<(((u=i.chatHistory)==null?void 0:u.maxEntries)??30);h++){const m=f[h];(d=m.tags)!=null&&d.includes("rcb-markdown-renderer-plugin:parsed")&&(m.contentWrapper=a)}o(f)}},[A]);const l=async u=>{var d;const f=(d=u.data.message)==null?void 0:d.sender.toUpperCase();((h,m,p)=>{var v;if(typeof h.data.message.content!="string"||!h.detail.currPath)return!1;const y=m[h.detail.currPath];return!!y&&(((v=y.renderMarkdown)==null?void 0:v.map(g=>g.toUpperCase()).includes(p))??!1)})(u,n(),f)&&(u.data.message.contentWrapper=a,u.data.message.tags||(u.data.message.tags=[]),u.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};ot(z.PRE_INJECT_MESSAGE,l),ot(z.CHUNK_STREAM_MESSAGE,l),ot(z.START_STREAM_MESSAGE,l),ot(z.START_SIMULATE_STREAM_MESSAGE,l);const c={name:"@rcb-plugins/markdown-renderer"};return s!=null&&s.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(e),_r={autoConfig:!0,promptBaseColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"},promptHoveredColors:{info:"#0056b3",warning:"#d39e00",error:"#c82333",success:"#218838"},textAreaHighlightColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"}},hA=(e,t,n="validateTextInput")=>{var r;if((r=e.detail)==null||!r.currPath)return;const o=t[e.detail.currPath];if(!o)return;const i=o[n];return typeof i=="function"?i:void 0},cf=e=>{const{showToast:t}=(()=>{const{showToast:u,dismissToast:d,toasts:f,replaceToasts:h}=rn();return{showToast:u,dismissToast:d,toasts:f,replaceToasts:h}})(),{getFlow:n}=dr(),{styles:r,updateStyles:o,replaceStyles:i}=(()=>{const{styles:u,replaceStyles:d,updateStyles:f}=Fa();return{styles:u,replaceStyles:d,updateStyles:f}})(),A=(u=>({..._r,...u,promptBaseColors:{..._r.promptBaseColors},promptHoveredColors:{..._r.promptHoveredColors},textAreaHighlightColors:{..._r.textAreaHighlightColors}}))(e),[s,a]=ee(0),l=ne({});ot(z.USER_SUBMIT_TEXT,u=>{const d=u,f=hA(d,n(),"validateTextInput");if(!f)return;const h=f(d.data.inputText);if(h!=null&&h.success||u.preventDefault(),!h.promptContent)return;s===0&&(l.current=structuredClone(r));const m=((p,v)=>{const y=p.promptType??"info";let g={};return v.advancedStyles&&(g=v.advancedStyles[y]),v.promptBaseColors&&(g.toastPromptStyle={color:v.promptBaseColors[y],borderColor:v.promptBaseColors[y]}),v.promptHoveredColors&&(g.toastPromptHoveredStyle={color:v.promptHoveredColors[y],borderColor:v.promptHoveredColors[y]}),v.textAreaHighlightColors&&(p.highlightTextArea??!0)&&(g.chatInputAreaStyle={boxShadow:`${v.textAreaHighlightColors[y]} 0px 0px 5px`}),g})(h,A);o(m),t(h.promptContent,h.promptDuration??3e3),a(p=>p+1)}),ot(z.USER_UPLOAD_FILE,u=>{var d,f;const h=u,m=(f=(d=h.data)==null?void 0:d.files)==null?void 0:f[0];if(!m)return console.error("No file uploaded."),void u.preventDefault();const p=hA(h,n(),"validateFileInput");if(!p)return void console.error("Validator not found for file input.");const v=p(m);if(!v.success)return console.error("Validation failed:",v),v.promptContent&&t(v.promptContent,v.promptDuration??3e3),void u.preventDefault();console.log("Validation successful:",v)}),ot(z.DISMISS_TOAST,()=>{a(u=>u-1)}),X(()=>{s===0&&setTimeout(()=>{i(l.current)})},[s,i]);const c={name:"@rcb-plugins/input-validator"};return A.autoConfig&&(c.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),c},gA=Ye((e,t)=>{let{embedded:n,currentOpen:r,enabled:o,onSetEnabled:i}=e;const A=Tn(),s=(()=>{const{isChatWindowOpen:c,toggleChatWindow:u,toggleIsBotTyping:d,scrollToBottom:f,getIsChatBotVisible:h}=Ze();return{isChatWindowOpen:c,toggleChatWindow:u,toggleIsBotTyping:d,scrollToBottom:f,getIsChatBotVisible:h}})(),a=ne(!1),l=ne(!1);return X(()=>{!n&&s&&s.toggleChatWindow&&(a.current===r||l.current||(setTimeout(()=>{s&&s.toggleChatWindow&&s.toggleChatWindow(r)},0),a.current=r!=null&&r),l.current=!1)},[r,n,s]),X(()=>{const c=()=>{l.current=!0};return window.addEventListener("rcb-toggle-chat-window",c),()=>window.removeEventListener("rcb-toggle-chat-window",c)}),Zn(t,()=>({addMessage:c=>{A&&A.injectMessage&&A.injectMessage(c)},openChat:()=>{!n&&s&&s.toggleChatWindow&&s.toggleChatWindow(!0)},closeChat:()=>{!n&&s&&s.toggleChatWindow&&s.toggleChatWindow(!1)},toggleChat:()=>{!n&&s&&s.toggleChatWindow&&s.toggleChatWindow()},setBotEnabled:c=>{i&&i(c)}}),[A,s,n,i]),null});gA.displayName="BotController";const mA=At(null),uf=e=>{let{trackEvent:t,children:n}=e;const r=ne(t);return r.current=t,M.createElement(mA.Provider,{value:{trackEvent:o=>r.current(o)}},n)},yA=()=>rt(mA)||{trackEvent:()=>{}},vA=e=>{let{loginUrl:t,className:n="",style:r,isHeaderButton:o=!1}=e;const{trackEvent:i}=yA(),A=o?{display:"inline-block",padding:"6px 12px",backgroundColor:"transparent",border:"1px solid #ccc",color:"white",textDecoration:"none",borderRadius:"4px",fontWeight:"normal",textAlign:"center",margin:"8px",fontSize:"12px",opacity:.8,transition:"all 0.2s ease"}:{display:"inline-block",padding:"10px 20px",backgroundColor:"white",border:"1px solid var(--primaryColor, #107180)",color:"var(--primaryColor, #107180)",textDecoration:"none",borderRadius:"4px",fontWeight:"bold",textAlign:"center",margin:"18px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)"};return M.createElement(M.Fragment,null,o&&M.createElement("style",null,`
33
+ `},o),i}function Lg(e,t){return e&&"run"in e?async function(n,r){const o=Kc(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Kc(n,{file:r,...e||t})}}function Xc(e){if(e)throw e}var Ui,Jc,Ng=function(){if(Jc)return Ui;Jc=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(a){return typeof Array.isArray=="function"?Array.isArray(a):t.call(a)==="[object Array]"},i=function(a){if(!a||t.call(a)!=="[object Object]")return!1;var c,u=e.call(a,"constructor"),A=a.constructor&&a.constructor.prototype&&e.call(a.constructor.prototype,"isPrototypeOf");if(a.constructor&&!u&&!A)return!1;for(c in a);return typeof c>"u"||e.call(a,c)},l=function(a,c){n&&c.name==="__proto__"?n(a,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):a[c.name]=c.newValue},s=function(a,c){if(c==="__proto__"){if(!e.call(a,c))return;if(r)return r(a,c).value}return a[c]};return Ui=function a(){var c,u,A,d,f,p,v=arguments[0],h=1,w=arguments.length,b=!1;for(typeof v=="boolean"&&(b=v,v=arguments[1]||{},h=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});h<w;++h)if((c=arguments[h])!=null)for(u in c)A=s(v,u),v!==(d=s(c,u))&&(b&&d&&(i(d)||(f=o(d)))?(f?(f=!1,p=A&&o(A)?A:[]):p=A&&i(A)?A:{},l(v,{name:u,newValue:a(b,p,d)})):typeof d<"u"&&l(v,{name:u,newValue:d}));return v},Ui}();const zi=nc(Ng);function ji(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return!(t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.toStringTag in e||Symbol.iterator in e)}function Rg(){const e=[],t={run:function(...n){let r=-1;const o=n.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);(function i(l,...s){const a=e[++r];let c=-1;if(l)o(l);else{for(;++c<n.length;)(s[c]===null||s[c]===void 0)&&(s[c]=n[c]);n=s,a?function(u,A){let d;return f;function f(...h){const w=u.length>h.length;let b;w&&h.push(p);try{b=u.apply(this,h)}catch(g){if(w&&d)throw g;return p(g)}w||(b&&b.then&&typeof b.then=="function"?b.then(v,p):b instanceof Error?p(b):v(b))}function p(h,...w){d||(d=!0,A(h,...w))}function v(h){p(null,h)}}(a,i)(...s):o(null,...s)}})(null,...n)},use:function(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Rt={basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');gr(e);let n,r=0,o=-1,i=e.length;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let l=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(n){r=i+1;break}}else l<0&&(n=!0,l=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=l));return r===o?o=l:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(gr(e),e.length===0)return".";let t,n=-1,r=e.length;for(;--r;)if(e.codePointAt(r)===47){if(t){n=r;break}}else t||(t=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)},extname:function(e){gr(e);let t,n=e.length,r=-1,o=0,i=-1,l=0;for(;n--;){const s=e.codePointAt(n);if(s!==47)r<0&&(t=!0,r=n+1),s===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1);else if(t){o=n+1;break}}return i<0||r<0||l===0||l===1&&i===r-1&&i===o+1?"":e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)gr(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":function(r){gr(r);const o=r.codePointAt(0)===47;let i=function(l,s){let a,c,u="",A=0,d=-1,f=0,p=-1;for(;++p<=l.length;){if(p<l.length)a=l.codePointAt(p);else{if(a===47)break;a=47}if(a===47){if(d!==p-1&&f!==1)if(d!==p-1&&f===2){if(u.length<2||A!==2||u.codePointAt(u.length-1)!==46||u.codePointAt(u.length-2)!==46){if(u.length>2){if(c=u.lastIndexOf("/"),c!==u.length-1){c<0?(u="",A=0):(u=u.slice(0,c),A=u.length-1-u.lastIndexOf("/")),d=p,f=0;continue}}else if(u.length>0){u="",A=0,d=p,f=0;continue}}s&&(u=u.length>0?u+"/..":"..",A=2)}else u.length>0?u+="/"+l.slice(d+1,p):u=l.slice(d+1,p),A=p-d-1;d=p,f=0}else a===46&&f>-1?f++:f=-1}return u}(r,!o);return i.length===0&&!o&&(i="."),i.length>0&&r.codePointAt(r.length-1)===47&&(i+="/"),o?"/"+i:i}(t)},sep:"/"};function gr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Fg={cwd:function(){return"/"}};function qi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Hg(e){if(typeof e=="string")e=new URL(e);else if(!qi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return function(t){if(t.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const n=t.pathname;let r=-1;for(;++r<n.length;)if(n.codePointAt(r)===37&&n.codePointAt(r+1)===50){const o=n.codePointAt(r+2);if(o===70||o===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}(e)}const Wi=["history","path","basename","stem","extname","dirname"];class Zc{constructor(t){let n;var r;n=t?qi(t)?{path:t}:typeof t=="string"||(r=t)&&typeof r=="object"&&"byteLength"in r&&"byteOffset"in r?{value:t}:t:{},this.cwd="cwd"in n?"":Fg.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o,i=-1;for(;++i<Wi.length;){const l=Wi[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}for(o in n)Wi.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Rt.basename(this.path):void 0}set basename(t){Yi(t,"basename"),Gi(t,"basename"),this.path=Rt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rt.dirname(this.path):void 0}set dirname(t){eu(this.basename,"dirname"),this.path=Rt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rt.extname(this.path):void 0}set extname(t){if(Gi(t,"extname"),eu(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Rt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){qi(t)&&(t=Hg(t)),Yi(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rt.basename(this.path,this.extname):void 0}set stem(t){Yi(t,"stem"),Gi(t,"stem"),this.path=Rt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new et(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Gi(e,t){if(e&&e.includes(Rt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rt.sep+"`")}function Yi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function eu(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Ug=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},zg={}.hasOwnProperty;class Vi extends Ug{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Rg()}copy(){const t=new Vi;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(zi(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Xi("data",this.frozen),this.namespace[t]=n,this):zg.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Xi("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=so(t),r=this.parser||this.Parser;return $i("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),$i("process",this.parser||this.Parser),Ki("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,l){const s=so(t),a=r.parse(s);function c(u,A){u||!A?l(u):i?i(A):n(void 0,A)}r.run(a,s,function(u,A,d){if(u||!A||!d)return c(u);const f=A,p=r.stringify(f,d);var v;typeof(v=p)=="string"||function(h){return!!(h&&typeof h=="object"&&"byteLength"in h&&"byteOffset"in h)}(v)?d.value=p:d.result=p,c(u,d)})}}processSync(t){let n,r=!1;return this.freeze(),$i("processSync",this.parser||this.Parser),Ki("processSync",this.compiler||this.Compiler),this.process(t,function(o,i){r=!0,Xc(o),n=i}),nu("processSync","process",r),n}run(t,n,r){tu(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(l,s){const a=so(n);o.run(t,a,function(c,u,A){const d=u||t;c?s(c):l?l(d):r(void 0,d,A)})}}runSync(t,n){let r,o=!1;return this.run(t,n,function(i,l){Xc(i),r=l,o=!0}),nu("runSync","run",o),r}stringify(t,n){this.freeze();const r=so(n),o=this.compiler||this.Compiler;return Ki("stringify",o),tu(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Xi("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else{if(typeof t!="object")throw new TypeError("Expected usable value, not `"+t+"`");Array.isArray(t)?s(t):l(t)}return this;function i(c){if(typeof c=="function")a(c,[]);else{if(typeof c!="object")throw new TypeError("Expected usable value, not `"+c+"`");if(Array.isArray(c)){const[u,...A]=c;a(u,A)}else l(c)}}function l(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(o.settings=zi(!0,o.settings,c.settings))}function s(c){let u=-1;if(c!=null){if(!Array.isArray(c))throw new TypeError("Expected a list of plugins, not `"+c+"`");for(;++u<c.length;)i(c[u])}}function a(c,u){let A=-1,d=-1;for(;++A<r.length;)if(r[A][0]===c){d=A;break}if(d===-1)r.push([c,...u]);else if(u.length>0){let[f,...p]=u;const v=r[d][1];ji(v)&&ji(f)&&(f=zi(!0,v,f)),r[d]=[c,f,...p]}}}}const jg=new Vi().freeze();function $i(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ki(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Xi(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function tu(e){if(!ji(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function nu(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function so(e){return function(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}(e)?e:new Zc(e)}const ru=[],ou={allowDangerousHtml:!0},qg=/^(https?|ircs?|mailto|xmpp)$/i,Wg=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Gg(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,l=e.disallowedElements,s=e.rehypePlugins||ru,a=e.remarkPlugins||ru,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ou}:ou,u=e.skipHtml,A=e.unwrapDisallowed,d=e.urlTransform||Yg,f=jg().use(wg).use(a).use(Lg,c).use(s),p=new Zc;typeof r=="string"&&(p.value=r);for(const w of Wg)Object.hasOwn(e,w.from)&&(w.from,w.to&&w.to,w.id);const v=f.parse(p);let h=f.runSync(v,p);return o&&(h={type:"element",tagName:"div",properties:{className:o},children:h.type==="root"?h.children:[h]}),Vc(h,function(w,b,g){if(w.type==="raw"&&g&&typeof b=="number")return u?g.children.splice(b,1):g.children[b]={type:"text",value:w.value},b;if(w.type==="element"){let k;for(k in Bi)if(Object.hasOwn(Bi,k)&&Object.hasOwn(w.properties,k)){const _=w.properties[k],E=Bi[k];(E===null||E.includes(w.tagName))&&(w.properties[k]=d(String(_||""),k,w))}}if(w.type==="element"){let k=t?!t.includes(w.tagName):!!l&&l.includes(w.tagName);if(!k&&n&&typeof b=="number"&&(k=!n(w,b,g)),k&&g&&typeof b=="number")return A&&w.children?g.children.splice(b,1,...w.children):g.children.splice(b,1),b}}),yh(h,{Fragment:ge,components:i,ignoreInvalidStyle:!0,jsx:I,jsxs:I,passKeys:!0,passNode:!0})}function Yg(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||qg.test(e.slice(0,t))?e:""}const Vg=({children:e})=>I("div",{style:{whiteSpace:"normal"},children:I(Gg,{components:{p:({...t})=>I("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:t.children}),ul:({...t})=>I("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),ol:({...t})=>I("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),li:({...t})=>I("li",{style:{marginBottom:"1px",lineHeight:1.4},children:t.children}),code:({inline:t,children:n})=>t?I("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:n}):I("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:I("code",{children:n})}),blockquote:({...t})=>I("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:t.children})},children:typeof e=="string"?e:""})}),$g={autoConfig:!0},Kg=e=>()=>(t=>{const{getFlow:n}=Xr(),{messages:r,replaceMessages:o}=Jr(),{settings:i}=Qa(),{hasChatHistoryLoaded:l}=Na(),s={...t,...$g},a=s.markdownComponent?s.markdownComponent:Vg;ee(()=>{var A,d;if(l){const f=[...r];for(let p=0;p<f.length&&p<(((A=i.chatHistory)==null?void 0:A.maxEntries)??30);p++){const v=f[p];(d=v.tags)!=null&&d.includes("rcb-markdown-renderer-plugin:parsed")&&(v.contentWrapper=a)}o(f)}},[l]);const c=async A=>{var d;const f=(d=A.data.message)==null?void 0:d.sender.toUpperCase();((p,v,h)=>{var w;if(typeof p.data.message.content!="string"||!p.detail.currPath)return!1;const b=v[p.detail.currPath];return!!b&&(((w=b.renderMarkdown)==null?void 0:w.map(g=>g.toUpperCase()).includes(h))??!1)})(A,n(),f)&&(A.data.message.contentWrapper=a,A.data.message.tags||(A.data.message.tags=[]),A.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};bt(V.PRE_INJECT_MESSAGE,c),bt(V.CHUNK_STREAM_MESSAGE,c),bt(V.START_STREAM_MESSAGE,c),bt(V.START_SIMULATE_STREAM_MESSAGE,c);const u={name:"@rcb-plugins/markdown-renderer"};return s!=null&&s.autoConfig&&(u.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),u})(e),ao={autoConfig:!0,promptBaseColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"},promptHoveredColors:{info:"#0056b3",warning:"#d39e00",error:"#c82333",success:"#218838"},textAreaHighlightColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"}},iu=(e,t,n="validateTextInput")=>{var r;if((r=e.detail)==null||!r.currPath)return;const o=t[e.detail.currPath];if(!o)return;const i=o[n];return typeof i=="function"?i:void 0},Xg=e=>{const{showToast:t}=(()=>{const{showToast:A,dismissToast:d,toasts:f,replaceToasts:p}=Mn();return{showToast:A,dismissToast:d,toasts:f,replaceToasts:p}})(),{getFlow:n}=Xr(),{styles:r,updateStyles:o,replaceStyles:i}=(()=>{const{styles:A,replaceStyles:d,updateStyles:f}=Ba();return{styles:A,replaceStyles:d,updateStyles:f}})(),l=(A=>({...ao,...A,promptBaseColors:{...ao.promptBaseColors},promptHoveredColors:{...ao.promptHoveredColors},textAreaHighlightColors:{...ao.textAreaHighlightColors}}))(e),[s,a]=ne(0),c=le({});bt(V.USER_SUBMIT_TEXT,A=>{const d=A,f=iu(d,n(),"validateTextInput");if(!f)return;const p=f(d.data.inputText);if(p!=null&&p.success||A.preventDefault(),!p.promptContent)return;s===0&&(c.current=structuredClone(r));const v=((h,w)=>{const b=h.promptType??"info";let g={};return w.advancedStyles&&(g=w.advancedStyles[b]),w.promptBaseColors&&(g.toastPromptStyle={color:w.promptBaseColors[b],borderColor:w.promptBaseColors[b]}),w.promptHoveredColors&&(g.toastPromptHoveredStyle={color:w.promptHoveredColors[b],borderColor:w.promptHoveredColors[b]}),w.textAreaHighlightColors&&(h.highlightTextArea??!0)&&(g.chatInputAreaStyle={boxShadow:`${w.textAreaHighlightColors[b]} 0px 0px 5px`}),g})(p,l);o(v),t(p.promptContent,p.promptDuration??3e3),a(h=>h+1)}),bt(V.USER_UPLOAD_FILE,A=>{var d,f;const p=A,v=(f=(d=p.data)==null?void 0:d.files)==null?void 0:f[0];if(!v)return console.error("No file uploaded."),void A.preventDefault();const h=iu(p,n(),"validateFileInput");if(!h)return void console.error("Validator not found for file input.");const w=h(v);if(!w.success)return console.error("Validation failed:",w),w.promptContent&&t(w.promptContent,w.promptDuration??3e3),void A.preventDefault();console.log("Validation successful:",w)}),bt(V.DISMISS_TOAST,()=>{a(A=>A-1)}),ee(()=>{s===0&&setTimeout(()=>{i(c.current)})},[s,i]);const u={name:"@rcb-plugins/input-validator"};return l.autoConfig&&(u.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),u};function ib(){}function lb(){}const Jg=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zg=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,em={};function lu(e,t){return(em.jsx?Zg:Jg).test(e)}const tm=/[ \t\n\f\r]/g;function su(e){return e.replace(tm,"")===""}class mr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}function au(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new mr(n,r,t)}function Ji(e){return e.toLowerCase()}mr.prototype.normal={},mr.prototype.property={},mr.prototype.space=void 0;class ut{constructor(t,n){this.attribute=n,this.property=t}}ut.prototype.attribute="",ut.prototype.booleanish=!1,ut.prototype.boolean=!1,ut.prototype.commaOrSpaceSeparated=!1,ut.prototype.commaSeparated=!1,ut.prototype.defined=!1,ut.prototype.mustUseProperty=!1,ut.prototype.number=!1,ut.prototype.overloadedBoolean=!1,ut.prototype.property="",ut.prototype.spaceSeparated=!1,ut.prototype.space=void 0;let nm=0;const de=wn(),Ye=wn(),Zi=wn(),j=wn(),Be=wn(),Un=wn(),yt=wn();function wn(){return 2**++nm}var el=Object.freeze({__proto__:null,boolean:de,booleanish:Ye,commaOrSpaceSeparated:yt,commaSeparated:Un,number:j,overloadedBoolean:Zi,spaceSeparated:Be});const tl=Object.keys(el);class nl extends ut{constructor(t,n,r,o){let i=-1;if(super(t,n),cu(this,"space",o),typeof r=="number")for(;++i<tl.length;){const l=tl[i];cu(this,tl[i],(r&el[l])===el[l])}}}function cu(e,t,n){n&&(e[t]=n)}function zn(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new nl(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Ji(r)]=r,n[Ji(i.attribute)]=r}return new mr(t,n,e.space)}nl.prototype.defined=!0;const uu=zn({properties:{ariaActiveDescendant:null,ariaAtomic:Ye,ariaAutoComplete:null,ariaBusy:Ye,ariaChecked:Ye,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:Be,ariaCurrent:null,ariaDescribedBy:Be,ariaDetails:null,ariaDisabled:Ye,ariaDropEffect:Be,ariaErrorMessage:null,ariaExpanded:Ye,ariaFlowTo:Be,ariaGrabbed:Ye,ariaHasPopup:null,ariaHidden:Ye,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Be,ariaLevel:j,ariaLive:null,ariaModal:Ye,ariaMultiLine:Ye,ariaMultiSelectable:Ye,ariaOrientation:null,ariaOwns:Be,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:Ye,ariaReadOnly:Ye,ariaRelevant:null,ariaRequired:Ye,ariaRoleDescription:Be,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:Ye,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform:(e,t)=>t==="role"?t:"aria-"+t.slice(4).toLowerCase()});function Au(e,t){return t in e?e[t]:t}function du(e,t){return Au(e,t.toLowerCase())}const rm=zn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Un,acceptCharset:Be,accessKey:Be,action:null,allow:null,allowFullScreen:de,allowPaymentRequest:de,allowUserMedia:de,alt:null,as:null,async:de,autoCapitalize:null,autoComplete:Be,autoFocus:de,autoPlay:de,blocking:Be,capture:null,charSet:null,checked:de,cite:null,className:Be,cols:j,colSpan:null,content:null,contentEditable:Ye,controls:de,controlsList:Be,coords:j|Un,crossOrigin:null,data:null,dateTime:null,decoding:null,default:de,defer:de,dir:null,dirName:null,disabled:de,download:Zi,draggable:Ye,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:de,formTarget:null,headers:Be,height:j,hidden:Zi,high:j,href:null,hrefLang:null,htmlFor:Be,httpEquiv:Be,id:null,imageSizes:null,imageSrcSet:null,inert:de,inputMode:null,integrity:null,is:null,isMap:de,itemId:null,itemProp:Be,itemRef:Be,itemScope:de,itemType:Be,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:de,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:de,muted:de,name:null,nonce:null,noModule:de,noValidate:de,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:de,optimum:j,pattern:null,ping:Be,placeholder:null,playsInline:de,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:de,referrerPolicy:null,rel:Be,required:de,reversed:de,rows:j,rowSpan:j,sandbox:Be,scope:null,scoped:de,seamless:de,selected:de,shadowRootClonable:de,shadowRootDelegatesFocus:de,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:Ye,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:de,useMap:null,value:Ye,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Be,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:de,declare:de,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:de,noHref:de,noShade:de,noWrap:de,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:Ye,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:de,disableRemotePlayback:de,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:du}),om=zn({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:yt,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:Be,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:de,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Un,g2:Un,glyphName:Un,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:yt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:j,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Be,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yt,rev:yt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yt,requiredFeatures:yt,requiredFonts:yt,requiredFormats:yt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:yt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yt,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:yt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Au}),fu=zn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),pu=zn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:du}),hu=zn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),im={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},lm=/[A-Z]/g,gu=/-[a-z]/g,sm=/^data[-\w.:]+$/i;function am(e){return"-"+e.toLowerCase()}function cm(e){return e.charAt(1).toUpperCase()}const um=au([uu,rm,fu,pu,hu],"html"),rl=au([uu,om,fu,pu,hu],"svg");var co=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ol={},yu=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Am=/\n/g,dm=/^\s*/,fm=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,pm=/^:\s*/,hm=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,gm=/^[;\s]*/,mm=/^\s+|\s+$/g,bn="";function vu(e){return e?e.replace(mm,bn):bn}var ym=co&&co.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ol,"__esModule",{value:!0}),ol.default=function(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,vm.default)(e),o=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var l=i.property,s=i.value;o?t(l,s,i):s&&((n=n||{})[l]=s)}}),n};var vm=ym(function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(f){var p=f.match(Am);p&&(n+=p.length);var v=f.lastIndexOf(`
34
+ `);r=~v?f.length-v:r+f.length}function i(){var f={line:n,column:r};return function(p){return p.position=new l(f),c(),p}}function l(f){this.start=f,this.end={line:n,column:r},this.source=t.source}function s(f){var p=new Error(t.source+":"+n+":"+r+": "+f);if(p.reason=f,p.filename=t.source,p.line=n,p.column=r,p.source=e,!t.silent)throw p}function a(f){var p=f.exec(e);if(p){var v=p[0];return o(v),e=e.slice(v.length),p}}function c(){a(dm)}function u(f){var p;for(f=f||[];p=A();)p!==!1&&f.push(p);return f}function A(){var f=i();if(e.charAt(0)=="/"&&e.charAt(1)=="*"){for(var p=2;bn!=e.charAt(p)&&(e.charAt(p)!="*"||e.charAt(p+1)!="/");)++p;if(p+=2,bn===e.charAt(p-1))return s("End of comment missing");var v=e.slice(2,p-2);return r+=2,o(v),e=e.slice(p),r+=2,f({type:"comment",comment:v})}}function d(){var f=i(),p=a(fm);if(p){if(A(),!a(pm))return s("property missing ':'");var v=a(hm),h=f({type:"declaration",property:vu(p[0].replace(yu,bn)),value:v?vu(v[0].replace(yu,bn)):bn});return a(gm),h}}return l.prototype.content=e,c(),function(){var f,p=[];for(u(p);f=d();)f!==!1&&(p.push(f),u(p));return p}()}),uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.camelCase=void 0;var wm=/^--[a-zA-Z0-9_-]+$/,bm=/-([a-z])/g,km=/^[^-]+$/,xm=/^-(webkit|moz|ms|o|khtml)-/,Em=/^-(ms)-/,_m=function(e,t){return t.toUpperCase()},wu=function(e,t){return"".concat(t,"-")};uo.camelCase=function(e,t){return t===void 0&&(t={}),function(n){return!n||km.test(n)||wm.test(n)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(Em,wu):e.replace(xm,wu)).replace(bm,_m))};var Sm=(co&&co.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ol),Cm=uo;function il(e,t){var n={};return e&&typeof e=="string"&&(0,Sm.default)(e,function(r,o){r&&o&&(n[(0,Cm.camelCase)(r,t)]=o)}),n}il.default=il;var Pm=mu(il);const bu=ku("end"),ll=ku("start");function ku(e){return function(t){const n=t&&t.position&&t.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function yr(e){return e&&typeof e=="object"?"position"in e||"type"in e?xu(e.position):"start"in e||"end"in e?xu(e):"line"in e||"column"in e?sl(e):"":""}function sl(e){return Eu(e&&e.line)+":"+Eu(e&&e.column)}function xu(e){return sl(e&&e.start)+"-"+sl(e&&e.end)}function Eu(e){return e&&typeof e=="number"?e:1}class tt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},l=!1;if(n&&(i="line"in n&&"column"in n||"start"in n&&"end"in n?{place:n}:"type"in n?{ancestors:[n],place:n.position}:{...n}),typeof t=="string"?o=t:!i.cause&&t&&(l=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?i.ruleId=r:(i.source=r.slice(0,a),i.ruleId=r.slice(a+1))}if(!i.place&&i.ancestors&&i.ancestors){const a=i.ancestors[i.ancestors.length-1];a&&(i.place=a.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=s?s.line:void 0,this.name=yr(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=l&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}tt.prototype.file="",tt.prototype.name="",tt.prototype.reason="",tt.prototype.message="",tt.prototype.stack="",tt.prototype.column=void 0,tt.prototype.line=void 0,tt.prototype.ancestors=void 0,tt.prototype.cause=void 0,tt.prototype.fatal=void 0,tt.prototype.place=void 0,tt.prototype.ruleId=void 0,tt.prototype.source=void 0;const al={}.hasOwnProperty,Dm=new Map,Im=/[A-Z]/g,Bm=new Set(["table","tbody","thead","tfoot","tr"]),Tm=new Set(["td","th"]),_u="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Mm(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(l,s){return a;function a(c,u,A,d){const f=Array.isArray(A.children),p=ll(c);return s(u,A,d,f,{columnNumber:p?p.column-1:void 0,fileName:l,lineNumber:p?p.line:void 0},void 0)}}(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=function(l,s,a){return c;function c(u,A,d,f){const p=Array.isArray(d.children)?a:s;return f?p(A,d,f):p(A,d)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?rl:um,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Su(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Su(e,t,n){return t.type==="element"?function(r,o,i){const l=r.schema;let s=l;o.tagName.toLowerCase()==="svg"&&l.space==="html"&&(s=rl,r.schema=s),r.ancestors.push(o);const a=Pu(r,o.tagName,!1),c=function(A,d){const f={};let p,v;for(v in d.properties)if(v!=="children"&&al.call(d.properties,v)){const h=Om(A,v,d.properties[v]);if(h){const[w,b]=h;A.tableCellAlignToStyle&&w==="align"&&typeof b=="string"&&Tm.has(d.tagName)?p=b:f[w]=b}}return p&&((f.style||(f.style={}))[A.stylePropertyNameCase==="css"?"text-align":"textAlign"]=p),f}(r,o);let u=ul(r,o);return Bm.has(o.tagName)&&(u=u.filter(function(A){return typeof A!="string"||!(typeof(d=A)=="object"?d.type==="text"&&su(d.value):su(d));var d})),Cu(r,c,a,o),cl(c,u),r.ancestors.pop(),r.schema=l,r.create(o,a,c,i)}(e,t,n):t.type==="mdxFlowExpression"||t.type==="mdxTextExpression"?function(r,o){if(o.data&&o.data.estree&&r.evaluater){const i=o.data.estree.body[0];return i.type,r.evaluater.evaluateExpression(i.expression)}vr(r,o.position)}(e,t):t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement"?function(r,o,i){const l=r.schema;let s=l;o.name==="svg"&&l.space==="html"&&(s=rl,r.schema=s),r.ancestors.push(o);const a=o.name===null?r.Fragment:Pu(r,o.name,!0),c=function(A,d){const f={};for(const p of d.attributes)if(p.type==="mdxJsxExpressionAttribute")if(p.data&&p.data.estree&&A.evaluater){const v=p.data.estree.body[0];v.type;const h=v.expression;h.type;const w=h.properties[0];w.type,Object.assign(f,A.evaluater.evaluateExpression(w.argument))}else vr(A,d.position);else{const v=p.name;let h;if(p.value&&typeof p.value=="object")if(p.value.data&&p.value.data.estree&&A.evaluater){const w=p.value.data.estree.body[0];w.type,h=A.evaluater.evaluateExpression(w.expression)}else vr(A,d.position);else h=p.value===null||p.value;f[v]=h}return f}(r,o),u=ul(r,o);return Cu(r,c,a,o),cl(c,u),r.ancestors.pop(),r.schema=l,r.create(o,a,c,i)}(e,t,n):t.type==="mdxjsEsm"?function(r,o){if(o.data&&o.data.estree&&r.evaluater)return r.evaluater.evaluateProgram(o.data.estree);vr(r,o.position)}(e,t):t.type==="root"?function(r,o,i){const l={};return cl(l,ul(r,o)),r.create(o,r.Fragment,l,i)}(e,t,n):t.type==="text"?function(r,o){return o.value}(0,t):void 0}function Cu(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function cl(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ul(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Dm;for(;++r<t.children.length;){const i=t.children[r];let l;if(e.passKeys){const a=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(a){const c=o.get(a)||0;l=a+"-"+c,o.set(a,c+1)}}const s=Su(e,i,l);s!==void 0&&n.push(s)}return n}function Om(e,t,n){const r=function(o,i){const l=Ji(i);let s=i,a=ut;if(l in o.normal)return o.property[o.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&sm.test(i)){if(i.charAt(4)==="-"){const c=i.slice(5).replace(gu,cm);s="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=i.slice(4);if(!gu.test(c)){let u=c.replace(lm,am);u.charAt(0)!=="-"&&(u="-"+u),i="data"+u}}a=nl}return new a(s,i)}(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(o){const i={};return(o[o.length-1]===""?[...o,""]:o).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}(n):n.join(" ").trim()),r.property==="style"){let o=typeof n=="object"?n:function(i,l){try{return Pm(l,{reactCompat:!0})}catch(s){if(i.ignoreInvalidStyle)return{};const a=s,c=new tt("Cannot parse `style` attribute",{ancestors:i.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw c.file=i.filePath||void 0,c.url=_u+"#cannot-parse-style-attribute",c}}(e,String(n));return e.stylePropertyNameCase==="css"&&(o=function(i){const l={};let s;for(s in i)al.call(i,s)&&(l[Qm(s)]=i[s]);return l}(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?im[r.property]||r.property:r.attribute,n]}}function Pu(e,t,n){let r;if(n)if(t.includes(".")){const o=t.split(".");let i,l=-1;for(;++l<o.length;){const s=lu(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};i=i?{type:"MemberExpression",object:i,property:s,computed:!!(l&&s.type==="Literal"),optional:!1}:s}r=i}else r=lu(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return al.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);vr(e)}function vr(e,t){const n=new tt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=_u+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Qm(e){let t=e.replace(Im,Lm);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Lm(e){return"-"+e.toLowerCase()}const Al={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Ao={};function dl(e,t){return Du(e,typeof Ao.includeImageAlt!="boolean"||Ao.includeImageAlt,typeof Ao.includeHtml!="boolean"||Ao.includeHtml)}function Du(e,t,n){if(function(r){return!!(r&&typeof r=="object")}(e)){if("value"in e)return e.type!=="html"||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Iu(e.children,t,n)}return Array.isArray(e)?Iu(e,t,n):""}function Iu(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Du(e[o],t,n);return r.join("")}const Bu=document.createElement("i");function fl(e){const t="&"+e+";";Bu.innerHTML=t;const n=Bu.textContent;return(n.charCodeAt(n.length-1)!==59||e==="semi")&&n!==t&&n}function vt(e,t,n,r){const o=e.length;let i,l=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);l<r.length;)i=r.slice(l,l+1e4),i.unshift(t,0),e.splice(...i),l+=1e4,t+=1e4}function Et(e,t){return e.length>0?(vt(e,e.length,0,t),e):t}const Tu={}.hasOwnProperty;function Mu(e){const t={};let n=-1;for(;++n<e.length;)Nm(t,e[n]);return t}function Nm(e,t){let n;for(n in t){const r=(Tu.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Tu.call(r,i)||(r[i]=[]);const l=o[i];Rm(r[i],Array.isArray(l)?l:l?[l]:[])}}}function Rm(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);vt(e,0,0,r)}function Ou(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||(65535&n)==65534||n>1114111?"๏ฟฝ":String.fromCodePoint(n)}function Dt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const lt=ln(/[A-Za-z]/),nt=ln(/[\dA-Za-z]/),Fm=ln(/[#-'*+\--9=?A-Z^-~]/);function fo(e){return e!==null&&(e<32||e===127)}const pl=ln(/\d/),Hm=ln(/[\dA-Fa-f]/),Um=ln(/[!-/:-@[-`{-~]/);function te(e){return e!==null&&e<-2}function Ce(e){return e!==null&&(e<0||e===32)}function pe(e){return e===-2||e===-1||e===32}const po=ln(new RegExp("\\p{P}|\\p{S}","u")),kn=ln(/\s/);function ln(e){return function(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function jn(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let l="";if(i===37&&nt(e.charCodeAt(n+1))&&nt(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(l=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(l=String.fromCharCode(i,s),o=1):l="๏ฟฝ"}else l=String.fromCharCode(i);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function me(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(s){return pe(s)?(e.enter(n),l(s)):t(s)};function l(s){return pe(s)&&i++<o?(e.consume(s),l):(e.exit(n),t(s))}}const zm={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(i){return i===null?void e.consume(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),me(e,t,"linePrefix"))},function(i){return e.enter("paragraph"),r(i)});let n;return t;function r(i){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(i)}function o(i){return i===null?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(i)):te(i)?(e.consume(i),e.exit("chunkText"),r):(e.consume(i),o)}}},jm={tokenize:function(e){const t=this,n=[];let r,o,i,l=0;return s;function s(g){if(l<n.length){const k=n[l];return t.containerState=k[1],e.attempt(k[0].continuation,a,c)(g)}return c(g)}function a(g){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const k=t.events.length;let _,E=k;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){_=t.events[E][1].end;break}w(l);let P=k;for(;P<t.events.length;)t.events[P][1].end={..._},P++;return vt(t.events,E+1,0,t.events.slice(k)),t.events.length=P,c(g)}return s(g)}function c(g){if(l===n.length){if(!r)return d(g);if(r.currentConstruct&&r.currentConstruct.concrete)return p(g);t.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Qu,u,A)(g)}function u(g){return r&&b(),w(l),d(g)}function A(g){return t.parser.lazy[t.now().line]=l!==n.length,i=t.now().offset,p(g)}function d(g){return t.containerState={},e.attempt(Qu,f,p)(g)}function f(g){return l++,n.push([t.currentConstruct,t.containerState]),d(g)}function p(g){return g===null?(r&&b(),w(0),void e.consume(g)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),v(g))}function v(g){return g===null?(h(e.exit("chunkFlow"),!0),w(0),void e.consume(g)):te(g)?(e.consume(g),h(e.exit("chunkFlow")),l=0,t.interrupt=void 0,s):(e.consume(g),v)}function h(g,k){const _=t.sliceStream(g);if(k&&_.push(null),g.previous=o,o&&(o.next=g),o=g,r.defineSkip(g.start),r.write(_),t.parser.lazy[g.start.line]){let E=r.events.length;for(;E--;)if(r.events[E][1].start.offset<i&&(!r.events[E][1].end||r.events[E][1].end.offset>i))return;const P=t.events.length;let x,B,D=P;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(x){B=t.events[D][1].end;break}x=!0}for(w(l),E=P;E<t.events.length;)t.events[E][1].end={...B},E++;vt(t.events,D+1,0,t.events.slice(P)),t.events.length=E}}function w(g){let k=n.length;for(;k-- >g;){const _=n[k];t.containerState=_[1],_[0].exit.call(t,e)}n.length=g}function b(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Qu={tokenize:function(e,t,n){return me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function qn(e){return e===null||Ce(e)||kn(e)?1:po(e)?2:void 0}function ho(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const hl={name:"attention",resolveAll:function(e,t){let n,r,o,i,l,s,a,c,u=-1;for(;++u<e.length;)if(e[u][0]==="enter"&&e[u][1].type==="attentionSequence"&&e[u][1]._close){for(n=u;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const A={...e[n][1].end},d={...e[u][1].start};Lu(A,-s),Lu(d,s),i={type:s>1?"strongSequence":"emphasisSequence",start:A,end:{...e[n][1].end}},l={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:d},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...l.end}},e[n][1].end={...i.start},e[u][1].start={...l.end},a=[],e[n][1].end.offset-e[n][1].start.offset&&(a=Et(a,[["enter",e[n][1],t],["exit",e[n][1],t]])),a=Et(a,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),a=Et(a,ho(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),a=Et(a,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,a=Et(a,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,vt(e,n-1,u-n+3,a),u=n+a.length-c-2;break}}for(u=-1;++u<e.length;)e[u][1].type==="attentionSequence"&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=qn(r);let i;return function(s){return i=s,e.enter("attentionSequence"),l(s)};function l(s){if(s===i)return e.consume(s),l;const a=e.exit("attentionSequence"),c=qn(s),u=!c||c===2&&o||n.includes(s),A=!o||o===2&&c||n.includes(r);return a._open=!!(i===42?u:u&&(o||!A)),a._close=!!(i===42?A:A&&(c||!u)),t(s)}}};function Lu(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const qm={name:"autolink",tokenize:function(e,t,n){let r=0;return function(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(d){return lt(d)?(e.consume(d),i):d===64?n(d):a(d)}function i(d){return d===43||d===45||d===46||nt(d)?(r=1,l(d)):a(d)}function l(d){return d===58?(e.consume(d),r=0,s):(d===43||d===45||d===46||nt(d))&&r++<32?(e.consume(d),l):(r=0,a(d))}function s(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||fo(d)?n(d):(e.consume(d),s)}function a(d){return d===64?(e.consume(d),c):Fm(d)?(e.consume(d),a):n(d)}function c(d){return nt(d)?u(d):n(d)}function u(d){return d===46?(e.consume(d),r=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):A(d)}function A(d){if((d===45||nt(d))&&r++<63){const f=d===45?A:u;return e.consume(d),f}return n(d)}}},wr={partial:!0,tokenize:function(e,t,n){return function(o){return pe(o)?me(e,r,"linePrefix")(o):r(o)};function r(o){return o===null||te(o)?t(o):n(o)}}},Nu={continuation:{tokenize:function(e,t,n){const r=this;return function(i){return pe(i)?me(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):o(i)};function o(i){return e.attempt(Nu,t,n)(i)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(i){if(i===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),o}return n(i)};function o(i){return pe(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}},Ru={name:"characterEscape",tokenize:function(e,t,n){return function(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),r};function r(o){return Um(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}},Fu={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,l=0;return function(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),s};function s(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),o=31,i=nt,c(u))}function a(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=Hm,c):(e.enter("characterReferenceValue"),o=7,i=pl,c(u))}function c(u){if(u===59&&l){const A=e.exit("characterReferenceValue");return i!==nt||fl(r.sliceSerialize(A))?(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(u)}return i(u)&&l++<o?(e.consume(u),c):n(u)}}},Hu={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o)};function o(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}},Uu={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(g,k,_){let E=0;return P;function P(C){return g.enter("lineEnding"),g.consume(C),g.exit("lineEnding"),x}function x(C){return g.enter("codeFencedFence"),pe(C)?me(g,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):B(C)}function B(C){return C===i?(g.enter("codeFencedFenceSequence"),D(C)):_(C)}function D(C){return C===i?(E++,g.consume(C),D):E>=s?(g.exit("codeFencedFenceSequence"),pe(C)?me(g,T,"whitespace")(C):T(C)):_(C)}function T(C){return C===null||te(C)?(g.exit("codeFencedFence"),k(C)):_(C)}}};let i,l=0,s=0;return function(g){return function(k){const _=r.events[r.events.length-1];return l=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,i=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),a(k)}(g)};function a(g){return g===i?(s++,e.consume(g),a):s<3?n(g):(e.exit("codeFencedFenceSequence"),pe(g)?me(e,c,"whitespace")(g):c(g))}function c(g){return g===null||te(g)?(e.exit("codeFencedFence"),r.interrupt?t(g):e.check(Hu,f,b)(g)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(g))}function u(g){return g===null||te(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(g)):pe(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),me(e,A,"whitespace")(g)):g===96&&g===i?n(g):(e.consume(g),u)}function A(g){return g===null||te(g)?c(g):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===null||te(g)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(g)):g===96&&g===i?n(g):(e.consume(g),d)}function f(g){return e.attempt(o,b,p)(g)}function p(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),v}function v(g){return l>0&&pe(g)?me(e,h,"linePrefix",l+1)(g):h(g)}function h(g){return g===null||te(g)?e.check(Hu,f,b)(g):(e.enter("codeFlowValue"),w(g))}function w(g){return g===null||te(g)?(e.exit("codeFlowValue"),h(g)):(e.consume(g),w)}function b(g){return e.exit("codeFenced"),t(g)}}},gl={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(a){return e.enter("codeIndented"),me(e,o,"linePrefix",5)(a)};function o(a){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(a):n(a)}function i(a){return a===null?s(a):te(a)?e.attempt(Wm,i,s)(a):(e.enter("codeFlowValue"),l(a))}function l(a){return a===null||te(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),l)}function s(a){return e.exit("codeIndented"),t(a)}}},Wm={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):te(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):me(e,i,"linePrefix",5)(l)}function i(l){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):te(l)?o(l):n(l)}}},Gm={name:"codeText",previous:function(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"},resolve:function(e){let t,n,r=e.length-4,o=3;if(!(e[o][1].type!=="lineEnding"&&e[o][1].type!=="space"||e[r][1].type!=="lineEnding"&&e[r][1].type!=="space")){for(t=o;++t<r;)if(e[t][1].type==="codeTextData"){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}}for(t=o-1,r++;++t<=r;)n===void 0?t!==r&&e[t][1].type!=="lineEnding"&&(n=t):t!==r&&e[t][1].type!=="lineEnding"||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(u){return e.enter("codeText"),e.enter("codeTextSequence"),l(u)};function l(u){return u===96?(e.consume(u),i++,l):(e.exit("codeTextSequence"),s(u))}function s(u){return u===null?n(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),s):u===96?(o=e.enter("codeTextSequence"),r=0,c(u)):te(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):(e.enter("codeTextData"),a(u))}function a(u){return u===null||u===32||u===96||te(u)?(e.exit("codeTextData"),s(u)):(e.consume(u),a)}function c(u){return u===96?(e.consume(u),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(u)):(o.type="codeTextData",a(u))}}};class Ym{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&br(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),br(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),br(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);br(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);br(this.left,n.reverse())}}}function br(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function zu(e){const t={};let n,r,o,i,l,s,a,c=-1;const u=new Ym(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&n[1].type==="chunkFlow"&&u.get(c-1)[1].type==="listItemPrefix"&&(s=n[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,Vm(u,c)),c=t[c],a=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if(i[1].type!=="linePrefix"&&i[1].type!=="listItemIndent")break;r&&(n[1].end={...u.get(r)[1].start},l=u.slice(r,c),l.unshift(n),u.splice(r,c-r+1,l))}}return vt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!a}function Vm(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const s=l.events,a=[],c={};let u,A,d=-1,f=n,p=0,v=0;const h=[v];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),A&&l.defineSkip(f.start),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(u),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),A=f,f=f.next}for(f=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(v=d+1,h.push(v),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(l.events=[],f?(f._tokenizer=void 0,f.previous=void 0):h.pop(),d=h.length;d--;){const w=s.slice(h[d],h[d+1]),b=i.pop();a.push([b,b+w.length-1]),e.splice(b,2,w)}for(a.reverse(),d=-1;++d<a.length;)c[p+a[d][0]]=p+a[d][1],p+=a[d][1]-a[d][0]-1;return c}const $m={resolve:function(e){return zu(e),e},tokenize:function(e,t){let n;return function(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(l)};function r(l){return l===null?o(l):te(l)?e.check(Km,i,o)(l):(e.consume(l),r)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function i(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Km={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),me(e,o,"linePrefix")};function o(i){if(i===null||te(i))return n(i);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};function ju(e,t,n,r,o,i,l,s,a){const c=a||Number.POSITIVE_INFINITY;let u=0;return function(h){return h===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(h),e.exit(i),A):h===null||h===32||h===41||fo(h)?n(h):(e.enter(r),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),p(h))};function A(h){return h===62?(e.enter(i),e.consume(h),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===62?(e.exit("chunkString"),e.exit(s),A(h)):h===null||h===60||te(h)?n(h):(e.consume(h),h===92?f:d)}function f(h){return h===60||h===62||h===92?(e.consume(h),d):d(h)}function p(h){return u||h!==null&&h!==41&&!Ce(h)?u<c&&h===40?(e.consume(h),u++,p):h===41?(e.consume(h),u--,p):h===null||h===32||h===40||fo(h)?n(h):(e.consume(h),h===92?v:p):(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(r),t(h))}function v(h){return h===40||h===41||h===92?(e.consume(h),p):p(h)}}function qu(e,t,n,r,o,i){const l=this;let s,a=0;return function(d){return e.enter(r),e.enter(o),e.consume(d),e.exit(o),e.enter(i),c};function c(d){return a>999||d===null||d===91||d===93&&!s||d===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(d):d===93?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):te(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===null||d===91||d===93||te(d)||a++>999?(e.exit("chunkString"),c(d)):(e.consume(d),s||(s=!pe(d)),d===92?A:u)}function A(d){return d===91||d===92||d===93?(e.consume(d),a++,u):u(d)}}function Wu(e,t,n,r,o,i){let l;return function(A){return A===34||A===39||A===40?(e.enter(r),e.enter(o),e.consume(A),e.exit(o),l=A===40?41:A,s):n(A)};function s(A){return A===l?(e.enter(o),e.consume(A),e.exit(o),e.exit(r),t):(e.enter(i),a(A))}function a(A){return A===l?(e.exit(i),s(l)):A===null?n(A):te(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),me(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(A))}function c(A){return A===l||A===null||te(A)?(e.exit("chunkString"),a(A)):(e.consume(A),A===92?u:c)}function u(A){return A===l||A===92?(e.consume(A),c):c(A)}}function kr(e,t){let n;return function r(o){return te(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):pe(o)?me(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Xm={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(A){return e.enter("definition"),function(d){return qu.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}(A)};function i(A){return o=Dt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),A===58?(e.enter("definitionMarker"),e.consume(A),e.exit("definitionMarker"),l):n(A)}function l(A){return Ce(A)?kr(e,s)(A):s(A)}function s(A){return ju(e,a,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(A)}function a(A){return e.attempt(Jm,c,c)(A)}function c(A){return pe(A)?me(e,u,"whitespace")(A):u(A)}function u(A){return A===null||te(A)?(e.exit("definition"),r.parser.defined.push(o),t(A)):n(A)}}},Jm={partial:!0,tokenize:function(e,t,n){return function(l){return Ce(l)?kr(e,r)(l):n(l)};function r(l){return Wu(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return pe(l)?me(e,i,"whitespace")(l):i(l)}function i(l){return l===null||te(l)?t(l):n(l)}}},Zm={name:"hardBreakEscape",tokenize:function(e,t,n){return function(o){return e.enter("hardBreakEscape"),e.consume(o),r};function r(o){return te(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}},ey={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;return e[i][1].type==="whitespace"&&(i+=2),o-2>i&&e[o][1].type==="whitespace"&&(o-=2),e[o][1].type==="atxHeadingSequence"&&(i===o-1||o-4>i&&e[o-2][1].type==="whitespace")&&(o-=i+1===o?2:4),o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},vt(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(a){return e.enter("atxHeading"),function(c){return e.enter("atxHeadingSequence"),o(c)}(a)};function o(a){return a===35&&r++<6?(e.consume(a),o):a===null||Ce(a)?(e.exit("atxHeadingSequence"),i(a)):n(a)}function i(a){return a===35?(e.enter("atxHeadingSequence"),l(a)):a===null||te(a)?(e.exit("atxHeading"),t(a)):pe(a)?me(e,i,"whitespace")(a):(e.enter("atxHeadingText"),s(a))}function l(a){return a===35?(e.consume(a),l):(e.exit("atxHeadingSequence"),i(a))}function s(a){return a===null||a===35||Ce(a)?(e.exit("atxHeadingText"),i(a)):(e.consume(a),s)}}},ty=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gu=["pre","script","style","textarea"],ny={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&(e[t][0]!=="enter"||e[t][1].type!=="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){const r=this;let o,i,l,s,a;return function(y){return function(q){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(q),c}(y)};function c(y){return y===33?(e.consume(y),u):y===47?(e.consume(y),i=!0,f):y===63?(e.consume(y),o=3,r.interrupt?t:O):lt(y)?(e.consume(y),l=String.fromCharCode(y),p):n(y)}function u(y){return y===45?(e.consume(y),o=2,A):y===91?(e.consume(y),o=5,s=0,d):lt(y)?(e.consume(y),o=4,r.interrupt?t:O):n(y)}function A(y){return y===45?(e.consume(y),r.interrupt?t:O):n(y)}function d(y){return y==="CDATA[".charCodeAt(s++)?(e.consume(y),s===6?r.interrupt?t:D:d):n(y)}function f(y){return lt(y)?(e.consume(y),l=String.fromCharCode(y),p):n(y)}function p(y){if(y===null||y===47||y===62||Ce(y)){const q=y===47,re=l.toLowerCase();return q||i||!Gu.includes(re)?ty.includes(l.toLowerCase())?(o=6,q?(e.consume(y),v):r.interrupt?t(y):D(y)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(y):i?h(y):w(y)):(o=1,r.interrupt?t(y):D(y))}return y===45||nt(y)?(e.consume(y),l+=String.fromCharCode(y),p):n(y)}function v(y){return y===62?(e.consume(y),r.interrupt?t:D):n(y)}function h(y){return pe(y)?(e.consume(y),h):x(y)}function w(y){return y===47?(e.consume(y),x):y===58||y===95||lt(y)?(e.consume(y),b):pe(y)?(e.consume(y),w):x(y)}function b(y){return y===45||y===46||y===58||y===95||nt(y)?(e.consume(y),b):g(y)}function g(y){return y===61?(e.consume(y),k):pe(y)?(e.consume(y),g):w(y)}function k(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),a=y,_):pe(y)?(e.consume(y),k):E(y)}function _(y){return y===a?(e.consume(y),a=null,P):y===null||te(y)?n(y):(e.consume(y),_)}function E(y){return y===null||y===34||y===39||y===47||y===60||y===61||y===62||y===96||Ce(y)?g(y):(e.consume(y),E)}function P(y){return y===47||y===62||pe(y)?w(y):n(y)}function x(y){return y===62?(e.consume(y),B):n(y)}function B(y){return y===null||te(y)?D(y):pe(y)?(e.consume(y),B):n(y)}function D(y){return y===45&&o===2?(e.consume(y),H):y===60&&o===1?(e.consume(y),R):y===62&&o===4?(e.consume(y),m):y===63&&o===3?(e.consume(y),O):y===93&&o===5?(e.consume(y),M):!te(y)||o!==6&&o!==7?y===null||te(y)?(e.exit("htmlFlowData"),T(y)):(e.consume(y),D):(e.exit("htmlFlowData"),e.check(ry,G,T)(y))}function T(y){return e.check(oy,C,G)(y)}function C(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),L}function L(y){return y===null||te(y)?T(y):(e.enter("htmlFlowData"),D(y))}function H(y){return y===45?(e.consume(y),O):D(y)}function R(y){return y===47?(e.consume(y),l="",Q):D(y)}function Q(y){if(y===62){const q=l.toLowerCase();return Gu.includes(q)?(e.consume(y),m):D(y)}return lt(y)&&l.length<8?(e.consume(y),l+=String.fromCharCode(y),Q):D(y)}function M(y){return y===93?(e.consume(y),O):D(y)}function O(y){return y===62?(e.consume(y),m):y===45&&o===2?(e.consume(y),O):D(y)}function m(y){return y===null||te(y)?(e.exit("htmlFlowData"),G(y)):(e.consume(y),m)}function G(y){return e.exit("htmlFlow"),t(y)}}},ry={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(wr,t,n)}}},oy={partial:!0,tokenize:function(e,t,n){const r=this;return function(i){return te(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o):n(i)};function o(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}},iy={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,l;return function(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),s};function s(m){return m===33?(e.consume(m),a):m===47?(e.consume(m),k):m===63?(e.consume(m),b):lt(m)?(e.consume(m),P):n(m)}function a(m){return m===45?(e.consume(m),c):m===91?(e.consume(m),i=0,f):lt(m)?(e.consume(m),w):n(m)}function c(m){return m===45?(e.consume(m),d):n(m)}function u(m){return m===null?n(m):m===45?(e.consume(m),A):te(m)?(l=u,Q(m)):(e.consume(m),u)}function A(m){return m===45?(e.consume(m),d):u(m)}function d(m){return m===62?R(m):m===45?A(m):u(m)}function f(m){return m==="CDATA[".charCodeAt(i++)?(e.consume(m),i===6?p:f):n(m)}function p(m){return m===null?n(m):m===93?(e.consume(m),v):te(m)?(l=p,Q(m)):(e.consume(m),p)}function v(m){return m===93?(e.consume(m),h):p(m)}function h(m){return m===62?R(m):m===93?(e.consume(m),h):p(m)}function w(m){return m===null||m===62?R(m):te(m)?(l=w,Q(m)):(e.consume(m),w)}function b(m){return m===null?n(m):m===63?(e.consume(m),g):te(m)?(l=b,Q(m)):(e.consume(m),b)}function g(m){return m===62?R(m):b(m)}function k(m){return lt(m)?(e.consume(m),_):n(m)}function _(m){return m===45||nt(m)?(e.consume(m),_):E(m)}function E(m){return te(m)?(l=E,Q(m)):pe(m)?(e.consume(m),E):R(m)}function P(m){return m===45||nt(m)?(e.consume(m),P):m===47||m===62||Ce(m)?x(m):n(m)}function x(m){return m===47?(e.consume(m),R):m===58||m===95||lt(m)?(e.consume(m),B):te(m)?(l=x,Q(m)):pe(m)?(e.consume(m),x):R(m)}function B(m){return m===45||m===46||m===58||m===95||nt(m)?(e.consume(m),B):D(m)}function D(m){return m===61?(e.consume(m),T):te(m)?(l=D,Q(m)):pe(m)?(e.consume(m),D):x(m)}function T(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),o=m,C):te(m)?(l=T,Q(m)):pe(m)?(e.consume(m),T):(e.consume(m),L)}function C(m){return m===o?(e.consume(m),o=void 0,H):m===null?n(m):te(m)?(l=C,Q(m)):(e.consume(m),C)}function L(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||Ce(m)?x(m):(e.consume(m),L)}function H(m){return m===47||m===62||Ce(m)?x(m):n(m)}function R(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function Q(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),M}function M(m){return pe(m)?me(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):O(m)}function O(m){return e.enter("htmlTextData"),l(m)}}},ml={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&vt(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,i,l=e.length,s=0;for(;l--;)if(n=e[l][1],r){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[l][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(o){if(e[l][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(r=l,n.type!=="labelLink")){s=2;break}}else n.type==="labelEnd"&&(o=l);const a={type:e[r][1].type==="labelLink"?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",a,t],["enter",c,t]],i=Et(i,e.slice(r+1,r+s+3)),i=Et(i,[["enter",u,t]]),i=Et(i,ho(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=Et(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=Et(i,e.slice(o+1)),i=Et(i,[["exit",a,t]]),vt(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,l=r.events.length;for(;l--;)if((r.events[l][1].type==="labelImage"||r.events[l][1].type==="labelLink")&&!r.events[l][1]._balanced){o=r.events[l][1];break}return function(A){return o?o._inactive?u(A):(i=r.parser.defined.includes(Dt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(A),e.exit("labelMarker"),e.exit("labelEnd"),s):n(A)};function s(A){return A===40?e.attempt(ly,c,i?c:u)(A):A===91?e.attempt(sy,c,i?a:u)(A):i?c(A):u(A)}function a(A){return e.attempt(ay,c,u)(A)}function c(A){return t(A)}function u(A){return o._balanced=!0,n(A)}}},ly={tokenize:function(e,t,n){return function(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),r};function r(u){return Ce(u)?kr(e,o)(u):o(u)}function o(u){return u===41?c(u):ju(e,i,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function i(u){return Ce(u)?kr(e,s)(u):c(u)}function l(u){return n(u)}function s(u){return u===34||u===39||u===40?Wu(e,a,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):c(u)}function a(u){return Ce(u)?kr(e,c)(u):c(u)}function c(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):n(u)}}},sy={tokenize:function(e,t,n){const r=this;return function(l){return qu.call(r,e,o,i,"reference","referenceMarker","referenceString")(l)};function o(l){return r.parser.defined.includes(Dt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function i(l){return n(l)}}},ay={tokenize:function(e,t,n){return function(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),r};function r(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}},cy={name:"labelStartImage",resolveAll:ml.resolveAll,tokenize:function(e,t,n){const r=this;return function(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o};function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),i):n(l)}function i(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}},uy={name:"labelStartLink",resolveAll:ml.resolveAll,tokenize:function(e,t,n){const r=this;return function(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),o};function o(i){return i===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(i):t(i)}}},yl={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),me(e,t,"linePrefix")}}},go={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(s){return e.enter("thematicBreak"),function(a){return r=a,i(a)}(s)};function i(s){return s===r?(e.enter("thematicBreakSequence"),l(s)):o>=3&&(s===null||te(s))?(e.exit("thematicBreak"),t(s)):n(s)}function l(s){return s===r?(e.consume(s),o++,l):(e.exit("thematicBreakSequence"),pe(s)?me(e,i,"whitespace")(s):i(s))}}},At={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(wr,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,me(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!pe(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(dy,t,l)(s))}function l(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,me(e,e.attempt(At,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return function(d){const f=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(f==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:pl(d)){if(r.containerState.type||(r.containerState.type=f,e.enter(f,{_container:!0})),f==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(go,n,a)(d):a(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(d)}return n(d)};function s(d){return pl(d)&&++l<10?(e.consume(d),s):(!r.interrupt||l<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),a(d)):n(d)}function a(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(wr,r.interrupt?n:c,e.attempt(Ay,A,u))}function c(d){return r.containerState.initialBlankLine=!0,i++,A(d)}function u(d){return pe(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),A):n(d)}function A(d){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}},Ay={partial:!0,tokenize:function(e,t,n){const r=this;return me(e,function(o){const i=r.events[r.events.length-1];return!pe(o)&&i&&i[1].type==="listItemPrefixWhitespace"?t(o):n(o)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},dy={partial:!0,tokenize:function(e,t,n){const r=this;return me(e,function(o){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(o):n(o)},"listItemIndent",r.containerState.size+1)}},Yu={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){n=i;break}e[i][1].type==="paragraph"&&(r=i)}else e[i][1].type==="content"&&e.splice(i,1),o||e[i][1].type!=="definition"||(o=i);const l={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",l,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=l,e.push(["exit",l,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(s){let a,c=r.events.length;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){a=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||a)?(e.enter("setextHeadingLine"),o=s,function(u){return e.enter("setextHeadingLineSequence"),i(u)}(s)):n(s)};function i(s){return s===o?(e.consume(s),i):(e.exit("setextHeadingLineSequence"),pe(s)?me(e,l,"lineSuffix")(s):l(s))}function l(s){return s===null||te(s)?(e.exit("setextHeadingLine"),t(s)):n(s)}}},fy={tokenize:function(e){const t=this,n=e.attempt(wr,function(o){return o===null?void e.consume(o):(e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,me(e,e.attempt(this.parser.constructs.flow,r,e.attempt($m,r)),"linePrefix")));return n;function r(o){if(o!==null)return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(o)}}},py={resolveAll:$u()},hy=Vu("string"),gy=Vu("text");function Vu(e){return{resolveAll:$u(e==="text"?my:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,l);return i;function i(c){return a(c)?o(c):l(c)}function l(c){if(c!==null)return t.enter("data"),t.consume(c),s;t.consume(c)}function s(c){return a(c)?(t.exit("data"),o(c)):(t.consume(c),s)}function a(c){if(c===null)return!0;const u=r[c];let A=-1;if(u)for(;++A<u.length;){const d=u[A];if(!d.previous||d.previous.call(n,n.previous))return!0}return!1}}}}function $u(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)r===void 0?t[o]&&t[o][1].type==="data"&&(r=o,o++):t[o]&&t[o][1].type==="data"||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function my(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i,l=o.length,s=-1,a=0;for(;l--;){const c=o[l];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(c===-2)i=!0,a++;else if(c!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const c={type:n===e.length||i||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?s:r.start._bufferIndex+s,_index:r.start._index+l,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}var yy=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Xm},disable:{null:[]},document:{42:At,43:At,45:At,48:At,49:At,50:At,51:At,52:At,53:At,54:At,55:At,56:At,57:At,62:Nu},flow:{35:ey,42:go,45:[Yu,go],60:ny,61:Yu,95:go,96:Uu,126:Uu},flowInitial:{[-2]:gl,[-1]:gl,32:gl},insideSpan:{null:[hl,py]},string:{38:Fu,92:Ru},text:{[-5]:yl,[-4]:yl,[-3]:yl,33:cy,38:Fu,42:hl,60:[qm,iy],91:uy,92:[Zm,Ru],93:ml,95:hl,96:Gm}});function vy(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let l=[],s=[];const a={attempt:h(function(g,k){w(g,k.from)}),check:h(v),consume:function(g){te(g)?(r.line++,r.column=1,r.offset+=g===-3?2:1,b()):g!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=g},enter:function(g,k){const _=k||{};return _.type=g,_.start=d(),c.events.push(["enter",_,c]),s.push(_),_},exit:function(g){const k=s.pop();return k.end=d(),c.events.push(["exit",k,c]),k},interrupt:h(v,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(g){o[g.line]=g.column,b()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(g,k){return function(_,E){let P=-1;const x=[];let B;for(;++P<_.length;){const D=_[P];let T;if(typeof D=="string")T=D;else switch(D){case-5:T="\r";break;case-4:T=`
35
+ `;break;case-3:T=`\r
36
+ `;break;case-2:T=E?" ":" ";break;case-1:if(!E&&B)continue;T=" ";break;default:T=String.fromCharCode(D)}B=D===-2,x.push(T)}return x.join("")}(A(g),k)},sliceStream:A,write:function(g){return l=Et(l,g),f(),l[l.length-1]!==null?[]:(w(t,0),c.events=ho(i,c.events,c),c.events)}};let u=t.tokenize.call(c,a);return t.resolveAll&&i.push(t),c;function A(g){return function(k,_){const E=_.start._index,P=_.start._bufferIndex,x=_.end._index,B=_.end._bufferIndex;let D;if(E===x)D=[k[E].slice(P,B)];else{if(D=k.slice(E,x),P>-1){const T=D[0];typeof T=="string"?D[0]=T.slice(P):D.shift()}B>0&&D.push(k[x].slice(0,B))}return D}(l,g)}function d(){const{_bufferIndex:g,_index:k,line:_,column:E,offset:P}=r;return{_bufferIndex:g,_index:k,line:_,column:E,offset:P}}function f(){let g;for(;r._index<l.length;){const k=l[r._index];if(typeof k=="string")for(g=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===g&&r._bufferIndex<k.length;)p(k.charCodeAt(r._bufferIndex));else p(k)}}function p(g){u=u(g)}function v(g,k){k.restore()}function h(g,k){return function(_,E,P){let x,B,D,T;return Array.isArray(_)?C(_):"tokenize"in _?C([_]):function(Q){return M;function M(O){const m=O!==null&&Q[O],G=O!==null&&Q.null;return C([...Array.isArray(m)?m:m?[m]:[],...Array.isArray(G)?G:G?[G]:[]])(O)}}(_);function C(Q){return x=Q,B=0,Q.length===0?P:L(Q[B])}function L(Q){return function(M){return T=function(){const O=d(),m=c.previous,G=c.currentConstruct,y=c.events.length,q=Array.from(s);return{from:y,restore:re};function re(){r=O,c.previous=m,c.currentConstruct=G,c.events.length=y,s=q,b()}}(),D=Q,Q.partial||(c.currentConstruct=Q),Q.name&&c.parser.constructs.disable.null.includes(Q.name)?R():Q.tokenize.call(k?Object.assign(Object.create(c),k):c,a,H,R)(M)}}function H(Q){return g(D,T),E}function R(Q){return T.restore(),++B<x.length?L(x[B]):P}}}function w(g,k){g.resolveAll&&!i.includes(g)&&i.push(g),g.resolve&&vt(c.events,k,c.events.length-k,g.resolve(c.events.slice(k),c)),g.resolveTo&&(c.events=g.resolveTo(c.events,c))}function b(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const Ku=/[\0\t\n\r]/g,wy=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function by(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),o=r===120||r===88;return Ou(n.slice(o?2:1),o?16:10)}return fl(n)||e}const Xu={}.hasOwnProperty;function ky(e,t,n){return typeof t!="string"&&(n=t,t=void 0),function(r){const o={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(dt),autolinkProtocol:C,autolinkEmail:C,atxHeading:a(Le),blockQuote:a(we),characterEscape:C,characterReference:C,codeFenced:a(ae),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(ae,c),codeText:a(_e,c),codeTextData:C,data:C,codeFlowValue:C,definition:a(xe),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(ke),hardBreakEscape:a(ze),hardBreakTrailing:a(ze),htmlFlow:a(zt,c),htmlFlowData:C,htmlText:a(zt,c),htmlTextData:C,image:a(He),label:c,link:a(dt),listItem:a(It),listItemValue:v,listOrdered:a(Pe,p),listUnordered:a(Pe),paragraph:a(an),reference:Oe,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a(Le),strong:a(cn),thematicBreak:a(ft)},exit:{atxHeading:A(),atxHeadingSequence:x,autolink:A(),autolinkEmail:$,autolinkProtocol:Y,blockQuote:A(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:st,characterReferenceMarkerNumeric:st,characterReferenceValue:Ue,characterReference:Ve,codeFenced:A(g),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:w,codeFlowValue:L,codeIndented:A(k),codeText:A(O),codeTextData:L,data:L,definition:A(),definitionDestinationString:P,definitionLabelString:_,definitionTitleString:E,emphasis:A(),hardBreakEscape:A(R),hardBreakTrailing:A(R),htmlFlow:A(Q),htmlFlowData:L,htmlText:A(M),htmlTextData:L,image:A(G),label:q,labelText:y,lineEnding:H,link:A(m),listItem:A(),listOrdered:A(),listUnordered:A(),paragraph:A(),referenceString:ye,resourceDestinationString:re,resourceTitleString:Z,resource:ce,setextHeading:A(T),setextHeadingLineSequence:D,setextHeadingText:B,strong:A(),thematicBreak:A()}};Ju(o,(r||{}).mdastExtensions||[]);const i={};return l;function l(S){let U={type:"root",children:[]};const F={stack:[U],tokenStack:[],config:o,enter:u,exit:d,buffer:c,resume:f,data:i},K=[];let W=-1;for(;++W<S.length;)(S[W][1].type==="listOrdered"||S[W][1].type==="listUnordered")&&(S[W][0]==="enter"?K.push(W):W=s(S,K.pop(),W));for(W=-1;++W<S.length;){const be=o[S[W][0]];Xu.call(be,S[W][1].type)&&be[S[W][1].type].call(Object.assign({sliceSerialize:S[W][2].sliceSerialize},F),S[W][1])}if(F.tokenStack.length>0){const be=F.tokenStack[F.tokenStack.length-1];(be[1]||Zu).call(F,void 0,be[0])}for(U.position={start:sn(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:sn(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},W=-1;++W<o.transforms.length;)U=o.transforms[W](U)||U;return U}function s(S,U,F){let K,W,be,Se,fe=U-1,Te=-1,Ne=!1;for(;++fe<=F;){const ie=S[fe];switch(ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":ie[0]==="enter"?Te++:Te--,Se=void 0;break;case"lineEndingBlank":ie[0]==="enter"&&(!K||Se||Te||be||(be=fe),Se=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Se=void 0}if(!Te&&ie[0]==="enter"&&ie[1].type==="listItemPrefix"||Te===-1&&ie[0]==="exit"&&(ie[1].type==="listUnordered"||ie[1].type==="listOrdered")){if(K){let je=fe;for(W=void 0;je--;){const Qe=S[je];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;W&&(S[W][1].type="lineEndingBlank",Ne=!0),Qe[1].type="lineEnding",W=je}else if(Qe[1].type!=="linePrefix"&&Qe[1].type!=="blockQuotePrefix"&&Qe[1].type!=="blockQuotePrefixWhitespace"&&Qe[1].type!=="blockQuoteMarker"&&Qe[1].type!=="listItemIndent")break}be&&(!W||be<W)&&(K._spread=!0),K.end=Object.assign({},W?S[W][1].start:ie[1].end),S.splice(W||fe,0,["exit",K,ie[2]]),fe++,F++}if(ie[1].type==="listItemPrefix"){const je={type:"listItem",_spread:!1,start:Object.assign({},ie[1].start),end:void 0};K=je,S.splice(fe,0,["enter",je,ie[2]]),fe++,F++,be=void 0,Se=!0}}}return S[U][1]._spread=Ne,F}function a(S,U){return F;function F(K){u.call(this,S(K),K),U&&U.call(this,K)}}function c(){this.stack.push({type:"fragment",children:[]})}function u(S,U,F){this.stack[this.stack.length-1].children.push(S),this.stack.push(S),this.tokenStack.push([U,F||void 0]),S.position={start:sn(U.start),end:void 0}}function A(S){return U;function U(F){S&&S.call(this,F),d.call(this,F)}}function d(S,U){const F=this.stack.pop(),K=this.tokenStack.pop();if(!K)throw new Error("Cannot close `"+S.type+"` ("+yr({start:S.start,end:S.end})+"): itโ€™s not open");K[0].type!==S.type&&(U?U.call(this,S,K[0]):(K[1]||Zu).call(this,S,K[0])),F.position.end=sn(S.end)}function f(){return dl(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function v(S){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(S),10),this.data.expectingFirstListItemValue=void 0)}function h(){const S=this.resume();this.stack[this.stack.length-1].lang=S}function w(){const S=this.resume();this.stack[this.stack.length-1].meta=S}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const S=this.resume();this.stack[this.stack.length-1].value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const S=this.resume();this.stack[this.stack.length-1].value=S.replace(/(\r?\n|\r)$/g,"")}function _(S){const U=this.resume(),F=this.stack[this.stack.length-1];F.label=U,F.identifier=Dt(this.sliceSerialize(S)).toLowerCase()}function E(){const S=this.resume();this.stack[this.stack.length-1].title=S}function P(){const S=this.resume();this.stack[this.stack.length-1].url=S}function x(S){const U=this.stack[this.stack.length-1];if(!U.depth){const F=this.sliceSerialize(S).length;U.depth=F}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function D(S){this.stack[this.stack.length-1].depth=this.sliceSerialize(S).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function C(S){const U=this.stack[this.stack.length-1].children;let F=U[U.length-1];F&&F.type==="text"||(F=St(),F.position={start:sn(S.start),end:void 0},U.push(F)),this.stack.push(F)}function L(S){const U=this.stack.pop();U.value+=this.sliceSerialize(S),U.position.end=sn(S.end)}function H(S){const U=this.stack[this.stack.length-1];if(this.data.atHardBreak)return U.children[U.children.length-1].position.end=sn(S.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&o.canContainEols.includes(U.type)&&(C.call(this,S),L.call(this,S))}function R(){this.data.atHardBreak=!0}function Q(){const S=this.resume();this.stack[this.stack.length-1].value=S}function M(){const S=this.resume();this.stack[this.stack.length-1].value=S}function O(){const S=this.resume();this.stack[this.stack.length-1].value=S}function m(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const U=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=U,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function G(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const U=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=U,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function y(S){const U=this.sliceSerialize(S),F=this.stack[this.stack.length-2];F.label=function(K){return K.replace(wy,by)}(U),F.identifier=Dt(U).toLowerCase()}function q(){const S=this.stack[this.stack.length-1],U=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const K=S.children;F.children=K}else F.alt=U}function re(){const S=this.resume();this.stack[this.stack.length-1].url=S}function Z(){const S=this.resume();this.stack[this.stack.length-1].title=S}function ce(){this.data.inReference=void 0}function Oe(){this.data.referenceType="collapsed"}function ye(S){const U=this.resume(),F=this.stack[this.stack.length-1];F.label=U,F.identifier=Dt(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function st(S){this.data.characterReferenceType=S.type}function Ue(S){const U=this.sliceSerialize(S),F=this.data.characterReferenceType;let K;F?(K=Ou(U,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):K=fl(U),this.stack[this.stack.length-1].value+=K}function Ve(S){this.stack.pop().position.end=sn(S.end)}function Y(S){L.call(this,S),this.stack[this.stack.length-1].url=this.sliceSerialize(S)}function $(S){L.call(this,S),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(S)}function we(){return{type:"blockquote",children:[]}}function ae(){return{type:"code",lang:null,meta:null,value:""}}function _e(){return{type:"inlineCode",value:""}}function xe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ke(){return{type:"emphasis",children:[]}}function Le(){return{type:"heading",depth:0,children:[]}}function ze(){return{type:"break"}}function zt(){return{type:"html",value:""}}function He(){return{type:"image",title:null,url:"",alt:null}}function dt(){return{type:"link",title:null,url:"",children:[]}}function Pe(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function It(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function an(){return{type:"paragraph",children:[]}}function cn(){return{type:"strong",children:[]}}function St(){return{type:"text",value:""}}function ft(){return{type:"thematicBreak"}}}(n)(function(r){for(;!zu(r););return r}(function(r){const o={constructs:Mu([yy,...(r||{}).extensions||[]]),content:i(zm),defined:[],document:i(jm),flow:i(fy),lazy:{},string:i(hy),text:i(gy)};return o;function i(l){return function(s){return vy(o,l,s)}}}(n).document().write(function(){let r,o=1,i="",l=!0;return function(s,a,c){const u=[];let A,d,f,p,v;for(s=i+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),f=0,i="",l&&(s.charCodeAt(0)===65279&&f++,l=void 0);f<s.length;){if(Ku.lastIndex=f,A=Ku.exec(s),p=A&&A.index!==void 0?A.index:s.length,v=s.charCodeAt(p),!A){i=s.slice(f);break}if(v===10&&f===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<p&&(u.push(s.slice(f,p)),o+=p-f),v){case 0:u.push(65533),o++;break;case 9:for(d=4*Math.ceil(o/4),u.push(-2);o++<d;)u.push(-1);break;case 10:u.push(-4),o=1;break;default:r=!0,o=1}f=p+1}return c&&(r&&u.push(-5),i&&u.push(i),u.push(null)),u}}()(e,t,!0))))}function sn(e){return{line:e.line,column:e.column,offset:e.offset}}function Ju(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ju(e,r):xy(e,r)}}function xy(e,t){let n;for(n in t)if(Xu.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Zu(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+yr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+yr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+yr({start:t.start,end:t.end})+") is still open")}function Ey(e){const t=this;t.parser=function(n){return ky(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function eA(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}function tA(e){const t=e.spread;return t??e.children.length>1}function _y(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(nA(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(nA(t.slice(o),o>0,!1)),i.join("")}function nA(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===9||i===32;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===9||i===32;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const Sy={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
37
+ `}]},code:function(e,t){const n=t.value?t.value+`
38
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=jn(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let l,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=i+1,s+=1,e.footnoteCounts.set(r,s);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,a);const c={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eA(e,t);const o={src:jn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:jn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eA(e,t);const o={href:jn(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:jn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(u){let A=!1;if(u.type==="list"){A=u.spread||!1;const d=u.children;let f=-1;for(;!A&&++f<d.length;)A=tA(d[f])}return A}(n):tA(t),i={},l=[];if(typeof t.checked=="boolean"){const u=r[0];let A;u&&u.type==="element"&&u.tagName==="p"?A=u:(A={type:"element",tagName:"p",properties:{},children:[]},r.unshift(A)),A.children.length>0&&A.children.unshift({type:"text",value:" "}),A.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(o||s!==0||u.type!=="element"||u.tagName!=="p")&&l.push({type:"text",value:`
39
+ `}),u.type!=="element"||u.tagName!=="p"||o?l.push(u):l.push(...u.children)}const a=r[r.length-1];a&&(o||a.type!=="element"||a.tagName!=="p")&&l.push({type:"text",value:`
40
+ `});const c={type:"element",tagName:"li",properties:i,children:l};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const l=r[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=ll(t.children[1]),a=bu(t.children[t.children.length-1]);s&&a&&(l.position={start:s,end:a}),o.push(l)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",i=n&&n.type==="table"?n.align:void 0,l=i?i.length:t.children.length;let s=-1;const a=[];for(;++s<l;){const u=t.children[s],A={},d=i?i[s]:void 0;d&&(A.align=d);let f={type:"element",tagName:o,properties:A,children:[]};u&&(f.children=e.all(u),e.patch(u,f),f=e.applyData(u,f)),a.push(f)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(a,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:_y(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:mo,yaml:mo,definition:mo,footnoteDefinition:mo};function mo(){}const rA=typeof self=="object"?self:globalThis,oA=e=>((t,n)=>{const r=(i,l)=>(t.set(l,i),i),o=i=>{if(t.has(i))return t.get(i);const[l,s]=n[i];switch(l){case 0:case-1:return r(s,i);case 1:{const a=r([],i);for(const c of s)a.push(o(c));return a}case 2:{const a=r({},i);for(const[c,u]of s)a[o(c)]=o(u);return a}case 3:return r(new Date(s),i);case 4:{const{source:a,flags:c}=s;return r(new RegExp(a,c),i)}case 5:{const a=r(new Map,i);for(const[c,u]of s)a.set(o(c),o(u));return a}case 6:{const a=r(new Set,i);for(const c of s)a.add(o(c));return a}case 7:{const{name:a,message:c}=s;return r(new rA[a](c),i)}case 8:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:a}=new Uint8Array(s);return r(new DataView(a),s)}}return r(new rA[l](s),i)};return o})(new Map,e)(0),Wn="",{toString:Cy}={},{keys:Py}=Object,xr=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const n=Cy.call(e).slice(8,-1);switch(n){case"Array":return[1,Wn];case"Object":return[2,Wn];case"Date":return[3,Wn];case"RegExp":return[4,Wn];case"Map":return[5,Wn];case"Set":return[6,Wn];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},yo=([e,t])=>e===0&&(t==="function"||t==="symbol"),iA=(e,{json:t,lossy:n}={})=>{const r=[];return((o,i,l,s)=>{const a=(u,A)=>{const d=s.push(u)-1;return l.set(A,d),d},c=u=>{if(l.has(u))return l.get(u);let[A,d]=xr(u);switch(A){case 0:{let p=u;switch(d){case"bigint":A=8,p=u.toString();break;case"function":case"symbol":if(o)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return a([-1],u)}return a([A,p],u)}case 1:{if(d){let h=u;return d==="DataView"?h=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(h=new Uint8Array(u)),a([d,[...h]],u)}const p=[],v=a([A,p],u);for(const h of u)p.push(c(h));return v}case 2:{if(d)switch(d){case"BigInt":return a([d,u.toString()],u);case"Boolean":case"Number":case"String":return a([d,u.valueOf()],u)}if(i&&"toJSON"in u)return c(u.toJSON());const p=[],v=a([A,p],u);for(const h of Py(u))!o&&yo(xr(u[h]))||p.push([c(h),c(u[h])]);return v}case 3:return a([A,u.toISOString()],u);case 4:{const{source:p,flags:v}=u;return a([A,{source:p,flags:v}],u)}case 5:{const p=[],v=a([A,p],u);for(const[h,w]of u)(o||!yo(xr(h))&&!yo(xr(w)))&&p.push([c(h),c(w)]);return v}case 6:{const p=[],v=a([A,p],u);for(const h of u)!o&&yo(xr(h))||p.push(c(h));return v}}const{message:f}=u;return a([A,{name:d,message:f}],u)};return c})(!(t||n),!!t,new Map,r)(e),r};var vo=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?oA(iA(e,t)):structuredClone(e):(e,t)=>oA(iA(e,t));function Dy(e,t){const n=[{type:"text",value:"โ†ฉ"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Iy(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const wo=function(e){if(e==null)return By;if(typeof e=="function")return bo(e);if(typeof e=="object")return Array.isArray(e)?function(t){const n=[];let r=-1;for(;++r<t.length;)n[r]=wo(t[r]);return bo(o);function o(...i){let l=-1;for(;++l<n.length;)if(n[l].apply(this,i))return!0;return!1}}(e):function(t){const n=t;return bo(r);function r(o){const i=o;let l;for(l in t)if(i[l]!==n[l])return!1;return!0}}(e);if(typeof e=="string")return function(t){return bo(n);function n(r){return r&&r.type===t}}(e);throw new Error("Expected function, string, or object as test")};function bo(e){return function(t,n,r){return!!(function(o){return o!==null&&typeof o=="object"&&"type"in o}(t)&&e.call(this,t,typeof n=="number"?n:void 0,r||void 0))}}function By(){return!0}const lA=[],Ty=!0,vl=!1;function sA(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=wo(o),l=r?-1:1;(function s(a,c,u){const A=a&&typeof a=="object"?a:{};if(typeof A.type=="string"){const f=typeof A.tagName=="string"?A.tagName:typeof A.name=="string"?A.name:void 0;Object.defineProperty(d,"name",{value:"node ("+a.type+(f?"<"+f+">":"")+")"})}return d;function d(){let f,p,v,h=lA;if((!t||i(a,c,u[u.length-1]||void 0))&&(h=function(w){return Array.isArray(w)?w:typeof w=="number"?[Ty,w]:w==null?lA:[w]}(n(a,u)),h[0]===vl))return h;if("children"in a&&a.children){const w=a;if(w.children&&h[0]!=="skip")for(p=(r?w.children.length:-1)+l,v=u.concat(w);p>-1&&p<w.children.length;){const b=w.children[p];if(f=s(b,p,v)(),f[0]===vl)return f;p=typeof f[1]=="number"?f[1]:p+l}}return h}})(e,void 0,[])()}function wl(e,t,n,r){let o,i,l;typeof t=="function"&&typeof n!="function"?(i=void 0,l=t,o=n):(i=t,l=n,o=r),sA(e,i,function(s,a){const c=a[a.length-1],u=c?c.children.indexOf(s):void 0;return l(s,u,c)},o)}const bl={}.hasOwnProperty,My={};function Oy(e,t){e.position&&(t.position=function(n){const r=ll(n),o=bu(n);if(r&&o)return{start:r,end:o}}(e))}function Qy(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:"children"in n?n.children:[n]}),n.type==="element"&&i&&Object.assign(n.properties,vo(i)),"children"in n&&n.children&&o!=null&&(n.children=o)}return n}function Ly(e,t){const n=t.data||{},r=!("value"in t)||bl.call(n,"hProperties")||bl.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Ny(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
41
+ `});++r<e.length;)r&&n.push({type:"text",value:`
42
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
43
+ `}),n}function aA(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function cA(e,t){const n=function(l,s){const a=s||My,c=new Map,u=new Map,A=new Map,d={...Sy,...a.handlers},f={all:function(p){const v=[];if("children"in p){const h=p.children;let w=-1;for(;++w<h.length;){const b=f.one(h[w],p);if(b){if(w&&h[w-1].type==="break"&&(Array.isArray(b)||b.type!=="text"||(b.value=aA(b.value)),!Array.isArray(b)&&b.type==="element")){const g=b.children[0];g&&g.type==="text"&&(g.value=aA(g.value))}Array.isArray(b)?v.push(...b):v.push(b)}}}return v},applyData:Qy,definitionById:c,footnoteById:u,footnoteCounts:A,footnoteOrder:[],handlers:d,one:function(p,v){const h=p.type,w=f.handlers[h];if(bl.call(f.handlers,h)&&w)return w(f,p,v);if(f.options.passThrough&&f.options.passThrough.includes(h)){if("children"in p){const{children:b,...g}=p,k=vo(g);return k.children=f.all(p),k}return vo(p)}return(f.options.unknownHandler||Ly)(f,p,v)},options:a,patch:Oy,wrap:Ny};return wl(l,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const v=p.type==="definition"?c:u,h=String(p.identifier).toUpperCase();v.has(h)||v.set(h,p)}}),f}(e,t),r=n.one(e,void 0),o=function(l){const s=typeof l.options.clobberPrefix=="string"?l.options.clobberPrefix:"user-content-",a=l.options.footnoteBackContent||Dy,c=l.options.footnoteBackLabel||Iy,u=l.options.footnoteLabel||"Footnotes",A=l.options.footnoteLabelTagName||"h2",d=l.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p<l.footnoteOrder.length;){const v=l.footnoteById.get(l.footnoteOrder[p]);if(!v)continue;const h=l.all(v),w=String(v.identifier).toUpperCase(),b=jn(w.toLowerCase());let g=0;const k=[],_=l.footnoteCounts.get(w);for(;_!==void 0&&++g<=_;){k.length>0&&k.push({type:"text",value:" "});let x=typeof a=="string"?a:a(p,g);typeof x=="string"&&(x={type:"text",value:x}),k.push({type:"element",tagName:"a",properties:{href:"#"+s+"fnref-"+b+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof c=="string"?c:c(p,g),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const E=h[h.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const x=E.children[E.children.length-1];x&&x.type==="text"?x.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...k)}else h.push(...k);const P={type:"element",tagName:"li",properties:{id:s+"fn-"+b},children:l.wrap(h,!0)};l.patch(v,P),f.push(P)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:A,properties:{...vo(d),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
44
+ `},{type:"element",tagName:"ol",properties:{},children:l.wrap(f,!0)},{type:"text",value:`
45
+ `}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
46
+ `},o),i}function Ry(e,t){return e&&"run"in e?async function(n,r){const o=cA(n,{file:r,...t});await e.run(o,r)}:function(n,r){return cA(n,{file:r,...e||t})}}function uA(e){if(e)throw e}var ko=Object.prototype.hasOwnProperty,AA=Object.prototype.toString,dA=Object.defineProperty,fA=Object.getOwnPropertyDescriptor,pA=function(e){return typeof Array.isArray=="function"?Array.isArray(e):AA.call(e)==="[object Array]"},hA=function(e){if(!e||AA.call(e)!=="[object Object]")return!1;var t,n=ko.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&ko.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return t===void 0||ko.call(e,t)},gA=function(e,t){dA&&t.name==="__proto__"?dA(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},mA=function(e,t){if(t==="__proto__"){if(!ko.call(e,t))return;if(fA)return fA(e,t).value}return e[t]},Fy=function e(){var t,n,r,o,i,l,s=arguments[0],a=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},a=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});a<c;++a)if((t=arguments[a])!=null)for(n in t)r=mA(s,n),s!==(o=mA(t,n))&&(u&&o&&(hA(o)||(i=pA(o)))?(i?(i=!1,l=r&&pA(r)?r:[]):l=r&&hA(r)?r:{},gA(s,{name:n,newValue:e(u,l,o)})):o!==void 0&&gA(s,{name:n,newValue:o}));return s},kl=mu(Fy);function xl(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return!(t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.toStringTag in e||Symbol.iterator in e)}function Hy(){const e=[],t={run:function(...n){let r=-1;const o=n.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);(function i(l,...s){const a=e[++r];let c=-1;if(l)o(l);else{for(;++c<n.length;)s[c]!==null&&s[c]!==void 0||(s[c]=n[c]);n=s,a?function(u,A){let d;return f;function f(...h){const w=u.length>h.length;let b;w&&h.push(p);try{b=u.apply(this,h)}catch(g){if(w&&d)throw g;return p(g)}w||(b&&b.then&&typeof b.then=="function"?b.then(v,p):b instanceof Error?p(b):v(b))}function p(h,...w){d||(d=!0,A(h,...w))}function v(h){p(null,h)}}(a,i)(...s):o(null,...s)}})(null,...n)},use:function(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Ft={basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Er(e);let n,r=0,o=-1,i=e.length;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let l=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(n){r=i+1;break}}else l<0&&(n=!0,l=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=l));return r===o?o=l:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(Er(e),e.length===0)return".";let t,n=-1,r=e.length;for(;--r;)if(e.codePointAt(r)===47){if(t){n=r;break}}else t||(t=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)},extname:function(e){Er(e);let t,n=e.length,r=-1,o=0,i=-1,l=0;for(;n--;){const s=e.codePointAt(n);if(s!==47)r<0&&(t=!0,r=n+1),s===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1);else if(t){o=n+1;break}}return i<0||r<0||l===0||l===1&&i===r-1&&i===o+1?"":e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Er(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":function(r){Er(r);const o=r.codePointAt(0)===47;let i=function(l,s){let a,c,u="",A=0,d=-1,f=0,p=-1;for(;++p<=l.length;){if(p<l.length)a=l.codePointAt(p);else{if(a===47)break;a=47}if(a===47){if(!(d===p-1||f===1))if(d!==p-1&&f===2){if(u.length<2||A!==2||u.codePointAt(u.length-1)!==46||u.codePointAt(u.length-2)!==46){if(u.length>2){if(c=u.lastIndexOf("/"),c!==u.length-1){c<0?(u="",A=0):(u=u.slice(0,c),A=u.length-1-u.lastIndexOf("/")),d=p,f=0;continue}}else if(u.length>0){u="",A=0,d=p,f=0;continue}}s&&(u=u.length>0?u+"/..":"..",A=2)}else u.length>0?u+="/"+l.slice(d+1,p):u=l.slice(d+1,p),A=p-d-1;d=p,f=0}else a===46&&f>-1?f++:f=-1}return u}(r,!o);return i.length!==0||o||(i="."),i.length>0&&r.codePointAt(r.length-1)===47&&(i+="/"),o?"/"+i:i}(t)},sep:"/"};function Er(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Uy={cwd:function(){return"/"}};function El(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function zy(e){if(typeof e=="string")e=new URL(e);else if(!El(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return function(t){if(t.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const n=t.pathname;let r=-1;for(;++r<n.length;)if(n.codePointAt(r)===37&&n.codePointAt(r+1)===50){const o=n.codePointAt(r+2);if(o===70||o===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}(e)}const _l=["history","path","basename","stem","extname","dirname"];class yA{constructor(t){let n;n=t?El(t)?{path:t}:typeof t=="string"||function(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}(t)?{value:t}:t:{},this.cwd="cwd"in n?"":Uy.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,o=-1;for(;++o<_l.length;){const i=_l[o];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}for(r in n)_l.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?Ft.basename(this.path):void 0}set basename(t){Cl(t,"basename"),Sl(t,"basename"),this.path=Ft.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ft.dirname(this.path):void 0}set dirname(t){vA(this.basename,"dirname"),this.path=Ft.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ft.extname(this.path):void 0}set extname(t){if(Sl(t,"extname"),vA(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ft.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){El(t)&&(t=zy(t)),Cl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ft.basename(this.path,this.extname):void 0}set stem(t){Cl(t,"stem"),Sl(t,"stem"),this.path=Ft.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new tt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Sl(e,t){if(e&&e.includes(Ft.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ft.sep+"`")}function Cl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function vA(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const jy=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},qy={}.hasOwnProperty;class Pl extends jy{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Hy()}copy(){const t=new Pl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(kl(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Bl("data",this.frozen),this.namespace[t]=n,this):qy.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Bl("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=xo(t),r=this.parser||this.Parser;return Dl("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Dl("process",this.parser||this.Parser),Il("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,l){const s=xo(t),a=r.parse(s);function c(u,A){u||!A?l(u):i?i(A):n(void 0,A)}r.run(a,s,function(u,A,d){if(u||!A||!d)return c(u);const f=A,p=r.stringify(f,d);var v;typeof(v=p)=="string"||function(h){return!!(h&&typeof h=="object"&&"byteLength"in h&&"byteOffset"in h)}(v)?d.value=p:d.result=p,c(u,d)})}}processSync(t){let n,r=!1;return this.freeze(),Dl("processSync",this.parser||this.Parser),Il("processSync",this.compiler||this.Compiler),this.process(t,function(o,i){r=!0,uA(o),n=i}),bA("processSync","process",r),n}run(t,n,r){wA(t),this.freeze();const o=this.transformers;return r||typeof n!="function"||(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(l,s){const a=xo(n);o.run(t,a,function(c,u,A){const d=u||t;c?s(c):l?l(d):r(void 0,d,A)})}}runSync(t,n){let r,o=!1;return this.run(t,n,function(i,l){uA(i),r=l,o=!0}),bA("runSync","run",o),r}stringify(t,n){this.freeze();const r=xo(n),o=this.compiler||this.Compiler;return Il("stringify",o),wA(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Bl("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else{if(typeof t!="object")throw new TypeError("Expected usable value, not `"+t+"`");Array.isArray(t)?s(t):l(t)}return this;function i(c){if(typeof c=="function")a(c,[]);else{if(typeof c!="object")throw new TypeError("Expected usable value, not `"+c+"`");if(Array.isArray(c)){const[u,...A]=c;a(u,A)}else l(c)}}function l(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(o.settings=kl(!0,o.settings,c.settings))}function s(c){let u=-1;if(c!=null){if(!Array.isArray(c))throw new TypeError("Expected a list of plugins, not `"+c+"`");for(;++u<c.length;)i(c[u])}}function a(c,u){let A=-1,d=-1;for(;++A<r.length;)if(r[A][0]===c){d=A;break}if(d===-1)r.push([c,...u]);else if(u.length>0){let[f,...p]=u;const v=r[d][1];xl(v)&&xl(f)&&(f=kl(!0,v,f)),r[d]=[c,f,...p]}}}}const Wy=new Pl().freeze();function Dl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Il(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Bl(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function wA(e){if(!xl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function bA(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function xo(e){return function(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}(e)?e:new yA(e)}const kA=[],xA={allowDangerousHtml:!0},Gy=/^(https?|ircs?|mailto|xmpp)$/i,Yy=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Vy(e){const t=function(r){const o=r.rehypePlugins||kA,i=r.remarkPlugins||kA,l=r.remarkRehypeOptions?{...r.remarkRehypeOptions,...xA}:xA;return Wy().use(Ey).use(i).use(Ry,l).use(o)}(e),n=function(r){const o=r.children||"",i=new yA;return typeof o=="string"&&(i.value=o),i}(e);return function(r,o){const i=o.allowedElements,l=o.allowElement,s=o.components,a=o.disallowedElements,c=o.skipHtml,u=o.unwrapDisallowed,A=o.urlTransform||$y;for(const f of Yy)Object.hasOwn(o,f.from)&&(f.from,f.to&&f.to,f.id,void 0);return o.className&&(r={type:"element",tagName:"div",properties:{className:o.className},children:r.type==="root"?r.children:[r]}),wl(r,d),Mm(r,{Fragment:ge,components:s,ignoreInvalidStyle:!0,jsx:I,jsxs:I,passKeys:!0,passNode:!0});function d(f,p,v){if(f.type==="raw"&&v&&typeof p=="number")return c?v.children.splice(p,1):v.children[p]={type:"text",value:f.value},p;if(f.type==="element"){let h;for(h in Al)if(Object.hasOwn(Al,h)&&Object.hasOwn(f.properties,h)){const w=f.properties[h],b=Al[h];(b===null||b.includes(f.tagName))&&(f.properties[h]=A(String(w||""),h,f))}}if(f.type==="element"){let h=i?!i.includes(f.tagName):!!a&&a.includes(f.tagName);if(!h&&l&&typeof p=="number"&&(h=!l(f,p,v)),h&&v&&typeof p=="number")return u&&f.children?v.children.splice(p,1,...f.children):v.children.splice(p,1),p}}}(t.runSync(t.parse(n),n),e)}function $y(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||Gy.test(e.slice(0,t))?e:""}function EA(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function Ky(e,t,n){const r=wo((n||{}).ignore||[]),o=function(s){const a=[];if(!Array.isArray(s))throw new TypeError("Expected find and replace tuple or list of tuples");const c=!s[0]||Array.isArray(s[0])?s:[s];let u=-1;for(;++u<c.length;){const A=c[u];a.push([Xy(A[0]),Jy(A[1])])}return a}(t);let i=-1;for(;++i<o.length;)sA(e,"text",l);function l(s,a){let c,u=-1;for(;++u<a.length;){const A=a[u],d=c?c.children:void 0;if(r(A,d?d.indexOf(A):void 0,c))return;c=A}if(c)return function(A,d){const f=d[d.length-1],p=o[i][0],v=o[i][1];let h=0;const w=f.children.indexOf(A);let b=!1,g=[];p.lastIndex=0;let k=p.exec(A.value);for(;k;){const _=k.index,E={index:k.index,input:k.input,stack:[...d,A]};let P=v(...k,E);if(typeof P=="string"&&(P=P.length>0?{type:"text",value:P}:void 0),P===!1?p.lastIndex=_+1:(h!==_&&g.push({type:"text",value:A.value.slice(h,_)}),Array.isArray(P)?g.push(...P):P&&g.push(P),h=_+k[0].length,b=!0),!p.global)break;k=p.exec(A.value)}return b?(h<A.value.length&&g.push({type:"text",value:A.value.slice(h)}),f.children.splice(w,1,...g)):g=[A],w+g.length}(s,a)}}function Xy(e){return typeof e=="string"?new RegExp(function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Jy(e){return typeof e=="function"?e:function(){return e}}const Tl="phrasing",Ml=["autolink","link","image","label"];function Zy(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ol(e){this.config.enter.autolinkProtocol.call(this,e)}function ev(e){this.config.exit.autolinkProtocol.call(this,e)}function tv(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function nv(e){this.config.exit.autolinkEmail.call(this,e)}function rv(e){this.exit(e)}function ov(e){Ky(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,iv],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),lv]],{ignore:["link","linkReference"]})}function iv(e,t,n,r,o){let i="";if(!_A(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(a){const c=a.split(".");return!(c.length<2||c[c.length-1]&&(/_/.test(c[c.length-1])||!/[a-zA-Z\d]/.test(c[c.length-1]))||c[c.length-2]&&(/_/.test(c[c.length-2])||!/[a-zA-Z\d]/.test(c[c.length-2])))}(n)))return!1;const l=function(a){const c=/[!"&'),.:;<>?\]}]+$/.exec(a);if(!c)return[a,void 0];a=a.slice(0,c.index);let u=c[0],A=u.indexOf(")");const d=EA(a,"(");let f=EA(a,")");for(;A!==-1&&d>f;)a+=u.slice(0,A+1),u=u.slice(A+1),A=u.indexOf(")"),f++;return[a,u]}(n+r);if(!l[0])return!1;const s={type:"link",title:null,url:i+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[s,{type:"text",value:l[1]}]:s}function lv(e,t,n,r){return!(!_A(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function _A(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||kn(n)||po(n))&&(!t||n!==47)}function sv(){this.buffer()}function av(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function cv(){this.buffer()}function uv(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Av(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Dt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dv(e){this.exit(e)}function fv(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Dt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pv(e){this.exit(e)}function SA(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const l=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),l(),i+=o.move("]"),i}function hv(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(n,r,o,i){const l=o.createTracker(i);let s=l.move("[^");const a=o.enter("footnoteDefinition"),c=o.enter("label");return s+=l.move(o.safe(o.associationId(n),{before:s,after:"]"})),c(),s+=l.move("]:"),n.children&&n.children.length>0&&(l.shift(4),s+=l.move((t?`
47
+ `:" ")+o.indentLines(o.containerFlow(n,l.current()),t?CA:gv))),a(),s},footnoteReference:SA},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function gv(e,t,n){return t===0?e:CA(e,t,n)}function CA(e,t,n){return(n?"":" ")+e}SA.peek=function(){return"["};const mv=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function yv(e){this.enter({type:"delete",children:[]},e)}function vv(e){this.exit(e)}function PA(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let l=o.move("~~");return l+=n.containerPhrasing(e,{...o.current(),before:l,after:"~"}),l+=o.move("~~"),i(),l}function wv(e){return e.length}function bv(e){return e==null?"":String(e)}function DA(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function kv(e,t,n){return">"+(n?"":" ")+e}function xv(e,t){return IA(e,t.inConstruct,!0)&&!IA(e,t.notInConstruct,!1)}function IA(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function BA(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
48
+ `&&xv(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
49
+ `}function Ev(e,t,n){return(n?"":" ")+e}function Ql(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function _r(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Eo(e,t,n){const r=qn(e),o=qn(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function TA(e,t,n,r){const o=function(p){const v=p.options.emphasis||"*";if(v!=="*"&&v!=="_")throw new Error("Cannot serialize emphasis with `"+v+"` for `options.emphasis`, expected `*`, or `_`");return v}(n),i=n.enter("emphasis"),l=n.createTracker(r),s=l.move(o);let a=l.move(n.containerPhrasing(e,{after:o,before:s,...l.current()}));const c=a.charCodeAt(0),u=Eo(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(a=_r(c)+a.slice(1));const A=a.charCodeAt(a.length-1),d=Eo(r.after.charCodeAt(0),A,o);d.inside&&(a=a.slice(0,-1)+_r(A));const f=l.move(o);return i(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},s+a+f}function MA(e){return e.value||""}function OA(e,t,n,r){const o=Ql(n),i=o==='"'?"Quote":"Apostrophe",l=n.enter("image");let s=n.enter("label");const a=n.createTracker(r);let c=a.move("![");return c+=a.move(n.safe(e.alt,{before:c,after:"]",...a.current()})),c+=a.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(s=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),s()),c+=a.move(")"),l(),c}function QA(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let l=n.enter("label");const s=n.createTracker(r);let a=s.move("![");const c=n.safe(e.alt,{before:a,after:"]",...s.current()});a+=s.move(c+"]["),l();const u=n.stack;n.stack=[],l=n.enter("reference");const A=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return l(),n.stack=u,i(),o!=="full"&&c&&c===A?o==="shortcut"?a=a.slice(0,-1):a+=s.move("]"):a+=s.move(A+"]"),a}function LA(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const l=n.unsafe[i],s=n.compilePattern(l);let a;if(l.atBreak)for(;a=s.exec(r);){let c=a.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(a.index+1)}}return o+r+o}function NA(e,t){const n=dl(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function RA(e,t,n,r){const o=Ql(n),i=o==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let s,a;if(NA(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let A=l.move("<");return A+=l.move(n.containerPhrasing(e,{before:A,after:">",...l.current()})),A+=l.move(">"),s(),n.stack=u,A}s=n.enter("link"),a=n.enter("label");let c=l.move("[");return c+=l.move(n.containerPhrasing(e,{before:c,after:"](",...l.current()})),c+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),a()),c+=l.move(")"),s(),c}function FA(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let l=n.enter("label");const s=n.createTracker(r);let a=s.move("[");const c=n.containerPhrasing(e,{before:a,after:"]",...s.current()});a+=s.move(c+"]["),l();const u=n.stack;n.stack=[],l=n.enter("reference");const A=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return l(),n.stack=u,i(),o!=="full"&&c&&c===A?o==="shortcut"?a=a.slice(0,-1):a+=s.move("]"):a+=s.move(A+"]"),a}function Ll(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function HA(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}PA.peek=function(){return"~"},TA.peek=function(e,t,n){return n.options.emphasis||"*"},MA.peek=function(){return"<"},OA.peek=function(){return"!"},QA.peek=function(){return"!"},LA.peek=function(){return"`"},RA.peek=function(e,t,n){return NA(e,n)?"<":"["},FA.peek=function(){return"["};const _v=wo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function UA(e,t,n,r){const o=function(p){const v=p.options.strong||"*";if(v!=="*"&&v!=="_")throw new Error("Cannot serialize strong with `"+v+"` for `options.strong`, expected `*`, or `_`");return v}(n),i=n.enter("strong"),l=n.createTracker(r),s=l.move(o+o);let a=l.move(n.containerPhrasing(e,{after:o,before:s,...l.current()}));const c=a.charCodeAt(0),u=Eo(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(a=_r(c)+a.slice(1));const A=a.charCodeAt(a.length-1),d=Eo(r.after.charCodeAt(0),A,o);d.inside&&(a=a.slice(0,-1)+_r(A));const f=l.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},s+a+f}UA.peek=function(e,t,n){return n.options.strong||"*"};const zA={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const l=n.indentLines(n.containerFlow(e,i.current()),kv);return o(),l},break:BA,code:function(e,t,n,r){const o=function(A){const d=A.options.fence||"`";if(d!=="`"&&d!=="~")throw new Error("Cannot serialize code with `"+d+"` for `options.fence`, expected `` ` `` or `~`");return d}(n),i=e.value||"",l=o==="`"?"GraveAccent":"Tilde";if(function(A,d){return!!(d.options.fences===!1&&A.value&&!A.lang&&/[^ \r\n]/.test(A.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(A.value))}(e,n)){const A=n.enter("codeIndented"),d=n.indentLines(i,Ev);return A(),d}const s=n.createTracker(r),a=o.repeat(Math.max(function(A,d){const f=String(A);let p=f.indexOf(d),v=p,h=0,w=0;if(typeof d!="string")throw new TypeError("Expected substring");for(;p!==-1;)p===v?++h>w&&(w=h):h=1,v=p+d.length,p=f.indexOf(d,v);return w}(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(a);if(e.lang){const A=n.enter(`codeFencedLang${l}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),A()}if(e.lang&&e.meta){const A=n.enter(`codeFencedMeta${l}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:`
50
+ `,encode:["`"],...s.current()})),A()}return u+=s.move(`
51
+ `),i&&(u+=s.move(i+`
52
+ `)),u+=s.move(a),c(),u},definition:function(e,t,n,r){const o=Ql(n),i=o==='"'?"Quote":"Apostrophe",l=n.enter("definition");let s=n.enter("label");const a=n.createTracker(r);let c=a.move("[");return c+=a.move(n.safe(n.associationId(e),{before:c,after:"]",...a.current()})),c+=a.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(s=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":`
53
+ `,...a.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),s()),l(),c},emphasis:TA,hardBreak:BA,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(u,A){let d=!1;return wl(u,function(f){if("value"in f&&/\r?\n|\r/.test(f.value)||f.type==="break")return d=!0,vl}),!!((!u.depth||u.depth<3)&&dl(u)&&(A.options.setext||d))}(e,n)){const u=n.enter("headingSetext"),A=n.enter("phrasing"),d=n.containerPhrasing(e,{...i.current(),before:`
54
+ `,after:`
55
+ `});return A(),u(),d+`
56
+ `+(o===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
57
+ `))+1))}const l="#".repeat(o),s=n.enter("headingAtx"),a=n.enter("phrasing");i.move(l+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
58
+ `,...i.current()});return/^[\t ]/.test(c)&&(c=_r(c.charCodeAt(0))+c.slice(1)),c=c?l+" "+c:l,n.options.closeAtx&&(c+=" "+l),a(),s(),c},html:MA,image:OA,imageReference:QA,inlineCode:LA,link:RA,linkReference:FA,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let l=e.ordered?function(u){const A=u.options.bulletOrdered||".";if(A!=="."&&A!==")")throw new Error("Cannot serialize items with `"+A+"` for `options.bulletOrdered`, expected `.` or `)`");return A}(n):Ll(n);const s=e.ordered?l==="."?")":".":function(u){const A=Ll(u),d=u.options.bulletOther;if(!d)return A==="*"?"-":"*";if(d!=="*"&&d!=="+"&&d!=="-")throw new Error("Cannot serialize items with `"+d+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(d===A)throw new Error("Expected `bullet` (`"+A+"`) and `bulletOther` (`"+d+"`) to be different");return d}(n);let a=!(!t||!n.bulletLastUsed)&&l===n.bulletLastUsed;if(!e.ordered){const u=e.children?e.children[0]:void 0;if(l!=="*"&&l!=="-"||!u||u.children&&u.children[0]||n.stack[n.stack.length-1]!=="list"||n.stack[n.stack.length-2]!=="listItem"||n.stack[n.stack.length-3]!=="list"||n.stack[n.stack.length-4]!=="listItem"||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(a=!0),HA(n)===l&&u){let A=-1;for(;++A<e.children.length;){const d=e.children[A];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(l=s),n.bulletCurrent=l;const c=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=i,o(),c},listItem:function(e,t,n,r){const o=function(u){const A=u.options.listItemIndent||"one";if(A!=="tab"&&A!=="one"&&A!=="mixed")throw new Error("Cannot serialize items with `"+A+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return A}(n);let i=n.bulletCurrent||Ll(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let l=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=4*Math.ceil(l/4));const s=n.createTracker(r);s.move(i+" ".repeat(l-i.length)),s.shift(l);const a=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(u,A,d){return A?(d?"":" ".repeat(l))+u:(d?i:i+" ".repeat(l-i.length))+u});return a(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),l=n.containerPhrasing(e,r);return i(),o(),l},root:function(e,t,n,r){return(e.children.some(function(i){return _v(i)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:UA,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(HA(n)+(n.options.ruleSpaces?" ":"")).repeat(function(o){const i=o.options.ruleRepetition||3;if(i<3)throw new Error("Cannot serialize rules with repetition `"+i+"` for `options.ruleRepetition`, expected `3` or more");return i}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Sv(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Cv(e){this.exit(e),this.data.inTable=void 0}function Pv(e){this.enter({type:"tableRow",children:[]},e)}function Nl(e){this.exit(e)}function jA(e){this.enter({type:"tableCell",children:[]},e)}function Dv(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Iv));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Iv(e,t){return t==="|"?t:e}function Bv(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
59
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(c,u,A){let d=zA.inlineCode(c,u,A);return A.stack.includes("tableCell")&&(d=d.replace(/\|/g,"\\$&")),d},table:function(c,u,A,d){return s(function(f,p,v){const h=f.children;let w=-1;const b=[],g=p.enter("table");for(;++w<h.length;)b[w]=a(h[w],p,v);return g(),b}(c,A,d),c.align)},tableCell:l,tableRow:function(c,u,A,d){const f=a(c,A,d),p=s([f]);return p.slice(0,p.indexOf(`
60
+ `))}}};function l(c,u,A,d){const f=A.enter("tableCell"),p=A.enter("phrasing"),v=A.containerPhrasing(c,{...d,before:i,after:i});return p(),f(),v}function s(c,u){return function(A,d){const f=d||{},p=(f.align||[]).concat(),v=f.stringLength||wv,h=[],w=[],b=[],g=[];let k=0,_=-1;for(;++_<A.length;){const D=[],T=[];let C=-1;for(A[_].length>k&&(k=A[_].length);++C<A[_].length;){const L=bv(A[_][C]);if(f.alignDelimiters!==!1){const H=v(L);T[C]=H,(g[C]===void 0||H>g[C])&&(g[C]=H)}D.push(L)}w[_]=D,b[_]=T}let E=-1;if(typeof p=="object"&&"length"in p)for(;++E<k;)h[E]=DA(p[E]);else{const D=DA(p);for(;++E<k;)h[E]=D}E=-1;const P=[],x=[];for(;++E<k;){const D=h[E];let T="",C="";D===99?(T=":",C=":"):D===108?T=":":D===114&&(C=":");let L=f.alignDelimiters===!1?1:Math.max(1,g[E]-T.length-C.length);const H=T+"-".repeat(L)+C;f.alignDelimiters!==!1&&(L=T.length+L+C.length,L>g[E]&&(g[E]=L),x[E]=L),P[E]=H}w.splice(1,0,P),b.splice(1,0,x),_=-1;const B=[];for(;++_<w.length;){const D=w[_],T=b[_];E=-1;const C=[];for(;++E<k;){const L=D[E]||"";let H="",R="";if(f.alignDelimiters!==!1){const Q=g[E]-(T[E]||0),M=h[E];M===114?H=" ".repeat(Q):M===99?Q%2?(H=" ".repeat(Q/2+.5),R=" ".repeat(Q/2-.5)):(H=" ".repeat(Q/2),R=H):R=" ".repeat(Q)}f.delimiterStart===!1||E||C.push("|"),f.padding===!1||f.alignDelimiters===!1&&L===""||f.delimiterStart===!1&&!E||C.push(" "),f.alignDelimiters!==!1&&C.push(H),C.push(L),f.alignDelimiters!==!1&&C.push(R),f.padding!==!1&&C.push(" "),f.delimiterEnd===!1&&E===k-1||C.push("|")}B.push(f.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return B.join(`
61
+ `)}(c,{align:u,alignDelimiters:r,padding:n,stringLength:o})}function a(c,u,A){const d=c.children;let f=-1;const p=[],v=u.enter("tableRow");for(;++f<d.length;)p[f]=l(d[f],0,u,A);return v(),p}}function qA(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Tv(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i,l=-1;for(;++l<o.length;){const s=o[l];if(s.type==="paragraph"){i=s;break}}i===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Mv(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(l);let a=zA.listItem(e,t,n,{...r,...s.current()});return i&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(c){return c+l})),a}const Ov={tokenize:function(e,t,n){let r=0;return function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)};function o(i){return i===null?n(i):t(i)}},partial:!0},WA={tokenize:function(e,t,n){let r,o,i;return l;function l(c){return c===46||c===95?e.check(YA,a,s)(c):c===null||Ce(c)||kn(c)||c!==45&&po(c)?a(c):(i=!0,e.consume(c),l)}function s(c){return c===95?r=!0:(o=r,r=void 0),e.consume(c),l}function a(c){return o||r||!i?n(c):t(c)}},partial:!0},GA={tokenize:function(e,t){let n=0,r=0;return o;function o(l){return l===40?(n++,e.consume(l),o):l===41&&r<n?i(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(YA,t,i)(l):l===null||Ce(l)||kn(l)?t(l):(e.consume(l),o)}function i(l){return l===41&&r++,e.consume(l),o}},partial:!0},YA={tokenize:function(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||Ce(s)||kn(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||Ce(s)||kn(s)?t(s):r(s)}function i(s){return lt(s)?l(s):n(s)}function l(s){return s===59?(e.consume(s),r):lt(s)?(e.consume(s),l):n(s)}},partial:!0},Qv={tokenize:function(e,t,n){return function(o){return e.consume(o),r};function r(o){return nt(o)?n(o):t(o)}},partial:!0},VA={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(i){return i!==87&&i!==119||!KA.call(r,r.previous)||Fl(r.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ov,e.attempt(WA,e.attempt(GA,o),n),n)(i))};function o(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}},previous:KA},$A={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(u){return(u===72||u===104)&&XA.call(r,r.previous)&&!Fl(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(u),e.consume(u),l):n(u)};function l(u){if(lt(u)&&o.length<5)return o+=String.fromCodePoint(u),e.consume(u),l;if(u===58){const A=o.toLowerCase();if(A==="http"||A==="https")return e.consume(u),s}return n(u)}function s(u){return u===47?(e.consume(u),i?a:(i=!0,s)):n(u)}function a(u){return u===null||fo(u)||Ce(u)||kn(u)||po(u)?n(u):e.attempt(WA,e.attempt(GA,c),n)(u)}function c(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}},previous:XA},Vt={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(u){return!Rl(u)||!JA.call(r,r.previous)||Fl(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(u))};function l(u){return Rl(u)?(e.consume(u),l):u===64?(e.consume(u),s):n(u)}function s(u){return u===46?e.check(Qv,c,a)(u):u===45||u===95||nt(u)?(i=!0,e.consume(u),s):c(u)}function a(u){return e.consume(u),o=!0,s}function c(u){return i&&o&&lt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}},previous:JA},Ht={};let xn=48;for(;xn<123;)Ht[xn]=Vt,xn++,xn===58?xn=65:xn===91&&(xn=97);function KA(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ce(e)}function XA(e){return!lt(e)}function JA(e){return!(e===47||Rl(e))}function Rl(e){return e===43||e===45||e===46||e===95||nt(e)}function Fl(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Ht[43]=Vt,Ht[45]=Vt,Ht[46]=Vt,Ht[95]=Vt,Ht[72]=[Vt,$A],Ht[104]=[Vt,$A],Ht[87]=[Vt,VA],Ht[119]=[Vt,VA];const Lv={tokenize:function(e,t,n){const r=this;return me(e,function(o){const i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(o):n(o)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function Nv(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const s=r.events[o][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return function(s){if(!l||!l._balanced)return n(s);const a=Dt(r.sliceSerialize({start:l.end,end:r.now()}));return a.codePointAt(0)!==94||!i.includes(a.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function Rv(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Fv(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,l=0;return function(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),s};function s(u){return u!==94?n(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",a)}function a(u){if(l>999||u===93&&!i||u===null||u===91||Ce(u))return n(u);if(u===93){e.exit("chunkString");const A=e.exit("gfmFootnoteCallString");return o.includes(Dt(r.sliceSerialize(A)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return Ce(u)||(i=!0),l++,e.consume(u),u===92?c:a}function c(u){return u===91||u===92||u===93?(e.consume(u),l++,a):a(u)}}function Hv(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,l,s=0;return function(f){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(f),e.exit("gfmFootnoteDefinitionLabelMarker"),a};function a(f){return f===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(f),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(f)}function c(f){if(s>999||f===93&&!l||f===null||f===91||Ce(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteDefinitionLabelString");return i=Dt(r.sliceSerialize(p)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(f),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),A}return Ce(f)||(l=!0),s++,e.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(e.consume(f),s++,c):c(f)}function A(f){return f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),o.includes(i)||o.push(i),me(e,d,"gfmFootnoteDefinitionWhitespace")):n(f)}function d(f){return t(f)}}function Uv(e,t,n){return e.check(wr,t,e.attempt(Lv,t,n))}function zv(e){e.exit("gfmFootnoteDefinition")}function jv(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(r,o,i){const l=this.previous,s=this.events;let a=0;return function(u){return l===126&&s[s.length-1][1].type!=="characterEscape"?i(u):(r.enter("strikethroughSequenceTemporary"),c(u))};function c(u){const A=qn(l);if(u===126)return a>1?i(u):(r.consume(u),a++,c);if(a<2&&!t)return i(u);const d=r.exit("strikethroughSequenceTemporary"),f=qn(u);return d._open=!f||f===2&&!!A,d._close=!A||A===2&&!!f,o(u)}},resolveAll:function(r,o){let i=-1;for(;++i<r.length;)if(r[i][0]==="enter"&&r[i][1].type==="strikethroughSequenceTemporary"&&r[i][1]._close){let l=i;for(;l--;)if(r[l][0]==="exit"&&r[l][1].type==="strikethroughSequenceTemporary"&&r[l][1]._open&&r[i][1].end.offset-r[i][1].start.offset===r[l][1].end.offset-r[l][1].start.offset){r[i][1].type="strikethroughSequence",r[l][1].type="strikethroughSequence";const s={type:"strikethrough",start:Object.assign({},r[l][1].start),end:Object.assign({},r[i][1].end)},a={type:"strikethroughText",start:Object.assign({},r[l][1].end),end:Object.assign({},r[i][1].start)},c=[["enter",s,o],["enter",r[l][1],o],["exit",r[l][1],o],["enter",a,o]],u=o.parser.constructs.insideSpan.null;u&&vt(c,c.length,0,ho(u,r.slice(l+1,i),o)),vt(c,c.length,0,[["exit",a,o],["enter",r[i][1],o],["exit",r[i][1],o],["exit",s,o]]),vt(r,l-1,i-l+3,c),i=l+c.length-2;break}}for(i=-1;++i<r.length;)r[i][1].type==="strikethroughSequenceTemporary"&&(r[i][1].type="data");return r}};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class qv{constructor(){this.map=[]}add(t,n,r){(function(o,i,l,s){let a=0;if(!(l===0&&s.length===0)){for(;a<o.map.length;){if(o.map[a][0]===i)return o.map[a][1]+=l,void o.map[a][2].push(...s);a+=1}o.map.push([i,l,s])}})(this,t,n,r)}consume(t){if(this.map.sort(function(i,l){return i[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const i of o)t.push(i);o=r.pop()}this.map.length=0}}function Wv(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Gv(e,t,n){const r=this;let o,i=0,l=0;return function(x){let B=r.events.length-1;for(;B>-1;){const C=r.events[B][1].type;if(C!=="lineEnding"&&C!=="linePrefix")break;B--}const D=B>-1?r.events[B][1].type:null,T=D==="tableHead"||D==="tableRow"?k:s;return T===k&&r.parser.lazy[r.now().line]?n(x):T(x)};function s(x){return e.enter("tableHead"),e.enter("tableRow"),function(B){return B===124||(o=!0,l+=1),a(B)}(x)}function a(x){return x===null?n(x):te(x)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),A):n(x):pe(x)?me(e,a,"whitespace")(x):(l+=1,o&&(o=!1,i+=1),x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),o=!0,a):(e.enter("data"),c(x)))}function c(x){return x===null||x===124||Ce(x)?(e.exit("data"),a(x)):(e.consume(x),x===92?u:c)}function u(x){return x===92||x===124?(e.consume(x),c):c(x)}function A(x){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(x):(e.enter("tableDelimiterRow"),o=!1,pe(x)?me(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):d(x))}function d(x){return x===45||x===58?p(x):x===124?(o=!0,e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),f):g(x)}function f(x){return pe(x)?me(e,p,"whitespace")(x):p(x)}function p(x){return x===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),v):x===45?(l+=1,v(x)):x===null||te(x)?b(x):g(x)}function v(x){return x===45?(e.enter("tableDelimiterFiller"),h(x)):g(x)}function h(x){return x===45?(e.consume(x),h):x===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(x))}function w(x){return pe(x)?me(e,b,"whitespace")(x):b(x)}function b(x){return x===124?d(x):(x===null||te(x))&&o&&i===l?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(x)):g(x)}function g(x){return n(x)}function k(x){return e.enter("tableRow"),_(x)}function _(x){return x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),_):x===null||te(x)?(e.exit("tableRow"),t(x)):pe(x)?me(e,_,"whitespace")(x):(e.enter("data"),E(x))}function E(x){return x===null||x===124||Ce(x)?(e.exit("data"),_(x)):(e.consume(x),x===92?P:E)}function P(x){return x===92||x===124?(e.consume(x),E):E(x)}}function Yv(e,t){let n,r,o,i=-1,l=!0,s=0,a=[0,0,0,0],c=[0,0,0,0],u=!1,A=0;const d=new qv;for(;++i<e.length;){const f=e[i],p=f[1];f[0]==="enter"?p.type==="tableHead"?(u=!1,A!==0&&(ZA(d,t,A,n,r),r=void 0,A=0),n={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(i,0,[["enter",n,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=!0,o=void 0,a=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(i,0,[["enter",r,t]])),s=p.type==="tableDelimiterRow"?2:r?3:1):!s||p.type!=="data"&&p.type!=="tableDelimiterMarker"&&p.type!=="tableDelimiterFiller"?p.type==="tableCellDivider"&&(l?l=!1:(a[1]!==0&&(c[0]=c[1],o=_o(d,t,a,s,void 0,o)),a=c,c=[a[1],i,0,0])):(l=!1,c[2]===0&&(a[1]!==0&&(c[0]=c[1],o=_o(d,t,a,s,void 0,o),a=[0,0,0,0]),c[2]=i)):p.type==="tableHead"?(u=!0,A=i):p.type==="tableRow"||p.type==="tableDelimiterRow"?(A=i,a[1]!==0?(c[0]=c[1],o=_o(d,t,a,s,i,o)):c[1]!==0&&(o=_o(d,t,c,s,i,o)),s=0):!s||p.type!=="data"&&p.type!=="tableDelimiterMarker"&&p.type!=="tableDelimiterFiller"||(c[3]=i)}for(A!==0&&ZA(d,t,A,n,r),d.consume(t.events),i=-1;++i<t.events.length;){const f=t.events[i];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=Wv(t.events,i))}return e}function _o(e,t,n,r,o,i){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData";n[0]!==0&&(i.end=Object.assign({},Gn(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=Gn(t.events,n[1]);if(i={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const a=Gn(t.events,n[2]),c=Gn(t.events,n[3]),u={type:"tableContent",start:Object.assign({},a),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",u,t]]),r!==2){const A=t.events[n[2]],d=t.events[n[3]];if(A[1].end=Object.assign({},d[1].end),A[1].type="chunkText",A[1].contentType="text",n[3]>n[2]+1){const f=n[2]+1,p=n[3]-n[2]-1;e.add(f,p,[])}}e.add(n[3]+1,0,[["exit",u,t]])}return o!==void 0&&(i.end=Object.assign({},Gn(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function ZA(e,t,n,r,o){const i=[],l=Gn(t.events,n);o&&(o.end=Object.assign({},l),i.push(["exit",o,t])),r.end=Object.assign({},l),i.push(["exit",r,t]),e.add(n+1,0,i)}function Gn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Vv={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)};function o(s){return Ce(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),i):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),i):n(s)}function i(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(s)}function l(s){return te(s)?t(s):pe(s)?e.check({tokenize:$v},t,n)(s):n(s)}}};function $v(e,t,n){return me(e,function(r){return r===null?n(r):t(r)},"whitespace")}const Kv={};function Xv(e){const t=e||Kv,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(l){return Mu([{text:Ht},{document:{91:{name:"gfmFootnoteDefinition",tokenize:Hv,continuation:{tokenize:Uv},exit:zv}},text:{91:{name:"gfmFootnoteCall",tokenize:Fv},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Nv,resolveTo:Rv}}},jv(l),{flow:{null:{name:"table",tokenize:Gv,resolveAll:Yv}}},{text:{91:Vv}}])}(t)),o.push([{transforms:[ov],enter:{literalAutolink:Zy,literalAutolinkEmail:Ol,literalAutolinkHttp:Ol,literalAutolinkWww:Ol},exit:{literalAutolink:rv,literalAutolinkEmail:nv,literalAutolinkHttp:ev,literalAutolinkWww:tv}},{enter:{gfmFootnoteCallString:sv,gfmFootnoteCall:av,gfmFootnoteDefinitionLabelString:cv,gfmFootnoteDefinition:uv},exit:{gfmFootnoteCallString:Av,gfmFootnoteCall:dv,gfmFootnoteDefinitionLabelString:fv,gfmFootnoteDefinition:pv}},{canContainEols:["delete"],enter:{strikethrough:yv},exit:{strikethrough:vv}},{enter:{table:Sv,tableData:jA,tableHeader:jA,tableRow:Pv},exit:{codeText:Dv,table:Cv,tableData:Nl,tableHeader:Nl,tableRow:Nl}},{exit:{taskListCheckValueChecked:qA,taskListCheckValueUnchecked:qA,paragraph:Tv}}]),i.push(function(l){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Tl,notInConstruct:Ml},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Tl,notInConstruct:Ml},{character:":",before:"[ps]",after:"\\/",inConstruct:Tl,notInConstruct:Ml}]},hv(l),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:mv}],handlers:{delete:PA}},Bv(l),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Mv}}]}}(t))}const ed="rgba(0, 0, 0, 0.3)",Jv={p:e=>{let{children:t}=e;return N.createElement("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"}},t)},ul:e=>{let{children:t}=e;return N.createElement("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},t)},ol:e=>{let{children:t}=e;return N.createElement("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},t)},li:e=>{let{children:t}=e;return N.createElement("li",{style:{marginBottom:"1px",lineHeight:1.4}},t)},code:e=>{let{className:t,children:n}=e;return/\blanguage-/.test(t||"")?N.createElement("pre",{style:{backgroundColor:ed,padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"}},N.createElement("code",null,n)):N.createElement("code",{style:{backgroundColor:ed,padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"}},n)},blockquote:e=>{let{children:t}=e;return N.createElement("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid rgba(255, 255, 255, 0.4)",color:"inherit",fontStyle:"italic"}},t)},a:e=>{let{children:t,href:n}=e;return N.createElement("a",{href:n,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline",fontWeight:600}},t)},table:e=>{let{children:t}=e;return N.createElement("table",{style:{borderCollapse:"collapse",width:"100%",margin:"0.5em 0",fontSize:"0.95em",color:"#fff"}},t)},th:e=>{let{children:t}=e;return N.createElement("th",{style:{border:"1px solid rgba(255, 255, 255, 0.4)",padding:"6px 10px",textAlign:"left",verticalAlign:"top",fontWeight:600,color:"#fff",backgroundColor:"rgba(255, 255, 255, 0.15)",overflowWrap:"normal",wordBreak:"normal"}},t)},td:e=>{let{children:t}=e;return N.createElement("td",{style:{border:"1px solid rgba(255, 255, 255, 0.4)",padding:"6px 10px",textAlign:"left",verticalAlign:"top",color:"#fff",overflowWrap:"normal",wordBreak:"normal"}},t)}},Zv=e=>{let{children:t}=e;return N.createElement("div",{style:{whiteSpace:"normal"}},N.createElement(Vy,{remarkPlugins:[Xv],components:Jv},typeof t=="string"?t:""))},td=ot((e,t)=>{let{embedded:n,currentOpen:r,enabled:o,onSetEnabled:i}=e;const l=Jr(),s=(()=>{const{isChatWindowOpen:u,toggleChatWindow:A,toggleIsBotTyping:d,scrollToBottom:f,getIsChatBotVisible:p}=ht();return{isChatWindowOpen:u,toggleChatWindow:A,toggleIsBotTyping:d,scrollToBottom:f,getIsChatBotVisible:p}})(),a=le(!1),c=le(!1);return ee(()=>{!n&&s&&s.toggleChatWindow&&(a.current===r||c.current||(setTimeout(()=>{s&&s.toggleChatWindow&&s.toggleChatWindow(r)},0),a.current=r!=null&&r),c.current=!1)},[r,n,s]),ee(()=>{const u=()=>{c.current=!0};return window.addEventListener("rcb-toggle-chat-window",u),()=>window.removeEventListener("rcb-toggle-chat-window",u)}),Rr(t,()=>({addMessage:u=>{l&&l.injectMessage&&l.injectMessage(u)},openChat:()=>{!n&&s&&s.toggleChatWindow&&s.toggleChatWindow(!0)},closeChat:()=>{!n&&s&&s.toggleChatWindow&&s.toggleChatWindow(!1)},toggleChat:()=>{!n&&s&&s.toggleChatWindow&&s.toggleChatWindow()},setBotEnabled:u=>{i&&i(u)}}),[l,s,n,i]),null});td.displayName="BotController";const nd=Ct(null),ew=e=>{let{trackEvent:t,children:n}=e;const r=le(t);return r.current=t,N.createElement(nd.Provider,{value:{trackEvent:o=>r.current(o)}},n)},rd=()=>wt(nd)||{trackEvent:()=>{}},od=e=>{let{loginUrl:t,className:n="",style:r,isHeaderButton:o=!1}=e;const{trackEvent:i}=rd(),l=o?{display:"inline-block",padding:"6px 12px",backgroundColor:"transparent",border:"1px solid #ccc",color:"white",textDecoration:"none",borderRadius:"4px",fontWeight:"normal",textAlign:"center",margin:"8px",fontSize:"12px",opacity:.8,transition:"all 0.2s ease"}:{display:"inline-block",padding:"10px 20px",backgroundColor:"white",border:"1px solid var(--primaryColor, #107180)",color:"var(--primaryColor, #107180)",textDecoration:"none",borderRadius:"4px",fontWeight:"bold",textAlign:"center",margin:"18px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)"};return N.createElement(N.Fragment,null,o&&N.createElement("style",null,`
34
62
  .rcb-chat-header-container .qa-bot-header-login-button:hover {
35
63
  background-color: #0000001a !important;
36
64
  opacity: 1 !important;
37
65
  }
38
- `),M.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${o?"qa-bot-header-login-button":""} ${n}`,style:Object.assign(Object.assign({},A),r),onClick:()=>{i({type:"chatbot_login_clicked",loginUrl:t})}},"Log In"))},df=()=>M.createElement("div",{className:"user-login-icon",style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"5px",display:"flex"},role:"img","aria-label":"User logged in",title:"User logged in"},M.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},M.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),M.createElement("circle",{cx:"12",cy:"7",r:"4"}))),He=[];for(let e=0;e<256;++e)He.push((e+256).toString(16).slice(1));let Ko;const ff=new Uint8Array(16);var wA={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function bA(e,t,n){var o;if(wA.randomUUID&&!e)return wA.randomUUID();const r=(e=e||{}).random??((o=e.rng)==null?void 0:o.call(e))??function(){if(!Ko){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ko=crypto.getRandomValues.bind(crypto)}return Ko(ff)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(i,A=0){return(He[i[A+0]]+He[i[A+1]]+He[i[A+2]]+He[i[A+3]]+"-"+He[i[A+4]]+He[i[A+5]]+"-"+He[i[A+6]]+He[i[A+7]]+"-"+He[i[A+8]]+He[i[A+9]]+"-"+He[i[A+10]]+He[i[A+11]]+He[i[A+12]]+He[i[A+13]]+He[i[A+14]]+He[i[A+15]]).toLowerCase()}(r)}function $t(){return typeof localStorage<"u"&&localStorage.getItem("QA_BOT_DEBUG")==="true"}const pf="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",hf="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",gf="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",mf="background: #f97316; color: white; padding: 2px 6px; border-radius: 3px;",yf="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",vf="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",wf=()=>{$t()&&console.log("%c QA Bot Core %c v0.2.35 ",yf,vf)},Er=function(e){if($t()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[Session]%c ${e}`,pf,"",...n)}},wt=function(e){if($t()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[History]%c ${e}`,hf,"",...n)}},bf=(e,t)=>{$t()&&console.log(`%c[Message]%c ${e}`,gf,"",t)},Un=function(e){if($t()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[Turnstile]%c ${e}`,mf,"",...n)}},_A=function(){console.warn(...arguments)},Le=function(){console.error(...arguments)},EA="qa_bot_session_messages",PA=()=>`qa_bot_session_${bA()}`,Fn=()=>{try{const e=localStorage.getItem(EA);return e?JSON.parse(e):{}}catch{return{}}},_f=(e,t,n,r,o)=>{const i=Fn();if(!i[e]&&(i[e]={messages:[],startedAt:new Date().toISOString(),preview:""},wt("NEW session created",{sessionId:e.slice(-12)})),i[e].messages.some(l=>l.id===t))return void wt("DUPLICATE message skipped",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r});const A={id:t,content:n,sender:r,type:o,timestamp:Date.now()};i[e].messages.push(A),wt("MESSAGE added",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r,totalInSession:i[e].messages.length});const s=i[e].messages,a=s.find(l=>{var c;return l.sender.toLowerCase()==="bot"&&((c=l.content)===null||c===void 0?void 0:c.trim())&&l.content.length>=100});if(a){const l=a.content;i[e].preview=l.slice(0,50)+(l.length>50?"...":"")}else{const l=s.find(c=>{var u;return c.sender.toLowerCase()==="user"&&((u=c.content)===null||u===void 0?void 0:u.trim())});if(l&&!i[e].preview){const c=l.content;i[e].preview=c.slice(0,50)+(c.length>50?"...":"")}}(l=>{var c;const u=()=>Object.values(l).reduce((d,f)=>d+f.messages.length,0);for(;u()>100&&Object.keys(l).length>1;){const d=(c=Object.entries(l).sort((f,h)=>{let[,m]=f,[,p]=h;return new Date(m.startedAt).getTime()-new Date(p.startedAt).getTime()})[0])===null||c===void 0?void 0:c[0];if(!d)break;delete l[d]}localStorage.setItem(EA,JSON.stringify(l))})(i),wt("STORAGE state",{ourSessions:Object.keys(i).length,ourTotalMessages:Object.values(i).reduce((l,c)=>l+c.messages.length,0)})},CA=e=>{var t,n;return(n=(t=Fn()[e])===null||t===void 0?void 0:t.messages.length)!==null&&n!==void 0?n:0},Ef=e=>{const t=Fn()[e];return t!=null&&t.startedAt?Date.now()-new Date(t.startedAt).getTime():0},kA=At(void 0),Pf=e=>{let{children:t,getSessionId:n,setSessionId:r,resetSession:o,clearResettingFlag:i}=e;return M.createElement(kA.Provider,{value:{getSessionId:n,setSessionId:r,resetSession:o,clearResettingFlag:i}},t)},Xo=()=>{const e=rt(kA);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},Cf=()=>{const[e,t]=ee(!1),[n,r]=ee([]),[o,i]=ee(null),[A,s]=ee(0),a=ne(null),l=ne(null),{replaceMessages:c}=Tn(),{toggleTextAreaDisabled:u}=Ga(),{setSessionId:d,getSessionId:f}=Xo();X(()=>{var m,p;const v=g=>{a.current&&!a.current.contains(g.target)&&l.current&&!l.current.contains(g.target)&&t(!1)},y=(p=(m=a.current)===null||m===void 0?void 0:m.getRootNode())!==null&&p!==void 0?p:document;return e&&y.addEventListener("mousedown",v),()=>{y.removeEventListener("mousedown",v)}},[e]);const h=m=>{var p;const v=f();if(wt("RESTORE requested",{targetSession:m.slice(-12),currentSession:v==null?void 0:v.slice(-12)}),m===v)return wt("RESTORE skipped - already on this session"),void t(!1);const y=(P=>{var E;return((E=Fn()[P])===null||E===void 0?void 0:E.messages)||[]})(m).filter(P=>{var E;return(E=P.content)===null||E===void 0?void 0:E.trim()});wt("Stored messages from our localStorage",{count:y.length,ids:y.map(P=>P.id.slice(-8))});const g=y.map(P=>({id:P.id,content:P.content,sender:P.sender.toUpperCase(),type:P.type||"string",timestamp:new Date(P.timestamp).toISOString()}));var _;d(m),wt("Session ID updated",{newSession:m.slice(-12)}),c(g),wt("replaceMessages called",{count:g.length}),_=(p=l.current)===null||p===void 0?void 0:p.getRootNode(),setTimeout(()=>{const P=(_||document).querySelector(".rcb-chat-body-container");P&&P.querySelectorAll(".rcb-bot-message").forEach(E=>{var k;let B=E.innerHTML,T=!1;B.includes("](")&&(B=B.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'),T=!0),B.includes("&lt;a href=")&&(B=B.replace(/&lt;a\s+href=["']([^"']+)["'][^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),T=!0),(B.includes("&lt;a ")||!((k=E.textContent)===null||k===void 0)&&k.includes("<a href="))&&(E.textContent||"").includes("<a href=")&&(B=B.replace(/&lt;a\s+href="([^"]+)"[^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),T=!0),T&&(E.innerHTML=B)})},50),u(!1),wt("Chat input enabled after restore"),t(!1)};return M.createElement("div",{style:{position:"relative"}},M.createElement("button",{ref:l,className:"history-button",onClick:()=>{if(!e&&(r((()=>{const m=Fn();return Object.entries(m).map(p=>{let[v,y]=p;return Object.assign({sessionId:v},y)}).sort((p,v)=>new Date(v.startedAt).getTime()-new Date(p.startedAt).getTime())})()),l.current)){const m=l.current.closest(".rcb-chat-window");if(m){const p=m.getBoundingClientRect(),v=l.current.getBoundingClientRect();i(p.width+3),s(p.right-v.right-18+4)}}t(!e)},style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"18px",display:"flex",border:"none",cursor:"pointer",padding:0},"aria-label":"View chat history",title:"View chat history","aria-expanded":e,"aria-haspopup":"menu"},M.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},M.createElement("circle",{cx:"12",cy:"12",r:"10"}),M.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&M.createElement("div",{ref:a,role:"menu",style:{position:"absolute",right:A?`-${A}px`:"-18px",top:"100%",marginTop:"8px",width:o?`${o}px`:"550px",backgroundColor:"white",borderRadius:0,borderBottom:"3px solid var(--primaryColor, #1a5b6e)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",maxHeight:"250px",overflowY:"auto",zIndex:1e3}},n.length===0?M.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):n.map(m=>M.createElement("button",{key:m.sessionId,role:"menuitem",onClick:()=>h(m.sessionId),style:{width:"100%",padding:"10px 14px",border:"none",backgroundColor:"transparent",cursor:"pointer",textAlign:"left",display:"flex",flexDirection:"column",gap:"2px",borderBottom:"1px solid #eee"},onMouseEnter:p=>{p.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:p=>{p.currentTarget.style.backgroundColor="transparent"}},M.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},m.preview||"New conversation"),M.createElement("span",{style:{fontSize:"12px",color:"#888"}},(p=>{const v=new Date(p),y=new Date().getTime()-v.getTime(),g=Math.floor(y/864e5);return g===0?v.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):g===1?"Yesterday":g<7?v.toLocaleDateString([],{weekday:"short"}):v.toLocaleDateString([],{month:"short",day:"numeric"})})(m.startedAt))))))},SA=e=>{var{width:t=24,height:n=24,color:r="currentColor",children:o}=e,i=fa(e,["width","height","color","children"]);return M.createElement("svg",rr({xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},i),o)},kf=e=>M.createElement(SA,e,M.createElement("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})),Sf=()=>{const{restartFlow:e}=dr(),{setTextAreaValue:t}=Ga(),{messages:n}=Tn(),{getSessionId:r,resetSession:o,clearResettingFlag:i}=Xo(),{trackEvent:A}=yA();return M.createElement("button",{onClick:async()=>{const s=r(),a=s?CA(s):0;A({type:"chatbot_new_chat",previousMessageCount:a}),o(),await t(""),await e(),setTimeout(()=>{i()},100)},tabIndex:0,"aria-label":"New chat conversation",style:{backgroundColor:"var(--primaryColor, #107180)",border:"none",color:"#ffffff",fontSize:"14px",cursor:"pointer",padding:"8px 12px",borderRadius:"4px",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",fontWeight:"500"},onMouseEnter:s=>{s.target.style.backgroundColor="var(--secondaryColor, #0d5f6b)"},onMouseLeave:s=>{s.target.style.backgroundColor="var(--primaryColor, #107180)"}},M.createElement(kf,{width:16,height:16}),"New Chat")};function Jo(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(!e)return"";if(Array.isArray(e))return e.map(Jo).join("");if(typeof e=="object"&&e!==null&&"props"in e){const t=e.props;if(t&&"children"in t)return Jo(t.children)}return""}const Df=()=>{const{getSessionId:e}=Xo(),t=q(n=>{var r;const o=(r=n.data)===null||r===void 0?void 0:r.message;if(!(o!=null&&o.id))return;const i=o.sender,A=o.type||"string";let s;if(s=typeof o.content=="string"?o.content:Jo(o.content),bf("TRACKED",{id:o.id,sender:i,content:s.substring(0,50)+(s.length>50?"...":"")}),s.includes("rcb-options-container")||!s.trim())return;const a=e();_f(a,o.id,s,i,A)},[e]);return X(()=>(window.addEventListener("rcb-pre-inject-message",t),()=>{window.removeEventListener("rcb-pre-inject-message",t)}),[t]),null},Bf=()=>(X(()=>{const e=i=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(i.key))return;const A=document.activeElement;if(A&&(A.tagName==="INPUT"||A.tagName==="TEXTAREA"||A.contentEditable==="true"||A.classList.contains("rcb-chat-input-textarea")))return;const s=document.querySelector(".rcb-chat-window");if(!s)return;const a=Array.from(s.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(u=>u.offsetParent!==null);if(a.length>0){const u=a[a.length-1].querySelector(".rcb-checkbox-container");if(u&&u.offsetParent!==null){const d=Array.from(u.querySelectorAll(".rcb-checkbox-row-container")),f=u.querySelector(".rcb-checkbox-next-button");if(d.length>0){const h=[...d];return f&&h.push(f),void((m,p)=>{m.preventDefault();let v=-1;for(let g=0;g<p.length;g++)if(p[g]===document.activeElement||p[g].contains(document.activeElement)){v=g;break}v===-1&&(v=0);let y=v;switch(m.key){case"ArrowDown":case"ArrowRight":y=v<p.length-1?v+1:0;break;case"ArrowUp":case"ArrowLeft":y=v>0?v-1:p.length-1;break;case"Home":y=0;break;case"End":y=p.length-1;break;case"Enter":case" ":{const g=p[v],_=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void g.dispatchEvent(_)}default:return}p[y].focus(),p[y].setAttribute("tabindex","0"),p[y].classList.add("keyboard-focused"),p.forEach((g,_)=>{_!==y&&(g.setAttribute("tabindex","-1"),g.classList.remove("keyboard-focused"))})})(i,h)}}}let l=[];if(a.length>0){const u=a[a.length-1],d=Array.from(u.querySelectorAll(".rcb-options-container")).filter(f=>f.offsetParent!==null);if(d.length>0){const f=d[d.length-1];l=Array.from(f.querySelectorAll(".rcb-options"))}}if(l.length===0)return;const c=l.findIndex(u=>u===document.activeElement);switch(i.key){case"ArrowDown":case"ArrowRight":{let u;i.preventDefault(),u=c<l.length-1?c+1:0,l[u].setAttribute("tabindex","0"),l.forEach((d,f)=>{f!==u&&(d.setAttribute("tabindex","-1"),d.classList.remove("keyboard-focused"))}),l[u].classList.add("keyboard-focused"),l[u].focus();break}case"ArrowUp":case"ArrowLeft":{let u;i.preventDefault(),u=c>0?c-1:l.length-1,l[u].setAttribute("tabindex","0"),l.forEach((d,f)=>{f!==u&&(d.setAttribute("tabindex","-1"),d.classList.remove("keyboard-focused"))}),l[u].classList.add("keyboard-focused"),l[u].focus();break}case"Enter":case" ":if(i.preventDefault(),document.activeElement&&l.includes(document.activeElement)){const u=document.activeElement;if(u.classList.contains("rcb-checkbox-row-container")||u.closest(".rcb-checkbox-row-container")){const d=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});u.dispatchEvent(d);const f=u.querySelector(".rcb-checkbox-label"),h=f?f.textContent:u.textContent||"checkbox",m=u.querySelector(".rcb-checkbox-mark"),p=m&&m.style.backgroundColor?"checked":"unchecked";t(`${h} ${p}`)}else{const d=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});u.dispatchEvent(d);const f=u.textContent||u.innerText;t(`Selected: ${f}`)}}break;case"Home":i.preventDefault(),l.length>0&&(l[0].setAttribute("tabindex","0"),l.forEach((u,d)=>{d!==0&&(u.setAttribute("tabindex","-1"),u.classList.remove("keyboard-focused"))}),l[0].classList.add("keyboard-focused"),l[0].focus());break;case"End":if(i.preventDefault(),l.length>0){const u=l.length-1;l[u].setAttribute("tabindex","0"),l.forEach((d,f)=>{f!==u&&(d.setAttribute("tabindex","-1"),d.classList.remove("keyboard-focused"))}),l[u].classList.add("keyboard-focused"),l[u].focus()}}},t=i=>{const A=document.createElement("div");A.setAttribute("aria-live","assertive"),A.setAttribute("aria-atomic","true"),A.className="sr-only",A.textContent=i,document.body.appendChild(A),setTimeout(()=>{document.body.contains(A)&&document.body.removeChild(A)},1e3)},n=(i=null)=>{let A=i;if(A||(A=document.querySelector(".rcb-chat-window"),A||(A=document.querySelector('[class*="rcb-chat"]')),A||(A=document.querySelector(".qa-bot"))),!A)return;const s=A.closest(".embedded-qa-bot")!==null,a=Array.from(A.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(d=>d.offsetParent!==null);if(a.length===0)return;const l=a[a.length-1],c=Array.from(l.querySelectorAll(".rcb-options-container")).filter(d=>d.offsetParent!==null);let u=[];if(c.length>0){const d=c[c.length-1];u=Array.from(d.querySelectorAll(".rcb-options"))}if(u.length===0){let d=l.querySelector(".rcb-checkbox-container");if(!d&&A&&(d=A.querySelector(".rcb-checkbox-container")),d&&d.offsetParent!==null){const f=Array.from(d.querySelectorAll(".rcb-checkbox-row-container")).filter(h=>h.offsetParent!==null&&h.style.display!=="none");if(f.length>0){const h=d.querySelector(".rcb-checkbox-next-button"),m=[...f];if(h&&h.offsetParent!==null&&m.push(h),m.forEach((p,v)=>{p.setAttribute("tabindex",v===0?"0":"-1"),v===0?p.classList.add("keyboard-focused"):p.classList.remove("keyboard-focused")}),f.length>1){d.querySelectorAll(".keyboard-nav-hint").forEach(v=>v.remove());const p=document.createElement("div");p.className="keyboard-nav-hint",p.textContent="Use arrow keys โ†• to navigate, Enter to select/deselect, or click any option",p.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",d.insertBefore(p,d.firstChild)}return void setTimeout(()=>{m[0]&&m[0].offsetParent!==null&&!s&&m[0].focus()},150)}}}if(u.length>0){if(u.forEach((d,f)=>{const h=f===0?"0":"-1";d.setAttribute("tabindex",h),d.setAttribute("role","option"),d.setAttribute("aria-posinset",f+1),d.setAttribute("aria-setsize",u.length),f===0?d.classList.add("keyboard-focused"):d.classList.remove("keyboard-focused")}),u.length>1){const d=c.length>0?c[c.length-1]:null;if(d){d.querySelectorAll(".keyboard-nav-hint").forEach(h=>h.remove());const f=document.createElement("div");f.className="keyboard-nav-hint",f.textContent="Use arrow keys โ†• to navigate, Enter to select, or click any option",f.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",d.insertBefore(f,d.firstChild)}}else{const d=c.length>0?c[c.length-1]:null;d&&d.querySelectorAll(".keyboard-nav-hint").forEach(f=>f.remove())}setTimeout(()=>{u[0]&&u[0].offsetParent!==null&&!s&&(u[0].focus(),u.length>1&&t(`${u.length} options available. Use arrow keys to navigate.`))},200)}},r=new MutationObserver(i=>{i.forEach(A=>{var s,a;if(A.type==="childList"){const l=Array.from(A.addedNodes),c=l.some(d=>{var f,h,m,p;return d.nodeType===Node.ELEMENT_NODE&&(((f=d.classList)==null?void 0:f.contains("rcb-options-container"))||((h=d.classList)==null?void 0:h.contains("rcb-options"))||((m=d.querySelector)==null?void 0:m.call(d,".rcb-options-container"))||((p=d.querySelector)==null?void 0:p.call(d,".rcb-options")))}),u=l.some(d=>{var f,h;return d.nodeType===Node.ELEMENT_NODE&&(((f=d.classList)==null?void 0:f.contains("rcb-checkbox-container"))||((h=d.querySelector)==null?void 0:h.call(d,".rcb-checkbox-container")))});if(c||u){let d=A.target;for(;d&&!((s=d.classList)!=null&&s.contains("qa-bot"))&&!((a=d.classList)!=null&&a.contains("rcb-chat-window"));)d=d.parentElement;(d||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(f=>{f.setAttribute("tabindex","-1"),f.classList.remove("keyboard-focused")}),setTimeout(()=>n(d),100)}}})});r.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),n();const o=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(i=>{const A=i.querySelectorAll(".rcb-options-container .rcb-options").length>0,s=i.querySelectorAll(".rcb-checkbox-row-container").length>0;if(A){const a=i.querySelectorAll(".rcb-options[tabindex]").length;i.querySelectorAll(".rcb-options").length>a&&n(i)}if(s){const a=i.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;i.querySelectorAll(".rcb-checkbox-row-container").length>a&&n(i)}})},1e3);return()=>{document.removeEventListener("keydown",e),r.disconnect(),clearInterval(o)}},[]),null);let DA=!1,Pr=null;function BA(){return DA?Promise.resolve():Pr||(Pr=new Promise((e,t)=>{const n=document.createElement("script");n.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",n.async=!0,n.onload=()=>{DA=!0,Un("Script loaded"),e()},n.onerror=()=>{Pr=null,t(new Error("Failed to load Turnstile script"))},document.head.appendChild(n)}),Pr)}const zn=e=>{if(!e||typeof e!="string")return e;let t=e.replace(/\[(https?:\/\/[^\s]+?)\]/gi,"[$1]($1)");return t=t.replace(new RegExp(`(?<!\\]\\(|href=["']|\\[)https?:\\/\\/[^\\s[\\]()]+`,"gi"),n=>{let r=n,o="";const i=r.match(/([.,;:!?]+)$/);return i&&(o=i[1],r=r.slice(0,-o.length)),`[${r}](${r})${o}`}),t},xf=e=>{let{siteKey:t,onVerify:n,onError:r,loginUrl:o}=e;const i=ne(null),A=ne(null),s=ne(!1),a=ne(null),l=ne(null),[c,u]=ee(!1),[d,f]=ee(0),h=ne("widget_error"),m=ne(null),p=o&&o!=="/login",v=q(()=>{const _=window.turnstile;if(a.current&&(_!=null&&_.remove)){try{_.remove(a.current)}catch{}a.current=null}},[]),y=q(()=>{var _;v(),c?r==null||r(h.current,(_=m.current)!==null&&_!==void 0?_:void 0):r==null||r("user_cancelled")},[r,v,c]);X(()=>()=>{v()},[v]),X(()=>{var _;return l.current=document.activeElement,(_=A.current)===null||_===void 0||_.focus(),()=>{l.current&&typeof l.current.focus=="function"&&l.current.focus()}},[]),X(()=>{const _=P=>{if(P.key==="Escape")return P.preventDefault(),void y();if(P.key==="Tab"&&A.current){const E=A.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(E.length===0)return;const k=E[0],B=E[E.length-1];P.shiftKey&&document.activeElement===k?(P.preventDefault(),B.focus()):P.shiftKey||document.activeElement!==B||(P.preventDefault(),k.focus())}};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[y]),X(()=>{s.current||!i.current||c||(s.current=!0,BA().then(()=>{const _=window.turnstile;if(!_||!i.current)return Le("Turnstile API not available after script load"),h.current="api_unavailable",void u(!0);a.current=_.render(i.current,{sitekey:t,callback:P=>{Un("Visible challenge completed"),n(P)},"error-callback":P=>(Le("Turnstile challenge failed:",P),m.current=P,h.current="widget_error",v(),u(!0),!0),"expired-callback":()=>{Le("Turnstile token expired"),h.current="token_expired",v(),u(!0)}})}).catch(_=>{Le("Failed to load Turnstile script:",_),h.current="script_load_failed",u(!0)}))},[t,n,c]);const g=M.createElement(M.Fragment,null,M.createElement("div",{"aria-hidden":"true",style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",zIndex:999998}}),M.createElement("div",{ref:A,role:"dialog","aria-modal":"true","aria-labelledby":"qa-bot-turnstile-label",tabIndex:-1,style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:999999,background:"white",padding:"24px",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.3)",maxWidth:"90vw",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'}},M.createElement("span",{id:"qa-bot-turnstile-label",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap"}},"Verification challenge"),c?M.createElement("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"#333"}},d===0?M.createElement("p",{style:{margin:"0 0 16px 0"}},"Verification failed. You can try again",p&&M.createElement(M.Fragment,null,", or"," ",M.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"log in")," ","to skip verification"),"."):M.createElement(M.Fragment,null,M.createElement("p",{style:{margin:"0 0 8px 0"}},"Verification is still not working. This can be caused by browser extensions (ad blockers, privacy tools) or VPN connections."),M.createElement("p",{style:{margin:"0 0 16px 0"}},"Try disabling extensions, using a private/incognito window,",p&&M.createElement(M.Fragment,null," ",M.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"logging in"),",")," ","or using a different browser.")),M.createElement("div",{style:{display:"flex",gap:"8px"}},M.createElement("button",{type:"button",onClick:()=>{v(),s.current=!1,f(_=>_+1),u(!1)},style:{padding:"8px 16px",background:"var(--primaryColor, #107180)",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Try again"),M.createElement("button",{type:"button",onClick:y,style:{padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Close"))):M.createElement(M.Fragment,null,M.createElement("div",{ref:i,style:{borderRadius:"8px",overflow:"hidden"}}),M.createElement("button",{type:"button",onClick:y,style:{marginTop:"16px",padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Cancel"))));return $i(g,document.body)};function xA(e){const{confidence:t,tools_used:n,metadata:r}=e;if(!(t||n&&n.length!==0))return"";const o=[];return t&&o.push(`โ€ข Confidence: ${t}`),n&&n.length>0&&o.push(`โ€ข Tools used: ${n.join(", ")}`),r!=null&&r.agent&&o.push(`โ€ข Agent: ${r.agent}`),`---
66
+ `),N.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${o?"qa-bot-header-login-button":""} ${n}`,style:Object.assign(Object.assign({},l),r),onClick:()=>{i({type:"chatbot_login_clicked",loginUrl:t})}},"Log In"))},tw=()=>N.createElement("div",{className:"user-login-icon",style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"5px",display:"flex"},role:"img","aria-label":"User logged in",title:"User logged in"},N.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},N.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),N.createElement("circle",{cx:"12",cy:"7",r:"4"}))),Xe=[];for(let e=0;e<256;++e)Xe.push((e+256).toString(16).slice(1));let Hl;const nw=new Uint8Array(16);var id={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ld(e,t,n){var o;if(id.randomUUID&&!e)return id.randomUUID();const r=(e=e||{}).random??((o=e.rng)==null?void 0:o.call(e))??function(){if(!Hl){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Hl=crypto.getRandomValues.bind(crypto)}return Hl(nw)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(i,l=0){return(Xe[i[l+0]]+Xe[i[l+1]]+Xe[i[l+2]]+Xe[i[l+3]]+"-"+Xe[i[l+4]]+Xe[i[l+5]]+"-"+Xe[i[l+6]]+Xe[i[l+7]]+"-"+Xe[i[l+8]]+Xe[i[l+9]]+"-"+Xe[i[l+10]]+Xe[i[l+11]]+Xe[i[l+12]]+Xe[i[l+13]]+Xe[i[l+14]]+Xe[i[l+15]]).toLowerCase()}(r)}function En(){return typeof localStorage<"u"&&localStorage.getItem("QA_BOT_DEBUG")==="true"}const rw="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",ow="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",iw="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",lw="background: #f97316; color: white; padding: 2px 6px; border-radius: 3px;",sw="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",aw="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",cw=()=>{En()&&console.log("%c QA Bot Core %c v0.4.0 ",sw,aw)},So=function(e){if(En()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[Session]%c ${e}`,rw,"",...n)}},Ut=function(e){if(En()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[History]%c ${e}`,ow,"",...n)}},uw=(e,t)=>{En()&&console.log(`%c[Message]%c ${e}`,iw,"",t)},Sr=function(e){if(En()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[Turnstile]%c ${e}`,lw,"",...n)}},sd=function(){console.warn(...arguments)},Ke=function(){console.error(...arguments)},ad="qa_bot_session_messages",cd=()=>`qa_bot_session_${ld()}`,Cr=()=>{try{const e=localStorage.getItem(ad);return e?JSON.parse(e):{}}catch{return{}}},Aw=(e,t,n,r,o)=>{const i=Cr();if(!i[e]&&(i[e]={messages:[],startedAt:new Date().toISOString(),preview:""},Ut("NEW session created",{sessionId:e.slice(-12)})),i[e].messages.some(c=>c.id===t))return void Ut("DUPLICATE message skipped",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r});const l={id:t,content:n,sender:r,type:o,timestamp:Date.now()};i[e].messages.push(l),Ut("MESSAGE added",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r,totalInSession:i[e].messages.length});const s=i[e].messages,a=s.find(c=>{var u;return c.sender.toLowerCase()==="bot"&&((u=c.content)===null||u===void 0?void 0:u.trim())&&c.content.length>=100});if(a){const c=a.content;i[e].preview=c.slice(0,50)+(c.length>50?"...":"")}else{const c=s.find(u=>{var A;return u.sender.toLowerCase()==="user"&&((A=u.content)===null||A===void 0?void 0:A.trim())});if(c&&!i[e].preview){const u=c.content;i[e].preview=u.slice(0,50)+(u.length>50?"...":"")}}(c=>{var u;const A=()=>Object.values(c).reduce((d,f)=>d+f.messages.length,0);for(;A()>100&&Object.keys(c).length>1;){const d=(u=Object.entries(c).sort((f,p)=>{let[,v]=f,[,h]=p;return new Date(v.startedAt).getTime()-new Date(h.startedAt).getTime()})[0])===null||u===void 0?void 0:u[0];if(!d)break;delete c[d]}localStorage.setItem(ad,JSON.stringify(c))})(i),Ut("STORAGE state",{ourSessions:Object.keys(i).length,ourTotalMessages:Object.values(i).reduce((c,u)=>c+u.messages.length,0)})},ud=e=>{var t,n;return(n=(t=Cr()[e])===null||t===void 0?void 0:t.messages.length)!==null&&n!==void 0?n:0},dw=e=>{const t=Cr()[e];return t!=null&&t.startedAt?Date.now()-new Date(t.startedAt).getTime():0},Ad=Ct(void 0),fw=e=>{let{children:t,getSessionId:n,setSessionId:r,resetSession:o,clearResettingFlag:i}=e;return N.createElement(Ad.Provider,{value:{getSessionId:n,setSessionId:r,resetSession:o,clearResettingFlag:i}},t)},Ul=()=>{const e=wt(Ad);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},dd=()=>{const[e,t]=ne(!1),[n,r]=ne([]),[o,i]=ne(null),[l,s]=ne(0),a=le(null),c=le(null),{replaceMessages:u}=Jr(),{toggleTextAreaDisabled:A}=La(),{setSessionId:d,getSessionId:f}=Ul();ee(()=>{var v,h;const w=g=>{a.current&&!a.current.contains(g.target)&&c.current&&!c.current.contains(g.target)&&t(!1)},b=(h=(v=a.current)===null||v===void 0?void 0:v.getRootNode())!==null&&h!==void 0?h:document;return e&&b.addEventListener("mousedown",w),()=>{b.removeEventListener("mousedown",w)}},[e]);const p=v=>{var h;const w=f();if(Ut("RESTORE requested",{targetSession:v.slice(-12),currentSession:w==null?void 0:w.slice(-12)}),v===w)return Ut("RESTORE skipped - already on this session"),void t(!1);const b=(k=>{var _;return((_=Cr()[k])===null||_===void 0?void 0:_.messages)||[]})(v).filter(k=>{var _;return(_=k.content)===null||_===void 0?void 0:_.trim()});Ut("Stored messages from our localStorage",{count:b.length,ids:b.map(k=>k.id.slice(-8))});const g=b.map(k=>({id:k.id,content:k.content,sender:k.sender.toUpperCase(),type:k.type||"string",timestamp:new Date(k.timestamp).toISOString()}));d(v),Ut("Session ID updated",{newSession:v.slice(-12)}),u(g),Ut("replaceMessages called",{count:g.length}),(k=>{setTimeout(()=>{const _=(k||document).querySelector(".rcb-chat-body-container");_&&_.querySelectorAll(".rcb-bot-message").forEach(E=>{var P;let x=E.innerHTML,B=!1;x.includes("](")&&(x=x.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'),B=!0),x.includes("&lt;a href=")&&(x=x.replace(/&lt;a\s+href=["']([^"']+)["'][^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),B=!0),(x.includes("&lt;a ")||!((P=E.textContent)===null||P===void 0)&&P.includes("<a href="))&&(E.textContent||"").includes("<a href=")&&(x=x.replace(/&lt;a\s+href="([^"]+)"[^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),B=!0),B&&(E.innerHTML=x)})},50)})((h=c.current)===null||h===void 0?void 0:h.getRootNode()),A(!1),Ut("Chat input enabled after restore"),t(!1)};return N.createElement("div",{style:{position:"relative"}},N.createElement("button",{ref:c,className:"history-button",onClick:()=>{if(!e&&(r((()=>{const v=Cr();return Object.entries(v).map(h=>{let[w,b]=h;return Object.assign({sessionId:w},b)}).sort((h,w)=>new Date(w.startedAt).getTime()-new Date(h.startedAt).getTime())})()),c.current)){const v=c.current.closest(".rcb-chat-window");if(v){const h=v.getBoundingClientRect(),w=c.current.getBoundingClientRect();i(h.width+3),s(h.right-w.right-18+4)}}t(!e)},style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"18px",display:"flex",border:"none",cursor:"pointer",padding:0},"aria-label":"View chat history",title:"View chat history","aria-expanded":e,"aria-haspopup":"menu"},N.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},N.createElement("circle",{cx:"12",cy:"12",r:"10"}),N.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&N.createElement("div",{ref:a,role:"menu",style:{position:"absolute",right:l?`-${l}px`:"-18px",top:"100%",marginTop:"8px",width:o?`${o}px`:"550px",backgroundColor:"white",borderRadius:0,borderBottom:"3px solid var(--primaryColor, #1a5b6e)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",maxHeight:"250px",overflowY:"auto",zIndex:1e3}},n.length===0?N.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):n.map(v=>N.createElement("button",{key:v.sessionId,role:"menuitem",onClick:()=>p(v.sessionId),style:{width:"100%",padding:"10px 14px",border:"none",backgroundColor:"transparent",cursor:"pointer",textAlign:"left",display:"flex",flexDirection:"column",gap:"2px",borderBottom:"1px solid #eee"},onMouseEnter:h=>{h.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:h=>{h.currentTarget.style.backgroundColor="transparent"}},N.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},v.preview||"New conversation"),N.createElement("span",{style:{fontSize:"12px",color:"#888"}},(h=>{const w=new Date(h),b=new Date().getTime()-w.getTime(),g=Math.floor(b/864e5);return g===0?w.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):g===1?"Yesterday":g<7?w.toLocaleDateString([],{weekday:"short"}):w.toLocaleDateString([],{month:"short",day:"numeric"})})(v.startedAt))))))},fd=e=>{var{width:t=24,height:n=24,color:r="currentColor",children:o}=e,i=ra(e,["width","height","color","children"]);return N.createElement("svg",zr({xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},i),o)},pw=e=>N.createElement(fd,e,N.createElement("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})),hw=()=>{const{restartFlow:e}=Xr(),{setTextAreaValue:t}=La(),{getSessionId:n,resetSession:r,clearResettingFlag:o}=Ul(),{trackEvent:i}=rd();return N.createElement("button",{onClick:async()=>{const l=n(),s=l?ud(l):0;i({type:"chatbot_new_chat",previousMessageCount:s}),r(),await t(""),await e(),setTimeout(()=>{o()},100)},tabIndex:0,"aria-label":"New chat conversation",style:{backgroundColor:"var(--primaryColor, #107180)",border:"none",color:"#ffffff",fontSize:"14px",cursor:"pointer",padding:"8px 12px",borderRadius:"4px",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",fontWeight:"500"},onMouseEnter:l=>{l.target.style.backgroundColor="var(--secondaryColor, #0d5f6b)"},onMouseLeave:l=>{l.target.style.backgroundColor="var(--primaryColor, #107180)"}},N.createElement(pw,{width:16,height:16}),"New Chat")};function zl(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(!e)return"";if(Array.isArray(e))return e.map(zl).join("");if(typeof e=="object"&&e!==null&&"props"in e){const t=e.props;if(t&&"children"in t)return zl(t.children)}return""}const gw=()=>{const{getSessionId:e}=Ul(),t=X(n=>{var r;const o=(r=n.data)===null||r===void 0?void 0:r.message;if(!(o!=null&&o.id))return;const i=o.sender,l=o.type||"string";let s;if(s=typeof o.content=="string"?o.content:zl(o.content),uw("TRACKED",{id:o.id,sender:i,content:s.substring(0,50)+(s.length>50?"...":"")}),s.includes("rcb-options-container")||!s.trim())return;const a=e();Aw(a,o.id,s,i,l)},[e]);return ee(()=>(window.addEventListener("rcb-pre-inject-message",t),window.addEventListener("rcb-stop-stream-message",t),()=>{window.removeEventListener("rcb-pre-inject-message",t),window.removeEventListener("rcb-stop-stream-message",t)}),[t]),null},mw=()=>(ee(()=>{const e=i=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(i.key))return;const l=document.activeElement;if(l&&(l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.contentEditable==="true"||l.classList.contains("rcb-chat-input-textarea")))return;const s=document.querySelector(".rcb-chat-window");if(!s)return;const a=Array.from(s.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(A=>A.offsetParent!==null);if(a.length>0){const A=a[a.length-1].querySelector(".rcb-checkbox-container");if(A&&A.offsetParent!==null){const d=Array.from(A.querySelectorAll(".rcb-checkbox-row-container")),f=A.querySelector(".rcb-checkbox-next-button");if(d.length>0){const p=[...d];return f&&p.push(f),void((v,h)=>{v.preventDefault();let w=-1;for(let g=0;g<h.length;g++)if(h[g]===document.activeElement||h[g].contains(document.activeElement)){w=g;break}w===-1&&(w=0);let b=w;switch(v.key){case"ArrowDown":case"ArrowRight":b=w<h.length-1?w+1:0;break;case"ArrowUp":case"ArrowLeft":b=w>0?w-1:h.length-1;break;case"Home":b=0;break;case"End":b=h.length-1;break;case"Enter":case" ":{const g=h[w],k=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void g.dispatchEvent(k)}default:return}h[b].focus(),h[b].setAttribute("tabindex","0"),h[b].classList.add("keyboard-focused"),h.forEach((g,k)=>{k!==b&&(g.setAttribute("tabindex","-1"),g.classList.remove("keyboard-focused"))})})(i,p)}}}let c=[];if(a.length>0){const A=a[a.length-1],d=Array.from(A.querySelectorAll(".rcb-options-container")).filter(f=>f.offsetParent!==null);if(d.length>0){const f=d[d.length-1];c=Array.from(f.querySelectorAll(".rcb-options"))}}if(c.length===0)return;const u=c.findIndex(A=>A===document.activeElement);switch(i.key){case"ArrowDown":case"ArrowRight":{let A;i.preventDefault(),A=u<c.length-1?u+1:0,c[A].setAttribute("tabindex","0"),c.forEach((d,f)=>{f!==A&&(d.setAttribute("tabindex","-1"),d.classList.remove("keyboard-focused"))}),c[A].classList.add("keyboard-focused"),c[A].focus();break}case"ArrowUp":case"ArrowLeft":{let A;i.preventDefault(),A=u>0?u-1:c.length-1,c[A].setAttribute("tabindex","0"),c.forEach((d,f)=>{f!==A&&(d.setAttribute("tabindex","-1"),d.classList.remove("keyboard-focused"))}),c[A].classList.add("keyboard-focused"),c[A].focus();break}case"Enter":case" ":if(i.preventDefault(),document.activeElement&&c.includes(document.activeElement)){const A=document.activeElement;if(A.classList.contains("rcb-checkbox-row-container")||A.closest(".rcb-checkbox-row-container")){const d=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});A.dispatchEvent(d);const f=A.querySelector(".rcb-checkbox-label"),p=f?f.textContent:A.textContent||"checkbox",v=A.querySelector(".rcb-checkbox-mark"),h=v&&v.style.backgroundColor?"checked":"unchecked";t(`${p} ${h}`)}else{const d=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});A.dispatchEvent(d);const f=A.textContent||A.innerText;t(`Selected: ${f}`)}}break;case"Home":i.preventDefault(),c.length>0&&(c[0].setAttribute("tabindex","0"),c.forEach((A,d)=>{d!==0&&(A.setAttribute("tabindex","-1"),A.classList.remove("keyboard-focused"))}),c[0].classList.add("keyboard-focused"),c[0].focus());break;case"End":if(i.preventDefault(),c.length>0){const A=c.length-1;c[A].setAttribute("tabindex","0"),c.forEach((d,f)=>{f!==A&&(d.setAttribute("tabindex","-1"),d.classList.remove("keyboard-focused"))}),c[A].classList.add("keyboard-focused"),c[A].focus()}}},t=i=>{const l=document.createElement("div");l.setAttribute("aria-live","assertive"),l.setAttribute("aria-atomic","true"),l.className="sr-only",l.textContent=i,document.body.appendChild(l),setTimeout(()=>{document.body.contains(l)&&document.body.removeChild(l)},1e3)},n=(i=null)=>{let l=i;if(l||(l=document.querySelector(".rcb-chat-window"),l||(l=document.querySelector('[class*="rcb-chat"]')),l||(l=document.querySelector(".qa-bot"))),!l)return;const s=l.closest(".embedded-qa-bot")!==null,a=Array.from(l.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(d=>d.offsetParent!==null);if(a.length===0)return;const c=a[a.length-1],u=Array.from(c.querySelectorAll(".rcb-options-container")).filter(d=>d.offsetParent!==null);let A=[];if(u.length>0){const d=u[u.length-1];A=Array.from(d.querySelectorAll(".rcb-options"))}if(A.length===0){let d=c.querySelector(".rcb-checkbox-container");if(!d&&l&&(d=l.querySelector(".rcb-checkbox-container")),d&&d.offsetParent!==null){const f=Array.from(d.querySelectorAll(".rcb-checkbox-row-container")).filter(p=>p.offsetParent!==null&&p.style.display!=="none");if(f.length>0){const p=d.querySelector(".rcb-checkbox-next-button"),v=[...f];if(p&&p.offsetParent!==null&&v.push(p),v.forEach((h,w)=>{h.setAttribute("tabindex",w===0?"0":"-1"),w===0?h.classList.add("keyboard-focused"):h.classList.remove("keyboard-focused")}),f.length>1){d.querySelectorAll(".keyboard-nav-hint").forEach(w=>w.remove());const h=document.createElement("div");h.className="keyboard-nav-hint",h.textContent="Use arrow keys โ†• to navigate, Enter to select/deselect, or click any option",h.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",d.insertBefore(h,d.firstChild)}return void setTimeout(()=>{v[0]&&v[0].offsetParent!==null&&!s&&v[0].focus()},150)}}}if(A.length>0){if(A.forEach((d,f)=>{const p=f===0?"0":"-1";d.setAttribute("tabindex",p),d.setAttribute("role","option"),d.setAttribute("aria-posinset",f+1),d.setAttribute("aria-setsize",A.length),f===0?d.classList.add("keyboard-focused"):d.classList.remove("keyboard-focused")}),A.length>1){const d=u.length>0?u[u.length-1]:null;if(d){d.querySelectorAll(".keyboard-nav-hint").forEach(p=>p.remove());const f=document.createElement("div");f.className="keyboard-nav-hint",f.textContent="Use arrow keys โ†• to navigate, Enter to select, or click any option",f.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",d.insertBefore(f,d.firstChild)}}else{const d=u.length>0?u[u.length-1]:null;d&&d.querySelectorAll(".keyboard-nav-hint").forEach(f=>f.remove())}setTimeout(()=>{A[0]&&A[0].offsetParent!==null&&!s&&(A[0].focus(),A.length>1&&t(`${A.length} options available. Use arrow keys to navigate.`))},200)}},r=new MutationObserver(i=>{i.forEach(l=>{var s,a;if(l.type==="childList"){const c=Array.from(l.addedNodes),u=c.some(d=>{var f,p,v,h;return d.nodeType===Node.ELEMENT_NODE&&(((f=d.classList)==null?void 0:f.contains("rcb-options-container"))||((p=d.classList)==null?void 0:p.contains("rcb-options"))||((v=d.querySelector)==null?void 0:v.call(d,".rcb-options-container"))||((h=d.querySelector)==null?void 0:h.call(d,".rcb-options")))}),A=c.some(d=>{var f,p;return d.nodeType===Node.ELEMENT_NODE&&(((f=d.classList)==null?void 0:f.contains("rcb-checkbox-container"))||((p=d.querySelector)==null?void 0:p.call(d,".rcb-checkbox-container")))});if(u||A){let d=l.target;for(;d&&!((s=d.classList)!=null&&s.contains("qa-bot"))&&!((a=d.classList)!=null&&a.contains("rcb-chat-window"));)d=d.parentElement;(d||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(f=>{f.setAttribute("tabindex","-1"),f.classList.remove("keyboard-focused")}),setTimeout(()=>n(d),100)}}})});r.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),n();const o=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(i=>{const l=i.querySelectorAll(".rcb-options-container .rcb-options").length>0,s=i.querySelectorAll(".rcb-checkbox-row-container").length>0;if(l){const a=i.querySelectorAll(".rcb-options[tabindex]").length;i.querySelectorAll(".rcb-options").length>a&&n(i)}if(s){const a=i.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;i.querySelectorAll(".rcb-checkbox-row-container").length>a&&n(i)}})},1e3);return()=>{document.removeEventListener("keydown",e),r.disconnect(),clearInterval(o)}},[]),null);let pd=!1,Co=null;function hd(){return pd?Promise.resolve():Co||(Co=new Promise((e,t)=>{const n=document.createElement("script");n.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",n.async=!0,n.onload=()=>{pd=!0,Sr("Script loaded"),e()},n.onerror=()=>{Co=null,t(new Error("Failed to load Turnstile script"))},document.head.appendChild(n)}),Co)}const Pr=e=>{if(!e||typeof e!="string")return e;let t=e.replace(/\[(https?:\/\/[^\s]+?)\]/gi,"[$1]($1)");return t=t.replace(new RegExp(`(?<!\\]\\(|href=["']|\\[)https?:\\/\\/[^\\s[\\]()]+`,"gi"),n=>{let r=n,o="";const i=r.match(/([.,;:!?]+)$/);return i&&(o=i[1],r=r.slice(0,-o.length)),`[${r}](${r})${o}`}),t},yw=e=>{let{siteKey:t,onVerify:n,onError:r,loginUrl:o}=e;const i=le(null),l=le(null),s=le(!1),a=le(null),c=le(null),[u,A]=ne(!1),[d,f]=ne(0),p=le("widget_error"),v=le(null),h=o&&o!=="/login",w=X(()=>{const k=window.turnstile;if(a.current&&(k!=null&&k.remove)){try{k.remove(a.current)}catch{}a.current=null}},[]),b=X(()=>{var k;w(),u?r==null||r(p.current,(k=v.current)!==null&&k!==void 0?k:void 0):r==null||r("user_cancelled")},[r,w,u]);ee(()=>()=>{w()},[w]),ee(()=>{var k;return c.current=document.activeElement,(k=l.current)===null||k===void 0||k.focus(),()=>{c.current&&typeof c.current.focus=="function"&&c.current.focus()}},[]),ee(()=>{const k=_=>{if(_.key==="Escape")return _.preventDefault(),void b();if(_.key==="Tab"&&l.current){const E=l.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(E.length===0)return;const P=E[0],x=E[E.length-1];_.shiftKey&&document.activeElement===P?(_.preventDefault(),x.focus()):_.shiftKey||document.activeElement!==x||(_.preventDefault(),P.focus())}};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[b]),ee(()=>{s.current||!i.current||u||(s.current=!0,hd().then(()=>{const k=window.turnstile;if(!k||!i.current)return Ke("Turnstile API not available after script load"),p.current="api_unavailable",void A(!0);a.current=k.render(i.current,{sitekey:t,callback:_=>{Sr("Visible challenge completed"),n(_)},"error-callback":_=>(Ke("Turnstile challenge failed:",_),v.current=_,p.current="widget_error",w(),A(!0),!0),"expired-callback":()=>{Ke("Turnstile token expired"),p.current="token_expired",w(),A(!0)}})}).catch(k=>{Ke("Failed to load Turnstile script:",k),p.current="script_load_failed",A(!0)}))},[t,n,u,w]);const g=N.createElement(N.Fragment,null,N.createElement("div",{"aria-hidden":"true",style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",zIndex:999998}}),N.createElement("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":"qa-bot-turnstile-label",tabIndex:-1,style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:999999,background:"white",padding:"24px",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.3)",maxWidth:"90vw",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'}},N.createElement("span",{id:"qa-bot-turnstile-label",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap"}},"Verification challenge"),u?N.createElement("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"#333"}},d===0?N.createElement("p",{style:{margin:"0 0 16px 0"}},"Verification failed. You can try again",h&&N.createElement(N.Fragment,null,", or"," ",N.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"log in")," ","to skip verification"),"."):N.createElement(N.Fragment,null,N.createElement("p",{style:{margin:"0 0 8px 0"}},"Verification is still not working. This can be caused by browser extensions (ad blockers, privacy tools) or VPN connections."),N.createElement("p",{style:{margin:"0 0 16px 0"}},"Try disabling extensions, using a private/incognito window,",h&&N.createElement(N.Fragment,null," ",N.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"logging in"),",")," ","or using a different browser.")),N.createElement("div",{style:{display:"flex",gap:"8px"}},N.createElement("button",{type:"button",onClick:()=>{w(),s.current=!1,f(k=>k+1),A(!1)},style:{padding:"8px 16px",background:"var(--primaryColor, #107180)",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Try again"),N.createElement("button",{type:"button",onClick:b,style:{padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Close"))):N.createElement(N.Fragment,null,N.createElement("div",{ref:i,style:{borderRadius:"8px",overflow:"hidden"}}),N.createElement("button",{type:"button",onClick:b,style:{marginTop:"16px",padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Cancel"))));return Rs(g,document.body)};function gd(e){const{confidence:t,tools_used:n,metadata:r}=e;if(!(t||n&&n.length!==0))return"";const o=[];return t&&o.push(`โ€ข Confidence: ${t}`),n&&n.length>0&&o.push(`โ€ข Tools used: ${n.join(", ")}`),r!=null&&r.agent&&o.push(`โ€ข Agent: ${r.agent}`),`---
39
67
  ${o.join(`
40
- `)}`}function If(e){let{getState:t,onResubmit:n,trackEvent:r,loginUrl:o}=e;var i,A;const[s,a]=M.useState(null),[l,c]=M.useState(0),u=t(),d=(i=Il)!==null&&i!==void 0?i:{},f=d.VITE_FORCE_TURNSTILE_WIDGET==="true",h=(A=u.siteKey)!==null&&A!==void 0?A:f?d.VITE_TURNSTILE_SITE_KEY:null;return h&&(f||s!==h)?M.createElement(xf,{key:l,siteKey:h,loginUrl:o,onVerify:async m=>{const p=h;u.token=m,r==null||r({type:"chatbot_turnstile_completed"}),await n(m)==="needs_another_challenge"?c(v=>v+1):a(p)},onError:(m,p)=>{var v;const y=(v=u.pendingQuery)===null||v===void 0?void 0:v.queryId,g=h;u.token=null,u.pendingQuery=null,u.needsChallenge=!1,u.siteKey=null,a(g),r==null||r({type:"chatbot_turnstile_error",queryId:y,failureReason:m,cloudflareErrorCode:p})}}):null}const Tf="#1a5b6e",Qf="#107180",Mf="Arial, sans-serif",IA="Q&A Bot",Of="/chat-icon.svg",Nf="Type your question here...",Lf="Select an option to continue",Rf=!1,Hf="Ask me a question!",TA="/login",Uf={general:{showHeader:!0,showFooter:!0},tooltip:{mode:"CLOSE"},chatInput:{disabled:!1,characterLimit:5e3,showCharacterCount:!1,allowNewline:!0,blockSpam:!1},chatWindow:{defaultOpen:!1,showScrollbar:!1},botBubble:{simulateStream:!0,streamSpeed:10,showAvatar:!1},userBubble:{showAvatar:!1},notification:{disabled:!0,showCount:!1},audio:{disabled:!0},emoji:{disabled:!0},fileAttachment:{disabled:!0}},Zo=Ye((e,t)=>{var n,r,o;const{apiKey:i,qaEndpoint:A,ratingEndpoint:s,capabilitiesEndpoint:a,agentRatingEndpoint:l,welcomeMessage:c,open:u,onOpenChange:d,isLoggedIn:f,allowAnonAccess:h=!1,actingUser:m,primaryColor:p,secondaryColor:v,botName:y,logo:g,placeholder:_,errorMessage:P,embedded:E,footerText:k,footerLink:B,tooltipText:T,loginUrl:D,turnstileSiteKey:O,backendId:S,resourceContext:N,customFlow:R,onAnalyticsEvent:L}=e,U=ne(`bot_${Math.random().toString(36).substr(2,9)}`);X(()=>{wf()},[]);const x=ne(null);x.current===null&&(x.current=PA(),Er("CREATED",x.current));const Q=ne(!1),w=ne({getSessionId:()=>x.current,isResetting:()=>Q.current}),V=ne(null),b=function(j,W){const[he,se]=ee(null),[Ce,we]=ee("idle"),ge=ne(null),ze=ne(null),Ne=ne(!0),fn=q(()=>{const xe=window.turnstile;if(ze.current&&(xe!=null&&xe.remove)){try{xe.remove(ze.current)}catch{}ze.current=null}ge.current&&(ge.current.remove(),ge.current=null)},[]);return X(()=>{if(Ne.current=!0,!j)return we("idle"),void se(null);we("loading");const xe=document.createElement("div");return xe.style.position="fixed",xe.style.left="-9999px",xe.style.top="-9999px",xe.style.width="0",xe.style.height="0",xe.style.overflow="hidden",xe.setAttribute("aria-hidden","true"),document.body.appendChild(xe),ge.current=xe,BA().then(()=>{if(!Ne.current)return;const ut=window.turnstile;if(!ut||!ge.current)return Le("Turnstile API not available for silent verification"),we("failed"),void(W==null||W({type:"chatbot_turnstile_silent_failed",failureReason:"api_unavailable"}));const Be=ut.render(ge.current,{sitekey:j,execution:"render","refresh-expired":"auto",callback:St=>{Ne.current&&(Un("Silent verification succeeded"),se(St),we("verified"))},"error-callback":St=>!Ne.current||(Le("Turnstile silent verification failed:",St),se(null),we("failed"),W==null||W({type:"chatbot_turnstile_silent_failed",failureReason:"widget_error",cloudflareErrorCode:St}),!0),"expired-callback":()=>{Ne.current&&(Un("Token expired, awaiting refresh"),se(null),we("loading"))}});ze.current=Be}).catch(ut=>{Ne.current&&(Le("Failed to load Turnstile script for silent verification:",ut),we("failed"),W==null||W({type:"chatbot_turnstile_silent_failed",failureReason:"script_load_failed"}))}),()=>{Ne.current=!1,fn()}},[j,fn]),{token:he,status:Ce,reset:q(()=>{const xe=window.turnstile;ze.current&&(xe!=null&&xe.reset)&&(se(null),we("loading"),xe.reset(ze.current),Un("Token consumed, resetting widget for fresh token"))},[])}}(O,j=>{var W;(W=V.current)===null||W===void 0||W.call(V,j)}),F=ne(null);F.current=b.token;const[J,K]=ee(f);X(()=>{K(f)},[f]);const oe=E!==void 0?E:Rf,ve=q(j=>{var W;L&&L(Object.assign(Object.assign({},j),{timestamp:Date.now(),sessionId:(W=x.current)!==null&&W!==void 0?W:void 0,pageUrl:typeof window<"u"?window.location.href:void 0,isEmbedded:oe}))},[L,oe]);X(()=>{V.current=j=>ve(j)},[ve]);const ue=Ie(()=>{const j=Object.assign({},Uf);j.general=Object.assign(Object.assign({},j.general),{primaryColor:p||Tf,secondaryColor:v||Qf,fontFamily:Mf,embedded:oe});const W=J===!1?[M.createElement(vA,{key:"login-button",loginUrl:D||TA,isHeaderButton:!0})]:[M.createElement(Cf,{key:"history-button"}),M.createElement(df,{key:"user-icon"})];j.header={title:M.createElement("span",{style:{fontSize:14,fontWeight:500}},y||IA),showAvatar:!0,avatar:g||Of,buttons:[...W,De.CLOSE_CHAT_BUTTON]},j.chatInput=Object.assign(Object.assign({},j.chatInput),{disabled:!1,enabledPlaceholderText:_||Nf,disabledPlaceholderText:P||Lf}),j.tooltip=Object.assign(Object.assign({},j.tooltip),{text:T||Hf});const he=k?B?M.createElement("a",{href:B,target:"_blank",rel:"noopener noreferrer",key:"footer-link"},k):M.createElement("span",{key:"footer-text"},k):null;return j.footer={text:he??void 0,buttons:[M.createElement(Sf,{key:"new-chat-button"})]},j.chatWindow=Object.assign(Object.assign({},j.chatWindow),{defaultOpen:!!oe}),j.event={rcbPreInjectMessage:!0,rcbPostInjectMessage:!0,rcbUserSubmitText:!0,rcbChangePath:!0,rcbToggleChatWindow:!0},j},[p,v,y,g,_,P,oe,T,J,D,k,B]),Ve=ne(null),Me=function(j){let W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ie(()=>{const he=(se,Ce)=>{if(j.current){const we=getComputedStyle(j.current).getPropertyValue(se);if(we&&we.trim()!=="")return we.trim();if(j.current.parentElement){const ge=getComputedStyle(j.current.parentElement).getPropertyValue(se);if(ge&&ge.trim()!=="")return ge.trim()}}return Ce};return{primaryColor:he("--primaryColor",W.primaryColor),secondaryColor:he("--secondaryColor",W.secondaryColor),fontFamily:he("--fontFamily",W.fontFamily)}},[j,W])}(Ve,ue.general);((j,W)=>{X(()=>{W.current&&(j?W.current.classList.add("bot-logged-in"):W.current.classList.remove("bot-logged-in"))},[j,W])})(J!==!1,Ve),(j=>{let{settings:W,themeColors:he}=j;X(()=>{he&&(Object.entries(he).forEach(se=>{let[Ce,we]=se;we&&document.documentElement.style.setProperty(`--${Ce}`,we)}),he.primaryColor&&document.documentElement.style.setProperty("--rcb-header-background",he.primaryColor),he.secondaryColor&&document.documentElement.style.setProperty("--rcb-header-background-hover",he.secondaryColor))},[he]),X(()=>{var se,Ce;!((se=W.header)===null||se===void 0)&&se.title&&typeof W.header.title=="string"&&(W.header.title=M.createElement("div",{key:"header-title"},M.createElement("h1",{className:"sr-only"},W.header.title),M.createElement("span",{"aria-hidden":"true"},W.header.title))),W.device={desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},W.chatHistory={disabled:!0},W.chatButton=Object.assign(Object.assign({},W.chatButton),{icon:(Ce=W.header)===null||Ce===void 0?void 0:Ce.avatar}),W.event=Object.assign(Object.assign({},W.event),{rcbToggleChatWindow:!0})},[W])})({settings:ue,themeColors:Me});const Re=Ie(()=>{const j=(he=>{let{endpoint:se,ratingEndpoint:Ce,agentRatingEndpoint:we,apiKey:ge,sessionId:ze,isResetting:Ne=()=>!1,isLoggedIn:fn,allowAnonAccess:xe=!1,loginUrl:ut="/login",trackEvent:Be,getTurnstileToken:St,resetTurnstileToken:pn,backendId:hn,resourceContext:bt}=he;if(fn===!1&&!xe)return Be==null||Be({type:"chatbot_login_prompt_shown"}),{qa_loop:{message:"To ask questions, please log in first.",component:M.createElement(vA,{loginUrl:ut}),chatDisabled:!0,path:"qa_loop"}};let I=null,G=null,Z=!1;const $={siteKey:null,token:null,pendingQuery:null,needsChallenge:!1};let le=null;if(!se)throw new Error("Q&A endpoint is required");return{qa_loop:{message:async de=>{var nt;le=de.injectMessage.bind(de);const{userInput:ke}=de;if((!Ne||!Ne())&&ke&&ke.trim()!==""){if(ke==="๐Ÿ‘ Helpful"||ke==="๐Ÿ‘Ž Not helpful"){if(I){const me=ke==="๐Ÿ‘ Helpful",je=G==="agent"?we:Ce;if(je)try{const fe={"Content-Type":"application/json"};ge&&(fe["X-API-KEY"]=ge);const be=ze();be&&(fe["X-Session-ID"]=be,fe["X-Query-ID"]=I),await fetch(je,{method:"POST",headers:fe,credentials:"include",body:JSON.stringify(G==="agent"?{query_id:I,rating:me?"helpful":"not_helpful",session_id:be}:{sessionId:be,queryId:I,rating:me?1:0})}),Be==null||Be({type:"chatbot_rating_sent",queryId:I,rating:me?"helpful":"not_helpful"})}catch(fe){Le("Error sending feedback:",fe)}}return"Thanks for the feedback!"}try{const me=bA();I=me,Be==null||Be({type:"chatbot_question_sent",queryId:me,questionLength:ke.length});const je={"Content-Type":"application/json"};ge&&(je["X-API-KEY"]=ge);const fe=ze();fe&&(je["X-Session-ID"]=fe,je["X-Query-ID"]=me),je["X-Origin"]=bt||"access";const be={query:ke,question_id:me};fe&&(be.session_id=fe),hn&&(be._backend=hn),bt&&(be.rp_name=bt,be.resource_context=bt);const qe=St==null?void 0:St();qe&&(be.turnstile_token=qe),Er("SENT to API",{session_id:fe,question_id:me});const Wn=Date.now(),Rt=await fetch(se,{method:"POST",headers:je,credentials:"include",body:JSON.stringify(be)});if(!Rt.ok)throw new Error(`API returned ${Rt.status}`);if((Rt.headers.get("content-type")||"").includes("text/event-stream")){pn==null||pn();const Ir=(nt=Rt.body)===null||nt===void 0?void 0:nt.getReader();if(!Ir)throw new Error("Response body is not readable");const ai=new TextDecoder;let Et="",Bt="",Ut=!1;try{for(;;){const{done:Ft,value:Pt}=await Ir.read();if(Ft)break;Et+=ai.decode(Pt,{stream:!0});let yn=Et.indexOf(`
68
+ `)}`}function vw(e){let{getState:t,onResubmit:n,trackEvent:r,loginUrl:o}=e;var i,l;const[s,a]=N.useState(null),[c,u]=N.useState(0),A=t(),d=(i=vf)!==null&&i!==void 0?i:{},f=d.VITE_FORCE_TURNSTILE_WIDGET==="true",p=(l=A.siteKey)!==null&&l!==void 0?l:f?d.VITE_TURNSTILE_SITE_KEY:null;return p&&(f||s!==p)?N.createElement(yw,{key:c,siteKey:p,loginUrl:o,onVerify:async v=>{const h=p;A.token=v,r==null||r({type:"chatbot_turnstile_completed"}),await n(v)==="needs_another_challenge"?u(w=>w+1):a(h)},onError:(v,h)=>{var w;const b=(w=A.pendingQuery)===null||w===void 0?void 0:w.queryId,g=p;A.token=null,A.pendingQuery=null,A.needsChallenge=!1,A.siteKey=null,a(g),r==null||r({type:"chatbot_turnstile_error",queryId:b,failureReason:v,cloudflareErrorCode:h})}}):null}const ww="#1a5b6e",bw="#107180",kw="Arial, sans-serif",md="Q&A Bot",xw="/chat-icon.svg",Ew="Type your question here...",_w="Select an option to continue",Sw=!1,Cw="Ask me a question!",yd="/login",Pw={general:{showHeader:!0,showFooter:!0},tooltip:{mode:"CLOSE"},chatInput:{disabled:!1,characterLimit:5e3,showCharacterCount:!1,allowNewline:!0,blockSpam:!1},chatWindow:{defaultOpen:!1,showScrollbar:!1},botBubble:{simulateStream:!0,streamSpeed:10,showAvatar:!1},userBubble:{showAvatar:!1},notification:{disabled:!0,showCount:!1},audio:{disabled:!0},emoji:{disabled:!0},fileAttachment:{disabled:!0}},jl=ot((e,t)=>{var n,r,o;const{apiKey:i,qaEndpoint:l,ratingEndpoint:s,agentRatingEndpoint:a,welcomeMessage:c,open:u,onOpenChange:A,isLoggedIn:d,allowAnonAccess:f=!1,actingUser:p,primaryColor:v,secondaryColor:h,botName:w,logo:b,placeholder:g,errorMessage:k,embedded:_,footerText:E,footerLink:P,tooltipText:x,loginUrl:B,turnstileSiteKey:D,backendId:T,resourceContext:C,customFlow:L,onAnalyticsEvent:H}=e,R=le(`bot_${Math.random().toString(36).substr(2,9)}`);ee(()=>{cw()},[]);const Q=le(null);Q.current===null&&(Q.current=cd(),So("CREATED",Q.current));const M=le(!1),O=le({getSessionId:()=>Q.current,isResetting:()=>M.current}),m=le(null),G=function(Y,$){const[we,ae]=ne(null),[_e,xe]=ne("idle"),ke=le(null),Le=le(null),ze=le(!0),zt=X(()=>{const He=window.turnstile;if(Le.current&&(He!=null&&He.remove)){try{He.remove(Le.current)}catch{}Le.current=null}ke.current&&(ke.current.remove(),ke.current=null)},[]);return ee(()=>{if(ze.current=!0,!Y)return xe("idle"),void ae(null);xe("loading");const He=document.createElement("div");return He.style.position="fixed",He.style.left="-9999px",He.style.top="-9999px",He.style.width="0",He.style.height="0",He.style.overflow="hidden",He.setAttribute("aria-hidden","true"),document.body.appendChild(He),ke.current=He,hd().then(()=>{if(!ze.current)return;const dt=window.turnstile;if(!dt||!ke.current)return Ke("Turnstile API not available for silent verification"),xe("failed"),void($==null||$({type:"chatbot_turnstile_silent_failed",failureReason:"api_unavailable"}));const Pe=dt.render(ke.current,{sitekey:Y,execution:"render","refresh-expired":"auto",callback:It=>{ze.current&&(Sr("Silent verification succeeded"),ae(It),xe("verified"))},"error-callback":It=>!ze.current||(Ke("Turnstile silent verification failed:",It),ae(null),xe("failed"),$==null||$({type:"chatbot_turnstile_silent_failed",failureReason:"widget_error",cloudflareErrorCode:It}),!0),"expired-callback":()=>{ze.current&&(Sr("Token expired, awaiting refresh"),ae(null),xe("loading"))}});Le.current=Pe}).catch(dt=>{ze.current&&(Ke("Failed to load Turnstile script for silent verification:",dt),xe("failed"),$==null||$({type:"chatbot_turnstile_silent_failed",failureReason:"script_load_failed"}))}),()=>{ze.current=!1,zt()}},[Y,zt]),{token:we,status:_e,reset:X(()=>{const He=window.turnstile;Le.current&&(He!=null&&He.reset)&&(ae(null),xe("loading"),He.reset(Le.current),Sr("Token consumed, resetting widget for fresh token"))},[])}}(D,Y=>{var $;($=m.current)===null||$===void 0||$.call(m,Y)}),y=le(null);y.current=G.token;const[q,re]=ne(d);ee(()=>{re(d)},[d]);const Z=_!==void 0?_:Sw,ce=X(Y=>{var $;H&&H(Object.assign(Object.assign({},Y),{timestamp:Date.now(),sessionId:($=Q.current)!==null&&$!==void 0?$:void 0,pageUrl:typeof window<"u"?window.location.href:void 0,isEmbedded:Z}))},[H,Z]);ee(()=>{m.current=Y=>ce(Y)},[ce]);const Oe=qe(()=>{const Y=Object.assign({},Pw);Y.general=Object.assign(Object.assign({},Y.general),{primaryColor:v||ww,secondaryColor:h||bw,fontFamily:kw,embedded:Z});const $=q===!1?[N.createElement(dd,{key:"history-button"}),N.createElement(od,{key:"login-button",loginUrl:B||yd,isHeaderButton:!0})]:[N.createElement(dd,{key:"history-button"}),N.createElement(tw,{key:"user-icon"})];Y.header={title:N.createElement("span",{style:{fontSize:14,fontWeight:500}},w||md),showAvatar:!0,avatar:b||xw,buttons:[...$,Fe.CLOSE_CHAT_BUTTON]},Y.chatInput=Object.assign(Object.assign({},Y.chatInput),{disabled:!1,enabledPlaceholderText:g||Ew,disabledPlaceholderText:k||_w}),Y.tooltip=Object.assign(Object.assign({},Y.tooltip),{text:x||Cw});const we=E?P?N.createElement("a",{href:P,target:"_blank",rel:"noopener noreferrer",key:"footer-link"},E):N.createElement("span",{key:"footer-text"},E):null;return Y.footer={text:we??void 0,buttons:[N.createElement(hw,{key:"new-chat-button"})]},Y.chatWindow=Object.assign(Object.assign({},Y.chatWindow),{defaultOpen:!!Z}),Y.event={rcbPreInjectMessage:!0,rcbPostInjectMessage:!0,rcbStopStreamMessage:!0,rcbUserSubmitText:!0,rcbChangePath:!0,rcbToggleChatWindow:!0},Y},[v,h,w,b,g,k,Z,x,q,B,E,P]),ye=le(null),st=function(Y){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return qe(()=>{const ae=(_e,xe)=>{if(Y.current){const ke=getComputedStyle(Y.current).getPropertyValue(_e);if(ke&&ke.trim()!=="")return ke.trim();if(Y.current.parentElement){const Le=getComputedStyle(Y.current.parentElement).getPropertyValue(_e);if(Le&&Le.trim()!=="")return Le.trim()}}return xe};return{primaryColor:ae("--primaryColor",$.primaryColor),secondaryColor:ae("--secondaryColor",$.secondaryColor),fontFamily:ae("--fontFamily",$.fontFamily)}},[Y,$])}(ye,Oe.general);((Y,$)=>{ee(()=>{$.current&&(Y?$.current.classList.add("bot-logged-in"):$.current.classList.remove("bot-logged-in"))},[Y,$])})(q!==!1,ye),(Y=>{let{settings:$,themeColors:we}=Y;ee(()=>{we&&(Object.entries(we).forEach(ae=>{let[_e,xe]=ae;xe&&document.documentElement.style.setProperty(`--${_e}`,xe)}),we.primaryColor&&document.documentElement.style.setProperty("--rcb-header-background",we.primaryColor),we.secondaryColor&&document.documentElement.style.setProperty("--rcb-header-background-hover",we.secondaryColor))},[we]),ee(()=>{var ae,_e;!((ae=$.header)===null||ae===void 0)&&ae.title&&typeof $.header.title=="string"&&($.header.title=N.createElement("div",{key:"header-title"},N.createElement("h1",{className:"sr-only"},$.header.title),N.createElement("span",{"aria-hidden":"true"},$.header.title))),$.device={desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},$.chatHistory={disabled:!0},$.chatButton=Object.assign(Object.assign({},$.chatButton),{icon:(_e=$.header)===null||_e===void 0?void 0:_e.avatar}),$.event=Object.assign(Object.assign({},$.event),{rcbToggleChatWindow:!0})},[$])})({settings:Oe,themeColors:st});const Ue=qe(()=>{const Y=(we=>{let{endpoint:ae,ratingEndpoint:_e,agentRatingEndpoint:xe,apiKey:ke,sessionId:Le,isResetting:ze=()=>!1,isLoggedIn:zt,allowAnonAccess:He=!1,loginUrl:dt="/login",trackEvent:Pe,getTurnstileToken:It,resetTurnstileToken:an,backendId:cn,resourceContext:St}=we;if(zt===!1&&!He)return Pe==null||Pe({type:"chatbot_login_prompt_shown"}),{qa_loop:{message:"To ask questions, please log in first.",component:N.createElement(od,{loginUrl:dt}),chatDisabled:!0,path:"qa_loop"}};let ft=null,S=null,U=!1;const F={siteKey:null,token:null,pendingQuery:null,needsChallenge:!1};let K=null;if(!ae)throw new Error("Q&A endpoint is required");return{qa_loop:{message:async W=>{var be;K=W.injectMessage.bind(W);const{userInput:Se}=W;if((!ze||!ze())&&Se&&Se.trim()!==""){if(Se==="๐Ÿ‘ Helpful"||Se==="๐Ÿ‘Ž Not helpful"){if(ft){const fe=Se==="๐Ÿ‘ Helpful",Te=S==="agent"?xe:_e;if(Te)try{const Ne={"Content-Type":"application/json"};ke&&(Ne["X-API-KEY"]=ke);const ie=Le();ie&&(Ne["X-Session-ID"]=ie,Ne["X-Query-ID"]=ft),await fetch(Te,{method:"POST",headers:Ne,credentials:"include",body:JSON.stringify(S==="agent"?{query_id:ft,rating:fe?"helpful":"not_helpful",session_id:ie}:{sessionId:ie,queryId:ft,rating:fe?1:0})}),Pe==null||Pe({type:"chatbot_rating_sent",queryId:ft,rating:fe?"helpful":"not_helpful"})}catch(Ne){Ke("Error sending feedback:",Ne)}}return"Thanks for the feedback!"}try{const fe=ld();ft=fe,Pe==null||Pe({type:"chatbot_question_sent",queryId:fe,questionLength:Se.length});const Te={"Content-Type":"application/json"};ke&&(Te["X-API-KEY"]=ke);const Ne=Le();Ne&&(Te["X-Session-ID"]=Ne,Te["X-Query-ID"]=fe),Te["X-Origin"]=St||"access";const ie={query:Se,question_id:fe};Ne&&(ie.session_id=Ne),cn&&(ie._backend=cn),St&&(ie.rp_name=St,ie.resource_context=St);const je=It==null?void 0:It();je&&(ie.turnstile_token=je),So("SENT to API",{session_id:Ne,question_id:fe});const Qe=Date.now(),un=await fetch(ae,{method:"POST",headers:Te,credentials:"include",body:JSON.stringify(ie)});if(!un.ok)throw new Error(`API returned ${un.status}`);if((un.headers.get("content-type")||"").includes("text/event-stream")){an==null||an();const Oo=(be=un.body)===null||be===void 0?void 0:be.getReader();if(!Oo)throw new Error("Response body is not readable");const Kl=new TextDecoder;let qt="",Kt="",dn=!1;try{for(;;){const{done:fn,value:Wt}=await Oo.read();if(fn)break;qt+=Kl.decode(Wt,{stream:!0});let Kn=qt.indexOf(`
41
69
 
42
- `);for(;yn!==-1;){const pp=Et.slice(0,yn);Et=Et.slice(yn+2);let vn,wn="",Tr="";for(const Ge of pp.split(`
43
- `))Ge.startsWith("event: ")?wn=Ge.slice(7):Ge.startsWith("data: ")&&(Tr=Ge.slice(6));if(wn&&Tr){try{vn=JSON.parse(Tr)}catch{_A("Failed to parse SSE data:",Tr),yn=Et.indexOf(`
70
+ `);for(;Kn!==-1;){const rb=qt.slice(0,Kn);qt=qt.slice(Kn+2);let Xn,Jn="",Qo="";for(const rt of rb.split(`
71
+ `))rt.startsWith("event: ")?Jn=rt.slice(7):rt.startsWith("data: ")&&(Qo=rt.slice(6));if(Jn&&Qo){try{Xn=JSON.parse(Qo)}catch{sd("Failed to parse SSE data:",Qo),Kn=qt.indexOf(`
44
72
 
45
- `);continue}if(wn==="status"){const Ge=vn.message||"Processing...";await de.streamMessage(`_${Ge}_`,"BOT"),Ut=!0}else if(wn==="token"){Bt+=vn.content||"";const Ge=zn(Bt);await de.streamMessage(Ge,"BOT")}else if(wn==="done"){const Ge=vn.metadata||{};if(G=Ge.rating_target||null,Z=Ge.is_final_response===!0,Bt)console.log("[SSE DEBUG] done: tokenContent exists, skipping streamMessage, calling endStreamMessage"),await de.endStreamMessage("BOT");else{const LA=vn.response||"";if(LA){const hp=zn(LA);await de.streamMessage(hp,"BOT"),Ut=!0}Ut&&await de.endStreamMessage("BOT")}}else if(wn==="error"){const Ge=vn.message||"An error occurred";Le("SSE error event:",Ge),Ut?(await de.streamMessage(Ge,"BOT"),await de.endStreamMessage("BOT")):await de.injectMessage(Ge)}yn=Et.indexOf(`
73
+ `);continue}if(Jn==="status"){const rt=Xn.message||"Processing...";await W.streamMessage(`_${rt}_`,"BOT"),dn=!0}else if(Jn==="token"){Kt+=Xn.content||"";const rt=Pr(Kt);await W.streamMessage(rt,"BOT")}else if(Jn==="done"){const rt=Xn.metadata||{};if(S=rt.rating_target||null,U=rt.is_final_response===!0,Kt)await W.endStreamMessage("BOT");else{const Ed=Xn.response||"";if(Ed){const ob=Pr(Ed);await W.streamMessage(ob,"BOT"),dn=!0}dn&&await W.endStreamMessage("BOT")}}else if(Jn==="error"){const rt=Xn.message||"An error occurred";Ke("SSE error event:",rt),dn?(await W.streamMessage(rt,"BOT"),await W.endStreamMessage("BOT")):await W.injectMessage(rt)}Kn=qt.indexOf(`
46
74
 
47
- `)}else yn=Et.indexOf(`
75
+ `)}else Kn=qt.indexOf(`
48
76
 
49
- `)}}Ut&&await de.endStreamMessage("BOT")}catch(Ft){if(Le("Error reading SSE stream:",Ft),!Ut)throw Ft;await de.streamMessage("I had trouble completing the response. Please try again.","BOT"),await de.endStreamMessage("BOT")}const mn=Date.now()-Wn;return void(Be==null||Be({type:"chatbot_answer_received",queryId:me,responseTimeMs:mn,success:!0,responseLength:Bt.length}))}const Br=Date.now()-Wn,_t=await Rt.json();if(_t.requires_turnstile)return Be==null||Be({type:"chatbot_turnstile_shown",queryId:me}),$.siteKey=_t.site_key,$.pendingQuery={query:ke,sessionId:fe,queryId:me},$.needsChallenge=!0,"One moment โ€” verifying your sessionโ€ฆ";pn==null||pn();const gn=_t.response||_t.answer||_t.text||_t.message;if(!gn)throw new Error("Invalid response format from API");const xr=_t.metadata||{};G=xr.rating_target||null,Z=xr.is_final_response===!0;const Dt=zn(gn),Ht=$t()?xA(_t):"",Gn=Ht?`${Dt}
77
+ `)}}dn&&await W.endStreamMessage("BOT")}catch(fn){if(Ke("Error reading SSE stream:",fn),!dn)throw fn;await W.streamMessage("I had trouble completing the response. Please try again.","BOT"),await W.endStreamMessage("BOT")}const $n=Date.now()-Qe;return void(Pe==null||Pe({type:"chatbot_answer_received",queryId:fe,responseTimeMs:$n,success:!0,responseLength:Kt.length}))}const To=Date.now()-Qe,jt=await un.json();if(jt.requires_turnstile)return Pe==null||Pe({type:"chatbot_turnstile_shown",queryId:fe}),F.siteKey=jt.site_key,F.pendingQuery={query:Se,sessionId:Ne,queryId:fe},F.needsChallenge=!0,"One moment โ€” verifying your sessionโ€ฆ";an==null||an();const Vn=jt.response||jt.answer||jt.text||jt.message;if(!Vn)throw new Error("Invalid response format from API");const Mo=jt.metadata||{};S=Mo.rating_target||null,U=Mo.is_final_response===!0;const $t=Pr(Vn),An=En()?gd(jt):"",Br=An?`${$t}
50
78
 
51
- ${Ht}`:Dt;return await de.injectMessage(Gn),void(Be==null||Be({type:"chatbot_answer_received",queryId:me,responseTimeMs:Br,success:!0,responseLength:gn.length,hasMetadata:!!Ht}))}catch(me){return Le("Error in Q&A flow:",me),Be==null||Be({type:"chatbot_answer_error",queryId:I??void 0,errorType:me instanceof Error?me.message:"unknown"}),"I apologize, but I'm having trouble processing your question. Please try again later."}}},options:de=>Ne&&Ne()||de.userInput==="๐Ÿ‘ Helpful"||de.userInput==="๐Ÿ‘Ž Not helpful"||$.needsChallenge?[]:Z&&G&&(G==="agent"?we:Ce)?["๐Ÿ‘ Helpful","๐Ÿ‘Ž Not helpful"]:[],renderMarkdown:["BOT"],chatDisabled:!1,component:M.createElement(If,{getState:()=>$,onResubmit:async de=>{var nt;if(!$.pendingQuery||!le)return Le("Turnstile resubmit called without pending query or injectMessage"),"error";try{const ke={"Content-Type":"application/json"};ge&&(ke["X-API-KEY"]=ge),$.pendingQuery.sessionId&&(ke["X-Session-ID"]=$.pendingQuery.sessionId,ke["X-Query-ID"]=$.pendingQuery.queryId),ke["X-Origin"]=bt||"access";const me={query:$.pendingQuery.query,question_id:$.pendingQuery.queryId,turnstile_token:de};$.pendingQuery.sessionId&&(me.session_id=$.pendingQuery.sessionId),hn&&(me._backend=hn),bt&&(me.rp_name=bt,me.resource_context=bt);const je=await fetch(se,{method:"POST",headers:ke,credentials:"include",body:JSON.stringify(me)}),fe=$.pendingQuery.queryId;if(!je.ok)throw new Error(`API returned ${je.status} after Turnstile`);if((je.headers.get("content-type")||"").includes("text/event-stream")){const gn=(nt=je.body)===null||nt===void 0?void 0:nt.getReader();if(!gn)throw new Error("Response body is not readable");const xr=new TextDecoder;let Dt="",Ht="",Gn={};for(;;){const{done:ai,value:Et}=await gn.read();if(ai)break;Dt+=xr.decode(Et,{stream:!0});let Bt=Dt.indexOf(`
79
+ ${An}`:$t;return await W.injectMessage(Br),void(Pe==null||Pe({type:"chatbot_answer_received",queryId:fe,responseTimeMs:To,success:!0,responseLength:Vn.length,hasMetadata:!!An}))}catch(fe){return Ke("Error in Q&A flow:",fe),Pe==null||Pe({type:"chatbot_answer_error",queryId:ft??void 0,errorType:fe instanceof Error?fe.message:"unknown"}),"I apologize, but I'm having trouble processing your question. Please try again later."}}},options:W=>ze&&ze()||W.userInput==="๐Ÿ‘ Helpful"||W.userInput==="๐Ÿ‘Ž Not helpful"||F.needsChallenge?[]:U&&S&&(S==="agent"?xe:_e)?["๐Ÿ‘ Helpful","๐Ÿ‘Ž Not helpful"]:[],renderMarkdown:["BOT"],chatDisabled:!1,component:N.createElement(vw,{getState:()=>F,onResubmit:async W=>{var be;if(!F.pendingQuery||!K)return Ke("Turnstile resubmit called without pending query or injectMessage"),"error";try{const Se={"Content-Type":"application/json"};ke&&(Se["X-API-KEY"]=ke),F.pendingQuery.sessionId&&(Se["X-Session-ID"]=F.pendingQuery.sessionId,Se["X-Query-ID"]=F.pendingQuery.queryId),Se["X-Origin"]=St||"access";const fe={query:F.pendingQuery.query,question_id:F.pendingQuery.queryId,turnstile_token:W};F.pendingQuery.sessionId&&(fe.session_id=F.pendingQuery.sessionId),cn&&(fe._backend=cn),St&&(fe.rp_name=St,fe.resource_context=St);const Te=await fetch(ae,{method:"POST",headers:Se,credentials:"include",body:JSON.stringify(fe)}),Ne=F.pendingQuery.queryId;if(!Te.ok)throw new Error(`API returned ${Te.status} after Turnstile`);if((Te.headers.get("content-type")||"").includes("text/event-stream")){const Vn=(be=Te.body)===null||be===void 0?void 0:be.getReader();if(!Vn)throw new Error("Response body is not readable");const Mo=new TextDecoder;let $t="",An="",Br={};for(;;){const{done:Kl,value:qt}=await Vn.read();if(Kl)break;$t+=Mo.decode(qt,{stream:!0});let Kt=$t.indexOf(`
52
80
 
53
- `);for(;Bt!==-1;){const Ut=Dt.slice(0,Bt);Dt=Dt.slice(Bt+2);let mn="",Ft="";for(const Pt of Ut.split(`
54
- `))Pt.startsWith("event: ")?mn=Pt.slice(7):Pt.startsWith("data: ")&&(Ft=Pt.slice(6));if(mn&&Ft)try{const Pt=JSON.parse(Ft);mn==="token"?Ht+=Pt.content||"":mn==="done"&&(Gn=Pt.metadata||{})}catch{}Bt=Dt.indexOf(`
81
+ `);for(;Kt!==-1;){const dn=$t.slice(0,Kt);$t=$t.slice(Kt+2);let $n="",fn="";for(const Wt of dn.split(`
82
+ `))Wt.startsWith("event: ")?$n=Wt.slice(7):Wt.startsWith("data: ")&&(fn=Wt.slice(6));if($n&&fn)try{const Wt=JSON.parse(fn);$n==="token"?An+=Wt.content||"":$n==="done"&&(Br=Wt.metadata||{})}catch{}Kt=$t.indexOf(`
55
83
 
56
- `)}}if($.token=null,$.pendingQuery=null,$.needsChallenge=!1,$.siteKey=null,!Ht)throw new Error("No content received from stream");G=Gn.rating_target||null,Z=Gn.is_final_response===!0,I=fe;const Ir=zn(Ht);return await le(Ir),Be==null||Be({type:"chatbot_answer_received",queryId:fe,success:!0,responseLength:Ht.length}),"success"}const be=await je.json();if(be.requires_turnstile)return $.siteKey=be.site_key,$.token=null,await le("Still verifying โ€” please complete the challenge again."),"needs_another_challenge";$.token=null,$.pendingQuery=null,$.needsChallenge=!1,$.siteKey=null;const qe=be.response||be.answer||be.text||be.message;if(!qe)throw new Error("Invalid response format from API");const Wn=be.metadata||{};G=Wn.rating_target||null,Z=Wn.is_final_response===!0,I=fe;const Rt=zn(qe),Br=$t()?xA(be):"",_t=Br?`${Rt}
84
+ `)}}if(F.token=null,F.pendingQuery=null,F.needsChallenge=!1,F.siteKey=null,!An)throw new Error("No content received from stream");S=Br.rating_target||null,U=Br.is_final_response===!0,ft=Ne;const Oo=Pr(An);return await K(Oo),Pe==null||Pe({type:"chatbot_answer_received",queryId:Ne,success:!0,responseLength:An.length}),"success"}const ie=await Te.json();if(ie.requires_turnstile)return F.siteKey=ie.site_key,F.token=null,await K("Still verifying โ€” please complete the challenge again."),"needs_another_challenge";F.token=null,F.pendingQuery=null,F.needsChallenge=!1,F.siteKey=null;const je=ie.response||ie.answer||ie.text||ie.message;if(!je)throw new Error("Invalid response format from API");const Qe=ie.metadata||{};S=Qe.rating_target||null,U=Qe.is_final_response===!0,ft=Ne;const un=Pr(je),To=En()?gd(ie):"",jt=To?`${un}
57
85
 
58
- ${Br}`:Rt;return await le(_t),Be==null||Be({type:"chatbot_answer_received",queryId:fe,success:!0,responseLength:qe.length}),"success"}catch(ke){return Le("Error resubmitting after Turnstile:",ke),$.token=null,$.pendingQuery=null,$.needsChallenge=!1,$.siteKey=null,await(le==null?void 0:le("I had trouble processing your question after verification. Please try again.")),"error"}},trackEvent:Be,loginUrl:ut}),path:"qa_loop"}}})({endpoint:A,ratingEndpoint:s,agentRatingEndpoint:l,apiKey:i,sessionId:w.current.getSessionId,isResetting:w.current.isResetting,isLoggedIn:J,allowAnonAccess:h,loginUrl:D||TA,trackEvent:ve,getTurnstileToken:()=>F.current,resetTurnstileToken:()=>b.reset(),backendId:S,resourceContext:N});return Object.assign(Object.assign({start:{message:c,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"}},j),R||{})},[i,A,s,l,c,J,h,D,R,m,ve,N,S]),st=Ie(()=>{return[()=>Au(W),lf(),()=>cf(j)];var j,W},[]);return X(()=>{const j=()=>{const he=document.querySelector(".rcb-chat-window");if(!he)return;const se=he.querySelector(".rcb-send-button");se&&(se.hasAttribute("tabindex")||se.setAttribute("tabindex","0"),se.hasAttribute("data-keyboard-enabled")||(se.setAttribute("data-keyboard-enabled","true"),se.addEventListener("keydown",Ce=>{if(Ce.key==="Enter"||Ce.key===" "){Ce.preventDefault();const we=se&&Object.keys(se).find(ze=>ze.startsWith("__reactProps"));if(we){const ze=se[we],Ne=ze==null?void 0:ze.onMouseDown;if(Ne&&typeof Ne=="function")return void Ne(Ce)}const ge=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});se.dispatchEvent(ge)}})))},W=setInterval(j,1e3);return j(),()=>clearInterval(W)},[]),Bf(),X(()=>{const j=Ve.current;if(!j)return;const W=he=>{var se,Ce,we;const ge=(Ce=(se=he.target).closest)===null||Ce===void 0?void 0:Ce.call(se,"a");ge&&ge.closest(".rcb-chat-body-container")&&(ge.classList.contains("qa-bot-login-button")||ge.closest(".rcb-options-container")||ve({type:"chatbot_link_clicked",linkUrl:ge.href,linkText:((we=ge.textContent)===null||we===void 0?void 0:we.trim())||""}))};return j.addEventListener("click",W),()=>j.removeEventListener("click",W)},[ve]),X(()=>{if(!oe){const j=W=>{const he=W.data.newState;d==null||d(he);const se=x.current;ve(he?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:se?CA(se):0,durationMs:se?Ef(se):0})};return window.addEventListener("rcb-toggle-chat-window",j),()=>{window.removeEventListener("rcb-toggle-chat-window",j)}}},[oe,d,ve]),M.createElement("div",{className:"qa-bot "+(!((n=ue.general)===null||n===void 0)&&n.embedded?"embedded-qa-bot":""),ref:Ve,role:"region","aria-label":`${y||IA}${!((r=ue.general)===null||r===void 0)&&r.embedded?" - Embedded":""}`},M.createElement(Pf,{getSessionId:()=>x.current,setSessionId:j=>{const W=x.current;x.current=j,Er("RESTORED",`${W==null?void 0:W.slice(-12)} -> ${j.slice(-12)}`)},resetSession:()=>{const j=x.current;Q.current=!0,x.current=PA(),Er("RESET",`${j==null?void 0:j.slice(-12)} -> ${x.current.slice(-12)}`)},clearResettingFlag:()=>{Q.current=!1}},M.createElement(uf,{trackEvent:ve},M.createElement(qa,null,M.createElement("div",null,M.createElement(Df,null),M.createElement(gA,{ref:t,embedded:((o=ue.general)===null||o===void 0?void 0:o.embedded)||!1,currentOpen:u||!1,enabled:J!==!1,onSetEnabled:j=>K(!!j&&void 0)}),M.createElement(jc,{key:`chatbot-${U.current}-${J}`,settings:ue,flow:Re,plugins:st}),M.createElement("div",{role:"status","aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}}),M.createElement("div",{id:"chat-input-help",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}},"Type your message and press Enter to send. Use arrow keys to navigate through response options."))))))});Zo.displayName="QABot";const Ff=()=>{const[e,t]=ee(!1),n=()=>typeof navigator<"u"&&navigator.mediaDevices!==void 0&&typeof navigator.mediaDevices.getDisplayMedia=="function";return{captureScreenshot:async()=>{if(!n())throw new Error("Screen capture is not available in this environment");try{t(!0);const r=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",width:{ideal:1920},height:{ideal:1080}},audio:!1}),o=document.createElement("video");o.srcObject=r,await new Promise(c=>{o.onloadedmetadata=()=>{o.play(),c()}});const i=document.createElement("canvas");i.width=o.videoWidth,i.height=o.videoHeight;const A=i.getContext("2d");if(!A)throw new Error("Could not get canvas context");A.drawImage(o,0,0,i.width,i.height);const s=await new Promise(c=>i.toBlob(c,"image/png"));if(!s)throw new Error("Could not create image blob");const a=new Date().toISOString().replace(/[:.]/g,"-"),l=new File([s],`screenshot-${a}.png`,{type:"image/png"});return r.getTracks().forEach(c=>c.stop()),t(!1),l}catch(r){throw Le("Error capturing screenshot:",r),t(!1),r}},isCapturing:e,isScreenCaptureAvailable:n()}},zf=e=>M.createElement(SA,e,M.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),M.createElement("polyline",{points:"17 8 12 3 7 8"}),M.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),jf=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{if(typeof r.result!="string")return void n(new Error(`Failed to read file ${e.name}`));const o=r.result.split(",")[1];t({fileName:e.name,contentType:e.type,size:e.size,fileData:o})},r.onerror=()=>n(new Error(`Failed to read file ${e.name}`)),r.readAsDataURL(e)}),qf=e=>Promise.all(e.map(jf)),Wf=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`,Cr=e=>{let{onFileUpload:t,maxSizeMB:n=10,acceptedTypes:r="image/*,application/pdf,text/*,.doc,.docx",enableScreenshot:o=!1,className:i}=e;const[A,s]=ee(!1),[a,l]=ee([]),[c,u]=ee(null),d=ne(null),{captureScreenshot:f,isCapturing:h,isScreenCaptureAvailable:m}=Ff(),p=E=>{const k=document.createElement("div");k.setAttribute("aria-live","assertive"),k.setAttribute("aria-atomic","true"),k.className="sr-only",k.textContent=E,document.body.appendChild(k),setTimeout(()=>document.body.removeChild(k),1e3)},v=E=>{if(!E||E.length===0)return void _A("FileUploadComponent: No valid files provided to handleFiles");let k;try{k=Array.from(E)}catch(O){return Le("FileUploadComponent: Error converting files to array:",O),void p("Error processing selected files. Please try again.")}const B=[...a,...k];l(B);const T=k.length,D=k.map(O=>O.name).join(", ");p(`${T} file${T>1?"s":""} selected: ${D}`),setTimeout(()=>{const O=document.querySelector(".rcb-chat-content");O&&(O.scrollTop=O.scrollHeight)},100),t&&t(B)},y=E=>{E.preventDefault(),E.stopPropagation(),E.type==="dragenter"||E.type==="dragover"?s(!0):E.type==="dragleave"&&s(!1)},g=()=>{try{d.current&&d.current.click()}catch(E){Le("FileUploadComponent: Error in handleButtonClick:",E),p("Error opening file selection dialog. Please try again.")}},_=()=>{u(null)},P=o&&m;return M.createElement("div",{className:`file-upload-container ${i||""}`,style:{padding:"16px",margin:"8px 0"}},P&&M.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},M.createElement("button",{onClick:E=>{E.preventDefault(),(async()=>{try{const k=await f();v([k]),p("Screenshot captured successfully")}catch{p("Error capturing screenshot. Please try again.")}})()},disabled:h,"aria-describedby":"screenshot-help","aria-label":h?"Taking screenshot, please wait":"Take a screenshot to attach",style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:"#107180",color:"white",border:"none",borderRadius:"5px",padding:"8px 12px",cursor:h?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},M.createElement("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),M.createElement("circle",{cx:"12",cy:"13",r:"4"})),h?"Taking screenshot...":"Take screenshot..."),M.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),M.createElement("div",{className:"file-upload-dropzone "+(A?"active":""),onDragEnter:y,onDragLeave:y,onDragOver:y,onDrop:E=>{var k;E.preventDefault(),E.stopPropagation(),s(!1);try{!((k=E.dataTransfer)===null||k===void 0)&&k.files&&E.dataTransfer.files.length>0&&v(E.dataTransfer.files)}catch(B){Le("FileUploadComponent: Error in handleDrop:",B),p("Error processing dropped files. Please try again.")}},role:"button",tabIndex:0,"aria-label":"File upload area. Click to select files or drag and drop files here.","aria-describedby":"upload-instructions",onKeyDown:E=>{E.key!=="Enter"&&E.key!==" "||(E.preventDefault(),g())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:A?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},M.createElement("input",{ref:d,type:"file",className:"file-input",onChange:E=>{var k;try{!((k=E.target)===null||k===void 0)&&k.files&&E.target.files.length>0&&v(E.target.files)}catch(B){Le("FileUploadComponent: Error in handleFileSelect:",B),p("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:r}),M.createElement("div",{className:"upload-content",onClick:g,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},M.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},M.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},M.createElement(zf,null),M.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),M.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. (Max ",n,"MB each)")),a.length>0&&M.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},M.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),a.map((E,k)=>M.createElement("span",{key:k,style:{background:"#fff",color:"#107180",borderRadius:"5px",padding:"4px 12px",fontSize:"14px",marginRight:"4px",marginBottom:"4px",border:"1px solid #ccc",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},onClick:B=>{B.stopPropagation(),(T=>{u(T)})(E)}},M.createElement("span",{onClick:B=>{B.stopPropagation(),(T=>{const D=a.filter((O,S)=>S!==T);l(D),t&&t(D)})(k)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":`Remove ${E.name}`},"ร—"),E.name," (",Wf(E.size),")"))))),(()=>{if(!c)return null;const E=c.type.startsWith("image/"),k=c.type.startsWith("text/"),B=c.type==="application/pdf";return M.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:_},M.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:T=>T.stopPropagation()},M.createElement("button",{onClick:_,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"ร—"),M.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},c.name),E&&M.createElement("img",{src:URL.createObjectURL(c),alt:c.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),k&&M.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(c)),B&&M.createElement("iframe",{src:URL.createObjectURL(c),style:{width:"100%",height:"70vh",border:"none"},title:c.name}),!E&&!k&&!B&&M.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())};function Gf(e,t){if(!t||Object.keys(t).length===0)return e;const n={};for(const[r,o]of Object.entries(e)){let i=Object.assign({},o);if(i.chatDisabled===void 0){const A=!(!i.options&&!i.checkboxes);i.chatDisabled=A}n[r]=i}return n}function kr(e){return async t=>{const n=await e(t);await t.injectMessage(n)}}const Yf=M.forwardRef((e,t)=>{var{defaultOpen:n}=e,r=fa(e,["defaultOpen"]);const[o,i]=M.useState(n||!1),A=M.useRef(null);return M.useImperativeHandle(t,()=>({addMessage:s=>{var a;(a=A.current)===null||a===void 0||a.addMessage(s)},setBotEnabled:s=>{var a;(a=A.current)===null||a===void 0||a.setBotEnabled(s)},openChat:()=>{var s;i(!0),(s=A.current)===null||s===void 0||s.openChat()},closeChat:()=>{var s;i(!1),(s=A.current)===null||s===void 0||s.closeChat()},toggleChat:()=>{var s;i(a=>!a),(s=A.current)===null||s===void 0||s.toggleChat()}}),[]),M.createElement(Zo,rr({ref:A},r,{open:o,onOpenChange:i}))});Yf.displayName="ProgrammaticQABot";const ct={QA_ENDPOINT:"https://qa-bot-proxy.netlify.app/api/chat",RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/chat/rating/",BACKEND_ID:"access",AGENT_ENDPOINT:"https://qa.access-ci.org/api/v1",get CAPABILITIES_ENDPOINT(){return`${this.AGENT_ENDPOINT}/capabilities`},get AGENT_RATING_ENDPOINT(){return`${this.AGENT_ENDPOINT}/rating`},METRICS_API_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/xdmod/chat/api/",METRICS_RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/xdmod/chat/rating/",METRICS_QUESTIONS_URL:"https://metrics.access-ci.org/qa_bot_faq",NETLIFY_BASE_URL:"https://access-jsm-api.netlify.app",DEFAULT_API_KEY:"4nn5l4T4TnkMdzsK0AwAtnGRcheBDnjawuAT42LaOLc",TURNSTILE_SITE_KEY:"0x4AAAAAAC2toq7FThjGplVx",ALLOW_ANON_ACCESS:!0},Vt={BOT_NAME:"ACCESS Q&A",LOGO:"https://support.access-ci.org/themes/contrib/asp-theme/images/icons/ACCESS-arrrow.svg",WELCOME_MESSAGE:`Hello! I can answer questions about ACCESS resources, allocations, and more. Choose an option below or just type your question.
86
+ ${To}`:un;return await K(jt),Pe==null||Pe({type:"chatbot_answer_received",queryId:Ne,success:!0,responseLength:je.length}),"success"}catch(Se){return Ke("Error resubmitting after Turnstile:",Se),F.token=null,F.pendingQuery=null,F.needsChallenge=!1,F.siteKey=null,await(K==null?void 0:K("I had trouble processing your question after verification. Please try again.")),"error"}},trackEvent:Pe,loginUrl:dt}),path:"qa_loop"}}})({endpoint:l,ratingEndpoint:s,agentRatingEndpoint:a,apiKey:i,sessionId:O.current.getSessionId,isResetting:O.current.isResetting,isLoggedIn:q,allowAnonAccess:f,loginUrl:B||yd,trackEvent:ce,getTurnstileToken:()=>y.current,resetTurnstileToken:()=>G.reset(),backendId:T,resourceContext:C});return Object.assign(Object.assign({start:{message:c,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"}},Y),L||{})},[i,l,s,a,c,q,f,B,L,p,ce,C,T]),Ve=qe(()=>{return[()=>Kp($),Kg({markdownComponent:Zv}),()=>Xg(Y)];var Y,$},[]);return ee(()=>{const Y=()=>{const we=document.querySelector(".rcb-chat-window");if(!we)return;const ae=we.querySelector(".rcb-send-button");ae&&(ae.hasAttribute("tabindex")||ae.setAttribute("tabindex","0"),ae.hasAttribute("data-keyboard-enabled")||(ae.setAttribute("data-keyboard-enabled","true"),ae.addEventListener("keydown",_e=>{if(_e.key==="Enter"||_e.key===" "){_e.preventDefault();const xe=ae&&Object.keys(ae).find(Le=>Le.startsWith("__reactProps"));if(xe){const Le=ae[xe],ze=Le==null?void 0:Le.onMouseDown;if(ze&&typeof ze=="function")return void ze(_e)}const ke=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});ae.dispatchEvent(ke)}})))},$=setInterval(Y,1e3);return Y(),()=>clearInterval($)},[]),mw(),ee(()=>{const Y=ye.current;if(!Y)return;const $=we=>{var ae,_e,xe;const ke=(_e=(ae=we.target).closest)===null||_e===void 0?void 0:_e.call(ae,"a");ke&&ke.closest(".rcb-chat-body-container")&&(ke.classList.contains("qa-bot-login-button")||ke.closest(".rcb-options-container")||ce({type:"chatbot_link_clicked",linkUrl:ke.href,linkText:((xe=ke.textContent)===null||xe===void 0?void 0:xe.trim())||""}))};return Y.addEventListener("click",$),()=>Y.removeEventListener("click",$)},[ce]),ee(()=>{if(!Z){const Y=$=>{const we=$.data.newState;A==null||A(we);const ae=Q.current;ce(we?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:ae?ud(ae):0,durationMs:ae?dw(ae):0})};return window.addEventListener("rcb-toggle-chat-window",Y),()=>{window.removeEventListener("rcb-toggle-chat-window",Y)}}},[Z,A,ce]),N.createElement("div",{className:"qa-bot "+(!((n=Oe.general)===null||n===void 0)&&n.embedded?"embedded-qa-bot":""),ref:ye,role:"region","aria-label":`${w||md}${!((r=Oe.general)===null||r===void 0)&&r.embedded?" - Embedded":""}`},N.createElement(fw,{getSessionId:()=>Q.current,setSessionId:Y=>{const $=Q.current;Q.current=Y,So("RESTORED",`${$==null?void 0:$.slice(-12)} -> ${Y.slice(-12)}`)},resetSession:()=>{const Y=Q.current;M.current=!0,Q.current=cd(),So("RESET",`${Y==null?void 0:Y.slice(-12)} -> ${Q.current.slice(-12)}`)},clearResettingFlag:()=>{M.current=!1}},N.createElement(ew,{trackEvent:ce},N.createElement(Oa,null,N.createElement("div",null,N.createElement(gw,null),N.createElement(td,{ref:t,embedded:((o=Oe.general)===null||o===void 0?void 0:o.embedded)||!1,currentOpen:u||!1,enabled:q!==!1,onSetEnabled:Y=>re(!!Y&&void 0)}),N.createElement(Bp,{key:`chatbot-${R.current}-${q}`,settings:Oe,flow:Ue,plugins:Ve}),N.createElement("div",{role:"status","aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}}),N.createElement("div",{id:"chat-input-help",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}},"Type your message and press Enter to send. Use arrow keys to navigate through response options."))))))});jl.displayName="QABot";const Dw=()=>{const[e,t]=ne(!1),n=()=>typeof navigator<"u"&&navigator.mediaDevices!==void 0&&typeof navigator.mediaDevices.getDisplayMedia=="function";return{captureScreenshot:async()=>{if(!n())throw new Error("Screen capture is not available in this environment");try{t(!0);const r=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",width:{ideal:1920},height:{ideal:1080}},audio:!1}),o=document.createElement("video");o.srcObject=r,await new Promise(u=>{o.onloadedmetadata=()=>{o.play(),u()}});const i=document.createElement("canvas");i.width=o.videoWidth,i.height=o.videoHeight;const l=i.getContext("2d");if(!l)throw new Error("Could not get canvas context");l.drawImage(o,0,0,i.width,i.height);const s=await new Promise(u=>i.toBlob(u,"image/png"));if(!s)throw new Error("Could not create image blob");const a=new Date().toISOString().replace(/[:.]/g,"-"),c=new File([s],`screenshot-${a}.png`,{type:"image/png"});return r.getTracks().forEach(u=>u.stop()),t(!1),c}catch(r){throw Ke("Error capturing screenshot:",r),t(!1),r}},isCapturing:e,isScreenCaptureAvailable:n()}},Iw=e=>N.createElement(fd,e,N.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),N.createElement("polyline",{points:"17 8 12 3 7 8"}),N.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),Bw=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{if(typeof r.result!="string")return void n(new Error(`Failed to read file ${e.name}`));const o=r.result.split(",")[1];t({fileName:e.name,contentType:e.type,size:e.size,fileData:o})},r.onerror=()=>n(new Error(`Failed to read file ${e.name}`)),r.readAsDataURL(e)}),Tw=e=>Promise.all(e.map(Bw)),Mw=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`,Po=e=>{let{onFileUpload:t,maxSizeMB:n=10,acceptedTypes:r="image/*,application/pdf,text/*,.doc,.docx",enableScreenshot:o=!1,className:i}=e;const[l,s]=ne(!1),[a,c]=ne([]),[u,A]=ne(null),d=le(null),{captureScreenshot:f,isCapturing:p,isScreenCaptureAvailable:v}=Dw(),h=E=>{const P=document.createElement("div");P.setAttribute("aria-live","assertive"),P.setAttribute("aria-atomic","true"),P.className="sr-only",P.textContent=E,document.body.appendChild(P),setTimeout(()=>document.body.removeChild(P),1e3)},w=E=>{if(!E||E.length===0)return void sd("FileUploadComponent: No valid files provided to handleFiles");let P;try{P=Array.from(E)}catch(T){return Ke("FileUploadComponent: Error converting files to array:",T),void h("Error processing selected files. Please try again.")}const x=[...a,...P];c(x);const B=P.length,D=P.map(T=>T.name).join(", ");h(`${B} file${B>1?"s":""} selected: ${D}`),setTimeout(()=>{const T=document.querySelector(".rcb-chat-content");T&&(T.scrollTop=T.scrollHeight)},100),t&&t(x)},b=E=>{E.preventDefault(),E.stopPropagation(),E.type==="dragenter"||E.type==="dragover"?s(!0):E.type==="dragleave"&&s(!1)},g=()=>{try{d.current&&d.current.click()}catch(E){Ke("FileUploadComponent: Error in handleButtonClick:",E),h("Error opening file selection dialog. Please try again.")}},k=()=>{A(null)},_=o&&v;return N.createElement("div",{className:`file-upload-container ${i||""}`,style:{padding:"16px",margin:"8px 0"}},_&&N.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},N.createElement("button",{onClick:E=>{E.preventDefault(),(async()=>{try{const P=await f();w([P]),h("Screenshot captured successfully")}catch{h("Error capturing screenshot. Please try again.")}})()},disabled:p,"aria-describedby":"screenshot-help","aria-label":p?"Taking screenshot, please wait":"Take a screenshot to attach",style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:"#107180",color:"white",border:"none",borderRadius:"5px",padding:"8px 12px",cursor:p?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},N.createElement("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),N.createElement("circle",{cx:"12",cy:"13",r:"4"})),p?"Taking screenshot...":"Take screenshot..."),N.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),N.createElement("div",{className:"file-upload-dropzone "+(l?"active":""),onDragEnter:b,onDragLeave:b,onDragOver:b,onDrop:E=>{var P;E.preventDefault(),E.stopPropagation(),s(!1);try{!((P=E.dataTransfer)===null||P===void 0)&&P.files&&E.dataTransfer.files.length>0&&w(E.dataTransfer.files)}catch(x){Ke("FileUploadComponent: Error in handleDrop:",x),h("Error processing dropped files. Please try again.")}},role:"button",tabIndex:0,"aria-label":"File upload area. Click to select files or drag and drop files here.","aria-describedby":"upload-instructions",onKeyDown:E=>{E.key!=="Enter"&&E.key!==" "||(E.preventDefault(),g())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:l?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},N.createElement("input",{ref:d,type:"file",className:"file-input",onChange:E=>{var P;try{!((P=E.target)===null||P===void 0)&&P.files&&E.target.files.length>0&&w(E.target.files)}catch(x){Ke("FileUploadComponent: Error in handleFileSelect:",x),h("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:r}),N.createElement("div",{className:"upload-content",onClick:g,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},N.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},N.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},N.createElement(Iw,null),N.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),N.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. (Max ",n,"MB each)")),a.length>0&&N.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},N.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),a.map((E,P)=>N.createElement("span",{key:P,style:{background:"#fff",color:"#107180",borderRadius:"5px",padding:"4px 12px",fontSize:"14px",marginRight:"4px",marginBottom:"4px",border:"1px solid #ccc",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},onClick:x=>{x.stopPropagation(),(B=>{A(B)})(E)}},N.createElement("span",{onClick:x=>{x.stopPropagation(),(B=>{const D=a.filter((T,C)=>C!==B);c(D),t&&t(D)})(P)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":`Remove ${E.name}`},"ร—"),E.name," (",Mw(E.size),")"))))),(()=>{if(!u)return null;const E=u.type.startsWith("image/"),P=u.type.startsWith("text/"),x=u.type==="application/pdf";return N.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:k},N.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:B=>B.stopPropagation()},N.createElement("button",{onClick:k,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"ร—"),N.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},u.name),E&&N.createElement("img",{src:URL.createObjectURL(u),alt:u.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),P&&N.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(u)),x&&N.createElement("iframe",{src:URL.createObjectURL(u),style:{width:"100%",height:"70vh",border:"none"},title:u.name}),!E&&!P&&!x&&N.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())};function Ow(e,t){if(!t||Object.keys(t).length===0)return e;const n={};for(const[r,o]of Object.entries(e)){let i=Object.assign({},o);if(i.chatDisabled===void 0){const l=!(!i.options&&!i.checkboxes);i.chatDisabled=l}n[r]=i}return n}function Do(e){return async t=>{const n=await e(t);await t.injectMessage(n)}}const Qw=N.forwardRef((e,t)=>{var{defaultOpen:n}=e,r=ra(e,["defaultOpen"]);const[o,i]=N.useState(n||!1),l=N.useRef(null);return N.useImperativeHandle(t,()=>({addMessage:s=>{var a;(a=l.current)===null||a===void 0||a.addMessage(s)},setBotEnabled:s=>{var a;(a=l.current)===null||a===void 0||a.setBotEnabled(s)},openChat:()=>{var s;i(!0),(s=l.current)===null||s===void 0||s.openChat()},closeChat:()=>{var s;i(!1),(s=l.current)===null||s===void 0||s.closeChat()},toggleChat:()=>{var s;i(a=>!a),(s=l.current)===null||s===void 0||s.toggleChat()}}),[]),N.createElement(jl,zr({ref:l},r,{open:o,onOpenChange:i}))});Qw.displayName="ProgrammaticQABot";const _t={QA_ENDPOINT:"https://qa-bot-proxy.netlify.app/api/chat",RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/chat/rating/",BACKEND_ID:"access",AGENT_ENABLED:!1,AGENT_ENDPOINT:"http://localhost:8000/api/v1",get CAPABILITIES_ENDPOINT(){return`${this.AGENT_ENDPOINT}/capabilities`},get AGENT_RATING_ENDPOINT(){return`${this.AGENT_ENDPOINT}/rating`},METRICS_API_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/xdmod/chat/api/",METRICS_RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/xdmod/chat/rating/",METRICS_QUESTIONS_URL:"https://metrics.access-ci.org/qa_bot_faq",NETLIFY_BASE_URL:"https://access-jsm-api.netlify.app",DEFAULT_API_KEY:"4nn5l4T4TnkMdzsK0AwAtnGRcheBDnjawuAT42LaOLc",TURNSTILE_SITE_KEY:"0x4AAAAAACyJamk8FS7-RSMr",ALLOW_ANON_ACCESS:!0},vd=`<em>AI-powered responses may not always be accurate. Don't share passwords or secrets.</em> <a href="https://support.access-ci.org/tools/access-qa-tool/privacy">Privacy Notice</a>`,_n={BOT_NAME:"ACCESS Q&A",LOGO:"https://support.access-ci.org/themes/contrib/asp-theme/images/icons/ACCESS-arrrow.svg",WELCOME_MESSAGE:`Hello! Ask me about ACCESS resources, allocations, and more.
59
87
 
60
- <em>This assistant is powered by AI. Responses may not always be accurate. Do not share passwords or secrets.</em> <a href="https://support.access-ci.org/tools/access-qa-tool/privacy">Privacy Notice</a>`,LOGIN_URL:"/login",PRIMARY_COLOR:"#1a5b6e",SECONDARY_COLOR:"#107180",TOOLTIP:"Ask me about ACCESS! ๐Ÿ˜Š"},QA={SESSION_ID:"access-qa-bot-session-id"};function $f({welcome:e,setTicketForm:t,trackEvent:n}){return{start:{message:e,renderHtml:["BOT"],options:["Ask a question","Open a help ticket","Report a security issue","Ask about metrics"],chatDisabled:!1,path:r=>{const o=r.userInput;switch(n({type:"chatbot_menu_selected",selection:o}),o){case"Ask a question":return"qa_prompt";case"Open a help ticket":return t({}),"help_ticket";case"Report a security issue":return t({}),n({type:"chatbot_security_started"}),"security_incident";case"Ask about metrics":return"metrics_intro";default:return"qa_loop"}}},qa_prompt:{message:"What would you like to ask?",chatDisabled:!1,path:"qa_loop"}}}let ei=null;function Vf(e){ei=e}function te(){return ei?ei.ticketForm||{}:(console.warn("Form context not available, returning empty form"),{})}function Ue(e={}){const t=te();return{...t,email:e.email||t.email,name:e.name||t.name,accessId:e.accessId||t.accessId}}function ti(e){return e&&e.length>0?`
61
- Attachments: ${e.length} file(s) attached`:""}const dn={SUPPORT:17,LOGIN_ACCESS:30,LOGIN_PROVIDER:31,SECURITY:26};async function Kf(e,t="support",n=[]){const o={support:dn.SUPPORT,general_help:dn.SUPPORT,loginAccess:dn.LOGIN_ACCESS,loginProvider:dn.LOGIN_PROVIDER,security:dn.SECURITY}[t]||dn.SUPPORT,A={serviceDeskId:t==="security"?3:2,requestTypeId:o,requestFieldValues:{...e}};return n.length>0&&(A.attachments=await qf(n)),A}async function Xf(e,t){var o,i;const r=`${ct.NETLIFY_BASE_URL}/api/v1/${t}`;try{const A=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!A.ok){let a="";try{const l=await A.text();try{const c=JSON.parse(l);a=c.message||c.error||l}catch{a=l}}catch{a=`HTTP ${A.status} ${A.statusText}`}return A.status===403?a="The ticket service is temporarily unavailable. Please try again later or contact support directly.":A.status===404?a="Ticket service not found. Please try again later.":A.status===500?a="Server error. Please try again later.":A.status===401&&(a="Authentication error with the ticket service. Please contact support."),{success:!1,status:A.status,error:a}}const s=await A.json();return{success:!0,ticketKey:(o=s.data)==null?void 0:o.ticketKey,ticketUrl:(i=s.data)==null?void 0:i.ticketUrl}}catch(A){return{success:!1,error:A instanceof Error?A.message:"Unknown error"}}}async function Sr(e,t,n=[]){try{const r=await Kf(e,t,n);return await Xf(r,t==="security"?"security-incidents":"tickets")}catch(r){return{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}function ni(e,t="ticket"){return e?e.success?e.ticketUrl&&e.ticketKey?`Your ${t} has been submitted successfully.
88
+ ${vd}`,LOGIN_URL:"/login",PRIMARY_COLOR:"#1a5b6e",SECONDARY_COLOR:"#107180",TOOLTIP:"Ask me about ACCESS! ๐Ÿ˜Š"};function Lw(){return`Hello! Ask me about this resource โ€” software, storage, running jobs, logging in, and more.
89
+
90
+ ${vd}`}const wd={SESSION_ID:"access-qa-bot-session-id"};function Nw({welcome:e,setTicketForm:t,trackEvent:n}){return{start:{message:e,renderHtml:["BOT"],options:["Ask a question","Open a help ticket","Report a security issue","Ask about metrics"],chatDisabled:!1,path:r=>{const o=r.userInput;switch(n({type:"chatbot_menu_selected",selection:o}),o){case"Ask a question":return"qa_prompt";case"Open a help ticket":return t({}),"help_ticket";case"Report a security issue":return t({}),n({type:"chatbot_security_started"}),"security_incident";case"Ask about metrics":return"metrics_intro";default:return"qa_loop"}}},qa_prompt:{message:"What would you like to ask?",chatDisabled:!1,path:"qa_loop"}}}let ql=null;function Rw(e){ql=e}function oe(){return ql?ql.ticketForm||{}:(console.warn("Form context not available, returning empty form"),{})}function Je(e={}){const t=oe();return{...t,email:e.email||t.email,name:e.name||t.name,accessId:e.accessId||t.accessId}}function Wl(e){return e&&e.length>0?`
91
+ Attachments: ${e.length} file(s) attached`:""}const Yn={SUPPORT:17,LOGIN_ACCESS:30,LOGIN_PROVIDER:31,SECURITY:26};async function Fw(e,t="support",n=[]){const o={support:Yn.SUPPORT,general_help:Yn.SUPPORT,loginAccess:Yn.LOGIN_ACCESS,loginProvider:Yn.LOGIN_PROVIDER,security:Yn.SECURITY}[t]||Yn.SUPPORT,l={serviceDeskId:t==="security"?3:2,requestTypeId:o,requestFieldValues:{...e}};return n.length>0&&(l.attachments=await Tw(n)),l}async function Hw(e,t){var o,i;const r=`${_t.NETLIFY_BASE_URL}/api/v1/${t}`;try{const l=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!l.ok){let a="";try{const c=await l.text();try{const u=JSON.parse(c);a=u.message||u.error||c}catch{a=c}}catch{a=`HTTP ${l.status} ${l.statusText}`}return l.status===403?a="The ticket service is temporarily unavailable. Please try again later or contact support directly.":l.status===404?a="Ticket service not found. Please try again later.":l.status===500?a="Server error. Please try again later.":l.status===401&&(a="Authentication error with the ticket service. Please contact support."),{success:!1,status:l.status,error:a}}const s=await l.json();return{success:!0,ticketKey:(o=s.data)==null?void 0:o.ticketKey,ticketUrl:(i=s.data)==null?void 0:i.ticketUrl}}catch(l){return{success:!1,error:l instanceof Error?l.message:"Unknown error"}}}async function Io(e,t,n=[]){try{const r=await Fw(e,t,n);return await Hw(r,t==="security"?"security-incidents":"tickets")}catch(r){return{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}function Gl(e,t="ticket"){return e?e.success?e.ticketUrl&&e.ticketKey?`Your ${t} has been submitted successfully.
62
92
 
63
93
  Ticket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>
64
94
 
@@ -68,50 +98,50 @@ Our support team will review your request and respond accordingly. Thank you for
68
98
 
69
99
  Please try again or contact our support team directly.`:`We apologize, but there was an error submitting your ${t}.
70
100
 
71
- Please try again or contact our support team directly.`}function Dr(e){return!e||e.trim()===""?{success:!1,promptContent:"Email is required",promptDuration:3e3,promptType:"error"}:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?{success:!0}:{success:!1,promptContent:"Please enter a valid email address",promptDuration:3e3,promptType:"error"}}function jn(){return()=>({success:!0})}function qn(e){return!e||e.trim()===""||e.trim().toLowerCase()==="skip"?"":e.trim()}function Jf({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){let o=null;const i=async(s,a=[])=>{o=await Sr(s,"loginAccess",a),o.success?(t(l=>({...l,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),r({type:"chatbot_ticket_submitted",ticketType:"access_login",success:!0,ticketKey:o.ticketKey})):(t(l=>({...l,submissionError:o.error})),r({type:"chatbot_ticket_error",ticketType:"access_login",errorType:o.error||"unknown"}))};return{access_help:{message:`If you're having trouble logging into the ACCESS website, here are some common issues:
101
+ Please try again or contact our support team directly.`}function Bo(e){return!e||e.trim()===""?{success:!1,promptContent:"Email is required",promptDuration:3e3,promptType:"error"}:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?{success:!0}:{success:!1,promptContent:"Please enter a valid email address",promptDuration:3e3,promptType:"error"}}function Dr(){return()=>({success:!0})}function Ir(e){return!e||e.trim()===""||e.trim().toLowerCase()==="skip"?"":e.trim()}function Uw({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){let o=null;const i=async(s,a=[])=>{o=await Io(s,"loginAccess",a),o.success?(t(c=>({...c,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),r({type:"chatbot_ticket_submitted",ticketType:"access_login",success:!0,ticketKey:o.ticketKey})):(t(c=>({...c,submissionError:o.error})),r({type:"chatbot_ticket_error",ticketType:"access_login",errorType:o.error||"unknown"}))};return{access_help:{message:`If you're having trouble logging into the ACCESS website, here are some common issues:
72
102
 
73
103
  โ€ข Make sure you're using a supported browser (Chrome, Firefox, Safari)
74
104
  โ€ข Clear your browser cookies and cache
75
105
  โ€ข Check if you're using the correct identity provider
76
106
 
77
- Would you like to submit a help ticket for ACCESS login issues?`,options:["Yes, let's create a ticket","Back to Main Menu"],path:s=>s.userInput==="Yes, let's create a ticket"?"access_login_description":"start"},access_login_description:{message:"Describe your login issue.",function:s=>{const a=te();t({...a,description:s.userInput,email:n.email||a.email,name:n.name||a.name,accessId:n.accessId||a.accessId}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"description"})},path:"access_login_identity"},access_login_identity:{message:"Which identity provider were you using?",options:["ACCESS","Github","Google","Institution","Microsoft","ORCID","Other"],function:s=>{const a=te();t({...a,identityProvider:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"identity_provider"})},path:"access_login_browser"},access_login_browser:{message:"Which browser were you using?",options:["Chrome","Firefox","Edge","Safari","Other"],function:s=>{const a=te();t({...a,browser:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"browser"})},path:"access_login_attachment"},access_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],function:s=>{const a=te();t({...a,wantsAttachment:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"attachment_choice"})},path:s=>{if(s.userInput==="Yes")return"access_login_upload";const a=Ue(n);return a.email?a.name?a.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"}},access_login_upload:{message:"Please upload your screenshot.",component:C(Cr,{onFileUpload:s=>{t(a=>({...a,uploadedFiles:s})),s.forEach(a=>{r({type:"chatbot_file_uploaded",fileType:a.type||"unknown",fileSize:a.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const s=te();t({...s,uploadConfirmed:!0}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"file_upload"})},path:()=>{const s=Ue(n);return s.email?s.name?s.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"}},access_login_email:{message:"What is your email?",validateTextInput:Dr,function:s=>{const a=te();t({...a,email:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"email"})},path:()=>{const s=Ue(n);return s.name?s.accessId?"access_login_summary":"access_login_accessid":"access_login_name"}},access_login_name:{message:"What is your name?",function:s=>{const a=te();t({...a,name:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"name"})},path:()=>Ue(n).accessId?"access_login_summary":"access_login_accessid"},access_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:jn(),function:s=>{const a=te();t({...a,accessId:qn(s.userInput)}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"access_id"})},path:"access_login_summary"},access_login_summary:{message:s=>{const a=te(),l=Ue(n),c=ti(a.uploadedFiles);let u=l.accessId;return s.prevPath==="access_login_accessid"&&s.userInput&&(u=s.userInput),`Thank you for providing your ACCESS login issue details. Here's a summary:
107
+ Would you like to submit a help ticket for ACCESS login issues?`,options:["Yes, let's create a ticket","Back to Main Menu"],path:s=>s.userInput==="Yes, let's create a ticket"?"access_login_description":"start"},access_login_description:{message:"Describe your login issue.",function:s=>{const a=oe();t({...a,description:s.userInput,email:n.email||a.email,name:n.name||a.name,accessId:n.accessId||a.accessId}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"description"})},path:"access_login_identity"},access_login_identity:{message:"Which identity provider were you using?",options:["ACCESS","Github","Google","Institution","Microsoft","ORCID","Other"],function:s=>{const a=oe();t({...a,identityProvider:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"identity_provider"})},path:"access_login_browser"},access_login_browser:{message:"Which browser were you using?",options:["Chrome","Firefox","Edge","Safari","Other"],function:s=>{const a=oe();t({...a,browser:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"browser"})},path:"access_login_attachment"},access_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],function:s=>{const a=oe();t({...a,wantsAttachment:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"attachment_choice"})},path:s=>{if(s.userInput==="Yes")return"access_login_upload";const a=Je(n);return a.email?a.name?a.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"}},access_login_upload:{message:"Please upload your screenshot.",component:I(Po,{onFileUpload:s=>{t(a=>({...a,uploadedFiles:s})),s.forEach(a=>{r({type:"chatbot_file_uploaded",fileType:a.type||"unknown",fileSize:a.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const s=oe();t({...s,uploadConfirmed:!0}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"file_upload"})},path:()=>{const s=Je(n);return s.email?s.name?s.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"}},access_login_email:{message:"What is your email?",validateTextInput:Bo,function:s=>{const a=oe();t({...a,email:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"email"})},path:()=>{const s=Je(n);return s.name?s.accessId?"access_login_summary":"access_login_accessid":"access_login_name"}},access_login_name:{message:"What is your name?",function:s=>{const a=oe();t({...a,name:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"name"})},path:()=>Je(n).accessId?"access_login_summary":"access_login_accessid"},access_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Dr(),function:s=>{const a=oe();t({...a,accessId:Ir(s.userInput)}),r({type:"chatbot_ticket_step",ticketType:"access_login",step:"access_id"})},path:"access_login_summary"},access_login_summary:{message:s=>{const a=oe(),c=Je(n),u=Wl(a.uploadedFiles);let A=c.accessId;return s.prevPath==="access_login_accessid"&&s.userInput&&(A=s.userInput),`Thank you for providing your ACCESS login issue details. Here's a summary:
78
108
 
79
- Name: ${l.name||"Not provided"}
80
- Email: ${l.email||"Not provided"}
81
- ACCESS ID: ${u||"Not provided"}
109
+ Name: ${c.name||"Not provided"}
110
+ Email: ${c.email||"Not provided"}
111
+ ACCESS ID: ${A||"Not provided"}
82
112
  Identity Provider: ${a.identityProvider||"Not provided"}
83
113
  Browser: ${a.browser||"Not provided"}
84
- Issue Description: ${a.description||"Not provided"}${c}
114
+ Issue Description: ${a.description||"Not provided"}${u}
85
115
 
86
- Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],renderHtml:["BOT","USER"],function:async s=>{if(s.userInput==="Submit Ticket"){const a=te(),l=Ue(n),c={email:l.email||"",name:l.name||"",accessId:l.accessId||"",description:a.description||"",identityProvider:a.identityProvider||"",browser:a.browser||""};await i(c,a.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"access_login_success":"start"},access_login_success:{message:kr(()=>ni(o,"ACCESS login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}function Zf({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){let o=null;const i=async(s,a=[])=>{o=await Sr(s,"loginProvider",a),o.success?(t(l=>({...l,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),r({type:"chatbot_ticket_submitted",ticketType:"resource_login",success:!0,ticketKey:o.ticketKey})):(t(l=>({...l,submissionError:o.error})),r({type:"chatbot_ticket_error",ticketType:"resource_login",errorType:o.error||"unknown"}))};return{resource_help:{message:`If you're having trouble logging into an affiliated infrastructure or resource provider, here are some common issues:
116
+ Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],renderHtml:["BOT","USER"],function:async s=>{if(s.userInput==="Submit Ticket"){const a=oe(),c=Je(n),u={email:c.email||"",name:c.name||"",accessId:c.accessId||"",description:a.description||"",identityProvider:a.identityProvider||"",browser:a.browser||""};await i(u,a.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"access_login_success":"start"},access_login_success:{message:Do(()=>Gl(o,"ACCESS login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}function zw({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){let o=null;const i=async(s,a=[])=>{o=await Io(s,"loginProvider",a),o.success?(t(c=>({...c,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),r({type:"chatbot_ticket_submitted",ticketType:"resource_login",success:!0,ticketKey:o.ticketKey})):(t(c=>({...c,submissionError:o.error})),r({type:"chatbot_ticket_error",ticketType:"resource_login",errorType:o.error||"unknown"}))};return{resource_help:{message:`If you're having trouble logging into an affiliated infrastructure or resource provider, here are some common issues:
87
117
 
88
118
  โ€ข Ensure your allocation is active
89
119
  โ€ข Confirm you have the correct username for that resource
90
120
  โ€ข Check <a href="https://operations.access-ci.org/infrastructure_news_view">System Status News</a> to see if the resource is undergoing maintenance
91
121
 
92
- Would you like to submit a help ticket for resource provider login issues?`,options:["Yes, let's create a ticket","Back to Main Menu"],renderHtml:["BOT"],path:s=>s.userInput==="Yes, let's create a ticket"?"resource_login_resource":"start"},resource_login_resource:{message:"Which ACCESS Resource are you trying to access?",options:["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"],function:s=>{const a=te();t({...a,resource:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"resource_selection"})},path:"resource_login_userid"},resource_login_userid:{message:"What is your user ID at the resource?",function:s=>{const a=te();t({...a,userIdResource:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"user_id"})},path:"resource_login_description"},resource_login_description:{message:"Please describe the issue you're having logging in.",function:s=>{const a=te();t({...a,description:s.userInput,email:n.email||a.email,name:n.name||a.name,accessId:n.accessId||a.accessId}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"description"})},path:"resource_login_attachment"},resource_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],function:s=>{const a=te();t({...a,wantsAttachment:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"attachment_choice"})},path:s=>{if(s.userInput==="Yes")return"resource_login_upload";const a=Ue(n);return a.email?a.name?a.accessId?"resource_login_summary":"resource_login_accessid":"resource_login_name":"resource_login_email"}},resource_login_upload:{message:"Please upload your screenshot.",component:C(Cr,{onFileUpload:s=>{t(a=>({...a,uploadedFiles:s})),s.forEach(a=>{r({type:"chatbot_file_uploaded",fileType:a.type||"unknown",fileSize:a.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const s=te();t({...s,uploadConfirmed:!0}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"file_upload"})},path:()=>{const s=Ue(n);return s.email?s.name?s.accessId?"resource_login_summary":"resource_login_accessid":"resource_login_name":"resource_login_email"}},resource_login_email:{message:"What is your email?",validateTextInput:Dr,function:s=>{const a=te();t({...a,email:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"email"})},path:()=>{const s=Ue(n);return s.name?s.accessId?"resource_login_summary":"resource_login_accessid":"resource_login_name"}},resource_login_name:{message:"What is your name?",function:s=>{const a=te();t({...a,name:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"name"})},path:()=>Ue(n).accessId?"resource_login_summary":"resource_login_accessid"},resource_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:jn(),function:s=>{const a=te();t({...a,accessId:qn(s.userInput)}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"access_id"})},path:"resource_login_summary"},resource_login_summary:{message:s=>{const a=te(),l=Ue(n),c=ti(a.uploadedFiles);let u=l.accessId;return s.prevPath==="resource_login_accessid"&&s.userInput&&(u=s.userInput),`Thank you for providing your resource login issue details. Here's a summary:
122
+ Would you like to submit a help ticket for resource provider login issues?`,options:["Yes, let's create a ticket","Back to Main Menu"],renderHtml:["BOT"],path:s=>s.userInput==="Yes, let's create a ticket"?"resource_login_resource":"start"},resource_login_resource:{message:"Which ACCESS Resource are you trying to access?",options:["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"],function:s=>{const a=oe();t({...a,resource:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"resource_selection"})},path:"resource_login_userid"},resource_login_userid:{message:"What is your user ID at the resource?",function:s=>{const a=oe();t({...a,userIdResource:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"user_id"})},path:"resource_login_description"},resource_login_description:{message:"Please describe the issue you're having logging in.",function:s=>{const a=oe();t({...a,description:s.userInput,email:n.email||a.email,name:n.name||a.name,accessId:n.accessId||a.accessId}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"description"})},path:"resource_login_attachment"},resource_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],function:s=>{const a=oe();t({...a,wantsAttachment:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"attachment_choice"})},path:s=>{if(s.userInput==="Yes")return"resource_login_upload";const a=Je(n);return a.email?a.name?a.accessId?"resource_login_summary":"resource_login_accessid":"resource_login_name":"resource_login_email"}},resource_login_upload:{message:"Please upload your screenshot.",component:I(Po,{onFileUpload:s=>{t(a=>({...a,uploadedFiles:s})),s.forEach(a=>{r({type:"chatbot_file_uploaded",fileType:a.type||"unknown",fileSize:a.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const s=oe();t({...s,uploadConfirmed:!0}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"file_upload"})},path:()=>{const s=Je(n);return s.email?s.name?s.accessId?"resource_login_summary":"resource_login_accessid":"resource_login_name":"resource_login_email"}},resource_login_email:{message:"What is your email?",validateTextInput:Bo,function:s=>{const a=oe();t({...a,email:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"email"})},path:()=>{const s=Je(n);return s.name?s.accessId?"resource_login_summary":"resource_login_accessid":"resource_login_name"}},resource_login_name:{message:"What is your name?",function:s=>{const a=oe();t({...a,name:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"name"})},path:()=>Je(n).accessId?"resource_login_summary":"resource_login_accessid"},resource_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Dr(),function:s=>{const a=oe();t({...a,accessId:Ir(s.userInput)}),r({type:"chatbot_ticket_step",ticketType:"resource_login",step:"access_id"})},path:"resource_login_summary"},resource_login_summary:{message:s=>{const a=oe(),c=Je(n),u=Wl(a.uploadedFiles);let A=c.accessId;return s.prevPath==="resource_login_accessid"&&s.userInput&&(A=s.userInput),`Thank you for providing your resource login issue details. Here's a summary:
93
123
 
94
- Name: ${l.name||"Not provided"}
95
- Email: ${l.email||"Not provided"}
96
- ACCESS ID: ${u||"Not provided"}
124
+ Name: ${c.name||"Not provided"}
125
+ Email: ${c.email||"Not provided"}
126
+ ACCESS ID: ${A||"Not provided"}
97
127
  Resource: ${a.resource||"Not provided"}
98
128
  Resource User ID: ${a.userIdResource||"Not provided"}
99
- Issue Description: ${a.description||"Not provided"}${c}
129
+ Issue Description: ${a.description||"Not provided"}${u}
100
130
 
101
- Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async s=>{if(s.userInput==="Submit Ticket"){const a=te(),l=Ue(n),c={email:l.email||"",name:l.name||"",accessId:l.accessId||"",accessResource:a.resource||"",description:a.description||"",userIdAtResource:a.userIdResource||""};await i(c,a.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"resource_login_success":"start"},resource_login_success:{message:kr(()=>ni(o,"resource login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const ep=[" C, C++","Abaqus","ACCESS","ACCESS-credits","ACCESS-website","Accounts","ACLS","Adding users","Affiliations","Affinity Groups","AI","Algorithms","Allocation extension","Allocation Management","Allocation proposal","Allocation Time","Allocation users","AMBER","AMIE","Anaconda","Analysis","API","Application Status","ARCGIS","Architecture","Archiving","Astrophysics","ATLAS","Authentication","AWS","AZURE","Backup","BASH","Batch Jobs","Benchmarking","Big Data","Bioinformatics","Biology","Ceph","CFD","cgroups","CHARMM","Checkpoint","cilogon","citation","Cloud","Cloud Computing","Cloud Lab","Cloud Storage","Cluster Management","Cluster Support","CMMC","Community Outreach","Compiling","Composible Systems","Computataional Chemistry","COMSOL","Conda","Condo","Containers","Core dump","Core hours","CP2K","CPU architecture","CPU bound","CUDA","Cybersecurity","CYVERSE","Data","Data Storage","Data-access-protocols","Data-analysis","Data-compliance","Data-lifecycle","Data-management","Data-management-software","Data-provenance","Data-reproducibility","Data-retention","Data-science","Data-sharing","Data-transfer","Data-wrangling","Database-update","Debugging","Debugging, Optimizatio and Profiling","Deep-learning","Dependencies","Deployment","DFT","Distributed-computing","DNS","Docker","Documentation","DOI","DTN","Easybuild","Email","Encryption","Environment-modules","Errors","Extension","FastX","Federated-authentication","File transfers","File-formats","File-limits","File-systems","File-transfer","Finite-element-analysis","Firewall","Fortran","Frameworks and IDE's","GAMESS","Gateways","GATK","Gaussian","GCC","Genomics","GIS","Git","Globus","GPFS","GPU","Gravitational-waves","Gridengine","GROMACS","Hadoop","Hardware","Image-processing","Infiniband","Interactive-mode","Interconnect","IO-Issue","ISILON","Java","Jekyll","Jetstream","Job-accounting","Job-array","Job-charging","Job-failure","Job-sizing","Job-submission","Julia","Jupyterhub","Key-management","Kubernetes","KyRIC","LAMMPS","Library-paths","License","Linear-programming","Linux","LMOD","login","LSF","Lustre","Machine-learning","Management","Materials-science","Mathematica","MATLAB","Memory","Metadata","Modules","Molecular-dynamics","Monte-carlo","MPI","NAMD","NetCDF","Networking","Neural-networks","NFS","NLP","NoMachine","Nvidia","Oceanography","OnDemnad","Open-science-grid","Open-storage-network","OpenCV","Openfoam","OpenMP","OpenMPI","OpenSHIFT","Openstack","Optimization","OS","OSG","Parallelization","Parameter-sweeps","Paraview","Particle-physics","password","PBS","Pegasus","Pending-jobs","Performance-tuning","Permissions","Physiology","PIP","PODMAN","Portals","Pre-emption","Professional and Workforce Development","Professional-development","Profile","Profiling","Programming","Programming Languages","Programming-best-practices","Project-management","Project-renewal","Provisioning","Pthreads","Publication-database","Putty","Python","Pytorch","Quantum-computing","Quantum-mechanics","Quota","R","RDP","React","Reporting","Research-facilitation","Research-grants","Resources","Rstudio-server","S3","Samba","SAS","Scaling","Schedulers","Scheduling","Science DMZ","Science Gateways","Scikit-learn","Scratch","screen","scripting","SDN","Secure Computing and Data","Secure-data-architecture","Serverless-hpc","setup","sftp","SGE","Shell Scripting","Shifter","Singularity","SLURM","SMB","Smrtanalysis","Software Installations","Software-carpentry","SPACK","SPARK","Spectrum-scale","SPSS","SQL","SSH","Stampede2","STATA","Storage","Supplement","Support","TCP","Technical-training-for-hpc","Tensorflow","Terminal-emulation-and-window-management","Tickets","Timing-issue","TMUX","Tools","Training","Transfer SUs","Trinity","Tuning","Unix-environment","Upgrading","Vectorization","Version-control","vim","VNC","VPN","Workflow","Workforce-development","X11","Xalt","XDMoD","XML","XSEDE","I don't see a relevant keyword"],tp=["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"];function np({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){let o=null;const i=async(s,a=[])=>{o=await Sr(s,"support",a),o.success?(t(l=>({...l,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),r({type:"chatbot_ticket_submitted",ticketType:"general_help",success:!0,ticketKey:o.ticketKey})):(t(l=>({...l,submissionError:o.error})),r({type:"chatbot_ticket_error",ticketType:"general_help",errorType:o.error||"unknown"}))};return{general_help_summary_subject:{message:"Provide a short title for your ticket.",function:s=>{const a=te();t({...a,summary:s.userInput,email:n.email||a.email,name:n.name||a.name,accessId:n.accessId||a.accessId}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"title"})},path:"general_help_category"},general_help_category:{message:"What type of issue are you experiencing?",options:["User Account Question","Allocation Question","User Support Question","CSSN/CCEP Question","Training Question","Metrics Question","OnDemand Question","Pegasus Question","XDMoD Question","Some Other Question"],function:s=>{const a=te();t({...a,category:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"category"})},path:"general_help_description"},general_help_description:{message:"Please describe your issue.",function:s=>{const a=te();t({...a,description:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"description"})},path:"general_help_attachment"},general_help_attachment:{message:"Would you like to attach a file to your ticket?",options:["Yes","No"],function:s=>{const a=te();t({...a,wantsAttachment:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"attachment_choice"})},path:s=>s.userInput==="Yes"?"general_help_upload":"general_help_resource"},general_help_upload:{message:"Please upload your file.",component:C(Cr,{onFileUpload:s=>{t(a=>({...a,uploadedFiles:s})),s.forEach(a=>{r({type:"chatbot_file_uploaded",fileType:a.type||"unknown",fileSize:a.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const s=te();t({...s,uploadConfirmed:!0}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"file_upload"})},path:"general_help_resource"},general_help_resource:{message:"Does your problem involve an ACCESS Resource?",options:["Yes","No"],function:s=>{const a=te();t({...a,involvesResource:s.userInput.toLowerCase()}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_choice"})},path:s=>s.userInput==="Yes"?"general_help_resource_details":"general_help_keywords"},general_help_resource_details:{message:"Please select the ACCESS Resource involved with your issue:",options:tp,function:s=>{const a=te();t({...a,resourceDetails:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_selection"})},path:"general_help_user_id_at_resource"},general_help_user_id_at_resource:{message:"What is your User ID at the selected resource(s)? (Optional - press Enter to skip)",validateTextInput:jn(),function:s=>{const a=te();t({...a,userIdAtResource:qn(s.userInput)}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_user_id"})},path:"general_help_keywords"},general_help_keywords:{message:"Please add up to 5 keywords to help route your ticket.",checkboxes:{items:ep,min:0,max:5},function:s=>{const a=te();t({...a,keywords:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"keywords"})},path:s=>s.userInput&&s.userInput.includes("I don't see a relevant keyword")?"general_help_additional_keywords":"general_help_priority"},general_help_additional_keywords:{message:"Please enter additional keywords, separated by commas:",function:s=>{const a=te(),l=a.keywords||[],c=s.userInput,d=(Array.isArray(l)?[...l]:String(l).split(",").map(h=>h.trim())).filter(h=>h!=="I don't see a relevant keyword"),f=d.length>0?[...d,c].join(", "):c;t({...a,keywords:f,suggestedKeyword:c}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"additional_keywords"})},path:"general_help_priority"},general_help_priority:{message:"Please select a priority for your issue:",options:["Lowest","Low","Medium","High","Highest"],function:s=>{const a=te();t({...a,priority:s.userInput.toLowerCase()}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"priority"})},path:()=>{const s=Ue(n);return s.email?s.name?s.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name":"general_help_email"}},general_help_email:{message:"What is your email address?",validateTextInput:Dr,function:s=>{const a=te();t({...a,email:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"email"})},path:()=>{const s=Ue(n);return s.name?s.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name"}},general_help_name:{message:"What is your name?",function:s=>{const a=te();t({...a,name:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"name"})},path:()=>Ue(n).accessId?"general_help_ticket_summary":"general_help_accessid"},general_help_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:jn(),function:s=>{const a=te();t({...a,accessId:qn(s.userInput)}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"access_id"})},path:"general_help_ticket_summary"},general_help_ticket_summary:{message:s=>{const a=te(),l=Ue(n),c=ti(a.uploadedFiles);let u=l.accessId;s.prevPath==="general_help_accessid"&&s.userInput&&(u=s.userInput);let d="";return a.involvesResource==="yes"&&(d=`
131
+ Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async s=>{if(s.userInput==="Submit Ticket"){const a=oe(),c=Je(n),u={email:c.email||"",name:c.name||"",accessId:c.accessId||"",accessResource:a.resource||"",description:a.description||"",userIdAtResource:a.userIdResource||""};await i(u,a.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"resource_login_success":"start"},resource_login_success:{message:Do(()=>Gl(o,"resource login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const jw=[" C, C++","Abaqus","ACCESS","ACCESS-credits","ACCESS-website","Accounts","ACLS","Adding users","Affiliations","Affinity Groups","AI","Algorithms","Allocation extension","Allocation Management","Allocation proposal","Allocation Time","Allocation users","AMBER","AMIE","Anaconda","Analysis","API","Application Status","ARCGIS","Architecture","Archiving","Astrophysics","ATLAS","Authentication","AWS","AZURE","Backup","BASH","Batch Jobs","Benchmarking","Big Data","Bioinformatics","Biology","Ceph","CFD","cgroups","CHARMM","Checkpoint","cilogon","citation","Cloud","Cloud Computing","Cloud Lab","Cloud Storage","Cluster Management","Cluster Support","CMMC","Community Outreach","Compiling","Composible Systems","Computataional Chemistry","COMSOL","Conda","Condo","Containers","Core dump","Core hours","CP2K","CPU architecture","CPU bound","CUDA","Cybersecurity","CYVERSE","Data","Data Storage","Data-access-protocols","Data-analysis","Data-compliance","Data-lifecycle","Data-management","Data-management-software","Data-provenance","Data-reproducibility","Data-retention","Data-science","Data-sharing","Data-transfer","Data-wrangling","Database-update","Debugging","Debugging, Optimizatio and Profiling","Deep-learning","Dependencies","Deployment","DFT","Distributed-computing","DNS","Docker","Documentation","DOI","DTN","Easybuild","Email","Encryption","Environment-modules","Errors","Extension","FastX","Federated-authentication","File transfers","File-formats","File-limits","File-systems","File-transfer","Finite-element-analysis","Firewall","Fortran","Frameworks and IDE's","GAMESS","Gateways","GATK","Gaussian","GCC","Genomics","GIS","Git","Globus","GPFS","GPU","Gravitational-waves","Gridengine","GROMACS","Hadoop","Hardware","Image-processing","Infiniband","Interactive-mode","Interconnect","IO-Issue","ISILON","Java","Jekyll","Jetstream","Job-accounting","Job-array","Job-charging","Job-failure","Job-sizing","Job-submission","Julia","Jupyterhub","Key-management","Kubernetes","KyRIC","LAMMPS","Library-paths","License","Linear-programming","Linux","LMOD","login","LSF","Lustre","Machine-learning","Management","Materials-science","Mathematica","MATLAB","Memory","Metadata","Modules","Molecular-dynamics","Monte-carlo","MPI","NAMD","NetCDF","Networking","Neural-networks","NFS","NLP","NoMachine","Nvidia","Oceanography","OnDemnad","Open-science-grid","Open-storage-network","OpenCV","Openfoam","OpenMP","OpenMPI","OpenSHIFT","Openstack","Optimization","OS","OSG","Parallelization","Parameter-sweeps","Paraview","Particle-physics","password","PBS","Pegasus","Pending-jobs","Performance-tuning","Permissions","Physiology","PIP","PODMAN","Portals","Pre-emption","Professional and Workforce Development","Professional-development","Profile","Profiling","Programming","Programming Languages","Programming-best-practices","Project-management","Project-renewal","Provisioning","Pthreads","Publication-database","Putty","Python","Pytorch","Quantum-computing","Quantum-mechanics","Quota","R","RDP","React","Reporting","Research-facilitation","Research-grants","Resources","Rstudio-server","S3","Samba","SAS","Scaling","Schedulers","Scheduling","Science DMZ","Science Gateways","Scikit-learn","Scratch","screen","scripting","SDN","Secure Computing and Data","Secure-data-architecture","Serverless-hpc","setup","sftp","SGE","Shell Scripting","Shifter","Singularity","SLURM","SMB","Smrtanalysis","Software Installations","Software-carpentry","SPACK","SPARK","Spectrum-scale","SPSS","SQL","SSH","Stampede2","STATA","Storage","Supplement","Support","TCP","Technical-training-for-hpc","Tensorflow","Terminal-emulation-and-window-management","Tickets","Timing-issue","TMUX","Tools","Training","Transfer SUs","Trinity","Tuning","Unix-environment","Upgrading","Vectorization","Version-control","vim","VNC","VPN","Workflow","Workforce-development","X11","Xalt","XDMoD","XML","XSEDE","I don't see a relevant keyword"],qw=["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"];function Ww({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){let o=null;const i=async(s,a=[])=>{o=await Io(s,"support",a),o.success?(t(c=>({...c,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),r({type:"chatbot_ticket_submitted",ticketType:"general_help",success:!0,ticketKey:o.ticketKey})):(t(c=>({...c,submissionError:o.error})),r({type:"chatbot_ticket_error",ticketType:"general_help",errorType:o.error||"unknown"}))};return{general_help_summary_subject:{message:"Provide a short title for your ticket.",function:s=>{const a=oe();t({...a,summary:s.userInput,email:n.email||a.email,name:n.name||a.name,accessId:n.accessId||a.accessId}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"title"})},path:"general_help_category"},general_help_category:{message:"What type of issue are you experiencing?",options:["User Account Question","Allocation Question","User Support Question","CSSN/CCEP Question","Training Question","Metrics Question","OnDemand Question","Pegasus Question","XDMoD Question","Some Other Question"],function:s=>{const a=oe();t({...a,category:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"category"})},path:"general_help_description"},general_help_description:{message:"Please describe your issue.",function:s=>{const a=oe();t({...a,description:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"description"})},path:"general_help_attachment"},general_help_attachment:{message:"Would you like to attach a file to your ticket?",options:["Yes","No"],function:s=>{const a=oe();t({...a,wantsAttachment:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"attachment_choice"})},path:s=>s.userInput==="Yes"?"general_help_upload":"general_help_resource"},general_help_upload:{message:"Please upload your file.",component:I(Po,{onFileUpload:s=>{t(a=>({...a,uploadedFiles:s})),s.forEach(a=>{r({type:"chatbot_file_uploaded",fileType:a.type||"unknown",fileSize:a.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const s=oe();t({...s,uploadConfirmed:!0}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"file_upload"})},path:"general_help_resource"},general_help_resource:{message:"Does your problem involve an ACCESS Resource?",options:["Yes","No"],function:s=>{const a=oe();t({...a,involvesResource:s.userInput.toLowerCase()}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_choice"})},path:s=>s.userInput==="Yes"?"general_help_resource_details":"general_help_keywords"},general_help_resource_details:{message:"Please select the ACCESS Resource involved with your issue:",options:qw,function:s=>{const a=oe();t({...a,resourceDetails:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_selection"})},path:"general_help_user_id_at_resource"},general_help_user_id_at_resource:{message:"What is your User ID at the selected resource(s)? (Optional - press Enter to skip)",validateTextInput:Dr(),function:s=>{const a=oe();t({...a,userIdAtResource:Ir(s.userInput)}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_user_id"})},path:"general_help_keywords"},general_help_keywords:{message:"Please add up to 5 keywords to help route your ticket.",checkboxes:{items:jw,min:0,max:5},function:s=>{const a=oe();t({...a,keywords:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"keywords"})},path:s=>s.userInput&&s.userInput.includes("I don't see a relevant keyword")?"general_help_additional_keywords":"general_help_priority"},general_help_additional_keywords:{message:"Please enter additional keywords, separated by commas:",function:s=>{const a=oe(),c=a.keywords||[],u=s.userInput,d=(Array.isArray(c)?[...c]:String(c).split(",").map(p=>p.trim())).filter(p=>p!=="I don't see a relevant keyword"),f=d.length>0?[...d,u].join(", "):u;t({...a,keywords:f,suggestedKeyword:u}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"additional_keywords"})},path:"general_help_priority"},general_help_priority:{message:"Please select a priority for your issue:",options:["Lowest","Low","Medium","High","Highest"],function:s=>{const a=oe();t({...a,priority:s.userInput.toLowerCase()}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"priority"})},path:()=>{const s=Je(n);return s.email?s.name?s.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name":"general_help_email"}},general_help_email:{message:"What is your email address?",validateTextInput:Bo,function:s=>{const a=oe();t({...a,email:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"email"})},path:()=>{const s=Je(n);return s.name?s.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name"}},general_help_name:{message:"What is your name?",function:s=>{const a=oe();t({...a,name:s.userInput}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"name"})},path:()=>Je(n).accessId?"general_help_ticket_summary":"general_help_accessid"},general_help_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Dr(),function:s=>{const a=oe();t({...a,accessId:Ir(s.userInput)}),r({type:"chatbot_ticket_step",ticketType:"general_help",step:"access_id"})},path:"general_help_ticket_summary"},general_help_ticket_summary:{message:s=>{const a=oe(),c=Je(n),u=Wl(a.uploadedFiles);let A=c.accessId;s.prevPath==="general_help_accessid"&&s.userInput&&(A=s.userInput);let d="";return a.involvesResource==="yes"&&(d=`
102
132
  Resource: ${a.resourceDetails||"Not specified"}`,a.userIdAtResource&&(d+=`
103
133
  User ID at Resource: ${a.userIdAtResource}`)),`Thank you for providing your issue details. Here's a summary:
104
134
 
105
- Name: ${l.name||"Not provided"}
106
- Email: ${l.email||"Not provided"}
107
- ACCESS ID: ${u||"Not provided"}
135
+ Name: ${c.name||"Not provided"}
136
+ Email: ${c.email||"Not provided"}
137
+ ACCESS ID: ${A||"Not provided"}
108
138
  Issue Summary: ${a.summary||"Not provided"}
109
139
  Category: ${a.category||"Not provided"}
110
140
  Priority: ${a.priority||"Not provided"}
111
141
  Keywords: ${a.keywords||"Not provided"}
112
- Issue Description: ${a.description||"Not provided"}${d}${c}
142
+ Issue Description: ${a.description||"Not provided"}${d}${u}
113
143
 
114
- Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async s=>{if(s.userInput==="Submit Ticket"){const a=te(),l=Ue(n),c={email:l.email||"",summary:a.summary||"General Support Ticket",description:a.description||"",priority:a.priority||"medium",accessId:l.accessId||"",name:l.name||"",issueType:a.category||"",hasResourceProblem:a.involvesResource==="yes"?"Yes":"No",userIdAtResource:a.userIdAtResource||"",resourceName:a.resourceDetails||"",keywords:a.keywords||"",noRelevantKeyword:a.suggestedKeyword?"checked":"",suggestedKeyword:a.suggestedKeyword||""};await i(c,a.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"general_help_success":"start"},general_help_success:{message:kr(()=>ni(o,"support ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const rp={"Logging into ACCESS website":"access_login","Logging into a resource":"resource_login","Another question":"general_help"};function op({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){const o=Jf({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}),i=Zf({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}),A=np({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r});return{help_ticket:{message:"What is your help ticket related to?",options:["Logging into ACCESS website","Logging into a resource","Another question"],function:s=>{t(a=>({...a,ticketType:s.userInput})),r({type:"chatbot_ticket_started",ticketType:rp[s.userInput]||s.userInput})},path:s=>s.userInput==="Logging into ACCESS website"?"access_help":s.userInput==="Logging into a resource"?"resource_help":s.userInput==="Another question"?"general_help_summary_subject":"help_ticket"},...o,...i,...A}}function Kt(e){const t=te();return{...t,email:e.email||t.email,name:e.name||t.name,accessId:e.accessId||t.accessId}}function ip(e){return e?e.success?e.ticketUrl&&e.ticketKey?`Your security incident report has been submitted successfully.
144
+ Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async s=>{if(s.userInput==="Submit Ticket"){const a=oe(),c=Je(n),u={email:c.email||"",summary:a.summary||"General Support Ticket",description:a.description||"",priority:a.priority||"medium",accessId:c.accessId||"",name:c.name||"",issueType:a.category||"",hasResourceProblem:a.involvesResource==="yes"?"Yes":"No",userIdAtResource:a.userIdAtResource||"",resourceName:a.resourceDetails||"",keywords:a.keywords||"",noRelevantKeyword:a.suggestedKeyword?"checked":"",suggestedKeyword:a.suggestedKeyword||""};await i(u,a.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"general_help_success":"start"},general_help_success:{message:Do(()=>Gl(o,"support ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const Gw={"Logging into ACCESS website":"access_login","Logging into a resource":"resource_login","Another question":"general_help"};function Yw({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){const o=Uw({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}),i=zw({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}),l=Ww({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r});return{help_ticket:{message:"What is your help ticket related to?",options:["Logging into ACCESS website","Logging into a resource","Another question"],function:s=>{t(a=>({...a,ticketType:s.userInput})),r({type:"chatbot_ticket_started",ticketType:Gw[s.userInput]||s.userInput})},path:s=>s.userInput==="Logging into ACCESS website"?"access_help":s.userInput==="Logging into a resource"?"resource_help":s.userInput==="Another question"?"general_help_summary_subject":"help_ticket"},...o,...i,...l}}function Sn(e){const t=oe();return{...t,email:e.email||t.email,name:e.name||t.name,accessId:e.accessId||t.accessId}}function Vw(e){return e?e.success?e.ticketUrl&&e.ticketKey?`Your security incident report has been submitted successfully.
115
145
 
116
146
  Ticket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>
117
147
 
@@ -121,25 +151,25 @@ Our cybersecurity team will review your report and respond accordingly. Thank yo
121
151
 
122
152
  Please try again or contact our cybersecurity team directly.`:`We apologize, but there was an error submitting your security incident report.
123
153
 
124
- Please try again or contact our cybersecurity team directly.`}function ap({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){let o=null,i=null;const A=async(a,l=[],c)=>{i=await Sr(a,"security",l),i.success?(t(u=>({...u,ticketKey:i.ticketKey,ticketUrl:i.ticketUrl})),r({type:"chatbot_security_submitted",success:!0,priority:c||"unknown",ticketKey:i.ticketKey})):(t(u=>({...u,submissionError:i.error})),r({type:"chatbot_ticket_error",ticketType:"security",errorType:i.error||"unknown"}))};return{security_incident:{message:"You're reporting a security incident. Please provide a brief summary of the security concern.",function:a=>{const l=te();t({...l,summary:a.userInput,email:n.email||l.email,name:n.name||l.name,accessId:n.accessId||l.accessId}),r({type:"chatbot_ticket_step",ticketType:"security",step:"summary"})},path:"security_priority"},security_priority:{message:"What is the priority level of this security incident?",options:["Critical","High","Medium","Low"],function:a=>{const l=te();t({...l,priority:a.userInput.toLowerCase()}),r({type:"chatbot_ticket_step",ticketType:"security",step:"priority"})},path:"security_description"},security_description:{message:"Please provide a detailed description of the security incident or concern.",function:a=>{const l=te();t({...l,description:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"security",step:"description"})},path:"security_attachment"},security_attachment:{message:"Do you have any files (screenshots, logs, etc.) that would help with this security incident?",options:["Yes","No"],function:a=>{const l=te();t({...l,wantsAttachment:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"security",step:"attachment_choice"})},path:a=>a.userInput==="Yes"?"security_upload":"security_contact_check"},security_upload:{message:"Please upload your files.",component:C(Cr,{onFileUpload:a=>{t(l=>({...l,uploadedFiles:a})),a.forEach(l=>{r({type:"chatbot_file_uploaded",fileType:l.type||"unknown",fileSize:l.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const a=te();t({...a,uploadConfirmed:!0}),r({type:"chatbot_ticket_step",ticketType:"security",step:"file_upload"})},path:"security_contact_check"},security_contact_check:{message:()=>{const a=Kt(n);return a.name&&a.email&&a.accessId?`I have your contact information:
154
+ Please try again or contact our cybersecurity team directly.`}function $w({ticketForm:e,setTicketForm:t,userInfo:n,trackEvent:r}){let o=null,i=null;const l=async(a,c=[],u)=>{i=await Io(a,"security",c),i.success?(t(A=>({...A,ticketKey:i.ticketKey,ticketUrl:i.ticketUrl})),r({type:"chatbot_security_submitted",success:!0,priority:u||"unknown",ticketKey:i.ticketKey})):(t(A=>({...A,submissionError:i.error})),r({type:"chatbot_ticket_error",ticketType:"security",errorType:i.error||"unknown"}))};return{security_incident:{message:"You're reporting a security incident. Please provide a brief summary of the security concern.",function:a=>{const c=oe();t({...c,summary:a.userInput,email:n.email||c.email,name:n.name||c.name,accessId:n.accessId||c.accessId}),r({type:"chatbot_ticket_step",ticketType:"security",step:"summary"})},path:"security_priority"},security_priority:{message:"What is the priority level of this security incident?",options:["Critical","High","Medium","Low"],function:a=>{const c=oe();t({...c,priority:a.userInput.toLowerCase()}),r({type:"chatbot_ticket_step",ticketType:"security",step:"priority"})},path:"security_description"},security_description:{message:"Please provide a detailed description of the security incident or concern.",function:a=>{const c=oe();t({...c,description:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"security",step:"description"})},path:"security_attachment"},security_attachment:{message:"Do you have any files (screenshots, logs, etc.) that would help with this security incident?",options:["Yes","No"],function:a=>{const c=oe();t({...c,wantsAttachment:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"security",step:"attachment_choice"})},path:a=>a.userInput==="Yes"?"security_upload":"security_contact_check"},security_upload:{message:"Please upload your files.",component:I(Po,{onFileUpload:a=>{t(c=>({...c,uploadedFiles:a})),a.forEach(c=>{r({type:"chatbot_file_uploaded",fileType:c.type||"unknown",fileSize:c.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const a=oe();t({...a,uploadConfirmed:!0}),r({type:"chatbot_ticket_step",ticketType:"security",step:"file_upload"})},path:"security_contact_check"},security_contact_check:{message:()=>{const a=Sn(n);return a.name&&a.email&&a.accessId?`I have your contact information:
125
155
 
126
156
  Name: ${a.name}
127
157
  Email: ${a.email}
128
158
  ACCESS ID: ${a.accessId}
129
159
 
130
- Is this correct?`:"I need your contact information."},options:()=>{const a=Kt(n);return a.name&&a.email&&a.accessId?["Yes, that's correct","Let me update it"]:[]},chatDisabled:()=>{const a=Kt(n);return!!(a.name&&a.email&&a.accessId)},path:a=>a.userInput==="Yes, that's correct"?"security_summary":a.userInput==="Let me update it"?"security_name":"security_email"},security_email:{message:"What is your email address?",validateTextInput:Dr,function:a=>{const l=te();t({...l,email:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"security",step:"email"})},path:()=>{const a=Kt(n);return a.name?a.accessId?"security_summary":"security_accessid":"security_name"}},security_name:{message:"What is your name?",function:a=>{const l=te();t({...l,name:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"security",step:"name"})},path:()=>{const a=Kt(n);return a.email?a.accessId?"security_summary":"security_accessid":"security_email"}},security_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:jn(),function:a=>{const l=qn(a.userInput);o=l;const c=te();t({...c,accessId:l}),r({type:"chatbot_ticket_step",ticketType:"security",step:"access_id"})},path:"security_summary"},security_summary:{message:()=>{const a=te(),l=Kt(n),c={...a,name:l.name||a.name,email:l.email||a.email,accessId:o||l.accessId||a.accessId};let u="";a.uploadedFiles&&a.uploadedFiles.length>0&&(u=`
131
- Attachments: ${a.uploadedFiles.length} file(s) attached`);const d=c.accessId||"Not provided";return`Here's a summary of your security incident report:
160
+ Is this correct?`:"I need your contact information."},options:()=>{const a=Sn(n);return a.name&&a.email&&a.accessId?["Yes, that's correct","Let me update it"]:[]},chatDisabled:()=>{const a=Sn(n);return!!(a.name&&a.email&&a.accessId)},path:a=>a.userInput==="Yes, that's correct"?"security_summary":a.userInput==="Let me update it"?"security_name":"security_email"},security_email:{message:"What is your email address?",validateTextInput:Bo,function:a=>{const c=oe();t({...c,email:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"security",step:"email"})},path:()=>{const a=Sn(n);return a.name?a.accessId?"security_summary":"security_accessid":"security_name"}},security_name:{message:"What is your name?",function:a=>{const c=oe();t({...c,name:a.userInput}),r({type:"chatbot_ticket_step",ticketType:"security",step:"name"})},path:()=>{const a=Sn(n);return a.email?a.accessId?"security_summary":"security_accessid":"security_email"}},security_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Dr(),function:a=>{const c=Ir(a.userInput);o=c;const u=oe();t({...u,accessId:c}),r({type:"chatbot_ticket_step",ticketType:"security",step:"access_id"})},path:"security_summary"},security_summary:{message:()=>{const a=oe(),c=Sn(n),u={...a,name:c.name||a.name,email:c.email||a.email,accessId:o||c.accessId||a.accessId};let A="";a.uploadedFiles&&a.uploadedFiles.length>0&&(A=`
161
+ Attachments: ${a.uploadedFiles.length} file(s) attached`);const d=u.accessId||"Not provided";return`Here's a summary of your security incident report:
132
162
 
133
- Summary: ${c.summary||"Not provided"}
134
- Priority: ${c.priority||"Not provided"}
135
- Name: ${c.name||"Not provided"}
136
- Email: ${c.email||"Not provided"}
163
+ Summary: ${u.summary||"Not provided"}
164
+ Priority: ${u.priority||"Not provided"}
165
+ Name: ${u.name||"Not provided"}
166
+ Email: ${u.email||"Not provided"}
137
167
  ACCESS ID: ${d}
138
- Description: ${c.description||"Not provided"}${u}
168
+ Description: ${u.description||"Not provided"}${A}
139
169
 
140
- Would you like to submit this security incident report?`},options:["Submit Security Report","Back to Main Menu"],function:async a=>{if(a.userInput==="Submit Security Report"){const l=te(),c=Kt(n),u={...l,name:c.name||l.name,email:c.email||l.email,accessId:o||c.accessId||l.accessId},d={summary:u.summary||"",priority:u.priority||"",description:u.description||"",name:u.name||"",email:u.email||"",accessId:u.accessId||""};await A(d,l.uploadedFiles||[],u.priority)}},path:a=>a.userInput==="Submit Security Report"?"security_success":"start"},security_success:{message:kr(()=>ip(i)),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const Fe=[];for(let e=0;e<256;++e)Fe.push((e+256).toString(16).slice(1));function sp(e,t=0){return(Fe[e[t+0]]+Fe[e[t+1]]+Fe[e[t+2]]+Fe[e[t+3]]+"-"+Fe[e[t+4]]+Fe[e[t+5]]+"-"+Fe[e[t+6]]+Fe[e[t+7]]+"-"+Fe[e[t+8]]+Fe[e[t+9]]+"-"+Fe[e[t+10]]+Fe[e[t+11]]+Fe[e[t+12]]+Fe[e[t+13]]+Fe[e[t+14]]+Fe[e[t+15]]).toLowerCase()}let ri;const Ap=new Uint8Array(16);function lp(){if(!ri){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ri=crypto.getRandomValues.bind(crypto)}return ri(Ap)}const MA={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function oi(e,t,n){var o;if(MA.randomUUID&&!e)return MA.randomUUID();e=e||{};const r=e.random??((o=e.rng)==null?void 0:o.call(e))??lp();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,sp(r)}function mp(e){return e}function cp({sessionId:e,apiKey:t,trackEvent:n}){let r=null;return{metrics_intro:{message:`Please type your question about usage and performance metrics (XDMoD) below. You can see some <a target="_blank" href="${ct.METRICS_QUESTIONS_URL}">examples here</a>.
170
+ Would you like to submit this security incident report?`},options:["Submit Security Report","Back to Main Menu"],function:async a=>{if(a.userInput==="Submit Security Report"){const c=oe(),u=Sn(n),A={...c,name:u.name||c.name,email:u.email||c.email,accessId:o||u.accessId||c.accessId},d={summary:A.summary||"",priority:A.priority||"",description:A.description||"",name:A.name||"",email:A.email||"",accessId:A.accessId||""};await l(d,c.uploadedFiles||[],A.priority)}},path:a=>a.userInput==="Submit Security Report"?"security_success":"start"},security_success:{message:Do(()=>Vw(i)),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const Ze=[];for(let e=0;e<256;++e)Ze.push((e+256).toString(16).slice(1));function Kw(e,t=0){return(Ze[e[t+0]]+Ze[e[t+1]]+Ze[e[t+2]]+Ze[e[t+3]]+"-"+Ze[e[t+4]]+Ze[e[t+5]]+"-"+Ze[e[t+6]]+Ze[e[t+7]]+"-"+Ze[e[t+8]]+Ze[e[t+9]]+"-"+Ze[e[t+10]]+Ze[e[t+11]]+Ze[e[t+12]]+Ze[e[t+13]]+Ze[e[t+14]]+Ze[e[t+15]]).toLowerCase()}let Yl;const Xw=new Uint8Array(16);function Jw(){if(!Yl){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Yl=crypto.getRandomValues.bind(crypto)}return Yl(Xw)}const bd={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Vl(e,t,n){var o;if(bd.randomUUID&&!e)return bd.randomUUID();e=e||{};const r=e.random??((o=e.rng)==null?void 0:o.call(e))??Jw();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Kw(r)}function hb(e){return e}function Zw({sessionId:e,apiKey:t,trackEvent:n}){let r=null;return{metrics_intro:{message:`Please type your question about usage and performance metrics (XDMoD) below. You can see some <a target="_blank" href="${_t.METRICS_QUESTIONS_URL}">examples here</a>.
141
171
 
142
- <em>This assistant is powered by AI. Responses may not always be accurate. Do not share passwords or secrets.</em> <a href="https://support.access-ci.org/tools/access-qa-tool/privacy">Privacy Notice</a>`,renderHtml:["BOT"],path:"metrics_loop"},metrics_loop:{message:async o=>{const{userInput:i}=o;if(i==="๐Ÿ‘ Helpful"||i==="๐Ÿ‘Ž Not helpful"){if(t&&e&&r){const s={"Content-Type":"application/json","X-Origin":"metrics","X-API-KEY":t,"X-Session-ID":e,"X-Query-ID":r,"X-Feedback":i==="๐Ÿ‘ Helpful"?"1":"0"};try{await fetch(ct.METRICS_RATING_ENDPOINT,{method:"POST",headers:s})}catch(a){console.error("Error sending metrics feedback:",a)}}return"Thanks for the feedback! Ask another question about usage and performance metrics (XDMoD) or start a new chat."}else try{const A=oi();r=A,n({type:"chatbot_metrics_question_sent",queryId:A});const s={"Content-Type":"application/json","X-Origin":"metrics","X-API-KEY":t,"X-Session-ID":e,"X-Query-ID":A},c=(await(await fetch(ct.METRICS_API_ENDPOINT,{method:"POST",headers:s,body:JSON.stringify({query:i})})).json()).response,u=c;return await o.injectMessage(u),setTimeout(async()=>{await o.injectMessage("Ask another question about usage and performance metrics (XDMoD) or start a new chat.")},100),null}catch(A){return console.error("Error in metrics flow:",A),"I'm sorry, there was an error processing your question. Please try again."}},renderMarkdown:["BOT"],options:o=>o.userInput==="๐Ÿ‘ Helpful"||o.userInput==="๐Ÿ‘Ž Not helpful"?[]:["๐Ÿ‘ Helpful","๐Ÿ‘Ž Not helpful"],chatDisabled:!1,path:"metrics_loop"}}}function up(){if(typeof window>"u")return oi();let e=localStorage.getItem(QA.SESSION_ID);return e||(e=oi(),localStorage.setItem(QA.SESSION_ID,e)),e}const OA="access-qa-bot-shadow-overrides",dp=`
172
+ <em>This assistant is powered by AI. Responses may not always be accurate. Do not share passwords or secrets.</em> <a href="https://support.access-ci.org/tools/access-qa-tool/privacy">Privacy Notice</a>`,renderHtml:["BOT"],path:"metrics_loop"},metrics_loop:{message:async o=>{const{userInput:i}=o;if(i==="๐Ÿ‘ Helpful"||i==="๐Ÿ‘Ž Not helpful"){if(t&&e&&r){const s={"Content-Type":"application/json","X-Origin":"metrics","X-API-KEY":t,"X-Session-ID":e,"X-Query-ID":r,"X-Feedback":i==="๐Ÿ‘ Helpful"?"1":"0"};try{await fetch(_t.METRICS_RATING_ENDPOINT,{method:"POST",headers:s})}catch(a){console.error("Error sending metrics feedback:",a)}}return"Thanks for the feedback! Ask another question about usage and performance metrics (XDMoD) or start a new chat."}else try{const l=Vl();r=l,n({type:"chatbot_metrics_question_sent",queryId:l});const s={"Content-Type":"application/json","X-Origin":"metrics","X-API-KEY":t,"X-Session-ID":e,"X-Query-ID":l},u=(await(await fetch(_t.METRICS_API_ENDPOINT,{method:"POST",headers:s,body:JSON.stringify({query:i})})).json()).response,A=u;return await o.injectMessage(A),setTimeout(async()=>{await o.injectMessage("Ask another question about usage and performance metrics (XDMoD) or start a new chat.")},100),null}catch(l){return console.error("Error in metrics flow:",l),"I'm sorry, there was an error processing your question. Please try again."}},renderMarkdown:["BOT"],options:o=>o.userInput==="๐Ÿ‘ Helpful"||o.userInput==="๐Ÿ‘Ž Not helpful"?[]:["๐Ÿ‘ Helpful","๐Ÿ‘Ž Not helpful"],chatDisabled:!1,path:"metrics_loop"}}}function eb(){if(typeof window>"u")return Vl();let e=localStorage.getItem(wd.SESSION_ID);return e||(e=Vl(),localStorage.setItem(wd.SESSION_ID,e)),e}const kd="access-qa-bot-shadow-overrides",tb=`
143
173
  .rcb-checkbox-container {
144
174
  display: flex !important;
145
175
  flex-wrap: wrap !important;
@@ -292,5 +322,5 @@ Would you like to submit this security incident report?`},options:["Submit Secur
292
322
  display: inline !important;
293
323
  margin: 0 !important;
294
324
  }
295
- `;function fp(e){if(!e)return;const t=e.getRootNode();if(!(t instanceof ShadowRoot)||t.getElementById(OA))return;const n=document.createElement("style");n.id=OA,n.textContent=dp,t.appendChild(n)}const NA=Ye((e,t)=>{const{apiKey:n=ct.DEFAULT_API_KEY,isLoggedIn:r=!1,loginUrl:o=Vt.LOGIN_URL,userEmail:i,userName:A,accessId:s,actingUser:a,ringEffect:l,defaultOpen:c,onClose:u,open:d,onOpenChange:f,embedded:h=!1,welcome:m,qaEndpoint:p,ratingEndpoint:v,agentEndpoint:y,backendId:g,resourceContext:_,onAnalyticsEvent:P}=e,E=g||ct.BACKEND_ID,k=ne(null),B=ne(null),[T,D]=ee({}),[O,S]=ee(null),N=Ie(()=>({email:i,name:A,accessId:s}),[i,A,s]);X(()=>{fp(B.current)},[]),X(()=>{Vf({ticketForm:T,setTicketForm:D})},[T]);const R=y||ct.AGENT_ENDPOINT,L=_?`${R}/capabilities?resource_context=${encodeURIComponent(_)}`:`${R}/capabilities`,U=`${R}/rating`;X(()=>{R.includes("localhost")&&!window.location.hostname.includes("localhost")&&console.warn("[AccessQABot] VITE_AGENT_ENDPOINT not set โ€” agent requests will go to localhost. Set VITE_AGENT_ENDPOINT in your environment.")},[R]),X(()=>{let F=!1;async function J(){try{const K=await fetch(L,{credentials:"include"});if(!K.ok)throw new Error(`Capabilities API returned ${K.status}`);const oe=await K.json();F||S(oe)}catch(K){console.warn("Failed to fetch capabilities:",K),F||S({categories:[],is_authenticated:!1})}}return J(),()=>{F=!0}},[L,r]),X(()=>{if(!r)return;let F=!1;const J=`${R}/capabilities/personalized`;async function K(){try{const oe=await fetch(J,{credentials:"include"});if(!oe.ok)return;const ve=await oe.json();F||console.debug("Personalized context loaded:",ve)}catch{}}return K(),()=>{F=!0}},[R,r]),Zn(t,()=>({addMessage:F=>{var J,K;(K=(J=k.current)==null?void 0:J.addMessage)==null||K.call(J,F)}}));const x=m||(O==null?void 0:O.welcome_message)||Vt.WELCOME_MESSAGE,Q=Ie(()=>up(),[]),w=q(F=>{P&&P({...F,type:F.type,timestamp:F.timestamp??Date.now(),sessionId:F.sessionId??Q})},[P,Q]),V=q(F=>{P&&P({...F,type:F.type,timestamp:typeof F.timestamp=="number"?F.timestamp:Date.now(),sessionId:typeof F.sessionId=="string"?F.sessionId:Q})},[P,Q]),b=Ie(()=>{const F=$f({welcome:x,setTicketForm:D,trackEvent:w}),J=op({ticketForm:{},setTicketForm:D,userInfo:N,trackEvent:w}),K=ap({ticketForm:{},setTicketForm:D,userInfo:N,trackEvent:w}),oe=cp({sessionId:Q,apiKey:n,trackEvent:w}),ve={...F,...J,...K,...oe};return Gf(ve,{disableOnOptions:!0})},[x,N,Q,n,r,w,O]);return O?C("div",{ref:B,children:C(Zo,{ref:k,isLoggedIn:r,allowAnonAccess:ct.ALLOW_ANON_ACCESS,actingUser:a,onAnalyticsEvent:V,apiKey:n,qaEndpoint:p||ct.QA_ENDPOINT,ratingEndpoint:v||ct.RATING_ENDPOINT,backendId:E,capabilitiesEndpoint:L,agentRatingEndpoint:U,botName:Vt.BOT_NAME,logo:Vt.LOGO,primaryColor:Vt.PRIMARY_COLOR,secondaryColor:Vt.SECONDARY_COLOR,welcomeMessage:x,tooltipText:Vt.TOOLTIP,turnstileSiteKey:ct.TURNSTILE_SITE_KEY,loginUrl:o,open:d,onOpenChange:f,embedded:h,footerText:"AI-powered ยท Privacy Notice",footerLink:"https://support.access-ci.org/tools/access-qa-tool/privacy",resourceContext:_,customFlow:b})}):C("div",{ref:B})});NA.displayName="AccessQABot";function ii(e){const{target:t,...n}=e;if(!t)throw new Error("qaBot: target element is required");const r=fi();let o=n.isLoggedIn||!1,i=n.open!==void 0?n.open:n.defaultOpen||!1;const A=ml(t),s=()=>{A.render(C(NA,{ref:r,...n,isLoggedIn:o,open:i,onOpenChange:a=>{var l;i=a,(l=n.onOpenChange)==null||l.call(n,a)}}))};return s(),{addMessage(a){var l;(l=r.current)==null||l.addMessage(a)},setBotIsLoggedIn(a){o=a,s()},openChat(){i=!0,s()},closeChat(){i=!1,s()},toggleChat(){i=!i,s()},destroy(){A.unmount()}}}return typeof window<"u"&&(window.qaBot=ii),Yn.default=ii,Yn.qaBot=ii,Object.defineProperties(Yn,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),Yn}({});
325
+ `;function nb(e){if(!e)return;const t=e.getRootNode();if(!(t instanceof ShadowRoot)||t.getElementById(kd))return;const n=document.createElement("style");n.id=kd,n.textContent=tb,t.appendChild(n)}const xd=ot((e,t)=>{const{apiKey:n=_t.DEFAULT_API_KEY,isLoggedIn:r=!1,loginUrl:o=_n.LOGIN_URL,userEmail:i,userName:l,accessId:s,actingUser:a,ringEffect:c,defaultOpen:u,onClose:A,open:d,onOpenChange:f,embedded:p=!1,welcome:v,qaEndpoint:h,ratingEndpoint:w,agentEndpoint:b,backendId:g,resourceContext:k,onAnalyticsEvent:_}=e,E=_t.AGENT_ENABLED,P=g||_t.BACKEND_ID,x=le(null),B=le(null),[D,T]=ne({}),[C,L]=ne(()=>({categories:[],is_authenticated:!1})),H=qe(()=>({email:i,name:l,accessId:s}),[i,l,s]);ee(()=>{nb(B.current)},[]),ee(()=>{Rw({ticketForm:D,setTicketForm:T})},[D]);const R=b||_t.AGENT_ENDPOINT,Q=k?`${R}/capabilities?resource_context=${encodeURIComponent(k)}`:`${R}/capabilities`;ee(()=>{},[R,E]),ee(()=>{},[E,Q,r]),ee(()=>{},[E,R,r]),Rr(t,()=>({addMessage:q=>{var re,Z;(Z=(re=x.current)==null?void 0:re.addMessage)==null||Z.call(re,q)}}));const M=v||(C==null?void 0:C.welcome_message)||(k?Lw():_n.WELCOME_MESSAGE),O=qe(()=>eb(),[]),m=X(q=>{_&&_({...q,type:q.type,timestamp:q.timestamp??Date.now(),sessionId:q.sessionId??O})},[_,O]),G=X(q=>{_&&_({...q,type:q.type,timestamp:typeof q.timestamp=="number"?q.timestamp:Date.now(),sessionId:typeof q.sessionId=="string"?q.sessionId:O})},[_,O]),y=qe(()=>{const q=Nw({welcome:M,setTicketForm:T,trackEvent:m}),re=Yw({ticketForm:{},setTicketForm:T,userInfo:H,trackEvent:m}),Z=$w({ticketForm:{},setTicketForm:T,userInfo:H,trackEvent:m}),ce=Zw({sessionId:O,apiKey:n,trackEvent:m}),Oe={...q,...re,...Z,...ce};return Ow(Oe,{disableOnOptions:!0})},[M,H,O,n,r,m,C]);return C?I("div",{ref:B,children:I(jl,{ref:x,isLoggedIn:r,allowAnonAccess:_t.ALLOW_ANON_ACCESS,actingUser:a,onAnalyticsEvent:G,apiKey:n,qaEndpoint:h||_t.QA_ENDPOINT,ratingEndpoint:w||_t.RATING_ENDPOINT,backendId:P,botName:_n.BOT_NAME,logo:_n.LOGO,primaryColor:_n.PRIMARY_COLOR,secondaryColor:_n.SECONDARY_COLOR,welcomeMessage:M,tooltipText:_n.TOOLTIP,turnstileSiteKey:_t.TURNSTILE_SITE_KEY,loginUrl:o,open:d,onOpenChange:f,embedded:p,footerText:"AI-powered ยท Privacy Notice",footerLink:"https://support.access-ci.org/tools/access-qa-tool/privacy",resourceContext:k,customFlow:y})}):I("div",{ref:B})});xd.displayName="AccessQABot";function $l(e){const{target:t,...n}=e;if(!t)throw new Error("qaBot: target element is required");const r=rs();let o=n.isLoggedIn||!1,i=n.open!==void 0?n.open:n.defaultOpen||!1;const l=of(t),s=()=>{l.render(I(xd,{ref:r,...n,isLoggedIn:o,open:i,onOpenChange:a=>{var c;i=a,(c=n.onOpenChange)==null||c.call(n,a)}}))};return s(),{addMessage(a){var c;(c=r.current)==null||c.addMessage(a)},setBotIsLoggedIn(a){o=a,s()},openChat(){i=!0,s()},closeChat(){i=!1,s()},toggleChat(){i=!i,s()},destroy(){l.unmount()}}}return typeof window<"u"&&(window.qaBot=$l),Tr.default=$l,Tr.qaBot=$l,Object.defineProperties(Tr,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),Tr}({});
296
326
  //# sourceMappingURL=access-qa-bot.standalone.js.map