@bigbinary/neeto-editor 0.12.16 → 0.12.17

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/build/index.js CHANGED
@@ -57,5 +57,5 @@ return e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();functio
57
57
 
58
58
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
59
59
  */
60
- return function(t){var n=e,i=n.lib,o=i.WordArray,r=i.Hasher,s=n.algo,a=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),p=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=o.create([0,1518500249,1859775393,2400959708,2840853838]),d=o.create([1352829926,1548603684,1836072691,2053994217,0]),h=s.RIPEMD160=r.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var i=t+n,o=e[i];e[i]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var r,s,h,x,w,k,_,E,M,C,D,O=this._hash.words,T=u.words,N=d.words,S=a.words,A=l.words,j=c.words,I=p.words;for(k=r=O[0],_=s=O[1],E=h=O[2],M=x=O[3],C=w=O[4],n=0;n<80;n+=1)D=r+e[t+S[n]]|0,D+=n<16?m(s,h,x)+T[0]:n<32?f(s,h,x)+T[1]:n<48?g(s,h,x)+T[2]:n<64?b(s,h,x)+T[3]:v(s,h,x)+T[4],D=(D=y(D|=0,j[n]))+w|0,r=w,w=x,x=y(h,10),h=s,s=D,D=k+e[t+A[n]]|0,D+=n<16?v(_,E,M)+N[0]:n<32?b(_,E,M)+N[1]:n<48?g(_,E,M)+N[2]:n<64?f(_,E,M)+N[3]:m(_,E,M)+N[4],D=(D=y(D|=0,I[n]))+C|0,k=C,C=M,M=y(E,10),E=_,_=D;D=O[1]+h+M|0,O[1]=O[2]+x+C|0,O[2]=O[3]+w+k|0,O[3]=O[4]+r+_|0,O[4]=O[0]+s+E|0,O[0]=D},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;t[i>>>5]|=128<<24-i%32,t[(i+64>>>9<<4)+14]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,r=o.words,s=0;s<5;s++){var a=r[s];r[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return o},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function m(e,t,n){return e^t^n}function f(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function b(e,t,n){return e&n|t&~n}function v(e,t,n){return e^(t|~n)}function y(e,t){return e<<t|e>>>32-t}n.RIPEMD160=r._createHelper(h),n.HmacRIPEMD160=r._createHmacHelper(h)}(),e.RIPEMD160}(IN())),yS(),xS||(xS=1,wS.exports=function(e){return function(){var t=e,n=t.lib,i=n.Base,o=n.WordArray,r=t.algo,s=r.SHA1,a=r.HMAC,l=r.PBKDF2=i.extend({cfg:i.extend({keySize:128/32,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,i=a.create(n.hasher,e),r=o.create(),s=o.create([1]),l=r.words,c=s.words,p=n.keySize,u=n.iterations;l.length<p;){var d=i.update(t).finalize(s);i.reset();for(var h=d.words,m=h.length,f=d,g=1;g<u;g++){f=i.finalize(f),i.reset();for(var b=f.words,v=0;v<m;v++)h[v]^=b[v]}r.concat(d),c[0]++}return r.sigBytes=4*p,r}});t.PBKDF2=function(e,t,n){return l.create(n).compute(e,t)}}(),e.PBKDF2}(IN(),tS(),yS())),ES(),DS(),NS(),jS(),LS(),BS(),PS||(PS=1,US.exports=function(e){return e.mode.ECB=((t=e.lib.BlockCipherMode.extend()).Encryptor=t.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),t.Decryptor=t.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),t),e.mode.ECB;var t}(IN(),DS())),HS||(HS=1,$S.exports=function(e){return e.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,i=4*t,o=i-n%i,r=n+o-1;e.clamp(),e.words[r>>>2]|=o<<24-r%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923}(IN(),DS())),WS||(WS=1,qS.exports=function(e){return e.pad.Iso10126={pad:function(t,n){var i=4*n,o=i-t.sigBytes%i;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126}(IN(),DS())),VS||(VS=1,KS.exports=function(e){return e.pad.Iso97971={pad:function(t,n){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,n)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971}(IN(),DS())),YS||(YS=1,QS.exports=function(e){return e.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},e.pad.ZeroPadding}(IN(),DS())),GS||(GS=1,ZS.exports=function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding}(IN(),DS())),JS||(JS=1,XS.exports=function(e){return function(t){var n=e,i=n.lib.CipherParams,o=n.enc.Hex;n.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var t=o.parse(e);return i.create({ciphertext:t})}}}(),e.format.Hex}(IN(),DS())),eA||(eA=1,tA.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,i=t.algo,o=[],r=[],s=[],a=[],l=[],c=[],p=[],u=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,i=0;for(t=0;t<256;t++){var m=i^i<<1^i<<2^i<<3^i<<4;m=m>>>8^255&m^99,o[n]=m,r[m]=n;var f=e[n],g=e[f],b=e[g],v=257*e[m]^16843008*m;s[n]=v<<24|v>>>8,a[n]=v<<16|v>>>16,l[n]=v<<8|v>>>24,c[n]=v,v=16843009*b^65537*g^257*f^16843008*n,p[m]=v<<24|v>>>8,u[m]=v<<16|v>>>16,d[m]=v<<8|v>>>24,h[m]=v,n?(n=f^e[e[e[b^f]]],i^=e[e[i]]):n=i=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],f=i.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,i=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],s=0;s<i;s++)s<n?r[s]=t[s]:(c=r[s-1],s%n?n>6&&s%n==4&&(c=o[c>>>24]<<24|o[c>>>16&255]<<16|o[c>>>8&255]<<8|o[255&c]):(c=o[(c=c<<8|c>>>24)>>>24]<<24|o[c>>>16&255]<<16|o[c>>>8&255]<<8|o[255&c],c^=m[s/n|0]<<24),r[s]=r[s-n]^c);for(var a=this._invKeySchedule=[],l=0;l<i;l++){if(s=i-l,l%4)var c=r[s];else c=r[s-4];a[l]=l<4||s<=4?c:p[o[c>>>24]]^u[o[c>>>16&255]]^d[o[c>>>8&255]]^h[o[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,l,c,o)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,p,u,d,h,r),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,o,r,s,a){for(var l=this._nRounds,c=e[t]^n[0],p=e[t+1]^n[1],u=e[t+2]^n[2],d=e[t+3]^n[3],h=4,m=1;m<l;m++){var f=i[c>>>24]^o[p>>>16&255]^r[u>>>8&255]^s[255&d]^n[h++],g=i[p>>>24]^o[u>>>16&255]^r[d>>>8&255]^s[255&c]^n[h++],b=i[u>>>24]^o[d>>>16&255]^r[c>>>8&255]^s[255&p]^n[h++],v=i[d>>>24]^o[c>>>16&255]^r[p>>>8&255]^s[255&u]^n[h++];c=f,p=g,u=b,d=v}f=(a[c>>>24]<<24|a[p>>>16&255]<<16|a[u>>>8&255]<<8|a[255&d])^n[h++],g=(a[p>>>24]<<24|a[u>>>16&255]<<16|a[d>>>8&255]<<8|a[255&c])^n[h++],b=(a[u>>>24]<<24|a[d>>>16&255]<<16|a[c>>>8&255]<<8|a[255&p])^n[h++],v=(a[d>>>24]<<24|a[c>>>16&255]<<16|a[p>>>8&255]<<8|a[255&u])^n[h++],e[t]=f,e[t+1]=g,e[t+2]=b,e[t+3]=v},keySize:256/32});t.AES=n._createHelper(f)}(),e.AES}(IN(),VN(),JN(),ES(),DS())),oA(),rA||(rA=1,sA.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,i=t.algo,o=i.RC4=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,i=this._S=[],o=0;o<256;o++)i[o]=o;o=0;for(var r=0;o<256;o++){var s=o%n,a=t[s>>>2]>>>24-s%4*8&255;r=(r+i[o]+a)%256;var l=i[o];i[o]=i[r],i[r]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=r.call(this)},keySize:256/32,ivSize:0});function r(){for(var e=this._S,t=this._i,n=this._j,i=0,o=0;o<4;o++){n=(n+e[t=(t+1)%256])%256;var r=e[t];e[t]=e[n],e[n]=r,i|=e[(e[t]+e[n])%256]<<24-8*o}return this._i=t,this._j=n,i}t.RC4=n._createHelper(o);var s=i.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)r.call(this)}});t.RC4Drop=n._createHelper(s)}(),e.RC4}(IN(),VN(),JN(),ES(),DS())),aA||(aA=1,lA.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,i=t.algo,o=[],r=[],s=[],a=i.Rabbit=n.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var i=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)o[n]^=i[n+4&7];if(t){var r=t.words,s=r[0],a=r[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),p=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=c>>>16|4294901760&p,d=p<<16|65535&c;for(o[0]^=c,o[1]^=u,o[2]^=p,o[3]^=d,o[4]^=c,o[5]^=u,o[6]^=p,o[7]^=d,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)o[i]=16711935&(o[i]<<8|o[i]>>>24)|4278255360&(o[i]<<24|o[i]>>>8),e[t+i]^=o[i]},blockSize:128/32,ivSize:64/32});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)r[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<r[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<r[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<r[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<r[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<r[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<r[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<r[6]>>>0?1:0)|0,this._b=t[7]>>>0<r[7]>>>0?1:0,n=0;n<8;n++){var i=e[n]+t[n],o=65535&i,a=i>>>16,l=((o*o>>>17)+o*a>>>15)+a*a,c=((4294901760&i)*i|0)+((65535&i)*i|0);s[n]=l^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.Rabbit=n._createHelper(a)}(),e.Rabbit}(IN(),VN(),JN(),ES(),DS())),cA||(cA=1,pA.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,i=t.algo,o=[],r=[],s=[],a=i.RabbitLegacy=n.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)l.call(this);for(o=0;o<8;o++)i[o]^=n[o+4&7];if(t){var r=t.words,s=r[0],a=r[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),p=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=c>>>16|4294901760&p,d=p<<16|65535&c;for(i[0]^=c,i[1]^=u,i[2]^=p,i[3]^=d,i[4]^=c,i[5]^=u,i[6]^=p,i[7]^=d,o=0;o<4;o++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)o[i]=16711935&(o[i]<<8|o[i]>>>24)|4278255360&(o[i]<<24|o[i]>>>8),e[t+i]^=o[i]},blockSize:128/32,ivSize:64/32});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)r[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<r[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<r[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<r[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<r[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<r[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<r[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<r[6]>>>0?1:0)|0,this._b=t[7]>>>0<r[7]>>>0?1:0,n=0;n<8;n++){var i=e[n]+t[n],o=65535&i,a=i>>>16,l=((o*o>>>17)+o*a>>>15)+a*a,c=((4294901760&i)*i|0)+((65535&i)*i|0);s[n]=l^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.RabbitLegacy=n._createHelper(a)}(),e.RabbitLegacy}(IN(),VN(),JN(),ES(),DS())));const dA=async e=>{const t=await(e=>new Promise(((t,n)=>{const i=new FileReader;i.onload=e=>{const n=uA.lib.WordArray.create(e.target.result);t(uA.MD5(n))},i.onerror=()=>n(new Error("Corrupted file")),i.readAsArrayBuffer(e)})))(e);return t.toString(uA.enc.Base64)};class hA{constructor(e){let{url:t,file:n,progress:i=Hp}=e;If(this,"create",(async()=>{const{data:e}=await this.generateUrl(),{direct_upload:{url:t,headers:n}}=e;return await this.uploadToCloud(t,n),e})),If(this,"generateUrl",(async()=>{const e={blob:{filename:this.file.name,byte_size:this.file.size,content_type:this.file.type,checksum:await dA(this.file)}};return ON(this.url,e)})),If(this,"abort",(()=>this.abortController.abort())),If(this,"uploadToCloud",((e,t)=>{const n={headers:t,onUploadProgress:this.progress,signal:this.abortController.signal};return TN(e,this.file,n)})),this.url=t,this.file=n,this.progress=i,this.abortController=new AbortController}}class mA extends Tw.exports.BasePlugin{constructor(e,t){super(e,t),If(this,"upload",(e=>{if(0===e.length)return Promise.resolve();const t=e.map((e=>this.uploadFile(this.uppy.getFile(e))));return Promise.all(t)})),If(this,"uploadFile",(async e=>{this.uppy.on("file-removed",(n=>{n.id===e.id&&t.abort()})),this.uppy.on("upload-cancel",(n=>{n===e.id&&t.abort()})),this.uppy.on("cancel-all",(()=>t.abort()));const t=new hA({file:e.data,url:this.opts.directUploadUrl,progress:t=>{t.lengthComputable&&this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded,bytesTotal:t.total})}});try{const n=await t.create();return this.uppy.setFileState(e.id,{response:{status:"success"}}),this.uppy.emit("upload-success",e,n),e}catch(t){throw this.uppy.setFileState(e.id,{response:{status:"error"}}),this.uppy.emit("upload-error",e,t),t}})),this.type="uploader",this.id=t.id||"ActiveStorageUpload",this.title=t.title||"Active Storage Upload"}install(){this.uppy.addUploader(this.upload)}uninstall(){this.uppy.removeUploader(this.upload)}}const fA=e=>{var n;let{uppy:i}=e;const[s,a]=o(0);r((()=>{i.on("progress",a)}),[i]);const l=`${s}%`;return t.createElement("div",{className:"neeto-editor-image-uploader__progress"},t.createElement("p",{className:"neeto-editor-image-uploader__progress-title"},"Uploading..."),t.createElement("p",{className:"neeto-editor-image-uploader__progress-file"},null===(n=i.getFiles()[0])||void 0===n?void 0:n.name),t.createElement("div",{className:"neeto-editor-progress-bar__wrapper","data-cy":"neeto-editor-image-upload-progress-bar"},t.createElement("div",{className:"neeto-editor-progress-bar__percent"},t.createElement("p",null,l),t.createElement(ef,{icon:Yd,onClick:()=>i.cancelAll(),size:"small",style:"text"})),t.createElement("div",{className:"neeto-editor-progress-bar__indicator"},t.createElement("div",{style:{width:l},className:"neeto-editor-progress-bar__indicator-inner"}))))},gA=e=>{const t=["B","KB","MB","GB"];let n=0;for(;e>=1024&&n<t.length;)e/=1024,++n;return`${e.toFixed(1)} ${t[n]}`},bA=e=>{let{endpoint:n,onSuccess:i,uploadConfig:r}=e;const[s,a]=o(!1),[l,c]=o(""),p={...Cw,...r},u=function(e){if("function"!=typeof e)throw new TypeError("useUppy: expected a function that returns a new Uppy instance");const t=CN(void 0);if(void 0===t.current&&(t.current=e(),!(t.current instanceof DN)))throw new TypeError(`useUppy: factory function must return an Uppy instance, got ${typeof t.current}`);return MN((()=>()=>{t.current.close({reason:"unmount"}),t.current=void 0}),[t]),t.current}((()=>new EE({...p,onBeforeFileAdded:e=>{const{maxFileSize:t,allowedFileTypes:n}=p.restrictions;return e.size>t?(c(`File size is too large. Max size is ${gA(p.restrictions.maxFileSize)}.`),!1):!!n.includes(`.${e.extension}`)||(c(`File type is not permitted. Allowed file types are: ${n.join(", ")}.`),!1)}}).use(mA,{directUploadUrl:n,...Dw}).on("upload",(()=>a(!0))).on("upload-success",((e,t)=>{let{blob_url:n}=t;return i(n)})).on("cancel-all",(()=>a(!1))).on("complete",(()=>a(!1)))));return s?t.createElement(fA,{uppy:u}):t.createElement("div",{className:"neeto-editor-image-uploader__dnd-wrapper"},t.createElement(VT,{className:"neeto-editor-image-uploader__dnd",note:`Max. File Size: ${gA(p.restrictions.maxFileSize)}`,locale:{strings:{dropHereOr:"Drop your file(s) here or %{browse}",browse:"Browse"}},uppy:u,"data-cy":"neeto-editor-image-local-uploader"}),l&&t.createElement("p",{className:"neeto-editor-image-uploader__dnd--error"},l))},vA=()=>t.createElement("div",{className:"neeto-editor-loader"},t.createElement("span",{className:"neeto-editor-loader__spinner-icon"}));var yA={},xA=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},wA=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.create(null);function n(e,n){return t[e]=t[e]||[],t[e].push(n),this}function i(e,t){return t._once=!0,n(e,t),this}function o(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n?t[e].splice(t[e].indexOf(n),1):delete t[e],this}function r(e){for(var n=this,i=arguments.length,r=Array(i>1?i-1:0),s=1;s<i;s++)r[s-1]=arguments[s];var a=t[e]&&t[e].slice();return a&&a.forEach((function(t){t._once&&o(e,t),t.apply(n,r)})),this}return xA({},e,{on:n,once:i,off:o,emit:r})},kA=Object.freeze({__proto__:null,default:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0,n=void 0,i=void 0,o=void 0,r=void 0,s=void 0,a=void 0,l=void 0,c=void 0,p=void 0,u=void 0,d=void 0,h=void 0,m=0===e.packed.indexOf("data-")?e.packed:"data-"+e.packed,f=e.sizes.slice().reverse(),g=!1!==e.position,b=e.container.nodeType?e.container:document.querySelector(e.container),v={all:function(){return _(b.children)},new:function(){return _(b.children).filter((function(e){return!e.hasAttribute(""+m)}))}},y=[C,D,O],x=[T,N,S,A],w=wA({pack:z,update:L,resize:R});return w;function k(e){e.forEach((function(e){return e()}))}function _(e){return Array.prototype.slice.call(e)}function E(e){return Array.apply(null,Array(e)).map((function(){return 0}))}function M(){return f.map((function(e){return e.mq&&window.matchMedia("(min-width: "+e.mq+")").matches})).indexOf(!0)}function C(){i=M()}function D(){o=-1===i?f[f.length-1]:f[i]}function O(){s=E(o.columns)}function T(){u=v[t?"new":"all"]()}function N(){0!==u.length&&(d=u.map((function(e){return e.clientWidth})),h=u.map((function(e){return e.clientHeight})))}function S(){u.forEach((function(e,t){r=s.indexOf(Math.min.apply(Math,s)),e.style.position="absolute",a=s[r]+"px",l=r*d[t]+r*o.gutter+"px",g?(e.style.top=a,e.style.left=l):e.style.transform="translate3d("+l+", "+a+", 0)",e.setAttribute(m,""),c=d[t],p=h[t],c&&p&&(s[r]+=p+o.gutter)}))}function A(){b.style.position="relative",b.style.width=o.columns*c+(o.columns-1)*o.gutter+"px",b.style.height=Math.max.apply(Math,s)-o.gutter+"px"}function j(){n||(window.requestAnimationFrame(I),n=!0)}function I(){i!==M()&&(z(),w.emit("resize",o)),n=!1}function z(){return t=!1,k(y.concat(x)),w.emit("pack")}function L(){return t=!0,k(x),w.emit("update")}function R(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?"addEventListener":"removeEventListener";return window[t]("resize",j),w}}}),_A=Lc(kA),EA={exports:{}},MA={exports:{}};!function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=t,r=a(o),s=a(Kh.exports);function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){this.props.useCapture;return this.isPassiveSupported()?{useCapture:this.props.useCapture,passive:!0}:{passive:!1}}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),i=void 0;if(this.props.useWindow){var o=document.documentElement||document.body.parentNode||document.body,r=void 0!==t.pageYOffset?t.pageYOffset:o.scrollTop;i=this.props.isReverse?r:this.calculateOffset(e,r)}else i=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;i<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,i=t.element,o=t.hasMore;t.initialLoad;var s=t.isReverse,a=t.loader;t.loadMore,t.pageStart;var l=t.ref;t.threshold,t.useCapture,t.useWindow,t.getScrollParent;var c=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);c.ref=function(t){e.scrollComponent=t,l&&l(t)};var p=[n];return o&&(a?s?p.unshift(a):p.push(a):this.defaultLoader&&(s?p.unshift(this.defaultLoader):p.push(this.defaultLoader))),r.default.createElement(i,c,p)}}]),t}(o.Component);l.propTypes={children:s.default.node.isRequired,element:s.default.node,hasMore:s.default.bool,initialLoad:s.default.bool,isReverse:s.default.bool,loader:s.default.node,loadMore:s.default.func.isRequired,pageStart:s.default.number,ref:s.default.func,getScrollParent:s.default.func,threshold:s.default.number,useCapture:s.default.bool,useWindow:s.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},n.default=l,e.exports=n["default"]}(MA,MA.exports),EA.exports=MA.exports,Object.defineProperty(yA,"__esModule",{value:!0});var CA,DA,OA=yA.default=void 0,TA=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),NA=t,SA=zA(NA),AA=zA(Kh.exports),jA=zA(_A),IA=zA(EA.exports);function zA(e){return e&&e.__esModule?e:{default:e}}function LA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RA(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var FA=(DA=CA=function(e){function t(){var e,n,i;LA(this,t);for(var o=arguments.length,r=Array(o),s=0;s<o;s++)r[s]=arguments[s];return n=i=RA(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r))),i.setContainerRef=function(e){i.masonryContainer=e},i.forcePack=function(){i.masonryContainer&&i.state.instance.pack()},i.forceUpdate=function(){i.masonryContainer&&i.state.instance.update()},i.createNewInstance=function(){var e=i.props,t=e.packed,n=e.sizes,o=e.children,r=e.position,s=(0,jA.default)({container:i.masonryContainer,packed:t,sizes:n,position:r});s.resize(!0),o.length>0&&s.pack(),i.setState((function(){return{instance:s}}))},RA(i,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,NA.Component),TA(t,[{key:"componentDidMount",value:function(){this.createNewInstance()}},{key:"componentDidUpdate",value:function(e){var t=this.props.children,n=this.state.instance;if(0!==e.children.length||0!==t.length)return 0===e.children.length&&t.length>0?n.pack():e.children.length!==t.length?this.props.pack?n.pack():n.update():void 0}},{key:"componentWillUnmount",value:function(){this.state&&this.state.instance.resize(!1)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,i=e.style;e.pack,e.packed,e.position,e.sizes;var o=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(e,["children","className","style","pack","packed","position","sizes"]);return SA.default.createElement(IA.default,o,SA.default.createElement("div",{ref:this.setContainerRef,className:n,style:i},t))}}]),t}(),CA.propTypes={children:AA.default.arrayOf(AA.default.element).isRequired,className:AA.default.string,initialLoad:AA.default.bool,pack:AA.default.bool,packed:AA.default.string,position:AA.default.bool,sizes:AA.default.array,style:AA.default.object},CA.defaultProps={className:"",initialLoad:!0,pack:!1,packed:"data-packed",position:!0,sizes:[{columns:1,gutter:20},{mq:"768px",columns:2,gutter:20},{mq:"1024px",columns:3,gutter:20}],style:{}},DA);OA=yA.default=FA;const BA=e=>{let{onSubmit:n,unsplashApiKey:i}=e;const a=s(null),[l,c]=o(""),[p,u]=o(!1),[d,h]=o([]),[m,f]=o(1),[g,b]=o(!0),[v,y]=o(!1),x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:800;const[n,i]=o(e);return r((()=>{const n=setTimeout((()=>{i(e)}),t);return()=>{clearTimeout(n)}}),[e]),n}(l||"latest");r((()=>{w(1)}),[x]);const w=async e=>{try{y(!0),u(!1);const t=await(e=>{let{pageNo:t,query:n,apiKey:i}=e;return oy.get(Qp,{headers:{Authorization:`Client-ID ${i}`},params:{page:t,per_page:30,order_by:"popular",query:n}})})({page:e,query:x,apiKey:i}),{data:{results:n,total_pages:o}}=t;h(1===e?n:[...d,...n]),f(e+1),b(e<o)}catch(e){u(!0)}finally{y(!1)}};return t.createElement("div",{className:"neeto-editor-unsplash-wrapper"},t.createElement(sf,{autoFocus:!0,name:"text",value:l,placeholder:"Search Unsplash",onChange:e=>{let{target:{value:t}}=e;c(t)},"data-cy":"neeto-editor-unsplash-image-picker-search-input"}),p&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-error"},"Something went wrong! Please try again later."),!p&&!v&&Up(d)&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-no-results-error"},"No results"),!p&&t.createElement("div",{className:"neeto-editor-unsplash-container"},t.createElement(OA,{ref:a,pack:!0,style:{width:"100%"},sizes:[{columns:3,gutter:0},{mq:"768px",columns:3,gutter:0},{mq:"1024px",columns:3,gutter:0}],hasMore:g,loadMore:()=>{!v&&g&&m>1&&w(m)},position:!0,useWindow:!1,className:"neeto-editor-unsplash-gallery",loader:t.createElement(vA,{key:0})},d&&d.map(((e,i)=>t.createElement("div",{key:i,className:"neeto-editor-unsplash-gallery__item","data-cy":`neeto-editor-unsplash-image-picker-result-${i}`},t.createElement("div",{className:"neeto-editor-unsplash-gallery__item-placeholder",style:{paddingBottom:`${e.height/e.width*100}%`}},t.createElement("div",{className:"neeto-editor-unsplash-gallery__item-inner",id:`unsplashImage${i}`},t.createElement("img",{src:e.urls.regular,onClick:()=>n(e.urls.small)}),t.createElement("a",{href:`https://unsplash.com/@${e.user.username}`,target:"_blank",rel:"noreferrer"},e.user.name," "))))))),!g&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text"},"End of results")))},PA=e=>{let{buttonLabel:n="Submit",placeholder:i,onSubmit:r,className:s}=e;const[a,l]=o(""),[c,p]=o("");return t.createElement("div",{className:Bc("neeto-editor-url-form__wrapper",{[s]:s})},t.createElement(sf,{autoFocus:!0,name:"url",value:a,placeholder:i,onFocus:()=>p(""),error:c,onChange:e=>{let{target:{value:t}}=e;return l(t)},"data-cy":"neeto-editor-image-upload-url-input"}),t.createElement(ef,{label:n,onClick:e=>{e.preventDefault(),df.test(a)?r(a):p("Please enter a valid url")},disabled:!a,"data-cy":"neeto-editor-image-upload-url-submit"}))},UA=e=>{let{editor:n,imageUploadUrl:i,uploadConfig:r,isVisible:s,setIsVisible:a,unsplashApiKey:l,isUnsplashImageUploadActive:c}=e;const[p,u]=(e=>{var t;const[n,i]=o(null===(t=e[0])||void 0===t?void 0:t.key);return[n,e=>i(e.key)]})(Ow),[d,h]=o(""),m=e=>{h(e)},f={local:()=>t.createElement(bA,{endpoint:i,onSuccess:m,uploadConfig:r}),link:()=>t.createElement(PA,{onSubmit:m,buttonLabel:"Upload Image",placeholder:"Paste the image link"}),unsplash:()=>t.createElement(BA,{unsplashApiKey:l,onSubmit:m})}[p];return t.createElement(of,{isOpen:s,onClose:()=>{a(!1),u(Ow[0])},closeButton:!1},t.createElement("div",{className:"neeto-editor-image-uploader"},t.createElement(Mw,null,Ow.filter((e=>"unsplash"!==e.key||c)).map((e=>t.createElement(Mw.Item,{key:e.key,active:p===e.key,onClick:()=>u(e)},e.title)))),t.createElement("div",{className:"neeto-editor-image-uploader__content"},d?t.createElement(af,{url:d,editor:n,onClose:()=>{h(null),a(!1)}}):t.createElement(f,null))))},HA=cs.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){return t.textBetween(0,t.content.size,void 0," ").length}return t.nodeSize},this.storage.words=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;return t.textBetween(0,t.content.size," "," ").split(" ").filter((e=>""!==e)).length}},addProseMirrorPlugins(){return[new Xt({key:new nn("characterCount"),filterTransaction:(e,t)=>{const n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;const i=this.storage.characters({node:t.doc}),o=this.storage.characters({node:e.doc});if(o<=n)return!0;if(i>n&&o>n&&o<=i)return!0;if(i>n&&o>n&&o>i)return!1;if(!e.getMeta("paste"))return!1;const r=e.selection.$head.pos,s=r-(o-n),a=r;e.deleteRange(s,a);return!(this.storage.characters({node:e.doc})>n)}})]}}),$A=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,WA=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,qA=ea.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Gs({find:$A,type:this.type})]},addPasteRules(){return[na({find:WA,type:this.type})]}}),VA=cs.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new Xt({key:new nn("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:i}=this.editor,{anchor:o}=t,r=[];if(!n||!i)return Ho.create(e,[]);let s=0;"deepest"===this.options.mode&&e.descendants(((e,t)=>{if(e.isText)return;if(!(o>=t&&o<=t+e.nodeSize-1))return!1;s+=1}));let a=0;return e.descendants(((e,t)=>{if(e.isText)return!1;if(!(o>=t&&o<=t+e.nodeSize-1))return!1;a+=1;if("deepest"===this.options.mode&&s-a>0||"shallowest"===this.options.mode&&a>1)return"deepest"===this.options.mode;r.push(Bo.node(t,t+e.nodeSize,{class:this.options.className}))})),Ho.create(e,r)}}})]}}),KA=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,YA=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,QA=ea.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:e}){return["mark",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Gs({find:KA,type:this.type})]},addPasteRules(){return[na({find:YA,type:this.type})]}});function GA(e){this.j={},this.jr=[],this.jd=null,this.t=e}GA.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,i=this.j[e];if(i)return n&&(i.t=n),i;i=ZA();var o=tj(this,e);return o?(Object.assign(i.j,o.j),i.jr.append(o.jr),i.jr=o.jd,i.t=n||o.t):i.t=n,this.j[e]=i,i}};var ZA=function(){return new GA},JA=function(e){return new GA(e)},XA=function(e,t,n){e.j[t]||(e.j[t]=n)},ej=function(e,t,n){e.jr.push([t,n])},tj=function(e,t){var n=e.j[t];if(n)return n;for(var i=0;i<e.jr.length;i++){var o=e.jr[i][0],r=e.jr[i][1];if(o.test(t))return r}return e.jd},nj=function(e,t,n){for(var i=0;i<t.length;i++)XA(e,t[i],n)},ij=function(e,t){for(var n=0;n<t.length;n++){var i=t[n][0],o=t[n][1];XA(e,i,o)}},oj=function(e,t,n,i){for(var o,r=0,s=t.length;r<s&&(o=e.j[t[r]]);)e=o,r++;if(r>=s)return[];for(;r<s-1;)o=i(),XA(e,t[r],o),e=o,r++;XA(e,t[s-1],n)},rj="DOMAIN",sj="LOCALHOST",aj="TLD",lj="NUM",cj="PROTOCOL",pj="MAILTO",uj="WS",dj="NL",hj="OPENBRACE",mj="OPENBRACKET",fj="OPENANGLEBRACKET",gj="OPENPAREN",bj="CLOSEBRACE",vj="CLOSEBRACKET",yj="CLOSEANGLEBRACKET",xj="CLOSEPAREN",wj="AMPERSAND",kj="APOSTROPHE",_j="ASTERISK",Ej="AT",Mj="BACKSLASH",Cj="BACKTICK",Dj="CARET",Oj="COLON",Tj="COMMA",Nj="DOLLAR",Sj="DOT",Aj="EQUALS",jj="EXCLAMATION",Ij="HYPHEN",zj="PERCENT",Lj="PIPE",Rj="PLUS",Fj="POUND",Bj="QUERY",Pj="QUOTE",Uj="SEMI",Hj="SLASH",$j="TILDE",Wj="UNDERSCORE",qj="SYM",Vj=Object.freeze({__proto__:null,DOMAIN:rj,LOCALHOST:sj,TLD:aj,NUM:lj,PROTOCOL:cj,MAILTO:pj,WS:uj,NL:dj,OPENBRACE:hj,OPENBRACKET:mj,OPENANGLEBRACKET:fj,OPENPAREN:gj,CLOSEBRACE:bj,CLOSEBRACKET:vj,CLOSEANGLEBRACKET:yj,CLOSEPAREN:xj,AMPERSAND:wj,APOSTROPHE:kj,ASTERISK:_j,AT:Ej,BACKSLASH:Mj,BACKTICK:Cj,CARET:Dj,COLON:Oj,COMMA:Tj,DOLLAR:Nj,DOT:Sj,EQUALS:Aj,EXCLAMATION:jj,HYPHEN:Ij,PERCENT:zj,PIPE:Lj,PLUS:Rj,POUND:Fj,QUERY:Bj,QUOTE:Pj,SEMI:Uj,SLASH:Hj,TILDE:$j,UNDERSCORE:Wj,SYM:qj}),Kj="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw vermögensberater-ctb vermögensberatung-pwb ελ ευ бг бел дети ею католик ком қаз мкд мон москва онлайн орг рус рф сайт срб укр გე հայ ישראל קום ابوظبي اتصالات ارامكو الاردن البحرين الجزائر السعودية العليان المغرب امارات ایران بارت بازار بھارت بيتك پاکستان ڀارت تونس سودان سورية شبكة عراق عرب عمان فلسطين قطر كاثوليك كوم مصر مليسيا موريتانيا موقع همراه कॉम नेट भारत भारतम् भारोत संगठन বাংলা ভারত ভাৰত ਭਾਰਤ ભારત ଭାରତ இந்தியா இலங்கை சிங்கப்பூர் భారత్ ಭಾರತ ഭാരതം ලංකා คอม ไทย ລາວ 닷넷 닷컴 삼성 한국 アマゾン グーグル クラウド コム ストア セール ファッション ポイント みんな 世界 中信 中国 中國 中文网 亚马逊 企业 佛山 信息 健康 八卦 公司 公益 台湾 台灣 商城 商店 商标 嘉里 嘉里大酒店 在线 大众汽车 大拿 天主教 娱乐 家電 广东 微博 慈善 我爱你 手机 招聘 政务 政府 新加坡 新闻 时尚 書籍 机构 淡马锡 游戏 澳門 点看 移动 组织机构 网址 网店 网站 网络 联通 诺基亚 谷歌 购物 通販 集团 電訊盈科 飞利浦 食品 餐厅 香格里拉 香港".split(" "),Yj=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,Qj=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,Gj=/\uFE0F/,Zj=/\d/,Jj=/\s/;function Xj(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=ZA(),n=JA(lj),i=JA(rj),o=ZA(),r=JA(uj),s=[[Zj,i],[Yj,i],[Qj,i],[Gj,i]],a=function(){var e=JA(rj);return e.j={"-":o},e.jr=[].concat(s),e},l=function(e){var t=a();return t.t=e,t};ij(t,[["'",JA(kj)],["{",JA(hj)],["[",JA(mj)],["<",JA(fj)],["(",JA(gj)],["}",JA(bj)],["]",JA(vj)],[">",JA(yj)],[")",JA(xj)],["&",JA(wj)],["*",JA(_j)],["@",JA(Ej)],["`",JA(Cj)],["^",JA(Dj)],[":",JA(Oj)],[",",JA(Tj)],["$",JA(Nj)],[".",JA(Sj)],["=",JA(Aj)],["!",JA(jj)],["-",JA(Ij)],["%",JA(zj)],["|",JA(Lj)],["+",JA(Rj)],["#",JA(Fj)],["?",JA(Bj)],['"',JA(Pj)],["/",JA(Hj)],[";",JA(Uj)],["~",JA($j)],["_",JA(Wj)],["\\",JA(Mj)]]),XA(t,"\n",JA(dj)),ej(t,Jj,r),XA(r,"\n",ZA()),ej(r,Jj,r);for(var c=0;c<Kj.length;c++)oj(t,Kj[c],l(aj),a);var p=a(),u=a(),d=a(),h=a();oj(t,"file",p,a),oj(t,"ftp",u,a),oj(t,"http",d,a),oj(t,"mailto",h,a);var m=a(),f=JA(cj),g=JA(pj);XA(u,"s",m),XA(u,":",f),XA(d,"s",m),XA(d,":",f),XA(p,":",f),XA(m,":",f),XA(h,":",g);for(var b=a(),v=0;v<e.length;v++)oj(t,e[v],b,a);return XA(b,":",f),oj(t,"localhost",l(sj),a),ej(t,Zj,n),ej(t,Yj,i),ej(t,Qj,i),ej(t,Gj,i),ej(n,Zj,n),ej(n,Yj,i),ej(n,Qj,i),ej(n,Gj,i),XA(n,"-",o),XA(i,"-",o),XA(o,"-",o),ej(i,Zj,i),ej(i,Yj,i),ej(i,Qj,i),ej(i,Gj,i),ej(o,Zj,i),ej(o,Yj,i),ej(o,Qj,i),ej(o,Gj,i),t.jd=JA(qj),t}var eI={defaultProtocol:"http",events:null,format:tI,formatHref:tI,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function tI(e){return e}function nI(){}function iI(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Object.create(e.prototype);for(var o in n)i[o]=n[o];i.constructor=t,t.prototype=i}(nI,n,t),n}nI.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eI.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var oI=iI("email",{isLink:!0}),rI=iI("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),sI=iI("text"),aI=iI("nl"),lI=iI("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eI.defaultProtocol,t=this.tk,n=!1,i=!1,o=[],r=0;t[r].t===cj;)n=!0,o.push(t[r].v),r++;for(;t[r].t===Hj;)i=!0,o.push(t[r].v),r++;for(;r<t.length;r++)o.push(t[r].v);return o=o.join(""),n||i||(o="".concat(e,"://").concat(o)),o},hasProtocol:function(){return this.tk[0].t===cj}}),cI=Object.freeze({__proto__:null,MultiToken:nI,Base:nI,createTokenClass:iI,MailtoEmail:oI,Email:rI,Text:sI,Nl:aI,Url:lI});function pI(){var e=ZA(),t=ZA(),n=ZA(),i=ZA(),o=ZA(),r=ZA(),s=ZA(),a=JA(lI),l=ZA(),c=JA(lI),p=JA(lI),u=ZA(),d=ZA(),h=ZA(),m=ZA(),f=ZA(),g=JA(lI),b=JA(lI),v=JA(lI),y=JA(lI),x=ZA(),w=ZA(),k=ZA(),_=ZA(),E=ZA(),M=ZA(),C=JA(rI),D=ZA(),O=JA(rI),T=JA(oI),N=ZA(),S=ZA(),A=ZA(),j=ZA(),I=JA(aI);XA(e,dj,I),XA(e,cj,t),XA(e,pj,n),XA(t,Hj,i),XA(i,Hj,o),XA(e,aj,r),XA(e,rj,r),XA(e,sj,a),XA(e,lj,r),XA(o,aj,p),XA(o,rj,p),XA(o,lj,p),XA(o,sj,p),XA(r,Sj,s),XA(E,Sj,M),XA(s,aj,a),XA(s,rj,r),XA(s,lj,r),XA(s,sj,r),XA(M,aj,C),XA(M,rj,E),XA(M,lj,E),XA(M,sj,E),XA(a,Sj,s),XA(C,Sj,M),XA(a,Oj,l),XA(a,Hj,p),XA(l,lj,c),XA(c,Hj,p),XA(C,Oj,D),XA(D,lj,O);var z=[wj,_j,Ej,Mj,Cj,Dj,Nj,rj,Aj,Ij,sj,lj,zj,Lj,Rj,Fj,cj,Hj,qj,$j,aj,Wj],L=[kj,yj,bj,vj,xj,Oj,Tj,Sj,jj,fj,hj,mj,gj,Bj,Pj,Uj];XA(p,hj,d),XA(p,mj,h),XA(p,fj,m),XA(p,gj,f),XA(u,hj,d),XA(u,mj,h),XA(u,fj,m),XA(u,gj,f),XA(d,bj,p),XA(h,vj,p),XA(m,yj,p),XA(f,xj,p),XA(g,bj,p),XA(b,vj,p),XA(v,yj,p),XA(y,xj,p),XA(x,bj,p),XA(w,vj,p),XA(k,yj,p),XA(_,xj,p),nj(d,z,g),nj(h,z,b),nj(m,z,v),nj(f,z,y),nj(d,L,x),nj(h,L,w),nj(m,L,k),nj(f,L,_),nj(g,z,g),nj(b,z,b),nj(v,z,v),nj(y,z,y),nj(g,L,g),nj(b,L,b),nj(v,L,v),nj(y,L,y),nj(x,z,g),nj(w,z,b),nj(k,z,v),nj(_,z,y),nj(x,L,x),nj(w,L,w),nj(k,L,k),nj(_,L,_),nj(p,z,p),nj(u,z,p),nj(p,L,u),nj(u,L,u),XA(n,aj,T),XA(n,rj,T),XA(n,lj,T),XA(n,sj,T),nj(T,z,T),nj(T,L,N),nj(N,z,T),nj(N,L,N);var R=[wj,kj,_j,Mj,Cj,Dj,bj,Nj,rj,Aj,Ij,lj,hj,zj,Lj,Rj,Fj,Bj,Hj,qj,$j,aj,Wj];return nj(r,R,S),XA(r,Ej,A),nj(a,R,S),XA(a,Ej,A),nj(s,R,S),nj(S,R,S),XA(S,Ej,A),XA(S,Sj,j),nj(j,R,S),XA(A,aj,E),XA(A,rj,E),XA(A,lj,E),XA(A,sj,C),e}function uI(e,t,n){var i=n[0].s,o=n[n.length-1].e;return new e(t.substr(i,o-i),n)}var dI="undefined"!=typeof console&&console&&console.warn||function(){},hI={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function mI(e){if(hI.initialized&&dI('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");hI.customProtocols.push(e)}function fI(e){return hI.initialized||function(){hI.scanner={start:Xj(hI.customProtocols),tokens:Vj},hI.parser={start:pI(),tokens:cI};for(var e={createTokenClass:iI},t=0;t<hI.pluginQueue.length;t++)hI.pluginQueue[t][1]({scanner:hI.scanner,parser:hI.parser,utils:e});hI.initialized=!0}(),function(e,t,n){for(var i=n.length,o=0,r=[],s=[];o<i;){for(var a=e,l=null,c=null,p=0,u=null,d=-1;o<i&&!(l=tj(a,n[o].t));)s.push(n[o++]);for(;o<i&&(c=l||tj(a,n[o].t));)l=null,(a=c).accepts()?(d=0,u=a):d>=0&&d++,o++,p++;if(d<0)for(var h=o-p;h<o;h++)s.push(n[h]);else{s.length>0&&(r.push(uI(sI,t,s)),s=[]),o-=d,p-=d;var m=u.t,f=n.slice(o-p,o);r.push(uI(m,t,f))}}return s.length>0&&r.push(uI(sI,t,s)),r}(hI.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,i=0;i<n;){var o=e.charCodeAt(i),r=void 0,s=o<55296||o>56319||i+1===n||(r=e.charCodeAt(i+1))<56320||r>57343?e[i]:e.slice(i,i+2);t.push(s),i+=s.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),i=n.length,o=[],r=0,s=0;s<i;){for(var a=e,l=null,c=0,p=null,u=-1,d=-1;s<i&&(l=tj(a,n[s]));)(a=l).accepts()?(u=0,d=0,p=a):u>=0&&(u+=n[s].length,d++),c+=n[s].length,r+=n[s].length,s++;r-=u,s-=d,c-=u,o.push({t:p.t,v:t.substr(r-c,c),s:r-c,e:r})}return o}(hI.scanner.start,e))}function gI(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=fI(e),i=[],o=0;o<n.length;o++){var r=n[o];!r.isLink||t&&r.t!==t||i.push(r.toObject())}return i}function bI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=fI(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function vI(e){return new Xt({key:new nn("autolink"),appendTransaction:(t,n,i)=>{const o=t.some((e=>e.docChanged))&&!n.doc.eq(i.doc),r=t.some((e=>e.getMeta("preventAutolink")));if(!o||r)return;const{tr:s}=i,a=function(e,t){const n=new Tt(e);return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}(n.doc,[...t]),{mapping:l}=a,c=function(e){const{mapping:t,steps:n}=e,i=[];return t.maps.forEach(((e,o)=>{const r=[];if(e.ranges.length)e.forEach(((e,t)=>{r.push({from:e,to:t})}));else{const{from:e,to:t}=n[o];if(void 0===e||void 0===t)return;r.push({from:e,to:t})}r.forEach((({from:e,to:n})=>{const r=t.slice(o).map(e,-1),s=t.slice(o).map(n),a=t.invert().map(r,-1),l=t.invert().map(s);i.push({oldRange:{from:a,to:l},newRange:{from:r,to:s}})}))})),js(i)}(a);return c.forEach((({oldRange:t,newRange:o})=>{Is(t.from,t.to,n.doc).filter((t=>t.mark.type===e.type)).forEach((t=>{const o=Is(l.map(t.from),l.map(t.to),i.doc).filter((t=>t.mark.type===e.type));if(!o.length)return;const r=o[0],a=n.doc.textBetween(t.from,t.to,void 0," "),c=i.doc.textBetween(r.from,r.to,void 0," "),p=bI(a),u=bI(c);p&&!u&&s.removeMark(r.from,r.to,e.type)}));const r=function(e,t,n){const i=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&i.push({node:e,pos:t})})),i}(i.doc,o,(e=>e.isTextblock));let a,c;if(r.length>1?(a=r[0],c=i.doc.textBetween(a.pos,a.pos+a.node.nodeSize,void 0," ")):r.length&&i.doc.textBetween(o.from,o.to," "," ").endsWith(" ")&&(a=r[0],c=i.doc.textBetween(a.pos,o.to,void 0," ")),a&&c){const t=c.split(" ").filter((e=>""!==e));if(t.length<=0)return!1;const n=t[t.length-1],i=a.pos+c.lastIndexOf(n);if(!n)return!1;gI(n).filter((e=>e.isLink)).filter((t=>!e.validate||e.validate(t.value))).map((e=>({...e,from:i+e.start+1,to:i+e.end+1}))).forEach((t=>{s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}})),s.steps.length?s:void 0}})}const yI=ea.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(mI)},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){return["a",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[na({find:e=>gI(e).filter((e=>!this.options.validate||this.options.validate(e.value))).filter((e=>e.isLink)).map((e=>({text:e.value,index:e.start,data:e}))),type:this.type,getAttributes:e=>{var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];var t;return this.options.autolink&&e.push(vI({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push((t={type:this.type},new Xt({key:new nn("handleClickLink"),props:{handleClick:(e,n,i)=>{var o;const r=As(e.state,t.type.name);return!(!(null===(o=i.target)||void 0===o?void 0:o.closest("a"))||!r.href||(window.open(r.href,r.target),0))}}}))),this.options.linkOnPaste&&e.push(function(e){return new Xt({key:new nn("handlePasteLink"),props:{handlePaste:(t,n,i)=>{const{state:o}=t,{selection:r}=o,{empty:s}=r;if(s)return!1;let a="";i.content.forEach((e=>{a+=e.textContent}));const l=gI(a).find((e=>e.isLink&&e.value===a));return!(!a||!l||(e.editor.commands.setMark(e.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),e}}),xI=ea.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),wI=/^\s*>\s$/,kI=ta.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Xs({find:wI,type:this.type})]}}),_I=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,EI=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,MI=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,CI=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,DI=ea.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML({HTMLAttributes:e}){return["strong",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Gs({find:_I,type:this.type}),Gs({find:MI,type:this.type})]},addPasteRules(){return[na({find:EI,type:this.type}),na({find:CI,type:this.type})]}}),OI=/^\s*([-+*])\s$/,TI=ta.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){return[Xs({find:OI,type:this.type})]}}),NI=/^```([a-z]+)?[\s\n]$/,SI=/^~~~([a-z]+)?[\s\n]$/,AI=ta.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,i=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter((e=>e.startsWith(n))).map((e=>e.replace(n,"")))[0];return i||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",Wr(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!(!e||t.parent.type.name!==this.name)&&(!(!n&&t.parent.textContent.length)&&this.editor.commands.clearNodes())},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type)return!1;const r=i.parentOffset===i.parent.nodeSize-2,s=i.parent.textContent.endsWith("\n\n");return!(!r||!s)&&e.chain().command((({tr:e})=>(e.delete(i.pos-2,i.pos),!0))).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:i}=t,{$from:o,empty:r}=n;if(!r||o.parent.type!==this.type)return!1;if(!(o.parentOffset===o.parent.nodeSize-2))return!1;const s=o.after();if(void 0===s)return!1;return!i.nodeAt(s)&&e.commands.exitCode()}}},addInputRules(){return[Js({find:NI,type:this.type,getAttributes:e=>({language:e[1]})}),Js({find:SI,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Xt({key:new nn("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),i=t.clipboardData.getData("vscode-editor-data"),o=i?JSON.parse(i):void 0,r=null==o?void 0:o.mode;if(!n||!r)return!1;const{tr:s}=e.state;return s.replaceSelectionWith(this.type.create({language:r})),s.setSelection(zt.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),jI=ta.create({name:"doc",topNode:!0,content:"block+"});function II(e={}){return new Xt({view:t=>new zI(t,e)})}class zI{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}}))}destroy(){this.handlers.forEach((({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t)))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){let n=t.nodeBefore,i=t.nodeAfter;if(n||i){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),o=n?t.bottom:t.top;n&&i&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:t.left,right:t.right,top:o-this.width/2,bottom:o+this.width/2}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos);e={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let n,i,o=this.editorView.dom.offsetParent;if(this.element||(this.element=o.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!o||o==document.body&&"static"==getComputedStyle(o).position)n=-pageXOffset,i=-pageYOffset;else{let e=o.getBoundingClientRect();n=e.left-o.scrollLeft,i=e.top-o.scrollTop}this.element.style.left=e.left-n+"px",this.element.style.top=e.top-i+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=n&&n.type.spec.disableDropCursor,o="function"==typeof i?i(this.editorView,t):i;if(t&&!o){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&(e=ft(this.editorView.state.doc,e,this.editorView.dragging.slice),null==e))return this.setCursor(null);this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}const LI=cs.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[II(this.options)]}});class RI extends St{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return RI.valid(n)?new RI(n):St.near(n)}content(){return U.empty}eq(e){return e instanceof RI&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new RI(e.resolve(t.pos))}getBookmark(){return new FI(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),i=e.node(t);if(0!=n)for(let e=i.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),i=e.node(t);if(n!=i.childCount)for(let e=i.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&RI.valid(e))return e;let i=e.pos,o=null;for(let n=e.depth;;n--){let r=e.node(n);if(t>0?e.indexAfter(n)<r.childCount:e.index(n)>0){o=r.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;i+=t;let s=e.doc.resolve(i);if(RI.valid(s))return s}for(;;){let r=t>0?o.firstChild:o.lastChild;if(!r){if(o.isAtom&&!o.isText&&!Rt.isSelectable(o)){e=e.doc.resolve(i+o.nodeSize*t),n=!1;continue e}break}o=r,i+=t;let s=e.doc.resolve(i);if(RI.valid(s))return s}return null}}}RI.prototype.visible=!1,RI.findFrom=RI.findGapCursorFrom,St.jsonID("gapcursor",RI);class FI{constructor(e){this.pos=e}map(e){return new FI(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return RI.valid(t)?new RI(t):St.near(t)}}const BI=Cr({ArrowLeft:PI("horiz",-1),ArrowRight:PI("horiz",1),ArrowUp:PI("vert",-1),ArrowDown:PI("vert",1)});function PI(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,i,o){let r=e.selection,s=t>0?r.$to:r.$from,a=r.empty;if(r instanceof zt){if(!o.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=RI.findGapCursorFrom(s,t,a);return!!l&&(i&&i(e.tr.setSelection(new RI(l))),!0)}}function UI(e,t,n){if(!e||!e.editable)return!1;let i=e.state.doc.resolve(t);if(!RI.valid(i))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&Rt.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new RI(i))),!0)}function HI(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof RI))return!1;let{$from:n}=e.state.selection,i=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!i)return!1;let o=z.empty;for(let e=i.length-1;e>=0;e--)o=z.from(i[e].createAndFill(null,o));let r=e.state.tr.replace(n.pos,n.pos,new U(o,0,0));return r.setSelection(zt.near(r.doc.resolve(n.pos+1))),e.dispatch(r),!1}function $I(e){if(!(e.selection instanceof RI))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Ho.create(e.doc,[Bo.widget(e.selection.head,t,{key:"gapcursor"})])}const WI=cs.create({name:"gapCursor",addProseMirrorPlugins:()=>[new Xt({props:{decorations:$I,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&RI.valid(n)?new RI(n):null,handleClick:UI,handleKeyDown:BI,handleDOMEvents:{beforeinput:HI}}})],extendNodeSchema(e){var t;return{allowGapCursor:null!==(t=Kr(Pr(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),qI=ta.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",Wr(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:i})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:o}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:r}=this.options,{splittableMarks:s}=i.extensionManager,a=o||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{if(t&&a&&r){const t=a.filter((e=>s.includes(e.type.name)));e.ensureMarks(t)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),VI=ta.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}})))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Wr(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce(((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})})),{})},addInputRules(){return this.options.levels.map((e=>Js({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});var KI=200,YI=function(){};YI.prototype.append=function(e){return e.length?(e=YI.from(e),!this.length&&e||e.length<KI&&this.leafAppend(e)||this.length<KI&&e.leafPrepend(this)||this.appendInner(e)):this},YI.prototype.prepend=function(e){return e.length?YI.from(e).append(this):this},YI.prototype.appendInner=function(e){return new GI(this,e)},YI.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?YI.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},YI.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},YI.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},YI.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var i=[];return this.forEach((function(t,n){return i.push(e(t,n))}),t,n),i},YI.from=function(e){return e instanceof YI?e:e&&e.length?new QI(e):YI.empty};var QI=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,i){for(var o=t;o<n;o++)if(!1===e(this.values[o],i+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,i){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],i+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=KI)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=KI)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(YI);YI.empty=new QI([]);var GI=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,i){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),i))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,i+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,i){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,i+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,i))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(YI),ZI=YI;const JI=500;class XI{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,i,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}t&&(n=this.remapping(o,this.items.length),i=n.maps.length);let r,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),i=n.maps.length),i--,void c.push(e);if(n){c.push(new ez(e.map));let t,o=e.step.map(n.slice(i));o&&a.maybeStep(o).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new ez(t,void 0,void 0,l.length+c.length))),i--,t&&n.appendMap(t,i)}else a.maybeStep(e.step);return e.selection?(r=n?e.selection.map(n.slice(i)):e.selection,s=new XI(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:r}}addTransform(e,t,n,i){let o=[],r=this.eventCount,s=this.items,a=!i&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),p=new ez(e.mapping.maps[n],c,t);(l=a&&a.merge(p))&&(p=l,n?o.pop():s=s.slice(0,s.length-1)),o.push(p),t&&(r++,t=void 0),i||(a=p)}let l=r-n.depth;return l>nz&&(s=function(e,t){let n;return e.forEach(((e,i)=>{if(e.selection&&0==t--)return n=i,!1})),e.slice(n)}(s,l),r-=l),new XI(s.append(o),r)}remapping(e,t){let n=new Ze;return this.items.forEach(((t,i)=>{let o=null!=t.mirrorOffset&&i-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new XI(this.items.append(e.map((e=>new ez(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-t),o=e.mapping,r=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),i);let a=t;this.items.forEach((t=>{let i=o.getMirror(--a);if(null==i)return;r=Math.min(r,i);let l=o.maps[i];if(t.step){let r=e.steps[i].invert(e.docs[i]),c=t.selection&&t.selection.map(o.slice(a+1,i));c&&s++,n.push(new ez(l,r,c))}else n.push(new ez(l))}),i);let l=[];for(let e=t;e<r;e++)l.push(new ez(o.maps[e]));let c=this.items.slice(0,i).append(l).append(n),p=new XI(c,s);return p.emptyItemCount()>JI&&(p=p.compress(this.items.length-n.length)),p}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,i=[],o=0;return this.items.forEach(((r,s)=>{if(s>=e)i.push(r),r.selection&&o++;else if(r.step){let e=r.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=r.selection&&r.selection.map(t.slice(n));a&&o++;let l,c=new ez(s.invert(),e,a),p=i.length-1;(l=i.length&&i[p].merge(c))?i[p]=l:i.push(c)}}else r.map&&n--}),this.items.length,0),new XI(ZI.from(i.reverse()),o)}}XI.empty=new XI(ZI.empty,0);class ez{constructor(e,t,n,i){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new ez(t.getMap().invert(),t,this.selection)}}}class tz{constructor(e,t,n,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=i}}const nz=20;function iz(e){let t=[];return e.forEach(((e,n,i,o)=>t.push(i,o))),t}function oz(e,t){if(!e)return null;let n=[];for(let i=0;i<e.length;i+=2){let o=t.map(e[i],1),r=t.map(e[i+1],-1);o<=r&&n.push(o,r)}return n}function rz(e,t,n,i){let o=lz(t),r=cz.get(t).spec.config,s=(i?e.undone:e.done).popEvent(t,o);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(i?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),r,o),c=new tz(i?l:s.remaining,i?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(cz,{redo:i,historyState:c}).scrollIntoView())}let sz=!1,az=null;function lz(e){let t=e.plugins;if(az!=t){sz=!1,az=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){sz=!0;break}}return sz}const cz=new nn("history"),pz=new nn("closeHistory");function uz(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Xt({key:cz,state:{init:()=>new tz(XI.empty,XI.empty,null,0),apply:(t,n,i)=>function(e,t,n,i){let o,r=n.getMeta(cz);if(r)return r.historyState;n.getMeta(pz)&&(e=new tz(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(cz))return s.getMeta(cz).redo?new tz(e.done.addTransform(n,void 0,i,lz(t)),e.undone,iz(n.mapping.maps[n.steps.length-1]),e.prevTime):new tz(e.done,e.undone.addTransform(n,void 0,i,lz(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new tz(e.done.rebased(n,o),e.undone.rebased(n,o),oz(e.prevRanges,n.mapping),e.prevTime):new tz(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),oz(e.prevRanges,n.mapping),e.prevTime);{let o=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-i.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,i)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&i>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),r=s?oz(e.prevRanges,n.mapping):iz(n.mapping.maps[n.steps.length-1]);return new tz(e.done.addTransform(n,o?t.selection.getBookmark():void 0,i,lz(t)),XI.empty,r,n.time)}}(n,i,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,i="historyUndo"==n?dz:"historyRedo"==n?hz:null;return!!i&&(t.preventDefault(),i(e.state,e.dispatch))}}}})}const dz=(e,t)=>{let n=cz.getState(e);return!(!n||0==n.done.eventCount)&&(t&&rz(n,e,t,!1),!0)},hz=(e,t)=>{let n=cz.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&rz(n,e,t,!0),!0)},mz=cs.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>dz(e,t),redo:()=>({state:e,dispatch:t})=>hz(e,t)}),addProseMirrorPlugins(){return[uz(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),fz=ta.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",Wr(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e})=>e().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{var n;if(t){const{$to:t}=e.selection,i=t.end();if(t.nodeAfter)e.setSelection(zt.create(e.doc,t.pos));else{const o=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();o&&(e.insert(i,o),e.setSelection(zt.create(e.doc,i)))}e.scrollIntoView()}return!0})).run()}},addInputRules(){return[Zs({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),gz=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,bz=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,vz=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,yz=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,xz=ea.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:e}){return["em",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Gs({find:gz,type:this.type}),Gs({find:vz,type:this.type})]},addPasteRules(){return[na({find:bz,type:this.type}),na({find:yz,type:this.type})]}}),wz=ta.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",Wr(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),kz=/^(\d+)\.\s$/,_z=ta.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return 1===t?["ol",Wr(this.options.HTMLAttributes,n),0]:["ol",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){return[Xs({find:kz,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]})]}}),Ez=ta.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Mz=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,Cz=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,Dz=ea.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Gs({find:Mz,type:this.type})]},addPasteRules(){return[na({find:Cz,type:this.type})]}}),Oz=ta.create({name:"text",group:"inline"}),Tz=cs.create({name:"starterKit",addExtensions(){var e,t,n,i,o,r,s,a,l,c,p,u,d,h,m,f,g,b;const v=[];return!1!==this.options.blockquote&&v.push(kI.configure(null===(e=this.options)||void 0===e?void 0:e.blockquote)),!1!==this.options.bold&&v.push(DI.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&v.push(TI.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&v.push(qA.configure(null===(i=this.options)||void 0===i?void 0:i.code)),!1!==this.options.codeBlock&&v.push(AI.configure(null===(o=this.options)||void 0===o?void 0:o.codeBlock)),!1!==this.options.document&&v.push(jI.configure(null===(r=this.options)||void 0===r?void 0:r.document)),!1!==this.options.dropcursor&&v.push(LI.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&v.push(WI.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&v.push(qI.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&v.push(VI.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&v.push(mz.configure(null===(p=this.options)||void 0===p?void 0:p.history)),!1!==this.options.horizontalRule&&v.push(fz.configure(null===(u=this.options)||void 0===u?void 0:u.horizontalRule)),!1!==this.options.italic&&v.push(xz.configure(null===(d=this.options)||void 0===d?void 0:d.italic)),!1!==this.options.listItem&&v.push(wz.configure(null===(h=this.options)||void 0===h?void 0:h.listItem)),!1!==this.options.orderedList&&v.push(_z.configure(null===(m=this.options)||void 0===m?void 0:m.orderedList)),!1!==this.options.paragraph&&v.push(Ez.configure(null===(f=this.options)||void 0===f?void 0:f.paragraph)),!1!==this.options.strike&&v.push(Dz.configure(null===(g=this.options)||void 0===g?void 0:g.strike)),!1!==this.options.text&&v.push(Oz.configure(null===(b=this.options)||void 0===b?void 0:b.text)),v}});var Nz={exports:{}};function Sz(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||Sz(n)})),e}Nz.exports=Sz,Nz.exports.default=Sz;class Az{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function jz(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Iz(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const zz="</span>",Lz=e=>!!e.scope||e.sublanguage&&e.language;class Rz{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=jz(e)}openNode(e){if(!Lz(e))return;let t="";t=e.sublanguage?`language-${e.language}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}closeNode(e){Lz(e)&&(this.buffer+=zz)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const Fz=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Bz{constructor(){this.rootNode=Fz(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=Fz({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{Bz._collapse(e)})))}}class Pz extends Bz{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){return new Rz(this,this.options).value()}finalize(){return!0}}function Uz(e){return e?"string"==typeof e?e:e.source:null}function Hz(e){return qz("(?=",e,")")}function $z(e){return qz("(?:",e,")*")}function Wz(e){return qz("(?:",e,")?")}function qz(...e){const t=e.map((e=>Uz(e))).join("");return t}function Vz(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),n="("+(t.capture?"":"?:")+e.map((e=>Uz(e))).join("|")+")";return n}function Kz(e){return new RegExp(e.toString()+"|").exec("").length-1}const Yz=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Qz(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let i=Uz(e),o="";for(;i.length>0;){const e=Yz.exec(i);if(!e){o+=i;break}o+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?o+="\\"+String(Number(e[1])+t):(o+=e[0],"("===e[0]&&n++)}return o})).map((e=>`(${e})`)).join(t)}const Gz="[a-zA-Z]\\w*",Zz="[a-zA-Z_]\\w*",Jz="\\b\\d+(\\.\\d+)?",Xz="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",eL="\\b(0b[01]+)",tL={begin:"\\\\[\\s\\S]",relevance:0},nL={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[tL]},iL={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[tL]},oL=function(e,t,n={}){const i=Iz({scope:"comment",begin:e,end:t,contains:[]},n);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=Vz("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:qz(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},rL=oL("//","$"),sL=oL("/\\*","\\*/"),aL=oL("#","$"),lL={scope:"number",begin:Jz,relevance:0},cL={scope:"number",begin:Xz,relevance:0},pL={scope:"number",begin:eL,relevance:0},uL={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[tL,{begin:/\[/,end:/\]/,relevance:0,contains:[tL]}]}]},dL={scope:"title",begin:Gz,relevance:0},hL={scope:"title",begin:Zz,relevance:0},mL={begin:"\\.\\s*"+Zz,relevance:0};var fL=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:Gz,UNDERSCORE_IDENT_RE:Zz,NUMBER_RE:Jz,C_NUMBER_RE:Xz,BINARY_NUMBER_RE:eL,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=qz(t,/.*\b/,e.binary,/\b.*/)),Iz({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:tL,APOS_STRING_MODE:nL,QUOTE_STRING_MODE:iL,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:oL,C_LINE_COMMENT_MODE:rL,C_BLOCK_COMMENT_MODE:sL,HASH_COMMENT_MODE:aL,NUMBER_MODE:lL,C_NUMBER_MODE:cL,BINARY_NUMBER_MODE:pL,REGEXP_MODE:uL,TITLE_MODE:dL,UNDERSCORE_TITLE_MODE:hL,METHOD_GUARD:mL,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function gL(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function bL(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function vL(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=gL,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function yL(e,t){Array.isArray(e.illegal)&&(e.illegal=Vz(...e.illegal))}function xL(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function wL(e,t){void 0===e.relevance&&(e.relevance=1)}const kL=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=qz(n.beforeMatch,Hz(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},_L=["of","and","for","in","not","or","if","then","parent","list","value"],EL="keyword";function ML(e,t,n=EL){const i=Object.create(null);return"string"==typeof e?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach((function(n){Object.assign(i,ML(e[n],t,n))})),i;function o(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");i[n[0]]=[e,CL(n[0],n[1])]}))}}function CL(e,t){return t?Number(t):function(e){return _L.includes(e.toLowerCase())}(e)?0:1}const DL={},OL=e=>{console.error(e)},TL=(e,...t)=>{console.log(`WARN: ${e}`,...t)},NL=(e,t)=>{DL[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),DL[`${e}/${t}`]=!0)},SL=new Error;function AL(e,t,{key:n}){let i=0;const o=e[n],r={},s={};for(let e=1;e<=t.length;e++)s[e+i]=o[e],r[e+i]=!0,i+=Kz(t[e-1]);e[n]=s,e[n]._emit=r,e[n]._multi=!0}function jL(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw OL("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),SL;if("object"!=typeof e.beginScope||null===e.beginScope)throw OL("beginScope must be object"),SL;AL(e,e.begin,{key:"beginScope"}),e.begin=Qz(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw OL("skip, excludeEnd, returnEnd not compatible with endScope: {}"),SL;if("object"!=typeof e.endScope||null===e.endScope)throw OL("endScope must be object"),SL;AL(e,e.end,{key:"endScope"}),e.end=Qz(e.end,{joinWith:""})}}(e)}function IL(e){function t(t,n){return new RegExp(Uz(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=Kz(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(Qz(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Iz(e.classNameAliases||{}),function n(o,r){const s=o;if(o.isCompiled)return s;[bL,xL,jL,kL].forEach((e=>e(o,r))),e.compilerExtensions.forEach((e=>e(o,r))),o.__beforeBegin=null,[vL,yL,wL].forEach((e=>e(o,r))),o.isCompiled=!0;let a=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),a=o.keywords.$pattern,delete o.keywords.$pattern),a=a||/\w+/,o.keywords&&(o.keywords=ML(o.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),r&&(o.begin||(o.begin=/\B|\b/),s.beginRe=t(s.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(s.endRe=t(s.end)),s.terminatorEnd=Uz(s.end)||"",o.endsWithParent&&r.terminatorEnd&&(s.terminatorEnd+=(o.end?"|":"")+r.terminatorEnd)),o.illegal&&(s.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return Iz(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(zL(e))return Iz(e,{starts:e.starts?Iz(e.starts):null});if(Object.isFrozen(e))return Iz(e);return e}("self"===e?o:e)}))),o.contains.forEach((function(e){n(e,s)})),o.starts&&n(o.starts,r),s.matcher=function(e){const t=new i;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function zL(e){return!!e&&(e.endsWithParent||zL(e.starts))}var LL="11.6.0";class RL extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const FL=jz,BL=Iz,PL=Symbol("nomatch"),UL=7;var HL=function(e){const t=Object.create(null),n=Object.create(null),i=[];let o=!0;const r="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Pz};function l(e){return a.noHighlightRe.test(e)}function c(e,t,n){let i="",o="";"object"==typeof t?(i=e,n=t.ignoreIllegals,o=t.language):(NL("10.7.0","highlight(lang, code, ...args) has been deprecated."),NL("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,i=t),void 0===n&&(n=!0);const r={code:i,language:o};v("before:highlight",r);const s=r.result?r.result:p(r.language,r.code,n);return s.code=r.code,v("after:highlight",s),s}function p(e,n,i,s){const l=Object.create(null);function c(){if(!E.keywords)return void C.addText(D);let e=0;E.keywordPatternRe.lastIndex=0;let t=E.keywordPatternRe.exec(D),n="";for(;t;){n+=D.substring(e,t.index);const o=w.case_insensitive?t[0].toLowerCase():t[0],r=(i=o,E.keywords[i]);if(r){const[e,i]=r;if(C.addText(n),n="",l[o]=(l[o]||0)+1,l[o]<=UL&&(O+=i),e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;C.addKeyword(t[0],n)}}else n+=t[0];e=E.keywordPatternRe.lastIndex,t=E.keywordPatternRe.exec(D)}var i;n+=D.substring(e),C.addText(n)}function d(){null!=E.subLanguage?function(){if(""===D)return;let e=null;if("string"==typeof E.subLanguage){if(!t[E.subLanguage])return void C.addText(D);e=p(E.subLanguage,D,!0,M[E.subLanguage]),M[E.subLanguage]=e._top}else e=u(D,E.subLanguage.length?E.subLanguage:null);E.relevance>0&&(O+=e.relevance),C.addSublanguage(e._emitter,e.language)}():c(),D=""}function h(e,t){let n=1;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}const i=w.classNameAliases[e[n]]||e[n],o=t[n];i?C.addKeyword(o,i):(D=o,c(),D=""),n++}}function m(e,t){return e.scope&&"string"==typeof e.scope&&C.openNode(w.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(C.addKeyword(D,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),D=""):e.beginScope._multi&&(h(e.beginScope,t),D="")),E=Object.create(e,{parent:{value:E}}),E}function g(e,t,n){let i=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(i){if(e["on:end"]){const n=new Az(e);e["on:end"](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function b(e){return 0===E.matcher.regexIndex?(D+=e[0],1):(S=!0,0)}function v(e){const t=e[0],i=n.substring(e.index),o=g(E,e,i);if(!o)return PL;const r=E;E.endScope&&E.endScope._wrap?(d(),C.addKeyword(t,E.endScope._wrap)):E.endScope&&E.endScope._multi?(d(),h(E.endScope,e)):r.skip?D+=t:(r.returnEnd||r.excludeEnd||(D+=t),d(),r.excludeEnd&&(D=t));do{E.scope&&C.closeNode(),E.skip||E.subLanguage||(O+=E.relevance),E=E.parent}while(E!==o.parent);return o.starts&&m(o.starts,e),r.returnEnd?0:t.length}let y={};function x(t,r){const s=r&&r[0];if(D+=t,null==s)return d(),0;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===s){if(D+=n.slice(r.index,r.index+1),!o){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=r,"begin"===r.type)return function(e){const t=e[0],n=e.rule,i=new Az(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(e,i),i.isMatchIgnored))return b(t);return n.skip?D+=t:(n.excludeBegin&&(D+=t),d(),n.returnBegin||n.excludeBegin||(D=t)),m(n,e),n.returnBegin?0:t.length}(r);if("illegal"===r.type&&!i){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(E.scope||"<unnamed>")+'"');throw e.mode=E,e}if("end"===r.type){const e=v(r);if(e!==PL)return e}if("illegal"===r.type&&""===s)return 1;if(N>1e5&&N>3*r.index){throw new Error("potential infinite loop, way more iterations than matches")}return D+=s,s.length}const w=f(e);if(!w)throw OL(r.replace("{}",e)),new Error('Unknown language: "'+e+'"');const k=IL(w);let _="",E=s||k;const M={},C=new a.__emitter(a);!function(){const e=[];for(let t=E;t!==w;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>C.openNode(e)))}();let D="",O=0,T=0,N=0,S=!1;try{for(E.matcher.considerAll();;){N++,S?S=!1:E.matcher.considerAll(),E.matcher.lastIndex=T;const e=E.matcher.exec(n);if(!e)break;const t=x(n.substring(T,e.index),e);T=e.index+t}return x(n.substring(T)),C.closeAllNodes(),C.finalize(),_=C.toHTML(),{language:e,value:_,relevance:O,illegal:!1,_emitter:C,_top:E}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:FL(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:T,context:n.slice(T-100,T+100),mode:t.mode,resultSoFar:_},_emitter:C};if(o)return{language:e,value:FL(n),illegal:!1,relevance:0,errorRaised:t,_emitter:C,_top:E};throw t}}function u(e,n){n=n||a.languages||Object.keys(t);const i=function(e){const t={value:FL(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),o=n.filter(f).filter(b).map((t=>p(t,e,!1)));o.unshift(i);const r=o.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(f(e.language).supersetOf===t.language)return 1;if(f(t.language).supersetOf===e.language)return-1}return 0})),[l,c]=r,u=l;return u.secondBest=c,u}function d(e){let t=null;const i=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=a.languageDetectRe.exec(t);if(n){const t=f(n[1]);return t||(TL(r.replace("{}",n[1])),TL("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||f(e)))}(e);if(l(i))return;if(v("before:highlightElement",{el:e,language:i}),e.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),a.throwUnescapedHTML)){throw new RL("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const o=t.textContent,s=i?c(o,{language:i,ignoreIllegals:!0}):u(o);e.innerHTML=s.value,function(e,t,i){const o=t&&n[t]||i;e.classList.add("hljs"),e.classList.add(`language-${o}`)}(e,i,s.language),e.result={language:s.language,re:s.relevance,relevance:s.relevance},s.secondBest&&(e.secondBest={language:s.secondBest.language,relevance:s.secondBest.relevance}),v("after:highlightElement",{el:e,result:s,text:o})}let h=!1;function m(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(a.cssSelector).forEach(d)}function f(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function g(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function b(e){const t=f(e);return t&&!t.disableAutodetect}function v(e,t){const n=e;i.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){h&&m()}),!1),Object.assign(e,{highlight:c,highlightAuto:u,highlightAll:m,highlightElement:d,highlightBlock:function(e){return NL("10.7.0","highlightBlock will be removed entirely in v12.0"),NL("10.7.0","Please use highlightElement now."),d(e)},configure:function(e){a=BL(a,e)},initHighlighting:()=>{m(),NL("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){m(),NL("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,i){let r=null;try{r=i(e)}catch(e){if(OL("Language definition for '{}' could not be registered.".replace("{}",n)),!o)throw e;OL(e),r=s}r.name||(r.name=n),t[n]=r,r.rawDefinition=i.bind(null,e),r.aliases&&g(r.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:f,registerAliases:g,autoDetection:b,inherit:BL,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),i.push(e)}}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=LL,e.regex={concat:qz,lookahead:Hz,either:Vz,optional:Wz,anyNumberOfTimes:$z};for(const e in fL)"object"==typeof fL[e]&&Nz.exports(fL[e]);return Object.assign(e,fL),e}({}),$L=HL;HL.HighlightJS=HL,HL.default=HL;var WL=$L;function qL(e,t=[]){return e.map((e=>{const n=[...t,...e.properties?e.properties.className:[]];return e.children?qL(e.children,n):{text:e.value,classes:n}})).flat()}function VL(e){return e.value||e.children||[]}function KL({doc:e,name:t,lowlight:n,defaultLanguage:i}){const o=[];return Ts(e,(e=>e.type.name===t)).forEach((e=>{let t=e.pos+1;const r=e.node.attrs.language||i,s=n.listLanguages();var a;qL(r&&(s.includes(r)||(a=r,Boolean(WL.getLanguage(a))))?VL(n.highlight(r,e.node.textContent)):VL(n.highlightAuto(e.node.textContent))).forEach((e=>{const n=t+e.text.length;if(e.classes.length){const i=Bo.inline(t,n,{class:e.classes.join(" ")});o.push(i)}t=n}))})),Ho.create(e,o)}function YL({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every((e=>"function"==typeof t[e])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const i=new Xt({key:new nn("lowlight"),state:{init:(i,{doc:o})=>KL({doc:o,name:e,lowlight:t,defaultLanguage:n}),apply:(i,o,r,s)=>{const a=r.selection.$head.parent.type.name,l=s.selection.$head.parent.type.name,c=Ts(r.doc,(t=>t.type.name===e)),p=Ts(s.doc,(t=>t.type.name===e));return i.docChanged&&([a,l].includes(e)||p.length!==c.length||i.steps.some((e=>void 0!==e.from&&void 0!==e.to&&c.some((t=>t.pos>=e.from&&t.pos+t.node.nodeSize<=e.to)))))?KL({doc:i.doc,name:e,lowlight:t,defaultLanguage:n}):o.map(i.mapping,i.doc)}},props:{decorations:e=>i.getState(e)}});return i}const QL=AI.extend({addOptions(){var e;return{...null===(e=this.parent)||void 0===e?void 0:e.call(this),lowlight:{},defaultLanguage:null}},addProseMirrorPlugins(){var e;return[...(null===(e=this.parent)||void 0===e?void 0:e.call(this))||[],YL({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}});const GL=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],ZL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],JL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],XL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],eR=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();var tR="[0-9](_*[0-9])*",nR=`\\.(${tR})`,iR="[0-9a-fA-F](_*[0-9a-fA-F])*",oR={className:"number",variants:[{begin:`(\\b(${tR})((${nR})|\\.)?|(${nR}))`+`[eE][+-]?(${tR})[fFdD]?\\b`},{begin:`\\b(${tR})((${nR})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${nR})[fFdD]?\\b`},{begin:`\\b(${tR})[fFdD]\\b`},{begin:`\\b0[xX]((${iR})\\.?|(${iR})?\\.(${iR}))`+`[pP][+-]?(${tR})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${iR})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function rR(e,t,n){return-1===n?"":e.replace(t,(i=>rR(e,t,n-1)))}const sR="[A-Za-z$_][0-9A-Za-z$_]*",aR=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],lR=["true","false","null","undefined","NaN","Infinity"],cR=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],pR=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],uR=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],dR=["arguments","this","super","console","window","document","localStorage","module","global"],hR=[].concat(uR,cR,pR);var mR="[0-9](_*[0-9])*",fR=`\\.(${mR})`,gR="[0-9a-fA-F](_*[0-9a-fA-F])*",bR={className:"number",variants:[{begin:`(\\b(${mR})((${fR})|\\.)?|(${fR}))`+`[eE][+-]?(${mR})[fFdD]?\\b`},{begin:`\\b(${mR})((${fR})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${fR})[fFdD]?\\b`},{begin:`\\b(${mR})[fFdD]\\b`},{begin:`\\b0[xX]((${gR})\\.?|(${gR})?\\.(${gR}))`+`[pP][+-]?(${mR})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${gR})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};const vR=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],yR=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],xR=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],wR=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],kR=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),_R=xR.concat(wR);const ER=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],MR=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],CR=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],DR=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],OR=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function TR(e){return e?"string"==typeof e?e:e.source:null}function NR(e){return SR("(?=",e,")")}function SR(...e){const t=e.map((e=>TR(e))).join("");return t}function AR(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),n="("+(t.capture?"":"?:")+e.map((e=>TR(e))).join("|")+")";return n}const jR=e=>SR(/\b/,e,/\w$/.test(e)?/\b/:/\B/),IR=["Protocol","Type"].map(jR),zR=["init","self"].map(jR),LR=["Any","Self"],RR=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],FR=["false","nil","true"],BR=["assignment","associativity","higherThan","left","lowerThan","none","right"],PR=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],UR=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],HR=AR(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),$R=AR(HR,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),WR=SR(HR,$R,"*"),qR=AR(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),VR=AR(qR,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),KR=SR(qR,VR,"*"),YR=SR(/[A-Z]/,VR,"*"),QR=["autoclosure",SR(/convention\(/,AR("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",SR(/objc\(/,KR,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],GR=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];const ZR="[A-Za-z$_][0-9A-Za-z$_]*",JR=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],XR=["true","false","null","undefined","NaN","Infinity"],eF=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],tF=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],nF=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],iF=["arguments","this","super","console","window","document","localStorage","module","global"],oF=[].concat(nF,eF,tF);function rF(e){const t=e.regex,n=ZR,i="<>",o="</>",r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,i=e.input[n];if("<"===i||","===i)return void t.ignoreMatch();let o;">"===i&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());(o=e.input.substring(n).match(/^\s+extends\s+/))&&0===o.index&&t.ignoreMatch()}},s={$pattern:ZR,keyword:JR,literal:XR,built_in:oF,"variable.language":iF},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,p={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))`+`[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},u={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"css"}},m={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,u]},f={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},g=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,m,p];u.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(f,u.contains),v=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),y={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v},x={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},w={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...eF,...tF]}},k={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/};const _={match:t.concat(/\b/,(E=[...nF,"super"],t.concat("(?!",E.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var E;const M={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},D="(\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(D)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:w},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,m,f,p,w,{className:"attr",begin:n+t.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[f,e.REGEXP_MODE,{className:"function",begin:D,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i,end:o},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},k,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},M,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},_,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},x,C,{match:/\$[(.]/}]}}var sF={exports:{}};function aF(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||aF(n)})),e}sF.exports=aF,sF.exports.default=aF;class lF{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function cF(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function pF(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const uF="</span>",dF=e=>!!e.scope||e.sublanguage&&e.language;class hF{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=cF(e)}openNode(e){if(!dF(e))return;let t="";t=e.sublanguage?`language-${e.language}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}closeNode(e){dF(e)&&(this.buffer+=uF)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const mF=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class fF{constructor(){this.rootNode=mF(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=mF({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{fF._collapse(e)})))}}class gF extends fF{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){return new hF(this,this.options).value()}finalize(){return!0}}function bF(e){return e?"string"==typeof e?e:e.source:null}function vF(e){return wF("(?=",e,")")}function yF(e){return wF("(?:",e,")*")}function xF(e){return wF("(?:",e,")?")}function wF(...e){const t=e.map((e=>bF(e))).join("");return t}function kF(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),n="("+(t.capture?"":"?:")+e.map((e=>bF(e))).join("|")+")";return n}function _F(e){return new RegExp(e.toString()+"|").exec("").length-1}const EF=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function MF(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let i=bF(e),o="";for(;i.length>0;){const e=EF.exec(i);if(!e){o+=i;break}o+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?o+="\\"+String(Number(e[1])+t):(o+=e[0],"("===e[0]&&n++)}return o})).map((e=>`(${e})`)).join(t)}const CF="[a-zA-Z]\\w*",DF="[a-zA-Z_]\\w*",OF="\\b\\d+(\\.\\d+)?",TF="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",NF="\\b(0b[01]+)",SF={begin:"\\\\[\\s\\S]",relevance:0},AF={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[SF]},jF={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[SF]},IF=function(e,t,n={}){const i=pF({scope:"comment",begin:e,end:t,contains:[]},n);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=kF("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:wF(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},zF=IF("//","$"),LF=IF("/\\*","\\*/"),RF=IF("#","$"),FF={scope:"number",begin:OF,relevance:0},BF={scope:"number",begin:TF,relevance:0},PF={scope:"number",begin:NF,relevance:0},UF={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[SF,{begin:/\[/,end:/\]/,relevance:0,contains:[SF]}]}]},HF={scope:"title",begin:CF,relevance:0},$F={scope:"title",begin:DF,relevance:0},WF={begin:"\\.\\s*"+DF,relevance:0};var qF=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:CF,UNDERSCORE_IDENT_RE:DF,NUMBER_RE:OF,C_NUMBER_RE:TF,BINARY_NUMBER_RE:NF,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=wF(t,/.*\b/,e.binary,/\b.*/)),pF({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:SF,APOS_STRING_MODE:AF,QUOTE_STRING_MODE:jF,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:IF,C_LINE_COMMENT_MODE:zF,C_BLOCK_COMMENT_MODE:LF,HASH_COMMENT_MODE:RF,NUMBER_MODE:FF,C_NUMBER_MODE:BF,BINARY_NUMBER_MODE:PF,REGEXP_MODE:UF,TITLE_MODE:HF,UNDERSCORE_TITLE_MODE:$F,METHOD_GUARD:WF,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function VF(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function KF(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function YF(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=VF,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function QF(e,t){Array.isArray(e.illegal)&&(e.illegal=kF(...e.illegal))}function GF(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function ZF(e,t){void 0===e.relevance&&(e.relevance=1)}const JF=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=wF(n.beforeMatch,vF(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},XF=["of","and","for","in","not","or","if","then","parent","list","value"],eB="keyword";function tB(e,t,n=eB){const i=Object.create(null);return"string"==typeof e?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach((function(n){Object.assign(i,tB(e[n],t,n))})),i;function o(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");i[n[0]]=[e,nB(n[0],n[1])]}))}}function nB(e,t){return t?Number(t):function(e){return XF.includes(e.toLowerCase())}(e)?0:1}const iB={},oB=e=>{console.error(e)},rB=(e,...t)=>{console.log(`WARN: ${e}`,...t)},sB=(e,t)=>{iB[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),iB[`${e}/${t}`]=!0)},aB=new Error;function lB(e,t,{key:n}){let i=0;const o=e[n],r={},s={};for(let e=1;e<=t.length;e++)s[e+i]=o[e],r[e+i]=!0,i+=_F(t[e-1]);e[n]=s,e[n]._emit=r,e[n]._multi=!0}function cB(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw oB("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),aB;if("object"!=typeof e.beginScope||null===e.beginScope)throw oB("beginScope must be object"),aB;lB(e,e.begin,{key:"beginScope"}),e.begin=MF(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw oB("skip, excludeEnd, returnEnd not compatible with endScope: {}"),aB;if("object"!=typeof e.endScope||null===e.endScope)throw oB("endScope must be object"),aB;lB(e,e.end,{key:"endScope"}),e.end=MF(e.end,{joinWith:""})}}(e)}function pB(e){function t(t,n){return new RegExp(bF(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=_F(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(MF(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=pF(e.classNameAliases||{}),function n(o,r){const s=o;if(o.isCompiled)return s;[KF,GF,cB,JF].forEach((e=>e(o,r))),e.compilerExtensions.forEach((e=>e(o,r))),o.__beforeBegin=null,[YF,QF,ZF].forEach((e=>e(o,r))),o.isCompiled=!0;let a=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),a=o.keywords.$pattern,delete o.keywords.$pattern),a=a||/\w+/,o.keywords&&(o.keywords=tB(o.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),r&&(o.begin||(o.begin=/\B|\b/),s.beginRe=t(s.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(s.endRe=t(s.end)),s.terminatorEnd=bF(s.end)||"",o.endsWithParent&&r.terminatorEnd&&(s.terminatorEnd+=(o.end?"|":"")+r.terminatorEnd)),o.illegal&&(s.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return pF(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(uB(e))return pF(e,{starts:e.starts?pF(e.starts):null});if(Object.isFrozen(e))return pF(e);return e}("self"===e?o:e)}))),o.contains.forEach((function(e){n(e,s)})),o.starts&&n(o.starts,r),s.matcher=function(e){const t=new i;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function uB(e){return!!e&&(e.endsWithParent||uB(e.starts))}var dB="11.6.0";class hB extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const mB=cF,fB=pF,gB=Symbol("nomatch"),bB=7;var vB=function(e){const t=Object.create(null),n=Object.create(null),i=[];let o=!0;const r="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:gF};function l(e){return a.noHighlightRe.test(e)}function c(e,t,n){let i="",o="";"object"==typeof t?(i=e,n=t.ignoreIllegals,o=t.language):(sB("10.7.0","highlight(lang, code, ...args) has been deprecated."),sB("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,i=t),void 0===n&&(n=!0);const r={code:i,language:o};v("before:highlight",r);const s=r.result?r.result:p(r.language,r.code,n);return s.code=r.code,v("after:highlight",s),s}function p(e,n,i,s){const l=Object.create(null);function c(){if(!E.keywords)return void C.addText(D);let e=0;E.keywordPatternRe.lastIndex=0;let t=E.keywordPatternRe.exec(D),n="";for(;t;){n+=D.substring(e,t.index);const o=w.case_insensitive?t[0].toLowerCase():t[0],r=(i=o,E.keywords[i]);if(r){const[e,i]=r;if(C.addText(n),n="",l[o]=(l[o]||0)+1,l[o]<=bB&&(O+=i),e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;C.addKeyword(t[0],n)}}else n+=t[0];e=E.keywordPatternRe.lastIndex,t=E.keywordPatternRe.exec(D)}var i;n+=D.substring(e),C.addText(n)}function d(){null!=E.subLanguage?function(){if(""===D)return;let e=null;if("string"==typeof E.subLanguage){if(!t[E.subLanguage])return void C.addText(D);e=p(E.subLanguage,D,!0,M[E.subLanguage]),M[E.subLanguage]=e._top}else e=u(D,E.subLanguage.length?E.subLanguage:null);E.relevance>0&&(O+=e.relevance),C.addSublanguage(e._emitter,e.language)}():c(),D=""}function h(e,t){let n=1;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}const i=w.classNameAliases[e[n]]||e[n],o=t[n];i?C.addKeyword(o,i):(D=o,c(),D=""),n++}}function m(e,t){return e.scope&&"string"==typeof e.scope&&C.openNode(w.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(C.addKeyword(D,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),D=""):e.beginScope._multi&&(h(e.beginScope,t),D="")),E=Object.create(e,{parent:{value:E}}),E}function g(e,t,n){let i=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(i){if(e["on:end"]){const n=new lF(e);e["on:end"](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function b(e){return 0===E.matcher.regexIndex?(D+=e[0],1):(S=!0,0)}function v(e){const t=e[0],i=n.substring(e.index),o=g(E,e,i);if(!o)return gB;const r=E;E.endScope&&E.endScope._wrap?(d(),C.addKeyword(t,E.endScope._wrap)):E.endScope&&E.endScope._multi?(d(),h(E.endScope,e)):r.skip?D+=t:(r.returnEnd||r.excludeEnd||(D+=t),d(),r.excludeEnd&&(D=t));do{E.scope&&C.closeNode(),E.skip||E.subLanguage||(O+=E.relevance),E=E.parent}while(E!==o.parent);return o.starts&&m(o.starts,e),r.returnEnd?0:t.length}let y={};function x(t,r){const s=r&&r[0];if(D+=t,null==s)return d(),0;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===s){if(D+=n.slice(r.index,r.index+1),!o){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=r,"begin"===r.type)return function(e){const t=e[0],n=e.rule,i=new lF(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(e,i),i.isMatchIgnored))return b(t);return n.skip?D+=t:(n.excludeBegin&&(D+=t),d(),n.returnBegin||n.excludeBegin||(D=t)),m(n,e),n.returnBegin?0:t.length}(r);if("illegal"===r.type&&!i){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(E.scope||"<unnamed>")+'"');throw e.mode=E,e}if("end"===r.type){const e=v(r);if(e!==gB)return e}if("illegal"===r.type&&""===s)return 1;if(N>1e5&&N>3*r.index){throw new Error("potential infinite loop, way more iterations than matches")}return D+=s,s.length}const w=f(e);if(!w)throw oB(r.replace("{}",e)),new Error('Unknown language: "'+e+'"');const k=pB(w);let _="",E=s||k;const M={},C=new a.__emitter(a);!function(){const e=[];for(let t=E;t!==w;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>C.openNode(e)))}();let D="",O=0,T=0,N=0,S=!1;try{for(E.matcher.considerAll();;){N++,S?S=!1:E.matcher.considerAll(),E.matcher.lastIndex=T;const e=E.matcher.exec(n);if(!e)break;const t=x(n.substring(T,e.index),e);T=e.index+t}return x(n.substring(T)),C.closeAllNodes(),C.finalize(),_=C.toHTML(),{language:e,value:_,relevance:O,illegal:!1,_emitter:C,_top:E}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:mB(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:T,context:n.slice(T-100,T+100),mode:t.mode,resultSoFar:_},_emitter:C};if(o)return{language:e,value:mB(n),illegal:!1,relevance:0,errorRaised:t,_emitter:C,_top:E};throw t}}function u(e,n){n=n||a.languages||Object.keys(t);const i=function(e){const t={value:mB(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),o=n.filter(f).filter(b).map((t=>p(t,e,!1)));o.unshift(i);const r=o.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(f(e.language).supersetOf===t.language)return 1;if(f(t.language).supersetOf===e.language)return-1}return 0})),[l,c]=r,u=l;return u.secondBest=c,u}function d(e){let t=null;const i=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=a.languageDetectRe.exec(t);if(n){const t=f(n[1]);return t||(rB(r.replace("{}",n[1])),rB("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||f(e)))}(e);if(l(i))return;if(v("before:highlightElement",{el:e,language:i}),e.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),a.throwUnescapedHTML)){throw new hB("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const o=t.textContent,s=i?c(o,{language:i,ignoreIllegals:!0}):u(o);e.innerHTML=s.value,function(e,t,i){const o=t&&n[t]||i;e.classList.add("hljs"),e.classList.add(`language-${o}`)}(e,i,s.language),e.result={language:s.language,re:s.relevance,relevance:s.relevance},s.secondBest&&(e.secondBest={language:s.secondBest.language,relevance:s.secondBest.relevance}),v("after:highlightElement",{el:e,result:s,text:o})}let h=!1;function m(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(a.cssSelector).forEach(d)}function f(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function g(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function b(e){const t=f(e);return t&&!t.disableAutodetect}function v(e,t){const n=e;i.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){h&&m()}),!1),Object.assign(e,{highlight:c,highlightAuto:u,highlightAll:m,highlightElement:d,highlightBlock:function(e){return sB("10.7.0","highlightBlock will be removed entirely in v12.0"),sB("10.7.0","Please use highlightElement now."),d(e)},configure:function(e){a=fB(a,e)},initHighlighting:()=>{m(),sB("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){m(),sB("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,i){let r=null;try{r=i(e)}catch(e){if(oB("Language definition for '{}' could not be registered.".replace("{}",n)),!o)throw e;oB(e),r=s}r.name||(r.name=n),t[n]=r,r.rawDefinition=i.bind(null,e),r.aliases&&g(r.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:f,registerAliases:g,autoDetection:b,inherit:fB,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),i.push(e)}}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=dB,e.regex={concat:wF,lookahead:vF,either:kF,optional:xF,anyNumberOfTimes:yF};for(const e in qF)"object"==typeof qF[e]&&sF.exports(qF[e]);return Object.assign(e,qF),e}({}),yB=vB;vB.HighlightJS=vB,vB.default=vB;var xB={exports:{}};!function(e){!function(){var t;function n(e){for(var t,n,i,o,r=1,s=[].slice.call(arguments),a=0,l=e.length,c="",p=!1,u=!1,d=function(){return s[r++]},h=function(){for(var n="";/\d/.test(e[a]);)n+=e[a++],t=e[a];return n.length>0?parseInt(n):null};a<l;++a)if(t=e[a],p)switch(p=!1,"."==t?(u=!1,t=e[++a]):"0"==t&&"."==e[a+1]?(u=!0,t=e[a+=2]):u=!0,o=h(),t){case"b":c+=parseInt(d(),10).toString(2);break;case"c":c+="string"==typeof(n=d())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(d(),10);break;case"f":i=String(parseFloat(d()).toFixed(o||6)),c+=u?i:i.replace(/^0/,"");break;case"j":c+=JSON.stringify(d());break;case"o":c+="0"+parseInt(d(),10).toString(8);break;case"s":c+=d();break;case"x":c+="0x"+parseInt(d(),10).toString(16);break;case"X":c+="0x"+parseInt(d(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?p=!0:c+=t;return c}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()}(xB);var wB=xB.exports;const kB=Object.assign(_B(Error),{eval:_B(EvalError),range:_B(RangeError),reference:_B(ReferenceError),syntax:_B(SyntaxError),type:_B(TypeError),uri:_B(URIError)});function _B(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){const i=t?wB(t,...n):t;return new e(i)}}const EB={}.hasOwnProperty,MB="hljs-";function CB(e,t,n={}){let i=n.prefix;if("string"!=typeof e)throw kB("Expected `string` for name, got `%s`",e);if(!yB.getLanguage(e))throw kB("Unknown language: `%s` is not registered",e);if("string"!=typeof t)throw kB("Expected `string` for value, got `%s`",t);null==i&&(i=MB),yB.configure({__emitter:DB,classPrefix:i});const o=yB.highlight(t,{language:e,ignoreIllegals:!0});if(yB.configure({}),o.errorRaised)throw o.errorRaised;return o._emitter.root.data.language=o.language,o._emitter.root.data.relevance=o.relevance,o._emitter.root}class DB{constructor(e){this.options=e,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(e){if(""===e)return;const t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e})}addKeyword(e,t){this.openNode(t),this.addText(e),this.closeNode()}addSublanguage(e,t){const n=this.stack[this.stack.length-1],i=e.root.children;t?n.children.push({type:"element",tagName:"span",properties:{className:[t]},children:i}):n.children.push(...i)}openNode(e){const t=e.split(".").map(((e,t)=>t?e+"_".repeat(t):this.options.classPrefix+e)),n={type:"element",tagName:"span",properties:{className:t},children:[]};this.stack[this.stack.length-1].children.push(n),this.stack.push(n)}closeNode(){this.stack.pop()}closeAllNodes(){}finalize(){}toHTML(){return""}}const OB={highlight:CB,highlightAuto:function(e,t={}){const n=t.subset||yB.listLanguages();t.prefix;let i=-1,o={type:"root",data:{language:null,relevance:0},children:[]};if("string"!=typeof e)throw kB("Expected `string` for value, got `%s`",e);for(;++i<n.length;){const r=n[i];if(!yB.getLanguage(r))continue;const s=CB(r,e,t);s.data.relevance>o.data.relevance&&(o=s)}return o},registerLanguage:function(e,t){yB.registerLanguage(e,t)},registered:function(e){return Boolean(yB.getLanguage(e))},listLanguages:function(){return yB.listLanguages()},registerAlias:function(e,t){if("string"==typeof e)yB.registerAliases(t,{languageName:e});else{let t;for(t in e)EB.call(e,t)&&yB.registerAliases(e[t],{languageName:t})}}};OB.registerLanguage("arduino",(function(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",r="(?!struct)("+i+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},u=t.optional(o)+e.IDENT_RE+"\\s*\\(",d={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},m=[h,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:m.concat([{begin:/\(/,end:/\)/,keywords:d,contains:m.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+r+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:d,relevance:0},{begin:u,returnBegin:!0,contains:[p],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:d,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(f,g,h,m,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:d,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:d},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}(e),i=n.keywords;return i.type=[...i.type,...t.type],i.literal=[...i.literal,...t.literal],i.built_in=[...i.built_in,...t.built_in],i._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n})),OB.registerLanguage("bash",(function(e){const t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},i]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},r={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(s);const a={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},l=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[l,e.SHEBANG(),c,a,e.HASH_COMMENT_MODE,r,{match:/(\/[a-z._-]+)+/},s,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},n]}})),OB.registerLanguage("c",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",r="("+i+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},u=t.optional(o)+e.IDENT_RE+"\\s*\\(",d={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream "+"auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set "+"unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos "+"asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp "+"fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper "+"isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow "+"printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp "+"strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan "+"vfprintf vprintf vsprintf endl initializer_list unique_ptr"},h=[c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:h.concat([{begin:/\(/,end:/\)/,keywords:d,contains:h.concat(["self"]),relevance:0}]),relevance:0},f={begin:"("+r+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:d,relevance:0},{begin:u,returnBegin:!0,contains:[e.inherit(p,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:d,disableAutodetect:!0,illegal:"</",contains:[].concat(m,f,h,[c,{begin:e.IDENT_RE+"::",keywords:d},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:a,keywords:d}}})),OB.registerLanguage("cpp",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",r="(?!struct)("+i+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},u=t.optional(o)+e.IDENT_RE+"\\s*\\(",d={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},m=[h,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:m.concat([{begin:/\(/,end:/\)/,keywords:d,contains:m.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+r+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:d,relevance:0},{begin:u,returnBegin:!0,contains:[p],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:d,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(f,g,h,m,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:d,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:d},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}})),OB.registerLanguage("csharp",(function(e){const t={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),i={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},o={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},r=e.inherit(o,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/,keywords:t},a=e.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,a]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},p=e.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]});s.contains=[c,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_BLOCK_COMMENT_MODE],a.contains=[p,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const u={variants:[c,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},h=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",m={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},u,i,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+h+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,d],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[u,i,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},m]}})),OB.registerLanguage("css",(function(e){const t=e.regex,n=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),i=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+JL.join("|")+")"},{begin:":(:)?("+XL.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+eR.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...i,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...i,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:ZL.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...i,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+GL.join("|")+")\\b"}]}})),OB.registerLanguage("diff",(function(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}})),OB.registerLanguage("go",(function(e){const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{begin:e.C_NUMBER_RE+"[i]",relevance:1},e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}})),OB.registerLanguage("graphql",(function(e){const t=e.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}})),OB.registerLanguage("ini",(function(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},i=e.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const o={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[i,r,o,s,n,"self"],relevance:0},l=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:t.concat(l,"(\\s*\\.\\s*",l,")*",t.lookahead(/\s*=\s*[^#\s]/)),className:"attr",starts:{end:/$/,contains:[i,a,r,o,s,n]}}]}})),OB.registerLanguage("java",(function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",i=n+rR("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),o={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},r={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:o,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+i+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:o,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,oR,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},oR,r]}})),OB.registerLanguage("javascript",(function(e){const t=e.regex,n=sR,i="<>",o="</>",r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,i=e.input[n];if("<"===i||","===i)return void t.ignoreMatch();let o;">"===i&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());(o=e.input.substring(n).match(/^\s+extends\s+/))&&0===o.index&&t.ignoreMatch()}},s={$pattern:sR,keyword:aR,literal:lR,built_in:hR,"variable.language":dR},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,p={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))`+`[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},u={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"css"}},m={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,u]},f={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},g=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,m,p];u.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(f,u.contains),v=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),y={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v},x={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},w={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...cR,...pR]}},k={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/},_={match:t.concat(/\b/,(E=[...uR,"super"],t.concat("(?!",E.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var E;const M={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},D="(\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(D)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:w},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,m,f,p,w,{className:"attr",begin:n+t.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[f,e.REGEXP_MODE,{className:"function",begin:D,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i,end:o},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},k,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},M,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},_,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},x,C,{match:/\$[(.]/}]}})),OB.registerLanguage("json",(function(e){const t=["true","false","null"],n={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",keywords:{literal:t},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),OB.registerLanguage("kotlin",(function(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline "+"crossinline dynamic final enum if else do while for when throw try catch finally "+"import package is in fun override companion reified inline lateinit init "+"interface annotation data sealed internal infix operator out by constructor super "+"tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},r={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,i]}]};i.contains.push(r);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(r,{className:"string"}),"self"]}]},l=bR,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),p={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},u=p;return u.variants[1].contains=[p],p.variants[1].contains=[u],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,s,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[p,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,s,a,r,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,a]},r,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}})),OB.registerLanguage("less",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=_R,i="[\\w-]+",o="("+i+"|@\\{"+i+"\\})",r=[],s=[],a=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},l=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:yR.join(" ")},p={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,p,l("variable","@@?"+i,10),l("variable","@\\{"+i+"\\}"),l("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const u=s.concat({begin:/\{/,end:/\}/,contains:r}),d={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},h={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+kR.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},f={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:u}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d,l("keyword","all\\b"),l("variable","@\\{"+i+"\\}"),{begin:"\\b("+vR.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,l("selector-tag",o,0),l("selector-id","#"+o),l("selector-class","\\."+o,0),l("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+xR.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+wR.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:u},{begin:"!important"},t.FUNCTION_DISPATCH]},b={begin:i+":(:)?"+`(${n.join("|")})`,returnBegin:!0,contains:[g]};return r.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,f,b,h,g,d,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:r}})),OB.registerLanguage("lua",(function(e){const t="\\[=*\\[",n="\\]=*\\]",i={begin:t,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[i],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len "+"__gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert "+"collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring "+"module next pairs pcall print rawequal rawget rawset require select setfenv "+"setmetatable tonumber tostring type unpack xpcall arg self "+"coroutine resume yield status wrap create running debug getupvalue "+"debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv "+"io lines write close flush open output type read stderr stdin input stdout popen tmpfile "+"math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan "+"os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall "+"string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower "+"table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[i],relevance:5}])}})),OB.registerLanguage("makefile",(function(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},i={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort "+"word wordlist firstword lastword dir notdir suffix basename "+"addsuffix addprefix join wildcard realpath abspath error warning "+"shell origin flavor foreach if or and call eval file value"},contains:[t]},o={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},r={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif "+"include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,i,o,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},r]}})),OB.registerLanguage("markdown",(function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},i={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},o={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]},r=e.inherit(i,{contains:[]}),s=e.inherit(o,{contains:[]});i.contains.push(s),o.contains.push(r);let a=[t,n];return[i,o,r,s].forEach((e=>{e.contains=e.contains.concat(a)})),a=a.concat(i,o),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:a},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:a}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i,o,{className:"quote",begin:"^>\\s+",contains:a,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}})),OB.registerLanguage("objectivec",(function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},illegal:"</",contains:[{className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}})),OB.registerLanguage("perl",(function(e){const t=e.regex,n=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"].join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},r={begin:/->\{/,end:/\}/},s={variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,`(?![A-Za-z])(?![@$%])`)},{begin:/[$%@][^\s\w{]/,relevance:0}]},a=[e.BACKSLASH_ESCAPE,o,s],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],c=(e,i,o="\\1")=>{const r="\\1"===o?o:t.concat(o,i);return t.concat(t.concat("(?:",e,")"),i,/(?:\\.|[^\\\/])*?/,r,/(?:\\.|[^\\\/])*?/,o,n)},p=(e,i,o)=>t.concat(t.concat("(?:",e,")"),i,/(?:\\.|[^\\\/])*?/,o,n),u=[s,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),r,{className:"string",contains:a,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:c("s|tr|y",t.either(...l,{capture:!0}))},{begin:c("s|tr|y","\\(","\\)")},{begin:c("s|tr|y","\\[","\\]")},{begin:c("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...l,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=u,r.contains=u,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:u}})),OB.registerLanguage("php",(function(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,i=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),r={scope:"variable",match:"\\$+"+i},s={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},a=e.inherit(e.APOS_STRING_MODE,{illegal:null}),l="[ \t\n]",c={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(s)}),a,e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(s)})]},p={scope:"number",variants:[{begin:`\\b0[bB][01]+(?:_[01]+)*\\b`},{begin:`\\b0[oO][0-7]+(?:_[0-7]+)*\\b`},{begin:`\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b`},{begin:`(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?`}],relevance:0},u=["false","null","true"],d=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],h=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],m={keyword:d,literal:(e=>{const t=[];return e.forEach((e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())})),t})(u),built_in:h},f=e=>e.map((e=>e.replace(/\|\d+$/,""))),g={variants:[{match:[/new/,t.concat(l,"+"),t.concat("(?!",f(h).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},b=t.concat(i,"\\b(?!\\()"),v={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},y={scope:"attr",match:t.concat(i,t.lookahead(":"),t.lookahead(/(?!::)/))},x={relevance:0,begin:/\(/,end:/\)/,keywords:m,contains:[y,r,v,e.C_BLOCK_COMMENT_MODE,c,p,g]},w={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",f(d).join("\\b|"),"|",f(h).join("\\b|"),"\\b)"),i,t.concat(l,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[x]};x.contains.push(w);const k=[y,v,e.C_BLOCK_COMMENT_MODE,c,p,g];return{case_insensitive:!1,keywords:m,contains:[{begin:t.concat(/#\[\s*/,o),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:u,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:u,keyword:["new","array"]},contains:["self",...k]},...k,{scope:"meta",match:o}]},e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},r,w,v,{match:[/const/,/\s/,i],scope:{1:"keyword",3:"variable.constant"}},g,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:m,contains:["self",r,v,e.C_BLOCK_COMMENT_MODE,c,p]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},c,p]}})),OB.registerLanguage("php-template",(function(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}})),OB.registerLanguage("plaintext",(function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}})),OB.registerLanguage("python",(function(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},r={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,r,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r,a,s]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",p=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,u=`\\b|${i.join("|")}`,d={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${p}))[eE][+-]?(${c})[jJ]?(?=${u})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${u})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${u})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${u})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${u})`},{begin:`\\b(${c})[jJ](?=${u})`}]},h={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",r,d,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,d,r],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|->|\?)|=>/,contains:[r,d,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},l,h,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[d,m,l]}]}})),OB.registerLanguage("python-repl",(function(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}})),OB.registerLanguage("r",(function(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,i=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,r=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 "+"NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F "+"abs acos acosh all any anyNA Arg as.call as.character "+"as.complex as.double as.environment as.integer as.logical "+"as.null.default as.numeric as.raw asin asinh atan atanh attr "+"attributes baseenv browser c call ceiling class Conj cos cosh "+"cospi cummax cummin cumprod cumsum digamma dim dimnames "+"emptyenv exp expression floor forceAndCall gamma gc.time "+"globalenv Im interactive invisible is.array is.atomic is.call "+"is.character is.complex is.double is.environment is.expression "+"is.finite is.function is.infinite is.integer is.language "+"is.list is.logical is.matrix is.na is.name is.nan is.null "+"is.numeric is.object is.pairlist is.raw is.recursive is.single "+"is.symbol lazyLoadDBfetch length lgamma list log max min "+"missing Mod names nargs nzchar oldClass on.exit pos.to.env "+"proc.time prod quote range Re rep retracemem return round "+"seq_along seq_len seq.int sign signif sin sinh sinpi sqrt "+"standardGeneric substitute sum switch tan tanh tanpi tracemem "+"trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,i]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,i]},{scope:{1:"punctuation",2:"number"},match:[r,i]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,i]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:r},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}})),OB.registerLanguage("ruby",(function(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(i,/(::\w+)*/),r={"variable.constant":["__FILE__","__LINE__"],"variable.language":["self","super"],keyword:["alias","and","attr_accessor","attr_reader","attr_writer","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","include","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield"],built_in:["proc","lambda"],literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:r},p={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},u="[0-9](_?[0-9])*",d={className:"number",relevance:0,variants:[{begin:`\\b(${"[1-9](_?[0-9])*|0"})(\\.(${u}))?([eE][+-]?(${u})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:r}]},m=[p,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/class\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:r},{relevance:0,match:[o,/\.new[ (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[p,{begin:n}],relevance:0},d,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])"+`(?![A-Za-z])(?![@$?'])`},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:r},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a,l),relevance:0}].concat(a,l);c.contains=m,h.contains=m;const f=[{begin:/^\s*=>/,starts:{end:"$",contains:m}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:r,contains:m}}];return l.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:r,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(f).concat(l).concat(m)}})),OB.registerLanguage("rust",(function(e){const t=e.regex,n={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},i="([ui](8|16|32|64|128|size)|f(32|64))?",o=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],r=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:r,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:o},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+i},{begin:"\\b0o([0-7_]+)"+i},{begin:"\\b0x([A-Fa-f0-9_]+)"+i},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+i}],relevance:0},{begin:[/fn/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,e.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:o,type:r}},{className:"punctuation",begin:"->"},n]}})),OB.registerLanguage("scss",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=DR,i=CR,o="@[a-z-]+",r={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+ER.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},r,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+OR.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,r,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:MR.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},r,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}})),OB.registerLanguage("shell",(function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}})),OB.registerLanguage("sql",(function(e){const t=e.regex,n=e.COMMENT("--","$"),i=["true","false","unknown"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],r=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],a=r,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!r.includes(e))),c={begin:t.concat(/\b/,t.either(...a),/\s*\(/),relevance:0,keywords:{built_in:a}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const i=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:i(e)?`${e}|0`:e))}(l,{when:e=>e.length<3}),literal:i,type:o,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(s),literal:i,type:o}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),OB.registerLanguage("swift",(function(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),i=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,AR(...IR,...zR)],className:{2:"keyword"}},r={match:SR(/\./,AR(...RR)),relevance:0},s=RR.filter((e=>"string"==typeof e)).concat(["_|0"]),a={variants:[{className:"keyword",match:AR(...RR.filter((e=>"string"!=typeof e)).concat(LR).map(jR),...zR)}]},l={$pattern:AR(/\b\w+/,/#\w+/),keyword:s.concat(PR),literal:FR},c=[o,r,a],p=[{match:SR(/\./,AR(...UR)),relevance:0},{className:"built_in",match:SR(/\b/,AR(...UR),/(?=\()/)}],u={match:/->/,relevance:0},d=[u,{className:"operator",relevance:0,variants:[{match:WR},{match:`\\.(\\.|${$R})+`}]}],h="([0-9]_*)+",m="([0-9a-fA-F]_*)+",f={className:"number",relevance:0,variants:[{match:`\\b(${h})(\\.(${h}))?`+`([eE][+-]?(${h}))?\\b`},{match:`\\b0x(${m})(\\.(${m}))?`+`([pP][+-]?(${h}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e="")=>({className:"subst",variants:[{match:SR(/\\/,e,/[0\\tnr"']/)},{match:SR(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),b=(e="")=>({className:"subst",match:SR(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),v=(e="")=>({className:"subst",label:"interpol",begin:SR(/\\/,e,/\(/),end:/\)/}),y=(e="")=>({begin:SR(e,/"""/),end:SR(/"""/,e),contains:[g(e),b(e),v(e)]}),x=(e="")=>({begin:SR(e,/"/),end:SR(/"/,e),contains:[g(e),v(e)]}),w={className:"string",variants:[y(),y("#"),y("##"),y("###"),x(),x("#"),x("##"),x("###")]},k={match:SR(/`/,KR,/`/)},_=[k,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${VR}+`}],E=[{match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:GR,contains:[...d,f,w]}]}},{className:"keyword",match:SR(/@/,AR(...QR))},{className:"meta",match:SR(/@/,KR)}],M={match:NR(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:SR(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,VR,"+")},{className:"type",match:YR,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:SR(/\s+&\s+/,NR(YR)),relevance:0}]},C={begin:/</,end:/>/,keywords:l,contains:[...i,...c,...E,u,M]};M.contains.push(C);const D={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:SR(KR,/\s*:/),keywords:"_|0",relevance:0},...i,...c,...p,...d,f,w,..._,...E,M]},O={begin:/</,end:/>/,contains:[...i,M]},T={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:AR(NR(SR(KR,/\s*:/)),NR(SR(KR,/\s+/,KR,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:KR}]},...i,...c,...d,f,w,...E,M,D],endsParent:!0,illegal:/["']/},N={match:[/func/,/\s+/,AR(k.match,KR,WR)],className:{1:"keyword",3:"title.function"},contains:[O,T,t],illegal:[/\[/,/%/]},S={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[O,T,t],illegal:/\[|%/},A={match:[/operator/,/\s+/,WR],className:{1:"keyword",3:"title"}},j={begin:[/precedencegroup/,/\s+/,YR],className:{1:"keyword",3:"title"},contains:[M],keywords:[...BR,...FR],end:/}/};for(const e of w.variants){const t=e.contains.find((e=>"interpol"===e.label));t.keywords=l;const n=[...c,...p,...d,f,w,..._];t.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:l,contains:[...i,N,S,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:l,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...c]},A,j,{beginKeywords:"import",end:/$/,contains:[...i],relevance:0},...c,...p,...d,f,w,..._,...E,M,D]}})),OB.registerLanguage("typescript",(function(e){const t=rF(e),n=ZR,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},r={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[t.exports.CLASS_REFERENCE]},s={$pattern:ZR,keyword:JR.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:XR,built_in:oF.concat(i),"variable.language":iF},a={className:"meta",begin:"@"+n},l=(e,t,n)=>{const i=e.contains.findIndex((e=>e.label===t));if(-1===i)throw new Error("can not find mode to replace");e.contains.splice(i,1,n)};Object.assign(t.keywords,s),t.exports.PARAMS_CONTAINS.push(a),t.contains=t.contains.concat([a,o,r]),l(t,"shebang",e.SHEBANG()),l(t,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/});const c=t.contains.find((e=>"func.def"===e.label));return c.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx"]}),t})),OB.registerLanguage("vbnet",(function(e){const t=e.regex,n=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,r=/\d{1,2}(:\d{1,2}){1,2}/,s={className:"literal",variants:[{begin:t.concat(/# */,t.either(i,n),/ *#/)},{begin:t.concat(/# */,r,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(i,n),/ +/,t.either(o,r),/ *#/)}]},a=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval "+"call case catch class compare const continue custom declare default delegate dim distinct do "+"each equals else elseif end enum erase error event exit explicit finally for friend from function "+"get global goto group handles if implements imports in inherits interface into iterator "+"join key let lib loop me mid module mustinherit mustoverride mybase myclass "+"namespace narrowing new next notinheritable notoverridable "+"of off on operator option optional order overloads overridable overrides "+"paramarray partial preserve private property protected public "+"raiseevent readonly redim removehandler resume return "+"select set shadows shared skip static step stop structure strict sub synclock "+"take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor "+"cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{className:"label",begin:/^\w+:/},a,l,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[l]}]}})),OB.registerLanguage("wasm",(function(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);return t.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"]},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},{className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/},{className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}]}})),OB.registerLanguage("xml",(function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},r=e.inherit(o,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,a,s,r,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,r,a,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),OB.registerLanguage("yaml",(function(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},o=e.inherit(i,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),r={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},s={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},a={begin:/\{/,end:/\}/,contains:[s],illegal:"\\n",relevance:0},l={begin:"\\[",end:"\\]",contains:[s],illegal:"\\n",relevance:0},c=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},r,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},a,l,i],p=[...c];return p.pop(),p.push(o),s.contains=p,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:c}}));const TB=()=>t.createElement(Tc,{"data-cy":"neeto-editor-code-block"},t.createElement("pre",null,t.createElement(Oc,{as:"code"})));var NB=QL.extend({addNodeView:()=>new Ac(TB)}).configure({lowlight:OB}),SB=cs.create({name:"paste-unformatted",addCommands:()=>({pasteUnformatted:()=>async e=>{let{editor:t}=e;const n=await navigator.clipboard.readText();t.commands.insertContent(n)}})}),AB=jI.extend({content:"root",addProseMirrorPlugins(){const{editor:e}=this;return[new Xt({key:new nn("eventHandler"),props:{handleClick(t,n){const{state:i}=t,o=i.doc.lastChild,r=i.doc.resolve(n).nodeBefore;if(o&&r){const t=o.eq(r),i=o.isInline,s=["paragraph","text"].includes(o.type.name);!t||i||s||e.commands.insertContentAt(n,{type:"paragraph",content:""})}}}})]}}),jB=ta.create({name:"external-video",addOptions:()=>({inline:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},title:{default:null},frameborder:{default:"0"},allow:{default:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"},allowfullscreen:{default:"allowfullscreen"}}),parseHTML:()=>[{tag:"iframe[src]"}],renderHTML(e){let{HTMLAttributes:t}=e;return["iframe",Wr(this.options.HTMLAttributes,{...t,class:"video-wrapper"})]},addCommands(){return{setExternalVideo:e=>t=>{let{commands:n}=t;return n.insertContent({type:this.name,attrs:e})}}}});const IB=new nn("suggestion");function zB({pluginKey:e=IB,editor:t,char:n="@",allowSpaces:i=!1,allowedPrefixes:o=null,startOfLine:r=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:p=(()=>({})),allow:u=(()=>!0)}){let d;const h=null==p?void 0:p(),m=new Xt({key:e,view(){return{update:async(e,n)=>{var i,o,r,s,a,p,u;const m=null===(i=this.key)||void 0===i?void 0:i.getState(n),f=null===(o=this.key)||void 0===o?void 0:o.getState(e.state),g=m.active&&f.active&&m.range.from!==f.range.from,b=!m.active&&f.active,v=m.active&&!f.active,y=b||g,x=!b&&!v&&m.query!==f.query&&!g,w=v||g;if(!y&&!x&&!w)return;const k=w&&!y?m:f,_=e.dom.querySelector(`[data-decoration-id="${k.decorationId}"]`);d={editor:t,range:k.range,query:k.query,text:k.text,items:[],command:e=>{l({editor:t,range:k.range,props:e})},decorationNode:_,clientRect:_?()=>{var n;const{decorationId:i}=null===(n=this.key)||void 0===n?void 0:n.getState(t.state),o=e.dom.querySelector(`[data-decoration-id="${i}"]`);return(null==o?void 0:o.getBoundingClientRect())||null}:null},y&&(null===(r=null==h?void 0:h.onBeforeStart)||void 0===r||r.call(h,d)),x&&(null===(s=null==h?void 0:h.onBeforeUpdate)||void 0===s||s.call(h,d)),(x||y)&&(d.items=await c({editor:t,query:k.query})),w&&(null===(a=null==h?void 0:h.onExit)||void 0===a||a.call(h,d)),x&&(null===(p=null==h?void 0:h.onUpdate)||void 0===p||p.call(h,d)),y&&(null===(u=null==h?void 0:h.onStart)||void 0===u||u.call(h,d))},destroy:()=>{var e;d&&(null===(e=null==h?void 0:h.onExit)||void 0===e||e.call(h,d))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}),apply(e,s,a,l){const{isEditable:c}=t,{composing:p}=t.view,{selection:d}=e,{empty:h,from:m}=d,f={...s};if(f.composing=p,c&&(h||t.view.composing)){!(m<s.range.from||m>s.range.to)||p||s.composing||(f.active=!1);const e=function(e){var t;const{char:n,allowSpaces:i,allowedPrefixes:o,startOfLine:r,$position:s}=e,a=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),l=new RegExp(`\\s${a}$`),c=r?"^":"",p=i?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),u=(null===(t=s.nodeBefore)||void 0===t?void 0:t.isText)&&s.nodeBefore.text;if(!u)return null;const d=s.pos-u.length,h=Array.from(u.matchAll(p)).pop();if(!h||void 0===h.input||void 0===h.index)return null;const m=h.input.slice(Math.max(0,h.index-1),h.index),f=new RegExp(`^[${null==o?void 0:o.join("")}\0]?$`).test(m);if(null!==o&&!f)return null;const g=d+h.index;let b=g+h[0].length;return i&&l.test(u.slice(b-1,b+1))&&(h[0]+=" ",b+=1),g<s.pos&&b>=s.pos?{range:{from:g,to:b},query:h[0].slice(n.length),text:h[0]}:null}({char:n,allowSpaces:i,allowedPrefixes:o,startOfLine:r,$position:d.$from}),a=`id_${Math.floor(4294967295*Math.random())}`;e&&u({editor:t,state:l,range:e.range})?(f.active=!0,f.decorationId=s.decorationId?s.decorationId:a,f.range=e.range,f.query=e.query,f.text=e.text):f.active=!1}else f.active=!1;return f.active||(f.decorationId=null,f.range={from:0,to:0},f.query=null,f.text=null),f}},props:{handleKeyDown(e,t){var n;const{active:i,range:o}=m.getState(e.state);return i&&(null===(n=null==h?void 0:h.onKeyDown)||void 0===n?void 0:n.call(h,{view:e,event:t,range:o}))||!1},decorations(e){const{active:t,range:n,decorationId:i}=m.getState(e);return t?Ho.create(e.doc,[Bo.inline(n.from,n.to,{nodeName:s,class:a,"data-decoration-id":i})]):null}}});return m}const LB=new nn("emoji-picker"),RB=ta.create({name:"emojiPicker",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({suggestion:{char:"::",startOfLine:!1,pluginKey:LB,items:()=>[],render:()=>{let e,t;return{onStart(n){e=new Nc(iw,{props:n,editor:n.editor}),t=hc("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t[0].destroy(),e.destroy()}}}}}),addProseMirrorPlugins(){return[zB({editor:this.editor,...this.options.suggestion})]}});class FB extends t.Component{constructor(){super(...arguments),If(this,"state",{isLoading:!1,selectedIndex:0,emojiSuggestions:[]}),If(this,"fetchEmojiData",(async()=>{this.setState({isLoading:!0});try{const{data:e}=await oy.get("https://cdn.jsdelivr.net/npm/@emoji-mart/data");return this.setState({isLoading:!1}),e}catch(e){return this.setState({isLoading:!1}),{}}})),If(this,"searchEmoji",(async()=>{if(this.props.query)return(await px.search(this.props.query)).slice(0,5);return(await Promise.all(["+1","-1","smile","tada","heart"].map((e=>px.search(e))))).map((e=>e[0]))})),If(this,"searchEmojiAndSetState",(async()=>{const e=await this.searchEmoji();this.setState({emojiSuggestions:e})})),If(this,"setEditorState",(async()=>{const e=await this.searchEmoji();this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e[0]).run()})),If(this,"onKeyDown",(e=>{let{event:t}=e;return"ArrowLeft"===t.key||"ArrowDown"===t.key?(this.setState((e=>{let{selectedIndex:t,emojiSuggestions:n}=e;return{selectedIndex:(t+n.length-1)%n.length}})),!0):"ArrowRight"===t.key||"ArrowUp"===t.key?(this.setState((e=>{let{selectedIndex:t,emojiSuggestions:n}=e;return{selectedIndex:(t+1)%n.length}})),!0):"Enter"===t.key?(this.selectItem(this.state.selectedIndex),!0):" "===t.key?(Up(this.props.query)?this.props.editor.chain().focus().insertContent(" ").run():this.setEditorState(),!0):"Escape"===t.key&&(this.props.editor.chain().focus().insertContent(" ").run(),!0)})),If(this,"selectItem",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(this.state.emojiSuggestions[e]).run()}))}componentDidMount(){sx({data:this.fetchEmojiData,theme:"light",previewPosition:"none"}),this.searchEmojiAndSetState()}componentDidUpdate(e){this.props.query!==e.query&&this.searchEmojiAndSetState()}render(){return t.createElement("div",{className:"neeto-editor-emoji-suggestion"},this.state.isLoading&&t.createElement(vA,null),!this.state.isLoading&&(this.state.emojiSuggestions.length>0?this.state.emojiSuggestions.map(((e,n)=>t.createElement("div",{key:e.id,onClick:()=>this.selectItem(n),className:Bc("neeto-editor-emoji-suggestion__item",{"neeto-editor-emoji-suggestion__item--selected":n===this.state.selectedIndex}),"data-cy":`neeto-editor-emoji-suggestion-${e.id}`},e.skins[0].native))):t.createElement("p",null,"No results")))}}const BB=new nn("emoji-suggestion"),PB=ta.create({name:"emojiSuggestion",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({HTMLAttributes:{class:"neeto-editor-emoji"},renderEmoji(e){let{node:t}=e;return t.attrs.label},suggestion:{}}),addAttributes:()=>({label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML:()=>[{tag:"span[data-emoji]"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",Wr({"data-emoji":""},this.options.HTMLAttributes,n),this.options.renderEmoji({node:t})]},renderText(e){let{node:t}=e;return this.options.renderEmoji({node:t})},addCommands(){return{setEmoji:e=>t=>{var n;let{chain:i}=t;i().focus().insertContent([{type:this.name,attrs:{label:(null==e?void 0:e.native)||(null==e||null===(n=e.skins[0])||void 0===n?void 0:n.native)||""}},{type:"text",text:" "}]).run()}}},addProseMirrorPlugins(){return[zB({editor:this.editor,...this.options.suggestion})]}}),UB={char:":",startOfLine:!1,pluginKey:BB,command:e=>{let{editor:t,range:n,props:i}=e;t.chain().focus().deleteRange(n).setEmoji(i).run()},items:()=>[],render:()=>{let e,t;return{onStart(n){e=new Nc(FB,{props:n,editor:n.editor}),t=hc("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"top-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t[0].destroy(),e.destroy()}}}};var HB=PB.configure({suggestion:UB});const $B=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,WB=ta.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",Wr(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[Zs({find:$B,type:this.type,getAttributes:e=>{const[,,t,n,i]=e;return{src:n,alt:t,title:i}}})]}});var qB,VB=void 0&&(void 0).__extends||(qB=function(e,t){return qB=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},qB(e,t)},function(e,t){function n(){this.constructor=e}qB(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),KB=void 0&&(void 0).__assign||function(){return KB=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},KB.apply(this,arguments)},YB={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},QB={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},GB={width:"20px",height:"20px",position:"absolute"},ZB={top:KB(KB({},YB),{top:"-5px"}),right:KB(KB({},QB),{left:void 0,right:"-5px"}),bottom:KB(KB({},YB),{top:void 0,bottom:"-5px"}),left:KB(KB({},QB),{left:"-5px"}),topRight:KB(KB({},GB),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:KB(KB({},GB),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:KB(KB({},GB),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:KB(KB({},GB),{left:"-10px",top:"-10px",cursor:"nw-resize"})},JB=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}return VB(n,t),n.prototype.render=function(){return e.createElement("div",{className:this.props.className||"",style:KB(KB({position:"absolute",userSelect:"none"},ZB[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},n}(e.PureComponent),XB=void 0&&(void 0).__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),eP=void 0&&(void 0).__assign||function(){return eP=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},eP.apply(this,arguments)},tP={width:"auto",height:"auto"},nP=function(e,t,n){return Math.max(Math.min(e,n),t)},iP=function(e,t){return Math.round(e/t)*t},oP=function(e,t){return new RegExp(e,"i").test(t)},rP=function(e){return Boolean(e.touches&&e.touches.length)},sP=function(e,t,n){void 0===n&&(n=0);var i=t.reduce((function(n,i,o){return Math.abs(i-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[i]-e);return 0===n||o<n?t[i]:e},aP=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},lP=function(e,t,n,i){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return i*(Number(e.replace("vh",""))/100)}return e},cP=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],pP="__resizable_base__",uP=function(t){function n(e){var n=t.call(this,e)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(pP):t.className+=pP,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return XB(n,t),Object.defineProperty(n.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||tP},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,i=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return aP(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?aP(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?aP(t.height):n("height")}},enumerable:!1,configurable:!0}),n.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),i},n.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},n.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},n.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},n.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},n.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},n.prototype.calculateNewMaxFromBoundary=function(e,t){var n,i,o=this.props.boundsByDirection,r=this.state.direction,s=o&&oP("left",r),a=o&&oP("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),i=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},n.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,i=this.props.resizeRatio||1,o=this.state,r=o.direction,s=o.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,p=a.lockAspectRatioExtraWidth,u=s.width,d=s.height,h=c||0,m=p||0;return oP("right",r)&&(u=s.width+(e-s.x)*i/n,l&&(d=(u-m)/this.ratio+h)),oP("left",r)&&(u=s.width-(e-s.x)*i/n,l&&(d=(u-m)/this.ratio+h)),oP("bottom",r)&&(d=s.height+(t-s.y)*i/n,l&&(u=(d-h)*this.ratio+m)),oP("top",r)&&(d=s.height-(t-s.y)*i/n,l&&(u=(d-h)*this.ratio+m)),{newWidth:u,newHeight:d}},n.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,i){var o=this.props,r=o.lockAspectRatio,s=o.lockAspectRatioExtraHeight,a=o.lockAspectRatioExtraWidth,l=void 0===i.width?10:i.width,c=void 0===n.width||n.width<0?e:n.width,p=void 0===i.height?10:i.height,u=void 0===n.height||n.height<0?t:n.height,d=s||0,h=a||0;if(r){var m=(p-d)*this.ratio+h,f=(u-d)*this.ratio+h,g=(l-h)/this.ratio+d,b=(c-h)/this.ratio+d,v=Math.max(l,m),y=Math.min(c,f),x=Math.max(p,g),w=Math.min(u,b);e=nP(e,v,y),t=nP(t,x,w)}else e=nP(e,l,c),t=nP(t,p,u);return{newWidth:e,newHeight:t}},n.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),o=i.left,r=i.top,s=i.right,a=i.bottom;this.resizableLeft=o,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},n.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,i=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&rP(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",n=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:eP(eP({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},n.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&rP(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,i=n.maxWidth,o=n.maxHeight,r=n.minWidth,s=n.minHeight,a=rP(e)?e.touches[0].clientX:e.clientX,l=rP(e)?e.touches[0].clientY:e.clientY,c=this.state,p=c.direction,u=c.original,d=c.width,h=c.height,f=this.getParentSize(),g=function(e,t,n,i,o,r,s){return i=lP(i,e.width,t,n),o=lP(o,e.height,t,n),r=lP(r,e.width,t,n),s=lP(s,e.height,t,n),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,i,o,r,s);i=g.maxWidth,o=g.maxHeight,r=g.minWidth,s=g.minHeight;var b=this.calculateNewSizeFromDirection(a,l),v=b.newHeight,y=b.newWidth,x=this.calculateNewMaxFromBoundary(i,o);this.props.snap&&this.props.snap.x&&(y=sP(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=sP(v,this.props.snap.y,this.props.snapGap));var w=this.calculateNewSizeFromAspectRatio(y,v,{width:x.maxWidth,height:x.maxHeight},{width:r,height:s});if(y=w.newWidth,v=w.newHeight,this.props.grid){var k=iP(y,this.props.grid[0]),_=iP(v,this.props.grid[1]),E=this.props.snapGap||0;y=0===E||Math.abs(k-y)<=E?k:y,v=0===E||Math.abs(_-v)<=E?_:v}var M={width:y-u.width,height:v-u.height};if(d&&"string"==typeof d)if(d.endsWith("%"))y=y/f.width*100+"%";else if(d.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(d.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))v=v/f.height*100+"%";else if(h.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}var C={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?C.flexBasis=C.width:"column"===this.flexDir&&(C.flexBasis=C.height),m((function(){t.setState(C)})),this.props.onResize&&this.props.onResize(e,p,this.resizable,M)}},n.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,i=t.direction,o=t.original;if(n&&this.resizable){var r={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:eP(eP({},this.state.backgroundStyle),{cursor:"auto"})})}},n.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},n.prototype.renderResizer=function(){var t=this,n=this.props,i=n.enable,o=n.handleStyles,r=n.handleClasses,s=n.handleWrapperStyle,a=n.handleWrapperClass,l=n.handleComponent;if(!i)return null;var c=Object.keys(i).map((function(n){return!1!==i[n]?e.createElement(JB,{key:n,direction:n,onResizeStart:t.onResizeStart,replaceStyles:o&&o[n],className:r&&r[n]},l&&l[n]?l[n]:null):null}));return e.createElement("div",{className:a,style:s},c)},n.prototype.render=function(){var t=this,n=Object.keys(this.props).reduce((function(e,n){return-1!==cP.indexOf(n)||(e[n]=t.props[n]),e}),{}),i=eP(eP(eP({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return e.createElement(o,eP({ref:this.ref,style:i,className:this.props.className},n),this.state.isResizing&&e.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},n.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},n}(e.PureComponent);const dP=e=>{let{node:n,editor:i,getPos:o}=e;const{alt:r,src:s,float:a,align:l,height:c,width:p}=n.attrs,u=r||"",{view:d}=i;return t.createElement(Tc,null,t.createElement(uP,{lockAspectRatio:!0,className:`neeto-editor__image neeto-editor__image--${a} neeto-editor__image--${l} neeto-editor__image-defaults`,size:{height:c,width:p},onResizeStop:(e,t,r)=>{d.dispatch(d.state.tr.setNodeMarkup(o(),void 0,{...n.attrs,height:r.offsetHeight,width:r.offsetWidth})),i.commands.focus()}},t.createElement("figure",null,t.createElement("img",S({alt:u,src:s},n.attrs)),t.createElement("figcaption",null,u))))},hP=WB.extend({name:"image",addAttributes:()=>({...WB.config.addAttributes(),height:{default:"auto",rendered:!1},width:{default:"fit-content",rendered:!1},float:{default:"none",rendered:!1},align:{default:"center",rendered:!1}}),addCommands(){return{setImage:e=>t=>{var n,i,o;let{tr:r,commands:s}=t;return"image"===(null===(n=r.selection)||void 0===n||null===(i=n.node)||void 0===i||null===(o=i.type)||void 0===o?void 0:o.name)?s.updateAttributes("image",e):s.insertContent({type:this.name,attrs:e})},setImageAttributes:e=>t=>{let{tr:n}=t;const{selection:i}=n,o={...i.node.attrs,...e},r=this.type.create(o);n.replaceRangeWith(i.from,i.to,r)}}},parseHTML:()=>[{tag:"img"}],renderHTML(e){let{node:t}=e;const{alt:n,src:i,float:o,align:r,height:s,width:a}=t.attrs,l=n||"";return["a",{class:`neeto-editor__image neeto-editor__image--${o} neeto-editor__image--${r} neeto-editor__image-defaults`,style:`height:${isNaN(s)?s:`${s}px`};width:${isNaN(a)?a:`${a}px`};`,href:i,target:"_blank",rel:"noopener noreferrer"},["figure",{},["img",Wr(t.attrs,{src:i,caption:l})],["figcaption",l]]]},addNodeView:()=>Ac(dP)}),mP=async(e,t)=>{const n=new hA({file:e,url:t}),{blob_url:i}=await n.create();return i};var fP=e=>{let{uploadEndpoint:t}=e;return hP.extend({addProseMirrorPlugins:()=>[new Xt({props:{handleDOMEvents:{paste(e,n){var i,o;const{schema:r,selection:{$anchor:{pos:s}}}=e.state;if(!(null===(i=n.clipboardData)||void 0===i||null===(o=i.files)||void 0===o?void 0:o.length))return;const a=Array.from(n.clipboardData.files).filter((e=>/image/i.test(e.type)));a.length&&(n.preventDefault(),a.forEach((async n=>{const i=r.nodes.image.create({src:await mP(n,t)}),o=e.state.tr.insert(s,i);e.dispatch(o)})))}}}})]})},gP=ta.create({name:"figcaption",selectable:!1,draggable:!1,parseHTML:()=>[{tag:"figcaption"}]});const bP=e=>{let{handleSubmit:t,shortcuts:n}=e;return cs.create({name:"keyboard-shortcuts",addKeyboardShortcuts(){return{"Mod-Enter":()=>(null==t||t(this.editor.getHTML()),this.editor.commands.blur(),!0),...n}}})};var vP=e=>{let{handleSubmit:t,shortcuts:n}=e;return bP({handleSubmit:t,shortcuts:n})};const yP=new nn("mention"),xP=ta.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:e,node:t}){var n;return`${e.suggestion.char}${null!==(n=t.attrs.label)&&void 0!==n?n:t.attrs.id}`},suggestion:{char:"@",pluginKey:yP,command:({editor:e,range:t,props:n})=>{var i,o;const r=e.view.state.selection.$to.nodeAfter;(null===(i=null==r?void 0:r.text)||void 0===i?void 0:i.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),null===(o=window.getSelection())||void 0===o||o.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),i=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(i)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){return["span",Wr({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e})]},renderText({node:e}){return this.options.renderLabel({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command((({tr:e,state:t})=>{let n=!1;const{selection:i}=t,{empty:o,anchor:r}=i;return!!o&&(t.doc.nodesBetween(r-1,r,((t,i)=>{if(t.type.name===this.name)return n=!0,e.insertText(this.options.suggestion.char||"",i,i+t.nodeSize),!1})),n)}))}},addProseMirrorPlugins(){return[zB({editor:this.editor,...this.options.suggestion})]}}),wP=e=>{let{wrapperRef:t,index:n}=e;if(!t.current||n>=t.current.children.length)return;const i=8,o=t.current,r=o.children[n],s=r.clientHeight+i;let a=o.scrollTop;r.offsetTop+s>a+o.clientHeight?a=r.offsetTop-o.clientHeight+s:a>r.offsetTop&&(a=r.offsetTop-i),t.current.scrollTop=a};class kP extends t.Component{constructor(e){super(e),If(this,"selectItem",(e=>{const{items:t,command:n}=this.props,i=t[e];i&&n({label:i.name,id:i.key})})),If(this,"upHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+e.length-1)%e.length}}))})),If(this,"downHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+1)%e.length}}))})),If(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),If(this,"onKeyDown",(e=>{let{event:t}=e;const n={ArrowUp:this.upHandler,ArrowDown:this.downHandler,Enter:this.enterHandler};return!!Object.prototype.hasOwnProperty.call(n,t.key)&&(n[t.key](),!0)})),this.state={selectedIndex:0},this.mentionRef=t.createRef()}componentDidUpdate(e){const{items:t}=this.props;t!==e.items&&this.setState({selectedIndex:0}),wP({wrapperRef:this.mentionRef,index:this.state.selectedIndex})}render(){const{selectedIndex:e}=this.state,{items:n}=this.props;return 0===n.length?t.createElement("div",{className:"neeto-editor-mentions__wrapper"},t.createElement("p",{className:"neeto-editor-mentions__item"},"No Results")):t.createElement("div",{ref:this.mentionRef,className:"neeto-editor-mentions__wrapper","data-cy":"neeto-editor-mention-list"},n.map(((n,i)=>{let{key:o,name:r,imageUrl:s,showImage:a}=n;return t.createElement("button",{className:Bc("neeto-editor-mentions__item",{active:i===e}),key:o,onClick:()=>this.selectItem(i),type:"button","data-cy":`neeto-editor-mention-list-${r}`},a&&t.createElement(cw,{user:{name:r,imageUrl:s}}),t.createElement("p",null,r))})))}}const _P={render:()=>{let e,t;return{onStart:n=>{e=new Nc(kP,{props:n,editor:n.editor}),t=hc("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(n){var i;return"Escape"===n.event.key?(t[0].hide(),!0):null===(i=e.ref)||void 0===i?void 0:i.onKeyDown(n)},onExit(){t[0].destroy(),e.destroy()}}}},EP=xP.extend({addCommands(){return{setMention:e=>{let{id:t,label:n}=e;return e=>{let{chain:i}=e;i().focus().insertContent([{type:this.name,attrs:{id:t,label:n}},{type:"text",text:" "}]).run()}}}}});var MP=e=>{let{suggestion:t={},...n}=e;return EP.configure({...n,suggestion:{..._P,...t}})},CP="[object Object]";var DP,OP,TP=Function.prototype,NP=Object.prototype,SP=TP.toString,AP=NP.hasOwnProperty,jP=SP.call(Object),IP=NP.toString,zP=(DP=Object.getPrototypeOf,OP=Object,function(e){return DP(OP(e))});var LP=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||IP.call(e)!=CP||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=zP(e);if(null===t)return!0;var n=AP.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&SP.call(n)==jP};const RP=e=>{const t=typeof e;return"string"===t||"funtion"===t?e:LP(e)?t=>{let{node:n}=t;const{name:i}=n.type;return e[i]}:""};var FP=cs.create({name:"placeholder",addOptions:()=>({excludeNodeTypes:["variable","codeBlock"],emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!1,includeChildren:!1}),addProseMirrorPlugins(){return[new Xt({props:{decorations:e=>{let{doc:t,selection:n}=e;const i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=n,r=[];return i?(t.descendants(((e,t)=>{const n=o>=t&&o<=t+e.nodeSize,i=!e.isLeaf&&!e.childCount,s=this.options.excludeNodeTypes.includes(e.type.name);if((n||!this.options.showOnlyCurrent)&&!s&&i){const n=[this.options.emptyNodeClass];this.editor.isEmpty&&n.push(this.options.emptyEditorClass);const i=Bo.node(t,t+e.nodeSize,{class:n.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t}):this.options.placeholder});r.push(i)}return this.options.includeChildren})),Ho.create(t,r)):null}}})]}});class BP extends t.Component{constructor(e){super(e),If(this,"keydownHandler",(e=>{const t={Enter:this.enterHandler,ArrowUp:this.upHandler,ArrowDown:this.downHandler,ArrowLeft:this.leftArrowHandler,ArrowRight:this.rightArrowHandler};e.key in t&&t[e.key](e)})),If(this,"selectItem",(e=>{const{items:t,editor:n,range:i}=this.props,o=t[e],r=o&&o.command,s=Up(o.items);r&&s&&o.command({editor:n,range:i})})),If(this,"upHandler",(()=>{const{items:e}=this.props,{selectedIndex:t}=this.state;this.setState({selectedIndex:(t+e.length-1)%e.length})})),If(this,"downHandler",(()=>{const{items:e}=this.props,{selectedIndex:t}=this.state;this.setState({selectedIndex:(t+1)%e.length})})),If(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),If(this,"leftArrowHandler",(()=>{const{menuIndex:e,setActiveMenuIndex:t}=this.props;e>0&&t(e-1)})),If(this,"rightArrowHandler",(()=>{const{menuIndex:e,setActiveMenuIndex:t,items:n}=this.props,{selectedIndex:i}=this.state,o=n[i];o&&!Up(o.items)&&t(e+1)})),this.state={selectedIndex:0},this.menuRef=t.createRef()}componentDidMount(){const{menuIndex:e,activeMenuIndex:t}=this.props;e===t&&document.addEventListener("keydown",this.keydownHandler)}componentWillUnmount(){document.removeEventListener("keydown",this.keydownHandler)}componentDidUpdate(e){const{items:t,menuIndex:n,activeMenuIndex:i}=this.props,o=n===i;t!==e.items&&this.setState({selectedIndex:0}),wP({wrapperRef:this.menuRef,index:this.state.selectedIndex}),o?document.addEventListener("keydown",this.keydownHandler):document.removeEventListener("keydown",this.keydownHandler)}render(){const{items:e,menuIndex:n,activeMenuIndex:i}=this.props,{selectedIndex:o}=this.state,r=n===i;return t.createElement("div",{ref:this.menuRef,className:"neeto-editor-slash-commands__wrapper"},e.map(((e,i)=>{const s=Up(e.items),a=t.createElement(PP,{key:e.title,item:e,index:i,selectedIndex:r?o:-1,selectItem:()=>s&&this.selectItem(i),onHover:()=>this.setState({selectedIndex:i})});return s?a:t.createElement(Jm,{key:e.title,interactive:!0,placement:"right",content:t.createElement(BP,S({},this.props,{items:e.items,menuIndex:n+1})),onCreate:e=>{let{popper:t}=e;return t.style.width="max-content"},visible:o===i,onShow:()=>{this.isSubmenuOpened=!0},onHide:()=>{this.isSubmenuOpened=!1}},a)})))}}const PP=u(((e,n)=>{let{item:i,selectedIndex:o,index:r,selectItem:s,onHover:a}=e;const{Icon:l}=i;return t.createElement("div",{className:Bc("neeto-editor-slash-commands__item",{active:r===o}),onClick:s,ref:n,"data-cy":`neeto-editor-command-list-item-${r}`,onMouseEnter:a},l&&t.createElement(l,{size:20}),t.createElement("div",{className:"neeto-editor-slash-commands__item-content"},t.createElement("h5",null,i.title),t.createElement("p",null,i.description)))}));class UP extends t.Component{constructor(){super(...arguments),If(this,"state",{activeMenuIndex:0}),If(this,"onKeyDown",(e=>{let{event:t}=e;return["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key)})),If(this,"setActiveMenuIndex",(e=>this.setState({activeMenuIndex:e})))}render(){return t.createElement(BP,S({},this.props,{menuIndex:0,activeMenuIndex:this.state.activeMenuIndex,setActiveMenuIndex:this.setActiveMenuIndex}))}}const HP={PARAGRAPH:{optionName:Gp.PARAGRAPH,title:"Paragraph",description:"Add a plain text block.",Icon:kh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("paragraph").run()}},H1:{optionName:Gp.H1,title:"H1",description:"Add a big heading.",Icon:Ih,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:1}).run()}},H2:{optionName:Gp.H2,title:"H2",description:"Add a sub-heading.",Icon:Lh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:2}).run()}},H3:{optionName:Gp.H3,title:"H3",description:"Add a sub-heading of level 3.",Icon:Ph,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:3}).run()}},H4:{optionName:Gp.H4,title:"H4",description:"Add a sub-heading of level 4.",Icon:Ph,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:4}).run()}},H5:{optionName:Gp.H5,title:"H5",description:"Add a sub-heading of level 5.",Icon:Ph,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:5}).run()}},H6:{optionName:Gp.H6,title:"H6",description:"Add a sub-heading of level 6.",Icon:Ph,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:6}).run()}},LIST_ORDERED:{optionName:Gp.LIST_ORDERED,title:"Numbered list",description:"Add a list with numbering.",Icon:gh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleOrderedList().run()}},LIST_BULLETS:{optionName:Gp.LIST_BULLETS,title:"Bulleted list",description:"Add a list with bullets.",Icon:mh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleBulletList().run()}},BLOCKQUOTE:{optionName:Gp.BLOCKQUOTE,title:"Blockquote",description:"Add a quote.",Icon:Hd,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleBlockquote().run()}},IMAGE:{optionName:Gp.IMAGE_UPLOAD,title:"Image",description:"Add an image.",Icon:sh,command:e=>{let{editor:t,range:n}=e;return t.chain().focus().deleteRange(n).run()}},CODE:{optionName:Gp.CODE_BLOCK,title:"Code block",description:"Add a code block with syntax highlighting.",Icon:Gd,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleCodeBlock().run()}},EMOJI:{optionName:Gp.EMOJI,title:"Emoji",description:"Add an emoji.",Icon:Oh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).insertContent("::").run()}},DIVIDER:{optionName:Gp.DIVIDER,title:"Divider",description:"Add an horizontal line to separate sections.",Icon:vh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setHorizontalRule().run()}},VIDEO:{optionName:Gp.VIDEO_EMBED,title:"Embed Youtube/Loom/Vimeo",description:"Embed a video from major services.",Icon:Vh,command:e=>{let{editor:t,range:n}=e;const i=prompt("Please enter Youtube/Loom/Vimeo embed URL."),o=(e=>{const t=e.match(hf);return t&&`https://www.youtube.com/embed/${t[5]}`})(i)||(e=>{const t=e.match(ff);return t&&`https://www.loom.com/embed/${t[4]}?t=${t[5]||""}`})(i)||(e=>{const t=e.match(mf);return t&&`https://player.vimeo.com/video/${t[4]}?h=${t[5]}`})(i);o?t.chain().focus().deleteRange(n).setExternalVideo({src:o}).run():t.chain().focus().deleteRange(n).insertContent("#invalid").run()}},PASTE_UNFORMATTED:{optionName:Gp.PASTE_UNFORMATTED,title:"Paste Unformatted",description:"Paste by removing all styles.",Icon:xh,command:e=>{let{editor:t,range:n}=e;return t.chain().focus().deleteRange(n).pasteUnformatted().run()}},NO_RESULT:{title:"No results",command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).run()}}},$P=new nn("commands");var WP=e=>{let{setImageUploadVisible:t,addonCommands:n,options:i}=e,o=[HP.PARAGRAPH,HP.H1,HP.H2,HP.H3,HP.H4,HP.H5,HP.H6,HP.LIST_ORDERED,HP.LIST_BULLETS,HP.BLOCKQUOTE,{...HP.IMAGE,command:function(){t(!0),HP.IMAGE.command(...arguments)}},HP.CODE,HP.EMOJI,HP.DIVIDER,HP.VIDEO,HP.PASTE_UNFORMATTED];return Up(i)||(o=o.filter((e=>{let{optionName:t}=e;return i.includes(t)}))),Up(n)||(o=o.concat(n)),cs.create({name:"slash-commands",addOptions:()=>({HTMLAttributes:{class:"commands"},suggestion:{char:"/",startOfLine:!1,pluginKey:$P,command:e=>{let{editor:t,range:n,props:i}=e;i.command({editor:t,range:n})},items:e=>{let{query:t}=e;const n=o.filter((e=>{let{title:n}=e;return n.toLowerCase().includes(t.toLowerCase())}));return Up(n)?[HP.NO_RESULT]:n},render:()=>{let e,t;return{onStart:n=>{e=new Nc(UP,{props:n,editor:n.editor}),t=hc("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",arrow:!1,zIndex:99999,role:"dropdown",theme:"neeto-editor-slash-menu"}),xf()},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t&&t[0].destroy(),e&&e.destroy(),wf()}}}}}),addProseMirrorPlugins(){return[zB({editor:this.editor,...this.options.suggestion})]}})},qP=VI.extend({name:"title",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML:()=>[{tag:`h1`}],renderHTML(e){let{_node:t,HTMLAttributes:n}=e;return[`h1`,Wr(this.options.HTMLAttributes,n),0]}});const VP=e=>{let{items:n,command:i}=e;return t.createElement("div",{className:"neeto-editor-variables-suggestion"},t.createElement(vw,{variables:n,onClickVariable:e=>{const{category_key:t,key:n}=e,o=t?`${t}.${n}`:n;i({label:o,id:o})}}))},KP=new nn("variables"),YP=ta.create({name:"variable",addOptions:()=>({HTMLAttributes:{class:"neeto-editor-variable"},charOpen:"{{",charClose:"}}",renderLabel(e){let{options:t,node:n}=e;return`${t.charOpen}${n.attrs.label||n.attrs.id}${t.charClose}`},suggestion:{}}),group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML:()=>[{tag:"span[data-variable]"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",Wr({"data-variable":""},this.options.HTMLAttributes,n),this.options.renderLabel({options:this.options,node:t})]},renderText(e){let{node:t}=e;return this.options.renderLabel({options:this.options,node:t})},addCommands(){return{setVariable:e=>t=>{let{chain:n}=t;n().focus().insertContent([{type:this.name,attrs:e},{type:"text",text:" "}]).run()}}},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command((e=>{let{tr:t,state:n}=e,i=!1;const{selection:o}=n,{empty:r,anchor:s}=o;return!!r&&(n.doc.nodesBetween(s-1,s,((e,n)=>{if(e.type.name===this.name)return i=!0,t.insertText("",n,n+e.nodeSize),!1})),i)}))}},addProseMirrorPlugins(){return[zB({editor:this.editor,...this.options.suggestion})]}}),QP={char:"{{",startOfLine:!1,pluginKey:KP,command:e=>{let{editor:t,range:n,props:i}=e;t.chain().focus().deleteRange(n).setVariable(i).run()},items:()=>[],render:()=>{let e,t;return{onStart:n=>{e=new Nc(VP,{props:n,editor:n.editor}),t=hc("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onExit(){t[0].destroy(),e.destroy()}}}};var GP=e=>{let{suggestion:t={}}=e;return YP.configure({suggestion:{...QP,...t}})};const ZP=(e,t)=>{const n=[];e.split(/\n/).forEach((e=>{const i={type:"paragraph"};e.length>0&&(i.content=[{type:"text",text:e}]);const o=re.fromJSON(t.doc.type.schema,i);n.push(o)}));const i=z.fromArray(n);return U.maxOpen(i)},JP=(e,n)=>{let{forceTitle:i=!1,titleError:s=!1,hideSlashCommands:a=!1,defaults:l=eu,addons:c=[],addonCommands:p,className:u,uploadEndpoint:d=Jp,uploadConfig:h={},initialValue:m="",onChange:f=(()=>{}),onFocus:g=(()=>{}),onBlur:b=(()=>{}),menuType:v="fixed",variables:y,mentions:x,showImageInMention:w=!1,placeholder:k=(i?{title:"Untitled"}:null),extensions:_,contentClassName:E,characterLimit:M,editorSecrets:C,rows:D=6,autoFocus:O=!1,onSubmit:T,heightStrategy:N="fixed",characterCountStrategy:A="hidden",keyboardShortcuts:j=[],error:I=null,...z}=e;const[L,R]=o(!1),F="fixed"===v,B="bubble"===v,P=!a,U=(e=>{if(e){if("string"==typeof e&&e.length)return!0;if("object"==typeof e&&Object.keys(e).length)return!0;if("function"==typeof e)return!0}return!1})(k),H=!U&&P,$=c.includes("image-upload-unsplash"),W="hidden"!==A,q=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],{includeImageUpload:n}=arguments.length>2?arguments[2]:void 0;const i=t.map((e=>e.toLowerCase()));return n&&i.push(Gp.IMAGE_UPLOAD),[].concat(e,i)}(l,c,{includeImageUpload:$}),V=(e=>{let{forceTitle:t,placeholder:n,extensions:i,mentions:o,variables:r,isSlashCommandsActive:s,showImageInMention:a,setImageUploadVisible:l,options:c,addonCommands:p,characterLimit:u,onSubmit:d,keyboardShortcuts:h,uploadEndpoint:m}=e,f=[qP,AB.extend({content:t?"title block*":"block+"}),Tz.configure({document:!1,codeBlock:!1,code:!1}),qA,xI,QA,NB,fP({uploadEndpoint:m}),gP,jB,yI,VA.configure({mode:"shallowest"}),FP.configure({placeholder:RP(n)}),HB,RB,SB,HA.configure({limit:u}),vP({handleSubmit:d,shortcuts:h})];return s&&f.push(WP({setImageUploadVisible:l,options:c,addonCommands:p})),Up(o)||f.push(MP({suggestion:{items:gw(o,a)}})),Up(r)||f.push(GP({suggestion:{items:()=>r}})),Up(i)||(f=f.concat(i)),f})({contentClassName:E,forceTitle:i,placeholder:k,extensions:_,mentions:x,variables:y,isSlashCommandsActive:P,showImageInMention:w,setImageUploadVisible:R,options:q,addonCommands:p,characterLimit:M,keyboardShortcuts:j,onSubmit:T,uploadEndpoint:d});cr.prototype.updateState=function(e){this.docView&&this.updateStateInner(e,this.state.plugins!==e.plugins)};const K=Bc("neeto-editor",{"slash-active":H,"fixed-menu-active border":F,"bubble-menu-active":B,"force-title":i,"force-title--error":s,"placeholder-active":U,[u]:u}),Y=(e=>{let{heightStrategy:t,rows:n}=e;const i={},o=n*Yp+2*(Vp+Kp);return"flexible"===t?i["min-height"]=`${o}px`:i.height=`${o}px`,i})({heightStrategy:N,rows:D}),Q=jc({extensions:V,content:m,injectCSS:!1,autofocus:O&&"end",editorProps:{attributes:{class:K,style:Pp(Y)},clipboardTextParser:ZP},parseOptions:{preserveWhitespace:!0},onCreate:e=>{let{editor:t}=e;return!O&&(e=>{const{state:t,view:n}=e,i=St.atEnd(t.doc),o=t.tr;o.setSelection(i),n.dispatch(o)})(t)},onUpdate:e=>{let{editor:t}=e;return setTimeout((()=>f(t.getHTML())),0)},onFocus:g,onBlur:b});return t.useImperativeHandle(n,(()=>({editor:Q}))),r((()=>{![process.env.RAILS_ENV,"production"].includes("production")&&Up(m)&&console.warn(`[neeto-editor]: Empty value of "initialValue" in needtoEditor is expected to be "<p></p>" instead of "${m}".`)}),[m]),t.createElement(Wp,{error:I,isFixedMenuActive:F},F&&t.createElement(ww,{editor:Q,variables:y,setImageUploadVisible:R,options:q,mentions:x,showImageInMention:w}),B&&t.createElement(vf,{editor:Q,options:q}),t.createElement(UA,{isVisible:L,setIsVisible:R,editor:Q,imageUploadUrl:d,uploadConfig:h,isUnsplashImageUploadActive:$,unsplashApiKey:null==C?void 0:C.unsplash}),t.createElement(Mc,S({editor:Q},z)),W&&t.createElement(yf,{count:null==Q?void 0:Q.storage.characterCount.characters(),limit:M,strategy:A}))};var XP=t.forwardRef(JP);
60
+ return function(t){var n=e,i=n.lib,o=i.WordArray,r=i.Hasher,s=n.algo,a=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),p=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=o.create([0,1518500249,1859775393,2400959708,2840853838]),d=o.create([1352829926,1548603684,1836072691,2053994217,0]),h=s.RIPEMD160=r.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var i=t+n,o=e[i];e[i]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var r,s,h,x,w,k,_,E,M,C,D,O=this._hash.words,T=u.words,N=d.words,S=a.words,A=l.words,j=c.words,I=p.words;for(k=r=O[0],_=s=O[1],E=h=O[2],M=x=O[3],C=w=O[4],n=0;n<80;n+=1)D=r+e[t+S[n]]|0,D+=n<16?m(s,h,x)+T[0]:n<32?f(s,h,x)+T[1]:n<48?g(s,h,x)+T[2]:n<64?b(s,h,x)+T[3]:v(s,h,x)+T[4],D=(D=y(D|=0,j[n]))+w|0,r=w,w=x,x=y(h,10),h=s,s=D,D=k+e[t+A[n]]|0,D+=n<16?v(_,E,M)+N[0]:n<32?b(_,E,M)+N[1]:n<48?g(_,E,M)+N[2]:n<64?f(_,E,M)+N[3]:m(_,E,M)+N[4],D=(D=y(D|=0,I[n]))+C|0,k=C,C=M,M=y(E,10),E=_,_=D;D=O[1]+h+M|0,O[1]=O[2]+x+C|0,O[2]=O[3]+w+k|0,O[3]=O[4]+r+_|0,O[4]=O[0]+s+E|0,O[0]=D},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;t[i>>>5]|=128<<24-i%32,t[(i+64>>>9<<4)+14]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,r=o.words,s=0;s<5;s++){var a=r[s];r[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return o},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function m(e,t,n){return e^t^n}function f(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function b(e,t,n){return e&n|t&~n}function v(e,t,n){return e^(t|~n)}function y(e,t){return e<<t|e>>>32-t}n.RIPEMD160=r._createHelper(h),n.HmacRIPEMD160=r._createHmacHelper(h)}(),e.RIPEMD160}(IN())),yS(),xS||(xS=1,wS.exports=function(e){return function(){var t=e,n=t.lib,i=n.Base,o=n.WordArray,r=t.algo,s=r.SHA1,a=r.HMAC,l=r.PBKDF2=i.extend({cfg:i.extend({keySize:128/32,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,i=a.create(n.hasher,e),r=o.create(),s=o.create([1]),l=r.words,c=s.words,p=n.keySize,u=n.iterations;l.length<p;){var d=i.update(t).finalize(s);i.reset();for(var h=d.words,m=h.length,f=d,g=1;g<u;g++){f=i.finalize(f),i.reset();for(var b=f.words,v=0;v<m;v++)h[v]^=b[v]}r.concat(d),c[0]++}return r.sigBytes=4*p,r}});t.PBKDF2=function(e,t,n){return l.create(n).compute(e,t)}}(),e.PBKDF2}(IN(),tS(),yS())),ES(),DS(),NS(),jS(),LS(),BS(),PS||(PS=1,US.exports=function(e){return e.mode.ECB=((t=e.lib.BlockCipherMode.extend()).Encryptor=t.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),t.Decryptor=t.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),t),e.mode.ECB;var t}(IN(),DS())),HS||(HS=1,$S.exports=function(e){return e.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,i=4*t,o=i-n%i,r=n+o-1;e.clamp(),e.words[r>>>2]|=o<<24-r%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923}(IN(),DS())),WS||(WS=1,qS.exports=function(e){return e.pad.Iso10126={pad:function(t,n){var i=4*n,o=i-t.sigBytes%i;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126}(IN(),DS())),VS||(VS=1,KS.exports=function(e){return e.pad.Iso97971={pad:function(t,n){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,n)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971}(IN(),DS())),YS||(YS=1,QS.exports=function(e){return e.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},e.pad.ZeroPadding}(IN(),DS())),GS||(GS=1,ZS.exports=function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding}(IN(),DS())),JS||(JS=1,XS.exports=function(e){return function(t){var n=e,i=n.lib.CipherParams,o=n.enc.Hex;n.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var t=o.parse(e);return i.create({ciphertext:t})}}}(),e.format.Hex}(IN(),DS())),eA||(eA=1,tA.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,i=t.algo,o=[],r=[],s=[],a=[],l=[],c=[],p=[],u=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,i=0;for(t=0;t<256;t++){var m=i^i<<1^i<<2^i<<3^i<<4;m=m>>>8^255&m^99,o[n]=m,r[m]=n;var f=e[n],g=e[f],b=e[g],v=257*e[m]^16843008*m;s[n]=v<<24|v>>>8,a[n]=v<<16|v>>>16,l[n]=v<<8|v>>>24,c[n]=v,v=16843009*b^65537*g^257*f^16843008*n,p[m]=v<<24|v>>>8,u[m]=v<<16|v>>>16,d[m]=v<<8|v>>>24,h[m]=v,n?(n=f^e[e[e[b^f]]],i^=e[e[i]]):n=i=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],f=i.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,i=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],s=0;s<i;s++)s<n?r[s]=t[s]:(c=r[s-1],s%n?n>6&&s%n==4&&(c=o[c>>>24]<<24|o[c>>>16&255]<<16|o[c>>>8&255]<<8|o[255&c]):(c=o[(c=c<<8|c>>>24)>>>24]<<24|o[c>>>16&255]<<16|o[c>>>8&255]<<8|o[255&c],c^=m[s/n|0]<<24),r[s]=r[s-n]^c);for(var a=this._invKeySchedule=[],l=0;l<i;l++){if(s=i-l,l%4)var c=r[s];else c=r[s-4];a[l]=l<4||s<=4?c:p[o[c>>>24]]^u[o[c>>>16&255]]^d[o[c>>>8&255]]^h[o[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,l,c,o)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,p,u,d,h,r),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,o,r,s,a){for(var l=this._nRounds,c=e[t]^n[0],p=e[t+1]^n[1],u=e[t+2]^n[2],d=e[t+3]^n[3],h=4,m=1;m<l;m++){var f=i[c>>>24]^o[p>>>16&255]^r[u>>>8&255]^s[255&d]^n[h++],g=i[p>>>24]^o[u>>>16&255]^r[d>>>8&255]^s[255&c]^n[h++],b=i[u>>>24]^o[d>>>16&255]^r[c>>>8&255]^s[255&p]^n[h++],v=i[d>>>24]^o[c>>>16&255]^r[p>>>8&255]^s[255&u]^n[h++];c=f,p=g,u=b,d=v}f=(a[c>>>24]<<24|a[p>>>16&255]<<16|a[u>>>8&255]<<8|a[255&d])^n[h++],g=(a[p>>>24]<<24|a[u>>>16&255]<<16|a[d>>>8&255]<<8|a[255&c])^n[h++],b=(a[u>>>24]<<24|a[d>>>16&255]<<16|a[c>>>8&255]<<8|a[255&p])^n[h++],v=(a[d>>>24]<<24|a[c>>>16&255]<<16|a[p>>>8&255]<<8|a[255&u])^n[h++],e[t]=f,e[t+1]=g,e[t+2]=b,e[t+3]=v},keySize:256/32});t.AES=n._createHelper(f)}(),e.AES}(IN(),VN(),JN(),ES(),DS())),oA(),rA||(rA=1,sA.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,i=t.algo,o=i.RC4=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,i=this._S=[],o=0;o<256;o++)i[o]=o;o=0;for(var r=0;o<256;o++){var s=o%n,a=t[s>>>2]>>>24-s%4*8&255;r=(r+i[o]+a)%256;var l=i[o];i[o]=i[r],i[r]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=r.call(this)},keySize:256/32,ivSize:0});function r(){for(var e=this._S,t=this._i,n=this._j,i=0,o=0;o<4;o++){n=(n+e[t=(t+1)%256])%256;var r=e[t];e[t]=e[n],e[n]=r,i|=e[(e[t]+e[n])%256]<<24-8*o}return this._i=t,this._j=n,i}t.RC4=n._createHelper(o);var s=i.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)r.call(this)}});t.RC4Drop=n._createHelper(s)}(),e.RC4}(IN(),VN(),JN(),ES(),DS())),aA||(aA=1,lA.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,i=t.algo,o=[],r=[],s=[],a=i.Rabbit=n.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var i=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)o[n]^=i[n+4&7];if(t){var r=t.words,s=r[0],a=r[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),p=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=c>>>16|4294901760&p,d=p<<16|65535&c;for(o[0]^=c,o[1]^=u,o[2]^=p,o[3]^=d,o[4]^=c,o[5]^=u,o[6]^=p,o[7]^=d,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)o[i]=16711935&(o[i]<<8|o[i]>>>24)|4278255360&(o[i]<<24|o[i]>>>8),e[t+i]^=o[i]},blockSize:128/32,ivSize:64/32});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)r[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<r[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<r[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<r[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<r[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<r[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<r[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<r[6]>>>0?1:0)|0,this._b=t[7]>>>0<r[7]>>>0?1:0,n=0;n<8;n++){var i=e[n]+t[n],o=65535&i,a=i>>>16,l=((o*o>>>17)+o*a>>>15)+a*a,c=((4294901760&i)*i|0)+((65535&i)*i|0);s[n]=l^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.Rabbit=n._createHelper(a)}(),e.Rabbit}(IN(),VN(),JN(),ES(),DS())),cA||(cA=1,pA.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,i=t.algo,o=[],r=[],s=[],a=i.RabbitLegacy=n.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)l.call(this);for(o=0;o<8;o++)i[o]^=n[o+4&7];if(t){var r=t.words,s=r[0],a=r[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),p=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=c>>>16|4294901760&p,d=p<<16|65535&c;for(i[0]^=c,i[1]^=u,i[2]^=p,i[3]^=d,i[4]^=c,i[5]^=u,i[6]^=p,i[7]^=d,o=0;o<4;o++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)o[i]=16711935&(o[i]<<8|o[i]>>>24)|4278255360&(o[i]<<24|o[i]>>>8),e[t+i]^=o[i]},blockSize:128/32,ivSize:64/32});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)r[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<r[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<r[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<r[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<r[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<r[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<r[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<r[6]>>>0?1:0)|0,this._b=t[7]>>>0<r[7]>>>0?1:0,n=0;n<8;n++){var i=e[n]+t[n],o=65535&i,a=i>>>16,l=((o*o>>>17)+o*a>>>15)+a*a,c=((4294901760&i)*i|0)+((65535&i)*i|0);s[n]=l^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.RabbitLegacy=n._createHelper(a)}(),e.RabbitLegacy}(IN(),VN(),JN(),ES(),DS())));const dA=async e=>{const t=await(e=>new Promise(((t,n)=>{const i=new FileReader;i.onload=e=>{const n=uA.lib.WordArray.create(e.target.result);t(uA.MD5(n))},i.onerror=()=>n(new Error("Corrupted file")),i.readAsArrayBuffer(e)})))(e);return t.toString(uA.enc.Base64)};class hA{constructor(e){let{url:t,file:n,progress:i=Hp}=e;If(this,"create",(async()=>{const{data:e}=await this.generateUrl(),{direct_upload:{url:t,headers:n}}=e;return await this.uploadToCloud(t,n),e})),If(this,"generateUrl",(async()=>{const e={blob:{filename:this.file.name,byte_size:this.file.size,content_type:this.file.type,checksum:await dA(this.file)}};return ON(this.url,e)})),If(this,"abort",(()=>this.abortController.abort())),If(this,"uploadToCloud",((e,t)=>{const n={headers:t,onUploadProgress:this.progress,signal:this.abortController.signal};return TN(e,this.file,n)})),this.url=t,this.file=n,this.progress=i,this.abortController=new AbortController}}class mA extends Tw.exports.BasePlugin{constructor(e,t){super(e,t),If(this,"upload",(e=>{if(0===e.length)return Promise.resolve();const t=e.map((e=>this.uploadFile(this.uppy.getFile(e))));return Promise.all(t)})),If(this,"uploadFile",(async e=>{this.uppy.on("file-removed",(n=>{n.id===e.id&&t.abort()})),this.uppy.on("upload-cancel",(n=>{n===e.id&&t.abort()})),this.uppy.on("cancel-all",(()=>t.abort()));const t=new hA({file:e.data,url:this.opts.directUploadUrl,progress:t=>{t.lengthComputable&&this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded,bytesTotal:t.total})}});try{const n=await t.create();return this.uppy.setFileState(e.id,{response:{status:"success"}}),this.uppy.emit("upload-success",e,n),e}catch(t){throw this.uppy.setFileState(e.id,{response:{status:"error"}}),this.uppy.emit("upload-error",e,t),t}})),this.type="uploader",this.id=t.id||"ActiveStorageUpload",this.title=t.title||"Active Storage Upload"}install(){this.uppy.addUploader(this.upload)}uninstall(){this.uppy.removeUploader(this.upload)}}const fA=e=>{var n;let{uppy:i}=e;const[s,a]=o(0);r((()=>{i.on("progress",a)}),[i]);const l=`${s}%`;return t.createElement("div",{className:"neeto-editor-image-uploader__progress"},t.createElement("p",{className:"neeto-editor-image-uploader__progress-title"},"Uploading..."),t.createElement("p",{className:"neeto-editor-image-uploader__progress-file"},null===(n=i.getFiles()[0])||void 0===n?void 0:n.name),t.createElement("div",{className:"neeto-editor-progress-bar__wrapper","data-cy":"neeto-editor-image-upload-progress-bar"},t.createElement("div",{className:"neeto-editor-progress-bar__percent"},t.createElement("p",null,l),t.createElement(ef,{icon:Yd,onClick:()=>i.cancelAll(),size:"small",style:"text"})),t.createElement("div",{className:"neeto-editor-progress-bar__indicator"},t.createElement("div",{style:{width:l},className:"neeto-editor-progress-bar__indicator-inner"}))))},gA=e=>{const t=["B","KB","MB","GB"];let n=0;for(;e>=1024&&n<t.length;)e/=1024,++n;return`${e.toFixed(1)} ${t[n]}`},bA=e=>{let{endpoint:n,onSuccess:i,uploadConfig:r}=e;const[s,a]=o(!1),[l,c]=o(""),p={...Cw,...r},u=function(e){if("function"!=typeof e)throw new TypeError("useUppy: expected a function that returns a new Uppy instance");const t=CN(void 0);if(void 0===t.current&&(t.current=e(),!(t.current instanceof DN)))throw new TypeError(`useUppy: factory function must return an Uppy instance, got ${typeof t.current}`);return MN((()=>()=>{t.current.close({reason:"unmount"}),t.current=void 0}),[t]),t.current}((()=>new EE({...p,onBeforeFileAdded:e=>{const{maxFileSize:t,allowedFileTypes:n}=p.restrictions;return e.size>t?(c(`File size is too large. Max size is ${gA(p.restrictions.maxFileSize)}.`),!1):!!n.includes(`.${e.extension}`)||(c(`File type is not permitted. Allowed file types are: ${n.join(", ")}.`),!1)}}).use(mA,{directUploadUrl:n,...Dw}).on("upload",(()=>a(!0))).on("upload-success",((e,t)=>{let{blob_url:n}=t;return i(n)})).on("cancel-all",(()=>a(!1))).on("complete",(()=>a(!1)))));return s?t.createElement(fA,{uppy:u}):t.createElement("div",{className:"neeto-editor-image-uploader__dnd-wrapper"},t.createElement(VT,{className:"neeto-editor-image-uploader__dnd",note:`Max. File Size: ${gA(p.restrictions.maxFileSize)}`,locale:{strings:{dropHereOr:"Drop your file(s) here or %{browse}",browse:"Browse"}},uppy:u,"data-cy":"neeto-editor-image-local-uploader"}),l&&t.createElement("p",{className:"neeto-editor-image-uploader__dnd--error"},l))},vA=()=>t.createElement("div",{className:"neeto-editor-loader"},t.createElement("span",{className:"neeto-editor-loader__spinner-icon"}));var yA={},xA=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},wA=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.create(null);function n(e,n){return t[e]=t[e]||[],t[e].push(n),this}function i(e,t){return t._once=!0,n(e,t),this}function o(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n?t[e].splice(t[e].indexOf(n),1):delete t[e],this}function r(e){for(var n=this,i=arguments.length,r=Array(i>1?i-1:0),s=1;s<i;s++)r[s-1]=arguments[s];var a=t[e]&&t[e].slice();return a&&a.forEach((function(t){t._once&&o(e,t),t.apply(n,r)})),this}return xA({},e,{on:n,once:i,off:o,emit:r})},kA=Object.freeze({__proto__:null,default:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0,n=void 0,i=void 0,o=void 0,r=void 0,s=void 0,a=void 0,l=void 0,c=void 0,p=void 0,u=void 0,d=void 0,h=void 0,m=0===e.packed.indexOf("data-")?e.packed:"data-"+e.packed,f=e.sizes.slice().reverse(),g=!1!==e.position,b=e.container.nodeType?e.container:document.querySelector(e.container),v={all:function(){return _(b.children)},new:function(){return _(b.children).filter((function(e){return!e.hasAttribute(""+m)}))}},y=[C,D,O],x=[T,N,S,A],w=wA({pack:z,update:L,resize:R});return w;function k(e){e.forEach((function(e){return e()}))}function _(e){return Array.prototype.slice.call(e)}function E(e){return Array.apply(null,Array(e)).map((function(){return 0}))}function M(){return f.map((function(e){return e.mq&&window.matchMedia("(min-width: "+e.mq+")").matches})).indexOf(!0)}function C(){i=M()}function D(){o=-1===i?f[f.length-1]:f[i]}function O(){s=E(o.columns)}function T(){u=v[t?"new":"all"]()}function N(){0!==u.length&&(d=u.map((function(e){return e.clientWidth})),h=u.map((function(e){return e.clientHeight})))}function S(){u.forEach((function(e,t){r=s.indexOf(Math.min.apply(Math,s)),e.style.position="absolute",a=s[r]+"px",l=r*d[t]+r*o.gutter+"px",g?(e.style.top=a,e.style.left=l):e.style.transform="translate3d("+l+", "+a+", 0)",e.setAttribute(m,""),c=d[t],p=h[t],c&&p&&(s[r]+=p+o.gutter)}))}function A(){b.style.position="relative",b.style.width=o.columns*c+(o.columns-1)*o.gutter+"px",b.style.height=Math.max.apply(Math,s)-o.gutter+"px"}function j(){n||(window.requestAnimationFrame(I),n=!0)}function I(){i!==M()&&(z(),w.emit("resize",o)),n=!1}function z(){return t=!1,k(y.concat(x)),w.emit("pack")}function L(){return t=!0,k(x),w.emit("update")}function R(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?"addEventListener":"removeEventListener";return window[t]("resize",j),w}}}),_A=Lc(kA),EA={exports:{}},MA={exports:{}};!function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=t,r=a(o),s=a(Kh.exports);function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){this.props.useCapture;return this.isPassiveSupported()?{useCapture:this.props.useCapture,passive:!0}:{passive:!1}}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),i=void 0;if(this.props.useWindow){var o=document.documentElement||document.body.parentNode||document.body,r=void 0!==t.pageYOffset?t.pageYOffset:o.scrollTop;i=this.props.isReverse?r:this.calculateOffset(e,r)}else i=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;i<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,i=t.element,o=t.hasMore;t.initialLoad;var s=t.isReverse,a=t.loader;t.loadMore,t.pageStart;var l=t.ref;t.threshold,t.useCapture,t.useWindow,t.getScrollParent;var c=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);c.ref=function(t){e.scrollComponent=t,l&&l(t)};var p=[n];return o&&(a?s?p.unshift(a):p.push(a):this.defaultLoader&&(s?p.unshift(this.defaultLoader):p.push(this.defaultLoader))),r.default.createElement(i,c,p)}}]),t}(o.Component);l.propTypes={children:s.default.node.isRequired,element:s.default.node,hasMore:s.default.bool,initialLoad:s.default.bool,isReverse:s.default.bool,loader:s.default.node,loadMore:s.default.func.isRequired,pageStart:s.default.number,ref:s.default.func,getScrollParent:s.default.func,threshold:s.default.number,useCapture:s.default.bool,useWindow:s.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},n.default=l,e.exports=n["default"]}(MA,MA.exports),EA.exports=MA.exports,Object.defineProperty(yA,"__esModule",{value:!0});var CA,DA,OA=yA.default=void 0,TA=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),NA=t,SA=zA(NA),AA=zA(Kh.exports),jA=zA(_A),IA=zA(EA.exports);function zA(e){return e&&e.__esModule?e:{default:e}}function LA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RA(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var FA=(DA=CA=function(e){function t(){var e,n,i;LA(this,t);for(var o=arguments.length,r=Array(o),s=0;s<o;s++)r[s]=arguments[s];return n=i=RA(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r))),i.setContainerRef=function(e){i.masonryContainer=e},i.forcePack=function(){i.masonryContainer&&i.state.instance.pack()},i.forceUpdate=function(){i.masonryContainer&&i.state.instance.update()},i.createNewInstance=function(){var e=i.props,t=e.packed,n=e.sizes,o=e.children,r=e.position,s=(0,jA.default)({container:i.masonryContainer,packed:t,sizes:n,position:r});s.resize(!0),o.length>0&&s.pack(),i.setState((function(){return{instance:s}}))},RA(i,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,NA.Component),TA(t,[{key:"componentDidMount",value:function(){this.createNewInstance()}},{key:"componentDidUpdate",value:function(e){var t=this.props.children,n=this.state.instance;if(0!==e.children.length||0!==t.length)return 0===e.children.length&&t.length>0?n.pack():e.children.length!==t.length?this.props.pack?n.pack():n.update():void 0}},{key:"componentWillUnmount",value:function(){this.state&&this.state.instance.resize(!1)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,i=e.style;e.pack,e.packed,e.position,e.sizes;var o=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(e,["children","className","style","pack","packed","position","sizes"]);return SA.default.createElement(IA.default,o,SA.default.createElement("div",{ref:this.setContainerRef,className:n,style:i},t))}}]),t}(),CA.propTypes={children:AA.default.arrayOf(AA.default.element).isRequired,className:AA.default.string,initialLoad:AA.default.bool,pack:AA.default.bool,packed:AA.default.string,position:AA.default.bool,sizes:AA.default.array,style:AA.default.object},CA.defaultProps={className:"",initialLoad:!0,pack:!1,packed:"data-packed",position:!0,sizes:[{columns:1,gutter:20},{mq:"768px",columns:2,gutter:20},{mq:"1024px",columns:3,gutter:20}],style:{}},DA);OA=yA.default=FA;const BA=e=>{let{onSubmit:n,unsplashApiKey:i}=e;const a=s(null),[l,c]=o(""),[p,u]=o(!1),[d,h]=o([]),[m,f]=o(1),[g,b]=o(!0),[v,y]=o(!1),x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:800;const[n,i]=o(e);return r((()=>{const n=setTimeout((()=>{i(e)}),t);return()=>{clearTimeout(n)}}),[e]),n}(l||"latest");r((()=>{w(1)}),[x]);const w=async e=>{try{y(!0),u(!1);const t=await(e=>{let{pageNo:t,query:n,apiKey:i}=e;return oy.get(Qp,{headers:{Authorization:`Client-ID ${i}`},params:{page:t,per_page:30,order_by:"popular",query:n}})})({page:e,query:x,apiKey:i}),{data:{results:n,total_pages:o}}=t;h(1===e?n:[...d,...n]),f(e+1),b(e<o)}catch(e){u(!0)}finally{y(!1)}};return t.createElement("div",{className:"neeto-editor-unsplash-wrapper"},t.createElement(sf,{autoFocus:!0,name:"text",value:l,placeholder:"Search Unsplash",onChange:e=>{let{target:{value:t}}=e;c(t)},"data-cy":"neeto-editor-unsplash-image-picker-search-input"}),p&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-error"},"Something went wrong! Please try again later."),!p&&!v&&Up(d)&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-no-results-error"},"No results"),!p&&t.createElement("div",{className:"neeto-editor-unsplash-container"},t.createElement(OA,{ref:a,pack:!0,style:{width:"100%"},sizes:[{columns:3,gutter:0},{mq:"768px",columns:3,gutter:0},{mq:"1024px",columns:3,gutter:0}],hasMore:g,loadMore:()=>{!v&&g&&m>1&&w(m)},position:!0,useWindow:!1,className:"neeto-editor-unsplash-gallery",loader:t.createElement(vA,{key:0})},d&&d.map(((e,i)=>t.createElement("div",{key:i,className:"neeto-editor-unsplash-gallery__item","data-cy":`neeto-editor-unsplash-image-picker-result-${i}`},t.createElement("div",{className:"neeto-editor-unsplash-gallery__item-placeholder",style:{paddingBottom:`${e.height/e.width*100}%`}},t.createElement("div",{className:"neeto-editor-unsplash-gallery__item-inner",id:`unsplashImage${i}`},t.createElement("img",{src:e.urls.regular,onClick:()=>n(e.urls.small)}),t.createElement("a",{href:`https://unsplash.com/@${e.user.username}`,target:"_blank",rel:"noreferrer"},e.user.name," "))))))),!g&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text"},"End of results")))},PA=e=>{let{buttonLabel:n="Submit",placeholder:i,onSubmit:r,className:s}=e;const[a,l]=o(""),[c,p]=o("");return t.createElement("div",{className:Bc("neeto-editor-url-form__wrapper",{[s]:s})},t.createElement(sf,{autoFocus:!0,name:"url",value:a,placeholder:i,onFocus:()=>p(""),error:c,onChange:e=>{let{target:{value:t}}=e;return l(t)},"data-cy":"neeto-editor-image-upload-url-input"}),t.createElement(ef,{label:n,onClick:e=>{e.preventDefault(),df.test(a)?r(a):p("Please enter a valid url")},disabled:!a,"data-cy":"neeto-editor-image-upload-url-submit"}))},UA=e=>{let{editor:n,imageUploadUrl:i,uploadConfig:r,isVisible:s,setIsVisible:a,unsplashApiKey:l,isUnsplashImageUploadActive:c}=e;const[p,u]=(e=>{var t;const[n,i]=o(null===(t=e[0])||void 0===t?void 0:t.key);return[n,e=>i(e.key)]})(Ow),[d,h]=o(""),m=e=>{h(e)},f={local:()=>t.createElement(bA,{endpoint:i,onSuccess:m,uploadConfig:r}),link:()=>t.createElement(PA,{onSubmit:m,buttonLabel:"Upload Image",placeholder:"Paste the image link"}),unsplash:()=>t.createElement(BA,{unsplashApiKey:l,onSubmit:m})}[p];return t.createElement(of,{isOpen:s,onClose:()=>{a(!1),u(Ow[0])},closeButton:!1},t.createElement("div",{className:"neeto-editor-image-uploader"},t.createElement(Mw,null,Ow.filter((e=>"unsplash"!==e.key||c)).map((e=>t.createElement(Mw.Item,{key:e.key,active:p===e.key,onClick:()=>u(e)},e.title)))),t.createElement("div",{className:"neeto-editor-image-uploader__content"},d?t.createElement(af,{url:d,editor:n,onClose:()=>{h(null),a(!1)}}):t.createElement(f,null))))},HA=cs.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){return t.textBetween(0,t.content.size,void 0," ").length}return t.nodeSize},this.storage.words=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;return t.textBetween(0,t.content.size," "," ").split(" ").filter((e=>""!==e)).length}},addProseMirrorPlugins(){return[new Xt({key:new nn("characterCount"),filterTransaction:(e,t)=>{const n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;const i=this.storage.characters({node:t.doc}),o=this.storage.characters({node:e.doc});if(o<=n)return!0;if(i>n&&o>n&&o<=i)return!0;if(i>n&&o>n&&o>i)return!1;if(!e.getMeta("paste"))return!1;const r=e.selection.$head.pos,s=r-(o-n),a=r;e.deleteRange(s,a);return!(this.storage.characters({node:e.doc})>n)}})]}}),$A=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,WA=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,qA=ea.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Gs({find:$A,type:this.type})]},addPasteRules(){return[na({find:WA,type:this.type})]}}),VA=cs.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new Xt({key:new nn("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:i}=this.editor,{anchor:o}=t,r=[];if(!n||!i)return Ho.create(e,[]);let s=0;"deepest"===this.options.mode&&e.descendants(((e,t)=>{if(e.isText)return;if(!(o>=t&&o<=t+e.nodeSize-1))return!1;s+=1}));let a=0;return e.descendants(((e,t)=>{if(e.isText)return!1;if(!(o>=t&&o<=t+e.nodeSize-1))return!1;a+=1;if("deepest"===this.options.mode&&s-a>0||"shallowest"===this.options.mode&&a>1)return"deepest"===this.options.mode;r.push(Bo.node(t,t+e.nodeSize,{class:this.options.className}))})),Ho.create(e,r)}}})]}}),KA=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,YA=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,QA=ea.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:e}){return["mark",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Gs({find:KA,type:this.type})]},addPasteRules(){return[na({find:YA,type:this.type})]}});function GA(e){this.j={},this.jr=[],this.jd=null,this.t=e}GA.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,i=this.j[e];if(i)return n&&(i.t=n),i;i=ZA();var o=tj(this,e);return o?(Object.assign(i.j,o.j),i.jr.append(o.jr),i.jr=o.jd,i.t=n||o.t):i.t=n,this.j[e]=i,i}};var ZA=function(){return new GA},JA=function(e){return new GA(e)},XA=function(e,t,n){e.j[t]||(e.j[t]=n)},ej=function(e,t,n){e.jr.push([t,n])},tj=function(e,t){var n=e.j[t];if(n)return n;for(var i=0;i<e.jr.length;i++){var o=e.jr[i][0],r=e.jr[i][1];if(o.test(t))return r}return e.jd},nj=function(e,t,n){for(var i=0;i<t.length;i++)XA(e,t[i],n)},ij=function(e,t){for(var n=0;n<t.length;n++){var i=t[n][0],o=t[n][1];XA(e,i,o)}},oj=function(e,t,n,i){for(var o,r=0,s=t.length;r<s&&(o=e.j[t[r]]);)e=o,r++;if(r>=s)return[];for(;r<s-1;)o=i(),XA(e,t[r],o),e=o,r++;XA(e,t[s-1],n)},rj="DOMAIN",sj="LOCALHOST",aj="TLD",lj="NUM",cj="PROTOCOL",pj="MAILTO",uj="WS",dj="NL",hj="OPENBRACE",mj="OPENBRACKET",fj="OPENANGLEBRACKET",gj="OPENPAREN",bj="CLOSEBRACE",vj="CLOSEBRACKET",yj="CLOSEANGLEBRACKET",xj="CLOSEPAREN",wj="AMPERSAND",kj="APOSTROPHE",_j="ASTERISK",Ej="AT",Mj="BACKSLASH",Cj="BACKTICK",Dj="CARET",Oj="COLON",Tj="COMMA",Nj="DOLLAR",Sj="DOT",Aj="EQUALS",jj="EXCLAMATION",Ij="HYPHEN",zj="PERCENT",Lj="PIPE",Rj="PLUS",Fj="POUND",Bj="QUERY",Pj="QUOTE",Uj="SEMI",Hj="SLASH",$j="TILDE",Wj="UNDERSCORE",qj="SYM",Vj=Object.freeze({__proto__:null,DOMAIN:rj,LOCALHOST:sj,TLD:aj,NUM:lj,PROTOCOL:cj,MAILTO:pj,WS:uj,NL:dj,OPENBRACE:hj,OPENBRACKET:mj,OPENANGLEBRACKET:fj,OPENPAREN:gj,CLOSEBRACE:bj,CLOSEBRACKET:vj,CLOSEANGLEBRACKET:yj,CLOSEPAREN:xj,AMPERSAND:wj,APOSTROPHE:kj,ASTERISK:_j,AT:Ej,BACKSLASH:Mj,BACKTICK:Cj,CARET:Dj,COLON:Oj,COMMA:Tj,DOLLAR:Nj,DOT:Sj,EQUALS:Aj,EXCLAMATION:jj,HYPHEN:Ij,PERCENT:zj,PIPE:Lj,PLUS:Rj,POUND:Fj,QUERY:Bj,QUOTE:Pj,SEMI:Uj,SLASH:Hj,TILDE:$j,UNDERSCORE:Wj,SYM:qj}),Kj="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw vermögensberater-ctb vermögensberatung-pwb ελ ευ бг бел дети ею католик ком қаз мкд мон москва онлайн орг рус рф сайт срб укр გე հայ ישראל קום ابوظبي اتصالات ارامكو الاردن البحرين الجزائر السعودية العليان المغرب امارات ایران بارت بازار بھارت بيتك پاکستان ڀارت تونس سودان سورية شبكة عراق عرب عمان فلسطين قطر كاثوليك كوم مصر مليسيا موريتانيا موقع همراه कॉम नेट भारत भारतम् भारोत संगठन বাংলা ভারত ভাৰত ਭਾਰਤ ભારત ଭାରତ இந்தியா இலங்கை சிங்கப்பூர் భారత్ ಭಾರತ ഭാരതം ලංකා คอม ไทย ລາວ 닷넷 닷컴 삼성 한국 アマゾン グーグル クラウド コム ストア セール ファッション ポイント みんな 世界 中信 中国 中國 中文网 亚马逊 企业 佛山 信息 健康 八卦 公司 公益 台湾 台灣 商城 商店 商标 嘉里 嘉里大酒店 在线 大众汽车 大拿 天主教 娱乐 家電 广东 微博 慈善 我爱你 手机 招聘 政务 政府 新加坡 新闻 时尚 書籍 机构 淡马锡 游戏 澳門 点看 移动 组织机构 网址 网店 网站 网络 联通 诺基亚 谷歌 购物 通販 集团 電訊盈科 飞利浦 食品 餐厅 香格里拉 香港".split(" "),Yj=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,Qj=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,Gj=/\uFE0F/,Zj=/\d/,Jj=/\s/;function Xj(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=ZA(),n=JA(lj),i=JA(rj),o=ZA(),r=JA(uj),s=[[Zj,i],[Yj,i],[Qj,i],[Gj,i]],a=function(){var e=JA(rj);return e.j={"-":o},e.jr=[].concat(s),e},l=function(e){var t=a();return t.t=e,t};ij(t,[["'",JA(kj)],["{",JA(hj)],["[",JA(mj)],["<",JA(fj)],["(",JA(gj)],["}",JA(bj)],["]",JA(vj)],[">",JA(yj)],[")",JA(xj)],["&",JA(wj)],["*",JA(_j)],["@",JA(Ej)],["`",JA(Cj)],["^",JA(Dj)],[":",JA(Oj)],[",",JA(Tj)],["$",JA(Nj)],[".",JA(Sj)],["=",JA(Aj)],["!",JA(jj)],["-",JA(Ij)],["%",JA(zj)],["|",JA(Lj)],["+",JA(Rj)],["#",JA(Fj)],["?",JA(Bj)],['"',JA(Pj)],["/",JA(Hj)],[";",JA(Uj)],["~",JA($j)],["_",JA(Wj)],["\\",JA(Mj)]]),XA(t,"\n",JA(dj)),ej(t,Jj,r),XA(r,"\n",ZA()),ej(r,Jj,r);for(var c=0;c<Kj.length;c++)oj(t,Kj[c],l(aj),a);var p=a(),u=a(),d=a(),h=a();oj(t,"file",p,a),oj(t,"ftp",u,a),oj(t,"http",d,a),oj(t,"mailto",h,a);var m=a(),f=JA(cj),g=JA(pj);XA(u,"s",m),XA(u,":",f),XA(d,"s",m),XA(d,":",f),XA(p,":",f),XA(m,":",f),XA(h,":",g);for(var b=a(),v=0;v<e.length;v++)oj(t,e[v],b,a);return XA(b,":",f),oj(t,"localhost",l(sj),a),ej(t,Zj,n),ej(t,Yj,i),ej(t,Qj,i),ej(t,Gj,i),ej(n,Zj,n),ej(n,Yj,i),ej(n,Qj,i),ej(n,Gj,i),XA(n,"-",o),XA(i,"-",o),XA(o,"-",o),ej(i,Zj,i),ej(i,Yj,i),ej(i,Qj,i),ej(i,Gj,i),ej(o,Zj,i),ej(o,Yj,i),ej(o,Qj,i),ej(o,Gj,i),t.jd=JA(qj),t}var eI={defaultProtocol:"http",events:null,format:tI,formatHref:tI,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function tI(e){return e}function nI(){}function iI(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Object.create(e.prototype);for(var o in n)i[o]=n[o];i.constructor=t,t.prototype=i}(nI,n,t),n}nI.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eI.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var oI=iI("email",{isLink:!0}),rI=iI("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),sI=iI("text"),aI=iI("nl"),lI=iI("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eI.defaultProtocol,t=this.tk,n=!1,i=!1,o=[],r=0;t[r].t===cj;)n=!0,o.push(t[r].v),r++;for(;t[r].t===Hj;)i=!0,o.push(t[r].v),r++;for(;r<t.length;r++)o.push(t[r].v);return o=o.join(""),n||i||(o="".concat(e,"://").concat(o)),o},hasProtocol:function(){return this.tk[0].t===cj}}),cI=Object.freeze({__proto__:null,MultiToken:nI,Base:nI,createTokenClass:iI,MailtoEmail:oI,Email:rI,Text:sI,Nl:aI,Url:lI});function pI(){var e=ZA(),t=ZA(),n=ZA(),i=ZA(),o=ZA(),r=ZA(),s=ZA(),a=JA(lI),l=ZA(),c=JA(lI),p=JA(lI),u=ZA(),d=ZA(),h=ZA(),m=ZA(),f=ZA(),g=JA(lI),b=JA(lI),v=JA(lI),y=JA(lI),x=ZA(),w=ZA(),k=ZA(),_=ZA(),E=ZA(),M=ZA(),C=JA(rI),D=ZA(),O=JA(rI),T=JA(oI),N=ZA(),S=ZA(),A=ZA(),j=ZA(),I=JA(aI);XA(e,dj,I),XA(e,cj,t),XA(e,pj,n),XA(t,Hj,i),XA(i,Hj,o),XA(e,aj,r),XA(e,rj,r),XA(e,sj,a),XA(e,lj,r),XA(o,aj,p),XA(o,rj,p),XA(o,lj,p),XA(o,sj,p),XA(r,Sj,s),XA(E,Sj,M),XA(s,aj,a),XA(s,rj,r),XA(s,lj,r),XA(s,sj,r),XA(M,aj,C),XA(M,rj,E),XA(M,lj,E),XA(M,sj,E),XA(a,Sj,s),XA(C,Sj,M),XA(a,Oj,l),XA(a,Hj,p),XA(l,lj,c),XA(c,Hj,p),XA(C,Oj,D),XA(D,lj,O);var z=[wj,_j,Ej,Mj,Cj,Dj,Nj,rj,Aj,Ij,sj,lj,zj,Lj,Rj,Fj,cj,Hj,qj,$j,aj,Wj],L=[kj,yj,bj,vj,xj,Oj,Tj,Sj,jj,fj,hj,mj,gj,Bj,Pj,Uj];XA(p,hj,d),XA(p,mj,h),XA(p,fj,m),XA(p,gj,f),XA(u,hj,d),XA(u,mj,h),XA(u,fj,m),XA(u,gj,f),XA(d,bj,p),XA(h,vj,p),XA(m,yj,p),XA(f,xj,p),XA(g,bj,p),XA(b,vj,p),XA(v,yj,p),XA(y,xj,p),XA(x,bj,p),XA(w,vj,p),XA(k,yj,p),XA(_,xj,p),nj(d,z,g),nj(h,z,b),nj(m,z,v),nj(f,z,y),nj(d,L,x),nj(h,L,w),nj(m,L,k),nj(f,L,_),nj(g,z,g),nj(b,z,b),nj(v,z,v),nj(y,z,y),nj(g,L,g),nj(b,L,b),nj(v,L,v),nj(y,L,y),nj(x,z,g),nj(w,z,b),nj(k,z,v),nj(_,z,y),nj(x,L,x),nj(w,L,w),nj(k,L,k),nj(_,L,_),nj(p,z,p),nj(u,z,p),nj(p,L,u),nj(u,L,u),XA(n,aj,T),XA(n,rj,T),XA(n,lj,T),XA(n,sj,T),nj(T,z,T),nj(T,L,N),nj(N,z,T),nj(N,L,N);var R=[wj,kj,_j,Mj,Cj,Dj,bj,Nj,rj,Aj,Ij,lj,hj,zj,Lj,Rj,Fj,Bj,Hj,qj,$j,aj,Wj];return nj(r,R,S),XA(r,Ej,A),nj(a,R,S),XA(a,Ej,A),nj(s,R,S),nj(S,R,S),XA(S,Ej,A),XA(S,Sj,j),nj(j,R,S),XA(A,aj,E),XA(A,rj,E),XA(A,lj,E),XA(A,sj,C),e}function uI(e,t,n){var i=n[0].s,o=n[n.length-1].e;return new e(t.substr(i,o-i),n)}var dI="undefined"!=typeof console&&console&&console.warn||function(){},hI={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function mI(e){if(hI.initialized&&dI('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");hI.customProtocols.push(e)}function fI(e){return hI.initialized||function(){hI.scanner={start:Xj(hI.customProtocols),tokens:Vj},hI.parser={start:pI(),tokens:cI};for(var e={createTokenClass:iI},t=0;t<hI.pluginQueue.length;t++)hI.pluginQueue[t][1]({scanner:hI.scanner,parser:hI.parser,utils:e});hI.initialized=!0}(),function(e,t,n){for(var i=n.length,o=0,r=[],s=[];o<i;){for(var a=e,l=null,c=null,p=0,u=null,d=-1;o<i&&!(l=tj(a,n[o].t));)s.push(n[o++]);for(;o<i&&(c=l||tj(a,n[o].t));)l=null,(a=c).accepts()?(d=0,u=a):d>=0&&d++,o++,p++;if(d<0)for(var h=o-p;h<o;h++)s.push(n[h]);else{s.length>0&&(r.push(uI(sI,t,s)),s=[]),o-=d,p-=d;var m=u.t,f=n.slice(o-p,o);r.push(uI(m,t,f))}}return s.length>0&&r.push(uI(sI,t,s)),r}(hI.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,i=0;i<n;){var o=e.charCodeAt(i),r=void 0,s=o<55296||o>56319||i+1===n||(r=e.charCodeAt(i+1))<56320||r>57343?e[i]:e.slice(i,i+2);t.push(s),i+=s.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),i=n.length,o=[],r=0,s=0;s<i;){for(var a=e,l=null,c=0,p=null,u=-1,d=-1;s<i&&(l=tj(a,n[s]));)(a=l).accepts()?(u=0,d=0,p=a):u>=0&&(u+=n[s].length,d++),c+=n[s].length,r+=n[s].length,s++;r-=u,s-=d,c-=u,o.push({t:p.t,v:t.substr(r-c,c),s:r-c,e:r})}return o}(hI.scanner.start,e))}function gI(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=fI(e),i=[],o=0;o<n.length;o++){var r=n[o];!r.isLink||t&&r.t!==t||i.push(r.toObject())}return i}function bI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=fI(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function vI(e){return new Xt({key:new nn("autolink"),appendTransaction:(t,n,i)=>{const o=t.some((e=>e.docChanged))&&!n.doc.eq(i.doc),r=t.some((e=>e.getMeta("preventAutolink")));if(!o||r)return;const{tr:s}=i,a=function(e,t){const n=new Tt(e);return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}(n.doc,[...t]),{mapping:l}=a,c=function(e){const{mapping:t,steps:n}=e,i=[];return t.maps.forEach(((e,o)=>{const r=[];if(e.ranges.length)e.forEach(((e,t)=>{r.push({from:e,to:t})}));else{const{from:e,to:t}=n[o];if(void 0===e||void 0===t)return;r.push({from:e,to:t})}r.forEach((({from:e,to:n})=>{const r=t.slice(o).map(e,-1),s=t.slice(o).map(n),a=t.invert().map(r,-1),l=t.invert().map(s);i.push({oldRange:{from:a,to:l},newRange:{from:r,to:s}})}))})),js(i)}(a);return c.forEach((({oldRange:t,newRange:o})=>{Is(t.from,t.to,n.doc).filter((t=>t.mark.type===e.type)).forEach((t=>{const o=Is(l.map(t.from),l.map(t.to),i.doc).filter((t=>t.mark.type===e.type));if(!o.length)return;const r=o[0],a=n.doc.textBetween(t.from,t.to,void 0," "),c=i.doc.textBetween(r.from,r.to,void 0," "),p=bI(a),u=bI(c);p&&!u&&s.removeMark(r.from,r.to,e.type)}));const r=function(e,t,n){const i=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&i.push({node:e,pos:t})})),i}(i.doc,o,(e=>e.isTextblock));let a,c;if(r.length>1?(a=r[0],c=i.doc.textBetween(a.pos,a.pos+a.node.nodeSize,void 0," ")):r.length&&i.doc.textBetween(o.from,o.to," "," ").endsWith(" ")&&(a=r[0],c=i.doc.textBetween(a.pos,o.to,void 0," ")),a&&c){const t=c.split(" ").filter((e=>""!==e));if(t.length<=0)return!1;const n=t[t.length-1],i=a.pos+c.lastIndexOf(n);if(!n)return!1;gI(n).filter((e=>e.isLink)).filter((t=>!e.validate||e.validate(t.value))).map((e=>({...e,from:i+e.start+1,to:i+e.end+1}))).forEach((t=>{s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}})),s.steps.length?s:void 0}})}const yI=ea.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(mI)},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){return["a",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[na({find:e=>gI(e).filter((e=>!this.options.validate||this.options.validate(e.value))).filter((e=>e.isLink)).map((e=>({text:e.value,index:e.start,data:e}))),type:this.type,getAttributes:e=>{var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];var t;return this.options.autolink&&e.push(vI({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push((t={type:this.type},new Xt({key:new nn("handleClickLink"),props:{handleClick:(e,n,i)=>{var o;const r=As(e.state,t.type.name);return!(!(null===(o=i.target)||void 0===o?void 0:o.closest("a"))||!r.href||(window.open(r.href,r.target),0))}}}))),this.options.linkOnPaste&&e.push(function(e){return new Xt({key:new nn("handlePasteLink"),props:{handlePaste:(t,n,i)=>{const{state:o}=t,{selection:r}=o,{empty:s}=r;if(s)return!1;let a="";i.content.forEach((e=>{a+=e.textContent}));const l=gI(a).find((e=>e.isLink&&e.value===a));return!(!a||!l||(e.editor.commands.setMark(e.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),e}}),xI=ea.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),wI=/^\s*>\s$/,kI=ta.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Xs({find:wI,type:this.type})]}}),_I=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,EI=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,MI=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,CI=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,DI=ea.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML({HTMLAttributes:e}){return["strong",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Gs({find:_I,type:this.type}),Gs({find:MI,type:this.type})]},addPasteRules(){return[na({find:EI,type:this.type}),na({find:CI,type:this.type})]}}),OI=/^\s*([-+*])\s$/,TI=ta.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){return[Xs({find:OI,type:this.type})]}}),NI=/^```([a-z]+)?[\s\n]$/,SI=/^~~~([a-z]+)?[\s\n]$/,AI=ta.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,i=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter((e=>e.startsWith(n))).map((e=>e.replace(n,"")))[0];return i||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",Wr(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!(!e||t.parent.type.name!==this.name)&&(!(!n&&t.parent.textContent.length)&&this.editor.commands.clearNodes())},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type)return!1;const r=i.parentOffset===i.parent.nodeSize-2,s=i.parent.textContent.endsWith("\n\n");return!(!r||!s)&&e.chain().command((({tr:e})=>(e.delete(i.pos-2,i.pos),!0))).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:i}=t,{$from:o,empty:r}=n;if(!r||o.parent.type!==this.type)return!1;if(!(o.parentOffset===o.parent.nodeSize-2))return!1;const s=o.after();if(void 0===s)return!1;return!i.nodeAt(s)&&e.commands.exitCode()}}},addInputRules(){return[Js({find:NI,type:this.type,getAttributes:e=>({language:e[1]})}),Js({find:SI,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Xt({key:new nn("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),i=t.clipboardData.getData("vscode-editor-data"),o=i?JSON.parse(i):void 0,r=null==o?void 0:o.mode;if(!n||!r)return!1;const{tr:s}=e.state;return s.replaceSelectionWith(this.type.create({language:r})),s.setSelection(zt.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),jI=ta.create({name:"doc",topNode:!0,content:"block+"});function II(e={}){return new Xt({view:t=>new zI(t,e)})}class zI{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}}))}destroy(){this.handlers.forEach((({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t)))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){let n=t.nodeBefore,i=t.nodeAfter;if(n||i){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),o=n?t.bottom:t.top;n&&i&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:t.left,right:t.right,top:o-this.width/2,bottom:o+this.width/2}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos);e={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let n,i,o=this.editorView.dom.offsetParent;if(this.element||(this.element=o.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!o||o==document.body&&"static"==getComputedStyle(o).position)n=-pageXOffset,i=-pageYOffset;else{let e=o.getBoundingClientRect();n=e.left-o.scrollLeft,i=e.top-o.scrollTop}this.element.style.left=e.left-n+"px",this.element.style.top=e.top-i+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=n&&n.type.spec.disableDropCursor,o="function"==typeof i?i(this.editorView,t):i;if(t&&!o){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&(e=ft(this.editorView.state.doc,e,this.editorView.dragging.slice),null==e))return this.setCursor(null);this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}const LI=cs.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[II(this.options)]}});class RI extends St{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return RI.valid(n)?new RI(n):St.near(n)}content(){return U.empty}eq(e){return e instanceof RI&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new RI(e.resolve(t.pos))}getBookmark(){return new FI(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),i=e.node(t);if(0!=n)for(let e=i.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),i=e.node(t);if(n!=i.childCount)for(let e=i.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&RI.valid(e))return e;let i=e.pos,o=null;for(let n=e.depth;;n--){let r=e.node(n);if(t>0?e.indexAfter(n)<r.childCount:e.index(n)>0){o=r.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;i+=t;let s=e.doc.resolve(i);if(RI.valid(s))return s}for(;;){let r=t>0?o.firstChild:o.lastChild;if(!r){if(o.isAtom&&!o.isText&&!Rt.isSelectable(o)){e=e.doc.resolve(i+o.nodeSize*t),n=!1;continue e}break}o=r,i+=t;let s=e.doc.resolve(i);if(RI.valid(s))return s}return null}}}RI.prototype.visible=!1,RI.findFrom=RI.findGapCursorFrom,St.jsonID("gapcursor",RI);class FI{constructor(e){this.pos=e}map(e){return new FI(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return RI.valid(t)?new RI(t):St.near(t)}}const BI=Cr({ArrowLeft:PI("horiz",-1),ArrowRight:PI("horiz",1),ArrowUp:PI("vert",-1),ArrowDown:PI("vert",1)});function PI(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,i,o){let r=e.selection,s=t>0?r.$to:r.$from,a=r.empty;if(r instanceof zt){if(!o.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=RI.findGapCursorFrom(s,t,a);return!!l&&(i&&i(e.tr.setSelection(new RI(l))),!0)}}function UI(e,t,n){if(!e||!e.editable)return!1;let i=e.state.doc.resolve(t);if(!RI.valid(i))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&Rt.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new RI(i))),!0)}function HI(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof RI))return!1;let{$from:n}=e.state.selection,i=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!i)return!1;let o=z.empty;for(let e=i.length-1;e>=0;e--)o=z.from(i[e].createAndFill(null,o));let r=e.state.tr.replace(n.pos,n.pos,new U(o,0,0));return r.setSelection(zt.near(r.doc.resolve(n.pos+1))),e.dispatch(r),!1}function $I(e){if(!(e.selection instanceof RI))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Ho.create(e.doc,[Bo.widget(e.selection.head,t,{key:"gapcursor"})])}const WI=cs.create({name:"gapCursor",addProseMirrorPlugins:()=>[new Xt({props:{decorations:$I,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&RI.valid(n)?new RI(n):null,handleClick:UI,handleKeyDown:BI,handleDOMEvents:{beforeinput:HI}}})],extendNodeSchema(e){var t;return{allowGapCursor:null!==(t=Kr(Pr(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),qI=ta.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",Wr(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:i})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:o}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:r}=this.options,{splittableMarks:s}=i.extensionManager,a=o||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{if(t&&a&&r){const t=a.filter((e=>s.includes(e.type.name)));e.ensureMarks(t)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),VI=ta.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}})))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Wr(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce(((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})})),{})},addInputRules(){return this.options.levels.map((e=>Js({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});var KI=200,YI=function(){};YI.prototype.append=function(e){return e.length?(e=YI.from(e),!this.length&&e||e.length<KI&&this.leafAppend(e)||this.length<KI&&e.leafPrepend(this)||this.appendInner(e)):this},YI.prototype.prepend=function(e){return e.length?YI.from(e).append(this):this},YI.prototype.appendInner=function(e){return new GI(this,e)},YI.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?YI.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},YI.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},YI.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},YI.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var i=[];return this.forEach((function(t,n){return i.push(e(t,n))}),t,n),i},YI.from=function(e){return e instanceof YI?e:e&&e.length?new QI(e):YI.empty};var QI=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,i){for(var o=t;o<n;o++)if(!1===e(this.values[o],i+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,i){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],i+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=KI)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=KI)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(YI);YI.empty=new QI([]);var GI=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,i){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),i))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,i+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,i){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,i+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,i))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(YI),ZI=YI;const JI=500;class XI{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,i,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}t&&(n=this.remapping(o,this.items.length),i=n.maps.length);let r,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),i=n.maps.length),i--,void c.push(e);if(n){c.push(new ez(e.map));let t,o=e.step.map(n.slice(i));o&&a.maybeStep(o).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new ez(t,void 0,void 0,l.length+c.length))),i--,t&&n.appendMap(t,i)}else a.maybeStep(e.step);return e.selection?(r=n?e.selection.map(n.slice(i)):e.selection,s=new XI(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:r}}addTransform(e,t,n,i){let o=[],r=this.eventCount,s=this.items,a=!i&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),p=new ez(e.mapping.maps[n],c,t);(l=a&&a.merge(p))&&(p=l,n?o.pop():s=s.slice(0,s.length-1)),o.push(p),t&&(r++,t=void 0),i||(a=p)}let l=r-n.depth;return l>nz&&(s=function(e,t){let n;return e.forEach(((e,i)=>{if(e.selection&&0==t--)return n=i,!1})),e.slice(n)}(s,l),r-=l),new XI(s.append(o),r)}remapping(e,t){let n=new Ze;return this.items.forEach(((t,i)=>{let o=null!=t.mirrorOffset&&i-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new XI(this.items.append(e.map((e=>new ez(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-t),o=e.mapping,r=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),i);let a=t;this.items.forEach((t=>{let i=o.getMirror(--a);if(null==i)return;r=Math.min(r,i);let l=o.maps[i];if(t.step){let r=e.steps[i].invert(e.docs[i]),c=t.selection&&t.selection.map(o.slice(a+1,i));c&&s++,n.push(new ez(l,r,c))}else n.push(new ez(l))}),i);let l=[];for(let e=t;e<r;e++)l.push(new ez(o.maps[e]));let c=this.items.slice(0,i).append(l).append(n),p=new XI(c,s);return p.emptyItemCount()>JI&&(p=p.compress(this.items.length-n.length)),p}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,i=[],o=0;return this.items.forEach(((r,s)=>{if(s>=e)i.push(r),r.selection&&o++;else if(r.step){let e=r.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=r.selection&&r.selection.map(t.slice(n));a&&o++;let l,c=new ez(s.invert(),e,a),p=i.length-1;(l=i.length&&i[p].merge(c))?i[p]=l:i.push(c)}}else r.map&&n--}),this.items.length,0),new XI(ZI.from(i.reverse()),o)}}XI.empty=new XI(ZI.empty,0);class ez{constructor(e,t,n,i){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new ez(t.getMap().invert(),t,this.selection)}}}class tz{constructor(e,t,n,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=i}}const nz=20;function iz(e){let t=[];return e.forEach(((e,n,i,o)=>t.push(i,o))),t}function oz(e,t){if(!e)return null;let n=[];for(let i=0;i<e.length;i+=2){let o=t.map(e[i],1),r=t.map(e[i+1],-1);o<=r&&n.push(o,r)}return n}function rz(e,t,n,i){let o=lz(t),r=cz.get(t).spec.config,s=(i?e.undone:e.done).popEvent(t,o);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(i?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),r,o),c=new tz(i?l:s.remaining,i?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(cz,{redo:i,historyState:c}).scrollIntoView())}let sz=!1,az=null;function lz(e){let t=e.plugins;if(az!=t){sz=!1,az=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){sz=!0;break}}return sz}const cz=new nn("history"),pz=new nn("closeHistory");function uz(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Xt({key:cz,state:{init:()=>new tz(XI.empty,XI.empty,null,0),apply:(t,n,i)=>function(e,t,n,i){let o,r=n.getMeta(cz);if(r)return r.historyState;n.getMeta(pz)&&(e=new tz(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(cz))return s.getMeta(cz).redo?new tz(e.done.addTransform(n,void 0,i,lz(t)),e.undone,iz(n.mapping.maps[n.steps.length-1]),e.prevTime):new tz(e.done,e.undone.addTransform(n,void 0,i,lz(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new tz(e.done.rebased(n,o),e.undone.rebased(n,o),oz(e.prevRanges,n.mapping),e.prevTime):new tz(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),oz(e.prevRanges,n.mapping),e.prevTime);{let o=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-i.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,i)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&i>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),r=s?oz(e.prevRanges,n.mapping):iz(n.mapping.maps[n.steps.length-1]);return new tz(e.done.addTransform(n,o?t.selection.getBookmark():void 0,i,lz(t)),XI.empty,r,n.time)}}(n,i,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,i="historyUndo"==n?dz:"historyRedo"==n?hz:null;return!!i&&(t.preventDefault(),i(e.state,e.dispatch))}}}})}const dz=(e,t)=>{let n=cz.getState(e);return!(!n||0==n.done.eventCount)&&(t&&rz(n,e,t,!1),!0)},hz=(e,t)=>{let n=cz.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&rz(n,e,t,!0),!0)},mz=cs.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>dz(e,t),redo:()=>({state:e,dispatch:t})=>hz(e,t)}),addProseMirrorPlugins(){return[uz(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),fz=ta.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",Wr(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e})=>e().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{var n;if(t){const{$to:t}=e.selection,i=t.end();if(t.nodeAfter)e.setSelection(zt.create(e.doc,t.pos));else{const o=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();o&&(e.insert(i,o),e.setSelection(zt.create(e.doc,i)))}e.scrollIntoView()}return!0})).run()}},addInputRules(){return[Zs({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),gz=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,bz=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,vz=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,yz=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,xz=ea.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:e}){return["em",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Gs({find:gz,type:this.type}),Gs({find:vz,type:this.type})]},addPasteRules(){return[na({find:bz,type:this.type}),na({find:yz,type:this.type})]}}),wz=ta.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",Wr(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),kz=/^(\d+)\.\s$/,_z=ta.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return 1===t?["ol",Wr(this.options.HTMLAttributes,n),0]:["ol",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){return[Xs({find:kz,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]})]}}),Ez=ta.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Mz=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,Cz=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,Dz=ea.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",Wr(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Gs({find:Mz,type:this.type})]},addPasteRules(){return[na({find:Cz,type:this.type})]}}),Oz=ta.create({name:"text",group:"inline"}),Tz=cs.create({name:"starterKit",addExtensions(){var e,t,n,i,o,r,s,a,l,c,p,u,d,h,m,f,g,b;const v=[];return!1!==this.options.blockquote&&v.push(kI.configure(null===(e=this.options)||void 0===e?void 0:e.blockquote)),!1!==this.options.bold&&v.push(DI.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&v.push(TI.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&v.push(qA.configure(null===(i=this.options)||void 0===i?void 0:i.code)),!1!==this.options.codeBlock&&v.push(AI.configure(null===(o=this.options)||void 0===o?void 0:o.codeBlock)),!1!==this.options.document&&v.push(jI.configure(null===(r=this.options)||void 0===r?void 0:r.document)),!1!==this.options.dropcursor&&v.push(LI.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&v.push(WI.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&v.push(qI.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&v.push(VI.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&v.push(mz.configure(null===(p=this.options)||void 0===p?void 0:p.history)),!1!==this.options.horizontalRule&&v.push(fz.configure(null===(u=this.options)||void 0===u?void 0:u.horizontalRule)),!1!==this.options.italic&&v.push(xz.configure(null===(d=this.options)||void 0===d?void 0:d.italic)),!1!==this.options.listItem&&v.push(wz.configure(null===(h=this.options)||void 0===h?void 0:h.listItem)),!1!==this.options.orderedList&&v.push(_z.configure(null===(m=this.options)||void 0===m?void 0:m.orderedList)),!1!==this.options.paragraph&&v.push(Ez.configure(null===(f=this.options)||void 0===f?void 0:f.paragraph)),!1!==this.options.strike&&v.push(Dz.configure(null===(g=this.options)||void 0===g?void 0:g.strike)),!1!==this.options.text&&v.push(Oz.configure(null===(b=this.options)||void 0===b?void 0:b.text)),v}});var Nz={exports:{}};function Sz(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||Sz(n)})),e}Nz.exports=Sz,Nz.exports.default=Sz;class Az{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function jz(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Iz(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const zz="</span>",Lz=e=>!!e.scope||e.sublanguage&&e.language;class Rz{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=jz(e)}openNode(e){if(!Lz(e))return;let t="";t=e.sublanguage?`language-${e.language}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}closeNode(e){Lz(e)&&(this.buffer+=zz)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const Fz=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Bz{constructor(){this.rootNode=Fz(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=Fz({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{Bz._collapse(e)})))}}class Pz extends Bz{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){return new Rz(this,this.options).value()}finalize(){return!0}}function Uz(e){return e?"string"==typeof e?e:e.source:null}function Hz(e){return qz("(?=",e,")")}function $z(e){return qz("(?:",e,")*")}function Wz(e){return qz("(?:",e,")?")}function qz(...e){const t=e.map((e=>Uz(e))).join("");return t}function Vz(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),n="("+(t.capture?"":"?:")+e.map((e=>Uz(e))).join("|")+")";return n}function Kz(e){return new RegExp(e.toString()+"|").exec("").length-1}const Yz=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Qz(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let i=Uz(e),o="";for(;i.length>0;){const e=Yz.exec(i);if(!e){o+=i;break}o+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?o+="\\"+String(Number(e[1])+t):(o+=e[0],"("===e[0]&&n++)}return o})).map((e=>`(${e})`)).join(t)}const Gz="[a-zA-Z]\\w*",Zz="[a-zA-Z_]\\w*",Jz="\\b\\d+(\\.\\d+)?",Xz="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",eL="\\b(0b[01]+)",tL={begin:"\\\\[\\s\\S]",relevance:0},nL={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[tL]},iL={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[tL]},oL=function(e,t,n={}){const i=Iz({scope:"comment",begin:e,end:t,contains:[]},n);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=Vz("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:qz(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},rL=oL("//","$"),sL=oL("/\\*","\\*/"),aL=oL("#","$"),lL={scope:"number",begin:Jz,relevance:0},cL={scope:"number",begin:Xz,relevance:0},pL={scope:"number",begin:eL,relevance:0},uL={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[tL,{begin:/\[/,end:/\]/,relevance:0,contains:[tL]}]}]},dL={scope:"title",begin:Gz,relevance:0},hL={scope:"title",begin:Zz,relevance:0},mL={begin:"\\.\\s*"+Zz,relevance:0};var fL=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:Gz,UNDERSCORE_IDENT_RE:Zz,NUMBER_RE:Jz,C_NUMBER_RE:Xz,BINARY_NUMBER_RE:eL,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=qz(t,/.*\b/,e.binary,/\b.*/)),Iz({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:tL,APOS_STRING_MODE:nL,QUOTE_STRING_MODE:iL,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:oL,C_LINE_COMMENT_MODE:rL,C_BLOCK_COMMENT_MODE:sL,HASH_COMMENT_MODE:aL,NUMBER_MODE:lL,C_NUMBER_MODE:cL,BINARY_NUMBER_MODE:pL,REGEXP_MODE:uL,TITLE_MODE:dL,UNDERSCORE_TITLE_MODE:hL,METHOD_GUARD:mL,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function gL(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function bL(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function vL(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=gL,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function yL(e,t){Array.isArray(e.illegal)&&(e.illegal=Vz(...e.illegal))}function xL(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function wL(e,t){void 0===e.relevance&&(e.relevance=1)}const kL=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=qz(n.beforeMatch,Hz(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},_L=["of","and","for","in","not","or","if","then","parent","list","value"],EL="keyword";function ML(e,t,n=EL){const i=Object.create(null);return"string"==typeof e?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach((function(n){Object.assign(i,ML(e[n],t,n))})),i;function o(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");i[n[0]]=[e,CL(n[0],n[1])]}))}}function CL(e,t){return t?Number(t):function(e){return _L.includes(e.toLowerCase())}(e)?0:1}const DL={},OL=e=>{console.error(e)},TL=(e,...t)=>{console.log(`WARN: ${e}`,...t)},NL=(e,t)=>{DL[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),DL[`${e}/${t}`]=!0)},SL=new Error;function AL(e,t,{key:n}){let i=0;const o=e[n],r={},s={};for(let e=1;e<=t.length;e++)s[e+i]=o[e],r[e+i]=!0,i+=Kz(t[e-1]);e[n]=s,e[n]._emit=r,e[n]._multi=!0}function jL(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw OL("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),SL;if("object"!=typeof e.beginScope||null===e.beginScope)throw OL("beginScope must be object"),SL;AL(e,e.begin,{key:"beginScope"}),e.begin=Qz(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw OL("skip, excludeEnd, returnEnd not compatible with endScope: {}"),SL;if("object"!=typeof e.endScope||null===e.endScope)throw OL("endScope must be object"),SL;AL(e,e.end,{key:"endScope"}),e.end=Qz(e.end,{joinWith:""})}}(e)}function IL(e){function t(t,n){return new RegExp(Uz(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=Kz(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(Qz(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Iz(e.classNameAliases||{}),function n(o,r){const s=o;if(o.isCompiled)return s;[bL,xL,jL,kL].forEach((e=>e(o,r))),e.compilerExtensions.forEach((e=>e(o,r))),o.__beforeBegin=null,[vL,yL,wL].forEach((e=>e(o,r))),o.isCompiled=!0;let a=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),a=o.keywords.$pattern,delete o.keywords.$pattern),a=a||/\w+/,o.keywords&&(o.keywords=ML(o.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),r&&(o.begin||(o.begin=/\B|\b/),s.beginRe=t(s.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(s.endRe=t(s.end)),s.terminatorEnd=Uz(s.end)||"",o.endsWithParent&&r.terminatorEnd&&(s.terminatorEnd+=(o.end?"|":"")+r.terminatorEnd)),o.illegal&&(s.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return Iz(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(zL(e))return Iz(e,{starts:e.starts?Iz(e.starts):null});if(Object.isFrozen(e))return Iz(e);return e}("self"===e?o:e)}))),o.contains.forEach((function(e){n(e,s)})),o.starts&&n(o.starts,r),s.matcher=function(e){const t=new i;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function zL(e){return!!e&&(e.endsWithParent||zL(e.starts))}var LL="11.6.0";class RL extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const FL=jz,BL=Iz,PL=Symbol("nomatch"),UL=7;var HL=function(e){const t=Object.create(null),n=Object.create(null),i=[];let o=!0;const r="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Pz};function l(e){return a.noHighlightRe.test(e)}function c(e,t,n){let i="",o="";"object"==typeof t?(i=e,n=t.ignoreIllegals,o=t.language):(NL("10.7.0","highlight(lang, code, ...args) has been deprecated."),NL("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,i=t),void 0===n&&(n=!0);const r={code:i,language:o};v("before:highlight",r);const s=r.result?r.result:p(r.language,r.code,n);return s.code=r.code,v("after:highlight",s),s}function p(e,n,i,s){const l=Object.create(null);function c(){if(!E.keywords)return void C.addText(D);let e=0;E.keywordPatternRe.lastIndex=0;let t=E.keywordPatternRe.exec(D),n="";for(;t;){n+=D.substring(e,t.index);const o=w.case_insensitive?t[0].toLowerCase():t[0],r=(i=o,E.keywords[i]);if(r){const[e,i]=r;if(C.addText(n),n="",l[o]=(l[o]||0)+1,l[o]<=UL&&(O+=i),e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;C.addKeyword(t[0],n)}}else n+=t[0];e=E.keywordPatternRe.lastIndex,t=E.keywordPatternRe.exec(D)}var i;n+=D.substring(e),C.addText(n)}function d(){null!=E.subLanguage?function(){if(""===D)return;let e=null;if("string"==typeof E.subLanguage){if(!t[E.subLanguage])return void C.addText(D);e=p(E.subLanguage,D,!0,M[E.subLanguage]),M[E.subLanguage]=e._top}else e=u(D,E.subLanguage.length?E.subLanguage:null);E.relevance>0&&(O+=e.relevance),C.addSublanguage(e._emitter,e.language)}():c(),D=""}function h(e,t){let n=1;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}const i=w.classNameAliases[e[n]]||e[n],o=t[n];i?C.addKeyword(o,i):(D=o,c(),D=""),n++}}function m(e,t){return e.scope&&"string"==typeof e.scope&&C.openNode(w.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(C.addKeyword(D,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),D=""):e.beginScope._multi&&(h(e.beginScope,t),D="")),E=Object.create(e,{parent:{value:E}}),E}function g(e,t,n){let i=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(i){if(e["on:end"]){const n=new Az(e);e["on:end"](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function b(e){return 0===E.matcher.regexIndex?(D+=e[0],1):(S=!0,0)}function v(e){const t=e[0],i=n.substring(e.index),o=g(E,e,i);if(!o)return PL;const r=E;E.endScope&&E.endScope._wrap?(d(),C.addKeyword(t,E.endScope._wrap)):E.endScope&&E.endScope._multi?(d(),h(E.endScope,e)):r.skip?D+=t:(r.returnEnd||r.excludeEnd||(D+=t),d(),r.excludeEnd&&(D=t));do{E.scope&&C.closeNode(),E.skip||E.subLanguage||(O+=E.relevance),E=E.parent}while(E!==o.parent);return o.starts&&m(o.starts,e),r.returnEnd?0:t.length}let y={};function x(t,r){const s=r&&r[0];if(D+=t,null==s)return d(),0;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===s){if(D+=n.slice(r.index,r.index+1),!o){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=r,"begin"===r.type)return function(e){const t=e[0],n=e.rule,i=new Az(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(e,i),i.isMatchIgnored))return b(t);return n.skip?D+=t:(n.excludeBegin&&(D+=t),d(),n.returnBegin||n.excludeBegin||(D=t)),m(n,e),n.returnBegin?0:t.length}(r);if("illegal"===r.type&&!i){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(E.scope||"<unnamed>")+'"');throw e.mode=E,e}if("end"===r.type){const e=v(r);if(e!==PL)return e}if("illegal"===r.type&&""===s)return 1;if(N>1e5&&N>3*r.index){throw new Error("potential infinite loop, way more iterations than matches")}return D+=s,s.length}const w=f(e);if(!w)throw OL(r.replace("{}",e)),new Error('Unknown language: "'+e+'"');const k=IL(w);let _="",E=s||k;const M={},C=new a.__emitter(a);!function(){const e=[];for(let t=E;t!==w;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>C.openNode(e)))}();let D="",O=0,T=0,N=0,S=!1;try{for(E.matcher.considerAll();;){N++,S?S=!1:E.matcher.considerAll(),E.matcher.lastIndex=T;const e=E.matcher.exec(n);if(!e)break;const t=x(n.substring(T,e.index),e);T=e.index+t}return x(n.substring(T)),C.closeAllNodes(),C.finalize(),_=C.toHTML(),{language:e,value:_,relevance:O,illegal:!1,_emitter:C,_top:E}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:FL(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:T,context:n.slice(T-100,T+100),mode:t.mode,resultSoFar:_},_emitter:C};if(o)return{language:e,value:FL(n),illegal:!1,relevance:0,errorRaised:t,_emitter:C,_top:E};throw t}}function u(e,n){n=n||a.languages||Object.keys(t);const i=function(e){const t={value:FL(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),o=n.filter(f).filter(b).map((t=>p(t,e,!1)));o.unshift(i);const r=o.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(f(e.language).supersetOf===t.language)return 1;if(f(t.language).supersetOf===e.language)return-1}return 0})),[l,c]=r,u=l;return u.secondBest=c,u}function d(e){let t=null;const i=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=a.languageDetectRe.exec(t);if(n){const t=f(n[1]);return t||(TL(r.replace("{}",n[1])),TL("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||f(e)))}(e);if(l(i))return;if(v("before:highlightElement",{el:e,language:i}),e.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),a.throwUnescapedHTML)){throw new RL("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const o=t.textContent,s=i?c(o,{language:i,ignoreIllegals:!0}):u(o);e.innerHTML=s.value,function(e,t,i){const o=t&&n[t]||i;e.classList.add("hljs"),e.classList.add(`language-${o}`)}(e,i,s.language),e.result={language:s.language,re:s.relevance,relevance:s.relevance},s.secondBest&&(e.secondBest={language:s.secondBest.language,relevance:s.secondBest.relevance}),v("after:highlightElement",{el:e,result:s,text:o})}let h=!1;function m(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(a.cssSelector).forEach(d)}function f(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function g(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function b(e){const t=f(e);return t&&!t.disableAutodetect}function v(e,t){const n=e;i.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){h&&m()}),!1),Object.assign(e,{highlight:c,highlightAuto:u,highlightAll:m,highlightElement:d,highlightBlock:function(e){return NL("10.7.0","highlightBlock will be removed entirely in v12.0"),NL("10.7.0","Please use highlightElement now."),d(e)},configure:function(e){a=BL(a,e)},initHighlighting:()=>{m(),NL("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){m(),NL("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,i){let r=null;try{r=i(e)}catch(e){if(OL("Language definition for '{}' could not be registered.".replace("{}",n)),!o)throw e;OL(e),r=s}r.name||(r.name=n),t[n]=r,r.rawDefinition=i.bind(null,e),r.aliases&&g(r.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:f,registerAliases:g,autoDetection:b,inherit:BL,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),i.push(e)}}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=LL,e.regex={concat:qz,lookahead:Hz,either:Vz,optional:Wz,anyNumberOfTimes:$z};for(const e in fL)"object"==typeof fL[e]&&Nz.exports(fL[e]);return Object.assign(e,fL),e}({}),$L=HL;HL.HighlightJS=HL,HL.default=HL;var WL=$L;function qL(e,t=[]){return e.map((e=>{const n=[...t,...e.properties?e.properties.className:[]];return e.children?qL(e.children,n):{text:e.value,classes:n}})).flat()}function VL(e){return e.value||e.children||[]}function KL({doc:e,name:t,lowlight:n,defaultLanguage:i}){const o=[];return Ts(e,(e=>e.type.name===t)).forEach((e=>{let t=e.pos+1;const r=e.node.attrs.language||i,s=n.listLanguages();var a;qL(r&&(s.includes(r)||(a=r,Boolean(WL.getLanguage(a))))?VL(n.highlight(r,e.node.textContent)):VL(n.highlightAuto(e.node.textContent))).forEach((e=>{const n=t+e.text.length;if(e.classes.length){const i=Bo.inline(t,n,{class:e.classes.join(" ")});o.push(i)}t=n}))})),Ho.create(e,o)}function YL({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every((e=>"function"==typeof t[e])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const i=new Xt({key:new nn("lowlight"),state:{init:(i,{doc:o})=>KL({doc:o,name:e,lowlight:t,defaultLanguage:n}),apply:(i,o,r,s)=>{const a=r.selection.$head.parent.type.name,l=s.selection.$head.parent.type.name,c=Ts(r.doc,(t=>t.type.name===e)),p=Ts(s.doc,(t=>t.type.name===e));return i.docChanged&&([a,l].includes(e)||p.length!==c.length||i.steps.some((e=>void 0!==e.from&&void 0!==e.to&&c.some((t=>t.pos>=e.from&&t.pos+t.node.nodeSize<=e.to)))))?KL({doc:i.doc,name:e,lowlight:t,defaultLanguage:n}):o.map(i.mapping,i.doc)}},props:{decorations:e=>i.getState(e)}});return i}const QL=AI.extend({addOptions(){var e;return{...null===(e=this.parent)||void 0===e?void 0:e.call(this),lowlight:{},defaultLanguage:null}},addProseMirrorPlugins(){var e;return[...(null===(e=this.parent)||void 0===e?void 0:e.call(this))||[],YL({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}});const GL=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],ZL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],JL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],XL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],eR=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();var tR="[0-9](_*[0-9])*",nR=`\\.(${tR})`,iR="[0-9a-fA-F](_*[0-9a-fA-F])*",oR={className:"number",variants:[{begin:`(\\b(${tR})((${nR})|\\.)?|(${nR}))`+`[eE][+-]?(${tR})[fFdD]?\\b`},{begin:`\\b(${tR})((${nR})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${nR})[fFdD]?\\b`},{begin:`\\b(${tR})[fFdD]\\b`},{begin:`\\b0[xX]((${iR})\\.?|(${iR})?\\.(${iR}))`+`[pP][+-]?(${tR})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${iR})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function rR(e,t,n){return-1===n?"":e.replace(t,(i=>rR(e,t,n-1)))}const sR="[A-Za-z$_][0-9A-Za-z$_]*",aR=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],lR=["true","false","null","undefined","NaN","Infinity"],cR=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],pR=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],uR=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],dR=["arguments","this","super","console","window","document","localStorage","module","global"],hR=[].concat(uR,cR,pR);var mR="[0-9](_*[0-9])*",fR=`\\.(${mR})`,gR="[0-9a-fA-F](_*[0-9a-fA-F])*",bR={className:"number",variants:[{begin:`(\\b(${mR})((${fR})|\\.)?|(${fR}))`+`[eE][+-]?(${mR})[fFdD]?\\b`},{begin:`\\b(${mR})((${fR})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${fR})[fFdD]?\\b`},{begin:`\\b(${mR})[fFdD]\\b`},{begin:`\\b0[xX]((${gR})\\.?|(${gR})?\\.(${gR}))`+`[pP][+-]?(${mR})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${gR})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};const vR=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],yR=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],xR=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],wR=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],kR=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),_R=xR.concat(wR);const ER=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],MR=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],CR=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],DR=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],OR=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function TR(e){return e?"string"==typeof e?e:e.source:null}function NR(e){return SR("(?=",e,")")}function SR(...e){const t=e.map((e=>TR(e))).join("");return t}function AR(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),n="("+(t.capture?"":"?:")+e.map((e=>TR(e))).join("|")+")";return n}const jR=e=>SR(/\b/,e,/\w$/.test(e)?/\b/:/\B/),IR=["Protocol","Type"].map(jR),zR=["init","self"].map(jR),LR=["Any","Self"],RR=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],FR=["false","nil","true"],BR=["assignment","associativity","higherThan","left","lowerThan","none","right"],PR=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],UR=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],HR=AR(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),$R=AR(HR,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),WR=SR(HR,$R,"*"),qR=AR(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),VR=AR(qR,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),KR=SR(qR,VR,"*"),YR=SR(/[A-Z]/,VR,"*"),QR=["autoclosure",SR(/convention\(/,AR("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",SR(/objc\(/,KR,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],GR=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];const ZR="[A-Za-z$_][0-9A-Za-z$_]*",JR=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],XR=["true","false","null","undefined","NaN","Infinity"],eF=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],tF=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],nF=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],iF=["arguments","this","super","console","window","document","localStorage","module","global"],oF=[].concat(nF,eF,tF);function rF(e){const t=e.regex,n=ZR,i="<>",o="</>",r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,i=e.input[n];if("<"===i||","===i)return void t.ignoreMatch();let o;">"===i&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());(o=e.input.substring(n).match(/^\s+extends\s+/))&&0===o.index&&t.ignoreMatch()}},s={$pattern:ZR,keyword:JR,literal:XR,built_in:oF,"variable.language":iF},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,p={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))`+`[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},u={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"css"}},m={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,u]},f={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},g=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,m,p];u.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(f,u.contains),v=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),y={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v},x={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},w={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...eF,...tF]}},k={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/};const _={match:t.concat(/\b/,(E=[...nF,"super"],t.concat("(?!",E.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var E;const M={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},D="(\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(D)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:w},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,m,f,p,w,{className:"attr",begin:n+t.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[f,e.REGEXP_MODE,{className:"function",begin:D,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i,end:o},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},k,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},M,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},_,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},x,C,{match:/\$[(.]/}]}}var sF={exports:{}};function aF(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||aF(n)})),e}sF.exports=aF,sF.exports.default=aF;class lF{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function cF(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function pF(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const uF="</span>",dF=e=>!!e.scope||e.sublanguage&&e.language;class hF{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=cF(e)}openNode(e){if(!dF(e))return;let t="";t=e.sublanguage?`language-${e.language}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}closeNode(e){dF(e)&&(this.buffer+=uF)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const mF=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class fF{constructor(){this.rootNode=mF(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=mF({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{fF._collapse(e)})))}}class gF extends fF{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){return new hF(this,this.options).value()}finalize(){return!0}}function bF(e){return e?"string"==typeof e?e:e.source:null}function vF(e){return wF("(?=",e,")")}function yF(e){return wF("(?:",e,")*")}function xF(e){return wF("(?:",e,")?")}function wF(...e){const t=e.map((e=>bF(e))).join("");return t}function kF(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),n="("+(t.capture?"":"?:")+e.map((e=>bF(e))).join("|")+")";return n}function _F(e){return new RegExp(e.toString()+"|").exec("").length-1}const EF=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function MF(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let i=bF(e),o="";for(;i.length>0;){const e=EF.exec(i);if(!e){o+=i;break}o+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?o+="\\"+String(Number(e[1])+t):(o+=e[0],"("===e[0]&&n++)}return o})).map((e=>`(${e})`)).join(t)}const CF="[a-zA-Z]\\w*",DF="[a-zA-Z_]\\w*",OF="\\b\\d+(\\.\\d+)?",TF="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",NF="\\b(0b[01]+)",SF={begin:"\\\\[\\s\\S]",relevance:0},AF={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[SF]},jF={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[SF]},IF=function(e,t,n={}){const i=pF({scope:"comment",begin:e,end:t,contains:[]},n);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=kF("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:wF(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},zF=IF("//","$"),LF=IF("/\\*","\\*/"),RF=IF("#","$"),FF={scope:"number",begin:OF,relevance:0},BF={scope:"number",begin:TF,relevance:0},PF={scope:"number",begin:NF,relevance:0},UF={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[SF,{begin:/\[/,end:/\]/,relevance:0,contains:[SF]}]}]},HF={scope:"title",begin:CF,relevance:0},$F={scope:"title",begin:DF,relevance:0},WF={begin:"\\.\\s*"+DF,relevance:0};var qF=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:CF,UNDERSCORE_IDENT_RE:DF,NUMBER_RE:OF,C_NUMBER_RE:TF,BINARY_NUMBER_RE:NF,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=wF(t,/.*\b/,e.binary,/\b.*/)),pF({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:SF,APOS_STRING_MODE:AF,QUOTE_STRING_MODE:jF,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:IF,C_LINE_COMMENT_MODE:zF,C_BLOCK_COMMENT_MODE:LF,HASH_COMMENT_MODE:RF,NUMBER_MODE:FF,C_NUMBER_MODE:BF,BINARY_NUMBER_MODE:PF,REGEXP_MODE:UF,TITLE_MODE:HF,UNDERSCORE_TITLE_MODE:$F,METHOD_GUARD:WF,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function VF(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function KF(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function YF(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=VF,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function QF(e,t){Array.isArray(e.illegal)&&(e.illegal=kF(...e.illegal))}function GF(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function ZF(e,t){void 0===e.relevance&&(e.relevance=1)}const JF=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=wF(n.beforeMatch,vF(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},XF=["of","and","for","in","not","or","if","then","parent","list","value"],eB="keyword";function tB(e,t,n=eB){const i=Object.create(null);return"string"==typeof e?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach((function(n){Object.assign(i,tB(e[n],t,n))})),i;function o(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");i[n[0]]=[e,nB(n[0],n[1])]}))}}function nB(e,t){return t?Number(t):function(e){return XF.includes(e.toLowerCase())}(e)?0:1}const iB={},oB=e=>{console.error(e)},rB=(e,...t)=>{console.log(`WARN: ${e}`,...t)},sB=(e,t)=>{iB[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),iB[`${e}/${t}`]=!0)},aB=new Error;function lB(e,t,{key:n}){let i=0;const o=e[n],r={},s={};for(let e=1;e<=t.length;e++)s[e+i]=o[e],r[e+i]=!0,i+=_F(t[e-1]);e[n]=s,e[n]._emit=r,e[n]._multi=!0}function cB(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw oB("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),aB;if("object"!=typeof e.beginScope||null===e.beginScope)throw oB("beginScope must be object"),aB;lB(e,e.begin,{key:"beginScope"}),e.begin=MF(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw oB("skip, excludeEnd, returnEnd not compatible with endScope: {}"),aB;if("object"!=typeof e.endScope||null===e.endScope)throw oB("endScope must be object"),aB;lB(e,e.end,{key:"endScope"}),e.end=MF(e.end,{joinWith:""})}}(e)}function pB(e){function t(t,n){return new RegExp(bF(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=_F(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(MF(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=pF(e.classNameAliases||{}),function n(o,r){const s=o;if(o.isCompiled)return s;[KF,GF,cB,JF].forEach((e=>e(o,r))),e.compilerExtensions.forEach((e=>e(o,r))),o.__beforeBegin=null,[YF,QF,ZF].forEach((e=>e(o,r))),o.isCompiled=!0;let a=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),a=o.keywords.$pattern,delete o.keywords.$pattern),a=a||/\w+/,o.keywords&&(o.keywords=tB(o.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),r&&(o.begin||(o.begin=/\B|\b/),s.beginRe=t(s.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(s.endRe=t(s.end)),s.terminatorEnd=bF(s.end)||"",o.endsWithParent&&r.terminatorEnd&&(s.terminatorEnd+=(o.end?"|":"")+r.terminatorEnd)),o.illegal&&(s.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return pF(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(uB(e))return pF(e,{starts:e.starts?pF(e.starts):null});if(Object.isFrozen(e))return pF(e);return e}("self"===e?o:e)}))),o.contains.forEach((function(e){n(e,s)})),o.starts&&n(o.starts,r),s.matcher=function(e){const t=new i;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function uB(e){return!!e&&(e.endsWithParent||uB(e.starts))}var dB="11.6.0";class hB extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const mB=cF,fB=pF,gB=Symbol("nomatch"),bB=7;var vB=function(e){const t=Object.create(null),n=Object.create(null),i=[];let o=!0;const r="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:gF};function l(e){return a.noHighlightRe.test(e)}function c(e,t,n){let i="",o="";"object"==typeof t?(i=e,n=t.ignoreIllegals,o=t.language):(sB("10.7.0","highlight(lang, code, ...args) has been deprecated."),sB("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,i=t),void 0===n&&(n=!0);const r={code:i,language:o};v("before:highlight",r);const s=r.result?r.result:p(r.language,r.code,n);return s.code=r.code,v("after:highlight",s),s}function p(e,n,i,s){const l=Object.create(null);function c(){if(!E.keywords)return void C.addText(D);let e=0;E.keywordPatternRe.lastIndex=0;let t=E.keywordPatternRe.exec(D),n="";for(;t;){n+=D.substring(e,t.index);const o=w.case_insensitive?t[0].toLowerCase():t[0],r=(i=o,E.keywords[i]);if(r){const[e,i]=r;if(C.addText(n),n="",l[o]=(l[o]||0)+1,l[o]<=bB&&(O+=i),e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;C.addKeyword(t[0],n)}}else n+=t[0];e=E.keywordPatternRe.lastIndex,t=E.keywordPatternRe.exec(D)}var i;n+=D.substring(e),C.addText(n)}function d(){null!=E.subLanguage?function(){if(""===D)return;let e=null;if("string"==typeof E.subLanguage){if(!t[E.subLanguage])return void C.addText(D);e=p(E.subLanguage,D,!0,M[E.subLanguage]),M[E.subLanguage]=e._top}else e=u(D,E.subLanguage.length?E.subLanguage:null);E.relevance>0&&(O+=e.relevance),C.addSublanguage(e._emitter,e.language)}():c(),D=""}function h(e,t){let n=1;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}const i=w.classNameAliases[e[n]]||e[n],o=t[n];i?C.addKeyword(o,i):(D=o,c(),D=""),n++}}function m(e,t){return e.scope&&"string"==typeof e.scope&&C.openNode(w.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(C.addKeyword(D,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),D=""):e.beginScope._multi&&(h(e.beginScope,t),D="")),E=Object.create(e,{parent:{value:E}}),E}function g(e,t,n){let i=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(i){if(e["on:end"]){const n=new lF(e);e["on:end"](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function b(e){return 0===E.matcher.regexIndex?(D+=e[0],1):(S=!0,0)}function v(e){const t=e[0],i=n.substring(e.index),o=g(E,e,i);if(!o)return gB;const r=E;E.endScope&&E.endScope._wrap?(d(),C.addKeyword(t,E.endScope._wrap)):E.endScope&&E.endScope._multi?(d(),h(E.endScope,e)):r.skip?D+=t:(r.returnEnd||r.excludeEnd||(D+=t),d(),r.excludeEnd&&(D=t));do{E.scope&&C.closeNode(),E.skip||E.subLanguage||(O+=E.relevance),E=E.parent}while(E!==o.parent);return o.starts&&m(o.starts,e),r.returnEnd?0:t.length}let y={};function x(t,r){const s=r&&r[0];if(D+=t,null==s)return d(),0;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===s){if(D+=n.slice(r.index,r.index+1),!o){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=r,"begin"===r.type)return function(e){const t=e[0],n=e.rule,i=new lF(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(e,i),i.isMatchIgnored))return b(t);return n.skip?D+=t:(n.excludeBegin&&(D+=t),d(),n.returnBegin||n.excludeBegin||(D=t)),m(n,e),n.returnBegin?0:t.length}(r);if("illegal"===r.type&&!i){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(E.scope||"<unnamed>")+'"');throw e.mode=E,e}if("end"===r.type){const e=v(r);if(e!==gB)return e}if("illegal"===r.type&&""===s)return 1;if(N>1e5&&N>3*r.index){throw new Error("potential infinite loop, way more iterations than matches")}return D+=s,s.length}const w=f(e);if(!w)throw oB(r.replace("{}",e)),new Error('Unknown language: "'+e+'"');const k=pB(w);let _="",E=s||k;const M={},C=new a.__emitter(a);!function(){const e=[];for(let t=E;t!==w;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>C.openNode(e)))}();let D="",O=0,T=0,N=0,S=!1;try{for(E.matcher.considerAll();;){N++,S?S=!1:E.matcher.considerAll(),E.matcher.lastIndex=T;const e=E.matcher.exec(n);if(!e)break;const t=x(n.substring(T,e.index),e);T=e.index+t}return x(n.substring(T)),C.closeAllNodes(),C.finalize(),_=C.toHTML(),{language:e,value:_,relevance:O,illegal:!1,_emitter:C,_top:E}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:mB(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:T,context:n.slice(T-100,T+100),mode:t.mode,resultSoFar:_},_emitter:C};if(o)return{language:e,value:mB(n),illegal:!1,relevance:0,errorRaised:t,_emitter:C,_top:E};throw t}}function u(e,n){n=n||a.languages||Object.keys(t);const i=function(e){const t={value:mB(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),o=n.filter(f).filter(b).map((t=>p(t,e,!1)));o.unshift(i);const r=o.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(f(e.language).supersetOf===t.language)return 1;if(f(t.language).supersetOf===e.language)return-1}return 0})),[l,c]=r,u=l;return u.secondBest=c,u}function d(e){let t=null;const i=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=a.languageDetectRe.exec(t);if(n){const t=f(n[1]);return t||(rB(r.replace("{}",n[1])),rB("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||f(e)))}(e);if(l(i))return;if(v("before:highlightElement",{el:e,language:i}),e.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),a.throwUnescapedHTML)){throw new hB("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const o=t.textContent,s=i?c(o,{language:i,ignoreIllegals:!0}):u(o);e.innerHTML=s.value,function(e,t,i){const o=t&&n[t]||i;e.classList.add("hljs"),e.classList.add(`language-${o}`)}(e,i,s.language),e.result={language:s.language,re:s.relevance,relevance:s.relevance},s.secondBest&&(e.secondBest={language:s.secondBest.language,relevance:s.secondBest.relevance}),v("after:highlightElement",{el:e,result:s,text:o})}let h=!1;function m(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(a.cssSelector).forEach(d)}function f(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function g(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function b(e){const t=f(e);return t&&!t.disableAutodetect}function v(e,t){const n=e;i.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){h&&m()}),!1),Object.assign(e,{highlight:c,highlightAuto:u,highlightAll:m,highlightElement:d,highlightBlock:function(e){return sB("10.7.0","highlightBlock will be removed entirely in v12.0"),sB("10.7.0","Please use highlightElement now."),d(e)},configure:function(e){a=fB(a,e)},initHighlighting:()=>{m(),sB("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){m(),sB("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,i){let r=null;try{r=i(e)}catch(e){if(oB("Language definition for '{}' could not be registered.".replace("{}",n)),!o)throw e;oB(e),r=s}r.name||(r.name=n),t[n]=r,r.rawDefinition=i.bind(null,e),r.aliases&&g(r.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:f,registerAliases:g,autoDetection:b,inherit:fB,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),i.push(e)}}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=dB,e.regex={concat:wF,lookahead:vF,either:kF,optional:xF,anyNumberOfTimes:yF};for(const e in qF)"object"==typeof qF[e]&&sF.exports(qF[e]);return Object.assign(e,qF),e}({}),yB=vB;vB.HighlightJS=vB,vB.default=vB;var xB={exports:{}};!function(e){!function(){var t;function n(e){for(var t,n,i,o,r=1,s=[].slice.call(arguments),a=0,l=e.length,c="",p=!1,u=!1,d=function(){return s[r++]},h=function(){for(var n="";/\d/.test(e[a]);)n+=e[a++],t=e[a];return n.length>0?parseInt(n):null};a<l;++a)if(t=e[a],p)switch(p=!1,"."==t?(u=!1,t=e[++a]):"0"==t&&"."==e[a+1]?(u=!0,t=e[a+=2]):u=!0,o=h(),t){case"b":c+=parseInt(d(),10).toString(2);break;case"c":c+="string"==typeof(n=d())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(d(),10);break;case"f":i=String(parseFloat(d()).toFixed(o||6)),c+=u?i:i.replace(/^0/,"");break;case"j":c+=JSON.stringify(d());break;case"o":c+="0"+parseInt(d(),10).toString(8);break;case"s":c+=d();break;case"x":c+="0x"+parseInt(d(),10).toString(16);break;case"X":c+="0x"+parseInt(d(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?p=!0:c+=t;return c}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()}(xB);var wB=xB.exports;const kB=Object.assign(_B(Error),{eval:_B(EvalError),range:_B(RangeError),reference:_B(ReferenceError),syntax:_B(SyntaxError),type:_B(TypeError),uri:_B(URIError)});function _B(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){const i=t?wB(t,...n):t;return new e(i)}}const EB={}.hasOwnProperty,MB="hljs-";function CB(e,t,n={}){let i=n.prefix;if("string"!=typeof e)throw kB("Expected `string` for name, got `%s`",e);if(!yB.getLanguage(e))throw kB("Unknown language: `%s` is not registered",e);if("string"!=typeof t)throw kB("Expected `string` for value, got `%s`",t);null==i&&(i=MB),yB.configure({__emitter:DB,classPrefix:i});const o=yB.highlight(t,{language:e,ignoreIllegals:!0});if(yB.configure({}),o.errorRaised)throw o.errorRaised;return o._emitter.root.data.language=o.language,o._emitter.root.data.relevance=o.relevance,o._emitter.root}class DB{constructor(e){this.options=e,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(e){if(""===e)return;const t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e})}addKeyword(e,t){this.openNode(t),this.addText(e),this.closeNode()}addSublanguage(e,t){const n=this.stack[this.stack.length-1],i=e.root.children;t?n.children.push({type:"element",tagName:"span",properties:{className:[t]},children:i}):n.children.push(...i)}openNode(e){const t=e.split(".").map(((e,t)=>t?e+"_".repeat(t):this.options.classPrefix+e)),n={type:"element",tagName:"span",properties:{className:t},children:[]};this.stack[this.stack.length-1].children.push(n),this.stack.push(n)}closeNode(){this.stack.pop()}closeAllNodes(){}finalize(){}toHTML(){return""}}const OB={highlight:CB,highlightAuto:function(e,t={}){const n=t.subset||yB.listLanguages();t.prefix;let i=-1,o={type:"root",data:{language:null,relevance:0},children:[]};if("string"!=typeof e)throw kB("Expected `string` for value, got `%s`",e);for(;++i<n.length;){const r=n[i];if(!yB.getLanguage(r))continue;const s=CB(r,e,t);s.data.relevance>o.data.relevance&&(o=s)}return o},registerLanguage:function(e,t){yB.registerLanguage(e,t)},registered:function(e){return Boolean(yB.getLanguage(e))},listLanguages:function(){return yB.listLanguages()},registerAlias:function(e,t){if("string"==typeof e)yB.registerAliases(t,{languageName:e});else{let t;for(t in e)EB.call(e,t)&&yB.registerAliases(e[t],{languageName:t})}}};OB.registerLanguage("arduino",(function(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",r="(?!struct)("+i+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},u=t.optional(o)+e.IDENT_RE+"\\s*\\(",d={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},m=[h,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:m.concat([{begin:/\(/,end:/\)/,keywords:d,contains:m.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+r+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:d,relevance:0},{begin:u,returnBegin:!0,contains:[p],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:d,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(f,g,h,m,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:d,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:d},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}(e),i=n.keywords;return i.type=[...i.type,...t.type],i.literal=[...i.literal,...t.literal],i.built_in=[...i.built_in,...t.built_in],i._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n})),OB.registerLanguage("bash",(function(e){const t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},i]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},r={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(s);const a={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},l=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[l,e.SHEBANG(),c,a,e.HASH_COMMENT_MODE,r,{match:/(\/[a-z._-]+)+/},s,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},n]}})),OB.registerLanguage("c",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",r="("+i+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},u=t.optional(o)+e.IDENT_RE+"\\s*\\(",d={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream "+"auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set "+"unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos "+"asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp "+"fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper "+"isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow "+"printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp "+"strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan "+"vfprintf vprintf vsprintf endl initializer_list unique_ptr"},h=[c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:h.concat([{begin:/\(/,end:/\)/,keywords:d,contains:h.concat(["self"]),relevance:0}]),relevance:0},f={begin:"("+r+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:d,relevance:0},{begin:u,returnBegin:!0,contains:[e.inherit(p,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:d,disableAutodetect:!0,illegal:"</",contains:[].concat(m,f,h,[c,{begin:e.IDENT_RE+"::",keywords:d},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:a,keywords:d}}})),OB.registerLanguage("cpp",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",r="(?!struct)("+i+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},u=t.optional(o)+e.IDENT_RE+"\\s*\\(",d={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},m=[h,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:m.concat([{begin:/\(/,end:/\)/,keywords:d,contains:m.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+r+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:d,relevance:0},{begin:u,returnBegin:!0,contains:[p],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:d,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(f,g,h,m,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:d,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:d},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}})),OB.registerLanguage("csharp",(function(e){const t={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),i={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},o={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},r=e.inherit(o,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/,keywords:t},a=e.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,a]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},p=e.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]});s.contains=[c,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_BLOCK_COMMENT_MODE],a.contains=[p,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const u={variants:[c,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},h=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",m={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},u,i,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+h+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,d],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[u,i,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},m]}})),OB.registerLanguage("css",(function(e){const t=e.regex,n=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),i=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+JL.join("|")+")"},{begin:":(:)?("+XL.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+eR.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...i,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...i,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:ZL.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...i,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+GL.join("|")+")\\b"}]}})),OB.registerLanguage("diff",(function(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}})),OB.registerLanguage("go",(function(e){const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{begin:e.C_NUMBER_RE+"[i]",relevance:1},e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}})),OB.registerLanguage("graphql",(function(e){const t=e.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}})),OB.registerLanguage("ini",(function(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},i=e.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const o={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[i,r,o,s,n,"self"],relevance:0},l=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:t.concat(l,"(\\s*\\.\\s*",l,")*",t.lookahead(/\s*=\s*[^#\s]/)),className:"attr",starts:{end:/$/,contains:[i,a,r,o,s,n]}}]}})),OB.registerLanguage("java",(function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",i=n+rR("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),o={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},r={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:o,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+i+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:o,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,oR,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},oR,r]}})),OB.registerLanguage("javascript",(function(e){const t=e.regex,n=sR,i="<>",o="</>",r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,i=e.input[n];if("<"===i||","===i)return void t.ignoreMatch();let o;">"===i&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());(o=e.input.substring(n).match(/^\s+extends\s+/))&&0===o.index&&t.ignoreMatch()}},s={$pattern:sR,keyword:aR,literal:lR,built_in:hR,"variable.language":dR},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,p={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))`+`[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},u={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"css"}},m={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,u]},f={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},g=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,m,p];u.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(f,u.contains),v=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),y={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v},x={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},w={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...cR,...pR]}},k={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/},_={match:t.concat(/\b/,(E=[...uR,"super"],t.concat("(?!",E.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var E;const M={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},D="(\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(D)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:w},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,m,f,p,w,{className:"attr",begin:n+t.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[f,e.REGEXP_MODE,{className:"function",begin:D,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i,end:o},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},k,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},M,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},_,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},x,C,{match:/\$[(.]/}]}})),OB.registerLanguage("json",(function(e){const t=["true","false","null"],n={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",keywords:{literal:t},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),OB.registerLanguage("kotlin",(function(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline "+"crossinline dynamic final enum if else do while for when throw try catch finally "+"import package is in fun override companion reified inline lateinit init "+"interface annotation data sealed internal infix operator out by constructor super "+"tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},r={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,i]}]};i.contains.push(r);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(r,{className:"string"}),"self"]}]},l=bR,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),p={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},u=p;return u.variants[1].contains=[p],p.variants[1].contains=[u],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,s,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[p,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,s,a,r,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,a]},r,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}})),OB.registerLanguage("less",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=_R,i="[\\w-]+",o="("+i+"|@\\{"+i+"\\})",r=[],s=[],a=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},l=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:yR.join(" ")},p={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,p,l("variable","@@?"+i,10),l("variable","@\\{"+i+"\\}"),l("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const u=s.concat({begin:/\{/,end:/\}/,contains:r}),d={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},h={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+kR.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},f={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:u}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d,l("keyword","all\\b"),l("variable","@\\{"+i+"\\}"),{begin:"\\b("+vR.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,l("selector-tag",o,0),l("selector-id","#"+o),l("selector-class","\\."+o,0),l("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+xR.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+wR.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:u},{begin:"!important"},t.FUNCTION_DISPATCH]},b={begin:i+":(:)?"+`(${n.join("|")})`,returnBegin:!0,contains:[g]};return r.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,f,b,h,g,d,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:r}})),OB.registerLanguage("lua",(function(e){const t="\\[=*\\[",n="\\]=*\\]",i={begin:t,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[i],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len "+"__gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert "+"collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring "+"module next pairs pcall print rawequal rawget rawset require select setfenv "+"setmetatable tonumber tostring type unpack xpcall arg self "+"coroutine resume yield status wrap create running debug getupvalue "+"debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv "+"io lines write close flush open output type read stderr stdin input stdout popen tmpfile "+"math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan "+"os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall "+"string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower "+"table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[i],relevance:5}])}})),OB.registerLanguage("makefile",(function(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},i={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort "+"word wordlist firstword lastword dir notdir suffix basename "+"addsuffix addprefix join wildcard realpath abspath error warning "+"shell origin flavor foreach if or and call eval file value"},contains:[t]},o={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},r={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif "+"include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,i,o,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},r]}})),OB.registerLanguage("markdown",(function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},i={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},o={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]},r=e.inherit(i,{contains:[]}),s=e.inherit(o,{contains:[]});i.contains.push(s),o.contains.push(r);let a=[t,n];return[i,o,r,s].forEach((e=>{e.contains=e.contains.concat(a)})),a=a.concat(i,o),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:a},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:a}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i,o,{className:"quote",begin:"^>\\s+",contains:a,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}})),OB.registerLanguage("objectivec",(function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},illegal:"</",contains:[{className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}})),OB.registerLanguage("perl",(function(e){const t=e.regex,n=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"].join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},r={begin:/->\{/,end:/\}/},s={variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,`(?![A-Za-z])(?![@$%])`)},{begin:/[$%@][^\s\w{]/,relevance:0}]},a=[e.BACKSLASH_ESCAPE,o,s],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],c=(e,i,o="\\1")=>{const r="\\1"===o?o:t.concat(o,i);return t.concat(t.concat("(?:",e,")"),i,/(?:\\.|[^\\\/])*?/,r,/(?:\\.|[^\\\/])*?/,o,n)},p=(e,i,o)=>t.concat(t.concat("(?:",e,")"),i,/(?:\\.|[^\\\/])*?/,o,n),u=[s,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),r,{className:"string",contains:a,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:c("s|tr|y",t.either(...l,{capture:!0}))},{begin:c("s|tr|y","\\(","\\)")},{begin:c("s|tr|y","\\[","\\]")},{begin:c("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...l,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=u,r.contains=u,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:u}})),OB.registerLanguage("php",(function(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,i=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),r={scope:"variable",match:"\\$+"+i},s={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},a=e.inherit(e.APOS_STRING_MODE,{illegal:null}),l="[ \t\n]",c={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(s)}),a,e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(s)})]},p={scope:"number",variants:[{begin:`\\b0[bB][01]+(?:_[01]+)*\\b`},{begin:`\\b0[oO][0-7]+(?:_[0-7]+)*\\b`},{begin:`\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b`},{begin:`(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?`}],relevance:0},u=["false","null","true"],d=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],h=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],m={keyword:d,literal:(e=>{const t=[];return e.forEach((e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())})),t})(u),built_in:h},f=e=>e.map((e=>e.replace(/\|\d+$/,""))),g={variants:[{match:[/new/,t.concat(l,"+"),t.concat("(?!",f(h).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},b=t.concat(i,"\\b(?!\\()"),v={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},y={scope:"attr",match:t.concat(i,t.lookahead(":"),t.lookahead(/(?!::)/))},x={relevance:0,begin:/\(/,end:/\)/,keywords:m,contains:[y,r,v,e.C_BLOCK_COMMENT_MODE,c,p,g]},w={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",f(d).join("\\b|"),"|",f(h).join("\\b|"),"\\b)"),i,t.concat(l,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[x]};x.contains.push(w);const k=[y,v,e.C_BLOCK_COMMENT_MODE,c,p,g];return{case_insensitive:!1,keywords:m,contains:[{begin:t.concat(/#\[\s*/,o),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:u,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:u,keyword:["new","array"]},contains:["self",...k]},...k,{scope:"meta",match:o}]},e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},r,w,v,{match:[/const/,/\s/,i],scope:{1:"keyword",3:"variable.constant"}},g,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:m,contains:["self",r,v,e.C_BLOCK_COMMENT_MODE,c,p]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},c,p]}})),OB.registerLanguage("php-template",(function(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}})),OB.registerLanguage("plaintext",(function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}})),OB.registerLanguage("python",(function(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},r={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,r,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r,a,s]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",p=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,u=`\\b|${i.join("|")}`,d={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${p}))[eE][+-]?(${c})[jJ]?(?=${u})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${u})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${u})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${u})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${u})`},{begin:`\\b(${c})[jJ](?=${u})`}]},h={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",r,d,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,d,r],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|->|\?)|=>/,contains:[r,d,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},l,h,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[d,m,l]}]}})),OB.registerLanguage("python-repl",(function(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}})),OB.registerLanguage("r",(function(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,i=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,r=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 "+"NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F "+"abs acos acosh all any anyNA Arg as.call as.character "+"as.complex as.double as.environment as.integer as.logical "+"as.null.default as.numeric as.raw asin asinh atan atanh attr "+"attributes baseenv browser c call ceiling class Conj cos cosh "+"cospi cummax cummin cumprod cumsum digamma dim dimnames "+"emptyenv exp expression floor forceAndCall gamma gc.time "+"globalenv Im interactive invisible is.array is.atomic is.call "+"is.character is.complex is.double is.environment is.expression "+"is.finite is.function is.infinite is.integer is.language "+"is.list is.logical is.matrix is.na is.name is.nan is.null "+"is.numeric is.object is.pairlist is.raw is.recursive is.single "+"is.symbol lazyLoadDBfetch length lgamma list log max min "+"missing Mod names nargs nzchar oldClass on.exit pos.to.env "+"proc.time prod quote range Re rep retracemem return round "+"seq_along seq_len seq.int sign signif sin sinh sinpi sqrt "+"standardGeneric substitute sum switch tan tanh tanpi tracemem "+"trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,i]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,i]},{scope:{1:"punctuation",2:"number"},match:[r,i]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,i]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:r},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}})),OB.registerLanguage("ruby",(function(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(i,/(::\w+)*/),r={"variable.constant":["__FILE__","__LINE__"],"variable.language":["self","super"],keyword:["alias","and","attr_accessor","attr_reader","attr_writer","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","include","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield"],built_in:["proc","lambda"],literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:r},p={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},u="[0-9](_?[0-9])*",d={className:"number",relevance:0,variants:[{begin:`\\b(${"[1-9](_?[0-9])*|0"})(\\.(${u}))?([eE][+-]?(${u})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:r}]},m=[p,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/class\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:r},{relevance:0,match:[o,/\.new[ (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[p,{begin:n}],relevance:0},d,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])"+`(?![A-Za-z])(?![@$?'])`},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:r},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a,l),relevance:0}].concat(a,l);c.contains=m,h.contains=m;const f=[{begin:/^\s*=>/,starts:{end:"$",contains:m}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:r,contains:m}}];return l.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:r,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(f).concat(l).concat(m)}})),OB.registerLanguage("rust",(function(e){const t=e.regex,n={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},i="([ui](8|16|32|64|128|size)|f(32|64))?",o=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],r=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:r,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:o},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+i},{begin:"\\b0o([0-7_]+)"+i},{begin:"\\b0x([A-Fa-f0-9_]+)"+i},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+i}],relevance:0},{begin:[/fn/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,e.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:o,type:r}},{className:"punctuation",begin:"->"},n]}})),OB.registerLanguage("scss",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=DR,i=CR,o="@[a-z-]+",r={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+ER.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},r,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+OR.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,r,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:MR.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},r,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}})),OB.registerLanguage("shell",(function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}})),OB.registerLanguage("sql",(function(e){const t=e.regex,n=e.COMMENT("--","$"),i=["true","false","unknown"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],r=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],a=r,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!r.includes(e))),c={begin:t.concat(/\b/,t.either(...a),/\s*\(/),relevance:0,keywords:{built_in:a}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const i=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:i(e)?`${e}|0`:e))}(l,{when:e=>e.length<3}),literal:i,type:o,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(s),literal:i,type:o}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),OB.registerLanguage("swift",(function(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),i=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,AR(...IR,...zR)],className:{2:"keyword"}},r={match:SR(/\./,AR(...RR)),relevance:0},s=RR.filter((e=>"string"==typeof e)).concat(["_|0"]),a={variants:[{className:"keyword",match:AR(...RR.filter((e=>"string"!=typeof e)).concat(LR).map(jR),...zR)}]},l={$pattern:AR(/\b\w+/,/#\w+/),keyword:s.concat(PR),literal:FR},c=[o,r,a],p=[{match:SR(/\./,AR(...UR)),relevance:0},{className:"built_in",match:SR(/\b/,AR(...UR),/(?=\()/)}],u={match:/->/,relevance:0},d=[u,{className:"operator",relevance:0,variants:[{match:WR},{match:`\\.(\\.|${$R})+`}]}],h="([0-9]_*)+",m="([0-9a-fA-F]_*)+",f={className:"number",relevance:0,variants:[{match:`\\b(${h})(\\.(${h}))?`+`([eE][+-]?(${h}))?\\b`},{match:`\\b0x(${m})(\\.(${m}))?`+`([pP][+-]?(${h}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e="")=>({className:"subst",variants:[{match:SR(/\\/,e,/[0\\tnr"']/)},{match:SR(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),b=(e="")=>({className:"subst",match:SR(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),v=(e="")=>({className:"subst",label:"interpol",begin:SR(/\\/,e,/\(/),end:/\)/}),y=(e="")=>({begin:SR(e,/"""/),end:SR(/"""/,e),contains:[g(e),b(e),v(e)]}),x=(e="")=>({begin:SR(e,/"/),end:SR(/"/,e),contains:[g(e),v(e)]}),w={className:"string",variants:[y(),y("#"),y("##"),y("###"),x(),x("#"),x("##"),x("###")]},k={match:SR(/`/,KR,/`/)},_=[k,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${VR}+`}],E=[{match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:GR,contains:[...d,f,w]}]}},{className:"keyword",match:SR(/@/,AR(...QR))},{className:"meta",match:SR(/@/,KR)}],M={match:NR(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:SR(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,VR,"+")},{className:"type",match:YR,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:SR(/\s+&\s+/,NR(YR)),relevance:0}]},C={begin:/</,end:/>/,keywords:l,contains:[...i,...c,...E,u,M]};M.contains.push(C);const D={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:SR(KR,/\s*:/),keywords:"_|0",relevance:0},...i,...c,...p,...d,f,w,..._,...E,M]},O={begin:/</,end:/>/,contains:[...i,M]},T={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:AR(NR(SR(KR,/\s*:/)),NR(SR(KR,/\s+/,KR,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:KR}]},...i,...c,...d,f,w,...E,M,D],endsParent:!0,illegal:/["']/},N={match:[/func/,/\s+/,AR(k.match,KR,WR)],className:{1:"keyword",3:"title.function"},contains:[O,T,t],illegal:[/\[/,/%/]},S={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[O,T,t],illegal:/\[|%/},A={match:[/operator/,/\s+/,WR],className:{1:"keyword",3:"title"}},j={begin:[/precedencegroup/,/\s+/,YR],className:{1:"keyword",3:"title"},contains:[M],keywords:[...BR,...FR],end:/}/};for(const e of w.variants){const t=e.contains.find((e=>"interpol"===e.label));t.keywords=l;const n=[...c,...p,...d,f,w,..._];t.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:l,contains:[...i,N,S,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:l,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...c]},A,j,{beginKeywords:"import",end:/$/,contains:[...i],relevance:0},...c,...p,...d,f,w,..._,...E,M,D]}})),OB.registerLanguage("typescript",(function(e){const t=rF(e),n=ZR,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},r={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[t.exports.CLASS_REFERENCE]},s={$pattern:ZR,keyword:JR.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:XR,built_in:oF.concat(i),"variable.language":iF},a={className:"meta",begin:"@"+n},l=(e,t,n)=>{const i=e.contains.findIndex((e=>e.label===t));if(-1===i)throw new Error("can not find mode to replace");e.contains.splice(i,1,n)};Object.assign(t.keywords,s),t.exports.PARAMS_CONTAINS.push(a),t.contains=t.contains.concat([a,o,r]),l(t,"shebang",e.SHEBANG()),l(t,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/});const c=t.contains.find((e=>"func.def"===e.label));return c.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx"]}),t})),OB.registerLanguage("vbnet",(function(e){const t=e.regex,n=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,r=/\d{1,2}(:\d{1,2}){1,2}/,s={className:"literal",variants:[{begin:t.concat(/# */,t.either(i,n),/ *#/)},{begin:t.concat(/# */,r,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(i,n),/ +/,t.either(o,r),/ *#/)}]},a=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval "+"call case catch class compare const continue custom declare default delegate dim distinct do "+"each equals else elseif end enum erase error event exit explicit finally for friend from function "+"get global goto group handles if implements imports in inherits interface into iterator "+"join key let lib loop me mid module mustinherit mustoverride mybase myclass "+"namespace narrowing new next notinheritable notoverridable "+"of off on operator option optional order overloads overridable overrides "+"paramarray partial preserve private property protected public "+"raiseevent readonly redim removehandler resume return "+"select set shadows shared skip static step stop structure strict sub synclock "+"take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor "+"cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{className:"label",begin:/^\w+:/},a,l,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[l]}]}})),OB.registerLanguage("wasm",(function(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);return t.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"]},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},{className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/},{className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}]}})),OB.registerLanguage("xml",(function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},r=e.inherit(o,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,a,s,r,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,r,a,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),OB.registerLanguage("yaml",(function(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},o=e.inherit(i,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),r={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},s={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},a={begin:/\{/,end:/\}/,contains:[s],illegal:"\\n",relevance:0},l={begin:"\\[",end:"\\]",contains:[s],illegal:"\\n",relevance:0},c=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},r,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},a,l,i],p=[...c];return p.pop(),p.push(o),s.contains=p,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:c}}));const TB=()=>t.createElement(Tc,{"data-cy":"neeto-editor-code-block"},t.createElement("pre",null,t.createElement(Oc,{as:"code"})));var NB=QL.extend({addNodeView:()=>new Ac(TB)}).configure({lowlight:OB}),SB=cs.create({name:"paste-unformatted",addCommands:()=>({pasteUnformatted:()=>async e=>{let{editor:t}=e;const n=await navigator.clipboard.readText();t.commands.insertContent(n)}})}),AB=jI.extend({content:"root",addProseMirrorPlugins(){const{editor:e}=this;return[new Xt({key:new nn("eventHandler"),props:{handleClick(t,n){const{state:i}=t,o=i.doc.lastChild,r=i.doc.resolve(n).nodeBefore;if(o&&r){const t=o.eq(r),i=o.isInline,s=["paragraph","text"].includes(o.type.name);!t||i||s||e.commands.insertContentAt(n,{type:"paragraph",content:""})}}}})]}}),jB=ta.create({name:"external-video",addOptions:()=>({inline:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},title:{default:null},frameborder:{default:"0"},allow:{default:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"},allowfullscreen:{default:"allowfullscreen"}}),parseHTML:()=>[{tag:"iframe[src]"}],renderHTML(e){let{HTMLAttributes:t}=e;return["iframe",Wr(this.options.HTMLAttributes,{...t,class:"video-wrapper"})]},addCommands(){return{setExternalVideo:e=>t=>{let{commands:n}=t;return n.insertContent({type:this.name,attrs:e})}}}});const IB=new nn("suggestion");function zB({pluginKey:e=IB,editor:t,char:n="@",allowSpaces:i=!1,allowedPrefixes:o=[" "],startOfLine:r=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:p=(()=>({})),allow:u=(()=>!0)}){let d;const h=null==p?void 0:p(),m=new Xt({key:e,view(){return{update:async(e,n)=>{var i,o,r,s,a,p,u;const m=null===(i=this.key)||void 0===i?void 0:i.getState(n),f=null===(o=this.key)||void 0===o?void 0:o.getState(e.state),g=m.active&&f.active&&m.range.from!==f.range.from,b=!m.active&&f.active,v=m.active&&!f.active,y=b||g,x=!b&&!v&&m.query!==f.query&&!g,w=v||g;if(!y&&!x&&!w)return;const k=w&&!y?m:f,_=e.dom.querySelector(`[data-decoration-id="${k.decorationId}"]`);d={editor:t,range:k.range,query:k.query,text:k.text,items:[],command:e=>{l({editor:t,range:k.range,props:e})},decorationNode:_,clientRect:_?()=>{var n;const{decorationId:i}=null===(n=this.key)||void 0===n?void 0:n.getState(t.state),o=e.dom.querySelector(`[data-decoration-id="${i}"]`);return(null==o?void 0:o.getBoundingClientRect())||null}:null},y&&(null===(r=null==h?void 0:h.onBeforeStart)||void 0===r||r.call(h,d)),x&&(null===(s=null==h?void 0:h.onBeforeUpdate)||void 0===s||s.call(h,d)),(x||y)&&(d.items=await c({editor:t,query:k.query})),w&&(null===(a=null==h?void 0:h.onExit)||void 0===a||a.call(h,d)),x&&(null===(p=null==h?void 0:h.onUpdate)||void 0===p||p.call(h,d)),y&&(null===(u=null==h?void 0:h.onStart)||void 0===u||u.call(h,d))},destroy:()=>{var e;d&&(null===(e=null==h?void 0:h.onExit)||void 0===e||e.call(h,d))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}),apply(e,s,a,l){const{isEditable:c}=t,{composing:p}=t.view,{selection:d}=e,{empty:h,from:m}=d,f={...s};if(f.composing=p,c&&(h||t.view.composing)){!(m<s.range.from||m>s.range.to)||p||s.composing||(f.active=!1);const e=function(e){var t;const{char:n,allowSpaces:i,allowedPrefixes:o,startOfLine:r,$position:s}=e,a=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),l=new RegExp(`\\s${a}$`),c=r?"^":"",p=i?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),u=(null===(t=s.nodeBefore)||void 0===t?void 0:t.isText)&&s.nodeBefore.text;if(!u)return null;const d=s.pos-u.length,h=Array.from(u.matchAll(p)).pop();if(!h||void 0===h.input||void 0===h.index)return null;const m=h.input.slice(Math.max(0,h.index-1),h.index),f=new RegExp(`^[${null==o?void 0:o.join("")}\0]?$`).test(m);if(null!==o&&!f)return null;const g=d+h.index;let b=g+h[0].length;return i&&l.test(u.slice(b-1,b+1))&&(h[0]+=" ",b+=1),g<s.pos&&b>=s.pos?{range:{from:g,to:b},query:h[0].slice(n.length),text:h[0]}:null}({char:n,allowSpaces:i,allowedPrefixes:o,startOfLine:r,$position:d.$from}),a=`id_${Math.floor(4294967295*Math.random())}`;e&&u({editor:t,state:l,range:e.range})?(f.active=!0,f.decorationId=s.decorationId?s.decorationId:a,f.range=e.range,f.query=e.query,f.text=e.text):f.active=!1}else f.active=!1;return f.active||(f.decorationId=null,f.range={from:0,to:0},f.query=null,f.text=null),f}},props:{handleKeyDown(e,t){var n;const{active:i,range:o}=m.getState(e.state);return i&&(null===(n=null==h?void 0:h.onKeyDown)||void 0===n?void 0:n.call(h,{view:e,event:t,range:o}))||!1},decorations(e){const{active:t,range:n,decorationId:i}=m.getState(e);return t?Ho.create(e.doc,[Bo.inline(n.from,n.to,{nodeName:s,class:a,"data-decoration-id":i})]):null}}});return m}const LB=new nn("emoji-picker"),RB=ta.create({name:"emojiPicker",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({suggestion:{char:"::",startOfLine:!1,pluginKey:LB,items:()=>[],render:()=>{let e,t;return{onStart(n){e=new Nc(iw,{props:n,editor:n.editor}),t=hc("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t[0].destroy(),e.destroy()}}}}}),addProseMirrorPlugins(){return[zB({editor:this.editor,...this.options.suggestion})]}});class FB extends t.Component{constructor(){super(...arguments),If(this,"state",{isLoading:!1,selectedIndex:0,emojiSuggestions:[]}),If(this,"fetchEmojiData",(async()=>{this.setState({isLoading:!0});try{const{data:e}=await oy.get("https://cdn.jsdelivr.net/npm/@emoji-mart/data");return this.setState({isLoading:!1}),e}catch(e){return this.setState({isLoading:!1}),{}}})),If(this,"searchEmoji",(async()=>{if(this.props.query)return(await px.search(this.props.query)).slice(0,5);return(await Promise.all(["+1","-1","smile","tada","heart"].map((e=>px.search(e))))).map((e=>e[0]))})),If(this,"searchEmojiAndSetState",(async()=>{const e=await this.searchEmoji();this.setState({emojiSuggestions:e})})),If(this,"setEditorState",(async()=>{const e=await this.searchEmoji();this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e[0]).run()})),If(this,"onKeyDown",(e=>{let{event:t}=e;return"ArrowLeft"===t.key||"ArrowDown"===t.key?(this.setState((e=>{let{selectedIndex:t,emojiSuggestions:n}=e;return{selectedIndex:(t+n.length-1)%n.length}})),!0):"ArrowRight"===t.key||"ArrowUp"===t.key?(this.setState((e=>{let{selectedIndex:t,emojiSuggestions:n}=e;return{selectedIndex:(t+1)%n.length}})),!0):"Enter"===t.key?(this.selectItem(this.state.selectedIndex),!0):" "===t.key?(Up(this.props.query)?this.props.editor.chain().focus().insertContent(" ").run():this.setEditorState(),!0):"Escape"===t.key&&(this.props.editor.chain().focus().insertContent(" ").run(),!0)})),If(this,"selectItem",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(this.state.emojiSuggestions[e]).run()}))}componentDidMount(){sx({data:this.fetchEmojiData,theme:"light",previewPosition:"none"}),this.searchEmojiAndSetState()}componentDidUpdate(e){this.props.query!==e.query&&this.searchEmojiAndSetState()}render(){return t.createElement("div",{className:"neeto-editor-emoji-suggestion"},this.state.isLoading&&t.createElement(vA,null),!this.state.isLoading&&(this.state.emojiSuggestions.length>0?this.state.emojiSuggestions.map(((e,n)=>t.createElement("div",{key:e.id,onClick:()=>this.selectItem(n),className:Bc("neeto-editor-emoji-suggestion__item",{"neeto-editor-emoji-suggestion__item--selected":n===this.state.selectedIndex}),"data-cy":`neeto-editor-emoji-suggestion-${e.id}`},e.skins[0].native))):t.createElement("p",null,"No results")))}}const BB=new nn("emoji-suggestion"),PB=ta.create({name:"emojiSuggestion",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({HTMLAttributes:{class:"neeto-editor-emoji"},renderEmoji(e){let{node:t}=e;return t.attrs.label},suggestion:{}}),addAttributes:()=>({label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML:()=>[{tag:"span[data-emoji]"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",Wr({"data-emoji":""},this.options.HTMLAttributes,n),this.options.renderEmoji({node:t})]},renderText(e){let{node:t}=e;return this.options.renderEmoji({node:t})},addCommands(){return{setEmoji:e=>t=>{var n;let{chain:i}=t;i().focus().insertContent([{type:this.name,attrs:{label:(null==e?void 0:e.native)||(null==e||null===(n=e.skins[0])||void 0===n?void 0:n.native)||""}},{type:"text",text:" "}]).run()}}},addProseMirrorPlugins(){return[zB({editor:this.editor,...this.options.suggestion})]}}),UB={char:":",startOfLine:!1,pluginKey:BB,command:e=>{let{editor:t,range:n,props:i}=e;t.chain().focus().deleteRange(n).setEmoji(i).run()},items:()=>[],render:()=>{let e,t;return{onStart(n){e=new Nc(FB,{props:n,editor:n.editor}),t=hc("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"top-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t[0].destroy(),e.destroy()}}}};var HB=PB.configure({suggestion:UB});const $B=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,WB=ta.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",Wr(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[Zs({find:$B,type:this.type,getAttributes:e=>{const[,,t,n,i]=e;return{src:n,alt:t,title:i}}})]}});var qB,VB=void 0&&(void 0).__extends||(qB=function(e,t){return qB=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},qB(e,t)},function(e,t){function n(){this.constructor=e}qB(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),KB=void 0&&(void 0).__assign||function(){return KB=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},KB.apply(this,arguments)},YB={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},QB={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},GB={width:"20px",height:"20px",position:"absolute"},ZB={top:KB(KB({},YB),{top:"-5px"}),right:KB(KB({},QB),{left:void 0,right:"-5px"}),bottom:KB(KB({},YB),{top:void 0,bottom:"-5px"}),left:KB(KB({},QB),{left:"-5px"}),topRight:KB(KB({},GB),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:KB(KB({},GB),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:KB(KB({},GB),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:KB(KB({},GB),{left:"-10px",top:"-10px",cursor:"nw-resize"})},JB=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}return VB(n,t),n.prototype.render=function(){return e.createElement("div",{className:this.props.className||"",style:KB(KB({position:"absolute",userSelect:"none"},ZB[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},n}(e.PureComponent),XB=void 0&&(void 0).__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),eP=void 0&&(void 0).__assign||function(){return eP=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},eP.apply(this,arguments)},tP={width:"auto",height:"auto"},nP=function(e,t,n){return Math.max(Math.min(e,n),t)},iP=function(e,t){return Math.round(e/t)*t},oP=function(e,t){return new RegExp(e,"i").test(t)},rP=function(e){return Boolean(e.touches&&e.touches.length)},sP=function(e,t,n){void 0===n&&(n=0);var i=t.reduce((function(n,i,o){return Math.abs(i-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[i]-e);return 0===n||o<n?t[i]:e},aP=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},lP=function(e,t,n,i){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return i*(Number(e.replace("vh",""))/100)}return e},cP=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],pP="__resizable_base__",uP=function(t){function n(e){var n=t.call(this,e)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(pP):t.className+=pP,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return XB(n,t),Object.defineProperty(n.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||tP},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,i=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return aP(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?aP(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?aP(t.height):n("height")}},enumerable:!1,configurable:!0}),n.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),i},n.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},n.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},n.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},n.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},n.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},n.prototype.calculateNewMaxFromBoundary=function(e,t){var n,i,o=this.props.boundsByDirection,r=this.state.direction,s=o&&oP("left",r),a=o&&oP("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),i=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},n.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,i=this.props.resizeRatio||1,o=this.state,r=o.direction,s=o.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,p=a.lockAspectRatioExtraWidth,u=s.width,d=s.height,h=c||0,m=p||0;return oP("right",r)&&(u=s.width+(e-s.x)*i/n,l&&(d=(u-m)/this.ratio+h)),oP("left",r)&&(u=s.width-(e-s.x)*i/n,l&&(d=(u-m)/this.ratio+h)),oP("bottom",r)&&(d=s.height+(t-s.y)*i/n,l&&(u=(d-h)*this.ratio+m)),oP("top",r)&&(d=s.height-(t-s.y)*i/n,l&&(u=(d-h)*this.ratio+m)),{newWidth:u,newHeight:d}},n.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,i){var o=this.props,r=o.lockAspectRatio,s=o.lockAspectRatioExtraHeight,a=o.lockAspectRatioExtraWidth,l=void 0===i.width?10:i.width,c=void 0===n.width||n.width<0?e:n.width,p=void 0===i.height?10:i.height,u=void 0===n.height||n.height<0?t:n.height,d=s||0,h=a||0;if(r){var m=(p-d)*this.ratio+h,f=(u-d)*this.ratio+h,g=(l-h)/this.ratio+d,b=(c-h)/this.ratio+d,v=Math.max(l,m),y=Math.min(c,f),x=Math.max(p,g),w=Math.min(u,b);e=nP(e,v,y),t=nP(t,x,w)}else e=nP(e,l,c),t=nP(t,p,u);return{newWidth:e,newHeight:t}},n.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),o=i.left,r=i.top,s=i.right,a=i.bottom;this.resizableLeft=o,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},n.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,i=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&rP(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",n=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:eP(eP({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},n.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&rP(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,i=n.maxWidth,o=n.maxHeight,r=n.minWidth,s=n.minHeight,a=rP(e)?e.touches[0].clientX:e.clientX,l=rP(e)?e.touches[0].clientY:e.clientY,c=this.state,p=c.direction,u=c.original,d=c.width,h=c.height,f=this.getParentSize(),g=function(e,t,n,i,o,r,s){return i=lP(i,e.width,t,n),o=lP(o,e.height,t,n),r=lP(r,e.width,t,n),s=lP(s,e.height,t,n),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,i,o,r,s);i=g.maxWidth,o=g.maxHeight,r=g.minWidth,s=g.minHeight;var b=this.calculateNewSizeFromDirection(a,l),v=b.newHeight,y=b.newWidth,x=this.calculateNewMaxFromBoundary(i,o);this.props.snap&&this.props.snap.x&&(y=sP(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=sP(v,this.props.snap.y,this.props.snapGap));var w=this.calculateNewSizeFromAspectRatio(y,v,{width:x.maxWidth,height:x.maxHeight},{width:r,height:s});if(y=w.newWidth,v=w.newHeight,this.props.grid){var k=iP(y,this.props.grid[0]),_=iP(v,this.props.grid[1]),E=this.props.snapGap||0;y=0===E||Math.abs(k-y)<=E?k:y,v=0===E||Math.abs(_-v)<=E?_:v}var M={width:y-u.width,height:v-u.height};if(d&&"string"==typeof d)if(d.endsWith("%"))y=y/f.width*100+"%";else if(d.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(d.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))v=v/f.height*100+"%";else if(h.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}var C={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?C.flexBasis=C.width:"column"===this.flexDir&&(C.flexBasis=C.height),m((function(){t.setState(C)})),this.props.onResize&&this.props.onResize(e,p,this.resizable,M)}},n.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,i=t.direction,o=t.original;if(n&&this.resizable){var r={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:eP(eP({},this.state.backgroundStyle),{cursor:"auto"})})}},n.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},n.prototype.renderResizer=function(){var t=this,n=this.props,i=n.enable,o=n.handleStyles,r=n.handleClasses,s=n.handleWrapperStyle,a=n.handleWrapperClass,l=n.handleComponent;if(!i)return null;var c=Object.keys(i).map((function(n){return!1!==i[n]?e.createElement(JB,{key:n,direction:n,onResizeStart:t.onResizeStart,replaceStyles:o&&o[n],className:r&&r[n]},l&&l[n]?l[n]:null):null}));return e.createElement("div",{className:a,style:s},c)},n.prototype.render=function(){var t=this,n=Object.keys(this.props).reduce((function(e,n){return-1!==cP.indexOf(n)||(e[n]=t.props[n]),e}),{}),i=eP(eP(eP({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return e.createElement(o,eP({ref:this.ref,style:i,className:this.props.className},n),this.state.isResizing&&e.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},n.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},n}(e.PureComponent);const dP=e=>{let{node:n,editor:i,getPos:o}=e;const{alt:r,src:s,float:a,align:l,height:c,width:p}=n.attrs,u=r||"",{view:d}=i;return t.createElement(Tc,null,t.createElement(uP,{lockAspectRatio:!0,className:`neeto-editor__image neeto-editor__image--${a} neeto-editor__image--${l} neeto-editor__image-defaults`,size:{height:c,width:p},onResizeStop:(e,t,r)=>{d.dispatch(d.state.tr.setNodeMarkup(o(),void 0,{...n.attrs,height:r.offsetHeight,width:r.offsetWidth})),i.commands.focus()}},t.createElement("figure",null,t.createElement("img",S({alt:u,src:s},n.attrs)),t.createElement("figcaption",null,u))))},hP=WB.extend({name:"image",addAttributes:()=>({...WB.config.addAttributes(),height:{default:"auto",rendered:!1},width:{default:"fit-content",rendered:!1},float:{default:"none",rendered:!1},align:{default:"center",rendered:!1}}),addCommands(){return{setImage:e=>t=>{var n,i,o;let{tr:r,commands:s}=t;return"image"===(null===(n=r.selection)||void 0===n||null===(i=n.node)||void 0===i||null===(o=i.type)||void 0===o?void 0:o.name)?s.updateAttributes("image",e):s.insertContent({type:this.name,attrs:e})},setImageAttributes:e=>t=>{let{tr:n}=t;const{selection:i}=n,o={...i.node.attrs,...e},r=this.type.create(o);n.replaceRangeWith(i.from,i.to,r)}}},parseHTML:()=>[{tag:"img"}],renderHTML(e){let{node:t}=e;const{alt:n,src:i,float:o,align:r,height:s,width:a}=t.attrs,l=n||"";return["a",{class:`neeto-editor__image neeto-editor__image--${o} neeto-editor__image--${r} neeto-editor__image-defaults`,style:`height:${isNaN(s)?s:`${s}px`};width:${isNaN(a)?a:`${a}px`};`,href:i,target:"_blank",rel:"noopener noreferrer"},["figure",{},["img",Wr(t.attrs,{src:i,caption:l})],["figcaption",l]]]},addNodeView:()=>Ac(dP)}),mP=async(e,t)=>{const n=new hA({file:e,url:t}),{blob_url:i}=await n.create();return i};var fP=e=>{let{uploadEndpoint:t}=e;return hP.extend({addProseMirrorPlugins:()=>[new Xt({props:{handleDOMEvents:{paste(e,n){var i,o;const{schema:r,selection:{$anchor:{pos:s}}}=e.state;if(!(null===(i=n.clipboardData)||void 0===i||null===(o=i.files)||void 0===o?void 0:o.length))return;const a=Array.from(n.clipboardData.files).filter((e=>/image/i.test(e.type)));a.length&&(n.preventDefault(),a.forEach((async n=>{const i=r.nodes.image.create({src:await mP(n,t)}),o=e.state.tr.insert(s,i);e.dispatch(o)})))}}}})]})},gP=ta.create({name:"figcaption",selectable:!1,draggable:!1,parseHTML:()=>[{tag:"figcaption"}]});const bP=e=>{let{handleSubmit:t,shortcuts:n}=e;return cs.create({name:"keyboard-shortcuts",addKeyboardShortcuts(){return{"Mod-Enter":()=>(null==t||t(this.editor.getHTML()),this.editor.commands.blur(),!0),...n}}})};var vP=e=>{let{handleSubmit:t,shortcuts:n}=e;return bP({handleSubmit:t,shortcuts:n})};const yP=new nn("mention"),xP=ta.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:e,node:t}){var n;return`${e.suggestion.char}${null!==(n=t.attrs.label)&&void 0!==n?n:t.attrs.id}`},suggestion:{char:"@",pluginKey:yP,command:({editor:e,range:t,props:n})=>{var i,o;const r=e.view.state.selection.$to.nodeAfter;(null===(i=null==r?void 0:r.text)||void 0===i?void 0:i.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),null===(o=window.getSelection())||void 0===o||o.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),i=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(i)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){return["span",Wr({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e})]},renderText({node:e}){return this.options.renderLabel({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command((({tr:e,state:t})=>{let n=!1;const{selection:i}=t,{empty:o,anchor:r}=i;return!!o&&(t.doc.nodesBetween(r-1,r,((t,i)=>{if(t.type.name===this.name)return n=!0,e.insertText(this.options.suggestion.char||"",i,i+t.nodeSize),!1})),n)}))}},addProseMirrorPlugins(){return[zB({editor:this.editor,...this.options.suggestion})]}}),wP=e=>{let{wrapperRef:t,index:n}=e;if(!t.current||n>=t.current.children.length)return;const i=8,o=t.current,r=o.children[n],s=r.clientHeight+i;let a=o.scrollTop;r.offsetTop+s>a+o.clientHeight?a=r.offsetTop-o.clientHeight+s:a>r.offsetTop&&(a=r.offsetTop-i),t.current.scrollTop=a};class kP extends t.Component{constructor(e){super(e),If(this,"selectItem",(e=>{const{items:t,command:n}=this.props,i=t[e];i&&n({label:i.name,id:i.key})})),If(this,"upHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+e.length-1)%e.length}}))})),If(this,"downHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+1)%e.length}}))})),If(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),If(this,"onKeyDown",(e=>{let{event:t}=e;const n={ArrowUp:this.upHandler,ArrowDown:this.downHandler,Enter:this.enterHandler};return!!Object.prototype.hasOwnProperty.call(n,t.key)&&(n[t.key](),!0)})),this.state={selectedIndex:0},this.mentionRef=t.createRef()}componentDidUpdate(e){const{items:t}=this.props;t!==e.items&&this.setState({selectedIndex:0}),wP({wrapperRef:this.mentionRef,index:this.state.selectedIndex})}render(){const{selectedIndex:e}=this.state,{items:n}=this.props;return 0===n.length?t.createElement("div",{className:"neeto-editor-mentions__wrapper"},t.createElement("p",{className:"neeto-editor-mentions__item"},"No Results")):t.createElement("div",{ref:this.mentionRef,className:"neeto-editor-mentions__wrapper","data-cy":"neeto-editor-mention-list"},n.map(((n,i)=>{let{key:o,name:r,imageUrl:s,showImage:a}=n;return t.createElement("button",{className:Bc("neeto-editor-mentions__item",{active:i===e}),key:o,onClick:()=>this.selectItem(i),type:"button","data-cy":`neeto-editor-mention-list-${r}`},a&&t.createElement(cw,{user:{name:r,imageUrl:s}}),t.createElement("p",null,r))})))}}const _P={render:()=>{let e,t;return{onStart:n=>{e=new Nc(kP,{props:n,editor:n.editor}),t=hc("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(n){var i;return"Escape"===n.event.key?(t[0].hide(),!0):null===(i=e.ref)||void 0===i?void 0:i.onKeyDown(n)},onExit(){t[0].destroy(),e.destroy()}}}},EP=xP.extend({addCommands(){return{setMention:e=>{let{id:t,label:n}=e;return e=>{let{chain:i}=e;i().focus().insertContent([{type:this.name,attrs:{id:t,label:n}},{type:"text",text:" "}]).run()}}}}});var MP=e=>{let{suggestion:t={},...n}=e;return EP.configure({...n,suggestion:{..._P,...t}})},CP="[object Object]";var DP,OP,TP=Function.prototype,NP=Object.prototype,SP=TP.toString,AP=NP.hasOwnProperty,jP=SP.call(Object),IP=NP.toString,zP=(DP=Object.getPrototypeOf,OP=Object,function(e){return DP(OP(e))});var LP=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||IP.call(e)!=CP||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=zP(e);if(null===t)return!0;var n=AP.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&SP.call(n)==jP};const RP=e=>{const t=typeof e;return"string"===t||"funtion"===t?e:LP(e)?t=>{let{node:n}=t;const{name:i}=n.type;return e[i]}:""};var FP=cs.create({name:"placeholder",addOptions:()=>({excludeNodeTypes:["variable","codeBlock"],emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!1,includeChildren:!1}),addProseMirrorPlugins(){return[new Xt({props:{decorations:e=>{let{doc:t,selection:n}=e;const i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=n,r=[];return i?(t.descendants(((e,t)=>{const n=o>=t&&o<=t+e.nodeSize,i=!e.isLeaf&&!e.childCount,s=this.options.excludeNodeTypes.includes(e.type.name);if((n||!this.options.showOnlyCurrent)&&!s&&i){const n=[this.options.emptyNodeClass];this.editor.isEmpty&&n.push(this.options.emptyEditorClass);const i=Bo.node(t,t+e.nodeSize,{class:n.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t}):this.options.placeholder});r.push(i)}return this.options.includeChildren})),Ho.create(t,r)):null}}})]}});class BP extends t.Component{constructor(e){super(e),If(this,"keydownHandler",(e=>{const t={Enter:this.enterHandler,ArrowUp:this.upHandler,ArrowDown:this.downHandler,ArrowLeft:this.leftArrowHandler,ArrowRight:this.rightArrowHandler};e.key in t&&t[e.key](e)})),If(this,"selectItem",(e=>{const{items:t,editor:n,range:i}=this.props,o=t[e],r=o&&o.command,s=Up(o.items);r&&s&&o.command({editor:n,range:i})})),If(this,"upHandler",(()=>{const{items:e}=this.props,{selectedIndex:t}=this.state;this.setState({selectedIndex:(t+e.length-1)%e.length})})),If(this,"downHandler",(()=>{const{items:e}=this.props,{selectedIndex:t}=this.state;this.setState({selectedIndex:(t+1)%e.length})})),If(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),If(this,"leftArrowHandler",(()=>{const{menuIndex:e,setActiveMenuIndex:t}=this.props;e>0&&t(e-1)})),If(this,"rightArrowHandler",(()=>{const{menuIndex:e,setActiveMenuIndex:t,items:n}=this.props,{selectedIndex:i}=this.state,o=n[i];o&&!Up(o.items)&&t(e+1)})),this.state={selectedIndex:0},this.menuRef=t.createRef()}componentDidMount(){const{menuIndex:e,activeMenuIndex:t}=this.props;e===t&&document.addEventListener("keydown",this.keydownHandler)}componentWillUnmount(){document.removeEventListener("keydown",this.keydownHandler)}componentDidUpdate(e){const{items:t,menuIndex:n,activeMenuIndex:i}=this.props,o=n===i;t!==e.items&&this.setState({selectedIndex:0}),wP({wrapperRef:this.menuRef,index:this.state.selectedIndex}),o?document.addEventListener("keydown",this.keydownHandler):document.removeEventListener("keydown",this.keydownHandler)}render(){const{items:e,menuIndex:n,activeMenuIndex:i}=this.props,{selectedIndex:o}=this.state,r=n===i;return t.createElement("div",{ref:this.menuRef,className:"neeto-editor-slash-commands__wrapper"},e.map(((e,i)=>{const s=Up(e.items),a=t.createElement(PP,{key:e.title,item:e,index:i,selectedIndex:r?o:-1,selectItem:()=>s&&this.selectItem(i),onHover:()=>this.setState({selectedIndex:i})});return s?a:t.createElement(Jm,{key:e.title,interactive:!0,placement:"right",content:t.createElement(BP,S({},this.props,{items:e.items,menuIndex:n+1})),onCreate:e=>{let{popper:t}=e;return t.style.width="max-content"},visible:o===i,onShow:()=>{this.isSubmenuOpened=!0},onHide:()=>{this.isSubmenuOpened=!1}},a)})))}}const PP=u(((e,n)=>{let{item:i,selectedIndex:o,index:r,selectItem:s,onHover:a}=e;const{Icon:l}=i;return t.createElement("div",{className:Bc("neeto-editor-slash-commands__item",{active:r===o}),onClick:s,ref:n,"data-cy":`neeto-editor-command-list-item-${r}`,onMouseEnter:a},l&&t.createElement(l,{size:20}),t.createElement("div",{className:"neeto-editor-slash-commands__item-content"},t.createElement("h5",null,i.title),t.createElement("p",null,i.description)))}));class UP extends t.Component{constructor(){super(...arguments),If(this,"state",{activeMenuIndex:0}),If(this,"onKeyDown",(e=>{let{event:t}=e;return["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key)})),If(this,"setActiveMenuIndex",(e=>this.setState({activeMenuIndex:e})))}render(){return t.createElement(BP,S({},this.props,{menuIndex:0,activeMenuIndex:this.state.activeMenuIndex,setActiveMenuIndex:this.setActiveMenuIndex}))}}const HP={PARAGRAPH:{optionName:Gp.PARAGRAPH,title:"Paragraph",description:"Add a plain text block.",Icon:kh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("paragraph").run()}},H1:{optionName:Gp.H1,title:"H1",description:"Add a big heading.",Icon:Ih,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:1}).run()}},H2:{optionName:Gp.H2,title:"H2",description:"Add a sub-heading.",Icon:Lh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:2}).run()}},H3:{optionName:Gp.H3,title:"H3",description:"Add a sub-heading of level 3.",Icon:Ph,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:3}).run()}},H4:{optionName:Gp.H4,title:"H4",description:"Add a sub-heading of level 4.",Icon:Ph,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:4}).run()}},H5:{optionName:Gp.H5,title:"H5",description:"Add a sub-heading of level 5.",Icon:Ph,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:5}).run()}},H6:{optionName:Gp.H6,title:"H6",description:"Add a sub-heading of level 6.",Icon:Ph,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:6}).run()}},LIST_ORDERED:{optionName:Gp.LIST_ORDERED,title:"Numbered list",description:"Add a list with numbering.",Icon:gh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleOrderedList().run()}},LIST_BULLETS:{optionName:Gp.LIST_BULLETS,title:"Bulleted list",description:"Add a list with bullets.",Icon:mh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleBulletList().run()}},BLOCKQUOTE:{optionName:Gp.BLOCKQUOTE,title:"Blockquote",description:"Add a quote.",Icon:Hd,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleBlockquote().run()}},IMAGE:{optionName:Gp.IMAGE_UPLOAD,title:"Image",description:"Add an image.",Icon:sh,command:e=>{let{editor:t,range:n}=e;return t.chain().focus().deleteRange(n).run()}},CODE:{optionName:Gp.CODE_BLOCK,title:"Code block",description:"Add a code block with syntax highlighting.",Icon:Gd,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleCodeBlock().run()}},EMOJI:{optionName:Gp.EMOJI,title:"Emoji",description:"Add an emoji.",Icon:Oh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).insertContent("::").run()}},DIVIDER:{optionName:Gp.DIVIDER,title:"Divider",description:"Add an horizontal line to separate sections.",Icon:vh,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setHorizontalRule().run()}},VIDEO:{optionName:Gp.VIDEO_EMBED,title:"Embed Youtube/Loom/Vimeo",description:"Embed a video from major services.",Icon:Vh,command:e=>{let{editor:t,range:n}=e;const i=prompt("Please enter Youtube/Loom/Vimeo embed URL."),o=(e=>{const t=e.match(hf);return t&&`https://www.youtube.com/embed/${t[5]}`})(i)||(e=>{const t=e.match(ff);return t&&`https://www.loom.com/embed/${t[4]}?t=${t[5]||""}`})(i)||(e=>{const t=e.match(mf);return t&&`https://player.vimeo.com/video/${t[4]}?h=${t[5]}`})(i);o?t.chain().focus().deleteRange(n).setExternalVideo({src:o}).run():t.chain().focus().deleteRange(n).insertContent("#invalid").run()}},PASTE_UNFORMATTED:{optionName:Gp.PASTE_UNFORMATTED,title:"Paste Unformatted",description:"Paste by removing all styles.",Icon:xh,command:e=>{let{editor:t,range:n}=e;return t.chain().focus().deleteRange(n).pasteUnformatted().run()}},NO_RESULT:{title:"No results",command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).run()}}},$P=new nn("commands");var WP=e=>{let{setImageUploadVisible:t,addonCommands:n,options:i}=e,o=[HP.PARAGRAPH,HP.H1,HP.H2,HP.H3,HP.H4,HP.H5,HP.H6,HP.LIST_ORDERED,HP.LIST_BULLETS,HP.BLOCKQUOTE,{...HP.IMAGE,command:function(){t(!0),HP.IMAGE.command(...arguments)}},HP.CODE,HP.EMOJI,HP.DIVIDER,HP.VIDEO,HP.PASTE_UNFORMATTED];return Up(i)||(o=o.filter((e=>{let{optionName:t}=e;return i.includes(t)}))),Up(n)||(o=o.concat(n)),cs.create({name:"slash-commands",addOptions:()=>({HTMLAttributes:{class:"commands"},suggestion:{char:"/",startOfLine:!1,pluginKey:$P,command:e=>{let{editor:t,range:n,props:i}=e;i.command({editor:t,range:n})},items:e=>{let{query:t}=e;const n=o.filter((e=>{let{title:n}=e;return n.toLowerCase().includes(t.toLowerCase())}));return Up(n)?[HP.NO_RESULT]:n},render:()=>{let e,t;return{onStart:n=>{e=new Nc(UP,{props:n,editor:n.editor}),t=hc("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",arrow:!1,zIndex:99999,role:"dropdown",theme:"neeto-editor-slash-menu"}),xf()},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t&&t[0].destroy(),e&&e.destroy(),wf()}}}}}),addProseMirrorPlugins(){return[zB({editor:this.editor,...this.options.suggestion})]}})},qP=VI.extend({name:"title",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML:()=>[{tag:`h1`}],renderHTML(e){let{_node:t,HTMLAttributes:n}=e;return[`h1`,Wr(this.options.HTMLAttributes,n),0]}});const VP=e=>{let{items:n,command:i}=e;return t.createElement("div",{className:"neeto-editor-variables-suggestion"},t.createElement(vw,{variables:n,onClickVariable:e=>{const{category_key:t,key:n}=e,o=t?`${t}.${n}`:n;i({label:o,id:o})}}))},KP=new nn("variables"),YP=ta.create({name:"variable",addOptions:()=>({HTMLAttributes:{class:"neeto-editor-variable"},charOpen:"{{",charClose:"}}",renderLabel(e){let{options:t,node:n}=e;return`${t.charOpen}${n.attrs.label||n.attrs.id}${t.charClose}`},suggestion:{}}),group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML:()=>[{tag:"span[data-variable]"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",Wr({"data-variable":""},this.options.HTMLAttributes,n),this.options.renderLabel({options:this.options,node:t})]},renderText(e){let{node:t}=e;return this.options.renderLabel({options:this.options,node:t})},addCommands(){return{setVariable:e=>t=>{let{chain:n}=t;n().focus().insertContent([{type:this.name,attrs:e},{type:"text",text:" "}]).run()}}},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command((e=>{let{tr:t,state:n}=e,i=!1;const{selection:o}=n,{empty:r,anchor:s}=o;return!!r&&(n.doc.nodesBetween(s-1,s,((e,n)=>{if(e.type.name===this.name)return i=!0,t.insertText("",n,n+e.nodeSize),!1})),i)}))}},addProseMirrorPlugins(){return[zB({editor:this.editor,...this.options.suggestion})]}}),QP={char:"{{",startOfLine:!1,pluginKey:KP,command:e=>{let{editor:t,range:n,props:i}=e;t.chain().focus().deleteRange(n).setVariable(i).run()},items:()=>[],render:()=>{let e,t;return{onStart:n=>{e=new Nc(VP,{props:n,editor:n.editor}),t=hc("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onExit(){t[0].destroy(),e.destroy()}}}};var GP=e=>{let{suggestion:t={}}=e;return YP.configure({suggestion:{...QP,...t}})};const ZP=(e,t)=>{const n=[];e.split(/\n/).forEach((e=>{const i={type:"paragraph"};e.length>0&&(i.content=[{type:"text",text:e}]);const o=re.fromJSON(t.doc.type.schema,i);n.push(o)}));const i=z.fromArray(n);return U.maxOpen(i)},JP=(e,n)=>{let{forceTitle:i=!1,titleError:s=!1,hideSlashCommands:a=!1,defaults:l=eu,addons:c=[],addonCommands:p,className:u,uploadEndpoint:d=Jp,uploadConfig:h={},initialValue:m="",onChange:f=(()=>{}),onFocus:g=(()=>{}),onBlur:b=(()=>{}),menuType:v="fixed",variables:y,mentions:x,showImageInMention:w=!1,placeholder:k=(i?{title:"Untitled"}:null),extensions:_,contentClassName:E,characterLimit:M,editorSecrets:C,rows:D=6,autoFocus:O=!1,onSubmit:T,heightStrategy:N="fixed",characterCountStrategy:A="hidden",keyboardShortcuts:j=[],error:I=null,...z}=e;const[L,R]=o(!1),F="fixed"===v,B="bubble"===v,P=!a,U=(e=>{if(e){if("string"==typeof e&&e.length)return!0;if("object"==typeof e&&Object.keys(e).length)return!0;if("function"==typeof e)return!0}return!1})(k),H=!U&&P,$=c.includes("image-upload-unsplash"),W="hidden"!==A,q=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],{includeImageUpload:n}=arguments.length>2?arguments[2]:void 0;const i=t.map((e=>e.toLowerCase()));return n&&i.push(Gp.IMAGE_UPLOAD),[].concat(e,i)}(l,c,{includeImageUpload:$}),V=(e=>{let{forceTitle:t,placeholder:n,extensions:i,mentions:o,variables:r,isSlashCommandsActive:s,showImageInMention:a,setImageUploadVisible:l,options:c,addonCommands:p,characterLimit:u,onSubmit:d,keyboardShortcuts:h,uploadEndpoint:m}=e,f=[qP,AB.extend({content:t?"title block*":"block+"}),Tz.configure({document:!1,codeBlock:!1,code:!1}),qA,xI,QA,NB,fP({uploadEndpoint:m}),gP,jB,yI,VA.configure({mode:"shallowest"}),FP.configure({placeholder:RP(n)}),HB,RB,SB,HA.configure({limit:u}),vP({handleSubmit:d,shortcuts:h})];return s&&f.push(WP({setImageUploadVisible:l,options:c,addonCommands:p})),Up(o)||f.push(MP({suggestion:{items:gw(o,a)}})),Up(r)||f.push(GP({suggestion:{items:()=>r}})),Up(i)||(f=f.concat(i)),f})({contentClassName:E,forceTitle:i,placeholder:k,extensions:_,mentions:x,variables:y,isSlashCommandsActive:P,showImageInMention:w,setImageUploadVisible:R,options:q,addonCommands:p,characterLimit:M,keyboardShortcuts:j,onSubmit:T,uploadEndpoint:d});cr.prototype.updateState=function(e){this.docView&&this.updateStateInner(e,this.state.plugins!==e.plugins)};const K=Bc("neeto-editor",{"slash-active":H,"fixed-menu-active border":F,"bubble-menu-active":B,"force-title":i,"force-title--error":s,"placeholder-active":U,[u]:u}),Y=(e=>{let{heightStrategy:t,rows:n}=e;const i={},o=n*Yp+2*(Vp+Kp);return"flexible"===t?i["min-height"]=`${o}px`:i.height=`${o}px`,i})({heightStrategy:N,rows:D}),Q=jc({extensions:V,content:m,injectCSS:!1,autofocus:O&&"end",editorProps:{attributes:{class:K,style:Pp(Y)},clipboardTextParser:ZP},parseOptions:{preserveWhitespace:!0},onCreate:e=>{let{editor:t}=e;return!O&&(e=>{const{state:t,view:n}=e,i=St.atEnd(t.doc),o=t.tr;o.setSelection(i),n.dispatch(o)})(t)},onUpdate:e=>{let{editor:t}=e;return setTimeout((()=>f(t.getHTML())),0)},onFocus:g,onBlur:b});return t.useImperativeHandle(n,(()=>({editor:Q}))),r((()=>{![process.env.RAILS_ENV,"production"].includes("production")&&Up(m)&&console.warn(`[neeto-editor]: Empty value of "initialValue" in needtoEditor is expected to be "<p></p>" instead of "${m}".`)}),[m]),t.createElement(Wp,{error:I,isFixedMenuActive:F},F&&t.createElement(ww,{editor:Q,variables:y,setImageUploadVisible:R,options:q,mentions:x,showImageInMention:w}),B&&t.createElement(vf,{editor:Q,options:q}),t.createElement(UA,{isVisible:L,setIsVisible:R,editor:Q,imageUploadUrl:d,uploadConfig:h,isUnsplashImageUploadActive:$,unsplashApiKey:null==C?void 0:C.unsplash}),t.createElement(Mc,S({editor:Q},z)),W&&t.createElement(yf,{count:null==Q?void 0:Q.storage.characterCount.characters(),limit:M,strategy:A}))};var XP=t.forwardRef(JP);
61
61
  /*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */function eU(e){return eU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eU(e)}function tU(e,t){return tU=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},tU(e,t)}function nU(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function iU(e,t,n){return iU=nU()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&tU(o,n.prototype),o},iU.apply(null,arguments)}function oU(e){return function(e){if(Array.isArray(e))return rU(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return rU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rU(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var sU=Object.hasOwnProperty,aU=Object.setPrototypeOf,lU=Object.isFrozen,cU=Object.getPrototypeOf,pU=Object.getOwnPropertyDescriptor,uU=Object.freeze,dU=Object.seal,hU=Object.create,mU="undefined"!=typeof Reflect&&Reflect,fU=mU.apply,gU=mU.construct;fU||(fU=function(e,t,n){return e.apply(t,n)}),uU||(uU=function(e){return e}),dU||(dU=function(e){return e}),gU||(gU=function(e,t){return iU(e,oU(t))});var bU=DU(Array.prototype.forEach),vU=DU(Array.prototype.pop),yU=DU(Array.prototype.push),xU=DU(String.prototype.toLowerCase),wU=DU(String.prototype.match),kU=DU(String.prototype.replace),_U=DU(String.prototype.indexOf),EU=DU(String.prototype.trim),MU=DU(RegExp.prototype.test),CU=function(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return gU(e,n)}}(TypeError);function DU(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return fU(e,t,i)}}function OU(e,t,n){n=n||xU,aU&&aU(e,null);for(var i=t.length;i--;){var o=t[i];if("string"==typeof o){var r=n(o);r!==o&&(lU(t)||(t[i]=r),o=r)}e[o]=!0}return e}function TU(e){var t,n=hU(null);for(t in e)fU(sU,e,[t])&&(n[t]=e[t]);return n}function NU(e,t){for(;null!==e;){var n=pU(e,t);if(n){if(n.get)return DU(n.get);if("function"==typeof n.value)return DU(n.value)}e=cU(e)}return function(e){return console.warn("fallback value for",e),null}}var SU=uU(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),AU=uU(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),jU=uU(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),IU=uU(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),zU=uU(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),LU=uU(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),RU=uU(["#text"]),FU=uU(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),BU=uU(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),PU=uU(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),UU=uU(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),HU=dU(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$U=dU(/<%[\w\W]*|[\w\W]*%>/gm),WU=dU(/^data-[\-\w.\u00B7-\uFFFF]/),qU=dU(/^aria-[\-\w]+$/),VU=dU(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),KU=dU(/^(?:\w+script|data):/i),YU=dU(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),QU=dU(/^html$/i),GU=function(){return"undefined"==typeof window?null:window},ZU=function(e,t){if("object"!==eU(e)||"function"!=typeof e.createPolicy)return null;var n=null,i="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(i)&&(n=t.currentScript.getAttribute(i));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};var JU=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:GU(),n=function(t){return e(t)};if(n.version="2.4.0",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var i=t.document,o=t.document,r=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,l=t.Element,c=t.NodeFilter,p=t.NamedNodeMap,u=void 0===p?t.NamedNodeMap||t.MozNamedAttrMap:p,d=t.HTMLFormElement,h=t.DOMParser,m=t.trustedTypes,f=l.prototype,g=NU(f,"cloneNode"),b=NU(f,"nextSibling"),v=NU(f,"childNodes"),y=NU(f,"parentNode");if("function"==typeof s){var x=o.createElement("template");x.content&&x.content.ownerDocument&&(o=x.content.ownerDocument)}var w=ZU(m,i),k=w?w.createHTML(""):"",_=o,E=_.implementation,M=_.createNodeIterator,C=_.createDocumentFragment,D=_.getElementsByTagName,O=i.importNode,T={};try{T=TU(o).documentMode?o.documentMode:{}}catch(e){}var N={};n.isSupported="function"==typeof y&&E&&void 0!==E.createHTMLDocument&&9!==T;var S,A,j=HU,I=$U,z=WU,L=qU,R=KU,F=YU,B=VU,P=null,U=OU({},[].concat(oU(SU),oU(AU),oU(jU),oU(zU),oU(RU))),H=null,$=OU({},[].concat(oU(FU),oU(BU),oU(PU),oU(UU))),W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,V=null,K=!0,Y=!0,Q=!1,G=!1,Z=!1,J=!1,X=!1,ee=!1,te=!1,ne=!1,ie=!0,oe=!1,re="user-content-",se=!0,ae=!1,le={},ce=null,pe=OU({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ue=null,de=OU({},["audio","video","img","source","image","track"]),he=null,me=OU({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml",ve=be,ye=!1,xe=["application/xhtml+xml","text/html"],we="text/html",ke=null,_e=o.createElement("form"),Ee=function(e){return e instanceof RegExp||e instanceof Function},Me=function(e){ke&&ke===e||(e&&"object"===eU(e)||(e={}),e=TU(e),S=S=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?we:e.PARSER_MEDIA_TYPE,A="application/xhtml+xml"===S?function(e){return e}:xU,P="ALLOWED_TAGS"in e?OU({},e.ALLOWED_TAGS,A):U,H="ALLOWED_ATTR"in e?OU({},e.ALLOWED_ATTR,A):$,he="ADD_URI_SAFE_ATTR"in e?OU(TU(me),e.ADD_URI_SAFE_ATTR,A):me,ue="ADD_DATA_URI_TAGS"in e?OU(TU(de),e.ADD_DATA_URI_TAGS,A):de,ce="FORBID_CONTENTS"in e?OU({},e.FORBID_CONTENTS,A):pe,q="FORBID_TAGS"in e?OU({},e.FORBID_TAGS,A):{},V="FORBID_ATTR"in e?OU({},e.FORBID_ATTR,A):{},le="USE_PROFILES"in e&&e.USE_PROFILES,K=!1!==e.ALLOW_ARIA_ATTR,Y=!1!==e.ALLOW_DATA_ATTR,Q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=e.SAFE_FOR_TEMPLATES||!1,Z=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,X=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,se=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,B=e.ALLOWED_URI_REGEXP||B,ve=e.NAMESPACE||be,e.CUSTOM_ELEMENT_HANDLING&&Ee(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ee(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(W.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),G&&(Y=!1),te&&(ee=!0),le&&(P=OU({},oU(RU)),H=[],!0===le.html&&(OU(P,SU),OU(H,FU)),!0===le.svg&&(OU(P,AU),OU(H,BU),OU(H,UU)),!0===le.svgFilters&&(OU(P,jU),OU(H,BU),OU(H,UU)),!0===le.mathMl&&(OU(P,zU),OU(H,PU),OU(H,UU))),e.ADD_TAGS&&(P===U&&(P=TU(P)),OU(P,e.ADD_TAGS,A)),e.ADD_ATTR&&(H===$&&(H=TU(H)),OU(H,e.ADD_ATTR,A)),e.ADD_URI_SAFE_ATTR&&OU(he,e.ADD_URI_SAFE_ATTR,A),e.FORBID_CONTENTS&&(ce===pe&&(ce=TU(ce)),OU(ce,e.FORBID_CONTENTS,A)),se&&(P["#text"]=!0),Z&&OU(P,["html","head","body"]),P.table&&(OU(P,["tbody"]),delete q.tbody),uU&&uU(e),ke=e)},Ce=OU({},["mi","mo","mn","ms","mtext"]),De=OU({},["foreignobject","desc","title","annotation-xml"]),Oe=OU({},["title","style","font","a","script"]),Te=OU({},AU);OU(Te,jU),OU(Te,IU);var Ne=OU({},zU);OU(Ne,LU);var Se=function(e){var t=y(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});var n=xU(e.tagName),i=xU(t.tagName);return e.namespaceURI===ge?t.namespaceURI===be?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===i||Ce[i]):Boolean(Te[n]):e.namespaceURI===fe?t.namespaceURI===be?"math"===n:t.namespaceURI===ge?"math"===n&&De[i]:Boolean(Ne[n]):e.namespaceURI===be&&(!(t.namespaceURI===ge&&!De[i])&&(!(t.namespaceURI===fe&&!Ce[i])&&(!Ne[n]&&(Oe[n]||!Te[n]))))},Ae=function(e){yU(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=k}catch(t){e.remove()}}},je=function(e,t){try{yU(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){yU(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!H[e])if(ee||te)try{Ae(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Ie=function(e){var t,n;if(X)e="<remove></remove>"+e;else{var i=wU(e,/^[\r\n\t ]+/);n=i&&i[0]}"application/xhtml+xml"===S&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var r=w?w.createHTML(e):e;if(ve===be)try{t=(new h).parseFromString(r,S)}catch(e){}if(!t||!t.documentElement){t=E.createDocument(ve,"template",null);try{t.documentElement.innerHTML=ye?"":r}catch(e){}}var s=t.body||t.documentElement;return e&&n&&s.insertBefore(o.createTextNode(n),s.childNodes[0]||null),ve===be?D.call(t,Z?"html":"body")[0]:Z?t.documentElement:s},ze=function(e){return M.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},Le=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof u)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},Re=function(e){return"object"===eU(a)?e instanceof a:e&&"object"===eU(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Fe=function(e,t,i){N[e]&&bU(N[e],(function(e){e.call(n,t,i,ke)}))},Be=function(e){var t;if(Fe("beforeSanitizeElements",e,null),Le(e))return Ae(e),!0;if(MU(/[\u0080-\uFFFF]/,e.nodeName))return Ae(e),!0;var i=A(e.nodeName);if(Fe("uponSanitizeElement",e,{tagName:i,allowedTags:P}),e.hasChildNodes()&&!Re(e.firstElementChild)&&(!Re(e.content)||!Re(e.content.firstElementChild))&&MU(/<[/\w]/g,e.innerHTML)&&MU(/<[/\w]/g,e.textContent))return Ae(e),!0;if("select"===i&&MU(/<template/i,e.innerHTML))return Ae(e),!0;if(!P[i]||q[i]){if(!q[i]&&Ue(i)){if(W.tagNameCheck instanceof RegExp&&MU(W.tagNameCheck,i))return!1;if(W.tagNameCheck instanceof Function&&W.tagNameCheck(i))return!1}if(se&&!ce[i]){var o=y(e)||e.parentNode,r=v(e)||e.childNodes;if(r&&o)for(var s=r.length-1;s>=0;--s)o.insertBefore(g(r[s],!0),b(e))}return Ae(e),!0}return e instanceof l&&!Se(e)?(Ae(e),!0):"noscript"!==i&&"noembed"!==i||!MU(/<\/no(script|embed)/i,e.innerHTML)?(G&&3===e.nodeType&&(t=e.textContent,t=kU(t,j," "),t=kU(t,I," "),e.textContent!==t&&(yU(n.removed,{element:e.cloneNode()}),e.textContent=t)),Fe("afterSanitizeElements",e,null),!1):(Ae(e),!0)},Pe=function(e,t,n){if(ie&&("id"===t||"name"===t)&&(n in o||n in _e))return!1;if(Y&&!V[t]&&MU(z,t));else if(K&&MU(L,t));else if(!H[t]||V[t]){if(!(Ue(e)&&(W.tagNameCheck instanceof RegExp&&MU(W.tagNameCheck,e)||W.tagNameCheck instanceof Function&&W.tagNameCheck(e))&&(W.attributeNameCheck instanceof RegExp&&MU(W.attributeNameCheck,t)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(t))||"is"===t&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&MU(W.tagNameCheck,n)||W.tagNameCheck instanceof Function&&W.tagNameCheck(n))))return!1}else if(he[t]);else if(MU(B,kU(n,F,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==_U(n,"data:")||!ue[e]){if(Q&&!MU(R,kU(n,F,"")));else if(n)return!1}else;return!0},Ue=function(e){return e.indexOf("-")>0},He=function(e){var t,i,o,r;Fe("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(r=s.length;r--;){var l=t=s[r],c=l.name,p=l.namespaceURI;if(i="value"===c?t.value:EU(t.value),o=A(c),a.attrName=o,a.attrValue=i,a.keepAttr=!0,a.forceKeepAttr=void 0,Fe("uponSanitizeAttribute",e,a),i=a.attrValue,!a.forceKeepAttr&&(je(c,e),a.keepAttr))if(MU(/\/>/i,i))je(c,e);else{G&&(i=kU(i,j," "),i=kU(i,I," "));var u=A(e.nodeName);if(Pe(u,o,i)){if(!oe||"id"!==o&&"name"!==o||(je(c,e),i=re+i),w&&"object"===eU(m)&&"function"==typeof m.getAttributeType)if(p);else switch(m.getAttributeType(u,o)){case"TrustedHTML":i=w.createHTML(i);break;case"TrustedScriptURL":i=w.createScriptURL(i)}try{p?e.setAttributeNS(p,c,i):e.setAttribute(c,i),vU(n.removed)}catch(e){}}}}Fe("afterSanitizeAttributes",e,null)}},$e=function e(t){var n,i=ze(t);for(Fe("beforeSanitizeShadowDOM",t,null);n=i.nextNode();)Fe("uponSanitizeShadowNode",n,null),Be(n)||(n.content instanceof r&&e(n.content),He(n));Fe("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){var o,s,l,c,p,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((ye=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Re(e)){if("function"!=typeof e.toString)throw CU("toString is not a function");if("string"!=typeof(e=e.toString()))throw CU("dirty is not a string, aborting")}if(!n.isSupported){if("object"===eU(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(Re(e))return t.toStaticHTML(e.outerHTML)}return e}if(J||Me(u),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){var d=A(e.nodeName);if(!P[d]||q[d])throw CU("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof a)1===(s=(o=Ie("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?o=s:o.appendChild(s);else{if(!ee&&!G&&!Z&&-1===e.indexOf("<"))return w&&ne?w.createHTML(e):e;if(!(o=Ie(e)))return ee?null:ne?k:""}o&&X&&Ae(o.firstChild);for(var h=ze(ae?e:o);l=h.nextNode();)3===l.nodeType&&l===c||Be(l)||(l.content instanceof r&&$e(l.content),He(l),c=l);if(c=null,ae)return e;if(ee){if(te)for(p=C.call(o.ownerDocument);o.firstChild;)p.appendChild(o.firstChild);else p=o;return H.shadowroot&&(p=O.call(i,p,!0)),p}var m=Z?o.outerHTML:o.innerHTML;return Z&&P["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&MU(QU,o.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+m),G&&(m=kU(m,j," "),m=kU(m,I," ")),w&&ne?w.createHTML(m):m},n.setConfig=function(e){Me(e),J=!0},n.clearConfig=function(){ke=null,J=!1},n.isValidAttribute=function(e,t,n){ke||Me({});var i=A(e),o=A(t);return Pe(i,o,n)},n.addHook=function(e,t){"function"==typeof t&&(N[e]=N[e]||[],yU(N[e],t))},n.removeHook=function(e){if(N[e])return vU(N[e])},n.removeHooks=function(e){N[e]&&(N[e]=[])},n.removeAllHooks=function(){N={}},n}();const XU=e=>{if(e.tagName){const n=e.children?e.children.map(XU):null;return t.createElement(e.tagName,e.properties,n)}return e.value},eH=e=>{let{content:n="",className:i,...o}=e;const r=(e=>e.replace(Xp,((e,t)=>{const n=OB.highlightAuto(t.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")).children.map(XU);return`<pre><code>${D(n)}</code></pre>`})))(n),s=JU.sanitize;return t.createElement("div",S({className:Bc(qp,{[i]:i}),dangerouslySetInnerHTML:{__html:s(r,{ADD_TAGS:["iframe"],ADD_ATTR:["target","allow","allowfullscreen","frameborder"]})},"data-cy":"neeto-editor-content"},o))};export{Gp as EDITOR_OPTIONS,XP as Editor,eH as EditorContent};