@talkjs/web-components 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/default.cjs +98 -98
- package/default.d.ts +15 -0
- package/default.js +3350 -3325
- package/package.json +1 -1
package/default.cjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use client";"use strict";var Mu=t=>{throw TypeError(t)};var Pu=(t,e,n)=>e.has(t)||Mu("Cannot "+n);var ge=(t,e,n)=>(Pu(t,e,"read from private field"),n?n.call(t):e.get(t)),Ir=(t,e,n)=>e.has(t)?Mu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ro=(t,e,n,r)=>(Pu(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const KA=require("@talkjs/core"),hc=Object.freeze(Object.defineProperty({__proto__:null,get AfterMessages(){return KR},get AudioBlock(){return eI},get Avatar(){return aI},get BeforeMessages(){return XR},get ChatHeader(){return xR},get ChatSearchBox(){return QR},get CompactMessageContent(){return JR},get ConversationImage(){return lI},get ConversationListItem(){return fI},get FileBlock(){return tI},get GlobalSearchBox(){return _I},get GlobalSearchResultHeader(){return AI},get GlobalSearchResultItem(){return EI},get GroupChatImage(){return cI},get ImageBlock(){return nI},get LocationBlock(){return rI},get Message(){return UR},get MessageActionMenu(){return $R},get MessageDivider(){return GR},get MessageField(){return VR},get MessageListFooter(){return WR},get MessageListHeader(){return HR},get NoConversationSelected(){return qR},get RecordingPreview(){return YR},get ReferencedMessage(){return uI},get ReplyBar(){return dI},get TextBlock(){return iI},get TimeAgo(){return hI},get VideoBlock(){return oI},get VoiceBlock(){return sI},get VoiceRecorder(){return zR}},Symbol.toStringTag,{value:"Module"}));var oo,ee,Of,Wn,xu,vf,Df,Tf,pc,ml,El,Rf,Pi={},If=[],qA=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,xi=Array.isArray;function jt(t,e){for(var n in e)t[n]=e[n];return t}function _l(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function fe(t,e,n){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?oo.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return Ri(t,s,r,i,null)}function Ri(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++Of:i,__i:-1,__u:0};return i==null&&ee.vnode!=null&&ee.vnode(o),o}function yf(){return{current:null}}function ve(t){return t.children}function Nt(t,e){this.props=t,this.context=e}function Xr(t,e){if(e==null)return t.__?Xr(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Xr(t):null}function Cf(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Cf(t)}}function Al(t){(!t.__d&&(t.__d=!0)&&Wn.push(t)&&!ns.__r++||xu!=ee.debounceRendering)&&((xu=ee.debounceRendering)||vf)(ns)}function ns(){for(var t,e,n,r,i,o,s,a=1;Wn.length;)Wn.length>a&&Wn.sort(Df),t=Wn.shift(),a=Wn.length,t.__d&&(n=void 0,r=void 0,i=(r=(e=t).__v).__e,o=[],s=[],e.__P&&((n=jt({},r)).__v=r.__v+1,ee.vnode&&ee.vnode(n),fc(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i==null?Xr(r):i,!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,bf(o,n,s),r.__e=r.__=null,n.__e!=i&&Cf(n)));ns.__r=0}function Fu(t,e,n,r,i,o,s,a,l,u,c){var d,h,p,f,m,E,_,A=r&&r.__k||If,O=e.length;for(l=(function(S,v,T,R,y){var g,D,C,N,k,b=T.length,L=b,x=0;for(S.__k=new Array(y),g=0;g<y;g++)(D=v[g])!=null&&typeof D!="boolean"&&typeof D!="function"?(typeof D=="string"||typeof D=="number"||typeof D=="bigint"||D.constructor==String?D=S.__k[g]=Ri(null,D,null,null,null):xi(D)?D=S.__k[g]=Ri(ve,{children:D},null,null,null):D.constructor==null&&D.__b>0?D=S.__k[g]=Ri(D.type,D.props,D.key,D.ref?D.ref:null,D.__v):S.__k[g]=D,N=g+x,D.__=S,D.__b=S.__b+1,C=null,(k=D.__i=JA(D,T,N,L))!=-1&&(L--,(C=T[k])&&(C.__u|=2)),C==null||C.__v==null?(k==-1&&(y>b?x--:y<b&&x++),typeof D.type!="function"&&(D.__u|=4)):k!=N&&(k==N-1?x--:k==N+1?x++:(k>N?x--:x++,D.__u|=4))):S.__k[g]=null;if(L)for(g=0;g<b;g++)(C=T[g])!=null&&!(2&C.__u)&&(C.__e==R&&(R=Xr(C)),kf(C,C));return R})(n,e,A,l,O),d=0;d<O;d++)(p=n.__k[d])!=null&&(h=p.__i==-1?Pi:A[p.__i]||Pi,p.__i=d,E=fc(t,p,h,i,o,s,a,l,u,c),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&mc(h.ref,null,p),c.push(p.ref,p.__c||f,p)),m==null&&f!=null&&(m=f),(_=!!(4&p.__u))||h.__k===p.__k?l=Nf(p,l,t,_):typeof p.type=="function"&&E!==void 0?l=E:f&&(l=f.nextSibling),p.__u&=-7);return n.__e=m,l}function Nf(t,e,n,r){var i,o;if(typeof t.type=="function"){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,e=Nf(i[o],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=Xr(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function dn(t,e){return e=e||[],t==null||typeof t=="boolean"||(xi(t)?t.some(function(n){dn(n,e)}):e.push(t)),e}function JA(t,e,n,r){var i,o,s,a=t.key,l=t.type,u=e[n],c=u!=null&&!(2&u.__u);if(u===null&&a==null||c&&a==u.key&&l==u.type)return n;if(r>(c?1:0)){for(i=n-1,o=n+1;i>=0||o<e.length;)if((u=e[s=i>=0?i--:o++])!=null&&!(2&u.__u)&&a==u.key&&l==u.type)return s}return-1}function Hu(t,e,n){e[0]=="-"?t.setProperty(e,n==null?"":n):t[e]=n==null?"":typeof n!="number"||qA.test(e)?n:n+"px"}function Io(t,e,n,r,i){var o,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Hu(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||Hu(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Tf,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=pc,t.addEventListener(e,o?El:ml,o)):t.removeEventListener(e,o?El:ml,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n==null?"":n;break e}catch(a){}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Uu(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=pc++;else if(e.t<n.u)return;return n(ee.event?ee.event(e):e)}}}function fc(t,e,n,r,i,o,s,a,l,u){var c,d,h,p,f,m,E,_,A,O,S,v,T,R,y,g,D,C=e.type;if(e.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(c=ee.__b)&&c(e);e:if(typeof C=="function")try{if(_=e.props,A="prototype"in C&&C.prototype.render,O=(c=C.contextType)&&r[c.__c],S=c?O?O.props.value:c.__:r,n.__c?E=(d=e.__c=n.__c).__=d.__E:(A?e.__c=d=new C(_,S):(e.__c=d=new Nt(_,S),d.constructor=C,d.render=ZA),O&&O.sub(d),d.state||(d.state={}),d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),A&&d.__s==null&&(d.__s=d.state),A&&C.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=jt({},d.__s)),jt(d.__s,C.getDerivedStateFromProps(_,d.__s))),p=d.props,f=d.state,d.__v=e,h)A&&C.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),A&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(A&&C.getDerivedStateFromProps==null&&_!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,S),e.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(_,d.__s,S)===!1){for(e.__v!=n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(N){N&&(N.__=e)}),v=0;v<d._sb.length;v++)d.__h.push(d._sb[v]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,S),A&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,f,m)})}if(d.context=S,d.props=_,d.__P=t,d.__e=!1,T=ee.__r,R=0,A){for(d.state=d.__s,d.__d=!1,T&&T(e),c=d.render(d.props,d.state,d.context),y=0;y<d._sb.length;y++)d.__h.push(d._sb[y]);d._sb=[]}else do d.__d=!1,T&&T(e),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++R<25);d.state=d.__s,d.getChildContext!=null&&(r=jt(jt({},r),d.getChildContext())),A&&!h&&d.getSnapshotBeforeUpdate!=null&&(m=d.getSnapshotBeforeUpdate(p,f)),g=c,c!=null&&c.type===ve&&c.key==null&&(g=wf(c.props.children)),a=Fu(t,xi(g)?g:[g],e,n,r,i,o,s,a,l,u),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),E&&(d.__E=d.__=null)}catch(N){if(e.__v=null,l||o!=null)if(N.then){for(e.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else{for(D=o.length;D--;)_l(o[D]);gl(e)}else e.__e=n.__e,e.__k=n.__k,N.then||gl(e);ee.__e(N,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=(function(N,k,b,L,x,P,B,V,$){var z,_e,ae,ue,de,Be,vr,At=b.props||Pi,je=k.props,ut=k.type;if(ut=="svg"?x="http://www.w3.org/2000/svg":ut=="math"?x="http://www.w3.org/1998/Math/MathML":x||(x="http://www.w3.org/1999/xhtml"),P!=null){for(z=0;z<P.length;z++)if((de=P[z])&&"setAttribute"in de==!!ut&&(ut?de.localName==ut:de.nodeType==3)){N=de,P[z]=null;break}}if(N==null){if(ut==null)return document.createTextNode(je);N=document.createElementNS(x,ut,je.is&&je),V&&(ee.__m&&ee.__m(k,P),V=!1),P=null}if(ut==null)At===je||V&&N.data==je||(N.data=je);else{if(P=P&&oo.call(N.childNodes),!V&&P!=null)for(At={},z=0;z<N.attributes.length;z++)At[(de=N.attributes[z]).name]=de.value;for(z in At)if(de=At[z],z!="children"){if(z=="dangerouslySetInnerHTML")ae=de;else if(!(z in je)){if(z=="value"&&"defaultValue"in je||z=="checked"&&"defaultChecked"in je)continue;Io(N,z,null,de,x)}}for(z in je)de=je[z],z=="children"?ue=de:z=="dangerouslySetInnerHTML"?_e=de:z=="value"?Be=de:z=="checked"?vr=de:V&&typeof de!="function"||At[z]===de||Io(N,z,de,At[z],x);if(_e)V||ae&&(_e.__html==ae.__html||_e.__html==N.innerHTML)||(N.innerHTML=_e.__html),k.__k=[];else if(ae&&(N.innerHTML=""),Fu(k.type=="template"?N.content:N,xi(ue)?ue:[ue],k,b,L,ut=="foreignObject"?"http://www.w3.org/1999/xhtml":x,P,B,P?P[0]:b.__k&&Xr(b,0),V,$),P!=null)for(z=P.length;z--;)_l(P[z]);V||(z="value",ut=="progress"&&Be==null?N.removeAttribute("value"):Be!=null&&(Be!==N[z]||ut=="progress"&&!Be||ut=="option"&&Be!=At[z])&&Io(N,z,Be,At[z],x),z="checked",vr!=null&&vr!=N[z]&&Io(N,z,vr,At[z],x))}return N})(n.__e,e,n,r,i,o,s,l,u);return(c=ee.diffed)&&c(e),128&e.__u?void 0:a}function gl(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(gl)}function bf(t,e,n){for(var r=0;r<n.length;r++)mc(n[r],n[++r],n[++r]);ee.__c&&ee.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){ee.__e(o,i.__v)}})}function wf(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:xi(t)?t.map(wf):jt({},t)}function mc(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){ee.__e(i,n)}}function kf(t,e,n){var r,i;if(ee.unmount&&ee.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||mc(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ee.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&kf(r[i],e,n||typeof t.type!="function");n||_l(t.__e),t.__c=t.__=t.__e=void 0}function ZA(t,e,n){return this.constructor(t,n)}function Fi(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),ee.__&&ee.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],fc(e,t=(!r&&n||e).__k=fe(ve,null,[t]),i||Pi,Pi,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?oo.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),bf(o,t,s)}function Lf(t,e){Fi(t,e,Lf)}function QA(t,e,n){var r,i,o,s,a=jt({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o]===void 0&&s!=null?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?oo.call(arguments,2):n),Ri(t.type,a,r||t.key,i||t.ref,null)}function ii(t){function e(n){var r,i;return this.getChildContext||(r=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(s){s.__e=!0,Al(s)})},this.sub=function(o){r.add(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),s&&s.call(o)}}),n.children}return e.__c="__cC"+Rf++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}oo=If.slice,ee={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},Of=0,Nt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=jt({},this.state),typeof t=="function"&&(t=t(jt({},n),this.props)),t&&jt(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Al(this))},Nt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Al(this))},Nt.prototype.render=ve,Wn=[],vf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Df=function(t,e){return t.__v.__b-e.__v.__b},ns.__r=0,Tf=/(PointerCapture)$|Capture$/i,pc=0,ml=Uu(!1),El=Uu(!0),Rf=0;var eg=0;function I(t,e,n,r,i,o){e||(e={});var s,a,l=e;if("ref"in l)for(a in l={},e)a=="ref"?s=e[a]:l[a]=e[a];var u={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--eg,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return ee.vnode&&ee.vnode(u),u}var fn,me,Aa,Bu,Kr=0,Mf=[],Se=ee,ju=Se.__b,$u=Se.__r,Vu=Se.diffed,zu=Se.__c,Yu=Se.unmount,Gu=Se.__;function Er(t,e){Se.__h&&Se.__h(me,t,Kr||e),Kr=0;var n=me.__H||(me.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function ne(t){return Kr=1,Ms(Pf,t)}function Ms(t,e,n){var r=Er(fn++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Pf(void 0,e),function(a){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,a);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=me,!me.__f)){var i=function(a,l,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(h){return!!h.__c});if(c.every(function(h){return!h.__N}))return!o||o.call(this,a,l,u);var d=r.__c.props!==a;return c.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(d=!0)}}),o&&o.call(this,a,l,u)||d};me.__f=!0;var o=me.shouldComponentUpdate,s=me.componentWillUpdate;me.componentWillUpdate=function(a,l,u){if(this.__e){var c=o;o=void 0,i(a,l,u),o=c}s&&s.call(this,a,l,u)},me.shouldComponentUpdate=i}return r.__N||r.__}function G(t,e){var n=Er(fn++,3);!Se.__s&&_c(n.__H,e)&&(n.__=t,n.u=e,me.__H.__h.push(n))}function Ze(t,e){var n=Er(fn++,4);!Se.__s&&_c(n.__H,e)&&(n.__=t,n.u=e,me.__h.push(n))}function X(t){return Kr=5,te(function(){return{current:t}},[])}function _n(t,e,n){Kr=6,Ze(function(){if(typeof t=="function"){var r=t(e());return function(){t(null),r&&typeof r=="function"&&r()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function te(t,e){var n=Er(fn++,7);return _c(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function q(t,e){return Kr=8,te(function(){return t},e)}function Hn(t){var e=me.context[t.__c],n=Er(fn++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(me)),e.props.value):t.__}function Ec(t,e){Se.useDebugValue&&Se.useDebugValue(e?e(t):t)}function Ps(){var t=Er(fn++,11);if(!t.__){for(var e=me.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function tg(){for(var t;t=Mf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach($o),t.__H.__h.forEach(Sl),t.__H.__h=[]}catch(e){t.__H.__h=[],Se.__e(e,t.__v)}}Se.__b=function(t){me=null,ju&&ju(t)},Se.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Gu&&Gu(t,e)},Se.__r=function(t){$u&&$u(t),fn=0;var e=(me=t.__c).__H;e&&(Aa===me?(e.__h=[],me.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach($o),e.__h.forEach(Sl),e.__h=[],fn=0)),Aa=me},Se.diffed=function(t){Vu&&Vu(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Mf.push(e)!==1&&Bu===Se.requestAnimationFrame||((Bu=Se.requestAnimationFrame)||ng)(tg)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Aa=me=null},Se.__c=function(t,e){e.some(function(n){try{n.__h.forEach($o),n.__h=n.__h.filter(function(r){return!r.__||Sl(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Se.__e(r,n.__v)}}),zu&&zu(t,e)},Se.unmount=function(t){Yu&&Yu(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{$o(r)}catch(i){e=i}}),n.__H=void 0,e&&Se.__e(e,n.__v))};var Wu=typeof requestAnimationFrame=="function";function ng(t){var e,n=function(){clearTimeout(r),Wu&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);Wu&&(e=requestAnimationFrame(n))}function $o(t){var e=me,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),me=e}function Sl(t){var e=me;t.__c=t.__(),me=e}function _c(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Pf(t,e){return typeof e=="function"?e(t):e}function xf(t,e){for(var n in e)t[n]=e[n];return t}function Ol(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function Ac(t,e){var n=e(),r=ne({t:{__:n,u:e}}),i=r[0].t,o=r[1];return Ze(function(){i.__=n,i.u=e,ga(i)&&o({t:i})},[t,n,e]),G(function(){return ga(i)&&o({t:i}),t(function(){ga(i)&&o({t:i})})},[t]),n}function ga(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch(s){return!0}}function gc(t){t()}function Sc(t){return t}function Oc(){return[!1,gc]}var vc=Ze;function rs(t,e){this.props=t,this.context=e}function mn(t,e){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!s:Ol(this.props,i)}function r(i){return this.shouldComponentUpdate=n,fe(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=t,r}(rs.prototype=new Nt).isPureReactComponent=!0,rs.prototype.shouldComponentUpdate=function(t,e){return Ol(this.props,t)||Ol(this.state,e)};var Xu=ee.__b;ee.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Xu&&Xu(t)};var rg=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function _t(t){function e(n){var r=xf({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=rg,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Ku=function(t,e){return t==null?null:dn(dn(t).map(e))},Ff={map:Ku,forEach:Ku,count:function(t){return t?dn(t).length:0},only:function(t){var e=dn(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:dn},ig=ee.__e;ee.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}ig(t,e,n,r)};var qu=ee.unmount;function Hf(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=xf({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return Hf(r,e,n)})),t}function Uf(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return Uf(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Ii(){this.__u=0,this.o=null,this.__b=null}function Bf(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function jf(t){var e,n,r,i=null;function o(s){if(e||(e=t()).then(function(a){a&&(i=a.default||a),r=!0},function(a){n=a,r=!0}),n)throw n;if(!r)throw e;return i?fe(i,s):null}return o.displayName="Lazy",o.__f=!0,o}function Lr(){this.i=null,this.l=null}ee.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),qu&&qu(t)},(Ii.prototype=new Nt).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=Bf(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=Uf(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.o.pop();)u.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},Ii.prototype.componentWillUnmount=function(){this.o=[]},Ii.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Hf(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&fe(ve,null,t.fallback);return i&&(i.__u&=-33),[fe(ve,null,e.__a?null:t.children),i]};var Ju=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function og(t){return this.getChildContext=function(){return t.context},t.children}function sg(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){Fi(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),!e.v){for(var r=e.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(i,o){this.childNodes.push(i),e.h.insertBefore(i,o)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),e.h.removeChild(i)}}}Fi(fe(og,{context:e.context},t.__v),e.v)}function Dc(t,e){var n=fe(sg,{__v:t,h:e});return n.containerInfo=e,n}(Lr.prototype=new Nt).__a=function(t){var e=this,n=Bf(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),Ju(e,t,r)):i()};n?n(o):o()}},Lr.prototype.render=function(t){this.i=null,this.l=new Map;var e=dn(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Lr.prototype.componentDidUpdate=Lr.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Ju(t,n,e)})};var $f=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,ag=/^(?: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]/,lg=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,cg=/[A-Z0-9]/g,ug=typeof document!="undefined",dg=function(t){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Tc(t,e,n){return e.__k==null&&(e.textContent=""),Fi(t,e),typeof n=="function"&&n(),t?t.__c:null}function Vf(t,e,n){return Lf(t,e),typeof n=="function"&&n(),t?t.__c:null}Nt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Nt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Zu=ee.event;function hg(){}function pg(){return this.cancelBubble}function fg(){return this.defaultPrevented}ee.event=function(t){return Zu&&(t=Zu(t)),t.persist=hg,t.isPropagationStopped=pg,t.isDefaultPrevented=fg,t.nativeEvent=t};var Rc,mg={enumerable:!1,configurable:!0,get:function(){return this.class}},Qu=ee.vnode;ee.vnode=function(t){typeof t.type=="string"&&(function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||ug&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||dg(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":lg.test(s)&&(s=l):l=s="oninput":o&&ag.test(s)?s=s.replace(cg,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&i[s=l]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=dn(n.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=dn(n.children).forEach(function(u){u.props.selected=i.multiple?i.defaultValue.indexOf(u.props.value)!=-1:i.defaultValue==u.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",mg)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i})(t),t.$$typeof=$f,Qu&&Qu(t)};var ed=ee.__r;ee.__r=function(t){ed&&ed(t),Rc=t.__c};var td=ee.diffed;ee.diffed=function(t){td&&td(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Rc=null};var zf={ReactCurrentDispatcher:{current:{readContext:function(t){return Rc.__n[t.__c].props.value},useCallback:q,useContext:Hn,useDebugValue:Ec,useDeferredValue:Sc,useEffect:G,useId:Ps,useImperativeHandle:_n,useInsertionEffect:vc,useLayoutEffect:Ze,useMemo:te,useReducer:Ms,useRef:X,useState:ne,useSyncExternalStore:Ac,useTransition:Oc}}};function Yf(t){return fe.bind(null,t)}function so(t){return!!t&&t.$$typeof===$f}function Gf(t){return so(t)&&t.type===ve}function Wf(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Xf(t){return so(t)?QA.apply(null,arguments):t}function Ic(t){return!!t.__k&&(Fi(null,t),!0)}function Kf(t){return t&&(t.base||t.nodeType===1&&t)||null}var qf=function(t,e){return t(e)},xs=function(t,e){return t(e)},Jf=ve,Zf=so,F={useState:ne,useId:Ps,useReducer:Ms,useEffect:G,useLayoutEffect:Ze,useInsertionEffect:vc,useTransition:Oc,useDeferredValue:Sc,useSyncExternalStore:Ac,startTransition:gc,useRef:X,useImperativeHandle:_n,useMemo:te,useCallback:q,useContext:Hn,useDebugValue:Ec,version:"18.3.1",Children:Ff,render:Tc,hydrate:Vf,unmountComponentAtNode:Ic,createPortal:Dc,createElement:fe,createContext:ii,createFactory:Yf,cloneElement:Xf,createRef:yf,Fragment:ve,isValidElement:so,isElement:Zf,isFragment:Gf,isMemo:Wf,findDOMNode:Kf,Component:Nt,PureComponent:rs,memo:mn,forwardRef:_t,flushSync:xs,unstable_batchedUpdates:qf,StrictMode:Jf,Suspense:Ii,SuspenseList:Lr,lazy:jf,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:zf};const yc=Object.freeze(Object.defineProperty({__proto__:null,Children:Ff,Component:Nt,Fragment:ve,PureComponent:rs,StrictMode:Jf,Suspense:Ii,SuspenseList:Lr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:zf,cloneElement:Xf,createContext:ii,createElement:fe,createFactory:Yf,createPortal:Dc,createRef:yf,default:F,findDOMNode:Kf,flushSync:xs,forwardRef:_t,hydrate:Vf,isElement:Zf,isFragment:Gf,isMemo:Wf,isValidElement:so,lazy:jf,memo:mn,render:Tc,startTransition:gc,unmountComponentAtNode:Ic,unstable_batchedUpdates:qf,useCallback:q,useContext:Hn,useDebugValue:Ec,useDeferredValue:Sc,useEffect:G,useErrorBoundary:function(t){var e=Er(fn++,10),n=ne();return e.__=t,me.componentDidCatch||(me.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:Ps,useImperativeHandle:_n,useInsertionEffect:vc,useLayoutEffect:Ze,useMemo:te,useReducer:Ms,useRef:X,useState:ne,useSyncExternalStore:Ac,useTransition:Oc,version:"18.3.1"},Symbol.toStringTag,{value:"Module"}));var Cc=Object.prototype.hasOwnProperty;function ke(t){return Array.isArray(t)}function zt(t){return!(!t||typeof t!="object"||t instanceof Date||ke(t))}function Eg(t){return zt(t)&&t.constructor===Object}function Q(t){return typeof t=="function"}function Je(t){const e=typeof t;return t!==void 0&&(vl(t)||e!=="object"&&e!=="function")}function vl(t){return t instanceof Date}function Qf(t){return typeof t=="boolean"}function $t(t){return t instanceof Promise}function Ue(t){return t instanceof Map||t instanceof WeakMap}function En(t){return t instanceof Set||t instanceof WeakSet}function is(t){if(!t)return!1;if(ke(t))return t.length===0;if(Ue(t)||En(t))return t.size===0;for(const e in t)if(Cc.call(t,e))return!1;return!0}var _g=new Set(["boolean","string","number"]);function Fs(t){return!!t.parent}var em=Symbol.toPrimitive,Ag=Symbol.iterator,qr=Symbol("getNode"),Hs=Symbol("delete"),tm=Symbol("opaque"),gg=Symbol("plain"),Nc=Symbol("optimized"),Hi=Symbol("linked"),be={pendingNodes:new Map,dirtyNodes:new Set};function Ui(t){return t&&(t[tm]||t.$$typeof)}function nm(t){return t&&t[gg]}function rm(t){return ke(t)?"array":Ue(t)?"map":t instanceof Set?"set":"object"}function Sg(t,e){return Ue(e)?{__LSType:"Map",value:Array.from(e.entries())}:e instanceof Set?{__LSType:"Set",value:Array.from(e)}:(be.replacer&&(e=be.replacer(t,e)),e)}var Og=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function vg(t,e){if(e){if(typeof e=="string"&&Og.test(e))return new Date(e);if(typeof e=="object"){if(e.__LSType==="Map")return new Map(e.value);if(e.__LSType==="Set")return new Set(e.value)}be.reviver&&(e=be.reviver(t,e))}return e}function im(t){return t&&JSON.stringify(t,Sg)}function om(t){return t&&JSON.parse(t,vg)}function sm(t){return om(im(t))}function ye(t){return!!t&&!!t[qr]}function ao(t){return t&&t[qr]}function am(t,e,n,r,i){return r?t.add(n):i?t.set(e,n):t[e]=n,n}function hn(t,e){var n;const r=(n=t.parent)!=null?n:t,i=t.parent?t.key:"_",o=e===Hs;o&&(e=void 0);const s=t.parent?bc(r):r.root,a=En(s),l=Ue(s),u=a?i:l?s.get(i):s[i],c=Q(e);if((e=r.isAssigning||!c||Q(u)?e:e(u))!==u)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:am(s,i,e,a,l)}finally{r.isSetting--}return{prevValue:u,newValue:e,parentValue:s}}var nd=[];function Ee(t){let e=0,n=t;for(;Fs(n);)nd[e++]=n.key,n=n.parent;let r=t.root._;for(let i=e-1;r&&i>=0;i--){const o=nd[i];r=o!=="size"&&Ue(r)?r.get(o):r[o]}return r}function Ft(t,e,n){var r,i;let o=(r=t.children)==null?void 0:r.get(e);return o||(o={root:t.root,parent:t,key:e,lazy:!0,numListenersRecursive:0},((i=t.lazyFn)==null?void 0:i.length)===1&&(n=t.lazyFn.bind(t,e)),Q(n)&&(o=Object.assign(()=>{},o),o.lazyFn=n),t.children||(t.children=new Map),t.children.set(e,o)),o}function bc(t){let e=Ee(t);if(!e||Q(e))if(Fs(t)){const n=bc(t.parent),r=En(n),i=Ue(n);e=am(n,t.key,{},r,i)}else e=t.root._={};return e}function lm(t,e){var n,r;let i=ye(t)?void 0:zt(t)?"id"in t?"id":"key"in t?"key":"_id"in t?"_id":"__id"in t?"__id":void 0:void 0;if(!i&&e.parent){const o=e.key+"_keyExtractor",s=(r=(n=e.functions)==null?void 0:n.get(o))!=null?r:Ee(e.parent)[e.key+"_keyExtractor"];s&&Q(s)&&(i=s)}return i}function rd(t,e,n){t.functions||(t.functions=new Map),t.functions.set(e,n)}function cm(t,e){return t===e||vl(t)&&vl(e)&&+t==+e}function Dl(t,e,n,r){return e?void 0:t?r?Array.from(t):n?Array.from(t.keys()):Object.keys(t):[]}function Dg(t,e){return t&&Object.defineProperty(t,e,{value:!0,enumerable:!1,writable:!0,configurable:!0}),t}var id=function(t){return Dg(t,tm)};function um(t,e){var n;t.isPlain||!((n=t.parent)!=null&&n.isPlain)&&!nm(e)||(t.isPlain=!0)}function Yt(t,e,n,r){let i=t;return!ye(i)&&Q(i)&&(i=n?i(n):i()),ye(i)&&!r?i.get(e):i}var yi,Tg=(t,e)=>t&&t[e];function dm(t,e,n,r,i,o,s){let a,l=t;if(e.length>0){let u=o;for(let c=0;c<e.length;c++){a=e[c];const d=Ue(l);let h=l?d?l.get(a):l[a]:void 0;const p=u?d?u.get(a):u[a]:void 0;if(h===Hs)return u&&(d?l.set(a,p):l[a]=p,s==null||s(e.slice(0,c+1),p)),t;if(h===void 0&&r===void 0&&c===e.length-1)return t;c<e.length-1&&h==null&&(h=wc(n[c]),Ue(l)?l.set(a,h):l[a]=h),c<e.length-1&&(l=h,u&&(u=p))}}return a===void 0?t=i==="merge"?ss(t,r):r:i==="merge"?l[a]=ss(l[a],r):Ue(l)?l.set(a,r):l[a]=r,t}function od(t,e,n){let r=n;for(let i=0;i<t.length;i++){const o=t[i];r=r?r[o]:wc(e[i])}return r}function Tl(t){return!(!t||(zt(t)||ke(t))&&is(t))}function wc(t){switch(t){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function Rg(t,e,n){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=e;return dm(t,r,s,o)}function ss(t,...e){if(Je(t))return e[e.length-1];let n=ke(t)?[...t]:{...t};for(let r=0;r<e.length;r++){const i=e[r];if(Eg(i)||ke(i)){const o=i;for(const s in o)Cc.call(o,s)&&(o[s]instanceof Object&&!ye(o[s])&&Object.keys(o[s]).length>0?n[s]=ss(n[s]||(ke(o[s])?[]:{}),o[s]):n[s]=o[s])}else n=i}return n}var as=0,Sa=!1,Oa=!1,Br=new Map;function Ig(){Br.size>0&&oi(!0)}function hm(t,e){for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function yg(t,e){try{return(function(n,r){for(let i=0;i<r.length;i++)n=Rg(n,r[i]);return n})(t?sm(t):{},e)}catch(n){return}}function kc(t,e){return function(){return yg(t,e)}}function Bi(t,e,n,r,i){const o=new Map;ls(o,t,!!be.isLoadingLocal,!!be.isLoadingRemote,e,[],[],e,n,!0,r,i);const s=Br.get(t);s?s.prev===e?Br.delete(t):s.value=e:Br.set(t,{value:e,prev:n,level:r,whenOptimizedOnlyIf:i,isFromSync:!!be.isLoadingRemote,isFromPersist:!!be.isLoadingLocal}),o.size&&pm(o,!0),as<=0&&fm()}function ls(t,e,n,r,i,o,s,a,l,u,c,d){if(e.numListenersRecursive>0&&((function(h,p,f,m,E,_,A,O,S,v,T,R){if(v?p.listenersImmediate:p.listeners){const y={path:_,pathTypes:A,valueAtPath:O,prevAtPath:S},g=h.get(p);if(g&&_.length>0){const{changes:D}=g;hm(D[0].path,y.path)||(D.push(y),g.level=Math.min(g.level,T),g.whenOptimizedOnlyIf||(g.whenOptimizedOnlyIf=R))}else h.set(p,{level:T,value:E,isFromSync:m,isFromPersist:f,whenOptimizedOnlyIf:R,changes:[y]})}})(t,e,n,r,i,o,s,a,l,u,c,d),e.linkedFromNodes))for(const h of e.linkedFromNodes)ls(t,Cg(h,o),n,r,a,[],[],a,l,u,0,d);if(e.parent){const h=e.parent;h&&ls(t,h,n,r,Ee(h),[e.key].concat(o),[rm(i)].concat(s),a,l,u,c+1,d)}}function pm(t,e){const n=new Set;t.forEach(({changes:r,level:i,value:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{const c=e?u.listenersImmediate:u.listeners;if(c){let d;const h=Array.from(c);for(let p=0;p<h.length;p++){const f=h[p],{track:m,noArgs:E,listener:_}=f;n.has(_)||(m===!0?i<=0:m!==Nc||l&&i<=0)&&(E||d||(d={value:o,isFromPersist:s,isFromSync:a,getPrevious:kc(o,r),changes:r}),m||n.add(_),_(d))}}})}function fm(){const t=Array.from(be.dirtyNodes);be.dirtyNodes.clear(),t.forEach(r=>{const i=r.dirtyFn;i&&(r.dirtyFn=void 0,i())});const e=Br;Br=new Map;const n=new Map;e.forEach(({value:r,prev:i,level:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{ls(n,u,s,a,r,[],[],r,i,!1,o,l)}),n.size&&pm(n,!1)}function Gt(t){Us();try{t()}finally{oi()}}function Us(){as++,yi||(yi=setTimeout(Ig,0))}function oi(t){(--as<=0||t)&&(Sa?Oa=!0:(yi&&(clearTimeout(yi),yi=void 0),as=0,Sa=!0,fm(),Sa=!1,Oa&&(Oa=!1,oi(!0))))}function Cg(t,e){let n=t;for(let r=0;r<e.length;r++)n=Ft(n,e[r]);return n}function Lc(t,e,n,r,i){if(ye(t))return t;const o=$t(t);let s={root:{_:t},lazy:!0,numListenersRecursive:0};Q(t)&&(s=Object.assign(()=>{},s),s.lazyFn=t);var a;const l=e||(a=t,_g.has(typeof a))?new i(s):r(s);return o&&(hn(s,void 0),n(s,t)),l}var Mr=new WeakMap,mm=[],Em=[],_m=[],Pr=0,Rl=!1;function hi(t,e,n){const r=Mr.get(t);if(!r||!r.has(n))return;const i=r.get(n);i&&i.size!==0&&(mm[Pr]=t,Em[Pr]=e,_m[Pr]=n,Pr++,Rl||(Rl=!0,queueMicrotask(Ng)))}var pi={type:"listener-added",node:null,listener:void 0,timestamp:0};function Ng(){Rl=!1;const t=typeof performance!="undefined"?performance.now():Date.now();pi.timestamp=t;for(let e=0;e<Pr;e++){const n=mm[e],r=Em[e],i=_m[e],o=Mr.get(n);if(!o)continue;const s=o.get(i);if(!s||s.size===0)continue;const a=n.listeners,l=n.listenersImmediate;if(!a&&!l&&n.numListenersRecursive&&(i!=="listener-added"||r))continue;let u=!1;if(i==="listener-added")r?u=!!(a!=null&&a.has(r))||!!(l!=null&&l.has(r)):u=!(!(!(a!=null&&a.size)&&!(l!=null&&l.size))||typeof n.numListenersRecursive!="number")&&n.numListenersRecursive>0;else if(i==="listener-removed")u=!(a!=null&&a.has(r))&&!(l!=null&&l.has(r));else{const c=a&&a.size>0||l&&l.size>0;u=typeof n.numListenersRecursive=="number"?!c&&n.numListenersRecursive===0:!c}if(u){pi.type=i,pi.node=n,pi.listener=r;const c=Array.from(s);for(let d=0;d<c.length;d++)try{c[d](pi)}catch(h){console.error(`Error in middleware handler for ${i}:`,h)}}}Pr=0}function sd(t){var e,n;return!((e=t.listeners)!=null&&e.size)&&!((n=t.listenersImmediate)!=null&&n.size)&&(function(r){var i;return((i=r.activationState)==null?void 0:i.synced)||!1})(t)}function xn(t,e,n={},r){var i;const{initial:o,immediate:s,noArgs:a}=n,{trackingType:l}=n;let u=s?t.listenersImmediate:t.listeners;u||(u=new Set,s?t.listenersImmediate=u:t.listeners=u);const c={listener:e,track:l,noArgs:a};if(u.add(c),o){const m=Ee(t);e({value:m,isFromPersist:!0,isFromSync:!1,changes:[{path:[],pathTypes:[],prevAtPath:m,valueAtPath:m}],getPrevious:()=>{}})}let d;function h(m,E=e,_){if(!(r!=null&&r.has(m))){r||(r=new Set),r.add(_||t),E||(E=e);const A={trackingType:!0,...n};d=[...d||[],xn(m,E,A,r)]}}t.linkedToNode&&h(t.linkedToNode),(i=t.linkedFromNodes)==null||i.forEach(m=>h(m)),t.numListenersRecursive++;let p=t.parent,f=[t.key];for(;p;){if(p.linkedFromNodes)for(const m of p.linkedFromNodes)r!=null&&r.has(m)||h(m,bg(m,f,e),p);p.numListenersRecursive++,sd(p)&&hi(p,void 0,"listener-added"),f=[p.key,...f],p=p.parent}return hi(t,c,"listener-added"),()=>{u.delete(c),d==null||d.forEach(_=>_());const m=[];let E=t;for(;E;)E.numListenersRecursive--,E.numListenersRecursive===0&&m.push(E),E=E.parent;hi(t,c,"listener-removed"),u.size===0&&hi(t,void 0,"listeners-cleared");for(const _ of m)_!==t&&sd(_)&&hi(_,void 0,"listeners-cleared")}}function bg(t,e,n){let r=od(e,[],Ee(t));return function({value:i,isFromPersist:o,isFromSync:s}){const a=od(e,[],i);a!==r&&n({value:a,isFromPersist:o,isFromSync:s,changes:[{path:[],pathTypes:[],prevAtPath:r,valueAtPath:a}],getPrevious:()=>r}),r=a}}function ad(t,e,n,r){let i=[];return t==null||t.forEach(o=>{const{node:s,track:a}=o;i.push(xn(s,e,{trackingType:a,immediate:r,noArgs:n}))}),()=>{if(i){for(let o=0;o<i.length;o++)i[o]();i=void 0}}}var Vo=0,ld=[],xr={current:void 0};function zo(t,e){if(Vo){const n=xr.current;if(n){n.nodes||(n.nodes=new Map);const r=n.nodes.get(t);r?(r.track=r.track||e,r.num++):n.nodes.set(t,{node:t,track:e,num:1})}}}function Am(t,e,n,r,i,o){let s,a,l=e;ld.push(xr.current),Vo++,xr.current={};const u=t&&Yt(t,n,r,i==null?void 0:i.fromComputed),c=xr.current.nodes;return--Vo<0&&(Vo=0),xr.current=ld.pop(),r!=null&&r.cancel||(s=ad(c,l,!1,i==null?void 0:i.immediate),a=o?()=>(s==null||s(),s=ad(c,l),s):void 0),{nodes:c,value:u,dispose:s,resubscribe:a}}function mt(t,e,n){let r,i;Q(e)?r=e:n=e;let o=!1;const s={num:0},a=function(){if(o)return;s.onCleanup&&(s.onCleanup(),s.onCleanup=void 0),o=!0,Us(),delete s.value,i==null||i();const{dispose:l,value:u,nodes:c}=Am(t,a,void 0,s,n);var d,h;i=l,s.value=u,s.nodes=c,s.refresh=a,s.onCleanupReaction&&(s.onCleanupReaction(),s.onCleanupReaction=void 0),oi(),o=!1,!r||!(n!=null&&n.fromComputed)&&(!(s.num>0)&&(d=t)&&((h=d[qr])!=null&&h.isEvent)||s.previous===s.value&&typeof s.value!="object")||r(s),s.previous=s.value,s.num++};return a(),()=>{var l,u;(l=s.onCleanup)==null||l.call(s),s.onCleanup=void 0,(u=s.onCleanupReaction)==null||u.call(s),s.onCleanupReaction=void 0,i==null||i()}}function gm(t,e){const n=_r(t);if(n==null||Je(n))return n;const r=e==="string"?Q(n.toString)?n.toString:n.valueOf:Q(n.valueOf)?n.valueOf:n.toString;return Q(r)?r.call(n):n}function Sm(t,e,n){if($t(t))return e?t.then(e):t;const r=ke(t);let i,o;return mt(function(s){const a=r?t.map(l=>Yt(l)):Yt(t);if(!$t(a)){{let l=!0;if(ke(a))for(let u=0;u<a.length;u++){let c=a[u];ye(c)?c=Yt(c):Q(c)&&(c=c()),l=l&&!!(n?Tl(c):c)}else l=n?Tl(a):a;l&&(i=a,s.cancel=!0)}return i}i=a},function(){o=e==null?void 0:e(i)}),$t(i)?e?i.then(e):i:i!==void 0?e?o:Promise.resolve(i):new Promise(s=>{if(e){const a=e;e=l=>{const u=a(l);s($t(u)?u.then(c=>c):u)}}else e=s})}function Bs(t,e){return Sm(t,e,!1)}var va=new Set(["copyWithin","fill","from","pop","push","reverse","shift","sort","splice","unshift"]),cd=new Set(["every","filter","find","findIndex","flatMap","forEach","join","map","reduce","some"]),wg=new Set(["filter","find"]),Il=new Map,yl=new Map([["get",js],["set",bt],["peek",_r],["onChange",xn],["assign",function(t,e){const n=ft(t);if(Us(),Je(t.root._)&&(t.root._={}),Ue(e)){const r=Ee(t);Ue(r)?e.forEach((i,o)=>r.set(o,i)):bt(t,e)}else{t.isAssigning=(t.isAssigning||0)+1;try{Object.assign(n,e)}finally{t.isAssigning--}}return oi(),n}],["delete",Dm],["toggle",function(t){const e=Ee(t);(e==null||Qf(e))&&bt(t,!e)}]]);function Om(t,e,n,...r){var i;if(n!=="push"||r.length!==1){const o=e.slice(),s=e[n].apply(e,r);if(t){const a=Fs(t),l=a?t.key:"_";(a?Ee(t.parent):t.root)[l]=o,Jr((i=t.parent)!=null?i:t,l,e)}return s}Jr(t,e.length+"",r[0])}function Mc(t,e,n){var r,i,o;if(zt(e)&&Ui(e)||zt(n)&&Ui(n)){const v=e!==n;return v&&(t.listeners||t.listenersImmediate)&&Bi(t,e,n,0),v}const s=ke(e);let a,l;const u=Ue(e),c=En(e),d=Ue(n),h=En(n),p=Dl(e,s,u,c),f=Dl(n,s,d,h),m=((r=p||e)==null?void 0:r.length)||0,E=((i=f||n)==null?void 0:i.length)||0;let _,A,O,S=!1;if(s&&ke(n)){if(n.length>0){const v=n[0];if(v!==void 0&&(_=lm(v,t),_&&(A=Q(_),a=new Map,l=[]),t.children))for(let T=0;T<n.length;T++){const R=n[T];if(R){const y=t.children.get(T+"");if(y&&(e[T]||ud(y,R),_)){const g=A?_(R):R[_];a.set(g,y)}}}}}else if(n&&(!e||zt(e))){const v=f.length;for(let T=0;T<v;T++){const R=f[T];if(!p.includes(R)){S=!0;const y=Ft(t,R),g=d?n.get(R):n[R];g!==void 0&&ud(y,g)}}}if(e&&!Je(e)){S=S||m!==E;const v=S;let T=!1;for(let R=0;R<m;R++){const y=s?R+"":p[R];let g=u?e.get(y):e[y];const D=d?n==null?void 0:n.get(y):n==null?void 0:n[y];let C=!cm(g,D);if(C){const N=_&&g?A?_(g):g[_]:void 0,k=(o=t.children)==null?void 0:o.get(y);if(ye(g)){const L=ao(g);if((k==null?void 0:k.linkedToNode)===L){const P=Ee(L);u?e.set(y,P):e[y]=P;continue}const x=g;g=()=>x}let b=Ft(t,y,g);if(b.lazy||!Q(g)&&!ye(g)||(Im(b,g),kn(b)),s&&N!==void 0){const L=N!==void 0?a==null?void 0:a.get(N):void 0;if(L){if(L!==void 0&&L.key!==y){const x=n[L.key];v&&(b=L,t.children.delete(b.key),b.key=y,l.push([y,b])),T=!0,C=x!==g}}else S=!0}if(C)if(Q(g)||ye(g))Qr(t,y,g);else if(Je(g))S=!0;else{const L=Mc(b,g,D);S=S||L,C=L}(C||s&&!v)&&(b.listeners||b.listenersImmediate)&&Bi(b,g,D,0,!v)}}if(l)for(let R=0;R<l.length;R++){const[y,g]=l[R];t.children.set(y,g)}O=S||T}else n!==void 0&&(O=!0);return O!=null&&O}function ud(t,e){var n,r;(n=t.linkedToNodeDispose)==null||n.call(t),(r=t.activatedObserveDispose)==null||r.call(t),Je(e)||Mc(t,void 0,e),(t.listeners||t.listenersImmediate)&&Bi(t,void 0,e,0)}function ft(t,e,n){return e!==void 0&&(t=Ft(t,e,n)),t.proxy||(t.proxy=new Proxy(t,vm))}function Cl(){if(be.pendingNodes.size>0){const t=Array.from(be.pendingNodes.values());be.pendingNodes.clear(),t.forEach(e=>e())}}var vm={get(t,e,n){var r,i,o;if(e===em)return h=>gm(t,h);if(e===qr)return t;if(e==="apply"||e==="call"){const h=Ee(t);if(Q(h))return h[e]}if(e==="constructor"){const h=(r=kn(t))==null?void 0:r.constructor;return typeof h=="function"?h:Object}let s=kn(t,e==="get"||e==="peek");if(e===Ag)return!s||Je(s)?void 0:s[e];const a=t.linkedToNode||(s==null?void 0:s[qr]);if(a&&e!=="onChange")return vm.get(a,e,n);if(Ue(s)||En(s)){const h=(function(p,f,m){const E=m==null?void 0:m[f];if(f==="size")return zo(p,!0),m[f];if(Q(E))return function(_,A,O){const S=arguments.length,v=m;if(f==="get"){if(S>0&&typeof _!="boolean"&&_!==Nc)return ft(p,_)}else{if(f==="set")return S===2?bt(Ft(p,_),A):S===1&&Ue(m)&&bt(p,_),ft(p);if(f==="delete"){if(S>0){const R=m.get?v.get(_):_;return Dm(p,_),R!==void 0}}else{if(f==="clear"){const R=En(v)?new Set(v):new Map(v),y=v.size;return v.clear(),void(y&&Tm(p,m,R))}if(f==="add"){const R=new Set(m),y=m.add(_);return m.has(f)||Bi(p,y,R,0),ft(p)}}}const T=yl.get(f);if(!T)return m[f](_,A);switch(S){case 0:return T(p);case 1:return T(p,_);case 2:return T(p,_,A);default:return T(p,_,A,O)}}})(t,e,s);if(h!==void 0)return h}const l=yl.get(e);if(l)return e!=="get"&&e!=="peek"||Cl(),function(h,p,f){switch(arguments.length){case 0:return l(t);case 1:return l(t,h);case 2:return l(t,h,p);default:return l(t,h,p,f)}};const u=Il.get(e);if(u)return u.get(t);let c=s==null?void 0:s[e];if(zt(s)&&Ui(s))return c;const d=(i=t.functions)==null?void 0:i.get(e);if(d)return ye(d)?d:ft(t,e,d);if(c=(function(h,p){if(h){const f=Object.getOwnPropertyDescriptor(h,p);return f!=null&&f.get&&(delete h[p],h[p]=f.set?(function(m){Q(m)&&(m={get:m});const E=function(){return{[Hi]:m}};return E.prototype[Hi]=m,E})({get:f.get,set:({value:m})=>f.set(m)}):f.get),h[p]}})(s,e),(function(h){return h==null})(s)&&c===void 0&&(va.has(e)||cd.has(e))&&(s=[],va.has(e)&&hn(t,s),c=s[e]),Q(c)){if(ke(s)){if(va.has(e))return(...p)=>Om(t,s,e,...p);if(cd.has(e))return zo(t,!0),function(p,f){const m=e==="reduce",E=m?(O,S,v,T)=>p(O,ft(t,v+"",S),v,T):(O,S,v)=>p(ft(t,S+"",O),S,v);if(m||!wg.has(e))return s[e](E,f);const _=e==="find",A=[];for(let O=0;O<s.length;O++)if(E(s[O],O,s)){const S=ft(t,O+"");if(_)return S;A.push(S)}return _?void 0:A}}Qr(t,e,c);const h=(o=t.functions)==null?void 0:o.get(e);return h?ft(t,e,h):c.bind(s)}return Je(c)&&e==="length"&&ke(s)?(zo(t,!0),c):ft(t,e)},getPrototypeOf(t){const e=Ee(t);return e!==null&&typeof e=="object"?Reflect.getPrototypeOf(e):null},ownKeys(t){kn(t);const e=js(t,!0);if(Je(e))return[];const n=e?Reflect.ownKeys(e):[];if(ke(e)&&n[n.length-1]==="length"&&n.splice(n.length-1,1),Q(t)){const r=Reflect.ownKeys(t);["caller","arguments","prototype"].forEach(i=>r.includes(i)&&n.push(i))}return n},getOwnPropertyDescriptor(t,e){if(e==="caller"||e==="arguments"||e==="prototype")return{configurable:!1,enumerable:!1};const n=Ee(t);if(Je(n))return;const r=Reflect.getOwnPropertyDescriptor(n,e);return r?{...r,configurable:!0}:void 0},set(t,e,n){if(t.isSetting)return Reflect.set(t,e,n);if(t.isAssigning)return Jr(t,e,n),!0;const r=Il.get(e);return!!r&&(r.set(t,n),!0)},deleteProperty:(t,e)=>!!t.isSetting&&Reflect.deleteProperty(t,e),has(t,e){const n=Ee(t);return n!=null&&(typeof n=="object"||typeof n=="function")&&Reflect.has(n,e)},apply(t,e,n){ye(e)&&(e=e.peek());const r=Ee(t),i=Q(r)?r:t.lazyFn||t;return Reflect.apply(i,e,n)}};function bt(t,e){t.parent?Jr(t.parent,t.key,e):Jr(t,"_",e)}function Jr(t,e,n,r){const i=!t.parent&&e==="_";!t.parent||Ee(t)||Q(n)||bt(t,{[e]:n});const o=i?t:Ft(t,e,n);if(um(o,n),ye(n))cs(o,n);else{const{newValue:s,prevValue:a,parentValue:l}=hn(o,n),u=Je(a)||a instanceof Date||Je(s)||s instanceof Date;if(!u){let h=o;do h.needsExtract=!0,h.recursivelyAutoActivated=!1;while(h=h.parent)}const c=!cm(s,a),d=!c&&o.isComputing&&!u&&!o.isPlain;!c&&!d||o.isComputing&&o.isPlain&&t.numListenersRecursive===0||Tm(t,s,a,o,l,u,i,r,d),Qr(t,e,s)}}function Dm(t,e){e===void 0&&Fs(t)&&(e=t.key,t=t.parent);const n=Ee(t);ke(n)?Om(t,n,"splice",e,1):Jr(t,e!=null?e:"_",Hs,-1)}function Tm(t,e,n,r,i,o,s,a,l){r||(r=t),Us(),o===void 0&&(o=Je(e));let u,c,d=l||o,h=!1;(!o||n&&!Je(n))&&(d=d||Mc(r,e,n),ke(e)?u=e:(Ue(e)||En(e))&&(c=e)),ke(i)?u=i:(Ue(i)||En(i))&&(c=i),u?h=(u==null?void 0:u.length)!==(n==null?void 0:n.length):c&&(h=(c==null?void 0:c.size)!==(n==null?void 0:n.size)),(o||!e||is(e)&&!is(n)?e!==n:d)&&Bi(o&&s?t:r,e,n,(a!=null?a:n===void 0)?-1:d?0:1,h),oi()}function Zr(t,e,n){const r=t.numGets=(t.numGets||0)+1;t.state||(t.state=Lc({isLoaded:!1},!1,Zr,ft)),e.then(i=>{r>=(t.getNumResolved||0)&&(t.getNumResolved=t.numGets,n?n({value:i}):bt(t,i),t.state.assign({isLoaded:!0,error:void 0}))}).catch(i=>{t.state.error.set(i)})}function Qr(t,e,n){if($t(n)){const r=Ft(t,e);return Zr(r,n),void hn(r,void 0)}if(ye(n)){const r=()=>n;rd(t,e,r);const i=Ft(t,e,r),o=_r(ao(n));return cs(i,n),hn(i,o),Ee(i)}if(typeof n=="function")return rd(t,e,n),e}function js(t,e){return zo(t,e?zt(e)?e.shallow:e:void 0),_r(t)}function _r(t){return kn(t,!0)}var yo=!1;function kn(t,e){var n;if(yo=!0,e&&((n=t.dirtyChildren)==null?void 0:n.size)){const i=Array.from(t.dirtyChildren);t.dirtyChildren.clear(),i.forEach(o=>o.dirtyFn&&kn(o))}if(t.dirtyFn){const i=t.dirtyFn;t.dirtyFn=void 0,be.dirtyNodes.delete(t),i()}yo=!1;let r=Ee(t);return t.root.isLoadingLocal||t.isPlain||(r=(function(i,o,s){const a=o,l=i.lazy;if(l){const u=i.lazyFn;if(delete i.lazy,Q(u))if(u.length===1)o={};else{if(i.parent){const c=Ee(i.parent);Q(o)&&(c?delete c[i.key]:i.root._=void 0)}o=(function(c,d){let h,p,f,m=!0;const E=d;let _,A,O=[];function S(){c.dirtyFn=A,be.dirtyNodes.add(c)}const v=mt(()=>{var T,R,y,g;if(m)m=!1,Q(Ee(c))&&hn(c,void 0);else if(!yo&&A&&(function(b,L){if(!yo&&!(function(P){var B,V;let $=P,z=P.numListenersRecursive>0;for(;$&&!z;)((B=$.listeners)!=null&&B.size||(V=$.listenersImmediate)!=null&&V.size)&&(z=!0),$=$.parent;return z})(b)){L&&(b.dirtyFn=L);let P=b;for(;P;)P.dirtyChildren||(P.dirtyChildren=new Set),P.dirtyChildren.add(b),P=P.parent;return!0}})(c,A))return void(f=!0);let D=E(),C=!1;const N=ye(D);(N||c.linkedToNode)&&(C=N,D=cs(c,D)),Q(D)&&D.length===0&&(D=D());const k=N||D==null?void 0:D[Hi];if(k&&(c.activationState=k,D=void 0),f=!1,p=$t(D),c.activated){if(c.activationState){const b=c.activationState;(R=(T=c.state)==null?void 0:T.peek())!=null&&R.sync?(c.state.sync(),f=!0):D=(g=(y=b.get)==null?void 0:y.call(b))!=null?g:b.initial}}else{c.activated=!0;let b=kg;k!=null&&k.synced&&(b=be.activateSyncedNode,f=!0);const L=b(c,D);h=L.update;let x=L.value;!C&&ye(x)&&(x=cs(c,x)),D=x!=null?x:k==null?void 0:k.initial}return f&&(_=D),p=p||$t(D),D},T=>{const{value:R,nodes:y,refresh:g}=T;if(A=g,!f){if(!p||!be.isLoadingRemote)if(p)if(c.activationState){const{initial:D}=c.activationState;R&&$t(R)&&Zr(c,R,h),Q(Ee(c))&&hn(c,D!=null?D:void 0)}else c.activated&&(Zr(c,R,h),Q(Ee(c))&&hn(c,void 0));else{_=R;const D=c.state.isLoaded.peek();!D&&Q(R)||(c.isComputing=!0,bt(c,R),c.isComputing=!1),D||c.state.assign({isLoaded:!0,error:void 0})}O.forEach(D=>D()),O=[],y==null||y.forEach(({node:D,track:C})=>{O.push(xn(D,S,{immediate:!0,trackingType:C}))})}T.cancel=!0},{fromComputed:!0});return c.activatedObserveDispose=()=>{v==null||v(),O.forEach(T=>T())},_})(i,u)}else ye(o)&&(o=Qr(i.parent,i.key,o))}return um(i,o),!l&&!i.needsExtract||i.isPlain||ye(o)||Je(o)||(s&&(function(u,c){if(!c.recursivelyAutoActivated&&(zt(u)||ke(u))&&!Ui(u)){c.recursivelyAutoActivated=!0;const d=[];ym(u,d,()=>{var p;let f=c;for(let m=0;m<d.length;m++){const E=d[m],_=(p=Ee(f))==null?void 0:p[E];f=Ft(f,E,Q(_)?_:void 0),kn(f)}return f})}})(o,i),i.parent&&Qr(i.parent,i.key,a)),o})(t,r,!!e)),r}function Rm(t){var e,n;(e=t.activatedObserveDispose)==null||e.call(t),(n=t.linkedToNodeDispose)==null||n.call(t),t.activatedObserveDispose=t.linkedToNodeDispose=t.linkedToNode=void 0}function Im(t,e){Rm(t),t.lazyFn=e,t.lazy=!0}function kg(t,e){if(t.state||(t.state=Lc({isLoaded:!1},!1,Zr,ft)),t.activationState){const{set:n,get:r,initial:i}=t.activationState;if((e=r==null?void 0:r())!=null&&e!==null||(e=i),n){let o,s=[],a=0;const l=u=>{if(s.length>0){let c,d,h,p=!1,f=!1;u?(c=u.changes,d=u.value,p=u.isFromPersist,f=u.isFromSync,h=u.getPrevious):(c=s,d=o,h=kc(d,c)),s=[],o=void 0,be.pendingNodes.delete(t),a++;const m=a,E=()=>{m===a&&(t.isComputing=!0,n({value:d,changes:c,isFromPersist:p,isFromSync:f,getPrevious:h}),t.isComputing=!1)};Sm(t.state.isLoaded,E,!0)}};xn(t,({value:u,changes:c})=>{t.isComputing||(c.length>1||!Q(c[0].prevAtPath))&&(o=u,s.length>0&&(c=c.filter(d=>!hm(s[0].path,d.path))),s.push(...c),be.pendingNodes.set(t,l))},{immediate:!0}),xn(t,l)}}return{update:({value:n})=>{t.isComputing||(t.isComputing=!0,bt(t,n),t.isComputing=!1)},value:e}}function cs(t,e){var n;const r=e?ao(e):void 0;return r!==t&&(r==null?void 0:r.linkedToNode)!==t&&(t.linkedToNode=r,(n=t.linkedToNodeDispose)==null||n.call(t),r&&(r.linkedFromNodes||(r.linkedFromNodes=new Set),r.linkedFromNodes.add(t),t.linkedToNodeDispose=xn(r,()=>{Q(e=kn(r))||bt(t,e)},{initial:!0},new Set([t])))),e}function ym(t,e,n){var r;if((zt(t)||ke(t))&&!Ui(t)&&!nm(t)){for(const i in t)if(Cc.call(t,i)){const o=t[i];if(ye(o)){const s=n();Qr(s,i,o),delete s.lazy}else{const s=Q(o)&&((r=o.prototype)==null?void 0:r[Hi]);if(s){const a=s.activate;(!a||a==="auto")&&_r(Ft(n(),i,o))}}typeof o=="object"&&(e.push(i),ym(o,e,n),e.pop())}}}var dd=["get","set","peek","onChange","toggle"];function qn(t){this._node=t;for(let e=0;e<dd.length;e++){const n=dd[e];this[n]=this[n].bind(this)}}function Co(t,e){qn.prototype[t]=function(...n){return e.call(this,this._node,...n)}}function le(t){return Lc(t,!1,Zr,ft,qn)}Co("peek",t=>(Cl(),_r(t))),Co("get",(t,e)=>(Cl(),js(t,e))),Co("set",bt),Co("onChange",xn),Object.defineProperty(qn.prototype,qr,{configurable:!0,get(){return this._node}}),Object.defineProperty(qn.prototype,em,{configurable:!0,value(t){return gm(this._node,t)}}),qn.prototype.toggle=function(){const t=this.peek();(t==null||Qf(t))&&this.set(!t)},qn.prototype.delete=function(){return this.set(void 0),this};var $s={createPreviousHandler:kc,clone:sm,deactivateNode:Rm,deepMerge:ss,ensureNodeValue:bc,findIDKey:lm,get:js,getChildNode:Ft,getKeys:Dl,getNode:ao,getNodeValue:Ee,getPathType:rm,getProxy:ft,getValueAtPath:function(t,e){return e.reduce(Tg,t)},globalState:be,initializePathType:wc,ObservablePrimitiveClass:qn,observableProperties:Il,observableFns:yl,optimized:Nc,peek:_r,reactivateNode:Im,registerMiddleware:function(t,e,n){let r=Mr.get(t);r||(r=new Map,Mr.set(t,r));let i=r.get(e);return i||(i=new Set,r.set(e,i)),i.add(n),()=>{const o=Mr.get(t);if(!o)return;const s=o.get(e);s&&(s.delete(n),s.size===0&&(o.delete(e),o.size===0&&Mr.delete(t)))}},safeParse:om,safeStringify:im,set:bt,setAtPath:dm,setNodeValue:hn,symbolLinked:Hi,symbolDelete:Hs,tracking:xr},{globalState:hd,observableProperties:Lg,observableFns:Mg,ObservablePrimitiveClass:pd}=$s;class Vs{constructor(e={}){this._handlers=new Set,this._meta=e}meta(e){return new Vs(e)}_emit(e,n){for(const r of this._handlers)r({level:e,data:n,timestamp:Date.now(),meta:this._meta})}error(...e){return this._emit("error",e)}warn(...e){return this._emit("warn",e)}info(...e){return this._emit("info",e)}log(...e){return this._emit("log",e)}trace(...e){return this._emit("trace",e)}registerHandler(e){return this._handlers.add(e),()=>this._handlers.delete(e)}}const Nl=new Vs,Ne=new Vs;function fd(t,e,n){return t.clearRect(0,0,100,100),t.fillStyle=n,t.fillText(e,0,0),t.getImageData(0,0,1,1).data.join(",")}function md(t){const e=(function(){const i=document.createElement("canvas");i.width=i.height=1;const o=i.getContext("2d",{willReadFrequently:!0});return o.textBaseline="top",o.font='100px "Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',o.scale(.01,.01),o})(),n=fd(e,t,"#fff"),r=fd(e,t,"#000");return r===n&&!r.startsWith("0,0,0,")}const Pg=ii(null),Da={didCatch:!1,error:null};class Cm extends Nt{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Da}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:o,reason:"imperative-api"}),this.setState(Da)}}componentDidCatch(e,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,e,n)}componentDidUpdate(e,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;var o,s;r&&n.error!==null&&(function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return a.length!==l.length||a.some((u,c)=>!Object.is(u,l[c]))})(e.resetKeys,i)&&((o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:i,prev:e.resetKeys,reason:"keys"}),this.setState(Da))}render(){const{children:e,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:o,error:s}=this.state;let a=e;if(o){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=fe(r,l);else{if(i===void 0)throw s;a=i}}return fe(Pg.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}var No=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function zs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Pc(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var Ed={exports:{}},Ta={};const Nm=Pc(yc);var _d,Ad,xg=(Ad||(Ad=1,Ed.exports=(function(){if(_d)return Ta;_d=1;var t=Nm,e=typeof Object.is=="function"?Object.is:function(l,u){return l===u&&(l!==0||1/l==1/u)||l!=l&&u!=u},n=t.useState,r=t.useEffect,i=t.useLayoutEffect,o=t.useDebugValue;function s(l){var u=l.getSnapshot;l=l.value;try{var c=u();return!e(l,c)}catch(d){return!0}}var a=typeof window=="undefined"||window.document===void 0||window.document.createElement===void 0?function(l,u){return u()}:function(l,u){var c=u(),d=n({inst:{value:c,getSnapshot:u}}),h=d[0].inst,p=d[1];return i(function(){h.value=c,h.getSnapshot=u,s(h)&&p({inst:h})},[l,c,u]),r(function(){return s(h)&&p({inst:h}),l(function(){s(h)&&p({inst:h})})},[l]),o(c),c};return Ta.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:a,Ta})()),Ed.exports),gd=!1,bl={inObserver:!1},Sd=void 0,Fg=()=>Sd||(Sd=ii(null));function Od(t){const e=Bs(t);if(!F.use)throw e;F.use(e)}function J(t,e){let n;if(bl.inObserver&&ye(t)&&!(e!=null&&e.suspense))return n=Yt(t,e),e!=null&&e.suspense&&n===void 0&&Od(t),n;try{const r=Hn(Fg()),i=te(()=>(function(l,u){let c,d,h,p,f,m,E=0;const _=()=>{d==null||d();const{value:O,dispose:S,resubscribe:v}=Am(p,A,l,void 0,void 0,!0);return d=S,h=v,O},A=({value:O})=>{if(u!=null&&u.peek()){const S=m;m=O,S===void 0&&Bs(()=>!u.get(),()=>{const v=m;m=void 0,A({value:v})})}else{let S=l==null?void 0:l.skipCheck;if(!S){const v=_();(v!==f||!Je(v)&&v===O)&&(S=!0)}S&&(E++,c==null||c())}};return{subscribe:O=>(c=O,!d&&h&&(d=h()),()=>{d==null||d(),d=void 0}),getVersion:()=>E,run:O=>(p=O,f=_())}})(e,r),[]),{subscribe:o,getVersion:s,run:a}=i;n=a(t),xg.useSyncExternalStore(o,s,s)}catch(r){throw r}return e!=null&&e.suspense&&n===void 0&&Od(t),n}var vd=typeof Symbol=="function"&&Symbol.for;function bm(t,e,n,r,i){const o=vd?Symbol.for("react.forward_ref"):_t(f=>null).$$typeof,s=vd?Symbol.for("react.memo"):mn(f=>null).$$typeof;if(t.__legend_proxied)return t;let a=!1,l=!1,u=t;s&&u.$$typeof===s&&u.type&&(l=!0,u=u.type),o&&u.$$typeof===o&&(a=!0,u=u.render);const c=r?new Set(r):void 0,d={apply(f,m,E){if(n){const _=E[0],A={},O=Object.keys(_);for(let S=0;S<O.length;S++){const v=O[S],T=_[v],R=c&&c.has(v);if(v==="children"&&(Q(T)||ye(T)))A[v]=J(T,{skipCheck:!0});else if(R||v.startsWith("$")||v.endsWith("$")){const y=R?v:v.endsWith("$")?v.slice(0,-1):v.slice(1),g=i==null?void 0:i[y],D=g&&ye(T);if(A[y]=D&&(g!=null&&g.selector)?g.selector(A,T):J(T),D&&(g.defaultValue!==void 0&&A[y]===void 0&&(A[y]=g.defaultValue),g.handler&&g.getValue)){const C=N=>{var k;T.set(g.getValue(N)),(k=_[g.handler])==null||k.call(_,N)};A[g.handler]=q(C,[_[g.handler],i])}R||delete A[v]}else A[v]===void 0&&(A[v]=T)}E[0]=A}return e?J(()=>{bl.inObserver=!0;try{return Reflect.apply(f,m,E)}finally{bl.inObserver=!1}},{skipCheck:!0}):Reflect.apply(f,m,E)}},h=new Proxy(u,d);let p;return a?(p=_t(h),p.__legend_proxied=!0):p=h,e||l?mn(p):p}var{findIDKey:Hg,getNode:Ug,optimized:Bg}=$s,Dd=new Map;function ji({each:t,optimized:e,item:n,itemProps:r,sortValues:i,children:o}){var s;if(!t)return null;const a=J(()=>t.get(!e||Bg));if(!n&&o){const u=X(void 0);u.current=o,n=te(()=>{return c=({item$:d,id:h})=>u.current(d,h),bm(c,!0);var c},[])}else if(n.$$typeof!==Symbol.for("react.memo")){let u=Dd.get(n);u||(u=mn(n),Dd.set(n,u)),n=u}if(!a)return null;const l=[];if(ke(a)){const u=a[0],c=Ug(t),d=a.length,h=d>0?c&&Hg(u,c)||(u.id!==void 0?"id":u.key!==void 0?"key":void 0):void 0,p=Q(h);for(let f=0;f<d;f++)if(a[f]){const m=a[f],E=(s=p?h(m):m[h])!=null?s:f,_=t[f],A={key:E,id:E,item$:_,item:_};l.push(fe(n,r?Object.assign(A,r):A))}}else{const u=Ue(a),c=u?Array.from(a.keys()):Object.keys(a);i&&c.sort((d,h)=>i(u?a.get(d):a[d],u?a.get(h):a[h],d,h));for(let d=0;d<c.length;d++){const h=c[d];if(u?a.get(h):a[h]){const p=u?t.get(h):t[h],f={key:h,id:h,item$:p,item:p};l.push(fe(n,r?Object.assign(f,r):f))}}}return l}mn(function({children:t}){return J(()=>Yt(Yt(t)),{skipCheck:!0})},(t,e)=>!e.scoped||t.children===e.children);var Td=new Map,Rd=new Map;function Id({if:t,ifReady:e,else:n,$value:r,wrap:i,children:o}){const s=J(t!=null?t:e),a=J((e!==void 0?Tl(s):s)?Q(o)?()=>o(r?r.get():s):o:n!=null?n:null,{skipCheck:!0});return i?fe(i,void 0,a):a}new Proxy({},{get(t,e){if(!t[e]){const n=Td.get(e)||e,r=_t((i,o)=>{const s={...i};return!o||!Q(o)&&is(o)||(s.ref=o),fe(n,s)});t[e]=(function(i,o,s){return bm(i,!1,!0,o,s)})(r,[],Rd.get(e))}return t[e]}}),(function(t){(function(e){if(gd)return;gd=!0;const n={value:{handler:"onChange",getValue:i=>i.target.value,defaultValue:""}},r=Object.assign({checked:{handler:"onChange",getValue:i=>i.target.checked}},n);e({binders:{input:r,textarea:n,select:n}})})(t)})(function({components:t,binders:e}){if(t)for(const n in t)Td.set(n,t[n]);if(e)for(const n in e)Rd.set(n,e[n])});var jg=(t,e)=>{{const n=X({num:0});G(()=>{var r;const{current:i}=n;i.num++;const o=()=>{i.dispose&&i.num<2&&(i.dispose(),i.dispose=void 0),i.num--};if(i.dispose!==void 0)return o;{const s=(r=t())!=null?r:null;if(s&&Q(s))return i.dispose=s,()=>queueMicrotask(o)}},e)}};function wm(t){return jg(()=>{const e=t();if(!$t(e))return e},[])}var $g=wm;function km(t){return wm(()=>t)}var Vg=km,{deactivateNode:zg}=$s;function lt(t,e){var n;const r=X({});r.current.value=t;const i=e?lt(e):void 0;if(!((n=r.current)!=null&&n.obs$)){const o=i?Q(t)&&t.length===1?s=>(i.get(),r.current.value(s)):()=>(i.get(),Yt(r.current.value)):t;r.current.obs$=le(o)}return i&&i.set(e),km(()=>{const o=r.current.obs$;if(o){const s=ao(o);zg(s)}}),r.current.obs$}function Lm(t,e,n,r){let i;Q(e)?i=e:Array.isArray(e)?(r=e,n=void 0):n=e,i&&Array.isArray(n)&&(r=n,n=void 0);const o=(r=r||(n==null?void 0:n.deps))?lt(r):void 0,s=X({});return s.current.selector=t,s.current.reaction=i,o&&o.set(r),s.current.dispose||(s.current.dispose=mt(a=>{var l;return o==null||o.get(),Yt((l=s.current)==null?void 0:l.selector,void 0,a)},a=>{var l,u;return(u=(l=s.current).reaction)==null?void 0:u.call(l,a)},n)),Vg(()=>{var a,l;(l=(a=s.current)==null?void 0:a.dispose)==null||l.call(a)}),s.current.dispose}function $i(t,e,n,r){let i;Q(e)?i=e:Array.isArray(e)?(r=e,n=void 0):n=e,i&&Array.isArray(n)&&(r=n,n=void 0),r=r||(n==null?void 0:n.deps);const o=X({}),s=r?lt(r):void 0;o.current.selector=t,o.current.reaction=i,s&&s.set(r),$g(()=>mt(a=>{var l;return s==null||s.get(),Yt((l=o.current)==null?void 0:l.selector,void 0,a)},a=>{var l,u;return(u=(l=o.current).reaction)==null?void 0:u.call(l,a)},n))}class Mm extends Error{}function yd(t,e){if(!t)throw new Mm(e!=null?e:"Assertion failed")}const ie=Object.assign(yd,{is:function(t,e,n){return yd(e,n)},unreachable:function(){throw new Error("Unreachable code")},never:function(t){throw new Error("Unreachable")},defined:function(t){if(t==null)throw new Mm("Value is not defined")}}),[Pm,Qe]=Zt(),[xm,lo]=Zt(),[Fm]=Zt(),[xc,si]=Zt(),[Yg,Gg]=Zt(),[Hm,oe]=Zt(),[Um,Ar]=Zt(),[Bm,jm]=Zt(),[$m,Wg]=Zt(),[Xg,Fc]=Zt();function Zt(){const t=ii(void 0);return[t,()=>{const e=Hn(t);return ie(e!==void 0),e}]}const jr={code:"en-US",name:"English (US)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/en.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json",translation:{YESTERDAY:"Yesterday",TODAY:"Today",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just now",LOCATION:"Location",CANCEL:"Cancel",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser notifications",DESKTOP_NOTIFICATIONS_ERROR:"Can't enable browser notifications because your browser actively blocks them. Try looking in the settings or using a different browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notification`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"If you keep your browser tab open, you'll see this pop up when someone talks to you.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Only 10,000 characters are allowed.",ENTRYBOX_PLACEHOLDER:"Say something...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"This conversation is no longer active.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"You can read, but not send messages.",MESSAGELIST_LOADING_OLDER:"Loading older messages...",MESSAGELIST_SHOW_OLDER:"Show older messages",MESSAGELIST_NEW_MARKER:"New",MESSAGE_SENT_VIA_EMAIL:"This message was sent via email",YOU_MARKER:"you",UPLOAD_IN_PROGRESS:"Uploading...",UPLOAD_SEND_FILE:"Send file",UPLOAD_SHARE_LOCATION:"Share location",UPLOAD_ERROR:"Unfortunately, something went wrong uploading. The file might be unsupported or too large.",SHARE_LOCATION_ERROR:"Cannot share location: ",LOADING:"Loading...",HUB_EMPTY:"Your chat history will show up here",HUB_SHOW_EARLIER:"Show earlier chats",INBOX_NO_CHATS_TITLE:"No chats yet!",INBOX_NO_CHATS_BODY:"Once you've had one or more conversations, they will show up here.",ENABLE_TRANSLATION:"Translate this conversation to English",DISABLE_TRANSLATION:"Show original",SEARCH_PLACEHOLDER_TEXT:"Search...",SEARCH_SEARCHING:"Searching...",SEARCH_NO_RESULTS:"No results found",SEARCH_NO_MORE_RESULTS:"No more results",SEARCH_RESULTS_CONVERSATIONS:"Conversations",SEARCH_RESULTS_MESSAGES:"Messages",SEARCH_RESULTS_SHOW_MORE:"Show more",CHAT_NOT_FOUND:"Conversation not found",DELETE_MESSAGE:"Delete message",DELETION_EXPLANATION:"If you delete this message, it will disappear for everybody.",EDIT_MESSAGE:"Edit message",SAVE:"Save",EDITED_INDICATOR:"edited",REPLY_TO_MESSAGE:"Reply",ADD_REACTION:"Add reaction",AUTH_EXPIRED_OVERLAY_TITLE:"Your chat session has expired",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Refresh the page to continue",VOICE_MESSAGE:"Voice message",LEAVE_CONVERSATION:"Leave conversation",MARK_CONVERSATION_AS_UNREAD:"Mark as unread",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"hidden information",ARIA_LEAVE_SEARCH_MODE:"Leave search mode",ARIA_SEARCH_UP:"Search up",ARIA_SEARCH_DOWN:"Search down",ARIA_CLOSE_CHAT_POPUP:"Close the chat popup",ARIA_SEARCH_INSIDE_CONVERSATION:"Search inside this conversation",ARIA_SEARCH:"Search",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"set playback speed",ARIA_CANCEL_UPLOAD:"Cancel upload",ARIA_STOP_RECORDING:"Stop recording",ARIA_CANCEL_RECORDING:"Cancel recording",ARIA_INSERT_EMOJI:"Insert an emoji",ARIA_PLAY_AUDIO:"play audio",ARIA_PAUSE_AUDIO:"pause audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reactions with ${e}`,ARIA_MORE_ACTIONS:"More actions",ARIA_REPLYING_TO:(t,e)=>`Replying to ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Exit reply mode",SELECT_CONVERSATION:"Select a conversation"}},Cd={ar:{code:"ar",name:"Arabic",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ar.js",emojiDataUrl:null,translation:{YESTERDAY:"الأمس",TODAY:"اليوم",DAYS:"يوم",HOURS:"ساعة",MINUTES:"دقيقة",JUST_NOW:"فقط الآن",LOCATION:"الموقع",CANCEL:"إلغاء",INBOX:"علبة الوارد",DESKTOP_NOTIFICATIONS:"إشعارات المتصفح",DESKTOP_NOTIFICATIONS_ERROR:"لا يمكن تمكين إشعارات المتصفح لأن متصفحك يمنعها بشكل نشط. جرّب البحث في الإعدادات أو استخدام متصفح آخر.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`إعلام ${t} التجريبي`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"إذا أبقيت علامة تبويب المتصفح مفتوحة ، فسترى هذا ينبثق عندما يتحدث شخص معك.",SEND_BUTTON_TEXT:"إرسال",ENTRYBOX_TEXT_LIMIT:"يُسمح فقط بـ 10.000 حرف.",ENTRYBOX_PLACEHOLDER:"قل شيئًا ...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"هذه المحادثة لم تعد نشطة.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"يمكنك القراءة ، لكن لا يمكنك إرسال الرسائل.",MESSAGELIST_LOADING_OLDER:"جارٍ تحميل الرسائل القديمة ...",MESSAGELIST_SHOW_OLDER:"عرض الرسائل الأقدم",MESSAGELIST_NEW_MARKER:"جديد",MESSAGE_SENT_VIA_EMAIL:"تم إرسال هذه الرسالة عبر البريد الإلكتروني",YOU_MARKER:"أنت",UPLOAD_IN_PROGRESS:"جارٍ التحميل ...",UPLOAD_SEND_FILE:"إرسال ملف",UPLOAD_SHARE_LOCATION:"مشاركة الموقع",UPLOAD_ERROR:"حدث خطأ ما في تحميل شيء. ربما يكون الملف غير متوافق أو كبير جدًا.",SHARE_LOCATION_ERROR:"لا يمكن مشاركة الموقع:",LOADING:"جارٍ التحميل ...",HUB_EMPTY:"سوف يظهر سجل الدردشات هنا",HUB_SHOW_EARLIER:"إظهار الدردشات السابقة",INBOX_NO_CHATS_TITLE:"لا توجد دردشات بعد!",INBOX_NO_CHATS_BODY:"بمجرد أن يكون لديك واحد أو أكثر من المحادثات ، سوف تظهر هنا.",ENABLE_TRANSLATION:"ترجم هذه المحادثة إلى العربية",DISABLE_TRANSLATION:"إظهار الأصلي",SEARCH_PLACEHOLDER_TEXT:"...بحث",SEARCH_SEARCHING:"...يتم الآن البحث",SEARCH_NO_RESULTS:"لم يتم العثور على نتائج",SEARCH_NO_MORE_RESULTS:"لا يوجد المزيد من النتائج",SEARCH_RESULTS_CONVERSATIONS:"المحادثات",SEARCH_RESULTS_MESSAGES:"الرسائل",SEARCH_RESULTS_SHOW_MORE:"إظهار المزيد",CHAT_NOT_FOUND:"لم يتم العثور على الدردشة",DELETE_MESSAGE:"احذف الرسالة",DELETION_EXPLANATION:"إذا قمت بحذف هذه الرسالة، فهي ستختفي للجميع.",EDIT_MESSAGE:"تعديل الرسالة",SAVE:"حفظ",EDITED_INDICATOR:"معدّلة",REPLY_TO_MESSAGE:"رد",ADD_REACTION:"أضف تفاعلاً",AUTH_EXPIRED_OVERLAY_TITLE:"انتهت جلسة الدردشة المخصصة لك",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"يُرجى إعادة تحميل الصفحة للمتابعة",VOICE_MESSAGE:"رسالة صوتية",LEAVE_CONVERSATION:"الخروج من المحادثة",MARK_CONVERSATION_AS_UNREAD:"وضع علامة غير مقروءة",STATUS_INDICATOR_ONLINE:"نشط",STATUS_INDICATOR_OFFLINE:"بعيد",CONTACT_INFORMATION_HIDDEN:"المعلومات المخفية",ARIA_LEAVE_SEARCH_MODE:"الخروج من وضع البحث",ARIA_SEARCH_UP:"البحث لأعلى",ARIA_SEARCH_DOWN:"البحث لأسفل",ARIA_CLOSE_CHAT_POPUP:"إغلاق نافذة الدردشة",ARIA_SEARCH_INSIDE_CONVERSATION:"البحث داخل هذه المحادثة",ARIA_SEARCH:"بحث",ARIA_CHAT:"دردشة",ARIA_SET_PLAYBACK_SPEED:"تعيين سرعة التشغيل",ARIA_CANCEL_UPLOAD:"إلغاء الرفع",ARIA_STOP_RECORDING:"إيقاف التسجيل",ARIA_CANCEL_RECORDING:"إلغاء التسجيل",ARIA_INSERT_EMOJI:"إدراج رمز تعبيري",ARIA_PLAY_AUDIO:"تشغيل الصوت",ARIA_PAUSE_AUDIO:"إيقاف الصوت مؤقتاً",ARIA_REACTION_COUNT:(t,e)=>`${t} تفاعل مع ${e}`,ARIA_MORE_ACTIONS:"المزيد من الإجراءات",ARIA_REPLYING_TO:(t,e)=>`الرد على ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"الخروج من وضع الرد",SELECT_CONVERSATION:"حدد محادثة"}},bg:{code:"bg-BG",name:"Bulgarian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Вчера",TODAY:"Днес",DAYS:"Ден",HOURS:"Час",MINUTES:"m",JUST_NOW:"Току-що",LOCATION:"местоположението",CANCEL:"Откажи",INBOX:"Кутия",DESKTOP_NOTIFICATIONS:"Известия на браузъра",DESKTOP_NOTIFICATIONS_ERROR:"Не можете да активирате известията на браузъра, защото браузърът ви ги блокира активно. Опитайте да погледнете в настройките или да използвате друг браузър.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} демо известие`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ако държите раздела на браузъра си отворен, ще видите този изскачащ прозорец, когато някой говори с вас.",SEND_BUTTON_TEXT:"Изпрати",ENTRYBOX_TEXT_LIMIT:"Разрешени са само до 10.000 знака.",ENTRYBOX_PLACEHOLDER:"Кажете нещо...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Този разговор вече не е активен.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Можете да четете, но не и да изпращате съобщения.",MESSAGELIST_LOADING_OLDER:"Зареждане на по-стари съобщения...",MESSAGELIST_SHOW_OLDER:"Показване на по-стари съобщения",MESSAGELIST_NEW_MARKER:"Нови",MESSAGE_SENT_VIA_EMAIL:"Това съобщение беше изпратено по имейл",YOU_MARKER:"Вие",UPLOAD_IN_PROGRESS:"Качване...",UPLOAD_SEND_FILE:"Изпращане на файл",UPLOAD_SHARE_LOCATION:"Споделяне на местоположението",UPLOAD_ERROR:"За съжаление нещо се обърка при качването. Файлът може да не се поддържа или е твърде голям.",SHARE_LOCATION_ERROR:"Не може да се сподели местоположението: ",LOADING:"Зареждане...",HUB_EMPTY:"Историята на вашите разговори ще се покаже тук",HUB_SHOW_EARLIER:"Показване на по-ранни чатове",INBOX_NO_CHATS_TITLE:"Все още нямате разговори!",INBOX_NO_CHATS_BODY:"След като проведете един или повече разговори, те ще се покажат тук.",ENABLE_TRANSLATION:"Преведете този разговор на български",DISABLE_TRANSLATION:"Показване на оригинал",SEARCH_PLACEHOLDER_TEXT:"Търсене...",SEARCH_SEARCHING:"Търсене...",SEARCH_NO_RESULTS:"Няма намерени резултати",SEARCH_NO_MORE_RESULTS:"Няма повече резултати",SEARCH_RESULTS_CONVERSATIONS:"Разговори",SEARCH_RESULTS_MESSAGES:"Съобщения",SEARCH_RESULTS_SHOW_MORE:"Покажи повече",CHAT_NOT_FOUND:"Чатът не е намерен",DELETE_MESSAGE:"Изтриване на съобщение",DELETION_EXPLANATION:"Ако изтриете това съобщение, то ще изчезне за всички.",EDIT_MESSAGE:"Редактиране на съобщението",SAVE:"Запиши",EDITED_INDICATOR:"редактирано",REPLY_TO_MESSAGE:"Отговори",ADD_REACTION:"Добави реакция",AUTH_EXPIRED_OVERLAY_TITLE:"Вашата чат сесия е изтекла",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Обновете страницата, за да продължите",VOICE_MESSAGE:"Гласово съобщение",CONTACT_INFORMATION_HIDDEN:"Скрита информация",LEAVE_CONVERSATION:"Напускане на разговора",MARK_CONVERSATION_AS_UNREAD:"Маркирай като непрочетено",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Отсъстващ",ARIA_LEAVE_SEARCH_MODE:"Напусни режим на търсене",ARIA_SEARCH_UP:"Търси нагоре",ARIA_SEARCH_DOWN:"Търси надолу",ARIA_CLOSE_CHAT_POPUP:"Затвори прозореца за чат",ARIA_SEARCH_INSIDE_CONVERSATION:"Търси в този разговор",ARIA_SEARCH:"Търсене",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"задай скорост на възпроизвеждане",ARIA_CANCEL_UPLOAD:"Отмени качване",ARIA_STOP_RECORDING:"Спри запис",ARIA_CANCEL_RECORDING:"Отмени запис",ARIA_INSERT_EMOJI:"Вмъкни emoji",ARIA_PLAY_AUDIO:"възпроизведи аудио",ARIA_PAUSE_AUDIO:"паузирай аудио",ARIA_REACTION_COUNT:(t,e)=>`${t} реакции с ${e}`,ARIA_MORE_ACTIONS:"Още действия",ARIA_REPLYING_TO:(t,e)=>`Отговор на ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Излизане от режим на отговор",SELECT_CONVERSATION:"Изберете разговор"}},bs:{code:"bs-BA",name:"Bosnian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika se ne mogu omogućiti jer ih vaš preglednik aktivno blokira. Pokušajte pregledati postavke ili koristiti drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu preglednika ostavite otvorenu, pojavit će se ovaj pop-up kada netko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Reci nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možeš čitati, ali ne i slati poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana e-poštom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podijeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podijeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovdje će se prikazati vaša povijest razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovdje.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na bosanski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",SEARCH_RESULTS_CONVERSATIONS:"Razgovori",SEARCH_RESULTS_MESSAGES:"Poruke",SEARCH_RESULTS_SHOW_MORE:"Prikaži više",CHAT_NOT_FOUND:"Ćaskanje nije pronađeno",DELETE_MESSAGE:"Obriši poruku",DELETION_EXPLANATION:"Ako izbrišete ovu poruku, ona će nestati za sve.",EDIT_MESSAGE:"Uredi poruku",SAVE:"Sačuvati",EDITED_INDICATOR:"uređeno",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodajte reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša chat sesija je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvježite stranicu da nastavite",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Skrivene informacije",LEAVE_CONVERSATION:"Napusti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitano",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretrage",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor chata",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcija s ${e}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(t,e)=>`Odgovaranje korisniku ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja",SELECT_CONVERSATION:"Odaberite razgovor"}},ca:{code:"ca-ES",name:"Catalan (ES)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ahir",TODAY:"Avui",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"ara mateix",LOCATION:"Ubicació",CANCEL:"Cancel·lar",INBOX:"Safata d'entrada",DESKTOP_NOTIFICATIONS:"Notificacions d'escriptori",DESKTOP_NOTIFICATIONS_ERROR:"No es poden habilitar les notificacions del navegador perquè el teu navegador les bloqueja activament. Prova de buscar a la configuració o utilitza un altre navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Notificació de demostració de ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si mantens la pestanya del navegador oberta, veuràs aquesta notificació quan algú et parli.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Només es permeten 10.000 caràcters.",ENTRYBOX_PLACEHOLDER:"Digues alguna cosa...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Aquesta conversa ja no està activa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Pots llegir, però no enviar missatges.",MESSAGELIST_LOADING_OLDER:"Carregant missatges antics...",MESSAGELIST_SHOW_OLDER:"Mostrar missatges més antics",MESSAGELIST_NEW_MARKER:"Nou",MESSAGE_SENT_VIA_EMAIL:"Aquest missatge s'ha enviat per correu electrònic",YOU_MARKER:"tu",UPLOAD_IN_PROGRESS:"S'està pujant...",UPLOAD_SEND_FILE:"Enviar arxiu",UPLOAD_SHARE_LOCATION:"Compartir ubicació",UPLOAD_ERROR:"Desafortunadament, alguna cosa ha anat malament en pujar. L'arxiu pot ser no compatible o massa gran.",SHARE_LOCATION_ERROR:"No es pot compartir la ubicació: ",LOADING:"Carregant...",HUB_EMPTY:"El teu historial de xat apareixerà aquí",HUB_SHOW_EARLIER:"Mostra xats anteriors",INBOX_NO_CHATS_TITLE:"Encara no hi ha xats!",INBOX_NO_CHATS_BODY:"Un cop hagis tingut una o més converses, apareixeran aquí.",ENABLE_TRANSLATION:"Traduir aquesta conversa al català",DISABLE_TRANSLATION:"Mostrar original",SEARCH_PLACEHOLDER_TEXT:"Cerca...",SEARCH_SEARCHING:"Buscant...",SEARCH_NO_RESULTS:"No s'han trobat resultats",SEARCH_NO_MORE_RESULTS:"No hi ha més resultats",SEARCH_RESULTS_CONVERSATIONS:"Converses",SEARCH_RESULTS_MESSAGES:"Missatges",SEARCH_RESULTS_SHOW_MORE:"Mostrar més",CHAT_NOT_FOUND:"Xat no trobat",DELETE_MESSAGE:"Esborrar missatge",DELETION_EXPLANATION:"Si esborres aquest missatge, desapareixerà per a tothom.",EDIT_MESSAGE:"Editar missatge",SAVE:"Desar",EDITED_INDICATOR:"editat",REPLY_TO_MESSAGE:"Respondre",ADD_REACTION:"Afegir reacció",VOICE_MESSAGE:"Missatge de veu",LEAVE_CONVERSATION:"Abandonar la conversa",MARK_CONVERSATION_AS_UNREAD:"marcar com no llegit",STATUS_INDICATOR_ONLINE:"Actiu",STATUS_INDICATOR_OFFLINE:"Absent",CONTACT_INFORMATION_HIDDEN:"informació oculta",AUTH_EXPIRED_OVERLAY_TITLE:"La teva sessió de xat ha caducat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualitza la pàgina per continuar",ARIA_LEAVE_SEARCH_MODE:"Sortir del mode de cerca",ARIA_SEARCH_UP:"Cercar cap amunt",ARIA_SEARCH_DOWN:"Cercar cap avall",ARIA_CLOSE_CHAT_POPUP:"Tancar la finestra de xat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cercar en aquesta conversa",ARIA_SEARCH:"Cercar",ARIA_CHAT:"Xat",ARIA_SET_PLAYBACK_SPEED:"establir velocitat de reproducció",ARIA_CANCEL_UPLOAD:"Cancel·lar la càrrega",ARIA_STOP_RECORDING:"Aturar l'enregistrament",ARIA_CANCEL_RECORDING:"Cancel·lar l'enregistrament",ARIA_INSERT_EMOJI:"Inserir un emoji",ARIA_PLAY_AUDIO:"reproduir àudio",ARIA_PAUSE_AUDIO:"pausar àudio",ARIA_REACTION_COUNT:(t,e)=>`${t} reaccions amb ${e}`,ARIA_MORE_ACTIONS:"Més accions",ARIA_REPLYING_TO:(t,e)=>`Responent a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sortir del mode de resposta",SELECT_CONVERSATION:"Selecciona una conversa"}},cs:{code:"cs-CZ",name:"Czech",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Včera",TODAY:"Dnes",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"právě teď",LOCATION:"Lokace",CANCEL:"Zrušit",INBOX:"Doručené",DESKTOP_NOTIFICATIONS:"Oznámení v prohlížeči",DESKTOP_NOTIFICATIONS_ERROR:"Nelze povolit notifikace prohlížeče, protože váš prohlížeč je aktivně blokuje. Zkuste se podívat na nastavení nebo zkuste použít jiný prohlížeč.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikace`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Pokud necháte kartu prohlížeče otevřenou, uvidíte tento popup jakmile s vámi bude někdo mluvit.",SEND_BUTTON_TEXT:"Odeslat",ENTRYBOX_TEXT_LIMIT:"Je povoleno Maximálně 10.000 znaků.",ENTRYBOX_PLACEHOLDER:"Napište něco...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Tato konverzace již není aktivní.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Můžete číst, ale nemůžete posílat zprávy.",MESSAGELIST_LOADING_OLDER:"Nahrávám starší zprávy...",MESSAGELIST_SHOW_OLDER:"Zobrazit starší zprávy",MESSAGELIST_NEW_MARKER:"Nové",MESSAGE_SENT_VIA_EMAIL:"Tato zpráva byla odeslána přes mail.",YOU_MARKER:"vy",UPLOAD_IN_PROGRESS:"Nahrávám...",UPLOAD_SEND_FILE:"Poslat soubor",UPLOAD_SHARE_LOCATION:"Sdílet pozici",UPLOAD_ERROR:"Nepodařilo se nahrát soubor. Ten je buď nepodporován a/nebo příliš velký.",SHARE_LOCATION_ERROR:"Není možné sdílet pozici: ",LOADING:"Nahrávám...",HUB_EMPTY:"Vaše historie se zde zobrazí",HUB_SHOW_EARLIER:"Zobrazit dřívější konverzace",INBOX_NO_CHATS_TITLE:"Zatím zde nejsou žádné konverzace!",INBOX_NO_CHATS_BODY:"Jakmile budete mít jednu nebo více konverzací, objeví se zde.",ENABLE_TRANSLATION:"Přeložit tuto konverzaci do češtiny",DISABLE_TRANSLATION:"Zobrazit původní",SEARCH_PLACEHOLDER_TEXT:"Hledat...",SEARCH_SEARCHING:"Hledání...",SEARCH_NO_RESULTS:"Nenašly se žádné výsledky",SEARCH_NO_MORE_RESULTS:"Žádné další výsledky",SEARCH_RESULTS_CONVERSATIONS:"Konverzace",SEARCH_RESULTS_MESSAGES:"Zprávy",SEARCH_RESULTS_SHOW_MORE:"Zobrazit více",CHAT_NOT_FOUND:"Chat nenalezen",DELETE_MESSAGE:"Smazat zprávu",DELETION_EXPLANATION:"Pokud tuto zprávu smažete, zmizí pro všechny.",EDIT_MESSAGE:"Upravit zprávu",SAVE:"Uložit",EDITED_INDICATOR:"upraveno",REPLY_TO_MESSAGE:"Odpovědět",ADD_REACTION:"Reagovat",AUTH_EXPIRED_OVERLAY_TITLE:"Váš chat byl kvůli nečinnosti odpojen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Pro pokračování obnovte stránku",VOICE_MESSAGE:"Hlasová zpráva",CONTACT_INFORMATION_HIDDEN:"Skrytá informace",LEAVE_CONVERSATION:"Opustit konverzaci",MARK_CONVERSATION_AS_UNREAD:"Označit jako nepřečtené",STATUS_INDICATOR_ONLINE:"Aktivní",STATUS_INDICATOR_OFFLINE:"Nedostupný",ARIA_LEAVE_SEARCH_MODE:"Opustit režim vyhledávání",ARIA_SEARCH_UP:"Hledat nahoru",ARIA_SEARCH_DOWN:"Hledat dolů",ARIA_CLOSE_CHAT_POPUP:"Zavřít okno chatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Hledat v této konverzaci",ARIA_SEARCH:"Hledat",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"nastavit rychlost přehrávání",ARIA_CANCEL_UPLOAD:"Zrušit nahrávání",ARIA_STOP_RECORDING:"Zastavit nahrávání",ARIA_CANCEL_RECORDING:"Zrušit nahrávání",ARIA_INSERT_EMOJI:"Vložit emoji",ARIA_PLAY_AUDIO:"přehrát audio",ARIA_PAUSE_AUDIO:"pozastavit audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcí s ${e}`,ARIA_MORE_ACTIONS:"Další akce",ARIA_REPLYING_TO:(t,e)=>`Odpověď na ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Opustit režim odpovědi",SELECT_CONVERSATION:"Vyberte konverzaci"}},da:{code:"da-DK",name:"Danish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/da/emojibase/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"t",MINUTES:"m",JUST_NOW:"lige nu",LOCATION:"Placering",CANCEL:"Annuller",INBOX:"Indbakke",DESKTOP_NOTIFICATIONS:"Browsermeddelelser",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Browsermeddelelser, fordi din browser aktivt blokerer dem. Prøv at kigge i indstillingerne eller benyt en anden browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demomeddelelse`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Hvis du holder dit browser-faneblad åben, vil du se det her komme op, når nogen taler til dig.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Kun 10.000 tegn er tilladt.",ENTRYBOX_PLACEHOLDER:"Sig noget...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Denne samtale er ikke længere aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan læse, men ikke sende beskeder.",MESSAGELIST_LOADING_OLDER:"Indlæser ældre beskeder...",MESSAGELIST_SHOW_OLDER:"Vis ældre beskeder",MESSAGELIST_NEW_MARKER:"Ny",MESSAGE_SENT_VIA_EMAIL:"Denne besked blev sendt via e-mail",YOU_MARKER:"dig",UPLOAD_IN_PROGRESS:"Overfører...",UPLOAD_SEND_FILE:"Send fil",UPLOAD_SHARE_LOCATION:"Del placering",UPLOAD_ERROR:"Der er sket noget forkert ved upload. Filen kan ikke understøttes eller filen er for stor.",SHARE_LOCATION_ERROR:"Kan ikke dele placering: ",LOADING:"Indlæser...",HUB_EMPTY:"Dine samtaler vises her",HUB_SHOW_EARLIER:"Vis tidligere chats",INBOX_NO_CHATS_TITLE:"Ingen chats endnu!",INBOX_NO_CHATS_BODY:"Når du har haft en eller flere samtaler, vises de her.",ENABLE_TRANSLATION:"Oversæt denne konversation til dansk",DISABLE_TRANSLATION:"Vis den oprindelige",SEARCH_PLACEHOLDER_TEXT:"Søg...",SEARCH_SEARCHING:"Søger...",SEARCH_NO_RESULTS:"Ingen resultater fundet",SEARCH_NO_MORE_RESULTS:"Ikke flere resultater",SEARCH_RESULTS_CONVERSATIONS:"Samtaler",SEARCH_RESULTS_MESSAGES:"Beskeder",SEARCH_RESULTS_SHOW_MORE:"Vis mere",CHAT_NOT_FOUND:"Chat ikke fundet",DELETE_MESSAGE:"Slet besked",DELETION_EXPLANATION:"Hvis du sletter denne besked, vil ingen kunne se den.",EDIT_MESSAGE:"Rediger besked",SAVE:"Gem",EDITED_INDICATOR:"redigeret",REPLY_TO_MESSAGE:"Svar",ADD_REACTION:"Tilføj reaktion",AUTH_EXPIRED_OVERLAY_TITLE:"Din chatsession er udløbet",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Opdater siden for at fortsætte",VOICE_MESSAGE:"Talebesked",CONTACT_INFORMATION_HIDDEN:"Skjulte oplysninger",LEAVE_CONVERSATION:"Forlad samtale",MARK_CONVERSATION_AS_UNREAD:"Marker som ulæst",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Forlad søgemodus",ARIA_SEARCH_UP:"Søg opad",ARIA_SEARCH_DOWN:"Søg nedad",ARIA_CLOSE_CHAT_POPUP:"Luk chatvindue",ARIA_SEARCH_INSIDE_CONVERSATION:"Søg i denne samtale",ARIA_SEARCH:"Søg",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Indstil afspilningshastighed",ARIA_CANCEL_UPLOAD:"Annuller upload",ARIA_STOP_RECORDING:"Stop optagelse",ARIA_CANCEL_RECORDING:"Annuller optagelse",ARIA_INSERT_EMOJI:"Indsæt en emoji",ARIA_PLAY_AUDIO:"Afspil lyd",ARIA_PAUSE_AUDIO:"Pauser lyd",ARIA_REACTION_COUNT:(t,e)=>`${t} Reaktioner med ${e}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(t,e)=>`Svarer til ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Forlad svarstilstand",SELECT_CONVERSATION:"Vælg en samtale"}},de:{code:"de-DE",name:"German",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/de.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/de/cldr/data.json",translation:{YESTERDAY:"Gestern",TODAY:"Heute",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"gerade jetzt",LOCATION:"Standort",CANCEL:"Abbrechen",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser-Benachrichtigungen",DESKTOP_NOTIFICATIONS_ERROR:"Browser-Benachrichtigungen können nicht aktiviert werden, da Ihr Browser sie aktiv blockiert. Versuchen Sie, in den Einstellungen nachzuschlagen oder einen anderen Browser zu verwenden.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} Demo-Benachrichtigung`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Wenn Sie Ihre Browser-Registerkarte geöffnet lassen, wird dies angezeigt, wenn jemand mit Ihnen spricht.",SEND_BUTTON_TEXT:"Senden",ENTRYBOX_TEXT_LIMIT:"Nur 10.000 Zeichen sind erlaubt.",ENTRYBOX_PLACEHOLDER:"Sag etwas...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Diese Konversation ist nicht mehr aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Sie können Nachrichten lesen, aber nicht senden.",MESSAGELIST_LOADING_OLDER:"Ältere Nachrichten werden geladen...",MESSAGELIST_SHOW_OLDER:"Zeige ältere Nachrichten",MESSAGELIST_NEW_MARKER:"Neu",MESSAGE_SENT_VIA_EMAIL:"Diese Nachricht wurde per E-Mail gesendet",YOU_MARKER:"du",UPLOAD_IN_PROGRESS:"Hochladen...",UPLOAD_SEND_FILE:"Datei senden",UPLOAD_SHARE_LOCATION:"Standort teilen",UPLOAD_ERROR:"Beim Hochladen ist ein Fehler aufgetreten. Die Datei ist möglicherweise nicht unterstützt oder zu groß.",SHARE_LOCATION_ERROR:"Standort kann nicht freigegeben werden: ",LOADING:"Laden...",HUB_EMPTY:"Ihr Chat-Verlauf wird hier angezeigt",HUB_SHOW_EARLIER:"Zeige frühere Chats",INBOX_NO_CHATS_TITLE:"Noch keine Chats!",INBOX_NO_CHATS_BODY:"Sobald Sie eine oder mehrere Unterhaltungen geführt haben, werden sie hier angezeigt.",ENABLE_TRANSLATION:"Dieses Gespräch auf Deutsch übersetzen",DISABLE_TRANSLATION:"Originaltext anzeigen",SEARCH_PLACEHOLDER_TEXT:"Suche...",SEARCH_SEARCHING:"Suchen...",SEARCH_NO_RESULTS:"Keine Suchergebnisse gefunden",SEARCH_NO_MORE_RESULTS:"Keine weiteren Suchergebnisse",SEARCH_RESULTS_CONVERSATIONS:"Unterhaltungen",SEARCH_RESULTS_MESSAGES:"Nachrichten",SEARCH_RESULTS_SHOW_MORE:"Mehr anzeigen",CHAT_NOT_FOUND:"Chat nicht gefunden",DELETE_MESSAGE:"Nachricht löschen",DELETION_EXPLANATION:"Wenn Sie diese Nachricht löschen, wird sie für alle verschwinden.",EDIT_MESSAGE:"Nachricht bearbeiten",SAVE:"Speichern",EDITED_INDICATOR:"bearbeitet",REPLY_TO_MESSAGE:"Antworten",ADD_REACTION:"Reaktion hinzufügen",AUTH_EXPIRED_OVERLAY_TITLE:"Ihre Chatsitzung ist abgelaufen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Laden Sie zum Fortfahren die Seite neu",VOICE_MESSAGE:"Sprachnachricht",CONTACT_INFORMATION_HIDDEN:"Geschützte Angaben",LEAVE_CONVERSATION:"Unterhaltung verlassen",MARK_CONVERSATION_AS_UNREAD:"als ungelesen markieren",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Abwesend",ARIA_LEAVE_SEARCH_MODE:"Suchmodus verlassen",ARIA_SEARCH_UP:"Nach oben suchen",ARIA_SEARCH_DOWN:"Nach unten suchen",ARIA_CLOSE_CHAT_POPUP:"Chat-Popup schließen",ARIA_SEARCH_INSIDE_CONVERSATION:"In dieser Unterhaltung suchen",ARIA_SEARCH:"Suchen",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Wiedergabegeschwindigkeit einstellen",ARIA_CANCEL_UPLOAD:"Upload abbrechen",ARIA_STOP_RECORDING:"Aufnahme stoppen",ARIA_CANCEL_RECORDING:"Aufnahme abbrechen",ARIA_INSERT_EMOJI:"Emoji einfügen",ARIA_PLAY_AUDIO:"Audio abspielen",ARIA_PAUSE_AUDIO:"Audio pausieren",ARIA_REACTION_COUNT:(t,e)=>`${t} Reaktionen mit ${e}`,ARIA_MORE_ACTIONS:"Weitere Aktionen",ARIA_REPLYING_TO:(t,e)=>`Antworten an ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Antwortmodus verlassen",SELECT_CONVERSATION:"Unterhaltung auswählen"}},el:{code:"el-GR",name:"Greek (Greece)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Χθές",TODAY:"Σήμερα",DAYS:"Ημέρες",HOURS:"'Ωρες",MINUTES:"Λεπτά",JUST_NOW:"Μόλις τώρα",LOCATION:"Τοποθεσία",CANCEL:"Ακύρωση",INBOX:"Εισερχόμενα",DESKTOP_NOTIFICATIONS:"Ειδοποιήσεις περιηγητή",DESKTOP_NOTIFICATIONS_ERROR:"Δεν είναι δυνατή η ενεργοποίηση των ειδοποιήσεων του προγράμματος περιήγησης, επειδή το πρόγραμμα περιήγησης τις αποκλείει ενεργά. Δοκιμάστε να τσεκάρετε τις ρυθμίσεις ή να χρησιμοποιήσετε διαφορετικό πρόγραμμα περιήγησης.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} Δοκιμαστική επίδειξη`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Αν διατηρήσετε ανοιχτή τη σελίδα του προγράμματος περιήγησης, θα δείτε αυτό το pop up (παράθυρο) όταν κάποιος σας μιλάει.",SEND_BUTTON_TEXT:"Αποστολή",ENTRYBOX_TEXT_LIMIT:"Επιτρέπονται μόνο 10.000 χαρακτήρες.",ENTRYBOX_PLACEHOLDER:"Πείτε κάτι...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Αυτή η συζήτηση δεν είναι πλέον ενεργή.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Μπορείτε να διαβάσετε αλλά δεν μπορείτε να στείλετε μηνύματα.",MESSAGELIST_LOADING_OLDER:"Φόρτωση παλαιοτέρων μηνυμάτων...",MESSAGELIST_SHOW_OLDER:"Εμφάνιση παλαιότερων μηνυμάτων",MESSAGELIST_NEW_MARKER:"Νέο",MESSAGE_SENT_VIA_EMAIL:"Αυτό το μήνυμα εστάλη μέσω ηλεκτρονικού ταχυδρομείου",YOU_MARKER:"Εσείς",UPLOAD_IN_PROGRESS:"Ανέβασμα...",UPLOAD_SEND_FILE:"Αποστολή αρχείου",UPLOAD_SHARE_LOCATION:"Κοινή χρήση τοποθεσίας",UPLOAD_ERROR:"Κάτι πήγε στραβά κατά τη φόρτωση. Το αρχείο ενδέχεται να μην υποστηρίζεται ή να είναι υπερβολικά μεγάλο.",SHARE_LOCATION_ERROR:"Δεν είναι δυνατή η χρήση κοινής τοποθεσίας: ",LOADING:"Φόρτωση...",HUB_EMPTY:"Το ιστορικό των συνομιλιών σας θα εμφανιστεί εδώ",HUB_SHOW_EARLIER:"Εμφάνιση προηγούμενων συνομιλιών",INBOX_NO_CHATS_TITLE:"Δεν υπάρχουν ακόμα συζητήσεις!",INBOX_NO_CHATS_BODY:"Μόλις έχετε μία ή περισσότερες συνομιλίες, θα εμφανιστούν εδώ.",ENABLE_TRANSLATION:"Μετάφραση αυτής της συνομιλίας στα ελληνικά",DISABLE_TRANSLATION:"Προβολή πρωτοτύπου",SEARCH_PLACEHOLDER_TEXT:"Αναζήτηση...",SEARCH_SEARCHING:"Αναζήτηση...",SEARCH_NO_RESULTS:"Δεν βρέθηκαν αποτελέσματα",SEARCH_NO_MORE_RESULTS:"Δεν υπάρχουν περισσότερα αποτελέσματα",SEARCH_RESULTS_CONVERSATIONS:"Συνομιλίες",SEARCH_RESULTS_MESSAGES:"Μηνύματα",SEARCH_RESULTS_SHOW_MORE:"Εμφάνιση περισσότερων",CHAT_NOT_FOUND:"Η συνομιλία δεν βρέθηκε",DELETE_MESSAGE:"Διαγραφή μηνύματος",DELETION_EXPLANATION:"Εάν διαγράψετε αυτό το μήνυμα, θα εξαφανιστεί για όλους.",EDIT_MESSAGE:"Επεξεργασία μηνύματος",SAVE:"Αποθήκευση",EDITED_INDICATOR:"επεξεργασμένο",REPLY_TO_MESSAGE:"Απάντηση",ADD_REACTION:"Προσθήκη αντίδρασης",AUTH_EXPIRED_OVERLAY_TITLE:"Η συνεδρία της συνομιλίας σας έχει λήξει",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Ανανεώστε τη σελίδα για να συνεχίσετε",VOICE_MESSAGE:"Ηχητικό μήνυμα",CONTACT_INFORMATION_HIDDEN:"Κρυμμένες πληροφορίες",LEAVE_CONVERSATION:"Αποσυρθείτε από τη συζήτηση",MARK_CONVERSATION_AS_UNREAD:"Επισήμανση ως μη αναγνωσμένα",STATUS_INDICATOR_ONLINE:"Ενεργός",STATUS_INDICATOR_OFFLINE:"Ανενεργός",ARIA_LEAVE_SEARCH_MODE:"Αποχώρηση από τη λειτουργία αναζήτησης",ARIA_SEARCH_UP:"Αναζήτηση προς τα πάνω",ARIA_SEARCH_DOWN:"Αναζήτηση προς τα κάτω",ARIA_CLOSE_CHAT_POPUP:"Κλείσιμο παραθύρου συνομιλίας",ARIA_SEARCH_INSIDE_CONVERSATION:"Αναζήτηση σε αυτή τη συνομιλία",ARIA_SEARCH:"Αναζήτηση",ARIA_CHAT:"Συνομιλία",ARIA_SET_PLAYBACK_SPEED:"ορισμός ταχύτητας αναπαραγωγής",ARIA_CANCEL_UPLOAD:"Ακύρωση φόρτωσης",ARIA_STOP_RECORDING:"Διακοπή εγγραφής",ARIA_CANCEL_RECORDING:"Ακύρωση εγγραφής",ARIA_INSERT_EMOJI:"Εισαγωγή emoji",ARIA_PLAY_AUDIO:"αναπαραγωγή ήχου",ARIA_PAUSE_AUDIO:"παύση ήχου",ARIA_REACTION_COUNT:(t,e)=>`${t} αντιδράσεις με ${e}`,ARIA_MORE_ACTIONS:"Περισσότερες ενέργειες",ARIA_REPLYING_TO:(t,e)=>`Απάντηση στον ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Έξοδος από τη λειτουργία απάντησης",SELECT_CONVERSATION:"Επιλέξτε μια συζήτηση"}},en:jr,es:{code:"es-ES",name:"Spanish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/es.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/es/cldr/data.json",translation:{YESTERDAY:"Ayer",TODAY:"Hoy",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"justo ahora",LOCATION:"Ubicación",CANCEL:"Cancelar",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificaciones del navigator",DESKTOP_NOTIFICATIONS_ERROR:"No se logró habilitar las notificaciones del navigador, comprueba que tu navegador no las esté bloqueando o intenta con otro navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} notificación de prueba`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si dejas esta pestaña abierta, verás este pop up cuando alguien te hable.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Sólo 10.000 caracteres permitidos.",ENTRYBOX_PLACEHOLDER:"Escribe algo...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Esta conversación ya no está activa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puedes leer pero no enviar mensajes.",MESSAGELIST_LOADING_OLDER:"Cargando mensajes pasados...",MESSAGELIST_SHOW_OLDER:"Ver mensajes pasados",MESSAGELIST_NEW_MARKER:"Nuevo",MESSAGE_SENT_VIA_EMAIL:"Este mensaje ha sido enviado vía email",YOU_MARKER:"tú",UPLOAD_IN_PROGRESS:"Subir...",UPLOAD_SEND_FILE:"Enviar archivo",UPLOAD_SHARE_LOCATION:"Compartir ubicación",UPLOAD_ERROR:"Ocurrió un problema subiendo el archivo. Puede que el archivo esté en un formato no soportado o que sea demasiado grande.",SHARE_LOCATION_ERROR:"No se logró compartir la ubicación: ",LOADING:"Cargando...",HUB_EMPTY:"Tu historial de conversaciones se mostrará aquí",HUB_SHOW_EARLIER:"Ver conversaciones pasadas",INBOX_NO_CHATS_TITLE:"¡Aún sin conversaciones!",INBOX_NO_CHATS_BODY:"Una vez que tengas una o más conversaciones, se mostrarán aquí.",ENABLE_TRANSLATION:"Traducir esta conversación al español",DISABLE_TRANSLATION:"Mostrar la conversación original",SEARCH_PLACEHOLDER_TEXT:"Buscar...",SEARCH_SEARCHING:"Buscando...",SEARCH_NO_RESULTS:"No se encontraron resultados",SEARCH_NO_MORE_RESULTS:"No hay más resultados",SEARCH_RESULTS_CONVERSATIONS:"Conversaciones",SEARCH_RESULTS_MESSAGES:"Mensajes",SEARCH_RESULTS_SHOW_MORE:"Mostrar más",CHAT_NOT_FOUND:"Chat no encontrado",DELETE_MESSAGE:"Eliminar mensaje",DELETION_EXPLANATION:"Este mensaje desaparecerá para todos si lo borras.",EDIT_MESSAGE:"Editar mensaje",SAVE:"Guardar",EDITED_INDICATOR:"editado",REPLY_TO_MESSAGE:"Responder",ADD_REACTION:"Añadir reacción",AUTH_EXPIRED_OVERLAY_TITLE:"Su sesión de chat ha expirado",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualice la página para continuar",VOICE_MESSAGE:"Mensaje de voz",CONTACT_INFORMATION_HIDDEN:"Información oculta",LEAVE_CONVERSATION:"Abandonar conversación",MARK_CONVERSATION_AS_UNREAD:"Marcar como no leída",STATUS_INDICATOR_ONLINE:"Activo",STATUS_INDICATOR_OFFLINE:"Ausente",ARIA_LEAVE_SEARCH_MODE:"Salir del modo búsqueda",ARIA_SEARCH_UP:"Buscar hacia arriba",ARIA_SEARCH_DOWN:"Buscar hacia abajo",ARIA_CLOSE_CHAT_POPUP:"Cerrar la ventana de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Buscar en esta conversación",ARIA_SEARCH:"Buscar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"establecer velocidad de reproducción",ARIA_CANCEL_UPLOAD:"Cancelar envío",ARIA_STOP_RECORDING:"Detener grabación",ARIA_CANCEL_RECORDING:"Cancelar grabación",ARIA_INSERT_EMOJI:"Insertar un emoji",ARIA_PLAY_AUDIO:"reproducir audio",ARIA_PAUSE_AUDIO:"pausar audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reacciones con ${e}`,ARIA_MORE_ACTIONS:"Más acciones",ARIA_REPLYING_TO:(t,e)=>`Respondiendo a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Salir del modo respuesta",SELECT_CONVERSATION:"Selecciona una conversación"}},et:{code:"et-EE",name:"Estonian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/et/cldr/data.json",translation:{YESTERDAY:"Eile",TODAY:"Täna",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"Just nüüd",LOCATION:"Asukoht",CANCEL:"Katkesta",INBOX:"Postkast",DESKTOP_NOTIFICATIONS:"Veebibrauseri teated",DESKTOP_NOTIFICATIONS_ERROR:"Töölaua teatisi ei saa lubada, kuna Teie brauser blokeerib need aktiivselt. Proovige muuta seadeid või kasutada mõnda muud brauserit.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo teavitus`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Kui hoiate oma brauseri vahekaardi lahti ja näete seda hüpikakent, siis keegi soovib Teiega rääkida.",SEND_BUTTON_TEXT:"Saada",ENTRYBOX_TEXT_LIMIT:"Ainult kuni 10.000 tähemärki on lubatud.",ENTRYBOX_PLACEHOLDER:"Kirjuta midagi...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"See vestlus ei ole enam aktiivne.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Sa saad lugeda teateid, aga mitte kirjutada.",MESSAGELIST_LOADING_OLDER:"Laen vanemaid teateid...",MESSAGELIST_SHOW_OLDER:"Näita vanemaid teateid",MESSAGELIST_NEW_MARKER:"Uus",MESSAGE_SENT_VIA_EMAIL:"See teade on saadetud e-postiga",YOU_MARKER:"Sina",UPLOAD_IN_PROGRESS:"Laen...",UPLOAD_SEND_FILE:"Saada fail",UPLOAD_SHARE_LOCATION:"Jaga faili asukohta",UPLOAD_ERROR:"Nüüd läks midagi nihu, seoses faili ülesse laadimisega. Tundmatu fail või liiga suur.",SHARE_LOCATION_ERROR:"Ei suuda jagada faili asukohta: ",LOADING:"Laen...",HUB_EMPTY:"Siin on Sinu vestluste ajalugu",HUB_SHOW_EARLIER:"Näita vanemaid vestlusi",INBOX_NO_CHATS_TITLE:"Pole ühtegi vestlust!",INBOX_NO_CHATS_BODY:"Kui Sul tekib üks või rohkem vestlust, siis on need kuvatakse siin.",ENABLE_TRANSLATION:"Tõlgi see vestlus eesti keelde",DISABLE_TRANSLATION:"Näita algteksti",SEARCH_PLACEHOLDER_TEXT:"Otsi...",SEARCH_SEARCHING:"Otsin...",SEARCH_NO_RESULTS:"Otsingu tulemused puuduvad",SEARCH_NO_MORE_RESULTS:"Rohkem tulemusi ei ole ",SEARCH_RESULTS_CONVERSATIONS:"Vestlused",SEARCH_RESULTS_MESSAGES:"Sõnumid",SEARCH_RESULTS_SHOW_MORE:"Näita rohkem",CHAT_NOT_FOUND:"Vestlust ei leitud",DELETE_MESSAGE:"Kustuta sõnum",DELETION_EXPLANATION:"Kui kustutate selle sõnumi, kaob see kõigi jaoks.",EDIT_MESSAGE:"Redigeeri sõnumit",SAVE:"Salvesta",EDITED_INDICATOR:"muudetud",REPLY_TO_MESSAGE:"Vasta",ADD_REACTION:"Lisa reaktsioon",AUTH_EXPIRED_OVERLAY_TITLE:"Teie vestlussessioon on lõppenud",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Jätkamiseks värskendage lehte",VOICE_MESSAGE:"Häälsõnum",CONTACT_INFORMATION_HIDDEN:"Varjatud informatsioon",LEAVE_CONVERSATION:"Lahku vestlusest",MARK_CONVERSATION_AS_UNREAD:"Märgi mitteloetuks",STATUS_INDICATOR_ONLINE:"Aktiivne",STATUS_INDICATOR_OFFLINE:"Eemal",ARIA_LEAVE_SEARCH_MODE:"Välju otsingurežiimist",ARIA_SEARCH_UP:"Otsi üles",ARIA_SEARCH_DOWN:"Otsi alla",ARIA_CLOSE_CHAT_POPUP:"Sulge vestluse aken",ARIA_SEARCH_INSIDE_CONVERSATION:"Otsi sellest vestlusest",ARIA_SEARCH:"Otsi",ARIA_CHAT:"Vestlus",ARIA_SET_PLAYBACK_SPEED:"määra taasesituse kiirus",ARIA_CANCEL_UPLOAD:"Tühista üleslaadimine",ARIA_STOP_RECORDING:"Peata salvestamine",ARIA_CANCEL_RECORDING:"Tühista salvestamine",ARIA_INSERT_EMOJI:"Sisesta emoji",ARIA_PLAY_AUDIO:"esita heli",ARIA_PAUSE_AUDIO:"pausi heli",ARIA_REACTION_COUNT:(t,e)=>`${t} reaktsiooni (${e})`,ARIA_MORE_ACTIONS:"Rohkem toiminguid",ARIA_REPLYING_TO:(t,e)=>`Vastamine kasutajale ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Välju vastamisrežiimist",SELECT_CONVERSATION:"Vali vestlus"}},fa:{code:"fa",name:"Persian (Farsi)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fa.js",emojiDataUrl:null,translation:{YESTERDAY:"دیروز",TODAY:"امروز",DAYS:"روز",HOURS:"ساعت",MINUTES:"دقیقه",JUST_NOW:"هم اکنون",LOCATION:"مکان",CANCEL:"لغو",INBOX:"صندوق",DESKTOP_NOTIFICATIONS:"اطلاعیههای مرورگر",DESKTOP_NOTIFICATIONS_ERROR:"خطا در فعال سازی اعلان های مرورگر، مرورگر شما آنها را مسدود می کند سعی کنید تنظیمات مرورگر را تغییر دهید یا از یک مرورگر دیگر استفاده کنید.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`نوتیفیکیشن دمو ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"اگر صفحه ی مرورگر را باز نگهدارید این را موقعه ای که کسی با شما صحبت کند خواهید دید",SEND_BUTTON_TEXT:"بفرست",ENTRYBOX_TEXT_LIMIT:"فقط ۱۰،۰۰۰ حروف مجاز می باشد.",ENTRYBOX_PLACEHOLDER:"...چیزی بنویسید",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:".این مکالمه دیگر فعال نمی باشد",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"شما می توانید بخوانید اما نمی توانید پیام بفرستید",MESSAGELIST_LOADING_OLDER:"...در حال بارگذاری پیام های قدیمی تر",MESSAGELIST_SHOW_OLDER:"نشان دادن پیام های قدیمی",MESSAGELIST_NEW_MARKER:"جدید",MESSAGE_SENT_VIA_EMAIL:"پیام توسط ایمل ارسال شد",YOU_MARKER:"شما",UPLOAD_IN_PROGRESS:"...در حال بارگذاری",UPLOAD_SEND_FILE:"فرستادن پوشه",UPLOAD_SHARE_LOCATION:"اشتراک گذاری مکان",UPLOAD_ERROR:"متاسفانه بارگذاری با مشکل روبه رو شد. ممکن است فایل حجیم باشد یا ساپورت نشده باشد.",SHARE_LOCATION_ERROR:"خطا در اشتراک گذاری مکان: ",LOADING:"...بارگذاری",HUB_EMPTY:"تاریخچه گفتگو اینجا نمایان می شود",HUB_SHOW_EARLIER:"دیدن گفتگو های قبلی",INBOX_NO_CHATS_TITLE:"هنوز گفتگویی وجود ندارد",INBOX_NO_CHATS_BODY:"بعد از داشتن یک مکالمه یا بیشتر، آنها اینجا نمایان می شوند.",ENABLE_TRANSLATION:"این مکالمه را به فارسی ترجمه کن",DISABLE_TRANSLATION:"زبان اصلی را نشان بده",SEARCH_PLACEHOLDER_TEXT:"...جستجو",SEARCH_SEARCHING:"...در حال جستجو",SEARCH_NO_RESULTS:"نتیجه ای یافت نشد",SEARCH_NO_MORE_RESULTS:"نتیجه بیشتری وجود ندارد",SEARCH_RESULTS_CONVERSATIONS:"گفتگوها",SEARCH_RESULTS_MESSAGES:"پیامها",SEARCH_RESULTS_SHOW_MORE:"نمایش بیشتر",CHAT_NOT_FOUND:"مکالمه پیدا نشد",DELETE_MESSAGE:"حذف پیام ",DELETION_EXPLANATION:"اگر این پیام را حذف کنید، برای همه ناپدید می شود.",EDIT_MESSAGE:"ویرایش پیام",SAVE:"ذخیره",EDITED_INDICATOR:"ویرایششده",REPLY_TO_MESSAGE:"پاسخ دادن",ADD_REACTION:"واکنش را اضافه کنید",AUTH_EXPIRED_OVERLAY_TITLE:"جلسه چت شما منقضی شده است",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"برای ادامه صفحه را بازخوانی کنید",VOICE_MESSAGE:"پیام صوتی",CONTACT_INFORMATION_HIDDEN:"اطلاعات پنهان",LEAVE_CONVERSATION:"خروج از گفتگو",MARK_CONVERSATION_AS_UNREAD:"به عنوان خوانده نشده علامت گذاری کن",STATUS_INDICATOR_ONLINE:"فعال",STATUS_INDICATOR_OFFLINE:"غایب",ARIA_LEAVE_SEARCH_MODE:"خروج از حالت جستجو",ARIA_SEARCH_UP:"جستجوی بالا",ARIA_SEARCH_DOWN:"جستجوی پایین",ARIA_CLOSE_CHAT_POPUP:"بستن پنجره چت",ARIA_SEARCH_INSIDE_CONVERSATION:"جستجو در این گفتگو",ARIA_SEARCH:"جستجو",ARIA_CHAT:"چت",ARIA_SET_PLAYBACK_SPEED:"تنظیم سرعت پخش",ARIA_CANCEL_UPLOAD:"لغو آپلود",ARIA_STOP_RECORDING:"توقف ضبط",ARIA_CANCEL_RECORDING:"لغو ضبط",ARIA_INSERT_EMOJI:"درج ایموجی",ARIA_PLAY_AUDIO:"پخش صدا",ARIA_PAUSE_AUDIO:"مکث صدا",ARIA_REACTION_COUNT:(t,e)=>`${t} واکنش با ${e}`,ARIA_MORE_ACTIONS:"اقدامات بیشتر",ARIA_REPLYING_TO:(t,e)=>`در حال پاسخ به ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"خروج از حالت پاسخ",SELECT_CONVERSATION:"یک گفتگو را انتخاب کنید"}},fi:{code:"fi-FI",name:"Finnish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fi/cldr/data.json",translation:{YESTERDAY:"Eilen",TODAY:"Tänään",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"juuri nyt",LOCATION:"Sijainti",CANCEL:"Peruuta",INBOX:"Saapuneet",DESKTOP_NOTIFICATIONS:"Selaimen ilmoitukset",DESKTOP_NOTIFICATIONS_ERROR:"Työpöydän ilmoituksia ei voitu kytkeä päälle, koska selaimesi estää ne aktiivisesti. Koeta tutkia sen asetuksia tai vaihda selainta.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo ilmoitus`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jos pidät tämän sivun auki, näet vastaavan ilmoituksen kun joku puhuu sinulle.",SEND_BUTTON_TEXT:"Lähetä",ENTRYBOX_TEXT_LIMIT:"Maksimissaan 10000 merkkiä.",ENTRYBOX_PLACEHOLDER:"Sano jotain...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Tämä keskustelu ei ole enää aktiivinen.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Voit lukea, mutta et lähettää viestejä.",MESSAGELIST_LOADING_OLDER:"Ladataan vanhoja viestejä..",MESSAGELIST_SHOW_OLDER:"Näytä vanhat viestit",MESSAGELIST_NEW_MARKER:"Uusi",MESSAGE_SENT_VIA_EMAIL:"Tämä viesti on lähetetty sähköpostin välityksellä",YOU_MARKER:"sinä",UPLOAD_IN_PROGRESS:"Ladataan...",UPLOAD_SEND_FILE:"Lähetä tiedosto",UPLOAD_SHARE_LOCATION:"Jaa sijainti",UPLOAD_ERROR:"Valitettavasti jokin meni vikaan. Tiedostotyyppiä ei ehkä tueta tai se saattaa olla liian suuri.",SHARE_LOCATION_ERROR:"Sijaintia ei pystytty jakamaan: ",LOADING:"Ladataan...",HUB_EMPTY:"Keskusteluhistoriasi näkyy tässä",HUB_SHOW_EARLIER:"Näytä aiemmat keskustelut",INBOX_NO_CHATS_TITLE:"Ei keskusteluja, vielä!",INBOX_NO_CHATS_BODY:"Kun olet käynyt yhden tai useamman keskustelun, ne näkyvät täällä.",ENABLE_TRANSLATION:"Käännä keskustelu kielelle suomi",DISABLE_TRANSLATION:"Näytä alkuperäinen",SEARCH_PLACEHOLDER_TEXT:"Etsi...",SEARCH_SEARCHING:"Etsiminen...",SEARCH_NO_RESULTS:"Tuloksia ei löytynyt",SEARCH_NO_MORE_RESULTS:"Ei enempää tuloksia",SEARCH_RESULTS_CONVERSATIONS:"Keskustelut",SEARCH_RESULTS_MESSAGES:"Viestit",SEARCH_RESULTS_SHOW_MORE:"Näytä enemmän",CHAT_NOT_FOUND:"Keskustelua ei löytynyt",DELETE_MESSAGE:"Poista viesti",DELETION_EXPLANATION:"Jos poistat tämän viestin, se häviää kaikilta.",EDIT_MESSAGE:"Muokkaa viestiä",SAVE:"Tallenna",EDITED_INDICATOR:"muokattu",REPLY_TO_MESSAGE:"Vastaa",ADD_REACTION:"Lisää reaktio",AUTH_EXPIRED_OVERLAY_TITLE:"Istuntosi on vanhentunut",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Päivitä sivu jatkaaksesi",VOICE_MESSAGE:"Ääniviesti",CONTACT_INFORMATION_HIDDEN:"Piilotetut tiedot",LEAVE_CONVERSATION:"Poistu keskustelusta",MARK_CONVERSATION_AS_UNREAD:"Merkitse lukemattomaksi",STATUS_INDICATOR_ONLINE:"Aktiivinen",STATUS_INDICATOR_OFFLINE:"Poissa",ARIA_LEAVE_SEARCH_MODE:"Poistu hakutilasta",ARIA_SEARCH_UP:"Hae ylöspäin",ARIA_SEARCH_DOWN:"Hae alaspäin",ARIA_CLOSE_CHAT_POPUP:"Sulje chat-ikkuna",ARIA_SEARCH_INSIDE_CONVERSATION:"Hae tästä keskustelusta",ARIA_SEARCH:"Hae",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"aseta toistonopeus",ARIA_CANCEL_UPLOAD:"Peruuta lähetys",ARIA_STOP_RECORDING:"Lopeta tallennus",ARIA_CANCEL_RECORDING:"Peruuta tallennus",ARIA_INSERT_EMOJI:"Lisää emoji",ARIA_PLAY_AUDIO:"toista ääni",ARIA_PAUSE_AUDIO:"keskeytä ääni",ARIA_REACTION_COUNT:(t,e)=>`${t} reaktiota (${e})`,ARIA_MORE_ACTIONS:"Lisää toimintoja",ARIA_REPLYING_TO:(t,e)=>`Vastataan käyttäjälle ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Poistu vastaustilasta",SELECT_CONVERSATION:"Valitse keskustelu"}},fr:{code:"fr-FR",name:"French",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fr.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fr/emojibase/data.json",translation:{YESTERDAY:"Hier",TODAY:"Aujourd'hui",DAYS:"j",HOURS:"h",MINUTES:"m",JUST_NOW:"maintenant",LOCATION:"Emplacement",CANCEL:"Annuler",INBOX:"Boîte de réception",DESKTOP_NOTIFICATIONS:"Notifications du navigateur",DESKTOP_NOTIFICATIONS_ERROR:"Impossible d'activer les notifications du navigateur car votre navigateur les bloque. Essayez de changer ses paramètres ou de changer de navigateur.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Notification de démonstration ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si vous maintenez l'onglet ouvert dans votre navigateur vous verrez apparaître une alerte lorsque quelqu'un vous parlera.",SEND_BUTTON_TEXT:"Envoyer",ENTRYBOX_TEXT_LIMIT:"Seuls 10.000 caractères sont autorisés.",ENTRYBOX_PLACEHOLDER:"Écrivez un message...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cette conversation n'est plus active.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Vous pouvez lire, mais pas envoyer de messages.",MESSAGELIST_LOADING_OLDER:"Chargement des anciens messages ...",MESSAGELIST_SHOW_OLDER:"Afficher les anciens messages",MESSAGELIST_NEW_MARKER:"Nouveau",MESSAGE_SENT_VIA_EMAIL:"Ce message a été envoyé par e-mail",YOU_MARKER:"vous",UPLOAD_IN_PROGRESS:"Envoi en cours...",UPLOAD_SEND_FILE:"Envoyer un fichier",UPLOAD_SHARE_LOCATION:"Partager mon emplacement",UPLOAD_ERROR:"Un problème est survenu lors de l'envoi: le fichier est peut-être non pris en charge ou trop volumineux.",SHARE_LOCATION_ERROR:"Impossible de partager votre emplacement: ",LOADING:"Chargement en cours...",HUB_EMPTY:"Votre historique de discussion apparaîtra ici",HUB_SHOW_EARLIER:"Afficher les conversations précédentes",INBOX_NO_CHATS_TITLE:"Aucune conversation pour l'instant!",INBOX_NO_CHATS_BODY:"Une fois que vous aurez eu une ou plusieurs conversations, elles apparaîtront ici.",ENABLE_TRANSLATION:"Traduire cette conversation en français",DISABLE_TRANSLATION:"Remontrer la conversation originale",SEARCH_PLACEHOLDER_TEXT:"Rechercher...",SEARCH_SEARCHING:"Recherche...",SEARCH_NO_RESULTS:"Aucun résultat trouvé",SEARCH_NO_MORE_RESULTS:"Il n’y a plus de résultats",SEARCH_RESULTS_CONVERSATIONS:"Conversations",SEARCH_RESULTS_MESSAGES:"Messages",SEARCH_RESULTS_SHOW_MORE:"Afficher plus",CHAT_NOT_FOUND:"Conversation introuvable",DELETE_MESSAGE:"Supprimer le message",DELETION_EXPLANATION:"Si vous supprimez ce message, il disparaîtra pour tout le monde.",EDIT_MESSAGE:"Modifier le message",SAVE:"Enregistrer",EDITED_INDICATOR:"modifié",REPLY_TO_MESSAGE:"Répondre",ADD_REACTION:"Ajouter une réaction",AUTH_EXPIRED_OVERLAY_TITLE:"Votre session de chat a expiré",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualisez la page pour continuer",VOICE_MESSAGE:"Message vocal",CONTACT_INFORMATION_HIDDEN:"Informations masquées",LEAVE_CONVERSATION:"Quitter la conversation",MARK_CONVERSATION_AS_UNREAD:"Marquer comme non lu",STATUS_INDICATOR_ONLINE:"Actif",STATUS_INDICATOR_OFFLINE:"Absent",ARIA_LEAVE_SEARCH_MODE:"Quitter le mode recherche",ARIA_SEARCH_UP:"Rechercher vers le haut",ARIA_SEARCH_DOWN:"Rechercher vers le bas",ARIA_CLOSE_CHAT_POPUP:"Fermer la fenêtre de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Rechercher dans cette conversation",ARIA_SEARCH:"Rechercher",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"définir la vitesse de lecture",ARIA_CANCEL_UPLOAD:"Annuler l'envoi",ARIA_STOP_RECORDING:"Arrêter l'enregistrement",ARIA_CANCEL_RECORDING:"Annuler l'enregistrement",ARIA_INSERT_EMOJI:"Insérer un emoji",ARIA_PLAY_AUDIO:"lire l'audio",ARIA_PAUSE_AUDIO:"mettre en pause l'audio",ARIA_REACTION_COUNT:(t,e)=>`${t} réactions avec ${e}`,ARIA_MORE_ACTIONS:"Plus d'actions",ARIA_REPLYING_TO:(t,e)=>`Répondre à ${t} : ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Quitter le mode réponse",SELECT_CONVERSATION:"Sélectionnez une conversation"}},he:{code:"he-IL",name:"Hebrew",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"אתמול",TODAY:"היום",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"עכשיו",LOCATION:"מיקום",CANCEL:"בטל",INBOX:"דואר נכנס",DESKTOP_NOTIFICATIONS:"התראות דפדפן",DESKTOP_NOTIFICATIONS_ERROR:"לא ניתן להפעיל התראות במרועה דפדפן מכיוון שהדפדפן שלך חוסם אותן באופן פעיל. נסה להסתכל בהגדרות או להשתמש בדפדפן אחר.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} הודעה על הדגמה`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"אם אתה שומר על כרטיסיית הדפדפן שלך פתוחה, תראה את זה צץ כשמישהו ידבר איתך.",SEND_BUTTON_TEXT:"שלח",ENTRYBOX_TEXT_LIMIT:"רק 10.000 תווים",ENTRYBOX_PLACEHOLDER:"תגיד משהו...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"שיחה זו אינה פעילה עוד.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"אתה יכול לקרוא, אך לא לשלוח הודעות.",MESSAGELIST_LOADING_OLDER:"טוען הודעות ישנות...",MESSAGELIST_SHOW_OLDER:"הצג הודעות ישנות",MESSAGELIST_NEW_MARKER:"חדש",MESSAGE_SENT_VIA_EMAIL:"הודעה זאת נשלחה דרך אימייל",YOU_MARKER:"אתה",UPLOAD_IN_PROGRESS:"מעלה ...",UPLOAD_SEND_FILE:"שלח קובץ",UPLOAD_SHARE_LOCATION:"שתף מיקום",UPLOAD_ERROR:"לרוע המזל משהו השתבש בהעלאה. ייתכן שהקובץ אינו נתמך או גדול מדי.",SHARE_LOCATION_ERROR:"לא ניתן לשתף מיקום: ",LOADING:"טוען...",HUB_EMPTY:"היסטוריית הצ'אט שלך תופיע כאן",HUB_SHOW_EARLIER:"הצג צ'אטים קודמים",INBOX_NO_CHATS_TITLE:"אין עדיין צ'אטים!",INBOX_NO_CHATS_BODY:"לאחר שניהלת שיחה אחת או יותר, הם יופיעו כאן.",ENABLE_TRANSLATION:"תרגם שיחה זו לעברית",DISABLE_TRANSLATION:"הצג מקור",SEARCH_PLACEHOLDER_TEXT:"...חפש",SEARCH_SEARCHING:"...מחפש",SEARCH_NO_RESULTS:"לא נמצאו תוצאות",SEARCH_NO_MORE_RESULTS:"אין תוצאות נוספות",SEARCH_RESULTS_CONVERSATIONS:"שיחות",SEARCH_RESULTS_MESSAGES:"הודעות",SEARCH_RESULTS_SHOW_MORE:"הצג עוד",CHAT_NOT_FOUND:"הצ'אט לא נמצא",DELETE_MESSAGE:"מחיקת הודעה",DELETION_EXPLANATION:"אם תמחק הודעה זו, היא תיעלם עבור כולם.",EDIT_MESSAGE:"עריכת הודעה",SAVE:"שמור",EDITED_INDICATOR:"ערוך",REPLY_TO_MESSAGE:"השב",ADD_REACTION:"הוספת תגובה",AUTH_EXPIRED_OVERLAY_TITLE:"הפעלת הצ׳אט שלכם פגה",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"רעננו את העמוד כדי להמשיך",VOICE_MESSAGE:"הודעה קולית",CONTACT_INFORMATION_HIDDEN:"מידע מוסתר",LEAVE_CONVERSATION:"צא מהשיחה",MARK_CONVERSATION_AS_UNREAD:"סמן כלא נקרא",STATUS_INDICATOR_ONLINE:"פעיל",STATUS_INDICATOR_OFFLINE:"לא פעיל",ARIA_LEAVE_SEARCH_MODE:"צא ממצב חיפוש",ARIA_SEARCH_UP:"חפש למעלה",ARIA_SEARCH_DOWN:"חפש למטה",ARIA_CLOSE_CHAT_POPUP:"סגור חלון צ'אט",ARIA_SEARCH_INSIDE_CONVERSATION:"חפש בתוך השיחה הזו",ARIA_SEARCH:"חפש",ARIA_CHAT:"צ'אט",ARIA_SET_PLAYBACK_SPEED:"הגדר מהירות השמעה",ARIA_CANCEL_UPLOAD:"בטל העלאה",ARIA_STOP_RECORDING:"עצור הקלטה",ARIA_CANCEL_RECORDING:"בטל הקלטה",ARIA_INSERT_EMOJI:"הוסף אמוג'י",ARIA_PLAY_AUDIO:"נגן אודיו",ARIA_PAUSE_AUDIO:"השהה אודיו",ARIA_REACTION_COUNT:(t,e)=>`${t} תגובות עם ${e}`,ARIA_MORE_ACTIONS:"פעולות נוספות",ARIA_REPLYING_TO:(t,e)=>`משיב ל-${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"צא ממצב תשובה",SELECT_CONVERSATION:"בחר שיחה"}},hi:{code:"hi-IN",name:"Hindi (IN)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/hi.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hi/cldr/data.json",translation:{YESTERDAY:"कल",TODAY:"आज",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"अभी",LOCATION:"जगह",CANCEL:"रद्द करें",INBOX:"इनबॉक्स",DESKTOP_NOTIFICATIONS:"ब्राउज़र सूचनाएं",DESKTOP_NOTIFICATIONS_ERROR:"ब्राउज़र सूचनाएं सक्षम नहीं कर सकता क्योंकि आपका ब्राउज़र सक्रिय रूप से उन्हें ब्लॉक करता है। सेटिंग्स में देखने या एक अलग ब्राउज़र का उपयोग करने का प्रयास करें।",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} डेमो अधिसूचना`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"यदि आप अपना ब्राउज़र टैब खुला रखते हैं, तो यह पॉप अप आपको तब दिखाई देगा जब कोई आपसे बात करेगा।",SEND_BUTTON_TEXT:"भेजें",ENTRYBOX_TEXT_LIMIT:"केवल 10,000 वर्णों की अनुमति है।",ENTRYBOX_PLACEHOLDER:"कुछ कहिए...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"यह चैट अब सक्रिय नहीं है।",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"आप पढ़ सकते हैं, लेकिन संदेश नहीं भेज सकते।",MESSAGELIST_LOADING_OLDER:"पुराने संदेश लोड हो रहे हैं ...",MESSAGELIST_SHOW_OLDER:"पुराने संदेश दिखाएं",MESSAGELIST_NEW_MARKER:"नया",MESSAGE_SENT_VIA_EMAIL:"यह संदेश ईमेल के माध्यम से भेजा गया था",YOU_MARKER:"आप",UPLOAD_IN_PROGRESS:"अपलोड हो रहा है...",UPLOAD_SEND_FILE:"फाइल भेजें",UPLOAD_SHARE_LOCATION:"जगह शेयर करें",UPLOAD_ERROR:"दुर्भाग्य से, अपलोड करते समय कुछ गलत हो गया। फ़ाइल असमर्थित या बहुत बड़ी हो सकती है।",SHARE_LOCATION_ERROR:"जगह शेयर नहीं हो पाया: ",LOADING:"लोड हो रहा है...",HUB_EMPTY:"आपका चैट इतिहास यहां दिखाई देगा",HUB_SHOW_EARLIER:"पहले की चैट दिखाओ",INBOX_NO_CHATS_TITLE:"अभी तक कोई चैट नहीं!",INBOX_NO_CHATS_BODY:"एक बार जब आप एक या अधिक चैट कर लेते हैं, तो वे यहां दिखाई देंगे।",ENABLE_TRANSLATION:"इस बातचीत का हिंदी में अनुवाद कीजिए",DISABLE_TRANSLATION:"मूल दिखाएँ",SEARCH_PLACEHOLDER_TEXT:"खोजें...",SEARCH_SEARCHING:"खोज जारी है...",SEARCH_NO_RESULTS:"कोई परिणाम नहीं मिला",SEARCH_NO_MORE_RESULTS:"और कोई परिणाम नहीं",SEARCH_RESULTS_CONVERSATIONS:"बातचीत",SEARCH_RESULTS_MESSAGES:"संदेश",SEARCH_RESULTS_SHOW_MORE:"और दिखाएं",CHAT_NOT_FOUND:"चैट नहीं मिली",DELETE_MESSAGE:"संदेश डिलीट करें",DELETION_EXPLANATION:"यदि आप इस संदेश को हटाते हैं, तो यह सभी के लिए गायब हो जाएगा.",EDIT_MESSAGE:"संदेश में बदलाव करें",SAVE:"सहेजें",EDITED_INDICATOR:"संपादित किया गया",REPLY_TO_MESSAGE:"जवाब दीजिए ।",ADD_REACTION:"प्रतिक्रिया जोड़ें",AUTH_EXPIRED_OVERLAY_TITLE:"आपका चैट सेशन समाप्त हो चुका है",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"आगे बढ़ने के लिए रिफ्रेश करें",VOICE_MESSAGE:"वॉयस मैसेज",CONTACT_INFORMATION_HIDDEN:"छुपी हुई जानकारी",LEAVE_CONVERSATION:"बातचीत को ख़त्म करें",MARK_CONVERSATION_AS_UNREAD:"अपठित के रूप में चिह्नित करें",STATUS_INDICATOR_ONLINE:"सक्रिय",STATUS_INDICATOR_OFFLINE:"अनुपस्थित",ARIA_LEAVE_SEARCH_MODE:"खोज मोड से बाहर निकलें",ARIA_SEARCH_UP:"ऊपर खोजें",ARIA_SEARCH_DOWN:"नीचे खोजें",ARIA_CLOSE_CHAT_POPUP:"चैट विंडो बंद करें",ARIA_SEARCH_INSIDE_CONVERSATION:"इस बातचीत में खोजें",ARIA_SEARCH:"खोजें",ARIA_CHAT:"चैट",ARIA_SET_PLAYBACK_SPEED:"प्लेबैक गति सेट करें",ARIA_CANCEL_UPLOAD:"अपलोड रद्द करें",ARIA_STOP_RECORDING:"रिकॉर्डिंग रोकें",ARIA_CANCEL_RECORDING:"रिकॉर्डिंग रद्द करें",ARIA_INSERT_EMOJI:"इमोजी डालें",ARIA_PLAY_AUDIO:"ऑडियो चलाएं",ARIA_PAUSE_AUDIO:"ऑडियो रोकें",ARIA_REACTION_COUNT:(t,e)=>`${t} प्रतिक्रियाएं (${e})`,ARIA_MORE_ACTIONS:"अधिक कार्य",ARIA_REPLYING_TO:(t,e)=>`${t} को उत्तर दे रहे हैं: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"उत्तर मोड से बाहर निकलें",SELECT_CONVERSATION:"एक बातचीत चुनें"}},hr:{code:"hr-HR",name:"Croatian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika nisu omogućene jer ih vaš preglednik aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu preglednika ostavite otvorenu, pojavit će se ovaj pop-up kada netko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Reci nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možeš čitati, ali ne i slati poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana e-poštom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podijeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podijeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovdje će se prikazati vaša povijest razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovdje.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na hrvatski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",SEARCH_RESULTS_CONVERSATIONS:"Razgovori",SEARCH_RESULTS_MESSAGES:"Poruke",SEARCH_RESULTS_SHOW_MORE:"Prikaži više",CHAT_NOT_FOUND:"Razgovor nije pronađen",DELETE_MESSAGE:"Obriši poruku",DELETION_EXPLANATION:"Ako izbrišete ovu poruku, nestat će za sve.",EDIT_MESSAGE:"Uredi poruku",SAVE:"Spremi",EDITED_INDICATOR:"uređivao",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodajte reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša sesija razgovora je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvježite stranicu za nastavak",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Skrivene informacije",LEAVE_CONVERSATION:"Napustiti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitano",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretraživanja",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor za chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcija s ${e}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(t,e)=>`Odgovaranje korisniku ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja",SELECT_CONVERSATION:"Odaberite razgovor"}},hu:{code:"hu-HU",name:"Hungarian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hu/cldr/data.json",translation:{YESTERDAY:"Tegnap",TODAY:"Ma",DAYS:"n",HOURS:"ó",MINUTES:"p",JUST_NOW:"éppen most",LOCATION:"Helyszín",CANCEL:"Visszavonás",INBOX:"Postaláda",DESKTOP_NOTIFICATIONS:"Böngésző értesítések",DESKTOP_NOTIFICATIONS_ERROR:"Azért nem tudja bekapcsolni a böngésző értesítések funkciót, mert böngészője aktívan blokkolja azt. Tekintse meg a beállításokat vagy használjon másik böngészőt.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo értesítés`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ha nyitva hagyja böngészőjét, felugró ablak fog megjelenni, ha valaki beszélni szeretne Önnel.",SEND_BUTTON_TEXT:"Küldés",ENTRYBOX_TEXT_LIMIT:"Mindőssze 10.000 karakter megengedett.",ENTRYBOX_PLACEHOLDER:"Mondjon valamit...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ez a beszélgetés már nem aktív.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Elolvashatja az üzeneteket, de nem küldhet újat.",MESSAGELIST_LOADING_OLDER:"Korábbi üzenetek betöltése...",MESSAGELIST_SHOW_OLDER:"Korábbi üzenetek megjelenítése",MESSAGELIST_NEW_MARKER:"Új",MESSAGE_SENT_VIA_EMAIL:"Ez az üzenet e-mailben került elküldésre",YOU_MARKER:"Ön",UPLOAD_IN_PROGRESS:"Feltöltés...",UPLOAD_SEND_FILE:"Fájl küldése",UPLOAD_SHARE_LOCATION:"Helyszín megosztása",UPLOAD_ERROR:"Sajnos hiba történt a feltöltés során. A fájl nem támogatott vagy túl nagy.",SHARE_LOCATION_ERROR:"Helyszín megosztása nem lehetséges: ",LOADING:"Betöltés...",HUB_EMPTY:"A beszélgetések előzményei itt láthatók",HUB_SHOW_EARLIER:"Korábbi beszélgetések megjelenítése",INBOX_NO_CHATS_TITLE:"Még nincs megjeleníthető beszélgetés!",INBOX_NO_CHATS_BODY:"Amint egy vagy több beszélgetéssel rendelkezik, azok itt fognak megjelenni.",ENABLE_TRANSLATION:"A beszélgetés lefordítása erre a nyelvre: magyar",DISABLE_TRANSLATION:"Eredeti megjelenítése",SEARCH_PLACEHOLDER_TEXT:"Keresés...",SEARCH_SEARCHING:"Keresés...",SEARCH_NO_RESULTS:"Nincs találat",SEARCH_NO_MORE_RESULTS:"Nincs több találat",SEARCH_RESULTS_CONVERSATIONS:"Beszélgetések",SEARCH_RESULTS_MESSAGES:"Üzenetek",SEARCH_RESULTS_SHOW_MORE:"Több megjelenítése",CHAT_NOT_FOUND:"A csevegés nem található",DELETE_MESSAGE:"Üzenet törlése",DELETION_EXPLANATION:"Ha törlöd ezt az üzenetet, az mindenki számára eltűnik.",EDIT_MESSAGE:"Üzenet szerkesztése",SAVE:"Mentés",EDITED_INDICATOR:"szerkesztve",REPLY_TO_MESSAGE:"Válaszadás",ADD_REACTION:"Reagálás erre",AUTH_EXPIRED_OVERLAY_TITLE:"Chat munkamenete lejárt",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Folytatáshoz frissítse az oldalt",VOICE_MESSAGE:"Hangüzenet",CONTACT_INFORMATION_HIDDEN:"Rejtett információ",LEAVE_CONVERSATION:"Kilépés a beszélgetésből",MARK_CONVERSATION_AS_UNREAD:"Megjelölés olvasatlanként",STATUS_INDICATOR_ONLINE:"Aktív",STATUS_INDICATOR_OFFLINE:"Távol",ARIA_LEAVE_SEARCH_MODE:"Keresési mód elhagyása",ARIA_SEARCH_UP:"Keresés felfelé",ARIA_SEARCH_DOWN:"Keresés lefelé",ARIA_CLOSE_CHAT_POPUP:"Csevegő ablak bezárása",ARIA_SEARCH_INSIDE_CONVERSATION:"Keresés ebben a beszélgetésben",ARIA_SEARCH:"Keresés",ARIA_CHAT:"Csevegés",ARIA_SET_PLAYBACK_SPEED:"lejátszási sebesség beállítása",ARIA_CANCEL_UPLOAD:"Feltöltés megszakítása",ARIA_STOP_RECORDING:"Felvétel leállítása",ARIA_CANCEL_RECORDING:"Felvétel megszakítása",ARIA_INSERT_EMOJI:"Emoji beszúrása",ARIA_PLAY_AUDIO:"hang lejátszása",ARIA_PAUSE_AUDIO:"hang szüneteltetése",ARIA_REACTION_COUNT:(t,e)=>`${t} reakció (${e})`,ARIA_MORE_ACTIONS:"További műveletek",ARIA_REPLYING_TO:(t,e)=>`Válaszolás ${t} részére: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Kilépés a válasz módóból",SELECT_CONVERSATION:"Válasszon egy beszélgetést"}},id:{code:"id-ID",name:"Bahasa Indonesia",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/id.js",emojiDataUrl:null,translation:{YESTERDAY:"Kemarin",TODAY:"Hari ini",DAYS:"h",HOURS:"j",MINUTES:"m",JUST_NOW:"sekarang",LOCATION:"Lokasi",CANCEL:"Batal",INBOX:"Kotak Masuk",DESKTOP_NOTIFICATIONS:"Notifikasi peramban",DESKTOP_NOTIFICATIONS_ERROR:"Tidak dapat mengaktifkan pemberitahuan browser karena browser Anda secara aktif memblokir mereka. Coba cari di pengaturan atau menggunakan browser yang berbeda.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`pemberitahuan demo ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jika Anda membiarkan tab browser tetap terbuka, Anda akan melihat ini muncul ketika seseorang berbicara kepada Anda.",SEND_BUTTON_TEXT:"Kirim",ENTRYBOX_TEXT_LIMIT:"Hanya 10.000 karakter yang diizinkan.",ENTRYBOX_PLACEHOLDER:"Katakan sesuatu...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Percakapan ini tidak lagi aktif.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Anda dapat membaca, tetapi tidak mengirim pesan.",MESSAGELIST_LOADING_OLDER:"Memuat pesan lama...",MESSAGELIST_SHOW_OLDER:"Tampilkan pesan yang lebih lama",MESSAGELIST_NEW_MARKER:"Baru",MESSAGE_SENT_VIA_EMAIL:"Pesan ini dikirim melalui email",YOU_MARKER:"Anda",UPLOAD_IN_PROGRESS:"Mengunggah...",UPLOAD_SEND_FILE:"Kirim mengajukan",UPLOAD_SHARE_LOCATION:"Bagikan lokasi",UPLOAD_ERROR:"Ada yang salah diunggah. File mungkin tidak didukung atau terlalu besar.",SHARE_LOCATION_ERROR:"Tidak dapat membagikan lokasi: ",LOADING:"Memuat...",HUB_EMPTY:"Riwayat obrolan Anda akan muncul di sini",HUB_SHOW_EARLIER:"Tampilkan obrolan sebelumnya",INBOX_NO_CHATS_TITLE:"Belum ada obrolan!",INBOX_NO_CHATS_BODY:"Setelah Anda melakukan satu atau lebih percakapan, mereka akan muncul di sini.",ENABLE_TRANSLATION:"Terjemahkan percakapan ini ke Indonesia",DISABLE_TRANSLATION:"Perlihatkan asli",SEARCH_PLACEHOLDER_TEXT:"Cari...",SEARCH_SEARCHING:"Mencari...",SEARCH_NO_RESULTS:"Tidak ditemukan hasil",SEARCH_NO_MORE_RESULTS:"Tidak ada hasil lainnya",SEARCH_RESULTS_CONVERSATIONS:"Percakapan",SEARCH_RESULTS_MESSAGES:"Pesan",SEARCH_RESULTS_SHOW_MORE:"Tampilkan lebih banyak",CHAT_NOT_FOUND:"Obrolan tidak ditemukan",DELETE_MESSAGE:"Hapus pesan",DELETION_EXPLANATION:"Jika pesan ini Anda hapus, pesan ini akan tidak terlihat bagi siapa pun.",EDIT_MESSAGE:"Sunting pesan",SAVE:"Mentés",EDITED_INDICATOR:"diedit",REPLY_TO_MESSAGE:"Balas",ADD_REACTION:"Tambah reaksi",AUTH_EXPIRED_OVERLAY_TITLE:"Sesi obrolan Anda sudah lewat batas waktu",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Muat ulang halaman untuk melanjutkan",VOICE_MESSAGE:"Pesan suara",CONTACT_INFORMATION_HIDDEN:"Informasi tersembunyi",LEAVE_CONVERSATION:"Tinggalkan percakapan",MARK_CONVERSATION_AS_UNREAD:"Tandai sebagai Belum dibaca",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Tidak aktif",ARIA_LEAVE_SEARCH_MODE:"Keluar dari mode pencarian",ARIA_SEARCH_UP:"Cari ke atas",ARIA_SEARCH_DOWN:"Cari ke bawah",ARIA_CLOSE_CHAT_POPUP:"Tutup jendela obrolan",ARIA_SEARCH_INSIDE_CONVERSATION:"Cari dalam percakapan ini",ARIA_SEARCH:"Cari",ARIA_CHAT:"Obrolan",ARIA_SET_PLAYBACK_SPEED:"atur kecepatan pemutaran",ARIA_CANCEL_UPLOAD:"Batalkan unggah",ARIA_STOP_RECORDING:"Hentikan perekaman",ARIA_CANCEL_RECORDING:"Batalkan perekaman",ARIA_INSERT_EMOJI:"Sisipkan emoji",ARIA_PLAY_AUDIO:"putar audio",ARIA_PAUSE_AUDIO:"jeda audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reaksi dengan ${e}`,ARIA_MORE_ACTIONS:"Tindakan lainnya",ARIA_REPLYING_TO:(t,e)=>`Membalas ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Keluar dari mode balasan",SELECT_CONVERSATION:"Pilih percakapan"}},is:{code:"is-IS",name:"Íslenska",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Í gær",TODAY:"Í dag",DAYS:"dagar",HOURS:"klst.",MINUTES:"mín.",JUST_NOW:"núna",LOCATION:"Staðsetning",CANCEL:"Hætta við",INBOX:"Pósthólf",DESKTOP_NOTIFICATIONS:"Tilkynningar í vafra",DESKTOP_NOTIFICATIONS_ERROR:"Ekki er hægt að birta tilkynningar í vafra vegna þess að vafrinn sem þú notar hindrar það. Reyndu að leita að stillingum eða að nota annan vafra.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} prufutilkynning`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ef flipinn í vafranum er opinn muntu sjá þessa tilkynningu birtast þegar einhver sendir þér skilaboð.",SEND_BUTTON_TEXT:"Senda",ENTRYBOX_TEXT_LIMIT:"Aðeins 10.000 stafir komast fyrir.",ENTRYBOX_PLACEHOLDER:"Segðu eitthvað...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Þessar samræður eru ekki lengar virkar.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Þú getur lesið, en ekki sent skilaboð.",MESSAGELIST_LOADING_OLDER:"Sæki eldri skilaboð...",MESSAGELIST_SHOW_OLDER:"Sýna eldri skilaboð",MESSAGELIST_NEW_MARKER:"Ný",MESSAGE_SENT_VIA_EMAIL:"Þessi skilaboð voru send með tölvupósti",YOU_MARKER:"þú",UPLOAD_IN_PROGRESS:"Hleð upp...",UPLOAD_SEND_FILE:"Senda skrá",UPLOAD_SHARE_LOCATION:"Deila staðsetningu",UPLOAD_ERROR:"Því miður fór eitthvað úrskeiðis við að hlaða upp. Skráin gæti verið af rangri tegund eð of stór.",SHARE_LOCATION_ERROR:"Ekki er hægt að deila staðsetningu: ",LOADING:"Hleð...",HUB_EMPTY:"Fyrri samtöl munu birtast hér",HUB_SHOW_EARLIER:"Sýna fyrri samtöl",INBOX_NO_CHATS_TITLE:"Engin samtöl enn!",INBOX_NO_CHATS_BODY:"Þegar þú hefur átt eitt eða fleiri samtöl, munu þau birtast hér.",ENABLE_TRANSLATION:"Þýða þetta samtal á ensku",DISABLE_TRANSLATION:"Sýna upprunalegt",SEARCH_PLACEHOLDER_TEXT:"Leita...",SEARCH_SEARCHING:"Leita...",SEARCH_NO_RESULTS:"Ekkert fannst",SEARCH_NO_MORE_RESULTS:"Engar fleiri niðurstöður",SEARCH_RESULTS_CONVERSATIONS:"Samtöl",SEARCH_RESULTS_MESSAGES:"Skilaboð",SEARCH_RESULTS_SHOW_MORE:"Sýna meira",CHAT_NOT_FOUND:"Samtal fannst ekki",DELETE_MESSAGE:"Eyða skilaboðum",DELETION_EXPLANATION:"Ef þú eyðir þessum skilaboðum munu þau hverfa hjá öllum.",EDIT_MESSAGE:"Breyta skilaboðum",SAVE:"Vista",EDITED_INDICATOR:"breytt",REPLY_TO_MESSAGE:"Svara",ADD_REACTION:"Setja inn viðbrögð",AUTH_EXPIRED_OVERLAY_TITLE:"Spjallið hefur runnið út",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Endurnýjaðu síðuna til að halda áfram",VOICE_MESSAGE:"Raddskilaboð",LEAVE_CONVERSATION:"Skilja eftir skilaboð",MARK_CONVERSATION_AS_UNREAD:"Merkja sem ólesið",STATUS_INDICATOR_ONLINE:"Virk",STATUS_INDICATOR_OFFLINE:"Ekki við",CONTACT_INFORMATION_HIDDEN:"faldar upplýsingar",ARIA_LEAVE_SEARCH_MODE:"Hætta í leitastillingu",ARIA_SEARCH_UP:"Leita upp",ARIA_SEARCH_DOWN:"Leita niður",ARIA_CLOSE_CHAT_POPUP:"Loka spjallglugga",ARIA_SEARCH_INSIDE_CONVERSATION:"Leita í þessari samtal",ARIA_SEARCH:"Leita",ARIA_CHAT:"Spjall",ARIA_SET_PLAYBACK_SPEED:"stilla afspilunarhraða",ARIA_CANCEL_UPLOAD:"Hætta við upphleðslu",ARIA_STOP_RECORDING:"Stöðva upptöku",ARIA_CANCEL_RECORDING:"Hætta við upptöku",ARIA_INSERT_EMOJI:"Setja inn emoji",ARIA_PLAY_AUDIO:"spila hljóð",ARIA_PAUSE_AUDIO:"gera hlé á hljóði",ARIA_REACTION_COUNT:(t,e)=>`${t} viðbrögð með ${e}`,ARIA_MORE_ACTIONS:"Fleiri aðgerðir",ARIA_REPLYING_TO:(t,e)=>`Svara ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Hætta í svarmód",SELECT_CONVERSATION:"Veldu samtal"}},it:{code:"it-IT",name:"Italian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/it.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/it/cldr/data.json",translation:{YESTERDAY:"Ieri",TODAY:"Oggi",DAYS:"g",HOURS:"o",MINUTES:"m",JUST_NOW:"adesso",LOCATION:"Posizione",CANCEL:"Annulla",INBOX:"Posta in arrivo",DESKTOP_NOTIFICATIONS:"Notifiche browser",DESKTOP_NOTIFICATIONS_ERROR:"Impossibile abilitare le notifiche browser perché il browser le blocca attivamente. Prova a cercare le impostazioni o utilizzare un browser diverso.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notification`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Se si mantiene aperta la scheda del browser, questo verrà visualizzato quando qualcuno ti parla.",SEND_BUTTON_TEXT:"Invia",ENTRYBOX_TEXT_LIMIT:"Sono consentiti solo 10.000 caratteri.",ENTRYBOX_PLACEHOLDER:"Dì qualcosa...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Questa conversazione non è più attiva.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puoi leggere, ma non inviare messaggi.",MESSAGELIST_LOADING_OLDER:"Caricamento dei messaggi precedenti...",MESSAGELIST_SHOW_OLDER:"Mostra messaggi precedenti",MESSAGELIST_NEW_MARKER:"Nuovo",MESSAGE_SENT_VIA_EMAIL:"Questo messaggio è stato inviato via email",YOU_MARKER:"tu",UPLOAD_IN_PROGRESS:"Caricamento in corso...",UPLOAD_SEND_FILE:"Invia file",UPLOAD_SHARE_LOCATION:"Condividi posizione",UPLOAD_ERROR:"Qualcosa è andato storto durante il caricamento. Il file potrebbe non essere supportato o troppo grande.",SHARE_LOCATION_ERROR:"Impossibile condividere la posizione: ",LOADING:"Caricamento in corso...",HUB_EMPTY:"La cronologia della tua chat verrà mostrata qui",HUB_SHOW_EARLIER:"Mostra chat precedenti",INBOX_NO_CHATS_TITLE:"Non ci sono ancora chat!",INBOX_NO_CHATS_BODY:"Una volta che hai avuto una o più conversazioni, verranno visualizzate qui.",ENABLE_TRANSLATION:"Traduci questa conversazione in italiano",DISABLE_TRANSLATION:"Mostra l'originale",SEARCH_PLACEHOLDER_TEXT:"Cerca...",SEARCH_SEARCHING:"Cercando...",SEARCH_NO_RESULTS:"Nessun risultato trovato",SEARCH_NO_MORE_RESULTS:"Non ci sono più risultati",SEARCH_RESULTS_CONVERSATIONS:"Conversazioni",SEARCH_RESULTS_MESSAGES:"Messaggi",SEARCH_RESULTS_SHOW_MORE:"Mostra altro",CHAT_NOT_FOUND:"Chat non trovata",DELETE_MESSAGE:"Elimina messaggio",DELETION_EXPLANATION:"Se elimini il messaggio, questo scomparirà per tutti.",EDIT_MESSAGE:"Modifica messaggio",SAVE:"Salva",EDITED_INDICATOR:"modificato",REPLY_TO_MESSAGE:"Rispondi",ADD_REACTION:"Aggiungi reazione",AUTH_EXPIRED_OVERLAY_TITLE:"La sessione di chat è scaduta",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Aggiorna la pagina per continuare",VOICE_MESSAGE:"Messaggio vocale",LEAVE_CONVERSATION:"Abbandona la conversazione",MARK_CONVERSATION_AS_UNREAD:"Segna come non letto",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informazioni nascoste",ARIA_LEAVE_SEARCH_MODE:"Esci dalla modalità ricerca",ARIA_SEARCH_UP:"Cerca in alto",ARIA_SEARCH_DOWN:"Cerca in basso",ARIA_CLOSE_CHAT_POPUP:"Chiudi la finestra di chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cerca in questa conversazione",ARIA_SEARCH:"Cerca",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"imposta velocità di riproduzione",ARIA_CANCEL_UPLOAD:"Annulla caricamento",ARIA_STOP_RECORDING:"Interrompi registrazione",ARIA_CANCEL_RECORDING:"Annulla registrazione",ARIA_INSERT_EMOJI:"Inserisci un'emoji",ARIA_PLAY_AUDIO:"riproduci audio",ARIA_PAUSE_AUDIO:"metti in pausa audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reazioni con ${e}`,ARIA_MORE_ACTIONS:"Altre azioni",ARIA_REPLYING_TO:(t,e)=>`Rispondendo a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Esci dalla modalità risposta",SELECT_CONVERSATION:"Seleziona una conversazione"}},ja:{code:"ja-JP",name:"Japanese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ja.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ja/emojibase/data.json",translation:{YESTERDAY:"昨日",TODAY:"今日",DAYS:"日前",HOURS:"時間前",MINUTES:"分前",JUST_NOW:"たった今",LOCATION:"場所",CANCEL:"キャンセル",INBOX:"受信箱",DESKTOP_NOTIFICATIONS:"ブラウザの通知",DESKTOP_NOTIFICATIONS_ERROR:"ブラウザの通知はブロックされているため、ブラウザの通知を有効にできません。設定を確認するか、別のブラウザを使用してください。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} デモ通知`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"ブラウザのタブを開いたままにしておくと、誰かがあなたに話しかけたときにこのポップアップが表示されます。",SEND_BUTTON_TEXT:"送信",ENTRYBOX_TEXT_LIMIT:"許可されているのは10.000文字までです。",ENTRYBOX_PLACEHOLDER:"メッセージを入力してください",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"この会話はもうアクティブではありません。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"あなたは読むことはできますが、メッセージを送ることはできません。",MESSAGELIST_LOADING_OLDER:"古いメッセージを読み込んでいます...",MESSAGELIST_SHOW_OLDER:"古いメッセージを表示",MESSAGELIST_NEW_MARKER:"新着",MESSAGE_SENT_VIA_EMAIL:"このメッセージはメールで送信されました",YOU_MARKER:"あなたは",UPLOAD_IN_PROGRESS:"アップロード中...",UPLOAD_SEND_FILE:"ファイル送信",UPLOAD_SHARE_LOCATION:"共有場所",UPLOAD_ERROR:"アップロード中に問題が発生しました。ファイルがサポートされていないか、大きすぎる可能性があります。",SHARE_LOCATION_ERROR:"場所を共有できません: ",LOADING:"読み込み中...",HUB_EMPTY:"あなたのチャット履歴がここに表示されます",HUB_SHOW_EARLIER:"以前のチャットを表示",INBOX_NO_CHATS_TITLE:"まだチャットがありません!",INBOX_NO_CHATS_BODY:"会話が1つ以上あると、ここに表示されます",ENABLE_TRANSLATION:"この会話を日本語に翻訳する",DISABLE_TRANSLATION:"オリジナルを表示",SEARCH_PLACEHOLDER_TEXT:"検索...",SEARCH_SEARCHING:"検索中...",SEARCH_NO_RESULTS:"結果が見つかりません",SEARCH_NO_MORE_RESULTS:"これ以上結果はありません",SEARCH_RESULTS_CONVERSATIONS:"会話",SEARCH_RESULTS_MESSAGES:"メッセージ",SEARCH_RESULTS_SHOW_MORE:"もっと見る",CHAT_NOT_FOUND:"チャットが見つかりませんでした",DELETE_MESSAGE:"メッセージを削除する",DELETION_EXPLANATION:"このメッセージを削除すると、全ての人に表示されなくなります。",EDIT_MESSAGE:"メッセージを編集する",SAVE:"上書き保存",EDITED_INDICATOR:"編集",REPLY_TO_MESSAGE:"返信する",ADD_REACTION:"リアクションを追加",AUTH_EXPIRED_OVERLAY_TITLE:"チャットセッションの有効期限が切れました",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"続けるにはページを更新してください",VOICE_MESSAGE:"ボイスメッセージ",CONTACT_INFORMATION_HIDDEN:"機密情報",LEAVE_CONVERSATION:"会話をやめる",MARK_CONVERSATION_AS_UNREAD:"未読としてマーク",STATUS_INDICATOR_ONLINE:"アクティブ",STATUS_INDICATOR_OFFLINE:"退席中",ARIA_LEAVE_SEARCH_MODE:"検索モードを終了",ARIA_SEARCH_UP:"上に検索",ARIA_SEARCH_DOWN:"下に検索",ARIA_CLOSE_CHAT_POPUP:"チャットポップアップを閉じる",ARIA_SEARCH_INSIDE_CONVERSATION:"この会話内を検索",ARIA_SEARCH:"検索",ARIA_CHAT:"チャット",ARIA_SET_PLAYBACK_SPEED:"再生速度を設定",ARIA_CANCEL_UPLOAD:"アップロードをキャンセル",ARIA_STOP_RECORDING:"録音を停止",ARIA_CANCEL_RECORDING:"録音をキャンセル",ARIA_INSERT_EMOJI:"絵文字を挿入",ARIA_PLAY_AUDIO:"音声を再生",ARIA_PAUSE_AUDIO:"音声を一時停止",ARIA_REACTION_COUNT:(t,e)=>`${t}件のリアクション(${e})`,ARIA_MORE_ACTIONS:"その他の操作",ARIA_REPLYING_TO:(t,e)=>`${t}に返信: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"返信モードを終了",SELECT_CONVERSATION:"会話を選択"}},ka:{code:"ka-GE",name:"Georgian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"გუშინ",TODAY:"დღეს",DAYS:"დღ",HOURS:"სთ",MINUTES:"წთ",JUST_NOW:"ახლა",LOCATION:"ადგილმდებარეობა",CANCEL:"გაუქმება",INBOX:"მიღებული შეტყობინება",DESKTOP_NOTIFICATIONS:"ბრაუზერის შეტყობინებები",DESKTOP_NOTIFICATIONS_ERROR:"შეუძლებელია ბრაუზერის შეტკობინებების ჩართვა. ეს ბრაუზერი ბლოკავს მათ. სცადე ცვლილება ოპციებიდან ან გამოიყენე სხვა ბრაუზერი.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} შეტყობინებების დემო ვერსია`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"თუ დატოვებ ბრაუზერის ფანჯარას გახსნილს, როცა ვიღაც მოგწერს საუბარი ამოვარდება დესკტოპზე.",SEND_BUTTON_TEXT:"გაგზავნა",ENTRYBOX_TEXT_LIMIT:"დაშვებულია მხოლოდ 10.000 სიმბოლო.",ENTRYBOX_PLACEHOLDER:"დაწერე რაღაც...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"ეს დიალოგი აღარ არის ხელმისაწვდომი.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"შეგიძლია წაიკითხო, მაგრამ ვერ გააგზავნი შეტყობინებას.",MESSAGELIST_LOADING_OLDER:"იტვირთება ძველი შეტყობინებები...",MESSAGELIST_SHOW_OLDER:"ძველი შეტყობინებების ჩვენება",MESSAGELIST_NEW_MARKER:"ახალი",MESSAGE_SENT_VIA_EMAIL:"ეს შეტყობინება გამოგზავნილია იმეილით",YOU_MARKER:"you",UPLOAD_IN_PROGRESS:"იტვირთება...",UPLOAD_SEND_FILE:"ფაილის გაგზავნა",UPLOAD_SHARE_LOCATION:"ადგილმდებარეობის გაზიარება",UPLOAD_ERROR:"პრობლემაა ატვირთვისას. ფაილის შესაძლოა არის არათავსებადი ან ძალიან დიდი.",SHARE_LOCATION_ERROR:"შეუძლებელია ადგილმდებარეობის გაზიარება: ",LOADING:"იტვირთება...",HUB_EMPTY:"საუბრების ისტორია გამოჩნდება აქ",HUB_SHOW_EARLIER:"წინა საუბრების ნახვა",INBOX_NO_CHATS_TITLE:"ჯერ-ჯერობით არ არის საუბრები!",INBOX_NO_CHATS_BODY:"უკვე დასრულებული საუბარები გამოჩნდება აქ",ENABLE_TRANSLATION:"თარგმნეთ ეს საუბარი ინგლისურად",DISABLE_TRANSLATION:"ორიგინალის ჩვენება",SEARCH_PLACEHOLDER_TEXT:"ძიება...",SEARCH_SEARCHING:"მიმდინარეობს ძიება...",SEARCH_NO_RESULTS:"შედეგები ვერ ქართველი",SEARCH_NO_MORE_RESULTS:"სხვა შედეგი ვერ მოიძებნა",SEARCH_RESULTS_CONVERSATIONS:"საუბრები",SEARCH_RESULTS_MESSAGES:"შეტყობინებები",SEARCH_RESULTS_SHOW_MORE:"მეტის ჩვენება",CHAT_NOT_FOUND:"ჩატი ვერ მოიძებნა",DELETE_MESSAGE:"შეტყობინების წაშლა ",DELETION_EXPLANATION:"თუ ამ შეტყობინებას წაშლით, ის ყველასთვის გაქრება.",EDIT_MESSAGE:"შეტყობინების რედაქტირება",SAVE:"შენახვა",EDITED_INDICATOR:"რედაქტირებულია",REPLY_TO_MESSAGE:"პასუხის გაცემა",ADD_REACTION:"დაამატეთ რეაქცია",AUTH_EXPIRED_OVERLAY_TITLE:"თქვენი ჩეთის სესიის ვადა ამოიწურა",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"განაახლეთ გვერდი გასაგრძელებლად",VOICE_MESSAGE:"ხმოვანი შეტყობინება",LEAVE_CONVERSATION:"საუბრის დატოვება",MARK_CONVERSATION_AS_UNREAD:"წაუკითხავად მონიშვნა",STATUS_INDICATOR_ONLINE:"აქტიური",STATUS_INDICATOR_OFFLINE:"გამორთული",CONTACT_INFORMATION_HIDDEN:"ფარული ინფორმაცია",ARIA_LEAVE_SEARCH_MODE:"ძიების რეჟიმიდან გასვლა",ARIA_SEARCH_UP:"ძიება ზემოთ",ARIA_SEARCH_DOWN:"ძიება ქვემოთ",ARIA_CLOSE_CHAT_POPUP:"ჩეთის ფანჯრის დახურვა",ARIA_SEARCH_INSIDE_CONVERSATION:"ძიება ამ საუბარში",ARIA_SEARCH:"ძიება",ARIA_CHAT:"ჩეთი",ARIA_SET_PLAYBACK_SPEED:"გადახვევის სიჩქარის დაყენება",ARIA_CANCEL_UPLOAD:"ატვირთვის გაუქმება",ARIA_STOP_RECORDING:"ჩაწერის შეჩერება",ARIA_CANCEL_RECORDING:"ჩაწერის გაუქმება",ARIA_INSERT_EMOJI:"ემოჯის ჩასმა",ARIA_PLAY_AUDIO:"აუდიოს დაკვრა",ARIA_PAUSE_AUDIO:"აუდიოს შეჩერება",ARIA_REACTION_COUNT:(t,e)=>`${t} რეაქცია (${e})`,ARIA_MORE_ACTIONS:"მეტი ქმედება",ARIA_REPLYING_TO:(t,e)=>`პასუხი ${t}-ს: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"პასუხის რეჟიმიდან გასვლა",SELECT_CONVERSATION:"აირჩიეთ საუბარი"}},ko:{code:"ko-KR",name:"Korean (South Korea)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ko/cldr/data.json",translation:{YESTERDAY:"어제",TODAY:"오늘",DAYS:"일 전",HOURS:"시간 전",MINUTES:"분 전",JUST_NOW:"방금",LOCATION:"위치",CANCEL:"취소",INBOX:"대화 목록",DESKTOP_NOTIFICATIONS:"브라우저 알림",DESKTOP_NOTIFICATIONS_ERROR:"브라우저 알림을 표시할 수 없습니다. 브라우저 설정을 확인하거나 다른 브라우저를 사용해주세요.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} 데모 알림`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"브라우저 탭을 열어 둔 상태에서 누군가 대화 할 때 이 팝업이 표시됩니다.",SEND_BUTTON_TEXT:"전송",ENTRYBOX_TEXT_LIMIT:"최대 10,000자까지 입력할 수 있습니다.",ENTRYBOX_PLACEHOLDER:"메세지를 입력하세요...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"채팅이 종료되었습니다.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"읽기만 가능하며 메시지를 보낼 수 없습니다.",MESSAGELIST_LOADING_OLDER:"이전 메시지 로드 중...",MESSAGELIST_SHOW_OLDER:"이전 메시지 표시",MESSAGELIST_NEW_MARKER:"새 메시지",MESSAGE_SENT_VIA_EMAIL:"이 메시지는 이메일을 통해 전송되었습니다.",YOU_MARKER:"나",UPLOAD_IN_PROGRESS:"업로드 중...",UPLOAD_SEND_FILE:"파일 전송",UPLOAD_SHARE_LOCATION:"위치 공유",UPLOAD_ERROR:"업로드가 실패했습니다. 파일이 지원되지 않거나 너무 클 수 있습니다.",SHARE_LOCATION_ERROR:"위치를 공유 할 수 없습니다: ",LOADING:"로드 중...",HUB_EMPTY:"채팅 기록이 여기에 표시됩니다",HUB_SHOW_EARLIER:"이전 채팅보기",INBOX_NO_CHATS_TITLE:"아직 채팅이 없습니다!",INBOX_NO_CHATS_BODY:"대화가 하나 이상 있으면 여기에 표시됩니다.",ENABLE_TRANSLATION:"이 대화를 한국어로 번역",DISABLE_TRANSLATION:"원본 표시",SEARCH_PLACEHOLDER_TEXT:"검색...",SEARCH_SEARCHING:"검색 중...",SEARCH_NO_RESULTS:"검색 결과 없음",SEARCH_NO_MORE_RESULTS:"추가 검색 결과 없음",SEARCH_RESULTS_CONVERSATIONS:"대화",SEARCH_RESULTS_MESSAGES:"메시지",SEARCH_RESULTS_SHOW_MORE:"더 보기",CHAT_NOT_FOUND:"대화를 찾지 못했습니다",DELETE_MESSAGE:"메시지 삭제",DELETION_EXPLANATION:"이 메시지를 삭제하면 모든 사람이 볼 수 없게 됩니다.",EDIT_MESSAGE:"메시지 편집하기",SAVE:"저장",EDITED_INDICATOR:"편집",REPLY_TO_MESSAGE:"회신",ADD_REACTION:"반응 추가",AUTH_EXPIRED_OVERLAY_TITLE:"채팅 세션이 만료되었습니다",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"계속하려면 페이지를 새로고침하세요",VOICE_MESSAGE:"음성 메시지",CONTACT_INFORMATION_HIDDEN:"숨겨진 정보",LEAVE_CONVERSATION:"대화 떠나기",MARK_CONVERSATION_AS_UNREAD:"읽지 않은 상태로 표시",STATUS_INDICATOR_ONLINE:"활성",STATUS_INDICATOR_OFFLINE:"부재중",ARIA_LEAVE_SEARCH_MODE:"검색 모드 종료",ARIA_SEARCH_UP:"위로 검색",ARIA_SEARCH_DOWN:"아래로 검색",ARIA_CLOSE_CHAT_POPUP:"채팅 팝업 닫기",ARIA_SEARCH_INSIDE_CONVERSATION:"이 대화 내 검색",ARIA_SEARCH:"검색",ARIA_CHAT:"채팅",ARIA_SET_PLAYBACK_SPEED:"재생 속도 설정",ARIA_CANCEL_UPLOAD:"업로드 취소",ARIA_STOP_RECORDING:"녹음 중지",ARIA_CANCEL_RECORDING:"녹음 취소",ARIA_INSERT_EMOJI:"이모지 삽입",ARIA_PLAY_AUDIO:"오디오 재생",ARIA_PAUSE_AUDIO:"오디오 일시 정지",ARIA_REACTION_COUNT:(t,e)=>`${t}개 반응 (${e})`,ARIA_MORE_ACTIONS:"추가 작업",ARIA_REPLYING_TO:(t,e)=>`${t}에게 답장: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"답장 모드 종료",SELECT_CONVERSATION:"대화 선택"}},nb:{code:"nb-NO",name:"Norwegian (Bokmål)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nb/cldr/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"Nå",LOCATION:"Plassering",CANCEL:"Avbryt",INBOX:"Innboks",DESKTOP_NOTIFICATIONS:"Nettleservarsler",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Nettleservarsler fordi nettleseren din aktivt blokkerer dem. Prøv å se i innstillingene eller bruke en annen nettleser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo varslinger`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Hvis du holder nettleservinduet åpent, vil du se dette varsel når noen snakker til deg.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Kun 10.000 tegn er tillatt.",ENTRYBOX_PLACEHOLDER:"Si noe...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Denne samtale er ikke lengre aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan lese, men ikke sende meldinger.",MESSAGELIST_LOADING_OLDER:"Laster eldre meldinger...",MESSAGELIST_SHOW_OLDER:"Vis eldre meldinger",MESSAGELIST_NEW_MARKER:"Ny",MESSAGE_SENT_VIA_EMAIL:"Denne meldingen er sendt via e-post",YOU_MARKER:"deg",UPLOAD_IN_PROGRESS:"Laster opp...",UPLOAD_SEND_FILE:"Send fil",UPLOAD_SHARE_LOCATION:"Del din plassering",UPLOAD_ERROR:"Noe gikk galt i uplastingen. Det kan være filen ikke støttes eller for stor.",SHARE_LOCATION_ERROR:"Kan ikke dele plasseringen: ",LOADING:"Laster...",HUB_EMPTY:"Din chats historikk vil vises her",HUB_SHOW_EARLIER:"Vis tidligere chats",INBOX_NO_CHATS_TITLE:"Ingen chats enda!",INBOX_NO_CHATS_BODY:"Så snart du får en eller flere samtaler, vil de vises her.",ENABLE_TRANSLATION:"Oversett denne samtalen til norsk",DISABLE_TRANSLATION:"Vis original",SEARCH_PLACEHOLDER_TEXT:"Søk...",SEARCH_SEARCHING:"Søker...",SEARCH_NO_RESULTS:"Finner ingen resultater",SEARCH_NO_MORE_RESULTS:"Ingen flere resultater",SEARCH_RESULTS_CONVERSATIONS:"Samtaler",SEARCH_RESULTS_MESSAGES:"Meldinger",SEARCH_RESULTS_SHOW_MORE:"Vis mer",CHAT_NOT_FOUND:"Chat ikke funnet",DELETE_MESSAGE:"Slett melding",DELETION_EXPLANATION:"Hvis du sletter denne meldingen, forsvinner den for alle.",EDIT_MESSAGE:"Rediger melding",SAVE:"Lagre",EDITED_INDICATOR:"redigert",REPLY_TO_MESSAGE:"Svar",ADD_REACTION:"Legg til reaksjon",AUTH_EXPIRED_OVERLAY_TITLE:"Chatøkten er utløpt",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Oppdater siden for å fortsette",VOICE_MESSAGE:"Lydmelding",CONTACT_INFORMATION_HIDDEN:"Skjult informasjon",LEAVE_CONVERSATION:"Forlat samtalen",MARK_CONVERSATION_AS_UNREAD:"Merk som ulest",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Borte",ARIA_LEAVE_SEARCH_MODE:"Forlat søkemodus",ARIA_SEARCH_UP:"Søk oppover",ARIA_SEARCH_DOWN:"Søk nedover",ARIA_CLOSE_CHAT_POPUP:"Lukk chatvindu",ARIA_SEARCH_INSIDE_CONVERSATION:"Søk i denne samtalen",ARIA_SEARCH:"Søk",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"angi avspillingshastighet",ARIA_CANCEL_UPLOAD:"Avbryt opplasting",ARIA_STOP_RECORDING:"Stopp opptak",ARIA_CANCEL_RECORDING:"Avbryt opptak",ARIA_INSERT_EMOJI:"Sett inn en emoji",ARIA_PLAY_AUDIO:"spill av lyd",ARIA_PAUSE_AUDIO:"pause lyd",ARIA_REACTION_COUNT:(t,e)=>`${t} reaksjoner med ${e}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(t,e)=>`Svarer til ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avslutt svarmodus",SELECT_CONVERSATION:"Velg en samtale"}},nl:{code:"nl-NL",name:"Dutch",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/nl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nl/cldr/data.json",translation:{YESTERDAY:"Gisteren",TODAY:"Vandaag",DAYS:"d",HOURS:"u",MINUTES:"m",JUST_NOW:"zojuist",LOCATION:"Locatie",CANCEL:"Annuleren",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browsermeldingen",DESKTOP_NOTIFICATIONS_ERROR:"Browsermeldingen kunnen niet geactiveerd worden omdat de browser het blokkeert. Check de instellingen van je browser of probeer een andere browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notificatie`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Als je je browser open houdt, zie je deze popup als iemand tegen je praat.",SEND_BUTTON_TEXT:"Verzenden",ENTRYBOX_TEXT_LIMIT:"Maximaal 10.000 tekens toegestaan.",ENTRYBOX_PLACEHOLDER:"Typ een bericht...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Dit gesprek is niet actief meer.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Je kunt geen berichten sturen.",MESSAGELIST_LOADING_OLDER:"Eerdere berichten laden...",MESSAGELIST_SHOW_OLDER:"Laad eerdere berichten",MESSAGELIST_NEW_MARKER:"Nieuw",MESSAGE_SENT_VIA_EMAIL:"Dit bericht is verstuurd via e-mail",YOU_MARKER:"jij",UPLOAD_IN_PROGRESS:"Uploaden...",UPLOAD_SEND_FILE:"Verzend bestand",UPLOAD_SHARE_LOCATION:"Deel locatie",UPLOAD_ERROR:"Er ging iets mis. Het bestand wordt niet ondersteund of is te groot.",SHARE_LOCATION_ERROR:"Locatie delen mislukt: ",LOADING:"Bezig met laden...",HUB_EMPTY:"Berichtengeschiedenis wordt hier weergegeven",HUB_SHOW_EARLIER:"Laat eerdere berichten zien",INBOX_NO_CHATS_TITLE:"Nog geen chats!",INBOX_NO_CHATS_BODY:"Zodra je een of meerdere conversaties hebt gehad, worden deze hier weergegeven.",ENABLE_TRANSLATION:"Vertaal dit gesprek naar het Nederlands",DISABLE_TRANSLATION:"Toon oorspronkelijk gesprek",SEARCH_PLACEHOLDER_TEXT:"Zoek...",SEARCH_SEARCHING:"Zoeken...",SEARCH_NO_RESULTS:"Geen resultaten gevonden",SEARCH_NO_MORE_RESULTS:"Niet meer resultaten",SEARCH_RESULTS_CONVERSATIONS:"Gesprekken",SEARCH_RESULTS_MESSAGES:"Berichten",SEARCH_RESULTS_SHOW_MORE:"Toon meer",CHAT_NOT_FOUND:"Chat niet gevonden",DELETE_MESSAGE:"Bericht verwijderen",DELETION_EXPLANATION:"Als je dit bericht verwijdert, zal het voor iedereen verdwijnen.",EDIT_MESSAGE:"Bericht bewerken",SAVE:"Opslaan",EDITED_INDICATOR:"bewerkt",REPLY_TO_MESSAGE:"Beantwoorden",ADD_REACTION:"Reactie toevoegen",AUTH_EXPIRED_OVERLAY_TITLE:"Je chatsessie is verlopen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Ververs de pagina om door te gaan",VOICE_MESSAGE:"Spraakbericht",LEAVE_CONVERSATION:"Gesprek verlaten",MARK_CONVERSATION_AS_UNREAD:"Markeren als ongelezen",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"verborgen informatie",ARIA_LEAVE_SEARCH_MODE:"Zoekmodus verlaten",ARIA_SEARCH_UP:"Omhoog zoeken",ARIA_SEARCH_DOWN:"Omlaag zoeken",ARIA_CLOSE_CHAT_POPUP:"Chatvenster sluiten",ARIA_SEARCH_INSIDE_CONVERSATION:"Zoeken in dit gesprek",ARIA_SEARCH:"Zoeken",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Afspeelsnelheid instellen",ARIA_CANCEL_UPLOAD:"Upload annuleren",ARIA_STOP_RECORDING:"Opname stoppen",ARIA_CANCEL_RECORDING:"Opname annuleren",ARIA_INSERT_EMOJI:"Een emoji invoegen",ARIA_PLAY_AUDIO:"Audio afspelen",ARIA_PAUSE_AUDIO:"Audio pauzeren",ARIA_REACTION_COUNT:(t,e)=>`${t} Reacties met ${e}`,ARIA_MORE_ACTIONS:"Meer acties",ARIA_REPLYING_TO:(t,e)=>`Beantwoorden aan ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Verlaat antwoordmodus",SELECT_CONVERSATION:"Selecteer een gesprek"}},pl:{code:"pl-PL",name:"Polish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pl/cldr/data.json",translation:{YESTERDAY:"Wczoraj",TODAY:"Dzisiaj",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"teraz",LOCATION:"Lokalizacja",CANCEL:"Anuluj",INBOX:"Skrzynka odbiorcza",DESKTOP_NOTIFICATIONS:"Powiadomienia",DESKTOP_NOTIFICATIONS_ERROR:"Nie można aktywować powiadomień, ponieważ twoja przeglądarka je blokuje. Proszę zmienić ustawienie lub spróbować innej przeglądarki.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} przykładowe powiadomienie`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jeśli zostawisz tę kartę otwartą, zobaczysz takie powiadomienie, gdy ktoś napisze do Ciebie.",SEND_BUTTON_TEXT:"Wyślij",ENTRYBOX_TEXT_LIMIT:"Nie można wysyłać więcej niż 10000 znaków.",ENTRYBOX_PLACEHOLDER:"Napisz coś...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ten czat nie jest aktywny.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Możesz czytać wiadomości, ale nie możesz ich wysyłać.",MESSAGELIST_LOADING_OLDER:"Wczytuję starsze wiadomości...",MESSAGELIST_SHOW_OLDER:"Zobacz starsze wiadomości",MESSAGELIST_NEW_MARKER:"Nowe",MESSAGE_SENT_VIA_EMAIL:"Ta wiadomość została wysłana przez email.",YOU_MARKER:"ty",UPLOAD_IN_PROGRESS:"Przesyłanie...",UPLOAD_SEND_FILE:"Prześlij plik",UPLOAD_SHARE_LOCATION:"Udostępnij lokalizację",UPLOAD_ERROR:"Coś poszło nie tak. Plik może być zbyt duży lub jest nieobsługiwany.",SHARE_LOCATION_ERROR:"Nie da się udostępnić lokalizacji: ",LOADING:"Ładowanie...",HUB_EMPTY:"Twoje czaty pojawią się tutaj",HUB_SHOW_EARLIER:"Zobacz starsze czaty",INBOX_NO_CHATS_TITLE:"Brak czatów!",INBOX_NO_CHATS_BODY:"Rozpoczęte konwersacje pojawią się tutaj.",ENABLE_TRANSLATION:"Przetłumacz tę konwersację na język polski",DISABLE_TRANSLATION:"Pokaż oryginał",SEARCH_PLACEHOLDER_TEXT:"Wyszukaj...",SEARCH_SEARCHING:"Wyszukiwanie...",SEARCH_NO_RESULTS:"Nie znaleziono wyników",SEARCH_NO_MORE_RESULTS:"Nie ma innych wyników",SEARCH_RESULTS_CONVERSATIONS:"Konwersacje",SEARCH_RESULTS_MESSAGES:"Wiadomości",SEARCH_RESULTS_SHOW_MORE:"Pokaż więcej",CHAT_NOT_FOUND:"Nie znaleziono konwersacji",DELETE_MESSAGE:"Usuń wiadomość",DELETION_EXPLANATION:"Jeśli usuniesz tę wiadomość, przestanie być widoczna dla wszystkich.",EDIT_MESSAGE:"Edytuj wiadomość",SAVE:"Zapisz",EDITED_INDICATOR:"edytowano",REPLY_TO_MESSAGE:"Odpowiedz",ADD_REACTION:"Dodaj reakcję",AUTH_EXPIRED_OVERLAY_TITLE:"Twoja sesja wygasła",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Odśwież stronę, aby kontynuować",VOICE_MESSAGE:"Wiadomość głosowa",CONTACT_INFORMATION_HIDDEN:"Ukryte informacje",LEAVE_CONVERSATION:"Opuść konwersację",MARK_CONVERSATION_AS_UNREAD:"Oznacz jako nieprzeczytane",STATUS_INDICATOR_ONLINE:"Aktywny",STATUS_INDICATOR_OFFLINE:"Nieobecny",ARIA_LEAVE_SEARCH_MODE:"Wyjdź z trybu wyszukiwania",ARIA_SEARCH_UP:"Szukaj w górę",ARIA_SEARCH_DOWN:"Szukaj w dół",ARIA_CLOSE_CHAT_POPUP:"Zamknij okno czatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Szukaj w tej konwersacji",ARIA_SEARCH:"Szukaj",ARIA_CHAT:"Czat",ARIA_SET_PLAYBACK_SPEED:"ustaw prędkość odtwarzania",ARIA_CANCEL_UPLOAD:"Anuluj przesyłanie",ARIA_STOP_RECORDING:"Zatrzymaj nagrywanie",ARIA_CANCEL_RECORDING:"Anuluj nagrywanie",ARIA_INSERT_EMOJI:"Wstaw emoji",ARIA_PLAY_AUDIO:"odtwórz audio",ARIA_PAUSE_AUDIO:"wstrzymaj audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcji z ${e}`,ARIA_MORE_ACTIONS:"Więcej akcji",ARIA_REPLYING_TO:(t,e)=>`Odpowiadanie na ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Wyjdź z trybu odpowiedzi",SELECT_CONVERSATION:"Wybierz konwersację"}},pt:{code:"pt-BR",name:"Portuguese (Brazil)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pt_BR.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pt/cldr/data.json",translation:{YESTERDAY:"Ontem",TODAY:"Hoje",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"agora mesmo",LOCATION:"Localização",CANCEL:"Cancelar",INBOX:"Caixa de entrada",DESKTOP_NOTIFICATIONS:"Notificações do navegador",DESKTOP_NOTIFICATIONS_ERROR:"Não é possível ativar as notificações da navegador porque seu navegador as bloqueia. Tente procurar nas configurações ou usar um navegador diferente.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} notificação de demonstração`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Se você mantiver a guia do navegador aberta, verá essa mensagem quando alguém falar com você.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Apenas 10.000 caracteres são permitidos.",ENTRYBOX_PLACEHOLDER:"Diga algo...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Esta conversa não está mais ativa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Você pode ler, mas não enviar mensagens.",MESSAGELIST_LOADING_OLDER:"Carregando mensagens antigas...",MESSAGELIST_SHOW_OLDER:"Mostrar mensagens mais antigas",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Esta mensagem foi enviada via email.",YOU_MARKER:"Você",UPLOAD_IN_PROGRESS:"Carregando...",UPLOAD_SEND_FILE:"Enviar arquivo",UPLOAD_SHARE_LOCATION:"Compartilhar localização",UPLOAD_ERROR:"Algo deu errado ao fazer o upload. O arquivo pode não ter suporte ou ser muito grande.",SHARE_LOCATION_ERROR:"Não é possível compartilhar o local: ",LOADING:"Carregando...",HUB_EMPTY:"Seu histórico de conversas será exibido aqui",HUB_SHOW_EARLIER:"Mostrar conversas anteriores",INBOX_NO_CHATS_TITLE:"Ainda não há chats!",INBOX_NO_CHATS_BODY:"Depois de ter uma ou mais conversas, elas serão exibidas aqui.",ENABLE_TRANSLATION:"Traduzir esta conversa para português",DISABLE_TRANSLATION:"Ver a conversa não traduzida",SEARCH_PLACEHOLDER_TEXT:"Busca...",SEARCH_SEARCHING:"Consultando...",SEARCH_NO_RESULTS:"Resultados nao encontrados",SEARCH_NO_MORE_RESULTS:"Não há mais resultados",SEARCH_RESULTS_CONVERSATIONS:"Conversas",SEARCH_RESULTS_MESSAGES:"Mensagens",SEARCH_RESULTS_SHOW_MORE:"Mostrar mais",CHAT_NOT_FOUND:"Conversa não encontrada",DELETE_MESSAGE:"Excluir mensagem",DELETION_EXPLANATION:"Se você excluir esta mensagem, ela desaparecerá para todos.",EDIT_MESSAGE:"Editar mensagem",SAVE:"Salvar",EDITED_INDICATOR:"editada",REPLY_TO_MESSAGE:"Responder",ADD_REACTION:"Adicionar reação",AUTH_EXPIRED_OVERLAY_TITLE:"Sua sessão de chat expirou",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Atualize a página para continuar",VOICE_MESSAGE:"Mensagem de voz",LEAVE_CONVERSATION:"Sair da conversa",MARK_CONVERSATION_AS_UNREAD:"Marcar como não lida",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informação oculta",ARIA_LEAVE_SEARCH_MODE:"Sair do modo de pesquisa",ARIA_SEARCH_UP:"Pesquisar para cima",ARIA_SEARCH_DOWN:"Pesquisar para baixo",ARIA_CLOSE_CHAT_POPUP:"Fechar janela de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Pesquisar nesta conversa",ARIA_SEARCH:"Pesquisar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"definir velocidade de reprodução",ARIA_CANCEL_UPLOAD:"Cancelar envio",ARIA_STOP_RECORDING:"Parar gravação",ARIA_CANCEL_RECORDING:"Cancelar gravação",ARIA_INSERT_EMOJI:"Inserir um emoji",ARIA_PLAY_AUDIO:"reproduzir áudio",ARIA_PAUSE_AUDIO:"pausar áudio",ARIA_REACTION_COUNT:(t,e)=>`${t} reações com ${e}`,ARIA_MORE_ACTIONS:"Mais ações",ARIA_REPLYING_TO:(t,e)=>`Respondendo a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sair do modo de resposta",SELECT_CONVERSATION:"Selecione uma conversa"}},ro:{code:"ro-RO",name:"Romanian (Romania)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ieri",TODAY:"Astăzi",DAYS:"z",HOURS:"o",MINUTES:"m",JUST_NOW:"chiar acum",LOCATION:"Locație",CANCEL:"Anulare",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificări browser",DESKTOP_NOTIFICATIONS_ERROR:"Nu se pot activa notificări browser deoarece browserul dvs. le blochează în mod activ. Încercați să căutați în setări sau utilizând un alt browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Notificare de debit ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Dacă țineți fișa browserului deschis, veți vedea acest pop-up atunci când cineva vorbește cu dvs.",SEND_BUTTON_TEXT:"Trimiteți",ENTRYBOX_TEXT_LIMIT:"Sunt permise numai 10.000 de caractere.",ENTRYBOX_PLACEHOLDER:"Spune ceva...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Această conversație nu mai este activă.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puteți citi, dar nu puteți trimite mesaje.",MESSAGELIST_LOADING_OLDER:"Încărcarea mesajelor mai vechi...",MESSAGELIST_SHOW_OLDER:"Afișați mesaje mai vechi",MESSAGELIST_NEW_MARKER:"Nou",MESSAGE_SENT_VIA_EMAIL:"Acest mesaj a fost trimis prin e-mail",YOU_MARKER:"voi",UPLOAD_IN_PROGRESS:"Încărcarea...",UPLOAD_SEND_FILE:"Trimiteți fișierul",UPLOAD_SHARE_LOCATION:"Distribuiți locația",UPLOAD_ERROR:"Sa încărcat ceva în mod greșit. Fișierul ar putea fi neacceptat sau prea mare.",SHARE_LOCATION_ERROR:"Nu se poate partaja locația: ",LOADING:"Încărcare...",HUB_EMPTY:"Istoricul chat-ului dvs. va apărea aici",HUB_SHOW_EARLIER:"Afișați discuțiile anterioare",INBOX_NO_CHATS_TITLE:"Încă nu vorbești!",INBOX_NO_CHATS_BODY:"După ce ați avut una sau mai multe conversații, acestea vor apărea aici.",ENABLE_TRANSLATION:"Traduceți această conversație în română",DISABLE_TRANSLATION:"Arată originalul",SEARCH_PLACEHOLDER_TEXT:"Căutare...",SEARCH_SEARCHING:"Se caută...",SEARCH_NO_RESULTS:"Nu s-au găsit rezultate",SEARCH_NO_MORE_RESULTS:"Nu mai există rezultate",SEARCH_RESULTS_CONVERSATIONS:"Conversații",SEARCH_RESULTS_MESSAGES:"Mesaje",SEARCH_RESULTS_SHOW_MORE:"Arată mai mult",CHAT_NOT_FOUND:"Conversația nu a fost găsită",DELETE_MESSAGE:"Șterge mesajul",DELETION_EXPLANATION:"Dacă ștergi acest mesaj, acesta va dispărea pentru toată lumea.",EDIT_MESSAGE:"Redactează mesajul",SAVE:"Salvare",EDITED_INDICATOR:"editat",REPLY_TO_MESSAGE:"Răspundeți",ADD_REACTION:"Adaugă o reacție",AUTH_EXPIRED_OVERLAY_TITLE:"Sesiunea dumneavoastră de chat a expirat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Reîmprospătați pagina pentru a continua",VOICE_MESSAGE:"Mesaj vocal",CONTACT_INFORMATION_HIDDEN:"Informații ascunse",LEAVE_CONVERSATION:"Părăsește conversația",MARK_CONVERSATION_AS_UNREAD:"Marcheaza ca necitit",STATUS_INDICATOR_ONLINE:"Activ",STATUS_INDICATOR_OFFLINE:"Plecat",ARIA_LEAVE_SEARCH_MODE:"Părăsește modul de căutare",ARIA_SEARCH_UP:"Caută în sus",ARIA_SEARCH_DOWN:"Caută în jos",ARIA_CLOSE_CHAT_POPUP:"Închide fereastra de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Caută în această conversație",ARIA_SEARCH:"Caută",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"setează viteza de redare",ARIA_CANCEL_UPLOAD:"Anulează încărcarea",ARIA_STOP_RECORDING:"Oprește înregistrarea",ARIA_CANCEL_RECORDING:"Anulează înregistrarea",ARIA_INSERT_EMOJI:"Inserează un emoji",ARIA_PLAY_AUDIO:"redă audio",ARIA_PAUSE_AUDIO:"pauză audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reacții cu ${e}`,ARIA_MORE_ACTIONS:"Mai multe acțiuni",ARIA_REPLYING_TO:(t,e)=>`Răspuns la ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Părăsește modul de răspuns",SELECT_CONVERSATION:"Selectați o conversație"}},ru:{code:"ru-RU",name:"Russian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ru_RU.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ru/emojibase/data.json",translation:{YESTERDAY:"Вчера",TODAY:"Сегодня",DAYS:"д",HOURS:"ч",MINUTES:"м",JUST_NOW:"только что",LOCATION:"Местоположение",CANCEL:"Отмена",INBOX:"Входящие",DESKTOP_NOTIFICATIONS:"Оповещения",DESKTOP_NOTIFICATIONS_ERROR:"Невозможно включить оповещения, потому что ваш браузер активно блокирует их. Проверьте ваши настройки или попробуйте другой браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} демо-оповещение`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Если вкладка вашего браузера открыта, вы увидите всплывающее окошко оповещения когда кто-то отправит вам сообщение.",SEND_BUTTON_TEXT:"Отправить",ENTRYBOX_TEXT_LIMIT:"Разрешено использовать только 10 тысяч символов.",ENTRYBOX_PLACEHOLDER:"Напишите что-нибудь...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Этот разговор больше неактивен.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Вы можете читать, но не отправлять сообщения.",MESSAGELIST_LOADING_OLDER:"Загрузка старых сообщения...",MESSAGELIST_SHOW_OLDER:"Показать старые сообщения",MESSAGELIST_NEW_MARKER:"Новые",MESSAGE_SENT_VIA_EMAIL:"Это сообщение было отправлено по электронной почте",YOU_MARKER:"вы",UPLOAD_IN_PROGRESS:"Загрузка...",UPLOAD_SEND_FILE:"Отправить файл",UPLOAD_SHARE_LOCATION:"Поделиться местоположением",UPLOAD_ERROR:"Что-то пошло не так: такой файл не поддерживается или он слишком большой.",SHARE_LOCATION_ERROR:"Не удается поделиться местоположением: ",LOADING:"Загрузка...",HUB_EMPTY:"Здесь появится ваша история чата",HUB_SHOW_EARLIER:"Показать предыдущие чаты",INBOX_NO_CHATS_TITLE:"Пока нет чатов!",INBOX_NO_CHATS_BODY:"Как только у вас будет один или несколько разговоров, они появятся здесь.",ENABLE_TRANSLATION:"Переведите этот разговор на русский",DISABLE_TRANSLATION:"Show source",SEARCH_PLACEHOLDER_TEXT:"поиск...",SEARCH_SEARCHING:"Поиск...",SEARCH_NO_RESULTS:"Результаты не найдены",SEARCH_NO_MORE_RESULTS:"Больше результатов нет",SEARCH_RESULTS_CONVERSATIONS:"Разговоры",SEARCH_RESULTS_MESSAGES:"Сообщения",SEARCH_RESULTS_SHOW_MORE:"Показать ещё",CHAT_NOT_FOUND:"Чат не найден",DELETE_MESSAGE:"Удалить сообщение",DELETION_EXPLANATION:"Если вы удалите это сообщение, оно исчезнет для всех.",EDIT_MESSAGE:"Изменить сообщение",SAVE:"сохранить",EDITED_INDICATOR:"изменено",REPLY_TO_MESSAGE:"Ответить",ADD_REACTION:"Добавить реакцию",AUTH_EXPIRED_OVERLAY_TITLE:"Срок действия вашего сеанса чата истек",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Обновите страницу, чтобы продолжить",VOICE_MESSAGE:"Голосовое сообщение",CONTACT_INFORMATION_HIDDEN:"Информация скрыта",LEAVE_CONVERSATION:"Выйти из беседы",MARK_CONVERSATION_AS_UNREAD:"Отметить как непрочитанное",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Не в сети",ARIA_LEAVE_SEARCH_MODE:"Выйти из режима поиска",ARIA_SEARCH_UP:"Искать вверх",ARIA_SEARCH_DOWN:"Искать вниз",ARIA_CLOSE_CHAT_POPUP:"Закрыть окно чата",ARIA_SEARCH_INSIDE_CONVERSATION:"Искать в этом разговоре",ARIA_SEARCH:"Поиск",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"установить скорость воспроизведения",ARIA_CANCEL_UPLOAD:"Отменить загрузку",ARIA_STOP_RECORDING:"Остановить запись",ARIA_CANCEL_RECORDING:"Отменить запись",ARIA_INSERT_EMOJI:"Вставить эмодзи",ARIA_PLAY_AUDIO:"воспроизвести аудио",ARIA_PAUSE_AUDIO:"приостановить аудио",ARIA_REACTION_COUNT:(t,e)=>`${t} реакций с ${e}`,ARIA_MORE_ACTIONS:"Дополнительные действия",ARIA_REPLYING_TO:(t,e)=>`Ответ на ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Выйти из режима ответа",SELECT_CONVERSATION:"Выберите беседу"}},sq:{code:"sq-AL",name:"Albanian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Dje",TODAY:"Sot",DAYS:"d",HOURS:"o",MINUTES:"m",JUST_NOW:"Tani",LOCATION:"Pozicion",CANCEL:"Anulo",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Njoftimet e shfletuesit",DESKTOP_NOTIFICATIONS_ERROR:"Nuk mund të aktivizohen njoftimet në shfletues sepse shfletuesi juaj i bllokon ato në mënyrë aktive. Provoni të shikoni cilësimet ose përdorni një shfletues të ndryshëm.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} njoftime në desktop`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Lënia e skedës së shfletuesit tuaj të hapur do të pop-up kur dikush flet me ju.",SEND_BUTTON_TEXT:"Dërgo",ENTRYBOX_TEXT_LIMIT:"Lejohen vetëm 10,000 karaktere",ENTRYBOX_PLACEHOLDER:"Thuaj diçka...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Kjo bisedë nuk është më aktive.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mund të lexoni por jo të dërgoni mesazhe.",MESSAGELIST_LOADING_OLDER:"Duke ngarkuar mesazhe më të vjetra...",MESSAGELIST_SHOW_OLDER:"Trego mesazhe më të vjetra",MESSAGELIST_NEW_MARKER:"E ri",MESSAGE_SENT_VIA_EMAIL:"Ky mesazh u dërgua si email",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Ngarkim...",UPLOAD_SEND_FILE:"Dërgo datotekën",UPLOAD_SHARE_LOCATION:"Ndani lokacionin",UPLOAD_ERROR:"Na vjen keq, diçka nuk shkoi si duhet. Dosja mund të mos ket mbështetje ose mund të jetë shumë e madhe.",SHARE_LOCATION_ERROR:"Nuk mund të ndahet lokacioni: ",LOADING:"Ngarkim...",HUB_EMPTY:"Këtu do të paraqitet/ shfaqet historia e bisedës tuaj",HUB_SHOW_EARLIER:"Shfaqi bisedat e mëparshme",INBOX_NO_CHATS_TITLE:"Nuk ka biseda!",INBOX_NO_CHATS_BODY:"Pasi të keni një ose më shumë biseda, ato do të paraqiten/shfaqen këtu.",ENABLE_TRANSLATION:"Përkthejeni këtë bisedë në shqiptare",DISABLE_TRANSLATION:"Shikoni origjinalin",SEARCH_PLACEHOLDER_TEXT:"Kërko...",SEARCH_SEARCHING:"Kërko...",SEARCH_NO_RESULTS:"Nuk ka rezultate",SEARCH_NO_MORE_RESULTS:"Nuk ka më rezultate",SEARCH_RESULTS_CONVERSATIONS:"Bisedat",SEARCH_RESULTS_MESSAGES:"Mesazhe",SEARCH_RESULTS_SHOW_MORE:"Shfaq më shumë",CHAT_NOT_FOUND:"Biseda nuk u gjet",DELETE_MESSAGE:"Fshi mesazhin",DELETION_EXPLANATION:"Nëse e fshini këtë mesazh, ai do të zhduket për të gjithë.",EDIT_MESSAGE:"Redakto mesazhin",SAVE:"Ruaj",EDITED_INDICATOR:"redaktuar",REPLY_TO_MESSAGE:"Përgjigj",ADD_REACTION:"Shtoni reagimin",AUTH_EXPIRED_OVERLAY_TITLE:"Sesioni juaj i bisedës ka skaduar",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Rifresko faqen për të vazhduar",VOICE_MESSAGE:"Mesazh zanor",CONTACT_INFORMATION_HIDDEN:"informacione të fshehura",LEAVE_CONVERSATION:"Largohu nga bashkëbisedimi",MARK_CONVERSATION_AS_UNREAD:"Shëno si të palexuar",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Larg",ARIA_LEAVE_SEARCH_MODE:"Dil nga mënyra e kërkimit",ARIA_SEARCH_UP:"Kërko lart",ARIA_SEARCH_DOWN:"Kërko poshtë",ARIA_CLOSE_CHAT_POPUP:"Mbyll dritaren e bisedës",ARIA_SEARCH_INSIDE_CONVERSATION:"Kërko në këtë bisedë",ARIA_SEARCH:"Kërko",ARIA_CHAT:"Bisedë",ARIA_SET_PLAYBACK_SPEED:"vendos shpejtësinë e luajtjes",ARIA_CANCEL_UPLOAD:"Anulo ngarkimin",ARIA_STOP_RECORDING:"Ndalo regjistrimin",ARIA_CANCEL_RECORDING:"Anulo regjistrimin",ARIA_INSERT_EMOJI:"Fut një emoji",ARIA_PLAY_AUDIO:"luaj audio",ARIA_PAUSE_AUDIO:"pauzë audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reagime me ${e}`,ARIA_MORE_ACTIONS:"Më shumë veprime",ARIA_REPLYING_TO:(t,e)=>`Duke u përgjigjur ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Dil nga mënyra e përgjigjes",SELECT_CONVERSATION:"Zgjidhni një bashkëbisedim"}},sr:{code:"sr-SP",name:"Serbian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Juče",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Browser Notifikacija",DESKTOP_NOTIFICATIONS_ERROR:"Browser notifikacije nisu omogućene jer ih vaš pregledač aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi pregledač.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu pregledača ostavite otvorenu, pojaviće se ovaj pop-up kada neko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Kaži nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možete da čitate, ali ne i da šaljete poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana imejlom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovde će biti prikazana istorija razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovde.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na srpski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",SEARCH_RESULTS_CONVERSATIONS:"Razgovori",SEARCH_RESULTS_MESSAGES:"Poruke",SEARCH_RESULTS_SHOW_MORE:"Prikaži više",CHAT_NOT_FOUND:"Ćaskanje nije pronađeno",DELETE_MESSAGE:"Izbriši poruku",DELETION_EXPLANATION:"Ako obrišete ovu poruku, ona neće biti vidljiva ni za koga.",EDIT_MESSAGE:"Ispravi poruku",SAVE:"Sačuvaj",EDITED_INDICATOR:"ispravljeno",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodaj reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša sesija ćaskanja je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvežite stranicu da biste nastavili",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Sakrivene informacije",LEAVE_CONVERSATION:"Napusti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitanu",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Neaktivan",ARIA_LEAVE_SEARCH_MODE:"Напусти режим претраге",ARIA_SEARCH_UP:"Тражи горе",ARIA_SEARCH_DOWN:"Тражи доле",ARIA_CLOSE_CHAT_POPUP:"Затвори прозор ћаскања",ARIA_SEARCH_INSIDE_CONVERSATION:"Тражи у овом разговору",ARIA_SEARCH:"Тражи",ARIA_CHAT:"Ћаскање",ARIA_SET_PLAYBACK_SPEED:"постави брзину репродукције",ARIA_CANCEL_UPLOAD:"Откажи отпремање",ARIA_STOP_RECORDING:"Заустави снимање",ARIA_CANCEL_RECORDING:"Откажи снимање",ARIA_INSERT_EMOJI:"Уметни емоџи",ARIA_PLAY_AUDIO:"репродукуј аудио",ARIA_PAUSE_AUDIO:"паузирај аудио",ARIA_REACTION_COUNT:(t,e)=>`${t} реакција са ${e}`,ARIA_MORE_ACTIONS:"Више радњи",ARIA_REPLYING_TO:(t,e)=>`Одговарање кориснику ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja",SELECT_CONVERSATION:"Izaberite razgovor"}},sv:{code:"sv-SE",name:"Swedish (Sweden)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/sv/emojibase/data.json",translation:{YESTERDAY:"Igår",TODAY:"Idag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just nu",LOCATION:"Plats",CANCEL:"Avbryt",INBOX:"Inkorg",DESKTOP_NOTIFICATIONS:"Webbläsarnotiser",DESKTOP_NOTIFICATIONS_ERROR:"Kan inte aktivera webbläsarnotiser eftersom din webbläsare aktivt blockerar dem. Se över inställningarna eller använd en annan webbläsare.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demonotis`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Om du har fliken i webbläsaren öppen så kommer den här notisen visas när någon pratar med dig.",SEND_BUTTON_TEXT:"Skicka",ENTRYBOX_TEXT_LIMIT:"Max 10 000 tecken är tillåtet.",ENTRYBOX_PLACEHOLDER:"Skriv ett meddelande...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Den här konversationen är inte längre aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan läsa men inte skicka meddelanden.",MESSAGELIST_LOADING_OLDER:"Läser in tidigare meddelanden...",MESSAGELIST_SHOW_OLDER:"Visa tidigare meddelanden",MESSAGELIST_NEW_MARKER:"Nytt",MESSAGE_SENT_VIA_EMAIL:"Detta meddelande skickades via e-post",YOU_MARKER:"du",UPLOAD_IN_PROGRESS:"Laddar upp...",UPLOAD_SEND_FILE:"Skicka fil",UPLOAD_SHARE_LOCATION:"Dela plats",UPLOAD_ERROR:"Något gick fel vid uppladdningen. Filen kan vara av en typ som inte stöds eller är för stor.",SHARE_LOCATION_ERROR:"Kan inte dela plats: ",LOADING:"Laddar...",HUB_EMPTY:"Din chatthistorik kommer att visas här",HUB_SHOW_EARLIER:"Visa tidigare chattar",INBOX_NO_CHATS_TITLE:"Inga chattar ännu!",INBOX_NO_CHATS_BODY:"När du har haft en eller flera konversationer kommer de att visas här.",ENABLE_TRANSLATION:"Översätt den här konversationen till svenska",DISABLE_TRANSLATION:"Visa original",SEARCH_PLACEHOLDER_TEXT:"Sök...",SEARCH_SEARCHING:"Söker...",SEARCH_NO_RESULTS:"Inga resultat hittades",SEARCH_NO_MORE_RESULTS:"Inga fler resultat",SEARCH_RESULTS_CONVERSATIONS:"Konversationer",SEARCH_RESULTS_MESSAGES:"Meddelanden",SEARCH_RESULTS_SHOW_MORE:"Visa mer",CHAT_NOT_FOUND:"Chatten hittades inte",DELETE_MESSAGE:"Radera meddelandet",DELETION_EXPLANATION:"Om du raderar det här meddelandet försvinner det för alla.",EDIT_MESSAGE:"Redigera meddelandet",SAVE:"Spara",EDITED_INDICATOR:"redigerad",REPLY_TO_MESSAGE:"Svara",ADD_REACTION:"Lägg till reaktion",AUTH_EXPIRED_OVERLAY_TITLE:"Din chatsession har gått ut",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Uppdatera sidan för att fortsätta",VOICE_MESSAGE:"Röstmeddelande",CONTACT_INFORMATION_HIDDEN:"Dold information",LEAVE_CONVERSATION:"Lämna konversationen",MARK_CONVERSATION_AS_UNREAD:"Markera som oläst",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Avsluta sökläge",ARIA_SEARCH_UP:"Sök uppåt",ARIA_SEARCH_DOWN:"Sök nedåt",ARIA_CLOSE_CHAT_POPUP:"Stäng chattfönstret",ARIA_SEARCH_INSIDE_CONVERSATION:"Sök i denna konversation",ARIA_SEARCH:"Sök",ARIA_CHAT:"Chatt",ARIA_SET_PLAYBACK_SPEED:"Ställ in uppspelningshastighet",ARIA_CANCEL_UPLOAD:"Avbryt uppladdning",ARIA_STOP_RECORDING:"Stoppa inspelning",ARIA_CANCEL_RECORDING:"Avbryt inspelning",ARIA_INSERT_EMOJI:"Infoga en emoji",ARIA_PLAY_AUDIO:"Spela upp ljud",ARIA_PAUSE_AUDIO:"Pausa ljud",ARIA_REACTION_COUNT:(t,e)=>`${t} Reaktioner med ${e}`,ARIA_MORE_ACTIONS:"Fler åtgärder",ARIA_REPLYING_TO:(t,e)=>`Svarar på ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avsluta svarsläge",SELECT_CONVERSATION:"Välj en konversation"}},tr:{code:"tr-TR",name:"Turkish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/tr.js",emojiDataUrl:null,translation:{YESTERDAY:"Dün",TODAY:"Bugün",DAYS:"g",HOURS:"s",MINUTES:"d",JUST_NOW:"az önce",LOCATION:"Konum",CANCEL:"İptal",INBOX:"Gelen Kutusu",SEND_BUTTON_TEXT:"Gönder",ENTRYBOX_TEXT_LIMIT:"En fazla 10.000 karaktere izin veriliyor.",ENTRYBOX_PLACEHOLDER:"Bir şeyler söyle...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Bu konuşma artık aktif değil.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mesajları okuyabilirsiniz ancak mesaj gönderemezsiniz.",MESSAGELIST_LOADING_OLDER:"Eski mesajlar yükleniyor...",MESSAGELIST_SHOW_OLDER:"Eski mesajları göster",MESSAGELIST_NEW_MARKER:"Yeni",DESKTOP_NOTIFICATIONS:"Tarayıcı bildirimleri",DESKTOP_NOTIFICATIONS_ERROR:"Tarayıcınız aktif olarak engellediğinden tarayıcı bildirimlerini etkinleştiremiyoruz. Ayarları kontrol etmeyi veya farklı bir tarayıcı kullanmayı deneyebilirsiniz.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} test bildirimi`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Eğer tarayıcınızın penceresini açık tutarsanız biri mesaj yazdığında bu bildirimi göreceksiniz.",MESSAGE_SENT_VIA_EMAIL:"Bu mesaj e-posta ile gönderilmiştir.",YOU_MARKER:"siz",UPLOAD_IN_PROGRESS:"Yükleniyor...",UPLOAD_SEND_FILE:"Dosya gönder",UPLOAD_SHARE_LOCATION:"Konum paylaş",UPLOAD_ERROR:"Yükleme sırasında bir şeyler yanlış gitti. Dosya desteklenmiyor veya izin verilenden büyük olabilir.",SHARE_LOCATION_ERROR:"Konum paylaşılamadı: ",LOADING:"Yükleniyor...",HUB_EMPTY:"Konuşma geçmişiniz burada görünecek",HUB_SHOW_EARLIER:"Önceki konuşmaları göster",INBOX_NO_CHATS_TITLE:"Henüz konuşma yok!",INBOX_NO_CHATS_BODY:"Bir veya daha fazla konuşma başlattığınız konuşmalar burada belirecek.",ENABLE_TRANSLATION:"Bu konuşmayı Türkçe'ye çevir",DISABLE_TRANSLATION:"Orijinali göster",SEARCH_PLACEHOLDER_TEXT:"Ara...",SEARCH_SEARCHING:"Arıyor...",SEARCH_NO_RESULTS:"Sonuç bulunamadı",SEARCH_NO_MORE_RESULTS:"Başka sonuç bulunamadı.",SEARCH_RESULTS_CONVERSATIONS:"Konuşmalar",SEARCH_RESULTS_MESSAGES:"Mesajlar",SEARCH_RESULTS_SHOW_MORE:"Daha fazla göster",CHAT_NOT_FOUND:"Sohbet bulunamadı",DELETE_MESSAGE:"Mesajı sil",DELETION_EXPLANATION:"Bu mesajı silerseniz herkes için görünmez olacaktır.",EDIT_MESSAGE:"Mesajı düzenle",SAVE:"Kaydet",EDITED_INDICATOR:"düzenlenmiş",REPLY_TO_MESSAGE:"Yanıtla",ADD_REACTION:"Tepki ekle",AUTH_EXPIRED_OVERLAY_TITLE:"Sohbet oturumunuz sona erdi",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Devam etmek için sayfayı yenileyin",VOICE_MESSAGE:"Sesli mesaj",CONTACT_INFORMATION_HIDDEN:"Gizli bilgi",LEAVE_CONVERSATION:"Konuşmadan ayrıl",MARK_CONVERSATION_AS_UNREAD:"Okunmamış olarak işaretle",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Uzakta",ARIA_LEAVE_SEARCH_MODE:"Arama modundan çık",ARIA_SEARCH_UP:"Yukarı ara",ARIA_SEARCH_DOWN:"Aşağı ara",ARIA_CLOSE_CHAT_POPUP:"Sohbet penceresini kapat",ARIA_SEARCH_INSIDE_CONVERSATION:"Bu konuşmada ara",ARIA_SEARCH:"Ara",ARIA_CHAT:"Sohbet",ARIA_SET_PLAYBACK_SPEED:"oynatma hızını ayarla",ARIA_CANCEL_UPLOAD:"Yüklemeyi iptal et",ARIA_STOP_RECORDING:"Kaydı durdur",ARIA_CANCEL_RECORDING:"Kaydı iptal et",ARIA_INSERT_EMOJI:"Emoji ekle",ARIA_PLAY_AUDIO:"sesi oynat",ARIA_PAUSE_AUDIO:"sesi duraklat",ARIA_REACTION_COUNT:(t,e)=>`${t} tepki (${e})`,ARIA_MORE_ACTIONS:"Daha fazla işlem",ARIA_REPLYING_TO:(t,e)=>`${t}'a yanıtlama: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Yanıt modundan çık",SELECT_CONVERSATION:"Bir konuşma seçin"}},uk:{code:"uk-UA",name:"Ukrainian (Ukraine)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/uk/cldr/data.json",translation:{YESTERDAY:"Вчора",TODAY:"Сьогодні",DAYS:"d",HOURS:"h",MINUTES:"м",JUST_NOW:"просто зараз",LOCATION:"Місцезнаходження",CANCEL:"Скасувати",INBOX:"Вхідні",DESKTOP_NOTIFICATIONS:"Сповіщення в браузері",DESKTOP_NOTIFICATIONS_ERROR:"Неможливо ввімкнути сповіщення в браузері, оскільки ваш веб-переглядач активно їх блокує. Спробуйте переглянути налаштування або використовувати інший браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Демо-повідомлення про ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Якщо ви відкриєте вкладку веб-переглядача відкритою, ви побачите це спливаюче вікно, коли хтось спілкується з вами.",SEND_BUTTON_TEXT:"Надіслати",ENTRYBOX_TEXT_LIMIT:"Дозволено лише 10 000 символів.",ENTRYBOX_PLACEHOLDER:"Скажи щось...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ця розмова більше не активна.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Ви можете читати, але не надсилати повідомлення.",MESSAGELIST_LOADING_OLDER:"Завантаження старих повідомлень...",MESSAGELIST_SHOW_OLDER:"Показати старіші повідомлення",MESSAGELIST_NEW_MARKER:"Нові",MESSAGE_SENT_VIA_EMAIL:"Це повідомлення надіслано електронною поштою",YOU_MARKER:"ти",UPLOAD_IN_PROGRESS:"Завантаження...",UPLOAD_SEND_FILE:"Надіслати файл",UPLOAD_SHARE_LOCATION:"Поділитися місцезнаходженням",UPLOAD_ERROR:"На жаль, під час завантаження щось не вдалось. Файл може бути непідтримуваним або занадто великим.",SHARE_LOCATION_ERROR:"Неможливо поділити місцезнаходження: ",LOADING:"Завантаження...",HUB_EMPTY:"Тут відобразиться ваша історія чатів",HUB_SHOW_EARLIER:"Показати попередні чати",INBOX_NO_CHATS_TITLE:"Чатів ще немає!",INBOX_NO_CHATS_BODY:"Після того, як ви проведете одну чи кілька бесід, вони з’являться тут.",ENABLE_TRANSLATION:"Перекласти цю розмову англійською",DISABLE_TRANSLATION:"Показати оригінал",SEARCH_PLACEHOLDER_TEXT:"Пошук...",SEARCH_SEARCHING:"Пошук...",SEARCH_NO_RESULTS:"Не знайдено результатів",SEARCH_NO_MORE_RESULTS:"Більше немає результатів",SEARCH_RESULTS_CONVERSATIONS:"Розмови",SEARCH_RESULTS_MESSAGES:"Повідомлення",SEARCH_RESULTS_SHOW_MORE:"Показати більше",CHAT_NOT_FOUND:"Чат не знайдено",DELETE_MESSAGE:"Видалити повідомлення",DELETION_EXPLANATION:"Якщо ви видалите це повідомлення, воно зникне для всіх.",EDIT_MESSAGE:"Редагувати повідомлення",SAVE:"Зберегти",EDITED_INDICATOR:"відредаговано",REPLY_TO_MESSAGE:"Відповісти",ADD_REACTION:"Додати реакцію",AUTH_EXPIRED_OVERLAY_TITLE:"Ваша сесія в чаті закінчилась",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Оновіть сторінку, щоб продовжити",VOICE_MESSAGE:"Голосове повідомлення",CONTACT_INFORMATION_HIDDEN:"Прихована інформація",LEAVE_CONVERSATION:"Залишити розмову",MARK_CONVERSATION_AS_UNREAD:"Відзначити як непрочитане",STATUS_INDICATOR_ONLINE:"Активний",STATUS_INDICATOR_OFFLINE:"Відсутній",ARIA_LEAVE_SEARCH_MODE:"Вийти з режиму пошуку",ARIA_SEARCH_UP:"Шукати вгору",ARIA_SEARCH_DOWN:"Шукати вниз",ARIA_CLOSE_CHAT_POPUP:"Закрити вікно чату",ARIA_SEARCH_INSIDE_CONVERSATION:"Шукати в цій розмові",ARIA_SEARCH:"Пошук",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"встановити швидкість відтворення",ARIA_CANCEL_UPLOAD:"Скасувати завантаження",ARIA_STOP_RECORDING:"Зупинити запис",ARIA_CANCEL_RECORDING:"Скасувати запис",ARIA_INSERT_EMOJI:"Вставити емодзі",ARIA_PLAY_AUDIO:"відтворити аудіо",ARIA_PAUSE_AUDIO:"призупинити аудіо",ARIA_REACTION_COUNT:(t,e)=>`${t} реакцій з ${e}`,ARIA_MORE_ACTIONS:"Більше дій",ARIA_REPLYING_TO:(t,e)=>`Відповідь на ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Вийти з режиму відповіді",SELECT_CONVERSATION:"Виберіть розмову"}},vi:{code:"vi-VN",name:"Vietnamese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/vi.js",emojiDataUrl:null,translation:{YESTERDAY:"Hôm qua",TODAY:"Hôm nay",DAYS:"ngày",HOURS:"giờ",MINUTES:"phút",JUST_NOW:"vừa xong",LOCATION:"Địa điểm",CANCEL:"Hủy",INBOX:"Hộp thư đến",DESKTOP_NOTIFICATIONS:"Thông báo trình duyệt",DESKTOP_NOTIFICATIONS_ERROR:"Không thể bật thông báo trên trình duyệt vì trình duyệt của bạn đang tắt chức năng này. Hãy thử tìm trong cài đặt trình duyệt hoặc sử dụng một trình duyệt khác.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} thông báo thử nghiệm`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Nếu bạn giữ tab trình duyệt của bạn mở, bạn sẽ thấy cửa sổ bật lên khi ai đó nói chuyện với bạn.",SEND_BUTTON_TEXT:"Gửi",ENTRYBOX_TEXT_LIMIT:"Tối đa 10.000 ký tự.",ENTRYBOX_PLACEHOLDER:"Nói gì đó...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cuộc hội thoại này không còn hoạt động.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Bạn có thể đọc, nhưng không thể gửi tin nhắn.",MESSAGELIST_LOADING_OLDER:"Đang tải tin nhắn cũ...",MESSAGELIST_SHOW_OLDER:"Hiển thị tin nhắn trước đó",MESSAGELIST_NEW_MARKER:"Mới",MESSAGE_SENT_VIA_EMAIL:"Tin nhắn này đã được gửi qua email",YOU_MARKER:"bạn",UPLOAD_IN_PROGRESS:"Đang tải lên...",UPLOAD_SEND_FILE:"Gửi tệp",UPLOAD_SHARE_LOCATION:"Chia sẻ vị trí",UPLOAD_ERROR:"Thật không may, quá trình tải lên không thành công. Tệp không được hỗ trợ hoặc quá lớn.",SHARE_LOCATION_ERROR:"Không thể chia sẻ vị trí: ",LOADING:"Đang tải...",HUB_EMPTY:"Lịch sử trò chuyện của bạn sẽ hiển thị ở đây",HUB_SHOW_EARLIER:"Hiển thị các cuộc trò chuyện trước đó",INBOX_NO_CHATS_TITLE:"Chưa có cuộc trò chuyện nào!",INBOX_NO_CHATS_BODY:"Khi bạn đã có một hoặc nhiều cuộc trò chuyện, chúng sẽ hiển thị ở đây.",ENABLE_TRANSLATION:"Dịch cuộc hội thoại sang Tiếng Việt",DISABLE_TRANSLATION:"Hiển thị nội dung gốc",SEARCH_PLACEHOLDER_TEXT:"TÌm kiếm...",SEARCH_SEARCHING:"Đang tìm kiếm...",SEARCH_NO_RESULTS:"Không tìm thấy kết quả nào",SEARCH_NO_MORE_RESULTS:"Không có kết quả nào khác",SEARCH_RESULTS_CONVERSATIONS:"Cuộc trò chuyện",SEARCH_RESULTS_MESSAGES:"Tin nhắn",SEARCH_RESULTS_SHOW_MORE:"Hiển thị thêm",CHAT_NOT_FOUND:"Không tìm thấy cuộc trò chuyện",DELETE_MESSAGE:"Xóa tin nhắn",DELETION_EXPLANATION:"Nếu bạn xóa tin nhắn này, tất cả mọi người sẽ không còn thấy nó.",EDIT_MESSAGE:"Chỉnh sửa tin nhắn",SAVE:"lưu",EDITED_INDICATOR:"đã chỉnh sửa",REPLY_TO_MESSAGE:"đáp lại",ADD_REACTION:"Thêm biểu tượng cảm xúc",AUTH_EXPIRED_OVERLAY_TITLE:"Phiên trò chuyện của bạn đã hết hạn",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Hãy làm mới trang để tiếp tục",VOICE_MESSAGE:"Tin nhắn thoại",CONTACT_INFORMATION_HIDDEN:"Thông tin ẩn",LEAVE_CONVERSATION:"Thoát khỏi cuộc trò chuyện",MARK_CONVERSATION_AS_UNREAD:"Đánh dấu là chưa đọc",STATUS_INDICATOR_ONLINE:"Hoạt động",STATUS_INDICATOR_OFFLINE:"Vắng mặt",ARIA_LEAVE_SEARCH_MODE:"Thoát chế độ tìm kiếm",ARIA_SEARCH_UP:"Tìm kiếm lên trên",ARIA_SEARCH_DOWN:"Tìm kiếm xuống dưới",ARIA_CLOSE_CHAT_POPUP:"Đóng cửa sổ trò chuyện",ARIA_SEARCH_INSIDE_CONVERSATION:"Tìm kiếm trong cuộc trò chuyện này",ARIA_SEARCH:"Tìm kiếm",ARIA_CHAT:"Trò chuyện",ARIA_SET_PLAYBACK_SPEED:"đặt tốc độ phát",ARIA_CANCEL_UPLOAD:"Hủy tải lên",ARIA_STOP_RECORDING:"Dừng ghi âm",ARIA_CANCEL_RECORDING:"Hủy ghi âm",ARIA_INSERT_EMOJI:"Chèn biểu tượng cảm xúc",ARIA_PLAY_AUDIO:"phát âm thanh",ARIA_PAUSE_AUDIO:"tạm dừng âm thanh",ARIA_REACTION_COUNT:(t,e)=>`${t} phản ứng với ${e}`,ARIA_MORE_ACTIONS:"Thêm hành động",ARIA_REPLYING_TO:(t,e)=>`Đang trả lời ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Thoát chế độ trả lời",SELECT_CONVERSATION:"Chọn một cuộc trò chuyện"}},zh:{code:"zh-CN",name:"Chinese (Simplified)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh/emojibase/data.json",translation:{YESTERDAY:"昨天",TODAY:"今天",DAYS:"天",HOURS:"小时",MINUTES:"分钟",JUST_NOW:"刚才",LOCATION:"地点",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"浏览器通知",DESKTOP_NOTIFICATIONS_ERROR:"因浏览器设置为阻止,所以无法激活浏览器提醒。请去设置里查看或者尝试其他的浏览器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} 演示提醒`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"只要保持浏览器开着,如果有人和你对话,将会自动弹出对话窗口。",SEND_BUTTON_TEXT:"发送",ENTRYBOX_TEXT_LIMIT:"不超过10,000个字符。",ENTRYBOX_PLACEHOLDER:"写点什么吧……",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"该对话已结束。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"你只能阅读信息,不能发送信息。",MESSAGELIST_LOADING_OLDER:"载入之前的信息……",MESSAGELIST_SHOW_OLDER:"显示之前的信息",MESSAGELIST_NEW_MARKER:"新消息",MESSAGE_SENT_VIA_EMAIL:"该信息已通过邮件发送。",YOU_MARKER:"你",UPLOAD_IN_PROGRESS:"上传中……",UPLOAD_SEND_FILE:"发送文件",UPLOAD_SHARE_LOCATION:"分享地址",UPLOAD_ERROR:"上传出错。文件格式不支持或者太大。",SHARE_LOCATION_ERROR:"无法分享地址: ",LOADING:"正在载入……",HUB_EMPTY:"你的聊天记录将在此显示。",HUB_SHOW_EARLIER:"显示之前的聊天记录。",INBOX_NO_CHATS_TITLE:"暂无任何聊天记录!",INBOX_NO_CHATS_BODY:"如果你有一个或多个对话窗口进行中,将显示在这里。",ENABLE_TRANSLATION:"翻译至简体中文",DISABLE_TRANSLATION:"查看原文",SEARCH_PLACEHOLDER_TEXT:"搜索...",SEARCH_SEARCHING:"正在搜索...",SEARCH_NO_RESULTS:"未找到结果",SEARCH_NO_MORE_RESULTS:"无更多结果",SEARCH_RESULTS_CONVERSATIONS:"对话",SEARCH_RESULTS_MESSAGES:"消息",SEARCH_RESULTS_SHOW_MORE:"显示更多",CHAT_NOT_FOUND:"未找到“聊天”",DELETE_MESSAGE:"删除消息",DELETION_EXPLANATION:"如果您删除此消息,那么所有人都将无法再看到它。",EDIT_MESSAGE:"编辑消息",SAVE:"保存",EDITED_INDICATOR:"本消息有改动",REPLY_TO_MESSAGE:"回复",ADD_REACTION:"添加反应",AUTH_EXPIRED_OVERLAY_TITLE:"您的聊天会话已过期",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"刷新页面以继续",VOICE_MESSAGE:"语音消息",CONTACT_INFORMATION_HIDDEN:"隐藏信息",LEAVE_CONVERSATION:"离开对话",MARK_CONVERSATION_AS_UNREAD:"标记为未读",STATUS_INDICATOR_ONLINE:"活跃",STATUS_INDICATOR_OFFLINE:"离开",ARIA_LEAVE_SEARCH_MODE:"退出搜索模式",ARIA_SEARCH_UP:"向上搜索",ARIA_SEARCH_DOWN:"向下搜索",ARIA_CLOSE_CHAT_POPUP:"关闭聊天弹窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此对话中搜索",ARIA_SEARCH:"搜索",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"设置播放速度",ARIA_CANCEL_UPLOAD:"取消上传",ARIA_STOP_RECORDING:"停止录音",ARIA_CANCEL_RECORDING:"取消录音",ARIA_INSERT_EMOJI:"插入表情符号",ARIA_PLAY_AUDIO:"播放音频",ARIA_PAUSE_AUDIO:"暂停音频",ARIA_REACTION_COUNT:(t,e)=>`${t}个反应(${e})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(t,e)=>`正在回复 ${t}:${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回复模式",SELECT_CONVERSATION:"选择对话"}},zhTw:{code:"zh-TW",name:"Chinese (Traditional)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh-hant/cldr/data.json",translation:{YESTERDAY:"昨天",TODAY:"昨天",DAYS:"天",HOURS:"小時",MINUTES:"分",JUST_NOW:"現在",LOCATION:"地點",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"瀏覽器通知",DESKTOP_NOTIFICATIONS_ERROR:"無法啟用瀏覽器通知,因為您的瀏覽器主動阻止它們。 嘗試查看設置或使用其他瀏覽器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} 演示通知`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"如果您持續打開瀏覽器標籤頁,當有人與您通話時,您會看到此彈出窗口。",SEND_BUTTON_TEXT:"發送",ENTRYBOX_TEXT_LIMIT:"只允許10.000個字符。",ENTRYBOX_PLACEHOLDER:"說些什麼...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"此對話不再有效。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"您可以閱讀,但不能發送消息。",MESSAGELIST_LOADING_OLDER:"加載舊訊息...",MESSAGELIST_SHOW_OLDER:"顯示較舊的訊息",MESSAGELIST_NEW_MARKER:"新的",MESSAGE_SENT_VIA_EMAIL:"此訊息是通過電郵發送的",YOU_MARKER:"您",UPLOAD_IN_PROGRESS:"上傳中...",UPLOAD_SEND_FILE:"發送文件",UPLOAD_SHARE_LOCATION:"共享位置",UPLOAD_ERROR:"不幸的是,上傳出了問題。 該文件可能不受支持或太大。",SHARE_LOCATION_ERROR:"無法分享位置:",LOADING:"載入中...",HUB_EMPTY:"您的聊天記錄將顯示在此處",HUB_SHOW_EARLIER:"顯示早先的聊天記錄",INBOX_NO_CHATS_TITLE:"還沒聊天!",INBOX_NO_CHATS_BODY:"一旦您進行了一次或多次對話,他們就會顯示在此處。",ENABLE_TRANSLATION:"翻譯此對話至繁體中文",DISABLE_TRANSLATION:"顯示原文",SEARCH_PLACEHOLDER_TEXT:"搜尋...",SEARCH_SEARCHING:"正在搜尋...",SEARCH_NO_RESULTS:"找不到任何結果",SEARCH_NO_MORE_RESULTS:"沒有其他結果",SEARCH_RESULTS_CONVERSATIONS:"對話",SEARCH_RESULTS_MESSAGES:"訊息",SEARCH_RESULTS_SHOW_MORE:"顯示更多",CHAT_NOT_FOUND:"查無對話",DELETE_MESSAGE:"刪除訊息",DELETION_EXPLANATION:"您如果刪除這條訊息,所有人都將看不到它。",EDIT_MESSAGE:"編輯訊息",SAVE:"儲存",EDITED_INDICATOR:"已編輯",REPLY_TO_MESSAGE:"回覆",ADD_REACTION:"加入表情回應",AUTH_EXPIRED_OVERLAY_TITLE:"您的會話過程已過期",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"請刷新頁面以繼續",VOICE_MESSAGE:"語音訊息",CONTACT_INFORMATION_HIDDEN:"隱藏訊息",LEAVE_CONVERSATION:"離開對話",MARK_CONVERSATION_AS_UNREAD:"標記為未讀",STATUS_INDICATOR_ONLINE:"活躍",STATUS_INDICATOR_OFFLINE:"離開",ARIA_LEAVE_SEARCH_MODE:"離開搜尋模式",ARIA_SEARCH_UP:"向上搜尋",ARIA_SEARCH_DOWN:"向下搜尋",ARIA_CLOSE_CHAT_POPUP:"關閉聊天彈窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此對話中搜尋",ARIA_SEARCH:"搜尋",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"設定播放速度",ARIA_CANCEL_UPLOAD:"取消上傳",ARIA_STOP_RECORDING:"停止錄音",ARIA_CANCEL_RECORDING:"取消錄音",ARIA_INSERT_EMOJI:"插入表情符號",ARIA_PLAY_AUDIO:"播放音訊",ARIA_PAUSE_AUDIO:"暫停音訊",ARIA_REACTION_COUNT:(t,e)=>`${t}個反應(${e})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(t,e)=>`正在回覆 ${t}:${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回覆模式",SELECT_CONVERSATION:"選擇對話"}}},Vm=()=>{const t=document.createElement("canvas");t.width=t.height=1;const e=t.getContext("2d");return e.textBaseline="top",e.font='100px "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Twemoji Mozilla","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',e.scale(.01,.01),e},Nd=(t,e)=>{const n=Vm();return n.fillStyle=e,n.fillText(t,0,0),n.getImageData(0,0,1,1).data},Kg=t=>!t.includes("")||Vm().measureText(t).width<160,qg=(t,e)=>{const n=[...t].join(",");return n===[...e].join(",")&&!n.startsWith("0,0,0,")};function zm(t){try{return(function(e){const n=Nd(e,"#000"),r=Nd(e,"#fff"),i=Kg(e);return n&&r&&i&&qg(n,r)})(t)}catch(e){return!0}}var Sf;const Ym=(Sf=globalThis.window)!=null&&Sf.document?(function(){if(typeof window=="undefined"||window.E2E||window.__talkjsE2E)return 16;const t={"":16,"🚶➡️":15.1,"🫨":15,"🫠":14,"😵💫":13.1,"🥲":13,"🧑🦰":12.1,"🥻":12,"🥰":11,"🤩":5,"👱♀️":4,"🤣":3,"👁️🗨️":2,"😀":1,"😐️":.7,"😃":.6};for(const[e,n]of Object.entries(t))if(zm(e))return n})():0;class Gm{constructor(e,n){this.currentUser$=le(null),this.app$=le(null),this.appId$=le(null),this.extUserId$=le(null),this.hasTokenFetcher$=le(!1),this.authTokenState$=le("idle"),this.themeCustom$=le(id({value:void 0})),this.highlightedStrings$=le([]),this.device$=le({supportsEmojiPicker:!!Ym,isMobile:typeof window!="undefined"&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=le({unknownUser:!1,wrongAppId:!1,serverError:!1}),this.conversationSearch=null,this.messageSearch=null,this.locale$=le(()=>{var s,a;const r=this.extUserId$.get(),i=this.app$.appMetadata.defaultLocale.get(),o=this.currentUser$.locale.get();return(a=(s=r&&o)!=null?s:i)!=null?a:"en-US"}),this.translationData$=le(()=>(function(r){const i=r.replace(/_/g,"-").toLowerCase(),o=Cd[i];if(o)return{strings:{...o.translation,locale:i},emojiPickerTranslationUrl:o.emojiPickerTranslationUrl,emojiDataUrl:o.emojiDataUrl};const s=i.slice(0,2),a=Cd[s];return a?{strings:{...a.translation,locale:s},emojiPickerTranslationUrl:a.emojiPickerTranslationUrl,emojiDataUrl:a.emojiDataUrl}:(Ne.warn(`User locale '${r}' not supported; falling back to English.`),{strings:{...jr.translation,locale:"en-US"},emojiPickerTranslationUrl:jr.emojiPickerTranslationUrl,emojiDataUrl:jr.emojiDataUrl})})(this.locale$.get())),this.t$=le(()=>this.translationData$.strings.get()),Gt(()=>{this.appId$.set(e),this.extUserId$.set(n)})}updateThemeCustom(e){this.themeCustom$.set(id({value:e}))}}const Jg={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};class Zg extends Gm{constructor(e,n){super(e,n),this.type="ChatboxStore",this.messageSubscriptions={},this.readyForNewMessagesPromise=Promise.resolve(),this.renderedConversationId$=le(void 0),this.focusedMessage$=le(null),this.chatSearchState$=le("hidden"),this.newMessageMarker$=le(void 0),this.state$=le({loadingConversationId:null,currentConversationId:null,editor:{isEmpty:!0,atTextLimit:!1,characterCount:0,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0},enterSendsMessage:!0,referencedMessageId:null,editingMessageId:null,unknownConversations:{},conversations:{},messages:{},participants:{},typing:{},isUserConnected:{},ephemeralMessages:{},ephemeralMessageIdMapping:{},localFileBlobUrls:{},currentConversation:()=>{const r=this.state$.currentConversationId.get();return r&&this.state$.conversations.child(r).get()},userPermissions:()=>{var s;const r=((s=this.app$.features.get())!=null?s:[]).includes("search_in_conv"),i=this.app$.role.general.get(),o=this.app$.role.permissions.get();return ie.defined(i),ie.defined(o),{canSearch:r,showTypingIndicator:i.showTypingIndicators,canShareFile:i.enableFileTransfers,canShareLocation:i.enableLocation,canMention:i.enableMentions,showOnlineStatus:i.enablePresence!==!1,canSendVoiceMessage:i.enableVoiceRecording,canLeaveConversation:o.conversations.leave==="all",canMarkConversationAsUnread:o.conversations.markAsUnread==="all"}},messagePermissions:()=>{const r=this.app$.role.permissions.get();ie.defined(r);const i=this.state$.userPermissions.get(),o={...Jg,...i},s={canReplyToMessage:gn(r.messages.reply,!0),canEditMessage:gn(r.messages.edit,!0),canDeleteMessage:gn(r.messages.delete,!0),canAddReaction:gn(r.messages.emojiReactions,!0),...i},a={...s,canEditMessage:!1},l={canReplyToMessage:gn(r.messages.reply,!1),canEditMessage:gn(r.messages.edit,!1),canDeleteMessage:gn(r.messages.delete,!1),canAddReaction:gn(r.messages.emojiReactions,!1),...i};return{system:o,own:s,ownWithoutEditing:a,other:l,otherWithoutEditing:{...l,canEditMessage:!1}}}}),this.referencedMessage$=le(()=>{const r=this.state$.currentConversationId.get(),i=this.state$.referencedMessageId.get();return r&&i?this.state$.messages.child(r).lookup.child(i).get():null}),this.chatItems$=le(()=>{var f,m,E;const r=this.state$.currentConversationId.get();if(!r)return[];const i=(f=this.newMessageMarker$.get())!=null?f:1/0,o=(m=this.state$.messages.child(r).state.get())!=null?m:[],s=Object.values((E=this.state$.ephemeralMessages.child(r).get())!=null?E:{}),a=s.length===0?o:s.concat(o).sort((_,A)=>A.createdAt-_.createdAt),l=a.map(_=>{const A=_.content[0],O=A==null?void 0:A.type;if(!A||O!=="file")return _;const S=A.size+","+A.filename,v=this.state$.localFileBlobUrls.child(r).child(S).url.get();return v?{..._,content:[{...A,url:v}]}:_});let u=null,c=0,d=!1;const h=[];for(const _ of l){const A=new Date(_.createdAt),O=new Date(A).setHours(0,0,0,0),S=c&&O!==c,v=A.getTime()>i,T=!(!d||v||u!=null&&u.id.startsWith("ephemeral"));(T||S)&&h.push(new Yo({id:"border-before-"+_.id,isDayMarker:!!S,isReadMarker:!!T,timestamp:S?c:void 0})),h.push(_),d=v,c=O,u=_}const p=this.extUserId$.peek();return(function(_,A){const O=[];let S=[];const v=Symbol("NO_KEY");let T=v;for(const R of _){const y=A(R);T===v||T===y?S.push(R):(O.push(S),S=[R]),T=y}return S.length!==0&&O.push(S),O})(h,_=>{var A;return _ instanceof Yo?_.id:(A=_.sender)==null?void 0:A.id}).map(_=>{var O;const A=_[_.length-1];return{items:_,id:A.id,type:A instanceof Yo?"divider":A.sender?((O=A.sender)==null?void 0:O.id)===p?"own":"other":"system"}})})}storeTyping(e,n){this.state$.typing.child(e).set(n)}messagePermissions$(e){const n=this.currentUser$.get();if(!n)throw new Error("Unreachable");const r=e.content[0];return e.sender?n.id===e.sender.id?r.type==="text"?this.state$.messagePermissions.own:this.state$.messagePermissions.ownWithoutEditing:r.type==="text"?this.state$.messagePermissions.other:this.state$.messagePermissions.otherWithoutEditing:this.state$.messagePermissions.system}canRenderUi(e){const n=this.app$.get(),r=this.currentUser$.get();if(e===null)return!!(n&&r);const i=this.state$.conversations.child(e).get(),o=this.state$.participants.child(e).get();return!!(n&&r&&i&&o)}storeMessages(e,n,r){Gt(()=>{var a;const i=n.reduce((l,u)=>(l[u.id]=u,l),{}),o=this.extUserId$.peek();ie(o),this.state$.messages.child(e).set({state:n,lookup:i,loadedAll:r});const s=this.state$.ephemeralMessages.child(e);for(const l of n){const u=this.state$.ephemeralMessageIdMapping.child(e).child(l.id).peek();u&&s.child(u).delete();const c=l.content[0];if(((a=l.sender)==null?void 0:a.id)!==o||c.type!=="file")continue;const d=c.size+","+c.filename,h=this.state$.localFileBlobUrls.child(e).child(d);if(h.fetching.peek()!==!1)continue;const p=()=>{URL.revokeObjectURL(h.url.peek()),h.delete()};if(c.subtype==="image"){h.fetching.set(!0);const f=document.createElement("img");f.addEventListener("load",p,{once:!0}),f.src=c.url}else if(c.subtype==="video"){h.fetching.set(!0);const f=document.createElement("video");f.addEventListener("loadeddata",p,{once:!0}),f.src=c.url}else if(c.subtype==="audio"||c.subtype==="voice"){h.fetching.set(!0);const f=document.createElement("audio");f.addEventListener("loadeddata",p,{once:!0}),f.src=c.url}}})}}function gn(t,e){return t==="all"||t==="own"&&e||t==="other"&&!e}class Yo{constructor({id:e,isDayMarker:n,isReadMarker:r,timestamp:i}){this.id=e,this.isDayMarker=n,this.isReadMarker=r,this.timestamp=n?i:void 0}}function Ut(t,e=!1){return(function(n,r=!1){return n.map(i=>{if(typeof i=="string")return i;switch(i.type){case"bold":return"*"+Ut(i.children)+"*";case"italic":return"_"+Ut(i.children)+"_";case"strikethrough":return"~"+Ut(i.children)+"~";case"blockquote":return Ut(i.children).split(`
|
|
1
|
+
"use client";"use strict";var Pu=t=>{throw TypeError(t)};var xu=(t,e,n)=>e.has(t)||Pu("Cannot "+n);var Ee=(t,e,n)=>(xu(t,e,"read from private field"),n?n.call(t):e.get(t)),yr=(t,e,n)=>e.has(t)?Pu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ro=(t,e,n,r)=>(xu(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const qA=require("@talkjs/core"),pc=Object.freeze(Object.defineProperty({__proto__:null,get AfterMessages(){return qR},get AudioBlock(){return ty},get Avatar(){return ly},get BeforeMessages(){return KR},get ChatHeader(){return FR},get ChatSearchBox(){return ey},get CompactMessageContent(){return ZR},get ConversationImage(){return cy},get ConversationListItem(){return my},get FileBlock(){return ny},get GlobalSearchBox(){return Ay},get GlobalSearchResultHeader(){return gy},get GlobalSearchResultItem(){return _y},get GroupChatImage(){return uy},get ImageBlock(){return ry},get LocationBlock(){return iy},get Message(){return BR},get MessageActionMenu(){return VR},get MessageDivider(){return WR},get MessageField(){return zR},get MessageListFooter(){return XR},get MessageListHeader(){return UR},get NoConversationSelected(){return JR},get RecordingPreview(){return GR},get ReferencedMessage(){return dy},get ReplyBar(){return hy},get TextBlock(){return oy},get TimeAgo(){return py},get VideoBlock(){return sy},get VoiceBlock(){return ay},get VoiceRecorder(){return YR}},Symbol.toStringTag,{value:"Module"}));var oo,ee,vf,Wn,Fu,Df,Tf,Rf,fc,El,_l,yf,Pi={},If=[],JA=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,xi=Array.isArray;function $t(t,e){for(var n in e)t[n]=e[n];return t}function Al(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function fe(t,e,n){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?oo.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return Ri(t,s,r,i,null)}function Ri(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++vf:i,__i:-1,__u:0};return i==null&&ee.vnode!=null&&ee.vnode(o),o}function Cf(){return{current:null}}function De(t){return t.children}function Nt(t,e){this.props=t,this.context=e}function Xr(t,e){if(e==null)return t.__?Xr(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Xr(t):null}function Nf(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Nf(t)}}function gl(t){(!t.__d&&(t.__d=!0)&&Wn.push(t)&&!ns.__r++||Fu!=ee.debounceRendering)&&((Fu=ee.debounceRendering)||Df)(ns)}function ns(){for(var t,e,n,r,i,o,s,a=1;Wn.length;)Wn.length>a&&Wn.sort(Tf),t=Wn.shift(),a=Wn.length,t.__d&&(n=void 0,r=void 0,i=(r=(e=t).__v).__e,o=[],s=[],e.__P&&((n=$t({},r)).__v=r.__v+1,ee.vnode&&ee.vnode(n),mc(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i==null?Xr(r):i,!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,wf(o,n,s),r.__e=r.__=null,n.__e!=i&&Nf(n)));ns.__r=0}function Hu(t,e,n,r,i,o,s,a,l,u,c){var d,h,f,p,m,E,_,A=r&&r.__k||If,O=e.length;for(l=(function(S,v,T,R,I){var g,D,C,N,k,b=T.length,L=b,x=0;for(S.__k=new Array(I),g=0;g<I;g++)(D=v[g])!=null&&typeof D!="boolean"&&typeof D!="function"?(typeof D=="string"||typeof D=="number"||typeof D=="bigint"||D.constructor==String?D=S.__k[g]=Ri(null,D,null,null,null):xi(D)?D=S.__k[g]=Ri(De,{children:D},null,null,null):D.constructor==null&&D.__b>0?D=S.__k[g]=Ri(D.type,D.props,D.key,D.ref?D.ref:null,D.__v):S.__k[g]=D,N=g+x,D.__=S,D.__b=S.__b+1,C=null,(k=D.__i=ZA(D,T,N,L))!=-1&&(L--,(C=T[k])&&(C.__u|=2)),C==null||C.__v==null?(k==-1&&(I>b?x--:I<b&&x++),typeof D.type!="function"&&(D.__u|=4)):k!=N&&(k==N-1?x--:k==N+1?x++:(k>N?x--:x++,D.__u|=4))):S.__k[g]=null;if(L)for(g=0;g<b;g++)(C=T[g])!=null&&!(2&C.__u)&&(C.__e==R&&(R=Xr(C)),Lf(C,C));return R})(n,e,A,l,O),d=0;d<O;d++)(f=n.__k[d])!=null&&(h=f.__i==-1?Pi:A[f.__i]||Pi,f.__i=d,E=mc(t,f,h,i,o,s,a,l,u,c),p=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Ec(h.ref,null,f),c.push(f.ref,f.__c||p,f)),m==null&&p!=null&&(m=p),(_=!!(4&f.__u))||h.__k===f.__k?l=bf(f,l,t,_):typeof f.type=="function"&&E!==void 0?l=E:p&&(l=p.nextSibling),f.__u&=-7);return n.__e=m,l}function bf(t,e,n,r){var i,o;if(typeof t.type=="function"){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,e=bf(i[o],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=Xr(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function dn(t,e){return e=e||[],t==null||typeof t=="boolean"||(xi(t)?t.some(function(n){dn(n,e)}):e.push(t)),e}function ZA(t,e,n,r){var i,o,s,a=t.key,l=t.type,u=e[n],c=u!=null&&!(2&u.__u);if(u===null&&a==null||c&&a==u.key&&l==u.type)return n;if(r>(c?1:0)){for(i=n-1,o=n+1;i>=0||o<e.length;)if((u=e[s=i>=0?i--:o++])!=null&&!(2&u.__u)&&a==u.key&&l==u.type)return s}return-1}function Uu(t,e,n){e[0]=="-"?t.setProperty(e,n==null?"":n):t[e]=n==null?"":typeof n!="number"||JA.test(e)?n:n+"px"}function yo(t,e,n,r,i){var o,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Uu(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||Uu(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Rf,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=fc,t.addEventListener(e,o?_l:El,o)):t.removeEventListener(e,o?_l:El,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n==null?"":n;break e}catch(a){}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Bu(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=fc++;else if(e.t<n.u)return;return n(ee.event?ee.event(e):e)}}}function mc(t,e,n,r,i,o,s,a,l,u){var c,d,h,f,p,m,E,_,A,O,S,v,T,R,I,g,D,C=e.type;if(e.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(c=ee.__b)&&c(e);e:if(typeof C=="function")try{if(_=e.props,A="prototype"in C&&C.prototype.render,O=(c=C.contextType)&&r[c.__c],S=c?O?O.props.value:c.__:r,n.__c?E=(d=e.__c=n.__c).__=d.__E:(A?e.__c=d=new C(_,S):(e.__c=d=new Nt(_,S),d.constructor=C,d.render=QA),O&&O.sub(d),d.state||(d.state={}),d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),A&&d.__s==null&&(d.__s=d.state),A&&C.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=$t({},d.__s)),$t(d.__s,C.getDerivedStateFromProps(_,d.__s))),f=d.props,p=d.state,d.__v=e,h)A&&C.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),A&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(A&&C.getDerivedStateFromProps==null&&_!==f&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,S),e.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(_,d.__s,S)===!1){for(e.__v!=n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(N){N&&(N.__=e)}),v=0;v<d._sb.length;v++)d.__h.push(d._sb[v]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,S),A&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(f,p,m)})}if(d.context=S,d.props=_,d.__P=t,d.__e=!1,T=ee.__r,R=0,A){for(d.state=d.__s,d.__d=!1,T&&T(e),c=d.render(d.props,d.state,d.context),I=0;I<d._sb.length;I++)d.__h.push(d._sb[I]);d._sb=[]}else do d.__d=!1,T&&T(e),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++R<25);d.state=d.__s,d.getChildContext!=null&&(r=$t($t({},r),d.getChildContext())),A&&!h&&d.getSnapshotBeforeUpdate!=null&&(m=d.getSnapshotBeforeUpdate(f,p)),g=c,c!=null&&c.type===De&&c.key==null&&(g=kf(c.props.children)),a=Hu(t,xi(g)?g:[g],e,n,r,i,o,s,a,l,u),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),E&&(d.__E=d.__=null)}catch(N){if(e.__v=null,l||o!=null)if(N.then){for(e.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else{for(D=o.length;D--;)Al(o[D]);Sl(e)}else e.__e=n.__e,e.__k=n.__k,N.then||Sl(e);ee.__e(N,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=(function(N,k,b,L,x,P,B,V,$){var z,Ae,le,ue,de,Be,vr,At=b.props||Pi,je=k.props,ut=k.type;if(ut=="svg"?x="http://www.w3.org/2000/svg":ut=="math"?x="http://www.w3.org/1998/Math/MathML":x||(x="http://www.w3.org/1999/xhtml"),P!=null){for(z=0;z<P.length;z++)if((de=P[z])&&"setAttribute"in de==!!ut&&(ut?de.localName==ut:de.nodeType==3)){N=de,P[z]=null;break}}if(N==null){if(ut==null)return document.createTextNode(je);N=document.createElementNS(x,ut,je.is&&je),V&&(ee.__m&&ee.__m(k,P),V=!1),P=null}if(ut==null)At===je||V&&N.data==je||(N.data=je);else{if(P=P&&oo.call(N.childNodes),!V&&P!=null)for(At={},z=0;z<N.attributes.length;z++)At[(de=N.attributes[z]).name]=de.value;for(z in At)if(de=At[z],z!="children"){if(z=="dangerouslySetInnerHTML")le=de;else if(!(z in je)){if(z=="value"&&"defaultValue"in je||z=="checked"&&"defaultChecked"in je)continue;yo(N,z,null,de,x)}}for(z in je)de=je[z],z=="children"?ue=de:z=="dangerouslySetInnerHTML"?Ae=de:z=="value"?Be=de:z=="checked"?vr=de:V&&typeof de!="function"||At[z]===de||yo(N,z,de,At[z],x);if(Ae)V||le&&(Ae.__html==le.__html||Ae.__html==N.innerHTML)||(N.innerHTML=Ae.__html),k.__k=[];else if(le&&(N.innerHTML=""),Hu(k.type=="template"?N.content:N,xi(ue)?ue:[ue],k,b,L,ut=="foreignObject"?"http://www.w3.org/1999/xhtml":x,P,B,P?P[0]:b.__k&&Xr(b,0),V,$),P!=null)for(z=P.length;z--;)Al(P[z]);V||(z="value",ut=="progress"&&Be==null?N.removeAttribute("value"):Be!=null&&(Be!==N[z]||ut=="progress"&&!Be||ut=="option"&&Be!=At[z])&&yo(N,z,Be,At[z],x),z="checked",vr!=null&&vr!=N[z]&&yo(N,z,vr,At[z],x))}return N})(n.__e,e,n,r,i,o,s,l,u);return(c=ee.diffed)&&c(e),128&e.__u?void 0:a}function Sl(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(Sl)}function wf(t,e,n){for(var r=0;r<n.length;r++)Ec(n[r],n[++r],n[++r]);ee.__c&&ee.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){ee.__e(o,i.__v)}})}function kf(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:xi(t)?t.map(kf):$t({},t)}function Ec(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){ee.__e(i,n)}}function Lf(t,e,n){var r,i;if(ee.unmount&&ee.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||Ec(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ee.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Lf(r[i],e,n||typeof t.type!="function");n||Al(t.__e),t.__c=t.__=t.__e=void 0}function QA(t,e,n){return this.constructor(t,n)}function Fi(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),ee.__&&ee.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],mc(e,t=(!r&&n||e).__k=fe(De,null,[t]),i||Pi,Pi,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?oo.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),wf(o,t,s)}function Mf(t,e){Fi(t,e,Mf)}function eg(t,e,n){var r,i,o,s,a=$t({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o]===void 0&&s!=null?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?oo.call(arguments,2):n),Ri(t.type,a,r||t.key,i||t.ref,null)}function ii(t){function e(n){var r,i;return this.getChildContext||(r=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(s){s.__e=!0,gl(s)})},this.sub=function(o){r.add(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),s&&s.call(o)}}),n.children}return e.__c="__cC"+yf++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}oo=If.slice,ee={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},vf=0,Nt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=$t({},this.state),typeof t=="function"&&(t=t($t({},n),this.props)),t&&$t(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),gl(this))},Nt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),gl(this))},Nt.prototype.render=De,Wn=[],Df=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Tf=function(t,e){return t.__v.__b-e.__v.__b},ns.__r=0,Rf=/(PointerCapture)$|Capture$/i,fc=0,El=Bu(!1),_l=Bu(!0),yf=0;var tg=0;function y(t,e,n,r,i,o){e||(e={});var s,a,l=e;if("ref"in l)for(a in l={},e)a=="ref"?s=e[a]:l[a]=e[a];var u={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--tg,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return ee.vnode&&ee.vnode(u),u}var fn,me,Aa,ju,Kr=0,Pf=[],Se=ee,$u=Se.__b,Vu=Se.__r,zu=Se.diffed,Yu=Se.__c,Gu=Se.unmount,Wu=Se.__;function Er(t,e){Se.__h&&Se.__h(me,t,Kr||e),Kr=0;var n=me.__H||(me.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function ne(t){return Kr=1,Ms(xf,t)}function Ms(t,e,n){var r=Er(fn++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):xf(void 0,e),function(a){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,a);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=me,!me.__f)){var i=function(a,l,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(h){return!!h.__c});if(c.every(function(h){return!h.__N}))return!o||o.call(this,a,l,u);var d=r.__c.props!==a;return c.forEach(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(d=!0)}}),o&&o.call(this,a,l,u)||d};me.__f=!0;var o=me.shouldComponentUpdate,s=me.componentWillUpdate;me.componentWillUpdate=function(a,l,u){if(this.__e){var c=o;o=void 0,i(a,l,u),o=c}s&&s.call(this,a,l,u)},me.shouldComponentUpdate=i}return r.__N||r.__}function G(t,e){var n=Er(fn++,3);!Se.__s&&Ac(n.__H,e)&&(n.__=t,n.u=e,me.__H.__h.push(n))}function Xe(t,e){var n=Er(fn++,4);!Se.__s&&Ac(n.__H,e)&&(n.__=t,n.u=e,me.__h.push(n))}function X(t){return Kr=5,te(function(){return{current:t}},[])}function _n(t,e,n){Kr=6,Xe(function(){if(typeof t=="function"){var r=t(e());return function(){t(null),r&&typeof r=="function"&&r()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function te(t,e){var n=Er(fn++,7);return Ac(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function q(t,e){return Kr=8,te(function(){return t},e)}function Hn(t){var e=me.context[t.__c],n=Er(fn++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(me)),e.props.value):t.__}function _c(t,e){Se.useDebugValue&&Se.useDebugValue(e?e(t):t)}function Ps(){var t=Er(fn++,11);if(!t.__){for(var e=me.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function ng(){for(var t;t=Pf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach($o),t.__H.__h.forEach(Ol),t.__H.__h=[]}catch(e){t.__H.__h=[],Se.__e(e,t.__v)}}Se.__b=function(t){me=null,$u&&$u(t)},Se.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Wu&&Wu(t,e)},Se.__r=function(t){Vu&&Vu(t),fn=0;var e=(me=t.__c).__H;e&&(Aa===me?(e.__h=[],me.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach($o),e.__h.forEach(Ol),e.__h=[],fn=0)),Aa=me},Se.diffed=function(t){zu&&zu(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Pf.push(e)!==1&&ju===Se.requestAnimationFrame||((ju=Se.requestAnimationFrame)||rg)(ng)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Aa=me=null},Se.__c=function(t,e){e.some(function(n){try{n.__h.forEach($o),n.__h=n.__h.filter(function(r){return!r.__||Ol(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Se.__e(r,n.__v)}}),Yu&&Yu(t,e)},Se.unmount=function(t){Gu&&Gu(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{$o(r)}catch(i){e=i}}),n.__H=void 0,e&&Se.__e(e,n.__v))};var Xu=typeof requestAnimationFrame=="function";function rg(t){var e,n=function(){clearTimeout(r),Xu&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);Xu&&(e=requestAnimationFrame(n))}function $o(t){var e=me,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),me=e}function Ol(t){var e=me;t.__c=t.__(),me=e}function Ac(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function xf(t,e){return typeof e=="function"?e(t):e}function Ff(t,e){for(var n in e)t[n]=e[n];return t}function vl(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function gc(t,e){var n=e(),r=ne({t:{__:n,u:e}}),i=r[0].t,o=r[1];return Xe(function(){i.__=n,i.u=e,ga(i)&&o({t:i})},[t,n,e]),G(function(){return ga(i)&&o({t:i}),t(function(){ga(i)&&o({t:i})})},[t]),n}function ga(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch(s){return!0}}function Sc(t){t()}function Oc(t){return t}function vc(){return[!1,Sc]}var Dc=Xe;function rs(t,e){this.props=t,this.context=e}function mn(t,e){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!s:vl(this.props,i)}function r(i){return this.shouldComponentUpdate=n,fe(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=t,r}(rs.prototype=new Nt).isPureReactComponent=!0,rs.prototype.shouldComponentUpdate=function(t,e){return vl(this.props,t)||vl(this.state,e)};var Ku=ee.__b;ee.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Ku&&Ku(t)};var ig=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function _t(t){function e(n){var r=Ff({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=ig,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var qu=function(t,e){return t==null?null:dn(dn(t).map(e))},Hf={map:qu,forEach:qu,count:function(t){return t?dn(t).length:0},only:function(t){var e=dn(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:dn},og=ee.__e;ee.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}og(t,e,n,r)};var Ju=ee.unmount;function Uf(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=Ff({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return Uf(r,e,n)})),t}function Bf(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return Bf(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function yi(){this.__u=0,this.o=null,this.__b=null}function jf(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function $f(t){var e,n,r,i=null;function o(s){if(e||(e=t()).then(function(a){a&&(i=a.default||a),r=!0},function(a){n=a,r=!0}),n)throw n;if(!r)throw e;return i?fe(i,s):null}return o.displayName="Lazy",o.__f=!0,o}function Lr(){this.i=null,this.l=null}ee.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ju&&Ju(t)},(yi.prototype=new Nt).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=jf(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=Bf(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.o.pop();)u.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},yi.prototype.componentWillUnmount=function(){this.o=[]},yi.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Uf(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&fe(De,null,t.fallback);return i&&(i.__u&=-33),[fe(De,null,e.__a?null:t.children),i]};var Zu=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function sg(t){return this.getChildContext=function(){return t.context},t.children}function ag(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){Fi(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),!e.v){for(var r=e.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(i,o){this.childNodes.push(i),e.h.insertBefore(i,o)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),e.h.removeChild(i)}}}Fi(fe(sg,{context:e.context},t.__v),e.v)}function Tc(t,e){var n=fe(ag,{__v:t,h:e});return n.containerInfo=e,n}(Lr.prototype=new Nt).__a=function(t){var e=this,n=jf(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),Zu(e,t,r)):i()};n?n(o):o()}},Lr.prototype.render=function(t){this.i=null,this.l=new Map;var e=dn(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Lr.prototype.componentDidUpdate=Lr.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Zu(t,n,e)})};var Vf=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,lg=/^(?: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]/,cg=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ug=/[A-Z0-9]/g,dg=typeof document!="undefined",hg=function(t){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Rc(t,e,n){return e.__k==null&&(e.textContent=""),Fi(t,e),typeof n=="function"&&n(),t?t.__c:null}function zf(t,e,n){return Mf(t,e),typeof n=="function"&&n(),t?t.__c:null}Nt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Nt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Qu=ee.event;function pg(){}function fg(){return this.cancelBubble}function mg(){return this.defaultPrevented}ee.event=function(t){return Qu&&(t=Qu(t)),t.persist=pg,t.isPropagationStopped=fg,t.isDefaultPrevented=mg,t.nativeEvent=t};var yc,Eg={enumerable:!1,configurable:!0,get:function(){return this.class}},ed=ee.vnode;ee.vnode=function(t){typeof t.type=="string"&&(function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||dg&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||hg(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":cg.test(s)&&(s=l):l=s="oninput":o&&lg.test(s)?s=s.replace(ug,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&i[s=l]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=dn(n.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=dn(n.children).forEach(function(u){u.props.selected=i.multiple?i.defaultValue.indexOf(u.props.value)!=-1:i.defaultValue==u.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",Eg)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i})(t),t.$$typeof=Vf,ed&&ed(t)};var td=ee.__r;ee.__r=function(t){td&&td(t),yc=t.__c};var nd=ee.diffed;ee.diffed=function(t){nd&&nd(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),yc=null};var Yf={ReactCurrentDispatcher:{current:{readContext:function(t){return yc.__n[t.__c].props.value},useCallback:q,useContext:Hn,useDebugValue:_c,useDeferredValue:Oc,useEffect:G,useId:Ps,useImperativeHandle:_n,useInsertionEffect:Dc,useLayoutEffect:Xe,useMemo:te,useReducer:Ms,useRef:X,useState:ne,useSyncExternalStore:gc,useTransition:vc}}};function Gf(t){return fe.bind(null,t)}function so(t){return!!t&&t.$$typeof===Vf}function Wf(t){return so(t)&&t.type===De}function Xf(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Kf(t){return so(t)?eg.apply(null,arguments):t}function Ic(t){return!!t.__k&&(Fi(null,t),!0)}function qf(t){return t&&(t.base||t.nodeType===1&&t)||null}var Jf=function(t,e){return t(e)},xs=function(t,e){return t(e)},Zf=De,Qf=so,F={useState:ne,useId:Ps,useReducer:Ms,useEffect:G,useLayoutEffect:Xe,useInsertionEffect:Dc,useTransition:vc,useDeferredValue:Oc,useSyncExternalStore:gc,startTransition:Sc,useRef:X,useImperativeHandle:_n,useMemo:te,useCallback:q,useContext:Hn,useDebugValue:_c,version:"18.3.1",Children:Hf,render:Rc,hydrate:zf,unmountComponentAtNode:Ic,createPortal:Tc,createElement:fe,createContext:ii,createFactory:Gf,cloneElement:Kf,createRef:Cf,Fragment:De,isValidElement:so,isElement:Qf,isFragment:Wf,isMemo:Xf,findDOMNode:qf,Component:Nt,PureComponent:rs,memo:mn,forwardRef:_t,flushSync:xs,unstable_batchedUpdates:Jf,StrictMode:Zf,Suspense:yi,SuspenseList:Lr,lazy:$f,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Yf};const Cc=Object.freeze(Object.defineProperty({__proto__:null,Children:Hf,Component:Nt,Fragment:De,PureComponent:rs,StrictMode:Zf,Suspense:yi,SuspenseList:Lr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Yf,cloneElement:Kf,createContext:ii,createElement:fe,createFactory:Gf,createPortal:Tc,createRef:Cf,default:F,findDOMNode:qf,flushSync:xs,forwardRef:_t,hydrate:zf,isElement:Qf,isFragment:Wf,isMemo:Xf,isValidElement:so,lazy:$f,memo:mn,render:Rc,startTransition:Sc,unmountComponentAtNode:Ic,unstable_batchedUpdates:Jf,useCallback:q,useContext:Hn,useDebugValue:_c,useDeferredValue:Oc,useEffect:G,useErrorBoundary:function(t){var e=Er(fn++,10),n=ne();return e.__=t,me.componentDidCatch||(me.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:Ps,useImperativeHandle:_n,useInsertionEffect:Dc,useLayoutEffect:Xe,useMemo:te,useReducer:Ms,useRef:X,useState:ne,useSyncExternalStore:gc,useTransition:vc,version:"18.3.1"},Symbol.toStringTag,{value:"Module"}));var Nc=Object.prototype.hasOwnProperty;function ke(t){return Array.isArray(t)}function Yt(t){return!(!t||typeof t!="object"||t instanceof Date||ke(t))}function _g(t){return Yt(t)&&t.constructor===Object}function Q(t){return typeof t=="function"}function Qe(t){const e=typeof t;return t!==void 0&&(Dl(t)||e!=="object"&&e!=="function")}function Dl(t){return t instanceof Date}function em(t){return typeof t=="boolean"}function Vt(t){return t instanceof Promise}function Ue(t){return t instanceof Map||t instanceof WeakMap}function En(t){return t instanceof Set||t instanceof WeakSet}function is(t){if(!t)return!1;if(ke(t))return t.length===0;if(Ue(t)||En(t))return t.size===0;for(const e in t)if(Nc.call(t,e))return!1;return!0}var Ag=new Set(["boolean","string","number"]);function Fs(t){return!!t.parent}var tm=Symbol.toPrimitive,gg=Symbol.iterator,qr=Symbol("getNode"),Hs=Symbol("delete"),nm=Symbol("opaque"),Sg=Symbol("plain"),bc=Symbol("optimized"),Hi=Symbol("linked"),be={pendingNodes:new Map,dirtyNodes:new Set};function Ui(t){return t&&(t[nm]||t.$$typeof)}function rm(t){return t&&t[Sg]}function im(t){return ke(t)?"array":Ue(t)?"map":t instanceof Set?"set":"object"}function Og(t,e){return Ue(e)?{__LSType:"Map",value:Array.from(e.entries())}:e instanceof Set?{__LSType:"Set",value:Array.from(e)}:(be.replacer&&(e=be.replacer(t,e)),e)}var vg=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function Dg(t,e){if(e){if(typeof e=="string"&&vg.test(e))return new Date(e);if(typeof e=="object"){if(e.__LSType==="Map")return new Map(e.value);if(e.__LSType==="Set")return new Set(e.value)}be.reviver&&(e=be.reviver(t,e))}return e}function om(t){return t&&JSON.stringify(t,Og)}function sm(t){return t&&JSON.parse(t,Dg)}function am(t){return sm(om(t))}function Ce(t){return!!t&&!!t[qr]}function ao(t){return t&&t[qr]}function lm(t,e,n,r,i){return r?t.add(n):i?t.set(e,n):t[e]=n,n}function hn(t,e){var n;const r=(n=t.parent)!=null?n:t,i=t.parent?t.key:"_",o=e===Hs;o&&(e=void 0);const s=t.parent?wc(r):r.root,a=En(s),l=Ue(s),u=a?i:l?s.get(i):s[i],c=Q(e);if((e=r.isAssigning||!c||Q(u)?e:e(u))!==u)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:lm(s,i,e,a,l)}finally{r.isSetting--}return{prevValue:u,newValue:e,parentValue:s}}var rd=[];function _e(t){let e=0,n=t;for(;Fs(n);)rd[e++]=n.key,n=n.parent;let r=t.root._;for(let i=e-1;r&&i>=0;i--){const o=rd[i];r=o!=="size"&&Ue(r)?r.get(o):r[o]}return r}function Ht(t,e,n){var r,i;let o=(r=t.children)==null?void 0:r.get(e);return o||(o={root:t.root,parent:t,key:e,lazy:!0,numListenersRecursive:0},((i=t.lazyFn)==null?void 0:i.length)===1&&(n=t.lazyFn.bind(t,e)),Q(n)&&(o=Object.assign(()=>{},o),o.lazyFn=n),t.children||(t.children=new Map),t.children.set(e,o)),o}function wc(t){let e=_e(t);if(!e||Q(e))if(Fs(t)){const n=wc(t.parent),r=En(n),i=Ue(n);e=lm(n,t.key,{},r,i)}else e=t.root._={};return e}function cm(t,e){var n,r;let i=Ce(t)?void 0:Yt(t)?"id"in t?"id":"key"in t?"key":"_id"in t?"_id":"__id"in t?"__id":void 0:void 0;if(!i&&e.parent){const o=e.key+"_keyExtractor",s=(r=(n=e.functions)==null?void 0:n.get(o))!=null?r:_e(e.parent)[e.key+"_keyExtractor"];s&&Q(s)&&(i=s)}return i}function id(t,e,n){t.functions||(t.functions=new Map),t.functions.set(e,n)}function um(t,e){return t===e||Dl(t)&&Dl(e)&&+t==+e}function Tl(t,e,n,r){return e?void 0:t?r?Array.from(t):n?Array.from(t.keys()):Object.keys(t):[]}function Tg(t,e){return t&&Object.defineProperty(t,e,{value:!0,enumerable:!1,writable:!0,configurable:!0}),t}var od=function(t){return Tg(t,nm)};function dm(t,e){var n;t.isPlain||!((n=t.parent)!=null&&n.isPlain)&&!rm(e)||(t.isPlain=!0)}function Gt(t,e,n,r){let i=t;return!Ce(i)&&Q(i)&&(i=n?i(n):i()),Ce(i)&&!r?i.get(e):i}var Ii,Rg=(t,e)=>t&&t[e];function hm(t,e,n,r,i,o,s){let a,l=t;if(e.length>0){let u=o;for(let c=0;c<e.length;c++){a=e[c];const d=Ue(l);let h=l?d?l.get(a):l[a]:void 0;const f=u?d?u.get(a):u[a]:void 0;if(h===Hs)return u&&(d?l.set(a,f):l[a]=f,s==null||s(e.slice(0,c+1),f)),t;if(h===void 0&&r===void 0&&c===e.length-1)return t;c<e.length-1&&h==null&&(h=kc(n[c]),Ue(l)?l.set(a,h):l[a]=h),c<e.length-1&&(l=h,u&&(u=f))}}return a===void 0?t=i==="merge"?ss(t,r):r:i==="merge"?l[a]=ss(l[a],r):Ue(l)?l.set(a,r):l[a]=r,t}function sd(t,e,n){let r=n;for(let i=0;i<t.length;i++){const o=t[i];r=r?r[o]:kc(e[i])}return r}function Rl(t){return!(!t||(Yt(t)||ke(t))&&is(t))}function kc(t){switch(t){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function yg(t,e,n){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=e;return hm(t,r,s,o)}function ss(t,...e){if(Qe(t))return e[e.length-1];let n=ke(t)?[...t]:{...t};for(let r=0;r<e.length;r++){const i=e[r];if(_g(i)||ke(i)){const o=i;for(const s in o)Nc.call(o,s)&&(o[s]instanceof Object&&!Ce(o[s])&&Object.keys(o[s]).length>0?n[s]=ss(n[s]||(ke(o[s])?[]:{}),o[s]):n[s]=o[s])}else n=i}return n}var as=0,Sa=!1,Oa=!1,Br=new Map;function Ig(){Br.size>0&&oi(!0)}function pm(t,e){for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Cg(t,e){try{return(function(n,r){for(let i=0;i<r.length;i++)n=yg(n,r[i]);return n})(t?am(t):{},e)}catch(n){return}}function Lc(t,e){return function(){return Cg(t,e)}}function Bi(t,e,n,r,i){const o=new Map;ls(o,t,!!be.isLoadingLocal,!!be.isLoadingRemote,e,[],[],e,n,!0,r,i);const s=Br.get(t);s?s.prev===e?Br.delete(t):s.value=e:Br.set(t,{value:e,prev:n,level:r,whenOptimizedOnlyIf:i,isFromSync:!!be.isLoadingRemote,isFromPersist:!!be.isLoadingLocal}),o.size&&fm(o,!0),as<=0&&mm()}function ls(t,e,n,r,i,o,s,a,l,u,c,d){if(e.numListenersRecursive>0&&((function(h,f,p,m,E,_,A,O,S,v,T,R){if(v?f.listenersImmediate:f.listeners){const I={path:_,pathTypes:A,valueAtPath:O,prevAtPath:S},g=h.get(f);if(g&&_.length>0){const{changes:D}=g;pm(D[0].path,I.path)||(D.push(I),g.level=Math.min(g.level,T),g.whenOptimizedOnlyIf||(g.whenOptimizedOnlyIf=R))}else h.set(f,{level:T,value:E,isFromSync:m,isFromPersist:p,whenOptimizedOnlyIf:R,changes:[I]})}})(t,e,n,r,i,o,s,a,l,u,c,d),e.linkedFromNodes))for(const h of e.linkedFromNodes)ls(t,Ng(h,o),n,r,a,[],[],a,l,u,0,d);if(e.parent){const h=e.parent;h&&ls(t,h,n,r,_e(h),[e.key].concat(o),[im(i)].concat(s),a,l,u,c+1,d)}}function fm(t,e){const n=new Set;t.forEach(({changes:r,level:i,value:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{const c=e?u.listenersImmediate:u.listeners;if(c){let d;const h=Array.from(c);for(let f=0;f<h.length;f++){const p=h[f],{track:m,noArgs:E,listener:_}=p;n.has(_)||(m===!0?i<=0:m!==bc||l&&i<=0)&&(E||d||(d={value:o,isFromPersist:s,isFromSync:a,getPrevious:Lc(o,r),changes:r}),m||n.add(_),_(d))}}})}function mm(){const t=Array.from(be.dirtyNodes);be.dirtyNodes.clear(),t.forEach(r=>{const i=r.dirtyFn;i&&(r.dirtyFn=void 0,i())});const e=Br;Br=new Map;const n=new Map;e.forEach(({value:r,prev:i,level:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{ls(n,u,s,a,r,[],[],r,i,!1,o,l)}),n.size&&fm(n,!1)}function Pt(t){Us();try{t()}finally{oi()}}function Us(){as++,Ii||(Ii=setTimeout(Ig,0))}function oi(t){(--as<=0||t)&&(Sa?Oa=!0:(Ii&&(clearTimeout(Ii),Ii=void 0),as=0,Sa=!0,mm(),Sa=!1,Oa&&(Oa=!1,oi(!0))))}function Ng(t,e){let n=t;for(let r=0;r<e.length;r++)n=Ht(n,e[r]);return n}function Mc(t,e,n,r,i){if(Ce(t))return t;const o=Vt(t);let s={root:{_:t},lazy:!0,numListenersRecursive:0};Q(t)&&(s=Object.assign(()=>{},s),s.lazyFn=t);var a;const l=e||(a=t,Ag.has(typeof a))?new i(s):r(s);return o&&(hn(s,void 0),n(s,t)),l}var Mr=new WeakMap,Em=[],_m=[],Am=[],Pr=0,yl=!1;function hi(t,e,n){const r=Mr.get(t);if(!r||!r.has(n))return;const i=r.get(n);i&&i.size!==0&&(Em[Pr]=t,_m[Pr]=e,Am[Pr]=n,Pr++,yl||(yl=!0,queueMicrotask(bg)))}var pi={type:"listener-added",node:null,listener:void 0,timestamp:0};function bg(){yl=!1;const t=typeof performance!="undefined"?performance.now():Date.now();pi.timestamp=t;for(let e=0;e<Pr;e++){const n=Em[e],r=_m[e],i=Am[e],o=Mr.get(n);if(!o)continue;const s=o.get(i);if(!s||s.size===0)continue;const a=n.listeners,l=n.listenersImmediate;if(!a&&!l&&n.numListenersRecursive&&(i!=="listener-added"||r))continue;let u=!1;if(i==="listener-added")r?u=!!(a!=null&&a.has(r))||!!(l!=null&&l.has(r)):u=!(!(!(a!=null&&a.size)&&!(l!=null&&l.size))||typeof n.numListenersRecursive!="number")&&n.numListenersRecursive>0;else if(i==="listener-removed")u=!(a!=null&&a.has(r))&&!(l!=null&&l.has(r));else{const c=a&&a.size>0||l&&l.size>0;u=typeof n.numListenersRecursive=="number"?!c&&n.numListenersRecursive===0:!c}if(u){pi.type=i,pi.node=n,pi.listener=r;const c=Array.from(s);for(let d=0;d<c.length;d++)try{c[d](pi)}catch(h){console.error(`Error in middleware handler for ${i}:`,h)}}}Pr=0}function ad(t){var e,n;return!((e=t.listeners)!=null&&e.size)&&!((n=t.listenersImmediate)!=null&&n.size)&&(function(r){var i;return((i=r.activationState)==null?void 0:i.synced)||!1})(t)}function xn(t,e,n={},r){var i;const{initial:o,immediate:s,noArgs:a}=n,{trackingType:l}=n;let u=s?t.listenersImmediate:t.listeners;u||(u=new Set,s?t.listenersImmediate=u:t.listeners=u);const c={listener:e,track:l,noArgs:a};if(u.add(c),o){const m=_e(t);e({value:m,isFromPersist:!0,isFromSync:!1,changes:[{path:[],pathTypes:[],prevAtPath:m,valueAtPath:m}],getPrevious:()=>{}})}let d;function h(m,E=e,_){if(!(r!=null&&r.has(m))){r||(r=new Set),r.add(_||t),E||(E=e);const A={trackingType:!0,...n};d=[...d||[],xn(m,E,A,r)]}}t.linkedToNode&&h(t.linkedToNode),(i=t.linkedFromNodes)==null||i.forEach(m=>h(m)),t.numListenersRecursive++;let f=t.parent,p=[t.key];for(;f;){if(f.linkedFromNodes)for(const m of f.linkedFromNodes)r!=null&&r.has(m)||h(m,wg(m,p,e),f);f.numListenersRecursive++,ad(f)&&hi(f,void 0,"listener-added"),p=[f.key,...p],f=f.parent}return hi(t,c,"listener-added"),()=>{u.delete(c),d==null||d.forEach(_=>_());const m=[];let E=t;for(;E;)E.numListenersRecursive--,E.numListenersRecursive===0&&m.push(E),E=E.parent;hi(t,c,"listener-removed"),u.size===0&&hi(t,void 0,"listeners-cleared");for(const _ of m)_!==t&&ad(_)&&hi(_,void 0,"listeners-cleared")}}function wg(t,e,n){let r=sd(e,[],_e(t));return function({value:i,isFromPersist:o,isFromSync:s}){const a=sd(e,[],i);a!==r&&n({value:a,isFromPersist:o,isFromSync:s,changes:[{path:[],pathTypes:[],prevAtPath:r,valueAtPath:a}],getPrevious:()=>r}),r=a}}function ld(t,e,n,r){let i=[];return t==null||t.forEach(o=>{const{node:s,track:a}=o;i.push(xn(s,e,{trackingType:a,immediate:r,noArgs:n}))}),()=>{if(i){for(let o=0;o<i.length;o++)i[o]();i=void 0}}}var Vo=0,cd=[],xr={current:void 0};function zo(t,e){if(Vo){const n=xr.current;if(n){n.nodes||(n.nodes=new Map);const r=n.nodes.get(t);r?(r.track=r.track||e,r.num++):n.nodes.set(t,{node:t,track:e,num:1})}}}function gm(t,e,n,r,i,o){let s,a,l=e;cd.push(xr.current),Vo++,xr.current={};const u=t&&Gt(t,n,r,i==null?void 0:i.fromComputed),c=xr.current.nodes;return--Vo<0&&(Vo=0),xr.current=cd.pop(),r!=null&&r.cancel||(s=ld(c,l,!1,i==null?void 0:i.immediate),a=o?()=>(s==null||s(),s=ld(c,l),s):void 0),{nodes:c,value:u,dispose:s,resubscribe:a}}function mt(t,e,n){let r,i;Q(e)?r=e:n=e;let o=!1;const s={num:0},a=function(){if(o)return;s.onCleanup&&(s.onCleanup(),s.onCleanup=void 0),o=!0,Us(),delete s.value,i==null||i();const{dispose:l,value:u,nodes:c}=gm(t,a,void 0,s,n);var d,h;i=l,s.value=u,s.nodes=c,s.refresh=a,s.onCleanupReaction&&(s.onCleanupReaction(),s.onCleanupReaction=void 0),oi(),o=!1,!r||!(n!=null&&n.fromComputed)&&(!(s.num>0)&&(d=t)&&((h=d[qr])!=null&&h.isEvent)||s.previous===s.value&&typeof s.value!="object")||r(s),s.previous=s.value,s.num++};return a(),()=>{var l,u;(l=s.onCleanup)==null||l.call(s),s.onCleanup=void 0,(u=s.onCleanupReaction)==null||u.call(s),s.onCleanupReaction=void 0,i==null||i()}}function Sm(t,e){const n=_r(t);if(n==null||Qe(n))return n;const r=e==="string"?Q(n.toString)?n.toString:n.valueOf:Q(n.valueOf)?n.valueOf:n.toString;return Q(r)?r.call(n):n}function Om(t,e,n){if(Vt(t))return e?t.then(e):t;const r=ke(t);let i,o;return mt(function(s){const a=r?t.map(l=>Gt(l)):Gt(t);if(!Vt(a)){{let l=!0;if(ke(a))for(let u=0;u<a.length;u++){let c=a[u];Ce(c)?c=Gt(c):Q(c)&&(c=c()),l=l&&!!(n?Rl(c):c)}else l=n?Rl(a):a;l&&(i=a,s.cancel=!0)}return i}i=a},function(){o=e==null?void 0:e(i)}),Vt(i)?e?i.then(e):i:i!==void 0?e?o:Promise.resolve(i):new Promise(s=>{if(e){const a=e;e=l=>{const u=a(l);s(Vt(u)?u.then(c=>c):u)}}else e=s})}function Bs(t,e){return Om(t,e,!1)}var va=new Set(["copyWithin","fill","from","pop","push","reverse","shift","sort","splice","unshift"]),ud=new Set(["every","filter","find","findIndex","flatMap","forEach","join","map","reduce","some"]),kg=new Set(["filter","find"]),Il=new Map,Cl=new Map([["get",js],["set",bt],["peek",_r],["onChange",xn],["assign",function(t,e){const n=ft(t);if(Us(),Qe(t.root._)&&(t.root._={}),Ue(e)){const r=_e(t);Ue(r)?e.forEach((i,o)=>r.set(o,i)):bt(t,e)}else{t.isAssigning=(t.isAssigning||0)+1;try{Object.assign(n,e)}finally{t.isAssigning--}}return oi(),n}],["delete",Tm],["toggle",function(t){const e=_e(t);(e==null||em(e))&&bt(t,!e)}]]);function vm(t,e,n,...r){var i;if(n!=="push"||r.length!==1){const o=e.slice(),s=e[n].apply(e,r);if(t){const a=Fs(t),l=a?t.key:"_";(a?_e(t.parent):t.root)[l]=o,Jr((i=t.parent)!=null?i:t,l,e)}return s}Jr(t,e.length+"",r[0])}function Pc(t,e,n){var r,i,o;if(Yt(e)&&Ui(e)||Yt(n)&&Ui(n)){const v=e!==n;return v&&(t.listeners||t.listenersImmediate)&&Bi(t,e,n,0),v}const s=ke(e);let a,l;const u=Ue(e),c=En(e),d=Ue(n),h=En(n),f=Tl(e,s,u,c),p=Tl(n,s,d,h),m=((r=f||e)==null?void 0:r.length)||0,E=((i=p||n)==null?void 0:i.length)||0;let _,A,O,S=!1;if(s&&ke(n)){if(n.length>0){const v=n[0];if(v!==void 0&&(_=cm(v,t),_&&(A=Q(_),a=new Map,l=[]),t.children))for(let T=0;T<n.length;T++){const R=n[T];if(R){const I=t.children.get(T+"");if(I&&(e[T]||dd(I,R),_)){const g=A?_(R):R[_];a.set(g,I)}}}}}else if(n&&(!e||Yt(e))){const v=p.length;for(let T=0;T<v;T++){const R=p[T];if(!f.includes(R)){S=!0;const I=Ht(t,R),g=d?n.get(R):n[R];g!==void 0&&dd(I,g)}}}if(e&&!Qe(e)){S=S||m!==E;const v=S;let T=!1;for(let R=0;R<m;R++){const I=s?R+"":f[R];let g=u?e.get(I):e[I];const D=d?n==null?void 0:n.get(I):n==null?void 0:n[I];let C=!um(g,D);if(C){const N=_&&g?A?_(g):g[_]:void 0,k=(o=t.children)==null?void 0:o.get(I);if(Ce(g)){const L=ao(g);if((k==null?void 0:k.linkedToNode)===L){const P=_e(L);u?e.set(I,P):e[I]=P;continue}const x=g;g=()=>x}let b=Ht(t,I,g);if(b.lazy||!Q(g)&&!Ce(g)||(Im(b,g),kn(b)),s&&N!==void 0){const L=N!==void 0?a==null?void 0:a.get(N):void 0;if(L){if(L!==void 0&&L.key!==I){const x=n[L.key];v&&(b=L,t.children.delete(b.key),b.key=I,l.push([I,b])),T=!0,C=x!==g}}else S=!0}if(C)if(Q(g)||Ce(g))Qr(t,I,g);else if(Qe(g))S=!0;else{const L=Pc(b,g,D);S=S||L,C=L}(C||s&&!v)&&(b.listeners||b.listenersImmediate)&&Bi(b,g,D,0,!v)}}if(l)for(let R=0;R<l.length;R++){const[I,g]=l[R];t.children.set(I,g)}O=S||T}else n!==void 0&&(O=!0);return O!=null&&O}function dd(t,e){var n,r;(n=t.linkedToNodeDispose)==null||n.call(t),(r=t.activatedObserveDispose)==null||r.call(t),Qe(e)||Pc(t,void 0,e),(t.listeners||t.listenersImmediate)&&Bi(t,void 0,e,0)}function ft(t,e,n){return e!==void 0&&(t=Ht(t,e,n)),t.proxy||(t.proxy=new Proxy(t,Dm))}function Nl(){if(be.pendingNodes.size>0){const t=Array.from(be.pendingNodes.values());be.pendingNodes.clear(),t.forEach(e=>e())}}var Dm={get(t,e,n){var r,i,o;if(e===tm)return h=>Sm(t,h);if(e===qr)return t;if(e==="apply"||e==="call"){const h=_e(t);if(Q(h))return h[e]}if(e==="constructor"){const h=(r=kn(t))==null?void 0:r.constructor;return typeof h=="function"?h:Object}let s=kn(t,e==="get"||e==="peek");if(e===gg)return!s||Qe(s)?void 0:s[e];const a=t.linkedToNode||(s==null?void 0:s[qr]);if(a&&e!=="onChange")return Dm.get(a,e,n);if(Ue(s)||En(s)){const h=(function(f,p,m){const E=m==null?void 0:m[p];if(p==="size")return zo(f,!0),m[p];if(Q(E))return function(_,A,O){const S=arguments.length,v=m;if(p==="get"){if(S>0&&typeof _!="boolean"&&_!==bc)return ft(f,_)}else{if(p==="set")return S===2?bt(Ht(f,_),A):S===1&&Ue(m)&&bt(f,_),ft(f);if(p==="delete"){if(S>0){const R=m.get?v.get(_):_;return Tm(f,_),R!==void 0}}else{if(p==="clear"){const R=En(v)?new Set(v):new Map(v),I=v.size;return v.clear(),void(I&&Rm(f,m,R))}if(p==="add"){const R=new Set(m),I=m.add(_);return m.has(p)||Bi(f,I,R,0),ft(f)}}}const T=Cl.get(p);if(!T)return m[p](_,A);switch(S){case 0:return T(f);case 1:return T(f,_);case 2:return T(f,_,A);default:return T(f,_,A,O)}}})(t,e,s);if(h!==void 0)return h}const l=Cl.get(e);if(l)return e!=="get"&&e!=="peek"||Nl(),function(h,f,p){switch(arguments.length){case 0:return l(t);case 1:return l(t,h);case 2:return l(t,h,f);default:return l(t,h,f,p)}};const u=Il.get(e);if(u)return u.get(t);let c=s==null?void 0:s[e];if(Yt(s)&&Ui(s))return c;const d=(i=t.functions)==null?void 0:i.get(e);if(d)return Ce(d)?d:ft(t,e,d);if(c=(function(h,f){if(h){const p=Object.getOwnPropertyDescriptor(h,f);return p!=null&&p.get&&(delete h[f],h[f]=p.set?(function(m){Q(m)&&(m={get:m});const E=function(){return{[Hi]:m}};return E.prototype[Hi]=m,E})({get:p.get,set:({value:m})=>p.set(m)}):p.get),h[f]}})(s,e),(function(h){return h==null})(s)&&c===void 0&&(va.has(e)||ud.has(e))&&(s=[],va.has(e)&&hn(t,s),c=s[e]),Q(c)){if(ke(s)){if(va.has(e))return(...f)=>vm(t,s,e,...f);if(ud.has(e))return zo(t,!0),function(f,p){const m=e==="reduce",E=m?(O,S,v,T)=>f(O,ft(t,v+"",S),v,T):(O,S,v)=>f(ft(t,S+"",O),S,v);if(m||!kg.has(e))return s[e](E,p);const _=e==="find",A=[];for(let O=0;O<s.length;O++)if(E(s[O],O,s)){const S=ft(t,O+"");if(_)return S;A.push(S)}return _?void 0:A}}Qr(t,e,c);const h=(o=t.functions)==null?void 0:o.get(e);return h?ft(t,e,h):c.bind(s)}return Qe(c)&&e==="length"&&ke(s)?(zo(t,!0),c):ft(t,e)},getPrototypeOf(t){const e=_e(t);return e!==null&&typeof e=="object"?Reflect.getPrototypeOf(e):null},ownKeys(t){kn(t);const e=js(t,!0);if(Qe(e))return[];const n=e?Reflect.ownKeys(e):[];if(ke(e)&&n[n.length-1]==="length"&&n.splice(n.length-1,1),Q(t)){const r=Reflect.ownKeys(t);["caller","arguments","prototype"].forEach(i=>r.includes(i)&&n.push(i))}return n},getOwnPropertyDescriptor(t,e){if(e==="caller"||e==="arguments"||e==="prototype")return{configurable:!1,enumerable:!1};const n=_e(t);if(Qe(n))return;const r=Reflect.getOwnPropertyDescriptor(n,e);return r?{...r,configurable:!0}:void 0},set(t,e,n){if(t.isSetting)return Reflect.set(t,e,n);if(t.isAssigning)return Jr(t,e,n),!0;const r=Il.get(e);return!!r&&(r.set(t,n),!0)},deleteProperty:(t,e)=>!!t.isSetting&&Reflect.deleteProperty(t,e),has(t,e){const n=_e(t);return n!=null&&(typeof n=="object"||typeof n=="function")&&Reflect.has(n,e)},apply(t,e,n){Ce(e)&&(e=e.peek());const r=_e(t),i=Q(r)?r:t.lazyFn||t;return Reflect.apply(i,e,n)}};function bt(t,e){t.parent?Jr(t.parent,t.key,e):Jr(t,"_",e)}function Jr(t,e,n,r){const i=!t.parent&&e==="_";!t.parent||_e(t)||Q(n)||bt(t,{[e]:n});const o=i?t:Ht(t,e,n);if(dm(o,n),Ce(n))cs(o,n);else{const{newValue:s,prevValue:a,parentValue:l}=hn(o,n),u=Qe(a)||a instanceof Date||Qe(s)||s instanceof Date;if(!u){let h=o;do h.needsExtract=!0,h.recursivelyAutoActivated=!1;while(h=h.parent)}const c=!um(s,a),d=!c&&o.isComputing&&!u&&!o.isPlain;!c&&!d||o.isComputing&&o.isPlain&&t.numListenersRecursive===0||Rm(t,s,a,o,l,u,i,r,d),Qr(t,e,s)}}function Tm(t,e){e===void 0&&Fs(t)&&(e=t.key,t=t.parent);const n=_e(t);ke(n)?vm(t,n,"splice",e,1):Jr(t,e!=null?e:"_",Hs,-1)}function Rm(t,e,n,r,i,o,s,a,l){r||(r=t),Us(),o===void 0&&(o=Qe(e));let u,c,d=l||o,h=!1;(!o||n&&!Qe(n))&&(d=d||Pc(r,e,n),ke(e)?u=e:(Ue(e)||En(e))&&(c=e)),ke(i)?u=i:(Ue(i)||En(i))&&(c=i),u?h=(u==null?void 0:u.length)!==(n==null?void 0:n.length):c&&(h=(c==null?void 0:c.size)!==(n==null?void 0:n.size)),(o||!e||is(e)&&!is(n)?e!==n:d)&&Bi(o&&s?t:r,e,n,(a!=null?a:n===void 0)?-1:d?0:1,h),oi()}function Zr(t,e,n){const r=t.numGets=(t.numGets||0)+1;t.state||(t.state=Mc({isLoaded:!1},!1,Zr,ft)),e.then(i=>{r>=(t.getNumResolved||0)&&(t.getNumResolved=t.numGets,n?n({value:i}):bt(t,i),t.state.assign({isLoaded:!0,error:void 0}))}).catch(i=>{t.state.error.set(i)})}function Qr(t,e,n){if(Vt(n)){const r=Ht(t,e);return Zr(r,n),void hn(r,void 0)}if(Ce(n)){const r=()=>n;id(t,e,r);const i=Ht(t,e,r),o=_r(ao(n));return cs(i,n),hn(i,o),_e(i)}if(typeof n=="function")return id(t,e,n),e}function js(t,e){return zo(t,e?Yt(e)?e.shallow:e:void 0),_r(t)}function _r(t){return kn(t,!0)}var Io=!1;function kn(t,e){var n;if(Io=!0,e&&((n=t.dirtyChildren)==null?void 0:n.size)){const i=Array.from(t.dirtyChildren);t.dirtyChildren.clear(),i.forEach(o=>o.dirtyFn&&kn(o))}if(t.dirtyFn){const i=t.dirtyFn;t.dirtyFn=void 0,be.dirtyNodes.delete(t),i()}Io=!1;let r=_e(t);return t.root.isLoadingLocal||t.isPlain||(r=(function(i,o,s){const a=o,l=i.lazy;if(l){const u=i.lazyFn;if(delete i.lazy,Q(u))if(u.length===1)o={};else{if(i.parent){const c=_e(i.parent);Q(o)&&(c?delete c[i.key]:i.root._=void 0)}o=(function(c,d){let h,f,p,m=!0;const E=d;let _,A,O=[];function S(){c.dirtyFn=A,be.dirtyNodes.add(c)}const v=mt(()=>{var T,R,I,g;if(m)m=!1,Q(_e(c))&&hn(c,void 0);else if(!Io&&A&&(function(b,L){if(!Io&&!(function(P){var B,V;let $=P,z=P.numListenersRecursive>0;for(;$&&!z;)((B=$.listeners)!=null&&B.size||(V=$.listenersImmediate)!=null&&V.size)&&(z=!0),$=$.parent;return z})(b)){L&&(b.dirtyFn=L);let P=b;for(;P;)P.dirtyChildren||(P.dirtyChildren=new Set),P.dirtyChildren.add(b),P=P.parent;return!0}})(c,A))return void(p=!0);let D=E(),C=!1;const N=Ce(D);(N||c.linkedToNode)&&(C=N,D=cs(c,D)),Q(D)&&D.length===0&&(D=D());const k=N||D==null?void 0:D[Hi];if(k&&(c.activationState=k,D=void 0),p=!1,f=Vt(D),c.activated){if(c.activationState){const b=c.activationState;(R=(T=c.state)==null?void 0:T.peek())!=null&&R.sync?(c.state.sync(),p=!0):D=(g=(I=b.get)==null?void 0:I.call(b))!=null?g:b.initial}}else{c.activated=!0;let b=Lg;k!=null&&k.synced&&(b=be.activateSyncedNode,p=!0);const L=b(c,D);h=L.update;let x=L.value;!C&&Ce(x)&&(x=cs(c,x)),D=x!=null?x:k==null?void 0:k.initial}return p&&(_=D),f=f||Vt(D),D},T=>{const{value:R,nodes:I,refresh:g}=T;if(A=g,!p){if(!f||!be.isLoadingRemote)if(f)if(c.activationState){const{initial:D}=c.activationState;R&&Vt(R)&&Zr(c,R,h),Q(_e(c))&&hn(c,D!=null?D:void 0)}else c.activated&&(Zr(c,R,h),Q(_e(c))&&hn(c,void 0));else{_=R;const D=c.state.isLoaded.peek();!D&&Q(R)||(c.isComputing=!0,bt(c,R),c.isComputing=!1),D||c.state.assign({isLoaded:!0,error:void 0})}O.forEach(D=>D()),O=[],I==null||I.forEach(({node:D,track:C})=>{O.push(xn(D,S,{immediate:!0,trackingType:C}))})}T.cancel=!0},{fromComputed:!0});return c.activatedObserveDispose=()=>{v==null||v(),O.forEach(T=>T())},_})(i,u)}else Ce(o)&&(o=Qr(i.parent,i.key,o))}return dm(i,o),!l&&!i.needsExtract||i.isPlain||Ce(o)||Qe(o)||(s&&(function(u,c){if(!c.recursivelyAutoActivated&&(Yt(u)||ke(u))&&!Ui(u)){c.recursivelyAutoActivated=!0;const d=[];Cm(u,d,()=>{var f;let p=c;for(let m=0;m<d.length;m++){const E=d[m],_=(f=_e(p))==null?void 0:f[E];p=Ht(p,E,Q(_)?_:void 0),kn(p)}return p})}})(o,i),i.parent&&Qr(i.parent,i.key,a)),o})(t,r,!!e)),r}function ym(t){var e,n;(e=t.activatedObserveDispose)==null||e.call(t),(n=t.linkedToNodeDispose)==null||n.call(t),t.activatedObserveDispose=t.linkedToNodeDispose=t.linkedToNode=void 0}function Im(t,e){ym(t),t.lazyFn=e,t.lazy=!0}function Lg(t,e){if(t.state||(t.state=Mc({isLoaded:!1},!1,Zr,ft)),t.activationState){const{set:n,get:r,initial:i}=t.activationState;if((e=r==null?void 0:r())!=null&&e!==null||(e=i),n){let o,s=[],a=0;const l=u=>{if(s.length>0){let c,d,h,f=!1,p=!1;u?(c=u.changes,d=u.value,f=u.isFromPersist,p=u.isFromSync,h=u.getPrevious):(c=s,d=o,h=Lc(d,c)),s=[],o=void 0,be.pendingNodes.delete(t),a++;const m=a,E=()=>{m===a&&(t.isComputing=!0,n({value:d,changes:c,isFromPersist:f,isFromSync:p,getPrevious:h}),t.isComputing=!1)};Om(t.state.isLoaded,E,!0)}};xn(t,({value:u,changes:c})=>{t.isComputing||(c.length>1||!Q(c[0].prevAtPath))&&(o=u,s.length>0&&(c=c.filter(d=>!pm(s[0].path,d.path))),s.push(...c),be.pendingNodes.set(t,l))},{immediate:!0}),xn(t,l)}}return{update:({value:n})=>{t.isComputing||(t.isComputing=!0,bt(t,n),t.isComputing=!1)},value:e}}function cs(t,e){var n;const r=e?ao(e):void 0;return r!==t&&(r==null?void 0:r.linkedToNode)!==t&&(t.linkedToNode=r,(n=t.linkedToNodeDispose)==null||n.call(t),r&&(r.linkedFromNodes||(r.linkedFromNodes=new Set),r.linkedFromNodes.add(t),t.linkedToNodeDispose=xn(r,()=>{Q(e=kn(r))||bt(t,e)},{initial:!0},new Set([t])))),e}function Cm(t,e,n){var r;if((Yt(t)||ke(t))&&!Ui(t)&&!rm(t)){for(const i in t)if(Nc.call(t,i)){const o=t[i];if(Ce(o)){const s=n();Qr(s,i,o),delete s.lazy}else{const s=Q(o)&&((r=o.prototype)==null?void 0:r[Hi]);if(s){const a=s.activate;(!a||a==="auto")&&_r(Ht(n(),i,o))}}typeof o=="object"&&(e.push(i),Cm(o,e,n),e.pop())}}}var hd=["get","set","peek","onChange","toggle"];function qn(t){this._node=t;for(let e=0;e<hd.length;e++){const n=hd[e];this[n]=this[n].bind(this)}}function Co(t,e){qn.prototype[t]=function(...n){return e.call(this,this._node,...n)}}function ae(t){return Mc(t,!1,Zr,ft,qn)}Co("peek",t=>(Nl(),_r(t))),Co("get",(t,e)=>(Nl(),js(t,e))),Co("set",bt),Co("onChange",xn),Object.defineProperty(qn.prototype,qr,{configurable:!0,get(){return this._node}}),Object.defineProperty(qn.prototype,tm,{configurable:!0,value(t){return Sm(this._node,t)}}),qn.prototype.toggle=function(){const t=this.peek();(t==null||em(t))&&this.set(!t)},qn.prototype.delete=function(){return this.set(void 0),this};var $s={createPreviousHandler:Lc,clone:am,deactivateNode:ym,deepMerge:ss,ensureNodeValue:wc,findIDKey:cm,get:js,getChildNode:Ht,getKeys:Tl,getNode:ao,getNodeValue:_e,getPathType:im,getProxy:ft,getValueAtPath:function(t,e){return e.reduce(Rg,t)},globalState:be,initializePathType:kc,ObservablePrimitiveClass:qn,observableProperties:Il,observableFns:Cl,optimized:bc,peek:_r,reactivateNode:Im,registerMiddleware:function(t,e,n){let r=Mr.get(t);r||(r=new Map,Mr.set(t,r));let i=r.get(e);return i||(i=new Set,r.set(e,i)),i.add(n),()=>{const o=Mr.get(t);if(!o)return;const s=o.get(e);s&&(s.delete(n),s.size===0&&(o.delete(e),o.size===0&&Mr.delete(t)))}},safeParse:sm,safeStringify:om,set:bt,setAtPath:hm,setNodeValue:hn,symbolLinked:Hi,symbolDelete:Hs,tracking:xr},{globalState:pd,observableProperties:Mg,observableFns:Pg,ObservablePrimitiveClass:fd}=$s;class Vs{constructor(e={}){this._handlers=new Set,this._meta=e}meta(e){return new Vs(e)}_emit(e,n){for(const r of this._handlers)r({level:e,data:n,timestamp:Date.now(),meta:this._meta})}error(...e){return this._emit("error",e)}warn(...e){return this._emit("warn",e)}info(...e){return this._emit("info",e)}log(...e){return this._emit("log",e)}trace(...e){return this._emit("trace",e)}registerHandler(e){return this._handlers.add(e),()=>this._handlers.delete(e)}}const bl=new Vs,Ie=new Vs;function md(t,e,n){return t.clearRect(0,0,100,100),t.fillStyle=n,t.fillText(e,0,0),t.getImageData(0,0,1,1).data.join(",")}function Ed(t){const e=(function(){const i=document.createElement("canvas");i.width=i.height=1;const o=i.getContext("2d",{willReadFrequently:!0});return o.textBaseline="top",o.font='100px "Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',o.scale(.01,.01),o})(),n=md(e,t,"#fff"),r=md(e,t,"#000");return r===n&&!r.startsWith("0,0,0,")}const xg=ii(null),Da={didCatch:!1,error:null};class Nm extends Nt{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Da}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:o,reason:"imperative-api"}),this.setState(Da)}}componentDidCatch(e,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,e,n)}componentDidUpdate(e,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;var o,s;r&&n.error!==null&&(function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return a.length!==l.length||a.some((u,c)=>!Object.is(u,l[c]))})(e.resetKeys,i)&&((o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:i,prev:e.resetKeys,reason:"keys"}),this.setState(Da))}render(){const{children:e,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:o,error:s}=this.state;let a=e;if(o){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=fe(r,l);else{if(i===void 0)throw s;a=i}}return fe(xg.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}var No=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function zs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function xc(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var _d={exports:{}},Ta={};const bm=xc(Cc);var Ad,gd,Fg=(gd||(gd=1,_d.exports=(function(){if(Ad)return Ta;Ad=1;var t=bm,e=typeof Object.is=="function"?Object.is:function(l,u){return l===u&&(l!==0||1/l==1/u)||l!=l&&u!=u},n=t.useState,r=t.useEffect,i=t.useLayoutEffect,o=t.useDebugValue;function s(l){var u=l.getSnapshot;l=l.value;try{var c=u();return!e(l,c)}catch(d){return!0}}var a=typeof window=="undefined"||window.document===void 0||window.document.createElement===void 0?function(l,u){return u()}:function(l,u){var c=u(),d=n({inst:{value:c,getSnapshot:u}}),h=d[0].inst,f=d[1];return i(function(){h.value=c,h.getSnapshot=u,s(h)&&f({inst:h})},[l,c,u]),r(function(){return s(h)&&f({inst:h}),l(function(){s(h)&&f({inst:h})})},[l]),o(c),c};return Ta.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:a,Ta})()),_d.exports),Sd=!1,wl={inObserver:!1},Od=void 0,Hg=()=>Od||(Od=ii(null));function vd(t){const e=Bs(t);if(!F.use)throw e;F.use(e)}function J(t,e){let n;if(wl.inObserver&&Ce(t)&&!(e!=null&&e.suspense))return n=Gt(t,e),e!=null&&e.suspense&&n===void 0&&vd(t),n;try{const r=Hn(Hg()),i=te(()=>(function(l,u){let c,d,h,f,p,m,E=0;const _=()=>{d==null||d();const{value:O,dispose:S,resubscribe:v}=gm(f,A,l,void 0,void 0,!0);return d=S,h=v,O},A=({value:O})=>{if(u!=null&&u.peek()){const S=m;m=O,S===void 0&&Bs(()=>!u.get(),()=>{const v=m;m=void 0,A({value:v})})}else{let S=l==null?void 0:l.skipCheck;if(!S){const v=_();(v!==p||!Qe(v)&&v===O)&&(S=!0)}S&&(E++,c==null||c())}};return{subscribe:O=>(c=O,!d&&h&&(d=h()),()=>{d==null||d(),d=void 0}),getVersion:()=>E,run:O=>(f=O,p=_())}})(e,r),[]),{subscribe:o,getVersion:s,run:a}=i;n=a(t),Fg.useSyncExternalStore(o,s,s)}catch(r){throw r}return e!=null&&e.suspense&&n===void 0&&vd(t),n}var Dd=typeof Symbol=="function"&&Symbol.for;function wm(t,e,n,r,i){const o=Dd?Symbol.for("react.forward_ref"):_t(p=>null).$$typeof,s=Dd?Symbol.for("react.memo"):mn(p=>null).$$typeof;if(t.__legend_proxied)return t;let a=!1,l=!1,u=t;s&&u.$$typeof===s&&u.type&&(l=!0,u=u.type),o&&u.$$typeof===o&&(a=!0,u=u.render);const c=r?new Set(r):void 0,d={apply(p,m,E){if(n){const _=E[0],A={},O=Object.keys(_);for(let S=0;S<O.length;S++){const v=O[S],T=_[v],R=c&&c.has(v);if(v==="children"&&(Q(T)||Ce(T)))A[v]=J(T,{skipCheck:!0});else if(R||v.startsWith("$")||v.endsWith("$")){const I=R?v:v.endsWith("$")?v.slice(0,-1):v.slice(1),g=i==null?void 0:i[I],D=g&&Ce(T);if(A[I]=D&&(g!=null&&g.selector)?g.selector(A,T):J(T),D&&(g.defaultValue!==void 0&&A[I]===void 0&&(A[I]=g.defaultValue),g.handler&&g.getValue)){const C=N=>{var k;T.set(g.getValue(N)),(k=_[g.handler])==null||k.call(_,N)};A[g.handler]=q(C,[_[g.handler],i])}R||delete A[v]}else A[v]===void 0&&(A[v]=T)}E[0]=A}return e?J(()=>{wl.inObserver=!0;try{return Reflect.apply(p,m,E)}finally{wl.inObserver=!1}},{skipCheck:!0}):Reflect.apply(p,m,E)}},h=new Proxy(u,d);let f;return a?(f=_t(h),f.__legend_proxied=!0):f=h,e||l?mn(f):f}var{findIDKey:Ug,getNode:Bg,optimized:jg}=$s,Td=new Map;function ji({each:t,optimized:e,item:n,itemProps:r,sortValues:i,children:o}){var s;if(!t)return null;const a=J(()=>t.get(!e||jg));if(!n&&o){const u=X(void 0);u.current=o,n=te(()=>{return c=({item$:d,id:h})=>u.current(d,h),wm(c,!0);var c},[])}else if(n.$$typeof!==Symbol.for("react.memo")){let u=Td.get(n);u||(u=mn(n),Td.set(n,u)),n=u}if(!a)return null;const l=[];if(ke(a)){const u=a[0],c=Bg(t),d=a.length,h=d>0?c&&Ug(u,c)||(u.id!==void 0?"id":u.key!==void 0?"key":void 0):void 0,f=Q(h);for(let p=0;p<d;p++)if(a[p]){const m=a[p],E=(s=f?h(m):m[h])!=null?s:p,_=t[p],A={key:E,id:E,item$:_,item:_};l.push(fe(n,r?Object.assign(A,r):A))}}else{const u=Ue(a),c=u?Array.from(a.keys()):Object.keys(a);i&&c.sort((d,h)=>i(u?a.get(d):a[d],u?a.get(h):a[h],d,h));for(let d=0;d<c.length;d++){const h=c[d];if(u?a.get(h):a[h]){const f=u?t.get(h):t[h],p={key:h,id:h,item$:f,item:f};l.push(fe(n,r?Object.assign(p,r):p))}}}return l}mn(function({children:t}){return J(()=>Gt(Gt(t)),{skipCheck:!0})},(t,e)=>!e.scoped||t.children===e.children);var Rd=new Map,yd=new Map;function Id({if:t,ifReady:e,else:n,$value:r,wrap:i,children:o}){const s=J(t!=null?t:e),a=J((e!==void 0?Rl(s):s)?Q(o)?()=>o(r?r.get():s):o:n!=null?n:null,{skipCheck:!0});return i?fe(i,void 0,a):a}new Proxy({},{get(t,e){if(!t[e]){const n=Rd.get(e)||e,r=_t((i,o)=>{const s={...i};return!o||!Q(o)&&is(o)||(s.ref=o),fe(n,s)});t[e]=(function(i,o,s){return wm(i,!1,!0,o,s)})(r,[],yd.get(e))}return t[e]}}),(function(t){(function(e){if(Sd)return;Sd=!0;const n={value:{handler:"onChange",getValue:i=>i.target.value,defaultValue:""}},r=Object.assign({checked:{handler:"onChange",getValue:i=>i.target.checked}},n);e({binders:{input:r,textarea:n,select:n}})})(t)})(function({components:t,binders:e}){if(t)for(const n in t)Rd.set(n,t[n]);if(e)for(const n in e)yd.set(n,e[n])});var $g=(t,e)=>{{const n=X({num:0});G(()=>{var r;const{current:i}=n;i.num++;const o=()=>{i.dispose&&i.num<2&&(i.dispose(),i.dispose=void 0),i.num--};if(i.dispose!==void 0)return o;{const s=(r=t())!=null?r:null;if(s&&Q(s))return i.dispose=s,()=>queueMicrotask(o)}},e)}};function km(t){return $g(()=>{const e=t();if(!Vt(e))return e},[])}var Vg=km;function Lm(t){return km(()=>t)}var zg=Lm,{deactivateNode:Yg}=$s;function lt(t,e){var n;const r=X({});r.current.value=t;const i=e?lt(e):void 0;if(!((n=r.current)!=null&&n.obs$)){const o=i?Q(t)&&t.length===1?s=>(i.get(),r.current.value(s)):()=>(i.get(),Gt(r.current.value)):t;r.current.obs$=ae(o)}return i&&i.set(e),Lm(()=>{const o=r.current.obs$;if(o){const s=ao(o);Yg(s)}}),r.current.obs$}function Mm(t,e,n,r){let i;Q(e)?i=e:Array.isArray(e)?(r=e,n=void 0):n=e,i&&Array.isArray(n)&&(r=n,n=void 0);const o=(r=r||(n==null?void 0:n.deps))?lt(r):void 0,s=X({});return s.current.selector=t,s.current.reaction=i,o&&o.set(r),s.current.dispose||(s.current.dispose=mt(a=>{var l;return o==null||o.get(),Gt((l=s.current)==null?void 0:l.selector,void 0,a)},a=>{var l,u;return(u=(l=s.current).reaction)==null?void 0:u.call(l,a)},n)),zg(()=>{var a,l;(l=(a=s.current)==null?void 0:a.dispose)==null||l.call(a)}),s.current.dispose}function $i(t,e,n,r){let i;Q(e)?i=e:Array.isArray(e)?(r=e,n=void 0):n=e,i&&Array.isArray(n)&&(r=n,n=void 0),r=r||(n==null?void 0:n.deps);const o=X({}),s=r?lt(r):void 0;o.current.selector=t,o.current.reaction=i,s&&s.set(r),Vg(()=>mt(a=>{var l;return s==null||s.get(),Gt((l=o.current)==null?void 0:l.selector,void 0,a)},a=>{var l,u;return(u=(l=o.current).reaction)==null?void 0:u.call(l,a)},n))}class Pm extends Error{}function Cd(t,e){if(!t)throw new Pm(e!=null?e:"Assertion failed")}const ie=Object.assign(Cd,{is:function(t,e,n){return Cd(e,n)},unreachable:function(){throw new Error("Unreachable code")},never:function(t){throw new Error("Unreachable")},defined:function(t){if(t==null)throw new Pm("Value is not defined")}}),[xm,et]=Zt(),[Fm,lo]=Zt(),[Hm]=Zt(),[Fc,si]=Zt(),[Gg,Wg]=Zt(),[Um,oe]=Zt(),[Bm,Ar]=Zt(),[jm,$m]=Zt(),[Vm,Xg]=Zt(),[Kg,Hc]=Zt();function Zt(){const t=ii(void 0);return[t,()=>{const e=Hn(t);return ie(e!==void 0),e}]}const jr={code:"en-US",name:"English (US)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/en.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json",translation:{YESTERDAY:"Yesterday",TODAY:"Today",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just now",LOCATION:"Location",CANCEL:"Cancel",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser notifications",DESKTOP_NOTIFICATIONS_ERROR:"Can't enable browser notifications because your browser actively blocks them. Try looking in the settings or using a different browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notification`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"If you keep your browser tab open, you'll see this pop up when someone talks to you.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Only 10,000 characters are allowed.",ENTRYBOX_PLACEHOLDER:"Say something...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"This conversation is no longer active.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"You can read, but not send messages.",MESSAGELIST_LOADING_OLDER:"Loading older messages...",MESSAGELIST_SHOW_OLDER:"Show older messages",MESSAGELIST_NEW_MARKER:"New",MESSAGE_SENT_VIA_EMAIL:"This message was sent via email",YOU_MARKER:"you",UPLOAD_IN_PROGRESS:"Uploading...",UPLOAD_SEND_FILE:"Send file",UPLOAD_SHARE_LOCATION:"Share location",UPLOAD_ERROR:"Unfortunately, something went wrong uploading. The file might be unsupported or too large.",SHARE_LOCATION_ERROR:"Cannot share location: ",LOADING:"Loading...",HUB_EMPTY:"Your chat history will show up here",HUB_SHOW_EARLIER:"Show earlier chats",INBOX_NO_CHATS_TITLE:"No chats yet!",INBOX_NO_CHATS_BODY:"Once you've had one or more conversations, they will show up here.",ENABLE_TRANSLATION:"Translate this conversation to English",DISABLE_TRANSLATION:"Show original",SEARCH_PLACEHOLDER_TEXT:"Search...",SEARCH_SEARCHING:"Searching...",SEARCH_NO_RESULTS:"No results found",SEARCH_NO_MORE_RESULTS:"No more results",SEARCH_RESULTS_CONVERSATIONS:"Conversations",SEARCH_RESULTS_MESSAGES:"Messages",SEARCH_RESULTS_SHOW_MORE:"Show more",CHAT_NOT_FOUND:"Conversation not found",DELETE_MESSAGE:"Delete message",DELETION_EXPLANATION:"If you delete this message, it will disappear for everybody.",EDIT_MESSAGE:"Edit message",SAVE:"Save",EDITED_INDICATOR:"edited",REPLY_TO_MESSAGE:"Reply",ADD_REACTION:"Add reaction",AUTH_EXPIRED_OVERLAY_TITLE:"Your chat session has expired",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Refresh the page to continue",VOICE_MESSAGE:"Voice message",LEAVE_CONVERSATION:"Leave conversation",MARK_CONVERSATION_AS_UNREAD:"Mark as unread",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"hidden information",ARIA_LEAVE_SEARCH_MODE:"Leave search mode",ARIA_SEARCH_UP:"Search up",ARIA_SEARCH_DOWN:"Search down",ARIA_CLOSE_CHAT_POPUP:"Close the chat popup",ARIA_SEARCH_INSIDE_CONVERSATION:"Search inside this conversation",ARIA_SEARCH:"Search",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"set playback speed",ARIA_CANCEL_UPLOAD:"Cancel upload",ARIA_STOP_RECORDING:"Stop recording",ARIA_CANCEL_RECORDING:"Cancel recording",ARIA_INSERT_EMOJI:"Insert an emoji",ARIA_PLAY_AUDIO:"play audio",ARIA_PAUSE_AUDIO:"pause audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reactions with ${e}`,ARIA_MORE_ACTIONS:"More actions",ARIA_REPLYING_TO:(t,e)=>`Replying to ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Exit reply mode",SELECT_CONVERSATION:"Select a conversation"}},Nd={ar:{code:"ar",name:"Arabic",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ar.js",emojiDataUrl:null,translation:{YESTERDAY:"الأمس",TODAY:"اليوم",DAYS:"يوم",HOURS:"ساعة",MINUTES:"دقيقة",JUST_NOW:"فقط الآن",LOCATION:"الموقع",CANCEL:"إلغاء",INBOX:"علبة الوارد",DESKTOP_NOTIFICATIONS:"إشعارات المتصفح",DESKTOP_NOTIFICATIONS_ERROR:"لا يمكن تمكين إشعارات المتصفح لأن متصفحك يمنعها بشكل نشط. جرّب البحث في الإعدادات أو استخدام متصفح آخر.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`إعلام ${t} التجريبي`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"إذا أبقيت علامة تبويب المتصفح مفتوحة ، فسترى هذا ينبثق عندما يتحدث شخص معك.",SEND_BUTTON_TEXT:"إرسال",ENTRYBOX_TEXT_LIMIT:"يُسمح فقط بـ 10.000 حرف.",ENTRYBOX_PLACEHOLDER:"قل شيئًا ...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"هذه المحادثة لم تعد نشطة.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"يمكنك القراءة ، لكن لا يمكنك إرسال الرسائل.",MESSAGELIST_LOADING_OLDER:"جارٍ تحميل الرسائل القديمة ...",MESSAGELIST_SHOW_OLDER:"عرض الرسائل الأقدم",MESSAGELIST_NEW_MARKER:"جديد",MESSAGE_SENT_VIA_EMAIL:"تم إرسال هذه الرسالة عبر البريد الإلكتروني",YOU_MARKER:"أنت",UPLOAD_IN_PROGRESS:"جارٍ التحميل ...",UPLOAD_SEND_FILE:"إرسال ملف",UPLOAD_SHARE_LOCATION:"مشاركة الموقع",UPLOAD_ERROR:"حدث خطأ ما في تحميل شيء. ربما يكون الملف غير متوافق أو كبير جدًا.",SHARE_LOCATION_ERROR:"لا يمكن مشاركة الموقع:",LOADING:"جارٍ التحميل ...",HUB_EMPTY:"سوف يظهر سجل الدردشات هنا",HUB_SHOW_EARLIER:"إظهار الدردشات السابقة",INBOX_NO_CHATS_TITLE:"لا توجد دردشات بعد!",INBOX_NO_CHATS_BODY:"بمجرد أن يكون لديك واحد أو أكثر من المحادثات ، سوف تظهر هنا.",ENABLE_TRANSLATION:"ترجم هذه المحادثة إلى العربية",DISABLE_TRANSLATION:"إظهار الأصلي",SEARCH_PLACEHOLDER_TEXT:"...بحث",SEARCH_SEARCHING:"...يتم الآن البحث",SEARCH_NO_RESULTS:"لم يتم العثور على نتائج",SEARCH_NO_MORE_RESULTS:"لا يوجد المزيد من النتائج",SEARCH_RESULTS_CONVERSATIONS:"المحادثات",SEARCH_RESULTS_MESSAGES:"الرسائل",SEARCH_RESULTS_SHOW_MORE:"إظهار المزيد",CHAT_NOT_FOUND:"لم يتم العثور على الدردشة",DELETE_MESSAGE:"احذف الرسالة",DELETION_EXPLANATION:"إذا قمت بحذف هذه الرسالة، فهي ستختفي للجميع.",EDIT_MESSAGE:"تعديل الرسالة",SAVE:"حفظ",EDITED_INDICATOR:"معدّلة",REPLY_TO_MESSAGE:"رد",ADD_REACTION:"أضف تفاعلاً",AUTH_EXPIRED_OVERLAY_TITLE:"انتهت جلسة الدردشة المخصصة لك",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"يُرجى إعادة تحميل الصفحة للمتابعة",VOICE_MESSAGE:"رسالة صوتية",LEAVE_CONVERSATION:"الخروج من المحادثة",MARK_CONVERSATION_AS_UNREAD:"وضع علامة غير مقروءة",STATUS_INDICATOR_ONLINE:"نشط",STATUS_INDICATOR_OFFLINE:"بعيد",CONTACT_INFORMATION_HIDDEN:"المعلومات المخفية",ARIA_LEAVE_SEARCH_MODE:"الخروج من وضع البحث",ARIA_SEARCH_UP:"البحث لأعلى",ARIA_SEARCH_DOWN:"البحث لأسفل",ARIA_CLOSE_CHAT_POPUP:"إغلاق نافذة الدردشة",ARIA_SEARCH_INSIDE_CONVERSATION:"البحث داخل هذه المحادثة",ARIA_SEARCH:"بحث",ARIA_CHAT:"دردشة",ARIA_SET_PLAYBACK_SPEED:"تعيين سرعة التشغيل",ARIA_CANCEL_UPLOAD:"إلغاء الرفع",ARIA_STOP_RECORDING:"إيقاف التسجيل",ARIA_CANCEL_RECORDING:"إلغاء التسجيل",ARIA_INSERT_EMOJI:"إدراج رمز تعبيري",ARIA_PLAY_AUDIO:"تشغيل الصوت",ARIA_PAUSE_AUDIO:"إيقاف الصوت مؤقتاً",ARIA_REACTION_COUNT:(t,e)=>`${t} تفاعل مع ${e}`,ARIA_MORE_ACTIONS:"المزيد من الإجراءات",ARIA_REPLYING_TO:(t,e)=>`الرد على ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"الخروج من وضع الرد",SELECT_CONVERSATION:"حدد محادثة"}},bg:{code:"bg-BG",name:"Bulgarian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Вчера",TODAY:"Днес",DAYS:"Ден",HOURS:"Час",MINUTES:"m",JUST_NOW:"Току-що",LOCATION:"местоположението",CANCEL:"Откажи",INBOX:"Кутия",DESKTOP_NOTIFICATIONS:"Известия на браузъра",DESKTOP_NOTIFICATIONS_ERROR:"Не можете да активирате известията на браузъра, защото браузърът ви ги блокира активно. Опитайте да погледнете в настройките или да използвате друг браузър.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} демо известие`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ако държите раздела на браузъра си отворен, ще видите този изскачащ прозорец, когато някой говори с вас.",SEND_BUTTON_TEXT:"Изпрати",ENTRYBOX_TEXT_LIMIT:"Разрешени са само до 10.000 знака.",ENTRYBOX_PLACEHOLDER:"Кажете нещо...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Този разговор вече не е активен.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Можете да четете, но не и да изпращате съобщения.",MESSAGELIST_LOADING_OLDER:"Зареждане на по-стари съобщения...",MESSAGELIST_SHOW_OLDER:"Показване на по-стари съобщения",MESSAGELIST_NEW_MARKER:"Нови",MESSAGE_SENT_VIA_EMAIL:"Това съобщение беше изпратено по имейл",YOU_MARKER:"Вие",UPLOAD_IN_PROGRESS:"Качване...",UPLOAD_SEND_FILE:"Изпращане на файл",UPLOAD_SHARE_LOCATION:"Споделяне на местоположението",UPLOAD_ERROR:"За съжаление нещо се обърка при качването. Файлът може да не се поддържа или е твърде голям.",SHARE_LOCATION_ERROR:"Не може да се сподели местоположението: ",LOADING:"Зареждане...",HUB_EMPTY:"Историята на вашите разговори ще се покаже тук",HUB_SHOW_EARLIER:"Показване на по-ранни чатове",INBOX_NO_CHATS_TITLE:"Все още нямате разговори!",INBOX_NO_CHATS_BODY:"След като проведете един или повече разговори, те ще се покажат тук.",ENABLE_TRANSLATION:"Преведете този разговор на български",DISABLE_TRANSLATION:"Показване на оригинал",SEARCH_PLACEHOLDER_TEXT:"Търсене...",SEARCH_SEARCHING:"Търсене...",SEARCH_NO_RESULTS:"Няма намерени резултати",SEARCH_NO_MORE_RESULTS:"Няма повече резултати",SEARCH_RESULTS_CONVERSATIONS:"Разговори",SEARCH_RESULTS_MESSAGES:"Съобщения",SEARCH_RESULTS_SHOW_MORE:"Покажи повече",CHAT_NOT_FOUND:"Чатът не е намерен",DELETE_MESSAGE:"Изтриване на съобщение",DELETION_EXPLANATION:"Ако изтриете това съобщение, то ще изчезне за всички.",EDIT_MESSAGE:"Редактиране на съобщението",SAVE:"Запиши",EDITED_INDICATOR:"редактирано",REPLY_TO_MESSAGE:"Отговори",ADD_REACTION:"Добави реакция",AUTH_EXPIRED_OVERLAY_TITLE:"Вашата чат сесия е изтекла",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Обновете страницата, за да продължите",VOICE_MESSAGE:"Гласово съобщение",CONTACT_INFORMATION_HIDDEN:"Скрита информация",LEAVE_CONVERSATION:"Напускане на разговора",MARK_CONVERSATION_AS_UNREAD:"Маркирай като непрочетено",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Отсъстващ",ARIA_LEAVE_SEARCH_MODE:"Напусни режим на търсене",ARIA_SEARCH_UP:"Търси нагоре",ARIA_SEARCH_DOWN:"Търси надолу",ARIA_CLOSE_CHAT_POPUP:"Затвори прозореца за чат",ARIA_SEARCH_INSIDE_CONVERSATION:"Търси в този разговор",ARIA_SEARCH:"Търсене",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"задай скорост на възпроизвеждане",ARIA_CANCEL_UPLOAD:"Отмени качване",ARIA_STOP_RECORDING:"Спри запис",ARIA_CANCEL_RECORDING:"Отмени запис",ARIA_INSERT_EMOJI:"Вмъкни emoji",ARIA_PLAY_AUDIO:"възпроизведи аудио",ARIA_PAUSE_AUDIO:"паузирай аудио",ARIA_REACTION_COUNT:(t,e)=>`${t} реакции с ${e}`,ARIA_MORE_ACTIONS:"Още действия",ARIA_REPLYING_TO:(t,e)=>`Отговор на ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Излизане от режим на отговор",SELECT_CONVERSATION:"Изберете разговор"}},bs:{code:"bs-BA",name:"Bosnian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika se ne mogu omogućiti jer ih vaš preglednik aktivno blokira. Pokušajte pregledati postavke ili koristiti drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu preglednika ostavite otvorenu, pojavit će se ovaj pop-up kada netko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Reci nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možeš čitati, ali ne i slati poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana e-poštom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podijeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podijeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovdje će se prikazati vaša povijest razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovdje.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na bosanski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",SEARCH_RESULTS_CONVERSATIONS:"Razgovori",SEARCH_RESULTS_MESSAGES:"Poruke",SEARCH_RESULTS_SHOW_MORE:"Prikaži više",CHAT_NOT_FOUND:"Ćaskanje nije pronađeno",DELETE_MESSAGE:"Obriši poruku",DELETION_EXPLANATION:"Ako izbrišete ovu poruku, ona će nestati za sve.",EDIT_MESSAGE:"Uredi poruku",SAVE:"Sačuvati",EDITED_INDICATOR:"uređeno",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodajte reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša chat sesija je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvježite stranicu da nastavite",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Skrivene informacije",LEAVE_CONVERSATION:"Napusti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitano",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretrage",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor chata",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcija s ${e}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(t,e)=>`Odgovaranje korisniku ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja",SELECT_CONVERSATION:"Odaberite razgovor"}},ca:{code:"ca-ES",name:"Catalan (ES)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ahir",TODAY:"Avui",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"ara mateix",LOCATION:"Ubicació",CANCEL:"Cancel·lar",INBOX:"Safata d'entrada",DESKTOP_NOTIFICATIONS:"Notificacions d'escriptori",DESKTOP_NOTIFICATIONS_ERROR:"No es poden habilitar les notificacions del navegador perquè el teu navegador les bloqueja activament. Prova de buscar a la configuració o utilitza un altre navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Notificació de demostració de ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si mantens la pestanya del navegador oberta, veuràs aquesta notificació quan algú et parli.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Només es permeten 10.000 caràcters.",ENTRYBOX_PLACEHOLDER:"Digues alguna cosa...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Aquesta conversa ja no està activa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Pots llegir, però no enviar missatges.",MESSAGELIST_LOADING_OLDER:"Carregant missatges antics...",MESSAGELIST_SHOW_OLDER:"Mostrar missatges més antics",MESSAGELIST_NEW_MARKER:"Nou",MESSAGE_SENT_VIA_EMAIL:"Aquest missatge s'ha enviat per correu electrònic",YOU_MARKER:"tu",UPLOAD_IN_PROGRESS:"S'està pujant...",UPLOAD_SEND_FILE:"Enviar arxiu",UPLOAD_SHARE_LOCATION:"Compartir ubicació",UPLOAD_ERROR:"Desafortunadament, alguna cosa ha anat malament en pujar. L'arxiu pot ser no compatible o massa gran.",SHARE_LOCATION_ERROR:"No es pot compartir la ubicació: ",LOADING:"Carregant...",HUB_EMPTY:"El teu historial de xat apareixerà aquí",HUB_SHOW_EARLIER:"Mostra xats anteriors",INBOX_NO_CHATS_TITLE:"Encara no hi ha xats!",INBOX_NO_CHATS_BODY:"Un cop hagis tingut una o més converses, apareixeran aquí.",ENABLE_TRANSLATION:"Traduir aquesta conversa al català",DISABLE_TRANSLATION:"Mostrar original",SEARCH_PLACEHOLDER_TEXT:"Cerca...",SEARCH_SEARCHING:"Buscant...",SEARCH_NO_RESULTS:"No s'han trobat resultats",SEARCH_NO_MORE_RESULTS:"No hi ha més resultats",SEARCH_RESULTS_CONVERSATIONS:"Converses",SEARCH_RESULTS_MESSAGES:"Missatges",SEARCH_RESULTS_SHOW_MORE:"Mostrar més",CHAT_NOT_FOUND:"Xat no trobat",DELETE_MESSAGE:"Esborrar missatge",DELETION_EXPLANATION:"Si esborres aquest missatge, desapareixerà per a tothom.",EDIT_MESSAGE:"Editar missatge",SAVE:"Desar",EDITED_INDICATOR:"editat",REPLY_TO_MESSAGE:"Respondre",ADD_REACTION:"Afegir reacció",VOICE_MESSAGE:"Missatge de veu",LEAVE_CONVERSATION:"Abandonar la conversa",MARK_CONVERSATION_AS_UNREAD:"marcar com no llegit",STATUS_INDICATOR_ONLINE:"Actiu",STATUS_INDICATOR_OFFLINE:"Absent",CONTACT_INFORMATION_HIDDEN:"informació oculta",AUTH_EXPIRED_OVERLAY_TITLE:"La teva sessió de xat ha caducat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualitza la pàgina per continuar",ARIA_LEAVE_SEARCH_MODE:"Sortir del mode de cerca",ARIA_SEARCH_UP:"Cercar cap amunt",ARIA_SEARCH_DOWN:"Cercar cap avall",ARIA_CLOSE_CHAT_POPUP:"Tancar la finestra de xat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cercar en aquesta conversa",ARIA_SEARCH:"Cercar",ARIA_CHAT:"Xat",ARIA_SET_PLAYBACK_SPEED:"establir velocitat de reproducció",ARIA_CANCEL_UPLOAD:"Cancel·lar la càrrega",ARIA_STOP_RECORDING:"Aturar l'enregistrament",ARIA_CANCEL_RECORDING:"Cancel·lar l'enregistrament",ARIA_INSERT_EMOJI:"Inserir un emoji",ARIA_PLAY_AUDIO:"reproduir àudio",ARIA_PAUSE_AUDIO:"pausar àudio",ARIA_REACTION_COUNT:(t,e)=>`${t} reaccions amb ${e}`,ARIA_MORE_ACTIONS:"Més accions",ARIA_REPLYING_TO:(t,e)=>`Responent a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sortir del mode de resposta",SELECT_CONVERSATION:"Selecciona una conversa"}},cs:{code:"cs-CZ",name:"Czech",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Včera",TODAY:"Dnes",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"právě teď",LOCATION:"Lokace",CANCEL:"Zrušit",INBOX:"Doručené",DESKTOP_NOTIFICATIONS:"Oznámení v prohlížeči",DESKTOP_NOTIFICATIONS_ERROR:"Nelze povolit notifikace prohlížeče, protože váš prohlížeč je aktivně blokuje. Zkuste se podívat na nastavení nebo zkuste použít jiný prohlížeč.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikace`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Pokud necháte kartu prohlížeče otevřenou, uvidíte tento popup jakmile s vámi bude někdo mluvit.",SEND_BUTTON_TEXT:"Odeslat",ENTRYBOX_TEXT_LIMIT:"Je povoleno Maximálně 10.000 znaků.",ENTRYBOX_PLACEHOLDER:"Napište něco...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Tato konverzace již není aktivní.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Můžete číst, ale nemůžete posílat zprávy.",MESSAGELIST_LOADING_OLDER:"Nahrávám starší zprávy...",MESSAGELIST_SHOW_OLDER:"Zobrazit starší zprávy",MESSAGELIST_NEW_MARKER:"Nové",MESSAGE_SENT_VIA_EMAIL:"Tato zpráva byla odeslána přes mail.",YOU_MARKER:"vy",UPLOAD_IN_PROGRESS:"Nahrávám...",UPLOAD_SEND_FILE:"Poslat soubor",UPLOAD_SHARE_LOCATION:"Sdílet pozici",UPLOAD_ERROR:"Nepodařilo se nahrát soubor. Ten je buď nepodporován a/nebo příliš velký.",SHARE_LOCATION_ERROR:"Není možné sdílet pozici: ",LOADING:"Nahrávám...",HUB_EMPTY:"Vaše historie se zde zobrazí",HUB_SHOW_EARLIER:"Zobrazit dřívější konverzace",INBOX_NO_CHATS_TITLE:"Zatím zde nejsou žádné konverzace!",INBOX_NO_CHATS_BODY:"Jakmile budete mít jednu nebo více konverzací, objeví se zde.",ENABLE_TRANSLATION:"Přeložit tuto konverzaci do češtiny",DISABLE_TRANSLATION:"Zobrazit původní",SEARCH_PLACEHOLDER_TEXT:"Hledat...",SEARCH_SEARCHING:"Hledání...",SEARCH_NO_RESULTS:"Nenašly se žádné výsledky",SEARCH_NO_MORE_RESULTS:"Žádné další výsledky",SEARCH_RESULTS_CONVERSATIONS:"Konverzace",SEARCH_RESULTS_MESSAGES:"Zprávy",SEARCH_RESULTS_SHOW_MORE:"Zobrazit více",CHAT_NOT_FOUND:"Chat nenalezen",DELETE_MESSAGE:"Smazat zprávu",DELETION_EXPLANATION:"Pokud tuto zprávu smažete, zmizí pro všechny.",EDIT_MESSAGE:"Upravit zprávu",SAVE:"Uložit",EDITED_INDICATOR:"upraveno",REPLY_TO_MESSAGE:"Odpovědět",ADD_REACTION:"Reagovat",AUTH_EXPIRED_OVERLAY_TITLE:"Váš chat byl kvůli nečinnosti odpojen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Pro pokračování obnovte stránku",VOICE_MESSAGE:"Hlasová zpráva",CONTACT_INFORMATION_HIDDEN:"Skrytá informace",LEAVE_CONVERSATION:"Opustit konverzaci",MARK_CONVERSATION_AS_UNREAD:"Označit jako nepřečtené",STATUS_INDICATOR_ONLINE:"Aktivní",STATUS_INDICATOR_OFFLINE:"Nedostupný",ARIA_LEAVE_SEARCH_MODE:"Opustit režim vyhledávání",ARIA_SEARCH_UP:"Hledat nahoru",ARIA_SEARCH_DOWN:"Hledat dolů",ARIA_CLOSE_CHAT_POPUP:"Zavřít okno chatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Hledat v této konverzaci",ARIA_SEARCH:"Hledat",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"nastavit rychlost přehrávání",ARIA_CANCEL_UPLOAD:"Zrušit nahrávání",ARIA_STOP_RECORDING:"Zastavit nahrávání",ARIA_CANCEL_RECORDING:"Zrušit nahrávání",ARIA_INSERT_EMOJI:"Vložit emoji",ARIA_PLAY_AUDIO:"přehrát audio",ARIA_PAUSE_AUDIO:"pozastavit audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcí s ${e}`,ARIA_MORE_ACTIONS:"Další akce",ARIA_REPLYING_TO:(t,e)=>`Odpověď na ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Opustit režim odpovědi",SELECT_CONVERSATION:"Vyberte konverzaci"}},da:{code:"da-DK",name:"Danish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/da/emojibase/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"t",MINUTES:"m",JUST_NOW:"lige nu",LOCATION:"Placering",CANCEL:"Annuller",INBOX:"Indbakke",DESKTOP_NOTIFICATIONS:"Browsermeddelelser",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Browsermeddelelser, fordi din browser aktivt blokerer dem. Prøv at kigge i indstillingerne eller benyt en anden browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demomeddelelse`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Hvis du holder dit browser-faneblad åben, vil du se det her komme op, når nogen taler til dig.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Kun 10.000 tegn er tilladt.",ENTRYBOX_PLACEHOLDER:"Sig noget...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Denne samtale er ikke længere aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan læse, men ikke sende beskeder.",MESSAGELIST_LOADING_OLDER:"Indlæser ældre beskeder...",MESSAGELIST_SHOW_OLDER:"Vis ældre beskeder",MESSAGELIST_NEW_MARKER:"Ny",MESSAGE_SENT_VIA_EMAIL:"Denne besked blev sendt via e-mail",YOU_MARKER:"dig",UPLOAD_IN_PROGRESS:"Overfører...",UPLOAD_SEND_FILE:"Send fil",UPLOAD_SHARE_LOCATION:"Del placering",UPLOAD_ERROR:"Der er sket noget forkert ved upload. Filen kan ikke understøttes eller filen er for stor.",SHARE_LOCATION_ERROR:"Kan ikke dele placering: ",LOADING:"Indlæser...",HUB_EMPTY:"Dine samtaler vises her",HUB_SHOW_EARLIER:"Vis tidligere chats",INBOX_NO_CHATS_TITLE:"Ingen chats endnu!",INBOX_NO_CHATS_BODY:"Når du har haft en eller flere samtaler, vises de her.",ENABLE_TRANSLATION:"Oversæt denne konversation til dansk",DISABLE_TRANSLATION:"Vis den oprindelige",SEARCH_PLACEHOLDER_TEXT:"Søg...",SEARCH_SEARCHING:"Søger...",SEARCH_NO_RESULTS:"Ingen resultater fundet",SEARCH_NO_MORE_RESULTS:"Ikke flere resultater",SEARCH_RESULTS_CONVERSATIONS:"Samtaler",SEARCH_RESULTS_MESSAGES:"Beskeder",SEARCH_RESULTS_SHOW_MORE:"Vis mere",CHAT_NOT_FOUND:"Chat ikke fundet",DELETE_MESSAGE:"Slet besked",DELETION_EXPLANATION:"Hvis du sletter denne besked, vil ingen kunne se den.",EDIT_MESSAGE:"Rediger besked",SAVE:"Gem",EDITED_INDICATOR:"redigeret",REPLY_TO_MESSAGE:"Svar",ADD_REACTION:"Tilføj reaktion",AUTH_EXPIRED_OVERLAY_TITLE:"Din chatsession er udløbet",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Opdater siden for at fortsætte",VOICE_MESSAGE:"Talebesked",CONTACT_INFORMATION_HIDDEN:"Skjulte oplysninger",LEAVE_CONVERSATION:"Forlad samtale",MARK_CONVERSATION_AS_UNREAD:"Marker som ulæst",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Forlad søgemodus",ARIA_SEARCH_UP:"Søg opad",ARIA_SEARCH_DOWN:"Søg nedad",ARIA_CLOSE_CHAT_POPUP:"Luk chatvindue",ARIA_SEARCH_INSIDE_CONVERSATION:"Søg i denne samtale",ARIA_SEARCH:"Søg",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Indstil afspilningshastighed",ARIA_CANCEL_UPLOAD:"Annuller upload",ARIA_STOP_RECORDING:"Stop optagelse",ARIA_CANCEL_RECORDING:"Annuller optagelse",ARIA_INSERT_EMOJI:"Indsæt en emoji",ARIA_PLAY_AUDIO:"Afspil lyd",ARIA_PAUSE_AUDIO:"Pauser lyd",ARIA_REACTION_COUNT:(t,e)=>`${t} Reaktioner med ${e}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(t,e)=>`Svarer til ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Forlad svarstilstand",SELECT_CONVERSATION:"Vælg en samtale"}},de:{code:"de-DE",name:"German",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/de.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/de/cldr/data.json",translation:{YESTERDAY:"Gestern",TODAY:"Heute",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"gerade jetzt",LOCATION:"Standort",CANCEL:"Abbrechen",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser-Benachrichtigungen",DESKTOP_NOTIFICATIONS_ERROR:"Browser-Benachrichtigungen können nicht aktiviert werden, da Ihr Browser sie aktiv blockiert. Versuchen Sie, in den Einstellungen nachzuschlagen oder einen anderen Browser zu verwenden.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} Demo-Benachrichtigung`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Wenn Sie Ihre Browser-Registerkarte geöffnet lassen, wird dies angezeigt, wenn jemand mit Ihnen spricht.",SEND_BUTTON_TEXT:"Senden",ENTRYBOX_TEXT_LIMIT:"Nur 10.000 Zeichen sind erlaubt.",ENTRYBOX_PLACEHOLDER:"Sag etwas...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Diese Konversation ist nicht mehr aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Sie können Nachrichten lesen, aber nicht senden.",MESSAGELIST_LOADING_OLDER:"Ältere Nachrichten werden geladen...",MESSAGELIST_SHOW_OLDER:"Zeige ältere Nachrichten",MESSAGELIST_NEW_MARKER:"Neu",MESSAGE_SENT_VIA_EMAIL:"Diese Nachricht wurde per E-Mail gesendet",YOU_MARKER:"du",UPLOAD_IN_PROGRESS:"Hochladen...",UPLOAD_SEND_FILE:"Datei senden",UPLOAD_SHARE_LOCATION:"Standort teilen",UPLOAD_ERROR:"Beim Hochladen ist ein Fehler aufgetreten. Die Datei ist möglicherweise nicht unterstützt oder zu groß.",SHARE_LOCATION_ERROR:"Standort kann nicht freigegeben werden: ",LOADING:"Laden...",HUB_EMPTY:"Ihr Chat-Verlauf wird hier angezeigt",HUB_SHOW_EARLIER:"Zeige frühere Chats",INBOX_NO_CHATS_TITLE:"Noch keine Chats!",INBOX_NO_CHATS_BODY:"Sobald Sie eine oder mehrere Unterhaltungen geführt haben, werden sie hier angezeigt.",ENABLE_TRANSLATION:"Dieses Gespräch auf Deutsch übersetzen",DISABLE_TRANSLATION:"Originaltext anzeigen",SEARCH_PLACEHOLDER_TEXT:"Suche...",SEARCH_SEARCHING:"Suchen...",SEARCH_NO_RESULTS:"Keine Suchergebnisse gefunden",SEARCH_NO_MORE_RESULTS:"Keine weiteren Suchergebnisse",SEARCH_RESULTS_CONVERSATIONS:"Unterhaltungen",SEARCH_RESULTS_MESSAGES:"Nachrichten",SEARCH_RESULTS_SHOW_MORE:"Mehr anzeigen",CHAT_NOT_FOUND:"Chat nicht gefunden",DELETE_MESSAGE:"Nachricht löschen",DELETION_EXPLANATION:"Wenn Sie diese Nachricht löschen, wird sie für alle verschwinden.",EDIT_MESSAGE:"Nachricht bearbeiten",SAVE:"Speichern",EDITED_INDICATOR:"bearbeitet",REPLY_TO_MESSAGE:"Antworten",ADD_REACTION:"Reaktion hinzufügen",AUTH_EXPIRED_OVERLAY_TITLE:"Ihre Chatsitzung ist abgelaufen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Laden Sie zum Fortfahren die Seite neu",VOICE_MESSAGE:"Sprachnachricht",CONTACT_INFORMATION_HIDDEN:"Geschützte Angaben",LEAVE_CONVERSATION:"Unterhaltung verlassen",MARK_CONVERSATION_AS_UNREAD:"als ungelesen markieren",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Abwesend",ARIA_LEAVE_SEARCH_MODE:"Suchmodus verlassen",ARIA_SEARCH_UP:"Nach oben suchen",ARIA_SEARCH_DOWN:"Nach unten suchen",ARIA_CLOSE_CHAT_POPUP:"Chat-Popup schließen",ARIA_SEARCH_INSIDE_CONVERSATION:"In dieser Unterhaltung suchen",ARIA_SEARCH:"Suchen",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Wiedergabegeschwindigkeit einstellen",ARIA_CANCEL_UPLOAD:"Upload abbrechen",ARIA_STOP_RECORDING:"Aufnahme stoppen",ARIA_CANCEL_RECORDING:"Aufnahme abbrechen",ARIA_INSERT_EMOJI:"Emoji einfügen",ARIA_PLAY_AUDIO:"Audio abspielen",ARIA_PAUSE_AUDIO:"Audio pausieren",ARIA_REACTION_COUNT:(t,e)=>`${t} Reaktionen mit ${e}`,ARIA_MORE_ACTIONS:"Weitere Aktionen",ARIA_REPLYING_TO:(t,e)=>`Antworten an ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Antwortmodus verlassen",SELECT_CONVERSATION:"Unterhaltung auswählen"}},el:{code:"el-GR",name:"Greek (Greece)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Χθές",TODAY:"Σήμερα",DAYS:"Ημέρες",HOURS:"'Ωρες",MINUTES:"Λεπτά",JUST_NOW:"Μόλις τώρα",LOCATION:"Τοποθεσία",CANCEL:"Ακύρωση",INBOX:"Εισερχόμενα",DESKTOP_NOTIFICATIONS:"Ειδοποιήσεις περιηγητή",DESKTOP_NOTIFICATIONS_ERROR:"Δεν είναι δυνατή η ενεργοποίηση των ειδοποιήσεων του προγράμματος περιήγησης, επειδή το πρόγραμμα περιήγησης τις αποκλείει ενεργά. Δοκιμάστε να τσεκάρετε τις ρυθμίσεις ή να χρησιμοποιήσετε διαφορετικό πρόγραμμα περιήγησης.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} Δοκιμαστική επίδειξη`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Αν διατηρήσετε ανοιχτή τη σελίδα του προγράμματος περιήγησης, θα δείτε αυτό το pop up (παράθυρο) όταν κάποιος σας μιλάει.",SEND_BUTTON_TEXT:"Αποστολή",ENTRYBOX_TEXT_LIMIT:"Επιτρέπονται μόνο 10.000 χαρακτήρες.",ENTRYBOX_PLACEHOLDER:"Πείτε κάτι...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Αυτή η συζήτηση δεν είναι πλέον ενεργή.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Μπορείτε να διαβάσετε αλλά δεν μπορείτε να στείλετε μηνύματα.",MESSAGELIST_LOADING_OLDER:"Φόρτωση παλαιοτέρων μηνυμάτων...",MESSAGELIST_SHOW_OLDER:"Εμφάνιση παλαιότερων μηνυμάτων",MESSAGELIST_NEW_MARKER:"Νέο",MESSAGE_SENT_VIA_EMAIL:"Αυτό το μήνυμα εστάλη μέσω ηλεκτρονικού ταχυδρομείου",YOU_MARKER:"Εσείς",UPLOAD_IN_PROGRESS:"Ανέβασμα...",UPLOAD_SEND_FILE:"Αποστολή αρχείου",UPLOAD_SHARE_LOCATION:"Κοινή χρήση τοποθεσίας",UPLOAD_ERROR:"Κάτι πήγε στραβά κατά τη φόρτωση. Το αρχείο ενδέχεται να μην υποστηρίζεται ή να είναι υπερβολικά μεγάλο.",SHARE_LOCATION_ERROR:"Δεν είναι δυνατή η χρήση κοινής τοποθεσίας: ",LOADING:"Φόρτωση...",HUB_EMPTY:"Το ιστορικό των συνομιλιών σας θα εμφανιστεί εδώ",HUB_SHOW_EARLIER:"Εμφάνιση προηγούμενων συνομιλιών",INBOX_NO_CHATS_TITLE:"Δεν υπάρχουν ακόμα συζητήσεις!",INBOX_NO_CHATS_BODY:"Μόλις έχετε μία ή περισσότερες συνομιλίες, θα εμφανιστούν εδώ.",ENABLE_TRANSLATION:"Μετάφραση αυτής της συνομιλίας στα ελληνικά",DISABLE_TRANSLATION:"Προβολή πρωτοτύπου",SEARCH_PLACEHOLDER_TEXT:"Αναζήτηση...",SEARCH_SEARCHING:"Αναζήτηση...",SEARCH_NO_RESULTS:"Δεν βρέθηκαν αποτελέσματα",SEARCH_NO_MORE_RESULTS:"Δεν υπάρχουν περισσότερα αποτελέσματα",SEARCH_RESULTS_CONVERSATIONS:"Συνομιλίες",SEARCH_RESULTS_MESSAGES:"Μηνύματα",SEARCH_RESULTS_SHOW_MORE:"Εμφάνιση περισσότερων",CHAT_NOT_FOUND:"Η συνομιλία δεν βρέθηκε",DELETE_MESSAGE:"Διαγραφή μηνύματος",DELETION_EXPLANATION:"Εάν διαγράψετε αυτό το μήνυμα, θα εξαφανιστεί για όλους.",EDIT_MESSAGE:"Επεξεργασία μηνύματος",SAVE:"Αποθήκευση",EDITED_INDICATOR:"επεξεργασμένο",REPLY_TO_MESSAGE:"Απάντηση",ADD_REACTION:"Προσθήκη αντίδρασης",AUTH_EXPIRED_OVERLAY_TITLE:"Η συνεδρία της συνομιλίας σας έχει λήξει",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Ανανεώστε τη σελίδα για να συνεχίσετε",VOICE_MESSAGE:"Ηχητικό μήνυμα",CONTACT_INFORMATION_HIDDEN:"Κρυμμένες πληροφορίες",LEAVE_CONVERSATION:"Αποσυρθείτε από τη συζήτηση",MARK_CONVERSATION_AS_UNREAD:"Επισήμανση ως μη αναγνωσμένα",STATUS_INDICATOR_ONLINE:"Ενεργός",STATUS_INDICATOR_OFFLINE:"Ανενεργός",ARIA_LEAVE_SEARCH_MODE:"Αποχώρηση από τη λειτουργία αναζήτησης",ARIA_SEARCH_UP:"Αναζήτηση προς τα πάνω",ARIA_SEARCH_DOWN:"Αναζήτηση προς τα κάτω",ARIA_CLOSE_CHAT_POPUP:"Κλείσιμο παραθύρου συνομιλίας",ARIA_SEARCH_INSIDE_CONVERSATION:"Αναζήτηση σε αυτή τη συνομιλία",ARIA_SEARCH:"Αναζήτηση",ARIA_CHAT:"Συνομιλία",ARIA_SET_PLAYBACK_SPEED:"ορισμός ταχύτητας αναπαραγωγής",ARIA_CANCEL_UPLOAD:"Ακύρωση φόρτωσης",ARIA_STOP_RECORDING:"Διακοπή εγγραφής",ARIA_CANCEL_RECORDING:"Ακύρωση εγγραφής",ARIA_INSERT_EMOJI:"Εισαγωγή emoji",ARIA_PLAY_AUDIO:"αναπαραγωγή ήχου",ARIA_PAUSE_AUDIO:"παύση ήχου",ARIA_REACTION_COUNT:(t,e)=>`${t} αντιδράσεις με ${e}`,ARIA_MORE_ACTIONS:"Περισσότερες ενέργειες",ARIA_REPLYING_TO:(t,e)=>`Απάντηση στον ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Έξοδος από τη λειτουργία απάντησης",SELECT_CONVERSATION:"Επιλέξτε μια συζήτηση"}},en:jr,es:{code:"es-ES",name:"Spanish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/es.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/es/cldr/data.json",translation:{YESTERDAY:"Ayer",TODAY:"Hoy",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"justo ahora",LOCATION:"Ubicación",CANCEL:"Cancelar",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificaciones del navigator",DESKTOP_NOTIFICATIONS_ERROR:"No se logró habilitar las notificaciones del navigador, comprueba que tu navegador no las esté bloqueando o intenta con otro navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} notificación de prueba`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si dejas esta pestaña abierta, verás este pop up cuando alguien te hable.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Sólo 10.000 caracteres permitidos.",ENTRYBOX_PLACEHOLDER:"Escribe algo...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Esta conversación ya no está activa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puedes leer pero no enviar mensajes.",MESSAGELIST_LOADING_OLDER:"Cargando mensajes pasados...",MESSAGELIST_SHOW_OLDER:"Ver mensajes pasados",MESSAGELIST_NEW_MARKER:"Nuevo",MESSAGE_SENT_VIA_EMAIL:"Este mensaje ha sido enviado vía email",YOU_MARKER:"tú",UPLOAD_IN_PROGRESS:"Subir...",UPLOAD_SEND_FILE:"Enviar archivo",UPLOAD_SHARE_LOCATION:"Compartir ubicación",UPLOAD_ERROR:"Ocurrió un problema subiendo el archivo. Puede que el archivo esté en un formato no soportado o que sea demasiado grande.",SHARE_LOCATION_ERROR:"No se logró compartir la ubicación: ",LOADING:"Cargando...",HUB_EMPTY:"Tu historial de conversaciones se mostrará aquí",HUB_SHOW_EARLIER:"Ver conversaciones pasadas",INBOX_NO_CHATS_TITLE:"¡Aún sin conversaciones!",INBOX_NO_CHATS_BODY:"Una vez que tengas una o más conversaciones, se mostrarán aquí.",ENABLE_TRANSLATION:"Traducir esta conversación al español",DISABLE_TRANSLATION:"Mostrar la conversación original",SEARCH_PLACEHOLDER_TEXT:"Buscar...",SEARCH_SEARCHING:"Buscando...",SEARCH_NO_RESULTS:"No se encontraron resultados",SEARCH_NO_MORE_RESULTS:"No hay más resultados",SEARCH_RESULTS_CONVERSATIONS:"Conversaciones",SEARCH_RESULTS_MESSAGES:"Mensajes",SEARCH_RESULTS_SHOW_MORE:"Mostrar más",CHAT_NOT_FOUND:"Chat no encontrado",DELETE_MESSAGE:"Eliminar mensaje",DELETION_EXPLANATION:"Este mensaje desaparecerá para todos si lo borras.",EDIT_MESSAGE:"Editar mensaje",SAVE:"Guardar",EDITED_INDICATOR:"editado",REPLY_TO_MESSAGE:"Responder",ADD_REACTION:"Añadir reacción",AUTH_EXPIRED_OVERLAY_TITLE:"Su sesión de chat ha expirado",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualice la página para continuar",VOICE_MESSAGE:"Mensaje de voz",CONTACT_INFORMATION_HIDDEN:"Información oculta",LEAVE_CONVERSATION:"Abandonar conversación",MARK_CONVERSATION_AS_UNREAD:"Marcar como no leída",STATUS_INDICATOR_ONLINE:"Activo",STATUS_INDICATOR_OFFLINE:"Ausente",ARIA_LEAVE_SEARCH_MODE:"Salir del modo búsqueda",ARIA_SEARCH_UP:"Buscar hacia arriba",ARIA_SEARCH_DOWN:"Buscar hacia abajo",ARIA_CLOSE_CHAT_POPUP:"Cerrar la ventana de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Buscar en esta conversación",ARIA_SEARCH:"Buscar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"establecer velocidad de reproducción",ARIA_CANCEL_UPLOAD:"Cancelar envío",ARIA_STOP_RECORDING:"Detener grabación",ARIA_CANCEL_RECORDING:"Cancelar grabación",ARIA_INSERT_EMOJI:"Insertar un emoji",ARIA_PLAY_AUDIO:"reproducir audio",ARIA_PAUSE_AUDIO:"pausar audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reacciones con ${e}`,ARIA_MORE_ACTIONS:"Más acciones",ARIA_REPLYING_TO:(t,e)=>`Respondiendo a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Salir del modo respuesta",SELECT_CONVERSATION:"Selecciona una conversación"}},et:{code:"et-EE",name:"Estonian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/et/cldr/data.json",translation:{YESTERDAY:"Eile",TODAY:"Täna",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"Just nüüd",LOCATION:"Asukoht",CANCEL:"Katkesta",INBOX:"Postkast",DESKTOP_NOTIFICATIONS:"Veebibrauseri teated",DESKTOP_NOTIFICATIONS_ERROR:"Töölaua teatisi ei saa lubada, kuna Teie brauser blokeerib need aktiivselt. Proovige muuta seadeid või kasutada mõnda muud brauserit.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo teavitus`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Kui hoiate oma brauseri vahekaardi lahti ja näete seda hüpikakent, siis keegi soovib Teiega rääkida.",SEND_BUTTON_TEXT:"Saada",ENTRYBOX_TEXT_LIMIT:"Ainult kuni 10.000 tähemärki on lubatud.",ENTRYBOX_PLACEHOLDER:"Kirjuta midagi...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"See vestlus ei ole enam aktiivne.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Sa saad lugeda teateid, aga mitte kirjutada.",MESSAGELIST_LOADING_OLDER:"Laen vanemaid teateid...",MESSAGELIST_SHOW_OLDER:"Näita vanemaid teateid",MESSAGELIST_NEW_MARKER:"Uus",MESSAGE_SENT_VIA_EMAIL:"See teade on saadetud e-postiga",YOU_MARKER:"Sina",UPLOAD_IN_PROGRESS:"Laen...",UPLOAD_SEND_FILE:"Saada fail",UPLOAD_SHARE_LOCATION:"Jaga faili asukohta",UPLOAD_ERROR:"Nüüd läks midagi nihu, seoses faili ülesse laadimisega. Tundmatu fail või liiga suur.",SHARE_LOCATION_ERROR:"Ei suuda jagada faili asukohta: ",LOADING:"Laen...",HUB_EMPTY:"Siin on Sinu vestluste ajalugu",HUB_SHOW_EARLIER:"Näita vanemaid vestlusi",INBOX_NO_CHATS_TITLE:"Pole ühtegi vestlust!",INBOX_NO_CHATS_BODY:"Kui Sul tekib üks või rohkem vestlust, siis on need kuvatakse siin.",ENABLE_TRANSLATION:"Tõlgi see vestlus eesti keelde",DISABLE_TRANSLATION:"Näita algteksti",SEARCH_PLACEHOLDER_TEXT:"Otsi...",SEARCH_SEARCHING:"Otsin...",SEARCH_NO_RESULTS:"Otsingu tulemused puuduvad",SEARCH_NO_MORE_RESULTS:"Rohkem tulemusi ei ole ",SEARCH_RESULTS_CONVERSATIONS:"Vestlused",SEARCH_RESULTS_MESSAGES:"Sõnumid",SEARCH_RESULTS_SHOW_MORE:"Näita rohkem",CHAT_NOT_FOUND:"Vestlust ei leitud",DELETE_MESSAGE:"Kustuta sõnum",DELETION_EXPLANATION:"Kui kustutate selle sõnumi, kaob see kõigi jaoks.",EDIT_MESSAGE:"Redigeeri sõnumit",SAVE:"Salvesta",EDITED_INDICATOR:"muudetud",REPLY_TO_MESSAGE:"Vasta",ADD_REACTION:"Lisa reaktsioon",AUTH_EXPIRED_OVERLAY_TITLE:"Teie vestlussessioon on lõppenud",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Jätkamiseks värskendage lehte",VOICE_MESSAGE:"Häälsõnum",CONTACT_INFORMATION_HIDDEN:"Varjatud informatsioon",LEAVE_CONVERSATION:"Lahku vestlusest",MARK_CONVERSATION_AS_UNREAD:"Märgi mitteloetuks",STATUS_INDICATOR_ONLINE:"Aktiivne",STATUS_INDICATOR_OFFLINE:"Eemal",ARIA_LEAVE_SEARCH_MODE:"Välju otsingurežiimist",ARIA_SEARCH_UP:"Otsi üles",ARIA_SEARCH_DOWN:"Otsi alla",ARIA_CLOSE_CHAT_POPUP:"Sulge vestluse aken",ARIA_SEARCH_INSIDE_CONVERSATION:"Otsi sellest vestlusest",ARIA_SEARCH:"Otsi",ARIA_CHAT:"Vestlus",ARIA_SET_PLAYBACK_SPEED:"määra taasesituse kiirus",ARIA_CANCEL_UPLOAD:"Tühista üleslaadimine",ARIA_STOP_RECORDING:"Peata salvestamine",ARIA_CANCEL_RECORDING:"Tühista salvestamine",ARIA_INSERT_EMOJI:"Sisesta emoji",ARIA_PLAY_AUDIO:"esita heli",ARIA_PAUSE_AUDIO:"pausi heli",ARIA_REACTION_COUNT:(t,e)=>`${t} reaktsiooni (${e})`,ARIA_MORE_ACTIONS:"Rohkem toiminguid",ARIA_REPLYING_TO:(t,e)=>`Vastamine kasutajale ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Välju vastamisrežiimist",SELECT_CONVERSATION:"Vali vestlus"}},fa:{code:"fa",name:"Persian (Farsi)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fa.js",emojiDataUrl:null,translation:{YESTERDAY:"دیروز",TODAY:"امروز",DAYS:"روز",HOURS:"ساعت",MINUTES:"دقیقه",JUST_NOW:"هم اکنون",LOCATION:"مکان",CANCEL:"لغو",INBOX:"صندوق",DESKTOP_NOTIFICATIONS:"اطلاعیههای مرورگر",DESKTOP_NOTIFICATIONS_ERROR:"خطا در فعال سازی اعلان های مرورگر، مرورگر شما آنها را مسدود می کند سعی کنید تنظیمات مرورگر را تغییر دهید یا از یک مرورگر دیگر استفاده کنید.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`نوتیفیکیشن دمو ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"اگر صفحه ی مرورگر را باز نگهدارید این را موقعه ای که کسی با شما صحبت کند خواهید دید",SEND_BUTTON_TEXT:"بفرست",ENTRYBOX_TEXT_LIMIT:"فقط ۱۰،۰۰۰ حروف مجاز می باشد.",ENTRYBOX_PLACEHOLDER:"...چیزی بنویسید",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:".این مکالمه دیگر فعال نمی باشد",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"شما می توانید بخوانید اما نمی توانید پیام بفرستید",MESSAGELIST_LOADING_OLDER:"...در حال بارگذاری پیام های قدیمی تر",MESSAGELIST_SHOW_OLDER:"نشان دادن پیام های قدیمی",MESSAGELIST_NEW_MARKER:"جدید",MESSAGE_SENT_VIA_EMAIL:"پیام توسط ایمل ارسال شد",YOU_MARKER:"شما",UPLOAD_IN_PROGRESS:"...در حال بارگذاری",UPLOAD_SEND_FILE:"فرستادن پوشه",UPLOAD_SHARE_LOCATION:"اشتراک گذاری مکان",UPLOAD_ERROR:"متاسفانه بارگذاری با مشکل روبه رو شد. ممکن است فایل حجیم باشد یا ساپورت نشده باشد.",SHARE_LOCATION_ERROR:"خطا در اشتراک گذاری مکان: ",LOADING:"...بارگذاری",HUB_EMPTY:"تاریخچه گفتگو اینجا نمایان می شود",HUB_SHOW_EARLIER:"دیدن گفتگو های قبلی",INBOX_NO_CHATS_TITLE:"هنوز گفتگویی وجود ندارد",INBOX_NO_CHATS_BODY:"بعد از داشتن یک مکالمه یا بیشتر، آنها اینجا نمایان می شوند.",ENABLE_TRANSLATION:"این مکالمه را به فارسی ترجمه کن",DISABLE_TRANSLATION:"زبان اصلی را نشان بده",SEARCH_PLACEHOLDER_TEXT:"...جستجو",SEARCH_SEARCHING:"...در حال جستجو",SEARCH_NO_RESULTS:"نتیجه ای یافت نشد",SEARCH_NO_MORE_RESULTS:"نتیجه بیشتری وجود ندارد",SEARCH_RESULTS_CONVERSATIONS:"گفتگوها",SEARCH_RESULTS_MESSAGES:"پیامها",SEARCH_RESULTS_SHOW_MORE:"نمایش بیشتر",CHAT_NOT_FOUND:"مکالمه پیدا نشد",DELETE_MESSAGE:"حذف پیام ",DELETION_EXPLANATION:"اگر این پیام را حذف کنید، برای همه ناپدید می شود.",EDIT_MESSAGE:"ویرایش پیام",SAVE:"ذخیره",EDITED_INDICATOR:"ویرایششده",REPLY_TO_MESSAGE:"پاسخ دادن",ADD_REACTION:"واکنش را اضافه کنید",AUTH_EXPIRED_OVERLAY_TITLE:"جلسه چت شما منقضی شده است",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"برای ادامه صفحه را بازخوانی کنید",VOICE_MESSAGE:"پیام صوتی",CONTACT_INFORMATION_HIDDEN:"اطلاعات پنهان",LEAVE_CONVERSATION:"خروج از گفتگو",MARK_CONVERSATION_AS_UNREAD:"به عنوان خوانده نشده علامت گذاری کن",STATUS_INDICATOR_ONLINE:"فعال",STATUS_INDICATOR_OFFLINE:"غایب",ARIA_LEAVE_SEARCH_MODE:"خروج از حالت جستجو",ARIA_SEARCH_UP:"جستجوی بالا",ARIA_SEARCH_DOWN:"جستجوی پایین",ARIA_CLOSE_CHAT_POPUP:"بستن پنجره چت",ARIA_SEARCH_INSIDE_CONVERSATION:"جستجو در این گفتگو",ARIA_SEARCH:"جستجو",ARIA_CHAT:"چت",ARIA_SET_PLAYBACK_SPEED:"تنظیم سرعت پخش",ARIA_CANCEL_UPLOAD:"لغو آپلود",ARIA_STOP_RECORDING:"توقف ضبط",ARIA_CANCEL_RECORDING:"لغو ضبط",ARIA_INSERT_EMOJI:"درج ایموجی",ARIA_PLAY_AUDIO:"پخش صدا",ARIA_PAUSE_AUDIO:"مکث صدا",ARIA_REACTION_COUNT:(t,e)=>`${t} واکنش با ${e}`,ARIA_MORE_ACTIONS:"اقدامات بیشتر",ARIA_REPLYING_TO:(t,e)=>`در حال پاسخ به ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"خروج از حالت پاسخ",SELECT_CONVERSATION:"یک گفتگو را انتخاب کنید"}},fi:{code:"fi-FI",name:"Finnish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fi/cldr/data.json",translation:{YESTERDAY:"Eilen",TODAY:"Tänään",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"juuri nyt",LOCATION:"Sijainti",CANCEL:"Peruuta",INBOX:"Saapuneet",DESKTOP_NOTIFICATIONS:"Selaimen ilmoitukset",DESKTOP_NOTIFICATIONS_ERROR:"Työpöydän ilmoituksia ei voitu kytkeä päälle, koska selaimesi estää ne aktiivisesti. Koeta tutkia sen asetuksia tai vaihda selainta.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo ilmoitus`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jos pidät tämän sivun auki, näet vastaavan ilmoituksen kun joku puhuu sinulle.",SEND_BUTTON_TEXT:"Lähetä",ENTRYBOX_TEXT_LIMIT:"Maksimissaan 10000 merkkiä.",ENTRYBOX_PLACEHOLDER:"Sano jotain...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Tämä keskustelu ei ole enää aktiivinen.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Voit lukea, mutta et lähettää viestejä.",MESSAGELIST_LOADING_OLDER:"Ladataan vanhoja viestejä..",MESSAGELIST_SHOW_OLDER:"Näytä vanhat viestit",MESSAGELIST_NEW_MARKER:"Uusi",MESSAGE_SENT_VIA_EMAIL:"Tämä viesti on lähetetty sähköpostin välityksellä",YOU_MARKER:"sinä",UPLOAD_IN_PROGRESS:"Ladataan...",UPLOAD_SEND_FILE:"Lähetä tiedosto",UPLOAD_SHARE_LOCATION:"Jaa sijainti",UPLOAD_ERROR:"Valitettavasti jokin meni vikaan. Tiedostotyyppiä ei ehkä tueta tai se saattaa olla liian suuri.",SHARE_LOCATION_ERROR:"Sijaintia ei pystytty jakamaan: ",LOADING:"Ladataan...",HUB_EMPTY:"Keskusteluhistoriasi näkyy tässä",HUB_SHOW_EARLIER:"Näytä aiemmat keskustelut",INBOX_NO_CHATS_TITLE:"Ei keskusteluja, vielä!",INBOX_NO_CHATS_BODY:"Kun olet käynyt yhden tai useamman keskustelun, ne näkyvät täällä.",ENABLE_TRANSLATION:"Käännä keskustelu kielelle suomi",DISABLE_TRANSLATION:"Näytä alkuperäinen",SEARCH_PLACEHOLDER_TEXT:"Etsi...",SEARCH_SEARCHING:"Etsiminen...",SEARCH_NO_RESULTS:"Tuloksia ei löytynyt",SEARCH_NO_MORE_RESULTS:"Ei enempää tuloksia",SEARCH_RESULTS_CONVERSATIONS:"Keskustelut",SEARCH_RESULTS_MESSAGES:"Viestit",SEARCH_RESULTS_SHOW_MORE:"Näytä enemmän",CHAT_NOT_FOUND:"Keskustelua ei löytynyt",DELETE_MESSAGE:"Poista viesti",DELETION_EXPLANATION:"Jos poistat tämän viestin, se häviää kaikilta.",EDIT_MESSAGE:"Muokkaa viestiä",SAVE:"Tallenna",EDITED_INDICATOR:"muokattu",REPLY_TO_MESSAGE:"Vastaa",ADD_REACTION:"Lisää reaktio",AUTH_EXPIRED_OVERLAY_TITLE:"Istuntosi on vanhentunut",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Päivitä sivu jatkaaksesi",VOICE_MESSAGE:"Ääniviesti",CONTACT_INFORMATION_HIDDEN:"Piilotetut tiedot",LEAVE_CONVERSATION:"Poistu keskustelusta",MARK_CONVERSATION_AS_UNREAD:"Merkitse lukemattomaksi",STATUS_INDICATOR_ONLINE:"Aktiivinen",STATUS_INDICATOR_OFFLINE:"Poissa",ARIA_LEAVE_SEARCH_MODE:"Poistu hakutilasta",ARIA_SEARCH_UP:"Hae ylöspäin",ARIA_SEARCH_DOWN:"Hae alaspäin",ARIA_CLOSE_CHAT_POPUP:"Sulje chat-ikkuna",ARIA_SEARCH_INSIDE_CONVERSATION:"Hae tästä keskustelusta",ARIA_SEARCH:"Hae",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"aseta toistonopeus",ARIA_CANCEL_UPLOAD:"Peruuta lähetys",ARIA_STOP_RECORDING:"Lopeta tallennus",ARIA_CANCEL_RECORDING:"Peruuta tallennus",ARIA_INSERT_EMOJI:"Lisää emoji",ARIA_PLAY_AUDIO:"toista ääni",ARIA_PAUSE_AUDIO:"keskeytä ääni",ARIA_REACTION_COUNT:(t,e)=>`${t} reaktiota (${e})`,ARIA_MORE_ACTIONS:"Lisää toimintoja",ARIA_REPLYING_TO:(t,e)=>`Vastataan käyttäjälle ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Poistu vastaustilasta",SELECT_CONVERSATION:"Valitse keskustelu"}},fr:{code:"fr-FR",name:"French",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fr.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fr/emojibase/data.json",translation:{YESTERDAY:"Hier",TODAY:"Aujourd'hui",DAYS:"j",HOURS:"h",MINUTES:"m",JUST_NOW:"maintenant",LOCATION:"Emplacement",CANCEL:"Annuler",INBOX:"Boîte de réception",DESKTOP_NOTIFICATIONS:"Notifications du navigateur",DESKTOP_NOTIFICATIONS_ERROR:"Impossible d'activer les notifications du navigateur car votre navigateur les bloque. Essayez de changer ses paramètres ou de changer de navigateur.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Notification de démonstration ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si vous maintenez l'onglet ouvert dans votre navigateur vous verrez apparaître une alerte lorsque quelqu'un vous parlera.",SEND_BUTTON_TEXT:"Envoyer",ENTRYBOX_TEXT_LIMIT:"Seuls 10.000 caractères sont autorisés.",ENTRYBOX_PLACEHOLDER:"Écrivez un message...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cette conversation n'est plus active.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Vous pouvez lire, mais pas envoyer de messages.",MESSAGELIST_LOADING_OLDER:"Chargement des anciens messages ...",MESSAGELIST_SHOW_OLDER:"Afficher les anciens messages",MESSAGELIST_NEW_MARKER:"Nouveau",MESSAGE_SENT_VIA_EMAIL:"Ce message a été envoyé par e-mail",YOU_MARKER:"vous",UPLOAD_IN_PROGRESS:"Envoi en cours...",UPLOAD_SEND_FILE:"Envoyer un fichier",UPLOAD_SHARE_LOCATION:"Partager mon emplacement",UPLOAD_ERROR:"Un problème est survenu lors de l'envoi: le fichier est peut-être non pris en charge ou trop volumineux.",SHARE_LOCATION_ERROR:"Impossible de partager votre emplacement: ",LOADING:"Chargement en cours...",HUB_EMPTY:"Votre historique de discussion apparaîtra ici",HUB_SHOW_EARLIER:"Afficher les conversations précédentes",INBOX_NO_CHATS_TITLE:"Aucune conversation pour l'instant!",INBOX_NO_CHATS_BODY:"Une fois que vous aurez eu une ou plusieurs conversations, elles apparaîtront ici.",ENABLE_TRANSLATION:"Traduire cette conversation en français",DISABLE_TRANSLATION:"Remontrer la conversation originale",SEARCH_PLACEHOLDER_TEXT:"Rechercher...",SEARCH_SEARCHING:"Recherche...",SEARCH_NO_RESULTS:"Aucun résultat trouvé",SEARCH_NO_MORE_RESULTS:"Il n’y a plus de résultats",SEARCH_RESULTS_CONVERSATIONS:"Conversations",SEARCH_RESULTS_MESSAGES:"Messages",SEARCH_RESULTS_SHOW_MORE:"Afficher plus",CHAT_NOT_FOUND:"Conversation introuvable",DELETE_MESSAGE:"Supprimer le message",DELETION_EXPLANATION:"Si vous supprimez ce message, il disparaîtra pour tout le monde.",EDIT_MESSAGE:"Modifier le message",SAVE:"Enregistrer",EDITED_INDICATOR:"modifié",REPLY_TO_MESSAGE:"Répondre",ADD_REACTION:"Ajouter une réaction",AUTH_EXPIRED_OVERLAY_TITLE:"Votre session de chat a expiré",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualisez la page pour continuer",VOICE_MESSAGE:"Message vocal",CONTACT_INFORMATION_HIDDEN:"Informations masquées",LEAVE_CONVERSATION:"Quitter la conversation",MARK_CONVERSATION_AS_UNREAD:"Marquer comme non lu",STATUS_INDICATOR_ONLINE:"Actif",STATUS_INDICATOR_OFFLINE:"Absent",ARIA_LEAVE_SEARCH_MODE:"Quitter le mode recherche",ARIA_SEARCH_UP:"Rechercher vers le haut",ARIA_SEARCH_DOWN:"Rechercher vers le bas",ARIA_CLOSE_CHAT_POPUP:"Fermer la fenêtre de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Rechercher dans cette conversation",ARIA_SEARCH:"Rechercher",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"définir la vitesse de lecture",ARIA_CANCEL_UPLOAD:"Annuler l'envoi",ARIA_STOP_RECORDING:"Arrêter l'enregistrement",ARIA_CANCEL_RECORDING:"Annuler l'enregistrement",ARIA_INSERT_EMOJI:"Insérer un emoji",ARIA_PLAY_AUDIO:"lire l'audio",ARIA_PAUSE_AUDIO:"mettre en pause l'audio",ARIA_REACTION_COUNT:(t,e)=>`${t} réactions avec ${e}`,ARIA_MORE_ACTIONS:"Plus d'actions",ARIA_REPLYING_TO:(t,e)=>`Répondre à ${t} : ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Quitter le mode réponse",SELECT_CONVERSATION:"Sélectionnez une conversation"}},he:{code:"he-IL",name:"Hebrew",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"אתמול",TODAY:"היום",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"עכשיו",LOCATION:"מיקום",CANCEL:"בטל",INBOX:"דואר נכנס",DESKTOP_NOTIFICATIONS:"התראות דפדפן",DESKTOP_NOTIFICATIONS_ERROR:"לא ניתן להפעיל התראות במרועה דפדפן מכיוון שהדפדפן שלך חוסם אותן באופן פעיל. נסה להסתכל בהגדרות או להשתמש בדפדפן אחר.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} הודעה על הדגמה`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"אם אתה שומר על כרטיסיית הדפדפן שלך פתוחה, תראה את זה צץ כשמישהו ידבר איתך.",SEND_BUTTON_TEXT:"שלח",ENTRYBOX_TEXT_LIMIT:"רק 10.000 תווים",ENTRYBOX_PLACEHOLDER:"תגיד משהו...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"שיחה זו אינה פעילה עוד.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"אתה יכול לקרוא, אך לא לשלוח הודעות.",MESSAGELIST_LOADING_OLDER:"טוען הודעות ישנות...",MESSAGELIST_SHOW_OLDER:"הצג הודעות ישנות",MESSAGELIST_NEW_MARKER:"חדש",MESSAGE_SENT_VIA_EMAIL:"הודעה זאת נשלחה דרך אימייל",YOU_MARKER:"אתה",UPLOAD_IN_PROGRESS:"מעלה ...",UPLOAD_SEND_FILE:"שלח קובץ",UPLOAD_SHARE_LOCATION:"שתף מיקום",UPLOAD_ERROR:"לרוע המזל משהו השתבש בהעלאה. ייתכן שהקובץ אינו נתמך או גדול מדי.",SHARE_LOCATION_ERROR:"לא ניתן לשתף מיקום: ",LOADING:"טוען...",HUB_EMPTY:"היסטוריית הצ'אט שלך תופיע כאן",HUB_SHOW_EARLIER:"הצג צ'אטים קודמים",INBOX_NO_CHATS_TITLE:"אין עדיין צ'אטים!",INBOX_NO_CHATS_BODY:"לאחר שניהלת שיחה אחת או יותר, הם יופיעו כאן.",ENABLE_TRANSLATION:"תרגם שיחה זו לעברית",DISABLE_TRANSLATION:"הצג מקור",SEARCH_PLACEHOLDER_TEXT:"...חפש",SEARCH_SEARCHING:"...מחפש",SEARCH_NO_RESULTS:"לא נמצאו תוצאות",SEARCH_NO_MORE_RESULTS:"אין תוצאות נוספות",SEARCH_RESULTS_CONVERSATIONS:"שיחות",SEARCH_RESULTS_MESSAGES:"הודעות",SEARCH_RESULTS_SHOW_MORE:"הצג עוד",CHAT_NOT_FOUND:"הצ'אט לא נמצא",DELETE_MESSAGE:"מחיקת הודעה",DELETION_EXPLANATION:"אם תמחק הודעה זו, היא תיעלם עבור כולם.",EDIT_MESSAGE:"עריכת הודעה",SAVE:"שמור",EDITED_INDICATOR:"ערוך",REPLY_TO_MESSAGE:"השב",ADD_REACTION:"הוספת תגובה",AUTH_EXPIRED_OVERLAY_TITLE:"הפעלת הצ׳אט שלכם פגה",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"רעננו את העמוד כדי להמשיך",VOICE_MESSAGE:"הודעה קולית",CONTACT_INFORMATION_HIDDEN:"מידע מוסתר",LEAVE_CONVERSATION:"צא מהשיחה",MARK_CONVERSATION_AS_UNREAD:"סמן כלא נקרא",STATUS_INDICATOR_ONLINE:"פעיל",STATUS_INDICATOR_OFFLINE:"לא פעיל",ARIA_LEAVE_SEARCH_MODE:"צא ממצב חיפוש",ARIA_SEARCH_UP:"חפש למעלה",ARIA_SEARCH_DOWN:"חפש למטה",ARIA_CLOSE_CHAT_POPUP:"סגור חלון צ'אט",ARIA_SEARCH_INSIDE_CONVERSATION:"חפש בתוך השיחה הזו",ARIA_SEARCH:"חפש",ARIA_CHAT:"צ'אט",ARIA_SET_PLAYBACK_SPEED:"הגדר מהירות השמעה",ARIA_CANCEL_UPLOAD:"בטל העלאה",ARIA_STOP_RECORDING:"עצור הקלטה",ARIA_CANCEL_RECORDING:"בטל הקלטה",ARIA_INSERT_EMOJI:"הוסף אמוג'י",ARIA_PLAY_AUDIO:"נגן אודיו",ARIA_PAUSE_AUDIO:"השהה אודיו",ARIA_REACTION_COUNT:(t,e)=>`${t} תגובות עם ${e}`,ARIA_MORE_ACTIONS:"פעולות נוספות",ARIA_REPLYING_TO:(t,e)=>`משיב ל-${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"צא ממצב תשובה",SELECT_CONVERSATION:"בחר שיחה"}},hi:{code:"hi-IN",name:"Hindi (IN)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/hi.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hi/cldr/data.json",translation:{YESTERDAY:"कल",TODAY:"आज",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"अभी",LOCATION:"जगह",CANCEL:"रद्द करें",INBOX:"इनबॉक्स",DESKTOP_NOTIFICATIONS:"ब्राउज़र सूचनाएं",DESKTOP_NOTIFICATIONS_ERROR:"ब्राउज़र सूचनाएं सक्षम नहीं कर सकता क्योंकि आपका ब्राउज़र सक्रिय रूप से उन्हें ब्लॉक करता है। सेटिंग्स में देखने या एक अलग ब्राउज़र का उपयोग करने का प्रयास करें।",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} डेमो अधिसूचना`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"यदि आप अपना ब्राउज़र टैब खुला रखते हैं, तो यह पॉप अप आपको तब दिखाई देगा जब कोई आपसे बात करेगा।",SEND_BUTTON_TEXT:"भेजें",ENTRYBOX_TEXT_LIMIT:"केवल 10,000 वर्णों की अनुमति है।",ENTRYBOX_PLACEHOLDER:"कुछ कहिए...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"यह चैट अब सक्रिय नहीं है।",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"आप पढ़ सकते हैं, लेकिन संदेश नहीं भेज सकते।",MESSAGELIST_LOADING_OLDER:"पुराने संदेश लोड हो रहे हैं ...",MESSAGELIST_SHOW_OLDER:"पुराने संदेश दिखाएं",MESSAGELIST_NEW_MARKER:"नया",MESSAGE_SENT_VIA_EMAIL:"यह संदेश ईमेल के माध्यम से भेजा गया था",YOU_MARKER:"आप",UPLOAD_IN_PROGRESS:"अपलोड हो रहा है...",UPLOAD_SEND_FILE:"फाइल भेजें",UPLOAD_SHARE_LOCATION:"जगह शेयर करें",UPLOAD_ERROR:"दुर्भाग्य से, अपलोड करते समय कुछ गलत हो गया। फ़ाइल असमर्थित या बहुत बड़ी हो सकती है।",SHARE_LOCATION_ERROR:"जगह शेयर नहीं हो पाया: ",LOADING:"लोड हो रहा है...",HUB_EMPTY:"आपका चैट इतिहास यहां दिखाई देगा",HUB_SHOW_EARLIER:"पहले की चैट दिखाओ",INBOX_NO_CHATS_TITLE:"अभी तक कोई चैट नहीं!",INBOX_NO_CHATS_BODY:"एक बार जब आप एक या अधिक चैट कर लेते हैं, तो वे यहां दिखाई देंगे।",ENABLE_TRANSLATION:"इस बातचीत का हिंदी में अनुवाद कीजिए",DISABLE_TRANSLATION:"मूल दिखाएँ",SEARCH_PLACEHOLDER_TEXT:"खोजें...",SEARCH_SEARCHING:"खोज जारी है...",SEARCH_NO_RESULTS:"कोई परिणाम नहीं मिला",SEARCH_NO_MORE_RESULTS:"और कोई परिणाम नहीं",SEARCH_RESULTS_CONVERSATIONS:"बातचीत",SEARCH_RESULTS_MESSAGES:"संदेश",SEARCH_RESULTS_SHOW_MORE:"और दिखाएं",CHAT_NOT_FOUND:"चैट नहीं मिली",DELETE_MESSAGE:"संदेश डिलीट करें",DELETION_EXPLANATION:"यदि आप इस संदेश को हटाते हैं, तो यह सभी के लिए गायब हो जाएगा.",EDIT_MESSAGE:"संदेश में बदलाव करें",SAVE:"सहेजें",EDITED_INDICATOR:"संपादित किया गया",REPLY_TO_MESSAGE:"जवाब दीजिए ।",ADD_REACTION:"प्रतिक्रिया जोड़ें",AUTH_EXPIRED_OVERLAY_TITLE:"आपका चैट सेशन समाप्त हो चुका है",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"आगे बढ़ने के लिए रिफ्रेश करें",VOICE_MESSAGE:"वॉयस मैसेज",CONTACT_INFORMATION_HIDDEN:"छुपी हुई जानकारी",LEAVE_CONVERSATION:"बातचीत को ख़त्म करें",MARK_CONVERSATION_AS_UNREAD:"अपठित के रूप में चिह्नित करें",STATUS_INDICATOR_ONLINE:"सक्रिय",STATUS_INDICATOR_OFFLINE:"अनुपस्थित",ARIA_LEAVE_SEARCH_MODE:"खोज मोड से बाहर निकलें",ARIA_SEARCH_UP:"ऊपर खोजें",ARIA_SEARCH_DOWN:"नीचे खोजें",ARIA_CLOSE_CHAT_POPUP:"चैट विंडो बंद करें",ARIA_SEARCH_INSIDE_CONVERSATION:"इस बातचीत में खोजें",ARIA_SEARCH:"खोजें",ARIA_CHAT:"चैट",ARIA_SET_PLAYBACK_SPEED:"प्लेबैक गति सेट करें",ARIA_CANCEL_UPLOAD:"अपलोड रद्द करें",ARIA_STOP_RECORDING:"रिकॉर्डिंग रोकें",ARIA_CANCEL_RECORDING:"रिकॉर्डिंग रद्द करें",ARIA_INSERT_EMOJI:"इमोजी डालें",ARIA_PLAY_AUDIO:"ऑडियो चलाएं",ARIA_PAUSE_AUDIO:"ऑडियो रोकें",ARIA_REACTION_COUNT:(t,e)=>`${t} प्रतिक्रियाएं (${e})`,ARIA_MORE_ACTIONS:"अधिक कार्य",ARIA_REPLYING_TO:(t,e)=>`${t} को उत्तर दे रहे हैं: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"उत्तर मोड से बाहर निकलें",SELECT_CONVERSATION:"एक बातचीत चुनें"}},hr:{code:"hr-HR",name:"Croatian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika nisu omogućene jer ih vaš preglednik aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu preglednika ostavite otvorenu, pojavit će se ovaj pop-up kada netko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Reci nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možeš čitati, ali ne i slati poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana e-poštom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podijeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podijeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovdje će se prikazati vaša povijest razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovdje.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na hrvatski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",SEARCH_RESULTS_CONVERSATIONS:"Razgovori",SEARCH_RESULTS_MESSAGES:"Poruke",SEARCH_RESULTS_SHOW_MORE:"Prikaži više",CHAT_NOT_FOUND:"Razgovor nije pronađen",DELETE_MESSAGE:"Obriši poruku",DELETION_EXPLANATION:"Ako izbrišete ovu poruku, nestat će za sve.",EDIT_MESSAGE:"Uredi poruku",SAVE:"Spremi",EDITED_INDICATOR:"uređivao",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodajte reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša sesija razgovora je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvježite stranicu za nastavak",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Skrivene informacije",LEAVE_CONVERSATION:"Napustiti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitano",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretraživanja",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor za chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcija s ${e}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(t,e)=>`Odgovaranje korisniku ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja",SELECT_CONVERSATION:"Odaberite razgovor"}},hu:{code:"hu-HU",name:"Hungarian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hu/cldr/data.json",translation:{YESTERDAY:"Tegnap",TODAY:"Ma",DAYS:"n",HOURS:"ó",MINUTES:"p",JUST_NOW:"éppen most",LOCATION:"Helyszín",CANCEL:"Visszavonás",INBOX:"Postaláda",DESKTOP_NOTIFICATIONS:"Böngésző értesítések",DESKTOP_NOTIFICATIONS_ERROR:"Azért nem tudja bekapcsolni a böngésző értesítések funkciót, mert böngészője aktívan blokkolja azt. Tekintse meg a beállításokat vagy használjon másik böngészőt.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo értesítés`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ha nyitva hagyja böngészőjét, felugró ablak fog megjelenni, ha valaki beszélni szeretne Önnel.",SEND_BUTTON_TEXT:"Küldés",ENTRYBOX_TEXT_LIMIT:"Mindőssze 10.000 karakter megengedett.",ENTRYBOX_PLACEHOLDER:"Mondjon valamit...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ez a beszélgetés már nem aktív.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Elolvashatja az üzeneteket, de nem küldhet újat.",MESSAGELIST_LOADING_OLDER:"Korábbi üzenetek betöltése...",MESSAGELIST_SHOW_OLDER:"Korábbi üzenetek megjelenítése",MESSAGELIST_NEW_MARKER:"Új",MESSAGE_SENT_VIA_EMAIL:"Ez az üzenet e-mailben került elküldésre",YOU_MARKER:"Ön",UPLOAD_IN_PROGRESS:"Feltöltés...",UPLOAD_SEND_FILE:"Fájl küldése",UPLOAD_SHARE_LOCATION:"Helyszín megosztása",UPLOAD_ERROR:"Sajnos hiba történt a feltöltés során. A fájl nem támogatott vagy túl nagy.",SHARE_LOCATION_ERROR:"Helyszín megosztása nem lehetséges: ",LOADING:"Betöltés...",HUB_EMPTY:"A beszélgetések előzményei itt láthatók",HUB_SHOW_EARLIER:"Korábbi beszélgetések megjelenítése",INBOX_NO_CHATS_TITLE:"Még nincs megjeleníthető beszélgetés!",INBOX_NO_CHATS_BODY:"Amint egy vagy több beszélgetéssel rendelkezik, azok itt fognak megjelenni.",ENABLE_TRANSLATION:"A beszélgetés lefordítása erre a nyelvre: magyar",DISABLE_TRANSLATION:"Eredeti megjelenítése",SEARCH_PLACEHOLDER_TEXT:"Keresés...",SEARCH_SEARCHING:"Keresés...",SEARCH_NO_RESULTS:"Nincs találat",SEARCH_NO_MORE_RESULTS:"Nincs több találat",SEARCH_RESULTS_CONVERSATIONS:"Beszélgetések",SEARCH_RESULTS_MESSAGES:"Üzenetek",SEARCH_RESULTS_SHOW_MORE:"Több megjelenítése",CHAT_NOT_FOUND:"A csevegés nem található",DELETE_MESSAGE:"Üzenet törlése",DELETION_EXPLANATION:"Ha törlöd ezt az üzenetet, az mindenki számára eltűnik.",EDIT_MESSAGE:"Üzenet szerkesztése",SAVE:"Mentés",EDITED_INDICATOR:"szerkesztve",REPLY_TO_MESSAGE:"Válaszadás",ADD_REACTION:"Reagálás erre",AUTH_EXPIRED_OVERLAY_TITLE:"Chat munkamenete lejárt",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Folytatáshoz frissítse az oldalt",VOICE_MESSAGE:"Hangüzenet",CONTACT_INFORMATION_HIDDEN:"Rejtett információ",LEAVE_CONVERSATION:"Kilépés a beszélgetésből",MARK_CONVERSATION_AS_UNREAD:"Megjelölés olvasatlanként",STATUS_INDICATOR_ONLINE:"Aktív",STATUS_INDICATOR_OFFLINE:"Távol",ARIA_LEAVE_SEARCH_MODE:"Keresési mód elhagyása",ARIA_SEARCH_UP:"Keresés felfelé",ARIA_SEARCH_DOWN:"Keresés lefelé",ARIA_CLOSE_CHAT_POPUP:"Csevegő ablak bezárása",ARIA_SEARCH_INSIDE_CONVERSATION:"Keresés ebben a beszélgetésben",ARIA_SEARCH:"Keresés",ARIA_CHAT:"Csevegés",ARIA_SET_PLAYBACK_SPEED:"lejátszási sebesség beállítása",ARIA_CANCEL_UPLOAD:"Feltöltés megszakítása",ARIA_STOP_RECORDING:"Felvétel leállítása",ARIA_CANCEL_RECORDING:"Felvétel megszakítása",ARIA_INSERT_EMOJI:"Emoji beszúrása",ARIA_PLAY_AUDIO:"hang lejátszása",ARIA_PAUSE_AUDIO:"hang szüneteltetése",ARIA_REACTION_COUNT:(t,e)=>`${t} reakció (${e})`,ARIA_MORE_ACTIONS:"További műveletek",ARIA_REPLYING_TO:(t,e)=>`Válaszolás ${t} részére: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Kilépés a válasz módóból",SELECT_CONVERSATION:"Válasszon egy beszélgetést"}},id:{code:"id-ID",name:"Bahasa Indonesia",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/id.js",emojiDataUrl:null,translation:{YESTERDAY:"Kemarin",TODAY:"Hari ini",DAYS:"h",HOURS:"j",MINUTES:"m",JUST_NOW:"sekarang",LOCATION:"Lokasi",CANCEL:"Batal",INBOX:"Kotak Masuk",DESKTOP_NOTIFICATIONS:"Notifikasi peramban",DESKTOP_NOTIFICATIONS_ERROR:"Tidak dapat mengaktifkan pemberitahuan browser karena browser Anda secara aktif memblokir mereka. Coba cari di pengaturan atau menggunakan browser yang berbeda.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`pemberitahuan demo ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jika Anda membiarkan tab browser tetap terbuka, Anda akan melihat ini muncul ketika seseorang berbicara kepada Anda.",SEND_BUTTON_TEXT:"Kirim",ENTRYBOX_TEXT_LIMIT:"Hanya 10.000 karakter yang diizinkan.",ENTRYBOX_PLACEHOLDER:"Katakan sesuatu...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Percakapan ini tidak lagi aktif.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Anda dapat membaca, tetapi tidak mengirim pesan.",MESSAGELIST_LOADING_OLDER:"Memuat pesan lama...",MESSAGELIST_SHOW_OLDER:"Tampilkan pesan yang lebih lama",MESSAGELIST_NEW_MARKER:"Baru",MESSAGE_SENT_VIA_EMAIL:"Pesan ini dikirim melalui email",YOU_MARKER:"Anda",UPLOAD_IN_PROGRESS:"Mengunggah...",UPLOAD_SEND_FILE:"Kirim mengajukan",UPLOAD_SHARE_LOCATION:"Bagikan lokasi",UPLOAD_ERROR:"Ada yang salah diunggah. File mungkin tidak didukung atau terlalu besar.",SHARE_LOCATION_ERROR:"Tidak dapat membagikan lokasi: ",LOADING:"Memuat...",HUB_EMPTY:"Riwayat obrolan Anda akan muncul di sini",HUB_SHOW_EARLIER:"Tampilkan obrolan sebelumnya",INBOX_NO_CHATS_TITLE:"Belum ada obrolan!",INBOX_NO_CHATS_BODY:"Setelah Anda melakukan satu atau lebih percakapan, mereka akan muncul di sini.",ENABLE_TRANSLATION:"Terjemahkan percakapan ini ke Indonesia",DISABLE_TRANSLATION:"Perlihatkan asli",SEARCH_PLACEHOLDER_TEXT:"Cari...",SEARCH_SEARCHING:"Mencari...",SEARCH_NO_RESULTS:"Tidak ditemukan hasil",SEARCH_NO_MORE_RESULTS:"Tidak ada hasil lainnya",SEARCH_RESULTS_CONVERSATIONS:"Percakapan",SEARCH_RESULTS_MESSAGES:"Pesan",SEARCH_RESULTS_SHOW_MORE:"Tampilkan lebih banyak",CHAT_NOT_FOUND:"Obrolan tidak ditemukan",DELETE_MESSAGE:"Hapus pesan",DELETION_EXPLANATION:"Jika pesan ini Anda hapus, pesan ini akan tidak terlihat bagi siapa pun.",EDIT_MESSAGE:"Sunting pesan",SAVE:"Mentés",EDITED_INDICATOR:"diedit",REPLY_TO_MESSAGE:"Balas",ADD_REACTION:"Tambah reaksi",AUTH_EXPIRED_OVERLAY_TITLE:"Sesi obrolan Anda sudah lewat batas waktu",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Muat ulang halaman untuk melanjutkan",VOICE_MESSAGE:"Pesan suara",CONTACT_INFORMATION_HIDDEN:"Informasi tersembunyi",LEAVE_CONVERSATION:"Tinggalkan percakapan",MARK_CONVERSATION_AS_UNREAD:"Tandai sebagai Belum dibaca",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Tidak aktif",ARIA_LEAVE_SEARCH_MODE:"Keluar dari mode pencarian",ARIA_SEARCH_UP:"Cari ke atas",ARIA_SEARCH_DOWN:"Cari ke bawah",ARIA_CLOSE_CHAT_POPUP:"Tutup jendela obrolan",ARIA_SEARCH_INSIDE_CONVERSATION:"Cari dalam percakapan ini",ARIA_SEARCH:"Cari",ARIA_CHAT:"Obrolan",ARIA_SET_PLAYBACK_SPEED:"atur kecepatan pemutaran",ARIA_CANCEL_UPLOAD:"Batalkan unggah",ARIA_STOP_RECORDING:"Hentikan perekaman",ARIA_CANCEL_RECORDING:"Batalkan perekaman",ARIA_INSERT_EMOJI:"Sisipkan emoji",ARIA_PLAY_AUDIO:"putar audio",ARIA_PAUSE_AUDIO:"jeda audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reaksi dengan ${e}`,ARIA_MORE_ACTIONS:"Tindakan lainnya",ARIA_REPLYING_TO:(t,e)=>`Membalas ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Keluar dari mode balasan",SELECT_CONVERSATION:"Pilih percakapan"}},is:{code:"is-IS",name:"Íslenska",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Í gær",TODAY:"Í dag",DAYS:"dagar",HOURS:"klst.",MINUTES:"mín.",JUST_NOW:"núna",LOCATION:"Staðsetning",CANCEL:"Hætta við",INBOX:"Pósthólf",DESKTOP_NOTIFICATIONS:"Tilkynningar í vafra",DESKTOP_NOTIFICATIONS_ERROR:"Ekki er hægt að birta tilkynningar í vafra vegna þess að vafrinn sem þú notar hindrar það. Reyndu að leita að stillingum eða að nota annan vafra.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} prufutilkynning`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ef flipinn í vafranum er opinn muntu sjá þessa tilkynningu birtast þegar einhver sendir þér skilaboð.",SEND_BUTTON_TEXT:"Senda",ENTRYBOX_TEXT_LIMIT:"Aðeins 10.000 stafir komast fyrir.",ENTRYBOX_PLACEHOLDER:"Segðu eitthvað...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Þessar samræður eru ekki lengar virkar.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Þú getur lesið, en ekki sent skilaboð.",MESSAGELIST_LOADING_OLDER:"Sæki eldri skilaboð...",MESSAGELIST_SHOW_OLDER:"Sýna eldri skilaboð",MESSAGELIST_NEW_MARKER:"Ný",MESSAGE_SENT_VIA_EMAIL:"Þessi skilaboð voru send með tölvupósti",YOU_MARKER:"þú",UPLOAD_IN_PROGRESS:"Hleð upp...",UPLOAD_SEND_FILE:"Senda skrá",UPLOAD_SHARE_LOCATION:"Deila staðsetningu",UPLOAD_ERROR:"Því miður fór eitthvað úrskeiðis við að hlaða upp. Skráin gæti verið af rangri tegund eð of stór.",SHARE_LOCATION_ERROR:"Ekki er hægt að deila staðsetningu: ",LOADING:"Hleð...",HUB_EMPTY:"Fyrri samtöl munu birtast hér",HUB_SHOW_EARLIER:"Sýna fyrri samtöl",INBOX_NO_CHATS_TITLE:"Engin samtöl enn!",INBOX_NO_CHATS_BODY:"Þegar þú hefur átt eitt eða fleiri samtöl, munu þau birtast hér.",ENABLE_TRANSLATION:"Þýða þetta samtal á ensku",DISABLE_TRANSLATION:"Sýna upprunalegt",SEARCH_PLACEHOLDER_TEXT:"Leita...",SEARCH_SEARCHING:"Leita...",SEARCH_NO_RESULTS:"Ekkert fannst",SEARCH_NO_MORE_RESULTS:"Engar fleiri niðurstöður",SEARCH_RESULTS_CONVERSATIONS:"Samtöl",SEARCH_RESULTS_MESSAGES:"Skilaboð",SEARCH_RESULTS_SHOW_MORE:"Sýna meira",CHAT_NOT_FOUND:"Samtal fannst ekki",DELETE_MESSAGE:"Eyða skilaboðum",DELETION_EXPLANATION:"Ef þú eyðir þessum skilaboðum munu þau hverfa hjá öllum.",EDIT_MESSAGE:"Breyta skilaboðum",SAVE:"Vista",EDITED_INDICATOR:"breytt",REPLY_TO_MESSAGE:"Svara",ADD_REACTION:"Setja inn viðbrögð",AUTH_EXPIRED_OVERLAY_TITLE:"Spjallið hefur runnið út",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Endurnýjaðu síðuna til að halda áfram",VOICE_MESSAGE:"Raddskilaboð",LEAVE_CONVERSATION:"Skilja eftir skilaboð",MARK_CONVERSATION_AS_UNREAD:"Merkja sem ólesið",STATUS_INDICATOR_ONLINE:"Virk",STATUS_INDICATOR_OFFLINE:"Ekki við",CONTACT_INFORMATION_HIDDEN:"faldar upplýsingar",ARIA_LEAVE_SEARCH_MODE:"Hætta í leitastillingu",ARIA_SEARCH_UP:"Leita upp",ARIA_SEARCH_DOWN:"Leita niður",ARIA_CLOSE_CHAT_POPUP:"Loka spjallglugga",ARIA_SEARCH_INSIDE_CONVERSATION:"Leita í þessari samtal",ARIA_SEARCH:"Leita",ARIA_CHAT:"Spjall",ARIA_SET_PLAYBACK_SPEED:"stilla afspilunarhraða",ARIA_CANCEL_UPLOAD:"Hætta við upphleðslu",ARIA_STOP_RECORDING:"Stöðva upptöku",ARIA_CANCEL_RECORDING:"Hætta við upptöku",ARIA_INSERT_EMOJI:"Setja inn emoji",ARIA_PLAY_AUDIO:"spila hljóð",ARIA_PAUSE_AUDIO:"gera hlé á hljóði",ARIA_REACTION_COUNT:(t,e)=>`${t} viðbrögð með ${e}`,ARIA_MORE_ACTIONS:"Fleiri aðgerðir",ARIA_REPLYING_TO:(t,e)=>`Svara ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Hætta í svarmód",SELECT_CONVERSATION:"Veldu samtal"}},it:{code:"it-IT",name:"Italian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/it.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/it/cldr/data.json",translation:{YESTERDAY:"Ieri",TODAY:"Oggi",DAYS:"g",HOURS:"o",MINUTES:"m",JUST_NOW:"adesso",LOCATION:"Posizione",CANCEL:"Annulla",INBOX:"Posta in arrivo",DESKTOP_NOTIFICATIONS:"Notifiche browser",DESKTOP_NOTIFICATIONS_ERROR:"Impossibile abilitare le notifiche browser perché il browser le blocca attivamente. Prova a cercare le impostazioni o utilizzare un browser diverso.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notification`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Se si mantiene aperta la scheda del browser, questo verrà visualizzato quando qualcuno ti parla.",SEND_BUTTON_TEXT:"Invia",ENTRYBOX_TEXT_LIMIT:"Sono consentiti solo 10.000 caratteri.",ENTRYBOX_PLACEHOLDER:"Dì qualcosa...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Questa conversazione non è più attiva.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puoi leggere, ma non inviare messaggi.",MESSAGELIST_LOADING_OLDER:"Caricamento dei messaggi precedenti...",MESSAGELIST_SHOW_OLDER:"Mostra messaggi precedenti",MESSAGELIST_NEW_MARKER:"Nuovo",MESSAGE_SENT_VIA_EMAIL:"Questo messaggio è stato inviato via email",YOU_MARKER:"tu",UPLOAD_IN_PROGRESS:"Caricamento in corso...",UPLOAD_SEND_FILE:"Invia file",UPLOAD_SHARE_LOCATION:"Condividi posizione",UPLOAD_ERROR:"Qualcosa è andato storto durante il caricamento. Il file potrebbe non essere supportato o troppo grande.",SHARE_LOCATION_ERROR:"Impossibile condividere la posizione: ",LOADING:"Caricamento in corso...",HUB_EMPTY:"La cronologia della tua chat verrà mostrata qui",HUB_SHOW_EARLIER:"Mostra chat precedenti",INBOX_NO_CHATS_TITLE:"Non ci sono ancora chat!",INBOX_NO_CHATS_BODY:"Una volta che hai avuto una o più conversazioni, verranno visualizzate qui.",ENABLE_TRANSLATION:"Traduci questa conversazione in italiano",DISABLE_TRANSLATION:"Mostra l'originale",SEARCH_PLACEHOLDER_TEXT:"Cerca...",SEARCH_SEARCHING:"Cercando...",SEARCH_NO_RESULTS:"Nessun risultato trovato",SEARCH_NO_MORE_RESULTS:"Non ci sono più risultati",SEARCH_RESULTS_CONVERSATIONS:"Conversazioni",SEARCH_RESULTS_MESSAGES:"Messaggi",SEARCH_RESULTS_SHOW_MORE:"Mostra altro",CHAT_NOT_FOUND:"Chat non trovata",DELETE_MESSAGE:"Elimina messaggio",DELETION_EXPLANATION:"Se elimini il messaggio, questo scomparirà per tutti.",EDIT_MESSAGE:"Modifica messaggio",SAVE:"Salva",EDITED_INDICATOR:"modificato",REPLY_TO_MESSAGE:"Rispondi",ADD_REACTION:"Aggiungi reazione",AUTH_EXPIRED_OVERLAY_TITLE:"La sessione di chat è scaduta",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Aggiorna la pagina per continuare",VOICE_MESSAGE:"Messaggio vocale",LEAVE_CONVERSATION:"Abbandona la conversazione",MARK_CONVERSATION_AS_UNREAD:"Segna come non letto",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informazioni nascoste",ARIA_LEAVE_SEARCH_MODE:"Esci dalla modalità ricerca",ARIA_SEARCH_UP:"Cerca in alto",ARIA_SEARCH_DOWN:"Cerca in basso",ARIA_CLOSE_CHAT_POPUP:"Chiudi la finestra di chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cerca in questa conversazione",ARIA_SEARCH:"Cerca",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"imposta velocità di riproduzione",ARIA_CANCEL_UPLOAD:"Annulla caricamento",ARIA_STOP_RECORDING:"Interrompi registrazione",ARIA_CANCEL_RECORDING:"Annulla registrazione",ARIA_INSERT_EMOJI:"Inserisci un'emoji",ARIA_PLAY_AUDIO:"riproduci audio",ARIA_PAUSE_AUDIO:"metti in pausa audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reazioni con ${e}`,ARIA_MORE_ACTIONS:"Altre azioni",ARIA_REPLYING_TO:(t,e)=>`Rispondendo a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Esci dalla modalità risposta",SELECT_CONVERSATION:"Seleziona una conversazione"}},ja:{code:"ja-JP",name:"Japanese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ja.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ja/emojibase/data.json",translation:{YESTERDAY:"昨日",TODAY:"今日",DAYS:"日前",HOURS:"時間前",MINUTES:"分前",JUST_NOW:"たった今",LOCATION:"場所",CANCEL:"キャンセル",INBOX:"受信箱",DESKTOP_NOTIFICATIONS:"ブラウザの通知",DESKTOP_NOTIFICATIONS_ERROR:"ブラウザの通知はブロックされているため、ブラウザの通知を有効にできません。設定を確認するか、別のブラウザを使用してください。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} デモ通知`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"ブラウザのタブを開いたままにしておくと、誰かがあなたに話しかけたときにこのポップアップが表示されます。",SEND_BUTTON_TEXT:"送信",ENTRYBOX_TEXT_LIMIT:"許可されているのは10.000文字までです。",ENTRYBOX_PLACEHOLDER:"メッセージを入力してください",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"この会話はもうアクティブではありません。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"あなたは読むことはできますが、メッセージを送ることはできません。",MESSAGELIST_LOADING_OLDER:"古いメッセージを読み込んでいます...",MESSAGELIST_SHOW_OLDER:"古いメッセージを表示",MESSAGELIST_NEW_MARKER:"新着",MESSAGE_SENT_VIA_EMAIL:"このメッセージはメールで送信されました",YOU_MARKER:"あなたは",UPLOAD_IN_PROGRESS:"アップロード中...",UPLOAD_SEND_FILE:"ファイル送信",UPLOAD_SHARE_LOCATION:"共有場所",UPLOAD_ERROR:"アップロード中に問題が発生しました。ファイルがサポートされていないか、大きすぎる可能性があります。",SHARE_LOCATION_ERROR:"場所を共有できません: ",LOADING:"読み込み中...",HUB_EMPTY:"あなたのチャット履歴がここに表示されます",HUB_SHOW_EARLIER:"以前のチャットを表示",INBOX_NO_CHATS_TITLE:"まだチャットがありません!",INBOX_NO_CHATS_BODY:"会話が1つ以上あると、ここに表示されます",ENABLE_TRANSLATION:"この会話を日本語に翻訳する",DISABLE_TRANSLATION:"オリジナルを表示",SEARCH_PLACEHOLDER_TEXT:"検索...",SEARCH_SEARCHING:"検索中...",SEARCH_NO_RESULTS:"結果が見つかりません",SEARCH_NO_MORE_RESULTS:"これ以上結果はありません",SEARCH_RESULTS_CONVERSATIONS:"会話",SEARCH_RESULTS_MESSAGES:"メッセージ",SEARCH_RESULTS_SHOW_MORE:"もっと見る",CHAT_NOT_FOUND:"チャットが見つかりませんでした",DELETE_MESSAGE:"メッセージを削除する",DELETION_EXPLANATION:"このメッセージを削除すると、全ての人に表示されなくなります。",EDIT_MESSAGE:"メッセージを編集する",SAVE:"上書き保存",EDITED_INDICATOR:"編集",REPLY_TO_MESSAGE:"返信する",ADD_REACTION:"リアクションを追加",AUTH_EXPIRED_OVERLAY_TITLE:"チャットセッションの有効期限が切れました",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"続けるにはページを更新してください",VOICE_MESSAGE:"ボイスメッセージ",CONTACT_INFORMATION_HIDDEN:"機密情報",LEAVE_CONVERSATION:"会話をやめる",MARK_CONVERSATION_AS_UNREAD:"未読としてマーク",STATUS_INDICATOR_ONLINE:"アクティブ",STATUS_INDICATOR_OFFLINE:"退席中",ARIA_LEAVE_SEARCH_MODE:"検索モードを終了",ARIA_SEARCH_UP:"上に検索",ARIA_SEARCH_DOWN:"下に検索",ARIA_CLOSE_CHAT_POPUP:"チャットポップアップを閉じる",ARIA_SEARCH_INSIDE_CONVERSATION:"この会話内を検索",ARIA_SEARCH:"検索",ARIA_CHAT:"チャット",ARIA_SET_PLAYBACK_SPEED:"再生速度を設定",ARIA_CANCEL_UPLOAD:"アップロードをキャンセル",ARIA_STOP_RECORDING:"録音を停止",ARIA_CANCEL_RECORDING:"録音をキャンセル",ARIA_INSERT_EMOJI:"絵文字を挿入",ARIA_PLAY_AUDIO:"音声を再生",ARIA_PAUSE_AUDIO:"音声を一時停止",ARIA_REACTION_COUNT:(t,e)=>`${t}件のリアクション(${e})`,ARIA_MORE_ACTIONS:"その他の操作",ARIA_REPLYING_TO:(t,e)=>`${t}に返信: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"返信モードを終了",SELECT_CONVERSATION:"会話を選択"}},ka:{code:"ka-GE",name:"Georgian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"გუშინ",TODAY:"დღეს",DAYS:"დღ",HOURS:"სთ",MINUTES:"წთ",JUST_NOW:"ახლა",LOCATION:"ადგილმდებარეობა",CANCEL:"გაუქმება",INBOX:"მიღებული შეტყობინება",DESKTOP_NOTIFICATIONS:"ბრაუზერის შეტყობინებები",DESKTOP_NOTIFICATIONS_ERROR:"შეუძლებელია ბრაუზერის შეტკობინებების ჩართვა. ეს ბრაუზერი ბლოკავს მათ. სცადე ცვლილება ოპციებიდან ან გამოიყენე სხვა ბრაუზერი.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} შეტყობინებების დემო ვერსია`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"თუ დატოვებ ბრაუზერის ფანჯარას გახსნილს, როცა ვიღაც მოგწერს საუბარი ამოვარდება დესკტოპზე.",SEND_BUTTON_TEXT:"გაგზავნა",ENTRYBOX_TEXT_LIMIT:"დაშვებულია მხოლოდ 10.000 სიმბოლო.",ENTRYBOX_PLACEHOLDER:"დაწერე რაღაც...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"ეს დიალოგი აღარ არის ხელმისაწვდომი.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"შეგიძლია წაიკითხო, მაგრამ ვერ გააგზავნი შეტყობინებას.",MESSAGELIST_LOADING_OLDER:"იტვირთება ძველი შეტყობინებები...",MESSAGELIST_SHOW_OLDER:"ძველი შეტყობინებების ჩვენება",MESSAGELIST_NEW_MARKER:"ახალი",MESSAGE_SENT_VIA_EMAIL:"ეს შეტყობინება გამოგზავნილია იმეილით",YOU_MARKER:"you",UPLOAD_IN_PROGRESS:"იტვირთება...",UPLOAD_SEND_FILE:"ფაილის გაგზავნა",UPLOAD_SHARE_LOCATION:"ადგილმდებარეობის გაზიარება",UPLOAD_ERROR:"პრობლემაა ატვირთვისას. ფაილის შესაძლოა არის არათავსებადი ან ძალიან დიდი.",SHARE_LOCATION_ERROR:"შეუძლებელია ადგილმდებარეობის გაზიარება: ",LOADING:"იტვირთება...",HUB_EMPTY:"საუბრების ისტორია გამოჩნდება აქ",HUB_SHOW_EARLIER:"წინა საუბრების ნახვა",INBOX_NO_CHATS_TITLE:"ჯერ-ჯერობით არ არის საუბრები!",INBOX_NO_CHATS_BODY:"უკვე დასრულებული საუბარები გამოჩნდება აქ",ENABLE_TRANSLATION:"თარგმნეთ ეს საუბარი ინგლისურად",DISABLE_TRANSLATION:"ორიგინალის ჩვენება",SEARCH_PLACEHOLDER_TEXT:"ძიება...",SEARCH_SEARCHING:"მიმდინარეობს ძიება...",SEARCH_NO_RESULTS:"შედეგები ვერ ქართველი",SEARCH_NO_MORE_RESULTS:"სხვა შედეგი ვერ მოიძებნა",SEARCH_RESULTS_CONVERSATIONS:"საუბრები",SEARCH_RESULTS_MESSAGES:"შეტყობინებები",SEARCH_RESULTS_SHOW_MORE:"მეტის ჩვენება",CHAT_NOT_FOUND:"ჩატი ვერ მოიძებნა",DELETE_MESSAGE:"შეტყობინების წაშლა ",DELETION_EXPLANATION:"თუ ამ შეტყობინებას წაშლით, ის ყველასთვის გაქრება.",EDIT_MESSAGE:"შეტყობინების რედაქტირება",SAVE:"შენახვა",EDITED_INDICATOR:"რედაქტირებულია",REPLY_TO_MESSAGE:"პასუხის გაცემა",ADD_REACTION:"დაამატეთ რეაქცია",AUTH_EXPIRED_OVERLAY_TITLE:"თქვენი ჩეთის სესიის ვადა ამოიწურა",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"განაახლეთ გვერდი გასაგრძელებლად",VOICE_MESSAGE:"ხმოვანი შეტყობინება",LEAVE_CONVERSATION:"საუბრის დატოვება",MARK_CONVERSATION_AS_UNREAD:"წაუკითხავად მონიშვნა",STATUS_INDICATOR_ONLINE:"აქტიური",STATUS_INDICATOR_OFFLINE:"გამორთული",CONTACT_INFORMATION_HIDDEN:"ფარული ინფორმაცია",ARIA_LEAVE_SEARCH_MODE:"ძიების რეჟიმიდან გასვლა",ARIA_SEARCH_UP:"ძიება ზემოთ",ARIA_SEARCH_DOWN:"ძიება ქვემოთ",ARIA_CLOSE_CHAT_POPUP:"ჩეთის ფანჯრის დახურვა",ARIA_SEARCH_INSIDE_CONVERSATION:"ძიება ამ საუბარში",ARIA_SEARCH:"ძიება",ARIA_CHAT:"ჩეთი",ARIA_SET_PLAYBACK_SPEED:"გადახვევის სიჩქარის დაყენება",ARIA_CANCEL_UPLOAD:"ატვირთვის გაუქმება",ARIA_STOP_RECORDING:"ჩაწერის შეჩერება",ARIA_CANCEL_RECORDING:"ჩაწერის გაუქმება",ARIA_INSERT_EMOJI:"ემოჯის ჩასმა",ARIA_PLAY_AUDIO:"აუდიოს დაკვრა",ARIA_PAUSE_AUDIO:"აუდიოს შეჩერება",ARIA_REACTION_COUNT:(t,e)=>`${t} რეაქცია (${e})`,ARIA_MORE_ACTIONS:"მეტი ქმედება",ARIA_REPLYING_TO:(t,e)=>`პასუხი ${t}-ს: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"პასუხის რეჟიმიდან გასვლა",SELECT_CONVERSATION:"აირჩიეთ საუბარი"}},ko:{code:"ko-KR",name:"Korean (South Korea)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ko/cldr/data.json",translation:{YESTERDAY:"어제",TODAY:"오늘",DAYS:"일 전",HOURS:"시간 전",MINUTES:"분 전",JUST_NOW:"방금",LOCATION:"위치",CANCEL:"취소",INBOX:"대화 목록",DESKTOP_NOTIFICATIONS:"브라우저 알림",DESKTOP_NOTIFICATIONS_ERROR:"브라우저 알림을 표시할 수 없습니다. 브라우저 설정을 확인하거나 다른 브라우저를 사용해주세요.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} 데모 알림`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"브라우저 탭을 열어 둔 상태에서 누군가 대화 할 때 이 팝업이 표시됩니다.",SEND_BUTTON_TEXT:"전송",ENTRYBOX_TEXT_LIMIT:"최대 10,000자까지 입력할 수 있습니다.",ENTRYBOX_PLACEHOLDER:"메세지를 입력하세요...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"채팅이 종료되었습니다.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"읽기만 가능하며 메시지를 보낼 수 없습니다.",MESSAGELIST_LOADING_OLDER:"이전 메시지 로드 중...",MESSAGELIST_SHOW_OLDER:"이전 메시지 표시",MESSAGELIST_NEW_MARKER:"새 메시지",MESSAGE_SENT_VIA_EMAIL:"이 메시지는 이메일을 통해 전송되었습니다.",YOU_MARKER:"나",UPLOAD_IN_PROGRESS:"업로드 중...",UPLOAD_SEND_FILE:"파일 전송",UPLOAD_SHARE_LOCATION:"위치 공유",UPLOAD_ERROR:"업로드가 실패했습니다. 파일이 지원되지 않거나 너무 클 수 있습니다.",SHARE_LOCATION_ERROR:"위치를 공유 할 수 없습니다: ",LOADING:"로드 중...",HUB_EMPTY:"채팅 기록이 여기에 표시됩니다",HUB_SHOW_EARLIER:"이전 채팅보기",INBOX_NO_CHATS_TITLE:"아직 채팅이 없습니다!",INBOX_NO_CHATS_BODY:"대화가 하나 이상 있으면 여기에 표시됩니다.",ENABLE_TRANSLATION:"이 대화를 한국어로 번역",DISABLE_TRANSLATION:"원본 표시",SEARCH_PLACEHOLDER_TEXT:"검색...",SEARCH_SEARCHING:"검색 중...",SEARCH_NO_RESULTS:"검색 결과 없음",SEARCH_NO_MORE_RESULTS:"추가 검색 결과 없음",SEARCH_RESULTS_CONVERSATIONS:"대화",SEARCH_RESULTS_MESSAGES:"메시지",SEARCH_RESULTS_SHOW_MORE:"더 보기",CHAT_NOT_FOUND:"대화를 찾지 못했습니다",DELETE_MESSAGE:"메시지 삭제",DELETION_EXPLANATION:"이 메시지를 삭제하면 모든 사람이 볼 수 없게 됩니다.",EDIT_MESSAGE:"메시지 편집하기",SAVE:"저장",EDITED_INDICATOR:"편집",REPLY_TO_MESSAGE:"회신",ADD_REACTION:"반응 추가",AUTH_EXPIRED_OVERLAY_TITLE:"채팅 세션이 만료되었습니다",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"계속하려면 페이지를 새로고침하세요",VOICE_MESSAGE:"음성 메시지",CONTACT_INFORMATION_HIDDEN:"숨겨진 정보",LEAVE_CONVERSATION:"대화 떠나기",MARK_CONVERSATION_AS_UNREAD:"읽지 않은 상태로 표시",STATUS_INDICATOR_ONLINE:"활성",STATUS_INDICATOR_OFFLINE:"부재중",ARIA_LEAVE_SEARCH_MODE:"검색 모드 종료",ARIA_SEARCH_UP:"위로 검색",ARIA_SEARCH_DOWN:"아래로 검색",ARIA_CLOSE_CHAT_POPUP:"채팅 팝업 닫기",ARIA_SEARCH_INSIDE_CONVERSATION:"이 대화 내 검색",ARIA_SEARCH:"검색",ARIA_CHAT:"채팅",ARIA_SET_PLAYBACK_SPEED:"재생 속도 설정",ARIA_CANCEL_UPLOAD:"업로드 취소",ARIA_STOP_RECORDING:"녹음 중지",ARIA_CANCEL_RECORDING:"녹음 취소",ARIA_INSERT_EMOJI:"이모지 삽입",ARIA_PLAY_AUDIO:"오디오 재생",ARIA_PAUSE_AUDIO:"오디오 일시 정지",ARIA_REACTION_COUNT:(t,e)=>`${t}개 반응 (${e})`,ARIA_MORE_ACTIONS:"추가 작업",ARIA_REPLYING_TO:(t,e)=>`${t}에게 답장: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"답장 모드 종료",SELECT_CONVERSATION:"대화 선택"}},nb:{code:"nb-NO",name:"Norwegian (Bokmål)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nb/cldr/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"Nå",LOCATION:"Plassering",CANCEL:"Avbryt",INBOX:"Innboks",DESKTOP_NOTIFICATIONS:"Nettleservarsler",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Nettleservarsler fordi nettleseren din aktivt blokkerer dem. Prøv å se i innstillingene eller bruke en annen nettleser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo varslinger`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Hvis du holder nettleservinduet åpent, vil du se dette varsel når noen snakker til deg.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Kun 10.000 tegn er tillatt.",ENTRYBOX_PLACEHOLDER:"Si noe...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Denne samtale er ikke lengre aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan lese, men ikke sende meldinger.",MESSAGELIST_LOADING_OLDER:"Laster eldre meldinger...",MESSAGELIST_SHOW_OLDER:"Vis eldre meldinger",MESSAGELIST_NEW_MARKER:"Ny",MESSAGE_SENT_VIA_EMAIL:"Denne meldingen er sendt via e-post",YOU_MARKER:"deg",UPLOAD_IN_PROGRESS:"Laster opp...",UPLOAD_SEND_FILE:"Send fil",UPLOAD_SHARE_LOCATION:"Del din plassering",UPLOAD_ERROR:"Noe gikk galt i uplastingen. Det kan være filen ikke støttes eller for stor.",SHARE_LOCATION_ERROR:"Kan ikke dele plasseringen: ",LOADING:"Laster...",HUB_EMPTY:"Din chats historikk vil vises her",HUB_SHOW_EARLIER:"Vis tidligere chats",INBOX_NO_CHATS_TITLE:"Ingen chats enda!",INBOX_NO_CHATS_BODY:"Så snart du får en eller flere samtaler, vil de vises her.",ENABLE_TRANSLATION:"Oversett denne samtalen til norsk",DISABLE_TRANSLATION:"Vis original",SEARCH_PLACEHOLDER_TEXT:"Søk...",SEARCH_SEARCHING:"Søker...",SEARCH_NO_RESULTS:"Finner ingen resultater",SEARCH_NO_MORE_RESULTS:"Ingen flere resultater",SEARCH_RESULTS_CONVERSATIONS:"Samtaler",SEARCH_RESULTS_MESSAGES:"Meldinger",SEARCH_RESULTS_SHOW_MORE:"Vis mer",CHAT_NOT_FOUND:"Chat ikke funnet",DELETE_MESSAGE:"Slett melding",DELETION_EXPLANATION:"Hvis du sletter denne meldingen, forsvinner den for alle.",EDIT_MESSAGE:"Rediger melding",SAVE:"Lagre",EDITED_INDICATOR:"redigert",REPLY_TO_MESSAGE:"Svar",ADD_REACTION:"Legg til reaksjon",AUTH_EXPIRED_OVERLAY_TITLE:"Chatøkten er utløpt",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Oppdater siden for å fortsette",VOICE_MESSAGE:"Lydmelding",CONTACT_INFORMATION_HIDDEN:"Skjult informasjon",LEAVE_CONVERSATION:"Forlat samtalen",MARK_CONVERSATION_AS_UNREAD:"Merk som ulest",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Borte",ARIA_LEAVE_SEARCH_MODE:"Forlat søkemodus",ARIA_SEARCH_UP:"Søk oppover",ARIA_SEARCH_DOWN:"Søk nedover",ARIA_CLOSE_CHAT_POPUP:"Lukk chatvindu",ARIA_SEARCH_INSIDE_CONVERSATION:"Søk i denne samtalen",ARIA_SEARCH:"Søk",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"angi avspillingshastighet",ARIA_CANCEL_UPLOAD:"Avbryt opplasting",ARIA_STOP_RECORDING:"Stopp opptak",ARIA_CANCEL_RECORDING:"Avbryt opptak",ARIA_INSERT_EMOJI:"Sett inn en emoji",ARIA_PLAY_AUDIO:"spill av lyd",ARIA_PAUSE_AUDIO:"pause lyd",ARIA_REACTION_COUNT:(t,e)=>`${t} reaksjoner med ${e}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(t,e)=>`Svarer til ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avslutt svarmodus",SELECT_CONVERSATION:"Velg en samtale"}},nl:{code:"nl-NL",name:"Dutch",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/nl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nl/cldr/data.json",translation:{YESTERDAY:"Gisteren",TODAY:"Vandaag",DAYS:"d",HOURS:"u",MINUTES:"m",JUST_NOW:"zojuist",LOCATION:"Locatie",CANCEL:"Annuleren",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browsermeldingen",DESKTOP_NOTIFICATIONS_ERROR:"Browsermeldingen kunnen niet geactiveerd worden omdat de browser het blokkeert. Check de instellingen van je browser of probeer een andere browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notificatie`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Als je je browser open houdt, zie je deze popup als iemand tegen je praat.",SEND_BUTTON_TEXT:"Verzenden",ENTRYBOX_TEXT_LIMIT:"Maximaal 10.000 tekens toegestaan.",ENTRYBOX_PLACEHOLDER:"Typ een bericht...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Dit gesprek is niet actief meer.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Je kunt geen berichten sturen.",MESSAGELIST_LOADING_OLDER:"Eerdere berichten laden...",MESSAGELIST_SHOW_OLDER:"Laad eerdere berichten",MESSAGELIST_NEW_MARKER:"Nieuw",MESSAGE_SENT_VIA_EMAIL:"Dit bericht is verstuurd via e-mail",YOU_MARKER:"jij",UPLOAD_IN_PROGRESS:"Uploaden...",UPLOAD_SEND_FILE:"Verzend bestand",UPLOAD_SHARE_LOCATION:"Deel locatie",UPLOAD_ERROR:"Er ging iets mis. Het bestand wordt niet ondersteund of is te groot.",SHARE_LOCATION_ERROR:"Locatie delen mislukt: ",LOADING:"Bezig met laden...",HUB_EMPTY:"Berichtengeschiedenis wordt hier weergegeven",HUB_SHOW_EARLIER:"Laat eerdere berichten zien",INBOX_NO_CHATS_TITLE:"Nog geen chats!",INBOX_NO_CHATS_BODY:"Zodra je een of meerdere conversaties hebt gehad, worden deze hier weergegeven.",ENABLE_TRANSLATION:"Vertaal dit gesprek naar het Nederlands",DISABLE_TRANSLATION:"Toon oorspronkelijk gesprek",SEARCH_PLACEHOLDER_TEXT:"Zoek...",SEARCH_SEARCHING:"Zoeken...",SEARCH_NO_RESULTS:"Geen resultaten gevonden",SEARCH_NO_MORE_RESULTS:"Niet meer resultaten",SEARCH_RESULTS_CONVERSATIONS:"Gesprekken",SEARCH_RESULTS_MESSAGES:"Berichten",SEARCH_RESULTS_SHOW_MORE:"Toon meer",CHAT_NOT_FOUND:"Chat niet gevonden",DELETE_MESSAGE:"Bericht verwijderen",DELETION_EXPLANATION:"Als je dit bericht verwijdert, zal het voor iedereen verdwijnen.",EDIT_MESSAGE:"Bericht bewerken",SAVE:"Opslaan",EDITED_INDICATOR:"bewerkt",REPLY_TO_MESSAGE:"Beantwoorden",ADD_REACTION:"Reactie toevoegen",AUTH_EXPIRED_OVERLAY_TITLE:"Je chatsessie is verlopen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Ververs de pagina om door te gaan",VOICE_MESSAGE:"Spraakbericht",LEAVE_CONVERSATION:"Gesprek verlaten",MARK_CONVERSATION_AS_UNREAD:"Markeren als ongelezen",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"verborgen informatie",ARIA_LEAVE_SEARCH_MODE:"Zoekmodus verlaten",ARIA_SEARCH_UP:"Omhoog zoeken",ARIA_SEARCH_DOWN:"Omlaag zoeken",ARIA_CLOSE_CHAT_POPUP:"Chatvenster sluiten",ARIA_SEARCH_INSIDE_CONVERSATION:"Zoeken in dit gesprek",ARIA_SEARCH:"Zoeken",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Afspeelsnelheid instellen",ARIA_CANCEL_UPLOAD:"Upload annuleren",ARIA_STOP_RECORDING:"Opname stoppen",ARIA_CANCEL_RECORDING:"Opname annuleren",ARIA_INSERT_EMOJI:"Een emoji invoegen",ARIA_PLAY_AUDIO:"Audio afspelen",ARIA_PAUSE_AUDIO:"Audio pauzeren",ARIA_REACTION_COUNT:(t,e)=>`${t} Reacties met ${e}`,ARIA_MORE_ACTIONS:"Meer acties",ARIA_REPLYING_TO:(t,e)=>`Beantwoorden aan ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Verlaat antwoordmodus",SELECT_CONVERSATION:"Selecteer een gesprek"}},pl:{code:"pl-PL",name:"Polish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pl/cldr/data.json",translation:{YESTERDAY:"Wczoraj",TODAY:"Dzisiaj",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"teraz",LOCATION:"Lokalizacja",CANCEL:"Anuluj",INBOX:"Skrzynka odbiorcza",DESKTOP_NOTIFICATIONS:"Powiadomienia",DESKTOP_NOTIFICATIONS_ERROR:"Nie można aktywować powiadomień, ponieważ twoja przeglądarka je blokuje. Proszę zmienić ustawienie lub spróbować innej przeglądarki.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} przykładowe powiadomienie`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jeśli zostawisz tę kartę otwartą, zobaczysz takie powiadomienie, gdy ktoś napisze do Ciebie.",SEND_BUTTON_TEXT:"Wyślij",ENTRYBOX_TEXT_LIMIT:"Nie można wysyłać więcej niż 10000 znaków.",ENTRYBOX_PLACEHOLDER:"Napisz coś...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ten czat nie jest aktywny.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Możesz czytać wiadomości, ale nie możesz ich wysyłać.",MESSAGELIST_LOADING_OLDER:"Wczytuję starsze wiadomości...",MESSAGELIST_SHOW_OLDER:"Zobacz starsze wiadomości",MESSAGELIST_NEW_MARKER:"Nowe",MESSAGE_SENT_VIA_EMAIL:"Ta wiadomość została wysłana przez email.",YOU_MARKER:"ty",UPLOAD_IN_PROGRESS:"Przesyłanie...",UPLOAD_SEND_FILE:"Prześlij plik",UPLOAD_SHARE_LOCATION:"Udostępnij lokalizację",UPLOAD_ERROR:"Coś poszło nie tak. Plik może być zbyt duży lub jest nieobsługiwany.",SHARE_LOCATION_ERROR:"Nie da się udostępnić lokalizacji: ",LOADING:"Ładowanie...",HUB_EMPTY:"Twoje czaty pojawią się tutaj",HUB_SHOW_EARLIER:"Zobacz starsze czaty",INBOX_NO_CHATS_TITLE:"Brak czatów!",INBOX_NO_CHATS_BODY:"Rozpoczęte konwersacje pojawią się tutaj.",ENABLE_TRANSLATION:"Przetłumacz tę konwersację na język polski",DISABLE_TRANSLATION:"Pokaż oryginał",SEARCH_PLACEHOLDER_TEXT:"Wyszukaj...",SEARCH_SEARCHING:"Wyszukiwanie...",SEARCH_NO_RESULTS:"Nie znaleziono wyników",SEARCH_NO_MORE_RESULTS:"Nie ma innych wyników",SEARCH_RESULTS_CONVERSATIONS:"Konwersacje",SEARCH_RESULTS_MESSAGES:"Wiadomości",SEARCH_RESULTS_SHOW_MORE:"Pokaż więcej",CHAT_NOT_FOUND:"Nie znaleziono konwersacji",DELETE_MESSAGE:"Usuń wiadomość",DELETION_EXPLANATION:"Jeśli usuniesz tę wiadomość, przestanie być widoczna dla wszystkich.",EDIT_MESSAGE:"Edytuj wiadomość",SAVE:"Zapisz",EDITED_INDICATOR:"edytowano",REPLY_TO_MESSAGE:"Odpowiedz",ADD_REACTION:"Dodaj reakcję",AUTH_EXPIRED_OVERLAY_TITLE:"Twoja sesja wygasła",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Odśwież stronę, aby kontynuować",VOICE_MESSAGE:"Wiadomość głosowa",CONTACT_INFORMATION_HIDDEN:"Ukryte informacje",LEAVE_CONVERSATION:"Opuść konwersację",MARK_CONVERSATION_AS_UNREAD:"Oznacz jako nieprzeczytane",STATUS_INDICATOR_ONLINE:"Aktywny",STATUS_INDICATOR_OFFLINE:"Nieobecny",ARIA_LEAVE_SEARCH_MODE:"Wyjdź z trybu wyszukiwania",ARIA_SEARCH_UP:"Szukaj w górę",ARIA_SEARCH_DOWN:"Szukaj w dół",ARIA_CLOSE_CHAT_POPUP:"Zamknij okno czatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Szukaj w tej konwersacji",ARIA_SEARCH:"Szukaj",ARIA_CHAT:"Czat",ARIA_SET_PLAYBACK_SPEED:"ustaw prędkość odtwarzania",ARIA_CANCEL_UPLOAD:"Anuluj przesyłanie",ARIA_STOP_RECORDING:"Zatrzymaj nagrywanie",ARIA_CANCEL_RECORDING:"Anuluj nagrywanie",ARIA_INSERT_EMOJI:"Wstaw emoji",ARIA_PLAY_AUDIO:"odtwórz audio",ARIA_PAUSE_AUDIO:"wstrzymaj audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcji z ${e}`,ARIA_MORE_ACTIONS:"Więcej akcji",ARIA_REPLYING_TO:(t,e)=>`Odpowiadanie na ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Wyjdź z trybu odpowiedzi",SELECT_CONVERSATION:"Wybierz konwersację"}},pt:{code:"pt-BR",name:"Portuguese (Brazil)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pt_BR.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pt/cldr/data.json",translation:{YESTERDAY:"Ontem",TODAY:"Hoje",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"agora mesmo",LOCATION:"Localização",CANCEL:"Cancelar",INBOX:"Caixa de entrada",DESKTOP_NOTIFICATIONS:"Notificações do navegador",DESKTOP_NOTIFICATIONS_ERROR:"Não é possível ativar as notificações da navegador porque seu navegador as bloqueia. Tente procurar nas configurações ou usar um navegador diferente.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} notificação de demonstração`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Se você mantiver a guia do navegador aberta, verá essa mensagem quando alguém falar com você.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Apenas 10.000 caracteres são permitidos.",ENTRYBOX_PLACEHOLDER:"Diga algo...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Esta conversa não está mais ativa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Você pode ler, mas não enviar mensagens.",MESSAGELIST_LOADING_OLDER:"Carregando mensagens antigas...",MESSAGELIST_SHOW_OLDER:"Mostrar mensagens mais antigas",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Esta mensagem foi enviada via email.",YOU_MARKER:"Você",UPLOAD_IN_PROGRESS:"Carregando...",UPLOAD_SEND_FILE:"Enviar arquivo",UPLOAD_SHARE_LOCATION:"Compartilhar localização",UPLOAD_ERROR:"Algo deu errado ao fazer o upload. O arquivo pode não ter suporte ou ser muito grande.",SHARE_LOCATION_ERROR:"Não é possível compartilhar o local: ",LOADING:"Carregando...",HUB_EMPTY:"Seu histórico de conversas será exibido aqui",HUB_SHOW_EARLIER:"Mostrar conversas anteriores",INBOX_NO_CHATS_TITLE:"Ainda não há chats!",INBOX_NO_CHATS_BODY:"Depois de ter uma ou mais conversas, elas serão exibidas aqui.",ENABLE_TRANSLATION:"Traduzir esta conversa para português",DISABLE_TRANSLATION:"Ver a conversa não traduzida",SEARCH_PLACEHOLDER_TEXT:"Busca...",SEARCH_SEARCHING:"Consultando...",SEARCH_NO_RESULTS:"Resultados nao encontrados",SEARCH_NO_MORE_RESULTS:"Não há mais resultados",SEARCH_RESULTS_CONVERSATIONS:"Conversas",SEARCH_RESULTS_MESSAGES:"Mensagens",SEARCH_RESULTS_SHOW_MORE:"Mostrar mais",CHAT_NOT_FOUND:"Conversa não encontrada",DELETE_MESSAGE:"Excluir mensagem",DELETION_EXPLANATION:"Se você excluir esta mensagem, ela desaparecerá para todos.",EDIT_MESSAGE:"Editar mensagem",SAVE:"Salvar",EDITED_INDICATOR:"editada",REPLY_TO_MESSAGE:"Responder",ADD_REACTION:"Adicionar reação",AUTH_EXPIRED_OVERLAY_TITLE:"Sua sessão de chat expirou",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Atualize a página para continuar",VOICE_MESSAGE:"Mensagem de voz",LEAVE_CONVERSATION:"Sair da conversa",MARK_CONVERSATION_AS_UNREAD:"Marcar como não lida",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informação oculta",ARIA_LEAVE_SEARCH_MODE:"Sair do modo de pesquisa",ARIA_SEARCH_UP:"Pesquisar para cima",ARIA_SEARCH_DOWN:"Pesquisar para baixo",ARIA_CLOSE_CHAT_POPUP:"Fechar janela de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Pesquisar nesta conversa",ARIA_SEARCH:"Pesquisar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"definir velocidade de reprodução",ARIA_CANCEL_UPLOAD:"Cancelar envio",ARIA_STOP_RECORDING:"Parar gravação",ARIA_CANCEL_RECORDING:"Cancelar gravação",ARIA_INSERT_EMOJI:"Inserir um emoji",ARIA_PLAY_AUDIO:"reproduzir áudio",ARIA_PAUSE_AUDIO:"pausar áudio",ARIA_REACTION_COUNT:(t,e)=>`${t} reações com ${e}`,ARIA_MORE_ACTIONS:"Mais ações",ARIA_REPLYING_TO:(t,e)=>`Respondendo a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sair do modo de resposta",SELECT_CONVERSATION:"Selecione uma conversa"}},ro:{code:"ro-RO",name:"Romanian (Romania)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ieri",TODAY:"Astăzi",DAYS:"z",HOURS:"o",MINUTES:"m",JUST_NOW:"chiar acum",LOCATION:"Locație",CANCEL:"Anulare",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificări browser",DESKTOP_NOTIFICATIONS_ERROR:"Nu se pot activa notificări browser deoarece browserul dvs. le blochează în mod activ. Încercați să căutați în setări sau utilizând un alt browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Notificare de debit ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Dacă țineți fișa browserului deschis, veți vedea acest pop-up atunci când cineva vorbește cu dvs.",SEND_BUTTON_TEXT:"Trimiteți",ENTRYBOX_TEXT_LIMIT:"Sunt permise numai 10.000 de caractere.",ENTRYBOX_PLACEHOLDER:"Spune ceva...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Această conversație nu mai este activă.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puteți citi, dar nu puteți trimite mesaje.",MESSAGELIST_LOADING_OLDER:"Încărcarea mesajelor mai vechi...",MESSAGELIST_SHOW_OLDER:"Afișați mesaje mai vechi",MESSAGELIST_NEW_MARKER:"Nou",MESSAGE_SENT_VIA_EMAIL:"Acest mesaj a fost trimis prin e-mail",YOU_MARKER:"voi",UPLOAD_IN_PROGRESS:"Încărcarea...",UPLOAD_SEND_FILE:"Trimiteți fișierul",UPLOAD_SHARE_LOCATION:"Distribuiți locația",UPLOAD_ERROR:"Sa încărcat ceva în mod greșit. Fișierul ar putea fi neacceptat sau prea mare.",SHARE_LOCATION_ERROR:"Nu se poate partaja locația: ",LOADING:"Încărcare...",HUB_EMPTY:"Istoricul chat-ului dvs. va apărea aici",HUB_SHOW_EARLIER:"Afișați discuțiile anterioare",INBOX_NO_CHATS_TITLE:"Încă nu vorbești!",INBOX_NO_CHATS_BODY:"După ce ați avut una sau mai multe conversații, acestea vor apărea aici.",ENABLE_TRANSLATION:"Traduceți această conversație în română",DISABLE_TRANSLATION:"Arată originalul",SEARCH_PLACEHOLDER_TEXT:"Căutare...",SEARCH_SEARCHING:"Se caută...",SEARCH_NO_RESULTS:"Nu s-au găsit rezultate",SEARCH_NO_MORE_RESULTS:"Nu mai există rezultate",SEARCH_RESULTS_CONVERSATIONS:"Conversații",SEARCH_RESULTS_MESSAGES:"Mesaje",SEARCH_RESULTS_SHOW_MORE:"Arată mai mult",CHAT_NOT_FOUND:"Conversația nu a fost găsită",DELETE_MESSAGE:"Șterge mesajul",DELETION_EXPLANATION:"Dacă ștergi acest mesaj, acesta va dispărea pentru toată lumea.",EDIT_MESSAGE:"Redactează mesajul",SAVE:"Salvare",EDITED_INDICATOR:"editat",REPLY_TO_MESSAGE:"Răspundeți",ADD_REACTION:"Adaugă o reacție",AUTH_EXPIRED_OVERLAY_TITLE:"Sesiunea dumneavoastră de chat a expirat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Reîmprospătați pagina pentru a continua",VOICE_MESSAGE:"Mesaj vocal",CONTACT_INFORMATION_HIDDEN:"Informații ascunse",LEAVE_CONVERSATION:"Părăsește conversația",MARK_CONVERSATION_AS_UNREAD:"Marcheaza ca necitit",STATUS_INDICATOR_ONLINE:"Activ",STATUS_INDICATOR_OFFLINE:"Plecat",ARIA_LEAVE_SEARCH_MODE:"Părăsește modul de căutare",ARIA_SEARCH_UP:"Caută în sus",ARIA_SEARCH_DOWN:"Caută în jos",ARIA_CLOSE_CHAT_POPUP:"Închide fereastra de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Caută în această conversație",ARIA_SEARCH:"Caută",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"setează viteza de redare",ARIA_CANCEL_UPLOAD:"Anulează încărcarea",ARIA_STOP_RECORDING:"Oprește înregistrarea",ARIA_CANCEL_RECORDING:"Anulează înregistrarea",ARIA_INSERT_EMOJI:"Inserează un emoji",ARIA_PLAY_AUDIO:"redă audio",ARIA_PAUSE_AUDIO:"pauză audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reacții cu ${e}`,ARIA_MORE_ACTIONS:"Mai multe acțiuni",ARIA_REPLYING_TO:(t,e)=>`Răspuns la ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Părăsește modul de răspuns",SELECT_CONVERSATION:"Selectați o conversație"}},ru:{code:"ru-RU",name:"Russian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ru_RU.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ru/emojibase/data.json",translation:{YESTERDAY:"Вчера",TODAY:"Сегодня",DAYS:"д",HOURS:"ч",MINUTES:"м",JUST_NOW:"только что",LOCATION:"Местоположение",CANCEL:"Отмена",INBOX:"Входящие",DESKTOP_NOTIFICATIONS:"Оповещения",DESKTOP_NOTIFICATIONS_ERROR:"Невозможно включить оповещения, потому что ваш браузер активно блокирует их. Проверьте ваши настройки или попробуйте другой браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} демо-оповещение`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Если вкладка вашего браузера открыта, вы увидите всплывающее окошко оповещения когда кто-то отправит вам сообщение.",SEND_BUTTON_TEXT:"Отправить",ENTRYBOX_TEXT_LIMIT:"Разрешено использовать только 10 тысяч символов.",ENTRYBOX_PLACEHOLDER:"Напишите что-нибудь...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Этот разговор больше неактивен.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Вы можете читать, но не отправлять сообщения.",MESSAGELIST_LOADING_OLDER:"Загрузка старых сообщения...",MESSAGELIST_SHOW_OLDER:"Показать старые сообщения",MESSAGELIST_NEW_MARKER:"Новые",MESSAGE_SENT_VIA_EMAIL:"Это сообщение было отправлено по электронной почте",YOU_MARKER:"вы",UPLOAD_IN_PROGRESS:"Загрузка...",UPLOAD_SEND_FILE:"Отправить файл",UPLOAD_SHARE_LOCATION:"Поделиться местоположением",UPLOAD_ERROR:"Что-то пошло не так: такой файл не поддерживается или он слишком большой.",SHARE_LOCATION_ERROR:"Не удается поделиться местоположением: ",LOADING:"Загрузка...",HUB_EMPTY:"Здесь появится ваша история чата",HUB_SHOW_EARLIER:"Показать предыдущие чаты",INBOX_NO_CHATS_TITLE:"Пока нет чатов!",INBOX_NO_CHATS_BODY:"Как только у вас будет один или несколько разговоров, они появятся здесь.",ENABLE_TRANSLATION:"Переведите этот разговор на русский",DISABLE_TRANSLATION:"Show source",SEARCH_PLACEHOLDER_TEXT:"поиск...",SEARCH_SEARCHING:"Поиск...",SEARCH_NO_RESULTS:"Результаты не найдены",SEARCH_NO_MORE_RESULTS:"Больше результатов нет",SEARCH_RESULTS_CONVERSATIONS:"Разговоры",SEARCH_RESULTS_MESSAGES:"Сообщения",SEARCH_RESULTS_SHOW_MORE:"Показать ещё",CHAT_NOT_FOUND:"Чат не найден",DELETE_MESSAGE:"Удалить сообщение",DELETION_EXPLANATION:"Если вы удалите это сообщение, оно исчезнет для всех.",EDIT_MESSAGE:"Изменить сообщение",SAVE:"сохранить",EDITED_INDICATOR:"изменено",REPLY_TO_MESSAGE:"Ответить",ADD_REACTION:"Добавить реакцию",AUTH_EXPIRED_OVERLAY_TITLE:"Срок действия вашего сеанса чата истек",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Обновите страницу, чтобы продолжить",VOICE_MESSAGE:"Голосовое сообщение",CONTACT_INFORMATION_HIDDEN:"Информация скрыта",LEAVE_CONVERSATION:"Выйти из беседы",MARK_CONVERSATION_AS_UNREAD:"Отметить как непрочитанное",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Не в сети",ARIA_LEAVE_SEARCH_MODE:"Выйти из режима поиска",ARIA_SEARCH_UP:"Искать вверх",ARIA_SEARCH_DOWN:"Искать вниз",ARIA_CLOSE_CHAT_POPUP:"Закрыть окно чата",ARIA_SEARCH_INSIDE_CONVERSATION:"Искать в этом разговоре",ARIA_SEARCH:"Поиск",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"установить скорость воспроизведения",ARIA_CANCEL_UPLOAD:"Отменить загрузку",ARIA_STOP_RECORDING:"Остановить запись",ARIA_CANCEL_RECORDING:"Отменить запись",ARIA_INSERT_EMOJI:"Вставить эмодзи",ARIA_PLAY_AUDIO:"воспроизвести аудио",ARIA_PAUSE_AUDIO:"приостановить аудио",ARIA_REACTION_COUNT:(t,e)=>`${t} реакций с ${e}`,ARIA_MORE_ACTIONS:"Дополнительные действия",ARIA_REPLYING_TO:(t,e)=>`Ответ на ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Выйти из режима ответа",SELECT_CONVERSATION:"Выберите беседу"}},sq:{code:"sq-AL",name:"Albanian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Dje",TODAY:"Sot",DAYS:"d",HOURS:"o",MINUTES:"m",JUST_NOW:"Tani",LOCATION:"Pozicion",CANCEL:"Anulo",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Njoftimet e shfletuesit",DESKTOP_NOTIFICATIONS_ERROR:"Nuk mund të aktivizohen njoftimet në shfletues sepse shfletuesi juaj i bllokon ato në mënyrë aktive. Provoni të shikoni cilësimet ose përdorni një shfletues të ndryshëm.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} njoftime në desktop`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Lënia e skedës së shfletuesit tuaj të hapur do të pop-up kur dikush flet me ju.",SEND_BUTTON_TEXT:"Dërgo",ENTRYBOX_TEXT_LIMIT:"Lejohen vetëm 10,000 karaktere",ENTRYBOX_PLACEHOLDER:"Thuaj diçka...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Kjo bisedë nuk është më aktive.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mund të lexoni por jo të dërgoni mesazhe.",MESSAGELIST_LOADING_OLDER:"Duke ngarkuar mesazhe më të vjetra...",MESSAGELIST_SHOW_OLDER:"Trego mesazhe më të vjetra",MESSAGELIST_NEW_MARKER:"E ri",MESSAGE_SENT_VIA_EMAIL:"Ky mesazh u dërgua si email",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Ngarkim...",UPLOAD_SEND_FILE:"Dërgo datotekën",UPLOAD_SHARE_LOCATION:"Ndani lokacionin",UPLOAD_ERROR:"Na vjen keq, diçka nuk shkoi si duhet. Dosja mund të mos ket mbështetje ose mund të jetë shumë e madhe.",SHARE_LOCATION_ERROR:"Nuk mund të ndahet lokacioni: ",LOADING:"Ngarkim...",HUB_EMPTY:"Këtu do të paraqitet/ shfaqet historia e bisedës tuaj",HUB_SHOW_EARLIER:"Shfaqi bisedat e mëparshme",INBOX_NO_CHATS_TITLE:"Nuk ka biseda!",INBOX_NO_CHATS_BODY:"Pasi të keni një ose më shumë biseda, ato do të paraqiten/shfaqen këtu.",ENABLE_TRANSLATION:"Përkthejeni këtë bisedë në shqiptare",DISABLE_TRANSLATION:"Shikoni origjinalin",SEARCH_PLACEHOLDER_TEXT:"Kërko...",SEARCH_SEARCHING:"Kërko...",SEARCH_NO_RESULTS:"Nuk ka rezultate",SEARCH_NO_MORE_RESULTS:"Nuk ka më rezultate",SEARCH_RESULTS_CONVERSATIONS:"Bisedat",SEARCH_RESULTS_MESSAGES:"Mesazhe",SEARCH_RESULTS_SHOW_MORE:"Shfaq më shumë",CHAT_NOT_FOUND:"Biseda nuk u gjet",DELETE_MESSAGE:"Fshi mesazhin",DELETION_EXPLANATION:"Nëse e fshini këtë mesazh, ai do të zhduket për të gjithë.",EDIT_MESSAGE:"Redakto mesazhin",SAVE:"Ruaj",EDITED_INDICATOR:"redaktuar",REPLY_TO_MESSAGE:"Përgjigj",ADD_REACTION:"Shtoni reagimin",AUTH_EXPIRED_OVERLAY_TITLE:"Sesioni juaj i bisedës ka skaduar",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Rifresko faqen për të vazhduar",VOICE_MESSAGE:"Mesazh zanor",CONTACT_INFORMATION_HIDDEN:"informacione të fshehura",LEAVE_CONVERSATION:"Largohu nga bashkëbisedimi",MARK_CONVERSATION_AS_UNREAD:"Shëno si të palexuar",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Larg",ARIA_LEAVE_SEARCH_MODE:"Dil nga mënyra e kërkimit",ARIA_SEARCH_UP:"Kërko lart",ARIA_SEARCH_DOWN:"Kërko poshtë",ARIA_CLOSE_CHAT_POPUP:"Mbyll dritaren e bisedës",ARIA_SEARCH_INSIDE_CONVERSATION:"Kërko në këtë bisedë",ARIA_SEARCH:"Kërko",ARIA_CHAT:"Bisedë",ARIA_SET_PLAYBACK_SPEED:"vendos shpejtësinë e luajtjes",ARIA_CANCEL_UPLOAD:"Anulo ngarkimin",ARIA_STOP_RECORDING:"Ndalo regjistrimin",ARIA_CANCEL_RECORDING:"Anulo regjistrimin",ARIA_INSERT_EMOJI:"Fut një emoji",ARIA_PLAY_AUDIO:"luaj audio",ARIA_PAUSE_AUDIO:"pauzë audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reagime me ${e}`,ARIA_MORE_ACTIONS:"Më shumë veprime",ARIA_REPLYING_TO:(t,e)=>`Duke u përgjigjur ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Dil nga mënyra e përgjigjes",SELECT_CONVERSATION:"Zgjidhni një bashkëbisedim"}},sr:{code:"sr-SP",name:"Serbian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Juče",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Browser Notifikacija",DESKTOP_NOTIFICATIONS_ERROR:"Browser notifikacije nisu omogućene jer ih vaš pregledač aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi pregledač.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu pregledača ostavite otvorenu, pojaviće se ovaj pop-up kada neko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Kaži nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možete da čitate, ali ne i da šaljete poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana imejlom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovde će biti prikazana istorija razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovde.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na srpski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",SEARCH_RESULTS_CONVERSATIONS:"Razgovori",SEARCH_RESULTS_MESSAGES:"Poruke",SEARCH_RESULTS_SHOW_MORE:"Prikaži više",CHAT_NOT_FOUND:"Ćaskanje nije pronađeno",DELETE_MESSAGE:"Izbriši poruku",DELETION_EXPLANATION:"Ako obrišete ovu poruku, ona neće biti vidljiva ni za koga.",EDIT_MESSAGE:"Ispravi poruku",SAVE:"Sačuvaj",EDITED_INDICATOR:"ispravljeno",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodaj reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša sesija ćaskanja je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvežite stranicu da biste nastavili",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Sakrivene informacije",LEAVE_CONVERSATION:"Napusti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitanu",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Neaktivan",ARIA_LEAVE_SEARCH_MODE:"Напусти режим претраге",ARIA_SEARCH_UP:"Тражи горе",ARIA_SEARCH_DOWN:"Тражи доле",ARIA_CLOSE_CHAT_POPUP:"Затвори прозор ћаскања",ARIA_SEARCH_INSIDE_CONVERSATION:"Тражи у овом разговору",ARIA_SEARCH:"Тражи",ARIA_CHAT:"Ћаскање",ARIA_SET_PLAYBACK_SPEED:"постави брзину репродукције",ARIA_CANCEL_UPLOAD:"Откажи отпремање",ARIA_STOP_RECORDING:"Заустави снимање",ARIA_CANCEL_RECORDING:"Откажи снимање",ARIA_INSERT_EMOJI:"Уметни емоџи",ARIA_PLAY_AUDIO:"репродукуј аудио",ARIA_PAUSE_AUDIO:"паузирај аудио",ARIA_REACTION_COUNT:(t,e)=>`${t} реакција са ${e}`,ARIA_MORE_ACTIONS:"Више радњи",ARIA_REPLYING_TO:(t,e)=>`Одговарање кориснику ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja",SELECT_CONVERSATION:"Izaberite razgovor"}},sv:{code:"sv-SE",name:"Swedish (Sweden)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/sv/emojibase/data.json",translation:{YESTERDAY:"Igår",TODAY:"Idag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just nu",LOCATION:"Plats",CANCEL:"Avbryt",INBOX:"Inkorg",DESKTOP_NOTIFICATIONS:"Webbläsarnotiser",DESKTOP_NOTIFICATIONS_ERROR:"Kan inte aktivera webbläsarnotiser eftersom din webbläsare aktivt blockerar dem. Se över inställningarna eller använd en annan webbläsare.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demonotis`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Om du har fliken i webbläsaren öppen så kommer den här notisen visas när någon pratar med dig.",SEND_BUTTON_TEXT:"Skicka",ENTRYBOX_TEXT_LIMIT:"Max 10 000 tecken är tillåtet.",ENTRYBOX_PLACEHOLDER:"Skriv ett meddelande...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Den här konversationen är inte längre aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan läsa men inte skicka meddelanden.",MESSAGELIST_LOADING_OLDER:"Läser in tidigare meddelanden...",MESSAGELIST_SHOW_OLDER:"Visa tidigare meddelanden",MESSAGELIST_NEW_MARKER:"Nytt",MESSAGE_SENT_VIA_EMAIL:"Detta meddelande skickades via e-post",YOU_MARKER:"du",UPLOAD_IN_PROGRESS:"Laddar upp...",UPLOAD_SEND_FILE:"Skicka fil",UPLOAD_SHARE_LOCATION:"Dela plats",UPLOAD_ERROR:"Något gick fel vid uppladdningen. Filen kan vara av en typ som inte stöds eller är för stor.",SHARE_LOCATION_ERROR:"Kan inte dela plats: ",LOADING:"Laddar...",HUB_EMPTY:"Din chatthistorik kommer att visas här",HUB_SHOW_EARLIER:"Visa tidigare chattar",INBOX_NO_CHATS_TITLE:"Inga chattar ännu!",INBOX_NO_CHATS_BODY:"När du har haft en eller flera konversationer kommer de att visas här.",ENABLE_TRANSLATION:"Översätt den här konversationen till svenska",DISABLE_TRANSLATION:"Visa original",SEARCH_PLACEHOLDER_TEXT:"Sök...",SEARCH_SEARCHING:"Söker...",SEARCH_NO_RESULTS:"Inga resultat hittades",SEARCH_NO_MORE_RESULTS:"Inga fler resultat",SEARCH_RESULTS_CONVERSATIONS:"Konversationer",SEARCH_RESULTS_MESSAGES:"Meddelanden",SEARCH_RESULTS_SHOW_MORE:"Visa mer",CHAT_NOT_FOUND:"Chatten hittades inte",DELETE_MESSAGE:"Radera meddelandet",DELETION_EXPLANATION:"Om du raderar det här meddelandet försvinner det för alla.",EDIT_MESSAGE:"Redigera meddelandet",SAVE:"Spara",EDITED_INDICATOR:"redigerad",REPLY_TO_MESSAGE:"Svara",ADD_REACTION:"Lägg till reaktion",AUTH_EXPIRED_OVERLAY_TITLE:"Din chatsession har gått ut",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Uppdatera sidan för att fortsätta",VOICE_MESSAGE:"Röstmeddelande",CONTACT_INFORMATION_HIDDEN:"Dold information",LEAVE_CONVERSATION:"Lämna konversationen",MARK_CONVERSATION_AS_UNREAD:"Markera som oläst",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Avsluta sökläge",ARIA_SEARCH_UP:"Sök uppåt",ARIA_SEARCH_DOWN:"Sök nedåt",ARIA_CLOSE_CHAT_POPUP:"Stäng chattfönstret",ARIA_SEARCH_INSIDE_CONVERSATION:"Sök i denna konversation",ARIA_SEARCH:"Sök",ARIA_CHAT:"Chatt",ARIA_SET_PLAYBACK_SPEED:"Ställ in uppspelningshastighet",ARIA_CANCEL_UPLOAD:"Avbryt uppladdning",ARIA_STOP_RECORDING:"Stoppa inspelning",ARIA_CANCEL_RECORDING:"Avbryt inspelning",ARIA_INSERT_EMOJI:"Infoga en emoji",ARIA_PLAY_AUDIO:"Spela upp ljud",ARIA_PAUSE_AUDIO:"Pausa ljud",ARIA_REACTION_COUNT:(t,e)=>`${t} Reaktioner med ${e}`,ARIA_MORE_ACTIONS:"Fler åtgärder",ARIA_REPLYING_TO:(t,e)=>`Svarar på ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avsluta svarsläge",SELECT_CONVERSATION:"Välj en konversation"}},tr:{code:"tr-TR",name:"Turkish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/tr.js",emojiDataUrl:null,translation:{YESTERDAY:"Dün",TODAY:"Bugün",DAYS:"g",HOURS:"s",MINUTES:"d",JUST_NOW:"az önce",LOCATION:"Konum",CANCEL:"İptal",INBOX:"Gelen Kutusu",SEND_BUTTON_TEXT:"Gönder",ENTRYBOX_TEXT_LIMIT:"En fazla 10.000 karaktere izin veriliyor.",ENTRYBOX_PLACEHOLDER:"Bir şeyler söyle...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Bu konuşma artık aktif değil.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mesajları okuyabilirsiniz ancak mesaj gönderemezsiniz.",MESSAGELIST_LOADING_OLDER:"Eski mesajlar yükleniyor...",MESSAGELIST_SHOW_OLDER:"Eski mesajları göster",MESSAGELIST_NEW_MARKER:"Yeni",DESKTOP_NOTIFICATIONS:"Tarayıcı bildirimleri",DESKTOP_NOTIFICATIONS_ERROR:"Tarayıcınız aktif olarak engellediğinden tarayıcı bildirimlerini etkinleştiremiyoruz. Ayarları kontrol etmeyi veya farklı bir tarayıcı kullanmayı deneyebilirsiniz.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} test bildirimi`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Eğer tarayıcınızın penceresini açık tutarsanız biri mesaj yazdığında bu bildirimi göreceksiniz.",MESSAGE_SENT_VIA_EMAIL:"Bu mesaj e-posta ile gönderilmiştir.",YOU_MARKER:"siz",UPLOAD_IN_PROGRESS:"Yükleniyor...",UPLOAD_SEND_FILE:"Dosya gönder",UPLOAD_SHARE_LOCATION:"Konum paylaş",UPLOAD_ERROR:"Yükleme sırasında bir şeyler yanlış gitti. Dosya desteklenmiyor veya izin verilenden büyük olabilir.",SHARE_LOCATION_ERROR:"Konum paylaşılamadı: ",LOADING:"Yükleniyor...",HUB_EMPTY:"Konuşma geçmişiniz burada görünecek",HUB_SHOW_EARLIER:"Önceki konuşmaları göster",INBOX_NO_CHATS_TITLE:"Henüz konuşma yok!",INBOX_NO_CHATS_BODY:"Bir veya daha fazla konuşma başlattığınız konuşmalar burada belirecek.",ENABLE_TRANSLATION:"Bu konuşmayı Türkçe'ye çevir",DISABLE_TRANSLATION:"Orijinali göster",SEARCH_PLACEHOLDER_TEXT:"Ara...",SEARCH_SEARCHING:"Arıyor...",SEARCH_NO_RESULTS:"Sonuç bulunamadı",SEARCH_NO_MORE_RESULTS:"Başka sonuç bulunamadı.",SEARCH_RESULTS_CONVERSATIONS:"Konuşmalar",SEARCH_RESULTS_MESSAGES:"Mesajlar",SEARCH_RESULTS_SHOW_MORE:"Daha fazla göster",CHAT_NOT_FOUND:"Sohbet bulunamadı",DELETE_MESSAGE:"Mesajı sil",DELETION_EXPLANATION:"Bu mesajı silerseniz herkes için görünmez olacaktır.",EDIT_MESSAGE:"Mesajı düzenle",SAVE:"Kaydet",EDITED_INDICATOR:"düzenlenmiş",REPLY_TO_MESSAGE:"Yanıtla",ADD_REACTION:"Tepki ekle",AUTH_EXPIRED_OVERLAY_TITLE:"Sohbet oturumunuz sona erdi",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Devam etmek için sayfayı yenileyin",VOICE_MESSAGE:"Sesli mesaj",CONTACT_INFORMATION_HIDDEN:"Gizli bilgi",LEAVE_CONVERSATION:"Konuşmadan ayrıl",MARK_CONVERSATION_AS_UNREAD:"Okunmamış olarak işaretle",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Uzakta",ARIA_LEAVE_SEARCH_MODE:"Arama modundan çık",ARIA_SEARCH_UP:"Yukarı ara",ARIA_SEARCH_DOWN:"Aşağı ara",ARIA_CLOSE_CHAT_POPUP:"Sohbet penceresini kapat",ARIA_SEARCH_INSIDE_CONVERSATION:"Bu konuşmada ara",ARIA_SEARCH:"Ara",ARIA_CHAT:"Sohbet",ARIA_SET_PLAYBACK_SPEED:"oynatma hızını ayarla",ARIA_CANCEL_UPLOAD:"Yüklemeyi iptal et",ARIA_STOP_RECORDING:"Kaydı durdur",ARIA_CANCEL_RECORDING:"Kaydı iptal et",ARIA_INSERT_EMOJI:"Emoji ekle",ARIA_PLAY_AUDIO:"sesi oynat",ARIA_PAUSE_AUDIO:"sesi duraklat",ARIA_REACTION_COUNT:(t,e)=>`${t} tepki (${e})`,ARIA_MORE_ACTIONS:"Daha fazla işlem",ARIA_REPLYING_TO:(t,e)=>`${t}'a yanıtlama: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Yanıt modundan çık",SELECT_CONVERSATION:"Bir konuşma seçin"}},uk:{code:"uk-UA",name:"Ukrainian (Ukraine)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/uk/cldr/data.json",translation:{YESTERDAY:"Вчора",TODAY:"Сьогодні",DAYS:"d",HOURS:"h",MINUTES:"м",JUST_NOW:"просто зараз",LOCATION:"Місцезнаходження",CANCEL:"Скасувати",INBOX:"Вхідні",DESKTOP_NOTIFICATIONS:"Сповіщення в браузері",DESKTOP_NOTIFICATIONS_ERROR:"Неможливо ввімкнути сповіщення в браузері, оскільки ваш веб-переглядач активно їх блокує. Спробуйте переглянути налаштування або використовувати інший браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Демо-повідомлення про ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Якщо ви відкриєте вкладку веб-переглядача відкритою, ви побачите це спливаюче вікно, коли хтось спілкується з вами.",SEND_BUTTON_TEXT:"Надіслати",ENTRYBOX_TEXT_LIMIT:"Дозволено лише 10 000 символів.",ENTRYBOX_PLACEHOLDER:"Скажи щось...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ця розмова більше не активна.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Ви можете читати, але не надсилати повідомлення.",MESSAGELIST_LOADING_OLDER:"Завантаження старих повідомлень...",MESSAGELIST_SHOW_OLDER:"Показати старіші повідомлення",MESSAGELIST_NEW_MARKER:"Нові",MESSAGE_SENT_VIA_EMAIL:"Це повідомлення надіслано електронною поштою",YOU_MARKER:"ти",UPLOAD_IN_PROGRESS:"Завантаження...",UPLOAD_SEND_FILE:"Надіслати файл",UPLOAD_SHARE_LOCATION:"Поділитися місцезнаходженням",UPLOAD_ERROR:"На жаль, під час завантаження щось не вдалось. Файл може бути непідтримуваним або занадто великим.",SHARE_LOCATION_ERROR:"Неможливо поділити місцезнаходження: ",LOADING:"Завантаження...",HUB_EMPTY:"Тут відобразиться ваша історія чатів",HUB_SHOW_EARLIER:"Показати попередні чати",INBOX_NO_CHATS_TITLE:"Чатів ще немає!",INBOX_NO_CHATS_BODY:"Після того, як ви проведете одну чи кілька бесід, вони з’являться тут.",ENABLE_TRANSLATION:"Перекласти цю розмову англійською",DISABLE_TRANSLATION:"Показати оригінал",SEARCH_PLACEHOLDER_TEXT:"Пошук...",SEARCH_SEARCHING:"Пошук...",SEARCH_NO_RESULTS:"Не знайдено результатів",SEARCH_NO_MORE_RESULTS:"Більше немає результатів",SEARCH_RESULTS_CONVERSATIONS:"Розмови",SEARCH_RESULTS_MESSAGES:"Повідомлення",SEARCH_RESULTS_SHOW_MORE:"Показати більше",CHAT_NOT_FOUND:"Чат не знайдено",DELETE_MESSAGE:"Видалити повідомлення",DELETION_EXPLANATION:"Якщо ви видалите це повідомлення, воно зникне для всіх.",EDIT_MESSAGE:"Редагувати повідомлення",SAVE:"Зберегти",EDITED_INDICATOR:"відредаговано",REPLY_TO_MESSAGE:"Відповісти",ADD_REACTION:"Додати реакцію",AUTH_EXPIRED_OVERLAY_TITLE:"Ваша сесія в чаті закінчилась",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Оновіть сторінку, щоб продовжити",VOICE_MESSAGE:"Голосове повідомлення",CONTACT_INFORMATION_HIDDEN:"Прихована інформація",LEAVE_CONVERSATION:"Залишити розмову",MARK_CONVERSATION_AS_UNREAD:"Відзначити як непрочитане",STATUS_INDICATOR_ONLINE:"Активний",STATUS_INDICATOR_OFFLINE:"Відсутній",ARIA_LEAVE_SEARCH_MODE:"Вийти з режиму пошуку",ARIA_SEARCH_UP:"Шукати вгору",ARIA_SEARCH_DOWN:"Шукати вниз",ARIA_CLOSE_CHAT_POPUP:"Закрити вікно чату",ARIA_SEARCH_INSIDE_CONVERSATION:"Шукати в цій розмові",ARIA_SEARCH:"Пошук",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"встановити швидкість відтворення",ARIA_CANCEL_UPLOAD:"Скасувати завантаження",ARIA_STOP_RECORDING:"Зупинити запис",ARIA_CANCEL_RECORDING:"Скасувати запис",ARIA_INSERT_EMOJI:"Вставити емодзі",ARIA_PLAY_AUDIO:"відтворити аудіо",ARIA_PAUSE_AUDIO:"призупинити аудіо",ARIA_REACTION_COUNT:(t,e)=>`${t} реакцій з ${e}`,ARIA_MORE_ACTIONS:"Більше дій",ARIA_REPLYING_TO:(t,e)=>`Відповідь на ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Вийти з режиму відповіді",SELECT_CONVERSATION:"Виберіть розмову"}},vi:{code:"vi-VN",name:"Vietnamese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/vi.js",emojiDataUrl:null,translation:{YESTERDAY:"Hôm qua",TODAY:"Hôm nay",DAYS:"ngày",HOURS:"giờ",MINUTES:"phút",JUST_NOW:"vừa xong",LOCATION:"Địa điểm",CANCEL:"Hủy",INBOX:"Hộp thư đến",DESKTOP_NOTIFICATIONS:"Thông báo trình duyệt",DESKTOP_NOTIFICATIONS_ERROR:"Không thể bật thông báo trên trình duyệt vì trình duyệt của bạn đang tắt chức năng này. Hãy thử tìm trong cài đặt trình duyệt hoặc sử dụng một trình duyệt khác.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} thông báo thử nghiệm`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Nếu bạn giữ tab trình duyệt của bạn mở, bạn sẽ thấy cửa sổ bật lên khi ai đó nói chuyện với bạn.",SEND_BUTTON_TEXT:"Gửi",ENTRYBOX_TEXT_LIMIT:"Tối đa 10.000 ký tự.",ENTRYBOX_PLACEHOLDER:"Nói gì đó...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cuộc hội thoại này không còn hoạt động.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Bạn có thể đọc, nhưng không thể gửi tin nhắn.",MESSAGELIST_LOADING_OLDER:"Đang tải tin nhắn cũ...",MESSAGELIST_SHOW_OLDER:"Hiển thị tin nhắn trước đó",MESSAGELIST_NEW_MARKER:"Mới",MESSAGE_SENT_VIA_EMAIL:"Tin nhắn này đã được gửi qua email",YOU_MARKER:"bạn",UPLOAD_IN_PROGRESS:"Đang tải lên...",UPLOAD_SEND_FILE:"Gửi tệp",UPLOAD_SHARE_LOCATION:"Chia sẻ vị trí",UPLOAD_ERROR:"Thật không may, quá trình tải lên không thành công. Tệp không được hỗ trợ hoặc quá lớn.",SHARE_LOCATION_ERROR:"Không thể chia sẻ vị trí: ",LOADING:"Đang tải...",HUB_EMPTY:"Lịch sử trò chuyện của bạn sẽ hiển thị ở đây",HUB_SHOW_EARLIER:"Hiển thị các cuộc trò chuyện trước đó",INBOX_NO_CHATS_TITLE:"Chưa có cuộc trò chuyện nào!",INBOX_NO_CHATS_BODY:"Khi bạn đã có một hoặc nhiều cuộc trò chuyện, chúng sẽ hiển thị ở đây.",ENABLE_TRANSLATION:"Dịch cuộc hội thoại sang Tiếng Việt",DISABLE_TRANSLATION:"Hiển thị nội dung gốc",SEARCH_PLACEHOLDER_TEXT:"TÌm kiếm...",SEARCH_SEARCHING:"Đang tìm kiếm...",SEARCH_NO_RESULTS:"Không tìm thấy kết quả nào",SEARCH_NO_MORE_RESULTS:"Không có kết quả nào khác",SEARCH_RESULTS_CONVERSATIONS:"Cuộc trò chuyện",SEARCH_RESULTS_MESSAGES:"Tin nhắn",SEARCH_RESULTS_SHOW_MORE:"Hiển thị thêm",CHAT_NOT_FOUND:"Không tìm thấy cuộc trò chuyện",DELETE_MESSAGE:"Xóa tin nhắn",DELETION_EXPLANATION:"Nếu bạn xóa tin nhắn này, tất cả mọi người sẽ không còn thấy nó.",EDIT_MESSAGE:"Chỉnh sửa tin nhắn",SAVE:"lưu",EDITED_INDICATOR:"đã chỉnh sửa",REPLY_TO_MESSAGE:"đáp lại",ADD_REACTION:"Thêm biểu tượng cảm xúc",AUTH_EXPIRED_OVERLAY_TITLE:"Phiên trò chuyện của bạn đã hết hạn",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Hãy làm mới trang để tiếp tục",VOICE_MESSAGE:"Tin nhắn thoại",CONTACT_INFORMATION_HIDDEN:"Thông tin ẩn",LEAVE_CONVERSATION:"Thoát khỏi cuộc trò chuyện",MARK_CONVERSATION_AS_UNREAD:"Đánh dấu là chưa đọc",STATUS_INDICATOR_ONLINE:"Hoạt động",STATUS_INDICATOR_OFFLINE:"Vắng mặt",ARIA_LEAVE_SEARCH_MODE:"Thoát chế độ tìm kiếm",ARIA_SEARCH_UP:"Tìm kiếm lên trên",ARIA_SEARCH_DOWN:"Tìm kiếm xuống dưới",ARIA_CLOSE_CHAT_POPUP:"Đóng cửa sổ trò chuyện",ARIA_SEARCH_INSIDE_CONVERSATION:"Tìm kiếm trong cuộc trò chuyện này",ARIA_SEARCH:"Tìm kiếm",ARIA_CHAT:"Trò chuyện",ARIA_SET_PLAYBACK_SPEED:"đặt tốc độ phát",ARIA_CANCEL_UPLOAD:"Hủy tải lên",ARIA_STOP_RECORDING:"Dừng ghi âm",ARIA_CANCEL_RECORDING:"Hủy ghi âm",ARIA_INSERT_EMOJI:"Chèn biểu tượng cảm xúc",ARIA_PLAY_AUDIO:"phát âm thanh",ARIA_PAUSE_AUDIO:"tạm dừng âm thanh",ARIA_REACTION_COUNT:(t,e)=>`${t} phản ứng với ${e}`,ARIA_MORE_ACTIONS:"Thêm hành động",ARIA_REPLYING_TO:(t,e)=>`Đang trả lời ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Thoát chế độ trả lời",SELECT_CONVERSATION:"Chọn một cuộc trò chuyện"}},zh:{code:"zh-CN",name:"Chinese (Simplified)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh/emojibase/data.json",translation:{YESTERDAY:"昨天",TODAY:"今天",DAYS:"天",HOURS:"小时",MINUTES:"分钟",JUST_NOW:"刚才",LOCATION:"地点",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"浏览器通知",DESKTOP_NOTIFICATIONS_ERROR:"因浏览器设置为阻止,所以无法激活浏览器提醒。请去设置里查看或者尝试其他的浏览器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} 演示提醒`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"只要保持浏览器开着,如果有人和你对话,将会自动弹出对话窗口。",SEND_BUTTON_TEXT:"发送",ENTRYBOX_TEXT_LIMIT:"不超过10,000个字符。",ENTRYBOX_PLACEHOLDER:"写点什么吧……",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"该对话已结束。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"你只能阅读信息,不能发送信息。",MESSAGELIST_LOADING_OLDER:"载入之前的信息……",MESSAGELIST_SHOW_OLDER:"显示之前的信息",MESSAGELIST_NEW_MARKER:"新消息",MESSAGE_SENT_VIA_EMAIL:"该信息已通过邮件发送。",YOU_MARKER:"你",UPLOAD_IN_PROGRESS:"上传中……",UPLOAD_SEND_FILE:"发送文件",UPLOAD_SHARE_LOCATION:"分享地址",UPLOAD_ERROR:"上传出错。文件格式不支持或者太大。",SHARE_LOCATION_ERROR:"无法分享地址: ",LOADING:"正在载入……",HUB_EMPTY:"你的聊天记录将在此显示。",HUB_SHOW_EARLIER:"显示之前的聊天记录。",INBOX_NO_CHATS_TITLE:"暂无任何聊天记录!",INBOX_NO_CHATS_BODY:"如果你有一个或多个对话窗口进行中,将显示在这里。",ENABLE_TRANSLATION:"翻译至简体中文",DISABLE_TRANSLATION:"查看原文",SEARCH_PLACEHOLDER_TEXT:"搜索...",SEARCH_SEARCHING:"正在搜索...",SEARCH_NO_RESULTS:"未找到结果",SEARCH_NO_MORE_RESULTS:"无更多结果",SEARCH_RESULTS_CONVERSATIONS:"对话",SEARCH_RESULTS_MESSAGES:"消息",SEARCH_RESULTS_SHOW_MORE:"显示更多",CHAT_NOT_FOUND:"未找到“聊天”",DELETE_MESSAGE:"删除消息",DELETION_EXPLANATION:"如果您删除此消息,那么所有人都将无法再看到它。",EDIT_MESSAGE:"编辑消息",SAVE:"保存",EDITED_INDICATOR:"本消息有改动",REPLY_TO_MESSAGE:"回复",ADD_REACTION:"添加反应",AUTH_EXPIRED_OVERLAY_TITLE:"您的聊天会话已过期",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"刷新页面以继续",VOICE_MESSAGE:"语音消息",CONTACT_INFORMATION_HIDDEN:"隐藏信息",LEAVE_CONVERSATION:"离开对话",MARK_CONVERSATION_AS_UNREAD:"标记为未读",STATUS_INDICATOR_ONLINE:"活跃",STATUS_INDICATOR_OFFLINE:"离开",ARIA_LEAVE_SEARCH_MODE:"退出搜索模式",ARIA_SEARCH_UP:"向上搜索",ARIA_SEARCH_DOWN:"向下搜索",ARIA_CLOSE_CHAT_POPUP:"关闭聊天弹窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此对话中搜索",ARIA_SEARCH:"搜索",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"设置播放速度",ARIA_CANCEL_UPLOAD:"取消上传",ARIA_STOP_RECORDING:"停止录音",ARIA_CANCEL_RECORDING:"取消录音",ARIA_INSERT_EMOJI:"插入表情符号",ARIA_PLAY_AUDIO:"播放音频",ARIA_PAUSE_AUDIO:"暂停音频",ARIA_REACTION_COUNT:(t,e)=>`${t}个反应(${e})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(t,e)=>`正在回复 ${t}:${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回复模式",SELECT_CONVERSATION:"选择对话"}},zhTw:{code:"zh-TW",name:"Chinese (Traditional)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh-hant/cldr/data.json",translation:{YESTERDAY:"昨天",TODAY:"昨天",DAYS:"天",HOURS:"小時",MINUTES:"分",JUST_NOW:"現在",LOCATION:"地點",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"瀏覽器通知",DESKTOP_NOTIFICATIONS_ERROR:"無法啟用瀏覽器通知,因為您的瀏覽器主動阻止它們。 嘗試查看設置或使用其他瀏覽器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} 演示通知`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"如果您持續打開瀏覽器標籤頁,當有人與您通話時,您會看到此彈出窗口。",SEND_BUTTON_TEXT:"發送",ENTRYBOX_TEXT_LIMIT:"只允許10.000個字符。",ENTRYBOX_PLACEHOLDER:"說些什麼...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"此對話不再有效。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"您可以閱讀,但不能發送消息。",MESSAGELIST_LOADING_OLDER:"加載舊訊息...",MESSAGELIST_SHOW_OLDER:"顯示較舊的訊息",MESSAGELIST_NEW_MARKER:"新的",MESSAGE_SENT_VIA_EMAIL:"此訊息是通過電郵發送的",YOU_MARKER:"您",UPLOAD_IN_PROGRESS:"上傳中...",UPLOAD_SEND_FILE:"發送文件",UPLOAD_SHARE_LOCATION:"共享位置",UPLOAD_ERROR:"不幸的是,上傳出了問題。 該文件可能不受支持或太大。",SHARE_LOCATION_ERROR:"無法分享位置:",LOADING:"載入中...",HUB_EMPTY:"您的聊天記錄將顯示在此處",HUB_SHOW_EARLIER:"顯示早先的聊天記錄",INBOX_NO_CHATS_TITLE:"還沒聊天!",INBOX_NO_CHATS_BODY:"一旦您進行了一次或多次對話,他們就會顯示在此處。",ENABLE_TRANSLATION:"翻譯此對話至繁體中文",DISABLE_TRANSLATION:"顯示原文",SEARCH_PLACEHOLDER_TEXT:"搜尋...",SEARCH_SEARCHING:"正在搜尋...",SEARCH_NO_RESULTS:"找不到任何結果",SEARCH_NO_MORE_RESULTS:"沒有其他結果",SEARCH_RESULTS_CONVERSATIONS:"對話",SEARCH_RESULTS_MESSAGES:"訊息",SEARCH_RESULTS_SHOW_MORE:"顯示更多",CHAT_NOT_FOUND:"查無對話",DELETE_MESSAGE:"刪除訊息",DELETION_EXPLANATION:"您如果刪除這條訊息,所有人都將看不到它。",EDIT_MESSAGE:"編輯訊息",SAVE:"儲存",EDITED_INDICATOR:"已編輯",REPLY_TO_MESSAGE:"回覆",ADD_REACTION:"加入表情回應",AUTH_EXPIRED_OVERLAY_TITLE:"您的會話過程已過期",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"請刷新頁面以繼續",VOICE_MESSAGE:"語音訊息",CONTACT_INFORMATION_HIDDEN:"隱藏訊息",LEAVE_CONVERSATION:"離開對話",MARK_CONVERSATION_AS_UNREAD:"標記為未讀",STATUS_INDICATOR_ONLINE:"活躍",STATUS_INDICATOR_OFFLINE:"離開",ARIA_LEAVE_SEARCH_MODE:"離開搜尋模式",ARIA_SEARCH_UP:"向上搜尋",ARIA_SEARCH_DOWN:"向下搜尋",ARIA_CLOSE_CHAT_POPUP:"關閉聊天彈窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此對話中搜尋",ARIA_SEARCH:"搜尋",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"設定播放速度",ARIA_CANCEL_UPLOAD:"取消上傳",ARIA_STOP_RECORDING:"停止錄音",ARIA_CANCEL_RECORDING:"取消錄音",ARIA_INSERT_EMOJI:"插入表情符號",ARIA_PLAY_AUDIO:"播放音訊",ARIA_PAUSE_AUDIO:"暫停音訊",ARIA_REACTION_COUNT:(t,e)=>`${t}個反應(${e})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(t,e)=>`正在回覆 ${t}:${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回覆模式",SELECT_CONVERSATION:"選擇對話"}}},zm=()=>{const t=document.createElement("canvas");t.width=t.height=1;const e=t.getContext("2d");return e.textBaseline="top",e.font='100px "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Twemoji Mozilla","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',e.scale(.01,.01),e},bd=(t,e)=>{const n=zm();return n.fillStyle=e,n.fillText(t,0,0),n.getImageData(0,0,1,1).data},qg=t=>!t.includes("")||zm().measureText(t).width<160,Jg=(t,e)=>{const n=[...t].join(",");return n===[...e].join(",")&&!n.startsWith("0,0,0,")};function Ym(t){try{return(function(e){const n=bd(e,"#000"),r=bd(e,"#fff"),i=qg(e);return n&&r&&i&&Jg(n,r)})(t)}catch(e){return!0}}var Of;const Gm=(Of=globalThis.window)!=null&&Of.document?(function(){if(typeof window=="undefined"||window.E2E||window.__talkjsE2E)return 16;const t={"":16,"🚶➡️":15.1,"🫨":15,"🫠":14,"😵💫":13.1,"🥲":13,"🧑🦰":12.1,"🥻":12,"🥰":11,"🤩":5,"👱♀️":4,"🤣":3,"👁️🗨️":2,"😀":1,"😐️":.7,"😃":.6};for(const[e,n]of Object.entries(t))if(Ym(e))return n})():0;class Wm{constructor(e,n){this.currentUser$=ae(null),this.app$=ae(null),this.appId$=ae(null),this.extUserId$=ae(null),this.hasTokenFetcher$=ae(!1),this.authTokenState$=ae("idle"),this.themeCustom$=ae(od({value:void 0})),this.highlightedStrings$=ae([]),this.device$=ae({supportsEmojiPicker:!!Gm,isMobile:typeof window!="undefined"&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=ae({unknownUser:!1,wrongAppId:!1,serverError:!1}),this.conversationSearch=null,this.messageSearch=null,this.locale$=ae(()=>{var s,a;const r=this.extUserId$.get(),i=this.app$.appMetadata.defaultLocale.get(),o=this.currentUser$.locale.get();return(a=(s=r&&o)!=null?s:i)!=null?a:"en-US"}),this.translationData$=ae(()=>(function(r){const i=r.replace(/_/g,"-").toLowerCase(),o=Nd[i];if(o)return{strings:{...o.translation,locale:i},emojiPickerTranslationUrl:o.emojiPickerTranslationUrl,emojiDataUrl:o.emojiDataUrl};const s=i.slice(0,2),a=Nd[s];return a?{strings:{...a.translation,locale:s},emojiPickerTranslationUrl:a.emojiPickerTranslationUrl,emojiDataUrl:a.emojiDataUrl}:(Ie.warn(`User locale '${r}' not supported; falling back to English.`),{strings:{...jr.translation,locale:"en-US"},emojiPickerTranslationUrl:jr.emojiPickerTranslationUrl,emojiDataUrl:jr.emojiDataUrl})})(this.locale$.get())),this.t$=ae(()=>this.translationData$.strings.get()),Pt(()=>{this.appId$.set(e),this.extUserId$.set(n)})}updateThemeCustom(e){this.themeCustom$.set(od({value:e}))}}const Zg={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};class Qg extends Wm{constructor(e,n){super(e,n),this.type="ChatboxStore",this.messageSubscriptions={},this.readyForNewMessagesPromise=Promise.resolve(),this.renderedConversationId$=ae(void 0),this.focusedMessage$=ae(null),this.chatSearchState$=ae("hidden"),this.searchQuery$=ae(""),this.newMessageMarker$=ae(void 0),this.state$=ae({loadingConversationId:null,currentConversationId:null,editor:{isEmpty:!0,atTextLimit:!1,characterCount:0,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0},enterSendsMessage:!0,referencedMessageId:null,editingMessageId:null,unknownConversations:{},conversations:{},messages:{},participants:{},typing:{},isUserConnected:{},ephemeralMessages:{},ephemeralMessageIdMapping:{},localFileBlobUrls:{},currentConversation:()=>{const r=this.state$.currentConversationId.get();return r&&this.state$.conversations.child(r).get()},userPermissions:()=>{var s;const r=((s=this.app$.features.get())!=null?s:[]).includes("search_in_conv"),i=this.app$.role.general.get(),o=this.app$.role.permissions.get();return ie.defined(i),ie.defined(o),{canSearch:r,showTypingIndicator:i.showTypingIndicators,canShareFile:i.enableFileTransfers,canShareLocation:i.enableLocation,canMention:i.enableMentions,showOnlineStatus:i.enablePresence!==!1,canSendVoiceMessage:i.enableVoiceRecording,canLeaveConversation:o.conversations.leave==="all",canMarkConversationAsUnread:o.conversations.markAsUnread==="all"}},messagePermissions:()=>{const r=this.app$.role.permissions.get();ie.defined(r);const i=this.state$.userPermissions.get(),o={...Zg,...i},s={canReplyToMessage:gn(r.messages.reply,!0),canEditMessage:gn(r.messages.edit,!0),canDeleteMessage:gn(r.messages.delete,!0),canAddReaction:gn(r.messages.emojiReactions,!0),...i},a={...s,canEditMessage:!1},l={canReplyToMessage:gn(r.messages.reply,!1),canEditMessage:gn(r.messages.edit,!1),canDeleteMessage:gn(r.messages.delete,!1),canAddReaction:gn(r.messages.emojiReactions,!1),...i};return{system:o,own:s,ownWithoutEditing:a,other:l,otherWithoutEditing:{...l,canEditMessage:!1}}}}),this.referencedMessage$=ae(()=>{const r=this.state$.currentConversationId.get(),i=this.state$.referencedMessageId.get();return r&&i?this.state$.messages.child(r).lookup.child(i).get():null}),this.chatItems$=ae(()=>{var p,m,E;const r=this.state$.currentConversationId.get();if(!r)return[];const i=(p=this.newMessageMarker$.get())!=null?p:1/0,o=(m=this.state$.messages.child(r).state.get())!=null?m:[],s=Object.values((E=this.state$.ephemeralMessages.child(r).get())!=null?E:{}),a=s.length===0?o:s.concat(o).sort((_,A)=>A.createdAt-_.createdAt),l=a.map(_=>{const A=_.content[0],O=A==null?void 0:A.type;if(!A||O!=="file")return _;const S=A.size+","+A.filename,v=this.state$.localFileBlobUrls.child(r).child(S).url.get();return v?{..._,content:[{...A,url:v}]}:_});let u=null,c=0,d=!1;const h=[];for(const _ of l){const A=new Date(_.createdAt),O=new Date(A).setHours(0,0,0,0),S=c&&O!==c,v=A.getTime()>i,T=!(!d||v||u!=null&&u.id.startsWith("ephemeral"));(T||S)&&h.push(new Yo({id:"border-before-"+_.id,isDayMarker:!!S,isReadMarker:!!T,timestamp:S?c:void 0})),h.push(_),d=v,c=O,u=_}const f=this.extUserId$.peek();return(function(_,A){const O=[];let S=[];const v=Symbol("NO_KEY");let T=v;for(const R of _){const I=A(R);T===v||T===I?S.push(R):(O.push(S),S=[R]),T=I}return S.length!==0&&O.push(S),O})(h,_=>{var A;return _ instanceof Yo?_.id:(A=_.sender)==null?void 0:A.id}).map(_=>{var O;const A=_[_.length-1];return{items:_,id:A.id,type:A instanceof Yo?"divider":A.sender?((O=A.sender)==null?void 0:O.id)===f?"own":"other":"system"}})})}storeTyping(e,n){this.state$.typing.child(e).set(n)}setSearchQuery(e){const n=e.trim().split(/\s+/).map(r=>r.trim()).filter(Boolean);Pt(()=>{this.searchQuery$.set(e),this.highlightedStrings$.set(n)})}messagePermissions$(e){const n=this.currentUser$.get();if(!n)throw new Error("Unreachable");const r=e.content[0];return e.sender?n.id===e.sender.id?r.type==="text"?this.state$.messagePermissions.own:this.state$.messagePermissions.ownWithoutEditing:r.type==="text"?this.state$.messagePermissions.other:this.state$.messagePermissions.otherWithoutEditing:this.state$.messagePermissions.system}canRenderUi(e){const n=this.app$.get(),r=this.currentUser$.get();if(e===null)return!!(n&&r);const i=this.state$.conversations.child(e).get(),o=this.state$.participants.child(e).get();return!!(n&&r&&i&&o)}storeMessages(e,n,r){Pt(()=>{var a;const i=n.reduce((l,u)=>(l[u.id]=u,l),{}),o=this.extUserId$.peek();ie(o),this.state$.messages.child(e).set({state:n,lookup:i,loadedAll:r});const s=this.state$.ephemeralMessages.child(e);for(const l of n){const u=this.state$.ephemeralMessageIdMapping.child(e).child(l.id).peek();u&&s.child(u).delete();const c=l.content[0];if(((a=l.sender)==null?void 0:a.id)!==o||c.type!=="file")continue;const d=c.size+","+c.filename,h=this.state$.localFileBlobUrls.child(e).child(d);if(h.fetching.peek()!==!1)continue;const f=()=>{URL.revokeObjectURL(h.url.peek()),h.delete()};if(c.subtype==="image"){h.fetching.set(!0);const p=document.createElement("img");p.addEventListener("load",f,{once:!0}),p.src=c.url}else if(c.subtype==="video"){h.fetching.set(!0);const p=document.createElement("video");p.addEventListener("loadeddata",f,{once:!0}),p.src=c.url}else if(c.subtype==="audio"||c.subtype==="voice"){h.fetching.set(!0);const p=document.createElement("audio");p.addEventListener("loadeddata",f,{once:!0}),p.src=c.url}}})}}function gn(t,e){return t==="all"||t==="own"&&e||t==="other"&&!e}class Yo{constructor({id:e,isDayMarker:n,isReadMarker:r,timestamp:i}){this.id=e,this.isDayMarker=n,this.isReadMarker=r,this.timestamp=n?i:void 0}}function Bt(t,e=!1){return(function(n,r=!1){return n.map(i=>{if(typeof i=="string")return i;switch(i.type){case"bold":return"*"+Bt(i.children)+"*";case"italic":return"_"+Bt(i.children)+"_";case"strikethrough":return"~"+Bt(i.children)+"~";case"blockquote":return Bt(i.children).split(`
|
|
2
2
|
`).map(o=>"> "+o).join(`
|
|
3
3
|
`)+`
|
|
4
4
|
`;case"autolink":case"autoLink":case"suppressed":case"emoji":return i.text;case"codeblock":case"codeBlock":return"```"+i.language+`
|
|
5
|
-
`+i.text+"```";case"codespan":case"codeSpan":return"```"+i.text+"```";case"mention":return r?`<!!mention:${i.id}|${i.text}>`:`@${i.text}`;case"customemoji":case"customEmoji":return r?`<!!customemoji:${i.text}>`:i.text;case"link":return`<${i.url}|${
|
|
6
|
-
`+
|
|
7
|
-
`}}).join("")})(t,e).trim()}class bd{constructor(e,n,r,i,o,s){this.send=n,this.attachFile=r,this.shareLocation=i,this.toggleEmojiPicker=o,this.recordVoiceMessage=s,this.isEmpty=e.isEmpty,this.atTextLimit=e.atTextLimit,this.characterCount=e.characterCount,this.showEmojiPicker=e.showEmojiPicker}}function Ve(t){this.content=t}function Wm(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i!=o){if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=Wm(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}else n+=i.nodeSize}}function Xm(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=t.child(--i),a=e.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,c=Math.min(s.text.length,a.text.length);for(;u<c&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let u=Xm(s.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}else n-=l,r-=l}}Ve.prototype={constructor:Ve,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new Ve(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Ve(n)},addToStart:function(t,e){return new Ve([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Ve(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new Ve(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=Ve.from(t)).size?new Ve(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=Ve.from(t)).size?new Ve(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Ve.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},Ve.from=function(t){if(t instanceof Ve)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Ve(e)};class j{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,i+c)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=u},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new j(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new j(r,i)}cutByIndex(e,n){return e==n?j.empty:e==0&&n==this.content.length?this:new j(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new j(i,o)}addToStart(e){return new j([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new j(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return Wm(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Xm(this,e,n,r)}findIndex(e){if(e==0)return bo(0,e);if(e==this.size)return bo(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=e)return i==e?bo(n+1,i):bo(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return j.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new j(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return j.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new j(n||e,r)}static from(e){if(!e)return j.empty;if(e instanceof j)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new j([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}j.empty=new j([],0);const Ra={index:0,offset:0};function bo(t,e){return Ra.index=t,Ra.offset=e,Ra}function us(t,e){if(t===e)return!0;if(!t||typeof t!="object"||!e||typeof e!="object")return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!us(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!us(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}class pe{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&us(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return pe.none;if(e instanceof pe)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}pe.none=[];class ds extends Error{}class W{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=qm(this.content,e+this.openStart,n);return r&&new W(r,this.openStart,this.openEnd)}removeBetween(e,n){return new W(Km(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return W.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new W(j.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new W(e,r,i)}}function Km(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(i==e||o.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(Km(o.content,e-i-1,n-i-1)))}function qm(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=qm(s.content,e-o-1,n,s);return a&&t.replaceChild(i,s.copy(a))}function Qg(t,e,n){if(n.openStart>t.depth)throw new ds("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ds("Inconsistent open depths");return Jm(t,e,n,0)}function Jm(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=Jm(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=r||e.depth!=r){let{start:s,end:a}=(function(l,u){let c=u.depth-l.openStart,d=u.node(c).copy(l.content);for(let h=c-1;h>=0;h--)d=u.node(h).copy(j.from(d));return{start:d.resolveNoCache(l.openStart+c),end:d.resolveNoCache(d.content.size-l.openEnd-c)}})(n,t);return tr(o,Qm(t,s,a,e,r))}{let s=t.parent,a=s.content;return tr(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}}return tr(o,hs(t,e,r))}function Zm(t,e){if(!e.type.compatibleContent(t.type))throw new ds("Cannot join "+e.type.name+" onto "+t.type.name)}function wl(t,e,n){let r=t.node(n);return Zm(r,e.node(n)),r}function er(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Ci(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(er(t.nodeAfter,r),o++));for(let a=o;a<s;a++)er(i.child(a),r);e&&e.depth==n&&e.textOffset&&er(e.nodeBefore,r)}function tr(t,e){return t.type.checkContent(e),t.copy(e)}function Qm(t,e,n,r,i){let o=t.depth>i&&wl(t,e,i+1),s=r.depth>i&&wl(n,r,i+1),a=[];return Ci(null,t,i,a),o&&s&&e.index(i)==n.index(i)?(Zm(o,s),er(tr(o,Qm(t,e,n,r,i+1)),a)):(o&&er(tr(o,hs(t,e,i+1)),a),Ci(e,n,i,a),s&&er(tr(s,hs(n,r,i+1)),a)),Ci(r,null,i,a),new j(a)}function hs(t,e,n){let r=[];return Ci(null,t,n,r),t.depth>n&&er(tr(wl(t,e,n+1),hs(t,e,n+1)),r),Ci(e,null,n,r),new j(r)}W.empty=new W(j.empty,0,0);class Vi{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return(e=this.resolveDepth(e))==0?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[3*n],i=n==0?0:this.path[3*n-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return pe.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive!==!1||i&&o[s].isInSet(i.marks)||(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive!==!1||i&&r[o].isInSet(i.marks)||(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new nS(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),u=o-l;if(r.push(s,a,i+l),!u||(s=s.child(a),s.isText))break;o=u-1,i+=l+1}return new Vi(n,r,o)}static resolveCached(e,n){let r=wd.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else wd.set(e,r=new eS);let i=r.elts[r.i]=Vi.resolve(e,n);return r.i=(r.i+1)%tS,i}}class eS{constructor(){this.elts=[],this.i=0}}const tS=12,wd=new WeakMap;class nS{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const rS=Object.create(null);let nr=class kl{constructor(e,n,r,i=pe.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||j.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&us(this.attrs,n||e.defaultAttrs||rS)&&pe.sameSet(this.marks,r||pe.none)}copy(e=null){return e==this.content?this:new kl(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new kl(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return W.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),l=i.node(s).content.cut(i.pos-a,o.pos-a);return new W(l,i.depth-s,o.depth-s)}replace(e,n,r){return Qg(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Vi.resolveCached(this,e)}resolveNoCache(e){return Vi.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),eE(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=j.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return!!s&&s.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=pe.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!pe.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=j.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};nr.prototype.text=void 0;class ps extends nr{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):eE(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ps(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ps(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function eE(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class sr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new iS(e,n);if(r.next==null)return sr.empty;let i=tE(r);r.next&&r.err("Unexpected trailing text");let o=(function(s){let a=Object.create(null);return l(Ld(s,0));function l(u){let c=[];u.forEach(h=>{s[h].forEach(({term:p,to:f})=>{if(!p)return;let m;for(let E=0;E<c.length;E++)c[E][0]==p&&(m=c[E][1]);Ld(s,f).forEach(E=>{m||c.push([p,m=[]]),m.indexOf(E)==-1&&m.push(E)})})});let d=a[u.join(",")]=new sr(u.indexOf(s.length-1)>-1);for(let h=0;h<c.length;h++){let p=c[h][1].sort(nE);d.next.push({type:c[h][0],next:a[p.join(",")]||l(p)})}return d}})((function(s){let a=[[]];return c(d(s,0),l()),a;function l(){return a.push([])-1}function u(h,p,f){let m={term:f,to:p};return a[h].push(m),m}function c(h,p){h.forEach(f=>f.to=p)}function d(h,p){if(h.type=="choice")return h.exprs.reduce((f,m)=>f.concat(d(m,p)),[]);if(h.type!="seq"){if(h.type=="star"){let f=l();return u(p,f),c(d(h.expr,f),f),[u(f)]}if(h.type=="plus"){let f=l();return c(d(h.expr,p),f),c(d(h.expr,f),f),[u(f)]}if(h.type=="opt")return[u(p)].concat(d(h.expr,p));if(h.type=="range"){let f=p;for(let m=0;m<h.min;m++){let E=l();c(d(h.expr,f),E),f=E}if(h.max==-1)c(d(h.expr,f),f);else for(let m=h.min;m<h.max;m++){let E=l();u(f,E),c(d(h.expr,f),E),f=E}return[u(f)]}if(h.type=="name")return[u(p,void 0,h.value)];throw new Error("Unknown expr type")}for(let f=0;;f++){let m=d(h.exprs[f],p);if(f==h.exprs.length-1)return m;c(m,p=l())}}})(i));return(function(s,a){for(let l=0,u=[s];l<u.length;l++){let c=u[l],d=!c.validEnd,h=[];for(let p=0;p<c.next.length;p++){let{type:f,next:m}=c.next[p];h.push(f.name),!d||f.isText||f.hasRequiredAttrs()||(d=!1),u.indexOf(m)==-1&&u.push(m)}d&&a.err("Only non-generatable nodes ("+h.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}})(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!n.isText&&!n.hasRequiredAttrs())return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];return(function o(s,a){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return j.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!c.isText&&!c.hasRequiredAttrs()&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(c));if(h)return h}}return null})(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];a.isLeaf||a.hasRequiredAttrs()||a.name in n||i.type&&!l.validEnd||(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return(function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)})(this),e.map((n,r)=>{let i=r+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)i+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return i}).join(`
|
|
8
|
-
`)}}sr.empty=new sr(!0);class iS{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function tE(t){let e=[];do e.push(oS(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function oS(t){let e=[];do e.push(sS(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function sS(t){let e=(function(n){if(n.eat("(")){let r=tE(n);return n.eat(")")||n.err("Missing closing paren"),r}if(!/\W/.test(n.next)){let r=(function(i,o){let s=i.nodeTypes,a=s[o];if(a)return[a];let l=[];for(let u in s){let c=s[u];c.isInGroup(o)&&l.push(c)}return l.length==0&&i.err("No node type or group '"+o+"' found"),l})(n,n.next).map(i=>(n.inline==null?n.inline=i.isInline:n.inline!=i.isInline&&n.err("Mixing inline and block content"),{type:"name",value:i}));return n.pos++,r.length==1?r[0]:{type:"choice",exprs:r}}n.err("Unexpected token '"+n.next+"'")})(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=aS(t,e)}return e}function kd(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function aS(t,e){let n=kd(t),r=n;return t.eat(",")&&(r=t.next!="}"?kd(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function nE(t,e){return e-t}function Ld(t,e){let n=[];return(function r(i){let o=t[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];a||n.indexOf(l)!=-1||r(l)}})(e),n.sort(nE)}function rE(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function iE(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let o=t[r];if(!o.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=o.default}n[r]=i}return n}function oE(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}function sE(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new lS(t,r,e[r]);return n}let Md=class aE{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=sE(e,r.attrs),this.defaultAttrs=rE(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==sr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:iE(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new nr(this,this.computeAttrs(e),j.from(n),pe.setFrom(r))}createChecked(e=null,n,r){return n=j.from(n),this.checkContent(n),new nr(this,this.computeAttrs(e),n,pe.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),(n=j.from(n)).size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(j.empty,!0);return o?new nr(this,e,n.append(o),pe.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){oE(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:pe.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,s)=>r[o]=new aE(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class lS{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?(function(i,o,s){let a=s.split("|");return l=>{let u=l===null?"null":typeof l;if(a.indexOf(u)<0)throw new RangeError(`Expected value of type ${a} for attribute ${o} on type ${i}, got ${u}`)}})(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ys{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=sE(e,i.attrs),this.excluded=null;let o=rE(this.attrs);this.instance=o?new pe(this,o):null}create(e=null){return!e&&this.instance?this.instance:new pe(this,iE(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new Ys(o,i++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){oE(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}function Pd(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let a in t.marks){let l=t.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class zi{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if((function(o){return o.tag!=null})(i))this.tags.push(i);else if((function(o){return o.style!=null})(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new Hd(this,n,!1);return r.addAll(e,pe.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Hd(this,n,!0);return r.addAll(e,pe.none,n.from,n.to),W.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(uS(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Ud(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Ud(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new zi(e,zi.schemaRules(e)))}}const lE={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},cS={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},xd={ol:!0,ul:!0};function Fd(t,e,n){return e!=null?(e?1:0)|(e==="full"?2:0):t&&t.whitespace=="pre"?3:-5&n}class Ia{constructor(e,n,r,i,o,s){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=pe.none,this.match=o||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(j.from(e));if(!n){let r,i=this.type.contentMatch;return(r=i.findWrapping(e.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(n)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let r,i=this.content[this.content.length-1];if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let n=j.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(j.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!lE.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Hd{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i,o=n.topNode,s=Fd(null,n.preserveWhitespace,0)|(r?4:0);i=o?new Ia(o.type,o.attrs,pe.none,!0,n.topMatch||o.type.contentMatch,s):new Ia(r?null:e.schema.topNodeType,null,pe.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,o=2&i.options?"full":this.localPreserveWS||(1&i.options)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
|
|
9
|
-
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(s.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s,a=e.nodeName.toLowerCase();
|
|
10
|
-
`),n)}ignoreFallback(e,n){e.nodeName!="BR"||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(n=l.clearMark?n.filter(u=>!l.clearMark(u)):n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming!==!1)break;a=l}}return n}addElementByRule(e,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,n,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,n);this.findAtPoint(e,o)}findPlace(e,n,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(e);if(u&&(!i||i.length>u.length+a)&&(i=u,o=l,!u.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=pe.none;for(let a of i.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):Bd(a.type,e.type))&&(s=a.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,n,r,i){let o=this.findPlace(e.create(n),r,!1);return o&&(o=this.enterInner(e,n,r,!0,i)),o}enterInner(e,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=Fd(e,o,s.options);4&s.options&&s.content.length==0&&(a|=4);let l=pe.none;return r=r.filter(u=>!(s.type?s.type.allowsMarkType(u.type):Bd(u.type,e))||(l=u.addToSet(l),!1)),this.nodes.push(new Ia(e,n,l,i,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!(!this.isOpen&&!this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=1)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}{let c=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function uS(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Ud(t){let e={};for(let n in t)e[n]=t[n];return e}function Bd(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:c}=a.edge(l);if(u==e||o.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class ai{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=ya(n).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let u=s.marks[l];if(this.marks[u.type.name]){if(!u.eq(o[a][0])||u.type.spec.spanning===!1)break;a++,l++}else l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,n);c&&(o.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=Go(ya(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Go(ya(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return Go(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ai(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=jd(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return jd(e.marks)}}function jd(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ya(t){return t.document||window.document}const $d=new WeakMap;function dS(t){let e=$d.get(t);return e===void 0&&$d.set(t,e=(function(n){let r=null;function i(o){if(o&&typeof o=="object")if(Array.isArray(o))if(typeof o[0]=="string")r||(r=[]),r.push(o);else for(let s=0;s<o.length;s++)i(o[s]);else for(let s in o)i(o[s])}return i(n),r})(t)),e}function Go(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i,o=e[0];if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=dS(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s,a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let l=n?t.createElementNS(n,o):t.createElement(o),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:p,contentDOM:f}=Go(t,h,n,r);if(l.appendChild(p),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:l,contentDOM:s}}const cE=Math.pow(2,16);function hS(t,e){return t+e*cE}function Vd(t){return 65535&t}class Ll{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class Ot{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Ot.empty)return Ot.empty}recover(e){let n=0,r=Vd(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+n+(function(i){return(i-(65535&i))/cE})(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(e<=d){let h=l+i+((u?e==l?-1:e==d?1:n:n)<0?0:c);if(r)return h;let p=e==(n<0?l:d)?null:hS(a/3,e-l),f=e==l?2:e==d?1:4;return(n<0?e!=l:e!=d)&&(f|=8),new Ll(h,f,p)}i+=c-u}return r?e+i:new Ll(e+i,0,null)}touches(e,n){let r=0,i=Vd(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+o];if(e<=l+u&&a==3*i)return!0;r+=this.ranges[a+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),u=this.ranges[i+n],c=this.ranges[i+r];e(a,a+u,l,l+c),o+=c-u}}invert(){return new Ot(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Ot.empty:new Ot(e<0?[0,-e,0]:[0,0,e])}}Ot.empty=new Ot([]);class Yi{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Yi(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new Yi;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o].mapResult(e,n);if(s.recover!=null){let a=this.getMirror(o);if(a!=null&&a>o&&a<this.to){o=a,e=this._maps[a].recover(s.recover);continue}}i|=s.delInfo,e=s.pos}return r?e:new Ll(e,i,null)}}const Ca=Object.create(null);class et{getMap(){return Ot.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ca[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Ca)throw new RangeError("Duplicate use of step JSON ID "+e);return Ca[e]=n,n.prototype.jsonID=e,n}}class we{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new we(e,null)}static fail(e){return new we(null,e)}static fromReplace(e,n,r,i){try{return we.ok(e.replace(n,r,i))}catch(o){if(o instanceof ds)return we.fail(o.message);throw o}}}function Hc(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(Hc(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return j.fromArray(r)}class yn extends et{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new W(Hc(n.content,(s,a)=>s.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,i),n.openStart,n.openEnd);return we.fromReplace(e,this.from,this.to,o)}invert(){return new Vt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new yn(n.pos,r.pos,this.mark)}merge(e){return e instanceof yn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new yn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new yn(n.from,n.to,e.markFromJSON(n.mark))}}et.jsonID("addMark",yn);class Vt extends et{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new W(Hc(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return we.fromReplace(e,this.from,this.to,r)}invert(){return new yn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Vt(n.pos,r.pos,this.mark)}merge(e){return e instanceof Vt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Vt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Vt(n.from,n.to,e.markFromJSON(n.mark))}}et.jsonID("removeMark",Vt);class Cn extends et{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return we.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return we.fromReplace(e,this.pos,this.pos+1,new W(j.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Cn(this.pos,n.marks[i]);return new Cn(this.pos,this.mark)}}return new ar(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Cn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Cn(n.pos,e.markFromJSON(n.mark))}}et.jsonID("addNodeMark",Cn);class ar extends et{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return we.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return we.fromReplace(e,this.pos,this.pos+1,new W(j.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return n&&this.mark.isInSet(n.marks)?new Cn(this.pos,this.mark):this}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ar(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ar(n.pos,e.markFromJSON(n.mark))}}et.jsonID("removeNodeMark",ar);class Ye extends et{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Ml(e,this.from,this.to)?we.fail("Structure replace would overwrite content"):we.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Ot([this.from,this.to-this.from,this.slice.size])}invert(e){return new Ye(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Ye(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Ye)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let n=this.slice.size+e.slice.size==0?W.empty:new W(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Ye(e.from,this.to,n,this.structure)}}{let n=this.slice.size+e.slice.size==0?W.empty:new W(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Ye(this.from,this.to+(e.to-e.from),n,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Ye(n.from,n.to,W.fromJSON(e,n.slice),!!n.structure)}}et.jsonID("replace",Ye);class vt extends et{constructor(e,n,r,i,o,s,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(Ml(e,this.from,this.gapFrom)||Ml(e,this.gapTo,this.to)))return we.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return we.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?we.fromReplace(e,this.from,this.to,r):we.fail("Content does not fit in gap")}getMap(){return new Ot([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new vt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new vt(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new vt(n.from,n.to,n.gapFrom,n.gapTo,W.fromJSON(e,n.slice),n.insert,!!n.structure)}}function Ml(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function Na(t,e,n,r=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<o.childCount;l++){let u=o.child(l),c=a+u.nodeSize,d=r.matchType(u.type);if(d){r=d;for(let h=0;h<u.marks.length;h++)n.allowsMarkType(u.marks[h].type)||t.step(new Vt(a,c,u.marks[h]));if(i&&u.isText&&n.whitespace!="pre"){let h,p,f=/\r?\n|\r/g;for(;h=f.exec(u.text);)p||(p=new W(j.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new Ye(a+h.index,a+h.index+h[0].length,p))}}else s.push(new Ye(a,c,W.empty));a=c}if(!r.validEnd){let l=r.fillBefore(j.empty,!0);t.replace(a,a,new W(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function pS(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Uc(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth,r=0,i=0;;--n){let o=t.$from.node(n),s=t.$from.index(n)+r,a=t.$to.indexAfter(n)-i;if(n<t.depth&&o.canReplace(s,a,e))return n;if(n==0||o.type.spec.isolating||!pS(o,s,a))break;s&&(r=1),a<o.childCount&&(i=1)}return null}function zd(t,e,n,r){e.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Yd(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+o);t.replaceWith(s,s+1,e.type.schema.text(`
|
|
11
|
-
`))}})}function Wo(t,e,n=1,r){let i=t.resolve(e),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,c=n-2;u>o;u--,c--){let d=i.node(u),h=i.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(h,d.childCount),f=r&&r[c+1];f&&(p=p.replaceChild(0,f.type.create(f.attrs)));let m=r&&r[c]||d;if(!d.canReplace(h+1,d.childCount)||!m.type.validContent(p))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function Gd(t,e){let n=t.resolve(e),r=n.index();return(function(i,o){return!(!i||!o||i.isLeaf||!(function(s,a){a.content.size||s.type.compatibleContent(a.type);let l=s.contentMatchAt(s.childCount),{linebreakReplacement:u}=s.type.schema;for(let c=0;c<a.childCount;c++){let d=a.child(c),h=d.type==u?s.type.schema.nodes.text:d.type;if(l=l.matchType(h),!l||!s.type.allowsMarks(d.marks))return!1}return l.validEnd})(i,o))})(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Bc(t,e,n=e,r=W.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),o=t.resolve(n);return uE(i,o,r)?new Ye(e,n,r):new fS(i,o,r).fit()}function uE(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}et.jsonID("replaceAround",vt);class fS{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=j.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=j.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new W(o,s,a);return e>-1?new vt(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Ye(r.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=ba(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let l,{type:u,match:c}=this.frontier[a],d=null;if(n==1&&(s?c.matchType(s.type)||(d=c.fillBefore(j.from(s),!1)):o&&u.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:d};if(n==2&&s&&(l=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:l};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=ba(e,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new W(e,n+1,Math.max(r,i.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=ba(e,n);if(i.childCount<=1&&n>0){let o=e.size-n<=n+i.size;this.unplaced=new W(gi(e,n-1,1),n-1,o?n-1:r)}else this.unplaced=new W(gi(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,u=0,c=[],{match:d,type:h}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)c.push(i.child(m));d=d.matchFragment(i)}let p=a.size+e-(s.content.size-s.openEnd);for(;u<a.childCount;){let m=a.child(u),E=d.matchType(m.type);if(!E)break;u++,(u>1||l==0||m.content.size)&&(d=E,c.push(dE(m.mark(h.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?p:-1)))}let f=u==a.childCount;f||(p=-1),this.placed=Si(this.placed,n,j.from(c)),this.frontier[n].match=d,f&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,E=a;m<p;m++){let _=E.lastChild;this.frontier.push({type:_.type,match:_.contentMatchAt(_.childCount)}),E=_.content}this.unplaced=f?e==0?W.empty:new W(gi(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new W(gi(s.content,e,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,n=this.frontier[this.depth];if(!n.type.isTextblock||!wa(this.$to,this.$to.depth,n.type,n.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=wa(e,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=wa(e,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:o?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Si(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Si(this.placed,this.depth,j.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(j.empty,!0);e.childCount&&(this.placed=Si(this.placed,this.frontier.length,e))}}function gi(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(gi(t.firstChild.content,e-1,n)))}function Si(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Si(t.lastChild.content,e-1,n)))}function ba(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function dE(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,dE(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(j.empty,!0)))),t.copy(r)}function wa(t,e,n,r,i){let o=t.node(e),s=i?t.indexAfter(e):t.index(e);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!(function(l,u,c){for(let d=c;d<u.childCount;d++)if(!l.allowsMarks(u.child(d).marks))return!0;return!1})(n,o.content,s)?a:null}function mS(t){return t.spec.defining||t.spec.definingForContent}function hE(t,e,n,r,i){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(hE(o.content,e+1,n,r,o)))}if(e>r){let o=i.contentMatchAt(0),s=o.fillBefore(t).append(t);t=s.append(o.matchFragment(s).fillBefore(j.empty,!0))}return t}function Wd(t,e){let n=[];for(let r=Math.min(t.depth,e.depth);r>=0;r--){let i=t.start(r);if(i<t.pos-(t.depth-r)||e.end(r)>e.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(i==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==i-1)&&n.push(r)}return n}class $r extends et{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return we.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return we.fromReplace(e,this.pos,this.pos+1,new W(j.from(i),0,n.isLeaf?0:1))}getMap(){return Ot.empty}invert(e){return new $r(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new $r(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new $r(n.pos,n.attr,n.value)}}et.jsonID("attr",$r);class Gi extends et{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return we.ok(r)}getMap(){return Ot.empty}invert(e){return new Gi(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Gi(n.attr,n.value)}}et.jsonID("docAttr",Gi);let Oi=class extends Error{};Oi=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},(Oi.prototype=Object.create(Error.prototype)).constructor=Oi,Oi.prototype.name="TransformError";class ES{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Yi}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Oi(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=W.empty){let i=Bc(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new W(j.from(r),0,0))}delete(e,n){return this.replace(e,n,W.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return(function(i,o,s,a){if(!a.size)return i.deleteRange(o,s);let l=i.doc.resolve(o),u=i.doc.resolve(s);if(uE(l,u,a))return i.step(new Ye(o,s,a));let c=Wd(l,u);c[c.length-1]==0&&c.pop();let d=-(l.depth+1);c.unshift(d);for(let E=l.depth,_=l.pos-1;E>0;E--,_--){let A=l.node(E).type.spec;if(A.defining||A.definingAsContext||A.isolating)break;c.indexOf(E)>-1?d=E:l.before(E)==_&&c.splice(1,0,-E)}let h=c.indexOf(d),p=[],f=a.openStart;for(let E=a.content,_=0;;_++){let A=E.firstChild;if(p.push(A),_==a.openStart)break;E=A.content}for(let E=f-1;E>=0;E--){let _=p[E],A=mS(_.type);if(A&&!_.sameMarkup(l.node(Math.abs(d)-1)))f=E;else if(A||!_.type.isTextblock)break}for(let E=a.openStart;E>=0;E--){let _=(E+f+1)%(a.openStart+1),A=p[_];if(A)for(let O=0;O<c.length;O++){let S=c[(O+h)%c.length],v=!0;S<0&&(v=!1,S=-S);let T=l.node(S-1),R=l.index(S-1);if(T.canReplaceWith(R,R,A.type,A.marks))return i.replace(l.before(S),v?u.after(S):s,new W(hE(a.content,0,a.openStart,_),_,a.openEnd))}}let m=i.steps.length;for(let E=c.length-1;E>=0&&(i.replace(o,s,a),!(i.steps.length>m));E--){let _=c[E];_<0||(o=l.before(_),s=u.after(_))}})(this,e,n,r),this}replaceRangeWith(e,n,r){return(function(i,o,s,a){if(!a.isInline&&o==s&&i.doc.resolve(o).parent.content.size){let l=(function(u,c,d){let h=u.resolve(c);if(h.parent.canReplaceWith(h.index(),h.index(),d))return c;if(h.parentOffset==0)for(let p=h.depth-1;p>=0;p--){let f=h.index(p);if(h.node(p).canReplaceWith(f,f,d))return h.before(p+1);if(f>0)return null}if(h.parentOffset==h.parent.content.size)for(let p=h.depth-1;p>=0;p--){let f=h.indexAfter(p);if(h.node(p).canReplaceWith(f,f,d))return h.after(p+1);if(f<h.node(p).childCount)return null}return null})(i.doc,o,a.type);l!=null&&(o=s=l)}i.replaceRange(o,s,new W(j.from(a),0,0))})(this,e,n,r),this}deleteRange(e,n){return(function(r,i,o){let s=r.doc.resolve(i),a=r.doc.resolve(o),l=Wd(s,a);for(let u=0;u<l.length;u++){let c=l[u],d=u==l.length-1;if(d&&c==0||s.node(c).type.contentMatch.validEnd)return r.delete(s.start(c),a.end(c));if(c>0&&(d||s.node(c-1).canReplace(s.index(c-1),a.indexAfter(c-1))))return r.delete(s.before(c),a.after(c))}for(let u=1;u<=s.depth&&u<=a.depth;u++)if(i-s.start(u)==s.depth-u&&o>s.end(u)&&a.end(u)-o!=a.depth-u&&s.start(u-1)==a.start(u-1)&&s.node(u-1).canReplace(s.index(u-1),a.index(u-1)))return r.delete(s.before(u),o);r.delete(i,o)})(this,e,n),this}lift(e,n){return(function(r,i,o){let{$from:s,$to:a,depth:l}=i,u=s.before(l+1),c=a.after(l+1),d=u,h=c,p=j.empty,f=0;for(let _=l,A=!1;_>o;_--)A||s.index(_)>0?(A=!0,p=j.from(s.node(_).copy(p)),f++):d--;let m=j.empty,E=0;for(let _=l,A=!1;_>o;_--)A||a.after(_+1)<a.end(_)?(A=!0,m=j.from(a.node(_).copy(m)),E++):h++;r.step(new vt(d,h,u,c,new W(p.append(m),f,E),p.size-f,!0))})(this,e,n),this}join(e,n=1){return(function(r,i,o){let s=null,{linebreakReplacement:a}=r.doc.type.schema,l=r.doc.resolve(i-o),u=l.node().type;if(a&&u.inlineContent){let p=u.whitespace=="pre",f=!!u.contentMatch.matchType(a);p&&!f?s=!1:!p&&f&&(s=!0)}let c=r.steps.length;if(s===!1){let p=r.doc.resolve(i+o);Yd(r,p.node(),p.before(),c)}u.inlineContent&&Na(r,i+o-1,u,l.node().contentMatchAt(l.index()),s==null);let d=r.mapping.slice(c),h=d.map(i-o);if(r.step(new Ye(h,d.map(i+o,-1),W.empty,!0)),s===!0){let p=r.doc.resolve(h);zd(r,p.node(),p.before(),r.steps.length)}})(this,e,n),this}wrap(e,n){return(function(r,i,o){let s=j.empty;for(let u=o.length-1;u>=0;u--){if(s.size){let c=o[u].type.contentMatch.matchFragment(s);if(!c||!c.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}s=j.from(o[u].type.create(o[u].attrs,s))}let a=i.start,l=i.end;r.step(new vt(a,l,a,l,new W(s,0,0),o.length,!0))})(this,e,n),this}setBlockType(e,n=e,r,i=null){return(function(o,s,a,l,u){if(!l.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let c=o.steps.length;o.doc.nodesBetween(s,a,(d,h)=>{let p=typeof u=="function"?u(d):u;if(d.isTextblock&&!d.hasMarkup(l,p)&&(function(f,m,E){let _=f.resolve(m),A=_.index();return _.parent.canReplaceWith(A,A+1,E)})(o.doc,o.mapping.slice(c).map(h),l)){let f=null;if(l.schema.linebreakReplacement){let A=l.whitespace=="pre",O=!!l.contentMatch.matchType(l.schema.linebreakReplacement);A&&!O?f=!1:!A&&O&&(f=!0)}f===!1&&Yd(o,d,h,c),Na(o,o.mapping.slice(c).map(h,1),l,void 0,f===null);let m=o.mapping.slice(c),E=m.map(h,1),_=m.map(h+d.nodeSize,1);return o.step(new vt(E,_,E+1,_-1,new W(j.from(l.create(p,null,d.marks)),0,0),1,!0)),f===!0&&zd(o,d,h,c),!1}})})(this,e,n,r,i),this}setNodeMarkup(e,n,r=null,i){return(function(o,s,a,l,u){let c=o.doc.nodeAt(s);if(!c)throw new RangeError("No node at given position");a||(a=c.type);let d=a.create(l,null,u||c.marks);if(c.isLeaf)return o.replaceWith(s,s+c.nodeSize,d);if(!a.validContent(c.content))throw new RangeError("Invalid content for node type "+a.name);o.step(new vt(s,s+c.nodeSize,s+1,s+c.nodeSize-1,new W(j.from(d),0,0),1,!0))})(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new $r(e,n,r)),this}setDocAttribute(e,n){return this.step(new Gi(e,n)),this}addNodeMark(e,n){return this.step(new Cn(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof pe)n.isInSet(r.marks)&&this.step(new ar(e,n));else{let i,o=r.marks,s=[];for(;i=n.isInSet(o);)s.push(new ar(e,i)),o=i.removeFromSet(o);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(e,n=1,r){return(function(i,o,s=1,a){let l=i.doc.resolve(o),u=j.empty,c=j.empty;for(let d=l.depth,h=l.depth-s,p=s-1;d>h;d--,p--){u=j.from(l.node(d).copy(u));let f=a&&a[p];c=j.from(f?f.type.create(f.attrs,c):l.node(d).copy(c))}i.step(new Ye(o,o,new W(u.append(c),s,s),!0))})(this,e,n,r),this}addMark(e,n,r){return(function(i,o,s,a){let l,u,c=[],d=[];i.doc.nodesBetween(o,s,(h,p,f)=>{if(!h.isInline)return;let m=h.marks;if(!a.isInSet(m)&&f.type.allowsMarkType(a.type)){let E=Math.max(p,o),_=Math.min(p+h.nodeSize,s),A=a.addToSet(m);for(let O=0;O<m.length;O++)m[O].isInSet(A)||(l&&l.to==E&&l.mark.eq(m[O])?l.to=_:c.push(l=new Vt(E,_,m[O])));u&&u.to==E?u.to=_:d.push(u=new yn(E,_,a))}}),c.forEach(h=>i.step(h)),d.forEach(h=>i.step(h))})(this,e,n,r),this}removeMark(e,n,r){return(function(i,o,s,a){let l=[],u=0;i.doc.nodesBetween(o,s,(c,d)=>{if(!c.isInline)return;u++;let h=null;if(a instanceof Ys){let p,f=c.marks;for(;p=a.isInSet(f);)(h||(h=[])).push(p),f=p.removeFromSet(f)}else a?a.isInSet(c.marks)&&(h=[a]):h=c.marks;if(h&&h.length){let p=Math.min(d+c.nodeSize,s);for(let f=0;f<h.length;f++){let m,E=h[f];for(let _=0;_<l.length;_++){let A=l[_];A.step==u-1&&E.eq(l[_].style)&&(m=A)}m?(m.to=p,m.step=u):l.push({style:E,from:Math.max(d,o),to:p,step:u})}}}),l.forEach(c=>i.step(new Vt(c.from,c.to,c.style)))})(this,e,n,r),this}clearIncompatible(e,n,r){return Na(this,e,n,r),this}}const ka=Object.create(null);class he{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new _S(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=W.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:u}=s[a],c=e.mapping.slice(o);e.replaceRange(c.map(l.pos),c.map(u.pos),a?W.empty:n),a==0&&qd(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],l=e.mapping.slice(r),u=l.map(s.pos),c=l.map(a.pos);o?e.deleteRange(u,c):(e.replaceRangeWith(u,c,n),qd(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new ce(e):br(e.node(0),e.parent,e.pos,e.index(),n,r);if(i)return i;for(let o=e.depth-1;o>=0;o--){let s=n<0?br(e.node(0),e.node(o),e.before(o+1),e.index(o),n,r):br(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Rt(e.node(0))}static atStart(e){return br(e,e,0,0,1)||new Rt(e)}static atEnd(e){return br(e,e,e.content.size,e.childCount,-1)||new Rt(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ka[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in ka)throw new RangeError("Duplicate use of selection JSON ID "+e);return ka[e]=n,n.prototype.jsonID=e,n}getBookmark(){return ce.between(this.$anchor,this.$head).getBookmark()}}he.prototype.visible=!0;class _S{constructor(e,n){this.$from=e,this.$to=n}}let Xd=!1;function Kd(t){Xd||t.parent.inlineContent||(Xd=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class ce extends he{constructor(e,n=e){Kd(e),Kd(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return he.near(r);let i=e.resolve(n.map(this.anchor));return new ce(i.parent.inlineContent?i:r,r)}replace(e,n=W.empty){if(super.replace(e,n),n==W.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof ce&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Gs(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ce(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let i=e.resolve(n);return new this(i,r==n?i:e.resolve(r))}static between(e,n,r){let i=e.pos-n.pos;if(r&&!i||(r=i>=0?1:-1),!n.parent.inlineContent){let o=he.findFrom(n,r,!0)||he.findFrom(n,-r,!0);if(!o)return he.near(n,r);n=o.$head}return e.parent.inlineContent||(i==0||(e=(he.findFrom(e,-r,!0)||he.findFrom(e,r,!0)).$anchor).pos<n.pos!=i<0)&&(e=n),new ce(e,n)}}he.jsonID("text",ce);class Gs{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Gs(e.map(this.anchor),e.map(this.head))}resolve(e){return ce.between(e.resolve(this.anchor),e.resolve(this.head))}}class Z extends he{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=e.resolve(i);return r?he.near(o):new Z(o)}content(){return new W(j.from(this.node),0,0)}eq(e){return e instanceof Z&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new jc(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Z(e.resolve(n.anchor))}static create(e,n){return new Z(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Z.prototype.visible=!1,he.jsonID("node",Z);class jc{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Gs(r,r):new jc(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&Z.isSelectable(r)?new Z(n):he.near(n)}}class Rt extends he{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=W.empty){if(n==W.empty){e.delete(0,e.doc.content.size);let r=he.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Rt(e)}map(e){return new Rt(e)}eq(e){return e instanceof Rt}getBookmark(){return AS}}he.jsonID("all",Rt);const AS={map(){return this},resolve:t=>new Rt(t)};function br(t,e,n,r,i,o=!1){if(e.inlineContent)return ce.create(t,n);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let a=e.child(s);if(a.isAtom){if(!o&&Z.isSelectable(a))return Z.create(t,n-(i<0?a.nodeSize:0))}else{let l=br(t,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function qd(t,e,n){let r=t.steps.length-1;if(r<e)return;let i,o=t.steps[r];(o instanceof Ye||o instanceof vt)&&(t.mapping.maps[r].forEach((s,a,l,u)=>{i==null&&(i=u)}),t.setSelection(he.near(t.doc.resolve(i),n)))}class gS extends ES{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return pe.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,n){super.addStep(e,n),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||pe.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let i=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r==null?n:r,!e)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(e,o)),this.selection.empty||this.setSelection(he.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function Jd(t,e){return e&&t?t.bind(e):t}class vi{constructor(e,n,r){this.name=e,this.init=Jd(n.init,r),this.apply=Jd(n.apply,r)}}const SS=[new vi("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new vi("selection",{init:(t,e)=>t.selection||he.atStart(e.doc),apply:t=>t.selection}),new vi("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new vi("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class La{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=SS.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new vi(r.key,r.spec.state,r))})}}class Fr{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=i?i[s].n:0,u=i?i[s].state:this,c=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,u,r);if(c&&r.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",e),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<s?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),o=!0}i&&(i[s]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Fr(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new gS(this)}static create(e){let n=new La(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Fr(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(e,r);return r}reconfigure(e){let n=new La(this.schema,e.plugins),r=n.fields,i=new Fr(n);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(e,i)}return i}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],o=i.spec.state;o&&o.toJSON&&(n[r]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new La(e.schema,e.plugins),o=new Fr(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=nr.fromJSON(e.schema,n.doc);else if(s.name=="selection")o.selection=he.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],u=l.spec.state;if(l.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a))return void(o[s.name]=u.fromJSON.call(l,e,n[a],o))}o[s.name]=s.init(e,o)}}),o}}function pE(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=pE(i,e,{})),n[r]=i}return n}class Ws{constructor(e){this.spec=e,this.props={},e.props&&pE(e.props,this,this.props),this.key=e.key?e.key.key:fE("plugin")}getState(e){return e[this.key]}}const Ma=Object.create(null);function fE(t){return t in Ma?t+"$"+ ++Ma[t]:(Ma[t]=0,t+"$")}class Xs{constructor(e="key"){this.key=fE(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Ge=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},ei=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Pl=null;const an=function(t,e,n){let r=Pl||(Pl=document.createRange());return r.setEnd(t,n==null?t.nodeValue.length:n),r.setStart(t,e||0),r},lr=function(t,e,n,r){return n&&(Zd(t,e,n,r,-1)||Zd(t,e,n,r,1))},OS=/^(img|br|input|textarea|hr)$/i;function Zd(t,e,n,r,i){for(var o;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Ct(t))){let s=t.parentNode;if(!s||s.nodeType!=1||Wi(t)||OS.test(t.nodeName)||t.contentEditable=="false")return!1;e=Ge(t)+(i<0?0:1),t=s}else{if(t.nodeType!=1)return!1;{let s=t.childNodes[e+(i<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false"){if(!(!((o=s.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection))return!1;e+=i}else t=s,e=i<0?Ct(t):0}}}}function Ct(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Wi(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Ks=function(t){return t.focusNode&&lr(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Xn(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const qt=typeof navigator!="undefined"?navigator:null,Qd=typeof document!="undefined"?document:null,Un=qt&&qt.userAgent||"",xl=/Edge\/(\d+)/.exec(Un),mE=/MSIE \d/.exec(Un),Fl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Un),Et=!!(mE||Fl||xl),Ln=mE?document.documentMode:Fl?+Fl[1]:xl?+xl[1]:0,wt=!Et&&/gecko\/(\d+)/i.test(Un);wt&&(/Firefox\/(\d+)/.exec(Un)||[0,0])[1];const Hl=!Et&&/Chrome\/(\d+)/.exec(Un),He=!!Hl,EE=Hl?+Hl[1]:0,We=!Et&&!!qt&&/Apple Computer/.test(qt.vendor),ti=We&&(/Mobile\/\w+/.test(Un)||!!qt&&qt.maxTouchPoints>2),yt=ti||!!qt&&/Mac/.test(qt.platform),_E=!!qt&&/Win/.test(qt.platform),un=/Android \d/.test(Un),co=!!Qd&&"webkitFontSmoothing"in Qd.documentElement.style,vS=co?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function DS(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function on(t,e){return typeof t=="number"?t:t[e]}function TS(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function eh(t,e,n){let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=ei(s);continue}let a=s,l=a==o.body,u=l?DS(o):TS(a),c=0,d=0;if(e.top<u.top+on(r,"top")?d=-(u.top-e.top+on(i,"top")):e.bottom>u.bottom-on(r,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+on(i,"top")-u.top:e.bottom-u.bottom+on(i,"bottom")),e.left<u.left+on(r,"left")?c=-(u.left-e.left+on(i,"left")):e.right>u.right-on(r,"right")&&(c=e.right-u.right+on(i,"right")),c||d)if(l)o.defaultView.scrollBy(c,d);else{let p=a.scrollLeft,f=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let m=a.scrollLeft-p,E=a.scrollTop-f;e={left:e.left-m,top:e.top-E,right:e.right-m,bottom:e.bottom-E}}let h=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(h))break;s=h=="absolute"?s.offsetParent:ei(s)}}function th(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=ei(r));return e}function nh(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:o}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let yr=null;function AE(t,e){let n,r,i,o,s=2e8,a=0,l=e.top,u=e.top;for(let c=t.firstChild,d=0;c;c=c.nextSibling,d++){let h;if(c.nodeType==1)h=c.getClientRects();else{if(c.nodeType!=3)continue;h=an(c).getClientRects()}for(let p=0;p<h.length;p++){let f=h[p];if(f.top<=l&&f.bottom>=u){l=Math.max(f.bottom,l),u=Math.min(f.top,u);let m=f.left>e.left?f.left-e.left:f.right<e.left?e.left-f.right:0;if(m<s){n=c,s=m,r=m&&n.nodeType==3?{left:f.right<e.left?f.right:f.left,top:e.top}:e,c.nodeType==1&&m&&(a=d+(e.left>=(f.left+f.right)/2?1:0));continue}}else f.top>e.top&&!i&&f.left<=e.left&&f.right>=e.left&&(i=c,o={left:Math.max(f.left,Math.min(f.right,e.left)),top:f.top});!n&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(a=d+1)}}return!n&&i&&(n=i,r=o,s=0),n&&n.nodeType==3?(function(c,d){let h,p=c.nodeValue.length,f=document.createRange();for(let m=0;m<p;m++){f.setEnd(c,m+1),f.setStart(c,m);let E=Sn(f,1);if(E.top!=E.bottom&&$c(d,E)){h={node:c,offset:m+(d.left>=(E.left+E.right)/2?1:0)};break}}return f.detach(),h||{node:c,offset:0}})(n,r):!n||s&&n.nodeType==1?{node:t,offset:a}:AE(n,r)}function $c(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function gE(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let s=t.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if($c(e,u))return gE(s,e,u)}}if((o=(o+1)%r)==i)break}return t}function RS(t,e){let n,r=t.dom.ownerDocument,i=0,o=(function(u,c,d){if(u.caretPositionFromPoint)try{let h=u.caretPositionFromPoint(c,d);if(h)return{node:h.offsetNode,offset:Math.min(Ct(h.offsetNode),h.offset)}}catch(h){}if(u.caretRangeFromPoint){let h=u.caretRangeFromPoint(c,d);if(h)return{node:h.startContainer,offset:Math.min(Ct(h.startContainer),h.startOffset)}}})(r,e.left,e.top);o&&({node:n,offset:i}=o);let s,a=(t.root.elementFromPoint?t.root:r).elementFromPoint(e.left,e.top);if(!a||!t.dom.contains(a.nodeType!=1?a.parentNode:a)){let u=t.dom.getBoundingClientRect();if(!$c(e,u)||(a=gE(t.dom,e,u),!a))return null}if(We)for(let u=a;n&&u;u=ei(u))u.draggable&&(n=void 0);if(a=(function(u,c){let d=u.parentNode;return d&&/^li$/i.test(d.nodeName)&&c.left<u.getBoundingClientRect().left?d:u})(a,e),n){if(wt&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let c,d=n.childNodes[i];d.nodeName=="IMG"&&(c=d.getBoundingClientRect()).right<=e.left&&c.bottom>e.top&&i++}let u;co&&i&&n.nodeType==1&&(u=n.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&i--,n==t.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:i!=0&&n.nodeType==1&&n.childNodes[i-1].nodeName=="BR"||(s=(function(c,d,h,p){let f=-1;for(let m=d,E=!1;m!=c.dom;){let _,A=c.docView.nearestDesc(m,!0);if(!A)return null;if(A.dom.nodeType==1&&(A.node.isBlock&&A.parent||!A.contentDOM)&&((_=A.dom.getBoundingClientRect()).width||_.height)&&(A.node.isBlock&&A.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(A.dom.nodeName)&&(!E&&_.left>p.left||_.top>p.top?f=A.posBefore:(!E&&_.right<p.left||_.bottom<p.top)&&(f=A.posAfter),E=!0),!A.contentDOM&&f<0&&!A.node.isText))return(A.node.isBlock?p.top<(_.top+_.bottom)/2:p.left<(_.left+_.right)/2)?A.posBefore:A.posAfter;m=A.dom.parentNode}return f>-1?f:c.docView.posFromDOM(d,h,-1)})(t,n,i,e))}s==null&&(s=(function(u,c,d){let{node:h,offset:p}=AE(c,d),f=-1;if(h.nodeType==1&&!h.firstChild){let m=h.getBoundingClientRect();f=m.left!=m.right&&d.left>(m.left+m.right)/2?1:-1}return u.docView.posFromDOM(h,p,f)})(t,a,e));let l=t.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function rh(t){return t.top<t.bottom||t.left<t.right}function Sn(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(rh(r))return r}return Array.prototype.find.call(n,rh)||t.getBoundingClientRect()}const IS=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function SE(t,e,n){let{node:r,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),s=co||wt;if(r.nodeType==3){if(!s||!IS.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let a=i,l=i,u=n<0?1:-1;return n<0&&!i?(l++,u=-1):n>=0&&i==r.nodeValue.length?(a--,u=1):n<0?a--:l++,fi(Sn(an(r,a,l),u),u<0)}{let a=Sn(an(r,i,i),n);if(wt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=Sn(an(r,i-1,i-1),-1);if(l.top==a.top){let u=Sn(an(r,i,i+1),-1);if(u.top!=a.top)return fi(u,u.left<l.left)}}return a}}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==Ct(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return Pa(a.getBoundingClientRect(),!1)}if(o==null&&i<Ct(r)){let a=r.childNodes[i];if(a.nodeType==1)return Pa(a.getBoundingClientRect(),!0)}return Pa(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==Ct(r))){let a=r.childNodes[i-1],l=a.nodeType==3?an(a,Ct(a)-(s?0:1)):a.nodeType!=1||a.nodeName=="BR"&&a.nextSibling?null:a;if(l)return fi(Sn(l,1),!1)}if(o==null&&i<Ct(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?an(a,0,s?0:1):a.nodeType==1?a:null:null;if(l)return fi(Sn(l,-1),!0)}return fi(Sn(r.nodeType==3?an(r):r,-n),n>=0)}function fi(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Pa(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function ih(t,e,n){let r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}const yS=/[\u0590-\u08ac]/;let oh=null,sh=null,ah=!1;function CS(t,e,n){return oh==e&&sh==n?ah:(oh=e,sh=n,ah=n=="up"||n=="down"?(function(r,i,o){let s=i.selection,a=o=="up"?s.$from:s.$to;return ih(r,i,()=>{let{node:l}=r.docView.domFromPos(a.pos,o=="up"?-1:1);for(;;){let c=r.docView.nearestDesc(l,!0);if(!c)break;if(c.node.isBlock){l=c.contentDOM||c.dom;break}l=c.dom.parentNode}let u=SE(r,a.pos,1);for(let c=l.firstChild;c;c=c.nextSibling){let d;if(c.nodeType==1)d=c.getClientRects();else{if(c.nodeType!=3)continue;d=an(c,0,c.nodeValue.length).getClientRects()}for(let h=0;h<d.length;h++){let p=d[h];if(p.bottom>p.top+1&&(o=="up"?u.top-p.top>2*(p.bottom-u.top):p.bottom-u.bottom>2*(u.bottom-p.top)))return!1}}return!0})})(t,e,n):(function(r,i,o){let{$head:s}=i.selection;if(!s.parent.isTextblock)return!1;let a=s.parentOffset,l=!a,u=a==s.parent.content.size,c=r.domSelection();return c?yS.test(s.parent.textContent)&&c.modify?ih(r,i,()=>{let{focusNode:d,focusOffset:h,anchorNode:p,anchorOffset:f}=r.domSelectionRange(),m=c.caretBidiLevel;c.modify("move",o,"character");let E=s.depth?r.docView.domAfterPos(s.before()):r.dom,{focusNode:_,focusOffset:A}=r.domSelectionRange(),O=_&&!E.contains(_.nodeType==1?_:_.parentNode)||d==_&&h==A;try{c.collapse(p,f),d&&(d!=p||h!=f)&&c.extend&&c.extend(d,h)}catch(S){}return m!=null&&(c.caretBidiLevel=m),O}):o=="left"||o=="backward"?l:u:s.pos==s.start()||s.pos==s.end()})(t,e,n))}class uo{constructor(e,n,r,i){this.parent=e,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=0,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode)){if(r<0){let o,s;if(e==this.contentDOM)o=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&(!(s=o.pmViewDesc)||s.parent!=this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}{let o,s;if(e==this.contentDOM)o=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&(!(s=o.pmViewDesc)||s.parent!=this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}}let i;if(e==this.dom&&this.contentDOM)i=n>Ge(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(n==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return(i==null?r>0:i)?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,i=e;i;i=i.parentNode){let o,s=this.getDesc(i);if(s&&(!n||s.node)){if(!r||!(o=s.nodeDOM)||(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))return s;r=!1}}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],o=r+i.size;if(r==e&&o!=r){for(;!i.border&&i.children.length;)for(let s=0;s<i.children.length;s++){let a=i.children[s];if(a.size){i=a;break}}return i}if(e<o)return i.descAt(e-r-i.border);r=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.size;if(a>e||s instanceof vE){i=e-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof OE&&o.side>=0;r--);if(n<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,o&&o.dom.parentNode!=this.contentDOM;r--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?Ge(o.dom)+1:0}}{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,o&&o.dom.parentNode!=this.contentDOM;r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?Ge(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,a=0;;a++){let l=this.children[a],u=s+l.size;if(i==-1&&e<=u){let c=s+l.border;if(e>=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,c);e=s;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=Ge(h.dom)+1;break}e-=h.size}i==-1&&(i=0)}if(i>-1&&(u>n||a==this.children.length-1)){n=u;for(let c=a+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=Ge(d.dom);break}n+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,i=!1){let o=Math.min(e,n),s=Math.max(e,n);for(let p=0,f=0;p<this.children.length;p++){let m=this.children[p],E=f+m.size;if(o>f&&s<E)return m.setSelection(e-f-m.border,n-f-m.border,r,i);f=E}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),c=r.domSelectionRange(),d=!1;if((wt||We)&&e==n){let{node:p,offset:f}=a;if(p.nodeType==3){if(d=!(!f||p.nodeValue[f-1]!=`
|
|
12
|
-
`),d&&f==p.nodeValue.length)for(let m,E=p;E;E=E.parentNode){if(m=E.nextSibling){m.nodeName=="BR"&&(a=l={node:m.parentNode,offset:Ge(m)+1});break}let _=E.pmViewDesc;if(_&&_.node&&_.node.isBlock)break}}else{let m=p.childNodes[f-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(wt&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(i=!0)}if(!(i||d&&We)&&lr(a.node,a.offset,c.anchorNode,c.anchorOffset)&&lr(l.node,l.offset,c.focusNode,c.focusOffset))return;let h=!1;if((u.extend||e==n)&&(!d||!wt)){u.collapse(a.node,a.offset);try{e!=n&&u.extend(l.node,l.offset),h=!0}catch(p){}}if(!h){if(e>n){let f=a;a=l,l=f}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let a=r+o.border,l=s-o.border;if(e>=a&&n<=l)return this.dirty=e==r||n==s?2:1,void(e!=a||n!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,n-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}r=s}this.dirty=2}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?2:1;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class OE extends uo{constructor(e,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>o?o.parent?o.parent.posBeforeChild(o):void 0:i)),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==0&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return!!n&&n(e)}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class NS extends uo{constructor(e,n,r,i){super(e,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class rr extends uo{constructor(e,n,r,i,o){super(e,[],r,i),this.mark=n,this.spec=o}static create(e,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return s&&s.dom||(s=ai.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new rr(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=3&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=0){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}slice(e,n,r){let i=rr.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=Bl(o,n,s,r)),e>0&&(o=Bl(o,0,e,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Mn extends uo{constructor(e,n,r,i,o,s,a,l,u){super(e,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(e,n,r,i,o,s){let a,l=o.nodeViews[n.type.name],u=l&&l(n,o,()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s,r,i),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText)if(c){if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(n.text);else c||({dom:c,contentDOM:d}=ai.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));d||n.isText||c.nodeName=="BR"||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let h=c;return c=RE(c,r,n),u?a=new bS(e,n,r,i,c,d||null,h,u,o,s+1):n.isText?new qs(e,n,r,i,c,h,o):new Mn(e,n,r,i,c,d||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>j.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,n,r){return this.dirty==0&&e.eq(this.node)&&fs(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,i=n,o=e.composing?this.localCompositionInfo(e,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new kS(this,s&&s.node,e);(function(u,c,d,h){let p=c.locals(u),f=0;if(p.length==0){for(let A=0;A<u.childCount;A++){let O=u.child(A);h(O,p,c.forChild(f,O),A),f+=O.nodeSize}return}let m=0,E=[],_=null;for(let A=0;;){let O,S,v,T;for(;m<p.length&&p[m].to==f;){let g=p[m++];g.widget&&(O?(S||(S=[O])).push(g):O=g)}if(O)if(S){S.sort(LS);for(let g=0;g<S.length;g++)d(S[g],A,!!_)}else d(O,A,!!_);if(_)T=-1,v=_,_=null;else{if(!(A<u.childCount))break;T=A,v=u.child(A++)}for(let g=0;g<E.length;g++)E[g].to<=f&&E.splice(g--,1);for(;m<p.length&&p[m].from<=f&&p[m].to>f;)E.push(p[m++]);let R=f+v.nodeSize;if(v.isText){let g=R;m<p.length&&p[m].from<g&&(g=p[m].from);for(let D=0;D<E.length;D++)E[D].to<g&&(g=E[D].to);g<R&&(_=v.cut(g-f),v=v.cut(0,g-f),R=g,T=-1)}else for(;m<p.length&&p[m].to<R;)m++;let y=v.isInline&&!v.isLeaf?E.filter(g=>!g.inline):E.slice();h(v,y,c.forChild(f,v),T),f=R}})(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,e,c):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?pe.none:this.node.child(c).marks,r,e,c),l.placeWidget(u,e,i)},(u,c,d,h)=>{let p;l.syncToMarks(u.marks,r,e,h),l.findNodeMatch(u,c,d,h)||a&&e.state.selection.from>i&&e.state.selection.to<i+u.nodeSize&&(p=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(u,c,d,p,e)||l.updateNextNode(u,c,d,e,h,i)||l.addNode(u,c,d,e,i),i+=u.nodeSize}),l.syncToMarks([],r,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==2)&&(s&&this.protectLocalComposition(e,s),DE(this.contentDOM,this.children,e),ti&&(function(u){if(u.nodeName=="UL"||u.nodeName=="OL"){let c=u.style.cssText;u.style.cssText=c+"; list-style: square !important",window.getComputedStyle(u).listStyle,u.style.cssText=c}})(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof ce)||r<n||i>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=(function(l,u,c,d){for(let h=0,p=0;h<l.childCount&&p<=d;){let f=l.child(h++),m=p;if(p+=f.nodeSize,!f.isText)continue;let E=f.text;for(;h<l.childCount;){let _=l.child(h++);if(p+=_.nodeSize,!_.isText)break;E+=_.text}if(p>=c){if(p>=d&&E.slice(d-u.length-m,d-m)==u)return d-u.length;let _=m<d?E.lastIndexOf(u,d-m-1):-1;if(_>=0&&_+u.length+m>=c)return m+_;if(c==d&&E.length>=d+u.length-m&&E.slice(d-m,d-m+u.length)==u)return d}}return-1})(this.node.content,s,r-n,i-n);return a<0?null:{node:o,pos:a,text:s}}return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new NS(this,o,n,i);e.input.compositionNodes.push(s),this.children=Bl(this.children,r,r+i.length,e,s)}update(e,n,r,i){return!(this.dirty==3||!e.sameMarkup(this.node))&&(this.updateInner(e,n,r,i),!0)}updateInner(e,n,r,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(fs(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=TE(this.dom,this.nodeDOM,Ul(this.outerDeco,this.node,n),Ul(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function lh(t,e,n,r,i){RE(r,e,t);let o=new Mn(void 0,t,e,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class qs extends Mn{constructor(e,n,r,i,o,s,a){super(e,n,r,i,o,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,i){return!(this.dirty==3||this.dirty!=0&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(n),this.dirty==0&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let i=this.node.cut(e,n),o=document.createTextNode(i.text);return new qs(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,n){super.markDirty(e,n),this.dom==this.nodeDOM||e!=0&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}}class vE extends uo{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==0&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class bS extends Mn{constructor(e,n,r,i,o,s,a,l,u,c){super(e,n,r,i,o,s,a,u,c),this.spec=l}update(e,n,r,i){if(this.dirty==3)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,n,r);return o&&this.updateInner(e,n,r,i),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function DE(t,e,n){let r=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=s.dom;if(a.parentNode==t){for(;a!=r;)r=ch(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(s instanceof rr){let l=r?r.previousSibling:t.lastChild;DE(s.contentDOM,s.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=ch(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const Ni=function(t){t&&(this.nodeName=t)};Ni.prototype=Object.create(null);const Jn=[new Ni];function Ul(t,e,n){if(t.length==0)return Jn;let r=n?Jn[0]:new Ni,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new Ni(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new Ni(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return i}function TE(t,e,n,r){if(n==Jn&&r==Jn)return e;let i=e;for(let o=0;o<r.length;o++){let s=r[o],a=n[o];if(o){let l;a&&a.nodeName==s.nodeName&&i!=t&&(l=i.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=Jn[0]),i=l}wS(i,a||Jn[0],s)}return i}function wS(t,e,n){for(let r in e)r=="class"||r=="style"||r=="nodeName"||r in n||t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&t.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&t.classList.add(i[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r,i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;r=i.exec(e.style);)t.style.removeProperty(r[1])}n.style&&(t.style.cssText+=n.style)}}function RE(t,e,n){return TE(t,t,Jn,Ul(e,n,t.nodeType!=1))}function fs(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function ch(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class kS{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=(function(i,o){let s=o,a=s.children.length,l=i.childCount,u=new Map,c=[];e:for(;l>0;){let d;for(;;)if(a){let p=s.children[a-1];if(!(p instanceof rr)){d=p,a--;break}s=p,a=p.children.length}else{if(s==o)break e;a=s.parent.children.indexOf(s),s=s.parent}let h=d.node;if(h){if(h!=i.child(l-1))break;--l,u.set(d,l),c.push(d)}}return{index:l,matched:u,matches:c.reverse()}})(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,i){let o=0,s=this.stack.length>>1,a=Math.min(s,e.length);for(;o<a&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let l=-1,u=this.top.children.length;i<this.preMatch.index&&(u=Math.min(this.index+3,u));for(let c=this.index;c<u;c++){let d=this.top.children[c];if(d.matchesMark(e[s])&&!this.isLocked(d.dom)){l=c;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let c=rr.create(this.top,e[s],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,r,i){let o,s=-1;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,n,r))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(e,n,r)&&!this.preMatch.matched.has(u)){s=a;break}}return!(s<0)&&(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,n,r,i,o){let s=this.top.children[i];return s.dirty==3&&s.dom==s.contentDOM&&(s.dirty=2),!!s.update(e,n,r,o)&&(this.destroyBetween(this.index,i),this.index++,!0)}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=n}}updateNextNode(e,n,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Mn){let u=this.preMatch.matched.get(l);if(u!=null&&u!=o)return!1;let c,d=l.dom,h=this.isLocked(d)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=3&&fs(n,l.outerDeco));if(!h&&l.update(e,n,r,i))return this.destroyBetween(this.index,a),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(c=this.recreateWrapper(l,e,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(i,s+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,i,o,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!fs(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let a=Mn.create(this.top,n,r,i,o,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,i,o){let s=Mn.create(this.top,e,n,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(!i||!i.matchesWidget(e)||e!=i.widget&&i.widget.type.toDOM.parentNode){let o=new OE(this.top,e,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof rr;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof qs)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((We||He)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new vE(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function LS(t,e){return t.type.side-e.type.side}function Bl(t,e,n,r,i){let o=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],u=a,c=a+=l.size;u>=n||c<=e?o.push(l):(u<e&&o.push(l.slice(0,e-u,r)),i&&(o.push(i),i=void 0),c>n&&o.push(l.slice(n-u,l.size,r)))}return o}function Vc(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),o=i&&i.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,u=r.resolve(s);if(Ks(n)){for(a=s;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&Z.isSelectable(d)&&i.parent&&(!d.isInline||!(function(h,p,f){for(let m=p==0,E=p==Ct(h);m||E;){if(h==f)return!0;let _=Ge(h);if(!(h=h.parentNode))return!1;m=m&&_==0,E=E&&_==Ct(h)}})(n.focusNode,n.focusOffset,i.dom))){let h=i.posBefore;l=new Z(s==h?u:r.resolve(h))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,h=s;for(let p=0;p<n.rangeCount;p++){let f=n.getRangeAt(p);d=Math.min(d,t.docView.posFromDOM(f.startContainer,f.startOffset,1)),h=Math.max(h,t.docView.posFromDOM(f.endContainer,f.endOffset,-1))}if(d<0)return null;[a,s]=h==t.state.selection.anchor?[h,d]:[d,h],u=r.resolve(s)}else a=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let c=r.resolve(a);return l||(l=zc(t,c,u,e=="pointer"||t.state.selection.head<u.pos&&!o?1:-1)),l}function uh(t){return t.editable?t.hasFocus():yE(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function pn(t,e=!1){let n=t.state.selection;if(IE(t,n),uh(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&He){let r=t.domSelectionRange(),i=t.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&lr(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset))return t.input.mouseDown.delayedSelectionSync=!0,void t.domObserver.setCurSelection()}if(t.domObserver.disconnectSelection(),t.cursorWrapper)(function(r){let i=r.domSelection();if(!i)return;let o=r.cursorWrapper.dom,s=o.nodeName=="IMG";s?i.collapse(o.parentNode,Ge(o)+1):i.collapse(o,0),!s&&!r.state.selection.visible&&Et&&Ln<=11&&(o.disabled=!0,o.disabled=!1)})(t);else{let r,i,{anchor:o,head:s}=n;!dh||n instanceof ce||(n.$from.parent.inlineContent||(r=hh(t,n.from)),n.empty||n.$from.parent.inlineContent||(i=hh(t,n.to))),t.docView.setSelection(o,s,t,e),dh&&(r&&ph(r),i&&ph(i)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&(function(a){let l=a.dom.ownerDocument;l.removeEventListener("selectionchange",a.input.hideSelectionGuard);let u=a.domSelectionRange(),c=u.anchorNode,d=u.anchorOffset;l.addEventListener("selectionchange",a.input.hideSelectionGuard=()=>{u.anchorNode==c&&u.anchorOffset==d||(l.removeEventListener("selectionchange",a.input.hideSelectionGuard),setTimeout(()=>{uh(a)&&!a.state.selection.visible||a.dom.classList.remove("ProseMirror-hideselection")},20))})})(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const dh=We||He&&EE<63;function hh(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(We&&i&&i.contentEditable=="false")return xa(i);if(!(i&&i.contentEditable!="false"||o&&o.contentEditable!="false")){if(i)return xa(i);if(o)return xa(o)}}function xa(t){return t.contentEditable="true",We&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function ph(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function IE(t,e){if(e instanceof Z){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(fh(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else fh(t)}function fh(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function zc(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||ce.between(e,n,r)}function mh(t){return!(t.editable&&!t.hasFocus())&&yE(t)}function yE(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch(n){return!1}}function jl(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return o&&he.findFrom(o,e)}function vn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Eh(t,e,n){let r=t.state.selection;if(!(r instanceof ce)){if(r instanceof Z&&r.node.isInline)return vn(t,new ce(e>0?r.$to:r.$from));{let i=jl(t.state,e);return!!i&&vn(t,i)}}if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return vn(t,new ce(r.$anchor,s))}if(!r.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let i=jl(t.state,e);return!!(i&&i instanceof Z)&&vn(t,i)}if(!(yt&&n.indexOf("m")>-1)){let i,o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;let a=e<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(i=t.docView.descAt(a))&&!i.contentDOM)&&(Z.isSelectable(s)?vn(t,new Z(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):!!co&&vn(t,new ce(t.state.doc.resolve(e<0?a:a+s.nodeSize))))}}function wo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function mi(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Cr(t,e){return e<0?(function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=!1;for(wt&&i.nodeType==1&&o<wo(i)&&mi(i.childNodes[o],-1)&&(l=!0);;)if(o>0){if(i.nodeType!=1)break;{let u=i.childNodes[o-1];if(mi(u,-1))s=i,a=--o;else{if(u.nodeType!=3)break;i=u,o=i.nodeValue.length}}}else{if(_h(i))break;{let u=i.previousSibling;for(;u&&mi(u,-1);)s=i.parentNode,a=Ge(u),u=u.previousSibling;if(u)i=u,o=wo(i);else{if(i=i.parentNode,i==n.dom)break;o=0}}}l?Fa(n,i,o):s&&Fa(n,s,a)})(t):(function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=wo(i);for(;;)if(o<l){if(i.nodeType!=1||!mi(i.childNodes[o],1))break;s=i,a=++o}else{if(_h(i))break;{let u=i.nextSibling;for(;u&&mi(u,1);)s=u.parentNode,a=Ge(u)+1,u=u.nextSibling;if(u)i=u,o=0,l=wo(i);else{if(i=i.parentNode,i==n.dom)break;o=l=0}}}s&&Fa(n,s,a)})(t)}function _h(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Fa(t,e,n){if(e.nodeType!=3){let o,s;(s=(function(a,l){for(;a&&l==a.childNodes.length&&!Wi(a);)l=Ge(a)+1,a=a.parentNode;for(;a&&l<a.childNodes.length;){let u=a.childNodes[l];if(u.nodeType==3)return u;if(u.nodeType==1&&u.contentEditable=="false")break;a=u,l=0}})(e,n))?(e=s,n=0):(o=(function(a,l){for(;a&&!l&&!Wi(a);)l=Ge(a),a=a.parentNode;for(;a&&l;){let u=a.childNodes[l-1];if(u.nodeType==3)return u;if(u.nodeType==1&&u.contentEditable=="false")break;l=(a=u).childNodes.length}})(e,n))&&(e=o,n=o.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Ks(r)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&pn(t)},50)}function Ah(t,e){let n=t.state.doc.resolve(e);if(!He&&!_E&&n.parent.inlineContent){let r=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left<r.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left>r.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function gh(t,e,n){let r=t.state.selection;if(r instanceof ce&&!r.empty||n.indexOf("s")>-1||yt&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=jl(t.state,e);if(s&&s instanceof Z)return vn(t,s)}if(!i.parent.inlineContent){let s=e<0?i:o,a=r instanceof Rt?he.near(s,e):he.findFrom(s,e);return!!a&&vn(t,a)}return!1}function Sh(t,e){if(!(t.state.selection instanceof ce))return!0;let{$head:n,$anchor:r,empty:i}=t.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=t.state.tr;return e<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),t.dispatch(s),!0}return!1}function Oh(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function MS(t,e){let n=e.keyCode,r=(function(i){let o="";return i.ctrlKey&&(o+="c"),i.metaKey&&(o+="m"),i.altKey&&(o+="a"),i.shiftKey&&(o+="s"),o})(e);if(n==8||yt&&n==72&&r=="c")return Sh(t,-1)||Cr(t,-1);if(n==46&&!e.shiftKey||yt&&n==68&&r=="c")return Sh(t,1)||Cr(t,1);if(n==13||n==27)return!0;if(n==37||yt&&n==66&&r=="c"){let i=n==37?Ah(t,t.state.selection.from)=="ltr"?-1:1:-1;return Eh(t,i,r)||Cr(t,i)}if(n==39||yt&&n==70&&r=="c"){let i=n==39?Ah(t,t.state.selection.from)=="ltr"?1:-1:1;return Eh(t,i,r)||Cr(t,i)}return n==38||yt&&n==80&&r=="c"?gh(t,-1,r)||Cr(t,-1):n==40||yt&&n==78&&r=="c"?(function(i){if(!We||i.state.selection.$head.parentOffset>0)return!1;let{focusNode:o,focusOffset:s}=i.domSelectionRange();if(o&&o.nodeType==1&&s==0&&o.firstChild&&o.firstChild.contentEditable=="false"){let a=o.firstChild;Oh(i,a,"true"),setTimeout(()=>Oh(i,a,"false"),20)}return!1})(t)||gh(t,1,r)||Cr(t,1):r==(yt?"m":"c")&&(n==66||n==73||n==89||n==90)}function Yc(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=t.someProp("clipboardSerializer")||ai.fromSchema(t.state.schema),a=LE(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u,c=l.firstChild,d=0;for(;c&&c.nodeType==1&&(u=kE[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let f=a.createElement(u[p]);for(;l.firstChild;)f.appendChild(l.firstChild);l.appendChild(f),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
|
|
5
|
+
`+i.text+"```";case"codespan":case"codeSpan":return"```"+i.text+"```";case"mention":return r?`<!!mention:${i.id}|${i.text}>`:`@${i.text}`;case"customemoji":case"customEmoji":return r?`<!!customemoji:${i.text}>`:i.text;case"link":return`<${i.url}|${Bt(i.children)}>`;case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return(function(o){const s=new URLSearchParams(o.params).toString(),a=s?o.action+"?"+s:o.action;return`<${o.type}:${a}|${Bt(o.children)}>`})(i);case"bulletlist":case"bulletList":return`
|
|
6
|
+
`+Bt(i.children);case"bulletpoint":case"bulletPoint":return"- "+Bt(i.children)+`
|
|
7
|
+
`}}).join("")})(t,e).trim()}class wd{constructor(e,n,r,i,o,s){this.send=n,this.attachFile=r,this.shareLocation=i,this.toggleEmojiPicker=o,this.recordVoiceMessage=s,this.isEmpty=e.isEmpty,this.atTextLimit=e.atTextLimit,this.characterCount=e.characterCount,this.showEmojiPicker=e.showEmojiPicker}}function Ve(t){this.content=t}function Xm(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i!=o){if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=Xm(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}else n+=i.nodeSize}}function Km(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=t.child(--i),a=e.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,c=Math.min(s.text.length,a.text.length);for(;u<c&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let u=Km(s.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}else n-=l,r-=l}}Ve.prototype={constructor:Ve,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new Ve(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Ve(n)},addToStart:function(t,e){return new Ve([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Ve(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new Ve(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=Ve.from(t)).size?new Ve(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=Ve.from(t)).size?new Ve(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Ve.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},Ve.from=function(t){if(t instanceof Ve)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Ve(e)};class j{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,i+c)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=u},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new j(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new j(r,i)}cutByIndex(e,n){return e==n?j.empty:e==0&&n==this.content.length?this:new j(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new j(i,o)}addToStart(e){return new j([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new j(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return Xm(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Km(this,e,n,r)}findIndex(e){if(e==0)return bo(0,e);if(e==this.size)return bo(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=e)return i==e?bo(n+1,i):bo(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return j.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new j(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return j.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new j(n||e,r)}static from(e){if(!e)return j.empty;if(e instanceof j)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new j([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}j.empty=new j([],0);const Ra={index:0,offset:0};function bo(t,e){return Ra.index=t,Ra.offset=e,Ra}function us(t,e){if(t===e)return!0;if(!t||typeof t!="object"||!e||typeof e!="object")return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!us(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!us(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}class pe{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&us(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return pe.none;if(e instanceof pe)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}pe.none=[];class ds extends Error{}class W{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=Jm(this.content,e+this.openStart,n);return r&&new W(r,this.openStart,this.openEnd)}removeBetween(e,n){return new W(qm(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return W.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new W(j.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new W(e,r,i)}}function qm(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(i==e||o.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(qm(o.content,e-i-1,n-i-1)))}function Jm(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=Jm(s.content,e-o-1,n,s);return a&&t.replaceChild(i,s.copy(a))}function eS(t,e,n){if(n.openStart>t.depth)throw new ds("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ds("Inconsistent open depths");return Zm(t,e,n,0)}function Zm(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=Zm(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=r||e.depth!=r){let{start:s,end:a}=(function(l,u){let c=u.depth-l.openStart,d=u.node(c).copy(l.content);for(let h=c-1;h>=0;h--)d=u.node(h).copy(j.from(d));return{start:d.resolveNoCache(l.openStart+c),end:d.resolveNoCache(d.content.size-l.openEnd-c)}})(n,t);return tr(o,eE(t,s,a,e,r))}{let s=t.parent,a=s.content;return tr(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}}return tr(o,hs(t,e,r))}function Qm(t,e){if(!e.type.compatibleContent(t.type))throw new ds("Cannot join "+e.type.name+" onto "+t.type.name)}function kl(t,e,n){let r=t.node(n);return Qm(r,e.node(n)),r}function er(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Ci(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(er(t.nodeAfter,r),o++));for(let a=o;a<s;a++)er(i.child(a),r);e&&e.depth==n&&e.textOffset&&er(e.nodeBefore,r)}function tr(t,e){return t.type.checkContent(e),t.copy(e)}function eE(t,e,n,r,i){let o=t.depth>i&&kl(t,e,i+1),s=r.depth>i&&kl(n,r,i+1),a=[];return Ci(null,t,i,a),o&&s&&e.index(i)==n.index(i)?(Qm(o,s),er(tr(o,eE(t,e,n,r,i+1)),a)):(o&&er(tr(o,hs(t,e,i+1)),a),Ci(e,n,i,a),s&&er(tr(s,hs(n,r,i+1)),a)),Ci(r,null,i,a),new j(a)}function hs(t,e,n){let r=[];return Ci(null,t,n,r),t.depth>n&&er(tr(kl(t,e,n+1),hs(t,e,n+1)),r),Ci(e,null,n,r),new j(r)}W.empty=new W(j.empty,0,0);class Vi{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return(e=this.resolveDepth(e))==0?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[3*n],i=n==0?0:this.path[3*n-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return pe.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive!==!1||i&&o[s].isInSet(i.marks)||(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive!==!1||i&&r[o].isInSet(i.marks)||(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new rS(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),u=o-l;if(r.push(s,a,i+l),!u||(s=s.child(a),s.isText))break;o=u-1,i+=l+1}return new Vi(n,r,o)}static resolveCached(e,n){let r=kd.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else kd.set(e,r=new tS);let i=r.elts[r.i]=Vi.resolve(e,n);return r.i=(r.i+1)%nS,i}}class tS{constructor(){this.elts=[],this.i=0}}const nS=12,kd=new WeakMap;class rS{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const iS=Object.create(null);let nr=class Ll{constructor(e,n,r,i=pe.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||j.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&us(this.attrs,n||e.defaultAttrs||iS)&&pe.sameSet(this.marks,r||pe.none)}copy(e=null){return e==this.content?this:new Ll(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ll(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return W.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),l=i.node(s).content.cut(i.pos-a,o.pos-a);return new W(l,i.depth-s,o.depth-s)}replace(e,n,r){return eS(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Vi.resolveCached(this,e)}resolveNoCache(e){return Vi.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),tE(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=j.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return!!s&&s.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=pe.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!pe.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=j.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};nr.prototype.text=void 0;class ps extends nr{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):tE(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ps(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ps(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function tE(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class sr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new oS(e,n);if(r.next==null)return sr.empty;let i=nE(r);r.next&&r.err("Unexpected trailing text");let o=(function(s){let a=Object.create(null);return l(Md(s,0));function l(u){let c=[];u.forEach(h=>{s[h].forEach(({term:f,to:p})=>{if(!f)return;let m;for(let E=0;E<c.length;E++)c[E][0]==f&&(m=c[E][1]);Md(s,p).forEach(E=>{m||c.push([f,m=[]]),m.indexOf(E)==-1&&m.push(E)})})});let d=a[u.join(",")]=new sr(u.indexOf(s.length-1)>-1);for(let h=0;h<c.length;h++){let f=c[h][1].sort(rE);d.next.push({type:c[h][0],next:a[f.join(",")]||l(f)})}return d}})((function(s){let a=[[]];return c(d(s,0),l()),a;function l(){return a.push([])-1}function u(h,f,p){let m={term:p,to:f};return a[h].push(m),m}function c(h,f){h.forEach(p=>p.to=f)}function d(h,f){if(h.type=="choice")return h.exprs.reduce((p,m)=>p.concat(d(m,f)),[]);if(h.type!="seq"){if(h.type=="star"){let p=l();return u(f,p),c(d(h.expr,p),p),[u(p)]}if(h.type=="plus"){let p=l();return c(d(h.expr,f),p),c(d(h.expr,p),p),[u(p)]}if(h.type=="opt")return[u(f)].concat(d(h.expr,f));if(h.type=="range"){let p=f;for(let m=0;m<h.min;m++){let E=l();c(d(h.expr,p),E),p=E}if(h.max==-1)c(d(h.expr,p),p);else for(let m=h.min;m<h.max;m++){let E=l();u(p,E),c(d(h.expr,p),E),p=E}return[u(p)]}if(h.type=="name")return[u(f,void 0,h.value)];throw new Error("Unknown expr type")}for(let p=0;;p++){let m=d(h.exprs[p],f);if(p==h.exprs.length-1)return m;c(m,f=l())}}})(i));return(function(s,a){for(let l=0,u=[s];l<u.length;l++){let c=u[l],d=!c.validEnd,h=[];for(let f=0;f<c.next.length;f++){let{type:p,next:m}=c.next[f];h.push(p.name),!d||p.isText||p.hasRequiredAttrs()||(d=!1),u.indexOf(m)==-1&&u.push(m)}d&&a.err("Only non-generatable nodes ("+h.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}})(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!n.isText&&!n.hasRequiredAttrs())return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];return(function o(s,a){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return j.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!c.isText&&!c.hasRequiredAttrs()&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(c));if(h)return h}}return null})(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];a.isLeaf||a.hasRequiredAttrs()||a.name in n||i.type&&!l.validEnd||(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return(function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)})(this),e.map((n,r)=>{let i=r+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)i+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return i}).join(`
|
|
8
|
+
`)}}sr.empty=new sr(!0);class oS{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function nE(t){let e=[];do e.push(sS(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function sS(t){let e=[];do e.push(aS(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function aS(t){let e=(function(n){if(n.eat("(")){let r=nE(n);return n.eat(")")||n.err("Missing closing paren"),r}if(!/\W/.test(n.next)){let r=(function(i,o){let s=i.nodeTypes,a=s[o];if(a)return[a];let l=[];for(let u in s){let c=s[u];c.isInGroup(o)&&l.push(c)}return l.length==0&&i.err("No node type or group '"+o+"' found"),l})(n,n.next).map(i=>(n.inline==null?n.inline=i.isInline:n.inline!=i.isInline&&n.err("Mixing inline and block content"),{type:"name",value:i}));return n.pos++,r.length==1?r[0]:{type:"choice",exprs:r}}n.err("Unexpected token '"+n.next+"'")})(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=lS(t,e)}return e}function Ld(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function lS(t,e){let n=Ld(t),r=n;return t.eat(",")&&(r=t.next!="}"?Ld(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function rE(t,e){return e-t}function Md(t,e){let n=[];return(function r(i){let o=t[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];a||n.indexOf(l)!=-1||r(l)}})(e),n.sort(rE)}function iE(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function oE(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let o=t[r];if(!o.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=o.default}n[r]=i}return n}function sE(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}function aE(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new cS(t,r,e[r]);return n}let Pd=class lE{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=aE(e,r.attrs),this.defaultAttrs=iE(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==sr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:oE(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new nr(this,this.computeAttrs(e),j.from(n),pe.setFrom(r))}createChecked(e=null,n,r){return n=j.from(n),this.checkContent(n),new nr(this,this.computeAttrs(e),n,pe.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),(n=j.from(n)).size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(j.empty,!0);return o?new nr(this,e,n.append(o),pe.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){sE(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:pe.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,s)=>r[o]=new lE(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class cS{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?(function(i,o,s){let a=s.split("|");return l=>{let u=l===null?"null":typeof l;if(a.indexOf(u)<0)throw new RangeError(`Expected value of type ${a} for attribute ${o} on type ${i}, got ${u}`)}})(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ys{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=aE(e,i.attrs),this.excluded=null;let o=iE(this.attrs);this.instance=o?new pe(this,o):null}create(e=null){return!e&&this.instance?this.instance:new pe(this,oE(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new Ys(o,i++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){sE(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}function xd(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let a in t.marks){let l=t.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class zi{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if((function(o){return o.tag!=null})(i))this.tags.push(i);else if((function(o){return o.style!=null})(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new Ud(this,n,!1);return r.addAll(e,pe.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Ud(this,n,!0);return r.addAll(e,pe.none,n.from,n.to),W.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(dS(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Bd(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Bd(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new zi(e,zi.schemaRules(e)))}}const cE={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},uS={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Fd={ol:!0,ul:!0};function Hd(t,e,n){return e!=null?(e?1:0)|(e==="full"?2:0):t&&t.whitespace=="pre"?3:-5&n}class ya{constructor(e,n,r,i,o,s){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=pe.none,this.match=o||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(j.from(e));if(!n){let r,i=this.type.contentMatch;return(r=i.findWrapping(e.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(n)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let r,i=this.content[this.content.length-1];if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let n=j.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(j.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!cE.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ud{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i,o=n.topNode,s=Hd(null,n.preserveWhitespace,0)|(r?4:0);i=o?new ya(o.type,o.attrs,pe.none,!0,n.topMatch||o.type.contentMatch,s):new ya(r?null:e.schema.topNodeType,null,pe.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,o=2&i.options?"full":this.localPreserveWS||(1&i.options)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
|
|
9
|
+
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(s.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s,a=e.nodeName.toLowerCase();Fd.hasOwnProperty(a)&&this.parser.normalizeLists&&(function(u){for(let c=u.firstChild,d=null;c;c=c.nextSibling){let h=c.nodeType==1?c.nodeName.toLowerCase():null;h&&Fd.hasOwnProperty(h)&&d?(d.appendChild(c),c=d):h=="li"?d=c:h&&(d=null)}})(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,r));e:if(l?l.ignore:uS.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,c=this.needsBlock;if(cE.hasOwnProperty(a))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),u=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),u&&this.sync(o),this.needsBlock=c}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?s:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
10
|
+
`),n)}ignoreFallback(e,n){e.nodeName!="BR"||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(n=l.clearMark?n.filter(u=>!l.clearMark(u)):n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming!==!1)break;a=l}}return n}addElementByRule(e,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,n,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,n);this.findAtPoint(e,o)}findPlace(e,n,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(e);if(u&&(!i||i.length>u.length+a)&&(i=u,o=l,!u.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=pe.none;for(let a of i.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):jd(a.type,e.type))&&(s=a.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,n,r,i){let o=this.findPlace(e.create(n),r,!1);return o&&(o=this.enterInner(e,n,r,!0,i)),o}enterInner(e,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=Hd(e,o,s.options);4&s.options&&s.content.length==0&&(a|=4);let l=pe.none;return r=r.filter(u=>!(s.type?s.type.allowsMarkType(u.type):jd(u.type,e))||(l=u.addToSet(l),!1)),this.nodes.push(new ya(e,n,l,i,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!(!this.isOpen&&!this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=1)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}{let c=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function dS(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Bd(t){let e={};for(let n in t)e[n]=t[n];return e}function jd(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:c}=a.edge(l);if(u==e||o.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class ai{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Ia(n).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let u=s.marks[l];if(this.marks[u.type.name]){if(!u.eq(o[a][0])||u.type.spec.spanning===!1)break;a++,l++}else l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,n);c&&(o.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=Go(Ia(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Go(Ia(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return Go(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ai(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=$d(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return $d(e.marks)}}function $d(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Ia(t){return t.document||window.document}const Vd=new WeakMap;function hS(t){let e=Vd.get(t);return e===void 0&&Vd.set(t,e=(function(n){let r=null;function i(o){if(o&&typeof o=="object")if(Array.isArray(o))if(typeof o[0]=="string")r||(r=[]),r.push(o);else for(let s=0;s<o.length;s++)i(o[s]);else for(let s in o)i(o[s])}return i(n),r})(t)),e}function Go(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i,o=e[0];if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=hS(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s,a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let l=n?t.createElementNS(n,o):t.createElement(o),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:f,contentDOM:p}=Go(t,h,n,r);if(l.appendChild(f),p){if(s)throw new RangeError("Multiple content holes");s=p}}}return{dom:l,contentDOM:s}}const uE=Math.pow(2,16);function pS(t,e){return t+e*uE}function zd(t){return 65535&t}class Ml{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class Ot{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Ot.empty)return Ot.empty}recover(e){let n=0,r=zd(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+n+(function(i){return(i-(65535&i))/uE})(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(e<=d){let h=l+i+((u?e==l?-1:e==d?1:n:n)<0?0:c);if(r)return h;let f=e==(n<0?l:d)?null:pS(a/3,e-l),p=e==l?2:e==d?1:4;return(n<0?e!=l:e!=d)&&(p|=8),new Ml(h,p,f)}i+=c-u}return r?e+i:new Ml(e+i,0,null)}touches(e,n){let r=0,i=zd(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+o];if(e<=l+u&&a==3*i)return!0;r+=this.ranges[a+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),u=this.ranges[i+n],c=this.ranges[i+r];e(a,a+u,l,l+c),o+=c-u}}invert(){return new Ot(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Ot.empty:new Ot(e<0?[0,-e,0]:[0,0,e])}}Ot.empty=new Ot([]);class Yi{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Yi(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new Yi;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o].mapResult(e,n);if(s.recover!=null){let a=this.getMirror(o);if(a!=null&&a>o&&a<this.to){o=a,e=this._maps[a].recover(s.recover);continue}}i|=s.delInfo,e=s.pos}return r?e:new Ml(e,i,null)}}const Ca=Object.create(null);class tt{getMap(){return Ot.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ca[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Ca)throw new RangeError("Duplicate use of step JSON ID "+e);return Ca[e]=n,n.prototype.jsonID=e,n}}class we{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new we(e,null)}static fail(e){return new we(null,e)}static fromReplace(e,n,r,i){try{return we.ok(e.replace(n,r,i))}catch(o){if(o instanceof ds)return we.fail(o.message);throw o}}}function Uc(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(Uc(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return j.fromArray(r)}class In extends tt{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new W(Uc(n.content,(s,a)=>s.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,i),n.openStart,n.openEnd);return we.fromReplace(e,this.from,this.to,o)}invert(){return new zt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new In(n.pos,r.pos,this.mark)}merge(e){return e instanceof In&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new In(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new In(n.from,n.to,e.markFromJSON(n.mark))}}tt.jsonID("addMark",In);class zt extends tt{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new W(Uc(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return we.fromReplace(e,this.from,this.to,r)}invert(){return new In(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new zt(n.pos,r.pos,this.mark)}merge(e){return e instanceof zt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new zt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new zt(n.from,n.to,e.markFromJSON(n.mark))}}tt.jsonID("removeMark",zt);class Cn extends tt{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return we.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return we.fromReplace(e,this.pos,this.pos+1,new W(j.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Cn(this.pos,n.marks[i]);return new Cn(this.pos,this.mark)}}return new ar(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Cn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Cn(n.pos,e.markFromJSON(n.mark))}}tt.jsonID("addNodeMark",Cn);class ar extends tt{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return we.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return we.fromReplace(e,this.pos,this.pos+1,new W(j.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return n&&this.mark.isInSet(n.marks)?new Cn(this.pos,this.mark):this}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ar(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ar(n.pos,e.markFromJSON(n.mark))}}tt.jsonID("removeNodeMark",ar);class Ye extends tt{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Pl(e,this.from,this.to)?we.fail("Structure replace would overwrite content"):we.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Ot([this.from,this.to-this.from,this.slice.size])}invert(e){return new Ye(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Ye(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Ye)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let n=this.slice.size+e.slice.size==0?W.empty:new W(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Ye(e.from,this.to,n,this.structure)}}{let n=this.slice.size+e.slice.size==0?W.empty:new W(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Ye(this.from,this.to+(e.to-e.from),n,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Ye(n.from,n.to,W.fromJSON(e,n.slice),!!n.structure)}}tt.jsonID("replace",Ye);class vt extends tt{constructor(e,n,r,i,o,s,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(Pl(e,this.from,this.gapFrom)||Pl(e,this.gapTo,this.to)))return we.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return we.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?we.fromReplace(e,this.from,this.to,r):we.fail("Content does not fit in gap")}getMap(){return new Ot([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new vt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new vt(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new vt(n.from,n.to,n.gapFrom,n.gapTo,W.fromJSON(e,n.slice),n.insert,!!n.structure)}}function Pl(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function Na(t,e,n,r=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<o.childCount;l++){let u=o.child(l),c=a+u.nodeSize,d=r.matchType(u.type);if(d){r=d;for(let h=0;h<u.marks.length;h++)n.allowsMarkType(u.marks[h].type)||t.step(new zt(a,c,u.marks[h]));if(i&&u.isText&&n.whitespace!="pre"){let h,f,p=/\r?\n|\r/g;for(;h=p.exec(u.text);)f||(f=new W(j.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new Ye(a+h.index,a+h.index+h[0].length,f))}}else s.push(new Ye(a,c,W.empty));a=c}if(!r.validEnd){let l=r.fillBefore(j.empty,!0);t.replace(a,a,new W(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function fS(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Bc(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth,r=0,i=0;;--n){let o=t.$from.node(n),s=t.$from.index(n)+r,a=t.$to.indexAfter(n)-i;if(n<t.depth&&o.canReplace(s,a,e))return n;if(n==0||o.type.spec.isolating||!fS(o,s,a))break;s&&(r=1),a<o.childCount&&(i=1)}return null}function Yd(t,e,n,r){e.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Gd(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+o);t.replaceWith(s,s+1,e.type.schema.text(`
|
|
11
|
+
`))}})}function Wo(t,e,n=1,r){let i=t.resolve(e),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,c=n-2;u>o;u--,c--){let d=i.node(u),h=i.index(u);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=r&&r[c+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[c]||d;if(!d.canReplace(h+1,d.childCount)||!m.type.validContent(f))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function Wd(t,e){let n=t.resolve(e),r=n.index();return(function(i,o){return!(!i||!o||i.isLeaf||!(function(s,a){a.content.size||s.type.compatibleContent(a.type);let l=s.contentMatchAt(s.childCount),{linebreakReplacement:u}=s.type.schema;for(let c=0;c<a.childCount;c++){let d=a.child(c),h=d.type==u?s.type.schema.nodes.text:d.type;if(l=l.matchType(h),!l||!s.type.allowsMarks(d.marks))return!1}return l.validEnd})(i,o))})(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function jc(t,e,n=e,r=W.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),o=t.resolve(n);return dE(i,o,r)?new Ye(e,n,r):new mS(i,o,r).fit()}function dE(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}tt.jsonID("replaceAround",vt);class mS{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=j.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=j.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new W(o,s,a);return e>-1?new vt(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Ye(r.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=ba(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let l,{type:u,match:c}=this.frontier[a],d=null;if(n==1&&(s?c.matchType(s.type)||(d=c.fillBefore(j.from(s),!1)):o&&u.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:d};if(n==2&&s&&(l=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:l};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=ba(e,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new W(e,n+1,Math.max(r,i.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=ba(e,n);if(i.childCount<=1&&n>0){let o=e.size-n<=n+i.size;this.unplaced=new W(gi(e,n-1,1),n-1,o?n-1:r)}else this.unplaced=new W(gi(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,u=0,c=[],{match:d,type:h}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)c.push(i.child(m));d=d.matchFragment(i)}let f=a.size+e-(s.content.size-s.openEnd);for(;u<a.childCount;){let m=a.child(u),E=d.matchType(m.type);if(!E)break;u++,(u>1||l==0||m.content.size)&&(d=E,c.push(hE(m.mark(h.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?f:-1)))}let p=u==a.childCount;p||(f=-1),this.placed=Si(this.placed,n,j.from(c)),this.frontier[n].match=d,p&&f<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,E=a;m<f;m++){let _=E.lastChild;this.frontier.push({type:_.type,match:_.contentMatchAt(_.childCount)}),E=_.content}this.unplaced=p?e==0?W.empty:new W(gi(s.content,e-1,1),e-1,f<0?s.openEnd:e-1):new W(gi(s.content,e,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,n=this.frontier[this.depth];if(!n.type.isTextblock||!wa(this.$to,this.$to.depth,n.type,n.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=wa(e,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=wa(e,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:o?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Si(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Si(this.placed,this.depth,j.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(j.empty,!0);e.childCount&&(this.placed=Si(this.placed,this.frontier.length,e))}}function gi(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(gi(t.firstChild.content,e-1,n)))}function Si(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Si(t.lastChild.content,e-1,n)))}function ba(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function hE(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,hE(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(j.empty,!0)))),t.copy(r)}function wa(t,e,n,r,i){let o=t.node(e),s=i?t.indexAfter(e):t.index(e);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!(function(l,u,c){for(let d=c;d<u.childCount;d++)if(!l.allowsMarks(u.child(d).marks))return!0;return!1})(n,o.content,s)?a:null}function ES(t){return t.spec.defining||t.spec.definingForContent}function pE(t,e,n,r,i){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(pE(o.content,e+1,n,r,o)))}if(e>r){let o=i.contentMatchAt(0),s=o.fillBefore(t).append(t);t=s.append(o.matchFragment(s).fillBefore(j.empty,!0))}return t}function Xd(t,e){let n=[];for(let r=Math.min(t.depth,e.depth);r>=0;r--){let i=t.start(r);if(i<t.pos-(t.depth-r)||e.end(r)>e.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(i==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==i-1)&&n.push(r)}return n}class $r extends tt{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return we.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return we.fromReplace(e,this.pos,this.pos+1,new W(j.from(i),0,n.isLeaf?0:1))}getMap(){return Ot.empty}invert(e){return new $r(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new $r(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new $r(n.pos,n.attr,n.value)}}tt.jsonID("attr",$r);class Gi extends tt{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return we.ok(r)}getMap(){return Ot.empty}invert(e){return new Gi(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Gi(n.attr,n.value)}}tt.jsonID("docAttr",Gi);let Oi=class extends Error{};Oi=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},(Oi.prototype=Object.create(Error.prototype)).constructor=Oi,Oi.prototype.name="TransformError";class _S{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Yi}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Oi(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=W.empty){let i=jc(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new W(j.from(r),0,0))}delete(e,n){return this.replace(e,n,W.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return(function(i,o,s,a){if(!a.size)return i.deleteRange(o,s);let l=i.doc.resolve(o),u=i.doc.resolve(s);if(dE(l,u,a))return i.step(new Ye(o,s,a));let c=Xd(l,u);c[c.length-1]==0&&c.pop();let d=-(l.depth+1);c.unshift(d);for(let E=l.depth,_=l.pos-1;E>0;E--,_--){let A=l.node(E).type.spec;if(A.defining||A.definingAsContext||A.isolating)break;c.indexOf(E)>-1?d=E:l.before(E)==_&&c.splice(1,0,-E)}let h=c.indexOf(d),f=[],p=a.openStart;for(let E=a.content,_=0;;_++){let A=E.firstChild;if(f.push(A),_==a.openStart)break;E=A.content}for(let E=p-1;E>=0;E--){let _=f[E],A=ES(_.type);if(A&&!_.sameMarkup(l.node(Math.abs(d)-1)))p=E;else if(A||!_.type.isTextblock)break}for(let E=a.openStart;E>=0;E--){let _=(E+p+1)%(a.openStart+1),A=f[_];if(A)for(let O=0;O<c.length;O++){let S=c[(O+h)%c.length],v=!0;S<0&&(v=!1,S=-S);let T=l.node(S-1),R=l.index(S-1);if(T.canReplaceWith(R,R,A.type,A.marks))return i.replace(l.before(S),v?u.after(S):s,new W(pE(a.content,0,a.openStart,_),_,a.openEnd))}}let m=i.steps.length;for(let E=c.length-1;E>=0&&(i.replace(o,s,a),!(i.steps.length>m));E--){let _=c[E];_<0||(o=l.before(_),s=u.after(_))}})(this,e,n,r),this}replaceRangeWith(e,n,r){return(function(i,o,s,a){if(!a.isInline&&o==s&&i.doc.resolve(o).parent.content.size){let l=(function(u,c,d){let h=u.resolve(c);if(h.parent.canReplaceWith(h.index(),h.index(),d))return c;if(h.parentOffset==0)for(let f=h.depth-1;f>=0;f--){let p=h.index(f);if(h.node(f).canReplaceWith(p,p,d))return h.before(f+1);if(p>0)return null}if(h.parentOffset==h.parent.content.size)for(let f=h.depth-1;f>=0;f--){let p=h.indexAfter(f);if(h.node(f).canReplaceWith(p,p,d))return h.after(f+1);if(p<h.node(f).childCount)return null}return null})(i.doc,o,a.type);l!=null&&(o=s=l)}i.replaceRange(o,s,new W(j.from(a),0,0))})(this,e,n,r),this}deleteRange(e,n){return(function(r,i,o){let s=r.doc.resolve(i),a=r.doc.resolve(o),l=Xd(s,a);for(let u=0;u<l.length;u++){let c=l[u],d=u==l.length-1;if(d&&c==0||s.node(c).type.contentMatch.validEnd)return r.delete(s.start(c),a.end(c));if(c>0&&(d||s.node(c-1).canReplace(s.index(c-1),a.indexAfter(c-1))))return r.delete(s.before(c),a.after(c))}for(let u=1;u<=s.depth&&u<=a.depth;u++)if(i-s.start(u)==s.depth-u&&o>s.end(u)&&a.end(u)-o!=a.depth-u&&s.start(u-1)==a.start(u-1)&&s.node(u-1).canReplace(s.index(u-1),a.index(u-1)))return r.delete(s.before(u),o);r.delete(i,o)})(this,e,n),this}lift(e,n){return(function(r,i,o){let{$from:s,$to:a,depth:l}=i,u=s.before(l+1),c=a.after(l+1),d=u,h=c,f=j.empty,p=0;for(let _=l,A=!1;_>o;_--)A||s.index(_)>0?(A=!0,f=j.from(s.node(_).copy(f)),p++):d--;let m=j.empty,E=0;for(let _=l,A=!1;_>o;_--)A||a.after(_+1)<a.end(_)?(A=!0,m=j.from(a.node(_).copy(m)),E++):h++;r.step(new vt(d,h,u,c,new W(f.append(m),p,E),f.size-p,!0))})(this,e,n),this}join(e,n=1){return(function(r,i,o){let s=null,{linebreakReplacement:a}=r.doc.type.schema,l=r.doc.resolve(i-o),u=l.node().type;if(a&&u.inlineContent){let f=u.whitespace=="pre",p=!!u.contentMatch.matchType(a);f&&!p?s=!1:!f&&p&&(s=!0)}let c=r.steps.length;if(s===!1){let f=r.doc.resolve(i+o);Gd(r,f.node(),f.before(),c)}u.inlineContent&&Na(r,i+o-1,u,l.node().contentMatchAt(l.index()),s==null);let d=r.mapping.slice(c),h=d.map(i-o);if(r.step(new Ye(h,d.map(i+o,-1),W.empty,!0)),s===!0){let f=r.doc.resolve(h);Yd(r,f.node(),f.before(),r.steps.length)}})(this,e,n),this}wrap(e,n){return(function(r,i,o){let s=j.empty;for(let u=o.length-1;u>=0;u--){if(s.size){let c=o[u].type.contentMatch.matchFragment(s);if(!c||!c.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}s=j.from(o[u].type.create(o[u].attrs,s))}let a=i.start,l=i.end;r.step(new vt(a,l,a,l,new W(s,0,0),o.length,!0))})(this,e,n),this}setBlockType(e,n=e,r,i=null){return(function(o,s,a,l,u){if(!l.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let c=o.steps.length;o.doc.nodesBetween(s,a,(d,h)=>{let f=typeof u=="function"?u(d):u;if(d.isTextblock&&!d.hasMarkup(l,f)&&(function(p,m,E){let _=p.resolve(m),A=_.index();return _.parent.canReplaceWith(A,A+1,E)})(o.doc,o.mapping.slice(c).map(h),l)){let p=null;if(l.schema.linebreakReplacement){let A=l.whitespace=="pre",O=!!l.contentMatch.matchType(l.schema.linebreakReplacement);A&&!O?p=!1:!A&&O&&(p=!0)}p===!1&&Gd(o,d,h,c),Na(o,o.mapping.slice(c).map(h,1),l,void 0,p===null);let m=o.mapping.slice(c),E=m.map(h,1),_=m.map(h+d.nodeSize,1);return o.step(new vt(E,_,E+1,_-1,new W(j.from(l.create(f,null,d.marks)),0,0),1,!0)),p===!0&&Yd(o,d,h,c),!1}})})(this,e,n,r,i),this}setNodeMarkup(e,n,r=null,i){return(function(o,s,a,l,u){let c=o.doc.nodeAt(s);if(!c)throw new RangeError("No node at given position");a||(a=c.type);let d=a.create(l,null,u||c.marks);if(c.isLeaf)return o.replaceWith(s,s+c.nodeSize,d);if(!a.validContent(c.content))throw new RangeError("Invalid content for node type "+a.name);o.step(new vt(s,s+c.nodeSize,s+1,s+c.nodeSize-1,new W(j.from(d),0,0),1,!0))})(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new $r(e,n,r)),this}setDocAttribute(e,n){return this.step(new Gi(e,n)),this}addNodeMark(e,n){return this.step(new Cn(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof pe)n.isInSet(r.marks)&&this.step(new ar(e,n));else{let i,o=r.marks,s=[];for(;i=n.isInSet(o);)s.push(new ar(e,i)),o=i.removeFromSet(o);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(e,n=1,r){return(function(i,o,s=1,a){let l=i.doc.resolve(o),u=j.empty,c=j.empty;for(let d=l.depth,h=l.depth-s,f=s-1;d>h;d--,f--){u=j.from(l.node(d).copy(u));let p=a&&a[f];c=j.from(p?p.type.create(p.attrs,c):l.node(d).copy(c))}i.step(new Ye(o,o,new W(u.append(c),s,s),!0))})(this,e,n,r),this}addMark(e,n,r){return(function(i,o,s,a){let l,u,c=[],d=[];i.doc.nodesBetween(o,s,(h,f,p)=>{if(!h.isInline)return;let m=h.marks;if(!a.isInSet(m)&&p.type.allowsMarkType(a.type)){let E=Math.max(f,o),_=Math.min(f+h.nodeSize,s),A=a.addToSet(m);for(let O=0;O<m.length;O++)m[O].isInSet(A)||(l&&l.to==E&&l.mark.eq(m[O])?l.to=_:c.push(l=new zt(E,_,m[O])));u&&u.to==E?u.to=_:d.push(u=new In(E,_,a))}}),c.forEach(h=>i.step(h)),d.forEach(h=>i.step(h))})(this,e,n,r),this}removeMark(e,n,r){return(function(i,o,s,a){let l=[],u=0;i.doc.nodesBetween(o,s,(c,d)=>{if(!c.isInline)return;u++;let h=null;if(a instanceof Ys){let f,p=c.marks;for(;f=a.isInSet(p);)(h||(h=[])).push(f),p=f.removeFromSet(p)}else a?a.isInSet(c.marks)&&(h=[a]):h=c.marks;if(h&&h.length){let f=Math.min(d+c.nodeSize,s);for(let p=0;p<h.length;p++){let m,E=h[p];for(let _=0;_<l.length;_++){let A=l[_];A.step==u-1&&E.eq(l[_].style)&&(m=A)}m?(m.to=f,m.step=u):l.push({style:E,from:Math.max(d,o),to:f,step:u})}}}),l.forEach(c=>i.step(new zt(c.from,c.to,c.style)))})(this,e,n,r),this}clearIncompatible(e,n,r){return Na(this,e,n,r),this}}const ka=Object.create(null);class he{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new AS(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=W.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:u}=s[a],c=e.mapping.slice(o);e.replaceRange(c.map(l.pos),c.map(u.pos),a?W.empty:n),a==0&&Jd(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],l=e.mapping.slice(r),u=l.map(s.pos),c=l.map(a.pos);o?e.deleteRange(u,c):(e.replaceRangeWith(u,c,n),Jd(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new ce(e):br(e.node(0),e.parent,e.pos,e.index(),n,r);if(i)return i;for(let o=e.depth-1;o>=0;o--){let s=n<0?br(e.node(0),e.node(o),e.before(o+1),e.index(o),n,r):br(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Rt(e.node(0))}static atStart(e){return br(e,e,0,0,1)||new Rt(e)}static atEnd(e){return br(e,e,e.content.size,e.childCount,-1)||new Rt(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ka[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in ka)throw new RangeError("Duplicate use of selection JSON ID "+e);return ka[e]=n,n.prototype.jsonID=e,n}getBookmark(){return ce.between(this.$anchor,this.$head).getBookmark()}}he.prototype.visible=!0;class AS{constructor(e,n){this.$from=e,this.$to=n}}let Kd=!1;function qd(t){Kd||t.parent.inlineContent||(Kd=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class ce extends he{constructor(e,n=e){qd(e),qd(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return he.near(r);let i=e.resolve(n.map(this.anchor));return new ce(i.parent.inlineContent?i:r,r)}replace(e,n=W.empty){if(super.replace(e,n),n==W.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof ce&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Gs(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ce(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let i=e.resolve(n);return new this(i,r==n?i:e.resolve(r))}static between(e,n,r){let i=e.pos-n.pos;if(r&&!i||(r=i>=0?1:-1),!n.parent.inlineContent){let o=he.findFrom(n,r,!0)||he.findFrom(n,-r,!0);if(!o)return he.near(n,r);n=o.$head}return e.parent.inlineContent||(i==0||(e=(he.findFrom(e,-r,!0)||he.findFrom(e,r,!0)).$anchor).pos<n.pos!=i<0)&&(e=n),new ce(e,n)}}he.jsonID("text",ce);class Gs{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Gs(e.map(this.anchor),e.map(this.head))}resolve(e){return ce.between(e.resolve(this.anchor),e.resolve(this.head))}}class Z extends he{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=e.resolve(i);return r?he.near(o):new Z(o)}content(){return new W(j.from(this.node),0,0)}eq(e){return e instanceof Z&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new $c(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Z(e.resolve(n.anchor))}static create(e,n){return new Z(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Z.prototype.visible=!1,he.jsonID("node",Z);class $c{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Gs(r,r):new $c(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&Z.isSelectable(r)?new Z(n):he.near(n)}}class Rt extends he{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=W.empty){if(n==W.empty){e.delete(0,e.doc.content.size);let r=he.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Rt(e)}map(e){return new Rt(e)}eq(e){return e instanceof Rt}getBookmark(){return gS}}he.jsonID("all",Rt);const gS={map(){return this},resolve:t=>new Rt(t)};function br(t,e,n,r,i,o=!1){if(e.inlineContent)return ce.create(t,n);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let a=e.child(s);if(a.isAtom){if(!o&&Z.isSelectable(a))return Z.create(t,n-(i<0?a.nodeSize:0))}else{let l=br(t,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function Jd(t,e,n){let r=t.steps.length-1;if(r<e)return;let i,o=t.steps[r];(o instanceof Ye||o instanceof vt)&&(t.mapping.maps[r].forEach((s,a,l,u)=>{i==null&&(i=u)}),t.setSelection(he.near(t.doc.resolve(i),n)))}class SS extends _S{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return pe.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,n){super.addStep(e,n),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||pe.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let i=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r==null?n:r,!e)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(e,o)),this.selection.empty||this.setSelection(he.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function Zd(t,e){return e&&t?t.bind(e):t}class vi{constructor(e,n,r){this.name=e,this.init=Zd(n.init,r),this.apply=Zd(n.apply,r)}}const OS=[new vi("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new vi("selection",{init:(t,e)=>t.selection||he.atStart(e.doc),apply:t=>t.selection}),new vi("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new vi("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class La{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=OS.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new vi(r.key,r.spec.state,r))})}}class Fr{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=i?i[s].n:0,u=i?i[s].state:this,c=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,u,r);if(c&&r.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",e),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<s?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),o=!0}i&&(i[s]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Fr(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new SS(this)}static create(e){let n=new La(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Fr(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(e,r);return r}reconfigure(e){let n=new La(this.schema,e.plugins),r=n.fields,i=new Fr(n);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(e,i)}return i}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],o=i.spec.state;o&&o.toJSON&&(n[r]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new La(e.schema,e.plugins),o=new Fr(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=nr.fromJSON(e.schema,n.doc);else if(s.name=="selection")o.selection=he.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],u=l.spec.state;if(l.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a))return void(o[s.name]=u.fromJSON.call(l,e,n[a],o))}o[s.name]=s.init(e,o)}}),o}}function fE(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=fE(i,e,{})),n[r]=i}return n}class Ws{constructor(e){this.spec=e,this.props={},e.props&&fE(e.props,this,this.props),this.key=e.key?e.key.key:mE("plugin")}getState(e){return e[this.key]}}const Ma=Object.create(null);function mE(t){return t in Ma?t+"$"+ ++Ma[t]:(Ma[t]=0,t+"$")}class Xs{constructor(e="key"){this.key=mE(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Ge=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},ei=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let xl=null;const an=function(t,e,n){let r=xl||(xl=document.createRange());return r.setEnd(t,n==null?t.nodeValue.length:n),r.setStart(t,e||0),r},lr=function(t,e,n,r){return n&&(Qd(t,e,n,r,-1)||Qd(t,e,n,r,1))},vS=/^(img|br|input|textarea|hr)$/i;function Qd(t,e,n,r,i){for(var o;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Ct(t))){let s=t.parentNode;if(!s||s.nodeType!=1||Wi(t)||vS.test(t.nodeName)||t.contentEditable=="false")return!1;e=Ge(t)+(i<0?0:1),t=s}else{if(t.nodeType!=1)return!1;{let s=t.childNodes[e+(i<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false"){if(!(!((o=s.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection))return!1;e+=i}else t=s,e=i<0?Ct(t):0}}}}function Ct(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Wi(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Ks=function(t){return t.focusNode&&lr(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Xn(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const qt=typeof navigator!="undefined"?navigator:null,eh=typeof document!="undefined"?document:null,Un=qt&&qt.userAgent||"",Fl=/Edge\/(\d+)/.exec(Un),EE=/MSIE \d/.exec(Un),Hl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Un),Et=!!(EE||Hl||Fl),Ln=EE?document.documentMode:Hl?+Hl[1]:Fl?+Fl[1]:0,wt=!Et&&/gecko\/(\d+)/i.test(Un);wt&&(/Firefox\/(\d+)/.exec(Un)||[0,0])[1];const Ul=!Et&&/Chrome\/(\d+)/.exec(Un),He=!!Ul,_E=Ul?+Ul[1]:0,We=!Et&&!!qt&&/Apple Computer/.test(qt.vendor),ti=We&&(/Mobile\/\w+/.test(Un)||!!qt&&qt.maxTouchPoints>2),It=ti||!!qt&&/Mac/.test(qt.platform),AE=!!qt&&/Win/.test(qt.platform),un=/Android \d/.test(Un),co=!!eh&&"webkitFontSmoothing"in eh.documentElement.style,DS=co?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function TS(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function on(t,e){return typeof t=="number"?t:t[e]}function RS(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function th(t,e,n){let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=ei(s);continue}let a=s,l=a==o.body,u=l?TS(o):RS(a),c=0,d=0;if(e.top<u.top+on(r,"top")?d=-(u.top-e.top+on(i,"top")):e.bottom>u.bottom-on(r,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+on(i,"top")-u.top:e.bottom-u.bottom+on(i,"bottom")),e.left<u.left+on(r,"left")?c=-(u.left-e.left+on(i,"left")):e.right>u.right-on(r,"right")&&(c=e.right-u.right+on(i,"right")),c||d)if(l)o.defaultView.scrollBy(c,d);else{let f=a.scrollLeft,p=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let m=a.scrollLeft-f,E=a.scrollTop-p;e={left:e.left-m,top:e.top-E,right:e.right-m,bottom:e.bottom-E}}let h=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(h))break;s=h=="absolute"?s.offsetParent:ei(s)}}function nh(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=ei(r));return e}function rh(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:o}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let Ir=null;function gE(t,e){let n,r,i,o,s=2e8,a=0,l=e.top,u=e.top;for(let c=t.firstChild,d=0;c;c=c.nextSibling,d++){let h;if(c.nodeType==1)h=c.getClientRects();else{if(c.nodeType!=3)continue;h=an(c).getClientRects()}for(let f=0;f<h.length;f++){let p=h[f];if(p.top<=l&&p.bottom>=u){l=Math.max(p.bottom,l),u=Math.min(p.top,u);let m=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(m<s){n=c,s=m,r=m&&n.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,c.nodeType==1&&m&&(a=d+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!i&&p.left<=e.left&&p.right>=e.left&&(i=c,o={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(a=d+1)}}return!n&&i&&(n=i,r=o,s=0),n&&n.nodeType==3?(function(c,d){let h,f=c.nodeValue.length,p=document.createRange();for(let m=0;m<f;m++){p.setEnd(c,m+1),p.setStart(c,m);let E=Sn(p,1);if(E.top!=E.bottom&&Vc(d,E)){h={node:c,offset:m+(d.left>=(E.left+E.right)/2?1:0)};break}}return p.detach(),h||{node:c,offset:0}})(n,r):!n||s&&n.nodeType==1?{node:t,offset:a}:gE(n,r)}function Vc(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function SE(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let s=t.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(Vc(e,u))return SE(s,e,u)}}if((o=(o+1)%r)==i)break}return t}function yS(t,e){let n,r=t.dom.ownerDocument,i=0,o=(function(u,c,d){if(u.caretPositionFromPoint)try{let h=u.caretPositionFromPoint(c,d);if(h)return{node:h.offsetNode,offset:Math.min(Ct(h.offsetNode),h.offset)}}catch(h){}if(u.caretRangeFromPoint){let h=u.caretRangeFromPoint(c,d);if(h)return{node:h.startContainer,offset:Math.min(Ct(h.startContainer),h.startOffset)}}})(r,e.left,e.top);o&&({node:n,offset:i}=o);let s,a=(t.root.elementFromPoint?t.root:r).elementFromPoint(e.left,e.top);if(!a||!t.dom.contains(a.nodeType!=1?a.parentNode:a)){let u=t.dom.getBoundingClientRect();if(!Vc(e,u)||(a=SE(t.dom,e,u),!a))return null}if(We)for(let u=a;n&&u;u=ei(u))u.draggable&&(n=void 0);if(a=(function(u,c){let d=u.parentNode;return d&&/^li$/i.test(d.nodeName)&&c.left<u.getBoundingClientRect().left?d:u})(a,e),n){if(wt&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let c,d=n.childNodes[i];d.nodeName=="IMG"&&(c=d.getBoundingClientRect()).right<=e.left&&c.bottom>e.top&&i++}let u;co&&i&&n.nodeType==1&&(u=n.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&i--,n==t.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:i!=0&&n.nodeType==1&&n.childNodes[i-1].nodeName=="BR"||(s=(function(c,d,h,f){let p=-1;for(let m=d,E=!1;m!=c.dom;){let _,A=c.docView.nearestDesc(m,!0);if(!A)return null;if(A.dom.nodeType==1&&(A.node.isBlock&&A.parent||!A.contentDOM)&&((_=A.dom.getBoundingClientRect()).width||_.height)&&(A.node.isBlock&&A.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(A.dom.nodeName)&&(!E&&_.left>f.left||_.top>f.top?p=A.posBefore:(!E&&_.right<f.left||_.bottom<f.top)&&(p=A.posAfter),E=!0),!A.contentDOM&&p<0&&!A.node.isText))return(A.node.isBlock?f.top<(_.top+_.bottom)/2:f.left<(_.left+_.right)/2)?A.posBefore:A.posAfter;m=A.dom.parentNode}return p>-1?p:c.docView.posFromDOM(d,h,-1)})(t,n,i,e))}s==null&&(s=(function(u,c,d){let{node:h,offset:f}=gE(c,d),p=-1;if(h.nodeType==1&&!h.firstChild){let m=h.getBoundingClientRect();p=m.left!=m.right&&d.left>(m.left+m.right)/2?1:-1}return u.docView.posFromDOM(h,f,p)})(t,a,e));let l=t.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function ih(t){return t.top<t.bottom||t.left<t.right}function Sn(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(ih(r))return r}return Array.prototype.find.call(n,ih)||t.getBoundingClientRect()}const IS=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function OE(t,e,n){let{node:r,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),s=co||wt;if(r.nodeType==3){if(!s||!IS.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let a=i,l=i,u=n<0?1:-1;return n<0&&!i?(l++,u=-1):n>=0&&i==r.nodeValue.length?(a--,u=1):n<0?a--:l++,fi(Sn(an(r,a,l),u),u<0)}{let a=Sn(an(r,i,i),n);if(wt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=Sn(an(r,i-1,i-1),-1);if(l.top==a.top){let u=Sn(an(r,i,i+1),-1);if(u.top!=a.top)return fi(u,u.left<l.left)}}return a}}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==Ct(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return Pa(a.getBoundingClientRect(),!1)}if(o==null&&i<Ct(r)){let a=r.childNodes[i];if(a.nodeType==1)return Pa(a.getBoundingClientRect(),!0)}return Pa(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==Ct(r))){let a=r.childNodes[i-1],l=a.nodeType==3?an(a,Ct(a)-(s?0:1)):a.nodeType!=1||a.nodeName=="BR"&&a.nextSibling?null:a;if(l)return fi(Sn(l,1),!1)}if(o==null&&i<Ct(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?an(a,0,s?0:1):a.nodeType==1?a:null:null;if(l)return fi(Sn(l,-1),!0)}return fi(Sn(r.nodeType==3?an(r):r,-n),n>=0)}function fi(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Pa(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function oh(t,e,n){let r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}const CS=/[\u0590-\u08ac]/;let sh=null,ah=null,lh=!1;function NS(t,e,n){return sh==e&&ah==n?lh:(sh=e,ah=n,lh=n=="up"||n=="down"?(function(r,i,o){let s=i.selection,a=o=="up"?s.$from:s.$to;return oh(r,i,()=>{let{node:l}=r.docView.domFromPos(a.pos,o=="up"?-1:1);for(;;){let c=r.docView.nearestDesc(l,!0);if(!c)break;if(c.node.isBlock){l=c.contentDOM||c.dom;break}l=c.dom.parentNode}let u=OE(r,a.pos,1);for(let c=l.firstChild;c;c=c.nextSibling){let d;if(c.nodeType==1)d=c.getClientRects();else{if(c.nodeType!=3)continue;d=an(c,0,c.nodeValue.length).getClientRects()}for(let h=0;h<d.length;h++){let f=d[h];if(f.bottom>f.top+1&&(o=="up"?u.top-f.top>2*(f.bottom-u.top):f.bottom-u.bottom>2*(u.bottom-f.top)))return!1}}return!0})})(t,e,n):(function(r,i,o){let{$head:s}=i.selection;if(!s.parent.isTextblock)return!1;let a=s.parentOffset,l=!a,u=a==s.parent.content.size,c=r.domSelection();return c?CS.test(s.parent.textContent)&&c.modify?oh(r,i,()=>{let{focusNode:d,focusOffset:h,anchorNode:f,anchorOffset:p}=r.domSelectionRange(),m=c.caretBidiLevel;c.modify("move",o,"character");let E=s.depth?r.docView.domAfterPos(s.before()):r.dom,{focusNode:_,focusOffset:A}=r.domSelectionRange(),O=_&&!E.contains(_.nodeType==1?_:_.parentNode)||d==_&&h==A;try{c.collapse(f,p),d&&(d!=f||h!=p)&&c.extend&&c.extend(d,h)}catch(S){}return m!=null&&(c.caretBidiLevel=m),O}):o=="left"||o=="backward"?l:u:s.pos==s.start()||s.pos==s.end()})(t,e,n))}class uo{constructor(e,n,r,i){this.parent=e,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=0,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode)){if(r<0){let o,s;if(e==this.contentDOM)o=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&(!(s=o.pmViewDesc)||s.parent!=this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}{let o,s;if(e==this.contentDOM)o=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&(!(s=o.pmViewDesc)||s.parent!=this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}}let i;if(e==this.dom&&this.contentDOM)i=n>Ge(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(n==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return(i==null?r>0:i)?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,i=e;i;i=i.parentNode){let o,s=this.getDesc(i);if(s&&(!n||s.node)){if(!r||!(o=s.nodeDOM)||(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))return s;r=!1}}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],o=r+i.size;if(r==e&&o!=r){for(;!i.border&&i.children.length;)for(let s=0;s<i.children.length;s++){let a=i.children[s];if(a.size){i=a;break}}return i}if(e<o)return i.descAt(e-r-i.border);r=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.size;if(a>e||s instanceof DE){i=e-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof vE&&o.side>=0;r--);if(n<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,o&&o.dom.parentNode!=this.contentDOM;r--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?Ge(o.dom)+1:0}}{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,o&&o.dom.parentNode!=this.contentDOM;r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?Ge(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,a=0;;a++){let l=this.children[a],u=s+l.size;if(i==-1&&e<=u){let c=s+l.border;if(e>=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,c);e=s;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=Ge(h.dom)+1;break}e-=h.size}i==-1&&(i=0)}if(i>-1&&(u>n||a==this.children.length-1)){n=u;for(let c=a+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=Ge(d.dom);break}n+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,i=!1){let o=Math.min(e,n),s=Math.max(e,n);for(let f=0,p=0;f<this.children.length;f++){let m=this.children[f],E=p+m.size;if(o>p&&s<E)return m.setSelection(e-p-m.border,n-p-m.border,r,i);p=E}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),c=r.domSelectionRange(),d=!1;if((wt||We)&&e==n){let{node:f,offset:p}=a;if(f.nodeType==3){if(d=!(!p||f.nodeValue[p-1]!=`
|
|
12
|
+
`),d&&p==f.nodeValue.length)for(let m,E=f;E;E=E.parentNode){if(m=E.nextSibling){m.nodeName=="BR"&&(a=l={node:m.parentNode,offset:Ge(m)+1});break}let _=E.pmViewDesc;if(_&&_.node&&_.node.isBlock)break}}else{let m=f.childNodes[p-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(wt&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let f=c.focusNode.childNodes[c.focusOffset];f&&f.contentEditable=="false"&&(i=!0)}if(!(i||d&&We)&&lr(a.node,a.offset,c.anchorNode,c.anchorOffset)&&lr(l.node,l.offset,c.focusNode,c.focusOffset))return;let h=!1;if((u.extend||e==n)&&(!d||!wt)){u.collapse(a.node,a.offset);try{e!=n&&u.extend(l.node,l.offset),h=!0}catch(f){}}if(!h){if(e>n){let p=a;a=l,l=p}let f=document.createRange();f.setEnd(l.node,l.offset),f.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(f)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let a=r+o.border,l=s-o.border;if(e>=a&&n<=l)return this.dirty=e==r||n==s?2:1,void(e!=a||n!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,n-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}r=s}this.dirty=2}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?2:1;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class vE extends uo{constructor(e,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>o?o.parent?o.parent.posBeforeChild(o):void 0:i)),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==0&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return!!n&&n(e)}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class bS extends uo{constructor(e,n,r,i){super(e,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class rr extends uo{constructor(e,n,r,i,o){super(e,[],r,i),this.mark=n,this.spec=o}static create(e,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return s&&s.dom||(s=ai.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new rr(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=3&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=0){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}slice(e,n,r){let i=rr.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=jl(o,n,s,r)),e>0&&(o=jl(o,0,e,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Mn extends uo{constructor(e,n,r,i,o,s,a,l,u){super(e,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(e,n,r,i,o,s){let a,l=o.nodeViews[n.type.name],u=l&&l(n,o,()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s,r,i),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText)if(c){if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(n.text);else c||({dom:c,contentDOM:d}=ai.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));d||n.isText||c.nodeName=="BR"||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let h=c;return c=yE(c,r,n),u?a=new wS(e,n,r,i,c,d||null,h,u,o,s+1):n.isText?new qs(e,n,r,i,c,h,o):new Mn(e,n,r,i,c,d||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>j.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,n,r){return this.dirty==0&&e.eq(this.node)&&fs(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,i=n,o=e.composing?this.localCompositionInfo(e,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new LS(this,s&&s.node,e);(function(u,c,d,h){let f=c.locals(u),p=0;if(f.length==0){for(let A=0;A<u.childCount;A++){let O=u.child(A);h(O,f,c.forChild(p,O),A),p+=O.nodeSize}return}let m=0,E=[],_=null;for(let A=0;;){let O,S,v,T;for(;m<f.length&&f[m].to==p;){let g=f[m++];g.widget&&(O?(S||(S=[O])).push(g):O=g)}if(O)if(S){S.sort(MS);for(let g=0;g<S.length;g++)d(S[g],A,!!_)}else d(O,A,!!_);if(_)T=-1,v=_,_=null;else{if(!(A<u.childCount))break;T=A,v=u.child(A++)}for(let g=0;g<E.length;g++)E[g].to<=p&&E.splice(g--,1);for(;m<f.length&&f[m].from<=p&&f[m].to>p;)E.push(f[m++]);let R=p+v.nodeSize;if(v.isText){let g=R;m<f.length&&f[m].from<g&&(g=f[m].from);for(let D=0;D<E.length;D++)E[D].to<g&&(g=E[D].to);g<R&&(_=v.cut(g-p),v=v.cut(0,g-p),R=g,T=-1)}else for(;m<f.length&&f[m].to<R;)m++;let I=v.isInline&&!v.isLeaf?E.filter(g=>!g.inline):E.slice();h(v,I,c.forChild(p,v),T),p=R}})(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,e,c):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?pe.none:this.node.child(c).marks,r,e,c),l.placeWidget(u,e,i)},(u,c,d,h)=>{let f;l.syncToMarks(u.marks,r,e,h),l.findNodeMatch(u,c,d,h)||a&&e.state.selection.from>i&&e.state.selection.to<i+u.nodeSize&&(f=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(u,c,d,f,e)||l.updateNextNode(u,c,d,e,h,i)||l.addNode(u,c,d,e,i),i+=u.nodeSize}),l.syncToMarks([],r,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==2)&&(s&&this.protectLocalComposition(e,s),TE(this.contentDOM,this.children,e),ti&&(function(u){if(u.nodeName=="UL"||u.nodeName=="OL"){let c=u.style.cssText;u.style.cssText=c+"; list-style: square !important",window.getComputedStyle(u).listStyle,u.style.cssText=c}})(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof ce)||r<n||i>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=(function(l,u,c,d){for(let h=0,f=0;h<l.childCount&&f<=d;){let p=l.child(h++),m=f;if(f+=p.nodeSize,!p.isText)continue;let E=p.text;for(;h<l.childCount;){let _=l.child(h++);if(f+=_.nodeSize,!_.isText)break;E+=_.text}if(f>=c){if(f>=d&&E.slice(d-u.length-m,d-m)==u)return d-u.length;let _=m<d?E.lastIndexOf(u,d-m-1):-1;if(_>=0&&_+u.length+m>=c)return m+_;if(c==d&&E.length>=d+u.length-m&&E.slice(d-m,d-m+u.length)==u)return d}}return-1})(this.node.content,s,r-n,i-n);return a<0?null:{node:o,pos:a,text:s}}return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new bS(this,o,n,i);e.input.compositionNodes.push(s),this.children=jl(this.children,r,r+i.length,e,s)}update(e,n,r,i){return!(this.dirty==3||!e.sameMarkup(this.node))&&(this.updateInner(e,n,r,i),!0)}updateInner(e,n,r,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(fs(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=RE(this.dom,this.nodeDOM,Bl(this.outerDeco,this.node,n),Bl(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function ch(t,e,n,r,i){yE(r,e,t);let o=new Mn(void 0,t,e,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class qs extends Mn{constructor(e,n,r,i,o,s,a){super(e,n,r,i,o,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,i){return!(this.dirty==3||this.dirty!=0&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(n),this.dirty==0&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let i=this.node.cut(e,n),o=document.createTextNode(i.text);return new qs(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,n){super.markDirty(e,n),this.dom==this.nodeDOM||e!=0&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}}class DE extends uo{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==0&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class wS extends Mn{constructor(e,n,r,i,o,s,a,l,u,c){super(e,n,r,i,o,s,a,u,c),this.spec=l}update(e,n,r,i){if(this.dirty==3)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,n,r);return o&&this.updateInner(e,n,r,i),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function TE(t,e,n){let r=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=s.dom;if(a.parentNode==t){for(;a!=r;)r=uh(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(s instanceof rr){let l=r?r.previousSibling:t.lastChild;TE(s.contentDOM,s.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=uh(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const Ni=function(t){t&&(this.nodeName=t)};Ni.prototype=Object.create(null);const Jn=[new Ni];function Bl(t,e,n){if(t.length==0)return Jn;let r=n?Jn[0]:new Ni,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new Ni(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new Ni(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return i}function RE(t,e,n,r){if(n==Jn&&r==Jn)return e;let i=e;for(let o=0;o<r.length;o++){let s=r[o],a=n[o];if(o){let l;a&&a.nodeName==s.nodeName&&i!=t&&(l=i.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=Jn[0]),i=l}kS(i,a||Jn[0],s)}return i}function kS(t,e,n){for(let r in e)r=="class"||r=="style"||r=="nodeName"||r in n||t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&t.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&t.classList.add(i[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r,i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;r=i.exec(e.style);)t.style.removeProperty(r[1])}n.style&&(t.style.cssText+=n.style)}}function yE(t,e,n){return RE(t,t,Jn,Bl(e,n,t.nodeType!=1))}function fs(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function uh(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class LS{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=(function(i,o){let s=o,a=s.children.length,l=i.childCount,u=new Map,c=[];e:for(;l>0;){let d;for(;;)if(a){let f=s.children[a-1];if(!(f instanceof rr)){d=f,a--;break}s=f,a=f.children.length}else{if(s==o)break e;a=s.parent.children.indexOf(s),s=s.parent}let h=d.node;if(h){if(h!=i.child(l-1))break;--l,u.set(d,l),c.push(d)}}return{index:l,matched:u,matches:c.reverse()}})(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,i){let o=0,s=this.stack.length>>1,a=Math.min(s,e.length);for(;o<a&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let l=-1,u=this.top.children.length;i<this.preMatch.index&&(u=Math.min(this.index+3,u));for(let c=this.index;c<u;c++){let d=this.top.children[c];if(d.matchesMark(e[s])&&!this.isLocked(d.dom)){l=c;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let c=rr.create(this.top,e[s],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,r,i){let o,s=-1;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,n,r))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(e,n,r)&&!this.preMatch.matched.has(u)){s=a;break}}return!(s<0)&&(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,n,r,i,o){let s=this.top.children[i];return s.dirty==3&&s.dom==s.contentDOM&&(s.dirty=2),!!s.update(e,n,r,o)&&(this.destroyBetween(this.index,i),this.index++,!0)}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=n}}updateNextNode(e,n,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Mn){let u=this.preMatch.matched.get(l);if(u!=null&&u!=o)return!1;let c,d=l.dom,h=this.isLocked(d)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=3&&fs(n,l.outerDeco));if(!h&&l.update(e,n,r,i))return this.destroyBetween(this.index,a),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(c=this.recreateWrapper(l,e,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(i,s+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,i,o,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!fs(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let a=Mn.create(this.top,n,r,i,o,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,i,o){let s=Mn.create(this.top,e,n,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(!i||!i.matchesWidget(e)||e!=i.widget&&i.widget.type.toDOM.parentNode){let o=new vE(this.top,e,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof rr;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof qs)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((We||He)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new DE(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function MS(t,e){return t.type.side-e.type.side}function jl(t,e,n,r,i){let o=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],u=a,c=a+=l.size;u>=n||c<=e?o.push(l):(u<e&&o.push(l.slice(0,e-u,r)),i&&(o.push(i),i=void 0),c>n&&o.push(l.slice(n-u,l.size,r)))}return o}function zc(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),o=i&&i.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,u=r.resolve(s);if(Ks(n)){for(a=s;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&Z.isSelectable(d)&&i.parent&&(!d.isInline||!(function(h,f,p){for(let m=f==0,E=f==Ct(h);m||E;){if(h==p)return!0;let _=Ge(h);if(!(h=h.parentNode))return!1;m=m&&_==0,E=E&&_==Ct(h)}})(n.focusNode,n.focusOffset,i.dom))){let h=i.posBefore;l=new Z(s==h?u:r.resolve(h))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,h=s;for(let f=0;f<n.rangeCount;f++){let p=n.getRangeAt(f);d=Math.min(d,t.docView.posFromDOM(p.startContainer,p.startOffset,1)),h=Math.max(h,t.docView.posFromDOM(p.endContainer,p.endOffset,-1))}if(d<0)return null;[a,s]=h==t.state.selection.anchor?[h,d]:[d,h],u=r.resolve(s)}else a=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let c=r.resolve(a);return l||(l=Yc(t,c,u,e=="pointer"||t.state.selection.head<u.pos&&!o?1:-1)),l}function dh(t){return t.editable?t.hasFocus():CE(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function pn(t,e=!1){let n=t.state.selection;if(IE(t,n),dh(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&He){let r=t.domSelectionRange(),i=t.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&lr(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset))return t.input.mouseDown.delayedSelectionSync=!0,void t.domObserver.setCurSelection()}if(t.domObserver.disconnectSelection(),t.cursorWrapper)(function(r){let i=r.domSelection();if(!i)return;let o=r.cursorWrapper.dom,s=o.nodeName=="IMG";s?i.collapse(o.parentNode,Ge(o)+1):i.collapse(o,0),!s&&!r.state.selection.visible&&Et&&Ln<=11&&(o.disabled=!0,o.disabled=!1)})(t);else{let r,i,{anchor:o,head:s}=n;!hh||n instanceof ce||(n.$from.parent.inlineContent||(r=ph(t,n.from)),n.empty||n.$from.parent.inlineContent||(i=ph(t,n.to))),t.docView.setSelection(o,s,t,e),hh&&(r&&fh(r),i&&fh(i)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&(function(a){let l=a.dom.ownerDocument;l.removeEventListener("selectionchange",a.input.hideSelectionGuard);let u=a.domSelectionRange(),c=u.anchorNode,d=u.anchorOffset;l.addEventListener("selectionchange",a.input.hideSelectionGuard=()=>{u.anchorNode==c&&u.anchorOffset==d||(l.removeEventListener("selectionchange",a.input.hideSelectionGuard),setTimeout(()=>{dh(a)&&!a.state.selection.visible||a.dom.classList.remove("ProseMirror-hideselection")},20))})})(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const hh=We||He&&_E<63;function ph(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(We&&i&&i.contentEditable=="false")return xa(i);if(!(i&&i.contentEditable!="false"||o&&o.contentEditable!="false")){if(i)return xa(i);if(o)return xa(o)}}function xa(t){return t.contentEditable="true",We&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function fh(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function IE(t,e){if(e instanceof Z){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(mh(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else mh(t)}function mh(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Yc(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||ce.between(e,n,r)}function Eh(t){return!(t.editable&&!t.hasFocus())&&CE(t)}function CE(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch(n){return!1}}function $l(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return o&&he.findFrom(o,e)}function vn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function _h(t,e,n){let r=t.state.selection;if(!(r instanceof ce)){if(r instanceof Z&&r.node.isInline)return vn(t,new ce(e>0?r.$to:r.$from));{let i=$l(t.state,e);return!!i&&vn(t,i)}}if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return vn(t,new ce(r.$anchor,s))}if(!r.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let i=$l(t.state,e);return!!(i&&i instanceof Z)&&vn(t,i)}if(!(It&&n.indexOf("m")>-1)){let i,o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;let a=e<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(i=t.docView.descAt(a))&&!i.contentDOM)&&(Z.isSelectable(s)?vn(t,new Z(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):!!co&&vn(t,new ce(t.state.doc.resolve(e<0?a:a+s.nodeSize))))}}function wo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function mi(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Cr(t,e){return e<0?(function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=!1;for(wt&&i.nodeType==1&&o<wo(i)&&mi(i.childNodes[o],-1)&&(l=!0);;)if(o>0){if(i.nodeType!=1)break;{let u=i.childNodes[o-1];if(mi(u,-1))s=i,a=--o;else{if(u.nodeType!=3)break;i=u,o=i.nodeValue.length}}}else{if(Ah(i))break;{let u=i.previousSibling;for(;u&&mi(u,-1);)s=i.parentNode,a=Ge(u),u=u.previousSibling;if(u)i=u,o=wo(i);else{if(i=i.parentNode,i==n.dom)break;o=0}}}l?Fa(n,i,o):s&&Fa(n,s,a)})(t):(function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=wo(i);for(;;)if(o<l){if(i.nodeType!=1||!mi(i.childNodes[o],1))break;s=i,a=++o}else{if(Ah(i))break;{let u=i.nextSibling;for(;u&&mi(u,1);)s=u.parentNode,a=Ge(u)+1,u=u.nextSibling;if(u)i=u,o=0,l=wo(i);else{if(i=i.parentNode,i==n.dom)break;o=l=0}}}s&&Fa(n,s,a)})(t)}function Ah(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Fa(t,e,n){if(e.nodeType!=3){let o,s;(s=(function(a,l){for(;a&&l==a.childNodes.length&&!Wi(a);)l=Ge(a)+1,a=a.parentNode;for(;a&&l<a.childNodes.length;){let u=a.childNodes[l];if(u.nodeType==3)return u;if(u.nodeType==1&&u.contentEditable=="false")break;a=u,l=0}})(e,n))?(e=s,n=0):(o=(function(a,l){for(;a&&!l&&!Wi(a);)l=Ge(a),a=a.parentNode;for(;a&&l;){let u=a.childNodes[l-1];if(u.nodeType==3)return u;if(u.nodeType==1&&u.contentEditable=="false")break;l=(a=u).childNodes.length}})(e,n))&&(e=o,n=o.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Ks(r)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&pn(t)},50)}function gh(t,e){let n=t.state.doc.resolve(e);if(!He&&!AE&&n.parent.inlineContent){let r=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left<r.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left>r.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Sh(t,e,n){let r=t.state.selection;if(r instanceof ce&&!r.empty||n.indexOf("s")>-1||It&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=$l(t.state,e);if(s&&s instanceof Z)return vn(t,s)}if(!i.parent.inlineContent){let s=e<0?i:o,a=r instanceof Rt?he.near(s,e):he.findFrom(s,e);return!!a&&vn(t,a)}return!1}function Oh(t,e){if(!(t.state.selection instanceof ce))return!0;let{$head:n,$anchor:r,empty:i}=t.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=t.state.tr;return e<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),t.dispatch(s),!0}return!1}function vh(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function PS(t,e){let n=e.keyCode,r=(function(i){let o="";return i.ctrlKey&&(o+="c"),i.metaKey&&(o+="m"),i.altKey&&(o+="a"),i.shiftKey&&(o+="s"),o})(e);if(n==8||It&&n==72&&r=="c")return Oh(t,-1)||Cr(t,-1);if(n==46&&!e.shiftKey||It&&n==68&&r=="c")return Oh(t,1)||Cr(t,1);if(n==13||n==27)return!0;if(n==37||It&&n==66&&r=="c"){let i=n==37?gh(t,t.state.selection.from)=="ltr"?-1:1:-1;return _h(t,i,r)||Cr(t,i)}if(n==39||It&&n==70&&r=="c"){let i=n==39?gh(t,t.state.selection.from)=="ltr"?1:-1:1;return _h(t,i,r)||Cr(t,i)}return n==38||It&&n==80&&r=="c"?Sh(t,-1,r)||Cr(t,-1):n==40||It&&n==78&&r=="c"?(function(i){if(!We||i.state.selection.$head.parentOffset>0)return!1;let{focusNode:o,focusOffset:s}=i.domSelectionRange();if(o&&o.nodeType==1&&s==0&&o.firstChild&&o.firstChild.contentEditable=="false"){let a=o.firstChild;vh(i,a,"true"),setTimeout(()=>vh(i,a,"false"),20)}return!1})(t)||Sh(t,1,r)||Cr(t,1):r==(It?"m":"c")&&(n==66||n==73||n==89||n==90)}function Gc(t,e){t.someProp("transformCopied",f=>{e=f(e,t)});let n=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let f=r.firstChild;n.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),r=f.content}let s=t.someProp("clipboardSerializer")||ai.fromSchema(t.state.schema),a=ME(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u,c=l.firstChild,d=0;for(;c&&c.nodeType==1&&(u=LE[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){let p=a.createElement(u[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,`
|
|
13
13
|
|
|
14
|
-
`);return{dom:l,text:h,slice:e}}function
|
|
15
|
-
`))),0,0),t.someProp("transformPasted",h=>{s=h(s,t,!0)}),s;let d=t.someProp("clipboardTextParser",h=>h(e,i,r,t));if(d)s=d;else{let h=i.marks(),{schema:p}=t.state,f=ai.fromSchema(p);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let E=o.appendChild(document.createElement("p"));m&&E.appendChild(f.serializeNode(p.text(m,h)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),o=(function(d){let h=/^(\s*<meta [^>]*>)*/.exec(d);h&&(d=d.slice(h[0].length));let p,f=LE().createElement("div"),m=/<([a-z][^>\s]+)/i.exec(d);if((p=m&&kE[m[1].toLowerCase()])&&(d=p.map(E=>"<"+E+">").join("")+d+p.map(E=>"</"+E+">").reverse().join("")),f.innerHTML=(function(E){let _=window.trustedTypes;return _?(Ha||(Ha=_.defaultPolicy||_.createPolicy("ProseMirrorClipboard",{createHTML:A=>A})),Ha.createHTML(E)):E})(d),p)for(let E=0;E<p.length;E++)f=f.querySelector(p[E])||f;return f})(n),co&&(function(d){let h=d.querySelectorAll(He?"span:not([class]):not([style])":"span.Apple-converted-space");for(let p=0;p<h.length;p++){let f=h[p];f.childNodes.length==1&&f.textContent==" "&&f.parentNode&&f.parentNode.replaceChild(d.ownerDocument.createTextNode(" "),f)}})(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let h=o.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;o=h}if(s||(s=(t.someProp("clipboardParser")||t.someProp("domParser")||zi.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!c),context:i,ruleFromNode:h=>h.nodeName!="BR"||h.nextSibling||!h.parentNode||PS.test(h.parentNode.nodeName)?null:{ignore:!0}})),c)s=(function(d,h){if(!d.size)return d;let p,f=d.content.firstChild.type.schema;try{p=JSON.parse(h)}catch(A){return d}let{content:m,openStart:E,openEnd:_}=d;for(let A=p.length-2;A>=0;A-=2){let O=f.nodes[p[A]];if(!O||O.hasRequiredAttrs())break;m=j.from(O.create(p[A+1],m)),E++,_++}return new W(m,E,_)})(vh(s,+c[1],+c[2]),c[4]);else if(s=W.maxOpen((function(d,h){if(d.childCount<2)return d;for(let p=h.depth;p>=0;p--){let f,m=h.node(p).contentMatchAt(h.index(p)),E=[];if(d.forEach(_=>{if(!E)return;let A,O=m.findWrapping(_.type);if(!O)return E=null;if(A=E.length&&f.length&&bE(O,f,_,E[E.length-1],0))E[E.length-1]=A;else{E.length&&(E[E.length-1]=wE(E[E.length-1],f.length));let S=NE(_,O);E.push(S),m=m.matchType(S.type),f=O}}),E)return j.from(E)}return d})(s.content,i),!0),s.openStart||s.openEnd){let d=0,h=0;for(let p=s.content.firstChild;d<s.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=s.content.lastChild;h<s.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);s=vh(s,d,h)}return t.someProp("transformPasted",d=>{s=d(s,t,l)}),s}const PS=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function NE(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,j.from(t));return t}function bE(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=bE(t,e,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(j.from(NE(n,t,i+1))))}}function wE(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,wE(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(j.empty,!0);return t.copy(n.append(r))}function $l(t,e,n,r,i,o){let s=e<0?t.firstChild:t.lastChild,a=s.content;return t.childCount>1&&(o=0),i<r-1&&(a=$l(a,e,n,r,i+1,o)),i>=n&&(a=e<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(j.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function vh(t,e,n){return e<t.openStart&&(t=new W($l(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new W($l(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const kE={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Dh=null;function LE(){return Dh||(Dh=document.implementation.createHTMLDocument("title"))}let Ha=null;const at={},ct={},xS={touchstart:!0,touchmove:!0};class FS{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Nn(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function Ua(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Vl(t,r))})}function Vl(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)})}function HS(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function ms(t){return{left:t.clientX,top:t.clientY}}function Gc(t,e,n,r,i){if(r==-1)return!1;let o=t.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(t.someProp(e,a=>s>o.depth?a(t,n,o.nodeAfter,o.before(s),i,!0):a(t,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function Vr(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function US(t,e,n,r,i){return Gc(t,"handleClickOn",e,n,r)||t.someProp("handleClick",o=>o(t,e,r))||(i?(function(o,s){if(s==-1)return!1;let a,l,u=o.state.selection;u instanceof Z&&(a=u.node);let c=o.state.doc.resolve(s);for(let d=c.depth+1;d>0;d--){let h=d>c.depth?c.nodeAfter:c.node(d);if(Z.isSelectable(h)){l=a&&u.$from.depth>0&&d>=u.$from.depth&&c.before(u.$from.depth+1)==u.$from.pos?c.before(u.$from.depth):c.before(d);break}}return l!=null&&(Vr(o,Z.create(o.state.doc,l)),!0)})(t,n):(function(o,s){if(s==-1)return!1;let a=o.state.doc.resolve(s),l=a.nodeAfter;return!!(l&&l.isAtom&&Z.isSelectable(l))&&(Vr(o,new Z(a)),!0)})(t,n))}function BS(t,e,n,r){return Gc(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function jS(t,e,n,r){return Gc(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||(function(i,o,s){if(s.button!=0)return!1;let a=i.state.doc;if(o==-1)return!!a.inlineContent&&(Vr(i,ce.create(a,0,a.content.size)),!0);let l=a.resolve(o);for(let u=l.depth+1;u>0;u--){let c=u>l.depth?l.nodeAfter:l.node(u),d=l.before(u);if(c.inlineContent)Vr(i,ce.create(a,d+1,d+1+c.content.size));else{if(!Z.isSelectable(c))continue;Vr(i,Z.create(a,d))}return!0}})(t,n,r)}function zl(t){return Es(t)}ct.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Th(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!un||!He||n.keyCode!=13))if(n.keyCode!=229&&t.domObserver.forceFlush(),!ti||n.keyCode!=13||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",r=>r(t,n))||MS(t,n)?n.preventDefault():Nn(t,"key");else{let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",i=>i(t,Xn(13,"Enter"))),t.input.lastIOSEnter=0)},200)}},ct.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},ct.keypress=(t,e)=>{let n=e;if(Th(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||yt&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n)))return void n.preventDefault();let r=t.state.selection;if(!(r instanceof ce&&r.$from.sameParent(r.$to))){let i=String.fromCharCode(n.charCode),o=()=>t.state.tr.insertText(i).scrollIntoView();/[\r\n]/.test(i)||t.someProp("handleTextInput",s=>s(t,r.$from.pos,r.$to.pos,i,o))||t.dispatch(o()),n.preventDefault()}};const ME=yt?"metaKey":"ctrlKey";at.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=zl(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&(function(a,l){let u=l.x-a.clientX,c=l.y-a.clientY;return u*u+c*c<100})(n,t.input.lastClick)&&!n[ME]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o,button:n.button};let s=t.posAtCoords(ms(n));s&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new $S(t,s,n,!!r)):(o=="doubleClick"?BS:jS)(t,s.pos,s.inside,n)?n.preventDefault():Nn(t,"pointer"))};class $S{constructor(e,n,r,i){let o,s;if(this.view=e,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[ME],this.allowDefault=r.shiftKey,n.inside>-1)o=e.state.doc.nodeAt(n.inside),s=n.inside;else{let c=e.state.doc.resolve(n.pos);o=c.parent,s=c.depth?c.before():0}const a=i?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof Z&&u.from<=s&&u.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!wt||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Nn(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>pn(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(ms(e))),this.updateAllowDefault(e),this.allowDefault||!n?Nn(this.view,"pointer"):US(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||We&&this.mightDrag&&!this.mightDrag.node.isAtom||He&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Vr(this.view,he.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Nn(this.view,"pointer")}move(e){this.updateAllowDefault(e),Nn(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function Th(t,e){return!!t.composing||!!(We&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}at.touchstart=t=>{t.input.lastTouch=Date.now(),zl(t),Nn(t,"pointer")},at.touchmove=t=>{t.input.lastTouch=Date.now(),Nn(t,"pointer")},at.contextmenu=t=>zl(t);const VS=un?5e3:-1;function Rh(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Es(t),e))}function PE(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=(function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp})());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function zS(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=(function(i,o){for(;;){if(i.nodeType==3&&o)return i;if(i.nodeType==1&&o>0){if(i.contentEditable=="false")return null;o=Ct(i=i.childNodes[o-1])}else{if(!i.parentNode||Wi(i))return null;o=Ge(i),i=i.parentNode}}})(e.focusNode,e.focusOffset),r=(function(i,o){for(;;){if(i.nodeType==3&&o<i.nodeValue.length)return i;if(i.nodeType==1&&o<i.childNodes.length){if(i.contentEditable=="false")return null;i=i.childNodes[o],o=0}else{if(!i.parentNode||Wi(i))return null;o=Ge(i)+1,i=i.parentNode}}})(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(s&&s.isText(n.nodeValue))return r}}return n||r}function Es(t,e=!1){if(!(un&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),PE(t),e||t.docView&&t.docView.dirty){let n=Vc(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):!t.markCursor&&!e||r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.updateState(t.state):t.dispatch(t.state.tr.deleteSelection()),!0}return!1}}ct.compositionstart=ct.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof ce&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||He&&_E&&(function(r){let{focusNode:i,focusOffset:o}=r.domSelectionRange();if(!i||i.nodeType!=1||o>=i.childNodes.length)return!1;let s=i.childNodes[o];return s.nodeType==1&&s.contentEditable=="false"})(t)))t.markCursor=t.state.storedMarks||n.marks(),Es(t,!0),t.markCursor=null;else if(Es(t,!e.selection.empty),wt&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=t.domSelection();a&&a.collapse(s,s.nodeValue.length);break}i=s,o=-1}}t.input.composing=!0}Rh(t,VS)},ct.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,Rh(t,20))};const bi=Et&&Ln<15||ti&&vS<604;function wi(t,e,n,r,i){let o=CE(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,o||W.empty)))return!0;if(!o)return!1;let s=(function(l){return l.openStart==0&&l.openEnd==0&&l.content.childCount==1?l.content.firstChild:null})(o),a=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function xE(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}at.copy=ct.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let o=bi?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Yc(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):(function(u,c){if(!u.dom.parentNode)return;let d=u.dom.parentNode.appendChild(document.createElement("div"));d.appendChild(c),d.style.cssText="position: fixed; left: -10000px; top: 10px";let h=getSelection(),p=document.createRange();p.selectNodeContents(c),u.dom.blur(),h.removeAllRanges(),h.addRange(p),setTimeout(()=>{d.parentNode&&d.parentNode.removeChild(d),u.focus()},50)})(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},ct.paste=(t,e)=>{let n=e;if(t.composing&&!un)return;let r=bi?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&wi(t,xE(r),r.getData("text/html"),i,n)?n.preventDefault():(function(o,s){if(!o.dom.parentNode)return;let a=o.input.shiftKey||o.state.selection.$from.parent.type.spec.code,l=o.dom.parentNode.appendChild(document.createElement(a?"textarea":"div"));a||(l.contentEditable="true"),l.style.cssText="position: fixed; left: -10000px; top: 10px",l.focus();let u=o.input.shiftKey&&o.input.lastKeyCode!=45;setTimeout(()=>{o.focus(),l.parentNode&&l.parentNode.removeChild(l),a?wi(o,l.value,null,u,s):wi(o,l.textContent,l.innerHTML,u,s)},50)})(t,n)};class FE{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const YS=yt?"altKey":"ctrlKey";function Ih(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n!=null?n:!e[YS]}at.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i,o=t.state.selection,s=o.empty?null:t.posAtCoords(ms(n));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof Z?o.to-1:o.to))){if(r&&r.mightDrag)i=Z.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(i=Z.create(t.state.doc,d.posBefore))}}let a=(i||t.state.selection).content(),{dom:l,text:u,slice:c}=Yc(t,a);(!n.dataTransfer.files.length||!He||EE>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(bi?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",bi||n.dataTransfer.setData("text/plain",u),t.dragging=new FE(c,Ih(t,n),i)},at.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},ct.dragover=ct.dragenter=(t,e)=>e.preventDefault(),ct.drop=(t,e)=>{try{(function(n,r,i){if(!r.dataTransfer)return;let o=n.posAtCoords(ms(r));if(!o)return;let s=n.state.doc.resolve(o.pos),a=i&&i.slice;a?n.someProp("transformPasted",m=>{a=m(a,n,!1)}):a=CE(n,xE(r.dataTransfer),bi?null:r.dataTransfer.getData("text/html"),!1,s);let l=!(!i||!Ih(n,r));if(n.someProp("handleDrop",m=>m(n,r,a||W.empty,l)))return void r.preventDefault();if(!a)return;r.preventDefault();let u=a?(function(m,E,_){let A=m.resolve(E);if(!_.content.size)return E;let O=_.content;for(let S=0;S<_.openStart;S++)O=O.firstChild.content;for(let S=1;S<=(_.openStart==0&&_.size?2:1);S++)for(let v=A.depth;v>=0;v--){let T=v==A.depth?0:A.pos<=(A.start(v+1)+A.end(v+1))/2?-1:1,R=A.index(v)+(T>0?1:0),y=A.node(v),g=!1;if(S==1)g=y.canReplace(R,R,O);else{let D=y.contentMatchAt(R).findWrapping(O.firstChild.type);g=D&&y.canReplaceWith(R,R,D[0])}if(g)return T==0?A.pos:T<0?A.before(v+1):A.after(v+1)}return null})(n.state.doc,s.pos,a):s.pos;u==null&&(u=s.pos);let c=n.state.tr;if(l){let{node:m}=i;m?m.replace(c):c.deleteSelection()}let d=c.mapping.map(u),h=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,p=c.doc;if(h?c.replaceRangeWith(d,d,a.content.firstChild):c.replaceRange(d,d,a),c.doc.eq(p))return;let f=c.doc.resolve(d);if(h&&Z.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new Z(f));else{let m=c.mapping.map(u);c.mapping.maps[c.mapping.maps.length-1].forEach((E,_,A,O)=>m=O),c.setSelection(zc(n,f,c.doc.resolve(m)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))})(t,e,t.dragging)}finally{t.dragging=null}},at.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&pn(t)},20))},at.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},at.beforeinput=(t,e)=>{if(He&&un&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:n}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=n||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Xn(8,"Backspace")))))return;let{$cursor:r}=t.state.selection;r&&r.pos>0&&t.dispatch(t.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let t in ct)at[t]=ct[t];function Xi(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class _s{constructor(e,n){this.toDOM=e,this.spec=n||ir,this.side=this.spec.side||0}map(e,n,r,i){let{pos:o,deleted:s}=e.mapResult(n.from+i,this.side<0?-1:1);return s?null:new Dt(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof _s&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Xi(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Pn{constructor(e,n){this.attrs=e,this.spec=n||ir}map(e,n,r,i){let o=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Dt(o,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Pn&&Xi(this.attrs,e.attrs)&&Xi(this.spec,e.spec)}static is(e){return e.type instanceof Pn}destroy(){}}class Wc{constructor(e,n){this.attrs=e,this.spec=n||ir}map(e,n,r,i){let o=e.mapResult(n.from+i,1);if(o.deleted)return null;let s=e.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Dt(o.pos-r,s.pos-r,this)}valid(e,n){let r,{index:i,offset:o}=e.content.findIndex(n.from);return o==n.from&&!(r=e.child(i)).isText&&o+r.nodeSize==n.to}eq(e){return this==e||e instanceof Wc&&Xi(this.attrs,e.attrs)&&Xi(this.spec,e.spec)}destroy(){}}class Dt{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Dt(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new Dt(e,e,new _s(n,r))}static inline(e,n,r,i){return new Dt(e,n,new Pn(r,i))}static node(e,n,r,i){return new Dt(e,n,new Wc(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Pn}get widget(){return this.type instanceof _s}}const wr=[],ir={};class Ce{constructor(e,n){this.local=e.length?e:wr,this.children=n.length?n:wr}static create(e,n){return n.length?Xo(n,e,0,ir):Ke}find(e,n,r){let i=[];return this.findInner(e==null?0:e,n==null?1e9:n,i,0,r),i}findInner(e,n,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=e&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,n-a,r,i+a,o)}}map(e,n,r){return this==Ke||e.maps.length==0?this:this.mapInner(e,n,0,0,r||ir)}mapInner(e,n,r,i,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,i);l&&l.type.valid(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?(function(a,l,u,c,d,h,p){let f=a.slice();for(let E=0,_=h;E<u.maps.length;E++){let A=0;u.maps[E].forEach((O,S,v,T)=>{let R=T-v-(S-O);for(let y=0;y<f.length;y+=3){let g=f[y+1];if(g<0||O>g+_-A)continue;let D=f[y]+_-A;S>=D?f[y+1]=O<=D?-2:-1:O>=_&&R&&(f[y]+=R,f[y+1]+=R)}A+=R}),_=u.maps[E].map(_,-1)}let m=!1;for(let E=0;E<f.length;E+=3)if(f[E+1]<0){if(f[E+1]==-2){m=!0,f[E+1]=-1;continue}let _=u.map(a[E]+h),A=_-d;if(A<0||A>=c.content.size){m=!0;continue}let O=u.map(a[E+1]+h,-1)-d,{index:S,offset:v}=c.content.findIndex(A),T=c.maybeChild(S);if(T&&v==A&&v+T.nodeSize==O){let R=f[E+2].mapInner(u,T,_+1,a[E]+h+1,p);R!=Ke?(f[E]=A,f[E+1]=O,f[E+2]=R):(f[E+1]=-2,m=!0)}else m=!0}if(m){let E=(function(A,O,S,v,T,R,y){function g(D,C){for(let N=0;N<D.local.length;N++){let k=D.local[N].map(v,T,C);k?S.push(k):y.onRemove&&y.onRemove(D.local[N].spec)}for(let N=0;N<D.children.length;N+=3)g(D.children[N+2],D.children[N]+C+1)}for(let D=0;D<A.length;D+=3)A[D+1]==-1&&g(A[D+2],O[D]+R+1);return S})(f,a,l,u,d,h,p),_=Xo(E,c,0,p);l=_.local;for(let A=0;A<f.length;A+=3)f[A+1]<0&&(f.splice(A,3),A-=3);for(let A=0,O=0;A<_.children.length;A+=3){let S=_.children[A];for(;O<f.length&&f[O]<S;)O+=3;f.splice(O,0,_.children[A],_.children[A+1],_.children[A+2])}}return new Ce(l.sort(Zn),f)})(this.children,s||[],e,n,r,i,o):s?new Ce(s.sort(Zn),wr):Ke}add(e,n){return n.length?this==Ke?Ce.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,o=0;e.forEach((a,l)=>{let u,c=l+r;if(u=UE(n,a,c)){for(i||(i=this.children.slice());o<i.length&&i[o]<l;)o+=3;i[o]==l?i[o+2]=i[o+2].addInner(a,u,c+1):i.splice(o,0,l,l+a.nodeSize,Xo(u,a,c+1,ir)),o+=3}});let s=HE(o?BE(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new Ce(s.length?this.local.concat(s).sort(Zn):this.local,i||this.children)}remove(e){return e.length==0||this==Ke?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+n,l=r[o+1]+n;for(let c,d=0;d<e.length;d++)(c=e[d])&&c.from>a&&c.to<l&&(e[d]=null,(s||(s=[])).push(c));if(!s)continue;r==this.children&&(r=this.children.slice());let u=r[o+2].removeInner(s,a+1);u!=Ke?r[o+2]=u:(r.splice(o,3),o-=3)}if(i.length){for(let o,s=0;s<e.length;s++)if(o=e[s])for(let a=0;a<i.length;a++)i[a].eq(o,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Ce(i,r):Ke}forChild(e,n){if(this==Ke)return this;if(n.isLeaf)return Ce.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let o=e+1,s=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof Pn){let u=Math.max(o,l.from)-o,c=Math.min(s,l.to)-o;u<c&&(i||(i=[])).push(l.copy(u,c))}}if(i){let a=new Ce(i.sort(Zn),wr);return r?new Rn([a,r]):a}return r||Ke}eq(e){if(this==e)return!0;if(!(e instanceof Ce)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Xc(this.localsInner(e))}localsInner(e){if(this==Ke)return wr;if(e.inlineContent||!this.local.some(Pn.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Pn||n.push(this.local[r]);return n}forEachSet(e){e(this)}}Ce.empty=new Ce([],[]),Ce.removeOverlap=Xc;const Ke=Ce.empty;class Rn{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,ir));return Rn.from(r)}forChild(e,n){if(n.isLeaf)return Ce.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=Ke&&(o instanceof Rn?r=r.concat(o.members):r.push(o))}return Rn.from(r)}eq(e){if(!(e instanceof Rn)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(n){r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}else n=o}return n?Xc(r?n:n.sort(Zn)):wr}static from(e){switch(e.length){case 0:return Ke;case 1:return e[0];default:return new Rn(e.every(n=>n instanceof Ce)?e:e.reduce((n,r)=>n.concat(r instanceof Ce?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function HE(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new Dt(i.from+e,i.to+e,i.type))}return n}function UE(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let o,s=0;s<t.length;s++)(o=t[s])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),t[s]=null);return i}function BE(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Xo(t,e,n,r){let i=[],o=!1;e.forEach((a,l)=>{let u=UE(t,a,l+n);if(u){o=!0;let c=Xo(u,a,n+l+1,r);c!=Ke&&i.push(l,l+a.nodeSize,c)}});let s=HE(o?BE(t):t,-n).sort(Zn);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new Ce(s,i):Ke}function Zn(t,e){return t.from-e.from||t.to-e.to}function Xc(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from!=r.from){o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),yh(e,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,r.to),yh(e,i+1,o.copy(r.to,o.to)))}}return e}function yh(t,e,n){for(;e<t.length&&Zn(n,t[e])>0;)e++;t.splice(e,0,n)}function Ba(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Ke&&e.push(r)}),t.cursorWrapper&&e.push(Ce.create(t.state.doc,[t.cursorWrapper.deco])),Rn.from(e)}const GS={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},WS=Et&&Ln<=11;class XS{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class KS{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new XS,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Et&&Ln<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():We&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),WS&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,GS)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(mh(this.view)){if(this.suppressingSelectionUpdates)return pn(this.view);if(Et&&Ln<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&lr(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n,r=new Set;for(let o=e.focusNode;o;o=ei(o))r.add(o);for(let o=e.anchorNode;o;o=ei(o))if(r.has(o)){n=o;break}let i=n&&this.view.docView.nearestDesc(n);return i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&mh(e)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],l);d&&(o=o<0?d.from:Math.min(d.from,o),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(wt&&l.length){let c=l.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,h]=c;d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let h of c){let p=h.parentNode;!p||p.nodeName!="LI"||d&&qS(e,d)==p||h.remove()}}}else if((He||We)&&l.some(c=>c.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let c of l)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&c.parentNode.removeChild(c)}}let u=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Ks(r)&&(u=Vc(e))&&u.eq(he.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,pn(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),(function(c){if(!Ch.has(c)&&(Ch.set(c,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(c.dom).whiteSpace)!==-1)){if(c.requiresGeckoHackNode=wt,Nh)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),Nh=!0}})(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,(function(c,d){var h;let{focusNode:p,focusOffset:f}=c.domSelectionRange();for(let m of d)if(((h=m.parentNode)===null||h===void 0?void 0:h.nodeName)=="TR"){let E=m.nextSibling;for(;E&&E.nodeName!="TD"&&E.nodeName!="TH";)E=E.nextSibling;if(E){let _=E;for(;;){let A=_.firstChild;if(!A||A.nodeType!=1||A.contentEditable=="false"||/^(BR|IMG)$/.test(A.nodeName))break;_=A}_.insertBefore(m,_.firstChild),p==m&&c.domSelection().collapse(m,f)}else m.parentNode.removeChild(m)}})(e,l)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||pn(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let c=e.addedNodes[u];n.push(c),c.nodeType==3&&(this.lastChangedTextNode=c)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(Et&&Ln<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:c,nextSibling:d}=e.addedNodes[u];(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c),(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(o=d)}let s=i&&i.parentNode==e.target?Ge(i)+1:0,a=r.localPosFromDOM(e.target,s,-1),l=o&&o.parentNode==e.target?Ge(o):e.target.childNodes.length;return{from:a,to:r.localPosFromDOM(e.target,l,1)}}return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Ch=new WeakMap,Nh=!1;function bh(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return lr(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function qS(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function JS(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(We&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(t.parentNode.lastChild==t||We&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const ZS=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function QS(t,e,n,r,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let R=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,y=Vc(t,R);if(y&&!t.state.selection.eq(y)){if(He&&un&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",D=>D(t,Xn(13,"Enter"))))return;let g=t.state.tr.setSelection(y);R=="pointer"?g.setMeta("pointer",!0):R=="key"&&g.scrollIntoView(),o&&g.setMeta("composition",o),t.dispatch(g)}return}let s=t.state.doc.resolve(e),a=s.sharedDepth(n);e=s.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l,u,c=t.state.selection,d=(function(R,y,g){let D,{node:C,fromOffset:N,toOffset:k,from:b,to:L}=R.docView.parseRange(y,g),x=R.domSelectionRange(),P=x.anchorNode;if(P&&R.dom.contains(P.nodeType==1?P:P.parentNode)&&(D=[{node:P,offset:x.anchorOffset}],Ks(x)||D.push({node:x.focusNode,offset:x.focusOffset})),He&&R.input.lastKeyCode===8)for(let ae=k;ae>N;ae--){let ue=C.childNodes[ae-1],de=ue.pmViewDesc;if(ue.nodeName=="BR"&&!de){k=ae;break}if(!de||de.size)break}let B=R.state.doc,V=R.someProp("domParser")||zi.fromSchema(R.state.schema),$=B.resolve(b),z=null,_e=V.parse(C,{topNode:$.parent,topMatch:$.parent.contentMatchAt($.index()),topOpen:!0,from:N,to:k,preserveWhitespace:$.parent.type.whitespace!="pre"||"full",findPositions:D,ruleFromNode:JS,context:$});if(D&&D[0].pos!=null){let ae=D[0].pos,ue=D[1]&&D[1].pos;ue==null&&(ue=ae),z={anchor:ae+b,head:ue+b}}return{doc:_e,sel:z,from:b,to:L}})(t,e,n),h=t.state.doc,p=h.slice(d.from,d.to);t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(l=t.state.selection.to,u="end"):(l=t.state.selection.from,u="start"),t.input.lastKeyCode=null;let f=(function(R,y,g,D,C){let N=R.findDiffStart(y,g);if(N==null)return null;let{a:k,b}=R.findDiffEnd(y,g+R.size,g+y.size);if(C=="end"&&(D-=k+Math.max(0,N-Math.min(k,b))-N),k<N&&R.size<y.size){let L=D<=N&&D>=k?N-D:0;N-=L,N&&N<y.size&&kh(y.textBetween(N-1,N+1))&&(N+=L?1:-1),b=N+(b-k),k=N}else if(b<N){let L=D<=N&&D>=b?N-D:0;N-=L,N&&N<R.size&&kh(R.textBetween(N-1,N+1))&&(N+=L?1:-1),k=N+(k-b),b=N}return{start:N,endA:k,endB:b}})(p.content,d.doc.content,d.from,l,u);if(f&&t.input.domChangeCount++,(ti&&t.input.lastIOSEnter>Date.now()-225||un)&&i.some(R=>R.nodeType==1&&!ZS.test(R.nodeName))&&(!f||f.endA>=f.endB)&&t.someProp("handleKeyDown",R=>R(t,Xn(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(!f){if(!(r&&c instanceof ce&&!c.empty&&c.$head.sameParent(c.$anchor))||t.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let R=wh(t,t.state.doc,d.sel);if(R&&!R.eq(t.state.selection)){let y=t.state.tr.setSelection(R);o&&y.setMeta("composition",o),t.dispatch(y)}}return}f={start:c.from,endA:c.to,endB:c.to}}t.state.selection.from<t.state.selection.to&&f.start==f.endB&&t.state.selection instanceof ce&&(f.start>t.state.selection.from&&f.start<=t.state.selection.from+2&&t.state.selection.from>=d.from?f.start=t.state.selection.from:f.endA<t.state.selection.to&&f.endA>=t.state.selection.to-2&&t.state.selection.to<=d.to&&(f.endB+=t.state.selection.to-f.endA,f.endA=t.state.selection.to)),Et&&Ln<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>d.from&&d.doc.textBetween(f.start-d.from-1,f.start-d.from+1)==" "&&(f.start--,f.endA--,f.endB--);let m=d.doc.resolveNoCache(f.start-d.from),E=d.doc.resolveNoCache(f.endB-d.from),_=h.resolve(f.start),A=m.sameParent(E)&&m.parent.inlineContent&&_.end()>=f.endA;if((ti&&t.input.lastIOSEnter>Date.now()-225&&(!A||i.some(R=>R.nodeName=="DIV"||R.nodeName=="P"))||!A&&m.pos<d.doc.content.size&&(!m.sameParent(E)||!m.parent.inlineContent)&&m.pos<E.pos&&!/\S/.test(d.doc.textBetween(m.pos,E.pos,"","")))&&t.someProp("handleKeyDown",R=>R(t,Xn(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>f.start&&(function(R,y,g,D,C){if(g-y<=C.pos-D.pos||ja(D,!0,!1)<C.pos)return!1;let N=R.resolve(y);if(!D.parent.isTextblock){let b=N.nodeAfter;return b!=null&&g==y+b.nodeSize}if(N.parentOffset<N.parent.content.size||!N.parent.isTextblock)return!1;let k=R.resolve(ja(N,!0,!0));return!(!k.parent.isTextblock||k.pos>g||ja(k,!0,!1)<g)&&D.parent.content.cut(D.parentOffset).eq(k.parent.content)})(h,f.start,f.endA,m,E)&&t.someProp("handleKeyDown",R=>R(t,Xn(8,"Backspace"))))return void(un&&He&&t.domObserver.suppressSelectionUpdates());He&&f.endB==f.start&&(t.input.lastChromeDelete=Date.now()),un&&!A&&m.start()!=E.start()&&E.parentOffset==0&&m.depth==E.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==f.endA&&(f.endB-=2,E=d.doc.resolveNoCache(f.endB-d.from),setTimeout(()=>{t.someProp("handleKeyDown",function(R){return R(t,Xn(13,"Enter"))})},20));let O,S=f.start,v=f.endA,T=R=>{let y=R||t.state.tr.replace(S,v,d.doc.slice(f.start-d.from,f.endB-d.from));if(d.sel){let g=wh(t,y.doc,d.sel);g&&!(He&&t.composing&&g.empty&&(f.start!=f.endB||t.input.lastChromeDelete<Date.now()-100)&&(g.head==S||g.head==y.mapping.map(v)-1)||Et&&g.empty&&g.head==S)&&y.setSelection(g)}return o&&y.setMeta("composition",o),y.scrollIntoView()};if(A)if(m.pos==E.pos){Et&&Ln<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>pn(t),20));let R=T(t.state.tr.delete(S,v)),y=h.resolve(f.start).marksAcross(h.resolve(f.endA));y&&R.ensureMarks(y),t.dispatch(R)}else if(f.endA==f.endB&&(O=(function(R,y){let g,D,C,N=R.firstChild.marks,k=y.firstChild.marks,b=N,L=k;for(let P=0;P<k.length;P++)b=k[P].removeFromSet(b);for(let P=0;P<N.length;P++)L=N[P].removeFromSet(L);if(b.length==1&&L.length==0)D=b[0],g="add",C=P=>P.mark(D.addToSet(P.marks));else{if(b.length!=0||L.length!=1)return null;D=L[0],g="remove",C=P=>P.mark(D.removeFromSet(P.marks))}let x=[];for(let P=0;P<y.childCount;P++)x.push(C(y.child(P)));if(j.from(x).eq(R))return{mark:D,type:g}})(m.parent.content.cut(m.parentOffset,E.parentOffset),_.parent.content.cut(_.parentOffset,f.endA-_.start())))){let R=T(t.state.tr);O.type=="add"?R.addMark(S,v,O.mark):R.removeMark(S,v,O.mark),t.dispatch(R)}else if(m.parent.child(m.index()).isText&&m.index()==E.index()-(E.textOffset?0:1)){let R=m.parent.textBetween(m.parentOffset,E.parentOffset),y=()=>T(t.state.tr.insertText(R,S,v));t.someProp("handleTextInput",g=>g(t,S,v,R,y))||t.dispatch(y())}else t.dispatch(T());else t.dispatch(T())}function wh(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:zc(t,e.resolve(n.anchor),e.resolve(n.head))}function ja(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let o=t.node(r).maybeChild(t.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function kh(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class jE{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new FS,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Fh),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Ph(this),Mh(this),this.nodeViews=xh(this),this.docView=lh(this.state.doc,Lh(this),Ba(this),this.dom,this),this.domObserver=new KS(this,(r,i,o,s)=>QS(this,r,i,o,s)),this.domObserver.start(),(function(r){for(let i in at){let o=at[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=s=>{!HS(r,s)||Vl(r,s)||!r.editable&&s.type in ct||o(r,s)},xS[i]?{passive:!0}:void 0)}We&&r.dom.addEventListener("input",()=>null),Ua(r)})(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ua(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Fh),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(PE(this),s=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=xh(this);(function(f,m){let E=0,_=0;for(let A in f){if(f[A]!=m[A])return!0;E++}for(let A in m)_++;return E!=_})(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Ua(this),this.editable=Ph(this),Mh(this);let l=Ba(this),u=Lh(this),c=i.plugins==e.plugins||i.doc.eq(e.doc)?e.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",d=o||!this.docView.matchesNode(e.doc,u,l);!d&&e.selection.eq(i.selection)||(s=!0);let h=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&(function(p){let f,m,E=p.dom.getBoundingClientRect(),_=Math.max(0,E.top);for(let A=(E.left+E.right)/2,O=_+1;O<Math.min(innerHeight,E.bottom);O+=5){let S=p.root.elementFromPoint(A,O);if(!S||S==p.dom||!p.dom.contains(S))continue;let v=S.getBoundingClientRect();if(v.top>=_-20){f=S,m=v.top;break}}return{refDOM:f,refTop:m,stack:th(p.dom)}})(this);if(s){this.domObserver.stop();let p=d&&(Et||He)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&(function(f,m){let E=Math.min(f.$anchor.sharedDepth(f.head),m.$anchor.sharedDepth(m.head));return f.$anchor.start(E)!=m.$anchor.start(E)})(i.selection,e.selection);if(d){let f=He?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=zS(this)),!o&&this.docView.update(e.doc,u,l,this)||(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=lh(e.doc,u,l,this.dom,this)),!f||this.trackWrites&&this.dom.contains(this.trackWrites)||(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&(function(f){let m=f.docView.domFromPos(f.state.selection.anchor,0),E=f.domSelectionRange();return lr(m.node,m.offset,E.anchorNode,E.anchorOffset)})(this))?pn(this,p):(IE(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():h&&(function({refDOM:p,refTop:f,stack:m}){let E=p?p.getBoundingClientRect().top:0;nh(m,E==0?0:E-f)})(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&this.dom.contains(e.nodeType==1?e:e.parentNode)&&!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Z){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&eh(this,n.getBoundingClientRect(),e)}else eh(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}}updateDraggedNode(e,n){let r=e.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new FE(e.slice,e.move,i<0?void 0:Z.create(this.state.doc,i))}someProp(e,n){let r,i=this._props&&this._props[e];if(i!=null&&(r=n?n(i):i))return r;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(r=n?n(a):a))return r}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[e];if(a!=null&&(r=n?n(a):a))return r}}hasFocus(){if(Et){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&(function(e){if(e.setActive)return e.setActive();if(yr)return e.focus(yr);let n=th(e);e.focus(yr==null?{get preventScroll(){return yr={preventScroll:!0},!0}}:void 0),yr||(yr=!1,nh(n,0))})(this.dom),pn(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return RS(this,e)}coordsAtPos(e,n=1){return SE(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let i=this.docView.posFromDOM(e,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return CS(this,n||this.state,e)}pasteHTML(e,n){return wi(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return wi(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Yc(this,e)}destroy(){this.docView&&((function(e){e.domObserver.stop();for(let n in e.input.eventHandlers)e.dom.removeEventListener(n,e.input.eventHandlers[n]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)})(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ba(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Pl=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return(function(n,r){Vl(n,r)||!at[r.type]||!n.editable&&r.type in ct||at[r.type](n,r)})(this,e)}domSelectionRange(){let e=this.domSelection();return e?We&&this.root.nodeType===11&&(function(n){let r=n.activeElement;for(;r&&r.shadowRoot;)r=r.shadowRoot.activeElement;return r})(this.dom.ownerDocument)==this.dom&&(function(n,r){if(r.getComposedRanges){let s=r.getComposedRanges(n.root)[0];if(s)return bh(n,s)}let i;function o(s){s.preventDefault(),s.stopImmediatePropagation(),i=s.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",o,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",o,!0),i?bh(n,i):null})(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function Lh(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:e[r]||r=="contenteditable"||r=="nodeName"||(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[Dt.node(0,t.state.doc.content.size,e)]}function Mh(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Dt.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Ph(t){return!t.someProp("editable",e=>e(t.state)===!1)}function xh(t){let e=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function Fh(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}jE.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};const Pe=new class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let e=this.spec={};for(let r in t)e[r]=t[r];e.nodes=Ve.from(t.nodes),e.marks=Ve.from(t.marks||{}),this.nodes=Md.compile(this.spec.nodes,this),this.marks=Ys.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let i=this.nodes[r],o=i.spec.content||"",s=i.spec.marks;if(i.contentMatch=n[o]||(n[o]=sr.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=s=="_"?null:s?Pd(this,s.split(" ")):s!=""&&i.inlineContent?null:[]}for(let r in this.marks){let i=this.marks[r],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:Pd(this,o.split(" "))}this.nodeFromJSON=r=>nr.fromJSON(this,r),this.markFromJSON=r=>pe.fromJSON(this,r),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if(typeof t=="string")t=this.nodeType(t);else{if(!(t instanceof Md))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new ps(n,n.defaultAttrs,t,pe.setFrom(e))}mark(t,e){return typeof t=="string"&&(t=this.marks[t]),t.create(e)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}({nodes:{doc:{content:"paragraph+"},paragraph:{code:!0,content:"inline*",parseDOM:[{tag:"p"}],toDOM:()=>["p",0]},text:{group:"inline"},mention:{group:"inline",inline:!0,attrs:{id:{},name:{}},content:"text*",toDOM:t=>["span",{"data-mention-id":t.attrs.id,class:"t-mention"},`@${t.attrs.name}`],parseDOM:[{tag:"span[data-mention-id]",getAttrs:t=>({id:t.dataset["mention-id"]})}]},customemoji:{group:"inline",inline:!0,attrs:{name:{},url:{}},content:"text*",selectable:!1,toDOM:t=>["img",{src:t.attrs.url,alt:t.attrs.name,"data-custom-emoji":t.attrs.name}],parseDOM:[{tag:"img[data-custom-emoji]",getAttrs:t=>{const e=t;return{name:e.dataset.customEmoji,url:e.src}}}]}},marks:{literal:{toDOM:()=>["span",{"data-literal":""}],parseDOM:[{tag:"span[data-literal]"}]},bold:{toDOM:()=>["b"],parseDOM:[{tag:"b"}]},italic:{toDOM:()=>["i"],parseDOM:[{tag:"i"}]},strikethrough:{toDOM:()=>["del"],parseDOM:[{tag:"del"}]},emoji:{attrs:{emoji:{}},toDOM:t=>["span",{"data-emoji":t.attrs.emoji},t.attrs.emoji],parseDOM:[{tag:"span[data-emoji]",getAttrs:t=>({emoji:t.dataset.emoji})}]}}}),$a=new Xs("placeholder"),Hh=new Ws({key:$a,props:{decorations(t){if($E(t.doc))return;const e=t.doc.firstChild,n=Dt.node(0,e.nodeSize,{class:"empty-node","data-placeholder":$a.getState(t)});return Ce.create(t.doc,[n])}},state:{init:()=>"",apply:(t,e)=>{var n;return(n=t.getMeta($a))!=null?n:e}}});function $E(t){return t.childCount!==1||t.firstChild.childCount!==0}for(var Fn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},As={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},eO=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),tO=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ze=0;ze<10;ze++)Fn[48+ze]=Fn[96+ze]=String(ze);for(ze=1;ze<=24;ze++)Fn[ze+111]="F"+ze;for(ze=65;ze<=90;ze++)Fn[ze]=String.fromCharCode(ze+32),As[ze]=String.fromCharCode(ze);for(var Va in Fn)As.hasOwnProperty(Va)||(As[Va]=Fn[Va]);const nO=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function rO(t){let e,n,r,i,o=t.split(/-(?!$)/),s=o[o.length-1];s=="Space"&&(s=" ");for(let a=0;a<o.length-1;a++){let l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))e=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);nO?i=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function za(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function Uh(t){return new Ws({props:{handleKeyDown:iO(t)}})}function iO(t){let e=(function(n){let r=Object.create(null);for(let i in n)r[rO(i)]=n[i];return r})(t);return function(n,r){let i,o=(function(a){var l=!(eO&&a.metaKey&&a.shiftKey&&!a.ctrlKey&&!a.altKey||tO&&a.shiftKey&&a.key&&a.key.length==1||a.key=="Unidentified")&&a.key||(a.shiftKey?As:Fn)[a.keyCode]||a.key||"Unidentified";return l=="Esc"&&(l="Escape"),l=="Del"&&(l="Delete"),l=="Left"&&(l="ArrowLeft"),l=="Up"&&(l="ArrowUp"),l=="Right"&&(l="ArrowRight"),l=="Down"&&(l="ArrowDown"),l})(r),s=e[za(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[za(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=Fn[r.keyCode])&&i!=o){let a=e[za(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var gs=200,Fe=function(){};Fe.prototype.append=function(t){return t.length?(t=Fe.from(t),!this.length&&t||t.length<gs&&this.leafAppend(t)||this.length<gs&&t.leafPrepend(this)||this.appendInner(t)):this},Fe.prototype.prepend=function(t){return t.length?Fe.from(t).append(this):this},Fe.prototype.appendInner=function(t){return new oO(this,t)},Fe.prototype.slice=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.length),t>=e?Fe.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Fe.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Fe.prototype.forEach=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},Fe.prototype.map=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(i,o){return r.push(t(i,o))},e,n),r},Fe.from=function(t){return t instanceof Fe?t:t&&t.length?new VE(t):Fe.empty};var VE=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,i){return r==0&&i==this.length?this:new e(this.values.slice(r,i))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,i,o,s){for(var a=i;a<o;a++)if(r(this.values[a],s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){for(var a=i-1;a>=o;a--)if(r(this.values[a],s+a)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=gs)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=gs)return new e(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(Fe);Fe.empty=new VE([]);var oO=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,r,i,o){var s=this.left.length;return!(r<s&&this.left.forEachInner(n,r,Math.min(i,s),o)===!1)&&!(i>s&&this.right.forEachInner(n,Math.max(r-s,0),Math.min(this.length,i)-s,o+s)===!1)&&void 0},e.prototype.forEachInvertedInner=function(n,r,i,o){var s=this.left.length;return!(r>s&&this.right.forEachInvertedInner(n,r-s,Math.max(i,s)-s,o+s)===!1)&&!(i<s&&this.left.forEachInvertedInner(n,Math.min(r,s),i,o)===!1)&&void 0},e.prototype.sliceInner=function(n,r){if(n==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(n,r):n>=i?this.right.slice(n-i,r-i):this.left.slice(n,i).append(this.right.slice(0,r-i))},e.prototype.leafAppend=function(n){var r=this.right.leafAppend(n);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(n){var r=this.left.leafPrepend(n);if(r)return new e(r,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e})(Fe);class Mt{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r,i,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}n&&(r=this.remapping(o,this.items.length),i=r.maps.length);let s,a,l=e.tr,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step)return r||(r=this.remapping(o,h+1),i=r.maps.length),i--,void c.push(d);if(r){c.push(new Bt(d.map));let p,f=d.step.map(r.slice(i));f&&l.maybeStep(f).doc&&(p=l.mapping.maps[l.mapping.maps.length-1],u.push(new Bt(p,void 0,void 0,u.length+c.length))),i--,p&&r.appendMap(p,i)}else l.maybeStep(d.step);return d.selection?(s=r?d.selection.map(r.slice(i)):d.selection,a=new Mt(this.items.slice(0,o).append(c.reverse().concat(u)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:a,transform:l,selection:s}}addTransform(e,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let c=0;c<e.steps.length;c++){let d,h=e.steps[c].invert(e.docs[c]),p=new Bt(e.mapping.maps[c],h,n);(d=l&&l.merge(p))&&(p=d,c?o.pop():a=a.slice(0,a.length-1)),o.push(p),n&&(s++,n=void 0),i||(l=p)}let u=s-r.depth;return u>sO&&(a=(function(c,d){let h;return c.forEach((p,f)=>{if(p.selection&&d--==0)return h=f,!1}),c.slice(h)})(a,u),s-=u),new Mt(a.append(o),s)}remapping(e,n){let r=new Yi;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new Mt(this.items.append(e.map(n=>new Bt(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=n;this.items.forEach(h=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let f=o.maps[p];if(h.step){let m=e.steps[p].invert(e.docs[p]),E=h.selection&&h.selection.map(o.slice(l+1,p));E&&a++,r.push(new Bt(f,m,E))}else r.push(new Bt(f))},i);let u=[];for(let h=n;h<s;h++)u.push(new Bt(o.maps[h]));let c=this.items.slice(0,i).append(u).append(r),d=new Mt(c,a);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=s.selection&&s.selection.map(n.slice(r));c&&o++;let d,h=new Bt(u.invert(),l,c),p=i.length-1;(d=i.length&&i[p].merge(h))?i[p]=d:i.push(h)}}else s.map&&r--},this.items.length,0),new Mt(Fe.from(i.reverse()),o)}}Mt.empty=new Mt(Fe.empty,0);class Bt{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Bt(n.getMap().invert(),n,this.selection)}}}class On{constructor(e,n,r,i,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const sO=20;function Bh(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,o,s)=>e.push(o,s));return e}function Ya(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}let Ga=!1,jh=null;function Ko(t){let e=t.plugins;if(jh!=e){Ga=!1,jh=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Ga=!0;break}}return Ga}const Qn=new Xs("history"),aO=new Xs("closeHistory");function lO(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Ws({key:Qn,state:{init:()=>new On(Mt.empty,Mt.empty,null,0,-1),apply:(e,n,r)=>(function(i,o,s,a){let l,u=s.getMeta(Qn);if(u)return u.historyState;s.getMeta(aO)&&(i=new On(i.done,i.undone,null,0,-1));let c=s.getMeta("appendedTransaction");if(s.steps.length==0)return i;if(c&&c.getMeta(Qn))return c.getMeta(Qn).redo?new On(i.done.addTransform(s,void 0,a,Ko(o)),i.undone,Bh(s.mapping.maps),i.prevTime,i.prevComposition):new On(i.done,i.undone.addTransform(s,void 0,a,Ko(o)),null,i.prevTime,i.prevComposition);if(s.getMeta("addToHistory")===!1||c&&c.getMeta("addToHistory")===!1)return(l=s.getMeta("rebased"))?new On(i.done.rebased(s,l),i.undone.rebased(s,l),Ya(i.prevRanges,s.mapping),i.prevTime,i.prevComposition):new On(i.done.addMaps(s.mapping.maps),i.undone.addMaps(s.mapping.maps),Ya(i.prevRanges,s.mapping),i.prevTime,i.prevComposition);{let d=s.getMeta("composition"),h=i.prevTime==0||!c&&i.prevComposition!=d&&(i.prevTime<(s.time||0)-a.newGroupDelay||!(function(f,m){if(!m)return!1;if(!f.docChanged)return!0;let E=!1;return f.mapping.maps[0].forEach((_,A)=>{for(let O=0;O<m.length;O+=2)_<=m[O+1]&&A>=m[O]&&(E=!0)}),E})(s,i.prevRanges)),p=c?Ya(i.prevRanges,s.mapping):Bh(s.mapping.maps);return new On(i.done.addTransform(s,h?o.selection.getBookmark():void 0,a,Ko(o)),Mt.empty,p,s.time,d==null?i.prevComposition:d)}})(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?YE:r=="historyRedo"?Yl:null;return!(!i||!e.editable)&&(n.preventDefault(),i(e.state,e.dispatch))}}}})}function zE(t,e){return(n,r)=>{let i=Qn.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let o=(function(s,a,l){let u=Ko(a),c=Qn.get(a).spec.config,d=(l?s.undone:s.done).popEvent(a,u);if(!d)return null;let h=d.selection.resolve(d.transform.doc),p=(l?s.done:s.undone).addTransform(d.transform,a.selection.getBookmark(),c,u),f=new On(l?p:d.remaining,l?d.remaining:p,null,0,-1);return d.transform.setSelection(h).setMeta(Qn,{redo:l,historyState:f})})(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}const YE=zE(!1,!0),Yl=zE(!0,!0),GE=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function ni(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}function $h(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function Vh(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}function Gl(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const cO=(t,e)=>{let{$from:n,$to:r}=t.selection;if(t.selection instanceof Z&&t.selection.node.isBlock)return!(!n.parentOffset||!Wo(t.doc,n.pos)||(e&&e(t.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(e){let i=r.parentOffset==r.parent.content.size,o=t.tr;(t.selection instanceof ce||t.selection instanceof Rt)&&o.deleteSelection();let s=n.depth==0?null:Gl(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=Wo(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!Wo(o.doc,o.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(o.split(o.mapping.map(n.pos),1,a),!i&&!n.parentOffset&&n.parent.type!=s)){let u=o.mapping.map(n.before()),c=o.doc.resolve(u);s&&n.node(-1).canReplaceWith(c.index(),c.index()+1,s)&&o.setNodeMarkup(o.mapping.map(n.before()),s)}e(o.scrollIntoView())}return!0};function WE(t,e,n){let r,i,o=e.nodeBefore,s=e.nodeAfter;if(o.type.spec.isolating||s.type.spec.isolating)return!1;if((function(d,h,p){let f=h.nodeBefore,m=h.nodeAfter,E=h.index();return!(!(f&&m&&f.type.compatibleContent(m.type))||(!f.content.size&&h.parent.canReplace(E-1,E)?(p&&p(d.tr.delete(h.pos-f.nodeSize,h.pos).scrollIntoView()),0):!h.parent.canReplace(E,E+1)||!m.isTextblock&&!Gd(d.doc,h.pos)||(p&&p(d.tr.clearIncompatible(h.pos,f.type,f.contentMatchAt(f.childCount)).join(h.pos).scrollIntoView()),0)))})(t,e,n))return!0;let a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(r=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(r[0]||s.type).validEnd){if(n){let d=e.pos+s.nodeSize,h=j.empty;for(let m=r.length-1;m>=0;m--)h=j.from(r[m].create(null,h));h=j.from(o.copy(h));let p=t.tr.step(new vt(e.pos-1,d,e.pos,d,new W(h,1,0),r.length,!0)),f=d+2*r.length;Gd(p.doc,f)&&p.join(f),n(p.scrollIntoView())}return!0}let l=he.findFrom(e,1),u=l&&l.$from.blockRange(l.$to),c=u&&Uc(u);if(c!=null&&c>=e.depth)return n&&n(t.tr.lift(u,c).scrollIntoView()),!0;if(a&&ni(s,"start",!0)&&ni(o,"end")){let d=o,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let p=s,f=1;for(;!p.isTextblock;p=p.firstChild)f++;if(d.canReplace(d.childCount,d.childCount,p.content)){if(n){let m=j.empty;for(let E=h.length-1;E>=0;E--)m=j.from(h[E].copy(m));n(t.tr.step(new vt(e.pos-h.length,e.pos+s.nodeSize,e.pos+f,e.pos+s.nodeSize-f,new W(m,h.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function XE(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(e.tr.setSelection(ce.create(e.doc,t<0?i.start(o):i.end(o)))),!0)}}const uO=XE(-1),dO=XE(1);function Kc(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}let Wa=Kc(GE,(t,e,n)=>{let r=(function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("backward",s):l.parentOffset>0)?null:l})(t,n);if(!r)return!1;let i=$h(r);if(!i){let s=r.blockRange(),a=s&&Uc(s);return a!=null&&(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&WE(t,i,e))return!0;if(r.parent.content.size==0&&(ni(o,"end")||Z.isSelectable(o))){let s=Bc(t.doc,r.before(),r.after(),W.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(ni(o,"end")?he.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):Z.create(a.doc,i.pos-o.nodeSize)),e(a.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0)},(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;o=$h(r)}let s=o&&o.nodeBefore;return!(!s||!Z.isSelectable(s))&&(e&&e(t.tr.setSelection(Z.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),zh=Kc(GE,(t,e,n)=>{let r=(function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("forward",s):l.parentOffset<l.parent.content.size)?null:l})(t,n);if(!r)return!1;let i=Vh(r);if(!i)return!1;let o=i.nodeAfter;if(WE(t,i,e))return!0;if(r.parent.content.size==0&&(ni(o,"start")||Z.isSelectable(o))){let s=Bc(t.doc,r.before(),r.after(),W.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(ni(o,"start")?he.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):Z.create(a.doc,a.mapping.map(i.pos))),e(a.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0)},(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;o=Vh(r)}let s=o&&o.nodeAfter;return!(!s||!Z.isSelectable(s))&&(e&&e(t.tr.setSelection(Z.create(t.doc,o.pos)).scrollIntoView()),!0)});const ln={Enter:Kc((t,e)=>{let{$head:n,$anchor:r}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(e&&e(t.tr.insertText(`
|
|
16
|
-
`).scrollIntoView()),!0)},(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof Rt||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Gl(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=t.tr.insert(s,o.createAndFill());a.setSelection(ce.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(Wo(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Uc(r);return i!=null&&(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)},cO),"Mod-Enter":(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=Gl(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,s.createAndFill());l.setSelection(he.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},Backspace:Wa,"Mod-Backspace":Wa,"Shift-Backspace":Wa,Delete:zh,"Mod-Delete":zh,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new Rt(t.doc))),!0)},KE={"Ctrl-h":ln.Backspace,"Alt-Backspace":ln["Mod-Backspace"],"Ctrl-d":ln.Delete,"Ctrl-Alt-Backspace":ln["Mod-Delete"],"Alt-Delete":ln["Mod-Delete"],"Alt-d":ln["Mod-Delete"],"Ctrl-a":uO,"Ctrl-e":dO};for(let t in ln)KE[t]=ln[t];const ko=(typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!(typeof os=="undefined"||!os.platform)&&os.platform()=="darwin")?KE:ln;function qc(t,e){return t.reduce((n,r,i)=>n.concat(e(r,i)),[])}var Yh,Ei={},hO=(function(){if(Yh)return Ei;function t(n){return String.fromCharCode(parseInt(n.slice(1),16))}function e(n){return`%${`00${n.charCodeAt(0).toString(16)}`.slice(-2)}`}return Yh=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.encode=function(n){return btoa(encodeURIComponent(n).replace(/%[0-9A-F]{2}/g,t))},Ei.decode=function(n){return decodeURIComponent(Array.from(atob(n),e).join(""))},Ei})();const pO=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,fO=t=>t.split(pO).filter(e=>e).map(e=>e[0]).join("")||t[Symbol.iterator]().next().value||"";function qE(t){const e=(function(n){let r=0;for(let i=0;i<n.length;i++)r=(r<<5)-r+n.charCodeAt(i),r&=r;return Math.abs(r)})(t)%Xh.length;return Xh[e]}function Js(t,e){const n=e.lastIndex;let r;const i=[];for(;(r=e.exec(t))!==null;)i.push(r),r[0]===""&&(e.lastIndex+=1);return e.lastIndex=n,i}function Wl(t,e,n){let r=0;const i=[];for(const o of e)o.offset<r||(o.offset>r&&i.push(t.substring(r,o.offset)),i.push(...n(o)),r=o.offset+o.matchedText.length);return r<t.length&&i.push(t.substring(r)),i}function JE(t){try{return new URL(t).hostname}catch(e){return}}const mO=13;function Gh(t){return t.keyCode===mO&&!t.shiftKey}function Lo(t){const e=t.replace(/%2F/g,"/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/,"$1"),n=decodeURIComponent(e);if(/%[0-9A-Fa-f]{2}/.test(n))try{return decodeURIComponent(n.replace(/\+/g,"%20"))}catch(r){return n}return n}function Wh(t,e){return t.localeCompare(e,void 0,{usage:"search",sensitivity:"base"})===0}function EO(t){return[...t.matchAll(/^|\s+/g)].map(n=>n.index+n[0].length).map(n=>t.substring(n))}const Xh=["#996666","#9A6E61","#8D7662","#8E775E","#948771","#8A8360","#888D65","#6F8E63","#749378","#678975","#779E86","#639A8F","#6D92A1","#65869F","#697E9A","#736C9F","#8C6495","#956387","#B05D54","#B16D52","#AF8751","#AC8A56","#B7A458","#B5B35C","#83AA5D","#4F9D5D","#5FA777","#66B58F","#5FB3AC","#589AAF","#4E7F9E","#456CAC","#6456B7","#714AB2","#9771B5","#C154C1","#B05E81","#B04C6A","#B94E48","#AF593E","#C5994B","#B8C25D","#87AB39","#4FA83D","#40A860","#41AA78","#3AB09E","#3FC1AA","#56B4BE","#3EABBF","#4682B4","#7A58C1","#9966CC","#C54B8C","#B44668","#AE4560","#A3807B","#AB917A","#ACA586","#A8AF8E","#9EA587","#8BA690","#7DA98D","#7CB0A1","#8BA9A5","#7CA1A6","#859FAF","#8D90A1","#A397B4","#AE809E","#C08081","#BB8983","#B19461","#B5A27F","#B8B56A","#9AB973","#7AC488","#7CB7BB","#80B3C4","#788BBA","#7A89B8","#9678B6","#CB8FA9","#B57281","#C6726B","#C88A65","#C2955D","#C8B568","#B9C46A","#74C365","#6FD0C5","#6093D1","#7666C6","#D06DA1"],ki=(t,e,n=void 0)=>qc(t,r=>{if(typeof r=="string")return e(r,n);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return[{type:r.type,children:ki(r.children,e,r.type)}];case"link":return[{type:r.type,url:r.url,children:ki(r.children,e,r.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:r.type,action:r.action,params:r.params,children:ki(r.children,e,r.type)}];case"mention":case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return[r]}});function An(t,e){return n=>{const r=n;let i=0;const o=[];for(const s of Js(n,t)){s.index-i>0&&o.push(r.substring(i,s.index));const a=e(s);Array.isArray(a)?o.push(...a):o.push(a),i=s.index+s[0].length}return i<n.length&&o.push(n.substring(i)),o}}function ZE(t){return t.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}const Kh="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var Xl=(t=>(t[t.italic=1]="italic",t[t.strikethrough=2]="strikethrough",t[t.bold=4]="bold",t))(Xl||{});const _O=[0,1,2,3,4,5,6].map(t=>{const e=[];return 1&t||e.push(/_([^\s_].*?[^\s_])_|_([^\s_])_/),2&t||e.push(/~([^\s~].*?[^\s~])~|~([^\s~])~/),4&t||e.push(/\*([^\s*].*?[^\s*])\*|\*([^\s*])\*/),new RegExp(e.map(n=>n.source).join("|"),"g")}),AO={_:1,"*":4,"~":2};function gO(t){return QE(t,0)}function QE(t,e=0){const n=_O[e],r=n?(function(i){const o=SO.getOrCompute(i,()=>new RegExp(`(?:^|[\\s${Kh}])(?:${i.source})(?=[\\s${Kh}]|$)`,"g")),s=An(o,a=>{const l=a[0][1],u=a[1]||a[2]||a[3]||a[4]||a[5]||a[6];return[" ",{type:Xl[AO[l]],children:[u]}]});return a=>{const[l,...u]=s(" "+a);return l.length>1&&u.unshift(l.substring(1)),u}})(n):()=>[t];return ki(r(t),(i,o)=>o==="bold"||o==="italic"||o==="strikethrough"?QE(i,e|Xl[o]):[i])}const SO=(function(){const t=(function(){try{return new WeakMap}catch(e){const n={has:()=>!1,get:()=>{},set:()=>n};return n}})();return{getOrCompute(e,n){if(t.has(e))return t.get(e);const r=n();return t.set(e,r),r}}})();var Kl=function(t,e){return Kl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Kl(t,e)};function ho(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Kl(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Me=function(){return Me=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Me.apply(this,arguments)};var OO=Object.prototype.hasOwnProperty;function It(t){return typeof t=="boolean"}function Vn(t,e){for(var n=t.length-1;n>=0;n--)e(t[n])===!0&&t.splice(n,1)}function cr(t){throw new Error("Unhandled case for value: '".concat(t,"'"))}var Mo=/\s+/,e_=(function(){function t(e){e===void 0&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return t.prototype.setTagName=function(e){return this.tagName=e,this},t.prototype.getTagName=function(){return this.tagName},t.prototype.setAttr=function(e,n){return this.getAttrs()[e]=n,this},t.prototype.getAttr=function(e){return this.getAttrs()[e]},t.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},t.prototype.getAttrs=function(){return this.attrs},t.prototype.setClass=function(e){return this.setAttr("class",e)},t.prototype.addClass=function(e){for(var n,r=this.getClass(),i=r?r.split(Mo):[],o=e.split(Mo);n=o.shift();)i.indexOf(n)===-1&&i.push(n);return this.getAttrs().class=i.join(" "),this},t.prototype.removeClass=function(e){for(var n,r=this.getClass(),i=r?r.split(Mo):[],o=e.split(Mo);i.length&&(n=o.shift());){var s=i.indexOf(n);s!==-1&&i.splice(s,1)}return this.getAttrs().class=i.join(" "),this},t.prototype.getClass=function(){return this.getAttrs().class||""},t.prototype.hasClass=function(e){return(" "+this.getClass()+" ").indexOf(" "+e+" ")!==-1},t.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},t.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},t.prototype.getInnerHTML=function(){return this.innerHTML||""},t.prototype.getInnerHtml=function(){return this.getInnerHTML()},t.prototype.toAnchorString=function(){var e=this.getTagName(),n=this.buildAttrsStr();return["<",e,n=n?" "+n:"",">",this.getInnerHtml(),"</",e,">"].join("")},t.prototype.buildAttrsStr=function(){var e=this.getAttrs(),n=[];for(var r in e)OO.call(e,r)&&n.push(r+'="'+e[r]+'"');return n.join(" ")},t})();function qh(t){var e="";return t.scheme&&t.host&&(e+=t.scheme+"://"),t.host&&(e+=t.host),t.path&&(e+="/"+t.path),t.query&&(e+="?"+t.query),t.fragment&&(e+="#"+t.fragment),e}function Xa(t,e,n){var r=e/2,i=Math.ceil(r),o=-1*Math.floor(r),s="";return o<0&&(s=t.substr(o)),t.substr(0,i)+n+s}var vO=(function(){function t(e){e===void 0&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return t.prototype.build=function(e){return new e_({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},t.prototype.createAttrs=function(e){var n={href:e.getAnchorHref()},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),this.truncate.length&&this.truncate.length<e.getAnchorText().length&&(n.title=e.getAnchorHref()),n},t.prototype.createCssClass=function(e){var n=this.className;if(n){for(var r=[n],i=e.getCssClassSuffixes(),o=0,s=i.length;o<s;o++)r.push(n+"-"+i[o]);return r.join(" ")}return""},t.prototype.processAnchorText=function(e){return e=this.doTruncate(e)},t.prototype.doTruncate=function(e){var n=this.truncate;if(!n.length)return e;var r=n.length,i=n.location;return i==="smart"?(function(o,s,a){var l,u;if(a==null?(a="…",u=3,l=8):(u=a.length,l=a.length),o.length<=s)return o;var c=s-u,d=(function(A){var O={},S=A,v=S.match(/^([a-z]+):\/\//i);return v&&(O.scheme=v[1],S=S.slice(v[0].length)),(v=S.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(O.host=v[1],S=S.slice(v[0].length)),(v=S.match(/^\/(.*?)(?=(\?|#|$))/i))&&(O.path=v[1],S=S.slice(v[0].length)),(v=S.match(/^\?(.*?)(?=(#|$))/i))&&(O.query=v[1],S=S.slice(v[0].length)),(v=S.match(/^#(.*?)$/i))&&(O.fragment=v[1]),O})(o);if(d.query){var h=d.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);h&&(d.query=d.query.substr(0,h[1].length),o=qh(d))}if(o.length<=s||(d.host&&(d.host=d.host.replace(/^www\./,""),o=qh(d)),o.length<=s))return o;var p="";if(d.host&&(p+=d.host),p.length>=c)return d.host.length===s?(d.host.substr(0,s-u)+a).substr(0,c+l):Xa(p,c,a).substr(0,c+l);var f="";if(d.path&&(f+="/"+d.path),d.query&&(f+="?"+d.query),f){if((p+f).length>=c)return(p+f).length==s?(p+f).substr(0,s):(p+Xa(f,c-p.length,a)).substr(0,c+l);p+=f}if(d.fragment){var m="#"+d.fragment;if((p+m).length>=c)return(p+m).length==s?(p+m).substr(0,s):(p+Xa(m,c-p.length,a)).substr(0,c+l);p+=m}if(d.scheme&&d.host){var E=d.scheme+"://";if((p+E).length<c)return(E+p).substr(0,s)}if(p.length<=s)return p;var _="";return c>0&&(_=p.substr(-1*Math.floor(c/2))),(p.substr(0,Math.ceil(c/2))+a+_).substr(0,c+l)})(e,r):i==="middle"?(function(o,s,a){if(o.length<=s)return o;var l,u;a==null?(a="…",l=8,u=3):(l=a.length,u=a.length);var c=s-u,d="";return c>0&&(d=o.substr(-1*Math.floor(c/2))),(o.substr(0,Math.ceil(c/2))+a+d).substr(0,c+l)})(e,r):(function(o,s,a){return(function(l,u,c){var d;return l.length>u&&(c==null?(c="…",d=3):d=c.length,l=l.substring(0,u-d)+c),l})(o,s,a)})(e,r)},t})(),po=(function(){function t(e){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return t.prototype.getMatchedText=function(){return this.matchedText},t.prototype.setOffset=function(e){this.offset=e},t.prototype.getOffset=function(){return this.offset},t.prototype.getCssClassSuffixes=function(){return[this.type]},t.prototype.buildTag=function(){return this.tagBuilder.build(this)},t})();function li(t){return t>=65&&t<=90||t>=97&&t<=122}function Xe(t){return t>=48&&t<=57}function Jc(t){return t==34||t==39}function gr(t){return t<8232?t<160?t>=9&&t<=13||t==32:t<5760?t==160:t==5760||t>=8192&&t<=8202:t<8287?t>=8232&&t<=8233||t==8239:t<12288?t==8287:t==12288||t==65279}function Sr(t){return t<4800?t<2949?t<2451?t<1425?t<768?t<192?t<169?t<65?t>=48&&t<=57:t>=65&&t<=90||t>=97&&t<=122:t<181?t>=169&&t<=170||t==174:t==181||t==186:t<710?t<216?t>=192&&t<=214:t>=216&&t<=246||t>=248&&t<=705:t<748?t>=710&&t<=721||t>=736&&t<=740:t==748||t==750:t<910?t<895?t<886?t>=768&&t<=884:t>=886&&t<=887||t>=890&&t<=893:t<904?t==895||t==902:t>=904&&t<=906||t==908:t<1155?t<931?t>=910&&t<=929:t>=931&&t<=1013||t>=1015&&t<=1153:t<1369?t>=1155&&t<=1327||t>=1329&&t<=1366:t==1369||t>=1377&&t<=1415:t<1808?t<1552?t<1476?t<1471?t>=1425&&t<=1469:t==1471||t>=1473&&t<=1474:t<1488?t>=1476&&t<=1477||t==1479:t>=1488&&t<=1514||t>=1520&&t<=1522:t<1749?t<1568?t>=1552&&t<=1562:t>=1568&&t<=1641||t>=1646&&t<=1747:t<1770?t>=1749&&t<=1756||t>=1759&&t<=1768:t>=1770&&t<=1788||t==1791:t<2230?t<2042?t<1869?t>=1808&&t<=1866:t>=1869&&t<=1969||t>=1984&&t<=2037:t<2112?t==2042||t>=2048&&t<=2093:t>=2112&&t<=2139||t>=2208&&t<=2228:t<2406?t<2260?t>=2230&&t<=2237:t>=2260&&t<=2273||t>=2275&&t<=2403:t<2437?t>=2406&&t<=2415||t>=2417&&t<=2435:t>=2437&&t<=2444||t>=2447&&t<=2448:t<2693?t<2579?t<2519?t<2486?t<2474?t>=2451&&t<=2472:t>=2474&&t<=2480||t==2482:t<2503?t>=2486&&t<=2489||t>=2492&&t<=2500:t>=2503&&t<=2504||t>=2507&&t<=2510:t<2534?t<2524?t==2519:t>=2524&&t<=2525||t>=2527&&t<=2531:t<2565?t>=2534&&t<=2545||t>=2561&&t<=2563:t>=2565&&t<=2570||t>=2575&&t<=2576:t<2631?t<2613?t<2602?t>=2579&&t<=2600:t>=2602&&t<=2608||t>=2610&&t<=2611:t<2620?t>=2613&&t<=2614||t>=2616&&t<=2617:t==2620||t>=2622&&t<=2626:t<2649?t<2635?t>=2631&&t<=2632:t>=2635&&t<=2637||t==2641:t<2662?t>=2649&&t<=2652||t==2654:t>=2662&&t<=2677||t>=2689&&t<=2691:t<2821?t<2759?t<2730?t<2703?t>=2693&&t<=2701:t>=2703&&t<=2705||t>=2707&&t<=2728:t<2741?t>=2730&&t<=2736||t>=2738&&t<=2739:t>=2741&&t<=2745||t>=2748&&t<=2757:t<2784?t<2763?t>=2759&&t<=2761:t>=2763&&t<=2765||t==2768:t<2809?t>=2784&&t<=2787||t>=2790&&t<=2799:t==2809||t>=2817&&t<=2819:t<2887?t<2858?t<2831?t>=2821&&t<=2828:t>=2831&&t<=2832||t>=2835&&t<=2856:t<2869?t>=2858&&t<=2864||t>=2866&&t<=2867:t>=2869&&t<=2873||t>=2876&&t<=2884:t<2911?t<2902?t>=2887&&t<=2888||t>=2891&&t<=2893:t>=2902&&t<=2903||t>=2908&&t<=2909:t<2929?t>=2911&&t<=2915||t>=2918&&t<=2927:t==2929||t>=2946&&t<=2947:t<3517?t<3205?t<3046?t<2984?t<2969?t<2958?t>=2949&&t<=2954:t>=2958&&t<=2960||t>=2962&&t<=2965:t<2974?t>=2969&&t<=2970||t==2972:t>=2974&&t<=2975||t>=2979&&t<=2980:t<3014?t<2990?t>=2984&&t<=2986:t>=2990&&t<=3001||t>=3006&&t<=3010:t<3024?t>=3014&&t<=3016||t>=3018&&t<=3021:t==3024||t==3031:t<3142?t<3086?t<3072?t>=3046&&t<=3055:t>=3072&&t<=3075||t>=3077&&t<=3084:t<3114?t>=3086&&t<=3088||t>=3090&&t<=3112:t>=3114&&t<=3129||t>=3133&&t<=3140:t<3160?t<3146?t>=3142&&t<=3144:t>=3146&&t<=3149||t>=3157&&t<=3158:t<3174?t>=3160&&t<=3162||t>=3168&&t<=3171:t>=3174&&t<=3183||t>=3200&&t<=3203:t<3333?t<3274?t<3242?t<3214?t>=3205&&t<=3212:t>=3214&&t<=3216||t>=3218&&t<=3240:t<3260?t>=3242&&t<=3251||t>=3253&&t<=3257:t>=3260&&t<=3268||t>=3270&&t<=3272:t<3296?t<3285?t>=3274&&t<=3277:t>=3285&&t<=3286||t==3294:t<3313?t>=3296&&t<=3299||t>=3302&&t<=3311:t>=3313&&t<=3314||t>=3329&&t<=3331:t<3423?t<3389?t<3342?t>=3333&&t<=3340:t>=3342&&t<=3344||t>=3346&&t<=3386:t<3402?t>=3389&&t<=3396||t>=3398&&t<=3400:t>=3402&&t<=3406||t>=3412&&t<=3415:t<3458?t<3430?t>=3423&&t<=3427:t>=3430&&t<=3439||t>=3450&&t<=3455:t<3482?t>=3458&&t<=3459||t>=3461&&t<=3478:t>=3482&&t<=3505||t>=3507&&t<=3515:t<3804?t<3722?t<3570?t<3535?t<3520?t==3517:t>=3520&&t<=3526||t==3530:t<3544?t>=3535&&t<=3540||t==3542:t>=3544&&t<=3551||t>=3558&&t<=3567:t<3664?t<3585?t>=3570&&t<=3571:t>=3585&&t<=3642||t>=3648&&t<=3662:t<3716?t>=3664&&t<=3673||t>=3713&&t<=3714:t==3716||t>=3719&&t<=3720:t<3754?t<3737?t<3725?t==3722:t==3725||t>=3732&&t<=3735:t<3749?t>=3737&&t<=3743||t>=3745&&t<=3747:t==3749||t==3751:t<3776?t<3757?t>=3754&&t<=3755:t>=3757&&t<=3769||t>=3771&&t<=3773:t<3784?t>=3776&&t<=3780||t==3782:t>=3784&&t<=3789||t>=3792&&t<=3801:t<4176?t<3902?t<3872?t<3840?t>=3804&&t<=3807:t==3840||t>=3864&&t<=3865:t<3895?t>=3872&&t<=3881||t==3893:t==3895||t==3897:t<3974?t<3913?t>=3902&&t<=3911:t>=3913&&t<=3948||t>=3953&&t<=3972:t<4038?t>=3974&&t<=3991||t>=3993&&t<=4028:t==4038||t>=4096&&t<=4169:t<4688?t<4301?t<4256?t>=4176&&t<=4253:t>=4256&&t<=4293||t==4295:t<4348?t==4301||t>=4304&&t<=4346:t>=4348&&t<=4680||t>=4682&&t<=4685:t<4746?t<4698?t>=4688&&t<=4694||t==4696:t>=4698&&t<=4701||t>=4704&&t<=4744:t<4786?t>=4746&&t<=4749||t>=4752&&t<=4784:t>=4786&&t<=4789||t>=4792&&t<=4798:t<11035?t<7416?t<6176?t<5873?t<4992?t<4824?t<4802?t==4800:t>=4802&&t<=4805||t>=4808&&t<=4822:t<4888?t>=4824&&t<=4880||t>=4882&&t<=4885:t>=4888&&t<=4954||t>=4957&&t<=4959:t<5121?t<5024?t>=4992&&t<=5007:t>=5024&&t<=5109||t>=5112&&t<=5117:t<5761?t>=5121&&t<=5740||t>=5743&&t<=5759:t>=5761&&t<=5786||t>=5792&&t<=5866:t<6002?t<5920?t<5888?t>=5873&&t<=5880:t>=5888&&t<=5900||t>=5902&&t<=5908:t<5984?t>=5920&&t<=5940||t>=5952&&t<=5971:t>=5984&&t<=5996||t>=5998&&t<=6e3:t<6108?t<6016?t>=6002&&t<=6003:t>=6016&&t<=6099||t==6103:t<6155?t>=6108&&t<=6109||t>=6112&&t<=6121:t>=6155&&t<=6157||t>=6160&&t<=6169:t<6783?t<6512?t<6400?t<6272?t>=6176&&t<=6263:t>=6272&&t<=6314||t>=6320&&t<=6389:t<6448?t>=6400&&t<=6430||t>=6432&&t<=6443:t>=6448&&t<=6459||t>=6470&&t<=6509:t<6608?t<6528?t>=6512&&t<=6516:t>=6528&&t<=6571||t>=6576&&t<=6601:t<6688?t>=6608&&t<=6617||t>=6656&&t<=6683:t>=6688&&t<=6750||t>=6752&&t<=6780:t<7040?t<6832?t<6800?t>=6783&&t<=6793:t>=6800&&t<=6809||t==6823:t<6992?t>=6832&&t<=6846||t>=6912&&t<=6987:t>=6992&&t<=7001||t>=7019&&t<=7027:t<7245?t<7168?t>=7040&&t<=7155:t>=7168&&t<=7223||t>=7232&&t<=7241:t<7376?t>=7245&&t<=7293||t>=7296&&t<=7304:t>=7376&&t<=7378||t>=7380&&t<=7414:t<8450?t<8130?t<8025?t<7960?t<7424?t>=7416&&t<=7417:t>=7424&&t<=7669||t>=7675&&t<=7957:t<8008?t>=7960&&t<=7965||t>=7968&&t<=8005:t>=8008&&t<=8013||t>=8016&&t<=8023:t<8031?t<8027?t==8025:t==8027||t==8029:t<8118?t>=8031&&t<=8061||t>=8064&&t<=8116:t>=8118&&t<=8124||t==8126:t<8205?t<8150?t<8134?t>=8130&&t<=8132:t>=8134&&t<=8140||t>=8144&&t<=8147:t<8178?t>=8150&&t<=8155||t>=8160&&t<=8172:t>=8178&&t<=8180||t>=8182&&t<=8188:t<8305?t<8252?t==8205:t==8252||t==8265:t<8336?t==8305||t==8319:t>=8336&&t<=8348||t>=8400&&t<=8432:t<8579?t<8486?t<8469?t<8455?t==8450:t==8455||t>=8458&&t<=8467:t<8482?t==8469||t>=8473&&t<=8477:t==8482||t==8484:t<8495?t<8488?t==8486:t==8488||t>=8490&&t<=8493:t<8517?t>=8495&&t<=8505||t>=8508&&t<=8511:t>=8517&&t<=8521||t==8526:t<9410?t<9e3?t<8592?t>=8579&&t<=8580:t>=8592&&t<=8703||t>=8986&&t<=8987:t<9193?t==9e3||t==9167:t>=9193&&t<=9203||t>=9208&&t<=9210:t<9723?t<9654?t==9410||t>=9642&&t<=9643:t==9654||t==9664:t<10548?t>=9723&&t<=9726||t>=9728&&t<=10175:t>=10548&&t<=10549||t>=11013&&t<=11015:t<43259?t<12445?t<11688?t<11520?t<11264?t<11088?t>=11035&&t<=11036:t==11088||t==11093:t<11360?t>=11264&&t<=11310||t>=11312&&t<=11358:t>=11360&&t<=11492||t>=11499&&t<=11507:t<11568?t<11559?t>=11520&&t<=11557:t==11559||t==11565:t<11647?t>=11568&&t<=11623||t==11631:t>=11647&&t<=11670||t>=11680&&t<=11686:t<11744?t<11712?t<11696?t>=11688&&t<=11694:t>=11696&&t<=11702||t>=11704&&t<=11710:t<11728?t>=11712&&t<=11718||t>=11720&&t<=11726:t>=11728&&t<=11734||t>=11736&&t<=11742:t<12330?t<11823?t>=11744&&t<=11775:t==11823||t>=12293&&t<=12294:t<12353?t>=12330&&t<=12341||t>=12347&&t<=12349:t>=12353&&t<=12438||t>=12441&&t<=12442:t<42512?t<12951?t<12549?t<12449?t>=12445&&t<=12447:t>=12449&&t<=12538||t>=12540&&t<=12543:t<12704?t>=12549&&t<=12589||t>=12593&&t<=12686:t>=12704&&t<=12730||t>=12784&&t<=12799:t<19968?t<12953?t==12951:t==12953||t>=13312&&t<=19893:t<42192?t>=19968&&t<=40917||t>=40960&&t<=42124:t>=42192&&t<=42237||t>=42240&&t<=42508:t<42891?t<42623?t<42560?t>=42512&&t<=42539:t>=42560&&t<=42610||t>=42612&&t<=42621:t<42775?t>=42623&&t<=42725||t>=42736&&t<=42737:t>=42775&&t<=42783||t>=42786&&t<=42888:t<43072?t<42928?t>=42891&&t<=42926:t>=42928&&t<=42935||t>=42999&&t<=43047:t<43216?t>=43072&&t<=43123||t>=43136&&t<=43205:t>=43216&&t<=43225||t>=43232&&t<=43255:t<55243?t<43744?t<43488?t<43312?t<43261?t==43259:t==43261||t>=43264&&t<=43309:t<43392?t>=43312&&t<=43347||t>=43360&&t<=43388:t>=43392&&t<=43456||t>=43471&&t<=43481:t<43600?t<43520?t>=43488&&t<=43518:t>=43520&&t<=43574||t>=43584&&t<=43597:t<43642?t>=43600&&t<=43609||t>=43616&&t<=43638:t>=43642&&t<=43714||t>=43739&&t<=43741:t<43824?t<43785?t<43762?t>=43744&&t<=43759:t>=43762&&t<=43766||t>=43777&&t<=43782:t<43808?t>=43785&&t<=43790||t>=43793&&t<=43798:t>=43808&&t<=43814||t>=43816&&t<=43822:t<44012?t<43868?t>=43824&&t<=43866:t>=43868&&t<=43877||t>=43888&&t<=44010:t<44032?t>=44012&&t<=44013||t>=44016&&t<=44025:t>=44032&&t<=55203||t>=55216&&t<=55238:t<64848?t<64298?t<64112?t<55296?t>=55243&&t<=55291:t>=55296&&t<=57343||t>=63744&&t<=64109:t<64275?t>=64112&&t<=64217||t>=64256&&t<=64262:t>=64275&&t<=64279||t>=64285&&t<=64296:t<64320?t<64312?t>=64298&&t<=64310:t>=64312&&t<=64316||t==64318:t<64326?t>=64320&&t<=64321||t>=64323&&t<=64324:t>=64326&&t<=64433||t>=64467&&t<=64829:t<65296?t<65024?t<64914?t>=64848&&t<=64911:t>=64914&&t<=64967||t>=65008&&t<=65019:t<65136?t>=65024&&t<=65039||t>=65056&&t<=65071:t>=65136&&t<=65140||t>=65142&&t<=65276:t<65474?t<65345?t>=65296&&t<=65305||t>=65313&&t<=65338:t>=65345&&t<=65370||t>=65382&&t<=65470:t<65490?t>=65474&&t<=65479||t>=65482&&t<=65487:t>=65490&&t<=65495||t>=65498&&t<=65500}function t_(t){return t<58?t<44?t==33:t==44||t==46:t<63?t>=58&&t<=59:t==63||t==94}function DO(t){return t<91?t==40:t==91||t==123}function Jh(t){return t<93?t==41:t==93||t==125}var TO=/^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/,n_=/https?:\/\//i,RO=new RegExp("^"+n_.source,"i"),IO=/^(javascript|vbscript):/i,yO=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,CO=/^(?:\/\/)?([^/#?:]+)/,Ki=li;function r_(t){return li(t)||Xe(t)||t===43||t===45||t===46}var Bn=Sr;function Zc(t){return t===95||Bn(t)}function i_(t){return Sr(t)||(function(e){return e<91?e<47?e>=35&&e<=43||e==45:e<61?e==47:e==61||e==64:e<95?e==91||e==93:e<123?e==95:e>=123&&e<=126||e==10003})(t)||t_(t)}function Qc(t){return t===47||t===63||t===35}function Zh(t){return TO.test(t.toLowerCase())}var NO=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,bO=/[:/?#]/,wO=/^(https?:\/\/)?(?:www\.)?/i,kO=/^\/\//,o_=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="url",r.url="",r.urlMatchType="scheme",r.protocolRelativeMatch=!1,r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.protocolPrepended=!1,r.urlMatchType=n.urlMatchType,r.url=n.url,r.protocolRelativeMatch=n.protocolRelativeMatch,r.stripPrefix=n.stripPrefix,r.stripTrailingSlash=n.stripTrailingSlash,r.decodePercentEncoding=n.decodePercentEncoding,r}return ho(e,t),e.prototype.getType=function(){return"url"},e.prototype.getUrlMatchType=function(){return this.urlMatchType},e.prototype.getUrl=function(){var n=this.url;return this.protocolRelativeMatch||this.urlMatchType==="scheme"||this.protocolPrepended||(n=this.url="http://"+n,this.protocolPrepended=!0),n},e.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},e.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=n.replace(kO,"")),this.stripPrefix.scheme&&(n=n.replace(RO,"")),this.stripPrefix.www&&(n=(function(r){return r.includes("www.")?r.replace(wO,"$1"):r})(n)),this.stripTrailingSlash&&(n=(function(r){return r.charAt(r.length-1)==="/"&&(r=r.slice(0,-1)),r})(n)),this.decodePercentEncoding&&(n=(function(r){var i=r.replace(/%(?:22|26|27|3C|3E)/gi,function(o){return o==="%22"?""":o==="%26"?"&":o==="%27"?"'":o==="%3C"||o==="%3c"?"<":">"});if(i.includes("%"))try{return decodeURIComponent(i)}catch(o){}return i})(n)),n},e})(po),LO=/^mailto:/i,s_=Sr;function eu(t){return s_(t)||(function(e){return e<47?e<42?e==33||e>=35&&e<=39:e>=42&&e<=43||e==45:e<63?e==47||e==61:e<94?e==63:e>=94&&e<=96||e>=123&&e<=126})(t)}var a_=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="email",r.email="",r.email=n.email,r}return ho(e,t),e.prototype.getType=function(){return"email"},e.prototype.getEmail=function(){return this.email},e.prototype.getAnchorHref=function(){return"mailto:"+this.email},e.prototype.getAnchorText=function(){return this.email},e})(po);function l_(t){return t===95||Sr(t)}var MO=["twitter","facebook","instagram","tiktok","youtube"],PO=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="hashtag",r.serviceName="twitter",r.hashtag="",r.serviceName=n.serviceName,r.hashtag=n.hashtag,r}return ho(e,t),e.prototype.getType=function(){return"hashtag"},e.prototype.getServiceName=function(){return this.serviceName},e.prototype.getHashtag=function(){return this.hashtag},e.prototype.getAnchorHref=function(){var n=this.serviceName,r=this.hashtag;switch(n){case"twitter":return"https://twitter.com/hashtag/"+r;case"facebook":return"https://www.facebook.com/hashtag/"+r;case"instagram":return"https://instagram.com/explore/tags/"+r;case"tiktok":return"https://www.tiktok.com/tag/"+r;case"youtube":return"https://youtube.com/hashtag/"+r;default:cr(n)}},e.prototype.getAnchorText=function(){return"#"+this.hashtag},e.prototype.getCssClassSuffixes=function(){var n=t.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},e})(po),xO={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function c_(t){return t===45||t===46||t===95||li(t)||Xe(t)}var FO=["twitter","instagram","soundcloud","tiktok","youtube"],HO=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="mention",r.serviceName="twitter",r.mention="",r.mention=n.mention,r.serviceName=n.serviceName,r}return ho(e,t),e.prototype.getType=function(){return"mention"},e.prototype.getMention=function(){return this.mention},e.prototype.getServiceName=function(){return this.serviceName},e.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;case"youtube":return"https://youtube.com/@"+this.mention;default:cr(this.serviceName)}},e.prototype.getAnchorText=function(){return"@"+this.mention},e.prototype.getCssClassSuffixes=function(){var n=t.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},e})(po),UO=/[-. ()]/,BO=new RegExp("^".concat(/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/.source,"|").concat(/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source,"$"));function u_(t){return t===45||t===46||t===32}function tu(t){return t===44||t===59}var jO=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="phone",r.number="",r.plusSign=!1,r.number=n.number,r.plusSign=n.plusSign,r}return ho(e,t),e.prototype.getType=function(){return"phone"},e.prototype.getPhoneNumber=function(){return this.number},e.prototype.getNumber=function(){return this.getPhoneNumber()},e.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},e.prototype.getAnchorText=function(){return this.matchedText},e})(po),$O=(function(){function t(e,n){this.charIdx=0,this.matches=[],this._stateMachines=[],this.schemeUrlMachinesCount=0,this.text=e,this.tagBuilder=n.tagBuilder,this.stripPrefix=n.stripPrefix,this.stripTrailingSlash=n.stripTrailingSlash,this.decodePercentEncoding=n.decodePercentEncoding,this.hashtagServiceName=n.hashtagServiceName,this.mentionServiceName=n.mentionServiceName}return Object.defineProperty(t.prototype,"stateMachines",{get:function(){return this._stateMachines},enumerable:!1,configurable:!0}),t.prototype.addMachine=function(e){this._stateMachines.push(e),ep(e)&&this.schemeUrlMachinesCount++},t.prototype.removeMachine=function(e){this._stateMachines=this._stateMachines.filter(function(n){return n!==e}),ep(e)&&this.schemeUrlMachinesCount--},t.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},t})();function Zs(t,e,n){var r=t.charIdx;if(n===35)t.addMachine({type:2,startIdx:r,state:28,acceptStateReached:!1});else if(n===64)t.addMachine((function(o,s){return{type:3,startIdx:o,state:s,acceptStateReached:!1}})(r,30));else if(n===47)t.addMachine(ql(r,11));else if(n===43)t.addMachine(Ka(r,37));else if(n===40)t.addMachine(Ka(r,32));else{if(Xe(n)&&(t.addMachine(Ka(r,38)),t.addMachine((function(o,s){return{type:0,startIdx:o,state:s,acceptStateReached:!1,matchType:2,octetsEncountered:1}})(r,13))),s_(n)){var i=e.toLowerCase()==="m"?15:22;t.addMachine((function(o,s){return{type:1,startIdx:o,state:s,acceptStateReached:!1}})(r,i))}Ki(n)&&t.addMachine(Qs(r,0)),Sr(n)&&t.addMachine(ql(r,5))}}function VO(t,e,n){n===58?e.state=2:n===45?e.state=1:r_(n)||t.removeMachine(e)}function zO(t,e,n){var r=t.charIdx;n===45||(n===47?(t.removeMachine(e),t.addMachine(ql(r,11))):r_(n)?e.state=0:t.removeMachine(e))}function YO(t,e,n){var r=t.charIdx;n===47?e.state=3:n===46?t.removeMachine(e):Bn(n)?(e.state=5,Ki(n)&&t.addMachine(Qs(r,0))):t.removeMachine(e)}function GO(t,e,n){n===47?e.state=4:i_(n)?(e.state=10,e.acceptStateReached=!0):Oe(t,e)}function WO(t,e,n,r){r===47?(e.state=10,e.acceptStateReached=!0):Bn(r)?(e.state=5,e.acceptStateReached=!0):t.removeMachine(e)}function XO(t,e,n){n===47?e.state=12:t.removeMachine(e)}function KO(t,e,n){Bn(n)?e.state=5:t.removeMachine(e)}function qO(t,e,n){n===46?e.state=7:n===45?e.state=6:n===58?e.state=8:Qc(n)?e.state=10:Zc(n)||Oe(t,e)}function JO(t,e,n,r){r===45||(r===46?Oe(t,e):Bn(r)?e.state=5:Oe(t,e))}function ZO(t,e,n,r){r===46?Oe(t,e):Bn(r)?(e.state=5,e.acceptStateReached=!0):Oe(t,e)}function QO(t,e,n){n===46?e.state=14:n===58?e.state=8:Xe(n)||(Qc(n)?e.state=10:Sr(n)?t.removeMachine(e):Oe(t,e))}function e0(t,e,n){Xe(n)?(e.octetsEncountered++,e.octetsEncountered===4&&(e.acceptStateReached=!0),e.state=13):Oe(t,e)}function t0(t,e,n){Xe(n)?e.state=9:Oe(t,e)}function n0(t,e,n){Xe(n)||(Qc(n)?e.state=10:Oe(t,e))}function r0(t,e,n){i_(n)||Oe(t,e)}function i0(t,e,n,r){n.toLowerCase()==="a"?e.state=16:Or(t,e,r)}function o0(t,e,n,r){n.toLowerCase()==="i"?e.state=17:Or(t,e,r)}function s0(t,e,n,r){n.toLowerCase()==="l"?e.state=18:Or(t,e,r)}function a0(t,e,n,r){n.toLowerCase()==="t"?e.state=19:Or(t,e,r)}function l0(t,e,n,r){n.toLowerCase()==="o"?e.state=20:Or(t,e,r)}function c0(t,e,n){n===58?e.state=21:Or(t,e,n)}function u0(t,e,n){eu(n)?e.state=22:t.removeMachine(e)}function Or(t,e,n){n===46?e.state=23:n===64?e.state=24:eu(n)?e.state=22:t.removeMachine(e)}function d0(t,e,n){n===46||n===64?t.removeMachine(e):eu(n)?e.state=22:t.removeMachine(e)}function h0(t,e,n){Bn(n)?e.state=25:t.removeMachine(e)}function p0(t,e,n){n===46?e.state=27:n===45?e.state=26:Zc(n)||Oe(t,e)}function f0(t,e,n){n===45||n===46?Oe(t,e):Zc(n)?e.state=25:Oe(t,e)}function m0(t,e,n){n===46||n===45?Oe(t,e):Bn(n)?(e.state=25,e.acceptStateReached=!0):Oe(t,e)}function E0(t,e,n){l_(n)?(e.state=29,e.acceptStateReached=!0):t.removeMachine(e)}function _0(t,e,n){l_(n)||Oe(t,e)}function A0(t,e,n){c_(n)?(e.state=31,e.acceptStateReached=!0):t.removeMachine(e)}function g0(t,e,n){c_(n)||(Sr(n)?t.removeMachine(e):Oe(t,e))}function S0(t,e,n,r){Xe(r)?e.state=38:(t.removeMachine(e),Zs(t,n,r))}function O0(t,e,n,r){Xe(r)?e.state=33:t.removeMachine(e),Zs(t,n,r)}function v0(t,e,n){Xe(n)?e.state=34:t.removeMachine(e)}function D0(t,e,n){Xe(n)?e.state=35:t.removeMachine(e)}function T0(t,e,n){n===41?e.state=36:t.removeMachine(e)}function R0(t,e,n,r){Xe(r)?e.state=38:u_(r)?e.state=39:t.removeMachine(e)}function I0(t,e,n,r){var i=t.charIdx;e.acceptStateReached=!0,tu(r)?e.state=40:r===35?e.state=41:Xe(r)||(r===40?e.state=32:u_(r)?e.state=39:(Oe(t,e),Ki(r)&&t.addMachine(Qs(i,0))))}function y0(t,e,n,r){Xe(r)?e.state=38:r===40?e.state=32:(Oe(t,e),Zs(t,n,r))}function C0(t,e,n){tu(n)||(n===35?e.state=41:Xe(n)?e.state=38:Oe(t,e))}function N0(t,e,n){tu(n)?e.state=40:Xe(n)?t.removeMachine(e):Oe(t,e)}function Oe(t,e){var n=t.matches,r=t.text,i=t.charIdx,o=t.tagBuilder,s=t.stripPrefix,a=t.stripTrailingSlash,l=t.decodePercentEncoding,u=t.hashtagServiceName,c=t.mentionServiceName;if(t.removeMachine(e),e.acceptStateReached){var d,h,p=e.startIdx,f=r.slice(e.startIdx,i);switch(f=(function(_){for(var A={"(":0,"{":0,"[":0},O=0;O<_.length;O++){var S=_.charAt(O);DO(T=_.charCodeAt(O))?A[S]++:Jh(T)&&A[Qh[S]]--}for(var v=_.length-1;v>=0;){var T;if(S=_.charAt(v),Jh(T=_.charCodeAt(v))){var R=Qh[S];if(!(A[R]<0))break;A[R]++,v--}else{if(!t_(T))break;v--}}return _.slice(0,v+1)})(f),e.type){case 0:if(r.charCodeAt(e.startIdx-1)===64)return;switch(e.matchType){case 0:var m=n_.exec(f);if(m&&(p+=m.index,f=f.slice(m.index)),!(function(_){if(IO.test(_))return!1;var A=_.match(yO);if(!A)return!1;var O=!!A[1],S=A[2];return!!O||!(S.indexOf(".")===-1||!/[A-Za-z]/.test(S))})(f))return;break;case 1:if(!(function(_){var A=_.match(CO);if(!A)return!1;var O=A[0].split(".");return!(O.length<2||!Zh(O[O.length-1]))})(f))return;break;case 2:if(h=f.split(bO,1)[0],!NO.test(h))return;break;default:cr(e)}n.push(new o_({tagBuilder:o,matchedText:f,offset:p,urlMatchType:b0(e.matchType),url:f,protocolRelativeMatch:f.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:l}));break;case 1:Zh(f.split(".").pop())&&n.push(new a_({tagBuilder:o,matchedText:f,offset:p,email:f.replace(LO,"")}));break;case 2:f.length<=140&&n.push(new PO({tagBuilder:o,matchedText:f,offset:p,serviceName:u,hashtag:f.slice(1)}));break;case 3:(function(_,A){return xO[A].test(_)})(f,c)&&n.push(new HO({tagBuilder:o,matchedText:f,offset:p,serviceName:c,mention:f.slice(1)}));break;case 4:if(f=f.replace(/ +$/g,""),((d=f).charAt(0)==="+"||UO.test(d))&&BO.test(d)){var E=f.replace(/[^0-9,;#]/g,"");n.push(new jO({tagBuilder:o,matchedText:f,offset:p,number:E,plusSign:f.charAt(0)==="+"}))}break;default:cr(e)}}}function b0(t){switch(t){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:cr(t)}}var Qh={")":"(","}":"{","]":"["};function Qs(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:0}}function ql(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:1}}function Ka(t,e){return{type:4,startIdx:t,state:e,acceptStateReached:!1}}function ep(t){return t.type===0&&t.matchType===0}var Wt=function(t){t===void 0&&(t={}),this.idx=t.idx!==void 0?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing},nu=new Wt,w0=function(t,e){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=nu,this.html=t,this.callbacks=e};function k0(t,e){e==="<"&&Qt(t)}function L0(t,e,n){e==="!"?t.state=13:e==="/"?(t.state=2,t.currentTag=new Wt(Me(Me({},t.currentTag),{isClosing:!0}))):e==="<"?Qt(t):li(n)?(t.state=3,t.currentTag=new Wt(Me(Me({},t.currentTag),{isOpening:!0}))):(t.state=0,t.currentTag=nu)}function M0(t,e,n){gr(n)?(t.currentTag=new Wt(Me(Me({},t.currentTag),{name:qa(t)})),t.state=4):e==="<"?Qt(t):e==="/"?(t.currentTag=new Wt(Me(Me({},t.currentTag),{name:qa(t)})),t.state=12):e===">"?(t.currentTag=new Wt(Me(Me({},t.currentTag),{name:qa(t)})),en(t)):li(n)||Xe(n)||e===":"||kt(t)}function P0(t,e,n){e===">"?kt(t):li(n)?t.state=3:kt(t)}function x0(t,e,n){gr(n)||(e==="/"?t.state=12:e===">"?en(t):e==="<"?Qt(t):e==="="||Jc(n)||(function(r){return r>=0&&r<=31||r==127})(n)?kt(t):t.state=5)}function F0(t,e,n){gr(n)?t.state=6:e==="/"?t.state=12:e==="="?t.state=7:e===">"?en(t):e==="<"?Qt(t):Jc(n)&&kt(t)}function H0(t,e,n){gr(n)||(e==="/"?t.state=12:e==="="?t.state=7:e===">"?en(t):e==="<"?Qt(t):Jc(n)?kt(t):t.state=5)}function U0(t,e,n){gr(n)||(e==='"'?t.state=8:e==="'"?t.state=9:/[>=`]/.test(e)?kt(t):e==="<"?Qt(t):t.state=10)}function B0(t,e){e==='"'&&(t.state=11)}function j0(t,e){e==="'"&&(t.state=11)}function $0(t,e,n){gr(n)?t.state=4:e===">"?en(t):e==="<"&&Qt(t)}function V0(t,e,n){gr(n)?t.state=4:e==="/"?t.state=12:e===">"?en(t):e==="<"?Qt(t):(t.state=4,(function(r){r.charIdx--})(t))}function z0(t,e){e===">"?(t.currentTag=new Wt(Me(Me({},t.currentTag),{isClosing:!0})),en(t)):kt(t)}function Y0(t){var e=t.html,n=t.charIdx;e.slice(n,n+2)==="--"?(t.charIdx++,t.currentTag=new Wt(Me(Me({},t.currentTag),{type:"comment"})),t.state=14):e.slice(n,n+7).toUpperCase()==="DOCTYPE"?(t.charIdx+=6,t.currentTag=new Wt(Me(Me({},t.currentTag),{type:"doctype"})),t.state=20):kt(t)}function G0(t,e){e==="-"?t.state=15:e===">"?kt(t):t.state=16}function W0(t,e){e==="-"?t.state=18:e===">"?kt(t):t.state=16}function X0(t,e){e==="-"&&(t.state=17)}function K0(t,e){t.state=e==="-"?18:16}function q0(t,e){e===">"?en(t):e==="!"?t.state=19:e==="-"||(t.state=16)}function J0(t,e){e==="-"?t.state=17:e===">"?en(t):t.state=16}function Z0(t,e){e===">"?en(t):e==="<"&&Qt(t)}function kt(t){t.state=0,t.currentTag=nu}function Qt(t){t.state=1,t.currentTag=new Wt({idx:t.charIdx})}function en(t){var e=t.html.slice(t.currentDataIdx,t.currentTag.idx);e&&t.callbacks.onText(e,t.currentDataIdx);var n=t.currentTag;n.type==="comment"?t.callbacks.onComment(n.idx):n.type==="doctype"?t.callbacks.onDoctype(n.idx):(n.isOpening&&t.callbacks.onOpenTag(n.name,n.idx),n.isClosing&&t.callbacks.onCloseTag(n.name,n.idx)),kt(t),t.currentDataIdx=t.charIdx+1}function qa(t){var e=t.currentTag.idx+(t.currentTag.isClosing?2:1);return t.html.slice(e,t.charIdx).toLowerCase()}var Q0=(function(){function t(e){e===void 0&&(e={}),this.version=t.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.tagBuilder=null,this.urls=(function(o){return o==null&&(o=!0),It(o)?{schemeMatches:o,tldMatches:o,ipV4Matches:o}:{schemeMatches:!It(o.schemeMatches)||o.schemeMatches,tldMatches:!It(o.tldMatches)||o.tldMatches,ipV4Matches:!It(o.ipV4Matches)||o.ipV4Matches}})(e.urls),this.email=It(e.email)?e.email:this.email,this.phone=It(e.phone)?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow=It(e.newWindow)?e.newWindow:this.newWindow,this.stripPrefix=(function(o){return o==null&&(o=!0),It(o)?{scheme:o,www:o}:{scheme:!It(o.scheme)||o.scheme,www:!It(o.www)||o.www}})(e.stripPrefix),this.stripTrailingSlash=It(e.stripTrailingSlash)?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=It(e.decodePercentEncoding)?e.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=e.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&FO.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var r,i=this.hashtag;if(i!==!1&&MO.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=typeof(r=e.truncate)=="number"?{length:r,location:"end"}:Me({length:Number.POSITIVE_INFINITY,location:"end"},r),this.className=e.className||this.className,this.replaceFn=e.replaceFn||this.replaceFn,this.context=e.context||this}return t.link=function(e,n){return new t(n).link(e)},t.parse=function(e,n){return new t(n).parse(e)},t.prototype.parse=function(e){var n=this,r=["a","style","script"],i=0,o=[];return(function(s,a){for(var l=new w0(s,a),u=s.length;l.charIdx<u;){var c=s.charAt(l.charIdx),d=s.charCodeAt(l.charIdx);switch(l.state){case 0:k0(l,c);break;case 1:L0(l,c,d);break;case 2:P0(l,c,d);break;case 3:M0(l,c,d);break;case 4:x0(l,c,d);break;case 5:F0(l,c,d);break;case 6:H0(l,c,d);break;case 7:U0(l,c,d);break;case 8:B0(l,c);break;case 9:j0(l,c);break;case 10:$0(l,c,d);break;case 11:V0(l,c,d);break;case 12:z0(l,c);break;case 13:Y0(l);break;case 14:G0(l,c);break;case 15:W0(l,c);break;case 16:X0(l,c);break;case 17:K0(l,c);break;case 18:q0(l,c);break;case 19:J0(l,c);break;case 20:Z0(l,c);break;default:cr(l.state)}l.charIdx++}l.currentDataIdx<l.charIdx&&(function(h){var p=h.html.slice(h.currentDataIdx,h.charIdx);h.callbacks.onText(p,h.currentDataIdx),h.currentDataIdx=h.charIdx+1})(l)})(e,{onOpenTag:function(s){r.indexOf(s)>=0&&i++},onText:function(s,a){if(i===0){var l=s.split(/( | |<|<|>|>|"|"|')/gi),u=a;l.forEach(function(c,d){if(d%2==0){var h=n.parseText(c,u);o.push.apply(o,(function(p,f,m){if(m||arguments.length===2)for(var E,_=0,A=f.length;_<A;_++)!E&&_ in f||(E||(E=Array.prototype.slice.call(f,0,_)),E[_]=f[_]);return p.concat(E||Array.prototype.slice.call(f))})([],(function(p,f){var m=typeof Symbol=="function"&&p[Symbol.iterator];if(!m)return p;var E,_,A=m.call(p),O=[];try{for(;(f===void 0||f-- >0)&&!(E=A.next()).done;)O.push(E.value)}catch(S){_={error:S}}finally{try{E&&!E.done&&(m=A.return)&&m.call(A)}finally{if(_)throw _.error}}return O})(h),!1))}u+=c.length})}},onCloseTag:function(s){r.indexOf(s)>=0&&(i=Math.max(i-1,0))},onComment:function(){},onDoctype:function(){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},t.prototype.compactMatches=function(e){e.sort(ev);for(var n=0;n<e.length-1;){var r=e[n],i=r.getOffset(),o=r.getMatchedText().length;if(n+1<e.length&&e[n+1].getOffset()===i){var s=e[n+1].getMatchedText().length>o?n:n+1;e.splice(s,1)}else n++}return e},t.prototype.removeUnwantedMatches=function(e){return this.hashtag||Vn(e,function(n){return n.getType()==="hashtag"}),this.email||Vn(e,function(n){return n.getType()==="email"}),this.phone||Vn(e,function(n){return n.getType()==="phone"}),this.mention||Vn(e,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||Vn(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||Vn(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||Vn(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="ipV4"}),e},t.prototype.parseText=function(e,n){n=n||0;for(var r=(function(s,a){for(var l=new $O(s,a);l.charIdx<l.text.length;l.charIdx++){var u=s.charAt(l.charIdx),c=s.charCodeAt(l.charIdx);if(l.stateMachines.length===0)Zs(l,u,c);else{for(var d=l.stateMachines.length-1;d>=0;d--){var h=l.stateMachines[d];switch(h.state){case 11:XO(l,h,c);break;case 12:KO(l,h,c);break;case 0:VO(l,h,c);break;case 1:zO(l,h,c);break;case 2:YO(l,h,c);break;case 3:GO(l,h,c);break;case 4:WO(l,h,0,c);break;case 5:qO(l,h,c);break;case 6:JO(l,h,0,c);break;case 7:ZO(l,h,0,c);break;case 13:QO(l,h,c);break;case 14:e0(l,h,c);break;case 8:t0(l,h,c);break;case 9:n0(l,h,c);break;case 10:r0(l,h,c);break;case 15:i0(l,h,u,c);break;case 16:o0(l,h,u,c);break;case 17:s0(l,h,u,c);break;case 18:a0(l,h,u,c);break;case 19:l0(l,h,u,c);break;case 20:c0(l,h,c);break;case 21:u0(l,h,c);break;case 22:Or(l,h,c);break;case 23:d0(l,h,c);break;case 24:h0(l,h,c);break;case 25:p0(l,h,c);break;case 26:f0(l,h,c);break;case 27:m0(l,h,c);break;case 28:E0(l,h,c);break;case 29:_0(l,h,c);break;case 30:A0(l,h,c);break;case 31:g0(l,h,c);break;case 32:O0(l,h,u,c);break;case 33:v0(l,h,c);break;case 34:D0(l,h,c);break;case 35:T0(l,h,c);break;case 36:R0(l,h,0,c);break;case 37:S0(l,h,u,c);break;case 38:I0(l,h,0,c);break;case 39:y0(l,h,u,c);break;case 40:C0(l,h,c);break;case 41:N0(l,h,c);break;default:cr(h.state)}}if(!l.hasSchemeUrlMachine()&&l.charIdx>0&&Ki(c)){var p=l.text.charCodeAt(l.charIdx-1);Ki(p)||l.addMachine(Qs(l.charIdx,0))}}}for(var f=l.stateMachines.length-1;f>=0;f--)l.stateMachines.forEach(function(m){return Oe(l,m)});return l.matches})(e,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),i=0,o=r.length;i<o;i++)r[i].setOffset(n+r[i].getOffset());return r},t.prototype.link=function(e){if(!e)return"";this.sanitizeHtml&&(e=e.replace(/</g,"<").replace(/>/g,">"));for(var n=this.parse(e),r=new Array(2*n.length+1),i=0,o=0,s=n.length;o<s;o++){var a=n[o];r.push(e.substring(i,a.getOffset())),r.push(this.createMatchReturnVal(a)),i=a.getOffset()+a.getMatchedText().length}return r.push(e.substring(i)),r.join("")},t.prototype.createMatchReturnVal=function(e){var n;return this.replaceFn&&(n=this.replaceFn.call(this.context,e)),typeof n=="string"?n:n===!1?e.getMatchedText():n instanceof e_?n.toAnchorString():e.buildTag().toAnchorString()},t.prototype.getTagBuilder=function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new vO({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e},t.version="4.1.5",t})();function ev(t,e){return t.getOffset()-e.getOffset()}function d_(t,e=t){return{type:"autolink",url:t,text:e}}const tv=()=>An(/```([^]+?)```/g,([t,e])=>({type:"codespan",text:ZE(e)})),nv=An(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([t,e,n])=>(function(r,i){return{type:"mention",id:r,text:i}})(decodeURIComponent(e),n)),rv=An(/<!!customemoji:(.*?)>/gm,([t,e])=>(function(n){return{type:"customemoji",text:n}})(e)),h_=An(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([t,e,n])=>(function(r,i=[]){return{type:"link",url:r,children:i}})(e,[n])),iv=An(/<actionlink:([^|]+)[|]([^>]*)>/gi,([t,e,n])=>{const{action:r,params:i}=p_(e);return(function(o,s,a=[]){return{type:"actionlink",action:o,params:s,children:a}})(r,i,[n])}),ov=An(/<actionbutton:([^|]+)[|]([^>]*)>/gi,([t,e,n])=>{const{action:r,params:i}=p_(e);return(function(o,s,a=[]){return{type:"actionbutton",action:o,params:s,children:a}})(r,i,[n])});function p_(t){const e=t.indexOf("?");return e===-1?{action:t,params:{}}:{action:t.slice(0,e),params:Object.fromEntries(new URLSearchParams(t.slice(e)))}}const sv=An(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([t])=>(function(e=[]){return{type:"bulletlist",children:e}})([t.startsWith(`
|
|
17
|
-
`)?t.slice(1):t])),
|
|
18
|
-
`);function E_(t,e={except:[]}){const n=(function(i={except:[]}){var a;const o={multilineSteps:[],singlelineSteps:[]},s=(a=i.except)!=null?a:lv.filter(l=>!i.only.includes(l));return s.includes("BulletPoint")||o.multilineSteps.push(sv,av),s.includes("Mention")||o.singlelineSteps.push(nv),s.includes("CustomEmoji")||o.singlelineSteps.push(rv),s.includes("Codespan")||o.multilineSteps.push(tv()),s.includes("FormattedLink")||o.singlelineSteps.push(h_),s.includes("Actions")||(o.singlelineSteps.push(iv),o.singlelineSteps.push(ov)),s.includes("Wikitext")||o.singlelineSteps.push(gO),s.includes("Autolink")||o.singlelineSteps.push(m_,f_),o})(e);let r=A_(t,n);return r=g_(r,!1),r}function __(t){return E_(t,{except:["FormattedLink","Actions"]})}function A_(t,e){let n=[t];return n=Za(n,e.multilineSteps),n=Za(n,[cv]),n=Za(n,e.singlelineSteps),n=ru(n),n}function Za(t,e){return e.reduce((n,r)=>ki(n,r),t)}function ru(t){const e=[];let n=-1;for(const r of t)typeof r=="string"?typeof e[n]=="string"?e[n]+=r:e[++n]=r:e[++n]="children"in r?{...r,children:ru(r.children)}:r;return e}function g_(t,e){const n=[];let r=[];for(let i=0;i<t.length;i++){const o=t[i];if(typeof o=="string")r.push(o);else if("children"in o){r.length>0&&(n.push(r.join("")),r=[]);const s=g_(o.children,e||o.type==="link"||o.type==="actionbutton"||o.type==="actionlink");n.push({...o,children:s})}else o.type==="autolink"&&e?r.push(o.text):(r.length>0&&(n.push(r.join("")),r=[]),n.push(o))}return r.length>0&&(n.push(r.join("")),r=[]),n}function uv(){let t,e=0;return n=>{const r=(o=Date.now())=>{if(window.clearTimeout(t),t=void 0,e=o,n.isDestroyed)return;const s=(function(a){a=a.removeMark(0,a.doc.content.size,Pe.marks.bold),a=a.removeMark(0,a.doc.content.size,Pe.marks.italic),a=a.removeMark(0,a.doc.content.size,Pe.marks.strikethrough),a.doc.firstChild;const l=(function(u){const c=[];let d,h="";return u.descendants((p,f)=>(p.isText?(h+=p.text,d!=null||(d=f)):h&&d!==void 0&&(c.push({text:h,pos:d}),h="",d=void 0),p.type!==Pe.nodes.mention)),h&&d!==void 0&&c.push({text:h,pos:d}),c})(a.doc);for(const{text:u,pos:c}of l){const d=E_(u,{only:["Wikitext"]});[a]=S_(a,c,d)}return a})(n.state.tr);n.dispatch(s)},i=Date.now();i-e<300?t||(t=window.setTimeout(r,300)):r(i)}}function S_(t,e,n,r=0,i=[]){for(const o of n)if(typeof o=="string"){for(const s of i)t.addMark(e+r,e+r+o.length,s.create());r+=o.length}else if(o.type==="bold"||o.type==="italic"||o.type==="strikethrough"){r+=1;const s=Pe.marks[o.type],a=[...i,s];[t,r]=S_(t,e,o.children,r,a),r+=1}else ie.unreachable();return[t,r]}function tp(t){return(e,n)=>{if(!n)return!0;let r=e.tr;const i=ce.between(e.selection.$from,e.selection.$to);return r=r.replaceRangeWith(i.from,i.from,Pe.text(t,r.storedMarks)),r=r.replaceRangeWith(i.to+1,i.to+1,Pe.text(t,r.storedMarks)),r=r.setSelection(ce.near(r.doc.resolve(i.to+1))),n(r),!0}}function dv(t,e,n){const r=e.clipboardData;if(!r)return!1;const i=(function(o){const s=o.items||[],a={"image/gif":"gif","image/png":"png","image/jpeg":"jpg","image/svg+xml":"svg"},l=Array.from(s).filter(d=>d.kind==="file"&&a[d.type]);if(l.length===0||o.types.includes("text/rtf"))return;const u=l[0];let c=u.getAsFile();if(!c.name){const d="image."+a[u.type];c=new File([c],d,{type:u.type,lastModified:Date.now()})}return c})(r);return i?n(i):(function(o,s){const a=o.state.tr.insertText(s).scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste");o.dispatch(a)})(t,r.getData("text/plain")),!0}function np(t){const{matcher:e,suggestionClass:n="ProseMirror-suggestion",onEnter:r=()=>!1,onChange:i=()=>!1,onExit:o=()=>!1,onKeyDown:s=()=>!1,debug:a=!1}=t;return new Ws({key:new Xs("suggestions"),view(){return{update:(l,u)=>{const c=this.key.getState(u),d=this.key.getState(l.state);if(!c||!d)return;const h=c.active&&d.active&&c.range.from!==d.range.from,p=!c.active&&d.active,f=c.active&&!d.active,m=!p&&!f&&c.text!==d.text;(f||h)&&o({view:l,range:c.range,text:c.text}),m&&!h&&i({view:l,range:d.range,text:d.text}),(p||h)&&r({view:l,range:d.range,text:d.text})}}},state:{init:()=>({active:!1,range:{from:0,to:0},text:null}),apply(l,u){const{selection:c}=l,d={...u};if(c.from===c.to){(c.from<u.range.from||c.from>u.range.to)&&(d.active=!1);const h=c.$from,p=e(h);p?(d.active=!0,d.range=p.range,d.text=p.text):d.active=!1}else d.active=!1;return d.active||(d.range={from:0,to:0},d.text=null),d}},props:{handleKeyDown(l,u){var d;const c=this.getState(l.state);return!!(c!=null&&c.active)&&((d=s({view:l,event:u}))!=null?d:!1)},decorations(l){const u=this.getState(l);return u!=null&&u.active?Ce.create(l.doc,[Dt.inline(u.range.from,u.range.to,{nodeName:"span",class:n,style:a?"background: rgba(0, 0, 255, 0.05); color: blue; border: 2px solid blue;":void 0})]):null}}})}const rp=(t,e)=>n=>{var l;const r=(l=n.nodeBefore)==null?void 0:l.text;if(!r)return;const i=r.match(t);if(!i)return;const o=i[2],s=n.pos-o.length,a=n.pos;if(!n.doc.rangeHasMark(s,a,e.marks.literal))return{range:{from:s,to:a},text:o}},hv=/(^|\s)(:[^:\s]+:?)$/,pv=/(^|\s)(@[^@]*)$/;function O_({placeholder:t,disabled:e,className:n="",characterLimit:r,spellcheck:i}){const o=lo(),s=X(),a=X(null);return G(()=>(s.current=(function(l,u,c,d,h){const p=Fr.create({schema:Pe,plugins:[...h.filter(fv),lO(),Uh({...ko,"Mod-z":YE,"Mod-y":Yl,"Mod-Shift-z":Yl,"Mod-b":tp("*"),"Mod-i":tp("_"),"Mod-Enter":ko.Enter,"Shift-Enter":ko.Enter,Enter:c}),Uh({Enter:ko.Enter}),Hh]}),f=uv(),m=new jE(l,{handlePaste:(E,_,A)=>dv(E,_,d),clipboardTextSerializer(E){const _=[];return E.content.forEach(A=>{A&&_.push(ZE(A.textContent))}),_.join()},state:p,dispatchTransaction(E){E=(E=E.removeStoredMark(Pe.marks.literal)).removeStoredMark(Pe.marks.emoji);const _=m.state.apply(E);m.state.doc.eq(_.doc)||u(new Ss(_.doc)),m.updateState(_),E.steps.some(A=>A instanceof Ye)&&f(m)}});return m})(a.current,l=>o.onChange(l),()=>!!o.onEnter&&(o.onEnter(),!0),l=>o.onPasteImage(l),[o.emojiSuggesterPlugin(),o.mentionsPlugin()]),o.setEditorView(s.current),()=>{var l;o.setEditorView(void 0),(l=s.current)==null||l.destroy()}),[o]),G(()=>{var l;(l=s.current)==null||l.setProps({editable:()=>!e})},[e]),G(()=>mt(()=>{var l,u,c;return(c=s.current)==null?void 0:c.setProps({attributes:{spellcheck:String((u=(l=o.spellcheck$.get())!=null?l:i)!=null?u:!1),class:"t-text-input","aria-label":"Message Field",role:"textbox"}})}),[o,i]),G(()=>mt(()=>{var u;const l=s.current;l==null||l.dispatch(l.state.tr.setMeta(Hh,(u=o.placeholder$.get())!=null?u:t))}),[o,t]),G(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),I("div",{className:`t-editor ${n}`,ref:a})}function ip(t){if(t.startsWith(":"))throw new Error("Not implemented");{const e=Pe.marks.emoji.create({emoji:t});return Pe.text(t,[e])}}function op(t,e){const n=encodeURIComponent(t);return Pe.nodes.mention.create({id:t,name:e},Pe.text(`<!!mention:${n}|${e}>`))}const ks=class ks{constructor(e){this.doc=e,this.size=this.doc.content.size,this.hasContent=$E(this.doc)}hasNonWhitespaceContent(){return this.hasContent&&(function(e){let n=!1;return e.descendants(r=>!(r.isText&&r.text&&/\S/.test(r.text))||(n=!0,!1)),n})(this.doc)}asText(){return this.doc.textContent.replace(/\xa0/g," ")}};ks.EMPTY=new ks(Pe.topNodeType.create());let Ss=ks;function fv(t){return t!=null}function sp(t,e){let n=0;return(...r)=>{n&&(clearTimeout(n),n=0),n=setTimeout(()=>{t(...r)},e)}}class v_{constructor(e,n,r){this.state$=e,this.device$=n,this.userPermissions$=r,this.currentDoc=Ss.EMPTY,this.maxLength=1e4,this.markAsTyping=(function(i,o){let s=!1;return(...a)=>{if(!s)return s=!0,setTimeout(()=>{s=!1},o),i(...a)}})(()=>{var i;(i=this.controller)==null||i.markAsTyping()},5e3),this._suggesterKeydownHandlers={emoji:void 0,mention:void 0},this.toggleEmojiPicker=i=>{const o=this.state$.showEmojiPicker;i!=null||(i=!o.peek()),o.set(i),i===!1&&this.focus()},this.spellcheck$=le(),this.placeholder$=le()}setEditorView(e){this.editorView=e}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return np({debug:!1,matcher:rp(hv,Pe),onEnter:e=>this.suggestEmoji(e.text,e.range),onChange:e=>this.suggestEmoji(e.text,e.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:e})=>{var n,r,i;return(i=(r=(n=this._suggesterKeydownHandlers).emoji)==null?void 0:r.call(n,e.key))!=null?i:!1}})}mentionsPlugin(){const e=this.userPermissions$.peek();if(ie.defined(e),e.canMention)return np({debug:!1,matcher:rp(pv,Pe),onEnter:n=>this.suggestMention(n.text,n.range),onChange:n=>this.suggestMention(n.text,n.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:n})=>{var r,i,o;return(o=(i=(r=this._suggesterKeydownHandlers).mention)==null?void 0:i.call(r,n.key))!=null?o:!1}})}closeSuggester(){ie.defined(this._suggestionRange),(function(e,n){const{from:r,to:i}=n,o=e.state.tr.addMark(r,i,Pe.marks.literal.create());e.dispatch(o)})(this.editorView,this._suggestionRange)}listenKeydown(e,n){this._suggesterKeydownHandlers[e]=n}onExitSuggester(){this._suggestionRange=void 0,this.state$.suggestEmojiQuery.set(void 0),this.state$.suggestMentionQuery.set(void 0)}suggestEmoji(e,n){e.length<2||(this._suggestionRange=n,this.state$.suggestEmojiQuery.set(e))}suggestMention(e,n){e.length<1||(this._suggestionRange=n,this.state$.suggestMentionQuery.set(e))}onPasteImage(e){ie.defined(this.uploadFile),this.uploadFile(e)}onChange(e){var r;this.currentDoc=e;const n=e.size>this.maxLength&&e.asText().length>this.maxLength;e.hasContent&&this.markAsTyping(),this.state$.assign({atTextLimit:n,isEmpty:!e.hasNonWhitespaceContent(),characterCount:e.size===0?0:e.size-2}),(r=this.controller)==null||r.storeDraft(()=>e.asText())}setMaxLength(e){this.maxLength=e}focus({skipProseMirrorStuff:e}={skipProseMirrorStuff:!1}){var n,r;e?(n=this.editorView)==null||n.dom.focus():(r=this.editorView)==null||r.focus()}setText(e){this.editorView&&(function(n,r){const i=n.state.doc.content.size,o=r.split(/(<!!(?:mention|customemoji):.*?>)/g).filter(a=>a||a.length).map(a=>{const[l,u,c]=a.match(/<!!mention:(.*)\|(.*)>/)||[null];if(l&&u&&c)return op(u,c);const[d,h]=a.match(/<!!customemoji:(.*?)>/)||[null];return d&&h?ip(h):Pe.text(a)}),s=n.state.tr.replaceWith(0,i,o);n.dispatch(s)})(this.editorView,e)}typeText(e){this.editorView&&(function(n,r,i="replace"){const o=n.state.doc.content.size,s=i=="insert"?n.state.tr.insertText(r):n.state.tr.insertText(r,0,o);n.dispatch(s)})(this.editorView,e,"insert")}getText(){return this.currentDoc.asText().trim()}clearText(){this.editorView&&(function(e){const n=e.state.doc.content.size,r=e.state.tr.insertText("",0,n);e.dispatch(r)})(this.editorView)}selectEmoji(e){ie.defined(this.editorView),(function(n,r,i){const o=ip(r);if(i){const{from:a,to:l}=i,u=n.state.tr.deleteRange(a,l);n.dispatch(u)}const s=n.state.tr.replaceSelectionWith(o,!1);n.dispatch(s)})(this.editorView,e,this._suggestionRange),this.focus()}selectMention(e){ie.defined(this.editorView),(function(n,r,i){const o=op(r.id,r.name);let s=n.state.tr;if(i){const{from:a,to:l}=i;s=s.replaceRangeWith(a,l,o)}else s=s.replaceSelectionWith(o,!1);s=s.insertText(" "),n.dispatch(s)})(this.editorView,e,this._suggestionRange),this.focus()}}const mv=Symbol("no_render");function qe(t){const e=lt(!1),n=X({_value:typeof t=="function"?t():t.peek(),get value(){return setTimeout(()=>{e.set(!0)}),n.current._value},set value(r){n.current._value=r}});return J(()=>{if(!e.get())return mv;const r=typeof t=="function"?t():t.get();return n.current.value=r,r}),n.current}function tn(){const t=si(),e=oe(),n=jm(),r=Qe(),i=qe(e.app$.appMetadata),o=qe(e.currentUser$),s=qe(e.state$.currentConversation),a=qe(e.state$.currentConversationId),l=qe(e.t$),u=qe(e.device$),c=qe(e.themeCustom$),d=qe(e.chatSearchState$),h=qe(e.focusedMessage$),p=qe(()=>{var E;const m=e.state$.currentConversationId.get();return(E=m&&e.state$.typing.child(m).get())!=null?E:{many:!1,users:[]}}),f=qe(()=>{const m=e.state$.currentConversationId.get();return m&&e.state$.participants.child(m).get()});return te(()=>({session:t,store:e,chatbox:n,theme:r,get app(){return i.value},get currentUser(){return o.value},get conversation(){return s.value},get conversationId(){return a.value},get t(){return l.value},get device(){return u.value},get themeCustom(){return c.value.value},get typing(){return p.value},get participants(){return f.value},get focusedMessage(){return h.value},get chatSearchState(){return d.value}}),[i,n,s,a,o,u,e,l,r,c,p,f,t,d,h])}function iu(){const t=si(),e=oe(),n=Qe(),r=jm(),i=qe(e.app$.appMetadata),o=qe(e.currentUser$),s=qe(e.t$),a=qe(e.device$),l=qe(e.themeCustom$);return te(()=>({session:t,store:e,theme:n,conversationList:r,get app(){return i.value},get currentUser(){return o.value},get t(){return s.value},get device(){return a.value},get themeCustom(){return l.value.value}}),[i,r,o,a,t,e,s,n,l])}const Ev=(()=>{if(typeof window!="undefined"){let t;try{t=window.localStorage;const e="__storage_test__";return t.setItem(e,e),t.removeItem(e),!0}catch(e){return e instanceof DOMException&&(e.code===22||e.code===1014||e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")&&t&&t.length!==0}}return!1})(),ot={};Ev?(ot.setItem=window.localStorage.setItem.bind(window.localStorage),ot.getItem=window.localStorage.getItem.bind(window.localStorage),ot.removeItem=window.localStorage.removeItem.bind(window.localStorage),ot.isSupported=!0):(ot.setItem=function(){},ot.getItem=function(){return null},ot.removeItem=function(){},ot.isSupported=!1),ot.set=(t,e)=>ot.setItem(t,JSON.stringify(e)),ot.get=t=>JSON.parse(ot.getItem(t)||"null");const Jl="talkjs_drafts",_v=(function(t,e){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}})(200,(t,e,n,r)=>{const i=D_(t,e,n),o=JSON.parse(ot.getItem(Jl)||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,ot.setItem(Jl,JSON.stringify(o))}),D_=(t,e,n)=>`draft_${t}_${e}_${n}`;function st(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(u){try{l(r.next(u))}catch(c){o(c)}}function a(u){try{l(r.throw(u))}catch(c){o(c)}}function l(u){var c;u.done?i(u.value):(c=u.value,c instanceof n?c:new n(function(d){d(c)})).then(s,a)}l((r=r.apply(t,e||[])).next())})}let fo=class{constructor(){this.listeners={}}on(t,e,n){if(this.listeners[t]||(this.listeners[t]=new Set),n==null?void 0:n.once){const r=(...i)=>{this.un(t,r),e(...i)};return this.listeners[t].add(r),()=>this.un(t,r)}return this.listeners[t].add(e),()=>this.un(t,e)}un(t,e){var n;(n=this.listeners[t])===null||n===void 0||n.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach(n=>n(...e))}};const Po={decode:function(t,e){return st(this,void 0,void 0,function*(){const n=new AudioContext({sampleRate:e});try{return yield n.decodeAudioData(t)}finally{n.close()}})},createBuffer:function(t,e){if(!t||t.length===0)throw new Error("channelData must be a non-empty array");if(e<=0)throw new Error("duration must be greater than 0");if(typeof t[0]=="number"&&(t=[t]),!t[0]||t[0].length===0)throw new Error("channelData must contain non-empty channel arrays");(function(r){const i=r[0];if(i.some(o=>o>1||o<-1)){const o=i.length;let s=0;for(let a=0;a<o;a++){const l=Math.abs(i[a]);l>s&&(s=l)}for(const a of r)for(let l=0;l<o;l++)a[l]/=s}})(t);const n=t.map(r=>r instanceof Float32Array?r:Float32Array.from(r));return{duration:e,length:n[0].length,sampleRate:n[0].length/e,numberOfChannels:n.length,getChannelData:r=>{const i=n[r];if(!i)throw new Error(`Channel ${r} not found`);return i},copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function T_(t,e){const n=e.xmlns?document.createElementNS(e.xmlns,t):document.createElement(t);for(const[r,i]of Object.entries(e))if(r==="children"&&i)for(const[o,s]of Object.entries(i))s instanceof Node?n.appendChild(s):typeof s=="string"?n.appendChild(document.createTextNode(s)):n.appendChild(T_(o,s));else r==="style"?Object.assign(n.style,i):r==="textContent"?n.textContent=i:n.setAttribute(r,i.toString());return n}function ap(t,e,n){const r=T_(t,e||{});return n==null||n.appendChild(r),r}var Av=Object.freeze({__proto__:null,createElement:ap,default:ap});const gv={fetchBlob:function(t,e,n){return st(this,void 0,void 0,function*(){const r=yield fetch(t,n);if(r.status>=400)throw new Error(`Failed to fetch ${t}: ${r.status} (${r.statusText})`);return(function(i,o){st(this,void 0,void 0,function*(){if(!i.body||!i.headers)return;const s=i.body.getReader(),a=Number(i.headers.get("Content-Length"))||0;let l=0;const u=c=>{l+=(c==null?void 0:c.length)||0;const d=Math.round(l/a*100);o(d)};try{for(;;){const c=yield s.read();if(c.done)break;u(c.value)}}catch(c){console.warn("Progress tracking error:",c)}})})(r.clone(),e),r.blob()})}};function Ie(t){let e=t;const n=new Set;return{get value(){return e},set(r){Object.is(e,r)||(e=r,n.forEach(i=>i(e)))},update(r){this.set(r(e))},subscribe:r=>(n.add(r),()=>n.delete(r))}}function Kn(t,e){const n=Ie(t());return e.forEach(r=>r.subscribe(()=>{const i=t();Object.is(n.value,i)||n.set(i)})),{get value(){return n.value},subscribe:r=>n.subscribe(r)}}function Dn(t,e){let n;const r=()=>{n&&(n(),n=void 0),n=t()},i=e.map(o=>o.subscribe(r));return r(),()=>{n&&(n(),n=void 0),i.forEach(o=>o())}}class Sv extends fo{get isPlayingSignal(){return this._isPlaying}get currentTimeSignal(){return this._currentTime}get durationSignal(){return this._duration}get volumeSignal(){return this._volume}get mutedSignal(){return this._muted}get playbackRateSignal(){return this._playbackRate}get seekingSignal(){return this._seeking}constructor(e){super(),this.isExternalMedia=!1,this.reactiveMediaEventCleanups=[],e.media?(this.media=e.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),this._isPlaying=Ie(!1),this._currentTime=Ie(0),this._duration=Ie(0),this._volume=Ie(this.media.volume),this._muted=Ie(this.media.muted),this._playbackRate=Ie(this.media.playbackRate||1),this._seeking=Ie(!1),this.setupReactiveMediaEvents(),e.mediaControls&&(this.media.controls=!0),e.autoplay&&(this.media.autoplay=!0),e.playbackRate!=null&&this.onMediaEvent("canplay",()=>{e.playbackRate!=null&&(this.media.playbackRate=e.playbackRate)},{once:!0})}setupReactiveMediaEvents(){this.reactiveMediaEventCleanups.push(this.onMediaEvent("play",()=>{this._isPlaying.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("pause",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ended",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("timeupdate",()=>{this._currentTime.set(this.media.currentTime)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("durationchange",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("loadedmetadata",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeking",()=>{this._seeking.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeked",()=>{this._seeking.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("volumechange",()=>{this._volume.set(this.media.volume),this._muted.set(this.media.muted)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ratechange",()=>{this._playbackRate.set(this.media.playbackRate)}))}onMediaEvent(e,n,r){return this.media.addEventListener(e,n,r),()=>this.media.removeEventListener(e,n,r)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const e=this.getSrc();e.startsWith("blob:")&&URL.revokeObjectURL(e)}canPlayType(e){return this.media.canPlayType(e)!==""}setSrc(e,n){const r=this.getSrc();if(e&&r===e)return;this.revokeSrc();const i=n instanceof Blob&&(this.canPlayType(n.type)||!e)?URL.createObjectURL(n):e;if(r&&this.media.removeAttribute("src"),i||e)try{this.media.src=i}catch(o){this.media.src=e}}destroy(){this.reactiveMediaEventCleanups.forEach(e=>e()),this.reactiveMediaEventCleanups=[],this.isExternalMedia||(this.media.pause(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load(),this.media.remove())}setMediaElement(e){this.reactiveMediaEventCleanups.forEach(n=>n()),this.reactiveMediaEventCleanups=[],this.media=e,this.setupReactiveMediaEvents()}play(){return st(this,void 0,void 0,function*(){try{return yield this.media.play()}catch(e){if(e instanceof DOMException&&e.name==="AbortError")return;throw e}})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(e){this.media.currentTime=Math.max(0,Math.min(e,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(e){this.media.volume=e}getMuted(){return this.media.muted}setMuted(e){this.media.muted=e}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(e,n){n!=null&&(this.media.preservesPitch=n),this.media.playbackRate=e}getMediaElement(){return this.media}setSinkId(e){return this.media.setSinkId(e)}}function Ov({maxTop:t,maxBottom:e,halfHeight:n,vScale:r,barMinHeight:i=0,barAlign:o}){let s=Math.round(t*n*r),a=s+Math.round(e*n*r)||1;return a<i&&(a=i,o||(s=a/2)),{topHeight:s,totalHeight:a}}function vv({barAlign:t,halfHeight:e,topHeight:n,totalHeight:r,canvasHeight:i}){return t==="top"?0:t==="bottom"?i-r:e-n}function lp(t,e,n){const r=e-t.left,i=n-t.top;return[r/t.width,i/t.height]}function R_(t){return!!(t.barWidth||t.barGap||t.barAlign)}function cp(t,e){if(!R_(e))return t;const n=e.barWidth||.5,r=n+(e.barGap||n/2);return r===0?t:Math.floor(t/r)*r}function up({scrollLeft:t,totalWidth:e,numCanvases:n}){if(e===0)return[0];const r=t/e,i=Math.floor(r*n);return[i-1,i,i+1]}function dp(t){const e=t._cleanup;typeof e=="function"&&e()}class Dv extends fo{constructor(e,n){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.dragStream=null,this.scrollStream=null,this.subscriptions=[],this.options=e;const r=this.parentFromOptionsContainer(e.container);this.parent=r;const[i,o]=this.initHtml();r.appendChild(i),this.container=i,this.scrollContainer=o.querySelector(".scroll"),this.wrapper=o.querySelector(".wrapper"),this.canvasWrapper=o.querySelector(".canvases"),this.progressWrapper=o.querySelector(".progress"),this.cursor=o.querySelector(".cursor"),n&&o.appendChild(n),this.initEvents()}parentFromOptionsContainer(e){let n;if(typeof e=="string"?n=document.querySelector(e):e instanceof HTMLElement&&(n=e),!n)throw new Error("Container not found");return n}initEvents(){this.wrapper.addEventListener("click",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=lp(r,n.clientX,n.clientY);this.emit("click",i,o)}),this.wrapper.addEventListener("dblclick",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=lp(r,n.clientX,n.clientY);this.emit("dblclick",i,o)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollStream=(function(n){const r=Ie({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth}),i=Kn(()=>(function(a){const{scrollLeft:l,scrollWidth:u,clientWidth:c}=a;if(u===0)return{startX:0,endX:1};const d=l/u,h=(l+c)/u;return{startX:Math.max(0,Math.min(1,d)),endX:Math.max(0,Math.min(1,h))}})(r.value),[r]),o=Kn(()=>(function(a){return{left:a.scrollLeft,right:a.scrollLeft+a.clientWidth}})(r.value),[r]),s=()=>{r.set({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth})};return n.addEventListener("scroll",s,{passive:!0}),{scrollData:r,percentages:i,bounds:o,cleanup:()=>{n.removeEventListener("scroll",s),dp(r)}}})(this.scrollContainer);const e=Dn(()=>{const{startX:n,endX:r}=this.scrollStream.percentages.value,{left:i,right:o}=this.scrollStream.bounds.value;this.emit("scroll",n,r,i,o)},[this.scrollStream.percentages,this.scrollStream.bounds]);if(this.subscriptions.push(e),typeof ResizeObserver=="function"){const n=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{n().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const e=this.parent.clientWidth;e===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=e,this.reRender(),this.emit("resize"))}initDrag(){if(this.dragStream)return;this.dragStream=(function(n,r={}){const{threshold:i=3,mouseButton:o=0,touchDelay:s=100}=r,a=Ie(null),l=new Map,u=matchMedia("(pointer: coarse)").matches;let c=()=>{};const d=h=>{if(h.button!==o||(l.set(h.pointerId,h),l.size>1))return;let p=h.clientX,f=h.clientY,m=!1;const E=Date.now(),_=n.getBoundingClientRect(),{left:A,top:O}=_,S=g=>{if(g.defaultPrevented||l.size>1||u&&Date.now()-E<s)return;const D=g.clientX,C=g.clientY,N=D-p,k=C-f;(m||Math.abs(N)>i||Math.abs(k)>i)&&(g.preventDefault(),g.stopPropagation(),m||(a.set({type:"start",x:p-A,y:f-O}),m=!0),a.set({type:"move",x:D-A,y:C-O,deltaX:N,deltaY:k}),p=D,f=C)},v=g=>{if(l.delete(g.pointerId),m){const D=g.clientX,C=g.clientY;a.set({type:"end",x:D-A,y:C-O})}c()},T=g=>{l.delete(g.pointerId),g.relatedTarget&&g.relatedTarget!==document.documentElement||v(g)},R=g=>{m&&(g.stopPropagation(),g.preventDefault())},y=g=>{g.defaultPrevented||l.size>1||m&&g.preventDefault()};document.addEventListener("pointermove",S),document.addEventListener("pointerup",v),document.addEventListener("pointerout",T),document.addEventListener("pointercancel",T),document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("click",R,{capture:!0}),c=()=>{document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",v),document.removeEventListener("pointerout",T),document.removeEventListener("pointercancel",T),document.removeEventListener("touchmove",y),setTimeout(()=>{document.removeEventListener("click",R,{capture:!0})},10)}};return n.addEventListener("pointerdown",d),{signal:a,cleanup:()=>{c(),n.removeEventListener("pointerdown",d),l.clear(),dp(a)}}})(this.wrapper);const e=Dn(()=>{const n=this.dragStream.signal.value;if(!n)return;const r=this.wrapper.getBoundingClientRect().width,i=(o=n.x/r)<0?0:o>1?1:o;var o;n.type==="start"?(this.isDragging=!0,this.emit("dragstart",i)):n.type==="move"?this.emit("drag",i):n.type==="end"&&(this.isDragging=!1,this.emit("dragend",i))},[this.dragStream.signal]);this.subscriptions.push(e)}initHtml(){const e=document.createElement("div"),n=e.attachShadow({mode:"open"}),r=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return n.innerHTML=`
|
|
14
|
+
`);return{dom:l,text:h,slice:e}}function NE(t,e,n,r,i){let o,s,a=i.parent.type.spec.code;if(!n&&!e)return null;let l=!!e&&(r||a||!n);if(l){if(t.someProp("transformPastedText",h=>{e=h(e,a||r,t)}),a)return s=new W(j.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
15
|
+
`))),0,0),t.someProp("transformPasted",h=>{s=h(s,t,!0)}),s;let d=t.someProp("clipboardTextParser",h=>h(e,i,r,t));if(d)s=d;else{let h=i.marks(),{schema:f}=t.state,p=ai.fromSchema(f);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let E=o.appendChild(document.createElement("p"));m&&E.appendChild(p.serializeNode(f.text(m,h)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),o=(function(d){let h=/^(\s*<meta [^>]*>)*/.exec(d);h&&(d=d.slice(h[0].length));let f,p=ME().createElement("div"),m=/<([a-z][^>\s]+)/i.exec(d);if((f=m&&LE[m[1].toLowerCase()])&&(d=f.map(E=>"<"+E+">").join("")+d+f.map(E=>"</"+E+">").reverse().join("")),p.innerHTML=(function(E){let _=window.trustedTypes;return _?(Ha||(Ha=_.defaultPolicy||_.createPolicy("ProseMirrorClipboard",{createHTML:A=>A})),Ha.createHTML(E)):E})(d),f)for(let E=0;E<f.length;E++)p=p.querySelector(f[E])||p;return p})(n),co&&(function(d){let h=d.querySelectorAll(He?"span:not([class]):not([style])":"span.Apple-converted-space");for(let f=0;f<h.length;f++){let p=h[f];p.childNodes.length==1&&p.textContent==" "&&p.parentNode&&p.parentNode.replaceChild(d.ownerDocument.createTextNode(" "),p)}})(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let h=o.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;o=h}if(s||(s=(t.someProp("clipboardParser")||t.someProp("domParser")||zi.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!c),context:i,ruleFromNode:h=>h.nodeName!="BR"||h.nextSibling||!h.parentNode||xS.test(h.parentNode.nodeName)?null:{ignore:!0}})),c)s=(function(d,h){if(!d.size)return d;let f,p=d.content.firstChild.type.schema;try{f=JSON.parse(h)}catch(A){return d}let{content:m,openStart:E,openEnd:_}=d;for(let A=f.length-2;A>=0;A-=2){let O=p.nodes[f[A]];if(!O||O.hasRequiredAttrs())break;m=j.from(O.create(f[A+1],m)),E++,_++}return new W(m,E,_)})(Dh(s,+c[1],+c[2]),c[4]);else if(s=W.maxOpen((function(d,h){if(d.childCount<2)return d;for(let f=h.depth;f>=0;f--){let p,m=h.node(f).contentMatchAt(h.index(f)),E=[];if(d.forEach(_=>{if(!E)return;let A,O=m.findWrapping(_.type);if(!O)return E=null;if(A=E.length&&p.length&&wE(O,p,_,E[E.length-1],0))E[E.length-1]=A;else{E.length&&(E[E.length-1]=kE(E[E.length-1],p.length));let S=bE(_,O);E.push(S),m=m.matchType(S.type),p=O}}),E)return j.from(E)}return d})(s.content,i),!0),s.openStart||s.openEnd){let d=0,h=0;for(let f=s.content.firstChild;d<s.openStart&&!f.type.spec.isolating;d++,f=f.firstChild);for(let f=s.content.lastChild;h<s.openEnd&&!f.type.spec.isolating;h++,f=f.lastChild);s=Dh(s,d,h)}return t.someProp("transformPasted",d=>{s=d(s,t,l)}),s}const xS=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function bE(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,j.from(t));return t}function wE(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=wE(t,e,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(j.from(bE(n,t,i+1))))}}function kE(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,kE(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(j.empty,!0);return t.copy(n.append(r))}function Vl(t,e,n,r,i,o){let s=e<0?t.firstChild:t.lastChild,a=s.content;return t.childCount>1&&(o=0),i<r-1&&(a=Vl(a,e,n,r,i+1,o)),i>=n&&(a=e<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(j.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function Dh(t,e,n){return e<t.openStart&&(t=new W(Vl(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new W(Vl(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const LE={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Th=null;function ME(){return Th||(Th=document.implementation.createHTMLDocument("title"))}let Ha=null;const at={},ct={},FS={touchstart:!0,touchmove:!0};class HS{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Nn(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function Ua(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>zl(t,r))})}function zl(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)})}function US(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function ms(t){return{left:t.clientX,top:t.clientY}}function Wc(t,e,n,r,i){if(r==-1)return!1;let o=t.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(t.someProp(e,a=>s>o.depth?a(t,n,o.nodeAfter,o.before(s),i,!0):a(t,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function Vr(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function BS(t,e,n,r,i){return Wc(t,"handleClickOn",e,n,r)||t.someProp("handleClick",o=>o(t,e,r))||(i?(function(o,s){if(s==-1)return!1;let a,l,u=o.state.selection;u instanceof Z&&(a=u.node);let c=o.state.doc.resolve(s);for(let d=c.depth+1;d>0;d--){let h=d>c.depth?c.nodeAfter:c.node(d);if(Z.isSelectable(h)){l=a&&u.$from.depth>0&&d>=u.$from.depth&&c.before(u.$from.depth+1)==u.$from.pos?c.before(u.$from.depth):c.before(d);break}}return l!=null&&(Vr(o,Z.create(o.state.doc,l)),!0)})(t,n):(function(o,s){if(s==-1)return!1;let a=o.state.doc.resolve(s),l=a.nodeAfter;return!!(l&&l.isAtom&&Z.isSelectable(l))&&(Vr(o,new Z(a)),!0)})(t,n))}function jS(t,e,n,r){return Wc(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function $S(t,e,n,r){return Wc(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||(function(i,o,s){if(s.button!=0)return!1;let a=i.state.doc;if(o==-1)return!!a.inlineContent&&(Vr(i,ce.create(a,0,a.content.size)),!0);let l=a.resolve(o);for(let u=l.depth+1;u>0;u--){let c=u>l.depth?l.nodeAfter:l.node(u),d=l.before(u);if(c.inlineContent)Vr(i,ce.create(a,d+1,d+1+c.content.size));else{if(!Z.isSelectable(c))continue;Vr(i,Z.create(a,d))}return!0}})(t,n,r)}function Yl(t){return Es(t)}ct.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Rh(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!un||!He||n.keyCode!=13))if(n.keyCode!=229&&t.domObserver.forceFlush(),!ti||n.keyCode!=13||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",r=>r(t,n))||PS(t,n)?n.preventDefault():Nn(t,"key");else{let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",i=>i(t,Xn(13,"Enter"))),t.input.lastIOSEnter=0)},200)}},ct.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},ct.keypress=(t,e)=>{let n=e;if(Rh(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||It&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n)))return void n.preventDefault();let r=t.state.selection;if(!(r instanceof ce&&r.$from.sameParent(r.$to))){let i=String.fromCharCode(n.charCode),o=()=>t.state.tr.insertText(i).scrollIntoView();/[\r\n]/.test(i)||t.someProp("handleTextInput",s=>s(t,r.$from.pos,r.$to.pos,i,o))||t.dispatch(o()),n.preventDefault()}};const PE=It?"metaKey":"ctrlKey";at.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Yl(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&(function(a,l){let u=l.x-a.clientX,c=l.y-a.clientY;return u*u+c*c<100})(n,t.input.lastClick)&&!n[PE]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o,button:n.button};let s=t.posAtCoords(ms(n));s&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new VS(t,s,n,!!r)):(o=="doubleClick"?jS:$S)(t,s.pos,s.inside,n)?n.preventDefault():Nn(t,"pointer"))};class VS{constructor(e,n,r,i){let o,s;if(this.view=e,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[PE],this.allowDefault=r.shiftKey,n.inside>-1)o=e.state.doc.nodeAt(n.inside),s=n.inside;else{let c=e.state.doc.resolve(n.pos);o=c.parent,s=c.depth?c.before():0}const a=i?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof Z&&u.from<=s&&u.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!wt||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Nn(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>pn(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(ms(e))),this.updateAllowDefault(e),this.allowDefault||!n?Nn(this.view,"pointer"):BS(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||We&&this.mightDrag&&!this.mightDrag.node.isAtom||He&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Vr(this.view,he.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Nn(this.view,"pointer")}move(e){this.updateAllowDefault(e),Nn(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function Rh(t,e){return!!t.composing||!!(We&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}at.touchstart=t=>{t.input.lastTouch=Date.now(),Yl(t),Nn(t,"pointer")},at.touchmove=t=>{t.input.lastTouch=Date.now(),Nn(t,"pointer")},at.contextmenu=t=>Yl(t);const zS=un?5e3:-1;function yh(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Es(t),e))}function xE(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=(function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp})());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function YS(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=(function(i,o){for(;;){if(i.nodeType==3&&o)return i;if(i.nodeType==1&&o>0){if(i.contentEditable=="false")return null;o=Ct(i=i.childNodes[o-1])}else{if(!i.parentNode||Wi(i))return null;o=Ge(i),i=i.parentNode}}})(e.focusNode,e.focusOffset),r=(function(i,o){for(;;){if(i.nodeType==3&&o<i.nodeValue.length)return i;if(i.nodeType==1&&o<i.childNodes.length){if(i.contentEditable=="false")return null;i=i.childNodes[o],o=0}else{if(!i.parentNode||Wi(i))return null;o=Ge(i)+1,i=i.parentNode}}})(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(s&&s.isText(n.nodeValue))return r}}return n||r}function Es(t,e=!1){if(!(un&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),xE(t),e||t.docView&&t.docView.dirty){let n=zc(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):!t.markCursor&&!e||r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.updateState(t.state):t.dispatch(t.state.tr.deleteSelection()),!0}return!1}}ct.compositionstart=ct.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof ce&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||He&&AE&&(function(r){let{focusNode:i,focusOffset:o}=r.domSelectionRange();if(!i||i.nodeType!=1||o>=i.childNodes.length)return!1;let s=i.childNodes[o];return s.nodeType==1&&s.contentEditable=="false"})(t)))t.markCursor=t.state.storedMarks||n.marks(),Es(t,!0),t.markCursor=null;else if(Es(t,!e.selection.empty),wt&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=t.domSelection();a&&a.collapse(s,s.nodeValue.length);break}i=s,o=-1}}t.input.composing=!0}yh(t,zS)},ct.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,yh(t,20))};const bi=Et&&Ln<15||ti&&DS<604;function wi(t,e,n,r,i){let o=NE(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,o||W.empty)))return!0;if(!o)return!1;let s=(function(l){return l.openStart==0&&l.openEnd==0&&l.content.childCount==1?l.content.firstChild:null})(o),a=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function FE(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}at.copy=ct.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let o=bi?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Gc(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):(function(u,c){if(!u.dom.parentNode)return;let d=u.dom.parentNode.appendChild(document.createElement("div"));d.appendChild(c),d.style.cssText="position: fixed; left: -10000px; top: 10px";let h=getSelection(),f=document.createRange();f.selectNodeContents(c),u.dom.blur(),h.removeAllRanges(),h.addRange(f),setTimeout(()=>{d.parentNode&&d.parentNode.removeChild(d),u.focus()},50)})(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},ct.paste=(t,e)=>{let n=e;if(t.composing&&!un)return;let r=bi?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&wi(t,FE(r),r.getData("text/html"),i,n)?n.preventDefault():(function(o,s){if(!o.dom.parentNode)return;let a=o.input.shiftKey||o.state.selection.$from.parent.type.spec.code,l=o.dom.parentNode.appendChild(document.createElement(a?"textarea":"div"));a||(l.contentEditable="true"),l.style.cssText="position: fixed; left: -10000px; top: 10px",l.focus();let u=o.input.shiftKey&&o.input.lastKeyCode!=45;setTimeout(()=>{o.focus(),l.parentNode&&l.parentNode.removeChild(l),a?wi(o,l.value,null,u,s):wi(o,l.textContent,l.innerHTML,u,s)},50)})(t,n)};class HE{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const GS=It?"altKey":"ctrlKey";function Ih(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n!=null?n:!e[GS]}at.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i,o=t.state.selection,s=o.empty?null:t.posAtCoords(ms(n));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof Z?o.to-1:o.to))){if(r&&r.mightDrag)i=Z.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(i=Z.create(t.state.doc,d.posBefore))}}let a=(i||t.state.selection).content(),{dom:l,text:u,slice:c}=Gc(t,a);(!n.dataTransfer.files.length||!He||_E>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(bi?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",bi||n.dataTransfer.setData("text/plain",u),t.dragging=new HE(c,Ih(t,n),i)},at.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},ct.dragover=ct.dragenter=(t,e)=>e.preventDefault(),ct.drop=(t,e)=>{try{(function(n,r,i){if(!r.dataTransfer)return;let o=n.posAtCoords(ms(r));if(!o)return;let s=n.state.doc.resolve(o.pos),a=i&&i.slice;a?n.someProp("transformPasted",m=>{a=m(a,n,!1)}):a=NE(n,FE(r.dataTransfer),bi?null:r.dataTransfer.getData("text/html"),!1,s);let l=!(!i||!Ih(n,r));if(n.someProp("handleDrop",m=>m(n,r,a||W.empty,l)))return void r.preventDefault();if(!a)return;r.preventDefault();let u=a?(function(m,E,_){let A=m.resolve(E);if(!_.content.size)return E;let O=_.content;for(let S=0;S<_.openStart;S++)O=O.firstChild.content;for(let S=1;S<=(_.openStart==0&&_.size?2:1);S++)for(let v=A.depth;v>=0;v--){let T=v==A.depth?0:A.pos<=(A.start(v+1)+A.end(v+1))/2?-1:1,R=A.index(v)+(T>0?1:0),I=A.node(v),g=!1;if(S==1)g=I.canReplace(R,R,O);else{let D=I.contentMatchAt(R).findWrapping(O.firstChild.type);g=D&&I.canReplaceWith(R,R,D[0])}if(g)return T==0?A.pos:T<0?A.before(v+1):A.after(v+1)}return null})(n.state.doc,s.pos,a):s.pos;u==null&&(u=s.pos);let c=n.state.tr;if(l){let{node:m}=i;m?m.replace(c):c.deleteSelection()}let d=c.mapping.map(u),h=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,f=c.doc;if(h?c.replaceRangeWith(d,d,a.content.firstChild):c.replaceRange(d,d,a),c.doc.eq(f))return;let p=c.doc.resolve(d);if(h&&Z.isSelectable(a.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new Z(p));else{let m=c.mapping.map(u);c.mapping.maps[c.mapping.maps.length-1].forEach((E,_,A,O)=>m=O),c.setSelection(Yc(n,p,c.doc.resolve(m)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))})(t,e,t.dragging)}finally{t.dragging=null}},at.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&pn(t)},20))},at.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},at.beforeinput=(t,e)=>{if(He&&un&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:n}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=n||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Xn(8,"Backspace")))))return;let{$cursor:r}=t.state.selection;r&&r.pos>0&&t.dispatch(t.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let t in ct)at[t]=ct[t];function Xi(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class _s{constructor(e,n){this.toDOM=e,this.spec=n||ir,this.side=this.spec.side||0}map(e,n,r,i){let{pos:o,deleted:s}=e.mapResult(n.from+i,this.side<0?-1:1);return s?null:new Dt(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof _s&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Xi(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Pn{constructor(e,n){this.attrs=e,this.spec=n||ir}map(e,n,r,i){let o=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Dt(o,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Pn&&Xi(this.attrs,e.attrs)&&Xi(this.spec,e.spec)}static is(e){return e.type instanceof Pn}destroy(){}}class Xc{constructor(e,n){this.attrs=e,this.spec=n||ir}map(e,n,r,i){let o=e.mapResult(n.from+i,1);if(o.deleted)return null;let s=e.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Dt(o.pos-r,s.pos-r,this)}valid(e,n){let r,{index:i,offset:o}=e.content.findIndex(n.from);return o==n.from&&!(r=e.child(i)).isText&&o+r.nodeSize==n.to}eq(e){return this==e||e instanceof Xc&&Xi(this.attrs,e.attrs)&&Xi(this.spec,e.spec)}destroy(){}}class Dt{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Dt(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new Dt(e,e,new _s(n,r))}static inline(e,n,r,i){return new Dt(e,n,new Pn(r,i))}static node(e,n,r,i){return new Dt(e,n,new Xc(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Pn}get widget(){return this.type instanceof _s}}const wr=[],ir={};class Ne{constructor(e,n){this.local=e.length?e:wr,this.children=n.length?n:wr}static create(e,n){return n.length?Xo(n,e,0,ir):Je}find(e,n,r){let i=[];return this.findInner(e==null?0:e,n==null?1e9:n,i,0,r),i}findInner(e,n,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=e&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,n-a,r,i+a,o)}}map(e,n,r){return this==Je||e.maps.length==0?this:this.mapInner(e,n,0,0,r||ir)}mapInner(e,n,r,i,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,i);l&&l.type.valid(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?(function(a,l,u,c,d,h,f){let p=a.slice();for(let E=0,_=h;E<u.maps.length;E++){let A=0;u.maps[E].forEach((O,S,v,T)=>{let R=T-v-(S-O);for(let I=0;I<p.length;I+=3){let g=p[I+1];if(g<0||O>g+_-A)continue;let D=p[I]+_-A;S>=D?p[I+1]=O<=D?-2:-1:O>=_&&R&&(p[I]+=R,p[I+1]+=R)}A+=R}),_=u.maps[E].map(_,-1)}let m=!1;for(let E=0;E<p.length;E+=3)if(p[E+1]<0){if(p[E+1]==-2){m=!0,p[E+1]=-1;continue}let _=u.map(a[E]+h),A=_-d;if(A<0||A>=c.content.size){m=!0;continue}let O=u.map(a[E+1]+h,-1)-d,{index:S,offset:v}=c.content.findIndex(A),T=c.maybeChild(S);if(T&&v==A&&v+T.nodeSize==O){let R=p[E+2].mapInner(u,T,_+1,a[E]+h+1,f);R!=Je?(p[E]=A,p[E+1]=O,p[E+2]=R):(p[E+1]=-2,m=!0)}else m=!0}if(m){let E=(function(A,O,S,v,T,R,I){function g(D,C){for(let N=0;N<D.local.length;N++){let k=D.local[N].map(v,T,C);k?S.push(k):I.onRemove&&I.onRemove(D.local[N].spec)}for(let N=0;N<D.children.length;N+=3)g(D.children[N+2],D.children[N]+C+1)}for(let D=0;D<A.length;D+=3)A[D+1]==-1&&g(A[D+2],O[D]+R+1);return S})(p,a,l,u,d,h,f),_=Xo(E,c,0,f);l=_.local;for(let A=0;A<p.length;A+=3)p[A+1]<0&&(p.splice(A,3),A-=3);for(let A=0,O=0;A<_.children.length;A+=3){let S=_.children[A];for(;O<p.length&&p[O]<S;)O+=3;p.splice(O,0,_.children[A],_.children[A+1],_.children[A+2])}}return new Ne(l.sort(Zn),p)})(this.children,s||[],e,n,r,i,o):s?new Ne(s.sort(Zn),wr):Je}add(e,n){return n.length?this==Je?Ne.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,o=0;e.forEach((a,l)=>{let u,c=l+r;if(u=BE(n,a,c)){for(i||(i=this.children.slice());o<i.length&&i[o]<l;)o+=3;i[o]==l?i[o+2]=i[o+2].addInner(a,u,c+1):i.splice(o,0,l,l+a.nodeSize,Xo(u,a,c+1,ir)),o+=3}});let s=UE(o?jE(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new Ne(s.length?this.local.concat(s).sort(Zn):this.local,i||this.children)}remove(e){return e.length==0||this==Je?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+n,l=r[o+1]+n;for(let c,d=0;d<e.length;d++)(c=e[d])&&c.from>a&&c.to<l&&(e[d]=null,(s||(s=[])).push(c));if(!s)continue;r==this.children&&(r=this.children.slice());let u=r[o+2].removeInner(s,a+1);u!=Je?r[o+2]=u:(r.splice(o,3),o-=3)}if(i.length){for(let o,s=0;s<e.length;s++)if(o=e[s])for(let a=0;a<i.length;a++)i[a].eq(o,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Ne(i,r):Je}forChild(e,n){if(this==Je)return this;if(n.isLeaf)return Ne.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let o=e+1,s=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof Pn){let u=Math.max(o,l.from)-o,c=Math.min(s,l.to)-o;u<c&&(i||(i=[])).push(l.copy(u,c))}}if(i){let a=new Ne(i.sort(Zn),wr);return r?new Rn([a,r]):a}return r||Je}eq(e){if(this==e)return!0;if(!(e instanceof Ne)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Kc(this.localsInner(e))}localsInner(e){if(this==Je)return wr;if(e.inlineContent||!this.local.some(Pn.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Pn||n.push(this.local[r]);return n}forEachSet(e){e(this)}}Ne.empty=new Ne([],[]),Ne.removeOverlap=Kc;const Je=Ne.empty;class Rn{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,ir));return Rn.from(r)}forChild(e,n){if(n.isLeaf)return Ne.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=Je&&(o instanceof Rn?r=r.concat(o.members):r.push(o))}return Rn.from(r)}eq(e){if(!(e instanceof Rn)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(n){r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}else n=o}return n?Kc(r?n:n.sort(Zn)):wr}static from(e){switch(e.length){case 0:return Je;case 1:return e[0];default:return new Rn(e.every(n=>n instanceof Ne)?e:e.reduce((n,r)=>n.concat(r instanceof Ne?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function UE(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new Dt(i.from+e,i.to+e,i.type))}return n}function BE(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let o,s=0;s<t.length;s++)(o=t[s])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),t[s]=null);return i}function jE(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Xo(t,e,n,r){let i=[],o=!1;e.forEach((a,l)=>{let u=BE(t,a,l+n);if(u){o=!0;let c=Xo(u,a,n+l+1,r);c!=Je&&i.push(l,l+a.nodeSize,c)}});let s=UE(o?jE(t):t,-n).sort(Zn);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new Ne(s,i):Je}function Zn(t,e){return t.from-e.from||t.to-e.to}function Kc(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from!=r.from){o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),Ch(e,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,r.to),Ch(e,i+1,o.copy(r.to,o.to)))}}return e}function Ch(t,e,n){for(;e<t.length&&Zn(n,t[e])>0;)e++;t.splice(e,0,n)}function Ba(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Je&&e.push(r)}),t.cursorWrapper&&e.push(Ne.create(t.state.doc,[t.cursorWrapper.deco])),Rn.from(e)}const WS={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},XS=Et&&Ln<=11;class KS{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class qS{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new KS,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Et&&Ln<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():We&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),XS&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,WS)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Eh(this.view)){if(this.suppressingSelectionUpdates)return pn(this.view);if(Et&&Ln<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&lr(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n,r=new Set;for(let o=e.focusNode;o;o=ei(o))r.add(o);for(let o=e.anchorNode;o;o=ei(o))if(r.has(o)){n=o;break}let i=n&&this.view.docView.nearestDesc(n);return i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Eh(e)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],l);d&&(o=o<0?d.from:Math.min(d.from,o),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(wt&&l.length){let c=l.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,h]=c;d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let h of c){let f=h.parentNode;!f||f.nodeName!="LI"||d&&JS(e,d)==f||h.remove()}}}else if((He||We)&&l.some(c=>c.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let c of l)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&c.parentNode.removeChild(c)}}let u=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Ks(r)&&(u=zc(e))&&u.eq(he.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,pn(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),(function(c){if(!Nh.has(c)&&(Nh.set(c,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(c.dom).whiteSpace)!==-1)){if(c.requiresGeckoHackNode=wt,bh)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),bh=!0}})(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,(function(c,d){var h;let{focusNode:f,focusOffset:p}=c.domSelectionRange();for(let m of d)if(((h=m.parentNode)===null||h===void 0?void 0:h.nodeName)=="TR"){let E=m.nextSibling;for(;E&&E.nodeName!="TD"&&E.nodeName!="TH";)E=E.nextSibling;if(E){let _=E;for(;;){let A=_.firstChild;if(!A||A.nodeType!=1||A.contentEditable=="false"||/^(BR|IMG)$/.test(A.nodeName))break;_=A}_.insertBefore(m,_.firstChild),f==m&&c.domSelection().collapse(m,p)}else m.parentNode.removeChild(m)}})(e,l)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||pn(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let c=e.addedNodes[u];n.push(c),c.nodeType==3&&(this.lastChangedTextNode=c)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(Et&&Ln<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:c,nextSibling:d}=e.addedNodes[u];(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c),(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(o=d)}let s=i&&i.parentNode==e.target?Ge(i)+1:0,a=r.localPosFromDOM(e.target,s,-1),l=o&&o.parentNode==e.target?Ge(o):e.target.childNodes.length;return{from:a,to:r.localPosFromDOM(e.target,l,1)}}return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Nh=new WeakMap,bh=!1;function wh(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return lr(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function JS(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function ZS(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(We&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(t.parentNode.lastChild==t||We&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const QS=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function eO(t,e,n,r,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let R=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,I=zc(t,R);if(I&&!t.state.selection.eq(I)){if(He&&un&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",D=>D(t,Xn(13,"Enter"))))return;let g=t.state.tr.setSelection(I);R=="pointer"?g.setMeta("pointer",!0):R=="key"&&g.scrollIntoView(),o&&g.setMeta("composition",o),t.dispatch(g)}return}let s=t.state.doc.resolve(e),a=s.sharedDepth(n);e=s.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l,u,c=t.state.selection,d=(function(R,I,g){let D,{node:C,fromOffset:N,toOffset:k,from:b,to:L}=R.docView.parseRange(I,g),x=R.domSelectionRange(),P=x.anchorNode;if(P&&R.dom.contains(P.nodeType==1?P:P.parentNode)&&(D=[{node:P,offset:x.anchorOffset}],Ks(x)||D.push({node:x.focusNode,offset:x.focusOffset})),He&&R.input.lastKeyCode===8)for(let le=k;le>N;le--){let ue=C.childNodes[le-1],de=ue.pmViewDesc;if(ue.nodeName=="BR"&&!de){k=le;break}if(!de||de.size)break}let B=R.state.doc,V=R.someProp("domParser")||zi.fromSchema(R.state.schema),$=B.resolve(b),z=null,Ae=V.parse(C,{topNode:$.parent,topMatch:$.parent.contentMatchAt($.index()),topOpen:!0,from:N,to:k,preserveWhitespace:$.parent.type.whitespace!="pre"||"full",findPositions:D,ruleFromNode:ZS,context:$});if(D&&D[0].pos!=null){let le=D[0].pos,ue=D[1]&&D[1].pos;ue==null&&(ue=le),z={anchor:le+b,head:ue+b}}return{doc:Ae,sel:z,from:b,to:L}})(t,e,n),h=t.state.doc,f=h.slice(d.from,d.to);t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(l=t.state.selection.to,u="end"):(l=t.state.selection.from,u="start"),t.input.lastKeyCode=null;let p=(function(R,I,g,D,C){let N=R.findDiffStart(I,g);if(N==null)return null;let{a:k,b}=R.findDiffEnd(I,g+R.size,g+I.size);if(C=="end"&&(D-=k+Math.max(0,N-Math.min(k,b))-N),k<N&&R.size<I.size){let L=D<=N&&D>=k?N-D:0;N-=L,N&&N<I.size&&Lh(I.textBetween(N-1,N+1))&&(N+=L?1:-1),b=N+(b-k),k=N}else if(b<N){let L=D<=N&&D>=b?N-D:0;N-=L,N&&N<R.size&&Lh(R.textBetween(N-1,N+1))&&(N+=L?1:-1),k=N+(k-b),b=N}return{start:N,endA:k,endB:b}})(f.content,d.doc.content,d.from,l,u);if(p&&t.input.domChangeCount++,(ti&&t.input.lastIOSEnter>Date.now()-225||un)&&i.some(R=>R.nodeType==1&&!QS.test(R.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",R=>R(t,Xn(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(!p){if(!(r&&c instanceof ce&&!c.empty&&c.$head.sameParent(c.$anchor))||t.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let R=kh(t,t.state.doc,d.sel);if(R&&!R.eq(t.state.selection)){let I=t.state.tr.setSelection(R);o&&I.setMeta("composition",o),t.dispatch(I)}}return}p={start:c.from,endA:c.to,endB:c.to}}t.state.selection.from<t.state.selection.to&&p.start==p.endB&&t.state.selection instanceof ce&&(p.start>t.state.selection.from&&p.start<=t.state.selection.from+2&&t.state.selection.from>=d.from?p.start=t.state.selection.from:p.endA<t.state.selection.to&&p.endA>=t.state.selection.to-2&&t.state.selection.to<=d.to&&(p.endB+=t.state.selection.to-p.endA,p.endA=t.state.selection.to)),Et&&Ln<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>d.from&&d.doc.textBetween(p.start-d.from-1,p.start-d.from+1)==" "&&(p.start--,p.endA--,p.endB--);let m=d.doc.resolveNoCache(p.start-d.from),E=d.doc.resolveNoCache(p.endB-d.from),_=h.resolve(p.start),A=m.sameParent(E)&&m.parent.inlineContent&&_.end()>=p.endA;if((ti&&t.input.lastIOSEnter>Date.now()-225&&(!A||i.some(R=>R.nodeName=="DIV"||R.nodeName=="P"))||!A&&m.pos<d.doc.content.size&&(!m.sameParent(E)||!m.parent.inlineContent)&&m.pos<E.pos&&!/\S/.test(d.doc.textBetween(m.pos,E.pos,"","")))&&t.someProp("handleKeyDown",R=>R(t,Xn(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>p.start&&(function(R,I,g,D,C){if(g-I<=C.pos-D.pos||ja(D,!0,!1)<C.pos)return!1;let N=R.resolve(I);if(!D.parent.isTextblock){let b=N.nodeAfter;return b!=null&&g==I+b.nodeSize}if(N.parentOffset<N.parent.content.size||!N.parent.isTextblock)return!1;let k=R.resolve(ja(N,!0,!0));return!(!k.parent.isTextblock||k.pos>g||ja(k,!0,!1)<g)&&D.parent.content.cut(D.parentOffset).eq(k.parent.content)})(h,p.start,p.endA,m,E)&&t.someProp("handleKeyDown",R=>R(t,Xn(8,"Backspace"))))return void(un&&He&&t.domObserver.suppressSelectionUpdates());He&&p.endB==p.start&&(t.input.lastChromeDelete=Date.now()),un&&!A&&m.start()!=E.start()&&E.parentOffset==0&&m.depth==E.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==p.endA&&(p.endB-=2,E=d.doc.resolveNoCache(p.endB-d.from),setTimeout(()=>{t.someProp("handleKeyDown",function(R){return R(t,Xn(13,"Enter"))})},20));let O,S=p.start,v=p.endA,T=R=>{let I=R||t.state.tr.replace(S,v,d.doc.slice(p.start-d.from,p.endB-d.from));if(d.sel){let g=kh(t,I.doc,d.sel);g&&!(He&&t.composing&&g.empty&&(p.start!=p.endB||t.input.lastChromeDelete<Date.now()-100)&&(g.head==S||g.head==I.mapping.map(v)-1)||Et&&g.empty&&g.head==S)&&I.setSelection(g)}return o&&I.setMeta("composition",o),I.scrollIntoView()};if(A)if(m.pos==E.pos){Et&&Ln<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>pn(t),20));let R=T(t.state.tr.delete(S,v)),I=h.resolve(p.start).marksAcross(h.resolve(p.endA));I&&R.ensureMarks(I),t.dispatch(R)}else if(p.endA==p.endB&&(O=(function(R,I){let g,D,C,N=R.firstChild.marks,k=I.firstChild.marks,b=N,L=k;for(let P=0;P<k.length;P++)b=k[P].removeFromSet(b);for(let P=0;P<N.length;P++)L=N[P].removeFromSet(L);if(b.length==1&&L.length==0)D=b[0],g="add",C=P=>P.mark(D.addToSet(P.marks));else{if(b.length!=0||L.length!=1)return null;D=L[0],g="remove",C=P=>P.mark(D.removeFromSet(P.marks))}let x=[];for(let P=0;P<I.childCount;P++)x.push(C(I.child(P)));if(j.from(x).eq(R))return{mark:D,type:g}})(m.parent.content.cut(m.parentOffset,E.parentOffset),_.parent.content.cut(_.parentOffset,p.endA-_.start())))){let R=T(t.state.tr);O.type=="add"?R.addMark(S,v,O.mark):R.removeMark(S,v,O.mark),t.dispatch(R)}else if(m.parent.child(m.index()).isText&&m.index()==E.index()-(E.textOffset?0:1)){let R=m.parent.textBetween(m.parentOffset,E.parentOffset),I=()=>T(t.state.tr.insertText(R,S,v));t.someProp("handleTextInput",g=>g(t,S,v,R,I))||t.dispatch(I())}else t.dispatch(T());else t.dispatch(T())}function kh(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Yc(t,e.resolve(n.anchor),e.resolve(n.head))}function ja(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let o=t.node(r).maybeChild(t.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function Lh(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class $E{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new HS,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Hh),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=xh(this),Ph(this),this.nodeViews=Fh(this),this.docView=ch(this.state.doc,Mh(this),Ba(this),this.dom,this),this.domObserver=new qS(this,(r,i,o,s)=>eO(this,r,i,o,s)),this.domObserver.start(),(function(r){for(let i in at){let o=at[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=s=>{!US(r,s)||zl(r,s)||!r.editable&&s.type in ct||o(r,s)},FS[i]?{passive:!0}:void 0)}We&&r.dom.addEventListener("input",()=>null),Ua(r)})(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ua(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Hh),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(xE(this),s=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let f=Fh(this);(function(p,m){let E=0,_=0;for(let A in p){if(p[A]!=m[A])return!0;E++}for(let A in m)_++;return E!=_})(f,this.nodeViews)&&(this.nodeViews=f,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Ua(this),this.editable=xh(this),Ph(this);let l=Ba(this),u=Mh(this),c=i.plugins==e.plugins||i.doc.eq(e.doc)?e.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",d=o||!this.docView.matchesNode(e.doc,u,l);!d&&e.selection.eq(i.selection)||(s=!0);let h=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&(function(f){let p,m,E=f.dom.getBoundingClientRect(),_=Math.max(0,E.top);for(let A=(E.left+E.right)/2,O=_+1;O<Math.min(innerHeight,E.bottom);O+=5){let S=f.root.elementFromPoint(A,O);if(!S||S==f.dom||!f.dom.contains(S))continue;let v=S.getBoundingClientRect();if(v.top>=_-20){p=S,m=v.top;break}}return{refDOM:p,refTop:m,stack:nh(f.dom)}})(this);if(s){this.domObserver.stop();let f=d&&(Et||He)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&(function(p,m){let E=Math.min(p.$anchor.sharedDepth(p.head),m.$anchor.sharedDepth(m.head));return p.$anchor.start(E)!=m.$anchor.start(E)})(i.selection,e.selection);if(d){let p=He?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=YS(this)),!o&&this.docView.update(e.doc,u,l,this)||(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=ch(e.doc,u,l,this.dom,this)),!p||this.trackWrites&&this.dom.contains(this.trackWrites)||(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&(function(p){let m=p.docView.domFromPos(p.state.selection.anchor,0),E=p.domSelectionRange();return lr(m.node,m.offset,E.anchorNode,E.anchorOffset)})(this))?pn(this,f):(IE(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():h&&(function({refDOM:f,refTop:p,stack:m}){let E=f?f.getBoundingClientRect().top:0;rh(m,E==0?0:E-p)})(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&this.dom.contains(e.nodeType==1?e:e.parentNode)&&!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Z){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&th(this,n.getBoundingClientRect(),e)}else th(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}}updateDraggedNode(e,n){let r=e.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new HE(e.slice,e.move,i<0?void 0:Z.create(this.state.doc,i))}someProp(e,n){let r,i=this._props&&this._props[e];if(i!=null&&(r=n?n(i):i))return r;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(r=n?n(a):a))return r}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[e];if(a!=null&&(r=n?n(a):a))return r}}hasFocus(){if(Et){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&(function(e){if(e.setActive)return e.setActive();if(Ir)return e.focus(Ir);let n=nh(e);e.focus(Ir==null?{get preventScroll(){return Ir={preventScroll:!0},!0}}:void 0),Ir||(Ir=!1,rh(n,0))})(this.dom),pn(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return yS(this,e)}coordsAtPos(e,n=1){return OE(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let i=this.docView.posFromDOM(e,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return NS(this,n||this.state,e)}pasteHTML(e,n){return wi(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return wi(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Gc(this,e)}destroy(){this.docView&&((function(e){e.domObserver.stop();for(let n in e.input.eventHandlers)e.dom.removeEventListener(n,e.input.eventHandlers[n]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)})(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ba(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,xl=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return(function(n,r){zl(n,r)||!at[r.type]||!n.editable&&r.type in ct||at[r.type](n,r)})(this,e)}domSelectionRange(){let e=this.domSelection();return e?We&&this.root.nodeType===11&&(function(n){let r=n.activeElement;for(;r&&r.shadowRoot;)r=r.shadowRoot.activeElement;return r})(this.dom.ownerDocument)==this.dom&&(function(n,r){if(r.getComposedRanges){let s=r.getComposedRanges(n.root)[0];if(s)return wh(n,s)}let i;function o(s){s.preventDefault(),s.stopImmediatePropagation(),i=s.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",o,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",o,!0),i?wh(n,i):null})(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function Mh(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:e[r]||r=="contenteditable"||r=="nodeName"||(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[Dt.node(0,t.state.doc.content.size,e)]}function Ph(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Dt.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function xh(t){return!t.someProp("editable",e=>e(t.state)===!1)}function Fh(t){let e=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function Hh(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}$E.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};const Pe=new class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let e=this.spec={};for(let r in t)e[r]=t[r];e.nodes=Ve.from(t.nodes),e.marks=Ve.from(t.marks||{}),this.nodes=Pd.compile(this.spec.nodes,this),this.marks=Ys.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let i=this.nodes[r],o=i.spec.content||"",s=i.spec.marks;if(i.contentMatch=n[o]||(n[o]=sr.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=s=="_"?null:s?xd(this,s.split(" ")):s!=""&&i.inlineContent?null:[]}for(let r in this.marks){let i=this.marks[r],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:xd(this,o.split(" "))}this.nodeFromJSON=r=>nr.fromJSON(this,r),this.markFromJSON=r=>pe.fromJSON(this,r),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if(typeof t=="string")t=this.nodeType(t);else{if(!(t instanceof Pd))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new ps(n,n.defaultAttrs,t,pe.setFrom(e))}mark(t,e){return typeof t=="string"&&(t=this.marks[t]),t.create(e)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}({nodes:{doc:{content:"paragraph+"},paragraph:{code:!0,content:"inline*",parseDOM:[{tag:"p"}],toDOM:()=>["p",0]},text:{group:"inline"},mention:{group:"inline",inline:!0,attrs:{id:{},name:{}},content:"text*",toDOM:t=>["span",{"data-mention-id":t.attrs.id,class:"t-mention"},`@${t.attrs.name}`],parseDOM:[{tag:"span[data-mention-id]",getAttrs:t=>({id:t.dataset["mention-id"]})}]},customemoji:{group:"inline",inline:!0,attrs:{name:{},url:{}},content:"text*",selectable:!1,toDOM:t=>["img",{src:t.attrs.url,alt:t.attrs.name,"data-custom-emoji":t.attrs.name}],parseDOM:[{tag:"img[data-custom-emoji]",getAttrs:t=>{const e=t;return{name:e.dataset.customEmoji,url:e.src}}}]}},marks:{literal:{toDOM:()=>["span",{"data-literal":""}],parseDOM:[{tag:"span[data-literal]"}]},bold:{toDOM:()=>["b"],parseDOM:[{tag:"b"}]},italic:{toDOM:()=>["i"],parseDOM:[{tag:"i"}]},strikethrough:{toDOM:()=>["del"],parseDOM:[{tag:"del"}]},emoji:{attrs:{emoji:{}},toDOM:t=>["span",{"data-emoji":t.attrs.emoji},t.attrs.emoji],parseDOM:[{tag:"span[data-emoji]",getAttrs:t=>({emoji:t.dataset.emoji})}]}}}),$a=new Xs("placeholder"),Uh=new Ws({key:$a,props:{decorations(t){if(VE(t.doc))return;const e=t.doc.firstChild,n=Dt.node(0,e.nodeSize,{class:"empty-node","data-placeholder":$a.getState(t)});return Ne.create(t.doc,[n])}},state:{init:()=>"",apply:(t,e)=>{var n;return(n=t.getMeta($a))!=null?n:e}}});function VE(t){return t.childCount!==1||t.firstChild.childCount!==0}for(var Fn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},As={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},tO=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),nO=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ze=0;ze<10;ze++)Fn[48+ze]=Fn[96+ze]=String(ze);for(ze=1;ze<=24;ze++)Fn[ze+111]="F"+ze;for(ze=65;ze<=90;ze++)Fn[ze]=String.fromCharCode(ze+32),As[ze]=String.fromCharCode(ze);for(var Va in Fn)As.hasOwnProperty(Va)||(As[Va]=Fn[Va]);const rO=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function iO(t){let e,n,r,i,o=t.split(/-(?!$)/),s=o[o.length-1];s=="Space"&&(s=" ");for(let a=0;a<o.length-1;a++){let l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))e=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);rO?i=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function za(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function Bh(t){return new Ws({props:{handleKeyDown:oO(t)}})}function oO(t){let e=(function(n){let r=Object.create(null);for(let i in n)r[iO(i)]=n[i];return r})(t);return function(n,r){let i,o=(function(a){var l=!(tO&&a.metaKey&&a.shiftKey&&!a.ctrlKey&&!a.altKey||nO&&a.shiftKey&&a.key&&a.key.length==1||a.key=="Unidentified")&&a.key||(a.shiftKey?As:Fn)[a.keyCode]||a.key||"Unidentified";return l=="Esc"&&(l="Escape"),l=="Del"&&(l="Delete"),l=="Left"&&(l="ArrowLeft"),l=="Up"&&(l="ArrowUp"),l=="Right"&&(l="ArrowRight"),l=="Down"&&(l="ArrowDown"),l})(r),s=e[za(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[za(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=Fn[r.keyCode])&&i!=o){let a=e[za(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var gs=200,Fe=function(){};Fe.prototype.append=function(t){return t.length?(t=Fe.from(t),!this.length&&t||t.length<gs&&this.leafAppend(t)||this.length<gs&&t.leafPrepend(this)||this.appendInner(t)):this},Fe.prototype.prepend=function(t){return t.length?Fe.from(t).append(this):this},Fe.prototype.appendInner=function(t){return new sO(this,t)},Fe.prototype.slice=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.length),t>=e?Fe.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Fe.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Fe.prototype.forEach=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},Fe.prototype.map=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(i,o){return r.push(t(i,o))},e,n),r},Fe.from=function(t){return t instanceof Fe?t:t&&t.length?new zE(t):Fe.empty};var zE=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,i){return r==0&&i==this.length?this:new e(this.values.slice(r,i))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,i,o,s){for(var a=i;a<o;a++)if(r(this.values[a],s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){for(var a=i-1;a>=o;a--)if(r(this.values[a],s+a)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=gs)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=gs)return new e(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(Fe);Fe.empty=new zE([]);var sO=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,r,i,o){var s=this.left.length;return!(r<s&&this.left.forEachInner(n,r,Math.min(i,s),o)===!1)&&!(i>s&&this.right.forEachInner(n,Math.max(r-s,0),Math.min(this.length,i)-s,o+s)===!1)&&void 0},e.prototype.forEachInvertedInner=function(n,r,i,o){var s=this.left.length;return!(r>s&&this.right.forEachInvertedInner(n,r-s,Math.max(i,s)-s,o+s)===!1)&&!(i<s&&this.left.forEachInvertedInner(n,Math.min(r,s),i,o)===!1)&&void 0},e.prototype.sliceInner=function(n,r){if(n==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(n,r):n>=i?this.right.slice(n-i,r-i):this.left.slice(n,i).append(this.right.slice(0,r-i))},e.prototype.leafAppend=function(n){var r=this.right.leafAppend(n);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(n){var r=this.left.leafPrepend(n);if(r)return new e(r,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e})(Fe);class Mt{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r,i,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}n&&(r=this.remapping(o,this.items.length),i=r.maps.length);let s,a,l=e.tr,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step)return r||(r=this.remapping(o,h+1),i=r.maps.length),i--,void c.push(d);if(r){c.push(new jt(d.map));let f,p=d.step.map(r.slice(i));p&&l.maybeStep(p).doc&&(f=l.mapping.maps[l.mapping.maps.length-1],u.push(new jt(f,void 0,void 0,u.length+c.length))),i--,f&&r.appendMap(f,i)}else l.maybeStep(d.step);return d.selection?(s=r?d.selection.map(r.slice(i)):d.selection,a=new Mt(this.items.slice(0,o).append(c.reverse().concat(u)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:a,transform:l,selection:s}}addTransform(e,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let c=0;c<e.steps.length;c++){let d,h=e.steps[c].invert(e.docs[c]),f=new jt(e.mapping.maps[c],h,n);(d=l&&l.merge(f))&&(f=d,c?o.pop():a=a.slice(0,a.length-1)),o.push(f),n&&(s++,n=void 0),i||(l=f)}let u=s-r.depth;return u>aO&&(a=(function(c,d){let h;return c.forEach((f,p)=>{if(f.selection&&d--==0)return h=p,!1}),c.slice(h)})(a,u),s-=u),new Mt(a.append(o),s)}remapping(e,n){let r=new Yi;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new Mt(this.items.append(e.map(n=>new jt(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=n;this.items.forEach(h=>{let f=o.getMirror(--l);if(f==null)return;s=Math.min(s,f);let p=o.maps[f];if(h.step){let m=e.steps[f].invert(e.docs[f]),E=h.selection&&h.selection.map(o.slice(l+1,f));E&&a++,r.push(new jt(p,m,E))}else r.push(new jt(p))},i);let u=[];for(let h=n;h<s;h++)u.push(new jt(o.maps[h]));let c=this.items.slice(0,i).append(u).append(r),d=new Mt(c,a);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=s.selection&&s.selection.map(n.slice(r));c&&o++;let d,h=new jt(u.invert(),l,c),f=i.length-1;(d=i.length&&i[f].merge(h))?i[f]=d:i.push(h)}}else s.map&&r--},this.items.length,0),new Mt(Fe.from(i.reverse()),o)}}Mt.empty=new Mt(Fe.empty,0);class jt{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new jt(n.getMap().invert(),n,this.selection)}}}class On{constructor(e,n,r,i,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const aO=20;function jh(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,o,s)=>e.push(o,s));return e}function Ya(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}let Ga=!1,$h=null;function Ko(t){let e=t.plugins;if($h!=e){Ga=!1,$h=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Ga=!0;break}}return Ga}const Qn=new Xs("history"),lO=new Xs("closeHistory");function cO(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Ws({key:Qn,state:{init:()=>new On(Mt.empty,Mt.empty,null,0,-1),apply:(e,n,r)=>(function(i,o,s,a){let l,u=s.getMeta(Qn);if(u)return u.historyState;s.getMeta(lO)&&(i=new On(i.done,i.undone,null,0,-1));let c=s.getMeta("appendedTransaction");if(s.steps.length==0)return i;if(c&&c.getMeta(Qn))return c.getMeta(Qn).redo?new On(i.done.addTransform(s,void 0,a,Ko(o)),i.undone,jh(s.mapping.maps),i.prevTime,i.prevComposition):new On(i.done,i.undone.addTransform(s,void 0,a,Ko(o)),null,i.prevTime,i.prevComposition);if(s.getMeta("addToHistory")===!1||c&&c.getMeta("addToHistory")===!1)return(l=s.getMeta("rebased"))?new On(i.done.rebased(s,l),i.undone.rebased(s,l),Ya(i.prevRanges,s.mapping),i.prevTime,i.prevComposition):new On(i.done.addMaps(s.mapping.maps),i.undone.addMaps(s.mapping.maps),Ya(i.prevRanges,s.mapping),i.prevTime,i.prevComposition);{let d=s.getMeta("composition"),h=i.prevTime==0||!c&&i.prevComposition!=d&&(i.prevTime<(s.time||0)-a.newGroupDelay||!(function(p,m){if(!m)return!1;if(!p.docChanged)return!0;let E=!1;return p.mapping.maps[0].forEach((_,A)=>{for(let O=0;O<m.length;O+=2)_<=m[O+1]&&A>=m[O]&&(E=!0)}),E})(s,i.prevRanges)),f=c?Ya(i.prevRanges,s.mapping):jh(s.mapping.maps);return new On(i.done.addTransform(s,h?o.selection.getBookmark():void 0,a,Ko(o)),Mt.empty,f,s.time,d==null?i.prevComposition:d)}})(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?GE:r=="historyRedo"?Gl:null;return!(!i||!e.editable)&&(n.preventDefault(),i(e.state,e.dispatch))}}}})}function YE(t,e){return(n,r)=>{let i=Qn.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let o=(function(s,a,l){let u=Ko(a),c=Qn.get(a).spec.config,d=(l?s.undone:s.done).popEvent(a,u);if(!d)return null;let h=d.selection.resolve(d.transform.doc),f=(l?s.done:s.undone).addTransform(d.transform,a.selection.getBookmark(),c,u),p=new On(l?f:d.remaining,l?d.remaining:f,null,0,-1);return d.transform.setSelection(h).setMeta(Qn,{redo:l,historyState:p})})(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}const GE=YE(!1,!0),Gl=YE(!0,!0),WE=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function ni(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}function Vh(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function zh(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}function Wl(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const uO=(t,e)=>{let{$from:n,$to:r}=t.selection;if(t.selection instanceof Z&&t.selection.node.isBlock)return!(!n.parentOffset||!Wo(t.doc,n.pos)||(e&&e(t.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(e){let i=r.parentOffset==r.parent.content.size,o=t.tr;(t.selection instanceof ce||t.selection instanceof Rt)&&o.deleteSelection();let s=n.depth==0?null:Wl(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=Wo(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!Wo(o.doc,o.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(o.split(o.mapping.map(n.pos),1,a),!i&&!n.parentOffset&&n.parent.type!=s)){let u=o.mapping.map(n.before()),c=o.doc.resolve(u);s&&n.node(-1).canReplaceWith(c.index(),c.index()+1,s)&&o.setNodeMarkup(o.mapping.map(n.before()),s)}e(o.scrollIntoView())}return!0};function XE(t,e,n){let r,i,o=e.nodeBefore,s=e.nodeAfter;if(o.type.spec.isolating||s.type.spec.isolating)return!1;if((function(d,h,f){let p=h.nodeBefore,m=h.nodeAfter,E=h.index();return!(!(p&&m&&p.type.compatibleContent(m.type))||(!p.content.size&&h.parent.canReplace(E-1,E)?(f&&f(d.tr.delete(h.pos-p.nodeSize,h.pos).scrollIntoView()),0):!h.parent.canReplace(E,E+1)||!m.isTextblock&&!Wd(d.doc,h.pos)||(f&&f(d.tr.clearIncompatible(h.pos,p.type,p.contentMatchAt(p.childCount)).join(h.pos).scrollIntoView()),0)))})(t,e,n))return!0;let a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(r=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(r[0]||s.type).validEnd){if(n){let d=e.pos+s.nodeSize,h=j.empty;for(let m=r.length-1;m>=0;m--)h=j.from(r[m].create(null,h));h=j.from(o.copy(h));let f=t.tr.step(new vt(e.pos-1,d,e.pos,d,new W(h,1,0),r.length,!0)),p=d+2*r.length;Wd(f.doc,p)&&f.join(p),n(f.scrollIntoView())}return!0}let l=he.findFrom(e,1),u=l&&l.$from.blockRange(l.$to),c=u&&Bc(u);if(c!=null&&c>=e.depth)return n&&n(t.tr.lift(u,c).scrollIntoView()),!0;if(a&&ni(s,"start",!0)&&ni(o,"end")){let d=o,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let f=s,p=1;for(;!f.isTextblock;f=f.firstChild)p++;if(d.canReplace(d.childCount,d.childCount,f.content)){if(n){let m=j.empty;for(let E=h.length-1;E>=0;E--)m=j.from(h[E].copy(m));n(t.tr.step(new vt(e.pos-h.length,e.pos+s.nodeSize,e.pos+p,e.pos+s.nodeSize-p,new W(m,h.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function KE(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(e.tr.setSelection(ce.create(e.doc,t<0?i.start(o):i.end(o)))),!0)}}const dO=KE(-1),hO=KE(1);function qc(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}let Wa=qc(WE,(t,e,n)=>{let r=(function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("backward",s):l.parentOffset>0)?null:l})(t,n);if(!r)return!1;let i=Vh(r);if(!i){let s=r.blockRange(),a=s&&Bc(s);return a!=null&&(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&XE(t,i,e))return!0;if(r.parent.content.size==0&&(ni(o,"end")||Z.isSelectable(o))){let s=jc(t.doc,r.before(),r.after(),W.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(ni(o,"end")?he.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):Z.create(a.doc,i.pos-o.nodeSize)),e(a.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0)},(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;o=Vh(r)}let s=o&&o.nodeBefore;return!(!s||!Z.isSelectable(s))&&(e&&e(t.tr.setSelection(Z.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),Yh=qc(WE,(t,e,n)=>{let r=(function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("forward",s):l.parentOffset<l.parent.content.size)?null:l})(t,n);if(!r)return!1;let i=zh(r);if(!i)return!1;let o=i.nodeAfter;if(XE(t,i,e))return!0;if(r.parent.content.size==0&&(ni(o,"start")||Z.isSelectable(o))){let s=jc(t.doc,r.before(),r.after(),W.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(ni(o,"start")?he.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):Z.create(a.doc,a.mapping.map(i.pos))),e(a.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0)},(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;o=zh(r)}let s=o&&o.nodeAfter;return!(!s||!Z.isSelectable(s))&&(e&&e(t.tr.setSelection(Z.create(t.doc,o.pos)).scrollIntoView()),!0)});const ln={Enter:qc((t,e)=>{let{$head:n,$anchor:r}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(e&&e(t.tr.insertText(`
|
|
16
|
+
`).scrollIntoView()),!0)},(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof Rt||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Wl(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=t.tr.insert(s,o.createAndFill());a.setSelection(ce.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(Wo(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Bc(r);return i!=null&&(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)},uO),"Mod-Enter":(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=Wl(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,s.createAndFill());l.setSelection(he.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},Backspace:Wa,"Mod-Backspace":Wa,"Shift-Backspace":Wa,Delete:Yh,"Mod-Delete":Yh,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new Rt(t.doc))),!0)},qE={"Ctrl-h":ln.Backspace,"Alt-Backspace":ln["Mod-Backspace"],"Ctrl-d":ln.Delete,"Ctrl-Alt-Backspace":ln["Mod-Delete"],"Alt-Delete":ln["Mod-Delete"],"Alt-d":ln["Mod-Delete"],"Ctrl-a":dO,"Ctrl-e":hO};for(let t in ln)qE[t]=ln[t];const ko=(typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!(typeof os=="undefined"||!os.platform)&&os.platform()=="darwin")?qE:ln;function Jc(t,e){return t.reduce((n,r,i)=>n.concat(e(r,i)),[])}var Gh,Ei={},pO=(function(){if(Gh)return Ei;function t(n){return String.fromCharCode(parseInt(n.slice(1),16))}function e(n){return`%${`00${n.charCodeAt(0).toString(16)}`.slice(-2)}`}return Gh=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.encode=function(n){return btoa(encodeURIComponent(n).replace(/%[0-9A-F]{2}/g,t))},Ei.decode=function(n){return decodeURIComponent(Array.from(atob(n),e).join(""))},Ei})();const fO=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,mO=t=>t.split(fO).filter(e=>e).map(e=>e[0]).join("")||t[Symbol.iterator]().next().value||"";function JE(t){const e=(function(n){let r=0;for(let i=0;i<n.length;i++)r=(r<<5)-r+n.charCodeAt(i),r&=r;return Math.abs(r)})(t)%Kh.length;return Kh[e]}function Js(t,e){const n=e.lastIndex;let r;const i=[];for(;(r=e.exec(t))!==null;)i.push(r),r[0]===""&&(e.lastIndex+=1);return e.lastIndex=n,i}function Xl(t,e,n){let r=0;const i=[];for(const o of e)o.offset<r||(o.offset>r&&i.push(t.substring(r,o.offset)),i.push(...n(o)),r=o.offset+o.matchedText.length);return r<t.length&&i.push(t.substring(r)),i}function ZE(t){try{return new URL(t).hostname}catch(e){return}}const EO=13;function Wh(t){return t.keyCode===EO&&!t.shiftKey}function Lo(t){const e=t.replace(/%2F/g,"/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/,"$1"),n=decodeURIComponent(e);if(/%[0-9A-Fa-f]{2}/.test(n))try{return decodeURIComponent(n.replace(/\+/g,"%20"))}catch(r){return n}return n}function Xh(t,e){return t.localeCompare(e,void 0,{usage:"search",sensitivity:"base"})===0}function _O(t){return[...t.matchAll(/^|\s+/g)].map(n=>n.index+n[0].length).map(n=>t.substring(n))}const Kh=["#996666","#9A6E61","#8D7662","#8E775E","#948771","#8A8360","#888D65","#6F8E63","#749378","#678975","#779E86","#639A8F","#6D92A1","#65869F","#697E9A","#736C9F","#8C6495","#956387","#B05D54","#B16D52","#AF8751","#AC8A56","#B7A458","#B5B35C","#83AA5D","#4F9D5D","#5FA777","#66B58F","#5FB3AC","#589AAF","#4E7F9E","#456CAC","#6456B7","#714AB2","#9771B5","#C154C1","#B05E81","#B04C6A","#B94E48","#AF593E","#C5994B","#B8C25D","#87AB39","#4FA83D","#40A860","#41AA78","#3AB09E","#3FC1AA","#56B4BE","#3EABBF","#4682B4","#7A58C1","#9966CC","#C54B8C","#B44668","#AE4560","#A3807B","#AB917A","#ACA586","#A8AF8E","#9EA587","#8BA690","#7DA98D","#7CB0A1","#8BA9A5","#7CA1A6","#859FAF","#8D90A1","#A397B4","#AE809E","#C08081","#BB8983","#B19461","#B5A27F","#B8B56A","#9AB973","#7AC488","#7CB7BB","#80B3C4","#788BBA","#7A89B8","#9678B6","#CB8FA9","#B57281","#C6726B","#C88A65","#C2955D","#C8B568","#B9C46A","#74C365","#6FD0C5","#6093D1","#7666C6","#D06DA1"],ki=(t,e,n=void 0)=>Jc(t,r=>{if(typeof r=="string")return e(r,n);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return[{type:r.type,children:ki(r.children,e,r.type)}];case"link":return[{type:r.type,url:r.url,children:ki(r.children,e,r.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:r.type,action:r.action,params:r.params,children:ki(r.children,e,r.type)}];case"mention":case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return[r]}});function An(t,e){return n=>{const r=n;let i=0;const o=[];for(const s of Js(n,t)){s.index-i>0&&o.push(r.substring(i,s.index));const a=e(s);Array.isArray(a)?o.push(...a):o.push(a),i=s.index+s[0].length}return i<n.length&&o.push(n.substring(i)),o}}function QE(t){return t.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}const qh="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var Kl=(t=>(t[t.italic=1]="italic",t[t.strikethrough=2]="strikethrough",t[t.bold=4]="bold",t))(Kl||{});const AO=[0,1,2,3,4,5,6].map(t=>{const e=[];return 1&t||e.push(/_([^\s_].*?[^\s_])_|_([^\s_])_/),2&t||e.push(/~([^\s~].*?[^\s~])~|~([^\s~])~/),4&t||e.push(/\*([^\s*].*?[^\s*])\*|\*([^\s*])\*/),new RegExp(e.map(n=>n.source).join("|"),"g")}),gO={_:1,"*":4,"~":2};function SO(t){return e_(t,0)}function e_(t,e=0){const n=AO[e],r=n?(function(i){const o=OO.getOrCompute(i,()=>new RegExp(`(?:^|[\\s${qh}])(?:${i.source})(?=[\\s${qh}]|$)`,"g")),s=An(o,a=>{const l=a[0][1],u=a[1]||a[2]||a[3]||a[4]||a[5]||a[6];return[" ",{type:Kl[gO[l]],children:[u]}]});return a=>{const[l,...u]=s(" "+a);return l.length>1&&u.unshift(l.substring(1)),u}})(n):()=>[t];return ki(r(t),(i,o)=>o==="bold"||o==="italic"||o==="strikethrough"?e_(i,e|Kl[o]):[i])}const OO=(function(){const t=(function(){try{return new WeakMap}catch(e){const n={has:()=>!1,get:()=>{},set:()=>n};return n}})();return{getOrCompute(e,n){if(t.has(e))return t.get(e);const r=n();return t.set(e,r),r}}})();var ql=function(t,e){return ql=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},ql(t,e)};function ho(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ql(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Me=function(){return Me=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Me.apply(this,arguments)};var vO=Object.prototype.hasOwnProperty;function yt(t){return typeof t=="boolean"}function Vn(t,e){for(var n=t.length-1;n>=0;n--)e(t[n])===!0&&t.splice(n,1)}function cr(t){throw new Error("Unhandled case for value: '".concat(t,"'"))}var Mo=/\s+/,t_=(function(){function t(e){e===void 0&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return t.prototype.setTagName=function(e){return this.tagName=e,this},t.prototype.getTagName=function(){return this.tagName},t.prototype.setAttr=function(e,n){return this.getAttrs()[e]=n,this},t.prototype.getAttr=function(e){return this.getAttrs()[e]},t.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},t.prototype.getAttrs=function(){return this.attrs},t.prototype.setClass=function(e){return this.setAttr("class",e)},t.prototype.addClass=function(e){for(var n,r=this.getClass(),i=r?r.split(Mo):[],o=e.split(Mo);n=o.shift();)i.indexOf(n)===-1&&i.push(n);return this.getAttrs().class=i.join(" "),this},t.prototype.removeClass=function(e){for(var n,r=this.getClass(),i=r?r.split(Mo):[],o=e.split(Mo);i.length&&(n=o.shift());){var s=i.indexOf(n);s!==-1&&i.splice(s,1)}return this.getAttrs().class=i.join(" "),this},t.prototype.getClass=function(){return this.getAttrs().class||""},t.prototype.hasClass=function(e){return(" "+this.getClass()+" ").indexOf(" "+e+" ")!==-1},t.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},t.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},t.prototype.getInnerHTML=function(){return this.innerHTML||""},t.prototype.getInnerHtml=function(){return this.getInnerHTML()},t.prototype.toAnchorString=function(){var e=this.getTagName(),n=this.buildAttrsStr();return["<",e,n=n?" "+n:"",">",this.getInnerHtml(),"</",e,">"].join("")},t.prototype.buildAttrsStr=function(){var e=this.getAttrs(),n=[];for(var r in e)vO.call(e,r)&&n.push(r+'="'+e[r]+'"');return n.join(" ")},t})();function Jh(t){var e="";return t.scheme&&t.host&&(e+=t.scheme+"://"),t.host&&(e+=t.host),t.path&&(e+="/"+t.path),t.query&&(e+="?"+t.query),t.fragment&&(e+="#"+t.fragment),e}function Xa(t,e,n){var r=e/2,i=Math.ceil(r),o=-1*Math.floor(r),s="";return o<0&&(s=t.substr(o)),t.substr(0,i)+n+s}var DO=(function(){function t(e){e===void 0&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return t.prototype.build=function(e){return new t_({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},t.prototype.createAttrs=function(e){var n={href:e.getAnchorHref()},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),this.truncate.length&&this.truncate.length<e.getAnchorText().length&&(n.title=e.getAnchorHref()),n},t.prototype.createCssClass=function(e){var n=this.className;if(n){for(var r=[n],i=e.getCssClassSuffixes(),o=0,s=i.length;o<s;o++)r.push(n+"-"+i[o]);return r.join(" ")}return""},t.prototype.processAnchorText=function(e){return e=this.doTruncate(e)},t.prototype.doTruncate=function(e){var n=this.truncate;if(!n.length)return e;var r=n.length,i=n.location;return i==="smart"?(function(o,s,a){var l,u;if(a==null?(a="…",u=3,l=8):(u=a.length,l=a.length),o.length<=s)return o;var c=s-u,d=(function(A){var O={},S=A,v=S.match(/^([a-z]+):\/\//i);return v&&(O.scheme=v[1],S=S.slice(v[0].length)),(v=S.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(O.host=v[1],S=S.slice(v[0].length)),(v=S.match(/^\/(.*?)(?=(\?|#|$))/i))&&(O.path=v[1],S=S.slice(v[0].length)),(v=S.match(/^\?(.*?)(?=(#|$))/i))&&(O.query=v[1],S=S.slice(v[0].length)),(v=S.match(/^#(.*?)$/i))&&(O.fragment=v[1]),O})(o);if(d.query){var h=d.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);h&&(d.query=d.query.substr(0,h[1].length),o=Jh(d))}if(o.length<=s||(d.host&&(d.host=d.host.replace(/^www\./,""),o=Jh(d)),o.length<=s))return o;var f="";if(d.host&&(f+=d.host),f.length>=c)return d.host.length===s?(d.host.substr(0,s-u)+a).substr(0,c+l):Xa(f,c,a).substr(0,c+l);var p="";if(d.path&&(p+="/"+d.path),d.query&&(p+="?"+d.query),p){if((f+p).length>=c)return(f+p).length==s?(f+p).substr(0,s):(f+Xa(p,c-f.length,a)).substr(0,c+l);f+=p}if(d.fragment){var m="#"+d.fragment;if((f+m).length>=c)return(f+m).length==s?(f+m).substr(0,s):(f+Xa(m,c-f.length,a)).substr(0,c+l);f+=m}if(d.scheme&&d.host){var E=d.scheme+"://";if((f+E).length<c)return(E+f).substr(0,s)}if(f.length<=s)return f;var _="";return c>0&&(_=f.substr(-1*Math.floor(c/2))),(f.substr(0,Math.ceil(c/2))+a+_).substr(0,c+l)})(e,r):i==="middle"?(function(o,s,a){if(o.length<=s)return o;var l,u;a==null?(a="…",l=8,u=3):(l=a.length,u=a.length);var c=s-u,d="";return c>0&&(d=o.substr(-1*Math.floor(c/2))),(o.substr(0,Math.ceil(c/2))+a+d).substr(0,c+l)})(e,r):(function(o,s,a){return(function(l,u,c){var d;return l.length>u&&(c==null?(c="…",d=3):d=c.length,l=l.substring(0,u-d)+c),l})(o,s,a)})(e,r)},t})(),po=(function(){function t(e){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return t.prototype.getMatchedText=function(){return this.matchedText},t.prototype.setOffset=function(e){this.offset=e},t.prototype.getOffset=function(){return this.offset},t.prototype.getCssClassSuffixes=function(){return[this.type]},t.prototype.buildTag=function(){return this.tagBuilder.build(this)},t})();function li(t){return t>=65&&t<=90||t>=97&&t<=122}function Ke(t){return t>=48&&t<=57}function Zc(t){return t==34||t==39}function gr(t){return t<8232?t<160?t>=9&&t<=13||t==32:t<5760?t==160:t==5760||t>=8192&&t<=8202:t<8287?t>=8232&&t<=8233||t==8239:t<12288?t==8287:t==12288||t==65279}function Sr(t){return t<4800?t<2949?t<2451?t<1425?t<768?t<192?t<169?t<65?t>=48&&t<=57:t>=65&&t<=90||t>=97&&t<=122:t<181?t>=169&&t<=170||t==174:t==181||t==186:t<710?t<216?t>=192&&t<=214:t>=216&&t<=246||t>=248&&t<=705:t<748?t>=710&&t<=721||t>=736&&t<=740:t==748||t==750:t<910?t<895?t<886?t>=768&&t<=884:t>=886&&t<=887||t>=890&&t<=893:t<904?t==895||t==902:t>=904&&t<=906||t==908:t<1155?t<931?t>=910&&t<=929:t>=931&&t<=1013||t>=1015&&t<=1153:t<1369?t>=1155&&t<=1327||t>=1329&&t<=1366:t==1369||t>=1377&&t<=1415:t<1808?t<1552?t<1476?t<1471?t>=1425&&t<=1469:t==1471||t>=1473&&t<=1474:t<1488?t>=1476&&t<=1477||t==1479:t>=1488&&t<=1514||t>=1520&&t<=1522:t<1749?t<1568?t>=1552&&t<=1562:t>=1568&&t<=1641||t>=1646&&t<=1747:t<1770?t>=1749&&t<=1756||t>=1759&&t<=1768:t>=1770&&t<=1788||t==1791:t<2230?t<2042?t<1869?t>=1808&&t<=1866:t>=1869&&t<=1969||t>=1984&&t<=2037:t<2112?t==2042||t>=2048&&t<=2093:t>=2112&&t<=2139||t>=2208&&t<=2228:t<2406?t<2260?t>=2230&&t<=2237:t>=2260&&t<=2273||t>=2275&&t<=2403:t<2437?t>=2406&&t<=2415||t>=2417&&t<=2435:t>=2437&&t<=2444||t>=2447&&t<=2448:t<2693?t<2579?t<2519?t<2486?t<2474?t>=2451&&t<=2472:t>=2474&&t<=2480||t==2482:t<2503?t>=2486&&t<=2489||t>=2492&&t<=2500:t>=2503&&t<=2504||t>=2507&&t<=2510:t<2534?t<2524?t==2519:t>=2524&&t<=2525||t>=2527&&t<=2531:t<2565?t>=2534&&t<=2545||t>=2561&&t<=2563:t>=2565&&t<=2570||t>=2575&&t<=2576:t<2631?t<2613?t<2602?t>=2579&&t<=2600:t>=2602&&t<=2608||t>=2610&&t<=2611:t<2620?t>=2613&&t<=2614||t>=2616&&t<=2617:t==2620||t>=2622&&t<=2626:t<2649?t<2635?t>=2631&&t<=2632:t>=2635&&t<=2637||t==2641:t<2662?t>=2649&&t<=2652||t==2654:t>=2662&&t<=2677||t>=2689&&t<=2691:t<2821?t<2759?t<2730?t<2703?t>=2693&&t<=2701:t>=2703&&t<=2705||t>=2707&&t<=2728:t<2741?t>=2730&&t<=2736||t>=2738&&t<=2739:t>=2741&&t<=2745||t>=2748&&t<=2757:t<2784?t<2763?t>=2759&&t<=2761:t>=2763&&t<=2765||t==2768:t<2809?t>=2784&&t<=2787||t>=2790&&t<=2799:t==2809||t>=2817&&t<=2819:t<2887?t<2858?t<2831?t>=2821&&t<=2828:t>=2831&&t<=2832||t>=2835&&t<=2856:t<2869?t>=2858&&t<=2864||t>=2866&&t<=2867:t>=2869&&t<=2873||t>=2876&&t<=2884:t<2911?t<2902?t>=2887&&t<=2888||t>=2891&&t<=2893:t>=2902&&t<=2903||t>=2908&&t<=2909:t<2929?t>=2911&&t<=2915||t>=2918&&t<=2927:t==2929||t>=2946&&t<=2947:t<3517?t<3205?t<3046?t<2984?t<2969?t<2958?t>=2949&&t<=2954:t>=2958&&t<=2960||t>=2962&&t<=2965:t<2974?t>=2969&&t<=2970||t==2972:t>=2974&&t<=2975||t>=2979&&t<=2980:t<3014?t<2990?t>=2984&&t<=2986:t>=2990&&t<=3001||t>=3006&&t<=3010:t<3024?t>=3014&&t<=3016||t>=3018&&t<=3021:t==3024||t==3031:t<3142?t<3086?t<3072?t>=3046&&t<=3055:t>=3072&&t<=3075||t>=3077&&t<=3084:t<3114?t>=3086&&t<=3088||t>=3090&&t<=3112:t>=3114&&t<=3129||t>=3133&&t<=3140:t<3160?t<3146?t>=3142&&t<=3144:t>=3146&&t<=3149||t>=3157&&t<=3158:t<3174?t>=3160&&t<=3162||t>=3168&&t<=3171:t>=3174&&t<=3183||t>=3200&&t<=3203:t<3333?t<3274?t<3242?t<3214?t>=3205&&t<=3212:t>=3214&&t<=3216||t>=3218&&t<=3240:t<3260?t>=3242&&t<=3251||t>=3253&&t<=3257:t>=3260&&t<=3268||t>=3270&&t<=3272:t<3296?t<3285?t>=3274&&t<=3277:t>=3285&&t<=3286||t==3294:t<3313?t>=3296&&t<=3299||t>=3302&&t<=3311:t>=3313&&t<=3314||t>=3329&&t<=3331:t<3423?t<3389?t<3342?t>=3333&&t<=3340:t>=3342&&t<=3344||t>=3346&&t<=3386:t<3402?t>=3389&&t<=3396||t>=3398&&t<=3400:t>=3402&&t<=3406||t>=3412&&t<=3415:t<3458?t<3430?t>=3423&&t<=3427:t>=3430&&t<=3439||t>=3450&&t<=3455:t<3482?t>=3458&&t<=3459||t>=3461&&t<=3478:t>=3482&&t<=3505||t>=3507&&t<=3515:t<3804?t<3722?t<3570?t<3535?t<3520?t==3517:t>=3520&&t<=3526||t==3530:t<3544?t>=3535&&t<=3540||t==3542:t>=3544&&t<=3551||t>=3558&&t<=3567:t<3664?t<3585?t>=3570&&t<=3571:t>=3585&&t<=3642||t>=3648&&t<=3662:t<3716?t>=3664&&t<=3673||t>=3713&&t<=3714:t==3716||t>=3719&&t<=3720:t<3754?t<3737?t<3725?t==3722:t==3725||t>=3732&&t<=3735:t<3749?t>=3737&&t<=3743||t>=3745&&t<=3747:t==3749||t==3751:t<3776?t<3757?t>=3754&&t<=3755:t>=3757&&t<=3769||t>=3771&&t<=3773:t<3784?t>=3776&&t<=3780||t==3782:t>=3784&&t<=3789||t>=3792&&t<=3801:t<4176?t<3902?t<3872?t<3840?t>=3804&&t<=3807:t==3840||t>=3864&&t<=3865:t<3895?t>=3872&&t<=3881||t==3893:t==3895||t==3897:t<3974?t<3913?t>=3902&&t<=3911:t>=3913&&t<=3948||t>=3953&&t<=3972:t<4038?t>=3974&&t<=3991||t>=3993&&t<=4028:t==4038||t>=4096&&t<=4169:t<4688?t<4301?t<4256?t>=4176&&t<=4253:t>=4256&&t<=4293||t==4295:t<4348?t==4301||t>=4304&&t<=4346:t>=4348&&t<=4680||t>=4682&&t<=4685:t<4746?t<4698?t>=4688&&t<=4694||t==4696:t>=4698&&t<=4701||t>=4704&&t<=4744:t<4786?t>=4746&&t<=4749||t>=4752&&t<=4784:t>=4786&&t<=4789||t>=4792&&t<=4798:t<11035?t<7416?t<6176?t<5873?t<4992?t<4824?t<4802?t==4800:t>=4802&&t<=4805||t>=4808&&t<=4822:t<4888?t>=4824&&t<=4880||t>=4882&&t<=4885:t>=4888&&t<=4954||t>=4957&&t<=4959:t<5121?t<5024?t>=4992&&t<=5007:t>=5024&&t<=5109||t>=5112&&t<=5117:t<5761?t>=5121&&t<=5740||t>=5743&&t<=5759:t>=5761&&t<=5786||t>=5792&&t<=5866:t<6002?t<5920?t<5888?t>=5873&&t<=5880:t>=5888&&t<=5900||t>=5902&&t<=5908:t<5984?t>=5920&&t<=5940||t>=5952&&t<=5971:t>=5984&&t<=5996||t>=5998&&t<=6e3:t<6108?t<6016?t>=6002&&t<=6003:t>=6016&&t<=6099||t==6103:t<6155?t>=6108&&t<=6109||t>=6112&&t<=6121:t>=6155&&t<=6157||t>=6160&&t<=6169:t<6783?t<6512?t<6400?t<6272?t>=6176&&t<=6263:t>=6272&&t<=6314||t>=6320&&t<=6389:t<6448?t>=6400&&t<=6430||t>=6432&&t<=6443:t>=6448&&t<=6459||t>=6470&&t<=6509:t<6608?t<6528?t>=6512&&t<=6516:t>=6528&&t<=6571||t>=6576&&t<=6601:t<6688?t>=6608&&t<=6617||t>=6656&&t<=6683:t>=6688&&t<=6750||t>=6752&&t<=6780:t<7040?t<6832?t<6800?t>=6783&&t<=6793:t>=6800&&t<=6809||t==6823:t<6992?t>=6832&&t<=6846||t>=6912&&t<=6987:t>=6992&&t<=7001||t>=7019&&t<=7027:t<7245?t<7168?t>=7040&&t<=7155:t>=7168&&t<=7223||t>=7232&&t<=7241:t<7376?t>=7245&&t<=7293||t>=7296&&t<=7304:t>=7376&&t<=7378||t>=7380&&t<=7414:t<8450?t<8130?t<8025?t<7960?t<7424?t>=7416&&t<=7417:t>=7424&&t<=7669||t>=7675&&t<=7957:t<8008?t>=7960&&t<=7965||t>=7968&&t<=8005:t>=8008&&t<=8013||t>=8016&&t<=8023:t<8031?t<8027?t==8025:t==8027||t==8029:t<8118?t>=8031&&t<=8061||t>=8064&&t<=8116:t>=8118&&t<=8124||t==8126:t<8205?t<8150?t<8134?t>=8130&&t<=8132:t>=8134&&t<=8140||t>=8144&&t<=8147:t<8178?t>=8150&&t<=8155||t>=8160&&t<=8172:t>=8178&&t<=8180||t>=8182&&t<=8188:t<8305?t<8252?t==8205:t==8252||t==8265:t<8336?t==8305||t==8319:t>=8336&&t<=8348||t>=8400&&t<=8432:t<8579?t<8486?t<8469?t<8455?t==8450:t==8455||t>=8458&&t<=8467:t<8482?t==8469||t>=8473&&t<=8477:t==8482||t==8484:t<8495?t<8488?t==8486:t==8488||t>=8490&&t<=8493:t<8517?t>=8495&&t<=8505||t>=8508&&t<=8511:t>=8517&&t<=8521||t==8526:t<9410?t<9e3?t<8592?t>=8579&&t<=8580:t>=8592&&t<=8703||t>=8986&&t<=8987:t<9193?t==9e3||t==9167:t>=9193&&t<=9203||t>=9208&&t<=9210:t<9723?t<9654?t==9410||t>=9642&&t<=9643:t==9654||t==9664:t<10548?t>=9723&&t<=9726||t>=9728&&t<=10175:t>=10548&&t<=10549||t>=11013&&t<=11015:t<43259?t<12445?t<11688?t<11520?t<11264?t<11088?t>=11035&&t<=11036:t==11088||t==11093:t<11360?t>=11264&&t<=11310||t>=11312&&t<=11358:t>=11360&&t<=11492||t>=11499&&t<=11507:t<11568?t<11559?t>=11520&&t<=11557:t==11559||t==11565:t<11647?t>=11568&&t<=11623||t==11631:t>=11647&&t<=11670||t>=11680&&t<=11686:t<11744?t<11712?t<11696?t>=11688&&t<=11694:t>=11696&&t<=11702||t>=11704&&t<=11710:t<11728?t>=11712&&t<=11718||t>=11720&&t<=11726:t>=11728&&t<=11734||t>=11736&&t<=11742:t<12330?t<11823?t>=11744&&t<=11775:t==11823||t>=12293&&t<=12294:t<12353?t>=12330&&t<=12341||t>=12347&&t<=12349:t>=12353&&t<=12438||t>=12441&&t<=12442:t<42512?t<12951?t<12549?t<12449?t>=12445&&t<=12447:t>=12449&&t<=12538||t>=12540&&t<=12543:t<12704?t>=12549&&t<=12589||t>=12593&&t<=12686:t>=12704&&t<=12730||t>=12784&&t<=12799:t<19968?t<12953?t==12951:t==12953||t>=13312&&t<=19893:t<42192?t>=19968&&t<=40917||t>=40960&&t<=42124:t>=42192&&t<=42237||t>=42240&&t<=42508:t<42891?t<42623?t<42560?t>=42512&&t<=42539:t>=42560&&t<=42610||t>=42612&&t<=42621:t<42775?t>=42623&&t<=42725||t>=42736&&t<=42737:t>=42775&&t<=42783||t>=42786&&t<=42888:t<43072?t<42928?t>=42891&&t<=42926:t>=42928&&t<=42935||t>=42999&&t<=43047:t<43216?t>=43072&&t<=43123||t>=43136&&t<=43205:t>=43216&&t<=43225||t>=43232&&t<=43255:t<55243?t<43744?t<43488?t<43312?t<43261?t==43259:t==43261||t>=43264&&t<=43309:t<43392?t>=43312&&t<=43347||t>=43360&&t<=43388:t>=43392&&t<=43456||t>=43471&&t<=43481:t<43600?t<43520?t>=43488&&t<=43518:t>=43520&&t<=43574||t>=43584&&t<=43597:t<43642?t>=43600&&t<=43609||t>=43616&&t<=43638:t>=43642&&t<=43714||t>=43739&&t<=43741:t<43824?t<43785?t<43762?t>=43744&&t<=43759:t>=43762&&t<=43766||t>=43777&&t<=43782:t<43808?t>=43785&&t<=43790||t>=43793&&t<=43798:t>=43808&&t<=43814||t>=43816&&t<=43822:t<44012?t<43868?t>=43824&&t<=43866:t>=43868&&t<=43877||t>=43888&&t<=44010:t<44032?t>=44012&&t<=44013||t>=44016&&t<=44025:t>=44032&&t<=55203||t>=55216&&t<=55238:t<64848?t<64298?t<64112?t<55296?t>=55243&&t<=55291:t>=55296&&t<=57343||t>=63744&&t<=64109:t<64275?t>=64112&&t<=64217||t>=64256&&t<=64262:t>=64275&&t<=64279||t>=64285&&t<=64296:t<64320?t<64312?t>=64298&&t<=64310:t>=64312&&t<=64316||t==64318:t<64326?t>=64320&&t<=64321||t>=64323&&t<=64324:t>=64326&&t<=64433||t>=64467&&t<=64829:t<65296?t<65024?t<64914?t>=64848&&t<=64911:t>=64914&&t<=64967||t>=65008&&t<=65019:t<65136?t>=65024&&t<=65039||t>=65056&&t<=65071:t>=65136&&t<=65140||t>=65142&&t<=65276:t<65474?t<65345?t>=65296&&t<=65305||t>=65313&&t<=65338:t>=65345&&t<=65370||t>=65382&&t<=65470:t<65490?t>=65474&&t<=65479||t>=65482&&t<=65487:t>=65490&&t<=65495||t>=65498&&t<=65500}function n_(t){return t<58?t<44?t==33:t==44||t==46:t<63?t>=58&&t<=59:t==63||t==94}function TO(t){return t<91?t==40:t==91||t==123}function Zh(t){return t<93?t==41:t==93||t==125}var RO=/^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/,r_=/https?:\/\//i,yO=new RegExp("^"+r_.source,"i"),IO=/^(javascript|vbscript):/i,CO=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,NO=/^(?:\/\/)?([^/#?:]+)/,Ki=li;function i_(t){return li(t)||Ke(t)||t===43||t===45||t===46}var Bn=Sr;function Qc(t){return t===95||Bn(t)}function o_(t){return Sr(t)||(function(e){return e<91?e<47?e>=35&&e<=43||e==45:e<61?e==47:e==61||e==64:e<95?e==91||e==93:e<123?e==95:e>=123&&e<=126||e==10003})(t)||n_(t)}function eu(t){return t===47||t===63||t===35}function Qh(t){return RO.test(t.toLowerCase())}var bO=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,wO=/[:/?#]/,kO=/^(https?:\/\/)?(?:www\.)?/i,LO=/^\/\//,s_=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="url",r.url="",r.urlMatchType="scheme",r.protocolRelativeMatch=!1,r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.protocolPrepended=!1,r.urlMatchType=n.urlMatchType,r.url=n.url,r.protocolRelativeMatch=n.protocolRelativeMatch,r.stripPrefix=n.stripPrefix,r.stripTrailingSlash=n.stripTrailingSlash,r.decodePercentEncoding=n.decodePercentEncoding,r}return ho(e,t),e.prototype.getType=function(){return"url"},e.prototype.getUrlMatchType=function(){return this.urlMatchType},e.prototype.getUrl=function(){var n=this.url;return this.protocolRelativeMatch||this.urlMatchType==="scheme"||this.protocolPrepended||(n=this.url="http://"+n,this.protocolPrepended=!0),n},e.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},e.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=n.replace(LO,"")),this.stripPrefix.scheme&&(n=n.replace(yO,"")),this.stripPrefix.www&&(n=(function(r){return r.includes("www.")?r.replace(kO,"$1"):r})(n)),this.stripTrailingSlash&&(n=(function(r){return r.charAt(r.length-1)==="/"&&(r=r.slice(0,-1)),r})(n)),this.decodePercentEncoding&&(n=(function(r){var i=r.replace(/%(?:22|26|27|3C|3E)/gi,function(o){return o==="%22"?""":o==="%26"?"&":o==="%27"?"'":o==="%3C"||o==="%3c"?"<":">"});if(i.includes("%"))try{return decodeURIComponent(i)}catch(o){}return i})(n)),n},e})(po),MO=/^mailto:/i,a_=Sr;function tu(t){return a_(t)||(function(e){return e<47?e<42?e==33||e>=35&&e<=39:e>=42&&e<=43||e==45:e<63?e==47||e==61:e<94?e==63:e>=94&&e<=96||e>=123&&e<=126})(t)}var l_=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="email",r.email="",r.email=n.email,r}return ho(e,t),e.prototype.getType=function(){return"email"},e.prototype.getEmail=function(){return this.email},e.prototype.getAnchorHref=function(){return"mailto:"+this.email},e.prototype.getAnchorText=function(){return this.email},e})(po);function c_(t){return t===95||Sr(t)}var PO=["twitter","facebook","instagram","tiktok","youtube"],xO=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="hashtag",r.serviceName="twitter",r.hashtag="",r.serviceName=n.serviceName,r.hashtag=n.hashtag,r}return ho(e,t),e.prototype.getType=function(){return"hashtag"},e.prototype.getServiceName=function(){return this.serviceName},e.prototype.getHashtag=function(){return this.hashtag},e.prototype.getAnchorHref=function(){var n=this.serviceName,r=this.hashtag;switch(n){case"twitter":return"https://twitter.com/hashtag/"+r;case"facebook":return"https://www.facebook.com/hashtag/"+r;case"instagram":return"https://instagram.com/explore/tags/"+r;case"tiktok":return"https://www.tiktok.com/tag/"+r;case"youtube":return"https://youtube.com/hashtag/"+r;default:cr(n)}},e.prototype.getAnchorText=function(){return"#"+this.hashtag},e.prototype.getCssClassSuffixes=function(){var n=t.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},e})(po),FO={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function u_(t){return t===45||t===46||t===95||li(t)||Ke(t)}var HO=["twitter","instagram","soundcloud","tiktok","youtube"],UO=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="mention",r.serviceName="twitter",r.mention="",r.mention=n.mention,r.serviceName=n.serviceName,r}return ho(e,t),e.prototype.getType=function(){return"mention"},e.prototype.getMention=function(){return this.mention},e.prototype.getServiceName=function(){return this.serviceName},e.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;case"youtube":return"https://youtube.com/@"+this.mention;default:cr(this.serviceName)}},e.prototype.getAnchorText=function(){return"@"+this.mention},e.prototype.getCssClassSuffixes=function(){var n=t.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},e})(po),BO=/[-. ()]/,jO=new RegExp("^".concat(/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/.source,"|").concat(/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source,"$"));function d_(t){return t===45||t===46||t===32}function nu(t){return t===44||t===59}var $O=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="phone",r.number="",r.plusSign=!1,r.number=n.number,r.plusSign=n.plusSign,r}return ho(e,t),e.prototype.getType=function(){return"phone"},e.prototype.getPhoneNumber=function(){return this.number},e.prototype.getNumber=function(){return this.getPhoneNumber()},e.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},e.prototype.getAnchorText=function(){return this.matchedText},e})(po),VO=(function(){function t(e,n){this.charIdx=0,this.matches=[],this._stateMachines=[],this.schemeUrlMachinesCount=0,this.text=e,this.tagBuilder=n.tagBuilder,this.stripPrefix=n.stripPrefix,this.stripTrailingSlash=n.stripTrailingSlash,this.decodePercentEncoding=n.decodePercentEncoding,this.hashtagServiceName=n.hashtagServiceName,this.mentionServiceName=n.mentionServiceName}return Object.defineProperty(t.prototype,"stateMachines",{get:function(){return this._stateMachines},enumerable:!1,configurable:!0}),t.prototype.addMachine=function(e){this._stateMachines.push(e),tp(e)&&this.schemeUrlMachinesCount++},t.prototype.removeMachine=function(e){this._stateMachines=this._stateMachines.filter(function(n){return n!==e}),tp(e)&&this.schemeUrlMachinesCount--},t.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},t})();function Zs(t,e,n){var r=t.charIdx;if(n===35)t.addMachine({type:2,startIdx:r,state:28,acceptStateReached:!1});else if(n===64)t.addMachine((function(o,s){return{type:3,startIdx:o,state:s,acceptStateReached:!1}})(r,30));else if(n===47)t.addMachine(Jl(r,11));else if(n===43)t.addMachine(Ka(r,37));else if(n===40)t.addMachine(Ka(r,32));else{if(Ke(n)&&(t.addMachine(Ka(r,38)),t.addMachine((function(o,s){return{type:0,startIdx:o,state:s,acceptStateReached:!1,matchType:2,octetsEncountered:1}})(r,13))),a_(n)){var i=e.toLowerCase()==="m"?15:22;t.addMachine((function(o,s){return{type:1,startIdx:o,state:s,acceptStateReached:!1}})(r,i))}Ki(n)&&t.addMachine(Qs(r,0)),Sr(n)&&t.addMachine(Jl(r,5))}}function zO(t,e,n){n===58?e.state=2:n===45?e.state=1:i_(n)||t.removeMachine(e)}function YO(t,e,n){var r=t.charIdx;n===45||(n===47?(t.removeMachine(e),t.addMachine(Jl(r,11))):i_(n)?e.state=0:t.removeMachine(e))}function GO(t,e,n){var r=t.charIdx;n===47?e.state=3:n===46?t.removeMachine(e):Bn(n)?(e.state=5,Ki(n)&&t.addMachine(Qs(r,0))):t.removeMachine(e)}function WO(t,e,n){n===47?e.state=4:o_(n)?(e.state=10,e.acceptStateReached=!0):Oe(t,e)}function XO(t,e,n,r){r===47?(e.state=10,e.acceptStateReached=!0):Bn(r)?(e.state=5,e.acceptStateReached=!0):t.removeMachine(e)}function KO(t,e,n){n===47?e.state=12:t.removeMachine(e)}function qO(t,e,n){Bn(n)?e.state=5:t.removeMachine(e)}function JO(t,e,n){n===46?e.state=7:n===45?e.state=6:n===58?e.state=8:eu(n)?e.state=10:Qc(n)||Oe(t,e)}function ZO(t,e,n,r){r===45||(r===46?Oe(t,e):Bn(r)?e.state=5:Oe(t,e))}function QO(t,e,n,r){r===46?Oe(t,e):Bn(r)?(e.state=5,e.acceptStateReached=!0):Oe(t,e)}function e0(t,e,n){n===46?e.state=14:n===58?e.state=8:Ke(n)||(eu(n)?e.state=10:Sr(n)?t.removeMachine(e):Oe(t,e))}function t0(t,e,n){Ke(n)?(e.octetsEncountered++,e.octetsEncountered===4&&(e.acceptStateReached=!0),e.state=13):Oe(t,e)}function n0(t,e,n){Ke(n)?e.state=9:Oe(t,e)}function r0(t,e,n){Ke(n)||(eu(n)?e.state=10:Oe(t,e))}function i0(t,e,n){o_(n)||Oe(t,e)}function o0(t,e,n,r){n.toLowerCase()==="a"?e.state=16:Or(t,e,r)}function s0(t,e,n,r){n.toLowerCase()==="i"?e.state=17:Or(t,e,r)}function a0(t,e,n,r){n.toLowerCase()==="l"?e.state=18:Or(t,e,r)}function l0(t,e,n,r){n.toLowerCase()==="t"?e.state=19:Or(t,e,r)}function c0(t,e,n,r){n.toLowerCase()==="o"?e.state=20:Or(t,e,r)}function u0(t,e,n){n===58?e.state=21:Or(t,e,n)}function d0(t,e,n){tu(n)?e.state=22:t.removeMachine(e)}function Or(t,e,n){n===46?e.state=23:n===64?e.state=24:tu(n)?e.state=22:t.removeMachine(e)}function h0(t,e,n){n===46||n===64?t.removeMachine(e):tu(n)?e.state=22:t.removeMachine(e)}function p0(t,e,n){Bn(n)?e.state=25:t.removeMachine(e)}function f0(t,e,n){n===46?e.state=27:n===45?e.state=26:Qc(n)||Oe(t,e)}function m0(t,e,n){n===45||n===46?Oe(t,e):Qc(n)?e.state=25:Oe(t,e)}function E0(t,e,n){n===46||n===45?Oe(t,e):Bn(n)?(e.state=25,e.acceptStateReached=!0):Oe(t,e)}function _0(t,e,n){c_(n)?(e.state=29,e.acceptStateReached=!0):t.removeMachine(e)}function A0(t,e,n){c_(n)||Oe(t,e)}function g0(t,e,n){u_(n)?(e.state=31,e.acceptStateReached=!0):t.removeMachine(e)}function S0(t,e,n){u_(n)||(Sr(n)?t.removeMachine(e):Oe(t,e))}function O0(t,e,n,r){Ke(r)?e.state=38:(t.removeMachine(e),Zs(t,n,r))}function v0(t,e,n,r){Ke(r)?e.state=33:t.removeMachine(e),Zs(t,n,r)}function D0(t,e,n){Ke(n)?e.state=34:t.removeMachine(e)}function T0(t,e,n){Ke(n)?e.state=35:t.removeMachine(e)}function R0(t,e,n){n===41?e.state=36:t.removeMachine(e)}function y0(t,e,n,r){Ke(r)?e.state=38:d_(r)?e.state=39:t.removeMachine(e)}function I0(t,e,n,r){var i=t.charIdx;e.acceptStateReached=!0,nu(r)?e.state=40:r===35?e.state=41:Ke(r)||(r===40?e.state=32:d_(r)?e.state=39:(Oe(t,e),Ki(r)&&t.addMachine(Qs(i,0))))}function C0(t,e,n,r){Ke(r)?e.state=38:r===40?e.state=32:(Oe(t,e),Zs(t,n,r))}function N0(t,e,n){nu(n)||(n===35?e.state=41:Ke(n)?e.state=38:Oe(t,e))}function b0(t,e,n){nu(n)?e.state=40:Ke(n)?t.removeMachine(e):Oe(t,e)}function Oe(t,e){var n=t.matches,r=t.text,i=t.charIdx,o=t.tagBuilder,s=t.stripPrefix,a=t.stripTrailingSlash,l=t.decodePercentEncoding,u=t.hashtagServiceName,c=t.mentionServiceName;if(t.removeMachine(e),e.acceptStateReached){var d,h,f=e.startIdx,p=r.slice(e.startIdx,i);switch(p=(function(_){for(var A={"(":0,"{":0,"[":0},O=0;O<_.length;O++){var S=_.charAt(O);TO(T=_.charCodeAt(O))?A[S]++:Zh(T)&&A[ep[S]]--}for(var v=_.length-1;v>=0;){var T;if(S=_.charAt(v),Zh(T=_.charCodeAt(v))){var R=ep[S];if(!(A[R]<0))break;A[R]++,v--}else{if(!n_(T))break;v--}}return _.slice(0,v+1)})(p),e.type){case 0:if(r.charCodeAt(e.startIdx-1)===64)return;switch(e.matchType){case 0:var m=r_.exec(p);if(m&&(f+=m.index,p=p.slice(m.index)),!(function(_){if(IO.test(_))return!1;var A=_.match(CO);if(!A)return!1;var O=!!A[1],S=A[2];return!!O||!(S.indexOf(".")===-1||!/[A-Za-z]/.test(S))})(p))return;break;case 1:if(!(function(_){var A=_.match(NO);if(!A)return!1;var O=A[0].split(".");return!(O.length<2||!Qh(O[O.length-1]))})(p))return;break;case 2:if(h=p.split(wO,1)[0],!bO.test(h))return;break;default:cr(e)}n.push(new s_({tagBuilder:o,matchedText:p,offset:f,urlMatchType:w0(e.matchType),url:p,protocolRelativeMatch:p.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:l}));break;case 1:Qh(p.split(".").pop())&&n.push(new l_({tagBuilder:o,matchedText:p,offset:f,email:p.replace(MO,"")}));break;case 2:p.length<=140&&n.push(new xO({tagBuilder:o,matchedText:p,offset:f,serviceName:u,hashtag:p.slice(1)}));break;case 3:(function(_,A){return FO[A].test(_)})(p,c)&&n.push(new UO({tagBuilder:o,matchedText:p,offset:f,serviceName:c,mention:p.slice(1)}));break;case 4:if(p=p.replace(/ +$/g,""),((d=p).charAt(0)==="+"||BO.test(d))&&jO.test(d)){var E=p.replace(/[^0-9,;#]/g,"");n.push(new $O({tagBuilder:o,matchedText:p,offset:f,number:E,plusSign:p.charAt(0)==="+"}))}break;default:cr(e)}}}function w0(t){switch(t){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:cr(t)}}var ep={")":"(","}":"{","]":"["};function Qs(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:0}}function Jl(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:1}}function Ka(t,e){return{type:4,startIdx:t,state:e,acceptStateReached:!1}}function tp(t){return t.type===0&&t.matchType===0}var Wt=function(t){t===void 0&&(t={}),this.idx=t.idx!==void 0?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing},ru=new Wt,k0=function(t,e){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=ru,this.html=t,this.callbacks=e};function L0(t,e){e==="<"&&Qt(t)}function M0(t,e,n){e==="!"?t.state=13:e==="/"?(t.state=2,t.currentTag=new Wt(Me(Me({},t.currentTag),{isClosing:!0}))):e==="<"?Qt(t):li(n)?(t.state=3,t.currentTag=new Wt(Me(Me({},t.currentTag),{isOpening:!0}))):(t.state=0,t.currentTag=ru)}function P0(t,e,n){gr(n)?(t.currentTag=new Wt(Me(Me({},t.currentTag),{name:qa(t)})),t.state=4):e==="<"?Qt(t):e==="/"?(t.currentTag=new Wt(Me(Me({},t.currentTag),{name:qa(t)})),t.state=12):e===">"?(t.currentTag=new Wt(Me(Me({},t.currentTag),{name:qa(t)})),en(t)):li(n)||Ke(n)||e===":"||kt(t)}function x0(t,e,n){e===">"?kt(t):li(n)?t.state=3:kt(t)}function F0(t,e,n){gr(n)||(e==="/"?t.state=12:e===">"?en(t):e==="<"?Qt(t):e==="="||Zc(n)||(function(r){return r>=0&&r<=31||r==127})(n)?kt(t):t.state=5)}function H0(t,e,n){gr(n)?t.state=6:e==="/"?t.state=12:e==="="?t.state=7:e===">"?en(t):e==="<"?Qt(t):Zc(n)&&kt(t)}function U0(t,e,n){gr(n)||(e==="/"?t.state=12:e==="="?t.state=7:e===">"?en(t):e==="<"?Qt(t):Zc(n)?kt(t):t.state=5)}function B0(t,e,n){gr(n)||(e==='"'?t.state=8:e==="'"?t.state=9:/[>=`]/.test(e)?kt(t):e==="<"?Qt(t):t.state=10)}function j0(t,e){e==='"'&&(t.state=11)}function $0(t,e){e==="'"&&(t.state=11)}function V0(t,e,n){gr(n)?t.state=4:e===">"?en(t):e==="<"&&Qt(t)}function z0(t,e,n){gr(n)?t.state=4:e==="/"?t.state=12:e===">"?en(t):e==="<"?Qt(t):(t.state=4,(function(r){r.charIdx--})(t))}function Y0(t,e){e===">"?(t.currentTag=new Wt(Me(Me({},t.currentTag),{isClosing:!0})),en(t)):kt(t)}function G0(t){var e=t.html,n=t.charIdx;e.slice(n,n+2)==="--"?(t.charIdx++,t.currentTag=new Wt(Me(Me({},t.currentTag),{type:"comment"})),t.state=14):e.slice(n,n+7).toUpperCase()==="DOCTYPE"?(t.charIdx+=6,t.currentTag=new Wt(Me(Me({},t.currentTag),{type:"doctype"})),t.state=20):kt(t)}function W0(t,e){e==="-"?t.state=15:e===">"?kt(t):t.state=16}function X0(t,e){e==="-"?t.state=18:e===">"?kt(t):t.state=16}function K0(t,e){e==="-"&&(t.state=17)}function q0(t,e){t.state=e==="-"?18:16}function J0(t,e){e===">"?en(t):e==="!"?t.state=19:e==="-"||(t.state=16)}function Z0(t,e){e==="-"?t.state=17:e===">"?en(t):t.state=16}function Q0(t,e){e===">"?en(t):e==="<"&&Qt(t)}function kt(t){t.state=0,t.currentTag=ru}function Qt(t){t.state=1,t.currentTag=new Wt({idx:t.charIdx})}function en(t){var e=t.html.slice(t.currentDataIdx,t.currentTag.idx);e&&t.callbacks.onText(e,t.currentDataIdx);var n=t.currentTag;n.type==="comment"?t.callbacks.onComment(n.idx):n.type==="doctype"?t.callbacks.onDoctype(n.idx):(n.isOpening&&t.callbacks.onOpenTag(n.name,n.idx),n.isClosing&&t.callbacks.onCloseTag(n.name,n.idx)),kt(t),t.currentDataIdx=t.charIdx+1}function qa(t){var e=t.currentTag.idx+(t.currentTag.isClosing?2:1);return t.html.slice(e,t.charIdx).toLowerCase()}var ev=(function(){function t(e){e===void 0&&(e={}),this.version=t.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.tagBuilder=null,this.urls=(function(o){return o==null&&(o=!0),yt(o)?{schemeMatches:o,tldMatches:o,ipV4Matches:o}:{schemeMatches:!yt(o.schemeMatches)||o.schemeMatches,tldMatches:!yt(o.tldMatches)||o.tldMatches,ipV4Matches:!yt(o.ipV4Matches)||o.ipV4Matches}})(e.urls),this.email=yt(e.email)?e.email:this.email,this.phone=yt(e.phone)?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow=yt(e.newWindow)?e.newWindow:this.newWindow,this.stripPrefix=(function(o){return o==null&&(o=!0),yt(o)?{scheme:o,www:o}:{scheme:!yt(o.scheme)||o.scheme,www:!yt(o.www)||o.www}})(e.stripPrefix),this.stripTrailingSlash=yt(e.stripTrailingSlash)?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=yt(e.decodePercentEncoding)?e.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=e.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&HO.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var r,i=this.hashtag;if(i!==!1&&PO.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=typeof(r=e.truncate)=="number"?{length:r,location:"end"}:Me({length:Number.POSITIVE_INFINITY,location:"end"},r),this.className=e.className||this.className,this.replaceFn=e.replaceFn||this.replaceFn,this.context=e.context||this}return t.link=function(e,n){return new t(n).link(e)},t.parse=function(e,n){return new t(n).parse(e)},t.prototype.parse=function(e){var n=this,r=["a","style","script"],i=0,o=[];return(function(s,a){for(var l=new k0(s,a),u=s.length;l.charIdx<u;){var c=s.charAt(l.charIdx),d=s.charCodeAt(l.charIdx);switch(l.state){case 0:L0(l,c);break;case 1:M0(l,c,d);break;case 2:x0(l,c,d);break;case 3:P0(l,c,d);break;case 4:F0(l,c,d);break;case 5:H0(l,c,d);break;case 6:U0(l,c,d);break;case 7:B0(l,c,d);break;case 8:j0(l,c);break;case 9:$0(l,c);break;case 10:V0(l,c,d);break;case 11:z0(l,c,d);break;case 12:Y0(l,c);break;case 13:G0(l);break;case 14:W0(l,c);break;case 15:X0(l,c);break;case 16:K0(l,c);break;case 17:q0(l,c);break;case 18:J0(l,c);break;case 19:Z0(l,c);break;case 20:Q0(l,c);break;default:cr(l.state)}l.charIdx++}l.currentDataIdx<l.charIdx&&(function(h){var f=h.html.slice(h.currentDataIdx,h.charIdx);h.callbacks.onText(f,h.currentDataIdx),h.currentDataIdx=h.charIdx+1})(l)})(e,{onOpenTag:function(s){r.indexOf(s)>=0&&i++},onText:function(s,a){if(i===0){var l=s.split(/( | |<|<|>|>|"|"|')/gi),u=a;l.forEach(function(c,d){if(d%2==0){var h=n.parseText(c,u);o.push.apply(o,(function(f,p,m){if(m||arguments.length===2)for(var E,_=0,A=p.length;_<A;_++)!E&&_ in p||(E||(E=Array.prototype.slice.call(p,0,_)),E[_]=p[_]);return f.concat(E||Array.prototype.slice.call(p))})([],(function(f,p){var m=typeof Symbol=="function"&&f[Symbol.iterator];if(!m)return f;var E,_,A=m.call(f),O=[];try{for(;(p===void 0||p-- >0)&&!(E=A.next()).done;)O.push(E.value)}catch(S){_={error:S}}finally{try{E&&!E.done&&(m=A.return)&&m.call(A)}finally{if(_)throw _.error}}return O})(h),!1))}u+=c.length})}},onCloseTag:function(s){r.indexOf(s)>=0&&(i=Math.max(i-1,0))},onComment:function(){},onDoctype:function(){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},t.prototype.compactMatches=function(e){e.sort(tv);for(var n=0;n<e.length-1;){var r=e[n],i=r.getOffset(),o=r.getMatchedText().length;if(n+1<e.length&&e[n+1].getOffset()===i){var s=e[n+1].getMatchedText().length>o?n:n+1;e.splice(s,1)}else n++}return e},t.prototype.removeUnwantedMatches=function(e){return this.hashtag||Vn(e,function(n){return n.getType()==="hashtag"}),this.email||Vn(e,function(n){return n.getType()==="email"}),this.phone||Vn(e,function(n){return n.getType()==="phone"}),this.mention||Vn(e,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||Vn(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||Vn(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||Vn(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="ipV4"}),e},t.prototype.parseText=function(e,n){n=n||0;for(var r=(function(s,a){for(var l=new VO(s,a);l.charIdx<l.text.length;l.charIdx++){var u=s.charAt(l.charIdx),c=s.charCodeAt(l.charIdx);if(l.stateMachines.length===0)Zs(l,u,c);else{for(var d=l.stateMachines.length-1;d>=0;d--){var h=l.stateMachines[d];switch(h.state){case 11:KO(l,h,c);break;case 12:qO(l,h,c);break;case 0:zO(l,h,c);break;case 1:YO(l,h,c);break;case 2:GO(l,h,c);break;case 3:WO(l,h,c);break;case 4:XO(l,h,0,c);break;case 5:JO(l,h,c);break;case 6:ZO(l,h,0,c);break;case 7:QO(l,h,0,c);break;case 13:e0(l,h,c);break;case 14:t0(l,h,c);break;case 8:n0(l,h,c);break;case 9:r0(l,h,c);break;case 10:i0(l,h,c);break;case 15:o0(l,h,u,c);break;case 16:s0(l,h,u,c);break;case 17:a0(l,h,u,c);break;case 18:l0(l,h,u,c);break;case 19:c0(l,h,u,c);break;case 20:u0(l,h,c);break;case 21:d0(l,h,c);break;case 22:Or(l,h,c);break;case 23:h0(l,h,c);break;case 24:p0(l,h,c);break;case 25:f0(l,h,c);break;case 26:m0(l,h,c);break;case 27:E0(l,h,c);break;case 28:_0(l,h,c);break;case 29:A0(l,h,c);break;case 30:g0(l,h,c);break;case 31:S0(l,h,c);break;case 32:v0(l,h,u,c);break;case 33:D0(l,h,c);break;case 34:T0(l,h,c);break;case 35:R0(l,h,c);break;case 36:y0(l,h,0,c);break;case 37:O0(l,h,u,c);break;case 38:I0(l,h,0,c);break;case 39:C0(l,h,u,c);break;case 40:N0(l,h,c);break;case 41:b0(l,h,c);break;default:cr(h.state)}}if(!l.hasSchemeUrlMachine()&&l.charIdx>0&&Ki(c)){var f=l.text.charCodeAt(l.charIdx-1);Ki(f)||l.addMachine(Qs(l.charIdx,0))}}}for(var p=l.stateMachines.length-1;p>=0;p--)l.stateMachines.forEach(function(m){return Oe(l,m)});return l.matches})(e,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),i=0,o=r.length;i<o;i++)r[i].setOffset(n+r[i].getOffset());return r},t.prototype.link=function(e){if(!e)return"";this.sanitizeHtml&&(e=e.replace(/</g,"<").replace(/>/g,">"));for(var n=this.parse(e),r=new Array(2*n.length+1),i=0,o=0,s=n.length;o<s;o++){var a=n[o];r.push(e.substring(i,a.getOffset())),r.push(this.createMatchReturnVal(a)),i=a.getOffset()+a.getMatchedText().length}return r.push(e.substring(i)),r.join("")},t.prototype.createMatchReturnVal=function(e){var n;return this.replaceFn&&(n=this.replaceFn.call(this.context,e)),typeof n=="string"?n:n===!1?e.getMatchedText():n instanceof t_?n.toAnchorString():e.buildTag().toAnchorString()},t.prototype.getTagBuilder=function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new DO({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e},t.version="4.1.5",t})();function tv(t,e){return t.getOffset()-e.getOffset()}function h_(t,e=t){return{type:"autolink",url:t,text:e}}const nv=()=>An(/```([^]+?)```/g,([t,e])=>({type:"codespan",text:QE(e)})),rv=An(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([t,e,n])=>(function(r,i){return{type:"mention",id:r,text:i}})(decodeURIComponent(e),n)),iv=An(/<!!customemoji:(.*?)>/gm,([t,e])=>(function(n){return{type:"customemoji",text:n}})(e)),p_=An(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([t,e,n])=>(function(r,i=[]){return{type:"link",url:r,children:i}})(e,[n])),ov=An(/<actionlink:([^|]+)[|]([^>]*)>/gi,([t,e,n])=>{const{action:r,params:i}=f_(e);return(function(o,s,a=[]){return{type:"actionlink",action:o,params:s,children:a}})(r,i,[n])}),sv=An(/<actionbutton:([^|]+)[|]([^>]*)>/gi,([t,e,n])=>{const{action:r,params:i}=f_(e);return(function(o,s,a=[]){return{type:"actionbutton",action:o,params:s,children:a}})(r,i,[n])});function f_(t){const e=t.indexOf("?");return e===-1?{action:t,params:{}}:{action:t.slice(0,e),params:Object.fromEntries(new URLSearchParams(t.slice(e)))}}const av=An(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([t])=>(function(e=[]){return{type:"bulletlist",children:e}})([t.startsWith(`
|
|
17
|
+
`)?t.slice(1):t])),lv=An(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm,([t,e])=>({type:"bulletpoint",children:[e]})),m_=t=>{const e=/(?:^|[^-:/\w])([(+]?[0-9](?:[-_+ ().]?[0-9]){5,11}[0-9])(?:[^-:/\w]|$)/g,n=/^(\d{4})-(\d{4})$/,r=/^(\d{1,2})\.(\d{2})-(\d{1,2})\.(\d{2})$/;let i=0;const o=[];for(const s of Js(t,e)){const a=s[0],l=s[1],u=l.match(n);if(u&&Number(u[1])<Number(u[2]))continue;const c=l.match(r);if(c){const f=Number(c[1]),p=Number(c[2]),m=Number(c[3]),E=Number(c[4]);if(f<=23&&m<=23&&p<=59&&E<=59)continue}const d=a.startsWith(l)?s.index:s.index+1;d-i>0&&o.push(t.substring(i,d));const h=h_("tel:"+l.replace(/[^0-9+]/g,""),l);o.push(h),i=d+l.length}return i<t.length&&o.push(t.substring(i)),o},E_=t=>p_(t).flatMap(e=>typeof e=="string"?Ja(e):["<",...Ja(e.url),...Ja("|"+e.children[0]+">")]),Ja=t=>{const e=ev.parse(t,{urls:!0,email:!0,phone:!1,hashtag:!1,mention:!1}),n=[];let r=0;for(const i of e){const o=i.getOffset(),s=i.getMatchedText(),a=s.length;let l=s;i instanceof l_?l="mailto:"+i.getEmail():i instanceof s_&&(l=i.getUrl()),o>r&&n.push(t.substring(r,o)),n.push(h_(l,s)),r=o+a}return r<t.length&&n.push(t.substring(r)),n},cv=["Codeblock","Codespan","FormattedLink","Wikitext","Autolink","Actions","Mention","Mention","BulletPoint","CustomEmoji"],uv=(function(t){const e=RegExp(`[^${t}]+${t}?|${t}`,"g");return n=>Array.from(n.match(e)||[])})(`
|
|
18
|
+
`);function __(t,e={except:[]}){const n=(function(i={except:[]}){var a;const o={multilineSteps:[],singlelineSteps:[]},s=(a=i.except)!=null?a:cv.filter(l=>!i.only.includes(l));return s.includes("BulletPoint")||o.multilineSteps.push(av,lv),s.includes("Mention")||o.singlelineSteps.push(rv),s.includes("CustomEmoji")||o.singlelineSteps.push(iv),s.includes("Codespan")||o.multilineSteps.push(nv()),s.includes("FormattedLink")||o.singlelineSteps.push(p_),s.includes("Actions")||(o.singlelineSteps.push(ov),o.singlelineSteps.push(sv)),s.includes("Wikitext")||o.singlelineSteps.push(SO),s.includes("Autolink")||o.singlelineSteps.push(E_,m_),o})(e);let r=g_(t,n);return r=S_(r,!1),r}function A_(t){return __(t,{except:["FormattedLink","Actions"]})}function g_(t,e){let n=[t];return n=Za(n,e.multilineSteps),n=Za(n,[uv]),n=Za(n,e.singlelineSteps),n=iu(n),n}function Za(t,e){return e.reduce((n,r)=>ki(n,r),t)}function iu(t){const e=[];let n=-1;for(const r of t)typeof r=="string"?typeof e[n]=="string"?e[n]+=r:e[++n]=r:e[++n]="children"in r?{...r,children:iu(r.children)}:r;return e}function S_(t,e){const n=[];let r=[];for(let i=0;i<t.length;i++){const o=t[i];if(typeof o=="string")r.push(o);else if("children"in o){r.length>0&&(n.push(r.join("")),r=[]);const s=S_(o.children,e||o.type==="link"||o.type==="actionbutton"||o.type==="actionlink");n.push({...o,children:s})}else o.type==="autolink"&&e?r.push(o.text):(r.length>0&&(n.push(r.join("")),r=[]),n.push(o))}return r.length>0&&(n.push(r.join("")),r=[]),n}function dv(){let t,e=0;return n=>{const r=(o=Date.now())=>{if(window.clearTimeout(t),t=void 0,e=o,n.isDestroyed)return;const s=(function(a){a=a.removeMark(0,a.doc.content.size,Pe.marks.bold),a=a.removeMark(0,a.doc.content.size,Pe.marks.italic),a=a.removeMark(0,a.doc.content.size,Pe.marks.strikethrough),a.doc.firstChild;const l=(function(u){const c=[];let d,h="";return u.descendants((f,p)=>(f.isText?(h+=f.text,d!=null||(d=p)):h&&d!==void 0&&(c.push({text:h,pos:d}),h="",d=void 0),f.type!==Pe.nodes.mention)),h&&d!==void 0&&c.push({text:h,pos:d}),c})(a.doc);for(const{text:u,pos:c}of l){const d=__(u,{only:["Wikitext"]});[a]=O_(a,c,d)}return a})(n.state.tr);n.dispatch(s)},i=Date.now();i-e<300?t||(t=window.setTimeout(r,300)):r(i)}}function O_(t,e,n,r=0,i=[]){for(const o of n)if(typeof o=="string"){for(const s of i)t.addMark(e+r,e+r+o.length,s.create());r+=o.length}else if(o.type==="bold"||o.type==="italic"||o.type==="strikethrough"){r+=1;const s=Pe.marks[o.type],a=[...i,s];[t,r]=O_(t,e,o.children,r,a),r+=1}else ie.unreachable();return[t,r]}function np(t){return(e,n)=>{if(!n)return!0;let r=e.tr;const i=ce.between(e.selection.$from,e.selection.$to);return r=r.replaceRangeWith(i.from,i.from,Pe.text(t,r.storedMarks)),r=r.replaceRangeWith(i.to+1,i.to+1,Pe.text(t,r.storedMarks)),r=r.setSelection(ce.near(r.doc.resolve(i.to+1))),n(r),!0}}function hv(t,e,n){const r=e.clipboardData;if(!r)return!1;const i=(function(o){const s=o.items||[],a={"image/gif":"gif","image/png":"png","image/jpeg":"jpg","image/svg+xml":"svg"},l=Array.from(s).filter(d=>d.kind==="file"&&a[d.type]);if(l.length===0||o.types.includes("text/rtf"))return;const u=l[0];let c=u.getAsFile();if(!c.name){const d="image."+a[u.type];c=new File([c],d,{type:u.type,lastModified:Date.now()})}return c})(r);return i?n(i):(function(o,s){const a=o.state.tr.insertText(s).scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste");o.dispatch(a)})(t,r.getData("text/plain")),!0}function rp(t){const{matcher:e,suggestionClass:n="ProseMirror-suggestion",onEnter:r=()=>!1,onChange:i=()=>!1,onExit:o=()=>!1,onKeyDown:s=()=>!1,debug:a=!1}=t;return new Ws({key:new Xs("suggestions"),view(){return{update:(l,u)=>{const c=this.key.getState(u),d=this.key.getState(l.state);if(!c||!d)return;const h=c.active&&d.active&&c.range.from!==d.range.from,f=!c.active&&d.active,p=c.active&&!d.active,m=!f&&!p&&c.text!==d.text;(p||h)&&o({view:l,range:c.range,text:c.text}),m&&!h&&i({view:l,range:d.range,text:d.text}),(f||h)&&r({view:l,range:d.range,text:d.text})}}},state:{init:()=>({active:!1,range:{from:0,to:0},text:null}),apply(l,u){const{selection:c}=l,d={...u};if(c.from===c.to){(c.from<u.range.from||c.from>u.range.to)&&(d.active=!1);const h=c.$from,f=e(h);f?(d.active=!0,d.range=f.range,d.text=f.text):d.active=!1}else d.active=!1;return d.active||(d.range={from:0,to:0},d.text=null),d}},props:{handleKeyDown(l,u){var d;const c=this.getState(l.state);return!!(c!=null&&c.active)&&((d=s({view:l,event:u}))!=null?d:!1)},decorations(l){const u=this.getState(l);return u!=null&&u.active?Ne.create(l.doc,[Dt.inline(u.range.from,u.range.to,{nodeName:"span",class:n,style:a?"background: rgba(0, 0, 255, 0.05); color: blue; border: 2px solid blue;":void 0})]):null}}})}const ip=(t,e)=>n=>{var l;const r=(l=n.nodeBefore)==null?void 0:l.text;if(!r)return;const i=r.match(t);if(!i)return;const o=i[2],s=n.pos-o.length,a=n.pos;if(!n.doc.rangeHasMark(s,a,e.marks.literal))return{range:{from:s,to:a},text:o}},pv=/(^|\s)(:[^:\s]+:?)$/,fv=/(^|\s)(@[^@]*)$/;function v_({placeholder:t,disabled:e,className:n="",characterLimit:r,spellcheck:i}){const o=lo(),s=X(),a=X(null);return G(()=>(s.current=(function(l,u,c,d,h){const f=Fr.create({schema:Pe,plugins:[...h.filter(mv),cO(),Bh({...ko,"Mod-z":GE,"Mod-y":Gl,"Mod-Shift-z":Gl,"Mod-b":np("*"),"Mod-i":np("_"),"Mod-Enter":ko.Enter,"Shift-Enter":ko.Enter,Enter:c}),Bh({Enter:ko.Enter}),Uh]}),p=dv(),m=new $E(l,{handlePaste:(E,_,A)=>hv(E,_,d),clipboardTextSerializer(E){const _=[];return E.content.forEach(A=>{A&&_.push(QE(A.textContent))}),_.join()},state:f,dispatchTransaction(E){E=(E=E.removeStoredMark(Pe.marks.literal)).removeStoredMark(Pe.marks.emoji);const _=m.state.apply(E);m.state.doc.eq(_.doc)||u(new Ss(_.doc)),m.updateState(_),E.steps.some(A=>A instanceof Ye)&&p(m)}});return m})(a.current,l=>o.onChange(l),()=>!!o.onEnter&&(o.onEnter(),!0),l=>o.onPasteImage(l),[o.emojiSuggesterPlugin(),o.mentionsPlugin()]),o.setEditorView(s.current),()=>{var l;o.setEditorView(void 0),(l=s.current)==null||l.destroy()}),[o]),G(()=>{var l;(l=s.current)==null||l.setProps({editable:()=>!e})},[e]),G(()=>mt(()=>{var l,u,c;return(c=s.current)==null?void 0:c.setProps({attributes:{spellcheck:String((u=(l=o.spellcheck$.get())!=null?l:i)!=null?u:!1),class:"t-text-input","aria-label":"Message Field",role:"textbox"}})}),[o,i]),G(()=>mt(()=>{var u;const l=s.current;l==null||l.dispatch(l.state.tr.setMeta(Uh,(u=o.placeholder$.get())!=null?u:t))}),[o,t]),G(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),y("div",{className:`t-editor ${n}`,ref:a})}function op(t){if(t.startsWith(":"))throw new Error("Not implemented");{const e=Pe.marks.emoji.create({emoji:t});return Pe.text(t,[e])}}function sp(t,e){const n=encodeURIComponent(t);return Pe.nodes.mention.create({id:t,name:e},Pe.text(`<!!mention:${n}|${e}>`))}const ks=class ks{constructor(e){this.doc=e,this.size=this.doc.content.size,this.hasContent=VE(this.doc)}hasNonWhitespaceContent(){return this.hasContent&&(function(e){let n=!1;return e.descendants(r=>!(r.isText&&r.text&&/\S/.test(r.text))||(n=!0,!1)),n})(this.doc)}asText(){return this.doc.textContent.replace(/\xa0/g," ")}};ks.EMPTY=new ks(Pe.topNodeType.create());let Ss=ks;function mv(t){return t!=null}function ap(t,e){let n=0;return(...r)=>{n&&(clearTimeout(n),n=0),n=setTimeout(()=>{t(...r)},e)}}class D_{constructor(e,n,r){this.state$=e,this.device$=n,this.userPermissions$=r,this.currentDoc=Ss.EMPTY,this.maxLength=1e4,this.markAsTyping=(function(i,o){let s=!1;return(...a)=>{if(!s)return s=!0,setTimeout(()=>{s=!1},o),i(...a)}})(()=>{var i;(i=this.controller)==null||i.markAsTyping()},5e3),this._suggesterKeydownHandlers={emoji:void 0,mention:void 0},this.toggleEmojiPicker=i=>{const o=this.state$.showEmojiPicker;i!=null||(i=!o.peek()),o.set(i),i===!1&&this.focus()},this.spellcheck$=ae(),this.placeholder$=ae()}setEditorView(e){this.editorView=e}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return rp({debug:!1,matcher:ip(pv,Pe),onEnter:e=>this.suggestEmoji(e.text,e.range),onChange:e=>this.suggestEmoji(e.text,e.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:e})=>{var n,r,i;return(i=(r=(n=this._suggesterKeydownHandlers).emoji)==null?void 0:r.call(n,e.key))!=null?i:!1}})}mentionsPlugin(){const e=this.userPermissions$.peek();if(ie.defined(e),e.canMention)return rp({debug:!1,matcher:ip(fv,Pe),onEnter:n=>this.suggestMention(n.text,n.range),onChange:n=>this.suggestMention(n.text,n.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:n})=>{var r,i,o;return(o=(i=(r=this._suggesterKeydownHandlers).mention)==null?void 0:i.call(r,n.key))!=null?o:!1}})}closeSuggester(){ie.defined(this._suggestionRange),(function(e,n){const{from:r,to:i}=n,o=e.state.tr.addMark(r,i,Pe.marks.literal.create());e.dispatch(o)})(this.editorView,this._suggestionRange)}listenKeydown(e,n){this._suggesterKeydownHandlers[e]=n}onExitSuggester(){this._suggestionRange=void 0,this.state$.suggestEmojiQuery.set(void 0),this.state$.suggestMentionQuery.set(void 0)}suggestEmoji(e,n){e.length<2||(this._suggestionRange=n,this.state$.suggestEmojiQuery.set(e))}suggestMention(e,n){e.length<1||(this._suggestionRange=n,this.state$.suggestMentionQuery.set(e))}onPasteImage(e){ie.defined(this.uploadFile),this.uploadFile(e)}onChange(e){var r;this.currentDoc=e;const n=e.size>this.maxLength&&e.asText().length>this.maxLength;e.hasContent&&this.markAsTyping(),this.state$.assign({atTextLimit:n,isEmpty:!e.hasNonWhitespaceContent(),characterCount:e.size===0?0:e.size-2}),(r=this.controller)==null||r.storeDraft(()=>e.asText())}setMaxLength(e){this.maxLength=e}focus({skipProseMirrorStuff:e}={skipProseMirrorStuff:!1}){var n,r;e?(n=this.editorView)==null||n.dom.focus():(r=this.editorView)==null||r.focus()}setText(e){this.editorView&&(function(n,r){const i=n.state.doc.content.size,o=r.split(/(<!!(?:mention|customemoji):.*?>)/g).filter(a=>a||a.length).map(a=>{const[l,u,c]=a.match(/<!!mention:(.*)\|(.*)>/)||[null];if(l&&u&&c)return sp(u,c);const[d,h]=a.match(/<!!customemoji:(.*?)>/)||[null];return d&&h?op(h):Pe.text(a)}),s=n.state.tr.replaceWith(0,i,o);n.dispatch(s)})(this.editorView,e)}typeText(e){this.editorView&&(function(n,r,i="replace"){const o=n.state.doc.content.size,s=i=="insert"?n.state.tr.insertText(r):n.state.tr.insertText(r,0,o);n.dispatch(s)})(this.editorView,e,"insert")}getText(){return this.currentDoc.asText().trim()}clearText(){this.editorView&&(function(e){const n=e.state.doc.content.size,r=e.state.tr.insertText("",0,n);e.dispatch(r)})(this.editorView)}selectEmoji(e){ie.defined(this.editorView),(function(n,r,i){const o=op(r);if(i){const{from:a,to:l}=i,u=n.state.tr.deleteRange(a,l);n.dispatch(u)}const s=n.state.tr.replaceSelectionWith(o,!1);n.dispatch(s)})(this.editorView,e,this._suggestionRange),this.focus()}selectMention(e){ie.defined(this.editorView),(function(n,r,i){const o=sp(r.id,r.name);let s=n.state.tr;if(i){const{from:a,to:l}=i;s=s.replaceRangeWith(a,l,o)}else s=s.replaceSelectionWith(o,!1);s=s.insertText(" "),n.dispatch(s)})(this.editorView,e,this._suggestionRange),this.focus()}}const Ev=Symbol("no_render");function Ze(t){const e=lt(!1),n=X({_value:typeof t=="function"?t():t.peek(),get value(){return setTimeout(()=>{e.set(!0)}),n.current._value},set value(r){n.current._value=r}});return J(()=>{if(!e.get())return Ev;const r=typeof t=="function"?t():t.get();return n.current.value=r,r}),n.current}function tn(){const t=si(),e=oe(),n=$m(),r=et(),i=Ze(e.app$.appMetadata),o=Ze(e.currentUser$),s=Ze(e.state$.currentConversation),a=Ze(e.state$.currentConversationId),l=Ze(e.t$),u=Ze(e.device$),c=Ze(e.themeCustom$),d=Ze(e.chatSearchState$),h=Ze(e.focusedMessage$),f=Ze(()=>{var E;const m=e.state$.currentConversationId.get();return(E=m&&e.state$.typing.child(m).get())!=null?E:{many:!1,users:[]}}),p=Ze(()=>{const m=e.state$.currentConversationId.get();return m&&e.state$.participants.child(m).get()});return te(()=>({session:t,store:e,chatbox:n,theme:r,get app(){return i.value},get currentUser(){return o.value},get conversation(){return s.value},get conversationId(){return a.value},get t(){return l.value},get device(){return u.value},get themeCustom(){return c.value.value},get typing(){return f.value},get participants(){return p.value},get focusedMessage(){return h.value},get chatSearchState(){return d.value}}),[i,n,s,a,o,u,e,l,r,c,f,p,t,d,h])}function ou(){const t=si(),e=oe(),n=et(),r=$m(),i=Ze(e.app$.appMetadata),o=Ze(e.currentUser$),s=Ze(e.t$),a=Ze(e.device$),l=Ze(e.themeCustom$);return te(()=>({session:t,store:e,theme:n,conversationList:r,get app(){return i.value},get currentUser(){return o.value},get t(){return s.value},get device(){return a.value},get themeCustom(){return l.value.value}}),[i,r,o,a,t,e,s,n,l])}const _v=(()=>{if(typeof window!="undefined"){let t;try{t=window.localStorage;const e="__storage_test__";return t.setItem(e,e),t.removeItem(e),!0}catch(e){return e instanceof DOMException&&(e.code===22||e.code===1014||e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")&&t&&t.length!==0}}return!1})(),ot={};_v?(ot.setItem=window.localStorage.setItem.bind(window.localStorage),ot.getItem=window.localStorage.getItem.bind(window.localStorage),ot.removeItem=window.localStorage.removeItem.bind(window.localStorage),ot.isSupported=!0):(ot.setItem=function(){},ot.getItem=function(){return null},ot.removeItem=function(){},ot.isSupported=!1),ot.set=(t,e)=>ot.setItem(t,JSON.stringify(e)),ot.get=t=>JSON.parse(ot.getItem(t)||"null");const Zl="talkjs_drafts",Av=(function(t,e){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}})(200,(t,e,n,r)=>{const i=T_(t,e,n),o=JSON.parse(ot.getItem(Zl)||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,ot.setItem(Zl,JSON.stringify(o))}),T_=(t,e,n)=>`draft_${t}_${e}_${n}`;function st(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(u){try{l(r.next(u))}catch(c){o(c)}}function a(u){try{l(r.throw(u))}catch(c){o(c)}}function l(u){var c;u.done?i(u.value):(c=u.value,c instanceof n?c:new n(function(d){d(c)})).then(s,a)}l((r=r.apply(t,e||[])).next())})}let fo=class{constructor(){this.listeners={}}on(t,e,n){if(this.listeners[t]||(this.listeners[t]=new Set),n==null?void 0:n.once){const r=(...i)=>{this.un(t,r),e(...i)};return this.listeners[t].add(r),()=>this.un(t,r)}return this.listeners[t].add(e),()=>this.un(t,e)}un(t,e){var n;(n=this.listeners[t])===null||n===void 0||n.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach(n=>n(...e))}};const Po={decode:function(t,e){return st(this,void 0,void 0,function*(){const n=new AudioContext({sampleRate:e});try{return yield n.decodeAudioData(t)}finally{n.close()}})},createBuffer:function(t,e){if(!t||t.length===0)throw new Error("channelData must be a non-empty array");if(e<=0)throw new Error("duration must be greater than 0");if(typeof t[0]=="number"&&(t=[t]),!t[0]||t[0].length===0)throw new Error("channelData must contain non-empty channel arrays");(function(r){const i=r[0];if(i.some(o=>o>1||o<-1)){const o=i.length;let s=0;for(let a=0;a<o;a++){const l=Math.abs(i[a]);l>s&&(s=l)}for(const a of r)for(let l=0;l<o;l++)a[l]/=s}})(t);const n=t.map(r=>r instanceof Float32Array?r:Float32Array.from(r));return{duration:e,length:n[0].length,sampleRate:n[0].length/e,numberOfChannels:n.length,getChannelData:r=>{const i=n[r];if(!i)throw new Error(`Channel ${r} not found`);return i},copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function R_(t,e){const n=e.xmlns?document.createElementNS(e.xmlns,t):document.createElement(t);for(const[r,i]of Object.entries(e))if(r==="children"&&i)for(const[o,s]of Object.entries(i))s instanceof Node?n.appendChild(s):typeof s=="string"?n.appendChild(document.createTextNode(s)):n.appendChild(R_(o,s));else r==="style"?Object.assign(n.style,i):r==="textContent"?n.textContent=i:n.setAttribute(r,i.toString());return n}function lp(t,e,n){const r=R_(t,e||{});return n==null||n.appendChild(r),r}var gv=Object.freeze({__proto__:null,createElement:lp,default:lp});const Sv={fetchBlob:function(t,e,n){return st(this,void 0,void 0,function*(){const r=yield fetch(t,n);if(r.status>=400)throw new Error(`Failed to fetch ${t}: ${r.status} (${r.statusText})`);return(function(i,o){st(this,void 0,void 0,function*(){if(!i.body||!i.headers)return;const s=i.body.getReader(),a=Number(i.headers.get("Content-Length"))||0;let l=0;const u=c=>{l+=(c==null?void 0:c.length)||0;const d=Math.round(l/a*100);o(d)};try{for(;;){const c=yield s.read();if(c.done)break;u(c.value)}}catch(c){console.warn("Progress tracking error:",c)}})})(r.clone(),e),r.blob()})}};function ye(t){let e=t;const n=new Set;return{get value(){return e},set(r){Object.is(e,r)||(e=r,n.forEach(i=>i(e)))},update(r){this.set(r(e))},subscribe:r=>(n.add(r),()=>n.delete(r))}}function Kn(t,e){const n=ye(t());return e.forEach(r=>r.subscribe(()=>{const i=t();Object.is(n.value,i)||n.set(i)})),{get value(){return n.value},subscribe:r=>n.subscribe(r)}}function Dn(t,e){let n;const r=()=>{n&&(n(),n=void 0),n=t()},i=e.map(o=>o.subscribe(r));return r(),()=>{n&&(n(),n=void 0),i.forEach(o=>o())}}class Ov extends fo{get isPlayingSignal(){return this._isPlaying}get currentTimeSignal(){return this._currentTime}get durationSignal(){return this._duration}get volumeSignal(){return this._volume}get mutedSignal(){return this._muted}get playbackRateSignal(){return this._playbackRate}get seekingSignal(){return this._seeking}constructor(e){super(),this.isExternalMedia=!1,this.reactiveMediaEventCleanups=[],e.media?(this.media=e.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),this._isPlaying=ye(!1),this._currentTime=ye(0),this._duration=ye(0),this._volume=ye(this.media.volume),this._muted=ye(this.media.muted),this._playbackRate=ye(this.media.playbackRate||1),this._seeking=ye(!1),this.setupReactiveMediaEvents(),e.mediaControls&&(this.media.controls=!0),e.autoplay&&(this.media.autoplay=!0),e.playbackRate!=null&&this.onMediaEvent("canplay",()=>{e.playbackRate!=null&&(this.media.playbackRate=e.playbackRate)},{once:!0})}setupReactiveMediaEvents(){this.reactiveMediaEventCleanups.push(this.onMediaEvent("play",()=>{this._isPlaying.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("pause",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ended",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("timeupdate",()=>{this._currentTime.set(this.media.currentTime)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("durationchange",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("loadedmetadata",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeking",()=>{this._seeking.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeked",()=>{this._seeking.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("volumechange",()=>{this._volume.set(this.media.volume),this._muted.set(this.media.muted)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ratechange",()=>{this._playbackRate.set(this.media.playbackRate)}))}onMediaEvent(e,n,r){return this.media.addEventListener(e,n,r),()=>this.media.removeEventListener(e,n,r)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const e=this.getSrc();e.startsWith("blob:")&&URL.revokeObjectURL(e)}canPlayType(e){return this.media.canPlayType(e)!==""}setSrc(e,n){const r=this.getSrc();if(e&&r===e)return;this.revokeSrc();const i=n instanceof Blob&&(this.canPlayType(n.type)||!e)?URL.createObjectURL(n):e;if(r&&this.media.removeAttribute("src"),i||e)try{this.media.src=i}catch(o){this.media.src=e}}destroy(){this.reactiveMediaEventCleanups.forEach(e=>e()),this.reactiveMediaEventCleanups=[],this.isExternalMedia||(this.media.pause(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load(),this.media.remove())}setMediaElement(e){this.reactiveMediaEventCleanups.forEach(n=>n()),this.reactiveMediaEventCleanups=[],this.media=e,this.setupReactiveMediaEvents()}play(){return st(this,void 0,void 0,function*(){try{return yield this.media.play()}catch(e){if(e instanceof DOMException&&e.name==="AbortError")return;throw e}})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(e){this.media.currentTime=Math.max(0,Math.min(e,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(e){this.media.volume=e}getMuted(){return this.media.muted}setMuted(e){this.media.muted=e}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(e,n){n!=null&&(this.media.preservesPitch=n),this.media.playbackRate=e}getMediaElement(){return this.media}setSinkId(e){return this.media.setSinkId(e)}}function vv({maxTop:t,maxBottom:e,halfHeight:n,vScale:r,barMinHeight:i=0,barAlign:o}){let s=Math.round(t*n*r),a=s+Math.round(e*n*r)||1;return a<i&&(a=i,o||(s=a/2)),{topHeight:s,totalHeight:a}}function Dv({barAlign:t,halfHeight:e,topHeight:n,totalHeight:r,canvasHeight:i}){return t==="top"?0:t==="bottom"?i-r:e-n}function cp(t,e,n){const r=e-t.left,i=n-t.top;return[r/t.width,i/t.height]}function y_(t){return!!(t.barWidth||t.barGap||t.barAlign)}function up(t,e){if(!y_(e))return t;const n=e.barWidth||.5,r=n+(e.barGap||n/2);return r===0?t:Math.floor(t/r)*r}function dp({scrollLeft:t,totalWidth:e,numCanvases:n}){if(e===0)return[0];const r=t/e,i=Math.floor(r*n);return[i-1,i,i+1]}function hp(t){const e=t._cleanup;typeof e=="function"&&e()}class Tv extends fo{constructor(e,n){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.dragStream=null,this.scrollStream=null,this.subscriptions=[],this.options=e;const r=this.parentFromOptionsContainer(e.container);this.parent=r;const[i,o]=this.initHtml();r.appendChild(i),this.container=i,this.scrollContainer=o.querySelector(".scroll"),this.wrapper=o.querySelector(".wrapper"),this.canvasWrapper=o.querySelector(".canvases"),this.progressWrapper=o.querySelector(".progress"),this.cursor=o.querySelector(".cursor"),n&&o.appendChild(n),this.initEvents()}parentFromOptionsContainer(e){let n;if(typeof e=="string"?n=document.querySelector(e):e instanceof HTMLElement&&(n=e),!n)throw new Error("Container not found");return n}initEvents(){this.wrapper.addEventListener("click",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=cp(r,n.clientX,n.clientY);this.emit("click",i,o)}),this.wrapper.addEventListener("dblclick",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=cp(r,n.clientX,n.clientY);this.emit("dblclick",i,o)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollStream=(function(n){const r=ye({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth}),i=Kn(()=>(function(a){const{scrollLeft:l,scrollWidth:u,clientWidth:c}=a;if(u===0)return{startX:0,endX:1};const d=l/u,h=(l+c)/u;return{startX:Math.max(0,Math.min(1,d)),endX:Math.max(0,Math.min(1,h))}})(r.value),[r]),o=Kn(()=>(function(a){return{left:a.scrollLeft,right:a.scrollLeft+a.clientWidth}})(r.value),[r]),s=()=>{r.set({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth})};return n.addEventListener("scroll",s,{passive:!0}),{scrollData:r,percentages:i,bounds:o,cleanup:()=>{n.removeEventListener("scroll",s),hp(r)}}})(this.scrollContainer);const e=Dn(()=>{const{startX:n,endX:r}=this.scrollStream.percentages.value,{left:i,right:o}=this.scrollStream.bounds.value;this.emit("scroll",n,r,i,o)},[this.scrollStream.percentages,this.scrollStream.bounds]);if(this.subscriptions.push(e),typeof ResizeObserver=="function"){const n=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{n().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const e=this.parent.clientWidth;e===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=e,this.reRender(),this.emit("resize"))}initDrag(){if(this.dragStream)return;this.dragStream=(function(n,r={}){const{threshold:i=3,mouseButton:o=0,touchDelay:s=100}=r,a=ye(null),l=new Map,u=matchMedia("(pointer: coarse)").matches;let c=()=>{};const d=h=>{if(h.button!==o||(l.set(h.pointerId,h),l.size>1))return;let f=h.clientX,p=h.clientY,m=!1;const E=Date.now(),_=n.getBoundingClientRect(),{left:A,top:O}=_,S=g=>{if(g.defaultPrevented||l.size>1||u&&Date.now()-E<s)return;const D=g.clientX,C=g.clientY,N=D-f,k=C-p;(m||Math.abs(N)>i||Math.abs(k)>i)&&(g.preventDefault(),g.stopPropagation(),m||(a.set({type:"start",x:f-A,y:p-O}),m=!0),a.set({type:"move",x:D-A,y:C-O,deltaX:N,deltaY:k}),f=D,p=C)},v=g=>{if(l.delete(g.pointerId),m){const D=g.clientX,C=g.clientY;a.set({type:"end",x:D-A,y:C-O})}c()},T=g=>{l.delete(g.pointerId),g.relatedTarget&&g.relatedTarget!==document.documentElement||v(g)},R=g=>{m&&(g.stopPropagation(),g.preventDefault())},I=g=>{g.defaultPrevented||l.size>1||m&&g.preventDefault()};document.addEventListener("pointermove",S),document.addEventListener("pointerup",v),document.addEventListener("pointerout",T),document.addEventListener("pointercancel",T),document.addEventListener("touchmove",I,{passive:!1}),document.addEventListener("click",R,{capture:!0}),c=()=>{document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",v),document.removeEventListener("pointerout",T),document.removeEventListener("pointercancel",T),document.removeEventListener("touchmove",I),setTimeout(()=>{document.removeEventListener("click",R,{capture:!0})},10)}};return n.addEventListener("pointerdown",d),{signal:a,cleanup:()=>{c(),n.removeEventListener("pointerdown",d),l.clear(),hp(a)}}})(this.wrapper);const e=Dn(()=>{const n=this.dragStream.signal.value;if(!n)return;const r=this.wrapper.getBoundingClientRect().width,i=(o=n.x/r)<0?0:o>1?1:o;var o;n.type==="start"?(this.isDragging=!0,this.emit("dragstart",i)):n.type==="move"?this.emit("drag",i):n.type==="end"&&(this.isDragging=!1,this.emit("dragend",i))},[this.dragStream.signal]);this.subscriptions.push(e)}initHtml(){const e=document.createElement("div"),n=e.attachShadow({mode:"open"}),r=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return n.innerHTML=`
|
|
19
19
|
<style${r?` nonce="${r}"`:""}>
|
|
20
20
|
:host {
|
|
21
21
|
user-select: none;
|
|
@@ -88,19 +88,19 @@
|
|
|
88
88
|
<div class="cursor" part="cursor"></div>
|
|
89
89
|
</div>
|
|
90
90
|
</div>
|
|
91
|
-
`,[e,n]}setOptions(e){if(this.options.container!==e.container){const n=this.parentFromOptionsContainer(e.container);n.appendChild(this.container),this.parent=n}e.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.options=e,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(e){this.scrollContainer.scrollLeft=e}setScrollPercentage(e){const{scrollWidth:n}=this.scrollContainer,r=n*e;this.setScroll(r)}destroy(){var e;this.subscriptions.forEach(n=>n()),this.container.remove(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),(e=this.unsubscribeOnScroll)===null||e===void 0||e.forEach(n=>n()),this.unsubscribeOnScroll=[],this.dragStream&&(this.dragStream.cleanup(),this.dragStream=null),this.scrollStream&&(this.scrollStream.cleanup(),this.scrollStream=null)}createDelay(e=10){let n,r;const i=()=>{n&&(clearTimeout(n),n=void 0),r&&(r(),r=void 0)};return this.timeouts.push(i),()=>new Promise((o,s)=>{i(),r=s,n=setTimeout(()=>{n=void 0,r=void 0,o()},e)})}getHeight(e,n){var r;const i=((r=this.audioData)===null||r===void 0?void 0:r.numberOfChannels)||1;return(function({optionsHeight:o,optionsSplitChannels:s,parentHeight:a,numberOfChannels:l,defaultHeight:u=128}){if(o==null)return u;const c=Number(o);if(!isNaN(c))return c;if(o==="auto"){const d=a||u;return s!=null&&s.every(h=>!h.overlay)?d/l:d}return u})({optionsHeight:e,optionsSplitChannels:n,parentHeight:this.parent.clientHeight,numberOfChannels:i,defaultHeight:128})}convertColorValues(e,n){return(function(r,i,o){if(!Array.isArray(r))return r||"";if(r.length===0)return"#999";if(r.length<2)return r[0]||"";const s=document.createElement("canvas"),a=s.getContext("2d"),l=o!=null?o:s.height*i,u=a.createLinearGradient(0,0,0,l||i),c=1/(r.length-1);return r.forEach((d,h)=>{u.addColorStop(h*c,d)}),u})(e,this.getPixelRatio(),n==null?void 0:n.canvas.height)}getPixelRatio(){return e=window.devicePixelRatio,Math.max(1,e||1);var e}renderBarWaveform(e,n,r,i){const{width:o,height:s}=r.canvas,{halfHeight:a,barWidth:l,barRadius:u,barIndexScale:c,barSpacing:d,barMinHeight:h}=(function({width:f,height:m,length:E,options:_,pixelRatio:A}){const O=m/2,S=_.barWidth?_.barWidth*A:1,v=_.barGap?_.barGap*A:_.barWidth?S/2:0,T=S+v||1;return{halfHeight:O,barWidth:S,barGap:v,barRadius:_.barRadius||0,barMinHeight:_.barMinHeight?_.barMinHeight*A:0,barIndexScale:E>0?f/T/E:0,barSpacing:T}})({width:o,height:s,length:(e[0]||[]).length,options:n,pixelRatio:this.getPixelRatio()}),p=(function({channelData:f,barIndexScale:m,barSpacing:E,barWidth:_,halfHeight:A,vScale:O,canvasHeight:S,barAlign:v,barMinHeight:T}){const R=f[0]||[],y=f[1]||R,g=R.length,D=[];let C=0,N=0,k=0;for(let b=0;b<=g;b++){const L=Math.round(b*m);if(L>C){const{topHeight:B,totalHeight:V}=Ov({maxTop:N,maxBottom:k,halfHeight:A,vScale:O,barMinHeight:T,barAlign:v}),$=vv({barAlign:v,halfHeight:A,topHeight:B,totalHeight:V,canvasHeight:S});D.push({x:C*E,y:$,width:_,height:V}),C=L,N=0,k=0}const x=Math.abs(R[b]||0),P=Math.abs(y[b]||0);x>N&&(N=x),P>k&&(k=P)}return D})({channelData:e,barIndexScale:c,barSpacing:d,barWidth:l,halfHeight:a,vScale:i,canvasHeight:s,barAlign:n.barAlign,barMinHeight:h});r.beginPath();for(const f of p)u&&"roundRect"in r?r.roundRect(f.x,f.y,f.width,f.height,u):r.rect(f.x,f.y,f.width,f.height);r.fill(),r.closePath()}renderLineWaveform(e,n,r,i){const{width:o,height:s}=r.canvas,a=(function({channelData:l,width:u,height:c,vScale:d}){const h=c/2,p=l[0]||[];return[p,l[1]||p].map((f,m)=>{const E=f.length,_=E?u/E:0,A=h,O=m===0?-1:1,S=[{x:0,y:A}];let v=0,T=0;for(let R=0;R<=E;R++){const y=Math.round(R*_);if(y>v){const D=A+(Math.round(T*h*d)||1)*O;S.push({x:v,y:D}),v=y,T=0}const g=Math.abs(f[R]||0);g>T&&(T=g)}return S.push({x:v,y:A}),S})})({channelData:e,width:o,height:s,vScale:i});r.beginPath();for(const l of a)if(l.length){r.moveTo(l[0].x,l[0].y);for(let u=1;u<l.length;u++){const c=l[u];r.lineTo(c.x,c.y)}}r.fill(),r.closePath()}renderWaveform(e,n,r){if(r.fillStyle=this.convertColorValues(n.waveColor,r),n.renderFunction)return void n.renderFunction(e,r);const i=(function({channelData:o,barHeight:s,normalize:a,maxPeak:l}){var u;const c=s||1;if(!a)return c;const d=o[0];if(!d||d.length===0)return c;let h=l!=null?l:0;if(!l)for(let p=0;p<d.length;p++){const f=(u=d[p])!==null&&u!==void 0?u:0,m=Math.abs(f);m>h&&(h=m)}return h?c/h:c})({channelData:e,barHeight:n.barHeight,normalize:n.normalize,maxPeak:n.maxPeak});R_(n)?this.renderBarWaveform(e,n,r,i):this.renderLineWaveform(e,n,r,i)}renderSingleCanvas(e,n,r,i,o,s,a){const l=this.getPixelRatio(),u=document.createElement("canvas");u.width=Math.round(r*l),u.height=Math.round(i*l),u.style.width=`${r}px`,u.style.height=`${i}px`,u.style.left=`${Math.round(o)}px`,s.appendChild(u);const c=u.getContext("2d");if(n.renderFunction?(c.fillStyle=this.convertColorValues(n.waveColor,c),n.renderFunction(e,c)):this.renderWaveform(e,n,c),u.width>0&&u.height>0){const d=u.cloneNode(),h=d.getContext("2d");h.drawImage(u,0,0),h.globalCompositeOperation="source-in",h.fillStyle=this.convertColorValues(n.progressColor,h),h.fillRect(0,0,u.width,u.height),a.appendChild(d)}}renderMultiCanvas(e,n,r,i,o,s){const a=this.getPixelRatio(),{clientWidth:l}=this.scrollContainer,u=r/a,c=(function({clientWidth:f,totalWidth:m,options:E}){return cp(Math.min(8e3,f,m),E)})({clientWidth:l,totalWidth:u,options:n});let d={};if(c===0)return;const h=f=>{if(f<0||f>=p||d[f])return;d[f]=!0;const m=f*c;let E=Math.min(u-m,c);if(E=cp(E,n),E<=0)return;const _=(function({channelData:A,offset:O,clampedWidth:S,totalWidth:v}){return A.map(T=>{const R=Math.floor(O/v*T.length),y=Math.floor((O+S)/v*T.length);return T.slice(R,y)})})({channelData:e,offset:m,clampedWidth:E,totalWidth:u});this.renderSingleCanvas(_,n,E,i,m,o,s)},p=Math.ceil(u/c);if(this.isScrollable){if(up({scrollLeft:this.scrollContainer.scrollLeft,totalWidth:u,numCanvases:p}).forEach(f=>h(f)),p>1){const f=this.on("scroll",()=>{const{scrollLeft:m}=this.scrollContainer;Object.keys(d).length>10&&(o.innerHTML="",s.innerHTML="",d={}),up({scrollLeft:m,totalWidth:u,numCanvases:p}).forEach(E=>h(E))});this.unsubscribeOnScroll.push(f)}}else for(let f=0;f<p;f++)h(f)}renderChannel(e,n,r,i){var{overlay:o}=n,s=(function(c,d){var h={};for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&d.indexOf(p)<0&&(h[p]=c[p]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function"){var f=0;for(p=Object.getOwnPropertySymbols(c);f<p.length;f++)d.indexOf(p[f])<0&&Object.prototype.propertyIsEnumerable.call(c,p[f])&&(h[p[f]]=c[p[f]])}return h})(n,["overlay"]);const a=document.createElement("div"),l=this.getHeight(s.height,s.splitChannels);a.style.height=`${l}px`,o&&i>0&&(a.style.marginTop=`-${l}px`),this.canvasWrapper.style.minHeight=`${l}px`,this.canvasWrapper.appendChild(a);const u=a.cloneNode();this.progressWrapper.appendChild(u),this.renderMultiCanvas(e,s,r,l,a,u)}render(e){return st(this,void 0,void 0,function*(){var n;this.timeouts.forEach(u=>u()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.options.width!=null&&(this.scrollContainer.style.width=typeof this.options.width=="number"?`${this.options.width}px`:this.options.width);const r=this.getPixelRatio(),i=this.scrollContainer.clientWidth,{scrollWidth:o,isScrollable:s,useParentWidth:a,width:l}=(function({duration:u,minPxPerSec:c=0,parentWidth:d,fillParent:h,pixelRatio:p}){const f=Math.ceil(u*c),m=f>d,E=!!(h&&!m);return{scrollWidth:f,isScrollable:m,useParentWidth:E,width:(E?d:f)*p}})({duration:e.duration,minPxPerSec:this.options.minPxPerSec||0,parentWidth:i,fillParent:this.options.fillParent,pixelRatio:r});if(this.isScrollable=s,this.wrapper.style.width=a?"100%":`${o}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=e,this.emit("render"),this.options.splitChannels)for(let u=0;u<e.numberOfChannels;u++){const c=Object.assign(Object.assign({},this.options),(n=this.options.splitChannels)===null||n===void 0?void 0:n[u]);this.renderChannel([e.getChannelData(u)],c,l,u)}else{const u=[e.getChannelData(0)];e.numberOfChannels>1&&u.push(e.getChannelData(1)),this.renderChannel(u,this.options,l,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(r=>r()),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:e}=this.scrollContainer,{right:n}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&e!==this.scrollContainer.scrollWidth){const{right:r}=this.progressWrapper.getBoundingClientRect(),i=(function(o){const s=2*o;return(s<0?Math.floor(s):Math.ceil(s))/2})(r-n);this.scrollContainer.scrollLeft+=i}}zoom(e){this.options.minPxPerSec=e,this.reRender()}scrollIntoView(e,n=!1){const{scrollLeft:r,scrollWidth:i,clientWidth:o}=this.scrollContainer,s=e*i,a=r,l=r+o,u=o/2;if(this.isDragging)s+30>l?this.scrollContainer.scrollLeft+=30:s-30<a&&(this.scrollContainer.scrollLeft-=30);else{(s<a||s>l)&&(this.scrollContainer.scrollLeft=s-(this.options.autoCenter?u:0));const c=s-r-u;n&&this.options.autoCenter&&c>0&&(this.scrollContainer.scrollLeft+=c)}}renderProgress(e,n){if(isNaN(e))return;const r=100*e;this.canvasWrapper.style.clipPath=`polygon(${r}% 0%, 100% 0%, 100% 100%, ${r}% 100%)`,this.progressWrapper.style.width=`${r}%`,this.cursor.style.left=`${r}%`,this.cursor.style.transform=this.options.cursorWidth?`translateX(-${e*this.options.cursorWidth}px)`:"",this.isScrollable&&this.options.autoScroll&&this.audioData&&this.audioData.duration>0&&this.scrollIntoView(e,n)}exportImage(e,n,r){return st(this,void 0,void 0,function*(){const i=this.canvasWrapper.querySelectorAll("canvas");if(!i.length)throw new Error("No waveform data");if(r==="dataURL"){const o=Array.from(i).map(s=>s.toDataURL(e,n));return Promise.resolve(o)}return Promise.all(Array.from(i).map(o=>new Promise((s,a)=>{o.toBlob(l=>{l?s(l):a(new Error("Could not export image"))},e,n)})))})}}class Tv extends fo{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const e=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(e))};e()}stop(){this.isRunning=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}class Qa extends fo{constructor(e=new AudioContext){super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=e,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return st(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(e){if(this.currentSrc=e,this._duration=void 0,!e)return this.buffer=null,void this.emit("emptied");fetch(e).then(n=>{if(n.status>=400)throw new Error(`Failed to fetch ${e}: ${n.status} (${n.statusText})`);return n.arrayBuffer()}).then(n=>this.currentSrc!==e?null:this.audioContext.decodeAudioData(n)).then(n=>{this.currentSrc===e&&(this.buffer=n,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())}).catch(n=>{console.error("WebAudioPlayer load error:",n)})}_play(){if(!this.paused)return;this.paused=!1,this.bufferNode&&(this.bufferNode.onended=null,this.bufferNode.disconnect()),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let e=this.playedDuration*this._playbackRate;(e>=this.duration||e<0)&&(e=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,e),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var e;this.paused=!0,(e=this.bufferNode)===null||e===void 0||e.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return st(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(e){const n=e-this.currentTime,r=this.bufferNode;r==null||r.stop(this.audioContext.currentTime+n),r==null||r.addEventListener("ended",()=>{r===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(e){return st(this,void 0,void 0,function*(){return this.audioContext.setSinkId(e)})}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this.bufferNode&&(this.bufferNode.playbackRate.value=e)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(e){const n=!this.paused;n&&this._pause(),this.playedDuration=e/this._playbackRate,n&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var e,n;return(e=this._duration)!==null&&e!==void 0?e:((n=this.buffer)===null||n===void 0?void 0:n.duration)||0}set duration(e){this._duration=e}get volume(){return this.gainNode.gain.value}set volume(e){this.gainNode.gain.value=e,this.emit("volumechange")}get muted(){return this._muted}set muted(e){this._muted!==e&&(this._muted=e,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(e){return/^(audio|video)\//.test(e)}getGainNode(){return this.gainNode}getChannelData(){const e=[];if(!this.buffer)return e;const n=this.buffer.numberOfChannels;for(let r=0;r<n;r++)e.push(this.buffer.getChannelData(r));return e}removeAttribute(e){switch(e){case"src":this.src="";break;case"playbackRate":this.playbackRate=0;break;case"currentTime":this.currentTime=0;break;case"duration":this.duration=0;break;case"volume":this.volume=0;break;case"muted":this.muted=!1}}}const Rv={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class qi extends Sv{static create(e){return new qi(e)}getState(){return this.wavesurferState}getRenderer(){return this.renderer}constructor(e){const n=e.media||(e.backend==="WebAudio"?new Qa:void 0);super({media:n,mediaControls:e.mediaControls,autoplay:e.autoplay,playbackRate:e.audioRate}),this.plugins=[],this.decodedData=null,this.stopAtPosition=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.reactiveCleanups=[],this.options=Object.assign({},Rv,e);const{state:r,actions:i}=(function(a){var l,u,c,d,h,p;const f=(l=a==null?void 0:a.currentTime)!==null&&l!==void 0?l:Ie(0),m=(u=a==null?void 0:a.duration)!==null&&u!==void 0?u:Ie(0),E=(c=a==null?void 0:a.isPlaying)!==null&&c!==void 0?c:Ie(!1),_=(d=a==null?void 0:a.isSeeking)!==null&&d!==void 0?d:Ie(!1),A=(h=a==null?void 0:a.volume)!==null&&h!==void 0?h:Ie(1),O=(p=a==null?void 0:a.playbackRate)!==null&&p!==void 0?p:Ie(1),S=Ie(null),v=Ie(null),T=Ie(""),R=Ie(0),y=Ie(0),g=Kn(()=>!E.value,[E]),D=Kn(()=>S.value!==null,[S]),C=Kn(()=>D.value&&m.value>0,[D,m]),N=Kn(()=>f.value,[f]),k=Kn(()=>m.value>0?f.value/m.value:0,[f,m]);return{state:{currentTime:f,duration:m,isPlaying:E,isPaused:g,isSeeking:_,volume:A,playbackRate:O,audioBuffer:S,peaks:v,url:T,zoom:R,scrollPosition:y,canPlay:D,isReady:C,progress:N,progressPercent:k},actions:{setCurrentTime:b=>{const L=Math.max(0,Math.min(m.value||1/0,b));f.set(L)},setDuration:b=>{m.set(Math.max(0,b))},setPlaying:b=>{E.set(b)},setSeeking:b=>{_.set(b)},setVolume:b=>{const L=Math.max(0,Math.min(1,b));A.set(L)},setPlaybackRate:b=>{const L=Math.max(.1,Math.min(16,b));O.set(L)},setAudioBuffer:b=>{S.set(b),b&&m.set(b.duration)},setPeaks:b=>{v.set(b)},setUrl:b=>{T.set(b)},setZoom:b=>{R.set(Math.max(0,b))},setScrollPosition:b=>{y.set(Math.max(0,b))}}}})({isPlaying:this.isPlayingSignal,currentTime:this.currentTimeSignal,duration:this.durationSignal,volume:this.volumeSignal,playbackRate:this.playbackRateSignal,isSeeking:this.seekingSignal});this.wavesurferState=r,this.wavesurferActions=i,this.timer=new Tv;const o=n?void 0:this.getMediaElement();this.renderer=new Dv(this.options,o),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initReactiveState(),this.initPlugins();const s=this.options.url||this.getSrc()||"";Promise.resolve().then(()=>{this.emit("init");const{peaks:a,duration:l}=this.options;(s||a&&l)&&this.load(s,a,l).catch(u=>{this.emit("error",u instanceof Error?u:new Error(String(u)))})})}updateProgress(e=this.getCurrentTime()){return this.renderer.renderProgress(e/this.getDuration(),this.isPlaying()),e}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){const e=this.updateProgress();this.emit("timeupdate",e),this.emit("audioprocess",e),this.stopAtPosition!=null&&this.isPlaying()&&e>=this.stopAtPosition&&this.pause()}}))}initReactiveState(){this.reactiveCleanups.push((function(e,n){const r=[];r.push(Dn(()=>{const s=e.isPlaying.value;n.emit(s?"play":"pause")},[e.isPlaying])),r.push(Dn(()=>{const s=e.currentTime.value;n.emit("timeupdate",s),e.isPlaying.value&&n.emit("audioprocess",s)},[e.currentTime,e.isPlaying])),r.push(Dn(()=>{e.isSeeking.value&&n.emit("seeking",e.currentTime.value)},[e.isSeeking,e.currentTime]));let i=!1;r.push(Dn(()=>{e.isReady.value&&!i&&(i=!0,n.emit("ready",e.duration.value))},[e.isReady,e.duration]));let o=!1;return r.push(Dn(()=>{const s=e.isPlaying.value,a=e.currentTime.value,l=e.duration.value,u=l>0&&a>=l;o&&!s&&u&&n.emit("finish"),o=s&&u},[e.isPlaying,e.currentTime,e.duration])),r.push(Dn(()=>{const s=e.zoom.value;s>0&&n.emit("zoom",s)},[e.zoom])),()=>{r.forEach(s=>s())}})(this.wavesurferState,{emit:this.emit.bind(this)}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const e=this.updateProgress();this.emit("timeupdate",e)}),this.onMediaEvent("play",()=>{this.emit("play"),this.timer.start()}),this.onMediaEvent("pause",()=>{this.emit("pause"),this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("emptied",()=>{this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("ended",()=>{this.emit("timeupdate",this.getDuration()),this.emit("finish"),this.stopAtPosition=null}),this.onMediaEvent("seeking",()=>{this.emit("seeking",this.getCurrentTime())}),this.onMediaEvent("error",()=>{var e;this.emit("error",(e=this.getMediaElement().error)!==null&&e!==void 0?e:new Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(e,n)=>{this.options.interact&&(this.seekTo(e),this.emit("interaction",e*this.getDuration()),this.emit("click",e,n))}),this.renderer.on("dblclick",(e,n)=>{this.emit("dblclick",e,n)}),this.renderer.on("scroll",(e,n,r,i)=>{const o=this.getDuration();this.emit("scroll",e*o,n*o,r,i)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}),this.renderer.on("dragstart",e=>{this.emit("dragstart",e)}),this.renderer.on("dragend",e=>{this.emit("dragend",e)}),this.renderer.on("resize",()=>{this.emit("resize")}));{let e;const n=this.renderer.on("drag",r=>{var i;if(!this.options.interact)return;this.renderer.renderProgress(r),clearTimeout(e);let o=0;const s=this.options.dragToSeek;this.isPlaying()?o=0:s===!0?o=200:s&&typeof s=="object"&&(o=(i=s.debounceTime)!==null&&i!==void 0?i:200),e=setTimeout(()=>{this.seekTo(r)},o),this.emit("interaction",r*this.getDuration()),this.emit("drag",r)});this.subscriptions.push(()=>{clearTimeout(e),n()})}}initPlugins(){var e;!((e=this.options.plugins)===null||e===void 0)&&e.length&&this.options.plugins.forEach(n=>{this.registerPlugin(n)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(e=>e()),this.mediaSubscriptions=[]}setOptions(e){this.options=Object.assign({},this.options,e),e.duration&&!e.peaks&&(this.decodedData=Po.createBuffer(this.exportPeaks(),e.duration)),e.peaks&&e.duration&&(this.decodedData=Po.createBuffer(e.peaks,e.duration)),this.renderer.setOptions(this.options),e.audioRate&&this.setPlaybackRate(e.audioRate),e.mediaControls!=null&&(this.getMediaElement().controls=e.mediaControls)}registerPlugin(e){if(this.plugins.includes(e))return e;e._init(this),this.plugins.push(e);const n=e.once("destroy",()=>{this.plugins=this.plugins.filter(r=>r!==e),this.subscriptions=this.subscriptions.filter(r=>r!==n)});return this.subscriptions.push(n),e}unregisterPlugin(e){this.plugins=this.plugins.filter(n=>n!==e),e.destroy()}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(e){return this.renderer.setScroll(e)}setScrollTime(e){const n=e/this.getDuration();this.renderer.setScrollPercentage(n)}getActivePlugins(){return this.plugins}loadAudio(e,n,r,i){return st(this,void 0,void 0,function*(){var o;if(this.emit("load",e),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,(o=this.abortController)===null||o===void 0||o.abort(),this.abortController=null,!n&&!r){const a=this.options.fetchParams||{};window.AbortController&&!a.signal&&(this.abortController=new AbortController,a.signal=this.abortController.signal);const l=c=>this.emit("loading",c);n=yield gv.fetchBlob(e,l,a);const u=this.options.blobMimeType;u&&(n=new Blob([n],{type:u}))}this.setSrc(e,n);const s=yield new Promise(a=>{const l=i||this.getDuration();l?a(l):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>a(this.getDuration()),{once:!0}))});if(!e&&!n){const a=this.getMediaElement();a instanceof Qa&&(a.duration=s)}if(r)this.decodedData=Po.createBuffer(r,s||0);else if(n){const a=yield n.arrayBuffer();this.decodedData=yield Po.decode(a,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(e,n,r){return st(this,void 0,void 0,function*(){try{return yield this.loadAudio(e,void 0,n,r)}catch(i){throw this.emit("error",i),i}})}loadBlob(e,n,r){return st(this,void 0,void 0,function*(){try{return yield this.loadAudio("",e,n,r)}catch(i){throw this.emit("error",i),i}})}zoom(e){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(e),this.emit("zoom",e)}getDecodedData(){return this.decodedData}exportPeaks({channels:e=2,maxLength:n=8e3,precision:r=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const i=Math.min(e,this.decodedData.numberOfChannels),o=[];for(let s=0;s<i;s++){const a=this.decodedData.getChannelData(s),l=[],u=a.length/n;for(let c=0;c<n;c++){const d=a.slice(Math.floor(c*u),Math.ceil((c+1)*u));let h=0;for(let p=0;p<d.length;p++){const f=d[p];Math.abs(f)>Math.abs(h)&&(h=f)}l.push(Math.round(h*r)/r)}o.push(l)}return o}getDuration(){let e=super.getDuration()||0;return e!==0&&e!==1/0||!this.decodedData||(e=this.decodedData.duration),e}toggleInteraction(e){this.options.interact=e}setTime(e){this.stopAtPosition=null,super.setTime(e),this.updateProgress(e),this.emit("timeupdate",e)}seekTo(e){const n=this.getDuration()*e;this.setTime(n)}play(e,n){const r=Object.create(null,{play:{get:()=>super.play}});return st(this,void 0,void 0,function*(){e!=null&&this.setTime(e);const i=yield r.play.call(this);return n!=null&&(this.media instanceof Qa?this.media.stopAt(n):this.stopAtPosition=n),i})}playPause(){return st(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(e){this.setTime(this.getCurrentTime()+e)}empty(){this.load("",[[0]],.001)}setMediaElement(e){this.unsubscribePlayerEvents(),super.setMediaElement(e),this.initPlayerEvents()}exportImage(){return st(this,arguments,void 0,function*(e="image/png",n=1,r="dataURL"){return this.renderer.exportImage(e,n,r)})}destroy(){var e;this.emit("destroy"),(e=this.abortController)===null||e===void 0||e.abort(),this.plugins.forEach(n=>n.destroy()),this.subscriptions.forEach(n=>n()),this.unsubscribePlayerEvents(),this.reactiveCleanups.forEach(n=>n()),this.reactiveCleanups=[],this.timer.destroy(),this.renderer.destroy(),super.destroy()}}qi.BasePlugin=class extends fo{constructor(t){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=t}onInit(){}_init(t){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(t=>t()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}},qi.dom=Av;var I_=function(t,e,n,r){var i;e[0]=0;for(var o=1;o<e.length;o++){var s=e[o++],a=e[o]?(e[0]|=s?1:2,n[e[o++]]):e[++o];s===3?r[0]=a:s===4?r[1]=Object.assign(r[1]||{},a):s===5?(r[1]=r[1]||{})[e[++o]]=a:s===6?r[1][e[++o]]+=a+"":s?(i=t.apply(a,I_(t,a,n,["",null])),r.push(i),a[0]?e[0]|=2:(e[o-2]=0,e[o]=i)):r.push(a)}return r},hp=new Map;function Iv(t){var e=hp.get(this);return e||(e=new Map,hp.set(this,e)),(e=I_(this,e.get(t)||(e.set(t,e=(function(n){for(var r,i,o=1,s="",a="",l=[0],u=function(h){o===1&&(h||(s=s.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,h,s):o===3&&(h||s)?(l.push(3,h,s),o=2):o===2&&s==="..."&&h?l.push(4,h,0):o===2&&s&&!h?l.push(5,0,!0,s):o>=5&&((s||!h&&o===5)&&(l.push(o,0,s,i),o=6),h&&(l.push(o,h,0,i),o=6)),s=""},c=0;c<n.length;c++){c&&(o===1&&u(),u(c));for(var d=0;d<n[c].length;d++)r=n[c][d],o===1?r==="<"?(u(),l=[l],o=3):s+=r:o===4?s==="--"&&r===">"?(o=1,s=""):s=r+s[0]:a?r===a?a="":s+=r:r==='"'||r==="'"?a=r:r===">"?(u(),o=1):o&&(r==="="?(o=5,i=s,s=""):r==="/"&&(o<5||n[c][d+1]===">")?(u(),o===3&&(l=l[0]),o=l,(l=l[0]).push(2,0,o),o=0):r===" "||r===" "||r===`
|
|
92
|
-
`||r==="\r"?(u(),o=2):s+=r),o===3&&s==="!--"&&(o=4,l=l[0])}return u(),l})(t)),e),arguments,[])).length>1?e:e[0]}const yv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,TALK_GMK:"AIzaSyAsz0mHH8fOjpcBfWeCfDVOFPh-nWgsxbs"},Cv=(function(t){return yv[t]})("TALK_GMK");function ou(t,e=10){const n=Hn(xc),[r,i]=ne([]);return G(()=>{if(!t)return;const o=n.conversation(t).subscribeParticipants(s=>i(s!=null?s:[]));return e>10&&o.connected.then(async()=>{for(;o.state.type==="active"&&!o.state.loadedAll&&o.state.latestSnapshot!==null&&o.state.latestSnapshot.length<e;){const s=Math.min(e-o.state.latestSnapshot.length,50);await o.loadMore(s)}}),()=>{o.unsubscribe()}},[t,n,e]),r}const y_=/^\/.*[^\\]\/[im]*$/;function pp(t){return y_.test(t)?!Os(t).test(""):!1}function Os(t){const e=t.match(/^\/(.*[^\\])\/(.*)$/);if(!e)throw new Error(`Expected ${t} to be a (non-empty) regex`);let n=e[2]||"";return n=n.replace(/[^im]/g,"")+"g",new RegExp(e[1],n)}function C_(t){const e=t.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+e+"$","i")}function Nv(t,e){const n=JE(e),r=C_(t);return n!==void 0&&r.test(n)}const bv=/^[]/g;function N_(t){return t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function Zl(t,e){!t()&&!e&&(e=t.toString().replace(/^function\s*\(\)\s*\{\s*return\s*(.*);\s*\}\s*$/,"`$1`")+" was not true")}(t=>{function e(r){}function n(r,i){(function(o,s){switch(s){case"undefined":return o===void 0;case String:return typeof o=="string"||o instanceof String;case Boolean:return typeof o=="boolean"||o instanceof Boolean;case Number:return typeof o=="number"||o instanceof Number;default:return o instanceof s}})(r,i)||(i.name,String(r))}t.defined=e,t.has=function(r,i){r[i]},t.is=n,t.equals=function(r,i){},t.oneOf=function(r,i){i.includes(r)||JSON.stringify(i)},t.isArray=function(r,i){n(r,Array),r&&r.length>0&&n(r[0],i)},t.optional=function(r,i){r!==void 0&&n(r,i)},t.falsy=function(r){},t.never=function(r){}})(Zl||(Zl={}));const zr=Zl,wv=new RegExp(":arslan:|"+/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g.source,"g"),kv=/\uFE0F/g,Lv="";function Mv(t){if(t===":arslan:")return"https://cdn.talkjs.com/__assets/5461191341cea882b3f227c085d5772c.gif";const e=(function(r){const i=[];let o=0,s=0,a=0;for(;a<r.length;)o=r.charCodeAt(a++),s?(i.push((65536+(s-55296<<10)+(o-56320)).toString(16)),s=0):55296<=o&&o<=56319?s=o:i.push(o.toString(16));return i.join("-")})((n=t).indexOf(Lv)<0?n.replace(kv,""):n);var n;return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${e}.svg`}class b_{constructor({mode:e,allowedHostnames:n,allowedPhoneNrs:r,allowedMatches:i,forbiddenMatches:o,forbiddenWords:s,suppressLinks:a,suppressEmailAddresses:l,suppressPhoneNumbers:u,replacement:c}){if(zr.oneOf(e,["all","otherOnly","off"]),this.mode=e,this.suppressLinks=a!==!1,this.suppressEmailAddresses=l!==!1,this.suppressPhoneNumbers=u!==!1,this.allowedHostnames=n||[],this.allowedPhoneNrs=(r||[]).filter(d=>d).map(d=>d.replace(/[^0-9]/g,"")),this.allowedMatches=(i||[]).filter(pp).map(d=>Os(d)),this.forbiddenMatches=(o||[]).filter(pp).map(d=>Os(d)),s){const d=s.split(`
|
|
93
|
-
`).map(h=>h.trim().toLowerCase()).filter(h=>h.length>0&&!h.startsWith("#")).map(h=>N_(h));d.length&&this.forbiddenMatches.push(new RegExp(`\\b(${d.join("|")})\\b`,"gi"))}zr(()=>this.allowedMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),zr(()=>this.forbiddenMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.forbiddenMatches` must be global. Check `forbiddenMatches`!"),c=c==null?void 0:c.trim(),this.replacement=c&&c.length>0?c:void 0}shouldSuppress({isContentBySender:e}){return this.mode==="all"||this.mode==="otherOnly"&&!e}}function su(t){var n,r,i,o,s,a,l,u,c,d,h,p,f,m;let e="";return t.t&&(e=`(${t.t("CONTACT_INFORMATION_HIDDEN")})`),{formattedLinks:(n=t.formattedLinks)!=null?n:"plaintext",markup:(r=t.markup)!=null?r:!1,useFallbackMentions:(i=t.useFallbackMentions)!=null?i:!1,sameTabLinkRules:(o=t.sameTabLinkRules)!=null?o:[],enableEmojiImageFallback:(s=t.enableEmojiImageFallback)!=null?s:!1,highlight:(a=t.highlight)!=null?a:[],highlightFromWordBeginnings:(l=t.highlightFromWordBeginnings)!=null?l:!1,contactInfo:(u=t.contactInfo)!=null?u:!1,suppression:(c=t.suppression)!=null?c:new b_({mode:"off"}),contactInfoHiddenText:(p=(h=t.contactInfoHiddenText)!=null?h:(d=t.suppression)==null?void 0:d.replacement)!=null?p:e,customEmojiUrls:(f=t.customEmojiUrls)!=null?f:{},enableActions:(m=t.enableActions)!=null?m:!0}}function Pv({id:t,text:e}){var i;const n=oe(),r=J(()=>{var a;if(n.type==="ConversationListStore")return;const o=n.state$.currentConversationId.get(),s=o&&n.state$.participants.child(o).get();return(a=s==null?void 0:s.find(l=>l.user.id===t))==null?void 0:a.user});return I("span",{className:"t-mention","t-is-current-user":J(n.extUserId$)===t?"":void 0,children:`@${(i=r==null?void 0:r.name)!=null?i:e}`})}function xv({message:t,type:e,action:n,params:r,children:i}){const o=Ar(),s=q(l=>{l.preventDefault(),o.triggerMessageAction(t,n,r)},[o,t,n,r]),a={"t-action":n,onClick:s};return e==="actionButton"?I("button",{...a,type:"button",children:i}):I("a",{...a,href:"#",children:i})}function w_(t,e={},n){return ur(t,{...su(e),message:n})}function ur(t,e){const n=t.flatMap(r=>{if(typeof r=="string")return el(r,e.highlight,e.highlightFromWordBeginnings);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return Fv(r,e);case"bulletlist":case"bulletList":return[fe("ul",null,...ur(r.children,e))];case"autolink":case"autoLink":case"link":return Uv(r,e);case"codeblock":case"codeBlock":return[I("code",{"data-language":r.language,children:el(r.text,e.highlight,e.highlightFromWordBeginnings)})];case"codespan":case"codeSpan":return I("code",{children:el((i=r.text,i.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")),e.highlight,e.highlightFromWordBeginnings)});case"mention":return zr.falsy(e.useFallbackMentions),I(Pv,{id:r.id,text:r.text},r.id);case"suppressed":return[I("i",{children:e.contactInfoHiddenText})];case"emoji":return e.enableEmojiImageFallback?[I(Hv,{unicode:r.text})]:[r.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return Bv(r,e);case"customemoji":case"customEmoji":return r.text;default:zr.never(r)}var i});return n.every(r=>typeof r=="string")?[n.join("")]:n}function xo(t){return t.normalize("NFKC").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function el(t,e,n=!1){if(!t||!e.length)return[t];const r=xo(t),i=t.toLowerCase()!==r,o=e.map(l=>xo(l).trim()).filter(l=>l.length),s=(function(l){const u=l.map(d=>d.trim()).filter(d=>d).sort((d,h)=>h.length-d.length);if(u.length===0)return bv;const c=u.map(N_).join("|");return new RegExp(c,"gi")})(o),a=Js(r,n?new RegExp(`(?<=^|\\s)(${s.source})`,s.flags):s).map(l=>({offset:l.index,matchedText:l[0],index:l.index}));return Wl(t,a,({index:l,matchedText:u})=>[I("mark",{className:"t-highlighted-text",children:i?(function(c,d,h){let p=0,f=0;for(;f<d&&p<c.length;)f+=xo(c[p]).length,p+=1;let m=p;for(;f<d+h&&m<c.length;)f+=xo(c[m]).length,m+=1;return c.substring(p,m)})(t,l,u.length):t.slice(l,l+u.length)})])}const Fv=(t,e)=>[fe({bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[t.type],null,...ur(t.children,e))];function Hv({unicode:t}){const[e,n]=ne(()=>t!==":arslan:");return G(()=>{e&&!zm(t)&&n(!1)},[]),e?I("span",{className:"t-emoji",children:t}):I("img",{className:"t-emoji",src:Mv(t),alt:t})}const Uv=(t,e)=>{const n="children"in t?t.children:[t.text];switch(e.formattedLinks){case"link":return[fe("a",{target:(function(r,i){for(const o of r)if(y_.test(o)){if(Os(o).test(i))return"_top"}else if(Nv(o,i))return"_top";return"_blank"})(e.sameTabLinkRules,t.url),href:t.url,rel:"noreferrer"},...ur(n,e))];case"plaintext":return"children"in t&&t.children.every(r=>typeof r=="string")?[t.children.join("")]:[fe(ve,null,...ur(n,e))];default:zr.never(e.formattedLinks)}},Bv=(t,e)=>e.enableActions?[fe(xv,{type:t.type==="actionlink"?"actionLink":t.type==="actionbutton"?"actionButton":t.type,action:t.action,params:t.params,message:e.message},...ur(t.children,e))]:"children"in t&&t.children.every(n=>typeof n=="string")?[t.children.join("")]:[fe(ve,null,...ur(t.children,e))];function jv(t,e){return qo(t,su(e))}function qo(t,e){return t.flatMap(n=>{if(typeof n=="string"){let r=[n];return r=tl(r,i=>(function(o,s){const{suppression:{forbiddenMatches:a,allowedMatches:l}}=s,u=qc(a,c=>Js(o,c)).filter(([c])=>!l.some(d=>c.match(d)!==null)).map(c=>({offset:c.index,matchedText:c[0]}));return Wl(o,u,()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])})(i,e)),r=tl(r,i=>(function(o){return Wl(o,(function(s){const a=[];let l;for(;l=wv.exec(s);){const u=l[0],c=l.index;a.push({offset:c,matchedText:u})}return a})(o),s=>[{type:"emoji",text:s.matchedText}])})(i)),r=tl(r,i=>(function(o,s){if(s.contactInfo!=="suppress")return[o];const a=[];if((s.suppression.suppressEmailAddresses||s.suppression.suppressLinks)&&a.push(m_),s.suppression.suppressPhoneNumbers&&a.push(f_),a.length===0)return[o];const l=A_(o,{multilineSteps:[],singlelineSteps:a}),u=l.map(c=>typeof c=="string"?c:fp(c.url,s.suppression)?c.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"});return ru(u)})(i,e)),r}switch(n.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return{type:n.type,children:qo(n.children,e)};case"codespan":case"codeSpan":case"codeblock":case"codeBlock":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return n;case"mention":return{type:"mention",id:n.id,text:n.text};case"autolink":case"autoLink":return(function(r,i){return i.contactInfo==="link"?r:i.contactInfo==="suppress"?fp(r.url,i.suppression)?r:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:r.text})(n,e);case"link":return{type:"link",url:n.url,children:qo(n.children,e)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:n.type,action:n.action,params:n.params,children:qo(n.children,e)}}})}function tl(t,e){return qc(t,n=>typeof n=="string"?e(n):[n])}function fp(t,e){if(e.allowedMatches.some(n=>t.match(n)!==null))return!0;if(e.forbiddenMatches.some(n=>t.match(n)!==null))return!1;if(t.startsWith("mailto:")){const n=t.substring(7).replace(/^.*@/,"");return!e.suppressEmailAddresses||mp(e.allowedHostnames,n)}if(t.startsWith("tel:")){const n=t.substring(4).replace(/[^0-9]/g,"");return!e.suppressPhoneNumbers||e.allowedPhoneNrs.some(r=>n.endsWith(r))}{const n=JE(t);return!e.suppressLinks||!n||mp(e.allowedHostnames,n)}}function mp(t,e){for(const n of t)if(C_(n).test(e))return!0;return!1}function au({block:t,nonInteractive:e,message:n,className:r=""}){const i=oe(),o=!e,s=J(i.highlightedStrings$),a=i.type==="ConversationListStore",{nodes:l,roleOptions:u}=(function(c,d){var S;const h=oe(),p=J(h.app$.role);ie.defined(p);const f=d.type==="UserMessage",m=((S=d.sender)==null?void 0:S.id)===h.extUserId$.peek(),E=p.suppressContactInfo,_=f&&E.shouldSuppress({isContentBySender:m}),A=jv(c.children,{contactInfo:_?"suppress":"link",suppression:E}),O={sameTabLinkRules:p.sameTabLinkRules,contactInfoHiddenText:p.suppressContactInfo.replacement||`(${h.t$.peek().CONTACT_INFORMATION_HIDDEN})`};return{nodes:A,roleOptions:O}})(t,n);return fe("span",{className:`t-text ${r}`},...w_(l,{enableEmojiImageFallback:!0,formattedLinks:o?"link":"plaintext",enableActions:o,highlight:s,highlightFromWordBeginnings:a,...u},n))}function dr({text:t,className:e=""}){const n=oe();return fe("span",{className:`t-highlightable ${e}`},...w_([t],{enableEmojiImageFallback:!0,formattedLinks:"plaintext",enableActions:!1,highlight:J(n.highlightedStrings$),highlightFromWordBeginnings:n.type==="ConversationListStore"},null))}function k_(t){const e=Qe(),n=oe(),{className:r="",...i}=t,o=J(()=>n.state$.messages.child(t.common.conversation.id).lookup.child(t.message.id).content.child(0).url.get());return I("div",{className:`t-message-content ${r}`,children:t.message.content.map(s=>{var a;return I($v,{block:s,theme:e,downloadUrl:o,...i},t.message.createdAt+((a=t.message.editedAt)!=null?a:0))})})}function $v({common:t,block:e,message:n,theme:r,downloadUrl:i}){const o=(function(s,a){switch(a.type){case"text":return s.TextBlock;case"location":return s.LocationBlock;case"file":switch(a.subtype){case"image":return s.ImageBlock;case"video":return s.VideoBlock;case"voice":return s.VoiceBlock;case"audio":return s.AudioBlock;default:return s.FileBlock}default:ie.never(a)}})(r,e);return I(o,{block:e,common:t,message:n,downloadUrl:i})}const Vv=27;function mo(t,e,n=!0){const r=q(o=>{o.keyCode===Vv&&t()},[t]),i=q(o=>{o.target.closest(e)===null&&t(o)},[e,t]);G(()=>{if(n)return window.addEventListener("keydown",r,!0),document.addEventListener("mousedown",i,!0),()=>{window.removeEventListener("keydown",r,!0),document.removeEventListener("mousedown",i,!0)}},[r,i,n])}const zv=".search-row{margin-right:var(--emoji-padding)}.emoji-menu{grid-template-columns:repeat(auto-fill,var(--total-emoji-size));padding:var(--emoji-padding)}.emoji,button.emoji{border-radius:8px}.favorites{border-top-width:1px}input.search:focus{border-color:var(--input-focused-border-color);outline:0}.picker{container-type:size}@container (height < 300px){.favorites{display:none}}#skintone-button{margin:0 -3px 0 4px}.custom-emoji{padding:0}#emo-🏻,#emo-🏼,#emo-🏽,#emo-🏾,#emo-🏿{display:none}[data-has-mouse] .emoji:hover{background-color:var(--button-hover-background)}",Yv={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var Ep,_p,nl,Ap,gp,Sp={exports:{}};function Gv(){return _p?Ep:(_p=1,Ep="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function Wv(){if(Ap)return nl;Ap=1;var t=Gv();function e(){}function n(){}return n.resetWarningCache=e,nl=function(){function r(s,a,l,u,c,d){if(d!==t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},nl}function Xv(){return gp||(gp=1,Sp.exports=Wv()()),Sp.exports}const Le=zs(Xv()),K=_t(function({className:t,children:e,tabIndex:n,xmlns:r="http://www.w3.org/2000/svg",preserveAspectRatio:i="xMidYMid meet",...o},s){const{tabindex:a,...l}=(function({width:c,height:d,viewBox:h=`0 0 ${c} ${d}`,...p}={}){const{tabindex:f,...m}=p,E={...Yv,...m,width:c,height:d,viewBox:h};return E["aria-label"]||E["aria-labelledby"]?(E.role="img",f!=null&&(E.focusable="true",E.tabindex=f)):E["aria-hidden"]=!0,E})({...o,tabindex:n}),u=l;return t&&(u.className=t),a!=null&&(u.tabIndex=typeof a=="number"?a:Number(n)),s&&(u.ref=s),r&&(u.xmlns=r),i&&(u.preserveAspectRatio=i),F.createElement("svg",u,e)});K.displayName="Icon",K.propTypes={"aria-hidden":Le.oneOfType([Le.bool,Le.oneOf(["true","false"])]),"aria-label":Le.string,"aria-labelledby":Le.string,children:Le.node,className:Le.string,height:Le.oneOfType([Le.number,Le.string]),preserveAspectRatio:Le.string,tabIndex:Le.oneOfType([Le.number,Le.string]),viewBox:Le.string,width:Le.oneOfType([Le.number,Le.string]),xmlns:Le.string};const Kv=F.forwardRef(function({children:t,size:e=16,...n},r){return e===20||e==="20"||e==="20px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},I("path",{d:"M8 13.2 3.6 8.8 2.7 9.7 7.1 14.1 8 15 16.5 6.5 15.6 5.6z"}),I("path",{d:"M15.6 5.6 8 13.2 3.6 8.8 2.7 9.7 7.1 14.1 8 15 16.5 6.5 15.6 5.6z"}),t):e===24||e==="24"||e==="24px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},I("path",{d:"M10 15.9 4.7 10.6 3.6 11.6 8.9 16.9 10 18 20.6 7.4 19.5 6.3z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"}),t)}),qv=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"}),I("path",{d:"M11.5,11A2.5,2.5,0,1,0,14,13.5,2.48,2.48,0,0,0,11.5,11Z"}),I("path",{d:"M20.5,11A2.5,2.5,0,1,0,23,13.5,2.48,2.48,0,0,0,20.5,11Z"}),I("path",{d:"M16,24a8,8,0,0,0,6.85-3.89l-1.71-1a6,6,0,0,1-10.28,0l-1.71,1A8,8,0,0,0,16,24Z"}),t)}),Jv=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M16,22a6,6,0,0,1-5.14-2.92l-1.71,1a8,8,0,0,0,13.7,0l-1.71-1A6,6,0,0,1,16,22Z"}),I("path",{d:"M30 4 26 4 26 0 24 0 24 4 20 4 20 6 24 6 24 10 26 10 26 6 30 6 30 4z"}),I("path",{d:"M11.5,11A2.5,2.5,0,1,0,14,13.5,2.48,2.48,0,0,0,11.5,11Z"}),I("path",{d:"M20.5,11A2.5,2.5,0,1,0,23,13.5,2.48,2.48,0,0,0,20.5,11Z"}),I("path",{d:"M27.61,13A12.33,12.33,0,0,1,28,16,12,12,0,1,1,16,4V2A14,14,0,1,0,29.67,13Z"}),t)}),Zv=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("circle",{cx:"8",cy:"16",r:"2"}),I("circle",{cx:"16",cy:"16",r:"2"}),I("circle",{cx:"24",cy:"16",r:"2"}),t)}),Qv=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("circle",{cx:"16",cy:"8",r:"2"}),I("circle",{cx:"16",cy:"16",r:"2"}),I("circle",{cx:"16",cy:"24",r:"2"}),t)}),eD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},I("path",{d:"M0 5 5 0 5.7.7 1.4 5 5.7 9.3 5 10z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},I("path",{d:"M5 8 10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"}),t)}),tD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},I("path",{d:"M6 5 1 10 .3 9.3 4.6 5 .3.7 1 0z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},I("path",{d:"M11 8 6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"}),t)}),nD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},I("path",{d:"M5 0 10 5 9.3 5.7 5 1.4.7 5.7 0 5z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},I("path",{d:"M8 5 13 10 12.3 10.7 8 6.4 3.7 10.7 3 10z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M16 10 26 20 24.6 21.4 16 12.8 7.4 21.4 6 20z"}),t)}),rD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},I("path",{d:"M5 6 0 1 .7.3 5 4.6 9.3.3 10 1z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},I("path",{d:"M8 11 3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"}),t)}),iD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"}),t)}),oD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm0,26A12,12,0,0,1,16,4V16l8.4812,8.4814A11.9625,11.9625,0,0,1,16,28Z"}),t)}),sD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},I("path",{d:"M13 7 12.3 6.3 8.5 10.1 8.5 1 7.5 1 7.5 10.1 3.7 6.3 3 7 8 12z"}),I("path",{d:"M13,12v2H3v-2H2v2l0,0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1l0,0v-2H13z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M26,24v4H6V24H4v4H4a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2h0V24Z"}),I("path",{d:"M26 14 24.59 12.59 17 20.17 17 2 15 2 15 20.17 7.41 12.59 6 14 16 24 26 14z"}),t)}),aD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M28.1,18.9L13.1,3.9c-2.5-2.6-6.6-2.6-9.2-0.1S1.3,10.5,3.9,13c0,0,0.1,0.1,0.1,0.1L6.8,16l1.4-1.4l-2.9-2.9 C3.6,10,3.6,7.1,5.3,5.4s4.6-1.8,6.3-0.1c0,0,0,0,0.1,0.1l14.9,14.9c1.8,1.7,1.8,4.6,0.1,6.3c-1.7,1.8-4.6,1.8-6.3,0.1 c0,0,0,0-0.1-0.1l-7.4-7.4c-1-1-0.9-2.6,0-3.5c1-0.9,2.5-0.9,3.5,0l4.1,4.1l1.4-1.4c0,0-4.2-4.2-4.2-4.2c-1.8-1.7-4.6-1.6-6.3,0.2 c-1.6,1.7-1.6,4.4,0,6.2l7.5,7.5c2.5,2.6,6.6,2.6,9.2,0.1S30.7,21.5,28.1,18.9C28.1,19,28.1,18.9,28.1,18.9L28.1,18.9z"}),t)}),lD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M27.6 20.6 24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22z"}),I("path",{d:"M9 4 3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z"}),t)}),cD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M28.88,30a1,1,0,0,1-.88-.5A15.19,15.19,0,0,0,15,22v6a1,1,0,0,1-.62.92,1,1,0,0,1-1.09-.21l-12-12a1,1,0,0,1,0-1.42l12-12a1,1,0,0,1,1.09-.21A1,1,0,0,1,15,4v6.11a17.19,17.19,0,0,1,15,17,16.34,16.34,0,0,1-.13,2,1,1,0,0,1-.79.86ZM14.5,20A17.62,17.62,0,0,1,28,26,15.31,15.31,0,0,0,13.91,12,1,1,0,0,1,13,11V6.41L3.41,16,13,25.59V21a1,1,0,0,1,1-1h.54Z"}),t)}),uD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M2 26H30V28H2z"}),I("path",{d:"M25.4,9c0.8-0.8,0.8-2,0-2.8c0,0,0,0,0,0l-3.6-3.6c-0.8-0.8-2-0.8-2.8,0c0,0,0,0,0,0l-15,15V24h6.4L25.4,9z M20.4,4L24,7.6 l-3,3L17.4,7L20.4,4z M6,22v-3.6l10-10l3.6,3.6l-10,10H6z"}),t)}),dD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M12 12H14V24H12z"}),I("path",{d:"M18 12H20V24H18z"}),I("path",{d:"M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"}),I("path",{d:"M12 2H20V4H12z"}),t)}),hD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M28.59,13.31,30,11.9,20,2,18.69,3.42,19.87,4.6,8.38,14.32,6.66,12.61,5.25,14l5.66,5.68L2,28.58,3.41,30l8.91-8.91L18,26.75l1.39-1.42-1.71-1.71L27.4,12.13ZM16.26,22.2,9.8,15.74,21.29,6,26,10.71Z"}),t)}),pD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M7,28a1,1,0,0,1-1-1V5a1,1,0,0,1,1.4819-.8763l20,11a1,1,0,0,1,0,1.7525l-20,11A1.0005,1.0005,0,0,1,7,28Z"}),t)}),fD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M12,6H10A2,2,0,0,0,8,8V24a2,2,0,0,0,2,2h2a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"}),I("path",{d:"M22,6H20a2,2,0,0,0-2,2V24a2,2,0,0,0,2,2h2a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"}),t)}),mD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},I("path",{d:"M8.5 11 8.5 6.5 6.5 6.5 6.5 7.5 7.5 7.5 7.5 11 6 11 6 12 10 12 10 11z"}),I("path",{d:"M8,3.5c-0.4,0-0.8,0.3-0.8,0.8S7.6,5,8,5c0.4,0,0.8-0.3,0.8-0.8S8.4,3.5,8,3.5z"}),I("path",{d:"M8,15c-3.9,0-7-3.1-7-7s3.1-7,7-7s7,3.1,7,7S11.9,15,8,15z M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z"}),I("path",{d:"M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z"}),I("path",{d:"M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"}),t)}),ED=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},I("path",{d:"M3.7 6.7 7.5 2.9 7.5 15 8.5 15 8.5 2.9 12.3 6.7 13 6 8 1 3 6z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M16 4 6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z"}),t)}),_D=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},I("path",{d:"M6.7 12.3 2.9 8.5 15 8.5 15 7.5 2.9 7.5 6.7 3.7 6 3 1 8 6 13z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M14 26 15.41 24.59 7.83 17 28 17 28 15 7.83 15 15.41 7.41 14 6 4 16 14 26z"}),t)}),AD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},I("path",{d:"M9.3 3.7 13.1 7.5 1 7.5 1 8.5 13.1 8.5 9.3 12.3 10 13 15 8 10 3z"}),t):e===20||e==="20"||e==="20px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},I("path",{d:"M11.8 2.8 10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"}),t):e===24||e==="24"||e==="24px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},I("path",{d:"M14 4 12.9 5.1 18.9 11.2 2 11.2 2 12.8 18.9 12.8 12.9 18.9 14 20 22 12z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"}),t)}),gD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},I("path",{d:"M12.3 9.3 8.5 13.1 8.5 1 7.5 1 7.5 13.1 3.7 9.3 3 10 8 15 13 10z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M24.59 16.59 17 24.17 17 4 15 4 15 24.17 7.41 16.59 6 18 16 28 26 18 24.59 16.59z"}),t)}),SD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M16,18a5,5,0,1,1,5-5A5.0057,5.0057,0,0,1,16,18Zm0-8a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,16,10Z"}),I("path",{d:"M16,30,7.5645,20.0513c-.0479-.0571-.3482-.4515-.3482-.4515A10.8888,10.8888,0,0,1,5,13a11,11,0,0,1,22,0,10.8844,10.8844,0,0,1-2.2148,6.5973l-.0015.0025s-.3.3944-.3447.4474ZM8.8125,18.395c.001.0007.2334.3082.2866.3744L16,26.9079l6.91-8.15c.0439-.0552.2783-.3649.2788-.3657A8.901,8.901,0,0,0,25,13,9,9,0,1,0,7,13a8.9054,8.9054,0,0,0,1.8125,5.395Z"}),t)}),OD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M23,14v3A7,7,0,0,1,9,17V14H7v3a9,9,0,0,0,8,8.94V28H11v2H21V28H17V25.94A9,9,0,0,0,25,17V14Z"}),I("path",{d:"M16,22a5,5,0,0,0,5-5V7A5,5,0,0,0,11,7V17A5,5,0,0,0,16,22ZM13,7a3,3,0,0,1,6,0V17a3,3,0,0,1-6,0Z"}),t)}),vD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M24,6H8A2,2,0,0,0,6,8V24a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"}),t)}),DD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M19,14a3,3,0,1,0-3-3A3,3,0,0,0,19,14Zm0-4a1,1,0,1,1-1,1A1,1,0,0,1,19,10Z"}),I("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4Zm0,22H6V20l5-5,5.59,5.59a2,2,0,0,0,2.82,0L21,19l5,5Zm0-4.83-3.59-3.59a2,2,0,0,0-2.82,0L18,19.17l-5.59-5.59a2,2,0,0,0-2.82,0L6,17.17V6H26Z"}),t)}),TD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M21,26H4a2,2,0,0,1-2-2V8A2,2,0,0,1,4,6H21a2,2,0,0,1,2,2v4.06l5.42-3.87A1,1,0,0,1,30,9V23a1,1,0,0,1-1.58.81L23,19.94V24A2,2,0,0,1,21,26ZM4,8V24H21V18a1,1,0,0,1,1.58-.81L28,21.06V10.94l-5.42,3.87A1,1,0,0,1,21,14V8Z"}),t)});function re(t){const{type:e,className:n,...r}=t;return I(RD[e],{className:`t-theme-icon ${n||""}`,...r})}const RD={checkmark:Kv,emoji:qv,addEmoji:Jv,search:F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},I("path",{d:"M15,14.3L10.7,10c1.9-2.3,1.6-5.8-0.7-7.7S4.2,0.7,2.3,3S0.7,8.8,3,10.7c2,1.7,5,1.7,7,0l4.3,4.3L15,14.3z M2,6.5 C2,4,4,2,6.5,2S11,4,11,6.5S9,11,6.5,11S2,9,2,6.5z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z"}),t)}),plus:F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M17 15 17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"}),t)}),email:F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M28,6H4A2,2,0,0,0,2,8V24a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V8A2,2,0,0,0,28,6ZM25.8,8,16,14.78,6.2,8ZM4,24V8.91l11.43,7.91a1,1,0,0,0,1.14,0L28,8.91V24Z"}),t)}),horizontalDots:Zv,verticalDots:Qv,chevronLeft:eD,chevronRight:tD,chevronUp:nD,chevronDown:rD,arrowsVertical:lD,arrowUp:ED,arrowLeft:_D,arrowRight:AD,arrowDown:gD,close:iD,inProgress:oD,download:sD,attachment:aD,reply:cD,edit:uD,trash:dD,pin:hD,play:pD,pause:fD,info:mD,send:F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},I("path",{d:"M27.45,15.11l-22-11a1,1,0,0,0-1.08.12,1,1,0,0,0-.33,1L7,16,4,26.74A1,1,0,0,0,5,28a1,1,0,0,0,.45-.11l22-11a1,1,0,0,0,0-1.78Zm-20.9,10L8.76,17H18V15H8.76L6.55,6.89,24.76,16Z"}),t)}),location:SD,microphone:OD,stop:vD,spinner:function(t){const e=`t-spin ${t.className||""}`;return I("svg",{xmlns:"http://www.w3.org/2000/svg",id:"icon",width:t.size,height:t.size,viewBox:"0 0 32 32",preserveAspectRatio:"xMidYMid meet",fill:"currentColor",focusable:"false",...t,className:e,children:I("path",{d:"M16,28c-6.6167,0-12-5.3832-12-12S9.3833,4,16,4c2.335,0,4.5986,.6714,6.5461,1.9414l-1.0923,1.6753c-1.6221-1.0576-3.5078-1.6167-5.4539-1.6167-5.5139,0-10,4.486-10,10s4.4861,10,10,10c1.946,0,3.8318-.5591,5.4539-1.6167l1.0923,1.6753c-1.9475,1.27-4.2112,1.9414-6.5461,1.9414Z"})})},image:DD,movie:TD};function lu(){return I(re,{type:"spinner","aria-label":J(oe().t$).LOADING,className:"t-loading-icon"})}const L_={"emoji-picker-element":"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/+esm","mpegts.js":"https://cdn.jsdelivr.net/npm/mpegts.js@1.7.3","opus-media-recorder-wasm":"https://cdn.jsdelivr.net/npm/opus-media-recorder@0.8.0/WebMOpusEncoder.wasm"};async function ID(t,e){if(typeof window=="undefined"||window.document===void 0)return new Promise(()=>{});try{const n=t!=null?t:jr.emojiPickerTranslationUrl,r=L_["emoji-picker-element"],[i,o]=await Promise.all([Op(r),Op(n)]),s=e!=null?e:jr.emojiDataUrl,a={...i,i18n:o.default,dataSource:s};return await new a.Database({dataSource:s}).ready(),a}catch(n){return Nl.error("Failed to load emoji picker:",n),new Promise(()=>{})}}async function Op(t){return import(t).catch(()=>new Function("url","return import(url)")(t)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}function cu(){const t=oe(),[e,n]=ne();return Lm(()=>{const r=t.translationData$.get();t.app$.get()&&t.currentUser$.get()&&r&&(function(i,o){const s=JSON.stringify([i,o]);if(rl[s])return rl[s];const a=ID(i,o);return rl[s]=a,a})(r.emojiPickerTranslationUrl,r.emojiDataUrl).then(i=>n({value:i}))},[]),e}const rl={};function uu(t){const{onClose:e,onEmojiSelected:n}=Wg(),r=X(null),i=oe(),o=J(i.t$),s=cu();return G(()=>{if(!s)return;ie.defined(r.current);const a=r.current,l=a.shadowRoot;(function(d,h){const p=document.createElement("style");p.textContent=h,d.appendChild(p)})(l,zv);const u=d=>{var p;const h=(p=d.detail.unicode)!=null?p:d.detail.name;n(h)};function c(d){d.pointerType==="mouse"&&(l.querySelector("section").dataset.hasMouse="true")}return a.addEventListener("emoji-click",u),a.addEventListener("pointermove",c,{once:!0}),a.i18n=s.value.i18n,()=>{a.removeEventListener("emoji-click",u),a.removeEventListener("pointermove",c)}},[s,n]),G(()=>{var a;s&&r.current&&!i.device$.isMobile.peek()&&((a=r.current.shadowRoot.getElementById("search"))==null||a.focus())},[s,i]),mo(()=>e(),".t-emoji-picker"),I("div",s?{className:"t-emoji-picker",children:I("emoji-picker",{locale:o.locale,ref:r,class:t.colorScheme,"data-source":s.value.dataSource})}:{className:"t-emoji-picker","t-loading":"",children:I(lu,{})})}function M_({messageId:t,colorScheme:e}){const{closePopover:n}=Fc(),r=Ar();return I("div",{className:"t-reaction-picker",children:I($m.Provider,{value:{onClose:n,onEmojiSelected:i=>{r.addReaction(t,i),n()}},children:I(uu,{colorScheme:e})})})}function Ql(){return Ql=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ql.apply(null,arguments)}function P_(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function ec(t,e){return ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ec(t,e)}function x_(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ec(t,e)}var vp,Dp,il,Tp,Rp,Ip={exports:{}};function yD(){if(Tp)return il;Tp=1;var t=Dp?vp:(Dp=1,vp="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function e(){}function n(){}return n.resetWarningCache=e,il=function(){function r(s,a,l,u,c,d){if(d!==t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}function i(){return r}r.isRequired=r;var o={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},il}function yp(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}Rp||(Rp=1,Ip.exports=yD()()),Ip.exports;const Cp=!1,F_=F.createContext(null);var Di="unmounted",zn="exited",Yn="entering",kr="entered",tc="exiting",sn=(function(t){function e(r,i){var o;o=t.call(this,r,i)||this;var s,a=i&&!i.isMounting?r.enter:r.appear;return o.appearStatus=null,r.in?a?(s=zn,o.appearStatus=Yn):s=kr:s=r.unmountOnExit||r.mountOnEnter?Di:zn,o.state={status:s},o.nextCallback=null,o}x_(e,t),e.getDerivedStateFromProps=function(r,i){return r.in&&i.status===Di?{status:zn}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var i=null;if(r!==this.props){var o=this.state.status;this.props.in?o!==Yn&&o!==kr&&(i=Yn):o!==Yn&&o!==kr||(i=tc)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r,i,o,s=this.props.timeout;return r=i=o=s,s!=null&&typeof s!="number"&&(r=s.exit,i=s.enter,o=s.appear!==void 0?s.appear:i),{exit:r,enter:i,appear:o}},n.updateStatus=function(r,i){r===void 0&&(r=!1),i!==null?(this.cancelNextCallback(),i===Yn?this.performEnter(r):this.performExit()):this.props.unmountOnExit&&this.state.status===zn&&this.setState({status:Di})},n.performEnter=function(r){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:r,a=this.props.nodeRef?[s]:[F.findDOMNode(this),s],l=a[0],u=a[1],c=this.getTimeouts(),d=s?c.appear:c.enter;!r&&!o||Cp?this.safeSetState({status:kr},function(){i.props.onEntered(l)}):(this.props.onEnter(l,u),this.safeSetState({status:Yn},function(){i.props.onEntering(l,u),i.onTransitionEnd(d,function(){i.safeSetState({status:kr},function(){i.props.onEntered(l,u)})})}))},n.performExit=function(){var r=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:F.findDOMNode(this);i&&!Cp?(this.props.onExit(s),this.safeSetState({status:tc},function(){r.props.onExiting(s),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:zn},function(){r.props.onExited(s)})})})):this.safeSetState({status:zn},function(){r.props.onExited(s)})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},n.setNextCallback=function(r){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,r(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(r,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:F.findDOMNode(this),s=r==null&&!this.props.addEndListener;if(o&&!s){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=a[0],u=a[1];this.props.addEndListener(l,u)}r!=null&&setTimeout(this.nextCallback,r)}else setTimeout(this.nextCallback,0)},n.render=function(){var r=this.state.status;if(r===Di)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=P_(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return F.createElement(F_.Provider,{value:null},typeof o=="function"?o(r,s):F.cloneElement(F.Children.only(o),s))},e})(F.Component);function Nr(){}sn.contextType=F_,sn.propTypes={},sn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Nr,onEntering:Nr,onEntered:Nr,onExit:Nr,onExiting:Nr,onExited:Nr},sn.UNMOUNTED=Di,sn.EXITED=zn,sn.ENTERING=Yn,sn.ENTERED=kr,sn.EXITING=tc;var ol=function(t,e){return t&&e&&e.split(" ").forEach(function(n){return i=n,void((r=t).classList?r.classList.remove(i):typeof r.className=="string"?r.className=yp(r.className,i):r.setAttribute("class",yp(r.className&&r.className.baseVal||"",i)));var r,i})},nc=(function(t){function e(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=t.call.apply(t,[this].concat(o))||this).appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1];r.removeClasses(c,"exit"),r.addClass(c,d?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1]?"appear":"enter";r.addClass(c,d,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1]?"appear":"enter";r.removeClasses(c,d),r.addClass(c,d,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a)[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,u=typeof l=="string",c=u?(u&&l?l+"-":"")+a:l[a];return{baseClassName:c,activeClassName:u?c+"-active":l[a+"Active"],doneClassName:u?c+"-done":l[a+"Done"]}},r}x_(e,t);var n=e.prototype;return n.addClass=function(r,i,o){var s=this.getClassNames(i)[o+"ClassName"],a=this.getClassNames("enter").doneClassName;i==="appear"&&o==="done"&&a&&(s+=" "+a),o==="active"&&r&&r.scrollTop,s&&(this.appliedClasses[i][o]=s,(function(l,u){l&&u&&u.split(" ").forEach(function(c){return h=c,void((d=l).classList?d.classList.add(h):(function(p,f){return p.classList?!!f&&p.classList.contains(f):(" "+(p.className.baseVal||p.className)+" ").indexOf(" "+f+" ")!==-1})(d,h)||(typeof d.className=="string"?d.className=d.className+" "+h:d.setAttribute("class",(d.className&&d.className.baseVal||"")+" "+h)));var d,h})})(r,s))},n.removeClasses=function(r,i){var o=this.appliedClasses[i],s=o.base,a=o.active,l=o.done;this.appliedClasses[i]={},s&&ol(r,s),a&&ol(r,a),l&&ol(r,l)},n.render=function(){var r=this.props;r.classNames;var i=P_(r,["classNames"]);return F.createElement(sn,Ql({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e})(F.Component);nc.defaultProps={classNames:""},nc.propTypes={};const CD={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function H_(t,{focused:e,setFocused:n,itemCount:r,dir:i,onConfirm:o,onSpace:s}){if(r===0)return!1;const a=c=>{var d,h,p;d=0,h=c,p=r-1,c=Math.max(d,Math.min(h,p)),n(c)},[l,u]=CD[i];switch(t){case l:return a(e-1),!0;case u:return a(e+1),!0;case" ":return!!s&&s();case"Enter":case"Tab":return o(),!0}return!1}function U_({focused:t,setFocused:e,buttonId:n}){Ze(()=>{var a;const s=n(t);s&&((a=document.getElementById(s))==null||a.scrollIntoView({block:"nearest"}))},[t,n]);const r=q(s=>{const a=s.currentTarget.dataset.index;e(+a)},[e]),i=te(()=>({role:"menu","aria-activedescendant":n(t)}),[t,n]),o=q(s=>({onMouseMove:r,id:n(s),"data-index":s}),[r,n]);return{containerProps:i,itemProps:o}}function B_(t){const[e,n]=ne([]),[r,i]=ne([]),[o,s]=ne(0),[a,l]=ne(0),u=cu(),c=te(()=>(u==null?void 0:u.value)&&new u.value.Database({dataSource:u.value.dataSource}),[u]),d=lo(),h=J(d.state$.suggestEmojiQuery);G(()=>{c&&(h?(async function(){const A=await c.getPreferredSkinTone();l(A);let O=await c.getEmojiBySearchQuery(h);if(O=O.filter(S=>S.url||(function(v){return v.version<=Ym&&!bD.includes(v.unicode)})(S)),(function(S,v){v.sort((T,R)=>{var D,C;const y=(D=T.shortcodes)==null?void 0:D.find(N=>N.startsWith(S)),g=(C=R.shortcodes)==null?void 0:C.find(N=>N.startsWith(S));return y&&!g?-1:!y&&g?1:y&&g?y.length-g.length:0})})(h.substring(1),O),s(0),n(O),O.length>0&&i(O),h.endsWith(":")){const S=h.slice(1,-1),v=O.find(T=>{var R;return(R=T.shortcodes)==null?void 0:R.includes(S)});v&&d.selectEmoji(Ti(v,A))}})():n([]))},[h,d,c]);const p=q(A=>{const O=e[A];return O&&"emoji-button-"+Ti(O,a)},[e,a]),{containerProps:f,itemProps:m}=U_({focused:o,setFocused:s,buttonId:p}),E=e.length>0;mo(()=>d.closeSuggester(),".t-emoji-suggest-bar",E),G(()=>{if(E)return d.listenKeydown("emoji",A=>H_(A,{dir:"ltr",focused:o,setFocused:s,itemCount:e.length,onConfirm(){const O=e[o];ie.defined(O),d.selectEmoji(Ti(O,a))}})),()=>{d.listenKeydown("emoji",void 0)};d.listenKeydown("emoji",void 0)},[d,e,o,E,a]);const _=X(null);return I(nc,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:_,children:I("div",{className:"t-emoji-suggest-bar",ref:_,...f,children:r.map((A,O)=>I(ND,{emoji:A,skinTone:a,focused:O===o,onSelect:S=>d.selectEmoji(S),...m(O)},Ti(A,a)))})})}function Ti(t,e){return rc(t)?j_(t,e):t.name}function rc(t){return!!t.unicode}function ND(t){var l;const{emoji:e,focused:n,skinTone:r,onSelect:i,...o}=t,s=((l=e.shortcodes)!=null?l:[]).join(", "),a=rc(e)?[e.unicode,s].join(", "):s;return I("button",{"t-focused":n?"":void 0,title:s,"aria-label":a,onClick:()=>i(Ti(e,r)),...o,children:rc(e)?j_(e,r):null})}function j_(t,e){var r,i;const n=(r=t.skins)==null?void 0:r.find(o=>o.tone===e);return(i=n==null?void 0:n.unicode)!=null?i:t.unicode}const bD=["🏻","🏼","🏽","🏾","🏿"],wD=["top","right","bottom","left"],vs=Math.min,or=Math.max,Ds=Math.round,Fo=Math.floor,Xt=t=>({x:t,y:t}),kD={left:"right",right:"left",bottom:"top",top:"bottom"},LD={start:"end",end:"start"};function Np(t,e,n){return or(t,vs(e,n))}function Eo(t,e){return typeof t=="function"?t(e):t}function hr(t){return t.split("-")[0]}function ea(t){return t.split("-")[1]}function $_(t){return t==="x"?"y":"x"}function V_(t){return t==="y"?"height":"width"}const MD=new Set(["top","bottom"]);function bn(t){return MD.has(hr(t))?"y":"x"}function z_(t){return $_(bn(t))}function ic(t){return t.replace(/start|end/g,e=>LD[e])}const bp=["left","right"],wp=["right","left"],PD=["top","bottom"],xD=["bottom","top"];function FD(t,e,n,r){const i=ea(t);let o=(function(s,a,l){switch(s){case"top":case"bottom":return l?a?wp:bp:a?bp:wp;case"left":case"right":return a?PD:xD;default:return[]}})(hr(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(ic)))),o}function Ho(t){return t.replace(/left|right|bottom|top/g,e=>kD[e])}function Ts(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function kp(t,e,n){let{reference:r,floating:i}=t;const o=bn(e),s=z_(e),a=V_(s),l=hr(e),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ea(e)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1)}return p}async function Rs(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Eo(e,t),f=(function(v){return typeof v!="number"?(function(T){return{top:0,right:0,bottom:0,left:0,...T}})(v):{top:v,right:v,bottom:v,left:v}})(p),m=a[h?d==="floating"?"reference":"floating":d],E=Ts(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(m)))==null||n?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),_=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),O=await(o.isElement==null?void 0:o.isElement(A))&&await(o.getScale==null?void 0:o.getScale(A))||{x:1,y:1},S=Ts(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:A,strategy:l}):_);return{top:(E.top-S.top+f.top)/O.y,bottom:(S.bottom-E.bottom+f.bottom)/O.y,left:(E.left-S.left+f.left)/O.x,right:(S.right-E.right+f.right)/O.x}}function Lp(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Mp(t){return wD.some(e=>t[e]>=0)}const HD=new Set(["left","top"]);function ta(){return typeof window!="undefined"}function ri(t){return du(t)?(t.nodeName||"").toLowerCase():"#document"}function Tt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Kt(t){var e;return(e=(du(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function du(t){return!!ta()&&(t instanceof Node||t instanceof Tt(t).Node)}function Pt(t){return!!ta()&&(t instanceof Element||t instanceof Tt(t).Element)}function Jt(t){return!!ta()&&(t instanceof HTMLElement||t instanceof Tt(t).HTMLElement)}function oc(t){return!(!ta()||typeof ShadowRoot=="undefined")&&(t instanceof ShadowRoot||t instanceof Tt(t).ShadowRoot)}const UD=new Set(["inline","contents"]);function Ji(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=xt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!UD.has(i)}const BD=new Set(["table","td","th"]);function jD(t){return BD.has(ri(t))}const $D=[":popover-open",":modal"];function Is(t){return $D.some(e=>{try{return t.matches(e)}catch(n){return!1}})}const VD=["transform","translate","scale","rotate","perspective"],zD=["transform","translate","scale","rotate","perspective","filter"],YD=["paint","layout","strict","content"];function sc(t){const e=hu(),n=Pt(t)?xt(t):t;return VD.some(r=>!!n[r]&&n[r]!=="none")||!!n.containerType&&n.containerType!=="normal"||!e&&!!n.backdropFilter&&n.backdropFilter!=="none"||!e&&!!n.filter&&n.filter!=="none"||zD.some(r=>(n.willChange||"").includes(r))||YD.some(r=>(n.contain||"").includes(r))}function hu(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const GD=new Set(["html","body","#document"]);function Yr(t){return GD.has(ri(t))}function xt(t){return Tt(t).getComputedStyle(t)}function na(t){return Pt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function wn(t){if(ri(t)==="html")return t;const e=t.assignedSlot||t.parentNode||oc(t)&&t.host||Kt(t);return oc(e)?e.host:e}function Y_(t){const e=wn(t);return Yr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Jt(e)&&Ji(e)?e:Y_(e)}function Zi(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Y_(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=Tt(i);if(o){const a=ac(s);return e.concat(s,s.visualViewport||[],Ji(i)?i:[],a&&n?Zi(a):[])}return e.concat(i,Zi(i,[],n))}function ac(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function G_(t){const e=xt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Jt(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Ds(n)!==o||Ds(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function pu(t){return Pt(t)?t:t.contextElement}function Gr(t){const e=pu(t);if(!Jt(e))return Xt(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=G_(e);let s=(o?Ds(n.width):n.width)/r,a=(o?Ds(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const WD=Xt(0);function W_(t){const e=Tt(t);return hu()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:WD}function pr(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=pu(t);let s=Xt(1);e&&(r?Pt(r)&&(s=Gr(r)):s=Gr(t));const a=(function(h,p,f){return p===void 0&&(p=!1),!(!f||p&&f!==Tt(h))&&p})(o,n,r)?W_(o):Xt(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const h=Tt(o),p=r&&Pt(r)?Tt(r):r;let f=h,m=ac(f);for(;m&&r&&p!==f;){const E=Gr(m),_=m.getBoundingClientRect(),A=xt(m),O=_.left+(m.clientLeft+parseFloat(A.paddingLeft))*E.x,S=_.top+(m.clientTop+parseFloat(A.paddingTop))*E.y;l*=E.x,u*=E.y,c*=E.x,d*=E.y,l+=O,u+=S,f=Tt(m),m=ac(f)}}return Ts({width:c,height:d,x:l,y:u})}function ys(t,e){const n=na(t).scrollLeft;return e?e.left+n:pr(Kt(t)).left+n}function X_(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-ys(t,n),y:n.top+e.scrollTop}}const XD=new Set(["absolute","fixed"]);function Pp(t,e,n){let r;if(e==="viewport")r=(function(i,o){const s=Tt(i),a=Kt(i),l=s.visualViewport;let u=a.clientWidth,c=a.clientHeight,d=0,h=0;if(l){u=l.width,c=l.height;const f=hu();(!f||f&&o==="fixed")&&(d=l.offsetLeft,h=l.offsetTop)}const p=ys(a);if(p<=0){const f=a.ownerDocument,m=f.body,E=getComputedStyle(m),_=f.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,A=Math.abs(a.clientWidth-m.clientWidth-_);A<=25&&(u-=A)}else p<=25&&(u+=p);return{width:u,height:c,x:d,y:h}})(t,n);else if(e==="document")r=(function(i){const o=Kt(i),s=na(i),a=i.ownerDocument.body,l=or(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),u=or(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let c=-s.scrollLeft+ys(i);const d=-s.scrollTop;return xt(a).direction==="rtl"&&(c+=or(o.clientWidth,a.clientWidth)-l),{width:l,height:u,x:c,y:d}})(Kt(t));else if(Pt(e))r=(function(i,o){const s=pr(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,u=Jt(i)?Gr(i):Xt(1);return{width:i.clientWidth*u.x,height:i.clientHeight*u.y,x:l*u.x,y:a*u.y}})(e,n);else{const i=W_(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ts(r)}function K_(t,e){const n=wn(t);return!(n===e||!Pt(n)||Yr(n))&&(xt(n).position==="fixed"||K_(n,e))}function KD(t,e,n){const r=Jt(e),i=Kt(e),o=n==="fixed",s=pr(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Xt(0);function u(){l.x=ys(i)}if(r||!r&&!o)if((ri(e)!=="body"||Ji(i))&&(a=na(e)),r){const d=pr(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&u();o&&!r&&i&&u();const c=!i||r||o?Xt(0):X_(i,a);return{x:s.left+a.scrollLeft-l.x-c.x,y:s.top+a.scrollTop-l.y-c.y,width:s.width,height:s.height}}function sl(t){return xt(t).position==="static"}function xp(t,e){if(!Jt(t)||xt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Kt(t)===n&&(n=n.ownerDocument.body),n}function Fp(t,e){const n=Tt(t);if(Is(t))return n;if(!Jt(t)){let i=wn(t);for(;i&&!Yr(i);){if(Pt(i)&&!sl(i))return i;i=wn(i)}return n}let r=xp(t,e);for(;r&&jD(r)&&sl(r);)r=xp(r,e);return r&&Yr(r)&&sl(r)&&!sc(r)?n:r||(function(i){let o=wn(i);for(;Jt(o)&&!Yr(o);){if(sc(o))return o;if(Is(o))return null;o=wn(o)}return null})(t)||n}const qD={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=Kt(r),a=!!e&&Is(e.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Xt(1);const c=Xt(0),d=Jt(r);if((d||!d&&!o)&&((ri(r)!=="body"||Ji(s))&&(l=na(r)),Jt(r))){const p=pr(r);u=Gr(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}const h=!s||d||o?Xt(0):X_(s,l);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}},getDocumentElement:Kt,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=n==="clippingAncestors"?Is(e)?[]:(function(u,c){const d=c.get(u);if(d)return d;let h=Zi(u,[],!1).filter(E=>Pt(E)&&ri(E)!=="body"),p=null;const f=xt(u).position==="fixed";let m=f?wn(u):u;for(;Pt(m)&&!Yr(m);){const E=xt(m),_=sc(m);_||E.position!=="fixed"||(p=null),(f?!_&&!p:!_&&E.position==="static"&&p&&XD.has(p.position)||Ji(m)&&!_&&K_(u,m))?h=h.filter(A=>A!==m):p=E,m=wn(m)}return c.set(u,h),h})(e,this._c):[].concat(n),s=[...o,r],a=s[0],l=s.reduce((u,c)=>{const d=Pp(e,c,i);return u.top=or(d.top,u.top),u.right=vs(d.right,u.right),u.bottom=vs(d.bottom,u.bottom),u.left=or(d.left,u.left),u},Pp(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Fp,getElementRects:async function(t){const e=this.getOffsetParent||Fp,n=this.getDimensions,r=await n(t.floating);return{reference:KD(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=G_(t);return{width:e,height:n}},getScale:Gr,isElement:Pt,isRTL:function(t){return xt(t).direction==="rtl"}};function Hp(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function q_(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=pu(t),c=i||o?[...u?Zi(u):[],...Zi(e)]:[];c.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const d=u&&a?(function(E,_){let A,O=null;const S=Kt(E);function v(){var T;clearTimeout(A),(T=O)==null||T.disconnect(),O=null}return(function T(R,y){R===void 0&&(R=!1),y===void 0&&(y=1),v();const g=E.getBoundingClientRect(),{left:D,top:C,width:N,height:k}=g;if(R||_(),!N||!k)return;const b={rootMargin:-Fo(C)+"px "+-Fo(S.clientWidth-(D+N))+"px "+-Fo(S.clientHeight-(C+k))+"px "+-Fo(D)+"px",threshold:or(0,vs(1,y))||1};let L=!0;function x(P){const B=P[0].intersectionRatio;if(B!==y){if(!L)return T();B?T(!1,B):A=setTimeout(()=>{T(!1,1e-7)},1e3)}B!==1||Hp(g,E.getBoundingClientRect())||T(),L=!1}try{O=new IntersectionObserver(x,{...b,root:S.ownerDocument})}catch(P){O=new IntersectionObserver(x,b)}O.observe(E)})(!0),v})(u,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver(E=>{let[_]=E;_&&_.target===u&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var A;(A=f)==null||A.observe(e)})),n()}),u&&!l&&f.observe(u),f.observe(e));let m=l?pr(t):null;return l&&(function E(){const _=pr(t);m&&!Hp(m,_)&&n(),m=_,h=requestAnimationFrame(E)})(),n(),()=>{var E;c.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),d==null||d(),(E=f)==null||E.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const JD=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=e,l=await(async function(u,c){const{placement:d,platform:h,elements:p}=u,f=await(h.isRTL==null?void 0:h.isRTL(p.floating)),m=hr(d),E=ea(d),_=bn(d)==="y",A=HD.has(m)?-1:1,O=f&&_?-1:1,S=Eo(c,u);let{mainAxis:v,crossAxis:T,alignmentAxis:R}=typeof S=="number"?{mainAxis:S,crossAxis:0,alignmentAxis:null}:{mainAxis:S.mainAxis||0,crossAxis:S.crossAxis||0,alignmentAxis:S.alignmentAxis};return E&&typeof R=="number"&&(T=E==="end"?-1*R:R),_?{x:T*O,y:v*A}:{x:v*A,y:T*O}})(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},ZD=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:E=>{let{x:_,y:A}=E;return{x:_,y:A}}},...l}=Eo(t,e),u={x:n,y:r},c=await Rs(e,l),d=bn(hr(i)),h=$_(d);let p=u[h],f=u[d];if(o){const E=h==="y"?"bottom":"right";p=Np(p+c[h==="y"?"top":"left"],p,p-c[E])}if(s){const E=d==="y"?"bottom":"right";f=Np(f+c[d==="y"?"top":"left"],f,f-c[E])}const m=a.fn({...e,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[d]:s}}}}}},QD=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...E}=Eo(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const _=hr(i),A=bn(a),O=hr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),v=h||(O||!m?[Ho(a)]:(function(b){const L=Ho(b);return[ic(b),L,ic(L)]})(a)),T=f!=="none";!h&&T&&v.push(...FD(a,m,f,S));const R=[a,...v],y=await Rs(e,E),g=[];let D=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&g.push(y[_]),d){const b=(function(L,x,P){P===void 0&&(P=!1);const B=ea(L),V=z_(L),$=V_(V);let z=V==="x"?B===(P?"end":"start")?"right":"left":B==="start"?"bottom":"top";return x.reference[$]>x.floating[$]&&(z=Ho(z)),[z,Ho(z)]})(i,s,S);g.push(y[b[0]],y[b[1]])}if(D=[...D,{placement:i,overflows:g}],!g.every(b=>b<=0)){var C,N;const b=(((C=o.flip)==null?void 0:C.index)||0)+1,L=R[b];if(L&&(!(d==="alignment"&&A!==bn(L))||D.every(P=>bn(P.placement)!==A||P.overflows[0]>0)))return{data:{index:b,overflows:D},reset:{placement:L}};let x=(N=D.filter(P=>P.overflows[0]<=0).sort((P,B)=>P.overflows[1]-B.overflows[1])[0])==null?void 0:N.placement;if(!x)switch(p){case"bestFit":{var k;const P=(k=D.filter(B=>{if(T){const V=bn(B.placement);return V===A||V==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(V=>V>0).reduce((V,$)=>V+$,0)]).sort((B,V)=>B[1]-V[1])[0])==null?void 0:k[0];P&&(x=P);break}case"initialPlacement":x=a}if(i!==x)return{reset:{placement:x}}}return{}}}},eT=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=Eo(t,e);switch(r){case"referenceHidden":{const o=Lp(await Rs(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Mp(o)}}}case"escaped":{const o=Lp(await Rs(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:Mp(o)}}}default:return{}}}}},tT=(t,e,n)=>{const r=new Map,i={platform:qD,...n},o={...i.platform,_c:r};return(async(s,a,l)=>{const{placement:u="bottom",strategy:c="absolute",middleware:d=[],platform:h}=l,p=d.filter(Boolean),f=await(h.isRTL==null?void 0:h.isRTL(a));let m=await h.getElementRects({reference:s,floating:a,strategy:c}),{x:E,y:_}=kp(m,u,f),A=u,O={},S=0;for(let v=0;v<p.length;v++){const{name:T,fn:R}=p[v],{x:y,y:g,data:D,reset:C}=await R({x:E,y:_,initialPlacement:u,placement:A,strategy:c,middlewareData:O,rects:m,platform:h,elements:{reference:s,floating:a}});E=y!=null?y:E,_=g!=null?g:_,O={...O,[T]:{...O[T],...D}},C&&S<=50&&(S++,typeof C=="object"&&(C.placement&&(A=C.placement),C.rects&&(m=C.rects===!0?await h.getElementRects({reference:s,floating:a,strategy:c}):C.rects),{x:E,y:_}=kp(m,A,f)),v=-1)}return{x:E,y:_,placement:A,strategy:c,middlewareData:O}})(t,e,{...i,platform:o})};var Jo=typeof document!="undefined"?Ze:function(){};function Cs(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Cs(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if((o!=="_owner"||!t.$$typeof)&&!Cs(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}function J_(t){return typeof window=="undefined"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Up(t,e){const n=J_(t);return Math.round(e*n)/n}function al(t){const e=X(t);return Jo(()=>{e.current=t}),e}function Z_(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,d]=ne({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,p]=ne(r);Cs(h,r)||p(r);const[f,m]=ne(null),[E,_]=ne(null),A=q(B=>{B!==T.current&&(T.current=B,m(B))},[]),O=q(B=>{B!==R.current&&(R.current=B,_(B))},[]),S=o||f,v=s||E,T=X(null),R=X(null),y=X(c),g=l!=null,D=al(l),C=al(i),N=al(u),k=q(()=>{if(!T.current||!R.current)return;const B={placement:e,strategy:n,middleware:h};C.current&&(B.platform=C.current),tT(T.current,R.current,B).then(V=>{const $={...V,isPositioned:N.current!==!1};b.current&&!Cs(y.current,$)&&(y.current=$,xs(()=>{d($)}))})},[h,e,n,C,N]);Jo(()=>{u===!1&&y.current.isPositioned&&(y.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[u]);const b=X(!1);Jo(()=>(b.current=!0,()=>{b.current=!1}),[]),Jo(()=>{if(S&&(T.current=S),v&&(R.current=v),S&&v){if(D.current)return D.current(S,v,k);k()}},[S,v,k,D,g]);const L=te(()=>({reference:T,floating:R,setReference:A,setFloating:O}),[A,O]),x=te(()=>({reference:S,floating:v}),[S,v]),P=te(()=>{const B={position:n,left:0,top:0};if(!x.floating)return B;const V=Up(x.floating,c.x),$=Up(x.floating,c.y);return a?{...B,transform:"translate("+V+"px, "+$+"px)",...J_(x.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:$}},[n,a,x.floating,c.x,c.y]);return te(()=>({...c,update:k,refs:L,elements:x,floatingStyles:P}),[c,k,L,x,P])}const nT=(t,e)=>({...ZD(t),options:[t,e]}),Q_=(t,e)=>({...QD(t),options:[t,e]}),rT=(t,e)=>({...eT(t),options:[t,e]});var eA=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ns=eA.join(","),tA=typeof Element=="undefined",fr=tA?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zo=!tA&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Qi=function(t,e){var n;e===void 0&&(e=!0);var r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert");return r===""||r==="true"||e&&t&&Qi(t.parentNode)},nA=function(t,e,n){if(Qi(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(Ns));return e&&fr.call(t,Ns)&&r.unshift(t),r=r.filter(n)},bs=function(t,e,n){for(var r=[],i=Array.from(t);i.length;){var o=i.shift();if(!Qi(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),a=s.length?s:o.children,l=bs(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{fr.call(o,Ns)&&n.filter(o)&&(e||!t.includes(o))&&r.push(o);var u=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),c=!Qi(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(u&&c){var d=bs(u===!0?o.children:u.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:o,candidates:d})}else i.unshift.apply(i,o.children)}}return r},rA=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},In=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||(function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"})(t))&&!rA(t)?0:t.tabIndex},iT=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},iA=function(t){return t.tagName==="INPUT"},oT=function(t){return(function(e){return iA(e)&&e.type==="radio"})(t)&&!(function(e){if(!e.name)return!0;var n,r=e.form||Zo(e),i=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')};if(typeof window!="undefined"&&window.CSS!==void 0&&typeof window.CSS.escape=="function")n=i(window.CSS.escape(e.name));else try{n=i(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=(function(s,a){for(var l=0;l<s.length;l++)if(s[l].checked&&s[l].form===a)return s[l]})(n,e.form);return!o||o===e})(t)},Bp=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return n===0&&r===0},sT=function(t,e){var n=e.displayCheck,r=e.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(t).visibility==="hidden")return!0;var i=fr.call(t,"details>summary:first-of-type")?t.parentElement:t;if(fr.call(i,"details:not([open]) *"))return!0;if(n&&n!=="full"&&n!=="full-native"&&n!=="legacy-full"){if(n==="non-zero-area")return Bp(t)}else{if(typeof r=="function"){for(var o=t;t;){var s=t.parentElement,a=Zo(t);if(s&&!s.shadowRoot&&r(s)===!0)return Bp(t);t=t.assignedSlot?t.assignedSlot:s||a===t.ownerDocument?s:a.host}t=o}if((function(l){var u,c,d,h,p=l&&Zo(l),f=(u=p)===null||u===void 0?void 0:u.host,m=!1;if(p&&p!==l)for(m=!!((c=f)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(f)||l!=null&&(h=l.ownerDocument)!==null&&h!==void 0&&h.contains(l));!m&&f;){var E,_,A;m=!((_=f=(E=p=Zo(f))===null||E===void 0?void 0:E.host)===null||_===void 0||(A=_.ownerDocument)===null||A===void 0||!A.contains(f))}return m})(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}return!1},ws=function(t,e){return!(e.disabled||Qi(e)||(function(n){return iA(n)&&n.type==="hidden"})(e)||sT(e,t)||(function(n){return n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(r){return r.tagName==="SUMMARY"})})(e)||(function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var r=n.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i<r.children.length;i++){var o=r.children.item(i);if(o.tagName==="LEGEND")return!!fr.call(r,"fieldset[disabled] *")||!o.contains(n)}return!0}r=r.parentElement}return!1})(e))},lc=function(t,e){return!(oT(e)||In(e)<0||!ws(t,e))},aT=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},oA=function(t){var e=[],n=[];return t.forEach(function(r,i){var o=!!r.scopeParent,s=o?r.scopeParent:r,a=(function(u,c){var d=In(u);return d<0&&c&&!rA(u)?0:d})(s,o),l=o?oA(r.candidates):s;a===0?o?e.push.apply(e,l):e.push(s):n.push({documentOrder:i,tabIndex:a,item:r,isScope:o,content:l})}),n.sort(iT).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(e)},ra=function(t,e){var n;return n=(e=e||{}).getShadowRoot?bs([t],e.includeContainer,{filter:lc.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:aT}):nA(t,e.includeContainer,lc.bind(null,e)),oA(n)},fu=function(t,e){return(e=e||{}).getShadowRoot?bs([t],e.includeContainer,{filter:ws.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):nA(t,e.includeContainer,ws.bind(null,e))},Gn=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return fr.call(t,Ns)!==!1&&lc(e,t)},lT=eA.concat("iframe").join(","),Qo=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return fr.call(t,lT)!==!1&&ws(e,t)};const cT=Object.freeze(Object.defineProperty({__proto__:null,focusable:fu,getTabIndex:In,isFocusable:Qo,isTabbable:Gn,tabbable:ra},Symbol.toStringTag,{value:"Module"}));function cc(t){return(t==null?void 0:t.ownerDocument)||document}var Li=typeof document!="undefined"?Ze:function(){};const sA=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function jp(t,e){const n=ra(t,sA()),r=n.length;if(r===0)return;const i=(function(s){let a=s.activeElement;for(;((l=a)==null||(l=l.shadowRoot)==null?void 0:l.activeElement)!=null;){var l;a=a.shadowRoot.activeElement}return a})(cc(t)),o=n.indexOf(i);return n[o===-1?e===1?0:r-1:o+e]}function ll(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!(function(i,o){if(!i||!o)return!1;const s=o.getRootNode==null?void 0:o.getRootNode();if(i.contains(o))return!0;if(s&&oc(s)){let a=o;for(;a;){if(i===a)return!0;a=a.parentNode||a.host}}return!1})(n,r)}function uT(t){ra(t,sA()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function $p(t){t.querySelectorAll("[data-tabindex]").forEach(e=>{const n=e.dataset.tabindex;delete e.dataset.tabindex,n?e.setAttribute("tabindex",n):e.removeAttribute("tabindex")})}const dT={...yc};let Vp=!1,hT=0;const zp=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+hT++,pT=dT.useId||function(){const[t,e]=ne(()=>Vp?zp():void 0);return Li(()=>{t==null&&e(zp())},[]),G(()=>{Vp=!0},[]),t};function aA(t){return"data-floating-ui-"+t}const lA={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Yp=_t(function(t,e){const[n,r]=ne();return Li(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]),I("span",{...t,ref:e,tabIndex:0,role:n,"aria-hidden":!n||void 0,[aA("focus-guard")]:"",style:lA})}),cA=ii(null),Gp=aA("portal");function fT(t){const{children:e,id:n,root:r,preserveTabOrder:i=!0}=t,o=(function(m){m===void 0&&(m={});const{id:E,root:_}=m,A=pT(),O=mT(),[S,v]=ne(null),T=X(null);return Li(()=>()=>{S==null||S.remove(),queueMicrotask(()=>{T.current=null})},[S]),Li(()=>{if(!A||T.current)return;const R=E?document.getElementById(E):null;if(!R)return;const y=document.createElement("div");y.id=A,y.setAttribute(Gp,""),R.appendChild(y),T.current=y,v(y)},[E,A]),Li(()=>{if(_===null||!A||T.current)return;let R=_||(O==null?void 0:O.portalNode);R&&!du(R)&&(R=R.current),R=R||document.body;let y=null;E&&(y=document.createElement("div"),y.id=E,R.appendChild(y));const g=document.createElement("div");g.id=A,g.setAttribute(Gp,""),R=y||R,R.appendChild(g),T.current=g,v(g)},[E,_,A,O]),S})({id:n,root:r}),[s,a]=ne(null),l=X(null),u=X(null),c=X(null),d=X(null),h=s==null?void 0:s.modal,p=s==null?void 0:s.open,f=!!s&&!s.modal&&s.open&&i&&!(!r&&!o);return G(()=>{if(o&&i&&!h)return o.addEventListener("focusin",m,!0),o.addEventListener("focusout",m,!0),()=>{o.removeEventListener("focusin",m,!0),o.removeEventListener("focusout",m,!0)};function m(E){o&&ll(E)&&(E.type==="focusin"?$p:uT)(o)}},[o,i,h]),G(()=>{o&&(p||$p(o))},[p,o]),I(cA.Provider,{value:te(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:d,portalNode:o,setFocusManagerState:a}),[i,o]),children:[f&&o&&I(Yp,{"data-type":"outside",ref:l,onFocus:m=>{if(ll(m,o)){var E;(E=c.current)==null||E.focus()}else{const A=s?s.domReference:null,O=jp(cc(_=A).body,-1)||_;O==null||O.focus()}var _}}),f&&o&&I("span",{"aria-owns":o.id,style:lA}),o&&Dc(e,o),f&&o&&I(Yp,{"data-type":"outside",ref:u,onFocus:m=>{if(ll(m,o)){var E;(E=d.current)==null||E.focus()}else{const A=s?s.domReference:null,O=jp(cc(_=A).body,1)||_;O==null||O.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,m.nativeEvent,"focus-out"))}var _}})]})}const mT=()=>Hn(cA);var Uo={exports:{}};function uc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Wp(t,e){var n=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=uA(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
94
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var l=n.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||n.return==null||n.return()}finally{if(a)throw o}}}}function
|
|
95
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function uA(t,e){if(t){if(typeof t=="string")return uc(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uc(t,e):void 0}}var cn={getActiveTrap:function(t){return(t==null?void 0:t.length)>0?t[t.length-1]:null},activateTrap:function(t,e){e!==cn.getActiveTrap(t)&&cn.pauseTrap(t);var n=t.indexOf(e);n===-1||t.splice(n,1),t.push(e)},deactivateTrap:function(t,e){var n=t.indexOf(e);n!==-1&&t.splice(n,1),cn.unpauseTrap(t)},pauseTrap:function(t){var e=cn.getActiveTrap(t);e==null||e._setPausedState(!0)},unpauseTrap:function(t){var e=cn.getActiveTrap(t);e&&!e._isManuallyPaused()&&e._setPausedState(!1)}},Mi=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},AT=function(t){return Mi(t)&&!t.shiftKey},gT=function(t){return Mi(t)&&t.shiftKey},qp=function(t){return setTimeout(t,0)},_i=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return typeof t=="function"?t.apply(void 0,n):t},Bo=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},ST=[];const OT=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:function(t,e){var n,r=(e==null?void 0:e.document)||document,i=(e==null?void 0:e.trapStack)||ST,o=Kp({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:AT,isKeyBackward:gT},e),s={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadyInert:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a=function(g,D,C){return g&&g[D]!==void 0?g[D]:o[C||D]},l=function(g,D){var C=typeof(D==null?void 0:D.composedPath)=="function"?D.composedPath():void 0;return s.containerGroups.findIndex(function(N){var k=N.container,b=N.tabbableNodes;return k.contains(g)||(C==null?void 0:C.includes(k))||b.find(function(L){return L===g})})},u=function(g){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=D.hasFallback,N=C!==void 0&&C,k=D.params,b=k===void 0?[]:k,L=o[g];if(typeof L=="function"&&(L=L.apply(void 0,_T(b))),L===!0&&(L=void 0),!L){if(L===void 0||L===!1)return L;throw new Error("`".concat(g,"` was specified but was not a node, or did not return a node"))}var x=L;if(typeof L=="string"){try{x=r.querySelector(L)}catch(P){throw new Error("`".concat(g,'` appears to be an invalid selector; error="').concat(P.message,'"'))}if(!x&&!N)throw new Error("`".concat(g,"` as selector refers to no known node"))}return x},c=function(){var g=u("initialFocus",{hasFallback:!0});if(g===!1)return!1;if(g===void 0||g&&!Qo(g,o.tabbableOptions))if(l(r.activeElement)>=0)g=r.activeElement;else{var D=s.tabbableGroups[0];g=D&&D.firstTabbableNode||u("fallbackFocus")}else g===null&&(g=u("fallbackFocus"));if(!g)throw new Error("Your focus-trap needs to have at least one focusable element");return g},d=function(){if(s.containerGroups=s.containers.map(function(g){var D=ra(g,o.tabbableOptions),C=fu(g,o.tabbableOptions),N=D.length>0?D[0]:void 0,k=D.length>0?D[D.length-1]:void 0,b=C.find(function(P){return Gn(P)}),L=C.slice().reverse().find(function(P){return Gn(P)}),x=!!D.find(function(P){return In(P)>0});return{container:g,tabbableNodes:D,focusableNodes:C,posTabIndexesFound:x,firstTabbableNode:N,lastTabbableNode:k,firstDomTabbableNode:b,lastDomTabbableNode:L,nextTabbableNode:function(P){var B=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],V=D.indexOf(P);return V<0?B?C.slice(C.indexOf(P)+1).find(function($){return Gn($)}):C.slice(0,C.indexOf(P)).reverse().find(function($){return Gn($)}):D[V+(B?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(g){return g.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(g){return g.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function(g){var D=g.activeElement;if(D)return D.shadowRoot&&D.shadowRoot.activeElement!==null?h(D.shadowRoot):D},p=function(g){g!==!1&&g!==h(document)&&(g&&g.focus?(g.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=g,(function(D){return D.tagName&&D.tagName.toLowerCase()==="input"&&typeof D.select=="function"})(g)&&g.select()):p(c()))},f=function(g){var D=u("setReturnFocus",{params:[g]});return D||D!==!1&&g},m=function(g){var D=g.target,C=g.event,N=g.isBackward,k=N!==void 0&&N;D=D||Bo(C),d();var b=null;if(s.tabbableGroups.length>0){var L=l(D,C),x=L>=0?s.containerGroups[L]:void 0;if(L<0)b=k?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(k){var P=s.tabbableGroups.findIndex(function(ae){var ue=ae.firstTabbableNode;return D===ue});if(P<0&&(x.container===D||Qo(D,o.tabbableOptions)&&!Gn(D,o.tabbableOptions)&&!x.nextTabbableNode(D,!1))&&(P=L),P>=0){var B=P===0?s.tabbableGroups.length-1:P-1,V=s.tabbableGroups[B];b=In(D)>=0?V.lastTabbableNode:V.lastDomTabbableNode}else Mi(C)||(b=x.nextTabbableNode(D,!1))}else{var $=s.tabbableGroups.findIndex(function(ae){var ue=ae.lastTabbableNode;return D===ue});if($<0&&(x.container===D||Qo(D,o.tabbableOptions)&&!Gn(D,o.tabbableOptions)&&!x.nextTabbableNode(D))&&($=L),$>=0){var z=$===s.tabbableGroups.length-1?0:$+1,_e=s.tabbableGroups[z];b=In(D)>=0?_e.firstTabbableNode:_e.firstDomTabbableNode}else Mi(C)||(b=x.nextTabbableNode(D))}}else b=u("fallbackFocus");return b},E=function(g){var D=Bo(g);l(D,g)>=0||(_i(o.clickOutsideDeactivates,g)?n.deactivate({returnFocus:o.returnFocusOnDeactivate}):_i(o.allowOutsideClick,g)||g.preventDefault())},_=function(g){var D=Bo(g),C=l(D,g)>=0;if(C||D instanceof Document)C&&(s.mostRecentlyFocusedNode=D);else{var N;g.stopImmediatePropagation();var k=!0;if(s.mostRecentlyFocusedNode)if(In(s.mostRecentlyFocusedNode)>0){var b=l(s.mostRecentlyFocusedNode),L=s.containerGroups[b].tabbableNodes;if(L.length>0){var x=L.findIndex(function(P){return P===s.mostRecentlyFocusedNode});x>=0&&(o.isKeyForward(s.recentNavEvent)?x+1<L.length&&(N=L[x+1],k=!1):x-1>=0&&(N=L[x-1],k=!1))}}else s.containerGroups.some(function(P){return P.tabbableNodes.some(function(B){return In(B)>0})})||(k=!1);else k=!1;k&&(N=m({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),p(N||s.mostRecentlyFocusedNode||c())}s.recentNavEvent=void 0},A=function(g){(o.isKeyForward(g)||o.isKeyBackward(g))&&(function(D){var C=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s.recentNavEvent=D;var N=m({event:D,isBackward:C});N&&(Mi(D)&&D.preventDefault(),p(N))})(g,o.isKeyBackward(g))},O=function(g){(function(D){return(D==null?void 0:D.key)==="Escape"||(D==null?void 0:D.key)==="Esc"||(D==null?void 0:D.keyCode)===27})(g)&&_i(o.escapeDeactivates,g)!==!1&&(g.preventDefault(),n.deactivate())},S=function(g){var D=Bo(g);l(D,g)>=0||_i(o.clickOutsideDeactivates,g)||_i(o.allowOutsideClick,g)||(g.preventDefault(),g.stopImmediatePropagation())},v=function(){if(s.active)return cn.activateTrap(i,n),s.delayInitialFocusTimer=o.delayInitialFocus?qp(function(){p(c())}):p(c()),r.addEventListener("focusin",_,!0),r.addEventListener("mousedown",E,{capture:!0,passive:!1}),r.addEventListener("touchstart",E,{capture:!0,passive:!1}),r.addEventListener("click",S,{capture:!0,passive:!1}),r.addEventListener("keydown",A,{capture:!0,passive:!1}),r.addEventListener("keydown",O),n},T=function(){if(s.active)return r.removeEventListener("focusin",_,!0),r.removeEventListener("mousedown",E,!0),r.removeEventListener("touchstart",E,!0),r.removeEventListener("click",S,!0),r.removeEventListener("keydown",A,!0),r.removeEventListener("keydown",O),n},R=typeof window!="undefined"&&"MutationObserver"in window?new MutationObserver(function(g){g.some(function(D){return Array.from(D.removedNodes).some(function(C){return C===s.mostRecentlyFocusedNode})})&&p(c())}):void 0,y=function(){R&&(R.disconnect(),s.active&&!s.paused&&s.containers.map(function(g){R.observe(g,{subtree:!0,childList:!0})}))};return n={get active(){return s.active},get paused(){return s.paused},activate:function(g){if(s.active)return this;var D=a(g,"onActivate"),C=a(g,"onPostActivate"),N=a(g,"checkCanFocusTrap"),k=cn.getActiveTrap(i),b=!1;k&&!k.paused&&(k._setSubtreeIsolation(!1),b=!0);try{N||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=h(r),D==null||D();var L=function(){N&&d(),v(),y(),o.isolateSubtrees&&n._setSubtreeIsolation(!0),C==null||C()};if(N)return N(s.containers.concat()).then(L,L),this;L()}catch(x){throw k===cn.getActiveTrap(i)&&b&&k._setSubtreeIsolation(!0),x}return this},deactivate:function(g){if(!s.active)return this;var D=Kp({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},g);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||n._setSubtreeIsolation(!1),s.alreadyInert.clear(),T(),s.active=!1,s.paused=!1,y(),cn.deactivateTrap(i,n);var C=a(D,"onDeactivate"),N=a(D,"onPostDeactivate"),k=a(D,"checkCanReturnFocus"),b=a(D,"returnFocus","returnFocusOnDeactivate");C==null||C();var L=function(){qp(function(){b&&p(f(s.nodeFocusedBeforeActivation)),N==null||N()})};return b&&k?(k(f(s.nodeFocusedBeforeActivation)).then(L,L),this):(L(),this)},pause:function(g){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,g)):this},unpause:function(g){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,g)):this},updateContainerElements:function(g){var D=[].concat(g).filter(Boolean);return s.containers=D.map(function(C){return typeof C=="string"?r.querySelector(C):C}),o.isolateSubtrees&&(function(C){s.active&&!s.paused&&n._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadyInert.clear();var N,k=new Set,b=new Set,L=Wp(C);try{for(L.s();!(N=L.n()).done;){var x=N.value;k.add(x);for(var P=typeof ShadowRoot!="undefined"&&x.getRootNode()instanceof ShadowRoot,B=x;B;){k.add(B);var V=B.parentElement,$=[];V?$=V.children:!V&&P&&($=B.getRootNode().children,V=B.getRootNode().host,P=typeof ShadowRoot!="undefined"&&V.getRootNode()instanceof ShadowRoot);var z,_e=Wp($);try{for(_e.s();!(z=_e.n()).done;){var ae=z.value;b.add(ae)}}catch(ue){_e.e(ue)}finally{_e.f()}B=V}}}catch(ue){L.e(ue)}finally{L.f()}k.forEach(function(ue){b.delete(ue)}),s.adjacentElements=b})(s.containers),s.active&&(d(),o.isolateSubtrees&&!s.paused&&n._setSubtreeIsolation(!0)),y(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(g,D){if(s.paused===g)return this;if(s.paused=g,g){var C=a(D,"onPause"),N=a(D,"onPostPause");C==null||C(),T(),y(),n._setSubtreeIsolation(!1),N==null||N()}else{var k=a(D,"onUnpause"),b=a(D,"onPostUnpause");k==null||k(),n._setSubtreeIsolation(!0),d(),v(),y(),b==null||b()}return this}},_setSubtreeIsolation:{value:function(g){o.isolateSubtrees&&s.adjacentElements.forEach(function(D){g?((D.inert||D.hasAttribute("inert"))&&s.alreadyInert.add(D),D.inert=!0):s.alreadyInert.has(D)||(D.inert=!1)})}}}),n.updateContainerElements(t),n}},Symbol.toStringTag,{value:"Module"})),vT=Pc(OT),DT=Pc(cT);var Jp,TT=(function(){if(Jp)return Uo.exports;function t(f){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},t(f)}var e,n;function r(f,m,E){return m&&(function(_,A){for(var O=0;O<A.length;O++){var S=A[O];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(_,l(S.key),S)}})(f.prototype,m),Object.defineProperty(f,"prototype",{writable:!1}),f}function i(f,m,E){return m=s(m),(function(_,A){if(A&&(t(A)=="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O})(_)})(f,o()?Reflect.construct(m,E||[],s(f).constructor):m.apply(f,E))}function o(){try{var f=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(m){}return(o=function(){return!!f})()}function s(f){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m)},s(f)}function a(f,m){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,_){return E.__proto__=_,E},a(f,m)}function l(f){var m=(function(E,_){if(t(E)!="object"||!E)return E;var A=E[Symbol.toPrimitive];if(A!==void 0){var O=A.call(E,_);if(t(O)!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(_==="string"?String:Number)(E)})(f,"string");return t(m)=="symbol"?m:m+""}Jp=1;var u=Nm,c=vT.createFocusTrap,d=DT.isFocusable,h=parseInt((e=(n=/^(\d+)\./.exec(u.version))===null||n===void 0?void 0:n[1])!==null&&e!==void 0?e:0,10),p=(function(f){function m(E){var _;(function(S,v){if(!(S instanceof v))throw new TypeError("Cannot call a class as a function")})(this,m),(function(S,v,T){(v=l(v))in S?Object.defineProperty(S,v,{value:T,enumerable:!0,configurable:!0,writable:!0}):S[v]=T})(_=i(this,m,[E]),"getNodeForOption",function(S){var v,T=(v=this.internalOptions[S])!==null&&v!==void 0?v:this.originalOptions[S];if(typeof T=="function"){for(var R=arguments.length,y=new Array(R>1?R-1:0),g=1;g<R;g++)y[g-1]=arguments[g];T=T.apply(void 0,y)}if(T===!0&&(T=void 0),!T){if(T===void 0||T===!1)return T;throw new Error("`".concat(S,"` was specified but was not a node, or did not return a node"))}var D,C=T;if(typeof T=="string"&&!(C=(D=this.getDocument())===null||D===void 0?void 0:D.querySelector(T)))throw new Error("`".concat(S,"` as selector refers to no known node"));return C}),_.handleDeactivate=_.handleDeactivate.bind(_),_.handlePostDeactivate=_.handlePostDeactivate.bind(_),_.handleClickOutsideDeactivates=_.handleClickOutsideDeactivates.bind(_),_.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:_.handleDeactivate,onPostDeactivate:_.handlePostDeactivate,clickOutsideDeactivates:_.handleClickOutsideDeactivates},_.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var A=E.focusTrapOptions;for(var O in A)Object.prototype.hasOwnProperty.call(A,O)&&(O!=="returnFocusOnDeactivate"&&O!=="onDeactivate"&&O!=="onPostDeactivate"&&O!=="checkCanReturnFocus"&&O!=="clickOutsideDeactivates"?_.internalOptions[O]=A[O]:_.originalOptions[O]=A[O]);return _.outsideClick=null,_.focusTrapElements=E.containerElements||[],_.updatePreviousElement(),_}return(function(E,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(_&&_.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),_&&a(E,_)})(m,f),r(m,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document!="undefined"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var E=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return E||E!==!1&&this.previouslyFocusedElement}},{key:"updatePreviousElement",value:function(){var E=this.getDocument();E&&(this.previouslyFocusedElement=E.activeElement)}},{key:"deactivateTrap",value:function(){this.focusTrap&&this.focusTrap.active&&this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(E){var _=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,E):this.originalOptions.clickOutsideDeactivates;return _&&(this.outsideClick={target:E.target,allowDeactivation:_}),_}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var E=this,_=function(){var A=E.getReturnFocusNode(),O=!(!E.originalOptions.returnFocusOnDeactivate||A==null||!A.focus||E.outsideClick&&(!E.outsideClick.allowDeactivation||d(E.outsideClick.target,E.internalOptions.tabbableOptions))),S=E.internalOptions.preventScroll,v=S!==void 0&&S;O&&A.focus({preventScroll:v}),E.originalOptions.onPostDeactivate&&E.originalOptions.onPostDeactivate.call(null),E.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(_,_):_()}},{key:"setupFocusTrap",value:function(){this.focusTrap?this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()):this.focusTrapElements.some(Boolean)&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(E){if(this.focusTrap){E.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var _=!E.active&&this.props.active,A=E.active&&!this.props.active,O=!E.paused&&this.props.paused,S=E.paused&&!this.props.paused;if(_&&(this.updatePreviousElement(),this.focusTrap.activate()),A)return void this.deactivateTrap();O&&this.focusTrap.pause(),S&&this.focusTrap.unpause()}else E.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var E=this,_=this.props.children?u.Children.only(this.props.children):void 0;if(_){if(_.type&&_.type===u.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return u.cloneElement(_,{ref:function(A){var O=E.props.containerElements;_&&(h>=19?typeof _.props.ref=="function"?_.props.ref(A):_.props.ref&&(_.props.ref.current=A):typeof _.ref=="function"?_.ref(A):_.ref&&(_.ref.current=A)),E.focusTrapElements=O||[A]}})}return null}}])})(u.Component);return p.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:c},Uo.exports=p,Uo.exports.FocusTrap=p,Uo.exports})();function dA(t){var _,A;const{children:e,preferredPlacement:n="top-start",anchorElement:r,boundaryElement:i,trapFocus:o=!1,initialFocus:s,portal:a,...l}=t,{anchor:u,boundary:c}=te(()=>({anchor:Zp(r),boundary:i?Zp(i):void 0}),[r,i]);let d=[];c&&(d=[Q_({boundary:c,fallbackPlacements:["top-start","top-end","bottom-start","bottom-end","top","bottom"]}),nT({boundary:c,padding:8}),rT({boundary:c})]);const{refs:h,floatingStyles:p,middlewareData:f}=Z_({placement:n,middleware:d,whileElementsMounted:q_});Ze(()=>{u&&h.setReference(u)},[h,u]);const m=o?I(TT.FocusTrap,{focusTrapOptions:{initialFocus:s,fallbackFocus:".t-fallback-focus",allowOutsideClick:!0,tabbableOptions:{getShadowRoot:!0}},children:I("div",{children:[e,I("span",{className:"t-fallback-focus",tabIndex:-1})]})}):e,E=I("div",{ref:h.setFloating,style:{...p,zIndex:1e3,visibility:(_=f.hide)!=null&&_.referenceHidden?"hidden":"visible"},...l,children:m});if(a){const O=(A=c||u)==null?void 0:A.closest("[t-menu-boundary='root']");return I(fT,{root:O,children:E})}return E}function Zp(t){return typeof t=="string"?document.querySelector(t):t}function hA(t){const e=oe(),n=lo(),r=J(n.state$.suggestMentionQuery),i=ou(J(e.state$.currentConversationId),r?1e3:0),o=te(()=>(i!=null?i:[]).map(E=>E.user),[i]),[s,a]=ne(0),l=te(()=>Object.fromEntries(o.map(E=>[E.id,EO(E.name)])),[o]),u=te(()=>{if(!r)return[];const E=Qp(r);return E===""?o:o.filter(_=>l[_.id].some(A=>(function(O,S){return Wh(O.substring(0,S.length),S)})(A,E)))},[r,o,l]),c=X(void 0);G(()=>{if(c.current){const E=u.findIndex(_=>_.id===c.current);a(E===-1?0:E)}},[u]),G(()=>{var E;c.current=(E=u[s])==null?void 0:E.id},[s,u]);const d=q(E=>{var A;const _=(A=u[E])==null?void 0:A.id;return _&&"mention-button-"+_},[u]),{containerProps:h,itemProps:p}=U_({focused:s,setFocused:a,buttonId:d});if(G(()=>{if(u.length!==0)return n.listenKeydown("mention",E=>H_(E,{dir:"ttb",focused:s,setFocused:a,itemCount:u.length,onSpace(){if(r){const _=u[s];if(Wh(_.name,Qp(r)))return n.selectMention(_),!0}return!1},onConfirm(){const _=u[s];n.selectMention(_)}})),()=>{n.listenKeydown("mention",void 0)}},[n,s,u,r]),mo(()=>n.closeSuggester(),".t-mention-suggest-list",u.length>0),u.length===0)return null;const f=document.querySelector(".ProseMirror-suggestion");let m;if(f){let E=f.getBoundingClientRect();m={getBoundingClientRect(){const _=f.getBoundingClientRect();return _.width>0&&(E=_),E}}}return I(dA,{className:"t-mention-suggest-list",...h,anchorElement:m,children:u.map((E,_)=>I(RT,{user:E,isFocused:_===s,onSelect:()=>n.selectMention(E),...p(_)},E.id))})}const RT=mn(function(t){const{user:e,isFocused:n,onSelect:r,...i}=t;return I("button",{className:n?"focused":"",onClick:()=>r(e.id),...i,children:e.name})});function Qp(t){return ie(t[0]==="@"),t.substring(1)}function ef(t,e,n){const r=fu(t),i=r.indexOf(e);return i===-1?null:r[i+n]||null}const IT=_t(function(t,e){const{children:n,triggerElement:r}=t,{closePopover:i}=Fc(),o=X(null);_n(e,()=>o.current),G(()=>{var a;(a=o.current)==null||a.focus()},[]);const s=q(a=>{(function(l,u,c,d){var E;const h=u.querySelectorAll("[t-menu-item]"),p=document.activeElement;if(!p||!p.hasAttribute("t-menu-item")&&!p.hasAttribute("t-menu"))return;const f=Array.from(h).indexOf(p);let m;switch(l.key){case"ArrowDown":m=Math.min(f+1,h.length-1);break;case"ArrowUp":m=Math.max(f-1,0),f===-1&&(m=h.length-1);break;case"Home":m=0;break;case"End":m=h.length-1;break;case"Tab":{const _=c.closest("t-chatbox,t-conversation-list,.t-chatbox,.t-conversation-list"),A=l.shiftKey?ef(_,c,-1):(function(O,S){return ef(O,S,1)})(_,c);return A==null||A.focus(),void d()}default:return}(E=h[m])==null||E.focus()})(a,o.current,r,i)},[i,r]);return I("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:s,children:n})});function Hr(t){const{popoverComponent:e,popoverProps:n,children:r,type:i="popover",initialFocus:o,portal:s,...a}=t,[l,u]=ne(void 0),c=X(null),[d,h]=ne(!1);mo(q(f=>{var m,E;f&&((m=c.current)!=null&&m.contains(f.target))||(h(!1),(E=c.current)==null||E.focus())},[]),"[t-popover-content]",d);const p=i==="menu"?I(IT,{triggerElement:c.current,children:I(e,{...n})}):I(e,{...n});return I(Xg.Provider,{value:{closePopover:()=>h(!1)},children:[I(yT,{...a,"aria-haspopup":i==="menu"?"menu":"true","aria-expanded":d,onTrigger:()=>h(f=>!f),ref:f=>(m=>{var _;const E=(_=m==null?void 0:m.closest("[t-menu-boundary]"))!=null?_:void 0;c.current=m,u(E)})(f),children:r}),d&&I(dA,{portal:s,"t-popover-content":"",anchorElement:c.current,boundaryElement:l,preferredPlacement:"bottom-start",trapFocus:i==="popover",initialFocus:i==="menu"?"t-menu":o,role:i==="menu"?void 0:"dialog",children:p})]})}const yT=_t(function(t,e){const{onTrigger:n,...r}=t,i=q(o=>{o.key!=="Enter"&&o.key!==" "||n()},[n]);return I("button",{...r,ref:e,onClick:n,onKeyDown:i})});function Tn(t){const{onSelect:e,...n}=t,{closePopover:r}=Fc(),i=q(o=>{o.key!=="Enter"&&o.key!==" "||(r(),e==null||e())},[e,r]);return I("div",{tabIndex:-1,role:"menuitem",onClick:q(()=>{r(),e==null||e()},[r,e]),onKeyDown:i,"t-menu-item":"",...n})}function mu(t){const e=oe(),n=Ar(),r=X(null);G(()=>()=>{Gt(()=>{e.type==="ChatboxStore"&&(e.highlightedStrings$.set([]),e.focusedMessage$.set(null))})},[e]);const i=q(()=>{r.current.blur(),n.jumpToHighlight("up")},[n]),o=q(s=>{e.type==="ChatboxStore"&&e.state$.enterSendsMessage.peek()&&Gh(s)&&s.preventDefault()},[e]);return I("input",{type:"search",enterKeyHint:"search",autoComplete:"off",onKeyUp:q(s=>{e.type==="ChatboxStore"&&e.state$.enterSendsMessage.peek()&&Gh(s)&&(s.preventDefault(),i())},[e,i]),onKeyDown:o,...t,ref:r})}const CT=()=>!0;async function Eu(t,e,{initialDelay:n,maxDelay:r,log:i,shouldRetry:o=CT}){return e().catch(async s=>{if(i&&i(`[TalkJS] Retries left: ${t}. Error: ${JSON.stringify(s)}.`),t===0||!await o(s))throw s;const a=1e3*n*1.2,l=Math.min(1e3*r,a),u=l*(1-(c=.05)+2*Math.random()*c);var c,d;return(d=u,d<=0?Promise.resolve():new Promise(h=>setTimeout(h,d))).then(()=>Eu(t-1,e,{initialDelay:u/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function eo(){const t={},e=new Promise(function(n,r){t.resolve=n,t.reject=r});return t.promise=e,t}function pA(t,e,n){const{beforeBrowserPermissionPrompt:r,onMissingBrowserPermissionCallback:i}=Hn(Fm);return q(async()=>{function o(c){c==="denied"&&i({type:t})}if(!r||!await(async function(c){if(!("permissions"in navigator))return!1;try{return(await navigator.permissions.query({name:c})).state==="prompt"}catch(d){return!1}})(t))return e(c=>{o(c)});const s=eo(),a=eo(),l={type:t,showPrompt:async()=>(a.resolve({cancelled:!1}),await s.promise),cancel:()=>{a.resolve({cancelled:!0})}};try{r(l)}catch(c){Ne.error("Your beforeBrowserPermissionPrompt callback threw an error: ",c),a.resolve({cancelled:!0})}const{cancelled:u}=await a.promise;return u?void 0:e(c=>{s.resolve(c),o(c)})},[r,i,t,e,...n])}const NT={barHeight:4,barRadius:2,barGap:2,barWidth:2,height:24},cl={state:null,duration:0,recordingUrl:void 0,uploadState:"done",fileToken:void 0},fA=new WeakMap;function mA({className:t,voiceRecorder:e}){const n=fA.get(e);return n?I("div",{className:t,style:{shapeRendering:"crispEdges"},ref:n}):(Ne.warn("Can only use Waveform component if a voice recorder is active"),null)}function EA(t,e){return t.map(r=>(function(i,o){if(i.type==="text")return(function(s,a){const l=su(a);return es(s,l)})(i.children,o);if(i.type==="file"&&i.subtype==="video")return`🎥 ${Lo(i.url)}`;if(i.type==="file"&&i.subtype==="image")return`📷 ${Lo(i.url)}`;if(i.type==="file"&&i.subtype==="audio")return`🎧 ${Lo(i.url)}`;if(i.type==="file"&&i.subtype==="voice"){const s=i.duration;return s===void 0?"🎙️":`🎙️ (${Math.floor(s/60)}:${Math.floor(s%60).toString().padStart(2,"0")})`}return i.type==="file"?(i.subtype,`📎 ${Lo(i.url)}`):i.type==="location"?"📍":""})(r,e)).join(`
|
|
91
|
+
`,[e,n]}setOptions(e){if(this.options.container!==e.container){const n=this.parentFromOptionsContainer(e.container);n.appendChild(this.container),this.parent=n}e.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.options=e,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(e){this.scrollContainer.scrollLeft=e}setScrollPercentage(e){const{scrollWidth:n}=this.scrollContainer,r=n*e;this.setScroll(r)}destroy(){var e;this.subscriptions.forEach(n=>n()),this.container.remove(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),(e=this.unsubscribeOnScroll)===null||e===void 0||e.forEach(n=>n()),this.unsubscribeOnScroll=[],this.dragStream&&(this.dragStream.cleanup(),this.dragStream=null),this.scrollStream&&(this.scrollStream.cleanup(),this.scrollStream=null)}createDelay(e=10){let n,r;const i=()=>{n&&(clearTimeout(n),n=void 0),r&&(r(),r=void 0)};return this.timeouts.push(i),()=>new Promise((o,s)=>{i(),r=s,n=setTimeout(()=>{n=void 0,r=void 0,o()},e)})}getHeight(e,n){var r;const i=((r=this.audioData)===null||r===void 0?void 0:r.numberOfChannels)||1;return(function({optionsHeight:o,optionsSplitChannels:s,parentHeight:a,numberOfChannels:l,defaultHeight:u=128}){if(o==null)return u;const c=Number(o);if(!isNaN(c))return c;if(o==="auto"){const d=a||u;return s!=null&&s.every(h=>!h.overlay)?d/l:d}return u})({optionsHeight:e,optionsSplitChannels:n,parentHeight:this.parent.clientHeight,numberOfChannels:i,defaultHeight:128})}convertColorValues(e,n){return(function(r,i,o){if(!Array.isArray(r))return r||"";if(r.length===0)return"#999";if(r.length<2)return r[0]||"";const s=document.createElement("canvas"),a=s.getContext("2d"),l=o!=null?o:s.height*i,u=a.createLinearGradient(0,0,0,l||i),c=1/(r.length-1);return r.forEach((d,h)=>{u.addColorStop(h*c,d)}),u})(e,this.getPixelRatio(),n==null?void 0:n.canvas.height)}getPixelRatio(){return e=window.devicePixelRatio,Math.max(1,e||1);var e}renderBarWaveform(e,n,r,i){const{width:o,height:s}=r.canvas,{halfHeight:a,barWidth:l,barRadius:u,barIndexScale:c,barSpacing:d,barMinHeight:h}=(function({width:p,height:m,length:E,options:_,pixelRatio:A}){const O=m/2,S=_.barWidth?_.barWidth*A:1,v=_.barGap?_.barGap*A:_.barWidth?S/2:0,T=S+v||1;return{halfHeight:O,barWidth:S,barGap:v,barRadius:_.barRadius||0,barMinHeight:_.barMinHeight?_.barMinHeight*A:0,barIndexScale:E>0?p/T/E:0,barSpacing:T}})({width:o,height:s,length:(e[0]||[]).length,options:n,pixelRatio:this.getPixelRatio()}),f=(function({channelData:p,barIndexScale:m,barSpacing:E,barWidth:_,halfHeight:A,vScale:O,canvasHeight:S,barAlign:v,barMinHeight:T}){const R=p[0]||[],I=p[1]||R,g=R.length,D=[];let C=0,N=0,k=0;for(let b=0;b<=g;b++){const L=Math.round(b*m);if(L>C){const{topHeight:B,totalHeight:V}=vv({maxTop:N,maxBottom:k,halfHeight:A,vScale:O,barMinHeight:T,barAlign:v}),$=Dv({barAlign:v,halfHeight:A,topHeight:B,totalHeight:V,canvasHeight:S});D.push({x:C*E,y:$,width:_,height:V}),C=L,N=0,k=0}const x=Math.abs(R[b]||0),P=Math.abs(I[b]||0);x>N&&(N=x),P>k&&(k=P)}return D})({channelData:e,barIndexScale:c,barSpacing:d,barWidth:l,halfHeight:a,vScale:i,canvasHeight:s,barAlign:n.barAlign,barMinHeight:h});r.beginPath();for(const p of f)u&&"roundRect"in r?r.roundRect(p.x,p.y,p.width,p.height,u):r.rect(p.x,p.y,p.width,p.height);r.fill(),r.closePath()}renderLineWaveform(e,n,r,i){const{width:o,height:s}=r.canvas,a=(function({channelData:l,width:u,height:c,vScale:d}){const h=c/2,f=l[0]||[];return[f,l[1]||f].map((p,m)=>{const E=p.length,_=E?u/E:0,A=h,O=m===0?-1:1,S=[{x:0,y:A}];let v=0,T=0;for(let R=0;R<=E;R++){const I=Math.round(R*_);if(I>v){const D=A+(Math.round(T*h*d)||1)*O;S.push({x:v,y:D}),v=I,T=0}const g=Math.abs(p[R]||0);g>T&&(T=g)}return S.push({x:v,y:A}),S})})({channelData:e,width:o,height:s,vScale:i});r.beginPath();for(const l of a)if(l.length){r.moveTo(l[0].x,l[0].y);for(let u=1;u<l.length;u++){const c=l[u];r.lineTo(c.x,c.y)}}r.fill(),r.closePath()}renderWaveform(e,n,r){if(r.fillStyle=this.convertColorValues(n.waveColor,r),n.renderFunction)return void n.renderFunction(e,r);const i=(function({channelData:o,barHeight:s,normalize:a,maxPeak:l}){var u;const c=s||1;if(!a)return c;const d=o[0];if(!d||d.length===0)return c;let h=l!=null?l:0;if(!l)for(let f=0;f<d.length;f++){const p=(u=d[f])!==null&&u!==void 0?u:0,m=Math.abs(p);m>h&&(h=m)}return h?c/h:c})({channelData:e,barHeight:n.barHeight,normalize:n.normalize,maxPeak:n.maxPeak});y_(n)?this.renderBarWaveform(e,n,r,i):this.renderLineWaveform(e,n,r,i)}renderSingleCanvas(e,n,r,i,o,s,a){const l=this.getPixelRatio(),u=document.createElement("canvas");u.width=Math.round(r*l),u.height=Math.round(i*l),u.style.width=`${r}px`,u.style.height=`${i}px`,u.style.left=`${Math.round(o)}px`,s.appendChild(u);const c=u.getContext("2d");if(n.renderFunction?(c.fillStyle=this.convertColorValues(n.waveColor,c),n.renderFunction(e,c)):this.renderWaveform(e,n,c),u.width>0&&u.height>0){const d=u.cloneNode(),h=d.getContext("2d");h.drawImage(u,0,0),h.globalCompositeOperation="source-in",h.fillStyle=this.convertColorValues(n.progressColor,h),h.fillRect(0,0,u.width,u.height),a.appendChild(d)}}renderMultiCanvas(e,n,r,i,o,s){const a=this.getPixelRatio(),{clientWidth:l}=this.scrollContainer,u=r/a,c=(function({clientWidth:p,totalWidth:m,options:E}){return up(Math.min(8e3,p,m),E)})({clientWidth:l,totalWidth:u,options:n});let d={};if(c===0)return;const h=p=>{if(p<0||p>=f||d[p])return;d[p]=!0;const m=p*c;let E=Math.min(u-m,c);if(E=up(E,n),E<=0)return;const _=(function({channelData:A,offset:O,clampedWidth:S,totalWidth:v}){return A.map(T=>{const R=Math.floor(O/v*T.length),I=Math.floor((O+S)/v*T.length);return T.slice(R,I)})})({channelData:e,offset:m,clampedWidth:E,totalWidth:u});this.renderSingleCanvas(_,n,E,i,m,o,s)},f=Math.ceil(u/c);if(this.isScrollable){if(dp({scrollLeft:this.scrollContainer.scrollLeft,totalWidth:u,numCanvases:f}).forEach(p=>h(p)),f>1){const p=this.on("scroll",()=>{const{scrollLeft:m}=this.scrollContainer;Object.keys(d).length>10&&(o.innerHTML="",s.innerHTML="",d={}),dp({scrollLeft:m,totalWidth:u,numCanvases:f}).forEach(E=>h(E))});this.unsubscribeOnScroll.push(p)}}else for(let p=0;p<f;p++)h(p)}renderChannel(e,n,r,i){var{overlay:o}=n,s=(function(c,d){var h={};for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&d.indexOf(f)<0&&(h[f]=c[f]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function"){var p=0;for(f=Object.getOwnPropertySymbols(c);p<f.length;p++)d.indexOf(f[p])<0&&Object.prototype.propertyIsEnumerable.call(c,f[p])&&(h[f[p]]=c[f[p]])}return h})(n,["overlay"]);const a=document.createElement("div"),l=this.getHeight(s.height,s.splitChannels);a.style.height=`${l}px`,o&&i>0&&(a.style.marginTop=`-${l}px`),this.canvasWrapper.style.minHeight=`${l}px`,this.canvasWrapper.appendChild(a);const u=a.cloneNode();this.progressWrapper.appendChild(u),this.renderMultiCanvas(e,s,r,l,a,u)}render(e){return st(this,void 0,void 0,function*(){var n;this.timeouts.forEach(u=>u()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.options.width!=null&&(this.scrollContainer.style.width=typeof this.options.width=="number"?`${this.options.width}px`:this.options.width);const r=this.getPixelRatio(),i=this.scrollContainer.clientWidth,{scrollWidth:o,isScrollable:s,useParentWidth:a,width:l}=(function({duration:u,minPxPerSec:c=0,parentWidth:d,fillParent:h,pixelRatio:f}){const p=Math.ceil(u*c),m=p>d,E=!!(h&&!m);return{scrollWidth:p,isScrollable:m,useParentWidth:E,width:(E?d:p)*f}})({duration:e.duration,minPxPerSec:this.options.minPxPerSec||0,parentWidth:i,fillParent:this.options.fillParent,pixelRatio:r});if(this.isScrollable=s,this.wrapper.style.width=a?"100%":`${o}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=e,this.emit("render"),this.options.splitChannels)for(let u=0;u<e.numberOfChannels;u++){const c=Object.assign(Object.assign({},this.options),(n=this.options.splitChannels)===null||n===void 0?void 0:n[u]);this.renderChannel([e.getChannelData(u)],c,l,u)}else{const u=[e.getChannelData(0)];e.numberOfChannels>1&&u.push(e.getChannelData(1)),this.renderChannel(u,this.options,l,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(r=>r()),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:e}=this.scrollContainer,{right:n}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&e!==this.scrollContainer.scrollWidth){const{right:r}=this.progressWrapper.getBoundingClientRect(),i=(function(o){const s=2*o;return(s<0?Math.floor(s):Math.ceil(s))/2})(r-n);this.scrollContainer.scrollLeft+=i}}zoom(e){this.options.minPxPerSec=e,this.reRender()}scrollIntoView(e,n=!1){const{scrollLeft:r,scrollWidth:i,clientWidth:o}=this.scrollContainer,s=e*i,a=r,l=r+o,u=o/2;if(this.isDragging)s+30>l?this.scrollContainer.scrollLeft+=30:s-30<a&&(this.scrollContainer.scrollLeft-=30);else{(s<a||s>l)&&(this.scrollContainer.scrollLeft=s-(this.options.autoCenter?u:0));const c=s-r-u;n&&this.options.autoCenter&&c>0&&(this.scrollContainer.scrollLeft+=c)}}renderProgress(e,n){if(isNaN(e))return;const r=100*e;this.canvasWrapper.style.clipPath=`polygon(${r}% 0%, 100% 0%, 100% 100%, ${r}% 100%)`,this.progressWrapper.style.width=`${r}%`,this.cursor.style.left=`${r}%`,this.cursor.style.transform=this.options.cursorWidth?`translateX(-${e*this.options.cursorWidth}px)`:"",this.isScrollable&&this.options.autoScroll&&this.audioData&&this.audioData.duration>0&&this.scrollIntoView(e,n)}exportImage(e,n,r){return st(this,void 0,void 0,function*(){const i=this.canvasWrapper.querySelectorAll("canvas");if(!i.length)throw new Error("No waveform data");if(r==="dataURL"){const o=Array.from(i).map(s=>s.toDataURL(e,n));return Promise.resolve(o)}return Promise.all(Array.from(i).map(o=>new Promise((s,a)=>{o.toBlob(l=>{l?s(l):a(new Error("Could not export image"))},e,n)})))})}}class Rv extends fo{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const e=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(e))};e()}stop(){this.isRunning=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}class Qa extends fo{constructor(e=new AudioContext){super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=e,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return st(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(e){if(this.currentSrc=e,this._duration=void 0,!e)return this.buffer=null,void this.emit("emptied");fetch(e).then(n=>{if(n.status>=400)throw new Error(`Failed to fetch ${e}: ${n.status} (${n.statusText})`);return n.arrayBuffer()}).then(n=>this.currentSrc!==e?null:this.audioContext.decodeAudioData(n)).then(n=>{this.currentSrc===e&&(this.buffer=n,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())}).catch(n=>{console.error("WebAudioPlayer load error:",n)})}_play(){if(!this.paused)return;this.paused=!1,this.bufferNode&&(this.bufferNode.onended=null,this.bufferNode.disconnect()),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let e=this.playedDuration*this._playbackRate;(e>=this.duration||e<0)&&(e=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,e),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var e;this.paused=!0,(e=this.bufferNode)===null||e===void 0||e.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return st(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(e){const n=e-this.currentTime,r=this.bufferNode;r==null||r.stop(this.audioContext.currentTime+n),r==null||r.addEventListener("ended",()=>{r===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(e){return st(this,void 0,void 0,function*(){return this.audioContext.setSinkId(e)})}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this.bufferNode&&(this.bufferNode.playbackRate.value=e)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(e){const n=!this.paused;n&&this._pause(),this.playedDuration=e/this._playbackRate,n&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var e,n;return(e=this._duration)!==null&&e!==void 0?e:((n=this.buffer)===null||n===void 0?void 0:n.duration)||0}set duration(e){this._duration=e}get volume(){return this.gainNode.gain.value}set volume(e){this.gainNode.gain.value=e,this.emit("volumechange")}get muted(){return this._muted}set muted(e){this._muted!==e&&(this._muted=e,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(e){return/^(audio|video)\//.test(e)}getGainNode(){return this.gainNode}getChannelData(){const e=[];if(!this.buffer)return e;const n=this.buffer.numberOfChannels;for(let r=0;r<n;r++)e.push(this.buffer.getChannelData(r));return e}removeAttribute(e){switch(e){case"src":this.src="";break;case"playbackRate":this.playbackRate=0;break;case"currentTime":this.currentTime=0;break;case"duration":this.duration=0;break;case"volume":this.volume=0;break;case"muted":this.muted=!1}}}const yv={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class qi extends Ov{static create(e){return new qi(e)}getState(){return this.wavesurferState}getRenderer(){return this.renderer}constructor(e){const n=e.media||(e.backend==="WebAudio"?new Qa:void 0);super({media:n,mediaControls:e.mediaControls,autoplay:e.autoplay,playbackRate:e.audioRate}),this.plugins=[],this.decodedData=null,this.stopAtPosition=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.reactiveCleanups=[],this.options=Object.assign({},yv,e);const{state:r,actions:i}=(function(a){var l,u,c,d,h,f;const p=(l=a==null?void 0:a.currentTime)!==null&&l!==void 0?l:ye(0),m=(u=a==null?void 0:a.duration)!==null&&u!==void 0?u:ye(0),E=(c=a==null?void 0:a.isPlaying)!==null&&c!==void 0?c:ye(!1),_=(d=a==null?void 0:a.isSeeking)!==null&&d!==void 0?d:ye(!1),A=(h=a==null?void 0:a.volume)!==null&&h!==void 0?h:ye(1),O=(f=a==null?void 0:a.playbackRate)!==null&&f!==void 0?f:ye(1),S=ye(null),v=ye(null),T=ye(""),R=ye(0),I=ye(0),g=Kn(()=>!E.value,[E]),D=Kn(()=>S.value!==null,[S]),C=Kn(()=>D.value&&m.value>0,[D,m]),N=Kn(()=>p.value,[p]),k=Kn(()=>m.value>0?p.value/m.value:0,[p,m]);return{state:{currentTime:p,duration:m,isPlaying:E,isPaused:g,isSeeking:_,volume:A,playbackRate:O,audioBuffer:S,peaks:v,url:T,zoom:R,scrollPosition:I,canPlay:D,isReady:C,progress:N,progressPercent:k},actions:{setCurrentTime:b=>{const L=Math.max(0,Math.min(m.value||1/0,b));p.set(L)},setDuration:b=>{m.set(Math.max(0,b))},setPlaying:b=>{E.set(b)},setSeeking:b=>{_.set(b)},setVolume:b=>{const L=Math.max(0,Math.min(1,b));A.set(L)},setPlaybackRate:b=>{const L=Math.max(.1,Math.min(16,b));O.set(L)},setAudioBuffer:b=>{S.set(b),b&&m.set(b.duration)},setPeaks:b=>{v.set(b)},setUrl:b=>{T.set(b)},setZoom:b=>{R.set(Math.max(0,b))},setScrollPosition:b=>{I.set(Math.max(0,b))}}}})({isPlaying:this.isPlayingSignal,currentTime:this.currentTimeSignal,duration:this.durationSignal,volume:this.volumeSignal,playbackRate:this.playbackRateSignal,isSeeking:this.seekingSignal});this.wavesurferState=r,this.wavesurferActions=i,this.timer=new Rv;const o=n?void 0:this.getMediaElement();this.renderer=new Tv(this.options,o),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initReactiveState(),this.initPlugins();const s=this.options.url||this.getSrc()||"";Promise.resolve().then(()=>{this.emit("init");const{peaks:a,duration:l}=this.options;(s||a&&l)&&this.load(s,a,l).catch(u=>{this.emit("error",u instanceof Error?u:new Error(String(u)))})})}updateProgress(e=this.getCurrentTime()){return this.renderer.renderProgress(e/this.getDuration(),this.isPlaying()),e}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){const e=this.updateProgress();this.emit("timeupdate",e),this.emit("audioprocess",e),this.stopAtPosition!=null&&this.isPlaying()&&e>=this.stopAtPosition&&this.pause()}}))}initReactiveState(){this.reactiveCleanups.push((function(e,n){const r=[];r.push(Dn(()=>{const s=e.isPlaying.value;n.emit(s?"play":"pause")},[e.isPlaying])),r.push(Dn(()=>{const s=e.currentTime.value;n.emit("timeupdate",s),e.isPlaying.value&&n.emit("audioprocess",s)},[e.currentTime,e.isPlaying])),r.push(Dn(()=>{e.isSeeking.value&&n.emit("seeking",e.currentTime.value)},[e.isSeeking,e.currentTime]));let i=!1;r.push(Dn(()=>{e.isReady.value&&!i&&(i=!0,n.emit("ready",e.duration.value))},[e.isReady,e.duration]));let o=!1;return r.push(Dn(()=>{const s=e.isPlaying.value,a=e.currentTime.value,l=e.duration.value,u=l>0&&a>=l;o&&!s&&u&&n.emit("finish"),o=s&&u},[e.isPlaying,e.currentTime,e.duration])),r.push(Dn(()=>{const s=e.zoom.value;s>0&&n.emit("zoom",s)},[e.zoom])),()=>{r.forEach(s=>s())}})(this.wavesurferState,{emit:this.emit.bind(this)}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const e=this.updateProgress();this.emit("timeupdate",e)}),this.onMediaEvent("play",()=>{this.emit("play"),this.timer.start()}),this.onMediaEvent("pause",()=>{this.emit("pause"),this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("emptied",()=>{this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("ended",()=>{this.emit("timeupdate",this.getDuration()),this.emit("finish"),this.stopAtPosition=null}),this.onMediaEvent("seeking",()=>{this.emit("seeking",this.getCurrentTime())}),this.onMediaEvent("error",()=>{var e;this.emit("error",(e=this.getMediaElement().error)!==null&&e!==void 0?e:new Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(e,n)=>{this.options.interact&&(this.seekTo(e),this.emit("interaction",e*this.getDuration()),this.emit("click",e,n))}),this.renderer.on("dblclick",(e,n)=>{this.emit("dblclick",e,n)}),this.renderer.on("scroll",(e,n,r,i)=>{const o=this.getDuration();this.emit("scroll",e*o,n*o,r,i)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}),this.renderer.on("dragstart",e=>{this.emit("dragstart",e)}),this.renderer.on("dragend",e=>{this.emit("dragend",e)}),this.renderer.on("resize",()=>{this.emit("resize")}));{let e;const n=this.renderer.on("drag",r=>{var i;if(!this.options.interact)return;this.renderer.renderProgress(r),clearTimeout(e);let o=0;const s=this.options.dragToSeek;this.isPlaying()?o=0:s===!0?o=200:s&&typeof s=="object"&&(o=(i=s.debounceTime)!==null&&i!==void 0?i:200),e=setTimeout(()=>{this.seekTo(r)},o),this.emit("interaction",r*this.getDuration()),this.emit("drag",r)});this.subscriptions.push(()=>{clearTimeout(e),n()})}}initPlugins(){var e;!((e=this.options.plugins)===null||e===void 0)&&e.length&&this.options.plugins.forEach(n=>{this.registerPlugin(n)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(e=>e()),this.mediaSubscriptions=[]}setOptions(e){this.options=Object.assign({},this.options,e),e.duration&&!e.peaks&&(this.decodedData=Po.createBuffer(this.exportPeaks(),e.duration)),e.peaks&&e.duration&&(this.decodedData=Po.createBuffer(e.peaks,e.duration)),this.renderer.setOptions(this.options),e.audioRate&&this.setPlaybackRate(e.audioRate),e.mediaControls!=null&&(this.getMediaElement().controls=e.mediaControls)}registerPlugin(e){if(this.plugins.includes(e))return e;e._init(this),this.plugins.push(e);const n=e.once("destroy",()=>{this.plugins=this.plugins.filter(r=>r!==e),this.subscriptions=this.subscriptions.filter(r=>r!==n)});return this.subscriptions.push(n),e}unregisterPlugin(e){this.plugins=this.plugins.filter(n=>n!==e),e.destroy()}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(e){return this.renderer.setScroll(e)}setScrollTime(e){const n=e/this.getDuration();this.renderer.setScrollPercentage(n)}getActivePlugins(){return this.plugins}loadAudio(e,n,r,i){return st(this,void 0,void 0,function*(){var o;if(this.emit("load",e),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,(o=this.abortController)===null||o===void 0||o.abort(),this.abortController=null,!n&&!r){const a=this.options.fetchParams||{};window.AbortController&&!a.signal&&(this.abortController=new AbortController,a.signal=this.abortController.signal);const l=c=>this.emit("loading",c);n=yield Sv.fetchBlob(e,l,a);const u=this.options.blobMimeType;u&&(n=new Blob([n],{type:u}))}this.setSrc(e,n);const s=yield new Promise(a=>{const l=i||this.getDuration();l?a(l):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>a(this.getDuration()),{once:!0}))});if(!e&&!n){const a=this.getMediaElement();a instanceof Qa&&(a.duration=s)}if(r)this.decodedData=Po.createBuffer(r,s||0);else if(n){const a=yield n.arrayBuffer();this.decodedData=yield Po.decode(a,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(e,n,r){return st(this,void 0,void 0,function*(){try{return yield this.loadAudio(e,void 0,n,r)}catch(i){throw this.emit("error",i),i}})}loadBlob(e,n,r){return st(this,void 0,void 0,function*(){try{return yield this.loadAudio("",e,n,r)}catch(i){throw this.emit("error",i),i}})}zoom(e){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(e),this.emit("zoom",e)}getDecodedData(){return this.decodedData}exportPeaks({channels:e=2,maxLength:n=8e3,precision:r=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const i=Math.min(e,this.decodedData.numberOfChannels),o=[];for(let s=0;s<i;s++){const a=this.decodedData.getChannelData(s),l=[],u=a.length/n;for(let c=0;c<n;c++){const d=a.slice(Math.floor(c*u),Math.ceil((c+1)*u));let h=0;for(let f=0;f<d.length;f++){const p=d[f];Math.abs(p)>Math.abs(h)&&(h=p)}l.push(Math.round(h*r)/r)}o.push(l)}return o}getDuration(){let e=super.getDuration()||0;return e!==0&&e!==1/0||!this.decodedData||(e=this.decodedData.duration),e}toggleInteraction(e){this.options.interact=e}setTime(e){this.stopAtPosition=null,super.setTime(e),this.updateProgress(e),this.emit("timeupdate",e)}seekTo(e){const n=this.getDuration()*e;this.setTime(n)}play(e,n){const r=Object.create(null,{play:{get:()=>super.play}});return st(this,void 0,void 0,function*(){e!=null&&this.setTime(e);const i=yield r.play.call(this);return n!=null&&(this.media instanceof Qa?this.media.stopAt(n):this.stopAtPosition=n),i})}playPause(){return st(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(e){this.setTime(this.getCurrentTime()+e)}empty(){this.load("",[[0]],.001)}setMediaElement(e){this.unsubscribePlayerEvents(),super.setMediaElement(e),this.initPlayerEvents()}exportImage(){return st(this,arguments,void 0,function*(e="image/png",n=1,r="dataURL"){return this.renderer.exportImage(e,n,r)})}destroy(){var e;this.emit("destroy"),(e=this.abortController)===null||e===void 0||e.abort(),this.plugins.forEach(n=>n.destroy()),this.subscriptions.forEach(n=>n()),this.unsubscribePlayerEvents(),this.reactiveCleanups.forEach(n=>n()),this.reactiveCleanups=[],this.timer.destroy(),this.renderer.destroy(),super.destroy()}}qi.BasePlugin=class extends fo{constructor(t){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=t}onInit(){}_init(t){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(t=>t()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}},qi.dom=gv;var I_=function(t,e,n,r){var i;e[0]=0;for(var o=1;o<e.length;o++){var s=e[o++],a=e[o]?(e[0]|=s?1:2,n[e[o++]]):e[++o];s===3?r[0]=a:s===4?r[1]=Object.assign(r[1]||{},a):s===5?(r[1]=r[1]||{})[e[++o]]=a:s===6?r[1][e[++o]]+=a+"":s?(i=t.apply(a,I_(t,a,n,["",null])),r.push(i),a[0]?e[0]|=2:(e[o-2]=0,e[o]=i)):r.push(a)}return r},pp=new Map;function Iv(t){var e=pp.get(this);return e||(e=new Map,pp.set(this,e)),(e=I_(this,e.get(t)||(e.set(t,e=(function(n){for(var r,i,o=1,s="",a="",l=[0],u=function(h){o===1&&(h||(s=s.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,h,s):o===3&&(h||s)?(l.push(3,h,s),o=2):o===2&&s==="..."&&h?l.push(4,h,0):o===2&&s&&!h?l.push(5,0,!0,s):o>=5&&((s||!h&&o===5)&&(l.push(o,0,s,i),o=6),h&&(l.push(o,h,0,i),o=6)),s=""},c=0;c<n.length;c++){c&&(o===1&&u(),u(c));for(var d=0;d<n[c].length;d++)r=n[c][d],o===1?r==="<"?(u(),l=[l],o=3):s+=r:o===4?s==="--"&&r===">"?(o=1,s=""):s=r+s[0]:a?r===a?a="":s+=r:r==='"'||r==="'"?a=r:r===">"?(u(),o=1):o&&(r==="="?(o=5,i=s,s=""):r==="/"&&(o<5||n[c][d+1]===">")?(u(),o===3&&(l=l[0]),o=l,(l=l[0]).push(2,0,o),o=0):r===" "||r===" "||r===`
|
|
92
|
+
`||r==="\r"?(u(),o=2):s+=r),o===3&&s==="!--"&&(o=4,l=l[0])}return u(),l})(t)),e),arguments,[])).length>1?e:e[0]}const Cv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,TALK_GMK:"AIzaSyAsz0mHH8fOjpcBfWeCfDVOFPh-nWgsxbs"},Nv=(function(t){return Cv[t]})("TALK_GMK");function su(t,e=10){const n=Hn(Fc),[r,i]=ne([]);return G(()=>{if(!t)return;const o=n.conversation(t).subscribeParticipants(s=>i(s!=null?s:[]));return e>10&&o.connected.then(async()=>{for(;o.state.type==="active"&&!o.state.loadedAll&&o.state.latestSnapshot!==null&&o.state.latestSnapshot.length<e;){const s=Math.min(e-o.state.latestSnapshot.length,50);await o.loadMore(s)}}),()=>{o.unsubscribe()}},[t,n,e]),r}const C_=/^\/.*[^\\]\/[im]*$/;function fp(t){return C_.test(t)?!Os(t).test(""):!1}function Os(t){const e=t.match(/^\/(.*[^\\])\/(.*)$/);if(!e)throw new Error(`Expected ${t} to be a (non-empty) regex`);let n=e[2]||"";return n=n.replace(/[^im]/g,"")+"g",new RegExp(e[1],n)}function N_(t){const e=t.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+e+"$","i")}function bv(t,e){const n=ZE(e),r=N_(t);return n!==void 0&&r.test(n)}const wv=/^[]/g;function b_(t){return t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function Ql(t,e){!t()&&!e&&(e=t.toString().replace(/^function\s*\(\)\s*\{\s*return\s*(.*);\s*\}\s*$/,"`$1`")+" was not true")}(t=>{function e(r){}function n(r,i){(function(o,s){switch(s){case"undefined":return o===void 0;case String:return typeof o=="string"||o instanceof String;case Boolean:return typeof o=="boolean"||o instanceof Boolean;case Number:return typeof o=="number"||o instanceof Number;default:return o instanceof s}})(r,i)||(i.name,String(r))}t.defined=e,t.has=function(r,i){r[i]},t.is=n,t.equals=function(r,i){},t.oneOf=function(r,i){i.includes(r)||JSON.stringify(i)},t.isArray=function(r,i){n(r,Array),r&&r.length>0&&n(r[0],i)},t.optional=function(r,i){r!==void 0&&n(r,i)},t.falsy=function(r){},t.never=function(r){}})(Ql||(Ql={}));const zr=Ql,kv=new RegExp(":arslan:|"+/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g.source,"g"),Lv=/\uFE0F/g,Mv="";function Pv(t){if(t===":arslan:")return"https://cdn.talkjs.com/__assets/5461191341cea882b3f227c085d5772c.gif";const e=(function(r){const i=[];let o=0,s=0,a=0;for(;a<r.length;)o=r.charCodeAt(a++),s?(i.push((65536+(s-55296<<10)+(o-56320)).toString(16)),s=0):55296<=o&&o<=56319?s=o:i.push(o.toString(16));return i.join("-")})((n=t).indexOf(Mv)<0?n.replace(Lv,""):n);var n;return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${e}.svg`}class w_{constructor({mode:e,allowedHostnames:n,allowedPhoneNrs:r,allowedMatches:i,forbiddenMatches:o,forbiddenWords:s,suppressLinks:a,suppressEmailAddresses:l,suppressPhoneNumbers:u,replacement:c}){if(zr.oneOf(e,["all","otherOnly","off"]),this.mode=e,this.suppressLinks=a!==!1,this.suppressEmailAddresses=l!==!1,this.suppressPhoneNumbers=u!==!1,this.allowedHostnames=n||[],this.allowedPhoneNrs=(r||[]).filter(d=>d).map(d=>d.replace(/[^0-9]/g,"")),this.allowedMatches=(i||[]).filter(fp).map(d=>Os(d)),this.forbiddenMatches=(o||[]).filter(fp).map(d=>Os(d)),s){const d=s.split(`
|
|
93
|
+
`).map(h=>h.trim().toLowerCase()).filter(h=>h.length>0&&!h.startsWith("#")).map(h=>b_(h));d.length&&this.forbiddenMatches.push(new RegExp(`\\b(${d.join("|")})\\b`,"gi"))}zr(()=>this.allowedMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),zr(()=>this.forbiddenMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.forbiddenMatches` must be global. Check `forbiddenMatches`!"),c=c==null?void 0:c.trim(),this.replacement=c&&c.length>0?c:void 0}shouldSuppress({isContentBySender:e}){return this.mode==="all"||this.mode==="otherOnly"&&!e}}function au(t){var n,r,i,o,s,a,l,u,c,d,h,f,p,m;let e="";return t.t&&(e=`(${t.t("CONTACT_INFORMATION_HIDDEN")})`),{formattedLinks:(n=t.formattedLinks)!=null?n:"plaintext",markup:(r=t.markup)!=null?r:!1,useFallbackMentions:(i=t.useFallbackMentions)!=null?i:!1,sameTabLinkRules:(o=t.sameTabLinkRules)!=null?o:[],enableEmojiImageFallback:(s=t.enableEmojiImageFallback)!=null?s:!1,highlight:(a=t.highlight)!=null?a:[],highlightFromWordBeginnings:(l=t.highlightFromWordBeginnings)!=null?l:!1,contactInfo:(u=t.contactInfo)!=null?u:!1,suppression:(c=t.suppression)!=null?c:new w_({mode:"off"}),contactInfoHiddenText:(f=(h=t.contactInfoHiddenText)!=null?h:(d=t.suppression)==null?void 0:d.replacement)!=null?f:e,customEmojiUrls:(p=t.customEmojiUrls)!=null?p:{},enableActions:(m=t.enableActions)!=null?m:!0}}function xv({id:t,text:e}){var i;const n=oe(),r=J(()=>{var a;if(n.type==="ConversationListStore")return;const o=n.state$.currentConversationId.get(),s=o&&n.state$.participants.child(o).get();return(a=s==null?void 0:s.find(l=>l.user.id===t))==null?void 0:a.user});return y("span",{className:"t-mention","t-is-current-user":J(n.extUserId$)===t?"":void 0,children:`@${(i=r==null?void 0:r.name)!=null?i:e}`})}function Fv({message:t,type:e,action:n,params:r,children:i}){const o=Ar(),s=q(l=>{l.preventDefault(),o.triggerMessageAction(t,n,r)},[o,t,n,r]),a={"t-action":n,onClick:s};return e==="actionButton"?y("button",{...a,type:"button",children:i}):y("a",{...a,href:"#",children:i})}function k_(t,e={},n){return ur(t,{...au(e),message:n})}function ur(t,e){const n=t.flatMap(r=>{if(typeof r=="string")return el(r,e.highlight,e.highlightFromWordBeginnings);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return Hv(r,e);case"bulletlist":case"bulletList":return[fe("ul",null,...ur(r.children,e))];case"autolink":case"autoLink":case"link":return Bv(r,e);case"codeblock":case"codeBlock":return[y("code",{"data-language":r.language,children:el(r.text,e.highlight,e.highlightFromWordBeginnings)})];case"codespan":case"codeSpan":return y("code",{children:el((i=r.text,i.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")),e.highlight,e.highlightFromWordBeginnings)});case"mention":return zr.falsy(e.useFallbackMentions),y(xv,{id:r.id,text:r.text},r.id);case"suppressed":return[y("i",{children:e.contactInfoHiddenText})];case"emoji":return e.enableEmojiImageFallback?[y(Uv,{unicode:r.text})]:[r.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return jv(r,e);case"customemoji":case"customEmoji":return r.text;default:zr.never(r)}var i});return n.every(r=>typeof r=="string")?[n.join("")]:n}function xo(t){return t.normalize("NFKC").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function el(t,e,n=!1){if(!t||!e.length)return[t];const r=xo(t),i=t.toLowerCase()!==r,o=e.map(l=>xo(l).trim()).filter(l=>l.length),s=(function(l){const u=l.map(d=>d.trim()).filter(d=>d).sort((d,h)=>h.length-d.length);if(u.length===0)return wv;const c=u.map(b_).join("|");return new RegExp(c,"gi")})(o),a=Js(r,n?new RegExp(`(?<=^|\\s)(${s.source})`,s.flags):s).map(l=>({offset:l.index,matchedText:l[0],index:l.index}));return Xl(t,a,({index:l,matchedText:u})=>[y("mark",{className:"t-highlighted-text",children:i?(function(c,d,h){let f=0,p=0;for(;p<d&&f<c.length;)p+=xo(c[f]).length,f+=1;let m=f;for(;p<d+h&&m<c.length;)p+=xo(c[m]).length,m+=1;return c.substring(f,m)})(t,l,u.length):t.slice(l,l+u.length)})])}const Hv=(t,e)=>[fe({bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[t.type],null,...ur(t.children,e))];function Uv({unicode:t}){const[e,n]=ne(()=>t!==":arslan:");return G(()=>{e&&!Ym(t)&&n(!1)},[]),e?y("span",{className:"t-emoji",children:t}):y("img",{className:"t-emoji",src:Pv(t),alt:t})}const Bv=(t,e)=>{const n="children"in t?t.children:[t.text];switch(e.formattedLinks){case"link":return[fe("a",{target:(function(r,i){for(const o of r)if(C_.test(o)){if(Os(o).test(i))return"_top"}else if(bv(o,i))return"_top";return"_blank"})(e.sameTabLinkRules,t.url),href:t.url,rel:"noreferrer"},...ur(n,e))];case"plaintext":return"children"in t&&t.children.every(r=>typeof r=="string")?[t.children.join("")]:[fe(De,null,...ur(n,e))];default:zr.never(e.formattedLinks)}},jv=(t,e)=>e.enableActions?[fe(Fv,{type:t.type==="actionlink"?"actionLink":t.type==="actionbutton"?"actionButton":t.type,action:t.action,params:t.params,message:e.message},...ur(t.children,e))]:"children"in t&&t.children.every(n=>typeof n=="string")?[t.children.join("")]:[fe(De,null,...ur(t.children,e))];function $v(t,e){return qo(t,au(e))}function qo(t,e){return t.flatMap(n=>{if(typeof n=="string"){let r=[n];return r=tl(r,i=>(function(o,s){const{suppression:{forbiddenMatches:a,allowedMatches:l}}=s,u=Jc(a,c=>Js(o,c)).filter(([c])=>!l.some(d=>c.match(d)!==null)).map(c=>({offset:c.index,matchedText:c[0]}));return Xl(o,u,()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])})(i,e)),r=tl(r,i=>(function(o){return Xl(o,(function(s){const a=[];let l;for(;l=kv.exec(s);){const u=l[0],c=l.index;a.push({offset:c,matchedText:u})}return a})(o),s=>[{type:"emoji",text:s.matchedText}])})(i)),r=tl(r,i=>(function(o,s){if(s.contactInfo!=="suppress")return[o];const a=[];if((s.suppression.suppressEmailAddresses||s.suppression.suppressLinks)&&a.push(E_),s.suppression.suppressPhoneNumbers&&a.push(m_),a.length===0)return[o];const l=g_(o,{multilineSteps:[],singlelineSteps:a}),u=l.map(c=>typeof c=="string"?c:mp(c.url,s.suppression)?c.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"});return iu(u)})(i,e)),r}switch(n.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return{type:n.type,children:qo(n.children,e)};case"codespan":case"codeSpan":case"codeblock":case"codeBlock":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return n;case"mention":return{type:"mention",id:n.id,text:n.text};case"autolink":case"autoLink":return(function(r,i){return i.contactInfo==="link"?r:i.contactInfo==="suppress"?mp(r.url,i.suppression)?r:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:r.text})(n,e);case"link":return{type:"link",url:n.url,children:qo(n.children,e)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:n.type,action:n.action,params:n.params,children:qo(n.children,e)}}})}function tl(t,e){return Jc(t,n=>typeof n=="string"?e(n):[n])}function mp(t,e){if(e.allowedMatches.some(n=>t.match(n)!==null))return!0;if(e.forbiddenMatches.some(n=>t.match(n)!==null))return!1;if(t.startsWith("mailto:")){const n=t.substring(7).replace(/^.*@/,"");return!e.suppressEmailAddresses||Ep(e.allowedHostnames,n)}if(t.startsWith("tel:")){const n=t.substring(4).replace(/[^0-9]/g,"");return!e.suppressPhoneNumbers||e.allowedPhoneNrs.some(r=>n.endsWith(r))}{const n=ZE(t);return!e.suppressLinks||!n||Ep(e.allowedHostnames,n)}}function Ep(t,e){for(const n of t)if(N_(n).test(e))return!0;return!1}function lu({block:t,nonInteractive:e,message:n,className:r=""}){const i=oe(),o=!e,s=J(i.highlightedStrings$),a=i.type==="ConversationListStore",{nodes:l,roleOptions:u}=(function(c,d){var S;const h=oe(),f=J(h.app$.role);ie.defined(f);const p=d.type==="UserMessage",m=((S=d.sender)==null?void 0:S.id)===h.extUserId$.peek(),E=f.suppressContactInfo,_=p&&E.shouldSuppress({isContentBySender:m}),A=$v(c.children,{contactInfo:_?"suppress":"link",suppression:E}),O={sameTabLinkRules:f.sameTabLinkRules,contactInfoHiddenText:f.suppressContactInfo.replacement||`(${h.t$.peek().CONTACT_INFORMATION_HIDDEN})`};return{nodes:A,roleOptions:O}})(t,n);return fe("span",{className:`t-text ${r}`},...k_(l,{enableEmojiImageFallback:!0,formattedLinks:o?"link":"plaintext",enableActions:o,highlight:s,highlightFromWordBeginnings:a,...u},n))}function dr({text:t,className:e=""}){const n=oe();return fe("span",{className:`t-highlightable ${e}`},...k_([t],{enableEmojiImageFallback:!0,formattedLinks:"plaintext",enableActions:!1,highlight:J(n.highlightedStrings$),highlightFromWordBeginnings:n.type==="ConversationListStore"},null))}function L_(t){const e=et(),n=oe(),{className:r="",...i}=t,o=J(()=>n.state$.messages.child(t.common.conversation.id).lookup.child(t.message.id).content.child(0).url.get());return y("div",{className:`t-message-content ${r}`,children:t.message.content.map(s=>{var a;return y(Vv,{block:s,theme:e,downloadUrl:o,...i},t.message.createdAt+((a=t.message.editedAt)!=null?a:0))})})}function Vv({common:t,block:e,message:n,theme:r,downloadUrl:i}){const o=(function(s,a){switch(a.type){case"text":return s.TextBlock;case"location":return s.LocationBlock;case"file":switch(a.subtype){case"image":return s.ImageBlock;case"video":return s.VideoBlock;case"voice":return s.VoiceBlock;case"audio":return s.AudioBlock;default:return s.FileBlock}default:ie.never(a)}})(r,e);return y(o,{block:e,common:t,message:n,downloadUrl:i})}const zv=27;function mo(t,e,n=!0){const r=q(o=>{o.keyCode===zv&&t()},[t]),i=q(o=>{o.target.closest(e)===null&&t(o)},[e,t]);G(()=>{if(n)return window.addEventListener("keydown",r,!0),document.addEventListener("mousedown",i,!0),()=>{window.removeEventListener("keydown",r,!0),document.removeEventListener("mousedown",i,!0)}},[r,i,n])}const Yv=".search-row{margin-right:var(--emoji-padding)}.emoji-menu{grid-template-columns:repeat(auto-fill,var(--total-emoji-size));padding:var(--emoji-padding)}.emoji,button.emoji{border-radius:8px}.favorites{border-top-width:1px}input.search:focus{border-color:var(--input-focused-border-color);outline:0}.picker{container-type:size}@container (height < 300px){.favorites{display:none}}#skintone-button{margin:0 -3px 0 4px}.custom-emoji{padding:0}#emo-🏻,#emo-🏼,#emo-🏽,#emo-🏾,#emo-🏿{display:none}[data-has-mouse] .emoji:hover{background-color:var(--button-hover-background)}",Gv={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var _p,Ap,nl,gp,Sp,Op={exports:{}};function Wv(){return Ap?_p:(Ap=1,_p="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function Xv(){if(gp)return nl;gp=1;var t=Wv();function e(){}function n(){}return n.resetWarningCache=e,nl=function(){function r(s,a,l,u,c,d){if(d!==t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},nl}function Kv(){return Sp||(Sp=1,Op.exports=Xv()()),Op.exports}const Le=zs(Kv()),K=_t(function({className:t,children:e,tabIndex:n,xmlns:r="http://www.w3.org/2000/svg",preserveAspectRatio:i="xMidYMid meet",...o},s){const{tabindex:a,...l}=(function({width:c,height:d,viewBox:h=`0 0 ${c} ${d}`,...f}={}){const{tabindex:p,...m}=f,E={...Gv,...m,width:c,height:d,viewBox:h};return E["aria-label"]||E["aria-labelledby"]?(E.role="img",p!=null&&(E.focusable="true",E.tabindex=p)):E["aria-hidden"]=!0,E})({...o,tabindex:n}),u=l;return t&&(u.className=t),a!=null&&(u.tabIndex=typeof a=="number"?a:Number(n)),s&&(u.ref=s),r&&(u.xmlns=r),i&&(u.preserveAspectRatio=i),F.createElement("svg",u,e)});K.displayName="Icon",K.propTypes={"aria-hidden":Le.oneOfType([Le.bool,Le.oneOf(["true","false"])]),"aria-label":Le.string,"aria-labelledby":Le.string,children:Le.node,className:Le.string,height:Le.oneOfType([Le.number,Le.string]),preserveAspectRatio:Le.string,tabIndex:Le.oneOfType([Le.number,Le.string]),viewBox:Le.string,width:Le.oneOfType([Le.number,Le.string]),xmlns:Le.string};const qv=F.forwardRef(function({children:t,size:e=16,...n},r){return e===20||e==="20"||e==="20px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},y("path",{d:"M8 13.2 3.6 8.8 2.7 9.7 7.1 14.1 8 15 16.5 6.5 15.6 5.6z"}),y("path",{d:"M15.6 5.6 8 13.2 3.6 8.8 2.7 9.7 7.1 14.1 8 15 16.5 6.5 15.6 5.6z"}),t):e===24||e==="24"||e==="24px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},y("path",{d:"M10 15.9 4.7 10.6 3.6 11.6 8.9 16.9 10 18 20.6 7.4 19.5 6.3z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"}),t)}),Jv=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"}),y("path",{d:"M11.5,11A2.5,2.5,0,1,0,14,13.5,2.48,2.48,0,0,0,11.5,11Z"}),y("path",{d:"M20.5,11A2.5,2.5,0,1,0,23,13.5,2.48,2.48,0,0,0,20.5,11Z"}),y("path",{d:"M16,24a8,8,0,0,0,6.85-3.89l-1.71-1a6,6,0,0,1-10.28,0l-1.71,1A8,8,0,0,0,16,24Z"}),t)}),Zv=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M16,22a6,6,0,0,1-5.14-2.92l-1.71,1a8,8,0,0,0,13.7,0l-1.71-1A6,6,0,0,1,16,22Z"}),y("path",{d:"M30 4 26 4 26 0 24 0 24 4 20 4 20 6 24 6 24 10 26 10 26 6 30 6 30 4z"}),y("path",{d:"M11.5,11A2.5,2.5,0,1,0,14,13.5,2.48,2.48,0,0,0,11.5,11Z"}),y("path",{d:"M20.5,11A2.5,2.5,0,1,0,23,13.5,2.48,2.48,0,0,0,20.5,11Z"}),y("path",{d:"M27.61,13A12.33,12.33,0,0,1,28,16,12,12,0,1,1,16,4V2A14,14,0,1,0,29.67,13Z"}),t)}),Qv=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("circle",{cx:"8",cy:"16",r:"2"}),y("circle",{cx:"16",cy:"16",r:"2"}),y("circle",{cx:"24",cy:"16",r:"2"}),t)}),eD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("circle",{cx:"16",cy:"8",r:"2"}),y("circle",{cx:"16",cy:"16",r:"2"}),y("circle",{cx:"16",cy:"24",r:"2"}),t)}),tD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},y("path",{d:"M0 5 5 0 5.7.7 1.4 5 5.7 9.3 5 10z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},y("path",{d:"M5 8 10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"}),t)}),nD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},y("path",{d:"M6 5 1 10 .3 9.3 4.6 5 .3.7 1 0z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},y("path",{d:"M11 8 6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"}),t)}),rD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},y("path",{d:"M5 0 10 5 9.3 5.7 5 1.4.7 5.7 0 5z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},y("path",{d:"M8 5 13 10 12.3 10.7 8 6.4 3.7 10.7 3 10z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M16 10 26 20 24.6 21.4 16 12.8 7.4 21.4 6 20z"}),t)}),iD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},y("path",{d:"M5 6 0 1 .7.3 5 4.6 9.3.3 10 1z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},y("path",{d:"M8 11 3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"}),t)}),oD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"}),t)}),sD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm0,26A12,12,0,0,1,16,4V16l8.4812,8.4814A11.9625,11.9625,0,0,1,16,28Z"}),t)}),aD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},y("path",{d:"M13 7 12.3 6.3 8.5 10.1 8.5 1 7.5 1 7.5 10.1 3.7 6.3 3 7 8 12z"}),y("path",{d:"M13,12v2H3v-2H2v2l0,0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1l0,0v-2H13z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M26,24v4H6V24H4v4H4a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2h0V24Z"}),y("path",{d:"M26 14 24.59 12.59 17 20.17 17 2 15 2 15 20.17 7.41 12.59 6 14 16 24 26 14z"}),t)}),lD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M28.1,18.9L13.1,3.9c-2.5-2.6-6.6-2.6-9.2-0.1S1.3,10.5,3.9,13c0,0,0.1,0.1,0.1,0.1L6.8,16l1.4-1.4l-2.9-2.9 C3.6,10,3.6,7.1,5.3,5.4s4.6-1.8,6.3-0.1c0,0,0,0,0.1,0.1l14.9,14.9c1.8,1.7,1.8,4.6,0.1,6.3c-1.7,1.8-4.6,1.8-6.3,0.1 c0,0,0,0-0.1-0.1l-7.4-7.4c-1-1-0.9-2.6,0-3.5c1-0.9,2.5-0.9,3.5,0l4.1,4.1l1.4-1.4c0,0-4.2-4.2-4.2-4.2c-1.8-1.7-4.6-1.6-6.3,0.2 c-1.6,1.7-1.6,4.4,0,6.2l7.5,7.5c2.5,2.6,6.6,2.6,9.2,0.1S30.7,21.5,28.1,18.9C28.1,19,28.1,18.9,28.1,18.9L28.1,18.9z"}),t)}),cD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M27.6 20.6 24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22z"}),y("path",{d:"M9 4 3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z"}),t)}),uD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M28.88,30a1,1,0,0,1-.88-.5A15.19,15.19,0,0,0,15,22v6a1,1,0,0,1-.62.92,1,1,0,0,1-1.09-.21l-12-12a1,1,0,0,1,0-1.42l12-12a1,1,0,0,1,1.09-.21A1,1,0,0,1,15,4v6.11a17.19,17.19,0,0,1,15,17,16.34,16.34,0,0,1-.13,2,1,1,0,0,1-.79.86ZM14.5,20A17.62,17.62,0,0,1,28,26,15.31,15.31,0,0,0,13.91,12,1,1,0,0,1,13,11V6.41L3.41,16,13,25.59V21a1,1,0,0,1,1-1h.54Z"}),t)}),dD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M2 26H30V28H2z"}),y("path",{d:"M25.4,9c0.8-0.8,0.8-2,0-2.8c0,0,0,0,0,0l-3.6-3.6c-0.8-0.8-2-0.8-2.8,0c0,0,0,0,0,0l-15,15V24h6.4L25.4,9z M20.4,4L24,7.6 l-3,3L17.4,7L20.4,4z M6,22v-3.6l10-10l3.6,3.6l-10,10H6z"}),t)}),hD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M12 12H14V24H12z"}),y("path",{d:"M18 12H20V24H18z"}),y("path",{d:"M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"}),y("path",{d:"M12 2H20V4H12z"}),t)}),pD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M28.59,13.31,30,11.9,20,2,18.69,3.42,19.87,4.6,8.38,14.32,6.66,12.61,5.25,14l5.66,5.68L2,28.58,3.41,30l8.91-8.91L18,26.75l1.39-1.42-1.71-1.71L27.4,12.13ZM16.26,22.2,9.8,15.74,21.29,6,26,10.71Z"}),t)}),fD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M7,28a1,1,0,0,1-1-1V5a1,1,0,0,1,1.4819-.8763l20,11a1,1,0,0,1,0,1.7525l-20,11A1.0005,1.0005,0,0,1,7,28Z"}),t)}),mD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M12,6H10A2,2,0,0,0,8,8V24a2,2,0,0,0,2,2h2a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"}),y("path",{d:"M22,6H20a2,2,0,0,0-2,2V24a2,2,0,0,0,2,2h2a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"}),t)}),ED=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},y("path",{d:"M8.5 11 8.5 6.5 6.5 6.5 6.5 7.5 7.5 7.5 7.5 11 6 11 6 12 10 12 10 11z"}),y("path",{d:"M8,3.5c-0.4,0-0.8,0.3-0.8,0.8S7.6,5,8,5c0.4,0,0.8-0.3,0.8-0.8S8.4,3.5,8,3.5z"}),y("path",{d:"M8,15c-3.9,0-7-3.1-7-7s3.1-7,7-7s7,3.1,7,7S11.9,15,8,15z M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z"}),y("path",{d:"M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z"}),y("path",{d:"M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"}),t)}),_D=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},y("path",{d:"M3.7 6.7 7.5 2.9 7.5 15 8.5 15 8.5 2.9 12.3 6.7 13 6 8 1 3 6z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M16 4 6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z"}),t)}),AD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},y("path",{d:"M6.7 12.3 2.9 8.5 15 8.5 15 7.5 2.9 7.5 6.7 3.7 6 3 1 8 6 13z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M14 26 15.41 24.59 7.83 17 28 17 28 15 7.83 15 15.41 7.41 14 6 4 16 14 26z"}),t)}),gD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},y("path",{d:"M9.3 3.7 13.1 7.5 1 7.5 1 8.5 13.1 8.5 9.3 12.3 10 13 15 8 10 3z"}),t):e===20||e==="20"||e==="20px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},y("path",{d:"M11.8 2.8 10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"}),t):e===24||e==="24"||e==="24px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},y("path",{d:"M14 4 12.9 5.1 18.9 11.2 2 11.2 2 12.8 18.9 12.8 12.9 18.9 14 20 22 12z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"}),t)}),SD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},y("path",{d:"M12.3 9.3 8.5 13.1 8.5 1 7.5 1 7.5 13.1 3.7 9.3 3 10 8 15 13 10z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M24.59 16.59 17 24.17 17 4 15 4 15 24.17 7.41 16.59 6 18 16 28 26 18 24.59 16.59z"}),t)}),OD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M16,18a5,5,0,1,1,5-5A5.0057,5.0057,0,0,1,16,18Zm0-8a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,16,10Z"}),y("path",{d:"M16,30,7.5645,20.0513c-.0479-.0571-.3482-.4515-.3482-.4515A10.8888,10.8888,0,0,1,5,13a11,11,0,0,1,22,0,10.8844,10.8844,0,0,1-2.2148,6.5973l-.0015.0025s-.3.3944-.3447.4474ZM8.8125,18.395c.001.0007.2334.3082.2866.3744L16,26.9079l6.91-8.15c.0439-.0552.2783-.3649.2788-.3657A8.901,8.901,0,0,0,25,13,9,9,0,1,0,7,13a8.9054,8.9054,0,0,0,1.8125,5.395Z"}),t)}),vD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M23,14v3A7,7,0,0,1,9,17V14H7v3a9,9,0,0,0,8,8.94V28H11v2H21V28H17V25.94A9,9,0,0,0,25,17V14Z"}),y("path",{d:"M16,22a5,5,0,0,0,5-5V7A5,5,0,0,0,11,7V17A5,5,0,0,0,16,22ZM13,7a3,3,0,0,1,6,0V17a3,3,0,0,1-6,0Z"}),t)}),DD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M24,6H8A2,2,0,0,0,6,8V24a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"}),t)}),TD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M19,14a3,3,0,1,0-3-3A3,3,0,0,0,19,14Zm0-4a1,1,0,1,1-1,1A1,1,0,0,1,19,10Z"}),y("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4Zm0,22H6V20l5-5,5.59,5.59a2,2,0,0,0,2.82,0L21,19l5,5Zm0-4.83-3.59-3.59a2,2,0,0,0-2.82,0L18,19.17l-5.59-5.59a2,2,0,0,0-2.82,0L6,17.17V6H26Z"}),t)}),RD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M21,26H4a2,2,0,0,1-2-2V8A2,2,0,0,1,4,6H21a2,2,0,0,1,2,2v4.06l5.42-3.87A1,1,0,0,1,30,9V23a1,1,0,0,1-1.58.81L23,19.94V24A2,2,0,0,1,21,26ZM4,8V24H21V18a1,1,0,0,1,1.58-.81L28,21.06V10.94l-5.42,3.87A1,1,0,0,1,21,14V8Z"}),t)});function re(t){const{type:e,className:n,...r}=t;return y(yD[e],{className:`t-theme-icon ${n||""}`,...r})}const yD={checkmark:qv,emoji:Jv,addEmoji:Zv,search:F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},y("path",{d:"M15,14.3L10.7,10c1.9-2.3,1.6-5.8-0.7-7.7S4.2,0.7,2.3,3S0.7,8.8,3,10.7c2,1.7,5,1.7,7,0l4.3,4.3L15,14.3z M2,6.5 C2,4,4,2,6.5,2S11,4,11,6.5S9,11,6.5,11S2,9,2,6.5z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z"}),t)}),plus:F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M17 15 17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"}),t)}),email:F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M28,6H4A2,2,0,0,0,2,8V24a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V8A2,2,0,0,0,28,6ZM25.8,8,16,14.78,6.2,8ZM4,24V8.91l11.43,7.91a1,1,0,0,0,1.14,0L28,8.91V24Z"}),t)}),horizontalDots:Qv,verticalDots:eD,chevronLeft:tD,chevronRight:nD,chevronUp:rD,chevronDown:iD,arrowsVertical:cD,arrowUp:_D,arrowLeft:AD,arrowRight:gD,arrowDown:SD,close:oD,inProgress:sD,download:aD,attachment:lD,reply:uD,edit:dD,trash:hD,pin:pD,play:fD,pause:mD,info:ED,send:F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y("path",{d:"M27.45,15.11l-22-11a1,1,0,0,0-1.08.12,1,1,0,0,0-.33,1L7,16,4,26.74A1,1,0,0,0,5,28a1,1,0,0,0,.45-.11l22-11a1,1,0,0,0,0-1.78Zm-20.9,10L8.76,17H18V15H8.76L6.55,6.89,24.76,16Z"}),t)}),location:OD,microphone:vD,stop:DD,spinner:function(t){const e=`t-spin ${t.className||""}`;return y("svg",{xmlns:"http://www.w3.org/2000/svg",id:"icon",width:t.size,height:t.size,viewBox:"0 0 32 32",preserveAspectRatio:"xMidYMid meet",fill:"currentColor",focusable:"false",...t,className:e,children:y("path",{d:"M16,28c-6.6167,0-12-5.3832-12-12S9.3833,4,16,4c2.335,0,4.5986,.6714,6.5461,1.9414l-1.0923,1.6753c-1.6221-1.0576-3.5078-1.6167-5.4539-1.6167-5.5139,0-10,4.486-10,10s4.4861,10,10,10c1.946,0,3.8318-.5591,5.4539-1.6167l1.0923,1.6753c-1.9475,1.27-4.2112,1.9414-6.5461,1.9414Z"})})},image:TD,movie:RD};function cu(){return y(re,{type:"spinner","aria-label":J(oe().t$).LOADING,className:"t-loading-icon"})}const M_={"emoji-picker-element":"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/+esm","mpegts.js":"https://cdn.jsdelivr.net/npm/mpegts.js@1.7.3","opus-media-recorder-wasm":"https://cdn.jsdelivr.net/npm/opus-media-recorder@0.8.0/WebMOpusEncoder.wasm"};async function ID(t,e){if(typeof window=="undefined"||window.document===void 0)return new Promise(()=>{});try{const n=t!=null?t:jr.emojiPickerTranslationUrl,r=M_["emoji-picker-element"],[i,o]=await Promise.all([vp(r),vp(n)]),s=e!=null?e:jr.emojiDataUrl,a={...i,i18n:o.default,dataSource:s};return await new a.Database({dataSource:s}).ready(),a}catch(n){return bl.error("Failed to load emoji picker:",n),new Promise(()=>{})}}async function vp(t){return import(t).catch(()=>new Function("url","return import(url)")(t)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}function uu(){const t=oe(),[e,n]=ne();return Mm(()=>{const r=t.translationData$.get();t.app$.get()&&t.currentUser$.get()&&r&&(function(i,o){const s=JSON.stringify([i,o]);if(rl[s])return rl[s];const a=ID(i,o);return rl[s]=a,a})(r.emojiPickerTranslationUrl,r.emojiDataUrl).then(i=>n({value:i}))},[]),e}const rl={};function du(t){const{onClose:e,onEmojiSelected:n}=Xg(),r=X(null),i=oe(),o=J(i.t$),s=uu();return G(()=>{if(!s)return;ie.defined(r.current);const a=r.current,l=a.shadowRoot;(function(d,h){const f=document.createElement("style");f.textContent=h,d.appendChild(f)})(l,Yv);const u=d=>{var f;const h=(f=d.detail.unicode)!=null?f:d.detail.name;n(h)};function c(d){d.pointerType==="mouse"&&(l.querySelector("section").dataset.hasMouse="true")}return a.addEventListener("emoji-click",u),a.addEventListener("pointermove",c,{once:!0}),a.i18n=s.value.i18n,()=>{a.removeEventListener("emoji-click",u),a.removeEventListener("pointermove",c)}},[s,n]),G(()=>{var a;s&&r.current&&!i.device$.isMobile.peek()&&((a=r.current.shadowRoot.getElementById("search"))==null||a.focus())},[s,i]),mo(()=>e(),".t-emoji-picker"),y("div",s?{className:"t-emoji-picker",children:y("emoji-picker",{locale:o.locale,ref:r,class:t.colorScheme,"data-source":s.value.dataSource})}:{className:"t-emoji-picker","t-loading":"",children:y(cu,{})})}function P_({messageId:t,colorScheme:e}){const{closePopover:n}=Hc(),r=Ar();return y("div",{className:"t-reaction-picker",children:y(Vm.Provider,{value:{onClose:n,onEmojiSelected:i=>{r.addReaction(t,i),n()}},children:y(du,{colorScheme:e})})})}function ec(){return ec=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ec.apply(null,arguments)}function x_(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function tc(t,e){return tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},tc(t,e)}function F_(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,tc(t,e)}var Dp,Tp,il,Rp,yp,Ip={exports:{}};function CD(){if(Rp)return il;Rp=1;var t=Tp?Dp:(Tp=1,Dp="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function e(){}function n(){}return n.resetWarningCache=e,il=function(){function r(s,a,l,u,c,d){if(d!==t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}function i(){return r}r.isRequired=r;var o={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},il}function Cp(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}yp||(yp=1,Ip.exports=CD()()),Ip.exports;const Np=!1,H_=F.createContext(null);var Di="unmounted",zn="exited",Yn="entering",kr="entered",nc="exiting",sn=(function(t){function e(r,i){var o;o=t.call(this,r,i)||this;var s,a=i&&!i.isMounting?r.enter:r.appear;return o.appearStatus=null,r.in?a?(s=zn,o.appearStatus=Yn):s=kr:s=r.unmountOnExit||r.mountOnEnter?Di:zn,o.state={status:s},o.nextCallback=null,o}F_(e,t),e.getDerivedStateFromProps=function(r,i){return r.in&&i.status===Di?{status:zn}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var i=null;if(r!==this.props){var o=this.state.status;this.props.in?o!==Yn&&o!==kr&&(i=Yn):o!==Yn&&o!==kr||(i=nc)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r,i,o,s=this.props.timeout;return r=i=o=s,s!=null&&typeof s!="number"&&(r=s.exit,i=s.enter,o=s.appear!==void 0?s.appear:i),{exit:r,enter:i,appear:o}},n.updateStatus=function(r,i){r===void 0&&(r=!1),i!==null?(this.cancelNextCallback(),i===Yn?this.performEnter(r):this.performExit()):this.props.unmountOnExit&&this.state.status===zn&&this.setState({status:Di})},n.performEnter=function(r){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:r,a=this.props.nodeRef?[s]:[F.findDOMNode(this),s],l=a[0],u=a[1],c=this.getTimeouts(),d=s?c.appear:c.enter;!r&&!o||Np?this.safeSetState({status:kr},function(){i.props.onEntered(l)}):(this.props.onEnter(l,u),this.safeSetState({status:Yn},function(){i.props.onEntering(l,u),i.onTransitionEnd(d,function(){i.safeSetState({status:kr},function(){i.props.onEntered(l,u)})})}))},n.performExit=function(){var r=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:F.findDOMNode(this);i&&!Np?(this.props.onExit(s),this.safeSetState({status:nc},function(){r.props.onExiting(s),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:zn},function(){r.props.onExited(s)})})})):this.safeSetState({status:zn},function(){r.props.onExited(s)})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},n.setNextCallback=function(r){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,r(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(r,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:F.findDOMNode(this),s=r==null&&!this.props.addEndListener;if(o&&!s){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=a[0],u=a[1];this.props.addEndListener(l,u)}r!=null&&setTimeout(this.nextCallback,r)}else setTimeout(this.nextCallback,0)},n.render=function(){var r=this.state.status;if(r===Di)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=x_(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return F.createElement(H_.Provider,{value:null},typeof o=="function"?o(r,s):F.cloneElement(F.Children.only(o),s))},e})(F.Component);function Nr(){}sn.contextType=H_,sn.propTypes={},sn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Nr,onEntering:Nr,onEntered:Nr,onExit:Nr,onExiting:Nr,onExited:Nr},sn.UNMOUNTED=Di,sn.EXITED=zn,sn.ENTERING=Yn,sn.ENTERED=kr,sn.EXITING=nc;var ol=function(t,e){return t&&e&&e.split(" ").forEach(function(n){return i=n,void((r=t).classList?r.classList.remove(i):typeof r.className=="string"?r.className=Cp(r.className,i):r.setAttribute("class",Cp(r.className&&r.className.baseVal||"",i)));var r,i})},rc=(function(t){function e(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=t.call.apply(t,[this].concat(o))||this).appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1];r.removeClasses(c,"exit"),r.addClass(c,d?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1]?"appear":"enter";r.addClass(c,d,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1]?"appear":"enter";r.removeClasses(c,d),r.addClass(c,d,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a)[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,u=typeof l=="string",c=u?(u&&l?l+"-":"")+a:l[a];return{baseClassName:c,activeClassName:u?c+"-active":l[a+"Active"],doneClassName:u?c+"-done":l[a+"Done"]}},r}F_(e,t);var n=e.prototype;return n.addClass=function(r,i,o){var s=this.getClassNames(i)[o+"ClassName"],a=this.getClassNames("enter").doneClassName;i==="appear"&&o==="done"&&a&&(s+=" "+a),o==="active"&&r&&r.scrollTop,s&&(this.appliedClasses[i][o]=s,(function(l,u){l&&u&&u.split(" ").forEach(function(c){return h=c,void((d=l).classList?d.classList.add(h):(function(f,p){return f.classList?!!p&&f.classList.contains(p):(" "+(f.className.baseVal||f.className)+" ").indexOf(" "+p+" ")!==-1})(d,h)||(typeof d.className=="string"?d.className=d.className+" "+h:d.setAttribute("class",(d.className&&d.className.baseVal||"")+" "+h)));var d,h})})(r,s))},n.removeClasses=function(r,i){var o=this.appliedClasses[i],s=o.base,a=o.active,l=o.done;this.appliedClasses[i]={},s&&ol(r,s),a&&ol(r,a),l&&ol(r,l)},n.render=function(){var r=this.props;r.classNames;var i=x_(r,["classNames"]);return F.createElement(sn,ec({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e})(F.Component);rc.defaultProps={classNames:""},rc.propTypes={};const ND={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function U_(t,{focused:e,setFocused:n,itemCount:r,dir:i,onConfirm:o,onSpace:s}){if(r===0)return!1;const a=c=>{var d,h,f;d=0,h=c,f=r-1,c=Math.max(d,Math.min(h,f)),n(c)},[l,u]=ND[i];switch(t){case l:return a(e-1),!0;case u:return a(e+1),!0;case" ":return!!s&&s();case"Enter":case"Tab":return o(),!0}return!1}function B_({focused:t,setFocused:e,buttonId:n}){Xe(()=>{var a;const s=n(t);s&&((a=document.getElementById(s))==null||a.scrollIntoView({block:"nearest"}))},[t,n]);const r=q(s=>{const a=s.currentTarget.dataset.index;e(+a)},[e]),i=te(()=>({role:"menu","aria-activedescendant":n(t)}),[t,n]),o=q(s=>({onMouseMove:r,id:n(s),"data-index":s}),[r,n]);return{containerProps:i,itemProps:o}}function j_(t){const[e,n]=ne([]),[r,i]=ne([]),[o,s]=ne(0),[a,l]=ne(0),u=uu(),c=te(()=>(u==null?void 0:u.value)&&new u.value.Database({dataSource:u.value.dataSource}),[u]),d=lo(),h=J(d.state$.suggestEmojiQuery);G(()=>{c&&(h?(async function(){const A=await c.getPreferredSkinTone();l(A);let O=await c.getEmojiBySearchQuery(h);if(O=O.filter(S=>S.url||(function(v){return v.version<=Gm&&!wD.includes(v.unicode)})(S)),(function(S,v){v.sort((T,R)=>{var D,C;const I=(D=T.shortcodes)==null?void 0:D.find(N=>N.startsWith(S)),g=(C=R.shortcodes)==null?void 0:C.find(N=>N.startsWith(S));return I&&!g?-1:!I&&g?1:I&&g?I.length-g.length:0})})(h.substring(1),O),s(0),n(O),O.length>0&&i(O),h.endsWith(":")){const S=h.slice(1,-1),v=O.find(T=>{var R;return(R=T.shortcodes)==null?void 0:R.includes(S)});v&&d.selectEmoji(Ti(v,A))}})():n([]))},[h,d,c]);const f=q(A=>{const O=e[A];return O&&"emoji-button-"+Ti(O,a)},[e,a]),{containerProps:p,itemProps:m}=B_({focused:o,setFocused:s,buttonId:f}),E=e.length>0;mo(()=>d.closeSuggester(),".t-emoji-suggest-bar",E),G(()=>{if(E)return d.listenKeydown("emoji",A=>U_(A,{dir:"ltr",focused:o,setFocused:s,itemCount:e.length,onConfirm(){const O=e[o];ie.defined(O),d.selectEmoji(Ti(O,a))}})),()=>{d.listenKeydown("emoji",void 0)};d.listenKeydown("emoji",void 0)},[d,e,o,E,a]);const _=X(null);return y(rc,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:_,children:y("div",{className:"t-emoji-suggest-bar",ref:_,...p,children:r.map((A,O)=>y(bD,{emoji:A,skinTone:a,focused:O===o,onSelect:S=>d.selectEmoji(S),...m(O)},Ti(A,a)))})})}function Ti(t,e){return ic(t)?$_(t,e):t.name}function ic(t){return!!t.unicode}function bD(t){var l;const{emoji:e,focused:n,skinTone:r,onSelect:i,...o}=t,s=((l=e.shortcodes)!=null?l:[]).join(", "),a=ic(e)?[e.unicode,s].join(", "):s;return y("button",{"t-focused":n?"":void 0,title:s,"aria-label":a,onClick:()=>i(Ti(e,r)),...o,children:ic(e)?$_(e,r):null})}function $_(t,e){var r,i;const n=(r=t.skins)==null?void 0:r.find(o=>o.tone===e);return(i=n==null?void 0:n.unicode)!=null?i:t.unicode}const wD=["🏻","🏼","🏽","🏾","🏿"],kD=["top","right","bottom","left"],vs=Math.min,or=Math.max,Ds=Math.round,Fo=Math.floor,Xt=t=>({x:t,y:t}),LD={left:"right",right:"left",bottom:"top",top:"bottom"},MD={start:"end",end:"start"};function bp(t,e,n){return or(t,vs(e,n))}function Eo(t,e){return typeof t=="function"?t(e):t}function hr(t){return t.split("-")[0]}function ea(t){return t.split("-")[1]}function V_(t){return t==="x"?"y":"x"}function z_(t){return t==="y"?"height":"width"}const PD=new Set(["top","bottom"]);function bn(t){return PD.has(hr(t))?"y":"x"}function Y_(t){return V_(bn(t))}function oc(t){return t.replace(/start|end/g,e=>MD[e])}const wp=["left","right"],kp=["right","left"],xD=["top","bottom"],FD=["bottom","top"];function HD(t,e,n,r){const i=ea(t);let o=(function(s,a,l){switch(s){case"top":case"bottom":return l?a?kp:wp:a?wp:kp;case"left":case"right":return a?xD:FD;default:return[]}})(hr(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(oc)))),o}function Ho(t){return t.replace(/left|right|bottom|top/g,e=>LD[e])}function Ts(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Lp(t,e,n){let{reference:r,floating:i}=t;const o=bn(e),s=Y_(e),a=z_(s),l=hr(e),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let f;switch(l){case"top":f={x:c,y:r.y-i.height};break;case"bottom":f={x:c,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-i.width,y:d};break;default:f={x:r.x,y:r.y}}switch(ea(e)){case"start":f[s]-=h*(n&&u?-1:1);break;case"end":f[s]+=h*(n&&u?-1:1)}return f}async function Rs(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=Eo(e,t),p=(function(v){return typeof v!="number"?(function(T){return{top:0,right:0,bottom:0,left:0,...T}})(v):{top:v,right:v,bottom:v,left:v}})(f),m=a[h?d==="floating"?"reference":"floating":d],E=Ts(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(m)))==null||n?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),_=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),O=await(o.isElement==null?void 0:o.isElement(A))&&await(o.getScale==null?void 0:o.getScale(A))||{x:1,y:1},S=Ts(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:A,strategy:l}):_);return{top:(E.top-S.top+p.top)/O.y,bottom:(S.bottom-E.bottom+p.bottom)/O.y,left:(E.left-S.left+p.left)/O.x,right:(S.right-E.right+p.right)/O.x}}function Mp(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Pp(t){return kD.some(e=>t[e]>=0)}const UD=new Set(["left","top"]);function ta(){return typeof window!="undefined"}function ri(t){return hu(t)?(t.nodeName||"").toLowerCase():"#document"}function Tt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Kt(t){var e;return(e=(hu(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function hu(t){return!!ta()&&(t instanceof Node||t instanceof Tt(t).Node)}function xt(t){return!!ta()&&(t instanceof Element||t instanceof Tt(t).Element)}function Jt(t){return!!ta()&&(t instanceof HTMLElement||t instanceof Tt(t).HTMLElement)}function sc(t){return!(!ta()||typeof ShadowRoot=="undefined")&&(t instanceof ShadowRoot||t instanceof Tt(t).ShadowRoot)}const BD=new Set(["inline","contents"]);function Ji(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Ft(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!BD.has(i)}const jD=new Set(["table","td","th"]);function $D(t){return jD.has(ri(t))}const VD=[":popover-open",":modal"];function ys(t){return VD.some(e=>{try{return t.matches(e)}catch(n){return!1}})}const zD=["transform","translate","scale","rotate","perspective"],YD=["transform","translate","scale","rotate","perspective","filter"],GD=["paint","layout","strict","content"];function ac(t){const e=pu(),n=xt(t)?Ft(t):t;return zD.some(r=>!!n[r]&&n[r]!=="none")||!!n.containerType&&n.containerType!=="normal"||!e&&!!n.backdropFilter&&n.backdropFilter!=="none"||!e&&!!n.filter&&n.filter!=="none"||YD.some(r=>(n.willChange||"").includes(r))||GD.some(r=>(n.contain||"").includes(r))}function pu(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const WD=new Set(["html","body","#document"]);function Yr(t){return WD.has(ri(t))}function Ft(t){return Tt(t).getComputedStyle(t)}function na(t){return xt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function wn(t){if(ri(t)==="html")return t;const e=t.assignedSlot||t.parentNode||sc(t)&&t.host||Kt(t);return sc(e)?e.host:e}function G_(t){const e=wn(t);return Yr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Jt(e)&&Ji(e)?e:G_(e)}function Zi(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=G_(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=Tt(i);if(o){const a=lc(s);return e.concat(s,s.visualViewport||[],Ji(i)?i:[],a&&n?Zi(a):[])}return e.concat(i,Zi(i,[],n))}function lc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function W_(t){const e=Ft(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Jt(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Ds(n)!==o||Ds(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function fu(t){return xt(t)?t:t.contextElement}function Gr(t){const e=fu(t);if(!Jt(e))return Xt(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=W_(e);let s=(o?Ds(n.width):n.width)/r,a=(o?Ds(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const XD=Xt(0);function X_(t){const e=Tt(t);return pu()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:XD}function pr(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=fu(t);let s=Xt(1);e&&(r?xt(r)&&(s=Gr(r)):s=Gr(t));const a=(function(h,f,p){return f===void 0&&(f=!1),!(!p||f&&p!==Tt(h))&&f})(o,n,r)?X_(o):Xt(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const h=Tt(o),f=r&&xt(r)?Tt(r):r;let p=h,m=lc(p);for(;m&&r&&f!==p;){const E=Gr(m),_=m.getBoundingClientRect(),A=Ft(m),O=_.left+(m.clientLeft+parseFloat(A.paddingLeft))*E.x,S=_.top+(m.clientTop+parseFloat(A.paddingTop))*E.y;l*=E.x,u*=E.y,c*=E.x,d*=E.y,l+=O,u+=S,p=Tt(m),m=lc(p)}}return Ts({width:c,height:d,x:l,y:u})}function Is(t,e){const n=na(t).scrollLeft;return e?e.left+n:pr(Kt(t)).left+n}function K_(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-Is(t,n),y:n.top+e.scrollTop}}const KD=new Set(["absolute","fixed"]);function xp(t,e,n){let r;if(e==="viewport")r=(function(i,o){const s=Tt(i),a=Kt(i),l=s.visualViewport;let u=a.clientWidth,c=a.clientHeight,d=0,h=0;if(l){u=l.width,c=l.height;const p=pu();(!p||p&&o==="fixed")&&(d=l.offsetLeft,h=l.offsetTop)}const f=Is(a);if(f<=0){const p=a.ownerDocument,m=p.body,E=getComputedStyle(m),_=p.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,A=Math.abs(a.clientWidth-m.clientWidth-_);A<=25&&(u-=A)}else f<=25&&(u+=f);return{width:u,height:c,x:d,y:h}})(t,n);else if(e==="document")r=(function(i){const o=Kt(i),s=na(i),a=i.ownerDocument.body,l=or(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),u=or(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let c=-s.scrollLeft+Is(i);const d=-s.scrollTop;return Ft(a).direction==="rtl"&&(c+=or(o.clientWidth,a.clientWidth)-l),{width:l,height:u,x:c,y:d}})(Kt(t));else if(xt(e))r=(function(i,o){const s=pr(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,u=Jt(i)?Gr(i):Xt(1);return{width:i.clientWidth*u.x,height:i.clientHeight*u.y,x:l*u.x,y:a*u.y}})(e,n);else{const i=X_(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ts(r)}function q_(t,e){const n=wn(t);return!(n===e||!xt(n)||Yr(n))&&(Ft(n).position==="fixed"||q_(n,e))}function qD(t,e,n){const r=Jt(e),i=Kt(e),o=n==="fixed",s=pr(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Xt(0);function u(){l.x=Is(i)}if(r||!r&&!o)if((ri(e)!=="body"||Ji(i))&&(a=na(e)),r){const d=pr(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&u();o&&!r&&i&&u();const c=!i||r||o?Xt(0):K_(i,a);return{x:s.left+a.scrollLeft-l.x-c.x,y:s.top+a.scrollTop-l.y-c.y,width:s.width,height:s.height}}function sl(t){return Ft(t).position==="static"}function Fp(t,e){if(!Jt(t)||Ft(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Kt(t)===n&&(n=n.ownerDocument.body),n}function Hp(t,e){const n=Tt(t);if(ys(t))return n;if(!Jt(t)){let i=wn(t);for(;i&&!Yr(i);){if(xt(i)&&!sl(i))return i;i=wn(i)}return n}let r=Fp(t,e);for(;r&&$D(r)&&sl(r);)r=Fp(r,e);return r&&Yr(r)&&sl(r)&&!ac(r)?n:r||(function(i){let o=wn(i);for(;Jt(o)&&!Yr(o);){if(ac(o))return o;if(ys(o))return null;o=wn(o)}return null})(t)||n}const JD={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=Kt(r),a=!!e&&ys(e.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Xt(1);const c=Xt(0),d=Jt(r);if((d||!d&&!o)&&((ri(r)!=="body"||Ji(s))&&(l=na(r)),Jt(r))){const f=pr(r);u=Gr(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}const h=!s||d||o?Xt(0):K_(s,l);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}},getDocumentElement:Kt,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=n==="clippingAncestors"?ys(e)?[]:(function(u,c){const d=c.get(u);if(d)return d;let h=Zi(u,[],!1).filter(E=>xt(E)&&ri(E)!=="body"),f=null;const p=Ft(u).position==="fixed";let m=p?wn(u):u;for(;xt(m)&&!Yr(m);){const E=Ft(m),_=ac(m);_||E.position!=="fixed"||(f=null),(p?!_&&!f:!_&&E.position==="static"&&f&&KD.has(f.position)||Ji(m)&&!_&&q_(u,m))?h=h.filter(A=>A!==m):f=E,m=wn(m)}return c.set(u,h),h})(e,this._c):[].concat(n),s=[...o,r],a=s[0],l=s.reduce((u,c)=>{const d=xp(e,c,i);return u.top=or(d.top,u.top),u.right=vs(d.right,u.right),u.bottom=vs(d.bottom,u.bottom),u.left=or(d.left,u.left),u},xp(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Hp,getElementRects:async function(t){const e=this.getOffsetParent||Hp,n=this.getDimensions,r=await n(t.floating);return{reference:qD(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=W_(t);return{width:e,height:n}},getScale:Gr,isElement:xt,isRTL:function(t){return Ft(t).direction==="rtl"}};function Up(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function J_(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=fu(t),c=i||o?[...u?Zi(u):[],...Zi(e)]:[];c.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const d=u&&a?(function(E,_){let A,O=null;const S=Kt(E);function v(){var T;clearTimeout(A),(T=O)==null||T.disconnect(),O=null}return(function T(R,I){R===void 0&&(R=!1),I===void 0&&(I=1),v();const g=E.getBoundingClientRect(),{left:D,top:C,width:N,height:k}=g;if(R||_(),!N||!k)return;const b={rootMargin:-Fo(C)+"px "+-Fo(S.clientWidth-(D+N))+"px "+-Fo(S.clientHeight-(C+k))+"px "+-Fo(D)+"px",threshold:or(0,vs(1,I))||1};let L=!0;function x(P){const B=P[0].intersectionRatio;if(B!==I){if(!L)return T();B?T(!1,B):A=setTimeout(()=>{T(!1,1e-7)},1e3)}B!==1||Up(g,E.getBoundingClientRect())||T(),L=!1}try{O=new IntersectionObserver(x,{...b,root:S.ownerDocument})}catch(P){O=new IntersectionObserver(x,b)}O.observe(E)})(!0),v})(u,n):null;let h,f=-1,p=null;s&&(p=new ResizeObserver(E=>{let[_]=E;_&&_.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var A;(A=p)==null||A.observe(e)})),n()}),u&&!l&&p.observe(u),p.observe(e));let m=l?pr(t):null;return l&&(function E(){const _=pr(t);m&&!Up(m,_)&&n(),m=_,h=requestAnimationFrame(E)})(),n(),()=>{var E;c.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),d==null||d(),(E=p)==null||E.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const ZD=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=e,l=await(async function(u,c){const{placement:d,platform:h,elements:f}=u,p=await(h.isRTL==null?void 0:h.isRTL(f.floating)),m=hr(d),E=ea(d),_=bn(d)==="y",A=UD.has(m)?-1:1,O=p&&_?-1:1,S=Eo(c,u);let{mainAxis:v,crossAxis:T,alignmentAxis:R}=typeof S=="number"?{mainAxis:S,crossAxis:0,alignmentAxis:null}:{mainAxis:S.mainAxis||0,crossAxis:S.crossAxis||0,alignmentAxis:S.alignmentAxis};return E&&typeof R=="number"&&(T=E==="end"?-1*R:R),_?{x:T*O,y:v*A}:{x:v*A,y:T*O}})(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},QD=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:E=>{let{x:_,y:A}=E;return{x:_,y:A}}},...l}=Eo(t,e),u={x:n,y:r},c=await Rs(e,l),d=bn(hr(i)),h=V_(d);let f=u[h],p=u[d];if(o){const E=h==="y"?"bottom":"right";f=bp(f+c[h==="y"?"top":"left"],f,f-c[E])}if(s){const E=d==="y"?"bottom":"right";p=bp(p+c[d==="y"?"top":"left"],p,p-c[E])}const m=a.fn({...e,[h]:f,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[d]:s}}}}}},eT=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...E}=Eo(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const _=hr(i),A=bn(a),O=hr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),v=h||(O||!m?[Ho(a)]:(function(b){const L=Ho(b);return[oc(b),L,oc(L)]})(a)),T=p!=="none";!h&&T&&v.push(...HD(a,m,p,S));const R=[a,...v],I=await Rs(e,E),g=[];let D=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&g.push(I[_]),d){const b=(function(L,x,P){P===void 0&&(P=!1);const B=ea(L),V=Y_(L),$=z_(V);let z=V==="x"?B===(P?"end":"start")?"right":"left":B==="start"?"bottom":"top";return x.reference[$]>x.floating[$]&&(z=Ho(z)),[z,Ho(z)]})(i,s,S);g.push(I[b[0]],I[b[1]])}if(D=[...D,{placement:i,overflows:g}],!g.every(b=>b<=0)){var C,N;const b=(((C=o.flip)==null?void 0:C.index)||0)+1,L=R[b];if(L&&(!(d==="alignment"&&A!==bn(L))||D.every(P=>bn(P.placement)!==A||P.overflows[0]>0)))return{data:{index:b,overflows:D},reset:{placement:L}};let x=(N=D.filter(P=>P.overflows[0]<=0).sort((P,B)=>P.overflows[1]-B.overflows[1])[0])==null?void 0:N.placement;if(!x)switch(f){case"bestFit":{var k;const P=(k=D.filter(B=>{if(T){const V=bn(B.placement);return V===A||V==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(V=>V>0).reduce((V,$)=>V+$,0)]).sort((B,V)=>B[1]-V[1])[0])==null?void 0:k[0];P&&(x=P);break}case"initialPlacement":x=a}if(i!==x)return{reset:{placement:x}}}return{}}}},tT=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=Eo(t,e);switch(r){case"referenceHidden":{const o=Mp(await Rs(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Pp(o)}}}case"escaped":{const o=Mp(await Rs(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:Pp(o)}}}default:return{}}}}},nT=(t,e,n)=>{const r=new Map,i={platform:JD,...n},o={...i.platform,_c:r};return(async(s,a,l)=>{const{placement:u="bottom",strategy:c="absolute",middleware:d=[],platform:h}=l,f=d.filter(Boolean),p=await(h.isRTL==null?void 0:h.isRTL(a));let m=await h.getElementRects({reference:s,floating:a,strategy:c}),{x:E,y:_}=Lp(m,u,p),A=u,O={},S=0;for(let v=0;v<f.length;v++){const{name:T,fn:R}=f[v],{x:I,y:g,data:D,reset:C}=await R({x:E,y:_,initialPlacement:u,placement:A,strategy:c,middlewareData:O,rects:m,platform:h,elements:{reference:s,floating:a}});E=I!=null?I:E,_=g!=null?g:_,O={...O,[T]:{...O[T],...D}},C&&S<=50&&(S++,typeof C=="object"&&(C.placement&&(A=C.placement),C.rects&&(m=C.rects===!0?await h.getElementRects({reference:s,floating:a,strategy:c}):C.rects),{x:E,y:_}=Lp(m,A,p)),v=-1)}return{x:E,y:_,placement:A,strategy:c,middlewareData:O}})(t,e,{...i,platform:o})};var Jo=typeof document!="undefined"?Xe:function(){};function Cs(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Cs(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if((o!=="_owner"||!t.$$typeof)&&!Cs(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}function Z_(t){return typeof window=="undefined"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Bp(t,e){const n=Z_(t);return Math.round(e*n)/n}function al(t){const e=X(t);return Jo(()=>{e.current=t}),e}function Q_(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,d]=ne({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,f]=ne(r);Cs(h,r)||f(r);const[p,m]=ne(null),[E,_]=ne(null),A=q(B=>{B!==T.current&&(T.current=B,m(B))},[]),O=q(B=>{B!==R.current&&(R.current=B,_(B))},[]),S=o||p,v=s||E,T=X(null),R=X(null),I=X(c),g=l!=null,D=al(l),C=al(i),N=al(u),k=q(()=>{if(!T.current||!R.current)return;const B={placement:e,strategy:n,middleware:h};C.current&&(B.platform=C.current),nT(T.current,R.current,B).then(V=>{const $={...V,isPositioned:N.current!==!1};b.current&&!Cs(I.current,$)&&(I.current=$,xs(()=>{d($)}))})},[h,e,n,C,N]);Jo(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[u]);const b=X(!1);Jo(()=>(b.current=!0,()=>{b.current=!1}),[]),Jo(()=>{if(S&&(T.current=S),v&&(R.current=v),S&&v){if(D.current)return D.current(S,v,k);k()}},[S,v,k,D,g]);const L=te(()=>({reference:T,floating:R,setReference:A,setFloating:O}),[A,O]),x=te(()=>({reference:S,floating:v}),[S,v]),P=te(()=>{const B={position:n,left:0,top:0};if(!x.floating)return B;const V=Bp(x.floating,c.x),$=Bp(x.floating,c.y);return a?{...B,transform:"translate("+V+"px, "+$+"px)",...Z_(x.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:$}},[n,a,x.floating,c.x,c.y]);return te(()=>({...c,update:k,refs:L,elements:x,floatingStyles:P}),[c,k,L,x,P])}const rT=(t,e)=>({...QD(t),options:[t,e]}),eA=(t,e)=>({...eT(t),options:[t,e]}),iT=(t,e)=>({...tT(t),options:[t,e]});var tA=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ns=tA.join(","),nA=typeof Element=="undefined",fr=nA?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zo=!nA&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Qi=function(t,e){var n;e===void 0&&(e=!0);var r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert");return r===""||r==="true"||e&&t&&Qi(t.parentNode)},rA=function(t,e,n){if(Qi(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(Ns));return e&&fr.call(t,Ns)&&r.unshift(t),r=r.filter(n)},bs=function(t,e,n){for(var r=[],i=Array.from(t);i.length;){var o=i.shift();if(!Qi(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),a=s.length?s:o.children,l=bs(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{fr.call(o,Ns)&&n.filter(o)&&(e||!t.includes(o))&&r.push(o);var u=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),c=!Qi(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(u&&c){var d=bs(u===!0?o.children:u.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:o,candidates:d})}else i.unshift.apply(i,o.children)}}return r},iA=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},yn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||(function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"})(t))&&!iA(t)?0:t.tabIndex},oT=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},oA=function(t){return t.tagName==="INPUT"},sT=function(t){return(function(e){return oA(e)&&e.type==="radio"})(t)&&!(function(e){if(!e.name)return!0;var n,r=e.form||Zo(e),i=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')};if(typeof window!="undefined"&&window.CSS!==void 0&&typeof window.CSS.escape=="function")n=i(window.CSS.escape(e.name));else try{n=i(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=(function(s,a){for(var l=0;l<s.length;l++)if(s[l].checked&&s[l].form===a)return s[l]})(n,e.form);return!o||o===e})(t)},jp=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return n===0&&r===0},aT=function(t,e){var n=e.displayCheck,r=e.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(t).visibility==="hidden")return!0;var i=fr.call(t,"details>summary:first-of-type")?t.parentElement:t;if(fr.call(i,"details:not([open]) *"))return!0;if(n&&n!=="full"&&n!=="full-native"&&n!=="legacy-full"){if(n==="non-zero-area")return jp(t)}else{if(typeof r=="function"){for(var o=t;t;){var s=t.parentElement,a=Zo(t);if(s&&!s.shadowRoot&&r(s)===!0)return jp(t);t=t.assignedSlot?t.assignedSlot:s||a===t.ownerDocument?s:a.host}t=o}if((function(l){var u,c,d,h,f=l&&Zo(l),p=(u=f)===null||u===void 0?void 0:u.host,m=!1;if(f&&f!==l)for(m=!!((c=p)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(p)||l!=null&&(h=l.ownerDocument)!==null&&h!==void 0&&h.contains(l));!m&&p;){var E,_,A;m=!((_=p=(E=f=Zo(p))===null||E===void 0?void 0:E.host)===null||_===void 0||(A=_.ownerDocument)===null||A===void 0||!A.contains(p))}return m})(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}return!1},ws=function(t,e){return!(e.disabled||Qi(e)||(function(n){return oA(n)&&n.type==="hidden"})(e)||aT(e,t)||(function(n){return n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(r){return r.tagName==="SUMMARY"})})(e)||(function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var r=n.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i<r.children.length;i++){var o=r.children.item(i);if(o.tagName==="LEGEND")return!!fr.call(r,"fieldset[disabled] *")||!o.contains(n)}return!0}r=r.parentElement}return!1})(e))},cc=function(t,e){return!(sT(e)||yn(e)<0||!ws(t,e))},lT=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},sA=function(t){var e=[],n=[];return t.forEach(function(r,i){var o=!!r.scopeParent,s=o?r.scopeParent:r,a=(function(u,c){var d=yn(u);return d<0&&c&&!iA(u)?0:d})(s,o),l=o?sA(r.candidates):s;a===0?o?e.push.apply(e,l):e.push(s):n.push({documentOrder:i,tabIndex:a,item:r,isScope:o,content:l})}),n.sort(oT).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(e)},ra=function(t,e){var n;return n=(e=e||{}).getShadowRoot?bs([t],e.includeContainer,{filter:cc.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:lT}):rA(t,e.includeContainer,cc.bind(null,e)),sA(n)},mu=function(t,e){return(e=e||{}).getShadowRoot?bs([t],e.includeContainer,{filter:ws.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):rA(t,e.includeContainer,ws.bind(null,e))},Gn=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return fr.call(t,Ns)!==!1&&cc(e,t)},cT=tA.concat("iframe").join(","),Qo=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return fr.call(t,cT)!==!1&&ws(e,t)};const uT=Object.freeze(Object.defineProperty({__proto__:null,focusable:mu,getTabIndex:yn,isFocusable:Qo,isTabbable:Gn,tabbable:ra},Symbol.toStringTag,{value:"Module"}));function uc(t){return(t==null?void 0:t.ownerDocument)||document}var Li=typeof document!="undefined"?Xe:function(){};const aA=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function $p(t,e){const n=ra(t,aA()),r=n.length;if(r===0)return;const i=(function(s){let a=s.activeElement;for(;((l=a)==null||(l=l.shadowRoot)==null?void 0:l.activeElement)!=null;){var l;a=a.shadowRoot.activeElement}return a})(uc(t)),o=n.indexOf(i);return n[o===-1?e===1?0:r-1:o+e]}function ll(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!(function(i,o){if(!i||!o)return!1;const s=o.getRootNode==null?void 0:o.getRootNode();if(i.contains(o))return!0;if(s&&sc(s)){let a=o;for(;a;){if(i===a)return!0;a=a.parentNode||a.host}}return!1})(n,r)}function dT(t){ra(t,aA()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Vp(t){t.querySelectorAll("[data-tabindex]").forEach(e=>{const n=e.dataset.tabindex;delete e.dataset.tabindex,n?e.setAttribute("tabindex",n):e.removeAttribute("tabindex")})}const hT={...Cc};let zp=!1,pT=0;const Yp=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+pT++,fT=hT.useId||function(){const[t,e]=ne(()=>zp?Yp():void 0);return Li(()=>{t==null&&e(Yp())},[]),G(()=>{zp=!0},[]),t};function lA(t){return"data-floating-ui-"+t}const cA={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Gp=_t(function(t,e){const[n,r]=ne();return Li(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]),y("span",{...t,ref:e,tabIndex:0,role:n,"aria-hidden":!n||void 0,[lA("focus-guard")]:"",style:cA})}),uA=ii(null),Wp=lA("portal");function mT(t){const{children:e,id:n,root:r,preserveTabOrder:i=!0}=t,o=(function(m){m===void 0&&(m={});const{id:E,root:_}=m,A=fT(),O=ET(),[S,v]=ne(null),T=X(null);return Li(()=>()=>{S==null||S.remove(),queueMicrotask(()=>{T.current=null})},[S]),Li(()=>{if(!A||T.current)return;const R=E?document.getElementById(E):null;if(!R)return;const I=document.createElement("div");I.id=A,I.setAttribute(Wp,""),R.appendChild(I),T.current=I,v(I)},[E,A]),Li(()=>{if(_===null||!A||T.current)return;let R=_||(O==null?void 0:O.portalNode);R&&!hu(R)&&(R=R.current),R=R||document.body;let I=null;E&&(I=document.createElement("div"),I.id=E,R.appendChild(I));const g=document.createElement("div");g.id=A,g.setAttribute(Wp,""),R=I||R,R.appendChild(g),T.current=g,v(g)},[E,_,A,O]),S})({id:n,root:r}),[s,a]=ne(null),l=X(null),u=X(null),c=X(null),d=X(null),h=s==null?void 0:s.modal,f=s==null?void 0:s.open,p=!!s&&!s.modal&&s.open&&i&&!(!r&&!o);return G(()=>{if(o&&i&&!h)return o.addEventListener("focusin",m,!0),o.addEventListener("focusout",m,!0),()=>{o.removeEventListener("focusin",m,!0),o.removeEventListener("focusout",m,!0)};function m(E){o&&ll(E)&&(E.type==="focusin"?Vp:dT)(o)}},[o,i,h]),G(()=>{o&&(f||Vp(o))},[f,o]),y(uA.Provider,{value:te(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:d,portalNode:o,setFocusManagerState:a}),[i,o]),children:[p&&o&&y(Gp,{"data-type":"outside",ref:l,onFocus:m=>{if(ll(m,o)){var E;(E=c.current)==null||E.focus()}else{const A=s?s.domReference:null,O=$p(uc(_=A).body,-1)||_;O==null||O.focus()}var _}}),p&&o&&y("span",{"aria-owns":o.id,style:cA}),o&&Tc(e,o),p&&o&&y(Gp,{"data-type":"outside",ref:u,onFocus:m=>{if(ll(m,o)){var E;(E=d.current)==null||E.focus()}else{const A=s?s.domReference:null,O=$p(uc(_=A).body,1)||_;O==null||O.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,m.nativeEvent,"focus-out"))}var _}})]})}const ET=()=>Hn(uA);var Uo={exports:{}};function dc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Xp(t,e){var n=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=dA(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
94
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var l=n.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||n.return==null||n.return()}finally{if(a)throw o}}}}function _T(t,e,n){return(e=(function(r){var i=(function(o,s){if(typeof o!="object"||!o)return o;var a=o[Symbol.toPrimitive];if(a!==void 0){var l=a.call(o,s);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(o)})(r,"string");return typeof i=="symbol"?i:i+""})(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Kp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function qp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Kp(Object(n),!0).forEach(function(r){_T(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function AT(t){return(function(e){if(Array.isArray(e))return dc(e)})(t)||(function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||dA(t)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
95
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function dA(t,e){if(t){if(typeof t=="string")return dc(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dc(t,e):void 0}}var cn={getActiveTrap:function(t){return(t==null?void 0:t.length)>0?t[t.length-1]:null},activateTrap:function(t,e){e!==cn.getActiveTrap(t)&&cn.pauseTrap(t);var n=t.indexOf(e);n===-1||t.splice(n,1),t.push(e)},deactivateTrap:function(t,e){var n=t.indexOf(e);n!==-1&&t.splice(n,1),cn.unpauseTrap(t)},pauseTrap:function(t){var e=cn.getActiveTrap(t);e==null||e._setPausedState(!0)},unpauseTrap:function(t){var e=cn.getActiveTrap(t);e&&!e._isManuallyPaused()&&e._setPausedState(!1)}},Mi=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},gT=function(t){return Mi(t)&&!t.shiftKey},ST=function(t){return Mi(t)&&t.shiftKey},Jp=function(t){return setTimeout(t,0)},_i=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return typeof t=="function"?t.apply(void 0,n):t},Bo=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},OT=[];const vT=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:function(t,e){var n,r=(e==null?void 0:e.document)||document,i=(e==null?void 0:e.trapStack)||OT,o=qp({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:gT,isKeyBackward:ST},e),s={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadyInert:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a=function(g,D,C){return g&&g[D]!==void 0?g[D]:o[C||D]},l=function(g,D){var C=typeof(D==null?void 0:D.composedPath)=="function"?D.composedPath():void 0;return s.containerGroups.findIndex(function(N){var k=N.container,b=N.tabbableNodes;return k.contains(g)||(C==null?void 0:C.includes(k))||b.find(function(L){return L===g})})},u=function(g){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=D.hasFallback,N=C!==void 0&&C,k=D.params,b=k===void 0?[]:k,L=o[g];if(typeof L=="function"&&(L=L.apply(void 0,AT(b))),L===!0&&(L=void 0),!L){if(L===void 0||L===!1)return L;throw new Error("`".concat(g,"` was specified but was not a node, or did not return a node"))}var x=L;if(typeof L=="string"){try{x=r.querySelector(L)}catch(P){throw new Error("`".concat(g,'` appears to be an invalid selector; error="').concat(P.message,'"'))}if(!x&&!N)throw new Error("`".concat(g,"` as selector refers to no known node"))}return x},c=function(){var g=u("initialFocus",{hasFallback:!0});if(g===!1)return!1;if(g===void 0||g&&!Qo(g,o.tabbableOptions))if(l(r.activeElement)>=0)g=r.activeElement;else{var D=s.tabbableGroups[0];g=D&&D.firstTabbableNode||u("fallbackFocus")}else g===null&&(g=u("fallbackFocus"));if(!g)throw new Error("Your focus-trap needs to have at least one focusable element");return g},d=function(){if(s.containerGroups=s.containers.map(function(g){var D=ra(g,o.tabbableOptions),C=mu(g,o.tabbableOptions),N=D.length>0?D[0]:void 0,k=D.length>0?D[D.length-1]:void 0,b=C.find(function(P){return Gn(P)}),L=C.slice().reverse().find(function(P){return Gn(P)}),x=!!D.find(function(P){return yn(P)>0});return{container:g,tabbableNodes:D,focusableNodes:C,posTabIndexesFound:x,firstTabbableNode:N,lastTabbableNode:k,firstDomTabbableNode:b,lastDomTabbableNode:L,nextTabbableNode:function(P){var B=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],V=D.indexOf(P);return V<0?B?C.slice(C.indexOf(P)+1).find(function($){return Gn($)}):C.slice(0,C.indexOf(P)).reverse().find(function($){return Gn($)}):D[V+(B?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(g){return g.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(g){return g.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function(g){var D=g.activeElement;if(D)return D.shadowRoot&&D.shadowRoot.activeElement!==null?h(D.shadowRoot):D},f=function(g){g!==!1&&g!==h(document)&&(g&&g.focus?(g.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=g,(function(D){return D.tagName&&D.tagName.toLowerCase()==="input"&&typeof D.select=="function"})(g)&&g.select()):f(c()))},p=function(g){var D=u("setReturnFocus",{params:[g]});return D||D!==!1&&g},m=function(g){var D=g.target,C=g.event,N=g.isBackward,k=N!==void 0&&N;D=D||Bo(C),d();var b=null;if(s.tabbableGroups.length>0){var L=l(D,C),x=L>=0?s.containerGroups[L]:void 0;if(L<0)b=k?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(k){var P=s.tabbableGroups.findIndex(function(le){var ue=le.firstTabbableNode;return D===ue});if(P<0&&(x.container===D||Qo(D,o.tabbableOptions)&&!Gn(D,o.tabbableOptions)&&!x.nextTabbableNode(D,!1))&&(P=L),P>=0){var B=P===0?s.tabbableGroups.length-1:P-1,V=s.tabbableGroups[B];b=yn(D)>=0?V.lastTabbableNode:V.lastDomTabbableNode}else Mi(C)||(b=x.nextTabbableNode(D,!1))}else{var $=s.tabbableGroups.findIndex(function(le){var ue=le.lastTabbableNode;return D===ue});if($<0&&(x.container===D||Qo(D,o.tabbableOptions)&&!Gn(D,o.tabbableOptions)&&!x.nextTabbableNode(D))&&($=L),$>=0){var z=$===s.tabbableGroups.length-1?0:$+1,Ae=s.tabbableGroups[z];b=yn(D)>=0?Ae.firstTabbableNode:Ae.firstDomTabbableNode}else Mi(C)||(b=x.nextTabbableNode(D))}}else b=u("fallbackFocus");return b},E=function(g){var D=Bo(g);l(D,g)>=0||(_i(o.clickOutsideDeactivates,g)?n.deactivate({returnFocus:o.returnFocusOnDeactivate}):_i(o.allowOutsideClick,g)||g.preventDefault())},_=function(g){var D=Bo(g),C=l(D,g)>=0;if(C||D instanceof Document)C&&(s.mostRecentlyFocusedNode=D);else{var N;g.stopImmediatePropagation();var k=!0;if(s.mostRecentlyFocusedNode)if(yn(s.mostRecentlyFocusedNode)>0){var b=l(s.mostRecentlyFocusedNode),L=s.containerGroups[b].tabbableNodes;if(L.length>0){var x=L.findIndex(function(P){return P===s.mostRecentlyFocusedNode});x>=0&&(o.isKeyForward(s.recentNavEvent)?x+1<L.length&&(N=L[x+1],k=!1):x-1>=0&&(N=L[x-1],k=!1))}}else s.containerGroups.some(function(P){return P.tabbableNodes.some(function(B){return yn(B)>0})})||(k=!1);else k=!1;k&&(N=m({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),f(N||s.mostRecentlyFocusedNode||c())}s.recentNavEvent=void 0},A=function(g){(o.isKeyForward(g)||o.isKeyBackward(g))&&(function(D){var C=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s.recentNavEvent=D;var N=m({event:D,isBackward:C});N&&(Mi(D)&&D.preventDefault(),f(N))})(g,o.isKeyBackward(g))},O=function(g){(function(D){return(D==null?void 0:D.key)==="Escape"||(D==null?void 0:D.key)==="Esc"||(D==null?void 0:D.keyCode)===27})(g)&&_i(o.escapeDeactivates,g)!==!1&&(g.preventDefault(),n.deactivate())},S=function(g){var D=Bo(g);l(D,g)>=0||_i(o.clickOutsideDeactivates,g)||_i(o.allowOutsideClick,g)||(g.preventDefault(),g.stopImmediatePropagation())},v=function(){if(s.active)return cn.activateTrap(i,n),s.delayInitialFocusTimer=o.delayInitialFocus?Jp(function(){f(c())}):f(c()),r.addEventListener("focusin",_,!0),r.addEventListener("mousedown",E,{capture:!0,passive:!1}),r.addEventListener("touchstart",E,{capture:!0,passive:!1}),r.addEventListener("click",S,{capture:!0,passive:!1}),r.addEventListener("keydown",A,{capture:!0,passive:!1}),r.addEventListener("keydown",O),n},T=function(){if(s.active)return r.removeEventListener("focusin",_,!0),r.removeEventListener("mousedown",E,!0),r.removeEventListener("touchstart",E,!0),r.removeEventListener("click",S,!0),r.removeEventListener("keydown",A,!0),r.removeEventListener("keydown",O),n},R=typeof window!="undefined"&&"MutationObserver"in window?new MutationObserver(function(g){g.some(function(D){return Array.from(D.removedNodes).some(function(C){return C===s.mostRecentlyFocusedNode})})&&f(c())}):void 0,I=function(){R&&(R.disconnect(),s.active&&!s.paused&&s.containers.map(function(g){R.observe(g,{subtree:!0,childList:!0})}))};return n={get active(){return s.active},get paused(){return s.paused},activate:function(g){if(s.active)return this;var D=a(g,"onActivate"),C=a(g,"onPostActivate"),N=a(g,"checkCanFocusTrap"),k=cn.getActiveTrap(i),b=!1;k&&!k.paused&&(k._setSubtreeIsolation(!1),b=!0);try{N||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=h(r),D==null||D();var L=function(){N&&d(),v(),I(),o.isolateSubtrees&&n._setSubtreeIsolation(!0),C==null||C()};if(N)return N(s.containers.concat()).then(L,L),this;L()}catch(x){throw k===cn.getActiveTrap(i)&&b&&k._setSubtreeIsolation(!0),x}return this},deactivate:function(g){if(!s.active)return this;var D=qp({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},g);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||n._setSubtreeIsolation(!1),s.alreadyInert.clear(),T(),s.active=!1,s.paused=!1,I(),cn.deactivateTrap(i,n);var C=a(D,"onDeactivate"),N=a(D,"onPostDeactivate"),k=a(D,"checkCanReturnFocus"),b=a(D,"returnFocus","returnFocusOnDeactivate");C==null||C();var L=function(){Jp(function(){b&&f(p(s.nodeFocusedBeforeActivation)),N==null||N()})};return b&&k?(k(p(s.nodeFocusedBeforeActivation)).then(L,L),this):(L(),this)},pause:function(g){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,g)):this},unpause:function(g){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,g)):this},updateContainerElements:function(g){var D=[].concat(g).filter(Boolean);return s.containers=D.map(function(C){return typeof C=="string"?r.querySelector(C):C}),o.isolateSubtrees&&(function(C){s.active&&!s.paused&&n._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadyInert.clear();var N,k=new Set,b=new Set,L=Xp(C);try{for(L.s();!(N=L.n()).done;){var x=N.value;k.add(x);for(var P=typeof ShadowRoot!="undefined"&&x.getRootNode()instanceof ShadowRoot,B=x;B;){k.add(B);var V=B.parentElement,$=[];V?$=V.children:!V&&P&&($=B.getRootNode().children,V=B.getRootNode().host,P=typeof ShadowRoot!="undefined"&&V.getRootNode()instanceof ShadowRoot);var z,Ae=Xp($);try{for(Ae.s();!(z=Ae.n()).done;){var le=z.value;b.add(le)}}catch(ue){Ae.e(ue)}finally{Ae.f()}B=V}}}catch(ue){L.e(ue)}finally{L.f()}k.forEach(function(ue){b.delete(ue)}),s.adjacentElements=b})(s.containers),s.active&&(d(),o.isolateSubtrees&&!s.paused&&n._setSubtreeIsolation(!0)),I(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(g,D){if(s.paused===g)return this;if(s.paused=g,g){var C=a(D,"onPause"),N=a(D,"onPostPause");C==null||C(),T(),I(),n._setSubtreeIsolation(!1),N==null||N()}else{var k=a(D,"onUnpause"),b=a(D,"onPostUnpause");k==null||k(),n._setSubtreeIsolation(!0),d(),v(),I(),b==null||b()}return this}},_setSubtreeIsolation:{value:function(g){o.isolateSubtrees&&s.adjacentElements.forEach(function(D){g?((D.inert||D.hasAttribute("inert"))&&s.alreadyInert.add(D),D.inert=!0):s.alreadyInert.has(D)||(D.inert=!1)})}}}),n.updateContainerElements(t),n}},Symbol.toStringTag,{value:"Module"})),DT=xc(vT),TT=xc(uT);var Zp,RT=(function(){if(Zp)return Uo.exports;function t(p){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},t(p)}var e,n;function r(p,m,E){return m&&(function(_,A){for(var O=0;O<A.length;O++){var S=A[O];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(_,l(S.key),S)}})(p.prototype,m),Object.defineProperty(p,"prototype",{writable:!1}),p}function i(p,m,E){return m=s(m),(function(_,A){if(A&&(t(A)=="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O})(_)})(p,o()?Reflect.construct(m,E||[],s(p).constructor):m.apply(p,E))}function o(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(m){}return(o=function(){return!!p})()}function s(p){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m)},s(p)}function a(p,m){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,_){return E.__proto__=_,E},a(p,m)}function l(p){var m=(function(E,_){if(t(E)!="object"||!E)return E;var A=E[Symbol.toPrimitive];if(A!==void 0){var O=A.call(E,_);if(t(O)!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(_==="string"?String:Number)(E)})(p,"string");return t(m)=="symbol"?m:m+""}Zp=1;var u=bm,c=DT.createFocusTrap,d=TT.isFocusable,h=parseInt((e=(n=/^(\d+)\./.exec(u.version))===null||n===void 0?void 0:n[1])!==null&&e!==void 0?e:0,10),f=(function(p){function m(E){var _;(function(S,v){if(!(S instanceof v))throw new TypeError("Cannot call a class as a function")})(this,m),(function(S,v,T){(v=l(v))in S?Object.defineProperty(S,v,{value:T,enumerable:!0,configurable:!0,writable:!0}):S[v]=T})(_=i(this,m,[E]),"getNodeForOption",function(S){var v,T=(v=this.internalOptions[S])!==null&&v!==void 0?v:this.originalOptions[S];if(typeof T=="function"){for(var R=arguments.length,I=new Array(R>1?R-1:0),g=1;g<R;g++)I[g-1]=arguments[g];T=T.apply(void 0,I)}if(T===!0&&(T=void 0),!T){if(T===void 0||T===!1)return T;throw new Error("`".concat(S,"` was specified but was not a node, or did not return a node"))}var D,C=T;if(typeof T=="string"&&!(C=(D=this.getDocument())===null||D===void 0?void 0:D.querySelector(T)))throw new Error("`".concat(S,"` as selector refers to no known node"));return C}),_.handleDeactivate=_.handleDeactivate.bind(_),_.handlePostDeactivate=_.handlePostDeactivate.bind(_),_.handleClickOutsideDeactivates=_.handleClickOutsideDeactivates.bind(_),_.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:_.handleDeactivate,onPostDeactivate:_.handlePostDeactivate,clickOutsideDeactivates:_.handleClickOutsideDeactivates},_.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var A=E.focusTrapOptions;for(var O in A)Object.prototype.hasOwnProperty.call(A,O)&&(O!=="returnFocusOnDeactivate"&&O!=="onDeactivate"&&O!=="onPostDeactivate"&&O!=="checkCanReturnFocus"&&O!=="clickOutsideDeactivates"?_.internalOptions[O]=A[O]:_.originalOptions[O]=A[O]);return _.outsideClick=null,_.focusTrapElements=E.containerElements||[],_.updatePreviousElement(),_}return(function(E,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(_&&_.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),_&&a(E,_)})(m,p),r(m,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document!="undefined"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var E=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return E||E!==!1&&this.previouslyFocusedElement}},{key:"updatePreviousElement",value:function(){var E=this.getDocument();E&&(this.previouslyFocusedElement=E.activeElement)}},{key:"deactivateTrap",value:function(){this.focusTrap&&this.focusTrap.active&&this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(E){var _=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,E):this.originalOptions.clickOutsideDeactivates;return _&&(this.outsideClick={target:E.target,allowDeactivation:_}),_}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var E=this,_=function(){var A=E.getReturnFocusNode(),O=!(!E.originalOptions.returnFocusOnDeactivate||A==null||!A.focus||E.outsideClick&&(!E.outsideClick.allowDeactivation||d(E.outsideClick.target,E.internalOptions.tabbableOptions))),S=E.internalOptions.preventScroll,v=S!==void 0&&S;O&&A.focus({preventScroll:v}),E.originalOptions.onPostDeactivate&&E.originalOptions.onPostDeactivate.call(null),E.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(_,_):_()}},{key:"setupFocusTrap",value:function(){this.focusTrap?this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()):this.focusTrapElements.some(Boolean)&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(E){if(this.focusTrap){E.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var _=!E.active&&this.props.active,A=E.active&&!this.props.active,O=!E.paused&&this.props.paused,S=E.paused&&!this.props.paused;if(_&&(this.updatePreviousElement(),this.focusTrap.activate()),A)return void this.deactivateTrap();O&&this.focusTrap.pause(),S&&this.focusTrap.unpause()}else E.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var E=this,_=this.props.children?u.Children.only(this.props.children):void 0;if(_){if(_.type&&_.type===u.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return u.cloneElement(_,{ref:function(A){var O=E.props.containerElements;_&&(h>=19?typeof _.props.ref=="function"?_.props.ref(A):_.props.ref&&(_.props.ref.current=A):typeof _.ref=="function"?_.ref(A):_.ref&&(_.ref.current=A)),E.focusTrapElements=O||[A]}})}return null}}])})(u.Component);return f.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:c},Uo.exports=f,Uo.exports.FocusTrap=f,Uo.exports})();function hA(t){var _,A;const{children:e,preferredPlacement:n="top-start",anchorElement:r,boundaryElement:i,trapFocus:o=!1,initialFocus:s,portal:a,...l}=t,{anchor:u,boundary:c}=te(()=>({anchor:Qp(r),boundary:i?Qp(i):void 0}),[r,i]);let d=[];c&&(d=[eA({boundary:c,fallbackPlacements:["top-start","top-end","bottom-start","bottom-end","top","bottom"]}),rT({boundary:c,padding:8}),iT({boundary:c})]);const{refs:h,floatingStyles:f,middlewareData:p}=Q_({placement:n,middleware:d,whileElementsMounted:J_});Xe(()=>{u&&h.setReference(u)},[h,u]);const m=o?y(RT.FocusTrap,{focusTrapOptions:{initialFocus:s,fallbackFocus:".t-fallback-focus",allowOutsideClick:!0,tabbableOptions:{getShadowRoot:!0}},children:y("div",{children:[e,y("span",{className:"t-fallback-focus",tabIndex:-1})]})}):e,E=y("div",{ref:h.setFloating,style:{...f,zIndex:1e3,visibility:(_=p.hide)!=null&&_.referenceHidden?"hidden":"visible"},...l,children:m});if(a){const O=(A=c||u)==null?void 0:A.closest("[t-menu-boundary='root']");return y(mT,{root:O,children:E})}return E}function Qp(t){return typeof t=="string"?document.querySelector(t):t}function pA(t){const e=oe(),n=lo(),r=J(n.state$.suggestMentionQuery),i=su(J(e.state$.currentConversationId),r?1e3:0),o=te(()=>(i!=null?i:[]).map(E=>E.user),[i]),[s,a]=ne(0),l=te(()=>Object.fromEntries(o.map(E=>[E.id,_O(E.name)])),[o]),u=te(()=>{if(!r)return[];const E=ef(r);return E===""?o:o.filter(_=>l[_.id].some(A=>(function(O,S){return Xh(O.substring(0,S.length),S)})(A,E)))},[r,o,l]),c=X(void 0);G(()=>{if(c.current){const E=u.findIndex(_=>_.id===c.current);a(E===-1?0:E)}},[u]),G(()=>{var E;c.current=(E=u[s])==null?void 0:E.id},[s,u]);const d=q(E=>{var A;const _=(A=u[E])==null?void 0:A.id;return _&&"mention-button-"+_},[u]),{containerProps:h,itemProps:f}=B_({focused:s,setFocused:a,buttonId:d});if(G(()=>{if(u.length!==0)return n.listenKeydown("mention",E=>U_(E,{dir:"ttb",focused:s,setFocused:a,itemCount:u.length,onSpace(){if(r){const _=u[s];if(Xh(_.name,ef(r)))return n.selectMention(_),!0}return!1},onConfirm(){const _=u[s];n.selectMention(_)}})),()=>{n.listenKeydown("mention",void 0)}},[n,s,u,r]),mo(()=>n.closeSuggester(),".t-mention-suggest-list",u.length>0),u.length===0)return null;const p=document.querySelector(".ProseMirror-suggestion");let m;if(p){let E=p.getBoundingClientRect();m={getBoundingClientRect(){const _=p.getBoundingClientRect();return _.width>0&&(E=_),E}}}return y(hA,{className:"t-mention-suggest-list",...h,anchorElement:m,children:u.map((E,_)=>y(yT,{user:E,isFocused:_===s,onSelect:()=>n.selectMention(E),...f(_)},E.id))})}const yT=mn(function(t){const{user:e,isFocused:n,onSelect:r,...i}=t;return y("button",{className:n?"focused":"",onClick:()=>r(e.id),...i,children:e.name})});function ef(t){return ie(t[0]==="@"),t.substring(1)}function tf(t,e,n){const r=mu(t),i=r.indexOf(e);return i===-1?null:r[i+n]||null}const IT=_t(function(t,e){const{children:n,triggerElement:r}=t,{closePopover:i}=Hc(),o=X(null);_n(e,()=>o.current),G(()=>{var a;(a=o.current)==null||a.focus()},[]);const s=q(a=>{(function(l,u,c,d){var E;const h=u.querySelectorAll("[t-menu-item]"),f=document.activeElement;if(!f||!f.hasAttribute("t-menu-item")&&!f.hasAttribute("t-menu"))return;const p=Array.from(h).indexOf(f);let m;switch(l.key){case"ArrowDown":m=Math.min(p+1,h.length-1);break;case"ArrowUp":m=Math.max(p-1,0),p===-1&&(m=h.length-1);break;case"Home":m=0;break;case"End":m=h.length-1;break;case"Tab":{const _=c.closest("t-chatbox,t-conversation-list,.t-chatbox,.t-conversation-list"),A=l.shiftKey?tf(_,c,-1):(function(O,S){return tf(O,S,1)})(_,c);return A==null||A.focus(),void d()}default:return}(E=h[m])==null||E.focus()})(a,o.current,r,i)},[i,r]);return y("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:s,children:n})});function Hr(t){const{popoverComponent:e,popoverProps:n,children:r,type:i="popover",initialFocus:o,portal:s,...a}=t,[l,u]=ne(void 0),c=X(null),[d,h]=ne(!1);mo(q(p=>{var m,E;p&&((m=c.current)!=null&&m.contains(p.target))||(h(!1),(E=c.current)==null||E.focus())},[]),"[t-popover-content]",d);const f=i==="menu"?y(IT,{triggerElement:c.current,children:y(e,{...n})}):y(e,{...n});return y(Kg.Provider,{value:{closePopover:()=>h(!1)},children:[y(CT,{...a,"aria-haspopup":i==="menu"?"menu":"true","aria-expanded":d,onTrigger:()=>h(p=>!p),ref:p=>(m=>{var _;const E=(_=m==null?void 0:m.closest("[t-menu-boundary]"))!=null?_:void 0;c.current=m,u(E)})(p),children:r}),d&&y(hA,{portal:s,"t-popover-content":"",anchorElement:c.current,boundaryElement:l,preferredPlacement:"bottom-start",trapFocus:i==="popover",initialFocus:i==="menu"?"t-menu":o,role:i==="menu"?void 0:"dialog",children:f})]})}const CT=_t(function(t,e){const{onTrigger:n,...r}=t,i=q(o=>{o.key!=="Enter"&&o.key!==" "||n()},[n]);return y("button",{...r,ref:e,onClick:n,onKeyDown:i})});function Tn(t){const{onSelect:e,...n}=t,{closePopover:r}=Hc(),i=q(o=>{o.key!=="Enter"&&o.key!==" "||(r(),e==null||e())},[e,r]);return y("div",{tabIndex:-1,role:"menuitem",onClick:q(()=>{r(),e==null||e()},[r,e]),onKeyDown:i,"t-menu-item":"",...n})}function cl(t){const e=X(t);return Xe(()=>{e.current=t},[t]),e}function Eu(t){const e=oe(),n=Ar(),r=X(null),{onChange:i,onKeyDown:o,onKeyUp:s,...a}=t,l=cl(i),u=cl(o),c=cl(s);G(()=>()=>{Pt(()=>{e.type==="ChatboxStore"&&(e.searchQuery$.set(""),e.highlightedStrings$.set([]),e.focusedMessage$.set(null))})},[e]);const d=q(()=>{r.current.blur(),n.jumpToHighlight("up")},[n]),h=q(p=>{var m;(m=u.current)==null||m.call(u,p),!p.defaultPrevented&&e.type==="ChatboxStore"&&e.state$.enterSendsMessage.peek()&&Wh(p)&&p.preventDefault()},[u,e]),f=q(p=>{var m;(m=c.current)==null||m.call(c,p),!p.defaultPrevented&&e.type==="ChatboxStore"&&e.state$.enterSendsMessage.peek()&&Wh(p)&&(p.preventDefault(),d())},[c,e,d]);return y("input",{type:"search",enterKeyHint:"search",autoComplete:"off",onChange:q(p=>{var E;const m=p.target.value;e.type==="ChatboxStore"?e.setSearchQuery(m):e.setGlobalSearchQuery(m),(E=l.current)==null||E.call(l,p)},[e,l]),onKeyUp:f,onKeyDown:h,...a,ref:r})}const NT=()=>!0;async function _u(t,e,{initialDelay:n,maxDelay:r,log:i,shouldRetry:o=NT}){return e().catch(async s=>{if(i&&i(`[TalkJS] Retries left: ${t}. Error: ${JSON.stringify(s)}.`),t===0||!await o(s))throw s;const a=1e3*n*1.2,l=Math.min(1e3*r,a),u=l*(1-(c=.05)+2*Math.random()*c);var c,d;return(d=u,d<=0?Promise.resolve():new Promise(h=>setTimeout(h,d))).then(()=>_u(t-1,e,{initialDelay:u/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function eo(){const t={},e=new Promise(function(n,r){t.resolve=n,t.reject=r});return t.promise=e,t}function fA(t,e,n){const{beforeBrowserPermissionPrompt:r,onMissingBrowserPermissionCallback:i}=Hn(Hm);return q(async()=>{function o(c){c==="denied"&&i({type:t})}if(!r||!await(async function(c){if(!("permissions"in navigator))return!1;try{return(await navigator.permissions.query({name:c})).state==="prompt"}catch(d){return!1}})(t))return e(c=>{o(c)});const s=eo(),a=eo(),l={type:t,showPrompt:async()=>(a.resolve({cancelled:!1}),await s.promise),cancel:()=>{a.resolve({cancelled:!0})}};try{r(l)}catch(c){Ie.error("Your beforeBrowserPermissionPrompt callback threw an error: ",c),a.resolve({cancelled:!0})}const{cancelled:u}=await a.promise;return u?void 0:e(c=>{s.resolve(c),o(c)})},[r,i,t,e,...n])}const bT={barHeight:4,barRadius:2,barGap:2,barWidth:2,height:24},ul={state:null,duration:0,recordingUrl:void 0,uploadState:"done",fileToken:void 0},mA=new WeakMap;function EA({className:t,voiceRecorder:e}){const n=mA.get(e);return n?y("div",{className:t,style:{shapeRendering:"crispEdges"},ref:n}):(Ie.warn("Can only use Waveform component if a voice recorder is active"),null)}function _A(t,e){return t.map(r=>(function(i,o){if(i.type==="text")return(function(s,a){const l=au(a);return es(s,l)})(i.children,o);if(i.type==="file"&&i.subtype==="video")return`🎥 ${Lo(i.url)}`;if(i.type==="file"&&i.subtype==="image")return`📷 ${Lo(i.url)}`;if(i.type==="file"&&i.subtype==="audio")return`🎧 ${Lo(i.url)}`;if(i.type==="file"&&i.subtype==="voice"){const s=i.duration;return s===void 0?"🎙️":`🎙️ (${Math.floor(s/60)}:${Math.floor(s%60).toString().padStart(2,"0")})`}return i.type==="file"?(i.subtype,`📎 ${Lo(i.url)}`):i.type==="location"?"📍":""})(r,e)).join(`
|
|
96
96
|
|
|
97
97
|
`)}function es(t,e){return t.flatMap(n=>{if(typeof n=="string")return n;switch(n.type){case"blockquote":case"bold":case"italic":case"strikethrough":case"link":case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return es(n.children,e);case"bulletlist":case"bulletList":return`
|
|
98
98
|
`+es(n.children,e);case"bulletpoint":case"bulletPoint":return"- "+es(n.children,e)+`
|
|
99
|
-
`;case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"emoji":case"customemoji":case"customEmoji":return n.text;case"suppressed":return e.contactInfoHiddenText;case"mention":return`@${n.text}`}}).join("")}function
|
|
100
|
-
<rect x="0" y="0" width="100" height="100" fill="${
|
|
99
|
+
`;case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"emoji":case"customemoji":case"customEmoji":return n.text;case"suppressed":return e.contactInfoHiddenText;case"mention":return`@${n.text}`}}).join("")}function AA(t){var d,h,f;const{sender:e}=t,n=si(),r=tn(),i=et(),[o,s]=ne(e&&typeof e=="object"?e:null);G(()=>{typeof e=="string"&&n.user(e).get().then(s)},[n,e]);const a="virtual-message-"+Ps(),[l,u]=te(()=>{var m,E;const p=(E=t.content)!=null?E:[{type:"text",children:A_((m=t.text)!=null?m:"")}];return[p,_A(p,{})]},[t.content,t.text]);if(e&&!o)return null;const c={id:a,type:o?"UserMessage":"SystemMessage",sender:o,custom:(d=t.custom)!=null?d:{},createdAt:(h=t.createdAt)!=null?h:-1,editedAt:null,referencedMessage:null,origin:"web",plaintext:u,content:l,reactions:[]};return y(i.Message,{common:r,message:c,messageStatus:(f=t.status)!=null?f:"virtual",permissions:{showTypingIndicator:!1,canShareFile:!1,canShareLocation:!1,canMention:!1,showOnlineStatus:!1,canSendVoiceMessage:!1,canLeaveConversation:!1,canMarkConversationAsUnread:!1,canDeleteMessage:!1,canReplyToMessage:!1,canAddReaction:!1,canEditMessage:!1,canSearch:!1}})}function gA(t){return JE(t)}function mr(t){var e;return(e=t.photoUrl)!=null?e:(function(n,r){const i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
100
|
+
<rect x="0" y="0" width="100" height="100" fill="${JE(n)}"/>
|
|
101
101
|
<text x="50%" y="54%" dominant-baseline="middle" font-size="34" font-family="San Francisco, Segoe UI, Helvetica Neue, Arial, Helvetica, sans-serif" fill="#fff" text-anchor="middle">${r}</text>
|
|
102
|
-
</svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+hO.encode(i)})(t.id,fO(t.name))}function _o(t){return t<1024?t+" B":t<1048576?Math.floor(t/1024)+" KB":t<1073741824?Math.floor(t/1048576)+" MB":t<1099511627776?Math.floor(t/1073741824)+" GB":Math.floor(t/1099511627776)+" TB"}function _u({latitude:t,longitude:e}){const n=t+","+e;return{imageUrl:`https://maps.googleapis.com/maps/api/staticmap?center=${n}&zoom=15&size=300x200&scale=2&maptype=roadmap&markers=${n}&key=${Cv}`,linkUrl:`https://maps.google.com/maps?q=${n}&z=15`}}function gA(t,e){const[n,r]=ne({long:"",short:""});return Ze(()=>{let i,o=!0;const s=()=>{const l=Date.now(),u=(function(c,d,h){const p=c-d;let f,m,E;const _=new Date(d),A={month:"short",day:"numeric"};if(p<nf)return{changeTimeout:5e3,short:h.JUST_NOW,long:h.JUST_NOW};if(p<rf)f=nf,m="MINUTES",E=h.MINUTES;else if(p<of)f=rf,m="HOURS",E=h.HOURS;else{if(!(p<bT)){if(_.getFullYear()===new Date(c).getFullYear()){const S=_.toLocaleDateString(h.locale,A);return{changeTimeout:void 0,short:S,long:S}}{const S=_.toLocaleDateString(h.locale,{...A,year:"numeric"});return{changeTimeout:void 0,short:S,long:S}}}f=of,m="DAYS",E=h.DAYS}const O=Math.floor(p/f);return{changeTimeout:f,short:O+E,long:wT(O,m.toLowerCase(),h.locale)}})(l,t>l?l-2e3:t,e);return r(u),u},a=()=>{const l=s();o&&l.changeTimeout&&(i=window.setTimeout(a,l.changeTimeout))};return s(),i=window.setTimeout(a,100),()=>{o=!1,clearTimeout(i)}},[e,t]),n}function ia(t){t=Math.floor(t);const e=Math.floor(t/3600);t%=3600;const n=Math.floor(t/60);t%=60;const r=o=>o.toString().padStart(2,"0");let i=`${r(n)}:${r(t)}`;return e>0&&(i=`${r(e)}:${i}`),i}const tf=864e5;function SA(t,e){const n=Date.now(),r=(i=t,o=n,Math.floor((o-i)/tf));var i,o;if(r<0||r===0)return e.TODAY;if(r===1)return e.YESTERDAY;const s={weekday:"long"},a=new Date(t);if(r<7)return a.toLocaleDateString(e.locale,s);const l=new Date(n);return(function(c,d){return Math.floor((d-c)/(365*tf))})(l.setFullYear(l.getFullYear()-1),t)===0?a.toLocaleDateString(e.locale,{...s,month:"long",day:"numeric"}):a.toLocaleDateString(e.locale,{...s,year:"numeric",month:"long",day:"numeric"})}const nf=6e4,rf=36e5,of=864e5,bT=6048e5;function wT(t,e,n){return new Intl.RelativeTimeFormat(n).format(-t,e)}function H(t,...e){const n=Iv.bind(fe)(t,...e);return Array.isArray(n)?fe(ve,{},...n):n}function Ao(t,e=10){return ou(t,Math.min(e,100))}function OA(t,e,n){const r=si(),i=lt([]),o=lt(!1);Lm(a=>{if(o.get()){const l=r.conversation(t).message(e).reactions(n).subscribe(u=>{u!=null||(u=[]),u=u.slice(0,10),i.set(u)});a.onCleanup=()=>{l.unsubscribe()}}});const s=q(()=>o.set(!0),[o]);return[J(i),s]}function vA(t){var i,o,s,a,l,u,c,d;if(!t.container)return;const e=getComputedStyle(t.container),n=(i=to.parse(e.color))!=null?i:new to(255,255,255,1),r=n.withAlpha(n.alpha/2);return qi.create({...t,barGap:(o=t.barGap)!=null?o:2,barRadius:(s=t.barRadius)!=null?s:0,barWidth:(a=t.barWidth)!=null?a:2,barHeight:t.barHeight,hideScrollbar:!0,cursorWidth:(l=t.cursorWidth)!=null?l:0,cursorColor:t.cursorColor,height:(u=t.height)!=null?u:24,progressColor:(c=t.progressColor)!=null?c:r.toRgbaString(),waveColor:(d=t.waveColor)!=null?d:r.toRgbaString()})}function go({src:t,onError:e,filename:n,className:r=""}){const i=X(null),o=X(),s=X(),[a,l]=ne(!1),[u,c]=ne(0),[d,h]=ne(1),p=X(),[f,m]=ne(!1),E=J(oe().t$),{audioUrl:_,audioName:A,height:O,isRecordingPreviewBlob:S}=te(()=>{const g=new URL(t),D=g.protocol==="blob:"&&g.searchParams.has("name");let C=n!=null?n:"";return D&&(C=g.searchParams.get("name"),g.searchParams.delete("name")),{audioUrl:g,audioName:C,height:D?24:50,isRecordingPreviewBlob:D}},[t,n]),[v,T]=ne(S);G(()=>{let g;const D=i.current.closest("t-message-list"),C=new IntersectionObserver(function([N]){N.isIntersecting?g=setTimeout(()=>T(!0),500):clearTimeout(g)},{root:D});return C.observe(i.current),()=>{C.disconnect()}},[]),G(()=>{if(!v)return;o.current=new Audio;const g={normalize:!0,height:O,container:i.current};function D(){const k=o.current;if(!k)return;const b=k.error;(b.message!=="Media failed to load"||k.paused)&&(b.message==="PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"?(k.load(),l(!1)):(m(!0),l(!1),e==null||e()))}const C=A.slice(A.lastIndexOf(".")+1);if((function(k){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(k)})(A)&&C==="webm"&&!o.current.canPlayType("audio/webm;codecs=opus"))g.backend="WebAudio",s.current=new Audio("data:audio/mp3;base64,//MkxAAHiAICWABElBeKPL/RANb2w+yiT1g/gTok//lP/W/l3h8QO/OCdCqCW2Cw//MkxAQHkAIWUAhEmAQXWUOFW2dxPu//9mr60ElY5sseQ+xxesmHKtZr7bsqqX2L//MkxAgFwAYiQAhEAC2hq22d3///9FTV6tA36JdgBJoOGgc+7qvqej5Zu7/7uI9l//MkxBQHAAYi8AhEAO193vt9KGOq+6qcT7hhfN5FTInmwk8RkqKImTM55pRQHQSq//MkxBsGkgoIAABHhTACIJLf99nVI///yuW1uBqWfEu7CgNPWGpUadBmZ////4sL//MkxCMHMAH9iABEmAsKioqKigsLCwtVTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVV//MkxCkECAUYCAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"),s.current.controls=!1;else{const k=o.current;k.addEventListener("error",D),k.preservesPitch=!0,g.url=_.toString(),g.media=k}p.current=vA(g);const N=p.current;return N.on("finish",()=>{o.current.loop=!0,l(!1)}),N.on("ready",k=>c(Math.trunc(k))),N.on("timeupdate",k=>c(Math.trunc(k))),g.backend==="WebAudio"&&N.load(_.toString()).catch(()=>{m(!0),l(!1),e==null||e()}),()=>{var k,b;(k=o.current)==null||k.pause(),(b=o.current)==null||b.removeEventListener("error",D),o.current=void 0,N.destroy(),p.current=void 0}},[_,A,e,v,O]);const R=q(()=>{var g;if(p.current.options.backend==="WebAudio")p.current.isPlaying()||s.current.play(),p.current.playPause(),l((g=p.current.isPlaying())!=null?g:!1);else{const D=o.current;D.paused?D.play():D.pause(),D.loop=!1,!D.paused&&D.ended&&(D.load(),D.play()),l(!D.paused)}},[]),y=q(g=>{p.current.setPlaybackRate(g),h(g)},[]);return I("div",f?{}:{className:`t-audio-player ${r}`,children:[I("button",{onClick:R,children:I(re,{className:"t-play-pause-icon",type:a?"pause":"play","aria-label":a?E.ARIA_PAUSE_AUDIO:E.ARIA_PLAY_AUDIO})}),I("div",{className:"t-waveform",ref:i,style:{height:O}}),I("div",{className:"t-duration",children:ia(u)}),I(Hr,{type:"menu",portal:!0,popoverComponent:LT,popoverProps:{playbackSpeed:d,selectPlaybackSpeed:y},className:"t-playback-speed","aria-label":E.ARIA_SET_PLAYBACK_SPEED,children:[d,"x",I(re,{type:"chevronDown",className:"t-up-down-icon","aria-hidden":!0})]})]})}const kT=[.25,.5,.75,1,1.25,1.5,2];function LT({playbackSpeed:t,selectPlaybackSpeed:e}){return I("div",{className:"t-playback-speed-menu",children:[I("div",{className:"t-heading",children:"Playback Speed"}),kT.map(n=>I(Tn,{className:"t-menu-item",onSelect:()=>e(n),children:[I("span",{className:"t-playback-checkmark",children:t===n?"✓ ":""}),n,"x"]},n))]})}const MT=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,PT=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/;class to{constructor(e,n,r,i){this.red=e,this.green=n,this.blue=r,this.alpha=i}static parse(e){var r;const n=(r=e.match(MT))!=null?r:e.match(PT);if(n){const[i,o,s,a,l="1"]=n;return new to(Number(o),Number(s),Number(a),Number(l))}return null}withAlpha(e){return new to(this.red,this.green,this.blue,e)}toRgbaString(){const{red:e,green:n,blue:r,alpha:i}=this;return i!==1?`rgba(${e}, ${n}, ${r}, ${i})`:`rgb(${e}, ${n}, ${r})`}}function ul(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(u){try{l(r.next(u))}catch(c){o(c)}}function a(u){try{l(r.throw(u))}catch(c){o(c)}}function l(u){var c;u.done?i(u.value):(c=u.value,c instanceof n?c:new n(function(d){d(c)})).then(s,a)}l((r=r.apply(t,[])).next())})}class DA{constructor(){this.listeners={}}on(e,n,r){if(this.listeners[e]||(this.listeners[e]=new Set),r==null?void 0:r.once){const i=(...o)=>{this.un(e,i),n(...o)};return this.listeners[e].add(i),()=>this.un(e,i)}return this.listeners[e].add(n),()=>this.un(e,n)}un(e,n){var r;(r=this.listeners[e])===null||r===void 0||r.delete(n)}once(e,n){return this.on(e,n,{once:!0})}unAll(){this.listeners={}}emit(e,...n){this.listeners[e]&&this.listeners[e].forEach(r=>r(...n))}}class xT extends DA{constructor(e){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=e}onInit(){}_init(e){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(e=>e()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}}class FT extends DA{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const e=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(e))};e()}stop(){this.isRunning=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}const HT=["audio/webm","audio/wav","audio/mpeg","audio/mp4","audio/mp3"];class Au extends xT{constructor(e){var n,r,i,o,s,a;super(Object.assign(Object.assign({},e),{audioBitsPerSecond:(n=e.audioBitsPerSecond)!==null&&n!==void 0?n:128e3,scrollingWaveform:(r=e.scrollingWaveform)!==null&&r!==void 0&&r,scrollingWaveformWindow:(i=e.scrollingWaveformWindow)!==null&&i!==void 0?i:5,continuousWaveform:(o=e.continuousWaveform)!==null&&o!==void 0&&o,renderRecordedAudio:(s=e.renderRecordedAudio)===null||s===void 0||s,mediaRecorderTimeslice:(a=e.mediaRecorderTimeslice)!==null&&a!==void 0?a:void 0})),this.stream=null,this.mediaRecorder=null,this.dataWindow=null,this.isWaveformPaused=!1,this.lastStartTime=0,this.lastDuration=0,this.duration=0,this.micStream=null,this.recordedBlobUrl=null,this.timer=new FT,this.subscriptions.push(this.timer.on("tick",()=>{const l=performance.now()-this.lastStartTime;this.duration=this.isPaused()?this.duration:this.lastDuration+l,this.emit("record-progress",this.duration)}))}static create(e){return new Au(e||{})}renderMicStream(e){var n;const r=new AudioContext,i=r.createMediaStreamSource(e),o=r.createAnalyser();i.connect(o),(this.options.continuousWaveform||this.options.scrollingWaveform)&&(o.fftSize=32);const s=o.frequencyBinCount,a=new Float32Array(s);let l=0;this.wavesurfer&&((n=this.originalOptions)!==null&&n!==void 0||(this.originalOptions=Object.assign({},this.wavesurfer.options)),this.wavesurfer.options.interact=!1,this.options.scrollingWaveform&&(this.wavesurfer.options.cursorWidth=0,this.wavesurfer.options.normalize=!0,this.wavesurfer.options.maxPeak=1));const u=setInterval(()=>{var c,d,h,p;if(!this.isWaveformPaused){if(o.getFloatTimeDomainData(a),this.options.scrollingWaveform){const f=Math.floor(100*(this.options.scrollingWaveformWindow||0));let m=0;for(let _=0;_<s;_++){const A=Math.abs(a[_]);A>m&&(m=A)}this.dataWindow||(this.dataWindow=new Float32Array(f));const E=new Float32Array(f);if(this.dataWindow&&this.dataWindow.length>0){const _=f-1,A=this.dataWindow.slice(-_);E.set(A,0)}E[f-1]=m,this.dataWindow=E}else if(this.options.continuousWaveform){if(!this.dataWindow){const m=this.options.continuousWaveformDuration?Math.round(100*this.options.continuousWaveformDuration):((d=(c=this.wavesurfer)===null||c===void 0?void 0:c.getWidth())!==null&&d!==void 0?d:0)*window.devicePixelRatio;this.dataWindow=new Float32Array(m)}let f=0;for(let m=0;m<s;m++){const E=Math.abs(a[m]);E>f&&(f=E)}if(l+1>this.dataWindow.length){const m=new Float32Array(2*this.dataWindow.length);m.set(this.dataWindow,0),this.dataWindow=m}this.dataWindow[l]=f,l++}else this.dataWindow=a;if(this.wavesurfer){const f=((p=(h=this.dataWindow)===null||h===void 0?void 0:h.length)!==null&&p!==void 0?p:0)/100;this.wavesurfer.load("",[this.dataWindow],this.options.scrollingWaveform?this.options.scrollingWaveformWindow:f).then(()=>{this.wavesurfer&&this.options.continuousWaveform&&(this.wavesurfer.setTime(this.getDuration()/1e3),this.wavesurfer.options.minPxPerSec||this.wavesurfer.setOptions({minPxPerSec:this.wavesurfer.getWidth()/this.wavesurfer.getDuration()}))}).catch(m=>{console.error("Error rendering real-time recording data:",m)})}}},10);return{onDestroy:()=>{clearInterval(u),i==null||i.disconnect(),r==null||r.close()},onEnd:()=>{this.isWaveformPaused=!0,this.stopMic()}}}startMic(e){return ul(this,0,void 0,function*(){let n;this.micStream&&this.stopMic();try{n=yield navigator.mediaDevices.getUserMedia({audio:e==null||e})}catch(i){throw new Error("Error accessing the microphone: "+i.message)}const r=this.renderMicStream(n);return this.micStream=r,this.unsubscribeDestroy=this.once("destroy",r.onDestroy),this.unsubscribeRecordEnd=this.once("record-end",r.onEnd),this.stream=n,n})}stopMic(){var e,n,r;(e=this.micStream)===null||e===void 0||e.onDestroy(),(n=this.unsubscribeDestroy)===null||n===void 0||n.call(this),(r=this.unsubscribeRecordEnd)===null||r===void 0||r.call(this),this.micStream=null,this.unsubscribeDestroy=void 0,this.unsubscribeRecordEnd=void 0,this.stream&&(this.stream.getTracks().forEach(i=>i.stop()),this.stream=null,this.mediaRecorder=null)}startRecording(e){return ul(this,0,void 0,function*(){const n=this.stream||(yield this.startMic(e));this.dataWindow=null;const r=this.mediaRecorder||new MediaRecorder(n,{mimeType:this.options.mimeType||HT.find(s=>MediaRecorder.isTypeSupported(s)),audioBitsPerSecond:this.options.audioBitsPerSecond});this.mediaRecorder=r,this.stopRecording();const i=[];r.ondataavailable=s=>{s.data.size>0&&i.push(s.data),this.emit("record-data-available",s.data)};const o=s=>{var a;const l=new Blob(i,{type:r.mimeType});this.emit(s,l),this.options.renderRecordedAudio&&(this.applyOriginalOptionsIfNeeded(),this.recordedBlobUrl&&URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=URL.createObjectURL(l),(a=this.wavesurfer)===null||a===void 0||a.load(this.recordedBlobUrl))};r.onpause=()=>o("record-pause"),r.onstop=()=>o("record-end"),r.start(this.options.mediaRecorderTimeslice),this.lastStartTime=performance.now(),this.lastDuration=0,this.duration=0,this.isWaveformPaused=!1,this.timer.start(),this.emit("record-start")})}getDuration(){return this.duration}isRecording(){var e;return((e=this.mediaRecorder)===null||e===void 0?void 0:e.state)==="recording"}isPaused(){var e;return((e=this.mediaRecorder)===null||e===void 0?void 0:e.state)==="paused"}isActive(){var e;return((e=this.mediaRecorder)===null||e===void 0?void 0:e.state)!=="inactive"}stopRecording(){var e;this.isActive()&&((e=this.mediaRecorder)===null||e===void 0||e.stop(),this.timer.stop())}pauseRecording(){var e,n;this.isRecording()&&(this.isWaveformPaused=!0,(e=this.mediaRecorder)===null||e===void 0||e.requestData(),(n=this.mediaRecorder)===null||n===void 0||n.pause(),this.timer.stop(),this.lastDuration=this.duration)}resumeRecording(){var e;this.isPaused()&&(this.isWaveformPaused=!1,(e=this.mediaRecorder)===null||e===void 0||e.resume(),this.timer.start(),this.lastStartTime=performance.now(),this.emit("record-resume"))}static getAvailableAudioDevices(){return ul(this,0,void 0,function*(){return navigator.mediaDevices.enumerateDevices().then(e=>e.filter(n=>n.kind==="audioinput"))})}destroy(){this.applyOriginalOptionsIfNeeded(),super.destroy(),this.stopRecording(),this.stopMic(),this.recordedBlobUrl&&(URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=null)}applyOriginalOptionsIfNeeded(){this.wavesurfer&&this.originalOptions&&(this.wavesurfer.setOptions(this.originalOptions),delete this.originalOptions)}}var sf,af={exports:{}},UT=(sf||(sf=1,af.exports=(function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(o,s,function(a){return r[a]}.bind(null,s));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=0)})([function(t,e,n){(function(r){function i(S){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(S)}function o(S,v){return(function(T){if(Array.isArray(T))return T})(S)||(function(T,R){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(T)){var y=[],g=!0,D=!1,C=void 0;try{for(var N,k=T[Symbol.iterator]();!(g=(N=k.next()).done)&&(y.push(N.value),!R||y.length!==R);g=!0);}catch(b){D=!0,C=b}finally{try{g||k.return==null||k.return()}finally{if(D)throw C}}return y}})(S,v)||(function(T,R){if(T){if(typeof T=="string")return s(T,R);var y=Object.prototype.toString.call(T).slice(8,-1);return y==="Object"&&T.constructor&&(y=T.constructor.name),y==="Map"||y==="Set"?Array.from(T):y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y)?s(T,R):void 0}})(S,v)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
103
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function s(S,v){(v==null||v>S.length)&&(v=S.length);for(var T=0,R=new Array(v);T<v;T++)R[T]=S[T];return R}function a(S,v){if(!(S instanceof v))throw new TypeError("Cannot call a class as a function")}function l(S,v){for(var T=0;T<v.length;T++){var R=v[T];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(S,R.key,R)}}function u(S,v){return(u=Object.setPrototypeOf||function(T,R){return T.__proto__=R,T})(S,v)}function c(S){var v=(function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(T){return!1}})();return function(){var T,R=h(S);if(v){var y=h(this).constructor;T=Reflect.construct(R,arguments,y)}else T=R.apply(this,arguments);return d(this,T)}}function d(S,v){return!v||i(v)!=="object"&&typeof v!="function"?(function(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T})(S):v}function h(S){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)})(S)}var p,f=n(2),m=f.EventTarget,E=f.defineEventAttribute,_=(0,n(3).detect)(),A=r.AudioContext||r.webkitAudioContext,O=(function(S){(function(D,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(C&&C.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),C&&u(D,C)})(g,S);var v,T,R,y=c(g);function g(D){var C,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(this,g);var b=N.mimeType,L=N.audioBitsPerSecond,x=(N.videoBitsPerSecond,N.bitsPerSecond),P=k.encoderWorkerFactory,B=k.OggOpusEncoderWasmPath,V=k.WebMOpusEncoderWasmPath;if((C=y.call(this))._stream=D,C._state="inactive",C._mimeType=b||"",C._audioBitsPerSecond=L||x,C.workerState="inactive",!g.isTypeSupported(C._mimeType))throw new TypeError("invalid arguments, a MIME Type is not supported");switch(g._parseType(C._mimeType).subtype){case"wave":case"wav":C._mimeType="audio/wave";break;case"webm":C._mimeType="audio/webm";break;case"ogg":C._mimeType="audio/ogg";break;default:switch(_&&_.name){case"chrome":case"edge":default:C._mimeType="audio/webm";break;case"firefox":C._mimeType="audio/ogg";break;case"ios":case"safari":C._mimeType="audio/wave"}}switch(C._mimeType){case"audio/wave":C._wasmPath="";break;case"audio/webm":C._wasmPath=V||"";break;case"audio/ogg":C._wasmPath=B||"";break;default:throw new Error("Internal Error: Unexpected MIME Type: ".concat(C._mimeType))}var $="";return document.currentScript?$=document.currentScript.src:self.location&&($=self.location.href),$=$.substr(0,$.lastIndexOf("/"))+"/encoderWorker.umd.js",typeof g.encoderWorker=="function"&&($=URL.createObjectURL(new Blob(["(".concat(g.encoderWorker,")()")]))),C._workerFactory=typeof P=="function"?P:function(z){return new Worker($)},C._spawnWorker(),C}return v=g,R=[{key:"isTypeSupported",value:function(D){if(typeof D=="string"&&!D)return!0;try{var C=g._parseType(D),N=C.type,k=C.subtype,b=C.codec}catch(L){return!1}if(N!=="audio"||k!=="ogg"&&k!=="webm"&&k!=="wave"&&k!=="wav")return!1;switch(k){case"ogg":case"webm":if(b!=="opus"&&b)return!1;break;case"wave":case"wav":if(b)return!1}return!0}},{key:"_parseType",value:function(D){try{var C=o(D.match(/^(\w+)\/(\w+)(;\s*codecs=(\w+))?$/),5),N=C[1],k=C[2],b=C[4]}catch(L){return typeof D!="string"||D?null:{type:"",subtype:"",codec:""}}return{type:N,subtype:k,codec:b}}}],(T=[{key:"_spawnWorker",value:function(){var D=this;this.worker=this._workerFactory(),this.worker.onmessage=function(C){return D._onmessageFromWorker(C)},this.worker.onerror=function(C){return D._onerrorFromWorker(C)},this._postMessageToWorker("loadEncoder",{mimeType:this._mimeType,wasmPath:this._wasmPath})}},{key:"_postMessageToWorker",value:function(D){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};switch(D){case"loadEncoder":var N=C.mimeType,k=C.wasmPath;this.worker.postMessage({command:D,mimeType:N,wasmPath:k});break;case"init":var b=C.sampleRate,L=C.channelCount,x=C.bitsPerSecond;this.worker.postMessage({command:D,sampleRate:b,channelCount:L,bitsPerSecond:x}),this.workerState="encoding",this.source.connect(this.processor),this.processor.connect(this.context.destination);var P=new r.Event("start");this.dispatchEvent(P);break;case"pushInputData":var B=C.channelBuffers,V=C.length,$=C.duration;this.worker.postMessage({command:D,channelBuffers:B,length:V,duration:$});break;case"getEncodedData":case"done":this.worker.postMessage({command:D});break;default:throw new Error("Internal Error: Incorrect postMessage requested.")}}},{key:"_onmessageFromWorker",value:function(D){var C,N=D.data,k=N.command,b=N.buffers;switch(k){case"readyToInit":var L=this.sampleRate,x=this.channelCount;this.workerState="readyToInit",this.state==="recording"&&this._postMessageToWorker("init",{sampleRate:L,channelCount:x,bitsPerSecond:this.audioBitsPerSecond});break;case"encodedData":case"lastEncodedData":var P=new Blob(b,{type:this._mimeType});(C=new r.Event("dataavailable")).data=P,this.dispatchEvent(C),k==="lastEncodedData"&&(C=new r.Event("stop"),this.dispatchEvent(C),this.workerState="closed")}}},{key:"_onerrorFromWorker",value:function(D){this.source.disconnect(),this.processor.disconnect(),this.worker.terminate(),this.workerState="closed";var C=["FileName: "+D.filename,"LineNumber: "+D.lineno,"Message: "+D.message].join(" - "),N=new r.Event("error");N.name="UnknownError",N.message=C,this.dispatchEvent(N)}},{key:"_enableAudioProcessCallback",value:function(D){var C=this,N=0;this.processor.onaudioprocess=function(k){for(var b=k.inputBuffer,L=(k.playbackTime,b.sampleRate,b.length),x=b.duration,P=b.numberOfChannels,B=new Array(P),V=0;V<P;V++)B[V]=b.getChannelData(V);var $={channelBuffers:B,length:L,duration:x};C._postMessageToWorker("pushInputData",$),(N+=x)>=D&&(C._postMessageToWorker("getEncodedData"),N=0)}}},{key:"start",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.MAX_SAFE_INTEGER;if(this.state!=="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must be inactive.");if(D<0)throw new TypeError("invalid arguments, timeslice should be 0 or higher.");D/=1e3,this.workerState==="closed"&&this._spawnWorker(),this.context=new A;var C=this.stream.getAudioTracks();if(!C[0])throw new Error("DOMException: UnkownError, media track not found.");if(this.channelCount=C[0].getSettings().channelCount||1,this.sampleRate=this.context.sampleRate,this.source=this.context.createMediaStreamSource(this.stream),this.processor=this.context.createScriptProcessor(4096,this.channelCount,this.channelCount),this._state="recording",this._enableAudioProcessCallback(D),this.workerState==="readyToInit"){var N=this.sampleRate,k=this.channelCount;this._postMessageToWorker("init",{sampleRate:N,channelCount:k,bitsPerSecond:this.audioBitsPerSecond})}}},{key:"stop",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect(),this.context.close(),this._postMessageToWorker("done"),this._state="inactive"}},{key:"pause",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect();var D=new r.Event("pause");this.dispatchEvent(D),this._state="paused"}},{key:"resume",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.connect(this.processor),this.processor.connect(this.context.destination);var D=new r.Event("resume");this.dispatchEvent(D),this._state="recording"}},{key:"requestData",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this._postMessageToWorker("getEncodedData")}},{key:"stream",get:function(){return this._stream}},{key:"mimeType",get:function(){return this._mimeType}},{key:"state",get:function(){return this._state}},{key:"videoBitsPerSecond",get:function(){}},{key:"audioBitsPerSecond",get:function(){return this._audioBitsPerSecond}}])&&l(v.prototype,T),R&&l(v,R),g})(m);["start","stop","dataavailable","pause","resume","error"].forEach(function(S){return E(O.prototype,S)}),_&&_.name==="edge"&&(p=Worker.prototype.postMessage,Worker.prototype.postMessage=function(S){p.apply(this,[S])}),t.exports=O}).call(this,n(1))},function(t,e){var n;n=(function(){return this})();try{n=n||new Function("return this")()}catch(r){typeof window=="object"&&(n=window)}t.exports=n},function(t,e,n){n.r(e),n.d(e,"defineEventAttribute",function(){return m}),n.d(e,"EventTarget",function(){return _});const r=new WeakMap,i=new WeakMap;function o(A){const O=r.get(A);return console.assert(O!=null,"'this' is expected an Event object, but got",A),O}function s(A,O){r.set(this,{eventTarget:A,event:O,eventPhase:2,currentTarget:A,canceled:!1,stopped:!1,passiveListener:null,timeStamp:O.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const S=Object.keys(O);for(let v=0;v<S.length;++v){const T=S[v];T in this||Object.defineProperty(this,T,a(T))}}function a(A){return{get(){return o(this).event[A]},set(O){o(this).event[A]=O},configurable:!0,enumerable:!0}}function l(A){return{value(){const O=o(this).event;return O[A].apply(O,arguments)},configurable:!0,enumerable:!0}}function u(A){if(A==null||A===Object.prototype)return s;let O=i.get(A);return O==null&&(O=(function(S,v){const T=Object.keys(v);if(T.length===0)return S;function R(y,g){S.call(this,y,g)}R.prototype=Object.create(S.prototype,{constructor:{value:R,configurable:!0,writable:!0}});for(let y=0;y<T.length;++y){const g=T[y];if(!(g in S.prototype)){const D=typeof Object.getOwnPropertyDescriptor(v,g).value=="function";Object.defineProperty(R.prototype,g,D?l(g):a(g))}}return R})(u(Object.getPrototypeOf(A)),A),i.set(A,O)),O}function c(A){return o(A).stopped}function d(A,O){o(A).passiveListener=O}s.prototype={get type(){return o(this).event.type},get target(){return o(this).eventTarget},get currentTarget(){return o(this).currentTarget},composedPath(){const A=o(this).currentTarget;return A==null?[]:[A]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return o(this).eventPhase},stopPropagation(){const A=o(this);typeof A.event.stopPropagation=="function"&&A.event.stopPropagation()},stopImmediatePropagation(){const A=o(this);A.stopped=!0,typeof A.event.stopImmediatePropagation=="function"&&A.event.stopImmediatePropagation()},get bubbles(){return!!o(this).event.bubbles},get cancelable(){return!!o(this).event.cancelable},preventDefault(){const A=o(this);A.passiveListener==null?A.event.cancelable&&(A.canceled=!0,typeof A.event.preventDefault=="function"&&A.event.preventDefault()):console.warn("Event#preventDefault() was called from a passive listener:",A.passiveListener)},get defaultPrevented(){return o(this).canceled},get composed(){return!!o(this).event.composed},get timeStamp(){return o(this).timeStamp}},Object.defineProperty(s.prototype,"constructor",{value:s,configurable:!0,writable:!0}),typeof window!="undefined"&&window.Event!==void 0&&(Object.setPrototypeOf(s.prototype,window.Event.prototype),i.set(window.Event.prototype,s));const h=new WeakMap;function p(A){return A!==null&&typeof A=="object"}function f(A){const O=h.get(A);if(O==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return O}function m(A,O){Object.defineProperty(A,"on"+O,(function(S){return{get(){let v=f(this).get(S);for(;v!=null;){if(v.listenerType===3)return v.listener;v=v.next}return null},set(v){typeof v=="function"||p(v)||(v=null);const T=f(this);let R=null,y=T.get(S);for(;y!=null;)y.listenerType===3?R!==null?R.next=y.next:y.next!==null?T.set(S,y.next):T.delete(S):R=y,y=y.next;if(v!==null){const g={listener:v,listenerType:3,passive:!1,once:!1,next:null};R===null?T.set(S,g):R.next=g}},configurable:!0,enumerable:!0}})(O))}function E(A){function O(){_.call(this)}O.prototype=Object.create(_.prototype,{constructor:{value:O,configurable:!0,writable:!0}});for(let S=0;S<A.length;++S)m(O.prototype,A[S]);return O}function _(){if(!(this instanceof _)){if(arguments.length===1&&Array.isArray(arguments[0]))return E(arguments[0]);if(arguments.length>0){const A=new Array(arguments.length);for(let O=0;O<arguments.length;++O)A[O]=arguments[O];return E(A)}throw new TypeError("Cannot call a class as a function")}h.set(this,new Map)}_.prototype={addEventListener(A,O,S){if(O==null)return!1;if(typeof O!="function"&&!p(O))throw new TypeError("'listener' should be a function or an object.");const v=f(this),T=p(S),R=(T?S.capture:S)?1:2,y={listener:O,listenerType:R,passive:T&&!!S.passive,once:T&&!!S.once,next:null};let g=v.get(A);if(g===void 0)return v.set(A,y),!0;let D=null;for(;g!=null;){if(g.listener===O&&g.listenerType===R)return!1;D=g,g=g.next}return D.next=y,!0},removeEventListener(A,O,S){if(O==null)return!1;const v=f(this),T=(p(S)?S.capture:S)?1:2;let R=null,y=v.get(A);for(;y!=null;){if(y.listener===O&&y.listenerType===T)return R!==null?R.next=y.next:y.next!==null?v.set(A,y.next):v.delete(A),!0;R=y,y=y.next}return!1},dispatchEvent(A){if(A==null||typeof A.type!="string")throw new TypeError('"event.type" should be a string.');const O=f(this),S=A.type;let v=O.get(S);if(v==null)return!0;const T=(function(y,g){return new(u(Object.getPrototypeOf(g)))(y,g)})(this,A);let R=null;for(;v!=null;){if(v.once?R!==null?R.next=v.next:v.next!==null?O.set(S,v.next):O.delete(S):R=v,d(T,v.passive?v.listener:null),typeof v.listener=="function")try{v.listener.call(this,T)}catch(y){typeof console!="undefined"&&typeof console.error=="function"&&console.error(y)}else v.listenerType!==3&&typeof v.listener.handleEvent=="function"&&v.listener.handleEvent(T);if(c(T))break;v=v.next}return d(T,null),(function(y,g){o(y).eventPhase=g})(T,0),(function(y,g){o(y).currentTarget=g})(T,null),!T.defaultPrevented}},Object.defineProperty(_.prototype,"constructor",{value:_,configurable:!0,writable:!0}),typeof window!="undefined"&&window.EventTarget!==void 0&&Object.setPrototypeOf(_.prototype,window.EventTarget.prototype),e.default=_},function(t,e,n){(function(r){var i=this&&this.__spreadArrays||function(){for(var p=0,f=0,m=arguments.length;f<m;f++)p+=arguments[f].length;var E=Array(p),_=0;for(f=0;f<m;f++)for(var A=arguments[f],O=0,S=A.length;O<S;O++,_++)E[_]=A[O];return E};Object.defineProperty(e,"__esModule",{value:!0});var o=function(p,f,m){this.name=p,this.version=f,this.os=m};e.BrowserInfo=o;var s=function(p){this.version=p,this.name="node",this.os=r.platform};e.NodeInfo=s;var a=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null};e.BotInfo=a;var l=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/Edg\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],u=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function c(p){var f=p!==""&&l.reduce(function(A,O){var S=O[0],v=O[1];if(A)return A;var T=v.exec(p);return!!T&&[S,T]},!1);if(!f)return null;var m=f[0],E=f[1];if(m==="searchbot")return new a;var _=E[1]&&E[1].split(/[._]/).slice(0,3);return _?_.length<3&&(_=i(_,(function(A){for(var O=[],S=0;S<A;S++)O.push("0");return O})(3-_.length))):_=[],new o(m,_.join("."),d(p))}function d(p){for(var f=0,m=u.length;f<m;f++){var E=u[f],_=E[0];if(E[1].test(p))return _}return null}function h(){return r!==void 0&&r.version?new s(r.version.slice(1)):null}e.detect=function(p){return p?c(p):typeof navigator!="undefined"?c(navigator.userAgent):h()},e.parseUserAgent=c,e.detectOS=d,e.getNodeVersion=h}).call(this,n(4))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(E){if(n===setTimeout)return setTimeout(E,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(E,0);try{return n(E,0)}catch(_){try{return n.call(null,E,0)}catch(A){return n.call(this,E,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch(E){n=o}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch(E){r=s}})();var l,u=[],c=!1,d=-1;function h(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!c){var E=a(h);c=!0;for(var _=u.length;_;){for(l=u,u=[];++d<_;)l&&l[d].run();d=-1,_=u.length}l=null,c=!1,(function(A){if(r===clearTimeout)return clearTimeout(A);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(A);try{r(A)}catch(O){try{return r.call(null,A)}catch(S){return r.call(this,A)}}})(E)}}function f(E,_){this.fun=E,this.array=_}function m(){}i.nextTick=function(E){var _=new Array(arguments.length-1);if(arguments.length>1)for(var A=1;A<arguments.length;A++)_[A-1]=arguments[A];u.push(new f(E,_)),u.length!==1||c||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(E){return[]},i.binding=function(E){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(E){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}])),af.exports);const BT=zs(UT),TA=`"use client";
|
|
102
|
+
</svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+pO.encode(i)})(t.id,mO(t.name))}function _o(t){return t<1024?t+" B":t<1048576?Math.floor(t/1024)+" KB":t<1073741824?Math.floor(t/1048576)+" MB":t<1099511627776?Math.floor(t/1073741824)+" GB":Math.floor(t/1099511627776)+" TB"}function Au({latitude:t,longitude:e}){const n=t+","+e;return{imageUrl:`https://maps.googleapis.com/maps/api/staticmap?center=${n}&zoom=15&size=300x200&scale=2&maptype=roadmap&markers=${n}&key=${Nv}`,linkUrl:`https://maps.google.com/maps?q=${n}&z=15`}}function SA(t,e){const[n,r]=ne({long:"",short:""});return Xe(()=>{let i,o=!0;const s=()=>{const l=Date.now(),u=(function(c,d,h){const f=c-d;let p,m,E;const _=new Date(d),A={month:"short",day:"numeric"};if(f<rf)return{changeTimeout:5e3,short:h.JUST_NOW,long:h.JUST_NOW};if(f<of)p=rf,m="MINUTES",E=h.MINUTES;else if(f<sf)p=of,m="HOURS",E=h.HOURS;else{if(!(f<wT)){if(_.getFullYear()===new Date(c).getFullYear()){const S=_.toLocaleDateString(h.locale,A);return{changeTimeout:void 0,short:S,long:S}}{const S=_.toLocaleDateString(h.locale,{...A,year:"numeric"});return{changeTimeout:void 0,short:S,long:S}}}p=sf,m="DAYS",E=h.DAYS}const O=Math.floor(f/p);return{changeTimeout:p,short:O+E,long:kT(O,m.toLowerCase(),h.locale)}})(l,t>l?l-2e3:t,e);return r(u),u},a=()=>{const l=s();o&&l.changeTimeout&&(i=window.setTimeout(a,l.changeTimeout))};return s(),i=window.setTimeout(a,100),()=>{o=!1,clearTimeout(i)}},[e,t]),n}function ia(t){t=Math.floor(t);const e=Math.floor(t/3600);t%=3600;const n=Math.floor(t/60);t%=60;const r=o=>o.toString().padStart(2,"0");let i=`${r(n)}:${r(t)}`;return e>0&&(i=`${r(e)}:${i}`),i}const nf=864e5;function OA(t,e){const n=Date.now(),r=(i=t,o=n,Math.floor((o-i)/nf));var i,o;if(r<0||r===0)return e.TODAY;if(r===1)return e.YESTERDAY;const s={weekday:"long"},a=new Date(t);if(r<7)return a.toLocaleDateString(e.locale,s);const l=new Date(n);return(function(c,d){return Math.floor((d-c)/(365*nf))})(l.setFullYear(l.getFullYear()-1),t)===0?a.toLocaleDateString(e.locale,{...s,month:"long",day:"numeric"}):a.toLocaleDateString(e.locale,{...s,year:"numeric",month:"long",day:"numeric"})}const rf=6e4,of=36e5,sf=864e5,wT=6048e5;function kT(t,e,n){return new Intl.RelativeTimeFormat(n).format(-t,e)}function H(t,...e){const n=Iv.bind(fe)(t,...e);return Array.isArray(n)?fe(De,{},...n):n}function Ao(t,e=10){return su(t,Math.min(e,100))}function vA(t,e,n){const r=si(),i=lt([]),o=lt(!1);Mm(a=>{if(o.get()){const l=r.conversation(t).message(e).reactions(n).subscribe(u=>{u!=null||(u=[]),u=u.slice(0,10),i.set(u)});a.onCleanup=()=>{l.unsubscribe()}}});const s=q(()=>o.set(!0),[o]);return[J(i),s]}function DA(t){var i,o,s,a,l,u,c,d;if(!t.container)return;const e=getComputedStyle(t.container),n=(i=to.parse(e.color))!=null?i:new to(255,255,255,1),r=n.withAlpha(n.alpha/2);return qi.create({...t,barGap:(o=t.barGap)!=null?o:2,barRadius:(s=t.barRadius)!=null?s:0,barWidth:(a=t.barWidth)!=null?a:2,barHeight:t.barHeight,hideScrollbar:!0,cursorWidth:(l=t.cursorWidth)!=null?l:0,cursorColor:t.cursorColor,height:(u=t.height)!=null?u:24,progressColor:(c=t.progressColor)!=null?c:r.toRgbaString(),waveColor:(d=t.waveColor)!=null?d:r.toRgbaString()})}function go({src:t,onError:e,filename:n,className:r=""}){const i=X(null),o=X(),s=X(),[a,l]=ne(!1),[u,c]=ne(0),[d,h]=ne(1),f=X(),[p,m]=ne(!1),E=J(oe().t$),{audioUrl:_,audioName:A,height:O,isRecordingPreviewBlob:S}=te(()=>{const g=new URL(t),D=g.protocol==="blob:"&&g.searchParams.has("name");let C=n!=null?n:"";return D&&(C=g.searchParams.get("name"),g.searchParams.delete("name")),{audioUrl:g,audioName:C,height:D?24:50,isRecordingPreviewBlob:D}},[t,n]),[v,T]=ne(S);G(()=>{let g;const D=i.current.closest("t-message-list"),C=new IntersectionObserver(function([N]){N.isIntersecting?g=setTimeout(()=>T(!0),500):clearTimeout(g)},{root:D});return C.observe(i.current),()=>{C.disconnect()}},[]),G(()=>{if(!v)return;o.current=new Audio;const g={normalize:!0,height:O,container:i.current};function D(){const k=o.current;if(!k)return;const b=k.error;(b.message!=="Media failed to load"||k.paused)&&(b.message==="PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"?(k.load(),l(!1)):(m(!0),l(!1),e==null||e()))}const C=A.slice(A.lastIndexOf(".")+1);if((function(k){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(k)})(A)&&C==="webm"&&!o.current.canPlayType("audio/webm;codecs=opus"))g.backend="WebAudio",s.current=new Audio("data:audio/mp3;base64,//MkxAAHiAICWABElBeKPL/RANb2w+yiT1g/gTok//lP/W/l3h8QO/OCdCqCW2Cw//MkxAQHkAIWUAhEmAQXWUOFW2dxPu//9mr60ElY5sseQ+xxesmHKtZr7bsqqX2L//MkxAgFwAYiQAhEAC2hq22d3///9FTV6tA36JdgBJoOGgc+7qvqej5Zu7/7uI9l//MkxBQHAAYi8AhEAO193vt9KGOq+6qcT7hhfN5FTInmwk8RkqKImTM55pRQHQSq//MkxBsGkgoIAABHhTACIJLf99nVI///yuW1uBqWfEu7CgNPWGpUadBmZ////4sL//MkxCMHMAH9iABEmAsKioqKigsLCwtVTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVV//MkxCkECAUYCAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"),s.current.controls=!1;else{const k=o.current;k.addEventListener("error",D),k.preservesPitch=!0,g.url=_.toString(),g.media=k}f.current=DA(g);const N=f.current;return N.on("finish",()=>{o.current.loop=!0,l(!1)}),N.on("ready",k=>c(Math.trunc(k))),N.on("timeupdate",k=>c(Math.trunc(k))),g.backend==="WebAudio"&&N.load(_.toString()).catch(()=>{m(!0),l(!1),e==null||e()}),()=>{var k,b;(k=o.current)==null||k.pause(),(b=o.current)==null||b.removeEventListener("error",D),o.current=void 0,N.destroy(),f.current=void 0}},[_,A,e,v,O]);const R=q(()=>{var g;if(f.current.options.backend==="WebAudio")f.current.isPlaying()||s.current.play(),f.current.playPause(),l((g=f.current.isPlaying())!=null?g:!1);else{const D=o.current;D.paused?D.play():D.pause(),D.loop=!1,!D.paused&&D.ended&&(D.load(),D.play()),l(!D.paused)}},[]),I=q(g=>{f.current.setPlaybackRate(g),h(g)},[]);return y("div",p?{}:{className:`t-audio-player ${r}`,children:[y("button",{onClick:R,children:y(re,{className:"t-play-pause-icon",type:a?"pause":"play","aria-label":a?E.ARIA_PAUSE_AUDIO:E.ARIA_PLAY_AUDIO})}),y("div",{className:"t-waveform",ref:i,style:{height:O}}),y("div",{className:"t-duration",children:ia(u)}),y(Hr,{type:"menu",portal:!0,popoverComponent:MT,popoverProps:{playbackSpeed:d,selectPlaybackSpeed:I},className:"t-playback-speed","aria-label":E.ARIA_SET_PLAYBACK_SPEED,children:[d,"x",y(re,{type:"chevronDown",className:"t-up-down-icon","aria-hidden":!0})]})]})}const LT=[.25,.5,.75,1,1.25,1.5,2];function MT({playbackSpeed:t,selectPlaybackSpeed:e}){return y("div",{className:"t-playback-speed-menu",children:[y("div",{className:"t-heading",children:"Playback Speed"}),LT.map(n=>y(Tn,{className:"t-menu-item",onSelect:()=>e(n),children:[y("span",{className:"t-playback-checkmark",children:t===n?"✓ ":""}),n,"x"]},n))]})}const PT=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,xT=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/;class to{constructor(e,n,r,i){this.red=e,this.green=n,this.blue=r,this.alpha=i}static parse(e){var r;const n=(r=e.match(PT))!=null?r:e.match(xT);if(n){const[i,o,s,a,l="1"]=n;return new to(Number(o),Number(s),Number(a),Number(l))}return null}withAlpha(e){return new to(this.red,this.green,this.blue,e)}toRgbaString(){const{red:e,green:n,blue:r,alpha:i}=this;return i!==1?`rgba(${e}, ${n}, ${r}, ${i})`:`rgb(${e}, ${n}, ${r})`}}function dl(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(u){try{l(r.next(u))}catch(c){o(c)}}function a(u){try{l(r.throw(u))}catch(c){o(c)}}function l(u){var c;u.done?i(u.value):(c=u.value,c instanceof n?c:new n(function(d){d(c)})).then(s,a)}l((r=r.apply(t,[])).next())})}class TA{constructor(){this.listeners={}}on(e,n,r){if(this.listeners[e]||(this.listeners[e]=new Set),r==null?void 0:r.once){const i=(...o)=>{this.un(e,i),n(...o)};return this.listeners[e].add(i),()=>this.un(e,i)}return this.listeners[e].add(n),()=>this.un(e,n)}un(e,n){var r;(r=this.listeners[e])===null||r===void 0||r.delete(n)}once(e,n){return this.on(e,n,{once:!0})}unAll(){this.listeners={}}emit(e,...n){this.listeners[e]&&this.listeners[e].forEach(r=>r(...n))}}class FT extends TA{constructor(e){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=e}onInit(){}_init(e){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(e=>e()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}}class HT extends TA{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const e=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(e))};e()}stop(){this.isRunning=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}const UT=["audio/webm","audio/wav","audio/mpeg","audio/mp4","audio/mp3"];class gu extends FT{constructor(e){var n,r,i,o,s,a;super(Object.assign(Object.assign({},e),{audioBitsPerSecond:(n=e.audioBitsPerSecond)!==null&&n!==void 0?n:128e3,scrollingWaveform:(r=e.scrollingWaveform)!==null&&r!==void 0&&r,scrollingWaveformWindow:(i=e.scrollingWaveformWindow)!==null&&i!==void 0?i:5,continuousWaveform:(o=e.continuousWaveform)!==null&&o!==void 0&&o,renderRecordedAudio:(s=e.renderRecordedAudio)===null||s===void 0||s,mediaRecorderTimeslice:(a=e.mediaRecorderTimeslice)!==null&&a!==void 0?a:void 0})),this.stream=null,this.mediaRecorder=null,this.dataWindow=null,this.isWaveformPaused=!1,this.lastStartTime=0,this.lastDuration=0,this.duration=0,this.micStream=null,this.recordedBlobUrl=null,this.timer=new HT,this.subscriptions.push(this.timer.on("tick",()=>{const l=performance.now()-this.lastStartTime;this.duration=this.isPaused()?this.duration:this.lastDuration+l,this.emit("record-progress",this.duration)}))}static create(e){return new gu(e||{})}renderMicStream(e){var n;const r=new AudioContext,i=r.createMediaStreamSource(e),o=r.createAnalyser();i.connect(o),(this.options.continuousWaveform||this.options.scrollingWaveform)&&(o.fftSize=32);const s=o.frequencyBinCount,a=new Float32Array(s);let l=0;this.wavesurfer&&((n=this.originalOptions)!==null&&n!==void 0||(this.originalOptions=Object.assign({},this.wavesurfer.options)),this.wavesurfer.options.interact=!1,this.options.scrollingWaveform&&(this.wavesurfer.options.cursorWidth=0,this.wavesurfer.options.normalize=!0,this.wavesurfer.options.maxPeak=1));const u=setInterval(()=>{var c,d,h,f;if(!this.isWaveformPaused){if(o.getFloatTimeDomainData(a),this.options.scrollingWaveform){const p=Math.floor(100*(this.options.scrollingWaveformWindow||0));let m=0;for(let _=0;_<s;_++){const A=Math.abs(a[_]);A>m&&(m=A)}this.dataWindow||(this.dataWindow=new Float32Array(p));const E=new Float32Array(p);if(this.dataWindow&&this.dataWindow.length>0){const _=p-1,A=this.dataWindow.slice(-_);E.set(A,0)}E[p-1]=m,this.dataWindow=E}else if(this.options.continuousWaveform){if(!this.dataWindow){const m=this.options.continuousWaveformDuration?Math.round(100*this.options.continuousWaveformDuration):((d=(c=this.wavesurfer)===null||c===void 0?void 0:c.getWidth())!==null&&d!==void 0?d:0)*window.devicePixelRatio;this.dataWindow=new Float32Array(m)}let p=0;for(let m=0;m<s;m++){const E=Math.abs(a[m]);E>p&&(p=E)}if(l+1>this.dataWindow.length){const m=new Float32Array(2*this.dataWindow.length);m.set(this.dataWindow,0),this.dataWindow=m}this.dataWindow[l]=p,l++}else this.dataWindow=a;if(this.wavesurfer){const p=((f=(h=this.dataWindow)===null||h===void 0?void 0:h.length)!==null&&f!==void 0?f:0)/100;this.wavesurfer.load("",[this.dataWindow],this.options.scrollingWaveform?this.options.scrollingWaveformWindow:p).then(()=>{this.wavesurfer&&this.options.continuousWaveform&&(this.wavesurfer.setTime(this.getDuration()/1e3),this.wavesurfer.options.minPxPerSec||this.wavesurfer.setOptions({minPxPerSec:this.wavesurfer.getWidth()/this.wavesurfer.getDuration()}))}).catch(m=>{console.error("Error rendering real-time recording data:",m)})}}},10);return{onDestroy:()=>{clearInterval(u),i==null||i.disconnect(),r==null||r.close()},onEnd:()=>{this.isWaveformPaused=!0,this.stopMic()}}}startMic(e){return dl(this,0,void 0,function*(){let n;this.micStream&&this.stopMic();try{n=yield navigator.mediaDevices.getUserMedia({audio:e==null||e})}catch(i){throw new Error("Error accessing the microphone: "+i.message)}const r=this.renderMicStream(n);return this.micStream=r,this.unsubscribeDestroy=this.once("destroy",r.onDestroy),this.unsubscribeRecordEnd=this.once("record-end",r.onEnd),this.stream=n,n})}stopMic(){var e,n,r;(e=this.micStream)===null||e===void 0||e.onDestroy(),(n=this.unsubscribeDestroy)===null||n===void 0||n.call(this),(r=this.unsubscribeRecordEnd)===null||r===void 0||r.call(this),this.micStream=null,this.unsubscribeDestroy=void 0,this.unsubscribeRecordEnd=void 0,this.stream&&(this.stream.getTracks().forEach(i=>i.stop()),this.stream=null,this.mediaRecorder=null)}startRecording(e){return dl(this,0,void 0,function*(){const n=this.stream||(yield this.startMic(e));this.dataWindow=null;const r=this.mediaRecorder||new MediaRecorder(n,{mimeType:this.options.mimeType||UT.find(s=>MediaRecorder.isTypeSupported(s)),audioBitsPerSecond:this.options.audioBitsPerSecond});this.mediaRecorder=r,this.stopRecording();const i=[];r.ondataavailable=s=>{s.data.size>0&&i.push(s.data),this.emit("record-data-available",s.data)};const o=s=>{var a;const l=new Blob(i,{type:r.mimeType});this.emit(s,l),this.options.renderRecordedAudio&&(this.applyOriginalOptionsIfNeeded(),this.recordedBlobUrl&&URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=URL.createObjectURL(l),(a=this.wavesurfer)===null||a===void 0||a.load(this.recordedBlobUrl))};r.onpause=()=>o("record-pause"),r.onstop=()=>o("record-end"),r.start(this.options.mediaRecorderTimeslice),this.lastStartTime=performance.now(),this.lastDuration=0,this.duration=0,this.isWaveformPaused=!1,this.timer.start(),this.emit("record-start")})}getDuration(){return this.duration}isRecording(){var e;return((e=this.mediaRecorder)===null||e===void 0?void 0:e.state)==="recording"}isPaused(){var e;return((e=this.mediaRecorder)===null||e===void 0?void 0:e.state)==="paused"}isActive(){var e;return((e=this.mediaRecorder)===null||e===void 0?void 0:e.state)!=="inactive"}stopRecording(){var e;this.isActive()&&((e=this.mediaRecorder)===null||e===void 0||e.stop(),this.timer.stop())}pauseRecording(){var e,n;this.isRecording()&&(this.isWaveformPaused=!0,(e=this.mediaRecorder)===null||e===void 0||e.requestData(),(n=this.mediaRecorder)===null||n===void 0||n.pause(),this.timer.stop(),this.lastDuration=this.duration)}resumeRecording(){var e;this.isPaused()&&(this.isWaveformPaused=!1,(e=this.mediaRecorder)===null||e===void 0||e.resume(),this.timer.start(),this.lastStartTime=performance.now(),this.emit("record-resume"))}static getAvailableAudioDevices(){return dl(this,0,void 0,function*(){return navigator.mediaDevices.enumerateDevices().then(e=>e.filter(n=>n.kind==="audioinput"))})}destroy(){this.applyOriginalOptionsIfNeeded(),super.destroy(),this.stopRecording(),this.stopMic(),this.recordedBlobUrl&&(URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=null)}applyOriginalOptionsIfNeeded(){this.wavesurfer&&this.originalOptions&&(this.wavesurfer.setOptions(this.originalOptions),delete this.originalOptions)}}var af,lf={exports:{}},BT=(af||(af=1,lf.exports=(function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(o,s,function(a){return r[a]}.bind(null,s));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=0)})([function(t,e,n){(function(r){function i(S){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(S)}function o(S,v){return(function(T){if(Array.isArray(T))return T})(S)||(function(T,R){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(T)){var I=[],g=!0,D=!1,C=void 0;try{for(var N,k=T[Symbol.iterator]();!(g=(N=k.next()).done)&&(I.push(N.value),!R||I.length!==R);g=!0);}catch(b){D=!0,C=b}finally{try{g||k.return==null||k.return()}finally{if(D)throw C}}return I}})(S,v)||(function(T,R){if(T){if(typeof T=="string")return s(T,R);var I=Object.prototype.toString.call(T).slice(8,-1);return I==="Object"&&T.constructor&&(I=T.constructor.name),I==="Map"||I==="Set"?Array.from(T):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?s(T,R):void 0}})(S,v)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
103
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function s(S,v){(v==null||v>S.length)&&(v=S.length);for(var T=0,R=new Array(v);T<v;T++)R[T]=S[T];return R}function a(S,v){if(!(S instanceof v))throw new TypeError("Cannot call a class as a function")}function l(S,v){for(var T=0;T<v.length;T++){var R=v[T];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(S,R.key,R)}}function u(S,v){return(u=Object.setPrototypeOf||function(T,R){return T.__proto__=R,T})(S,v)}function c(S){var v=(function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(T){return!1}})();return function(){var T,R=h(S);if(v){var I=h(this).constructor;T=Reflect.construct(R,arguments,I)}else T=R.apply(this,arguments);return d(this,T)}}function d(S,v){return!v||i(v)!=="object"&&typeof v!="function"?(function(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T})(S):v}function h(S){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)})(S)}var f,p=n(2),m=p.EventTarget,E=p.defineEventAttribute,_=(0,n(3).detect)(),A=r.AudioContext||r.webkitAudioContext,O=(function(S){(function(D,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(C&&C.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),C&&u(D,C)})(g,S);var v,T,R,I=c(g);function g(D){var C,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(this,g);var b=N.mimeType,L=N.audioBitsPerSecond,x=(N.videoBitsPerSecond,N.bitsPerSecond),P=k.encoderWorkerFactory,B=k.OggOpusEncoderWasmPath,V=k.WebMOpusEncoderWasmPath;if((C=I.call(this))._stream=D,C._state="inactive",C._mimeType=b||"",C._audioBitsPerSecond=L||x,C.workerState="inactive",!g.isTypeSupported(C._mimeType))throw new TypeError("invalid arguments, a MIME Type is not supported");switch(g._parseType(C._mimeType).subtype){case"wave":case"wav":C._mimeType="audio/wave";break;case"webm":C._mimeType="audio/webm";break;case"ogg":C._mimeType="audio/ogg";break;default:switch(_&&_.name){case"chrome":case"edge":default:C._mimeType="audio/webm";break;case"firefox":C._mimeType="audio/ogg";break;case"ios":case"safari":C._mimeType="audio/wave"}}switch(C._mimeType){case"audio/wave":C._wasmPath="";break;case"audio/webm":C._wasmPath=V||"";break;case"audio/ogg":C._wasmPath=B||"";break;default:throw new Error("Internal Error: Unexpected MIME Type: ".concat(C._mimeType))}var $="";return document.currentScript?$=document.currentScript.src:self.location&&($=self.location.href),$=$.substr(0,$.lastIndexOf("/"))+"/encoderWorker.umd.js",typeof g.encoderWorker=="function"&&($=URL.createObjectURL(new Blob(["(".concat(g.encoderWorker,")()")]))),C._workerFactory=typeof P=="function"?P:function(z){return new Worker($)},C._spawnWorker(),C}return v=g,R=[{key:"isTypeSupported",value:function(D){if(typeof D=="string"&&!D)return!0;try{var C=g._parseType(D),N=C.type,k=C.subtype,b=C.codec}catch(L){return!1}if(N!=="audio"||k!=="ogg"&&k!=="webm"&&k!=="wave"&&k!=="wav")return!1;switch(k){case"ogg":case"webm":if(b!=="opus"&&b)return!1;break;case"wave":case"wav":if(b)return!1}return!0}},{key:"_parseType",value:function(D){try{var C=o(D.match(/^(\w+)\/(\w+)(;\s*codecs=(\w+))?$/),5),N=C[1],k=C[2],b=C[4]}catch(L){return typeof D!="string"||D?null:{type:"",subtype:"",codec:""}}return{type:N,subtype:k,codec:b}}}],(T=[{key:"_spawnWorker",value:function(){var D=this;this.worker=this._workerFactory(),this.worker.onmessage=function(C){return D._onmessageFromWorker(C)},this.worker.onerror=function(C){return D._onerrorFromWorker(C)},this._postMessageToWorker("loadEncoder",{mimeType:this._mimeType,wasmPath:this._wasmPath})}},{key:"_postMessageToWorker",value:function(D){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};switch(D){case"loadEncoder":var N=C.mimeType,k=C.wasmPath;this.worker.postMessage({command:D,mimeType:N,wasmPath:k});break;case"init":var b=C.sampleRate,L=C.channelCount,x=C.bitsPerSecond;this.worker.postMessage({command:D,sampleRate:b,channelCount:L,bitsPerSecond:x}),this.workerState="encoding",this.source.connect(this.processor),this.processor.connect(this.context.destination);var P=new r.Event("start");this.dispatchEvent(P);break;case"pushInputData":var B=C.channelBuffers,V=C.length,$=C.duration;this.worker.postMessage({command:D,channelBuffers:B,length:V,duration:$});break;case"getEncodedData":case"done":this.worker.postMessage({command:D});break;default:throw new Error("Internal Error: Incorrect postMessage requested.")}}},{key:"_onmessageFromWorker",value:function(D){var C,N=D.data,k=N.command,b=N.buffers;switch(k){case"readyToInit":var L=this.sampleRate,x=this.channelCount;this.workerState="readyToInit",this.state==="recording"&&this._postMessageToWorker("init",{sampleRate:L,channelCount:x,bitsPerSecond:this.audioBitsPerSecond});break;case"encodedData":case"lastEncodedData":var P=new Blob(b,{type:this._mimeType});(C=new r.Event("dataavailable")).data=P,this.dispatchEvent(C),k==="lastEncodedData"&&(C=new r.Event("stop"),this.dispatchEvent(C),this.workerState="closed")}}},{key:"_onerrorFromWorker",value:function(D){this.source.disconnect(),this.processor.disconnect(),this.worker.terminate(),this.workerState="closed";var C=["FileName: "+D.filename,"LineNumber: "+D.lineno,"Message: "+D.message].join(" - "),N=new r.Event("error");N.name="UnknownError",N.message=C,this.dispatchEvent(N)}},{key:"_enableAudioProcessCallback",value:function(D){var C=this,N=0;this.processor.onaudioprocess=function(k){for(var b=k.inputBuffer,L=(k.playbackTime,b.sampleRate,b.length),x=b.duration,P=b.numberOfChannels,B=new Array(P),V=0;V<P;V++)B[V]=b.getChannelData(V);var $={channelBuffers:B,length:L,duration:x};C._postMessageToWorker("pushInputData",$),(N+=x)>=D&&(C._postMessageToWorker("getEncodedData"),N=0)}}},{key:"start",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.MAX_SAFE_INTEGER;if(this.state!=="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must be inactive.");if(D<0)throw new TypeError("invalid arguments, timeslice should be 0 or higher.");D/=1e3,this.workerState==="closed"&&this._spawnWorker(),this.context=new A;var C=this.stream.getAudioTracks();if(!C[0])throw new Error("DOMException: UnkownError, media track not found.");if(this.channelCount=C[0].getSettings().channelCount||1,this.sampleRate=this.context.sampleRate,this.source=this.context.createMediaStreamSource(this.stream),this.processor=this.context.createScriptProcessor(4096,this.channelCount,this.channelCount),this._state="recording",this._enableAudioProcessCallback(D),this.workerState==="readyToInit"){var N=this.sampleRate,k=this.channelCount;this._postMessageToWorker("init",{sampleRate:N,channelCount:k,bitsPerSecond:this.audioBitsPerSecond})}}},{key:"stop",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect(),this.context.close(),this._postMessageToWorker("done"),this._state="inactive"}},{key:"pause",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect();var D=new r.Event("pause");this.dispatchEvent(D),this._state="paused"}},{key:"resume",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.connect(this.processor),this.processor.connect(this.context.destination);var D=new r.Event("resume");this.dispatchEvent(D),this._state="recording"}},{key:"requestData",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this._postMessageToWorker("getEncodedData")}},{key:"stream",get:function(){return this._stream}},{key:"mimeType",get:function(){return this._mimeType}},{key:"state",get:function(){return this._state}},{key:"videoBitsPerSecond",get:function(){}},{key:"audioBitsPerSecond",get:function(){return this._audioBitsPerSecond}}])&&l(v.prototype,T),R&&l(v,R),g})(m);["start","stop","dataavailable","pause","resume","error"].forEach(function(S){return E(O.prototype,S)}),_&&_.name==="edge"&&(f=Worker.prototype.postMessage,Worker.prototype.postMessage=function(S){f.apply(this,[S])}),t.exports=O}).call(this,n(1))},function(t,e){var n;n=(function(){return this})();try{n=n||new Function("return this")()}catch(r){typeof window=="object"&&(n=window)}t.exports=n},function(t,e,n){n.r(e),n.d(e,"defineEventAttribute",function(){return m}),n.d(e,"EventTarget",function(){return _});const r=new WeakMap,i=new WeakMap;function o(A){const O=r.get(A);return console.assert(O!=null,"'this' is expected an Event object, but got",A),O}function s(A,O){r.set(this,{eventTarget:A,event:O,eventPhase:2,currentTarget:A,canceled:!1,stopped:!1,passiveListener:null,timeStamp:O.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const S=Object.keys(O);for(let v=0;v<S.length;++v){const T=S[v];T in this||Object.defineProperty(this,T,a(T))}}function a(A){return{get(){return o(this).event[A]},set(O){o(this).event[A]=O},configurable:!0,enumerable:!0}}function l(A){return{value(){const O=o(this).event;return O[A].apply(O,arguments)},configurable:!0,enumerable:!0}}function u(A){if(A==null||A===Object.prototype)return s;let O=i.get(A);return O==null&&(O=(function(S,v){const T=Object.keys(v);if(T.length===0)return S;function R(I,g){S.call(this,I,g)}R.prototype=Object.create(S.prototype,{constructor:{value:R,configurable:!0,writable:!0}});for(let I=0;I<T.length;++I){const g=T[I];if(!(g in S.prototype)){const D=typeof Object.getOwnPropertyDescriptor(v,g).value=="function";Object.defineProperty(R.prototype,g,D?l(g):a(g))}}return R})(u(Object.getPrototypeOf(A)),A),i.set(A,O)),O}function c(A){return o(A).stopped}function d(A,O){o(A).passiveListener=O}s.prototype={get type(){return o(this).event.type},get target(){return o(this).eventTarget},get currentTarget(){return o(this).currentTarget},composedPath(){const A=o(this).currentTarget;return A==null?[]:[A]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return o(this).eventPhase},stopPropagation(){const A=o(this);typeof A.event.stopPropagation=="function"&&A.event.stopPropagation()},stopImmediatePropagation(){const A=o(this);A.stopped=!0,typeof A.event.stopImmediatePropagation=="function"&&A.event.stopImmediatePropagation()},get bubbles(){return!!o(this).event.bubbles},get cancelable(){return!!o(this).event.cancelable},preventDefault(){const A=o(this);A.passiveListener==null?A.event.cancelable&&(A.canceled=!0,typeof A.event.preventDefault=="function"&&A.event.preventDefault()):console.warn("Event#preventDefault() was called from a passive listener:",A.passiveListener)},get defaultPrevented(){return o(this).canceled},get composed(){return!!o(this).event.composed},get timeStamp(){return o(this).timeStamp}},Object.defineProperty(s.prototype,"constructor",{value:s,configurable:!0,writable:!0}),typeof window!="undefined"&&window.Event!==void 0&&(Object.setPrototypeOf(s.prototype,window.Event.prototype),i.set(window.Event.prototype,s));const h=new WeakMap;function f(A){return A!==null&&typeof A=="object"}function p(A){const O=h.get(A);if(O==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return O}function m(A,O){Object.defineProperty(A,"on"+O,(function(S){return{get(){let v=p(this).get(S);for(;v!=null;){if(v.listenerType===3)return v.listener;v=v.next}return null},set(v){typeof v=="function"||f(v)||(v=null);const T=p(this);let R=null,I=T.get(S);for(;I!=null;)I.listenerType===3?R!==null?R.next=I.next:I.next!==null?T.set(S,I.next):T.delete(S):R=I,I=I.next;if(v!==null){const g={listener:v,listenerType:3,passive:!1,once:!1,next:null};R===null?T.set(S,g):R.next=g}},configurable:!0,enumerable:!0}})(O))}function E(A){function O(){_.call(this)}O.prototype=Object.create(_.prototype,{constructor:{value:O,configurable:!0,writable:!0}});for(let S=0;S<A.length;++S)m(O.prototype,A[S]);return O}function _(){if(!(this instanceof _)){if(arguments.length===1&&Array.isArray(arguments[0]))return E(arguments[0]);if(arguments.length>0){const A=new Array(arguments.length);for(let O=0;O<arguments.length;++O)A[O]=arguments[O];return E(A)}throw new TypeError("Cannot call a class as a function")}h.set(this,new Map)}_.prototype={addEventListener(A,O,S){if(O==null)return!1;if(typeof O!="function"&&!f(O))throw new TypeError("'listener' should be a function or an object.");const v=p(this),T=f(S),R=(T?S.capture:S)?1:2,I={listener:O,listenerType:R,passive:T&&!!S.passive,once:T&&!!S.once,next:null};let g=v.get(A);if(g===void 0)return v.set(A,I),!0;let D=null;for(;g!=null;){if(g.listener===O&&g.listenerType===R)return!1;D=g,g=g.next}return D.next=I,!0},removeEventListener(A,O,S){if(O==null)return!1;const v=p(this),T=(f(S)?S.capture:S)?1:2;let R=null,I=v.get(A);for(;I!=null;){if(I.listener===O&&I.listenerType===T)return R!==null?R.next=I.next:I.next!==null?v.set(A,I.next):v.delete(A),!0;R=I,I=I.next}return!1},dispatchEvent(A){if(A==null||typeof A.type!="string")throw new TypeError('"event.type" should be a string.');const O=p(this),S=A.type;let v=O.get(S);if(v==null)return!0;const T=(function(I,g){return new(u(Object.getPrototypeOf(g)))(I,g)})(this,A);let R=null;for(;v!=null;){if(v.once?R!==null?R.next=v.next:v.next!==null?O.set(S,v.next):O.delete(S):R=v,d(T,v.passive?v.listener:null),typeof v.listener=="function")try{v.listener.call(this,T)}catch(I){typeof console!="undefined"&&typeof console.error=="function"&&console.error(I)}else v.listenerType!==3&&typeof v.listener.handleEvent=="function"&&v.listener.handleEvent(T);if(c(T))break;v=v.next}return d(T,null),(function(I,g){o(I).eventPhase=g})(T,0),(function(I,g){o(I).currentTarget=g})(T,null),!T.defaultPrevented}},Object.defineProperty(_.prototype,"constructor",{value:_,configurable:!0,writable:!0}),typeof window!="undefined"&&window.EventTarget!==void 0&&Object.setPrototypeOf(_.prototype,window.EventTarget.prototype),e.default=_},function(t,e,n){(function(r){var i=this&&this.__spreadArrays||function(){for(var f=0,p=0,m=arguments.length;p<m;p++)f+=arguments[p].length;var E=Array(f),_=0;for(p=0;p<m;p++)for(var A=arguments[p],O=0,S=A.length;O<S;O++,_++)E[_]=A[O];return E};Object.defineProperty(e,"__esModule",{value:!0});var o=function(f,p,m){this.name=f,this.version=p,this.os=m};e.BrowserInfo=o;var s=function(f){this.version=f,this.name="node",this.os=r.platform};e.NodeInfo=s;var a=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null};e.BotInfo=a;var l=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/Edg\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],u=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function c(f){var p=f!==""&&l.reduce(function(A,O){var S=O[0],v=O[1];if(A)return A;var T=v.exec(f);return!!T&&[S,T]},!1);if(!p)return null;var m=p[0],E=p[1];if(m==="searchbot")return new a;var _=E[1]&&E[1].split(/[._]/).slice(0,3);return _?_.length<3&&(_=i(_,(function(A){for(var O=[],S=0;S<A;S++)O.push("0");return O})(3-_.length))):_=[],new o(m,_.join("."),d(f))}function d(f){for(var p=0,m=u.length;p<m;p++){var E=u[p],_=E[0];if(E[1].test(f))return _}return null}function h(){return r!==void 0&&r.version?new s(r.version.slice(1)):null}e.detect=function(f){return f?c(f):typeof navigator!="undefined"?c(navigator.userAgent):h()},e.parseUserAgent=c,e.detectOS=d,e.getNodeVersion=h}).call(this,n(4))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(E){if(n===setTimeout)return setTimeout(E,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(E,0);try{return n(E,0)}catch(_){try{return n.call(null,E,0)}catch(A){return n.call(this,E,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch(E){n=o}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch(E){r=s}})();var l,u=[],c=!1,d=-1;function h(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&f())}function f(){if(!c){var E=a(h);c=!0;for(var _=u.length;_;){for(l=u,u=[];++d<_;)l&&l[d].run();d=-1,_=u.length}l=null,c=!1,(function(A){if(r===clearTimeout)return clearTimeout(A);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(A);try{r(A)}catch(O){try{return r.call(null,A)}catch(S){return r.call(this,A)}}})(E)}}function p(E,_){this.fun=E,this.array=_}function m(){}i.nextTick=function(E){var _=new Array(arguments.length-1);if(arguments.length>1)for(var A=1;A<arguments.length;A++)_[A-1]=arguments[A];u.push(new p(E,_)),u.length!==1||c||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(E){return[]},i.binding=function(E){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(E){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}])),lf.exports);const jT=zs(BT),RA=`"use client";
|
|
104
104
|
var Bt, It, Rt, Ot = { exports: {} };
|
|
105
105
|
Bt || (Bt = 1, It = Ot, typeof OpusMediaRecorder != "undefined" && OpusMediaRecorder, Rt = function() {
|
|
106
106
|
return function() {
|
|
@@ -1331,8 +1331,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1331
1331
|
}]);
|
|
1332
1332
|
};
|
|
1333
1333
|
}, typeof WorkerGlobalScope != "undefined" && self instanceof WorkerGlobalScope ? Rt()() : It.exports = Rt());
|
|
1334
|
-
`,lf=typeof self!="undefined"&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",TA],{type:"text/javascript;charset=utf-8"});function jT(t){let e;try{if(e=lf&&(self.URL||self.webkitURL).createObjectURL(lf),!e)throw"";const n=new Worker(e,{type:"module",name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(TA),{type:"module",name:t==null?void 0:t.name})}}const dl="audio/webm;codecs=opus",$T=typeof MediaRecorder!="undefined"&&typeof MediaRecorder.isTypeSupported=="function";function VT(t){const e=X(),n=X(),r=X(),i=X(!1),o=t.mediaRecorder;G(()=>{t.recordingState==="recording"?s():o.current&&t.recordingState===null&&(i.current=!0,o.current.stop())},[t.recordingState]);const s=async()=>{var l;n.current=Au.create({scrollingWaveform:!0,scrollingWaveformWindow:10}),e.current=vA({...t.wavesurferOptions,interact:!1,barHeight:(l=t.wavesurferOptions.barHeight)!=null?l:4,plugins:[n.current],container:t.wavesurferContainer.current});const a=await n.current.startMic();$T&&MediaRecorder.isTypeSupported(dl)?o.current=new MediaRecorder(a,{mimeType:dl}):o.current=new BT(a,{mimeType:dl},{encoderWorkerFactory:()=>new jT,WebMOpusEncoderWasmPath:L_["opus-media-recorder-wasm"]}),o.current.onstart=()=>r.current=Date.now(),o.current.ondataavailable=u=>{var c;if(!i.current){const d=Date.now(),h=Math.floor((d-r.current)/1e3),p=new File([u.data],`talkjs_audio_message_${d}_${h}.webm`,{type:"audio/webm"});t.onSendRecording(p,h)}i.current=!1,o.current=void 0,(c=n.current)==null||c.stopMic(),e.current=void 0,n.current=void 0},o.current.start()};return null}function RA(t){const e=Qe(),n=oe(),r=tn(),i=J(n.referencedMessage$),o=J(n.state$.userPermissions),s=lo(),{sendMessage:a}=Gg(),{voiceRecorder:l,recordVoiceMessage:u,voiceRecorderControlsProps:c}=(function(){const p=oe(),f=Ar(),m=lt({...cl}),{state:E,duration:_,recordingUrl:A,uploadState:O,fileToken:S}=J(m),v=X(void 0),T=X(null),R=X(),y=pA("microphone",async k=>{const b=p.state$.currentConversation.peek();if(b&&b.access!=="Read"){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(L=>L.stop()),k("granted")}catch(L){throw k("denied"),L}m.assign({state:"recording",duration:0}),R.current=setInterval(()=>{m.duration.set(L=>L+1)},1e3)}},[m,p]),g=q(()=>{var k;R.current&&(clearInterval(R.current),R.current=void 0),(k=v.current)==null||k.stop()},[]),D=q(()=>{R.current&&(clearInterval(R.current),R.current=void 0),m.assign(cl)},[m]),C=q((k,b)=>{const L=URL.createObjectURL(new Blob([k])),x=k.size+","+k.name;p.state$.localFileBlobUrls.child(p.state$.currentConversationId.peek()).child(x).set({url:L,fetching:!1});const P={duration:b,filename:k.name};p.latestFileUpload={type:"voice",file:k,metadata:P,temporaryBlobUrl:L},m.assign({state:"previewing",uploadState:"pending",recordingUrl:L+"?name="+k.name}),f.uploadVoice(k,P).then(B=>{m.assign({uploadState:"done",fileToken:B})})},[f,m,p]),N=q(()=>{S&&f.sendFileMessage({fileToken:S}),m.assign(cl)},[f,S,m]);return{voiceRecorder:te(()=>{if(!E)return;const k={state:E,duration:_,recordingUrl:A,uploadState:O,stop:g,cancel:D,send:N};return fA.set(k,T),k},[E,_,A,O,g,D,N]),recordVoiceMessage:y,voiceRecorderControlsProps:te(()=>({onSendRecording:C,recordingState:E,mediaRecorder:v,wavesurferOptions:NT,wavesurferContainer:T}),[C,E])}})(),d=J(lt(()=>{const p=s.state$.get();return t.editMessageId===void 0?new bd(p,a,t.attachFile,t.shareLocation,s.toggleEmojiPicker,u):new bd(p,t.onEditMessage,()=>{},()=>{},()=>{},()=>{})},[s.state$,s.toggleEmojiPicker,t.attachFile,t.editMessageId,t.onEditMessage,t.shareLocation,a])),h=q(p=>s.setText(p),[s]);return(function({appId:p,conversationId:f,meId:m,setText:E,enabled:_}){const A=te(()=>D_(f,m,p),[p,f,m]);G(()=>{var S;if(!A||!_)return;const O=(S=JSON.parse(ot.getItem(Jl)||"{}")[A])!=null?S:"";E(O)},[A,_,E])})({appId:r.app.id,conversationId:r.conversation.id,meId:r.currentUser.id,setText:h,enabled:!t.editMessageId}),I($m.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:p=>s.selectEmoji(p)},children:[I(VT,{...c}),I(e.MessageField,{common:r,referencedMessage:i,permissions:o,editor:d,voiceRecorder:l,editMessageId:t.editMessageId})]})}function zT({message:t}){const e=oe(),n=Ar(),r=J(e.state$.editingMessageId),i=te(()=>Ut(t.content[0].children),[t]),o=lt({isEmpty:i.length===0,atTextLimit:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=te(()=>new v_(o,e.device$,e.state$.userPermissions),[o,e]),a=q(async()=>{const l=s.state$;if(l.isEmpty.peek()||l.atTextLimit.peek())return;const u=s.getText();u&&await n.editMessage(t.id,{text:u}),e.state$.editingMessageId.set(null)},[e,n,s,t.id]);return G(()=>{s.onEnter=a},[s,a]),G(()=>{s.focus(),s.setText(Ut(t.content[0].children,!0))},[s,t]),I(xm.Provider,{value:s,children:I(RA,{editMessageId:r,onEditMessage:a})})}function YT(t){const e=Qe(),n=tn();return I(e.MessageDivider,{common:n,...t})}function GT({message:t}){const e=Qe(),n=oe(),r=J(()=>n.messagePermissions$(t)),i=tn(),[o,s]=ne("sent");return $i(a=>{if(t.id.startsWith("ephemeral-"))return s("sending");const l=n.state$.currentConversation.everyoneReadUntil.get();return l!==void 0?t.createdAt<=l?s("everyoneRead"):s("sent"):void 0}),I(e.Message,{common:i,message:t,messageStatus:o,permissions:r})}function WT(){const t=Qe(),e=tn();return I(t.BeforeMessages,{common:e})}function XT(){const t=Qe(),e=tn();return I(t.AfterMessages,{common:e})}function KT(t){const e=oe(),n=si();G(()=>(function(r,i,o){const s=r.state$.currentConversation;let a=!1;function l(){if(!a){const E=r.state$.currentConversationId.peek();ie.defined(E),i.conversation(E).markAsRead()}}function u(){r.newMessageMarker$.peek()||r.newMessageMarker$.set(s.readUntil.peek())}function c(){s.isUnread.get()&&s.unreadMessageCount.peek()===0&&(a=!0,u())}let d=null;function h(){var S;const E=r.state$.currentConversation.lastMessage.id.get(),_=r.state$.currentConversationId.peek(),A=_!==d;if(d=_,A&&(p.stop(),a=!1,r.newMessageMarker$.set(void 0)),!E||!_)return;s.isUnread.peek()&&(o()?(A&&u(),l()):(u(),p.start())),((S=s.lastMessage.sender)==null?void 0:S.id.peek())===r.extUserId$.peek()&&(r.newMessageMarker$.set(void 0),a=!1)}const p={handle:void 0,start(){this.handle||(this.handle=setInterval(()=>this.tick(),2e3))},tick(){o()&&(l(),this.stop())},stop(){clearInterval(this.handle),this.handle=void 0}};window.__talkjsE2E&&(window.__talkjsE2E.foregroundCheck=()=>{ie.defined(p.handle),p.tick()});const f=mt(c),m=mt(h);return()=>{r.newMessageMarker$.set(void 0),f(),m(),p.stop()}})(e,n,t),[e,n,t])}function qT({conversationId:t}){const e=oe(),n=Ar(),r=X(!0),i=X(null),o=J(()=>!!e.state$.messages.child(t).loadedAll.get());G(()=>n.setScrollableDiv(i),[n]),KT(q(()=>{if(!i.current)return!1;const a=!document.hidden,l=(function(d){if(d.checkVisibility)return d.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0,checkOpacity:!0,checkVisibilityCSS:!0});{const h=window.getComputedStyle(d),p=h.visibility,f=h.opacity;return!(d.getClientRects().length===0||p==="hidden"||f==="0")}})(i.current),u=i.current.getBoundingClientRect(),c=u.top<window.innerHeight&&u.bottom>0&&u.left<window.innerWidth&&u.right>0;return a&&l&&c},[])),Ze(()=>{r.current=i.current.scrollTop>-30}),G(()=>{r.current&&(i.current.scrollTop=0)});const s=q(a=>{const l=a.currentTarget,u=l.scrollHeight-l.clientHeight+l.scrollTop,c=e.messageSubscriptions[t];u<90&&c&&c.loadMore(10)},[e.messageSubscriptions,t]);return I("div",{className:"t-message-list",ref:i,"t-menu-boundary":"",onScroll:s,children:[I(XT,{}),I(ji,{each:e.chatItems$,children:a=>I("div",{className:"t-message-group","t-group-type":a.type.get(),children:I(ji,{each:a.items,item:JT,itemProps:{controller:n,conversationId:t}})},a.id.get())}),o&&I(WT,{})]})}function JT({item$:t}){const e=oe(),n=J(t),r=J(e.state$.editingMessageId);return n instanceof Yo?I(YT,{timestamp:n.timestamp,isReadMarker:n.isReadMarker,isDayMarker:n.isDayMarker}):r===n.id?I(zT,{message:n}):I(GT,{message:n})}const ZT=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function oa({appId:t,chatboxState:e}){const n=t.charAt(0)==="t"||ZT.has(t);return G(()=>{switch(e.type){case"auth-failed":Ne.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":Ne.error(`User \`${e.userId}\` not found. Please verify that you synchronized this user's data with TalkJS, either using the JS SDK or through the REST API.`);break;case"unexpected-error":Ne.error(e.error);break;case"wrong-app-id":Ne.error(`Could not find given appId: "${e.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:ie.never(e)}},[e]),I("div",{className:"t-panel t-error-panel",children:[I("span",{className:"t-heading",children:"Something went wrong"}),I("p",{children:"Please reload the page and try again."}),n?I(ve,{children:[I("p",{children:"Developer note: check your browser's developer tools console for messages that may help solve the problem."}),I("p",{children:"This message only shows up in test mode."})]}):I("p",{children:"If things keep not working, do not hesitate to get in touch with us."})]})}function QT(){return I("div",{className:"t-panel t-error-panel",children:I("span",{className:"t-heading",children:J(oe().t$).CHAT_NOT_FOUND})})}function IA(){return I("div",{className:"t-panel t-loading-panel",children:I(lu,{})})}function yA(){const t=J(oe().t$);return I("div",{className:"t-panel t-error-panel",children:[I("span",{className:"t-heading",children:t.AUTH_EXPIRED_OVERLAY_TITLE}),I("p",{children:t.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}function eR({onClose:t}){const e=oe(),n=Ar(),r=si(),[i,o]=ne(null),s=q(async l=>{try{if(l||(l=(await new Promise(m=>{const E=document.createElement("input");E.type="file",E.multiple=!1,E.addEventListener("change",()=>{m([...E.files])}),E.addEventListener("cancel",()=>{m([])}),E.click()}))[0]),!l)return;const{uploadPromise:u,upload:c}=await(async function(m,E){const _=m.name;if((function(v){return/\.(mp4|ts|mov|webm|ogv)$/i.test(v)})(m.name)){const v=await hl("video",m,y=>({width:y.videoWidth,height:y.videoHeight,duration:y.duration,filename:_})),T=E.uploadVideo(m,v),R=(function(y){switch(y.name.split(".").pop()){case"ts":return"video/MP2T";case"mov":return"video/quicktime";case"webm":return"video/webm";case"ogv":return"video/ogg";default:return"video/mp4"}})(m);return{uploadPromise:T,upload:{type:"video",file:m,metadata:v,temporaryBlobUrl:URL.createObjectURL(new Blob([m],{type:R}))}}}if((function(v){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(v)})(m.name)){const v=await hl("audio",m,T=>({duration:T.duration,filename:_}));return{uploadPromise:E.uploadAudio(m,v),upload:{type:"audio",file:m,metadata:v,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}if((function(v){return/(gif|png|jpg|jpeg|svg|bmp|webp)$/i.test(v)})(m.name)){const v=await hl("img",m,T=>({width:T.naturalWidth,height:T.naturalHeight,filename:_}));return{uploadPromise:E.uploadImage(m,v),upload:{type:"image",file:m,metadata:v,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}const A={filename:_},O=E.uploadFile(m,A),S=URL.createObjectURL(new Blob([m]));return{uploadPromise:O,upload:{type:"file",file:m,metadata:A,temporaryBlobUrl:S}}})(l,r),d=c.file.size+","+c.file.name;e.state$.localFileBlobUrls.child(e.state$.currentConversationId.peek()).child(d).set({url:c.temporaryBlobUrl,fetching:!1}),e.latestFileUpload=c;const h=eo(),p={upload:c,closePreview:h.resolve,uploaded:!1,errored:!1};let f;o(p);try{f=await cf(u,h.promise),o({...p,uploaded:!0})}catch(m){if(m===dc)return;Ne.warn("File upload failed",m.toString()),o(E=>({...E,errored:!0}))}if(await h.promise==="cancel")return;ie.defined(f),n.sendFileMessage({fileToken:f})}finally{t(),o(null)}},[n,r,o,e,t]),a=pA("geolocation",async l=>{try{const u=eo(),c={upload:{type:"location",location:void 0},uploaded:!1,closePreview:u.resolve,errored:!1};o(c);const{permissionResult:d,location:h}=await cf(new Promise(p=>{navigator.geolocation.getCurrentPosition(f=>{const m={latitude:f.coords.latitude,longitude:f.coords.longitude};p({permissionResult:"granted",location:m})},f=>{f.code===1?p({permissionResult:"denied"}):p({permissionResult:"granted"})})}),u.promise);if(l(d),!h||(o({...c,upload:{type:"location",location:h},uploaded:!0}),await u.promise==="cancel"))return;n.sendLocationMessage({location:h})}catch(u){if(u===dc)return;throw u}finally{t(),o(null)}},[n,o,t]);return{attachFile:s,shareLocation:a,uploadState:i}}const dc=Symbol("cancelled");function cf(t,e){return Promise.race([t,e.then(()=>Promise.reject(dc))])}async function hl(t,e,n){const r=document.createElement(t);try{return r.src=URL.createObjectURL(e),await new Promise((i,o)=>{const s=t==="img"?"load":"loadedmetadata";r.addEventListener(s,()=>{try{i(n(r))}catch(a){o(a)}},{once:!0})})}finally{URL.revokeObjectURL(r.src)}}function CA({children:t,className:e,...n}){return I("div",{className:"t-attach-overlay "+e,...n,children:t})}function tR({uploadState:t}){const{uploaded:e,errored:n}=t;mo(()=>t.closePreview("cancel"),".t-upload-preview");const r=X(null);G(()=>{e&&r.current.focus()},[e]);const i=J(oe().t$);return I(CA,{className:"t-upload-preview",children:I("div",{className:"t-preview",children:[!n&&I(nR,{upload:t.upload,uploaded:e}),n&&I("div",{className:"t-error-row",children:i.UPLOAD_ERROR}),I("div",{className:"t-send-row",children:[I("button",{className:"t-cancel",onClick:()=>t.closePreview("cancel"),children:i.CANCEL}),!n&&e&&I("button",{className:"t-confirm-send test__confirm-upload-button",onClick:()=>t.closePreview("send"),ref:r,children:i.SEND_BUTTON_TEXT})]})]})})}function nR({upload:t,uploaded:e}){const n=J(oe().t$);return t.type!=="location"?I(ve,{children:[I(iR,{upload:t}),I(oR,{upload:t,uploaded:e,t:n})]}):e?I(rR,{location:t.location}):I("div",{className:"t-loading",children:I(lu,{})})}function rR({location:t}){const{imageUrl:e,linkUrl:n}=_u(t);return I("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${JSON.stringify(e)}) center center / cover no-repeat`}})}const iR=mn(function({upload:t}){let e=null;const n=t.file;if(t.type==="video"){const r=/[.]ts/i.test(n.name)?"mpegts":"native";e=I("div",{className:"video-container",children:I(sR,{src:t.temporaryBlobUrl,videoType:r,playsInline:!0,controls:!0,preload:"auto"})})}else t.type==="image"?e=I("div",{className:"t-img-container",children:I("img",{src:t.temporaryBlobUrl})}):t.type==="audio"&&(e=I(go,{src:t.temporaryBlobUrl,filename:n.name}));return e}),oR=mn(function({uploaded:t,upload:e,t:n}){let r;r=t?e.metadata.filename:n.UPLOAD_IN_PROGRESS;let i="",o="";return e.type==="file"&&(i="is-file",t&&(o="file-block")),I("div",{className:`t-filename-row ${i}`,children:I("div",{className:o,children:r})})});function sR(t){const{videoType:e,...n}=t;return I("video",{...n})}function aR(){var o;const t=Qe(),e=oe(),n=tn(),r=(o=J(()=>e.state$.isUserConnected.child(e.state$.currentConversationId.get())))!=null?o:{},i=J(e.state$.userPermissions);return I(t.ChatHeader,{common:n,isUserConnected:r,permissions:i})}function lR(){const t=Qe(),e=tn();return I(t.MessageListHeader,{common:e})}function cR(){const t=Qe(),e=tn();return I(t.MessageListFooter,{common:e})}function uR(){const t=Qe(),e=tn();return I(t.NoConversationSelected,{common:e})}function NA({containerRef:t}){const[e,n]=ne(null),[r,i]=ne(null),[o,s]=ne(!1);G(()=>{const d=t.current;let h=null;const p=f=>{if(f.pointerType!=="mouse")return;h&&(clearTimeout(h),h=null);const m=f.target.closest("[t-tooltip-text]");m&&(h=setTimeout(()=>{h=null,n(m),s(!1)},500))};return d==null||d.addEventListener("pointerover",p),()=>{d==null||d.removeEventListener("pointerover",p)}},[t]),G(()=>{const d=t.current;let h,p=!1;function f(_){p=!1,_.pointerType!=="mouse"&&(h=setTimeout(()=>{const A=_.target.closest("[t-tooltip-text]");A&&(p=!0,n(A),s(!0))},300))}function m(){clearTimeout(h)}function E(_){p&&(_.stopPropagation(),_.preventDefault())}return d.addEventListener("pointerdown",f),d.addEventListener("pointerup",m),d.addEventListener("pointerleave",m),d.addEventListener("click",E,!0),d.addEventListener("contextmenu",E,!0),()=>{d.removeEventListener("pointerdown",f),d.removeEventListener("pointerup",m),d.removeEventListener("pointerleave",m),d.removeEventListener("click",E,!0),d.removeEventListener("contextmenu",E,!0)}},[t]);const{refs:a,floatingStyles:l}=Z_({placement:"top",middleware:[Q_(),o&&(u=10,{...JD(u),options:[u,c]})],whileElementsMounted:q_});var u,c;return G(()=>{if(e){a.setReference(e);const d=()=>{const f=e.getAttribute("t-tooltip-text");f===null?p():i(f.trim())},h=new MutationObserver(d);h.observe(e,{attributes:!0}),d();const p=()=>{o?setTimeout(()=>n(null),1e3):n(null)};return e.addEventListener("pointerleave",p),()=>{e.removeEventListener("pointerleave",p),h.disconnect(),a.setReference(null),i(null)}}},[e,o,a]),r?I("div",{className:"t-tooltip",role:"tooltip",style:l,ref:a.setFloating,children:r}):null}function dR({appId:t,chatHeaderVisible:e,messageFieldVisible:n}){const r=lo(),i=(function(){const E=oe(),_=lt(()=>{const S=E.errors$.get(),v=E.authTokenState$.get(),T=E.state$.loadingConversationId.get(),R=E.state$.currentConversationId.get();return S.serverError?"server-error":S.wrongAppId?"wrong-app-id":v==="loading"||v==="idle"?"loading-token":v==="invalid"?"invalid-token":v==="expired"?"expired-token":v==="valid"?S.unknownUser?"unknown-user":T&&E.state$.unknownConversations.child(T).get()?"loading-conv-failed":E.canRenderUi(T)||R!==T&&E.canRenderUi(R)?"loaded":"loading-data":void ie.unreachable()}),A=lt({type:"loading"});$i(S=>{const v=_.get(),T=E.state$.currentConversationId.get(),R=E.extUserId$.get(),y=E.appId$.get();function g(D){A.set({type:"loading"});const C=setTimeout(()=>{A.set(D)},5e3);return()=>clearTimeout(C)}switch(v){case"invalid-token":A.set({type:"auth-failed"});break;case"expired-token":A.set({type:"expired-token"});break;case"wrong-app-id":A.set({type:"wrong-app-id",appId:y});break;case"server-error":A.set({type:"server-error"});break;case"loading-data":case"loading-token":A.set({type:"loading"});break;case"loaded":A.set({type:"loaded",conversationId:T,userId:R});break;case"loading-conv-failed":S.onCleanup=g({type:"inaccessible-conversation",userId:R,conversationId:T});break;case"unknown-user":S.onCleanup=g({type:"unknown-user",userId:R});break;default:ie.never(v)}});const O=lt({type:"loading"});return $i(S=>{if(A.type.get()==="loading"){O.set({type:"invisible-loading"});const v=setTimeout(()=>{O.set({type:"loading"})},1e3);S.onCleanup=()=>{clearTimeout(v)}}else O.set(A.get())}),J(O)})(),{attachFile:o,shareLocation:s,uploadState:a}=eR({onClose:()=>r.focus()});G(()=>{r.uploadFile=o},[r,o]);const[l,u]=ne(!1),c=oe(),d=J(()=>c.app$.get()?c.state$.userPermissions.canShareFile.get():void 0);G(()=>{i.type==="loaded"?c.renderedConversationId$.set(i.conversationId):c.renderedConversationId$.set(void 0)},[i,c]);const h=q(E=>{o(E.dataTransfer.files[0]),E.preventDefault(),u(!1)},[o]),p=q(E=>{E.preventDefault(),u(!0)},[]),f=q(E=>{E.preventDefault(),u(!1)},[]),m=X(null);return cu(),i.type==="invisible-loading"?I(ve,{}):i.type==="loading"?I(IA,{}):i.type==="inaccessible-conversation"?I(QT,{}):i.type==="unknown-user"||i.type==="auth-failed"||i.type==="wrong-app-id"||i.type==="server-error"||i.type==="unexpected-error"?I(oa,{appId:t,chatboxState:i}):i.type=="expired-token"?I(yA,{}):i.type==="loaded"?i.conversationId===null?I(uR,{}):I("div",{className:"t-chatbox-content",onDragOver:d?p:void 0,onDragLeave:d?f:void 0,onDrop:d?h:void 0,"t-menu-boundary":"root",ref:m,children:[e&&I(aR,{}),I(lR,{}),I(qT,{conversationId:i.conversationId}),I(cR,{}),n&&I(RA,{attachFile:o,shareLocation:s}),a&&I(tR,{uploadState:a}),l&&I(CA,{className:"t-drop-overlay",children:I(re,{type:"attachment"})}),I(NA,{containerRef:m})]}):I(ve,{})}const jo=new Uint8Array(31);function bA(){if(globalThis.crypto!==void 0)crypto.getRandomValues(jo);else for(let e=0;e<jo.length;e++)jo[e]=Math.floor(256*Math.random());let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^jo[t++]&15>>+e/4).toString(16))}class hR{constructor(e,n,r,i,o,s,a,l){this.store=e,this.talkSession=n,this.editorInternals=r,this.onSendMessage=i,this.onDeleteMessage=o,this.onMessageAction=s,this.onFocusMessage=a,this.onBackButtonClick=l,this.loadMoreUntil=async u=>{const c=this.store.state$.currentConversationId.peek(),d=this.store.state$.messages.child(c).loadedAll;let h;do{const p=this.store.messageSubscriptions[c];p&&!d.peek()&&await p.loadMore(30),h=u()}while(!d.peek()&&!h);return h}}setScrollableDiv(e){this.scrollable=e}toggleSearchBox(e){if(this.store.state$.userPermissions.canSearch.peek())if(e!==void 0)this.store.chatSearchState$.set(e?"visible":"hidden");else{const n=this.store.chatSearchState$.peek();this.store.chatSearchState$.set(n==="hidden"?"visible":"hidden")}else Ne.error("In-conversation message search is only available to customers on Growth plan and above.")}async deleteMessage(e){const n=this.store.state$.currentConversation.peek();if(!n||n.access==="Read")return;const r=n.id,i=this.store.state$.messages.child(r).lookup.child(e).peek(),o=this.talkSession.conversation(r).message(e),[s]=await Promise.all([i!=null?i:o.get(),o.delete()]);if(s){const a={currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek(),message:i};this.onDeleteMessage(a)}}setEditing(e){const n=this.store.state$.currentConversation.peek();n&&n.access!=="Read"&&this.store.state$.editingMessageId.set(e)}async editMessage(e,n){const r=this.store.state$.currentConversation.peek();if(!r||r.access==="Read")return;const i=r.id;await this.talkSession.conversation(i).message(e).edit(n)}setReferencedMessage(e){const n=this.store.state$.currentConversation.peek();n&&n.access!=="Read"&&(this.store.state$.referencedMessageId.set(e),setTimeout(()=>this.editorInternals.focus({skipProseMirrorStuff:!0}),100))}async focusMessage(e,n=!0){var a;if(e==null)return this.store.focusedMessage$.set(null),null;if(await Bs(()=>this.store.state$.loadingConversationId.get()===this.store.renderedConversationId$.get()),this.store.state$.currentConversationId.peek()===null)return Ne.error("Cannot focus message because current conversation is `null`."),null;const r=()=>{const l=this.store.state$.currentConversationId.peek();return this.store.state$.messages.child(l).lookup.child(e).peek()||null};let i=r();if(i||(i=await this.loadMoreUntil(r)),!i)return Ne.error(`Message with id: \`${e}\` could not be found in this conversation`),i;const o=(a=this.scrollable)==null?void 0:a.current;ie.defined(o);const s=o.querySelector(`[t-message-id="${e}"]`);return s?this.scrollToAndHighlight(s,i,n):Ne.error(`Could not find HTMLElement with attribute: t-message-id="${e}"`),i}async jumpToHighlight(e){if(!this.store.state$.userPermissions.canSearch.peek())return Ne.error("In-conversation message search is only available to customers on Growth plan and above."),null;if(this.store.highlightedStrings$.peek().length===0||this.store.chatSearchState$.peek()==="searching")return null;let n=this.findHighlight(e);return n||e!=="up"||(this.store.chatSearchState$.set("searching"),n=await this.loadMoreUntil(()=>this.findHighlight("up"))),n}findHighlight(e){var u;const n=(u=this.scrollable)==null?void 0:u.current;ie.defined(n);const r=[],i=Array.from(n.querySelectorAll("[t-message-id]")),o=this.store.state$.currentConversationId.peek(),s=this.store.state$.messages.child(o).state.peek();if(i.length===0&&s.length!==0)return Ne.error("Could not find HTMLElements with the attribute: t-message-id. This attribute is required for In-Conversation search to work."),null;let a;if(Array.from(n.getElementsByClassName("t-highlighted-text")).forEach(c=>{const d=i.findIndex(f=>f.contains(c));if(d===-1)return;const h=i.splice(d,1)[0],p=h.getAttribute("t-message-id");r.push([p,h])}),e==="up"){const c=n.getBoundingClientRect().top;a=r.find(([d,h])=>h.getBoundingClientRect().top-c<-5)}else{const c=.05*n.getBoundingClientRect().height,d=n.getBoundingClientRect().bottom;for(let h=r.length-1;h>=0;h--){const p=r[h],[f,m]=p;if(d-m.getBoundingClientRect().top<=c){a=p;break}}}const l=this.store.chatSearchState$;if(a){const[c,d]=a,h=this.store.state$.messages.child(o).lookup.child(c).peek();return this.scrollToAndHighlight(d,h),l.set("visible"),h}return r.length===0?l.set("noResults"):l.set("noMoreResults"),null}scrollToAndHighlight(e,n,r=!0){const i=this.scrollable.current.getBoundingClientRect(),o=e.getBoundingClientRect();let s="start";Math.sign(i.top-o.top)===-1&&o.height<i.height&&(s="end"),e instanceof HTMLElement&&(e.style.scrollSnapAlign=s),e.scrollIntoView({behavior:"instant"}),e instanceof HTMLElement&&(e.style.scrollSnapAlign="none"),this.store.focusedMessage$.set(n),r&&this.onFocusMessage({message:n})}setHighlightedStrings(e){this.store.state$.userPermissions.canSearch.peek()?this.store.highlightedStrings$.set(e):Ne.error("In-conversation message search and by extension highlighting of strings are only available to customers on Growth plan and above.")}async sendMessage(e){const n=this.store.state$.currentConversationId.peek();if(!n)return;const r=await(async function(s,a){var m,E,_,A,O;const l=s.state$.currentConversationId.peek(),u=s.state$.messages.child(l),c=typeof a.referencedMessage=="string"?u.lookup.child(a.referencedMessage).peek():await((E=(m=a.referencedMessage)==null?void 0:m.get())!=null?E:null),d=c&&{...c,type:"UserMessage",sender:c.sender,referencedMessageId:(A=(_=c.referencedMessage)==null?void 0:_.id)!=null?A:null};d&&delete d.referencedMessage;const h=s.latestFileUpload,p="content"in a?[uf(h,a.content[0])]:[pR(a.text)],f="text"in a?a.text:EA(a.content.map(S=>uf(h,S)),{});return{id:"ephemeral-"+bA(),type:"UserMessage",sender:s.currentUser$.peek(),createdAt:Date.now(),editedAt:null,custom:(O=a.custom)!=null?O:{},origin:"web",referencedMessage:d,reactions:[],content:p,plaintext:f}})(this.store,e);this.store.state$.ephemeralMessages.child(n).child(r.id).set(r);const i=eo();this.store.readyForNewMessagesPromise=i.promise;const o=await this.talkSession.conversation(n).send(e);this.store.state$.ephemeralMessageIdMapping.child(n).child(o.id).set(r.id),i.resolve(),this.onSendMessage({message:await o.get(),currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek()})}sendFileMessage(e){const n={type:"file",fileToken:e.fileToken};return this.sendMessage({content:[n],custom:e.custom})}async uploadVoice(e,n){return await this.talkSession.uploadVoice(e,n)}sendLocationMessage(e){const n={type:"location",latitude:e.location.latitude,longitude:e.location.longitude};return this.sendMessage({content:[n],custom:e.custom})}markAsTyping(){const e=this.store.state$.currentConversationId.peek();e&&this.talkSession.conversation(e).markAsTyping()}async toggleReaction(e,n,r){typeof n!="string"&&(n=n.emoji);const i=this.store.state$.currentConversationId.peek();if(!i)return;const o=this.store.state$.messages.child(i).lookup.child(e).peek().reactions.find(a=>a.emoji===n),s=this._getReactionRef(e,n);o!=null&&o.currentUserReacted&&r!==!0?await s.remove():r!==!1&&await s.add()}async addReaction(e,n){this.store.state$.currentConversationId.peek()&&await this._getReactionRef(e,n).add()}triggerMessageAction(e,n,r){const i=this.store.state$.currentConversation.peek();i&&(typeof e=="string"&&(e=this.store.state$.messages.child(i.id).lookup.child(e).peek()),this.onMessageAction({action:n,params:r,message:e,conversation:i}))}clickBackButton(){const e=this.store.currentUser$.peek();ie.defined(e),this.onBackButtonClick({currentUser:e})}storeDraft(e){const n=this.store.state$.currentConversationId.peek(),r=this.store.currentUser$.peek(),i=this.store.appId$.peek();n&&r&&i&&_v(n,r.id,i,e)}_getReactionRef(e,n){const r=this.store.state$.currentConversationId.peek();return this.talkSession.conversation(r).message(e).reaction(n)}}const pR=t=>({type:"text",children:__(t)});function uf(t,e){switch(e.type){case"text":case"location":return e;case"file":return(function(n,r){return{type:"file",subtype:n.type==="file"?void 0:n.type,...n.metadata,size:n.file.size,filename:n.file.name,fileToken:r.fileToken,url:n.temporaryBlobUrl}})(t,e)}}class pl extends Error{constructor(e,n){const r=(function(i){if(typeof i=="string")return i;if(Array.isArray(i))return i.join(`
|
|
1335
|
-
`);try{return JSON.stringify(i)}catch(o){return String(i)}})(e);super(r),this.userMessage=n!=null?n:r,Object.setPrototypeOf&&Object.setPrototypeOf(this,new.target.prototype)}}const no=console;class fR{constructor(e,n,r,i){this.apiUrls=e,this.appId=n,this.sessionId=r,this.authProvider=i,this._lastPutPromise=Promise.resolve()}async get(e,n={}){const r=this.endpointUrl(e,n),i=await Ai(()=>this.fetchWithReauth(r),{retries:11});return await this.handleResponse(i,r)}async queuedPut(e,n){await this._lastPutPromise;const r=Ai(()=>this._doPut(e,n));return this._lastPutPromise=r,r}put(e,n,r){const i=()=>this._doPut(e,n);return r?df(i,r):Ai(i,{retries:5})}post(e,n,r){const i=()=>this._doPost(e,n);return r?df(i,r):Ai(i,{retries:5})}delete(e,n={}){return Ai(()=>this._doDelete(e,n),{retries:11})}endpointUrl(e,n={}){const r=new URL(this.apiUrls.internalHttpApiUrl);r.pathname+=`/${this.appId}/${e}`,r.searchParams.set("sessionId",this.sessionId);for(const[i,o]of Object.entries(n))r.searchParams.set(i,o);return r}async _doPut(e,n){const r=this.endpointUrl(e),i=await this.fetchWithReauth(r,{method:"PUT",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doPost(e,n){const r=this.endpointUrl(e),i=await this.fetchWithReauth(r,{method:"POST",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doDelete(e,n){const r=this.endpointUrl(e,n),i=await this.fetchWithReauth(r,{method:"DELETE"});return await this.handleResponse(i,r)}async handleResponse(e,n){if(e.status>=300){if(e.status===404)throw Nl.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new pl("Could not find app.",`Could not find given appId: "${this.appId}". You can find your appId on https://talkjs.com/dashboard.`);if(e.status===401){const r=await this.authProvider.getToken();throw Nl.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${n} with token ${r}.`),new pl("User not authenticated.","Could not authenticate user. Check if your signature is calculated correctly.")}if(e.status>=300&&e.status<500){const{error:r}=await e.json();throw new pl(r)}{const r=await e.text();throw new Error(`Got non-success response (${r}) from the server for url: ${n}.`)}}return await e.json()}async fetchWithReauth(e,n){function r(s){const a={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${s}`};return fetch(e,{...n,headers:a})}const i=await this.authProvider.getToken(),o=await r(i);return o.status!==401?o:(no.error(`401 error from ${n==null?void 0:n.method} ${e}, ${i}`),this.authProvider.refreshToken(),r(await this.authProvider.getToken()))}}function wA(t){return!t.userMessage}function Ai(t,{retries:e=30}={}){return Eu(e,t,{shouldRetry:wA,log:no.warn.bind(no),maxDelay:30,initialDelay:.2})}async function df(t,e){try{return await t()}catch(r){if(!wA(r))throw r}let n=!1;return e.then(()=>{n=!0}),Eu(1e3,t,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!n,log:no.warn.bind(no)})}var hf,fl={exports:{}},mR=(hf||(hf=1,(function(t,e){var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",s="[object Object]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[o]=u["[object Map]"]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var c,d=typeof No=="object"&&No&&No.Object===Object&&No,h=typeof self=="object"&&self&&self.Object===Object&&self,p=d||h||Function("return this")(),f=e&&!e.nodeType&&e,m=f&&t&&!t.nodeType&&t,E=m&&m.exports===f,_=E&&d.process,A=(function(){try{var w=m&&m.require&&m.require("util").types;return w||_&&_.binding&&_.binding("util")}catch(M){}})(),O=A&&A.isTypedArray,S=Array.prototype,v=Function.prototype,T=Object.prototype,R=p["__core-js_shared__"],y=v.toString,g=T.hasOwnProperty,D=(c=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+c:"",C=T.toString,N=y.call(Object),k=RegExp("^"+y.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=E?p.Buffer:void 0,L=p.Symbol,x=p.Uint8Array;b&&b.allocUnsafe;var P,B,V=(P=Object.getPrototypeOf,B=Object,function(w){return P(B(w))}),$=Object.create,z=T.propertyIsEnumerable,_e=S.splice,ae=L?L.toStringTag:void 0,ue=(function(){try{var w=la(Object,"defineProperty");return w({},"",{}),w}catch(M){}})(),de=b?b.isBuffer:void 0,Be=Math.max,vr=Date.now,At=la(p,"Map"),je=la(Object,"create"),ut=(function(){function w(){}return function(M){if(!$n(M))return{};if($)return $(M);w.prototype=M;var U=new w;return w.prototype=void 0,U}})();function jn(w){var M=-1,U=w==null?0:w.length;for(this.clear();++M<U;){var Y=w[M];this.set(Y[0],Y[1])}}function nn(w){var M=-1,U=w==null?0:w.length;for(this.clear();++M<U;){var Y=w[M];this.set(Y[0],Y[1])}}function Dr(w){var M=-1,U=w==null?0:w.length;for(this.clear();++M<U;){var Y=w[M];this.set(Y[0],Y[1])}}function Tr(w){var M=this.__data__=new nn(w);this.size=M.size}function HA(w,M){var U=da(w),Y=!U&&ua(w),se=!U&&!Y&&Ru(w),De=!U&&!Y&&!se&&yu(w),Ae=U||Y||se||De,tt=Ae?(function($e,rn){for(var ht=-1,Rr=Array($e);++ht<$e;)Rr[ht]=rn(ht);return Rr})(w.length,String):[],dt=tt.length;for(var Te in w)Ae&&(Te=="length"||se&&(Te=="offset"||Te=="parent")||De&&(Te=="buffer"||Te=="byteLength"||Te=="byteOffset")||Du(Te,dt))||tt.push(Te);return tt}function sa(w,M,U){(U!==void 0&&!Do(w[M],U)||U===void 0&&!(M in w))&&aa(w,M,U)}function UA(w,M,U){var Y=w[M];g.call(w,M)&&Do(Y,U)&&(U!==void 0||M in w)||aa(w,M,U)}function So(w,M){for(var U=w.length;U--;)if(Do(w[U][0],M))return U;return-1}function aa(w,M,U){M=="__proto__"&&ue?ue(w,M,{configurable:!0,enumerable:!0,value:U,writable:!0}):w[M]=U}jn.prototype.clear=function(){this.__data__=je?je(null):{},this.size=0},jn.prototype.delete=function(w){var M=this.has(w)&&delete this.__data__[w];return this.size-=M?1:0,M},jn.prototype.get=function(w){var M=this.__data__;if(je){var U=M[w];return U===n?void 0:U}return g.call(M,w)?M[w]:void 0},jn.prototype.has=function(w){var M=this.__data__;return je?M[w]!==void 0:g.call(M,w)},jn.prototype.set=function(w,M){var U=this.__data__;return this.size+=this.has(w)?0:1,U[w]=je&&M===void 0?n:M,this},nn.prototype.clear=function(){this.__data__=[],this.size=0},nn.prototype.delete=function(w){var M=this.__data__,U=So(M,w);return!(U<0||(U==M.length-1?M.pop():_e.call(M,U,1),--this.size,0))},nn.prototype.get=function(w){var M=this.__data__,U=So(M,w);return U<0?void 0:M[U][1]},nn.prototype.has=function(w){return So(this.__data__,w)>-1},nn.prototype.set=function(w,M){var U=this.__data__,Y=So(U,w);return Y<0?(++this.size,U.push([w,M])):U[Y][1]=M,this},Dr.prototype.clear=function(){this.size=0,this.__data__={hash:new jn,map:new(At||nn),string:new jn}},Dr.prototype.delete=function(w){var M=vo(this,w).delete(w);return this.size-=M?1:0,M},Dr.prototype.get=function(w){return vo(this,w).get(w)},Dr.prototype.has=function(w){return vo(this,w).has(w)},Dr.prototype.set=function(w,M){var U=vo(this,w),Y=U.size;return U.set(w,M),this.size+=U.size==Y?0:1,this},Tr.prototype.clear=function(){this.__data__=new nn,this.size=0},Tr.prototype.delete=function(w){var M=this.__data__,U=M.delete(w);return this.size=M.size,U},Tr.prototype.get=function(w){return this.__data__.get(w)},Tr.prototype.has=function(w){return this.__data__.has(w)},Tr.prototype.set=function(w,M){var U=this.__data__;if(U instanceof nn){var Y=U.__data__;if(!At||Y.length<199)return Y.push([w,M]),this.size=++U.size,this;U=this.__data__=new Dr(Y)}return U.set(w,M),this.size=U.size,this};var BA=function(w,M,U){for(var Y=-1,se=Object(w),De=U(w),Ae=De.length;Ae--;){var tt=De[++Y];if(M(se[tt],tt,se)===!1)break}return w};function Oo(w){return w==null?w===void 0?"[object Undefined]":"[object Null]":ae&&ae in Object(w)?(function(M){var U=g.call(M,ae),Y=M[ae];try{M[ae]=void 0;var se=!0}catch(Ae){}var De=C.call(M);return se&&(U?M[ae]=Y:delete M[ae]),De})(w):(function(M){return C.call(M)})(w)}function Ou(w){return ci(w)&&Oo(w)==i}function jA(w){return!(!$n(w)||(function(M){return!!D&&D in M})(w))&&(pa(w)?k:a).test((function(M){if(M!=null){try{return y.call(M)}catch(U){}try{return M+""}catch(U){}}return""})(w))}function $A(w){if(!$n(w))return(function(se){var De=[];if(se!=null)for(var Ae in Object(se))De.push(Ae);return De})(w);var M=Tu(w),U=[];for(var Y in w)(Y!="constructor"||!M&&g.call(w,Y))&&U.push(Y);return U}function vu(w,M,U,Y,se){w!==M&&BA(M,function(De,Ae){if(se||(se=new Tr),$n(De))(function(dt,Te,$e,rn,ht,Rr,ui){var Ht=ca(dt,$e),pt=ca(Te,$e),bu=ui.get(pt);if(bu)sa(dt,$e,bu);else{var wu,gt=Rr?Rr(Ht,pt,$e+"",dt,Te,ui):void 0,di=gt===void 0;if(di){var ma=da(pt),Ea=!ma&&Ru(pt),ku=!ma&&!Ea&&yu(pt);gt=pt,ma||Ea||ku?da(Ht)?gt=Ht:ci(wu=Ht)&&ha(wu)?gt=(function(xe,nt){var rt=-1,Lt=xe.length;for(nt||(nt=Array(Lt));++rt<Lt;)nt[rt]=xe[rt];return nt})(Ht):Ea?(di=!1,gt=pt.slice()):ku?(di=!1,gt=(function(xe){var nt,rt,Lt=(nt=xe.buffer,rt=new nt.constructor(nt.byteLength),new x(rt).set(new x(nt)),rt);return new xe.constructor(Lt,xe.byteOffset,xe.length)})(pt)):gt=[]:(function(xe){if(!ci(xe)||Oo(xe)!=s)return!1;var nt=V(xe);if(nt===null)return!0;var rt=g.call(nt,"constructor")&&nt.constructor;return typeof rt=="function"&&rt instanceof rt&&y.call(rt)==N})(pt)||ua(pt)?(gt=Ht,ua(Ht)?gt=(function(xe){return(function(nt,rt,Lt){var WA=!Lt;Lt||(Lt={});for(var Lu=-1,XA=rt.length;++Lu<XA;){var _a=rt[Lu],To=void 0;To===void 0&&(To=nt[_a]),WA?aa(Lt,_a,To):UA(Lt,_a,To)}return Lt})(xe,Cu(xe))})(Ht):$n(Ht)&&!pa(Ht)||(gt=(function(xe){return typeof xe.constructor!="function"||Tu(xe)?{}:ut(V(xe))})(pt))):di=!1}di&&(ui.set(pt,gt),ht(gt,pt,rn,Rr,ui),ui.delete(pt)),sa(dt,$e,gt)}})(w,M,Ae,U,vu,Y,se);else{var tt=Y?Y(ca(w,Ae),De,Ae+"",w,M,se):void 0;tt===void 0&&(tt=De),sa(w,Ae,tt)}},Cu)}function VA(w,M){return YA((function(U,Y,se){return Y=Be(Y===void 0?U.length-1:Y,0),function(){for(var De=arguments,Ae=-1,tt=Be(De.length-Y,0),dt=Array(tt);++Ae<tt;)dt[Ae]=De[Y+Ae];Ae=-1;for(var Te=Array(Y+1);++Ae<Y;)Te[Ae]=De[Ae];return Te[Y]=se(dt),(function($e,rn,ht){switch(ht.length){case 0:return $e.call(rn);case 1:return $e.call(rn,ht[0]);case 2:return $e.call(rn,ht[0],ht[1]);case 3:return $e.call(rn,ht[0],ht[1],ht[2])}return $e.apply(rn,ht)})(U,this,Te)}})(w,M,Nu),w+"")}var zA=ue?function(w,M){return ue(w,"toString",{configurable:!0,enumerable:!1,value:(U=M,function(){return U}),writable:!0});var U}:Nu;function vo(w,M){var U,Y,se=w.__data__;return((Y=typeof(U=M))=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?U!=="__proto__":U===null)?se[typeof M=="string"?"string":"hash"]:se.map}function la(w,M){var U=(function(Y,se){return Y==null?void 0:Y[se]})(w,M);return jA(U)?U:void 0}function Du(w,M){var U=typeof w;return!!(M=M==null?r:M)&&(U=="number"||U!="symbol"&&l.test(w))&&w>-1&&w%1==0&&w<M}function Tu(w){var M=w&&w.constructor;return w===(typeof M=="function"&&M.prototype||T)}function ca(w,M){if((M!=="constructor"||typeof w[M]!="function")&&M!="__proto__")return w[M]}var YA=(function(w){var M=0,U=0;return function(){var Y=vr(),se=16-(Y-U);if(U=Y,se>0){if(++M>=800)return arguments[0]}else M=0;return w.apply(void 0,arguments)}})(zA);function Do(w,M){return w===M||w!=w&&M!=M}var ua=Ou((function(){return arguments})())?Ou:function(w){return ci(w)&&g.call(w,"callee")&&!z.call(w,"callee")},da=Array.isArray;function ha(w){return w!=null&&Iu(w.length)&&!pa(w)}var Ru=de||function(){return!1};function pa(w){if(!$n(w))return!1;var M=Oo(w);return M==o||M=="[object GeneratorFunction]"||M=="[object AsyncFunction]"||M=="[object Proxy]"}function Iu(w){return typeof w=="number"&&w>-1&&w%1==0&&w<=r}function $n(w){var M=typeof w;return w!=null&&(M=="object"||M=="function")}function ci(w){return w!=null&&typeof w=="object"}var yu=O?(function(w){return function(M){return w(M)}})(O):function(w){return ci(w)&&Iu(w.length)&&!!u[Oo(w)]};function Cu(w){return ha(w)?HA(w):$A(w)}var fa,GA=(fa=function(w,M,U){vu(w,M,U)},VA(function(w,M){var U=-1,Y=M.length,se=Y>1?M[Y-1]:void 0,De=Y>2?M[2]:void 0;for(se=fa.length>3&&typeof se=="function"?(Y--,se):void 0,De&&(function(tt,dt,Te){if(!$n(Te))return!1;var $e=typeof dt;return!!($e=="number"?ha(Te)&&Du(dt,Te.length):$e=="string"&&dt in Te)&&Do(Te[dt],tt)})(M[0],M[1],De)&&(se=Y<3?void 0:se,Y=1),w=Object(w);++U<Y;){var Ae=M[U];Ae&&fa(w,Ae,U,se)}return w}));function Nu(w){return w}t.exports=GA})(fl,fl.exports)),fl.exports);const ER=zs(mR);class _R{constructor(e,n,r,i){this.backendRestClient=new fR(e,n,r,i)}async getApp(e){return(function(n){const r=(function(s,a){const l={general:{enableFileTransfers:a.includes("file_sharing"),enableLocation:a.includes("location_sharing"),enableMentions:!1,showTypingIndicators:!0,enablePresence:!1,enableVoiceRecording:!1},theme:{version:"v2",name:"default"},permissions:{messages:{delete:"own",edit:"own",reply:"all",emojiReactions:"all"},messagesCustom:{},conversations:{leave:"none",markAsUnread:"none"},conversationsCustom:{}},generalNotificationSettings:{timeout:"15"},emailSettings:{enabled:!0,subject:"{{sender.name}} wants to chat with you on {{app.name}}",replySeparator:"--- Write ABOVE THIS LINE to post a reply via email ---",unsubscribeText:"Unsubscribe from all chat emails",senderName:"{{sender.name}} (via {{app.name}})",header:`Hi {{recipient.name}},
|
|
1334
|
+
`,cf=typeof self!="undefined"&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",RA],{type:"text/javascript;charset=utf-8"});function $T(t){let e;try{if(e=cf&&(self.URL||self.webkitURL).createObjectURL(cf),!e)throw"";const n=new Worker(e,{type:"module",name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(RA),{type:"module",name:t==null?void 0:t.name})}}const hl="audio/webm;codecs=opus",VT=typeof MediaRecorder!="undefined"&&typeof MediaRecorder.isTypeSupported=="function";function zT(t){const e=X(),n=X(),r=X(),i=X(!1),o=t.mediaRecorder;G(()=>{t.recordingState==="recording"?s():o.current&&t.recordingState===null&&(i.current=!0,o.current.stop())},[t.recordingState]);const s=async()=>{var l;n.current=gu.create({scrollingWaveform:!0,scrollingWaveformWindow:10}),e.current=DA({...t.wavesurferOptions,interact:!1,barHeight:(l=t.wavesurferOptions.barHeight)!=null?l:4,plugins:[n.current],container:t.wavesurferContainer.current});const a=await n.current.startMic();a.getAudioTracks().forEach(u=>{u.onmute=()=>t.onStopRecording()}),VT&&MediaRecorder.isTypeSupported(hl)?o.current=new MediaRecorder(a,{mimeType:hl}):o.current=new jT(a,{mimeType:hl},{encoderWorkerFactory:()=>new $T,WebMOpusEncoderWasmPath:M_["opus-media-recorder-wasm"]}),o.current.onerror=u=>{Ie.error("[TalkJS] Unexpected error while recording audio: ",u)},o.current.onstart=()=>r.current=Date.now(),o.current.ondataavailable=u=>{var c;if(!i.current){const d=Date.now(),h=Math.floor((d-r.current)/1e3),f=new File([u.data],`talkjs_audio_message_${d}_${h}.webm`,{type:"audio/webm"});t.onSendRecording(f,h)}i.current=!1,o.current=void 0,(c=n.current)==null||c.stopMic(),e.current=void 0,n.current=void 0},o.current.start()};return null}function yA(t){const e=et(),n=oe(),r=tn(),i=J(n.referencedMessage$),o=J(n.state$.userPermissions),s=lo(),{sendMessage:a}=Wg(),{voiceRecorder:l,recordVoiceMessage:u,voiceRecorderControlsProps:c}=(function(){const f=oe(),p=Ar(),m=lt({...ul}),{state:E,duration:_,recordingUrl:A,uploadState:O,fileToken:S}=J(m),v=X(void 0),T=X(null),R=X(),I=fA("microphone",async k=>{const b=f.state$.currentConversation.peek();if(b&&b.access!=="Read"){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(L=>L.stop()),k("granted")}catch(L){throw k("denied"),L}m.assign({state:"recording",duration:0}),R.current=setInterval(()=>{m.duration.set(L=>L+1)},1e3)}},[m,f]),g=q(()=>{var k;R.current&&(clearInterval(R.current),R.current=void 0),(k=v.current)==null||k.stop()},[]),D=q(()=>{R.current&&(clearInterval(R.current),R.current=void 0),m.assign(ul)},[m]),C=q((k,b)=>{const L=URL.createObjectURL(new Blob([k])),x=k.size+","+k.name;f.state$.localFileBlobUrls.child(f.state$.currentConversationId.peek()).child(x).set({url:L,fetching:!1});const P={duration:b,filename:k.name};f.latestFileUpload={type:"voice",file:k,metadata:P,temporaryBlobUrl:L},m.assign({state:"previewing",uploadState:"pending",recordingUrl:L+"?name="+k.name}),p.uploadVoice(k,P).then(B=>{m.assign({uploadState:"done",fileToken:B})})},[p,m,f]),N=q(()=>{S&&p.sendFileMessage({fileToken:S}),m.assign(ul)},[p,S,m]);return{voiceRecorder:te(()=>{if(!E)return;const k={state:E,duration:_,recordingUrl:A,uploadState:O,stop:g,cancel:D,send:N};return mA.set(k,T),k},[E,_,A,O,g,D,N]),recordVoiceMessage:I,voiceRecorderControlsProps:te(()=>({onStopRecording:g,onSendRecording:C,recordingState:E,mediaRecorder:v,wavesurferOptions:bT,wavesurferContainer:T}),[g,C,E])}})(),d=J(lt(()=>{const f=s.state$.get();return t.editMessageId===void 0?new wd(f,a,t.attachFile,t.shareLocation,s.toggleEmojiPicker,u):new wd(f,t.onEditMessage,()=>{},()=>{},()=>{},()=>{})},[s.state$,s.toggleEmojiPicker,t.attachFile,t.editMessageId,t.onEditMessage,t.shareLocation,a])),h=q(f=>s.setText(f),[s]);return(function({appId:f,conversationId:p,meId:m,setText:E,enabled:_}){const A=te(()=>T_(p,m,f),[f,p,m]);G(()=>{var S;if(!A||!_)return;const O=(S=JSON.parse(ot.getItem(Zl)||"{}")[A])!=null?S:"";E(O)},[A,_,E])})({appId:r.app.id,conversationId:r.conversation.id,meId:r.currentUser.id,setText:h,enabled:!t.editMessageId}),y(Vm.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:f=>s.selectEmoji(f)},children:[y(zT,{...c}),y(e.MessageField,{common:r,referencedMessage:i,permissions:o,editor:d,voiceRecorder:l,editMessageId:t.editMessageId})]})}function YT({message:t}){const e=oe(),n=Ar(),r=J(e.state$.editingMessageId),i=te(()=>Bt(t.content[0].children),[t]),o=lt({isEmpty:i.length===0,atTextLimit:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=te(()=>new D_(o,e.device$,e.state$.userPermissions),[o,e]),a=q(async()=>{const l=s.state$;if(l.isEmpty.peek()||l.atTextLimit.peek())return;const u=s.getText();u&&await n.editMessage(t.id,{text:u}),e.state$.editingMessageId.set(null)},[e,n,s,t.id]);return G(()=>{s.onEnter=a},[s,a]),G(()=>{s.focus(),s.setText(Bt(t.content[0].children,!0))},[s,t]),y(Fm.Provider,{value:s,children:y(yA,{editMessageId:r,onEditMessage:a})})}function GT(t){const e=et(),n=tn();return y(e.MessageDivider,{common:n,...t})}function WT({message:t}){const e=et(),n=oe(),r=J(()=>n.messagePermissions$(t)),i=tn(),[o,s]=ne("sent");return $i(a=>{if(t.id.startsWith("ephemeral-"))return s("sending");const l=n.state$.currentConversation.everyoneReadUntil.get();return l!==void 0?t.createdAt<=l?s("everyoneRead"):s("sent"):void 0}),y(e.Message,{common:i,message:t,messageStatus:o,permissions:r})}function XT(){const t=et(),e=tn();return y(t.BeforeMessages,{common:e})}function KT(){const t=et(),e=tn();return y(t.AfterMessages,{common:e})}function qT(t){const e=oe(),n=si();G(()=>(function(r,i,o){const s=r.state$.currentConversation;let a=!1;function l(){if(!a){const E=r.state$.currentConversationId.peek();ie.defined(E),i.conversation(E).markAsRead()}}function u(){r.newMessageMarker$.peek()||r.newMessageMarker$.set(s.readUntil.peek())}function c(){s.isUnread.get()&&s.unreadMessageCount.peek()===0&&(a=!0,u())}let d=null;function h(){var S;const E=r.state$.currentConversation.lastMessage.id.get(),_=r.state$.currentConversationId.peek(),A=_!==d;if(d=_,A&&(f.stop(),a=!1,r.newMessageMarker$.set(void 0)),!E||!_)return;s.isUnread.peek()&&(o()?(A&&u(),l()):(u(),f.start())),((S=s.lastMessage.sender)==null?void 0:S.id.peek())===r.extUserId$.peek()&&(r.newMessageMarker$.set(void 0),a=!1)}const f={handle:void 0,start(){this.handle||(this.handle=setInterval(()=>this.tick(),2e3))},tick(){o()&&(l(),this.stop())},stop(){clearInterval(this.handle),this.handle=void 0}};window.__talkjsE2E&&(window.__talkjsE2E.foregroundCheck=()=>{ie.defined(f.handle),f.tick()});const p=mt(c),m=mt(h);return()=>{r.newMessageMarker$.set(void 0),p(),m(),f.stop()}})(e,n,t),[e,n,t])}function JT({conversationId:t}){const e=oe(),n=Ar(),r=X(!0),i=X(null),o=J(()=>!!e.state$.messages.child(t).loadedAll.get());G(()=>n.setScrollableDiv(i),[n]),qT(q(()=>{if(!i.current)return!1;const a=!document.hidden,l=(function(d){if(d.checkVisibility)return d.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0,checkOpacity:!0,checkVisibilityCSS:!0});{const h=window.getComputedStyle(d),f=h.visibility,p=h.opacity;return!(d.getClientRects().length===0||f==="hidden"||p==="0")}})(i.current),u=i.current.getBoundingClientRect(),c=u.top<window.innerHeight&&u.bottom>0&&u.left<window.innerWidth&&u.right>0;return a&&l&&c},[])),Xe(()=>{r.current=i.current.scrollTop>-30}),G(()=>{r.current&&(i.current.scrollTop=0)});const s=q(a=>{const l=a.currentTarget,u=l.scrollHeight-l.clientHeight+l.scrollTop,c=e.messageSubscriptions[t];u<90&&c&&c.loadMore(10)},[e.messageSubscriptions,t]);return y("div",{className:"t-message-list",ref:i,"t-menu-boundary":"",onScroll:s,children:[y(KT,{}),y(ji,{each:e.chatItems$,children:a=>y("div",{className:"t-message-group","t-group-type":a.type.get(),children:y(ji,{each:a.items,item:ZT,itemProps:{controller:n,conversationId:t}})},a.id.get())}),o&&y(XT,{})]})}function ZT({item$:t}){const e=oe(),n=J(t),r=J(e.state$.editingMessageId);return n instanceof Yo?y(GT,{timestamp:n.timestamp,isReadMarker:n.isReadMarker,isDayMarker:n.isDayMarker}):r===n.id?y(YT,{message:n}):y(WT,{message:n})}const QT=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function oa({appId:t,chatboxState:e}){const n=t.charAt(0)==="t"||QT.has(t);return G(()=>{switch(e.type){case"auth-failed":Ie.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":Ie.error(`User \`${e.userId}\` not found. Please verify that you synchronized this user's data with TalkJS, either using the JS SDK or through the REST API.`);break;case"unexpected-error":Ie.error(e.error);break;case"wrong-app-id":Ie.error(`Could not find given appId: "${e.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:ie.never(e)}},[e]),y("div",{className:"t-panel t-error-panel",children:[y("span",{className:"t-heading",children:"Something went wrong"}),y("p",{children:"Please reload the page and try again."}),n?y(De,{children:[y("p",{children:"Developer note: check your browser's developer tools console for messages that may help solve the problem."}),y("p",{children:"This message only shows up in test mode."})]}):y("p",{children:"If things keep not working, do not hesitate to get in touch with us."})]})}function eR(){return y("div",{className:"t-panel t-error-panel",children:y("span",{className:"t-heading",children:J(oe().t$).CHAT_NOT_FOUND})})}function IA(){return y("div",{className:"t-panel t-loading-panel",children:y(cu,{})})}function CA(){const t=J(oe().t$);return y("div",{className:"t-panel t-error-panel",children:[y("span",{className:"t-heading",children:t.AUTH_EXPIRED_OVERLAY_TITLE}),y("p",{children:t.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}function tR({onClose:t}){const e=oe(),n=Ar(),r=si(),[i,o]=ne(null),s=q(async l=>{try{if(l||(l=(await new Promise(m=>{const E=document.createElement("input");E.type="file",E.multiple=!1,E.addEventListener("change",()=>{m([...E.files])}),E.addEventListener("cancel",()=>{m([])}),E.click()}))[0]),!l)return;const{uploadPromise:u,upload:c}=await(async function(m,E){const _=m.name;if((function(v){return/\.(mp4|ts|mov|webm|ogv)$/i.test(v)})(m.name)){const v=await pl("video",m,I=>({width:I.videoWidth,height:I.videoHeight,duration:I.duration,filename:_})),T=E.uploadVideo(m,v),R=(function(I){switch(I.name.split(".").pop()){case"ts":return"video/MP2T";case"mov":return"video/quicktime";case"webm":return"video/webm";case"ogv":return"video/ogg";default:return"video/mp4"}})(m);return{uploadPromise:T,upload:{type:"video",file:m,metadata:v,temporaryBlobUrl:URL.createObjectURL(new Blob([m],{type:R}))}}}if((function(v){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(v)})(m.name)){const v=await pl("audio",m,T=>({duration:T.duration,filename:_}));return{uploadPromise:E.uploadAudio(m,v),upload:{type:"audio",file:m,metadata:v,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}if((function(v){return/(gif|png|jpg|jpeg|svg|bmp|webp)$/i.test(v)})(m.name)){const v=await pl("img",m,T=>({width:T.naturalWidth,height:T.naturalHeight,filename:_}));return{uploadPromise:E.uploadImage(m,v),upload:{type:"image",file:m,metadata:v,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}const A={filename:_},O=E.uploadFile(m,A),S=URL.createObjectURL(new Blob([m]));return{uploadPromise:O,upload:{type:"file",file:m,metadata:A,temporaryBlobUrl:S}}})(l,r),d=c.file.size+","+c.file.name;e.state$.localFileBlobUrls.child(e.state$.currentConversationId.peek()).child(d).set({url:c.temporaryBlobUrl,fetching:!1}),e.latestFileUpload=c;const h=eo(),f={upload:c,closePreview:h.resolve,uploaded:!1,errored:!1};let p;o(f);try{p=await uf(u,h.promise),o({...f,uploaded:!0})}catch(m){if(m===hc)return;Ie.warn("File upload failed",m.toString()),o(E=>({...E,errored:!0}))}if(await h.promise==="cancel")return;ie.defined(p),n.sendFileMessage({fileToken:p})}finally{t(),o(null)}},[n,r,o,e,t]),a=fA("geolocation",async l=>{try{const u=eo(),c={upload:{type:"location",location:void 0},uploaded:!1,closePreview:u.resolve,errored:!1};o(c);const{permissionResult:d,location:h}=await uf(new Promise(f=>{navigator.geolocation.getCurrentPosition(p=>{const m={latitude:p.coords.latitude,longitude:p.coords.longitude};f({permissionResult:"granted",location:m})},p=>{p.code===1?f({permissionResult:"denied"}):f({permissionResult:"granted"})})}),u.promise);if(l(d),!h||(o({...c,upload:{type:"location",location:h},uploaded:!0}),await u.promise==="cancel"))return;n.sendLocationMessage({location:h})}catch(u){if(u===hc)return;throw u}finally{t(),o(null)}},[n,o,t]);return{attachFile:s,shareLocation:a,uploadState:i}}const hc=Symbol("cancelled");function uf(t,e){return Promise.race([t,e.then(()=>Promise.reject(hc))])}async function pl(t,e,n){const r=document.createElement(t);try{return r.src=URL.createObjectURL(e),await new Promise((i,o)=>{const s=t==="img"?"load":"loadedmetadata";r.addEventListener(s,()=>{try{i(n(r))}catch(a){o(a)}},{once:!0})})}finally{URL.revokeObjectURL(r.src)}}function NA({children:t,className:e,...n}){return y("div",{className:"t-attach-overlay "+e,...n,children:t})}function nR({uploadState:t}){const{uploaded:e,errored:n}=t;mo(()=>t.closePreview("cancel"),".t-upload-preview");const r=X(null);G(()=>{e&&r.current.focus()},[e]);const i=J(oe().t$);return y(NA,{className:"t-upload-preview",children:y("div",{className:"t-preview",children:[!n&&y(rR,{upload:t.upload,uploaded:e}),n&&y("div",{className:"t-error-row",children:i.UPLOAD_ERROR}),y("div",{className:"t-send-row",children:[y("button",{className:"t-cancel",onClick:()=>t.closePreview("cancel"),children:i.CANCEL}),!n&&e&&y("button",{className:"t-confirm-send test__confirm-upload-button",onClick:()=>t.closePreview("send"),ref:r,children:i.SEND_BUTTON_TEXT})]})]})})}function rR({upload:t,uploaded:e}){const n=J(oe().t$);return t.type!=="location"?y(De,{children:[y(oR,{upload:t}),y(sR,{upload:t,uploaded:e,t:n})]}):e?y(iR,{location:t.location}):y("div",{className:"t-loading",children:y(cu,{})})}function iR({location:t}){const{imageUrl:e,linkUrl:n}=Au(t);return y("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${JSON.stringify(e)}) center center / cover no-repeat`}})}const oR=mn(function({upload:t}){let e=null;const n=t.file;if(t.type==="video"){const r=/[.]ts/i.test(n.name)?"mpegts":"native";e=y("div",{className:"video-container",children:y(aR,{src:t.temporaryBlobUrl,videoType:r,playsInline:!0,controls:!0,preload:"auto"})})}else t.type==="image"?e=y("div",{className:"t-img-container",children:y("img",{src:t.temporaryBlobUrl})}):t.type==="audio"&&(e=y(go,{src:t.temporaryBlobUrl,filename:n.name}));return e}),sR=mn(function({uploaded:t,upload:e,t:n}){let r;r=t?e.metadata.filename:n.UPLOAD_IN_PROGRESS;let i="",o="";return e.type==="file"&&(i="is-file",t&&(o="file-block")),y("div",{className:`t-filename-row ${i}`,children:y("div",{className:o,children:r})})});function aR(t){const{videoType:e,...n}=t;return y("video",{...n})}function lR(){var s;const t=et(),e=oe(),n=tn(),r=(s=J(()=>e.state$.isUserConnected.child(e.state$.currentConversationId.get())))!=null?s:{},i=J(e.state$.userPermissions),o=J(e.searchQuery$);return y(t.ChatHeader,{common:n,isUserConnected:r,permissions:i,searchQuery:o})}function cR(){const t=et(),e=tn();return y(t.MessageListHeader,{common:e})}function uR(){const t=et(),e=tn();return y(t.MessageListFooter,{common:e})}function dR(){const t=et(),e=tn();return y(t.NoConversationSelected,{common:e})}function bA({containerRef:t}){const[e,n]=ne(null),[r,i]=ne(null),[o,s]=ne(!1);G(()=>{const d=t.current;let h=null;const f=p=>{if(p.pointerType!=="mouse")return;h&&(clearTimeout(h),h=null);const m=p.target.closest("[t-tooltip-text]");m&&(h=setTimeout(()=>{h=null,n(m),s(!1)},500))};return d==null||d.addEventListener("pointerover",f),()=>{d==null||d.removeEventListener("pointerover",f)}},[t]),G(()=>{const d=t.current;let h,f=!1;function p(_){f=!1,_.pointerType!=="mouse"&&(h=setTimeout(()=>{const A=_.target.closest("[t-tooltip-text]");A&&(f=!0,n(A),s(!0))},300))}function m(){clearTimeout(h)}function E(_){f&&(_.stopPropagation(),_.preventDefault())}return d.addEventListener("pointerdown",p),d.addEventListener("pointerup",m),d.addEventListener("pointerleave",m),d.addEventListener("click",E,!0),d.addEventListener("contextmenu",E,!0),()=>{d.removeEventListener("pointerdown",p),d.removeEventListener("pointerup",m),d.removeEventListener("pointerleave",m),d.removeEventListener("click",E,!0),d.removeEventListener("contextmenu",E,!0)}},[t]);const{refs:a,floatingStyles:l}=Q_({placement:"top",middleware:[eA(),o&&(u=10,{...ZD(u),options:[u,c]})],whileElementsMounted:J_});var u,c;return G(()=>{if(e){a.setReference(e);const d=()=>{const p=e.getAttribute("t-tooltip-text");p===null?f():i(p.trim())},h=new MutationObserver(d);h.observe(e,{attributes:!0}),d();const f=()=>{o?setTimeout(()=>n(null),1e3):n(null)};return e.addEventListener("pointerleave",f),()=>{e.removeEventListener("pointerleave",f),h.disconnect(),a.setReference(null),i(null)}}},[e,o,a]),r?y("div",{className:"t-tooltip",role:"tooltip",style:l,ref:a.setFloating,children:r}):null}function hR({appId:t,chatHeaderVisible:e,messageFieldVisible:n}){const r=lo(),i=(function(){const E=oe(),_=lt(()=>{const S=E.errors$.get(),v=E.authTokenState$.get(),T=E.state$.loadingConversationId.get(),R=E.state$.currentConversationId.get();return S.serverError?"server-error":S.wrongAppId?"wrong-app-id":v==="loading"||v==="idle"?"loading-token":v==="invalid"?"invalid-token":v==="expired"?"expired-token":v==="valid"?S.unknownUser?"unknown-user":T&&E.state$.unknownConversations.child(T).get()?"loading-conv-failed":E.canRenderUi(T)||R!==T&&E.canRenderUi(R)?"loaded":"loading-data":void ie.unreachable()}),A=lt({type:"loading"});$i(S=>{const v=_.get(),T=E.state$.currentConversationId.get(),R=E.extUserId$.get(),I=E.appId$.get();function g(D){A.set({type:"loading"});const C=setTimeout(()=>{A.set(D)},5e3);return()=>clearTimeout(C)}switch(v){case"invalid-token":A.set({type:"auth-failed"});break;case"expired-token":A.set({type:"expired-token"});break;case"wrong-app-id":A.set({type:"wrong-app-id",appId:I});break;case"server-error":A.set({type:"server-error"});break;case"loading-data":case"loading-token":A.set({type:"loading"});break;case"loaded":A.set({type:"loaded",conversationId:T,userId:R});break;case"loading-conv-failed":S.onCleanup=g({type:"inaccessible-conversation",userId:R,conversationId:T});break;case"unknown-user":S.onCleanup=g({type:"unknown-user",userId:R});break;default:ie.never(v)}});const O=lt({type:"loading"});return $i(S=>{if(A.type.get()==="loading"){O.set({type:"invisible-loading"});const v=setTimeout(()=>{O.set({type:"loading"})},1e3);S.onCleanup=()=>{clearTimeout(v)}}else O.set(A.get())}),J(O)})(),{attachFile:o,shareLocation:s,uploadState:a}=tR({onClose:()=>r.focus()});G(()=>{r.uploadFile=o},[r,o]);const[l,u]=ne(!1),c=oe(),d=J(()=>c.app$.get()?c.state$.userPermissions.canShareFile.get():void 0);G(()=>{i.type==="loaded"?c.renderedConversationId$.set(i.conversationId):c.renderedConversationId$.set(void 0)},[i,c]);const h=q(E=>{o(E.dataTransfer.files[0]),E.preventDefault(),u(!1)},[o]),f=q(E=>{E.preventDefault(),u(!0)},[]),p=q(E=>{E.preventDefault(),u(!1)},[]),m=X(null);return uu(),i.type==="invisible-loading"?y(De,{}):i.type==="loading"?y(IA,{}):i.type==="inaccessible-conversation"?y(eR,{}):i.type==="unknown-user"||i.type==="auth-failed"||i.type==="wrong-app-id"||i.type==="server-error"||i.type==="unexpected-error"?y(oa,{appId:t,chatboxState:i}):i.type=="expired-token"?y(CA,{}):i.type==="loaded"?i.conversationId===null?y(dR,{}):y("div",{className:"t-chatbox-content",onDragOver:d?f:void 0,onDragLeave:d?p:void 0,onDrop:d?h:void 0,"t-menu-boundary":"root",ref:m,children:[e&&y(lR,{}),y(cR,{}),y(JT,{conversationId:i.conversationId}),y(uR,{}),n&&y(yA,{attachFile:o,shareLocation:s}),a&&y(nR,{uploadState:a}),l&&y(NA,{className:"t-drop-overlay",children:y(re,{type:"attachment"})}),y(bA,{containerRef:m})]}):y(De,{})}const jo=new Uint8Array(31);function wA(){if(globalThis.crypto!==void 0)crypto.getRandomValues(jo);else for(let e=0;e<jo.length;e++)jo[e]=Math.floor(256*Math.random());let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^jo[t++]&15>>+e/4).toString(16))}class pR{constructor(e,n,r,i,o,s,a,l){this.store=e,this.talkSession=n,this.editorInternals=r,this.onSendMessage=i,this.onDeleteMessage=o,this.onMessageAction=s,this.onFocusMessage=a,this.onBackButtonClick=l,this.loadMoreUntil=async u=>{const c=this.store.state$.currentConversationId.peek(),d=this.store.state$.messages.child(c).loadedAll;let h;do{const f=this.store.messageSubscriptions[c];f&&!d.peek()&&await f.loadMore(30),h=u()}while(!d.peek()&&!h);return h}}setScrollableDiv(e){this.scrollable=e}toggleSearchBox(e){if(this.store.state$.userPermissions.canSearch.peek())if(e!==void 0)this.store.chatSearchState$.set(e?"visible":"hidden");else{const n=this.store.chatSearchState$.peek();this.store.chatSearchState$.set(n==="hidden"?"visible":"hidden")}else Ie.error("In-conversation message search is only available to customers on Growth plan and above.")}async deleteMessage(e){const n=this.store.state$.currentConversation.peek();if(!n||n.access==="Read")return;const r=n.id,i=this.store.state$.messages.child(r).lookup.child(e).peek(),o=this.talkSession.conversation(r).message(e),[s]=await Promise.all([i!=null?i:o.get(),o.delete()]);if(s){const a={currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek(),message:i};this.onDeleteMessage(a)}}setEditing(e){const n=this.store.state$.currentConversation.peek();n&&n.access!=="Read"&&this.store.state$.editingMessageId.set(e)}async editMessage(e,n){const r=this.store.state$.currentConversation.peek();if(!r||r.access==="Read")return;const i=r.id;await this.talkSession.conversation(i).message(e).edit(n)}setReferencedMessage(e){const n=this.store.state$.currentConversation.peek();n&&n.access!=="Read"&&(this.store.state$.referencedMessageId.set(e),setTimeout(()=>this.editorInternals.focus({skipProseMirrorStuff:!0}),100))}async focusMessage(e,n=!0){var a;if(e==null)return this.store.focusedMessage$.set(null),null;if(await Bs(()=>this.store.state$.loadingConversationId.get()===this.store.renderedConversationId$.get()),this.store.state$.currentConversationId.peek()===null)return Ie.error("Cannot focus message because current conversation is `null`."),null;const r=()=>{const l=this.store.state$.currentConversationId.peek();return this.store.state$.messages.child(l).lookup.child(e).peek()||null};let i=r();if(i||(i=await this.loadMoreUntil(r)),!i)return Ie.error(`Message with id: \`${e}\` could not be found in this conversation`),i;const o=(a=this.scrollable)==null?void 0:a.current;ie.defined(o);const s=o.querySelector(`[t-message-id="${e}"]`);return s?this.scrollToAndHighlight(s,i,n):Ie.error(`Could not find HTMLElement with attribute: t-message-id="${e}"`),i}async jumpToHighlight(e){if(!this.store.state$.userPermissions.canSearch.peek())return Ie.error("In-conversation message search is only available to customers on Growth plan and above."),null;if(this.store.highlightedStrings$.peek().length===0||this.store.chatSearchState$.peek()==="searching")return null;let n=this.findHighlight(e);return n||e!=="up"||(this.store.chatSearchState$.set("searching"),n=await this.loadMoreUntil(()=>this.findHighlight("up"))),n}findHighlight(e){var u;const n=(u=this.scrollable)==null?void 0:u.current;ie.defined(n);const r=[],i=Array.from(n.querySelectorAll("[t-message-id]")),o=this.store.state$.currentConversationId.peek(),s=this.store.state$.messages.child(o).state.peek();if(i.length===0&&s.length!==0)return Ie.error("Could not find HTMLElements with the attribute: t-message-id. This attribute is required for In-Conversation search to work."),null;let a;if(Array.from(n.getElementsByClassName("t-highlighted-text")).forEach(c=>{const d=i.findIndex(p=>p.contains(c));if(d===-1)return;const h=i.splice(d,1)[0],f=h.getAttribute("t-message-id");r.push([f,h])}),e==="up"){const c=n.getBoundingClientRect().top;a=r.find(([d,h])=>h.getBoundingClientRect().top-c<-5)}else{const c=.05*n.getBoundingClientRect().height,d=n.getBoundingClientRect().bottom;for(let h=r.length-1;h>=0;h--){const f=r[h],[p,m]=f;if(d-m.getBoundingClientRect().top<=c){a=f;break}}}const l=this.store.chatSearchState$;if(a){const[c,d]=a,h=this.store.state$.messages.child(o).lookup.child(c).peek();return this.scrollToAndHighlight(d,h),l.set("visible"),h}return r.length===0?l.set("noResults"):l.set("noMoreResults"),null}scrollToAndHighlight(e,n,r=!0){const i=this.scrollable.current.getBoundingClientRect(),o=e.getBoundingClientRect();let s="start";Math.sign(i.top-o.top)===-1&&o.height<i.height&&(s="end"),e instanceof HTMLElement&&(e.style.scrollSnapAlign=s),e.scrollIntoView({behavior:"instant"}),e instanceof HTMLElement&&(e.style.scrollSnapAlign="none"),this.store.focusedMessage$.set(n),r&&this.onFocusMessage({message:n})}setHighlightedStrings(e){this.store.state$.userPermissions.canSearch.peek()?this.store.highlightedStrings$.set(e):Ie.error("In-conversation message search and by extension highlighting of strings are only available to customers on Growth plan and above.")}setSearchQuery(e){this.store.setSearchQuery(e)}async sendMessage(e){const n=this.store.state$.currentConversationId.peek();if(!n)return;const r=await(async function(s,a){var m,E,_,A,O;const l=s.state$.currentConversationId.peek(),u=s.state$.messages.child(l),c=typeof a.referencedMessage=="string"?u.lookup.child(a.referencedMessage).peek():await((E=(m=a.referencedMessage)==null?void 0:m.get())!=null?E:null),d=c&&{...c,type:"UserMessage",sender:c.sender,referencedMessageId:(A=(_=c.referencedMessage)==null?void 0:_.id)!=null?A:null};d&&delete d.referencedMessage;const h=s.latestFileUpload,f="content"in a?[df(h,a.content[0])]:[fR(a.text)],p="text"in a?a.text:_A(a.content.map(S=>df(h,S)),{});return{id:"ephemeral-"+wA(),type:"UserMessage",sender:s.currentUser$.peek(),createdAt:Date.now(),editedAt:null,custom:(O=a.custom)!=null?O:{},origin:"web",referencedMessage:d,reactions:[],content:f,plaintext:p}})(this.store,e);this.store.state$.ephemeralMessages.child(n).child(r.id).set(r);const i=eo();this.store.readyForNewMessagesPromise=i.promise;const o=await this.talkSession.conversation(n).send(e);this.store.state$.ephemeralMessageIdMapping.child(n).child(o.id).set(r.id),i.resolve(),this.onSendMessage({message:await o.get(),currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek()})}sendFileMessage(e){const n={type:"file",fileToken:e.fileToken};return this.sendMessage({content:[n],custom:e.custom})}async uploadVoice(e,n){return await this.talkSession.uploadVoice(e,n)}sendLocationMessage(e){const n={type:"location",latitude:e.location.latitude,longitude:e.location.longitude};return this.sendMessage({content:[n],custom:e.custom})}markAsTyping(){const e=this.store.state$.currentConversationId.peek();e&&this.talkSession.conversation(e).markAsTyping()}async toggleReaction(e,n,r){typeof n!="string"&&(n=n.emoji);const i=this.store.state$.currentConversationId.peek();if(!i)return;const o=this.store.state$.messages.child(i).lookup.child(e).peek().reactions.find(a=>a.emoji===n),s=this._getReactionRef(e,n);o!=null&&o.currentUserReacted&&r!==!0?await s.remove():r!==!1&&await s.add()}async addReaction(e,n){this.store.state$.currentConversationId.peek()&&await this._getReactionRef(e,n).add()}triggerMessageAction(e,n,r){const i=this.store.state$.currentConversation.peek();i&&(typeof e=="string"&&(e=this.store.state$.messages.child(i.id).lookup.child(e).peek()),this.onMessageAction({action:n,params:r,message:e,conversation:i}))}clickBackButton(){const e=this.store.currentUser$.peek();ie.defined(e),this.onBackButtonClick({currentUser:e})}storeDraft(e){const n=this.store.state$.currentConversationId.peek(),r=this.store.currentUser$.peek(),i=this.store.appId$.peek();n&&r&&i&&Av(n,r.id,i,e)}_getReactionRef(e,n){const r=this.store.state$.currentConversationId.peek();return this.talkSession.conversation(r).message(e).reaction(n)}}const fR=t=>({type:"text",children:A_(t)});function df(t,e){switch(e.type){case"text":case"location":return e;case"file":return(function(n,r){return{type:"file",subtype:n.type==="file"?void 0:n.type,...n.metadata,size:n.file.size,filename:n.file.name,fileToken:r.fileToken,url:n.temporaryBlobUrl}})(t,e)}}class fl extends Error{constructor(e,n){const r=(function(i){if(typeof i=="string")return i;if(Array.isArray(i))return i.join(`
|
|
1335
|
+
`);try{return JSON.stringify(i)}catch(o){return String(i)}})(e);super(r),this.userMessage=n!=null?n:r,Object.setPrototypeOf&&Object.setPrototypeOf(this,new.target.prototype)}}const no=console;class mR{constructor(e,n,r,i){this.apiUrls=e,this.appId=n,this.sessionId=r,this.authProvider=i,this._lastPutPromise=Promise.resolve()}async get(e,n={}){const r=this.endpointUrl(e,n),i=await Ai(()=>this.fetchWithReauth(r),{retries:11});return await this.handleResponse(i,r)}async queuedPut(e,n){await this._lastPutPromise;const r=Ai(()=>this._doPut(e,n));return this._lastPutPromise=r,r}put(e,n,r){const i=()=>this._doPut(e,n);return r?hf(i,r):Ai(i,{retries:5})}post(e,n,r){const i=()=>this._doPost(e,n);return r?hf(i,r):Ai(i,{retries:5})}delete(e,n={}){return Ai(()=>this._doDelete(e,n),{retries:11})}endpointUrl(e,n={}){const r=new URL(this.apiUrls.internalHttpApiUrl);r.pathname+=`/${this.appId}/${e}`,r.searchParams.set("sessionId",this.sessionId);for(const[i,o]of Object.entries(n))r.searchParams.set(i,o);return r}async _doPut(e,n){const r=this.endpointUrl(e),i=await this.fetchWithReauth(r,{method:"PUT",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doPost(e,n){const r=this.endpointUrl(e),i=await this.fetchWithReauth(r,{method:"POST",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doDelete(e,n){const r=this.endpointUrl(e,n),i=await this.fetchWithReauth(r,{method:"DELETE"});return await this.handleResponse(i,r)}async handleResponse(e,n){if(e.status>=300){if(e.status===404)throw bl.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new fl("Could not find app.",`Could not find given appId: "${this.appId}". You can find your appId on https://talkjs.com/dashboard.`);if(e.status===401){const r=await this.authProvider.getToken();throw bl.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${n} with token ${r}.`),new fl("User not authenticated.","Could not authenticate user. Check if your signature is calculated correctly.")}if(e.status>=300&&e.status<500){const{error:r}=await e.json();throw new fl(r)}{const r=await e.text();throw new Error(`Got non-success response (${r}) from the server for url: ${n}.`)}}return await e.json()}async fetchWithReauth(e,n){function r(s){const a={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${s}`};return fetch(e,{...n,headers:a})}const i=await this.authProvider.getToken(),o=await r(i);return o.status!==401?o:(no.error(`401 error from ${n==null?void 0:n.method} ${e}, ${i}`),this.authProvider.refreshToken(),r(await this.authProvider.getToken()))}}function kA(t){return!t.userMessage}function Ai(t,{retries:e=30}={}){return _u(e,t,{shouldRetry:kA,log:no.warn.bind(no),maxDelay:30,initialDelay:.2})}async function hf(t,e){try{return await t()}catch(r){if(!kA(r))throw r}let n=!1;return e.then(()=>{n=!0}),_u(1e3,t,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!n,log:no.warn.bind(no)})}var pf,ml={exports:{}},ER=(pf||(pf=1,(function(t,e){var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",s="[object Object]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[o]=u["[object Map]"]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var c,d=typeof No=="object"&&No&&No.Object===Object&&No,h=typeof self=="object"&&self&&self.Object===Object&&self,f=d||h||Function("return this")(),p=e&&!e.nodeType&&e,m=p&&t&&!t.nodeType&&t,E=m&&m.exports===p,_=E&&d.process,A=(function(){try{var w=m&&m.require&&m.require("util").types;return w||_&&_.binding&&_.binding("util")}catch(M){}})(),O=A&&A.isTypedArray,S=Array.prototype,v=Function.prototype,T=Object.prototype,R=f["__core-js_shared__"],I=v.toString,g=T.hasOwnProperty,D=(c=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+c:"",C=T.toString,N=I.call(Object),k=RegExp("^"+I.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=E?f.Buffer:void 0,L=f.Symbol,x=f.Uint8Array;b&&b.allocUnsafe;var P,B,V=(P=Object.getPrototypeOf,B=Object,function(w){return P(B(w))}),$=Object.create,z=T.propertyIsEnumerable,Ae=S.splice,le=L?L.toStringTag:void 0,ue=(function(){try{var w=la(Object,"defineProperty");return w({},"",{}),w}catch(M){}})(),de=b?b.isBuffer:void 0,Be=Math.max,vr=Date.now,At=la(f,"Map"),je=la(Object,"create"),ut=(function(){function w(){}return function(M){if(!$n(M))return{};if($)return $(M);w.prototype=M;var U=new w;return w.prototype=void 0,U}})();function jn(w){var M=-1,U=w==null?0:w.length;for(this.clear();++M<U;){var Y=w[M];this.set(Y[0],Y[1])}}function nn(w){var M=-1,U=w==null?0:w.length;for(this.clear();++M<U;){var Y=w[M];this.set(Y[0],Y[1])}}function Dr(w){var M=-1,U=w==null?0:w.length;for(this.clear();++M<U;){var Y=w[M];this.set(Y[0],Y[1])}}function Tr(w){var M=this.__data__=new nn(w);this.size=M.size}function UA(w,M){var U=da(w),Y=!U&&ua(w),se=!U&&!Y&&yu(w),Te=!U&&!Y&&!se&&Cu(w),ge=U||Y||se||Te,nt=ge?(function($e,rn){for(var ht=-1,Rr=Array($e);++ht<$e;)Rr[ht]=rn(ht);return Rr})(w.length,String):[],dt=nt.length;for(var Re in w)ge&&(Re=="length"||se&&(Re=="offset"||Re=="parent")||Te&&(Re=="buffer"||Re=="byteLength"||Re=="byteOffset")||Tu(Re,dt))||nt.push(Re);return nt}function sa(w,M,U){(U!==void 0&&!Do(w[M],U)||U===void 0&&!(M in w))&&aa(w,M,U)}function BA(w,M,U){var Y=w[M];g.call(w,M)&&Do(Y,U)&&(U!==void 0||M in w)||aa(w,M,U)}function So(w,M){for(var U=w.length;U--;)if(Do(w[U][0],M))return U;return-1}function aa(w,M,U){M=="__proto__"&&ue?ue(w,M,{configurable:!0,enumerable:!0,value:U,writable:!0}):w[M]=U}jn.prototype.clear=function(){this.__data__=je?je(null):{},this.size=0},jn.prototype.delete=function(w){var M=this.has(w)&&delete this.__data__[w];return this.size-=M?1:0,M},jn.prototype.get=function(w){var M=this.__data__;if(je){var U=M[w];return U===n?void 0:U}return g.call(M,w)?M[w]:void 0},jn.prototype.has=function(w){var M=this.__data__;return je?M[w]!==void 0:g.call(M,w)},jn.prototype.set=function(w,M){var U=this.__data__;return this.size+=this.has(w)?0:1,U[w]=je&&M===void 0?n:M,this},nn.prototype.clear=function(){this.__data__=[],this.size=0},nn.prototype.delete=function(w){var M=this.__data__,U=So(M,w);return!(U<0||(U==M.length-1?M.pop():Ae.call(M,U,1),--this.size,0))},nn.prototype.get=function(w){var M=this.__data__,U=So(M,w);return U<0?void 0:M[U][1]},nn.prototype.has=function(w){return So(this.__data__,w)>-1},nn.prototype.set=function(w,M){var U=this.__data__,Y=So(U,w);return Y<0?(++this.size,U.push([w,M])):U[Y][1]=M,this},Dr.prototype.clear=function(){this.size=0,this.__data__={hash:new jn,map:new(At||nn),string:new jn}},Dr.prototype.delete=function(w){var M=vo(this,w).delete(w);return this.size-=M?1:0,M},Dr.prototype.get=function(w){return vo(this,w).get(w)},Dr.prototype.has=function(w){return vo(this,w).has(w)},Dr.prototype.set=function(w,M){var U=vo(this,w),Y=U.size;return U.set(w,M),this.size+=U.size==Y?0:1,this},Tr.prototype.clear=function(){this.__data__=new nn,this.size=0},Tr.prototype.delete=function(w){var M=this.__data__,U=M.delete(w);return this.size=M.size,U},Tr.prototype.get=function(w){return this.__data__.get(w)},Tr.prototype.has=function(w){return this.__data__.has(w)},Tr.prototype.set=function(w,M){var U=this.__data__;if(U instanceof nn){var Y=U.__data__;if(!At||Y.length<199)return Y.push([w,M]),this.size=++U.size,this;U=this.__data__=new Dr(Y)}return U.set(w,M),this.size=U.size,this};var jA=function(w,M,U){for(var Y=-1,se=Object(w),Te=U(w),ge=Te.length;ge--;){var nt=Te[++Y];if(M(se[nt],nt,se)===!1)break}return w};function Oo(w){return w==null?w===void 0?"[object Undefined]":"[object Null]":le&&le in Object(w)?(function(M){var U=g.call(M,le),Y=M[le];try{M[le]=void 0;var se=!0}catch(ge){}var Te=C.call(M);return se&&(U?M[le]=Y:delete M[le]),Te})(w):(function(M){return C.call(M)})(w)}function vu(w){return ci(w)&&Oo(w)==i}function $A(w){return!(!$n(w)||(function(M){return!!D&&D in M})(w))&&(pa(w)?k:a).test((function(M){if(M!=null){try{return I.call(M)}catch(U){}try{return M+""}catch(U){}}return""})(w))}function VA(w){if(!$n(w))return(function(se){var Te=[];if(se!=null)for(var ge in Object(se))Te.push(ge);return Te})(w);var M=Ru(w),U=[];for(var Y in w)(Y!="constructor"||!M&&g.call(w,Y))&&U.push(Y);return U}function Du(w,M,U,Y,se){w!==M&&jA(M,function(Te,ge){if(se||(se=new Tr),$n(Te))(function(dt,Re,$e,rn,ht,Rr,ui){var Ut=ca(dt,$e),pt=ca(Re,$e),wu=ui.get(pt);if(wu)sa(dt,$e,wu);else{var ku,gt=Rr?Rr(Ut,pt,$e+"",dt,Re,ui):void 0,di=gt===void 0;if(di){var ma=da(pt),Ea=!ma&&yu(pt),Lu=!ma&&!Ea&&Cu(pt);gt=pt,ma||Ea||Lu?da(Ut)?gt=Ut:ci(ku=Ut)&&ha(ku)?gt=(function(xe,rt){var it=-1,Lt=xe.length;for(rt||(rt=Array(Lt));++it<Lt;)rt[it]=xe[it];return rt})(Ut):Ea?(di=!1,gt=pt.slice()):Lu?(di=!1,gt=(function(xe){var rt,it,Lt=(rt=xe.buffer,it=new rt.constructor(rt.byteLength),new x(it).set(new x(rt)),it);return new xe.constructor(Lt,xe.byteOffset,xe.length)})(pt)):gt=[]:(function(xe){if(!ci(xe)||Oo(xe)!=s)return!1;var rt=V(xe);if(rt===null)return!0;var it=g.call(rt,"constructor")&&rt.constructor;return typeof it=="function"&&it instanceof it&&I.call(it)==N})(pt)||ua(pt)?(gt=Ut,ua(Ut)?gt=(function(xe){return(function(rt,it,Lt){var XA=!Lt;Lt||(Lt={});for(var Mu=-1,KA=it.length;++Mu<KA;){var _a=it[Mu],To=void 0;To===void 0&&(To=rt[_a]),XA?aa(Lt,_a,To):BA(Lt,_a,To)}return Lt})(xe,Nu(xe))})(Ut):$n(Ut)&&!pa(Ut)||(gt=(function(xe){return typeof xe.constructor!="function"||Ru(xe)?{}:ut(V(xe))})(pt))):di=!1}di&&(ui.set(pt,gt),ht(gt,pt,rn,Rr,ui),ui.delete(pt)),sa(dt,$e,gt)}})(w,M,ge,U,Du,Y,se);else{var nt=Y?Y(ca(w,ge),Te,ge+"",w,M,se):void 0;nt===void 0&&(nt=Te),sa(w,ge,nt)}},Nu)}function zA(w,M){return GA((function(U,Y,se){return Y=Be(Y===void 0?U.length-1:Y,0),function(){for(var Te=arguments,ge=-1,nt=Be(Te.length-Y,0),dt=Array(nt);++ge<nt;)dt[ge]=Te[Y+ge];ge=-1;for(var Re=Array(Y+1);++ge<Y;)Re[ge]=Te[ge];return Re[Y]=se(dt),(function($e,rn,ht){switch(ht.length){case 0:return $e.call(rn);case 1:return $e.call(rn,ht[0]);case 2:return $e.call(rn,ht[0],ht[1]);case 3:return $e.call(rn,ht[0],ht[1],ht[2])}return $e.apply(rn,ht)})(U,this,Re)}})(w,M,bu),w+"")}var YA=ue?function(w,M){return ue(w,"toString",{configurable:!0,enumerable:!1,value:(U=M,function(){return U}),writable:!0});var U}:bu;function vo(w,M){var U,Y,se=w.__data__;return((Y=typeof(U=M))=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?U!=="__proto__":U===null)?se[typeof M=="string"?"string":"hash"]:se.map}function la(w,M){var U=(function(Y,se){return Y==null?void 0:Y[se]})(w,M);return $A(U)?U:void 0}function Tu(w,M){var U=typeof w;return!!(M=M==null?r:M)&&(U=="number"||U!="symbol"&&l.test(w))&&w>-1&&w%1==0&&w<M}function Ru(w){var M=w&&w.constructor;return w===(typeof M=="function"&&M.prototype||T)}function ca(w,M){if((M!=="constructor"||typeof w[M]!="function")&&M!="__proto__")return w[M]}var GA=(function(w){var M=0,U=0;return function(){var Y=vr(),se=16-(Y-U);if(U=Y,se>0){if(++M>=800)return arguments[0]}else M=0;return w.apply(void 0,arguments)}})(YA);function Do(w,M){return w===M||w!=w&&M!=M}var ua=vu((function(){return arguments})())?vu:function(w){return ci(w)&&g.call(w,"callee")&&!z.call(w,"callee")},da=Array.isArray;function ha(w){return w!=null&&Iu(w.length)&&!pa(w)}var yu=de||function(){return!1};function pa(w){if(!$n(w))return!1;var M=Oo(w);return M==o||M=="[object GeneratorFunction]"||M=="[object AsyncFunction]"||M=="[object Proxy]"}function Iu(w){return typeof w=="number"&&w>-1&&w%1==0&&w<=r}function $n(w){var M=typeof w;return w!=null&&(M=="object"||M=="function")}function ci(w){return w!=null&&typeof w=="object"}var Cu=O?(function(w){return function(M){return w(M)}})(O):function(w){return ci(w)&&Iu(w.length)&&!!u[Oo(w)]};function Nu(w){return ha(w)?UA(w):VA(w)}var fa,WA=(fa=function(w,M,U){Du(w,M,U)},zA(function(w,M){var U=-1,Y=M.length,se=Y>1?M[Y-1]:void 0,Te=Y>2?M[2]:void 0;for(se=fa.length>3&&typeof se=="function"?(Y--,se):void 0,Te&&(function(nt,dt,Re){if(!$n(Re))return!1;var $e=typeof dt;return!!($e=="number"?ha(Re)&&Tu(dt,Re.length):$e=="string"&&dt in Re)&&Do(Re[dt],nt)})(M[0],M[1],Te)&&(se=Y<3?void 0:se,Y=1),w=Object(w);++U<Y;){var ge=M[U];ge&&fa(w,ge,U,se)}return w}));function bu(w){return w}t.exports=WA})(ml,ml.exports)),ml.exports);const _R=zs(ER);class AR{constructor(e,n,r,i){this.backendRestClient=new mR(e,n,r,i)}async getApp(e){return(function(n){const r=(function(s,a){const l={general:{enableFileTransfers:a.includes("file_sharing"),enableLocation:a.includes("location_sharing"),enableMentions:!1,showTypingIndicators:!0,enablePresence:!1,enableVoiceRecording:!1},theme:{version:"v2",name:"default"},permissions:{messages:{delete:"own",edit:"own",reply:"all",emojiReactions:"all"},messagesCustom:{},conversations:{leave:"none",markAsUnread:"none"},conversationsCustom:{}},generalNotificationSettings:{timeout:"15"},emailSettings:{enabled:!0,subject:"{{sender.name}} wants to chat with you on {{app.name}}",replySeparator:"--- Write ABOVE THIS LINE to post a reply via email ---",unsubscribeText:"Unsubscribe from all chat emails",senderName:"{{sender.name}} (via {{app.name}})",header:`Hi {{recipient.name}},
|
|
1336
1336
|
{{sender.name}} wants to chat with you on {{app.name}}:`,includeMessages:!0,inboxUrl:"{{app.custom.websiteUrl}}",inboxLinkText:"Join the chat",footer:`On behalf of {{sender.name}},
|
|
1337
1337
|
The {{app.name}} team`,enableReplyToEmail:a.includes("reply_via_email"),emailThemeType:a.includes("email_templates")?"custom":"standard",emailTheme:"default_email",emailAttachmentMode:"enabledExcludingImages",htmlTemplate:`<div>
|
|
1338
1338
|
Hi {{recipient.name}}, <br/>
|
|
@@ -1356,15 +1356,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1356
1356
|
{{app.custom.websiteUrl}} Join the chat
|
|
1357
1357
|
|
|
1358
1358
|
On behalf of {{sender.name}},
|
|
1359
|
-
The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),smsTemplate:'({{app.name}}) {{sender.name}}: "{{messages}}". Reply here: {{app.custom.websiteUrl}}',maximumSegments:"1",enableAutoOptOutText:!1,optOutText:"To stop receiving these messages, reply STOP."},suppressContactInfo:JSON.stringify({mode:"off",suppressLinks:!0,suppressEmailAddresses:!0,suppressPhoneNumbers:!0}),sameTabLinkRules:[]};return ER(l,s)})(n.configuration,n.features),i=JSON.parse(r.suppressContactInfo),o={...r,suppressContactInfo:new b_(i)};return{appMetadata:{...n.appMetadata,id:n.appMetadata.id},features:n.features,role:o}})(await this.backendRestClient.get("/app",{role_name:e}))}async checkIfAppExists(){return this.backendRestClient.get("/app").then(()=>!0).catch(e=>{if(e.message==="Could not find app.")return!1;throw e})}}class Ur{constructor(e,n,r){this.realtimeWsApiUrl=e,this.internalHttpApiUrl=n,this.restApiHttpUrl=r}getBokensUrl(e,n,r){return this.internalHttpApiUrl+`/${e}/bokens/${encodeURIComponent(n)}?signature=${encodeURIComponent(r!=null?r:"")}`}getRealtimeWsUrl(e,n,r,i,o){const s=encodeURIComponent(n);return this.realtimeWsApiUrl+`/${e}/realtime/${s}?talkjs-client-build=${o!=null?o:"standalone"}&talkjs-core=${r}&talkjs-client-id=${i}`}static fromHost(e){var r;const n=new Ur("wss://realtime.talkjs.com/v1","https://app.talkjs.com/api/v0","https://api.talkjs.com/v1");if(!e)return n;if(e==="@currentHost"){if(typeof location=="undefined")throw new Error("You can only use @currentHost in a browser.");e=((r=window.top)!=null?r:window).location.host}if(e.endsWith("talkjs.com")){const i=e.match(/^(?:\w+-)?([^.]+)\.talkjs\.com$/);if(i){const o=i[1];return["app","cdn","api","realtime"].includes(o)?n:new Ur(`wss://realtime-${o}.talkjs.com/v1`,`https://app-${o}.talkjs.com/api/v0`,`https://api-${o}.talkjs.com/v1`)}return n}return e.includes("localhost")||e.includes("localtest.me")||/^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(e)?new Ur(`ws://${e}/public_api/v1`,`http://${e}/api/v0`,`http://${e}/public_api/v1`):new Ur(`wss://${e}/public_api/v1`,`https://${e}/api/v0`,`https://${e}/public_api/v1`)}}function pf(t){return Object.values(t)}class AR{constructor(e,n,r){this.subscribedConversations={},this.store=e,this.session=n,this.restApi=r}subscribeToConversationListBaseData(){const e=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),this.listenForConversationSearch(),this.listenForMessageSearch()];return()=>e.forEach(n=>n())}subscribeToConversationList(e){var o;const{store:n,session:r}=this;ie(n.type==="ConversationListStore"),(o=n.conversationListSubscription)==null||o.unsubscribe(),n.conversationListSubscription=null;const i=r.subscribeConversations({filter:e},s=>{Gt(()=>{n.conversationsArray$.set(s);const a={};for(const l of s)a[l.id]=l;n.conversationsMap$.set(a)})});return n.conversationListSubscription=i,()=>{n.conversationListSubscription===i&&(i.unsubscribe(),n.conversationListSubscription=null)}}subscribeToChatboxData(){const e=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),()=>this.unsubscribeAllConversations()];return()=>e.forEach(n=>n())}listenForErrors(){const{store:e,session:n}=this;e.errors$.assign({unknownUser:!1,wrongAppId:!1,serverError:!1});const r=n.onError(o=>{Ne.error(o.message),e.errors$.serverError.set(!0)}),i=n.currentUser.subscribe(o=>{e.errors$.unknownUser.set(o===null)});return()=>{r.unsubscribe(),i.unsubscribe()}}listenForAuth(){const{store:e,session:n}=this;return mt(r=>{let i=!0;const o=e.hasTokenFetcher$.get();e.authTokenState$.peek()!=="loading"&&e.authTokenState$.set("loading"),n._authProvider.getToken().then(()=>{i&&e.authTokenState$.set("valid")});const s=n._authProvider.onTokenRefreshFailed(()=>{i&&e.authTokenState$.set(o?"invalid":"expired")});r.onCleanup=()=>{i=!1,s()}})}listenForUserAndApp(){const{store:e,session:n,restApi:r}=this;return mt(i=>{let o=!0,s=null;const a=n.currentUser.subscribe(async l=>{if(o&&l&&(e.currentUser$.set(l),l.role!==s)){s=l.role;const u=await r.getApp(l.role);if(!o)return;e.app$.set(u)}});i.onCleanup=()=>{o=!1,a.unsubscribe()}})}subscribeTypingAndPresence(e){var r;if((r=this.unsubscribeTypingAndPresence)==null||r.call(this),!e)return;const n=[this.listenForTyping(e),this.listenForPresence(e)];this.unsubscribeTypingAndPresence=()=>{n.forEach(i=>i()),this.unsubscribeTypingAndPresence=void 0}}subscribeConversation(e){if(this.subscribedConversations[e])return void(this.subscribedConversations[e].touchedAt=Date.now());const n=[this.listenForConversation(e),this.listenForMessages(e),this.listenForParticipants(e)];this.subscribedConversations[e]={unsubscribe:()=>{n.forEach(i=>i()),delete this.subscribedConversations[e]},touchedAt:Date.now()};const r=pf(this.subscribedConversations);r.length>10&&(function(o,s){return o.reduce((a,l)=>l[s]<a[s]?l:a,o[0])})(r,"touchedAt").unsubscribe()}unsubscribeAllConversations(){var e;for(const n of pf(this.subscribedConversations))n.unsubscribe();(e=this.unsubscribeTypingAndPresence)==null||e.call(this),this.subscribedConversations={}}listenForMessages(e){const{store:n,session:r}=this;ie(n.type==="ChatboxStore");const i=r.conversation(e).subscribeMessages(async(o,s)=>{o&&(await n.readyForNewMessagesPromise,n.storeMessages(e,o,s))});return n.messageSubscriptions[e]=i,()=>i==null?void 0:i.unsubscribe()}listenForParticipants(e){const{store:n,session:r}=this;ie(n.type==="ChatboxStore");const i=r.conversation(e).subscribeParticipants(o=>{o&&n.state$.participants.child(e).set(o)});return()=>i==null?void 0:i.unsubscribe()}listenForConversation(e){const{store:n,session:r}=this;ie(n.type==="ChatboxStore");const i=r.conversation(e).subscribe(async o=>{Gt(()=>{o?(n.state$.unknownConversations.child(e).delete(),n.state$.conversations.child(e).set(o)):(n.state$.conversations.child(e).delete(),n.state$.unknownConversations.child(e).set(!0))})});return()=>i==null?void 0:i.unsubscribe()}listenForTyping(e){const{store:n,session:r}=this;ie(n.type==="ChatboxStore");const i=r.conversation(e).subscribeTyping(o=>{o&&n.storeTyping(e,o)});return()=>i==null?void 0:i.unsubscribe()}listenForPresence(e){const{store:n,session:r}=this;ie(n.type==="ChatboxStore");const i=n.state$.participants.child(e),o=n.state$.isUserConnected.child(e),s=mt(a=>{var c;const l=((c=i.get())!=null?c:[]).map(({user:d})=>d.id),u=l.map(d=>r.user(d).subscribeOnline(h=>{var p;o.child(d).set((p=h==null?void 0:h.isConnected)!=null?p:!1)}));Gt(()=>{var f;const d=new Set(l),h=(p=(f=o.peek())!=null?f:{},Object.keys(p));var p;for(const m of h)d.has(m)||o.child(m).delete()}),a.onCleanup=()=>{u.forEach(d=>d.unsubscribe())}});return()=>{s==null||s(),n.state$.isUserConnected.child(e).delete(),o.delete()}}listenForConversationSearch(){const{store:e,session:n}=this;ie(e.type==="ConversationListStore");const r=n.searchConversations((s,a)=>{e.globalSearchState$.assign({conversationResults:s,conversationStatus:a})}),i=sp(s=>{const a=s.trim();a.length?a.length>=3&&r.setQuery(a):r.setQuery("")},500),o=mt(()=>{const s=e.globalSearchState$.query.get();i(s)});return e.conversationSearch=r,()=>{e.conversationSearch=null,o()}}listenForMessageSearch(){const{store:e,session:n}=this;ie(e.type==="ConversationListStore");const r=n.searchMessages((s,a)=>{e.globalSearchState$.assign({messageResults:s,messageStatus:a})}),i=sp(s=>{const a=s.trim();a.length?a.length>=3&&r.setQuery(a):r.setQuery("")},500),o=mt(()=>{const s=e.globalSearchState$.query.get();i(s)});return e.messageSearch=r,()=>{e.messageSearch=null,o()}}}function kA(t,e){const n=e.appId,r=e.userId,i=X(void 0),o=te(()=>{const c=i.current,d=typeof c!=typeof e.tokenFetcher?e.tokenFetcher:c;return i.current=d,d},[e.tokenFetcher]);Ze(()=>{t.updateThemeCustom(e.themeCustom)},[t,e.themeCustom]);const s=te(()=>bA(),[e.appId,e.userId,e.token,o]);G(()=>{t.hasTokenFetcher$.set(!!o)},[t,o]);const a=KA.getTalkSession({host:e.host,appId:n,userId:r,token:e.token,tokenFetcher:o}),l=te(()=>{const c=Ur.fromHost(e.host);return new _R(c,n,s,a._authProvider)},[n,s,a,e.host]),u=te(()=>new AR(t,a,l),[t,a,l]);return{session:a,restApi:l,fetcher:u}}function St(t,e,n){const r=X(t),i=X(n);return Ze(()=>{r.current=t,i.current=n}),q(o=>{r.current&&r.current(o),e&&(function(s,a,l){for(const u of l){const c=new Event(u);Object.assign(c,a),s.dispatchEvent(c)}})(e,o,i.current)},[e])}function LA(t){G(()=>{const e=window,n=t.current;if(e.cordova&&n){const r=i=>{i.target instanceof HTMLAnchorElement&&(i.preventDefault(),(function(o){const s=window;s.cordova.InAppBrowser?s.cordova.InAppBrowser.open(o,"_system"):window.open(o,"_system","location=yes")})(i.target.href))};return n.addEventListener("click",r),()=>n.removeEventListener("click",r)}},[t])}function MA(){const[t,e]=ne(!0);return G(()=>{e(!1)},[]),t}const gR=_t(function(t,e){var N,k;const{onSendMessage:n,onDeleteMessage:r,onMessageAction:i,onFocusMessage:o,onBackButtonClick:s,beforeBrowserPermissionPrompt:a,onMissingBrowserPermission:l,messageFieldPlaceholder:u,messageFieldSpellcheck:c,__hostElement:d}=t;G(()=>{var b;(b=t.__internalOnLoaded)==null||b.call(t)},[]);const h=MA(),p=X(d!=null?d:null);LA(p);const f=St(r,d,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),m=St(n,d,["sendMessage","send-message","sendmessage","SendMessage"]),E=St(i,d,["messageAction","message-action","messageaction","MessageAction"]),_=St(o,d,["focusMessage","focus-message","focusmessage","FocusMessage"]),A=St(s,d,["backButtonClick","back-button-click","backbuttonclick","BackButtonClick"]),O={beforeBrowserPermissionPrompt:a,onMissingBrowserPermissionCallback:St(l,d,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"])},{store:S,controller:v,editorInternals:T,session:R}=(function(b,L,x,P,B,V){const $=te(()=>new Zg(b.appId,b.userId),[]),{session:z,fetcher:_e}=kA($,b);G(()=>{const de=_e.subscribeToChatboxData();return()=>de()},[_e]);const ae=te(()=>new v_($.state$.editor,$.device$,$.state$.userPermissions),[$]),ue=te(()=>new hR($,z,ae,L,x,P,B,V),[z,$,ae,L,x,B,P,V]);return ae.controller=ue,Ze(()=>{let de=!0;const Be=b.conversationId||null;return $.state$.loadingConversationId.set(Be),Be&&_e.subscribeConversation(Be),_e.subscribeTypingAndPresence(Be),Bs(()=>$.canRenderUi(Be)).then(()=>{de&&Gt(()=>{$.state$.currentConversationId.set(Be),$.state$.referencedMessageId.set(null),$.chatSearchState$.set("hidden")})}),()=>{de=!1}},[$,_e,b.conversationId]),{store:$,controller:ue,editorInternals:ae,session:z}})(t,m,f,E,_,A),y=q(async()=>{const b=T.state$;if(b.isEmpty.peek()||b.atTextLimit.peek())return;const L=T.getText(),x=S.state$.referencedMessageId.peek();x&&v.setReferencedMessage(null),T.clearText(),S.state$.editor.showEmojiPicker.set(!1),await v.sendMessage({text:L,referencedMessage:x!=null?x:void 0})},[v,T,S]);G(()=>{var L;const b=(L=t.enterSendsMessage)!=null?L:!0;S.state$.enterSendsMessage.set(b),T.onEnter=b?y:void 0},[T,t.enterSendsMessage,y,S]);const g=X(void 0);G(()=>{var L;const b=(L=S.focusedMessage$.peek())==null?void 0:L.id;t.focusedMessageId!==g.current&&b!==t.focusedMessageId&&(g.current=t.focusedMessageId,v.focusMessage(t.focusedMessageId||null,!1))},[S,v,t.focusedMessageId]),G(()=>{const b=t.__hostElement;if(b)return S.focusedMessage$.onChange(({value:L})=>{var x;b.focusedMessageId=(x=L==null?void 0:L.id)!=null?x:null})},[S,t.__hostElement]),G(()=>{T.spellcheck$.set(c)},[T,c]),G(()=>{T.placeholder$.set(u)},[T,u]),_n(e,()=>({controller:v,editorInternals:T}));const D=q(({error:b})=>I(oa,{appId:t.appId,chatboxState:{type:"unexpected-error",error:b}}),[t.appId]),C=h?null:I(Cm,{fallbackRender:D,children:I(xm.Provider,{value:T,children:I(Hm.Provider,{value:S,children:I(Pm.Provider,{value:t.theme,children:I(Fm.Provider,{value:O,children:I(Um.Provider,{value:v,children:I(xc.Provider,{value:R,children:I(Yg.Provider,{value:{sendMessage:y},children:I(dR,{appId:t.appId,chatHeaderVisible:(N=t.chatHeaderVisible)!=null?N:!0,messageFieldVisible:(k=t.messageFieldVisible)!=null?k:!0})})})})})})})})});return d?C:I("div",{className:"t-chatbox"+(t.className?` ${t.className}`:""),style:t.style,ref:p,children:C})});(function(t="Twemoji Country Flags",e="https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2"){if(typeof window<"u"&&md("😊")&&!md("🇨🇭")){const n=document.createElement("style");return n.textContent=`@font-face {
|
|
1359
|
+
The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),smsTemplate:'({{app.name}}) {{sender.name}}: "{{messages}}". Reply here: {{app.custom.websiteUrl}}',maximumSegments:"1",enableAutoOptOutText:!1,optOutText:"To stop receiving these messages, reply STOP."},suppressContactInfo:JSON.stringify({mode:"off",suppressLinks:!0,suppressEmailAddresses:!0,suppressPhoneNumbers:!0}),sameTabLinkRules:[]};return _R(l,s)})(n.configuration,n.features),i=JSON.parse(r.suppressContactInfo),o={...r,suppressContactInfo:new w_(i)};return{appMetadata:{...n.appMetadata,id:n.appMetadata.id},features:n.features,role:o}})(await this.backendRestClient.get("/app",{role_name:e}))}async checkIfAppExists(){return this.backendRestClient.get("/app").then(()=>!0).catch(e=>{if(e.message==="Could not find app.")return!1;throw e})}}class Ur{constructor(e,n,r){this.realtimeWsApiUrl=e,this.internalHttpApiUrl=n,this.restApiHttpUrl=r}getBokensUrl(e,n,r){return this.internalHttpApiUrl+`/${e}/bokens/${encodeURIComponent(n)}?signature=${encodeURIComponent(r!=null?r:"")}`}getRealtimeWsUrl(e,n,r,i,o){const s=encodeURIComponent(n);return this.realtimeWsApiUrl+`/${e}/realtime/${s}?talkjs-client-build=${o!=null?o:"standalone"}&talkjs-core=${r}&talkjs-client-id=${i}`}static fromHost(e){var r;const n=new Ur("wss://realtime.talkjs.com/v1","https://app.talkjs.com/api/v0","https://api.talkjs.com/v1");if(!e)return n;if(e==="@currentHost"){if(typeof location=="undefined")throw new Error("You can only use @currentHost in a browser.");e=((r=window.top)!=null?r:window).location.host}if(e.endsWith("talkjs.com")){const i=e.match(/^(?:\w+-)?([^.]+)\.talkjs\.com$/);if(i){const o=i[1];return["app","cdn","api","realtime"].includes(o)?n:new Ur(`wss://realtime-${o}.talkjs.com/v1`,`https://app-${o}.talkjs.com/api/v0`,`https://api-${o}.talkjs.com/v1`)}return n}return e.includes("localhost")||e.includes("localtest.me")||/^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(e)?new Ur(`ws://${e}/public_api/v1`,`http://${e}/api/v0`,`http://${e}/public_api/v1`):new Ur(`wss://${e}/public_api/v1`,`https://${e}/api/v0`,`https://${e}/public_api/v1`)}}function ff(t){return Object.values(t)}class gR{constructor(e,n,r){this.subscribedConversations={},this.store=e,this.session=n,this.restApi=r}subscribeToConversationListBaseData(){const e=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),this.listenForConversationSearch(),this.listenForMessageSearch()];return()=>e.forEach(n=>n())}subscribeToConversationList(e){var o;const{store:n,session:r}=this;ie(n.type==="ConversationListStore"),(o=n.conversationListSubscription)==null||o.unsubscribe(),n.conversationListSubscription=null;const i=r.subscribeConversations({filter:e},s=>{Pt(()=>{n.conversationsArray$.set(s);const a={};for(const l of s)a[l.id]=l;n.conversationsMap$.set(a)})});return n.conversationListSubscription=i,()=>{n.conversationListSubscription===i&&(i.unsubscribe(),n.conversationListSubscription=null)}}subscribeToChatboxData(){const e=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),()=>this.unsubscribeAllConversations()];return()=>e.forEach(n=>n())}listenForErrors(){const{store:e,session:n}=this;e.errors$.assign({unknownUser:!1,wrongAppId:!1,serverError:!1});const r=n.onError(o=>{Ie.error(o.message),e.errors$.serverError.set(!0)}),i=n.currentUser.subscribe(o=>{e.errors$.unknownUser.set(o===null)});return()=>{r.unsubscribe(),i.unsubscribe()}}listenForAuth(){const{store:e,session:n}=this;return mt(r=>{let i=!0;const o=e.hasTokenFetcher$.get();e.authTokenState$.peek()!=="loading"&&e.authTokenState$.set("loading"),n._authProvider.getToken().then(()=>{i&&e.authTokenState$.set("valid")});const s=n._authProvider.onTokenRefreshFailed(()=>{i&&e.authTokenState$.set(o?"invalid":"expired")});r.onCleanup=()=>{i=!1,s()}})}listenForUserAndApp(){const{store:e,session:n,restApi:r}=this;return mt(i=>{let o=!0,s=null;const a=n.currentUser.subscribe(async l=>{if(o&&l&&(e.currentUser$.set(l),l.role!==s)){s=l.role;const u=await r.getApp(l.role);if(!o)return;e.app$.set(u)}});i.onCleanup=()=>{o=!1,a.unsubscribe()}})}subscribeTypingAndPresence(e){var r;if((r=this.unsubscribeTypingAndPresence)==null||r.call(this),!e)return;const n=[this.listenForTyping(e),this.listenForPresence(e)];this.unsubscribeTypingAndPresence=()=>{n.forEach(i=>i()),this.unsubscribeTypingAndPresence=void 0}}subscribeConversation(e){if(this.subscribedConversations[e])return void(this.subscribedConversations[e].touchedAt=Date.now());const n=[this.listenForConversation(e),this.listenForMessages(e),this.listenForParticipants(e)];this.subscribedConversations[e]={unsubscribe:()=>{n.forEach(i=>i()),delete this.subscribedConversations[e]},touchedAt:Date.now()};const r=ff(this.subscribedConversations);r.length>10&&(function(o,s){return o.reduce((a,l)=>l[s]<a[s]?l:a,o[0])})(r,"touchedAt").unsubscribe()}unsubscribeAllConversations(){var e;for(const n of ff(this.subscribedConversations))n.unsubscribe();(e=this.unsubscribeTypingAndPresence)==null||e.call(this),this.subscribedConversations={}}listenForMessages(e){const{store:n,session:r}=this;ie(n.type==="ChatboxStore");const i=r.conversation(e).subscribeMessages(async(o,s)=>{o&&(await n.readyForNewMessagesPromise,n.storeMessages(e,o,s))});return n.messageSubscriptions[e]=i,()=>i==null?void 0:i.unsubscribe()}listenForParticipants(e){const{store:n,session:r}=this;ie(n.type==="ChatboxStore");const i=r.conversation(e).subscribeParticipants(o=>{o&&n.state$.participants.child(e).set(o)});return()=>i==null?void 0:i.unsubscribe()}listenForConversation(e){const{store:n,session:r}=this;ie(n.type==="ChatboxStore");const i=r.conversation(e).subscribe(async o=>{Pt(()=>{o?(n.state$.unknownConversations.child(e).delete(),n.state$.conversations.child(e).set(o)):(n.state$.conversations.child(e).delete(),n.state$.unknownConversations.child(e).set(!0))})});return()=>i==null?void 0:i.unsubscribe()}listenForTyping(e){const{store:n,session:r}=this;ie(n.type==="ChatboxStore");const i=r.conversation(e).subscribeTyping(o=>{o&&n.storeTyping(e,o)});return()=>i==null?void 0:i.unsubscribe()}listenForPresence(e){const{store:n,session:r}=this;ie(n.type==="ChatboxStore");const i=n.state$.participants.child(e),o=n.state$.isUserConnected.child(e),s=mt(a=>{var c;const l=((c=i.get())!=null?c:[]).map(({user:d})=>d.id),u=l.map(d=>r.user(d).subscribeOnline(h=>{var f;o.child(d).set((f=h==null?void 0:h.isConnected)!=null?f:!1)}));Pt(()=>{var p;const d=new Set(l),h=(f=(p=o.peek())!=null?p:{},Object.keys(f));var f;for(const m of h)d.has(m)||o.child(m).delete()}),a.onCleanup=()=>{u.forEach(d=>d.unsubscribe())}});return()=>{s==null||s(),n.state$.isUserConnected.child(e).delete(),o.delete()}}listenForConversationSearch(){const{store:e,session:n}=this;ie(e.type==="ConversationListStore");const r=n.searchConversations((s,a)=>{e.globalSearchState$.assign({conversationResults:s,conversationStatus:a})}),i=ap(s=>{const a=s.trim();a.length?a.length>=3&&r.setQuery(a):r.setQuery("")},500),o=mt(()=>{const s=e.globalSearchState$.query.get();i(s)});return e.conversationSearch=r,()=>{e.conversationSearch=null,o()}}listenForMessageSearch(){const{store:e,session:n}=this;ie(e.type==="ConversationListStore");const r=n.searchMessages((s,a)=>{e.globalSearchState$.assign({messageResults:s,messageStatus:a})}),i=ap(s=>{const a=s.trim();a.length?a.length>=3&&r.setQuery(a):r.setQuery("")},500),o=mt(()=>{const s=e.globalSearchState$.query.get();i(s)});return e.messageSearch=r,()=>{e.messageSearch=null,o()}}}function LA(t,e){const n=e.appId,r=e.userId,i=X(void 0),o=te(()=>{const c=i.current,d=typeof c!=typeof e.tokenFetcher?e.tokenFetcher:c;return i.current=d,d},[e.tokenFetcher]);Xe(()=>{t.updateThemeCustom(e.themeCustom)},[t,e.themeCustom]);const s=te(()=>wA(),[e.appId,e.userId,e.token,o]);G(()=>{t.hasTokenFetcher$.set(!!o)},[t,o]);const a=qA.getTalkSession({host:e.host,appId:n,userId:r,token:e.token,tokenFetcher:o}),l=te(()=>{const c=Ur.fromHost(e.host);return new AR(c,n,s,a._authProvider)},[n,s,a,e.host]),u=te(()=>new gR(t,a,l),[t,a,l]);return{session:a,restApi:l,fetcher:u}}function St(t,e,n){const r=X(t),i=X(n);return Xe(()=>{r.current=t,i.current=n}),q(o=>{r.current&&r.current(o),e&&(function(s,a,l){for(const u of l){const c=new Event(u);Object.assign(c,a),s.dispatchEvent(c)}})(e,o,i.current)},[e])}function MA(t){G(()=>{const e=window,n=t.current;if(e.cordova&&n){const r=i=>{i.target instanceof HTMLAnchorElement&&(i.preventDefault(),(function(o){const s=window;s.cordova.InAppBrowser?s.cordova.InAppBrowser.open(o,"_system"):window.open(o,"_system","location=yes")})(i.target.href))};return n.addEventListener("click",r),()=>n.removeEventListener("click",r)}},[t])}function PA(){const[t,e]=ne(!0);return G(()=>{e(!1)},[]),t}const SR=_t(function(t,e){var N,k;const{onSendMessage:n,onDeleteMessage:r,onMessageAction:i,onFocusMessage:o,onBackButtonClick:s,beforeBrowserPermissionPrompt:a,onMissingBrowserPermission:l,messageFieldPlaceholder:u,messageFieldSpellcheck:c,__hostElement:d}=t;G(()=>{var b;(b=t.__internalOnLoaded)==null||b.call(t)},[]);const h=PA(),f=X(d!=null?d:null);MA(f);const p=St(r,d,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),m=St(n,d,["sendMessage","send-message","sendmessage","SendMessage"]),E=St(i,d,["messageAction","message-action","messageaction","MessageAction"]),_=St(o,d,["focusMessage","focus-message","focusmessage","FocusMessage"]),A=St(s,d,["backButtonClick","back-button-click","backbuttonclick","BackButtonClick"]),O={beforeBrowserPermissionPrompt:a,onMissingBrowserPermissionCallback:St(l,d,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"])},{store:S,controller:v,editorInternals:T,session:R}=(function(b,L,x,P,B,V){const $=te(()=>new Qg(b.appId,b.userId),[]),{session:z,fetcher:Ae}=LA($,b);G(()=>{const de=Ae.subscribeToChatboxData();return()=>de()},[Ae]);const le=te(()=>new D_($.state$.editor,$.device$,$.state$.userPermissions),[$]),ue=te(()=>new pR($,z,le,L,x,P,B,V),[z,$,le,L,x,B,P,V]);return le.controller=ue,Xe(()=>{let de=!0;const Be=b.conversationId||null;return $.state$.loadingConversationId.set(Be),Be&&Ae.subscribeConversation(Be),Ae.subscribeTypingAndPresence(Be),Bs(()=>$.canRenderUi(Be)).then(()=>{de&&Pt(()=>{$.state$.currentConversationId.set(Be),$.state$.referencedMessageId.set(null),$.chatSearchState$.set("hidden")})}),()=>{de=!1}},[$,Ae,b.conversationId]),{store:$,controller:ue,editorInternals:le,session:z}})(t,m,p,E,_,A),I=q(async()=>{const b=T.state$;if(b.isEmpty.peek()||b.atTextLimit.peek())return;const L=T.getText(),x=S.state$.referencedMessageId.peek();x&&v.setReferencedMessage(null),T.clearText(),S.state$.editor.showEmojiPicker.set(!1),await v.sendMessage({text:L,referencedMessage:x!=null?x:void 0})},[v,T,S]);G(()=>{var L;const b=(L=t.enterSendsMessage)!=null?L:!0;S.state$.enterSendsMessage.set(b),T.onEnter=b?I:void 0},[T,t.enterSendsMessage,I,S]);const g=X(void 0);G(()=>{var L;const b=(L=S.focusedMessage$.peek())==null?void 0:L.id;t.focusedMessageId!==g.current&&b!==t.focusedMessageId&&(g.current=t.focusedMessageId,v.focusMessage(t.focusedMessageId||null,!1))},[S,v,t.focusedMessageId]),G(()=>{const b=t.__hostElement;if(b)return S.focusedMessage$.onChange(({value:L})=>{var x;b.focusedMessageId=(x=L==null?void 0:L.id)!=null?x:null})},[S,t.__hostElement]),G(()=>{T.spellcheck$.set(c)},[T,c]),G(()=>{T.placeholder$.set(u)},[T,u]),_n(e,()=>({controller:v,editorInternals:T}));const D=q(({error:b})=>y(oa,{appId:t.appId,chatboxState:{type:"unexpected-error",error:b}}),[t.appId]),C=h?null:y(Nm,{fallbackRender:D,children:y(Fm.Provider,{value:T,children:y(Um.Provider,{value:S,children:y(xm.Provider,{value:t.theme,children:y(Hm.Provider,{value:O,children:y(Bm.Provider,{value:v,children:y(Fc.Provider,{value:R,children:y(Gg.Provider,{value:{sendMessage:I},children:y(hR,{appId:t.appId,chatHeaderVisible:(N=t.chatHeaderVisible)!=null?N:!0,messageFieldVisible:(k=t.messageFieldVisible)!=null?k:!0})})})})})})})})});return d?C:y("div",{className:"t-chatbox"+(t.className?` ${t.className}`:""),style:t.style,ref:f,children:C})});(function(t="Twemoji Country Flags",e="https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2"){if(typeof window<"u"&&Ed("😊")&&!Ed("🇨🇭")){const n=document.createElement("style");return n.textContent=`@font-face {
|
|
1360
1360
|
font-family: "${t}";
|
|
1361
1361
|
unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,
|
|
1362
1362
|
U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
|
|
1363
1363
|
src: url('${e}') format('woff2');
|
|
1364
1364
|
font-display: swap;
|
|
1365
|
-
}`,document.head.appendChild(n),!0}})(),(function({observableFunctions:t,observableProperties:e,jsonReplacer:n,jsonReviver:r}){if(t)for(const i in t){const o=t[i];Mg.set(i,o),pd.prototype[i]=function(...s){return o.call(this,this._node,...s)}}if(e)for(const i in e){const o=e[i];Lg.set(i,o),Object.defineProperty(pd.prototype,i,{configurable:!0,get(){return o.get.call(this,this._node)},set(s){return o.set.call(this,this._node,s)}})}n&&(hd.replacer=n),r&&(hd.reviver=r)})({observableFunctions:{child:(t,e)=>$s.getProxy(t,e)}}),Ne.registerHandler(({level:t,data:e})=>{console[t]("[TalkJS]",...e)});const PA=_t(function(t,e){const n=X(null),r=te(()=>new SR(n),[]);_n(e,()=>r,[r]);const{theme:i,...o}=t,s=te(()=>({...hc,...i!=null?i:{}}),[i]),a=`chatbox|${t.userId}|${t.appId}`;return I(Bm.Provider,{value:r,children:fe(gR,{...o,key:a,theme:s,ref:n})})});var Wr,Re,it,ts;class SR{constructor(e){Ir(this,Re);Ir(this,Wr);Ro(this,Wr,e)}deleteMessage(e){return ge(this,Re,it).deleteMessage(e)}setEditing(e){ge(this,Re,it).setEditing(e)}editMessage(e,n){return ge(this,Re,it).editMessage(e,n)}sendMessage(e){return ge(this,Re,it).sendMessage(e)}sendFileMessage(e){return ge(this,Re,it).sendFileMessage(e)}sendLocationMessage(e){return ge(this,Re,it).sendLocationMessage(e)}setReferencedMessage(e){ge(this,Re,it).setReferencedMessage(e)}toggleReaction(e,n,r){return ge(this,Re,it).toggleReaction(e,n,r)}getMessageFieldText(){return ge(this,Re,ts).getText()}setMessageFieldText(e){ge(this,Re,ts).setText(e)}focusMessageField(){ge(this,Re,ts).focus()}toggleSearchBox(e){ge(this,Re,it).toggleSearchBox(e)}async focusMessage(e){return ge(this,Re,it).focusMessage(e)}setHighlightedStrings(e){ge(this,Re,it).setHighlightedStrings(e)}async jumpToPreviousHighlight(){return ge(this,Re,it).jumpToHighlight("up")}async jumpToNextHighlight(){return ge(this,Re,it).jumpToHighlight("down")}clickBackButton(){ge(this,Re,it).clickBackButton()}}Wr=new WeakMap,Re=new WeakSet,it=function(){return ge(this,Wr).current.controller},ts=function(){return ge(this,Wr).current.editorInternals};function OR({conversation:t}){const e=oe(),n=Qe(),r=iu(),i=J(e.currentConversationId$),o=ou(i);return I(n.ConversationListItem,{common:r,conversation:t,participants:o,isSelected:i===t.id})}function vR(){const t=oe(),e=X(null);G(()=>{let r=!0;const i=e.current;return(async function(){var s;let o=0;for(;r&&t.conversationListSubscription&&i.scrollHeight===i.clientHeight&&o<2;)await((s=t.conversationListSubscription)==null?void 0:s.loadMore(20)),o+=1})(),()=>{r=!1}},[t]);const n=q(r=>{const i=r.currentTarget;i.scrollHeight-i.clientHeight-i.scrollTop<15&&t.conversationListSubscription&&t.conversationListSubscription.loadMore(20)},[t]);return I("div",{className:"t-conversation-list-scrollable",ref:e,"t-menu-boundary":"",onScroll:n,children:I(ji,{each:t.conversationsArray$,children:r=>I(OR,{conversation:r.get()})})})}function DR(){const t=oe(),e=Qe(),n=iu(),r=J(t.globalSearchState$.query),i=q(s=>{t.setGlobalSearchQuery(s)},[t]),o=q(()=>{t.cancelGlobalSearch()},[t]);return I(e.GlobalSearchBox,{common:n,query:r,setQuery:i,cancel:o})}function TR({appId:t}){const e=oe(),n=(function(){const s=oe(),a=lt(()=>{const c=s.currentUser$.get(),d=s.app$.get(),h=s.errors$.get(),p=s.authTokenState$.get();return h.serverError?"server-error":h.wrongAppId?"wrong-app-id":p==="loading"||p==="idle"?"loading-token":p==="invalid"?"invalid-token":p==="expired"?"expired-token":p==="valid"?h.unknownUser?"unknown-user":c&&d?"loaded":"loading-data":void ie.unreachable()}),l=lt({type:"loading"});$i(c=>{const d=a.get(),h=s.extUserId$.peek(),p=s.appId$.peek();switch(d){case"invalid-token":l.set({type:"auth-failed"});break;case"expired-token":l.set({type:"expired-token"});break;case"wrong-app-id":l.set({type:"wrong-app-id",appId:p});break;case"server-error":l.set({type:"server-error"});break;case"loading-data":case"loading-token":l.set({type:"loading"});break;case"loaded":l.set({type:"loaded",currentUser:s.currentUser$.peek()});break;case"unknown-user":c.onCleanup=(function(f){l.set({type:"loading"});const m=setTimeout(()=>{l.set(f)},5e3);return()=>clearTimeout(m)})({type:"unknown-user",userId:h});break;default:ie.never(d)}});const u=lt({type:"loading"});return $i(c=>{if(l.type.get()==="loading"){u.set({type:"invisible-loading"});const d=setTimeout(()=>{u.set({type:"loading"})},1e3);c.onCleanup=()=>{clearTimeout(d)}}else u.set(l.get())}),J(u)})(),r=J(e.globalSearchEnabled$),i=J(e.globalSearchActive$),o=X(null);return n.type==="invisible-loading"?I(ve,{}):n.type==="loading"?I(IA,{}):n.type==="unknown-user"||n.type==="auth-failed"||n.type==="wrong-app-id"||n.type==="server-error"||n.type==="unexpected-error"?I(oa,{appId:t,chatboxState:n}):n.type==="expired-token"?I(yA,{}):n.type==="loaded"?I("div",{className:"t-conversation-list-content","t-menu-boundary":"root",ref:o,children:[r&&I(DR,{}),I(i?RR:vR,{}),I(NA,{containerRef:o})]}):I(ve,{})}function RR(){const t=oe(),e=Qe(),n=iu(),r=J(t.t$),i=J(t.globalSearchState$.messageStatus),o=J(t.globalSearchState$.conversationStatus),s=J(t.globalSearchStatus$);return I("div",s==="searching"?{className:"t-global-search-results","t-status":"loading",children:r.SEARCH_SEARCHING}:s==="noResults"?{className:"t-global-search-results","t-status":"empty",children:r.SEARCH_NO_RESULTS}:{className:"t-global-search-results","t-status":"loaded",children:[I(Id,{if:()=>t.globalSearchState$.conversationResults.get().length,children:()=>I(ve,{children:[I(e.GlobalSearchResultHeader,{common:n,type:"conversations",canLoadMore:o==="canLoadMore",loadMore:()=>t.conversationSearch.loadMore()}),I(ji,{each:t.globalSearchState$.conversationResults,children:a=>I(e.GlobalSearchResultItem,{common:n,conversation:a.get(),isSelected:a.id.get()===t.globalSearchState$.selectedResultId.get()})})]})}),I(Id,{if:()=>t.globalSearchState$.messageResults.get().length,children:()=>I(ve,{children:[I(e.GlobalSearchResultHeader,{common:n,type:"messages",canLoadMore:i==="canLoadMore",loadMore:()=>t.messageSearch.loadMore()}),I(ji,{each:t.globalSearchState$.messageResults,children:a=>I(e.GlobalSearchResultItem,{common:n,conversation:a.conversation.get(),message:a.message.get(),isSelected:a.message.id.get()===t.globalSearchState$.selectedResultId.get()})})]})})]})}class IR extends Gm{constructor(){super(...arguments),this.type="ConversationListStore",this.conversationListSubscription=null,this.currentConversationId$=le(null),this.conversationsArray$=le([]),this.conversationsMap$=le({}),this.globalSearchState$=le({query:"",selectedResultId:null,conversationResults:[],conversationStatus:"idle",messageResults:[],messageStatus:"idle"}),this.globalSearchStatus$=(function(e,n){const r=le(e);return mt(i=>{const o=r.peek();let s=!0;const a=n(o);(function(l){return!!l&&typeof l=="object"&&typeof l.then=="function"})(a)?a.then(l=>{s&&r.set(l)}):r.set(a),i.onCleanup=()=>{s=!1}}),r})("idle",()=>{const e=this.globalSearchState$.conversationStatus.get(),n=this.globalSearchState$.messageStatus.get(),r=this.globalSearchState$.conversationResults.get(),i=this.globalSearchState$.messageResults.get(),o=r.length>0||i.length>0;return e==="searching"||n==="searching"?o?(s=1e3,new Promise(a=>setTimeout(a,s))).then(()=>"searching"):"searching":o||e!=="loadedAll"||n!=="loadedAll"?"idle":"noResults";var s}),this.globalSearchEnabled$=le(()=>{var n;const e=this.app$.features.get();return(n=e==null?void 0:e.includes("search_conv_and_messages"))!=null?n:!1}),this.globalSearchActive$=le(()=>{const e=this.globalSearchEnabled$.get(),n=this.globalSearchState$.query.get().trim();return e&&n.length>=3}),this.highlightedStrings$=le(()=>{const e=this.globalSearchActive$.get(),n=this.globalSearchState$.query.get();return e?n.split(/\s+/).map(r=>r.trim()).filter(r=>r.length):[]})}setGlobalSearchQuery(e){this.globalSearchEnabled$.peek()?Gt(()=>{this.globalSearchState$.query.set(e),this.globalSearchActive$.peek()||this.globalSearchState$.selectedResultId.set(null)}):Ne.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}cancelGlobalSearch(){this.globalSearchEnabled$.peek()?this.setGlobalSearchQuery(""):Ne.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}}class yR{constructor(e,n,r){this.session=e,this.store=n,this.onSelectConversation=r}async selectConversation(e,n){var s;if(e===this.store.currentConversationId$.peek()&&!n)return;Gt(()=>{if(this.store.globalSearchActive$.peek()){const a=n!=null?n:e;this.store.globalSearchState$.selectedResultId.set(a)}this.store.currentConversationId$.set(e)});const r=e&&n&&await this.session.conversation(e).message(n).get(),i=e&&((s=this.store.conversationsMap$.child(e).peek())!=null?s:await this.session.conversation(e).get()),o={currentUser:this.store.currentUser$.peek(),conversation:i,...r&&{focusedMessage:r}};this.onSelectConversation(o)}jumpToHighlight(e){}}var ff,mf,CR=(mf||(mf=1,ff=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((r=(o=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!(s==="_owner"&&e.$$typeof||t(e[s],n[s])))return!1}return!0}return e!=e&&n!=n}),ff);const NR=zs(CR);function bR(t,e){G(t,(function(n){const r=X(void 0);return NR(n,r.current)||(r.current=n),r.current})(e))}const wR=_t(function(t,e){const{__hostElement:n,onSelectConversation:r}=t;G(()=>{var f;(f=t.__internalOnLoaded)==null||f.call(t)},[]);const i=MA(),o=X(n!=null?n:null);LA(o);const s=St(r,n,["selectConversation","select-conversation","selectconversation","SelectConversation"]),a=te(()=>new IR(t.appId,t.userId),[]);G(()=>{Gt(()=>{a.extUserId$.set(t.userId),a.appId$.set(t.appId)})},[a,t.appId,t.userId]);const{session:l,fetcher:u}=kA(a,t);G(()=>{const f=u.subscribeToConversationListBaseData();return()=>f()},[u]),bR(()=>{const f=u.subscribeToConversationList(t.conversationFilter);return()=>f()},[u,t.conversationFilter]);const c=te(()=>new yR(l,a,s),[l,a,s]),d=X(void 0);G(()=>{t.selectedConversationId!==d.current&&(d.current=t.selectedConversationId,a.currentConversationId$.set(t.selectedConversationId||null))},[a,t.selectedConversationId]),G(()=>{const f=t.__hostElement;if(f)return a.currentConversationId$.onChange(({value:m})=>{f.selectedConversationId=m})},[a,t.__hostElement]),_n(e,()=>({controller:c}));const h=q(({error:f})=>I(oa,{appId:t.appId,chatboxState:{type:"unexpected-error",error:f}}),[t.appId]),p=i?null:I(Cm,{fallbackRender:h,children:I(Hm.Provider,{value:a,children:I(Pm.Provider,{value:t.theme,children:I(Um.Provider,{value:c,children:I(xc.Provider,{value:l,children:I(TR,{appId:t.appId})})})})})});return n?p:I("div",{className:"t-conversation-list"+(t.className?` ${t.className}`:""),style:t.style,ref:o,children:p})});var ro,Ls,xA;class kR{constructor(e){Ir(this,Ls);Ir(this,ro);Ro(this,ro,e)}selectConversation(e,n){return ge(this,Ls,xA).selectConversation(e,n)}}ro=new WeakMap,Ls=new WeakSet,xA=function(){return ge(this,ro).current.controller};const FA=_t(function(t,e){const n=X(null),r=te(()=>new kR(n),[]);_n(e,()=>r,[r]);const{theme:i,...o}=t,s=te(()=>({...hc,...i!=null?i:{}}),[i]),a=`conversation-list|${t.userId}|${t.appId}`;return I(Bm.Provider,{value:r,children:fe(wR,{...o,key:a,theme:s,ref:n})})});function LR(t){const{selectedConversationId:e,focusedMessageId:n,chatboxProps:r,conversationListProps:i,style:o,__hostElement:s}=t,{onDeleteMessage:a,onSendMessage:l,onMessageAction:u,onFocusMessage:c,onMissingBrowserPermission:d,...h}=r,{onSelectConversation:p,...f}=i,[m,E]=ne(e||null),[_,A]=ne(t.focusedMessageId||null);G(()=>{E(e||null)},[e]),G(()=>{A(t.focusedMessageId||null)},[t.focusedMessageId]);const O=St(a,s,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),S=St(l,s,["sendMessage","send-message","sendmessage","SendMessage"]),v=St(u,s,["messageAction","message-action","messageaction","MessageAction"]),T=St(c,s,["focusMessage","focus-message","focusmessage","FocusMessage"]),R=St(d,s,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"]),y=St(p,s,["selectConversation","select-conversation","selectconversation","SelectConversation"]),g=q(P=>{var B,V;E((V=(B=P.conversation)==null?void 0:B.id)!=null?V:null),y(P)},[y]),D=q(P=>{var B,V;A((V=(B=P.message)==null?void 0:B.id)!=null?V:null),T(P)},[T]);G(()=>{var P;(P=t.__internalOnLoaded)==null||P.call(t)},[]);const C=X(s!=null?s:null),[N,k]=ne(void 0);Ze(()=>{var V;const P=(V=t.mobileBreakPoint)!=null?V:700,B=new ResizeObserver($=>{const z=$[0].contentRect.width;k(z>=P)});return B.observe(C.current),()=>B.disconnect()},[t.mobileBreakPoint]);const b=q(P=>{E(null),y({conversation:null,currentUser:P.currentUser})},[y]),L=m?"chatbox":"conversation-list";G(()=>{s&&(N?s.removeAttribute("t-mobile-inbox"):s.setAttribute("t-mobile-inbox",L))},[N,s,L]);const x=N===void 0?null:I(ve,{children:[I(FA,{...f,onSelectConversation:g,selectedConversationId:m!=null?m:void 0}),I(PA,{...h,onDeleteMessage:O,onSendMessage:S,onMessageAction:v,onFocusMessage:D,onMissingBrowserPermission:R,onBackButtonClick:b,conversationId:m,focusedMessageId:_!=null?_:void 0})]});if(s)return x;{const P="t-inbox"+(t.className?` ${t.className}`:"");return I("div",{ref:C,style:o,className:P,"t-mobile-inbox":N?void 0:L,children:x})}}var io;class MR{constructor(e){Ir(this,io);Ro(this,io,e)}get chatbox(){return ge(this,io).current}}io=new WeakMap;const PR=_t(function(t,e){const n=X(null),r=X(null),i=te(()=>new MR(n),[]);_n(e,()=>i,[i]);const{theme:o,appId:s,userId:a,__hostElement:l,__internalOnLoaded:u,beforeBrowserPermissionPrompt:c,chatHeaderVisible:d,className:h,style:p,enterSendsMessage:f,messageFieldVisible:m,messageFieldSpellcheck:E,messageFieldPlaceholder:_,onDeleteMessage:A,onSendMessage:O,onMessageAction:S,onFocusMessage:v,onMissingBrowserPermission:T,onSelectConversation:R,themeCustom:y,host:g,focusedMessageId:D,selectedConversationId:C,conversationFilter:N,mobileBreakPoint:k}=t;return I(LR,{style:p,className:h,selectedConversationId:C,focusedMessageId:D,chatboxProps:{appId:s,userId:a,theme:o,host:g,focusedMessageId:D,enterSendsMessage:f,chatHeaderVisible:d,messageFieldVisible:m,messageFieldSpellcheck:E,messageFieldPlaceholder:_,beforeBrowserPermissionPrompt:c,onDeleteMessage:A,onSendMessage:O,onMessageAction:S,onFocusMessage:v,onMissingBrowserPermission:T,themeCustom:y,ref:n},conversationListProps:{appId:s,userId:a,theme:o,host:g,onSelectConversation:R,conversationFilter:N,themeCustom:y,ref:r},mobileBreakPoint:k,__hostElement:l,__internalOnLoaded:u},`inbox|${t.userId}|${t.appId}`)});function xR(t){const{conversation:e,theme:n,t:r,chatbox:i,chatSearchState:o}=t.common,{ConversationImage:s,ChatSearchBox:a}=n,l=Ao(e.id,10);return t.permissions.canSearch&&o!=="hidden"?H`
|
|
1365
|
+
}`,document.head.appendChild(n),!0}})(),(function({observableFunctions:t,observableProperties:e,jsonReplacer:n,jsonReviver:r}){if(t)for(const i in t){const o=t[i];Pg.set(i,o),fd.prototype[i]=function(...s){return o.call(this,this._node,...s)}}if(e)for(const i in e){const o=e[i];Mg.set(i,o),Object.defineProperty(fd.prototype,i,{configurable:!0,get(){return o.get.call(this,this._node)},set(s){return o.set.call(this,this._node,s)}})}n&&(pd.replacer=n),r&&(pd.reviver=r)})({observableFunctions:{child:(t,e)=>$s.getProxy(t,e)}}),Ie.registerHandler(({level:t,data:e})=>{console[t]("[TalkJS]",...e)});const xA=_t(function(t,e){const n=X(null),r=te(()=>new OR(n),[]);_n(e,()=>r,[r]);const{theme:i,...o}=t,s=te(()=>({...pc,...i!=null?i:{}}),[i]),a=`chatbox|${t.userId}|${t.appId}`;return y(jm.Provider,{value:r,children:fe(SR,{...o,key:a,theme:s,ref:n})})});var Wr,ve,qe,ts;class OR{constructor(e){yr(this,ve);yr(this,Wr);Ro(this,Wr,e)}deleteMessage(e){return Ee(this,ve,qe).deleteMessage(e)}setEditing(e){Ee(this,ve,qe).setEditing(e)}editMessage(e,n){return Ee(this,ve,qe).editMessage(e,n)}sendMessage(e){return Ee(this,ve,qe).sendMessage(e)}sendFileMessage(e){return Ee(this,ve,qe).sendFileMessage(e)}sendLocationMessage(e){return Ee(this,ve,qe).sendLocationMessage(e)}setReferencedMessage(e){Ee(this,ve,qe).setReferencedMessage(e)}toggleReaction(e,n,r){return Ee(this,ve,qe).toggleReaction(e,n,r)}getMessageFieldText(){return Ee(this,ve,ts).getText()}setMessageFieldText(e){Ee(this,ve,ts).setText(e)}focusMessageField(){Ee(this,ve,ts).focus()}toggleSearchBox(e){Ee(this,ve,qe).toggleSearchBox(e)}async focusMessage(e){return Ee(this,ve,qe).focusMessage(e)}setHighlightedStrings(e){Ee(this,ve,qe).setHighlightedStrings(e)}setSearchQuery(e){Ee(this,ve,qe).setSearchQuery(e)}async jumpToPreviousHighlight(){return Ee(this,ve,qe).jumpToHighlight("up")}async jumpToNextHighlight(){return Ee(this,ve,qe).jumpToHighlight("down")}clickBackButton(){Ee(this,ve,qe).clickBackButton()}}Wr=new WeakMap,ve=new WeakSet,qe=function(){return Ee(this,Wr).current.controller},ts=function(){return Ee(this,Wr).current.editorInternals};function vR({conversation:t}){const e=oe(),n=et(),r=ou(),i=J(e.currentConversationId$),o=su(i);return y(n.ConversationListItem,{common:r,conversation:t,participants:o,isSelected:i===t.id})}function DR(){const t=oe(),e=X(null);G(()=>{let r=!0;const i=e.current;return(async function(){var s;let o=0;for(;r&&t.conversationListSubscription&&i.scrollHeight===i.clientHeight&&o<2;)await((s=t.conversationListSubscription)==null?void 0:s.loadMore(20)),o+=1})(),()=>{r=!1}},[t]);const n=q(r=>{const i=r.currentTarget;i.scrollHeight-i.clientHeight-i.scrollTop<15&&t.conversationListSubscription&&t.conversationListSubscription.loadMore(20)},[t]);return y("div",{className:"t-conversation-list-scrollable",ref:e,"t-menu-boundary":"",onScroll:n,children:y(ji,{each:t.conversationsArray$,children:r=>y(vR,{conversation:r.get()})})})}function TR(){const t=oe(),e=et(),n=ou(),r=J(t.globalSearchState$.query),i=q(s=>{t.setGlobalSearchQuery(s)},[t]),o=q(()=>{t.cancelGlobalSearch()},[t]);return y(e.GlobalSearchBox,{common:n,query:r,setQuery:i,cancel:o})}function RR({appId:t}){const e=oe(),n=(function(){const s=oe(),a=lt(()=>{const c=s.currentUser$.get(),d=s.app$.get(),h=s.errors$.get(),f=s.authTokenState$.get();return h.serverError?"server-error":h.wrongAppId?"wrong-app-id":f==="loading"||f==="idle"?"loading-token":f==="invalid"?"invalid-token":f==="expired"?"expired-token":f==="valid"?h.unknownUser?"unknown-user":c&&d?"loaded":"loading-data":void ie.unreachable()}),l=lt({type:"loading"});$i(c=>{const d=a.get(),h=s.extUserId$.peek(),f=s.appId$.peek();switch(d){case"invalid-token":l.set({type:"auth-failed"});break;case"expired-token":l.set({type:"expired-token"});break;case"wrong-app-id":l.set({type:"wrong-app-id",appId:f});break;case"server-error":l.set({type:"server-error"});break;case"loading-data":case"loading-token":l.set({type:"loading"});break;case"loaded":l.set({type:"loaded",currentUser:s.currentUser$.peek()});break;case"unknown-user":c.onCleanup=(function(p){l.set({type:"loading"});const m=setTimeout(()=>{l.set(p)},5e3);return()=>clearTimeout(m)})({type:"unknown-user",userId:h});break;default:ie.never(d)}});const u=lt({type:"loading"});return $i(c=>{if(l.type.get()==="loading"){u.set({type:"invisible-loading"});const d=setTimeout(()=>{u.set({type:"loading"})},1e3);c.onCleanup=()=>{clearTimeout(d)}}else u.set(l.get())}),J(u)})(),r=J(e.globalSearchEnabled$),i=J(e.globalSearchActive$),o=X(null);return n.type==="invisible-loading"?y(De,{}):n.type==="loading"?y(IA,{}):n.type==="unknown-user"||n.type==="auth-failed"||n.type==="wrong-app-id"||n.type==="server-error"||n.type==="unexpected-error"?y(oa,{appId:t,chatboxState:n}):n.type==="expired-token"?y(CA,{}):n.type==="loaded"?y("div",{className:"t-conversation-list-content","t-menu-boundary":"root",ref:o,children:[r&&y(TR,{}),y(i?yR:DR,{}),y(bA,{containerRef:o})]}):y(De,{})}function yR(){const t=oe(),e=et(),n=ou(),r=J(t.t$),i=J(t.globalSearchState$.messageStatus),o=J(t.globalSearchState$.conversationStatus),s=J(t.globalSearchStatus$);return y("div",s==="searching"?{className:"t-global-search-results","t-status":"loading",children:r.SEARCH_SEARCHING}:s==="noResults"?{className:"t-global-search-results","t-status":"empty",children:r.SEARCH_NO_RESULTS}:{className:"t-global-search-results","t-status":"loaded",children:[y(Id,{if:()=>t.globalSearchState$.conversationResults.get().length,children:()=>y(De,{children:[y(e.GlobalSearchResultHeader,{common:n,type:"conversations",canLoadMore:o==="canLoadMore",loadMore:()=>t.conversationSearch.loadMore()}),y(ji,{each:t.globalSearchState$.conversationResults,children:a=>y(e.GlobalSearchResultItem,{common:n,conversation:a.get(),isSelected:a.id.get()===t.globalSearchState$.selectedResultId.get()})})]})}),y(Id,{if:()=>t.globalSearchState$.messageResults.get().length,children:()=>y(De,{children:[y(e.GlobalSearchResultHeader,{common:n,type:"messages",canLoadMore:i==="canLoadMore",loadMore:()=>t.messageSearch.loadMore()}),y(ji,{each:t.globalSearchState$.messageResults,children:a=>y(e.GlobalSearchResultItem,{common:n,conversation:a.conversation.get(),message:a.message.get(),isSelected:a.message.id.get()===t.globalSearchState$.selectedResultId.get()})})]})})]})}class IR extends Wm{constructor(){super(...arguments),this.type="ConversationListStore",this.conversationListSubscription=null,this.currentConversationId$=ae(null),this.conversationsArray$=ae([]),this.conversationsMap$=ae({}),this.globalSearchState$=ae({query:"",selectedResultId:null,conversationResults:[],conversationStatus:"idle",messageResults:[],messageStatus:"idle"}),this.globalSearchStatus$=(function(e,n){const r=ae(e);return mt(i=>{const o=r.peek();let s=!0;const a=n(o);(function(l){return!!l&&typeof l=="object"&&typeof l.then=="function"})(a)?a.then(l=>{s&&r.set(l)}):r.set(a),i.onCleanup=()=>{s=!1}}),r})("idle",()=>{const e=this.globalSearchState$.conversationStatus.get(),n=this.globalSearchState$.messageStatus.get(),r=this.globalSearchState$.conversationResults.get(),i=this.globalSearchState$.messageResults.get(),o=r.length>0||i.length>0;return e==="searching"||n==="searching"?o?(s=1e3,new Promise(a=>setTimeout(a,s))).then(()=>"searching"):"searching":o||e!=="loadedAll"||n!=="loadedAll"?"idle":"noResults";var s}),this.globalSearchEnabled$=ae(()=>{var n;const e=this.app$.features.get();return(n=e==null?void 0:e.includes("search_conv_and_messages"))!=null?n:!1}),this.globalSearchActive$=ae(()=>{const e=this.globalSearchEnabled$.get(),n=this.globalSearchState$.query.get().trim();return e&&n.length>=3}),this.highlightedStrings$=ae(()=>{const e=this.globalSearchActive$.get(),n=this.globalSearchState$.query.get();return e?n.split(/\s+/).map(r=>r.trim()).filter(r=>r.length):[]})}setGlobalSearchQuery(e){this.globalSearchEnabled$.peek()?Pt(()=>{this.globalSearchState$.query.set(e),this.globalSearchActive$.peek()||this.globalSearchState$.selectedResultId.set(null)}):Ie.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}cancelGlobalSearch(){this.globalSearchEnabled$.peek()?this.setGlobalSearchQuery(""):Ie.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}}class CR{constructor(e,n,r){this.session=e,this.store=n,this.onSelectConversation=r}async selectConversation(e,n){var s;if(e===this.store.currentConversationId$.peek()&&!n)return;Pt(()=>{if(this.store.globalSearchActive$.peek()){const a=n!=null?n:e;this.store.globalSearchState$.selectedResultId.set(a)}this.store.currentConversationId$.set(e)});const r=e&&n&&await this.session.conversation(e).message(n).get(),i=e&&((s=this.store.conversationsMap$.child(e).peek())!=null?s:await this.session.conversation(e).get()),o={currentUser:this.store.currentUser$.peek(),conversation:i,...r&&{focusedMessage:r}};this.onSelectConversation(o)}jumpToHighlight(e){}}var mf,Ef,NR=(Ef||(Ef=1,mf=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((r=(o=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!(s==="_owner"&&e.$$typeof||t(e[s],n[s])))return!1}return!0}return e!=e&&n!=n}),mf);const bR=zs(NR);function wR(t,e){G(t,(function(n){const r=X(void 0);return bR(n,r.current)||(r.current=n),r.current})(e))}const kR=_t(function(t,e){const{__hostElement:n,onSelectConversation:r}=t;G(()=>{var p;(p=t.__internalOnLoaded)==null||p.call(t)},[]);const i=PA(),o=X(n!=null?n:null);MA(o);const s=St(r,n,["selectConversation","select-conversation","selectconversation","SelectConversation"]),a=te(()=>new IR(t.appId,t.userId),[]);G(()=>{Pt(()=>{a.extUserId$.set(t.userId),a.appId$.set(t.appId)})},[a,t.appId,t.userId]);const{session:l,fetcher:u}=LA(a,t);G(()=>{const p=u.subscribeToConversationListBaseData();return()=>p()},[u]),wR(()=>{const p=u.subscribeToConversationList(t.conversationFilter);return()=>p()},[u,t.conversationFilter]);const c=te(()=>new CR(l,a,s),[l,a,s]),d=X(void 0);G(()=>{t.selectedConversationId!==d.current&&(d.current=t.selectedConversationId,a.currentConversationId$.set(t.selectedConversationId||null))},[a,t.selectedConversationId]),G(()=>{const p=t.__hostElement;if(p)return a.currentConversationId$.onChange(({value:m})=>{p.selectedConversationId=m})},[a,t.__hostElement]),_n(e,()=>({controller:c}));const h=q(({error:p})=>y(oa,{appId:t.appId,chatboxState:{type:"unexpected-error",error:p}}),[t.appId]),f=i?null:y(Nm,{fallbackRender:h,children:y(Um.Provider,{value:a,children:y(xm.Provider,{value:t.theme,children:y(Bm.Provider,{value:c,children:y(Fc.Provider,{value:l,children:y(RR,{appId:t.appId})})})})})});return n?f:y("div",{className:"t-conversation-list"+(t.className?` ${t.className}`:""),style:t.style,ref:o,children:f})});var ro,Ls,FA;class LR{constructor(e){yr(this,Ls);yr(this,ro);Ro(this,ro,e)}selectConversation(e,n){return Ee(this,Ls,FA).selectConversation(e,n)}}ro=new WeakMap,Ls=new WeakSet,FA=function(){return Ee(this,ro).current.controller};const HA=_t(function(t,e){const n=X(null),r=te(()=>new LR(n),[]);_n(e,()=>r,[r]);const{theme:i,...o}=t,s=te(()=>({...pc,...i!=null?i:{}}),[i]),a=`conversation-list|${t.userId}|${t.appId}`;return y(jm.Provider,{value:r,children:fe(kR,{...o,key:a,theme:s,ref:n})})});function MR(t){const{selectedConversationId:e,focusedMessageId:n,chatboxProps:r,conversationListProps:i,style:o,__hostElement:s}=t,{onDeleteMessage:a,onSendMessage:l,onMessageAction:u,onFocusMessage:c,onMissingBrowserPermission:d,...h}=r,{onSelectConversation:f,...p}=i,[m,E]=ne(e||null),[_,A]=ne(t.focusedMessageId||null);G(()=>{E(e||null)},[e]),G(()=>{A(t.focusedMessageId||null)},[t.focusedMessageId]);const O=St(a,s,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),S=St(l,s,["sendMessage","send-message","sendmessage","SendMessage"]),v=St(u,s,["messageAction","message-action","messageaction","MessageAction"]),T=St(c,s,["focusMessage","focus-message","focusmessage","FocusMessage"]),R=St(d,s,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"]),I=St(f,s,["selectConversation","select-conversation","selectconversation","SelectConversation"]),g=q(P=>{var B,V;E((V=(B=P.conversation)==null?void 0:B.id)!=null?V:null),I(P)},[I]),D=q(P=>{var B,V;A((V=(B=P.message)==null?void 0:B.id)!=null?V:null),T(P)},[T]);G(()=>{var P;(P=t.__internalOnLoaded)==null||P.call(t)},[]);const C=X(s!=null?s:null),[N,k]=ne(void 0);Xe(()=>{var V;const P=(V=t.mobileBreakPoint)!=null?V:700,B=new ResizeObserver($=>{const z=$[0].contentRect.width;k(z>=P)});return B.observe(C.current),()=>B.disconnect()},[t.mobileBreakPoint]);const b=q(P=>{E(null),I({conversation:null,currentUser:P.currentUser})},[I]),L=m?"chatbox":"conversation-list";G(()=>{s&&(N?s.removeAttribute("t-mobile-inbox"):s.setAttribute("t-mobile-inbox",L))},[N,s,L]);const x=N===void 0?null:y(De,{children:[y(HA,{...p,onSelectConversation:g,selectedConversationId:m!=null?m:void 0}),y(xA,{...h,onDeleteMessage:O,onSendMessage:S,onMessageAction:v,onFocusMessage:D,onMissingBrowserPermission:R,onBackButtonClick:b,conversationId:m,focusedMessageId:_!=null?_:void 0})]});if(s)return x;{const P="t-inbox"+(t.className?` ${t.className}`:"");return y("div",{ref:C,style:o,className:P,"t-mobile-inbox":N?void 0:L,children:x})}}var io;class PR{constructor(e){yr(this,io);Ro(this,io,e)}get chatbox(){return Ee(this,io).current}}io=new WeakMap;const xR=_t(function(t,e){const n=X(null),r=X(null),i=te(()=>new PR(n),[]);_n(e,()=>i,[i]);const{theme:o,appId:s,userId:a,__hostElement:l,__internalOnLoaded:u,beforeBrowserPermissionPrompt:c,chatHeaderVisible:d,className:h,style:f,enterSendsMessage:p,messageFieldVisible:m,messageFieldSpellcheck:E,messageFieldPlaceholder:_,onDeleteMessage:A,onSendMessage:O,onMessageAction:S,onFocusMessage:v,onMissingBrowserPermission:T,onSelectConversation:R,themeCustom:I,host:g,focusedMessageId:D,selectedConversationId:C,conversationFilter:N,mobileBreakPoint:k}=t;return y(MR,{style:f,className:h,selectedConversationId:C,focusedMessageId:D,chatboxProps:{appId:s,userId:a,theme:o,host:g,focusedMessageId:D,enterSendsMessage:p,chatHeaderVisible:d,messageFieldVisible:m,messageFieldSpellcheck:E,messageFieldPlaceholder:_,beforeBrowserPermissionPrompt:c,onDeleteMessage:A,onSendMessage:O,onMessageAction:S,onFocusMessage:v,onMissingBrowserPermission:T,themeCustom:I,ref:n},conversationListProps:{appId:s,userId:a,theme:o,host:g,onSelectConversation:R,conversationFilter:N,themeCustom:I,ref:r},mobileBreakPoint:k,__hostElement:l,__internalOnLoaded:u},`inbox|${t.userId}|${t.appId}`)});function FR(t){const{conversation:e,theme:n,t:r,chatbox:i,chatSearchState:o}=t.common,{ConversationImage:s,ChatSearchBox:a}=n,l=Ao(e.id,10);return t.permissions.canSearch&&o!=="hidden"?H`
|
|
1366
1366
|
<div className="t-theme-chat-header">
|
|
1367
|
-
<${a}
|
|
1367
|
+
<${a}
|
|
1368
|
+
common=${t.common}
|
|
1369
|
+
searchQuery=${t.searchQuery}
|
|
1370
|
+
/>
|
|
1368
1371
|
</div>
|
|
1369
1372
|
`:H`
|
|
1370
1373
|
<div className="t-theme-chat-header">
|
|
@@ -1387,7 +1390,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1387
1390
|
</div>
|
|
1388
1391
|
|
|
1389
1392
|
<div className="t-info">
|
|
1390
|
-
<${
|
|
1393
|
+
<${HR} ...${t} />
|
|
1391
1394
|
</div>
|
|
1392
1395
|
</div>
|
|
1393
1396
|
<div className="t-actions">
|
|
@@ -1402,14 +1405,14 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1402
1405
|
</div>
|
|
1403
1406
|
</div>
|
|
1404
1407
|
</div>
|
|
1405
|
-
`}function
|
|
1408
|
+
`}function HR(t){const{common:e}=t;return e.conversation.subject?H`
|
|
1406
1409
|
<div className="t-title">${e.conversation.subject}</div>
|
|
1407
1410
|
<div className="t-subtitle">
|
|
1408
|
-
<${
|
|
1411
|
+
<${_f} ...${t} />
|
|
1409
1412
|
</div>
|
|
1410
1413
|
`:H`<div className="t-title">
|
|
1411
|
-
<${
|
|
1412
|
-
</div>`}function
|
|
1414
|
+
<${_f} ...${t} />
|
|
1415
|
+
</div>`}function _f({common:t,isUserConnected:e,permissions:n}){const{participants:r}=t,i=r.filter(({user:s})=>s.id!==t.currentUser.id),o=i.length===0?r:i;return n.showOnlineStatus?H`
|
|
1413
1416
|
<span className="t-participants">
|
|
1414
1417
|
${o.map(({user:s})=>H`
|
|
1415
1418
|
<span className="t-participant" key=${s.id}>
|
|
@@ -1421,7 +1424,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1421
1424
|
</span>
|
|
1422
1425
|
`)}
|
|
1423
1426
|
</span>
|
|
1424
|
-
`:H`<span className="t-participants">${o.map(({user:s})=>s.name).join(", ")}</span>`}function
|
|
1427
|
+
`:H`<span className="t-participants">${o.map(({user:s})=>s.name).join(", ")}</span>`}function UR({common:t}){return null}function BR(t){const{message:e,messageStatus:n,permissions:r,common:i}=t,{currentUser:o,theme:s,conversation:a,conversationId:l,t:u,focusedMessage:c}=i,{Avatar:d,ReferencedMessage:h,TimeAgo:f,MessageActionMenu:p}=s,m=Ao(l,3).length>=3,E=e.sender,_=(E==null?void 0:E.id)!==o.id&&m,A=e.referencedMessage,O=r.canReplyToMessage||r.canDeleteMessage,S=r.canAddReaction&&a.access==="ReadWrite";let v;v=E?E.id===o.id?"currentUser":"other":"system";const T=e.id===(c==null?void 0:c.id);return H`
|
|
1425
1428
|
<div
|
|
1426
1429
|
className="t-theme-message"
|
|
1427
1430
|
t-sender=${v}
|
|
@@ -1439,7 +1442,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1439
1442
|
<!-- in group chats, show the message sender name in a random color -->
|
|
1440
1443
|
${E&&_&&H`<div
|
|
1441
1444
|
className="t-message-sender-name"
|
|
1442
|
-
style=${{color:
|
|
1445
|
+
style=${{color:gA(E.id)}}
|
|
1443
1446
|
>
|
|
1444
1447
|
${E.name}
|
|
1445
1448
|
</div>`}
|
|
@@ -1448,15 +1451,15 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1448
1451
|
common=${i}
|
|
1449
1452
|
/>`}
|
|
1450
1453
|
|
|
1451
|
-
<${
|
|
1454
|
+
<${L_}
|
|
1452
1455
|
common=${i}
|
|
1453
1456
|
message=${e}
|
|
1454
1457
|
messageStatus=${n}
|
|
1455
1458
|
/>
|
|
1456
1459
|
|
|
1457
1460
|
<div className="t-message-status">
|
|
1458
|
-
<${
|
|
1459
|
-
${v=="currentUser"&&H`<${
|
|
1461
|
+
<${f} timestamp=${e.createdAt} common=${i} />
|
|
1462
|
+
${v=="currentUser"&&H`<${$R} ...${t} />`}
|
|
1460
1463
|
</div>
|
|
1461
1464
|
</div>
|
|
1462
1465
|
|
|
@@ -1464,7 +1467,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1464
1467
|
${O&&H`
|
|
1465
1468
|
<${Hr}
|
|
1466
1469
|
type="menu"
|
|
1467
|
-
popoverComponent=${
|
|
1470
|
+
popoverComponent=${p}
|
|
1468
1471
|
popoverProps=${{message:e,permissions:r,common:i}}
|
|
1469
1472
|
className="t-message-action-menu-button"
|
|
1470
1473
|
aria-label=${u.ARIA_MORE_ACTIONS}
|
|
@@ -1475,7 +1478,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1475
1478
|
${S&&H`
|
|
1476
1479
|
<${Hr}
|
|
1477
1480
|
className="t-add-reaction-button"
|
|
1478
|
-
popoverComponent=${
|
|
1481
|
+
popoverComponent=${P_}
|
|
1479
1482
|
popoverProps=${{messageId:e.id,colorScheme:"light"}}
|
|
1480
1483
|
aria-label=${u.ADD_REACTION}
|
|
1481
1484
|
>
|
|
@@ -1487,7 +1490,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1487
1490
|
|
|
1488
1491
|
${e.reactions.length>0&&H`
|
|
1489
1492
|
<div className="t-emoji-reactions">
|
|
1490
|
-
${e.reactions.map(R=>H`<${
|
|
1493
|
+
${e.reactions.map(R=>H`<${jR}
|
|
1491
1494
|
key=${R.emoji}
|
|
1492
1495
|
summary=${R}
|
|
1493
1496
|
message=${e}
|
|
@@ -1497,7 +1500,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1497
1500
|
</div>
|
|
1498
1501
|
`}
|
|
1499
1502
|
</div>
|
|
1500
|
-
`}function
|
|
1503
|
+
`}function jR({summary:t,message:e,common:n,permissions:r}){const{t:i,chatbox:o,conversationId:s}=n,{emoji:a,count:l,currentUserReacted:u}=t,[c,d]=vA(s,e.id,t.emoji),h=c.map(f=>f.user.name);return c.length&&c.length<t.count&&h.push("..."),H`
|
|
1501
1504
|
<button
|
|
1502
1505
|
className="t-reaction-button"
|
|
1503
1506
|
t-active=${u?"true":void 0}
|
|
@@ -1512,11 +1515,11 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1512
1515
|
<span className="t-emoji">${a}</span>
|
|
1513
1516
|
<span className="t-num-reactions">${l}</span>
|
|
1514
1517
|
</button>
|
|
1515
|
-
`}function
|
|
1518
|
+
`}function $R({messageStatus:t}){return t==="virtual"?null:t==="sending"?H`
|
|
1516
1519
|
<span className="t-status-icon">
|
|
1517
1520
|
<${re} type="spinner" className="t-message-loading-spinner" />
|
|
1518
1521
|
</span>
|
|
1519
|
-
`:t==="sent"?H`<span className="t-status-icon">✓</span>`:t==="everyoneRead"?H`<span className="t-status-icon">✓✓</span>`:null}function
|
|
1522
|
+
`:t==="sent"?H`<span className="t-status-icon">✓</span>`:t==="everyoneRead"?H`<span className="t-status-icon">✓✓</span>`:null}function VR(t){const{message:e,permissions:n,common:r}=t,{chatbox:i,t:o}=r;return H` <div className="t-theme-message-action-menu">
|
|
1520
1523
|
${n.canReplyToMessage&&H`
|
|
1521
1524
|
<${Tn} className="t-menu-item" onSelect=${()=>i.setReferencedMessage(e.id)}>
|
|
1522
1525
|
${o.REPLY_TO_MESSAGE}
|
|
@@ -1532,15 +1535,15 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1532
1535
|
${o.DELETE_MESSAGE}
|
|
1533
1536
|
</${Tn}>
|
|
1534
1537
|
`}
|
|
1535
|
-
</div>`}function
|
|
1538
|
+
</div>`}function zR(t){const{common:e,referencedMessage:n,editor:r,voiceRecorder:i,permissions:o,editMessageId:s}=t,{chatbox:a,device:l,conversation:u,t:c,theme:d}=e,{ReplyBar:h,VoiceRecorder:f,RecordingPreview:p}=d,m=s?"edit":"send",E=!r.atTextLimit&&!r.isEmpty&&u.access==="ReadWrite",_=m==="send"&&r.isEmpty&&o.canShareLocation,A=m==="send"&&r.isEmpty&&o.canShareFile,O=m==="send"&&l.supportsEmojiPicker&&!l.isMobile,S=m==="send"&&r.isEmpty&&o.canSendVoiceMessage,v=!i&&u.access==="ReadWrite";return H`
|
|
1536
1539
|
<div className="t-theme-message-field" t-mode=${m}>
|
|
1537
1540
|
${r.showEmojiPicker&&H`
|
|
1538
1541
|
<div className="t-emoji-picker-wrapper">
|
|
1539
|
-
<${
|
|
1542
|
+
<${du} colorScheme="light" />
|
|
1540
1543
|
</div>
|
|
1541
1544
|
`}
|
|
1542
|
-
<${
|
|
1543
|
-
<${
|
|
1545
|
+
<${j_} />
|
|
1546
|
+
<${pA} />
|
|
1544
1547
|
|
|
1545
1548
|
${n&&H`<${h}
|
|
1546
1549
|
common=${e}
|
|
@@ -1559,17 +1562,17 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1559
1562
|
</div>
|
|
1560
1563
|
`}
|
|
1561
1564
|
${(i==null?void 0:i.state)==="recording"&&H`
|
|
1562
|
-
<${
|
|
1565
|
+
<${f} common=${e} voiceRecorder=${i} />
|
|
1563
1566
|
`}
|
|
1564
1567
|
${(i==null?void 0:i.state)==="previewing"&&H`
|
|
1565
|
-
<${
|
|
1568
|
+
<${p}
|
|
1566
1569
|
common=${e}
|
|
1567
1570
|
voiceRecorder=${i}
|
|
1568
1571
|
/>
|
|
1569
1572
|
`}
|
|
1570
1573
|
${v&&H`
|
|
1571
1574
|
<div className="t-textbox-column">
|
|
1572
|
-
<${
|
|
1575
|
+
<${v_} placeholder=${c.ENTRYBOX_PLACEHOLDER} />
|
|
1573
1576
|
|
|
1574
1577
|
<div className="t-button-overlay">
|
|
1575
1578
|
${_&&H`<button
|
|
@@ -1648,7 +1651,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1648
1651
|
</div>
|
|
1649
1652
|
</div>
|
|
1650
1653
|
</div>
|
|
1651
|
-
`}function
|
|
1654
|
+
`}function YR(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return H`
|
|
1652
1655
|
<div className="t-theme-voice-recorder">
|
|
1653
1656
|
<button
|
|
1654
1657
|
className="t-close-button"
|
|
@@ -1661,7 +1664,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1661
1664
|
</button>
|
|
1662
1665
|
|
|
1663
1666
|
<div className="t-textbox-column t-waveform-wrapper">
|
|
1664
|
-
<${
|
|
1667
|
+
<${EA} className="t-waveform" voiceRecorder=${n} />
|
|
1665
1668
|
<span className="t-duration"
|
|
1666
1669
|
>${ia(n.duration)}</span
|
|
1667
1670
|
>
|
|
@@ -1679,7 +1682,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1679
1682
|
</button>
|
|
1680
1683
|
</div>
|
|
1681
1684
|
</div>
|
|
1682
|
-
`}function
|
|
1685
|
+
`}function GR(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return H`
|
|
1683
1686
|
<div className="t-theme-recording-preview">
|
|
1684
1687
|
<button
|
|
1685
1688
|
className="t-close-button"
|
|
@@ -1716,13 +1719,13 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1716
1719
|
</div>
|
|
1717
1720
|
`}
|
|
1718
1721
|
</div>
|
|
1719
|
-
`}function
|
|
1722
|
+
`}function WR(t){const{timestamp:e,isReadMarker:n,isDayMarker:r,common:i}=t,{t:o}=i;return H`
|
|
1720
1723
|
<div className="t-message-divider">
|
|
1721
1724
|
<div className="t-line" t-side="left">
|
|
1722
1725
|
<div className="t-line-segment" />
|
|
1723
1726
|
</div>
|
|
1724
1727
|
${r&&H`
|
|
1725
|
-
<span className="t-day-marker">${
|
|
1728
|
+
<span className="t-day-marker">${OA(e,o)}</span>
|
|
1726
1729
|
`}
|
|
1727
1730
|
<div className="t-line" t-side="right">
|
|
1728
1731
|
<div className="t-line-segment" />
|
|
@@ -1731,7 +1734,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1731
1734
|
`}
|
|
1732
1735
|
</div>
|
|
1733
1736
|
</div>
|
|
1734
|
-
`}function
|
|
1737
|
+
`}function XR({common:t}){return null}function KR({common:t}){const e=t.conversation.welcomeMessages;if(e.length===0)return null;const n=e.map((r,i)=>H`<${AA} key=${i} text=${r} />`);return H`<div className="t-message-group">${n.reverse()}</div>`}function qR({common:t}){const{typing:e,theme:n}=t,{Avatar:r}=n,{users:i,many:o}=e;if(!o&&i.length===0)return null;const s=o?H`<div className="t-theme-avatar">5+</div>`:i.slice(0,2).map(a=>H`<${r}
|
|
1735
1738
|
key=${a.id}
|
|
1736
1739
|
photoUrl=${mr(a)}
|
|
1737
1740
|
common=${t}
|
|
@@ -1753,13 +1756,13 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1753
1756
|
</div>
|
|
1754
1757
|
</div>
|
|
1755
1758
|
</div>
|
|
1756
|
-
`}function
|
|
1759
|
+
`}function JR({common:t}){return H`<div className="t-theme-no-conversation-selected">
|
|
1757
1760
|
${t.t.SELECT_CONVERSATION}
|
|
1758
|
-
</div>`}function
|
|
1761
|
+
</div>`}function ZR(t){return H`
|
|
1759
1762
|
<span className="t-theme-compact-message-content">
|
|
1760
|
-
<${
|
|
1763
|
+
<${QR} ...${t} />
|
|
1761
1764
|
</span>
|
|
1762
|
-
`}function
|
|
1765
|
+
`}function QR({message:t,common:e}){var i;const n=t.content[0],{t:r}=e;if(n.type==="text")return H`<${lu}
|
|
1763
1766
|
block=${n}
|
|
1764
1767
|
message=${t}
|
|
1765
1768
|
nonInteractive
|
|
@@ -1778,7 +1781,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1778
1781
|
`;if(n.subtype===void 0)return H`
|
|
1779
1782
|
<${re} type="attachment" />
|
|
1780
1783
|
${n.filename}
|
|
1781
|
-
`}return null}function
|
|
1784
|
+
`}return null}function ey(t){const{t:e,chatbox:n,chatSearchState:r}=t.common;let i;return r==="searching"?i=e.SEARCH_SEARCHING:r==="noResults"?i=e.SEARCH_NO_RESULTS:r==="noMoreResults"&&(i=e.SEARCH_NO_MORE_RESULTS),H`
|
|
1782
1785
|
<div className="t-theme-chat-search-box">
|
|
1783
1786
|
<button
|
|
1784
1787
|
className="t-button t-back-button"
|
|
@@ -1795,10 +1798,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1795
1798
|
>
|
|
1796
1799
|
${i}
|
|
1797
1800
|
</label>
|
|
1798
|
-
<${
|
|
1801
|
+
<${Eu}
|
|
1799
1802
|
id="t-search-input"
|
|
1800
1803
|
autoFocus
|
|
1801
|
-
onChange=${o=>{const s=o.target.value.trim().split(/\s+/).map(a=>a.trim()).filter(a=>a);n.setHighlightedStrings(s)}}
|
|
1802
1804
|
className="t-search-input"
|
|
1803
1805
|
placeholder=${e.SEARCH_PLACEHOLDER_TEXT}
|
|
1804
1806
|
/>
|
|
@@ -1821,7 +1823,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1821
1823
|
<${re} type="chevronDown" size="20px" />
|
|
1822
1824
|
</button>
|
|
1823
1825
|
</div>
|
|
1824
|
-
`}function
|
|
1826
|
+
`}function ty({block:t,downloadUrl:e,common:n}){return H`
|
|
1825
1827
|
<div className="t-theme-audio-block">
|
|
1826
1828
|
<${go} src=${t.url} filename=${t.filename} />
|
|
1827
1829
|
|
|
@@ -1831,7 +1833,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1831
1833
|
<span className="t-filesize"> (${_o(t.size)})</span>
|
|
1832
1834
|
</a>
|
|
1833
1835
|
</div>
|
|
1834
|
-
`}function
|
|
1836
|
+
`}function ny({block:t,downloadUrl:e,common:n}){return H`
|
|
1835
1837
|
<div className="t-theme-file-block">
|
|
1836
1838
|
<a className="t-body-text" href=${e} target="_blank">
|
|
1837
1839
|
<${re} type="attachment" className="t-attachment-icon" />
|
|
@@ -1839,7 +1841,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1839
1841
|
<span className="t-filesize"> (${_o(t.size)})</span>
|
|
1840
1842
|
</a>
|
|
1841
1843
|
</div>
|
|
1842
|
-
`}function
|
|
1844
|
+
`}function ry({block:t,downloadUrl:e,common:n}){const r={"--img-w":t.width||1,"--img-h":t.height||1};return H`
|
|
1843
1845
|
<div className="t-theme-image-block">
|
|
1844
1846
|
<a
|
|
1845
1847
|
href=${t.url}
|
|
@@ -1858,7 +1860,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1858
1860
|
<span className="t-filesize"> (${_o(t.size)})</span>
|
|
1859
1861
|
</a>
|
|
1860
1862
|
</div>
|
|
1861
|
-
`}function
|
|
1863
|
+
`}function iy({block:t}){const{imageUrl:e,linkUrl:n}=Au(t);return H`
|
|
1862
1864
|
<div className="t-theme-location-block">
|
|
1863
1865
|
<a
|
|
1864
1866
|
href=${n}
|
|
@@ -1873,11 +1875,11 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1873
1875
|
>
|
|
1874
1876
|
</span>
|
|
1875
1877
|
</div>
|
|
1876
|
-
`}function
|
|
1878
|
+
`}function oy({block:t,message:e}){return H`
|
|
1877
1879
|
<div className="t-theme-text-block">
|
|
1878
|
-
<${
|
|
1880
|
+
<${lu} block=${t} message=${e} />
|
|
1879
1881
|
</div>
|
|
1880
|
-
`}function
|
|
1882
|
+
`}function sy({block:t,downloadUrl:e,common:n}){return H`
|
|
1881
1883
|
<div className="t-theme-video-block">
|
|
1882
1884
|
<div className="t-video-wrapper">
|
|
1883
1885
|
<div className="t-root" style=${{"--video-w":t.width||1,"--video-h":t.height||1}}>
|
|
@@ -1899,16 +1901,16 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1899
1901
|
<span className="t-filesize"> (${_o(t.size)})</span>
|
|
1900
1902
|
</a>
|
|
1901
1903
|
</div>
|
|
1902
|
-
`}function
|
|
1904
|
+
`}function ay({block:t}){return H`<${go}
|
|
1903
1905
|
className="t-theme-voice-block"
|
|
1904
1906
|
src=${t.url}
|
|
1905
1907
|
filename=${t.filename}
|
|
1906
|
-
/>`}function
|
|
1908
|
+
/>`}function ly({photoUrl:t}){return H`
|
|
1907
1909
|
<div
|
|
1908
1910
|
className="t-theme-avatar"
|
|
1909
1911
|
style=${{backgroundImage:`url(${t})`}}
|
|
1910
1912
|
/>
|
|
1911
|
-
`}function
|
|
1913
|
+
`}function cy({common:t,conversation:e,participants:n}){const{currentUser:r,theme:i}=t,{Avatar:o,GroupChatImage:s}=i;return e.photoUrl?H`<${o}
|
|
1912
1914
|
photoUrl=${e.photoUrl}
|
|
1913
1915
|
common=${t}
|
|
1914
1916
|
/>`:n.length===0?null:n.length===1?H`<${o}
|
|
@@ -1919,7 +1921,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1919
1921
|
common=${t}
|
|
1920
1922
|
/>`:H`
|
|
1921
1923
|
<${s} participants=${n} common=${t} />
|
|
1922
|
-
`}function
|
|
1924
|
+
`}function uy({participants:t}){return H`
|
|
1923
1925
|
<div className="t-theme-group-chat-image">
|
|
1924
1926
|
<div
|
|
1925
1927
|
className="t-mini-avatar"
|
|
@@ -1967,7 +1969,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1967
1969
|
</text>
|
|
1968
1970
|
</svg>`}
|
|
1969
1971
|
</div>
|
|
1970
|
-
`}function
|
|
1972
|
+
`}function dy({referencedMessage:t,common:e}){const{theme:n,chatbox:r}=e,{CompactMessageContent:i}=n;return H`
|
|
1971
1973
|
<div
|
|
1972
1974
|
className="t-theme-referenced-message"
|
|
1973
1975
|
onClick=${()=>r.focusMessage(t.id)}
|
|
@@ -1980,7 +1982,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1980
1982
|
/>
|
|
1981
1983
|
</div>
|
|
1982
1984
|
</div>
|
|
1983
|
-
`}function
|
|
1985
|
+
`}function hy(t){const{common:e,referencedMessage:n}=t,{chatbox:r,t:i,theme:o}=e,{CompactMessageContent:s}=o;return H`
|
|
1984
1986
|
<div className="t-theme-reply-bar">
|
|
1985
1987
|
<${re} className="t-reply-icon" type="reply" />
|
|
1986
1988
|
|
|
@@ -2006,7 +2008,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
2006
2008
|
<${re} className="t-close-icon" type="close" />
|
|
2007
2009
|
</button>
|
|
2008
2010
|
</div>
|
|
2009
|
-
`}function
|
|
2011
|
+
`}function py(t){return t.timestamp===-1?null:H`<${fy} ...${t} />`}function fy({timestamp:t,common:e}){const{t:n}=e,r=new Date(t).toLocaleString(n.locale,{weekday:"short",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),i=SA(t,n);return H`
|
|
2010
2012
|
<span className="t-theme-time-ago">
|
|
2011
2013
|
<span
|
|
2012
2014
|
role="time"
|
|
@@ -2016,7 +2018,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
2016
2018
|
${i.short}
|
|
2017
2019
|
</span>
|
|
2018
2020
|
</span>
|
|
2019
|
-
`}function
|
|
2021
|
+
`}function my(t){var A,O,S;const{common:e,conversation:n,isSelected:r}=t,{currentUser:i,theme:o,conversationList:s}=e,{TimeAgo:a,ConversationImage:l,CompactMessageContent:u}=o,{lastMessage:c}=n,d=Ao(n.id,10),h=d.length>=3,f=(A=c==null?void 0:c.sender)==null?void 0:A.name,p=(O=c==null?void 0:c.editedAt)!=null?O:c==null?void 0:c.createdAt,m=d.filter(v=>v.user.id!==i.id),E=m.length?m:d,_=(S=n.subject)!=null?S:E.map(v=>v.user.name).join(", ");return H`
|
|
2020
2022
|
<div
|
|
2021
2023
|
className="t-theme-conversation-list-item"
|
|
2022
2024
|
t-unread=${n.unreadMessageCount?"":void 0}
|
|
@@ -2033,9 +2035,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
2033
2035
|
<div className="t-header">
|
|
2034
2036
|
<div className="t-conversation-name">${_}</div>
|
|
2035
2037
|
|
|
2036
|
-
${
|
|
2038
|
+
${p&&H`
|
|
2037
2039
|
<span className="t-timestamp">
|
|
2038
|
-
<${a} timestamp=${
|
|
2040
|
+
<${a} timestamp=${p} common=${e} />
|
|
2039
2041
|
</span>
|
|
2040
2042
|
`}
|
|
2041
2043
|
</div>
|
|
@@ -2043,7 +2045,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
2043
2045
|
<div className="t-body">
|
|
2044
2046
|
${c&&H`
|
|
2045
2047
|
<div className="t-message">
|
|
2046
|
-
${h&&
|
|
2048
|
+
${h&&f&&H`<span className="t-message-sender">${f}:</span>`}
|
|
2047
2049
|
|
|
2048
2050
|
<${u}
|
|
2049
2051
|
message=${c}
|
|
@@ -2052,11 +2054,11 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
2052
2054
|
</div>
|
|
2053
2055
|
`}
|
|
2054
2056
|
|
|
2055
|
-
<${
|
|
2057
|
+
<${Ey} ...${t} />
|
|
2056
2058
|
</div>
|
|
2057
2059
|
</div>
|
|
2058
2060
|
</div>
|
|
2059
|
-
`}function
|
|
2061
|
+
`}function Ey({conversation:t}){const{isUnread:e,unreadMessageCount:n}=t;return e?n===0?H`<div className="t-unread-generic-dot" />`:n>999?H`
|
|
2060
2062
|
<div className="t-unread-dot">
|
|
2061
2063
|
<span>999+</span>
|
|
2062
2064
|
</div>
|
|
@@ -2064,7 +2066,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
2064
2066
|
<div className="t-unread-dot">
|
|
2065
2067
|
<span>${n}</span>
|
|
2066
2068
|
</div>
|
|
2067
|
-
`:null}function
|
|
2069
|
+
`:null}function _y(t){var A,O,S;const{common:e,conversation:n,message:r,isSelected:i}=t,{currentUser:o,theme:s,conversationList:a}=e,{TimeAgo:l,ConversationImage:u,CompactMessageContent:c}=s,d=Ao(n.id,10),h=d.length>=3,f=(A=r==null?void 0:r.sender)==null?void 0:A.name,p=(O=r==null?void 0:r.editedAt)!=null?O:r==null?void 0:r.createdAt,m=d.filter(v=>v.user.id!==o.id),E=m.length?m:d,_=(S=n.subject)!=null?S:E.map(v=>v.user.name).join(", ");return H`
|
|
2068
2070
|
<div
|
|
2069
2071
|
className="t-theme-global-search-result-item"
|
|
2070
2072
|
t-selected=${i?"":void 0}
|
|
@@ -2082,9 +2084,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
2082
2084
|
<${dr} text=${_} />
|
|
2083
2085
|
</div>
|
|
2084
2086
|
|
|
2085
|
-
${
|
|
2087
|
+
${p&&H`
|
|
2086
2088
|
<span className="t-timestamp">
|
|
2087
|
-
<${l} timestamp=${
|
|
2089
|
+
<${l} timestamp=${p} common=${e} />
|
|
2088
2090
|
</span>
|
|
2089
2091
|
`}
|
|
2090
2092
|
</div>
|
|
@@ -2092,8 +2094,8 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
2092
2094
|
<div className="t-body">
|
|
2093
2095
|
${r&&H`
|
|
2094
2096
|
<div className="t-message">
|
|
2095
|
-
${h&&
|
|
2096
|
-
<${dr} text=${
|
|
2097
|
+
${h&&f&&H`<span className="t-message-sender">
|
|
2098
|
+
<${dr} text=${f} />:
|
|
2097
2099
|
</span>`}
|
|
2098
2100
|
<${c} message=${r} common=${e} />
|
|
2099
2101
|
</div>
|
|
@@ -2101,19 +2103,17 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
2101
2103
|
</div>
|
|
2102
2104
|
</div>
|
|
2103
2105
|
</div>
|
|
2104
|
-
`}function
|
|
2106
|
+
`}function Ay(t){const{common:e,query:n,cancel:r}=t,{t:i}=e;return H`
|
|
2105
2107
|
<div className="t-theme-global-search-box">
|
|
2106
|
-
<${
|
|
2107
|
-
value=${n}
|
|
2108
|
-
onChange=${s=>r(s.target.value)}
|
|
2108
|
+
<${Eu}
|
|
2109
2109
|
className="t-input"
|
|
2110
|
-
placeholder=${
|
|
2110
|
+
placeholder=${i.SEARCH_PLACEHOLDER_TEXT}
|
|
2111
2111
|
/>
|
|
2112
2112
|
${n.length>0&&H`
|
|
2113
2113
|
<button
|
|
2114
2114
|
type="button"
|
|
2115
|
-
onClick=${
|
|
2116
|
-
aria-label=${
|
|
2115
|
+
onClick=${r}
|
|
2116
|
+
aria-label=${i.ARIA_LEAVE_SEARCH_MODE}
|
|
2117
2117
|
className="t-clear"
|
|
2118
2118
|
>
|
|
2119
2119
|
<${re} type="close" size="20px" />
|
|
@@ -2121,7 +2121,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
2121
2121
|
`}
|
|
2122
2122
|
${n.length===0&&H` <${re} className="t-submit" size="20px" type="search" /> `}
|
|
2123
2123
|
</div>
|
|
2124
|
-
`}function
|
|
2124
|
+
`}function gy(t){const{common:e,canLoadMore:n,loadMore:r,type:i}=t,{t:o}=e;return H`
|
|
2125
2125
|
<div className="t-theme-global-search-result-header">
|
|
2126
2126
|
<span className="t-title">${i==="messages"?o.SEARCH_RESULTS_MESSAGES:o.SEARCH_RESULTS_CONVERSATIONS}</span>
|
|
2127
2127
|
${n&&H`
|
|
@@ -2130,4 +2130,4 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
2130
2130
|
</button>
|
|
2131
2131
|
`}
|
|
2132
2132
|
</div>
|
|
2133
|
-
`}const
|
|
2133
|
+
`}const Sy=new Promise(t=>{typeof document!="undefined"&&document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t,{once:!0}):t(void 0)});function Su(t,e,n,r){const i=new Map,o=[],s=[];for(const[d,h]of(a=n,Object.entries(a))){const f=[d,d.toLowerCase(),Oy(d)];for(const p of f)i.set(p,d);["string","boolean","number"].includes(h.type)&&o.push(...f),h.required!==!1&&s.push(d)}var a;const c=class c extends HTMLElement{constructor(){super(),this._renderRequested=!1,this._props={},this._renderRoot=null,this._ref={current:null};for(const[h,f]of i)if(Object.hasOwnProperty.call(this,h)){const p=this[h];this.updateProp(f,p),delete this[h]}else this.hasAttribute(h)&&this.syncAttributeToProp(h)}updateProp(h,f){const{type:p}=n[h];if(p==="boolean"&&typeof f=="string"?f=f!=="false":p==="number"&&typeof f=="string"&&(f=Number(f)),f===void 0){const m=h in this._props;return delete this._props[h],m}{const m=this._props[h]!==f;return this._props[h]=f,m}}syncAttributeToProp(h){const f=i.get(h);ie(f,`Attribute "${h}" should have matching prop`);const p=this.getAttribute(h);return this.updateProp(f,p)}async requestRender(){this.isConnected&&!this._renderRequested&&(this._renderRequested=!0,this._renderRequested=await!1,this.render())}render(){var h;this._renderRoot||(this._renderRoot=(h=this,{render:function(_){Rc(_,h)},unmount:function(){Ic(h)}}));const f=s.filter(_=>!(_ in this._props));if(f.length>0)return r(f),void this._renderRoot.render(null);const p=Object.assign({},this._props),m=_=>{const A=[...Object.getOwnPropertyNames(_.current),...Object.getOwnPropertyNames(Object.getPrototypeOf(_.current))];for(const O of A)O!=="constructor"&&(typeof _.current[O]=="function"?this[O]=(...S)=>(this._renderRequested&&this.render(),_.current[O](...S)):Object.defineProperty(this,O,{enumerable:!0,get:()=>_.current[O]}))},E=t;xs(()=>{this._renderRoot.render(y(E,{...p,ref:this._ref,__hostElement:this,__internalOnLoaded:()=>{m(this._ref)}}))})}async connectedCallback(){await Sy;for(const h of o)this.hasAttribute(h)&&this.syncAttributeToProp(h);this.requestRender()}disconnectedCallback(){this._renderRoot&&setTimeout(()=>{this._renderRoot&&(this._renderRoot.unmount(),this._renderRoot=null)})}attributeChangedCallback(h,f,p){f!==p&&this.syncAttributeToProp(h)&&this.requestRender()}};c.observedAttributes=o;let l=c;const u={};for(const[d,h]of i)u[d]={set(f){this.updateProp(h,f)&&this.requestRender()},get(){return this._props[h]}};return Object.defineProperties(l.prototype,u),Object.defineProperty(l,"name",{value:e}),l}function Oy(t){return t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,n)=>(n?"-":"")+e.toLowerCase())}function Ou(t,e){const n=JSON.stringify(e).replace(",",", ");Ie.error(`Could not initialize ${t} because the following required props are missing: ${n}.`)}const Af=Su(xA,"ChatboxElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},conversationId:{type:"string"},theme:{type:"object",required:!1},token:{type:"string",required:!1},tokenFetcher:{type:"function",required:!1},host:{type:"string",required:!1},focusedMessageId:{type:"string",required:!1},enterSendsMessage:{type:"boolean",required:!1},chatHeaderVisible:{type:"boolean",required:!1},messageFieldVisible:{type:"boolean",required:!1},messageFieldSpellcheck:{type:"boolean",required:!1},messageFieldPlaceholder:{type:"string",required:!1},onSendMessage:{type:"function",required:!1},onDeleteMessage:{type:"function",required:!1},onMessageAction:{type:"function",required:!1},onFocusMessage:{type:"function",required:!1},beforeBrowserPermissionPrompt:{type:"function",required:!1},onMissingBrowserPermission:{type:"function",required:!1},themeCustom:{type:"object",required:!1}},t=>Ou("<t-chatbox>",t)),gf=Su(HA,"ConversationListElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},selectedConversationId:{type:"string",required:!1},theme:{type:"object",required:!1},token:{type:"string",required:!1},tokenFetcher:{type:"function",required:!1},host:{type:"string",required:!1},onSelectConversation:{type:"function",required:!1},conversationFilter:{type:"object",required:!1},themeCustom:{type:"object",required:!1}},t=>Ou("<t-conversation-list>",t)),Sf=Su(xR,"InboxElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},selectedConversationId:{type:"string",required:!1},focusedMessageId:{type:"string",required:!1},mobileBreakPoint:{type:"number",required:!1},theme:{type:"object",required:!1},host:{type:"string",required:!1},enterSendsMessage:{type:"boolean",required:!1},chatHeaderVisible:{type:"boolean",required:!1},messageFieldVisible:{type:"boolean",required:!1},messageFieldSpellcheck:{type:"boolean",required:!1},messageFieldPlaceholder:{type:"string",required:!1},onSendMessage:{type:"function",required:!1},onDeleteMessage:{type:"function",required:!1},onMessageAction:{type:"function",required:!1},onFocusMessage:{type:"function",required:!1},beforeBrowserPermissionPrompt:{type:"function",required:!1},onMissingBrowserPermission:{type:"function",required:!1},onSelectConversation:{type:"function",required:!1},conversationFilter:{type:"object",required:!1},themeCustom:{type:"object",required:!1}},t=>Ou("<t-inbox>",t)),vy=pc;customElements.get("t-chatbox")||customElements.define("t-chatbox",Af),customElements.get("t-conversation-list")||customElements.define("t-conversation-list",gf),customElements.get("t-inbox")||customElements.define("t-inbox",Sf),exports.AudioPlayer=go,exports.ChatboxElement=Af,exports.ConversationListElement=gf,exports.Editor=v_,exports.EmojiPicker=du,exports.EmojiSuggestBar=j_,exports.Highlightable=dr,exports.Icon=re,exports.InboxElement=Sf,exports.MentionSuggestList=pA,exports.MenuItem=Tn,exports.MessageContent=L_,exports.PopoverButton=Hr,exports.Preact=Cc,exports.ReactionPicker=P_,exports.SearchInput=Eu,exports.Text=lu,exports.VirtualMessage=AA,exports.Waveform=EA,exports.defaultTheme=vy,exports.formatDuration=ia,exports.formatFilesize=_o,exports.getGoogleMapsUrls=Au,exports.getPhotoUrlWithFallback=mr,exports.getRandomColor=gA,exports.html=H,exports.useParticipants=Ao,exports.useReactions=vA,exports.useTimeAgo=SA,exports.userFriendlyDate=OA;
|