%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/nextcloud.varak.net/apps_old/apps/text/js/
Upload File :
Create Path :
Current File : //www/varak.net/nextcloud.varak.net/apps_old/apps/text/js/RichText-CQWfHvOo.chunk.mjs

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('text', '', 'js/index-Kg2hZgGF-BBMzTcB6.chunk.mjs'),window.OC.filePath('text', '', 'js/modulepreload-polyfill-DMTabKmO.chunk.mjs'),window.OC.filePath('text', '', 'js/emoji-picker-SoWZqoso.chunk.mjs'),window.OC.filePath('text', '', 'js/vue.runtime.esm-fZsuJKoo.chunk.mjs'),window.OC.filePath('text', '', 'js/mermaid.core-ChD64xgE.chunk.mjs')])))=>i.map(i=>d[i]);
/*! third party licenses: js/vendor.LICENSE.txt */
var Iv=Object.defineProperty;var kp=e=>{throw TypeError(e)};var Rv=(e,r,n)=>r in e?Iv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var wp=(e,r,n)=>Rv(e,typeof r!="symbol"?r+"":r,n),Ap=(e,r,n)=>r.has(e)||kp("Cannot "+n);var yo=(e,r,n)=>(Ap(e,r,"read from private field"),n?n.call(e):r.get(e)),Mu=(e,r,n)=>r.has(e)?kp("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,n),Fu=(e,r,n,i)=>(Ap(e,r,"write to private field"),i?i.call(e,n):r.set(e,n),n);import{j as zv,u as $v,k as Hv,L as Pv,n as j,b as ni,l as Z1,m as Vv,o as jv,t as Li,p as qv,q as Uv,r as Wv,s as G1,v as Kv,w as J1,x as Zv,y as _p,z as X1,B as Gv,D as Jv}from"./_plugin-vue2_normalizer-XF5BqDH-.chunk.mjs";import{n as _s,G as Xv,d as Qv,N as Wl,a as ii,c as Q1,b as Yv}from"./public-CBtR8U5E.chunk.mjs";import{_ as Y1,p as Bn,e as eg,g as ek}from"./modulepreload-polyfill-DMTabKmO.chunk.mjs";import{B as qd,a as tg,_ as Ud}from"./index-WINsn-uD.chunk.mjs";import{s as Hc,t as tk,m as rk,a as nk}from"./index-hXSjL27_.chunk.mjs";import{u as rg,p as ik,e as ok,f as sk,o as ak,q as lk,r as uk,s as ck,h as dk}from"./MediaHandler.provider-CSBQhvYP.chunk.mjs";import{V as Gn,j as hk,v as pk,g as Ep}from"./vue.runtime.esm-fZsuJKoo.chunk.mjs";import{a as fk,c as un,g as Dr}from"./emoji-picker-SoWZqoso.chunk.mjs";import{p as mk,t as pi,n as gk,a as bk,s as ng}from"./_plugin-vue2_normalizer-CQ6iBklL-DSXPAugt.chunk.mjs";import{l as ig}from"./index-Ubm2itxG.chunk.mjs";const yk=(e,r,n=()=>{})=>{const i=document.createElement("div");(document.querySelector(r==null?void 0:r.container)||document.body).appendChild(i);const o=new Gn({el:i,name:"VueDialogHelper",render:s=>s(e,{props:r,on:{close:(...a)=>{n(...a.map(l=>hk(l))),o.$destroy()}}})});return o},Ck='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-move" viewBox="0 0 24 24"><path d="M14,18V15H10V11H14V8L19,13M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z" /></svg>',vk='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-multiple" viewBox="0 0 24 24"><path d="M22,4H14L12,2H6A2,2 0 0,0 4,4V16A2,2 0 0,0 6,18H22A2,2 0 0,0 24,16V6A2,2 0 0,0 22,4M2,6H0V11H0V20A2,2 0 0,0 2,22H20V20H2V6Z" /></svg>';var kk=Object.defineProperty,wk=(e,r,n)=>r in e?kk(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,Qe=(e,r,n)=>wk(e,typeof r!="symbol"?r+"":r,n),og=(e=>(e[e.Choose=1]="Choose",e[e.Move=2]="Move",e[e.Copy=3]="Copy",e[e.CopyMove=4]="CopyMove",e[e.Custom=5]="Custom",e))(og||{});class Ak extends Error{}class _k{constructor(r,n,i,o,s,a,l,u,c=!1){Qe(this,"title"),Qe(this,"multiSelect"),Qe(this,"mimeTypeFilter"),Qe(this,"directoriesAllowed"),Qe(this,"buttons"),Qe(this,"path"),Qe(this,"filter"),Qe(this,"container"),Qe(this,"disabledNavigation"),this.title=r,this.multiSelect=n,this.mimeTypeFilter=i,this.directoriesAllowed=o,this.path=a,this.filter=l,this.buttons=s,this.container=u,this.disabledNavigation=c}async pick(){const{FilePickerVue:r}=await Y1(async()=>{const{FilePickerVue:n}=await import("./index-Kg2hZgGF-BBMzTcB6.chunk.mjs");return{FilePickerVue:n}},__vite__mapDeps([0,1,2,3]),import.meta.url);return new Promise((n,i)=>{yk(r,{allowPickDirectory:this.directoriesAllowed,buttons:this.buttons,container:this.container,name:this.title,path:this.path,mimetypeFilter:this.mimeTypeFilter,multiselect:this.multiSelect,filterFn:this.filter,disabledNavigation:this.disabledNavigation},(...o)=>{var s;const[a]=o;!Array.isArray(a)||a.length===0?i(new Ak("FilePicker: No nodes selected")):this.multiSelect?n(a.map(l=>l.path)):n(((s=a[0])==null?void 0:s.path)||"/")})})}}class Ek{constructor(r){Qe(this,"title"),Qe(this,"multiSelect",!1),Qe(this,"mimeTypeFilter",[]),Qe(this,"directoriesAllowed",!1),Qe(this,"path"),Qe(this,"filter"),Qe(this,"buttons",[]),Qe(this,"container"),Qe(this,"disabledNavigation",!1),this.title=r}setContainer(r){return this.container=r,this}setMultiSelect(r){return this.multiSelect=r,this}addMimeTypeFilter(r){return this.mimeTypeFilter.push(r),this}setMimeTypeFilter(r){return this.mimeTypeFilter=r,this}addButton(r){return typeof this.buttons=="function"&&(console.warn("FilePicker buttons were set to factory, now overwritten with button object."),this.buttons=[]),this.buttons.push(r),this}setButtonFactory(r){return this.buttons=r,this}setType(r){return this.buttons=(n,i)=>{var o,s,a;const l=[],u=((s=(o=n==null?void 0:n[0])==null?void 0:o.attributes)==null?void 0:s.displayName)||((a=n==null?void 0:n[0])==null?void 0:a.basename),c=u||mk.basename(i);if(r===1){let d=pi("Choose");n.length===1?d=pi("Choose {file}",{file:u}):this.multiSelect&&(d=gk("Choose %n file","Choose %n files",n.length)),l.push({callback:()=>{},type:"primary",label:d})}return(r===4||r===3)&&l.push({callback:()=>{},label:c?pi("Copy to {target}",{target:c}):pi("Copy"),type:"primary",icon:vk}),(r===2||r===4)&&l.push({callback:()=>{},label:c?pi("Move to {target}",{target:c}):pi("Move"),type:r===2?"primary":"secondary",icon:Ck}),l},this}allowDirectories(r=!0){return this.directoriesAllowed=r,this}startAt(r){return this.path=r,this}setFilter(r){return this.filter=r,this}disableNavigation(){return this.disabledNavigation=!0,this}build(){return new _k(this.title,this.multiSelect,this.mimeTypeFilter,this.directoriesAllowed,this.buttons,this.path,this.filter,this.container,this.disabledNavigation)}}function xk(e){return new Ek(e)}function it(e){this.content=e}it.prototype={constructor:it,find:function(e){for(var r=0;r<this.content.length;r+=2)if(this.content[r]===e)return r;return-1},get:function(e){var r=this.find(e);return r==-1?void 0:this.content[r+1]},update:function(e,r,n){var i=n&&n!=e?this.remove(n):this,o=i.find(e),s=i.content.slice();return o==-1?s.push(n||e,r):(s[o+1]=r,n&&(s[o]=n)),new it(s)},remove:function(e){var r=this.find(e);if(r==-1)return this;var n=this.content.slice();return n.splice(r,2),new it(n)},addToStart:function(e,r){return new it([e,r].concat(this.remove(e).content))},addToEnd:function(e,r){var n=this.remove(e).content.slice();return n.push(e,r),new it(n)},addBefore:function(e,r,n){var i=this.remove(r),o=i.content.slice(),s=i.find(e);return o.splice(s==-1?o.length:s,0,r,n),new it(o)},forEach:function(e){for(var r=0;r<this.content.length;r+=2)e(this.content[r],this.content[r+1])},prepend:function(e){return e=it.from(e),e.size?new it(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=it.from(e),e.size?new it(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var r=this;e=it.from(e);for(var n=0;n<e.content.length;n+=2)r=r.remove(e.content[n]);return r},get size(){return this.content.length>>1}},it.from=function(e){if(e instanceof it)return e;var r=[];if(e)for(var n in e)r.push(n,e[n]);return new it(r)};function sg(e,r,n){for(let i=0;;i++){if(i==e.childCount||i==r.childCount)return e.childCount==r.childCount?null:n;let o=e.child(i),s=r.child(i);if(o==s){n+=o.nodeSize;continue}if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let a=0;o.text[a]==s.text[a];a++)n++;return n}if(o.content.size||s.content.size){let a=sg(o.content,s.content,n+1);if(a!=null)return a}n+=o.nodeSize}}function ag(e,r,n,i){for(let o=e.childCount,s=r.childCount;;){if(o==0||s==0)return o==s?null:{a:n,b:i};let a=e.child(--o),l=r.child(--s),u=a.nodeSize;if(a==l){n-=u,i-=u;continue}if(!a.sameMarkup(l))return{a:n,b:i};if(a.isText&&a.text!=l.text){let c=0,d=Math.min(a.text.length,l.text.length);for(;c<d&&a.text[a.text.length-c-1]==l.text[l.text.length-c-1];)c++,n--,i--;return{a:n,b:i}}if(a.content.size||l.content.size){let c=ag(a.content,l.content,n-1,i-1);if(c)return c}n-=u,i-=u}}class O{constructor(r,n){if(this.content=r,this.size=n||0,n==null)for(let i=0;i<r.length;i++)this.size+=r[i].nodeSize}nodesBetween(r,n,i,o=0,s){for(let a=0,l=0;l<n;a++){let u=this.content[a],c=l+u.nodeSize;if(c>r&&i(u,o+l,s||null,a)!==!1&&u.content.size){let d=l+1;u.nodesBetween(Math.max(0,r-d),Math.min(u.content.size,n-d),i,o+d)}l=c}}descendants(r){this.nodesBetween(0,this.size,r)}textBetween(r,n,i,o){let s="",a=!0;return this.nodesBetween(r,n,(l,u)=>{let c=l.isText?l.text.slice(Math.max(r,u)-u,n-u):l.isLeaf?o?typeof o=="function"?o(l):o:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&i&&(a?a=!1:s+=i),s+=c},0),s}append(r){if(!r.size)return this;if(!this.size)return r;let n=this.lastChild,i=r.firstChild,o=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(i)&&(o[o.length-1]=n.withText(n.text+i.text),s=1);s<r.content.length;s++)o.push(r.content[s]);return new O(o,this.size+r.size)}cut(r,n=this.size){if(r==0&&n==this.size)return this;let i=[],o=0;if(n>r)for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;u>r&&((a<r||u>n)&&(l.isText?l=l.cut(Math.max(0,r-a),Math.min(l.text.length,n-a)):l=l.cut(Math.max(0,r-a-1),Math.min(l.content.size,n-a-1))),i.push(l),o+=l.nodeSize),a=u}return new O(i,o)}cutByIndex(r,n){return r==n?O.empty:r==0&&n==this.content.length?this:new O(this.content.slice(r,n))}replaceChild(r,n){let i=this.content[r];if(i==n)return this;let o=this.content.slice(),s=this.size+n.nodeSize-i.nodeSize;return o[r]=n,new O(o,s)}addToStart(r){return new O([r].concat(this.content),this.size+r.nodeSize)}addToEnd(r){return new O(this.content.concat(r),this.size+r.nodeSize)}eq(r){if(this.content.length!=r.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(r.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(r){let n=this.content[r];if(!n)throw new RangeError("Index "+r+" out of range for "+this);return n}maybeChild(r){return this.content[r]||null}forEach(r){for(let n=0,i=0;n<this.content.length;n++){let o=this.content[n];r(o,i,n),i+=o.nodeSize}}findDiffStart(r,n=0){return sg(this,r,n)}findDiffEnd(r,n=this.size,i=r.size){return ag(this,r,n,i)}findIndex(r,n=-1){if(r==0)return Ps(0,r);if(r==this.size)return Ps(this.content.length,r);if(r>this.size||r<0)throw new RangeError("Position ".concat(r," outside of fragment (").concat(this,")"));for(let i=0,o=0;;i++){let s=this.child(i),a=o+s.nodeSize;if(a>=r)return a==r||n>0?Ps(i+1,a):Ps(i,o);o=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(r=>r.toJSON()):null}static fromJSON(r,n){if(!n)return O.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new O(n.map(r.nodeFromJSON))}static fromArray(r){if(!r.length)return O.empty;let n,i=0;for(let o=0;o<r.length;o++){let s=r[o];i+=s.nodeSize,o&&s.isText&&r[o-1].sameMarkup(s)?(n||(n=r.slice(0,o)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new O(n||r,i)}static from(r){if(!r)return O.empty;if(r instanceof O)return r;if(Array.isArray(r))return this.fromArray(r);if(r.attrs)return new O([r],r.nodeSize);throw new RangeError("Can not convert "+r+" to a Fragment"+(r.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}O.empty=new O([],0);const Nu={index:0,offset:0};function Ps(e,r){return Nu.index=e,Nu.offset=r,Nu}function za(e,r){if(e===r)return!0;if(!(e&&typeof e=="object")||!(r&&typeof r=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(r)!=n)return!1;if(n){if(e.length!=r.length)return!1;for(let i=0;i<e.length;i++)if(!za(e[i],r[i]))return!1}else{for(let i in e)if(!(i in r)||!za(e[i],r[i]))return!1;for(let i in r)if(!(i in e))return!1}return!0}let _e=class Pc{constructor(r,n){this.type=r,this.attrs=n}addToSet(r){let n,i=!1;for(let o=0;o<r.length;o++){let s=r[o];if(this.eq(s))return r;if(this.type.excludes(s.type))n||(n=r.slice(0,o));else{if(s.type.excludes(this.type))return r;!i&&s.type.rank>this.type.rank&&(n||(n=r.slice(0,o)),n.push(this),i=!0),n&&n.push(s)}}return n||(n=r.slice()),i||n.push(this),n}removeFromSet(r){for(let n=0;n<r.length;n++)if(this.eq(r[n]))return r.slice(0,n).concat(r.slice(n+1));return r}isInSet(r){for(let n=0;n<r.length;n++)if(this.eq(r[n]))return!0;return!1}eq(r){return this==r||this.type==r.type&&za(this.attrs,r.attrs)}toJSON(){let r={type:this.type.name};for(let n in this.attrs){r.attrs=this.attrs;break}return r}static fromJSON(r,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let i=r.marks[n.type];if(!i)throw new RangeError("There is no mark type ".concat(n.type," in this schema"));let o=i.create(n.attrs);return i.checkAttrs(o.attrs),o}static sameSet(r,n){if(r==n)return!0;if(r.length!=n.length)return!1;for(let i=0;i<r.length;i++)if(!r[i].eq(n[i]))return!1;return!0}static setFrom(r){if(!r||Array.isArray(r)&&r.length==0)return Pc.none;if(r instanceof Pc)return[r];let n=r.slice();return n.sort((i,o)=>i.type.rank-o.type.rank),n}};_e.none=[];class $a extends Error{}class ${constructor(r,n,i){this.content=r,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(r,n){let i=ug(this.content,r+this.openStart,n);return i&&new $(i,this.openStart,this.openEnd)}removeBetween(r,n){return new $(lg(this.content,r+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(r){return this.content.eq(r.content)&&this.openStart==r.openStart&&this.openEnd==r.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let r={content:this.content.toJSON()};return this.openStart>0&&(r.openStart=this.openStart),this.openEnd>0&&(r.openEnd=this.openEnd),r}static fromJSON(r,n){if(!n)return $.empty;let i=n.openStart||0,o=n.openEnd||0;if(typeof i!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new $(O.fromJSON(r,n.content),i,o)}static maxOpen(r,n=!0){let i=0,o=0;for(let s=r.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)i++;for(let s=r.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)o++;return new $(r,i,o)}}$.empty=new $(O.empty,0,0);function lg(e,r,n){let{index:i,offset:o}=e.findIndex(r),s=e.maybeChild(i),{index:a,offset:l}=e.findIndex(n);if(o==r||s.isText){if(l!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,r).append(e.cut(n))}if(i!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(i,s.copy(lg(s.content,r-o-1,n-o-1)))}function ug(e,r,n,i){let{index:o,offset:s}=e.findIndex(r),a=e.maybeChild(o);if(s==r||a.isText)return e.cut(0,r).append(n).append(e.cut(r));let l=ug(a.content,r-s-1,n);return l&&e.replaceChild(o,a.copy(l))}function Dk(e,r,n){if(n.openStart>e.depth)throw new $a("Inserted content deeper than insertion position");if(e.depth-n.openStart!=r.depth-n.openEnd)throw new $a("Inconsistent open depths");return cg(e,r,n,0)}function cg(e,r,n,i){let o=e.index(i),s=e.node(i);if(o==r.index(i)&&i<e.depth-n.openStart){let a=cg(e,r,n,i+1);return s.copy(s.content.replaceChild(o,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==i&&r.depth==i){let a=e.parent,l=a.content;return Hn(a,l.cut(0,e.parentOffset).append(n.content).append(l.cut(r.parentOffset)))}else{let{start:a,end:l}=Sk(n,e);return Hn(s,hg(e,a,l,r,i))}else return Hn(s,Ha(e,r,i))}function dg(e,r){if(!r.type.compatibleContent(e.type))throw new $a("Cannot join "+r.type.name+" onto "+e.type.name)}function Vc(e,r,n){let i=e.node(n);return dg(i,r.node(n)),i}function $n(e,r){let n=r.length-1;n>=0&&e.isText&&e.sameMarkup(r[n])?r[n]=e.withText(r[n].text+e.text):r.push(e)}function Fo(e,r,n,i){let o=(r||e).node(n),s=0,a=r?r.index(n):o.childCount;e&&(s=e.index(n),e.depth>n?s++:e.textOffset&&($n(e.nodeAfter,i),s++));for(let l=s;l<a;l++)$n(o.child(l),i);r&&r.depth==n&&r.textOffset&&$n(r.nodeBefore,i)}function Hn(e,r){return e.type.checkContent(r),e.copy(r)}function hg(e,r,n,i,o){let s=e.depth>o&&Vc(e,r,o+1),a=i.depth>o&&Vc(n,i,o+1),l=[];return Fo(null,e,o,l),s&&a&&r.index(o)==n.index(o)?(dg(s,a),$n(Hn(s,hg(e,r,n,i,o+1)),l)):(s&&$n(Hn(s,Ha(e,r,o+1)),l),Fo(r,n,o,l),a&&$n(Hn(a,Ha(n,i,o+1)),l)),Fo(i,null,o,l),new O(l)}function Ha(e,r,n){let i=[];if(Fo(null,e,n,i),e.depth>n){let o=Vc(e,r,n+1);$n(Hn(o,Ha(e,r,n+1)),i)}return Fo(r,null,n,i),new O(i)}function Sk(e,r){let n=r.depth-e.openStart,i=r.node(n).copy(e.content);for(let o=n-1;o>=0;o--)i=r.node(o).copy(O.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class Uo{constructor(r,n,i){this.pos=r,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(r){return r==null?this.depth:r<0?this.depth+r:r}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(r){return this.path[this.resolveDepth(r)*3]}index(r){return this.path[this.resolveDepth(r)*3+1]}indexAfter(r){return r=this.resolveDepth(r),this.index(r)+(r==this.depth&&!this.textOffset?0:1)}start(r){return r=this.resolveDepth(r),r==0?0:this.path[r*3-1]+1}end(r){return r=this.resolveDepth(r),this.start(r)+this.node(r).content.size}before(r){if(r=this.resolveDepth(r),!r)throw new RangeError("There is no position before the top-level node");return r==this.depth+1?this.pos:this.path[r*3-1]}after(r){if(r=this.resolveDepth(r),!r)throw new RangeError("There is no position after the top-level node");return r==this.depth+1?this.pos:this.path[r*3-1]+this.path[r*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let r=this.parent,n=this.index(this.depth);if(n==r.childCount)return null;let i=this.pos-this.path[this.path.length-1],o=r.child(n);return i?r.child(n).cut(i):o}get nodeBefore(){let r=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(r).cut(0,n):r==0?null:this.parent.child(r-1)}posAtIndex(r,n){n=this.resolveDepth(n);let i=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let s=0;s<r;s++)o+=i.child(s).nodeSize;return o}marks(){let r=this.parent,n=this.index();if(r.content.size==0)return _e.none;if(this.textOffset)return r.child(n).marks;let i=r.maybeChild(n-1),o=r.maybeChild(n);if(!i){let l=i;i=o,o=l}let s=i.marks;for(var a=0;a<s.length;a++)s[a].type.spec.inclusive===!1&&(!o||!s[a].isInSet(o.marks))&&(s=s[a--].removeFromSet(s));return s}marksAcross(r){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let i=n.marks,o=r.parent.maybeChild(r.index());for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}sharedDepth(r){for(let n=this.depth;n>0;n--)if(this.start(n)<=r&&this.end(n)>=r)return n;return 0}blockRange(r=this,n){if(r.pos<this.pos)return r.blockRange(this);for(let i=this.depth-(this.parent.inlineContent||this.pos==r.pos?1:0);i>=0;i--)if(r.pos<=this.end(i)&&(!n||n(this.node(i))))return new Pa(this,r,i);return null}sameParent(r){return this.pos-this.parentOffset==r.pos-r.parentOffset}max(r){return r.pos>this.pos?r:this}min(r){return r.pos<this.pos?r:this}toString(){let r="";for(let n=1;n<=this.depth;n++)r+=(r?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return r+":"+this.parentOffset}static resolve(r,n){if(!(n>=0&&n<=r.content.size))throw new RangeError("Position "+n+" out of range");let i=[],o=0,s=n;for(let a=r;;){let{index:l,offset:u}=a.content.findIndex(s),c=s-u;if(i.push(a,l,o+u),!c||(a=a.child(l),a.isText))break;s=c-1,o+=u+1}return new Uo(n,i,s)}static resolveCached(r,n){let i=xp.get(r);if(i)for(let s=0;s<i.elts.length;s++){let a=i.elts[s];if(a.pos==n)return a}else xp.set(r,i=new Bk);let o=i.elts[i.i]=Uo.resolve(r,n);return i.i=(i.i+1)%Mk,o}}class Bk{constructor(){this.elts=[],this.i=0}}const Mk=12,xp=new WeakMap;class Pa{constructor(r,n,i){this.$from=r,this.$to=n,this.depth=i}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Fk=Object.create(null);let Pn=class jc{constructor(r,n,i,o=_e.none){this.type=r,this.attrs=n,this.marks=o,this.content=i||O.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(r){return this.content.child(r)}maybeChild(r){return this.content.maybeChild(r)}forEach(r){this.content.forEach(r)}nodesBetween(r,n,i,o=0){this.content.nodesBetween(r,n,i,o,this)}descendants(r){this.nodesBetween(0,this.content.size,r)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(r,n,i,o){return this.content.textBetween(r,n,i,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(r){return this==r||this.sameMarkup(r)&&this.content.eq(r.content)}sameMarkup(r){return this.hasMarkup(r.type,r.attrs,r.marks)}hasMarkup(r,n,i){return this.type==r&&za(this.attrs,n||r.defaultAttrs||Fk)&&_e.sameSet(this.marks,i||_e.none)}copy(r=null){return r==this.content?this:new jc(this.type,this.attrs,r,this.marks)}mark(r){return r==this.marks?this:new jc(this.type,this.attrs,this.content,r)}cut(r,n=this.content.size){return r==0&&n==this.content.size?this:this.copy(this.content.cut(r,n))}slice(r,n=this.content.size,i=!1){if(r==n)return $.empty;let o=this.resolve(r),s=this.resolve(n),a=i?0:o.sharedDepth(n),l=o.start(a),u=o.node(a).content.cut(o.pos-l,s.pos-l);return new $(u,o.depth-a,s.depth-a)}replace(r,n,i){return Dk(this.resolve(r),this.resolve(n),i)}nodeAt(r){for(let n=this;;){let{index:i,offset:o}=n.content.findIndex(r);if(n=n.maybeChild(i),!n)return null;if(o==r||n.isText)return n;r-=o+1}}childAfter(r){let{index:n,offset:i}=this.content.findIndex(r);return{node:this.content.maybeChild(n),index:n,offset:i}}childBefore(r){if(r==0)return{node:null,index:0,offset:0};let{index:n,offset:i}=this.content.findIndex(r);if(i<r)return{node:this.content.child(n),index:n,offset:i};let o=this.content.child(n-1);return{node:o,index:n-1,offset:i-o.nodeSize}}resolve(r){return Uo.resolveCached(this,r)}resolveNoCache(r){return Uo.resolve(this,r)}rangeHasMark(r,n,i){let o=!1;return n>r&&this.nodesBetween(r,n,s=>(i.isInSet(s.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let r=this.type.name;return this.content.size&&(r+="("+this.content.toStringInner()+")"),pg(this.marks,r)}contentMatchAt(r){let n=this.type.contentMatch.matchFragment(this.content,0,r);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(r,n,i=O.empty,o=0,s=i.childCount){let a=this.contentMatchAt(r).matchFragment(i,o,s),l=a&&a.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let u=o;u<s;u++)if(!this.type.allowsMarks(i.child(u).marks))return!1;return!0}canReplaceWith(r,n,i,o){if(o&&!this.type.allowsMarks(o))return!1;let s=this.contentMatchAt(r).matchType(i),a=s&&s.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(r){return r.content.size?this.canReplace(this.childCount,this.childCount,r.content):this.type.compatibleContent(r.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let r=_e.none;for(let n=0;n<this.marks.length;n++){let i=this.marks[n];i.type.checkAttrs(i.attrs),r=i.addToSet(r)}if(!_e.sameSet(r,this.marks))throw new RangeError("Invalid collection of marks for node ".concat(this.type.name,": ").concat(this.marks.map(n=>n.type.name)));this.content.forEach(n=>n.check())}toJSON(){let r={type:this.type.name};for(let n in this.attrs){r.attrs=this.attrs;break}return this.content.size&&(r.content=this.content.toJSON()),this.marks.length&&(r.marks=this.marks.map(n=>n.toJSON())),r}static fromJSON(r,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(r.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return r.text(n.text,i)}let o=O.fromJSON(r,n.content),s=r.nodeType(n.type).create(n.attrs,o,i);return s.type.checkAttrs(s.attrs),s}};Pn.prototype.text=void 0;class Va extends Pn{constructor(r,n,i,o){if(super(r,n,null,o),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):pg(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(r,n){return this.text.slice(r,n)}get nodeSize(){return this.text.length}mark(r){return r==this.marks?this:new Va(this.type,this.attrs,this.text,r)}withText(r){return r==this.text?this:new Va(this.type,this.attrs,r,this.marks)}cut(r=0,n=this.text.length){return r==0&&n==this.text.length?this:this.withText(this.text.slice(r,n))}eq(r){return this.sameMarkup(r)&&this.text==r.text}toJSON(){let r=super.toJSON();return r.text=this.text,r}}function pg(e,r){for(let n=e.length-1;n>=0;n--)r=e[n].type.name+"("+r+")";return r}class Jn{constructor(r){this.validEnd=r,this.next=[],this.wrapCache=[]}static parse(r,n){let i=new Nk(r,n);if(i.next==null)return Jn.empty;let o=fg(i);i.next&&i.err("Unexpected trailing text");let s=$k(zk(o));return Hk(s,i),s}matchType(r){for(let n=0;n<this.next.length;n++)if(this.next[n].type==r)return this.next[n].next;return null}matchFragment(r,n=0,i=r.childCount){let o=this;for(let s=n;o&&s<i;s++)o=o.matchType(r.child(s).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let r=0;r<this.next.length;r++){let{type:n}=this.next[r];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(r){for(let n=0;n<this.next.length;n++)for(let i=0;i<r.next.length;i++)if(this.next[n].type==r.next[i].type)return!0;return!1}fillBefore(r,n=!1,i=0){let o=[this];function s(a,l){let u=a.matchFragment(r,i);if(u&&(!n||u.validEnd))return O.from(l.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:d,next:h}=a.next[c];if(!(d.isText||d.hasRequiredAttrs())&&o.indexOf(h)==-1){o.push(h);let p=s(h,l.concat(d));if(p)return p}}return null}return s(this,[])}findWrapping(r){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==r)return this.wrapCache[i+1];let n=this.computeWrapping(r);return this.wrapCache.push(r,n),n}computeWrapping(r){let n=Object.create(null),i=[{match:this,type:null,via:null}];for(;i.length;){let o=i.shift(),s=o.match;if(s.matchType(r)){let a=[];for(let l=o;l.type;l=l.via)a.push(l.type);return a.reverse()}for(let a=0;a<s.next.length;a++){let{type:l,next:u}=s.next[a];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!o.type||u.validEnd)&&(i.push({match:l.contentMatch,type:l,via:o}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(r){if(r>=this.next.length)throw new RangeError("There's no ".concat(r,"th edge in this content match"));return this.next[r]}toString(){let r=[];function n(i){r.push(i);for(let o=0;o<i.next.length;o++)r.indexOf(i.next[o].next)==-1&&n(i.next[o].next)}return n(this),r.map((i,o)=>{let s=o+(i.validEnd?"*":" ")+" ";for(let a=0;a<i.next.length;a++)s+=(a?", ":"")+i.next[a].type.name+"->"+r.indexOf(i.next[a].next);return s}).join("\n")}}Jn.empty=new Jn(!0);class Nk{constructor(r,n){this.string=r,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=r.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(r){return this.next==r&&(this.pos++||!0)}err(r){throw new SyntaxError(r+" (in content expression '"+this.string+"')")}}function fg(e){let r=[];do r.push(Ok(e));while(e.eat("|"));return r.length==1?r[0]:{type:"choice",exprs:r}}function Ok(e){let r=[];do r.push(Tk(e));while(e.next&&e.next!=")"&&e.next!="|");return r.length==1?r[0]:{type:"seq",exprs:r}}function Tk(e){let r=Rk(e);for(;;)if(e.eat("+"))r={type:"plus",expr:r};else if(e.eat("*"))r={type:"star",expr:r};else if(e.eat("?"))r={type:"opt",expr:r};else if(e.eat("{"))r=Lk(e,r);else break;return r}function Dp(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let r=Number(e.next);return e.pos++,r}function Lk(e,r){let n=Dp(e),i=n;return e.eat(",")&&(e.next!="}"?i=Dp(e):i=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:r}}function Ik(e,r){let n=e.nodeTypes,i=n[r];if(i)return[i];let o=[];for(let s in n){let a=n[s];a.groups.indexOf(r)>-1&&o.push(a)}return o.length==0&&e.err("No node type or group '"+r+"' found"),o}function Rk(e){if(e.eat("(")){let r=fg(e);return e.eat(")")||e.err("Missing closing paren"),r}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let r=Ik(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,r.length==1?r[0]:{type:"choice",exprs:r}}}function zk(e){let r=[[]];return o(s(e,0),n()),r;function n(){return r.push([])-1}function i(a,l,u){let c={term:u,to:l};return r[a].push(c),c}function o(a,l){a.forEach(u=>u.to=l)}function s(a,l){if(a.type=="choice")return a.exprs.reduce((u,c)=>u.concat(s(c,l)),[]);if(a.type=="seq")for(let u=0;;u++){let c=s(a.exprs[u],l);if(u==a.exprs.length-1)return c;o(c,l=n())}else if(a.type=="star"){let u=n();return i(l,u),o(s(a.expr,u),u),[i(u)]}else if(a.type=="plus"){let u=n();return o(s(a.expr,l),u),o(s(a.expr,u),u),[i(u)]}else{if(a.type=="opt")return[i(l)].concat(s(a.expr,l));if(a.type=="range"){let u=l;for(let c=0;c<a.min;c++){let d=n();o(s(a.expr,u),d),u=d}if(a.max==-1)o(s(a.expr,u),u);else for(let c=a.min;c<a.max;c++){let d=n();i(u,d),o(s(a.expr,u),d),u=d}return[i(u)]}else{if(a.type=="name")return[i(l,void 0,a.value)];throw new Error("Unknown expr type")}}}}function mg(e,r){return r-e}function Sp(e,r){let n=[];return i(r),n.sort(mg);function i(o){let s=e[o];if(s.length==1&&!s[0].term)return i(s[0].to);n.push(o);for(let a=0;a<s.length;a++){let{term:l,to:u}=s[a];!l&&n.indexOf(u)==-1&&i(u)}}}function $k(e){let r=Object.create(null);return n(Sp(e,0));function n(i){let o=[];i.forEach(a=>{e[a].forEach(({term:l,to:u})=>{if(!l)return;let c;for(let d=0;d<o.length;d++)o[d][0]==l&&(c=o[d][1]);Sp(e,u).forEach(d=>{c||o.push([l,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let s=r[i.join(",")]=new Jn(i.indexOf(e.length-1)>-1);for(let a=0;a<o.length;a++){let l=o[a][1].sort(mg);s.next.push({type:o[a][0],next:r[l.join(",")]||n(l)})}return s}}function Hk(e,r){for(let n=0,i=[e];n<i.length;n++){let o=i[n],s=!o.validEnd,a=[];for(let l=0;l<o.next.length;l++){let{type:u,next:c}=o.next[l];a.push(u.name),s&&!(u.isText||u.hasRequiredAttrs())&&(s=!1),i.indexOf(c)==-1&&i.push(c)}s&&r.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function gg(e){let r=Object.create(null);for(let n in e){let i=e[n];if(!i.hasDefault)return null;r[n]=i.default}return r}function bg(e,r){let n=Object.create(null);for(let i in e){let o=r&&r[i];if(o===void 0){let s=e[i];if(s.hasDefault)o=s.default;else throw new RangeError("No value supplied for attribute "+i)}n[i]=o}return n}function yg(e,r,n,i){for(let o in r)if(!(o in e))throw new RangeError("Unsupported attribute ".concat(o," for ").concat(n," of type ").concat(o));for(let o in e){let s=e[o];s.validate&&s.validate(r[o])}}function Cg(e,r){let n=Object.create(null);if(r)for(let i in r)n[i]=new Vk(e,i,r[i]);return n}let Bp=class vg{constructor(r,n,i){this.name=r,this.schema=n,this.spec=i,this.markSet=null,this.groups=i.group?i.group.split(" "):[],this.attrs=Cg(r,i.attrs),this.defaultAttrs=gg(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(i.inline||r=="text"),this.isText=r=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Jn.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let r in this.attrs)if(this.attrs[r].isRequired)return!0;return!1}compatibleContent(r){return this==r||this.contentMatch.compatible(r.contentMatch)}computeAttrs(r){return!r&&this.defaultAttrs?this.defaultAttrs:bg(this.attrs,r)}create(r=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Pn(this,this.computeAttrs(r),O.from(n),_e.setFrom(i))}createChecked(r=null,n,i){return n=O.from(n),this.checkContent(n),new Pn(this,this.computeAttrs(r),n,_e.setFrom(i))}createAndFill(r=null,n,i){if(r=this.computeAttrs(r),n=O.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let o=this.contentMatch.matchFragment(n),s=o&&o.fillBefore(O.empty,!0);return s?new Pn(this,r,n.append(s),_e.setFrom(i)):null}validContent(r){let n=this.contentMatch.matchFragment(r);if(!n||!n.validEnd)return!1;for(let i=0;i<r.childCount;i++)if(!this.allowsMarks(r.child(i).marks))return!1;return!0}checkContent(r){if(!this.validContent(r))throw new RangeError("Invalid content for node ".concat(this.name,": ").concat(r.toString().slice(0,50)))}checkAttrs(r){yg(this.attrs,r,"node",this.name)}allowsMarkType(r){return this.markSet==null||this.markSet.indexOf(r)>-1}allowsMarks(r){if(this.markSet==null)return!0;for(let n=0;n<r.length;n++)if(!this.allowsMarkType(r[n].type))return!1;return!0}allowedMarks(r){if(this.markSet==null)return r;let n;for(let i=0;i<r.length;i++)this.allowsMarkType(r[i].type)?n&&n.push(r[i]):n||(n=r.slice(0,i));return n?n.length?n:_e.none:r}static compile(r,n){let i=Object.create(null);r.forEach((s,a)=>i[s]=new vg(s,n,a));let o=n.spec.topNode||"doc";if(!i[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let s in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}};function Pk(e,r,n){let i=n.split("|");return o=>{let s=o===null?"null":typeof o;if(i.indexOf(s)<0)throw new RangeError("Expected value of type ".concat(i," for attribute ").concat(r," on type ").concat(e,", got ").concat(s))}}class Vk{constructor(r,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?Pk(r,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class Kl{constructor(r,n,i,o){this.name=r,this.rank=n,this.schema=i,this.spec=o,this.attrs=Cg(r,o.attrs),this.excluded=null;let s=gg(this.attrs);this.instance=s?new _e(this,s):null}create(r=null){return!r&&this.instance?this.instance:new _e(this,bg(this.attrs,r))}static compile(r,n){let i=Object.create(null),o=0;return r.forEach((s,a)=>i[s]=new Kl(s,o++,n,a)),i}removeFromSet(r){for(var n=0;n<r.length;n++)r[n].type==this&&(r=r.slice(0,n).concat(r.slice(n+1)),n--);return r}isInSet(r){for(let n=0;n<r.length;n++)if(r[n].type==this)return r[n]}checkAttrs(r){yg(this.attrs,r,"mark",this.name)}excludes(r){return this.excluded.indexOf(r)>-1}}class Wd{constructor(r){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in r)n[o]=r[o];n.nodes=it.from(r.nodes),n.marks=it.from(r.marks||{}),this.nodes=Bp.compile(this.spec.nodes,this),this.marks=Kl.compile(this.spec.marks,this);let i=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let s=this.nodes[o],a=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=i[a]||(i[a]=Jn.parse(a,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?Mp(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let o in this.marks){let s=this.marks[o],a=s.spec.excludes;s.excluded=a==null?[s]:a==""?[]:Mp(this,a.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(r,n=null,i,o){if(typeof r=="string")r=this.nodeType(r);else if(r instanceof Bp){if(r.schema!=this)throw new RangeError("Node type from different schema used ("+r.name+")")}else throw new RangeError("Invalid node type: "+r);return r.createChecked(n,i,o)}text(r,n){let i=this.nodes.text;return new Va(i,i.defaultAttrs,r,_e.setFrom(n))}mark(r,n){return typeof r=="string"&&(r=this.marks[r]),r.create(n)}nodeFromJSON(r){return Pn.fromJSON(this,r)}markFromJSON(r){return _e.fromJSON(this,r)}nodeType(r){let n=this.nodes[r];if(!n)throw new RangeError("Unknown node type: "+r);return n}}function Mp(e,r){let n=[];for(let i=0;i<r.length;i++){let o=r[i],s=e.marks[o],a=s;if(s)n.push(s);else for(let l in e.marks){let u=e.marks[l];(o=="_"||u.spec.group&&u.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+r[i]+"'")}return n}function jk(e){return e.tag!=null}function qk(e){return e.style!=null}let Vn=class qc{constructor(r,n){this.schema=r,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(o=>{if(jk(o))this.tags.push(o);else if(qk(o)){let s=/[^=]*/.exec(o.style)[0];i.indexOf(s)<0&&i.push(s),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let s=r.nodes[o.node];return s.contentMatch.matchType(s)})}parse(r,n={}){let i=new Np(this,n,!1);return i.addAll(r,_e.none,n.from,n.to),i.finish()}parseSlice(r,n={}){let i=new Np(this,n,!0);return i.addAll(r,_e.none,n.from,n.to),$.maxOpen(i.finish())}matchTag(r,n,i){for(let o=i?this.tags.indexOf(i)+1:0;o<this.tags.length;o++){let s=this.tags[o];if(Kk(r,s.tag)&&(s.namespace===void 0||r.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let a=s.getAttrs(r);if(a===!1)continue;s.attrs=a||void 0}return s}}}matchStyle(r,n,i,o){for(let s=o?this.styles.indexOf(o)+1:0;s<this.styles.length;s++){let a=this.styles[s],l=a.style;if(!(l.indexOf(r)!=0||a.context&&!i.matchesContext(a.context)||l.length>r.length&&(l.charCodeAt(r.length)!=61||l.slice(r.length+1)!=n))){if(a.getAttrs){let u=a.getAttrs(n);if(u===!1)continue;a.attrs=u||void 0}return a}}}static schemaRules(r){let n=[];function i(o){let s=o.priority==null?50:o.priority,a=0;for(;a<n.length;a++){let l=n[a];if((l.priority==null?50:l.priority)<s)break}n.splice(a,0,o)}for(let o in r.marks){let s=r.marks[o].spec.parseDOM;s&&s.forEach(a=>{i(a=Op(a)),a.mark||a.ignore||a.clearMark||(a.mark=o)})}for(let o in r.nodes){let s=r.nodes[o].spec.parseDOM;s&&s.forEach(a=>{i(a=Op(a)),a.node||a.ignore||a.mark||(a.node=o)})}return n}static fromSchema(r){return r.cached.domParser||(r.cached.domParser=new qc(r,qc.schemaRules(r)))}};const kg={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Uk={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},wg={ol:!0,ul:!0},ja=1,qa=2,No=4;function Fp(e,r,n){return r!=null?(r?ja:0)|(r==="full"?qa:0):e&&e.whitespace=="pre"?ja|qa:n&~No}class Vs{constructor(r,n,i,o,s,a){this.type=r,this.attrs=n,this.marks=i,this.solid=o,this.options=a,this.content=[],this.activeMarks=_e.none,this.match=s||(a&No?null:r.contentMatch)}findWrapping(r){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(O.from(r));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let i=this.type.contentMatch,o;return(o=i.findWrapping(r.type))?(this.match=i,o):null}}return this.match.findWrapping(r.type)}finish(r){if(!(this.options&ja)){let i=this.content[this.content.length-1],o;if(i&&i.isText&&(o=/[ \t\r\n\u000c]+$/.exec(i.text))){let s=i;i.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-o[0].length))}}let n=O.from(this.content);return!r&&this.match&&(n=n.append(this.match.fillBefore(O.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(r){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:r.parentNode&&!kg.hasOwnProperty(r.parentNode.nodeName.toLowerCase())}}class Np{constructor(r,n,i){this.parser=r,this.options=n,this.isOpen=i,this.open=0;let o=n.topNode,s,a=Fp(null,n.preserveWhitespace,0)|(i?No:0);o?s=new Vs(o.type,o.attrs,_e.none,!0,n.topMatch||o.type.contentMatch,a):i?s=new Vs(null,null,_e.none,!0,null,a):s=new Vs(r.schema.topNodeType,null,_e.none,!0,null,a),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(r,n){r.nodeType==3?this.addTextNode(r,n):r.nodeType==1&&this.addElement(r,n)}addTextNode(r,n){let i=r.nodeValue,o=this.top;if(o.options&qa||o.inlineContext(r)||/[^ \t\r\n\u000c]/.test(i)){if(o.options&ja)o.options&qa?i=i.replace(/\r\n?/g,"\n"):i=i.replace(/\r?\n|\r/g," ");else if(i=i.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(i)&&this.open==this.nodes.length-1){let s=o.content[o.content.length-1],a=r.previousSibling;(!s||a&&a.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(i=i.slice(1))}i&&this.insertNode(this.parser.schema.text(i),n),this.findInText(r)}else this.findInside(r)}addElement(r,n,i){let o=r.nodeName.toLowerCase(),s;wg.hasOwnProperty(o)&&this.parser.normalizeLists&&Wk(r);let a=this.options.ruleFromNode&&this.options.ruleFromNode(r)||(s=this.parser.matchTag(r,this,i));if(a?a.ignore:Uk.hasOwnProperty(o))this.findInside(r),this.ignoreFallback(r,n);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(r=a.skip);let l,u=this.top,c=this.needsBlock;if(kg.hasOwnProperty(o))u.content.length&&u.content[0].isInline&&this.open&&(this.open--,u=this.top),l=!0,u.type||(this.needsBlock=!0);else if(!r.firstChild){this.leafFallback(r,n);return}let d=a&&a.skip?n:this.readStyles(r,n);d&&this.addAll(r,d),l&&this.sync(u),this.needsBlock=c}else{let l=this.readStyles(r,n);l&&this.addElementByRule(r,a,l,a.consuming===!1?s:void 0)}}leafFallback(r,n){r.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(r.ownerDocument.createTextNode("\n"),n)}ignoreFallback(r,n){r.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(r,n){let i=r.style;if(i&&i.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let s=this.parser.matchedStyles[o],a=i.getPropertyValue(s);if(a)for(let l=void 0;;){let u=this.parser.matchStyle(s,a,this,l);if(!u)break;if(u.ignore)return null;if(u.clearMark?n=n.filter(c=>!u.clearMark(c)):n=n.concat(this.parser.schema.marks[u.mark].create(u.attrs)),u.consuming===!1)l=u;else break}}return n}addElementByRule(r,n,i,o){let s,a;if(n.node)if(a=this.parser.schema.nodes[n.node],a.isLeaf)this.insertNode(a.create(n.attrs),i)||this.leafFallback(r,i);else{let u=this.enter(a,n.attrs||null,i,n.preserveWhitespace);u&&(s=!0,i=u)}else{let u=this.parser.schema.marks[n.mark];i=i.concat(u.create(n.attrs))}let l=this.top;if(a&&a.isLeaf)this.findInside(r);else if(o)this.addElement(r,i,o);else if(n.getContent)this.findInside(r),n.getContent(r,this.parser.schema).forEach(u=>this.insertNode(u,i));else{let u=r;typeof n.contentElement=="string"?u=r.querySelector(n.contentElement):typeof n.contentElement=="function"?u=n.contentElement(r):n.contentElement&&(u=n.contentElement),this.findAround(r,u,!0),this.addAll(u,i)}s&&this.sync(l)&&this.open--}addAll(r,n,i,o){let s=i||0;for(let a=i?r.childNodes[i]:r.firstChild,l=o==null?null:r.childNodes[o];a!=l;a=a.nextSibling,++s)this.findAtPoint(r,s),this.addDOM(a,n);this.findAtPoint(r,s)}findPlace(r,n){let i,o;for(let s=this.open;s>=0;s--){let a=this.nodes[s],l=a.findWrapping(r);if(l&&(!i||i.length>l.length)&&(i=l,o=a,!l.length)||a.solid)break}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(r,n){if(r.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(r,n);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(r.type));let s=_e.none;for(let a of i.concat(r.marks))(o.type?o.type.allowsMarkType(a.type):Tp(a.type,r.type))&&(s=a.addToSet(s));return o.content.push(r.mark(s)),!0}return!1}enter(r,n,i,o){let s=this.findPlace(r.create(n),i);return s&&(s=this.enterInner(r,n,i,!0,o)),s}enterInner(r,n,i,o=!1,s){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(r);let l=Fp(r,s,a.options);a.options&No&&a.content.length==0&&(l|=No);let u=_e.none;return i=i.filter(c=>(a.type?a.type.allowsMarkType(c.type):Tp(c.type,r))?(u=c.addToSet(u),!1):!0),this.nodes.push(new Vs(r,n,u,o,null,l)),this.open++,i}closeExtra(r=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(r));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(r){for(let n=this.open;n>=0;n--)if(this.nodes[n]==r)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let r=0;for(let n=this.open;n>=0;n--){let i=this.nodes[n].content;for(let o=i.length-1;o>=0;o--)r+=i[o].nodeSize;n&&r++}return r}findAtPoint(r,n){if(this.find)for(let i=0;i<this.find.length;i++)this.find[i].node==r&&this.find[i].offset==n&&(this.find[i].pos=this.currentPos)}findInside(r){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&r.nodeType==1&&r.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(r,n,i){if(r!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&r.nodeType==1&&r.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(i?2:4)&&(this.find[o].pos=this.currentPos)}findInText(r){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==r&&(this.find[n].pos=this.currentPos-(r.nodeValue.length-this.find[n].offset))}matchesContext(r){if(r.indexOf("|")>-1)return r.split(/\s*\|\s*/).some(this.matchesContext,this);let n=r.split("/"),i=this.options.context,o=!this.isOpen&&(!i||i.parent.type==this.nodes[0].type),s=-(i?i.depth+1:0)+(o?0:1),a=(l,u)=>{for(;l>=0;l--){let c=n[l];if(c==""){if(l==n.length-1||l==0)continue;for(;u>=s;u--)if(a(l-1,u))return!0;return!1}else{let d=u>0||u==0&&o?this.nodes[u].type:i&&u>=s?i.node(u-s).type:null;if(!d||d.name!=c&&d.groups.indexOf(c)==-1)return!1;u--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let r=this.options.context;if(r)for(let n=r.depth;n>=0;n--){let i=r.node(n).contentMatchAt(r.indexAfter(n)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let n in this.parser.schema.nodes){let i=this.parser.schema.nodes[n];if(i.isTextblock&&i.defaultAttrs)return i}}}function Wk(e){for(let r=e.firstChild,n=null;r;r=r.nextSibling){let i=r.nodeType==1?r.nodeName.toLowerCase():null;i&&wg.hasOwnProperty(i)&&n?(n.appendChild(r),r=n):i=="li"?n=r:i&&(n=null)}}function Kk(e,r){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,r)}function Op(e){let r={};for(let n in e)r[n]=e[n];return r}function Tp(e,r){let n=r.schema.nodes;for(let i in n){let o=n[i];if(!o.allowsMarkType(e))continue;let s=[],a=l=>{s.push(l);for(let u=0;u<l.edgeCount;u++){let{type:c,next:d}=l.edge(u);if(c==r||s.indexOf(d)<0&&a(d))return!0}};if(a(o.contentMatch))return!0}}class oi{constructor(r,n){this.nodes=r,this.marks=n}serializeFragment(r,n={},i){i||(i=Ou(n).createDocumentFragment());let o=i,s=[];return r.forEach(a=>{if(s.length||a.marks.length){let l=0,u=0;for(;l<s.length&&u<a.marks.length;){let c=a.marks[u];if(!this.marks[c.type.name]){u++;continue}if(!c.eq(s[l][0])||c.type.spec.spanning===!1)break;l++,u++}for(;l<s.length;)o=s.pop()[1];for(;u<a.marks.length;){let c=a.marks[u++],d=this.serializeMark(c,a.isInline,n);d&&(s.push([c,o]),o.appendChild(d.dom),o=d.contentDOM||d.dom)}}o.appendChild(this.serializeNodeInner(a,n))}),i}serializeNodeInner(r,n){let{dom:i,contentDOM:o}=ya(Ou(n),this.nodes[r.type.name](r),null,r.attrs);if(o){if(r.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(r.content,n,o)}return i}serializeNode(r,n={}){let i=this.serializeNodeInner(r,n);for(let o=r.marks.length-1;o>=0;o--){let s=this.serializeMark(r.marks[o],r.isInline,n);s&&((s.contentDOM||s.dom).appendChild(i),i=s.dom)}return i}serializeMark(r,n,i={}){let o=this.marks[r.type.name];return o&&ya(Ou(i),o(r,n),null,r.attrs)}static renderSpec(r,n,i=null,o){return ya(r,n,i,o)}static fromSchema(r){return r.cached.domSerializer||(r.cached.domSerializer=new oi(this.nodesFromSchema(r),this.marksFromSchema(r)))}static nodesFromSchema(r){let n=Lp(r.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(r){return Lp(r.marks)}}function Lp(e){let r={};for(let n in e){let i=e[n].spec.toDOM;i&&(r[n]=i)}return r}function Ou(e){return e.document||window.document}const Ip=new WeakMap;function Zk(e){let r=Ip.get(e);return r===void 0&&Ip.set(e,r=Gk(e)),r}function Gk(e){let r=null;function n(i){if(i&&typeof i=="object")if(Array.isArray(i))if(typeof i[0]=="string")r||(r=[]),r.push(i);else for(let o=0;o<i.length;o++)n(i[o]);else for(let o in i)n(i[o])}return n(e),r}function ya(e,r,n,i){if(typeof r=="string")return{dom:e.createTextNode(r)};if(r.nodeType!=null)return{dom:r};if(r.dom&&r.dom.nodeType!=null)return r;let o=r[0],s;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(i&&(s=Zk(i))&&s.indexOf(r)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let l,u=n?e.createElementNS(n,o):e.createElement(o),c=r[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let h in c)if(c[h]!=null){let p=h.indexOf(" ");p>0?u.setAttributeNS(h.slice(0,p),h.slice(p+1),c[h]):u.setAttribute(h,c[h])}}for(let h=d;h<r.length;h++){let p=r[h];if(p===0){if(h<r.length-1||h>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}else{let{dom:f,contentDOM:m}=ya(e,p,n,i);if(u.appendChild(f),m){if(l)throw new RangeError("Multiple content holes");l=m}}}return{dom:u,contentDOM:l}}const Ag=65535,_g=Math.pow(2,16);function Jk(e,r){return e+r*_g}function Rp(e){return e&Ag}function Xk(e){return(e-(e&Ag))/_g}const Eg=1,xg=2,Ca=4,Dg=8;class Uc{constructor(r,n,i){this.pos=r,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&Dg)>0}get deletedBefore(){return(this.delInfo&(Eg|Ca))>0}get deletedAfter(){return(this.delInfo&(xg|Ca))>0}get deletedAcross(){return(this.delInfo&Ca)>0}}class Nt{constructor(r,n=!1){if(this.ranges=r,this.inverted=n,!r.length&&Nt.empty)return Nt.empty}recover(r){let n=0,i=Rp(r);if(!this.inverted)for(let o=0;o<i;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[i*3]+n+Xk(r)}mapResult(r,n=1){return this._map(r,n,!1)}map(r,n=1){return this._map(r,n,!0)}_map(r,n,i){let o=0,s=this.inverted?2:1,a=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let u=this.ranges[l]-(this.inverted?o:0);if(u>r)break;let c=this.ranges[l+s],d=this.ranges[l+a],h=u+c;if(r<=h){let p=c?r==u?-1:r==h?1:n:n,f=u+o+(p<0?0:d);if(i)return f;let m=r==(n<0?u:h)?null:Jk(l/3,r-u),b=r==u?xg:r==h?Eg:Ca;return(n<0?r!=u:r!=h)&&(b|=Dg),new Uc(f,b,m)}o+=d-c}return i?r+o:new Uc(r+o,0,null)}touches(r,n){let i=0,o=Rp(n),s=this.inverted?2:1,a=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let u=this.ranges[l]-(this.inverted?i:0);if(u>r)break;let c=this.ranges[l+s],d=u+c;if(r<=d&&l==o*3)return!0;i+=this.ranges[l+a]-c}return!1}forEach(r){let n=this.inverted?2:1,i=this.inverted?1:2;for(let o=0,s=0;o<this.ranges.length;o+=3){let a=this.ranges[o],l=a-(this.inverted?s:0),u=a+(this.inverted?0:s),c=this.ranges[o+n],d=this.ranges[o+i];r(l,l+c,u,u+d),s+=d-c}}invert(){return new Nt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(r){return r==0?Nt.empty:new Nt(r<0?[0,-r,0]:[0,0,r])}}Nt.empty=new Nt([]);class Oo{constructor(r=[],n,i=0,o=r.length){this.maps=r,this.mirror=n,this.from=i,this.to=o}slice(r=0,n=this.maps.length){return new Oo(this.maps,this.mirror,r,n)}copy(){return new Oo(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(r,n){this.to=this.maps.push(r),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(r){for(let n=0,i=this.maps.length;n<r.maps.length;n++){let o=r.getMirror(n);this.appendMap(r.maps[n],o!=null&&o<n?i+o:void 0)}}getMirror(r){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==r)return this.mirror[n+(n%2?-1:1)]}}setMirror(r,n){this.mirror||(this.mirror=[]),this.mirror.push(r,n)}appendMappingInverted(r){for(let n=r.maps.length-1,i=this.maps.length+r.maps.length;n>=0;n--){let o=r.getMirror(n);this.appendMap(r.maps[n].invert(),o!=null&&o>n?i-o-1:void 0)}}invert(){let r=new Oo;return r.appendMappingInverted(this),r}map(r,n=1){if(this.mirror)return this._map(r,n,!0);for(let i=this.from;i<this.to;i++)r=this.maps[i].map(r,n);return r}mapResult(r,n=1){return this._map(r,n,!1)}_map(r,n,i){let o=0;for(let s=this.from;s<this.to;s++){let a=this.maps[s],l=a.mapResult(r,n);if(l.recover!=null){let u=this.getMirror(s);if(u!=null&&u>s&&u<this.to){s=u,r=this.maps[u].recover(l.recover);continue}}o|=l.delInfo,r=l.pos}return i?r:new Uc(r,o,null)}}const Tu=Object.create(null);class ht{getMap(){return Nt.empty}merge(r){return null}static fromJSON(r,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let i=Tu[n.stepType];if(!i)throw new RangeError("No step type ".concat(n.stepType," defined"));return i.fromJSON(r,n)}static jsonID(r,n){if(r in Tu)throw new RangeError("Duplicate use of step JSON ID "+r);return Tu[r]=n,n.prototype.jsonID=r,n}}class Ue{constructor(r,n){this.doc=r,this.failed=n}static ok(r){return new Ue(r,null)}static fail(r){return new Ue(null,r)}static fromReplace(r,n,i,o){try{return Ue.ok(r.replace(n,i,o))}catch(s){if(s instanceof $a)return Ue.fail(s.message);throw s}}}function Kd(e,r,n){let i=[];for(let o=0;o<e.childCount;o++){let s=e.child(o);s.content.size&&(s=s.copy(Kd(s.content,r,s))),s.isInline&&(s=r(s,n,o)),i.push(s)}return O.fromArray(i)}class tn extends ht{constructor(r,n,i){super(),this.from=r,this.to=n,this.mark=i}apply(r){let n=r.slice(this.from,this.to),i=r.resolve(this.from),o=i.node(i.sharedDepth(this.to)),s=new $(Kd(n.content,(a,l)=>!a.isAtom||!l.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),o),n.openStart,n.openEnd);return Ue.fromReplace(r,this.from,this.to,s)}invert(){return new br(this.from,this.to,this.mark)}map(r){let n=r.mapResult(this.from,1),i=r.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new tn(n.pos,i.pos,this.mark)}merge(r){return r instanceof tn&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from?new tn(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(r,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new tn(n.from,n.to,r.markFromJSON(n.mark))}}ht.jsonID("addMark",tn);class br extends ht{constructor(r,n,i){super(),this.from=r,this.to=n,this.mark=i}apply(r){let n=r.slice(this.from,this.to),i=new $(Kd(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),r),n.openStart,n.openEnd);return Ue.fromReplace(r,this.from,this.to,i)}invert(){return new tn(this.from,this.to,this.mark)}map(r){let n=r.mapResult(this.from,1),i=r.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new br(n.pos,i.pos,this.mark)}merge(r){return r instanceof br&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from?new br(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(r,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new br(n.from,n.to,r.markFromJSON(n.mark))}}ht.jsonID("removeMark",br);class rn extends ht{constructor(r,n){super(),this.pos=r,this.mark=n}apply(r){let n=r.nodeAt(this.pos);if(!n)return Ue.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ue.fromReplace(r,this.pos,this.pos+1,new $(O.from(i),0,n.isLeaf?0:1))}invert(r){let n=r.nodeAt(this.pos);if(n){let i=this.mark.addToSet(n.marks);if(i.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(i))return new rn(this.pos,n.marks[o]);return new rn(this.pos,this.mark)}}return new Zi(this.pos,this.mark)}map(r){let n=r.mapResult(this.pos,1);return n.deletedAfter?null:new rn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(r,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new rn(n.pos,r.markFromJSON(n.mark))}}ht.jsonID("addNodeMark",rn);class Zi extends ht{constructor(r,n){super(),this.pos=r,this.mark=n}apply(r){let n=r.nodeAt(this.pos);if(!n)return Ue.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ue.fromReplace(r,this.pos,this.pos+1,new $(O.from(i),0,n.isLeaf?0:1))}invert(r){let n=r.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new rn(this.pos,this.mark)}map(r){let n=r.mapResult(this.pos,1);return n.deletedAfter?null:new Zi(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(r,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Zi(n.pos,r.markFromJSON(n.mark))}}ht.jsonID("removeNodeMark",Zi);class Ye extends ht{constructor(r,n,i,o=!1){super(),this.from=r,this.to=n,this.slice=i,this.structure=o}apply(r){return this.structure&&Wc(r,this.from,this.to)?Ue.fail("Structure replace would overwrite content"):Ue.fromReplace(r,this.from,this.to,this.slice)}getMap(){return new Nt([this.from,this.to-this.from,this.slice.size])}invert(r){return new Ye(this.from,this.from+this.slice.size,r.slice(this.from,this.to))}map(r){let n=r.mapResult(this.from,1),i=r.mapResult(this.to,-1);return n.deletedAcross&&i.deletedAcross?null:new Ye(n.pos,Math.max(n.pos,i.pos),this.slice)}merge(r){if(!(r instanceof Ye)||r.structure||this.structure)return null;if(this.from+this.slice.size==r.from&&!this.slice.openEnd&&!r.slice.openStart){let n=this.slice.size+r.slice.size==0?$.empty:new $(this.slice.content.append(r.slice.content),this.slice.openStart,r.slice.openEnd);return new Ye(this.from,this.to+(r.to-r.from),n,this.structure)}else if(r.to==this.from&&!this.slice.openStart&&!r.slice.openEnd){let n=this.slice.size+r.slice.size==0?$.empty:new $(r.slice.content.append(this.slice.content),r.slice.openStart,this.slice.openEnd);return new Ye(r.from,this.to,n,this.structure)}else return null}toJSON(){let r={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r}static fromJSON(r,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Ye(n.from,n.to,$.fromJSON(r,n.slice),!!n.structure)}}ht.jsonID("replace",Ye);class tt extends ht{constructor(r,n,i,o,s,a,l=!1){super(),this.from=r,this.to=n,this.gapFrom=i,this.gapTo=o,this.slice=s,this.insert=a,this.structure=l}apply(r){if(this.structure&&(Wc(r,this.from,this.gapFrom)||Wc(r,this.gapTo,this.to)))return Ue.fail("Structure gap-replace would overwrite content");let n=r.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ue.fail("Gap is not a flat range");let i=this.slice.insertAt(this.insert,n.content);return i?Ue.fromReplace(r,this.from,this.to,i):Ue.fail("Content does not fit in gap")}getMap(){return new Nt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(r){let n=this.gapTo-this.gapFrom;return new tt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,r.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(r){let n=r.mapResult(this.from,1),i=r.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:r.map(this.gapFrom,-1),s=this.to==this.gapTo?i.pos:r.map(this.gapTo,1);return n.deletedAcross&&i.deletedAcross||o<n.pos||s>i.pos?null:new tt(n.pos,i.pos,o,s,this.slice,this.insert,this.structure)}toJSON(){let r={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r}static fromJSON(r,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new tt(n.from,n.to,n.gapFrom,n.gapTo,$.fromJSON(r,n.slice),n.insert,!!n.structure)}}ht.jsonID("replaceAround",tt);function Wc(e,r,n){let i=e.resolve(r),o=n-r,s=i.depth;for(;o>0&&s>0&&i.indexAfter(s)==i.node(s).childCount;)s--,o--;if(o>0){let a=i.node(s).maybeChild(i.indexAfter(s));for(;o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}}return!1}function Qk(e,r,n,i){let o=[],s=[],a,l;e.doc.nodesBetween(r,n,(u,c,d)=>{if(!u.isInline)return;let h=u.marks;if(!i.isInSet(h)&&d.type.allowsMarkType(i.type)){let p=Math.max(c,r),f=Math.min(c+u.nodeSize,n),m=i.addToSet(h);for(let b=0;b<h.length;b++)h[b].isInSet(m)||(a&&a.to==p&&a.mark.eq(h[b])?a.to=f:o.push(a=new br(p,f,h[b])));l&&l.to==p?l.to=f:s.push(l=new tn(p,f,i))}}),o.forEach(u=>e.step(u)),s.forEach(u=>e.step(u))}function Yk(e,r,n,i){let o=[],s=0;e.doc.nodesBetween(r,n,(a,l)=>{if(!a.isInline)return;s++;let u=null;if(i instanceof Kl){let c=a.marks,d;for(;d=i.isInSet(c);)(u||(u=[])).push(d),c=d.removeFromSet(c)}else i?i.isInSet(a.marks)&&(u=[i]):u=a.marks;if(u&&u.length){let c=Math.min(l+a.nodeSize,n);for(let d=0;d<u.length;d++){let h=u[d],p;for(let f=0;f<o.length;f++){let m=o[f];m.step==s-1&&h.eq(o[f].style)&&(p=m)}p?(p.to=c,p.step=s):o.push({style:h,from:Math.max(l,r),to:c,step:s})}}}),o.forEach(a=>e.step(new br(a.from,a.to,a.style)))}function Zd(e,r,n,i=n.contentMatch,o=!0){let s=e.doc.nodeAt(r),a=[],l=r+1;for(let u=0;u<s.childCount;u++){let c=s.child(u),d=l+c.nodeSize,h=i.matchType(c.type);if(!h)a.push(new Ye(l,d,$.empty));else{i=h;for(let p=0;p<c.marks.length;p++)n.allowsMarkType(c.marks[p].type)||e.step(new br(l,d,c.marks[p]));if(o&&c.isText&&n.whitespace!="pre"){let p,f=/\r?\n|\r/g,m;for(;p=f.exec(c.text);)m||(m=new $(O.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),a.push(new Ye(l+p.index,l+p.index+p[0].length,m))}}l=d}if(!i.validEnd){let u=i.fillBefore(O.empty,!0);e.replace(l,l,new $(u,0,0))}for(let u=a.length-1;u>=0;u--)e.step(a[u])}function ew(e,r,n){return(r==0||e.canReplace(r,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function lo(e){let r=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let i=e.$from.node(n),o=e.$from.index(n),s=e.$to.indexAfter(n);if(n<e.depth&&i.canReplace(o,s,r))return n;if(n==0||i.type.spec.isolating||!ew(i,o,s))break}return null}function tw(e,r,n){let{$from:i,$to:o,depth:s}=r,a=i.before(s+1),l=o.after(s+1),u=a,c=l,d=O.empty,h=0;for(let m=s,b=!1;m>n;m--)b||i.index(m)>0?(b=!0,d=O.from(i.node(m).copy(d)),h++):u--;let p=O.empty,f=0;for(let m=s,b=!1;m>n;m--)b||o.after(m+1)<o.end(m)?(b=!0,p=O.from(o.node(m).copy(p)),f++):c++;e.step(new tt(u,c,a,l,new $(d.append(p),h,f),d.size-h,!0))}function Gd(e,r,n=null,i=e){let o=rw(e,r),s=o&&nw(i,r);return s?o.map(zp).concat({type:r,attrs:n}).concat(s.map(zp)):null}function zp(e){return{type:e,attrs:null}}function rw(e,r){let{parent:n,startIndex:i,endIndex:o}=e,s=n.contentMatchAt(i).findWrapping(r);if(!s)return null;let a=s.length?s[0]:r;return n.canReplaceWith(i,o,a)?s:null}function nw(e,r){let{parent:n,startIndex:i,endIndex:o}=e,s=n.child(i),a=r.contentMatch.findWrapping(s.type);if(!a)return null;let l=(a.length?a[a.length-1]:r).contentMatch;for(let u=i;l&&u<o;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:a}function iw(e,r,n){let i=O.empty;for(let a=n.length-1;a>=0;a--){if(i.size){let l=n[a].type.contentMatch.matchFragment(i);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=O.from(n[a].type.create(n[a].attrs,i))}let o=r.start,s=r.end;e.step(new tt(o,s,o,s,new $(i,0,0),n.length,!0))}function ow(e,r,n,i,o){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(r,n,(a,l)=>{let u=typeof o=="function"?o(a):o;if(a.isTextblock&&!a.hasMarkup(i,u)&&sw(e.doc,e.mapping.slice(s).map(l),i)){let c=null;if(i.schema.linebreakReplacement){let f=i.whitespace=="pre",m=!!i.contentMatch.matchType(i.schema.linebreakReplacement);f&&!m?c=!1:!f&&m&&(c=!0)}c===!1&&Bg(e,a,l,s),Zd(e,e.mapping.slice(s).map(l,1),i,void 0,c===null);let d=e.mapping.slice(s),h=d.map(l,1),p=d.map(l+a.nodeSize,1);return e.step(new tt(h,p,h+1,p-1,new $(O.from(i.create(u,null,a.marks)),0,0),1,!0)),c===!0&&Sg(e,a,l,s),!1}})}function Sg(e,r,n,i){r.forEach((o,s)=>{if(o.isText){let a,l=/\r?\n|\r/g;for(;a=l.exec(o.text);){let u=e.mapping.slice(i).map(n+1+s+a.index);e.replaceWith(u,u+1,r.type.schema.linebreakReplacement.create())}}})}function Bg(e,r,n,i){r.forEach((o,s)=>{if(o.type==o.type.schema.linebreakReplacement){let a=e.mapping.slice(i).map(n+1+s);e.replaceWith(a,a+1,r.type.schema.text("\n"))}})}function sw(e,r,n){let i=e.resolve(r),o=i.index();return i.parent.canReplaceWith(o,o+1,n)}function aw(e,r,n,i,o){let s=e.doc.nodeAt(r);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(i,null,o||s.marks);if(s.isLeaf)return e.replaceWith(r,r+s.nodeSize,a);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new tt(r,r+s.nodeSize,r+1,r+s.nodeSize-1,new $(O.from(a),0,0),1,!0))}function Ii(e,r,n=1,i){let o=e.resolve(r),s=o.depth-n,a=i&&i[i.length-1]||o.parent;if(s<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,d=n-2;c>s;c--,d--){let h=o.node(c),p=o.index(c);if(h.type.spec.isolating)return!1;let f=h.content.cutByIndex(p,h.childCount),m=i&&i[d+1];m&&(f=f.replaceChild(0,m.type.create(m.attrs)));let b=i&&i[d]||h;if(!h.canReplace(p+1,h.childCount)||!b.type.validContent(f))return!1}let l=o.indexAfter(s),u=i&&i[0];return o.node(s).canReplaceWith(l,l,u?u.type:o.node(s+1).type)}function lw(e,r,n=1,i){let o=e.doc.resolve(r),s=O.empty,a=O.empty;for(let l=o.depth,u=o.depth-n,c=n-1;l>u;l--,c--){s=O.from(o.node(l).copy(s));let d=i&&i[c];a=O.from(d?d.type.create(d.attrs,a):o.node(l).copy(a))}e.step(new Ye(r,r,new $(s.append(a),n,n),!0))}function vn(e,r){let n=e.resolve(r),i=n.index();return Mg(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(i,i+1)}function uw(e,r){r.content.size||e.type.compatibleContent(r.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:i}=e.type.schema;for(let o=0;o<r.childCount;o++){let s=r.child(o),a=s.type==i?e.type.schema.nodes.text:s.type;if(n=n.matchType(a),!n||!e.type.allowsMarks(s.marks))return!1}return n.validEnd}function Mg(e,r){return!!(e&&r&&!e.isLeaf&&uw(e,r))}function Zl(e,r,n=-1){let i=e.resolve(r);for(let o=i.depth;;o--){let s,a,l=i.index(o);if(o==i.depth?(s=i.nodeBefore,a=i.nodeAfter):n>0?(s=i.node(o+1),l++,a=i.node(o).maybeChild(l)):(s=i.node(o).maybeChild(l-1),a=i.node(o+1)),s&&!s.isTextblock&&Mg(s,a)&&i.node(o).canReplace(l,l+1))return r;if(o==0)break;r=n<0?i.before(o):i.after(o)}}function cw(e,r,n){let i=null,{linebreakReplacement:o}=e.doc.type.schema,s=e.doc.resolve(r-n),a=s.node().type;if(o&&a.inlineContent){let d=a.whitespace=="pre",h=!!a.contentMatch.matchType(o);d&&!h?i=!1:!d&&h&&(i=!0)}let l=e.steps.length;if(i===!1){let d=e.doc.resolve(r+n);Bg(e,d.node(),d.before(),l)}a.inlineContent&&Zd(e,r+n-1,a,s.node().contentMatchAt(s.index()),i==null);let u=e.mapping.slice(l),c=u.map(r-n);if(e.step(new Ye(c,u.map(r+n,-1),$.empty,!0)),i===!0){let d=e.doc.resolve(c);Sg(e,d.node(),d.before(),e.steps.length)}return e}function dw(e,r,n){let i=e.resolve(r);if(i.parent.canReplaceWith(i.index(),i.index(),n))return r;if(i.parentOffset==0)for(let o=i.depth-1;o>=0;o--){let s=i.index(o);if(i.node(o).canReplaceWith(s,s,n))return i.before(o+1);if(s>0)return null}if(i.parentOffset==i.parent.content.size)for(let o=i.depth-1;o>=0;o--){let s=i.indexAfter(o);if(i.node(o).canReplaceWith(s,s,n))return i.after(o+1);if(s<i.node(o).childCount)return null}return null}function Fg(e,r,n){let i=e.resolve(r);if(!n.content.size)return r;let o=n.content;for(let s=0;s<n.openStart;s++)o=o.firstChild.content;for(let s=1;s<=(n.openStart==0&&n.size?2:1);s++)for(let a=i.depth;a>=0;a--){let l=a==i.depth?0:i.pos<=(i.start(a+1)+i.end(a+1))/2?-1:1,u=i.index(a)+(l>0?1:0),c=i.node(a),d=!1;if(s==1)d=c.canReplace(u,u,o);else{let h=c.contentMatchAt(u).findWrapping(o.firstChild.type);d=h&&c.canReplaceWith(u,u,h[0])}if(d)return l==0?i.pos:l<0?i.before(a+1):i.after(a+1)}return null}function Gl(e,r,n=r,i=$.empty){if(r==n&&!i.size)return null;let o=e.resolve(r),s=e.resolve(n);return Ng(o,s,i)?new Ye(r,n,i):new hw(o,s,i).fit()}function Ng(e,r,n){return!n.openStart&&!n.openEnd&&e.start()==r.start()&&e.parent.canReplace(e.index(),r.index(),n.content)}class hw{constructor(r,n,i){this.$from=r,this.$to=n,this.unplaced=i,this.frontier=[],this.placed=O.empty;for(let o=0;o<=r.depth;o++){let s=r.node(o);this.frontier.push({type:s.type,match:s.contentMatchAt(r.indexAfter(o))})}for(let o=r.depth;o>0;o--)this.placed=O.from(r.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let r=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,i=this.$from,o=this.close(r<0?this.$to:i.doc.resolve(r));if(!o)return null;let s=this.placed,a=i.depth,l=o.depth;for(;a&&l&&s.childCount==1;)s=s.firstChild.content,a--,l--;let u=new $(s,a,l);return r>-1?new tt(i.pos,r,this.$to.pos,this.$to.end(),u,n):u.size||i.pos!=this.$to.pos?new Ye(i.pos,o.pos,u):null}findFittable(){let r=this.unplaced.openStart;for(let n=this.unplaced.content,i=0,o=this.unplaced.openEnd;i<r;i++){let s=n.firstChild;if(n.childCount>1&&(o=0),s.type.spec.isolating&&o<=i){r=i;break}n=s.content}for(let n=1;n<=2;n++)for(let i=n==1?r:this.unplaced.openStart;i>=0;i--){let o,s=null;i?(s=Lu(this.unplaced.content,i-1).firstChild,o=s.content):o=this.unplaced.content;let a=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:u,match:c}=this.frontier[l],d,h=null;if(n==1&&(a?c.matchType(a.type)||(h=c.fillBefore(O.from(a),!1)):s&&u.compatibleContent(s.type)))return{sliceDepth:i,frontierDepth:l,parent:s,inject:h};if(n==2&&a&&(d=c.findWrapping(a.type)))return{sliceDepth:i,frontierDepth:l,parent:s,wrap:d};if(s&&c.matchType(s.type))break}}}openMore(){let{content:r,openStart:n,openEnd:i}=this.unplaced,o=Lu(r,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new $(r,n+1,Math.max(i,o.size+n>=r.size-i?n+1:0)),!0)}dropNode(){let{content:r,openStart:n,openEnd:i}=this.unplaced,o=Lu(r,n);if(o.childCount<=1&&n>0){let s=r.size-n<=n+o.size;this.unplaced=new $(Ao(r,n-1,1),n-1,s?n-1:i)}else this.unplaced=new $(Ao(r,n,1),n,i)}placeNodes({sliceDepth:r,frontierDepth:n,parent:i,inject:o,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let b=0;b<s.length;b++)this.openFrontierNode(s[b]);let a=this.unplaced,l=i?i.content:a.content,u=a.openStart-r,c=0,d=[],{match:h,type:p}=this.frontier[n];if(o){for(let b=0;b<o.childCount;b++)d.push(o.child(b));h=h.matchFragment(o)}let f=l.size+r-(a.content.size-a.openEnd);for(;c<l.childCount;){let b=l.child(c),g=h.matchType(b.type);if(!g)break;c++,(c>1||u==0||b.content.size)&&(h=g,d.push(Og(b.mark(p.allowedMarks(b.marks)),c==1?u:0,c==l.childCount?f:-1)))}let m=c==l.childCount;m||(f=-1),this.placed=_o(this.placed,n,O.from(d)),this.frontier[n].match=h,m&&f<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let b=0,g=l;b<f;b++){let y=g.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),g=y.content}this.unplaced=m?r==0?$.empty:new $(Ao(a.content,r-1,1),r-1,f<0?a.openEnd:r-1):new $(Ao(a.content,r,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let r=this.frontier[this.depth],n;if(!r.type.isTextblock||!Iu(this.$to,this.$to.depth,r.type,r.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:i}=this.$to,o=this.$to.after(i);for(;i>1&&o==this.$to.end(--i);)++o;return o}findCloseLevel(r){e:for(let n=Math.min(this.depth,r.depth);n>=0;n--){let{match:i,type:o}=this.frontier[n],s=n<r.depth&&r.end(n+1)==r.pos+(r.depth-(n+1)),a=Iu(r,n,o,i,s);if(a){for(let l=n-1;l>=0;l--){let{match:u,type:c}=this.frontier[l],d=Iu(r,l,c,u,!0);if(!d||d.childCount)continue e}return{depth:n,fit:a,move:s?r.doc.resolve(r.after(n+1)):r}}}}close(r){let n=this.findCloseLevel(r);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=_o(this.placed,n.depth,n.fit)),r=n.move;for(let i=n.depth+1;i<=r.depth;i++){let o=r.node(i),s=o.type.contentMatch.fillBefore(o.content,!0,r.index(i));this.openFrontierNode(o.type,o.attrs,s)}return r}openFrontierNode(r,n=null,i){let o=this.frontier[this.depth];o.match=o.match.matchType(r),this.placed=_o(this.placed,this.depth,O.from(r.create(n,i))),this.frontier.push({type:r,match:r.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(O.empty,!0);r.childCount&&(this.placed=_o(this.placed,this.frontier.length,r))}}function Ao(e,r,n){return r==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Ao(e.firstChild.content,r-1,n)))}function _o(e,r,n){return r==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(_o(e.lastChild.content,r-1,n)))}function Lu(e,r){for(let n=0;n<r;n++)e=e.firstChild.content;return e}function Og(e,r,n){if(r<=0)return e;let i=e.content;return r>1&&(i=i.replaceChild(0,Og(i.firstChild,r-1,i.childCount==1?n-1:0))),r>0&&(i=e.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(e.type.contentMatch.matchFragment(i).fillBefore(O.empty,!0)))),e.copy(i)}function Iu(e,r,n,i,o){let s=e.node(r),a=o?e.indexAfter(r):e.index(r);if(a==s.childCount&&!n.compatibleContent(s.type))return null;let l=i.fillBefore(s.content,!0,a);return l&&!pw(n,s.content,a)?l:null}function pw(e,r,n){for(let i=n;i<r.childCount;i++)if(!e.allowsMarks(r.child(i).marks))return!0;return!1}function fw(e){return e.spec.defining||e.spec.definingForContent}function mw(e,r,n,i){if(!i.size)return e.deleteRange(r,n);let o=e.doc.resolve(r),s=e.doc.resolve(n);if(Ng(o,s,i))return e.step(new Ye(r,n,i));let a=Lg(o,e.doc.resolve(n));a[a.length-1]==0&&a.pop();let l=-(o.depth+1);a.unshift(l);for(let p=o.depth,f=o.pos-1;p>0;p--,f--){let m=o.node(p).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;a.indexOf(p)>-1?l=p:o.before(p)==f&&a.splice(1,0,-p)}let u=a.indexOf(l),c=[],d=i.openStart;for(let p=i.content,f=0;;f++){let m=p.firstChild;if(c.push(m),f==i.openStart)break;p=m.content}for(let p=d-1;p>=0;p--){let f=c[p],m=fw(f.type);if(m&&!f.sameMarkup(o.node(Math.abs(l)-1)))d=p;else if(m||!f.type.isTextblock)break}for(let p=i.openStart;p>=0;p--){let f=(p+d+1)%(i.openStart+1),m=c[f];if(m)for(let b=0;b<a.length;b++){let g=a[(b+u)%a.length],y=!0;g<0&&(y=!1,g=-g);let v=o.node(g-1),k=o.index(g-1);if(v.canReplaceWith(k,k,m.type,m.marks))return e.replace(o.before(g),y?s.after(g):n,new $(Tg(i.content,0,i.openStart,f),f,i.openEnd))}}let h=e.steps.length;for(let p=a.length-1;p>=0&&(e.replace(r,n,i),!(e.steps.length>h));p--){let f=a[p];f<0||(r=o.before(f),n=s.after(f))}}function Tg(e,r,n,i,o){if(r<n){let s=e.firstChild;e=e.replaceChild(0,s.copy(Tg(s.content,r+1,n,i,s)))}if(r>i){let s=o.contentMatchAt(0),a=s.fillBefore(e).append(e);e=a.append(s.matchFragment(a).fillBefore(O.empty,!0))}return e}function gw(e,r,n,i){if(!i.isInline&&r==n&&e.doc.resolve(r).parent.content.size){let o=dw(e.doc,r,i.type);o!=null&&(r=n=o)}e.replaceRange(r,n,new $(O.from(i),0,0))}function bw(e,r,n){let i=e.doc.resolve(r),o=e.doc.resolve(n),s=Lg(i,o);for(let a=0;a<s.length;a++){let l=s[a],u=a==s.length-1;if(u&&l==0||i.node(l).type.contentMatch.validEnd)return e.delete(i.start(l),o.end(l));if(l>0&&(u||i.node(l-1).canReplace(i.index(l-1),o.indexAfter(l-1))))return e.delete(i.before(l),o.after(l))}for(let a=1;a<=i.depth&&a<=o.depth;a++)if(r-i.start(a)==i.depth-a&&n>i.end(a)&&o.end(a)-n!=o.depth-a&&i.start(a-1)==o.start(a-1)&&i.node(a-1).canReplace(i.index(a-1),o.index(a-1)))return e.delete(i.before(a),n);e.delete(r,n)}function Lg(e,r){let n=[],i=Math.min(e.depth,r.depth);for(let o=i;o>=0;o--){let s=e.start(o);if(s<e.pos-(e.depth-o)||r.end(o)>r.pos+(r.depth-o)||e.node(o).type.spec.isolating||r.node(o).type.spec.isolating)break;(s==r.start(o)||o==e.depth&&o==r.depth&&e.parent.inlineContent&&r.parent.inlineContent&&o&&r.start(o-1)==s-1)&&n.push(o)}return n}class Ri extends ht{constructor(r,n,i){super(),this.pos=r,this.attr=n,this.value=i}apply(r){let n=r.nodeAt(this.pos);if(!n)return Ue.fail("No node at attribute step's position");let i=Object.create(null);for(let s in n.attrs)i[s]=n.attrs[s];i[this.attr]=this.value;let o=n.type.create(i,null,n.marks);return Ue.fromReplace(r,this.pos,this.pos+1,new $(O.from(o),0,n.isLeaf?0:1))}getMap(){return Nt.empty}invert(r){return new Ri(this.pos,this.attr,r.nodeAt(this.pos).attrs[this.attr])}map(r){let n=r.mapResult(this.pos,1);return n.deletedAfter?null:new Ri(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(r,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Ri(n.pos,n.attr,n.value)}}ht.jsonID("attr",Ri);class Wo extends ht{constructor(r,n){super(),this.attr=r,this.value=n}apply(r){let n=Object.create(null);for(let o in r.attrs)n[o]=r.attrs[o];n[this.attr]=this.value;let i=r.type.create(n,r.content,r.marks);return Ue.ok(i)}getMap(){return Nt.empty}invert(r){return new Wo(this.attr,r.attrs[this.attr])}map(r){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(r,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Wo(n.attr,n.value)}}ht.jsonID("docAttr",Wo);let ki=class extends Error{};ki=function e(r){let n=Error.call(this,r);return n.__proto__=e.prototype,n},ki.prototype=Object.create(Error.prototype),ki.prototype.constructor=ki,ki.prototype.name="TransformError";class Jd{constructor(r){this.doc=r,this.steps=[],this.docs=[],this.mapping=new Oo}get before(){return this.docs.length?this.docs[0]:this.doc}step(r){let n=this.maybeStep(r);if(n.failed)throw new ki(n.failed);return this}maybeStep(r){let n=r.apply(this.doc);return n.failed||this.addStep(r,n.doc),n}get docChanged(){return this.steps.length>0}addStep(r,n){this.docs.push(this.doc),this.steps.push(r),this.mapping.appendMap(r.getMap()),this.doc=n}replace(r,n=r,i=$.empty){let o=Gl(this.doc,r,n,i);return o&&this.step(o),this}replaceWith(r,n,i){return this.replace(r,n,new $(O.from(i),0,0))}delete(r,n){return this.replace(r,n,$.empty)}insert(r,n){return this.replaceWith(r,r,n)}replaceRange(r,n,i){return mw(this,r,n,i),this}replaceRangeWith(r,n,i){return gw(this,r,n,i),this}deleteRange(r,n){return bw(this,r,n),this}lift(r,n){return tw(this,r,n),this}join(r,n=1){return cw(this,r,n),this}wrap(r,n){return iw(this,r,n),this}setBlockType(r,n=r,i,o=null){return ow(this,r,n,i,o),this}setNodeMarkup(r,n,i=null,o){return aw(this,r,n,i,o),this}setNodeAttribute(r,n,i){return this.step(new Ri(r,n,i)),this}setDocAttribute(r,n){return this.step(new Wo(r,n)),this}addNodeMark(r,n){return this.step(new rn(r,n)),this}removeNodeMark(r,n){if(!(n instanceof _e)){let i=this.doc.nodeAt(r);if(!i)throw new RangeError("No node at position "+r);if(n=n.isInSet(i.marks),!n)return this}return this.step(new Zi(r,n)),this}split(r,n=1,i){return lw(this,r,n,i),this}addMark(r,n,i){return Qk(this,r,n,i),this}removeMark(r,n,i){return Yk(this,r,n,i),this}clearIncompatible(r,n,i){return Zd(this,r,n,i),this}}const Ru=Object.create(null);class ne{constructor(r,n,i){this.$anchor=r,this.$head=n,this.ranges=i||[new Ig(r.min(n),r.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let r=this.ranges;for(let n=0;n<r.length;n++)if(r[n].$from.pos!=r[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(r,n=$.empty){let i=n.content.lastChild,o=null;for(let l=0;l<n.openEnd;l++)o=i,i=i.lastChild;let s=r.steps.length,a=this.ranges;for(let l=0;l<a.length;l++){let{$from:u,$to:c}=a[l],d=r.mapping.slice(s);r.replaceRange(d.map(u.pos),d.map(c.pos),l?$.empty:n),l==0&&Pp(r,s,(i?i.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(r,n){let i=r.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:a,$to:l}=o[s],u=r.mapping.slice(i),c=u.map(a.pos),d=u.map(l.pos);s?r.deleteRange(c,d):(r.replaceRangeWith(c,d,n),Pp(r,i,n.isInline?-1:1))}}static findFrom(r,n,i=!1){let o=r.parent.inlineContent?new Q(r):wi(r.node(0),r.parent,r.pos,r.index(),n,i);if(o)return o;for(let s=r.depth-1;s>=0;s--){let a=n<0?wi(r.node(0),r.node(s),r.before(s+1),r.index(s),n,i):wi(r.node(0),r.node(s),r.after(s+1),r.index(s)+1,n,i);if(a)return a}return null}static near(r,n=1){return this.findFrom(r,n)||this.findFrom(r,-n)||new nr(r.node(0))}static atStart(r){return wi(r,r,0,0,1)||new nr(r)}static atEnd(r){return wi(r,r,r.content.size,r.childCount,-1)||new nr(r)}static fromJSON(r,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=Ru[n.type];if(!i)throw new RangeError("No selection type ".concat(n.type," defined"));return i.fromJSON(r,n)}static jsonID(r,n){if(r in Ru)throw new RangeError("Duplicate use of selection JSON ID "+r);return Ru[r]=n,n.prototype.jsonID=r,n}getBookmark(){return Q.between(this.$anchor,this.$head).getBookmark()}}ne.prototype.visible=!0;class Ig{constructor(r,n){this.$from=r,this.$to=n}}let $p=!1;function Hp(e){!$p&&!e.parent.inlineContent&&($p=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Q extends ne{constructor(r,n=r){Hp(r),Hp(n),super(r,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(r,n){let i=r.resolve(n.map(this.head));if(!i.parent.inlineContent)return ne.near(i);let o=r.resolve(n.map(this.anchor));return new Q(o.parent.inlineContent?o:i,i)}replace(r,n=$.empty){if(super.replace(r,n),n==$.empty){let i=this.$from.marksAcross(this.$to);i&&r.ensureMarks(i)}}eq(r){return r instanceof Q&&r.anchor==this.anchor&&r.head==this.head}getBookmark(){return new Jl(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(r,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Q(r.resolve(n.anchor),r.resolve(n.head))}static create(r,n,i=n){let o=r.resolve(n);return new this(o,i==n?o:r.resolve(i))}static between(r,n,i){let o=r.pos-n.pos;if((!i||o)&&(i=o>=0?1:-1),!n.parent.inlineContent){let s=ne.findFrom(n,i,!0)||ne.findFrom(n,-i,!0);if(s)n=s.$head;else return ne.near(n,i)}return r.parent.inlineContent||(o==0?r=n:(r=(ne.findFrom(r,-i,!0)||ne.findFrom(r,i,!0)).$anchor,r.pos<n.pos!=o<0&&(r=n))),new Q(r,n)}}ne.jsonID("text",Q);class Jl{constructor(r,n){this.anchor=r,this.head=n}map(r){return new Jl(r.map(this.anchor),r.map(this.head))}resolve(r){return Q.between(r.resolve(this.anchor),r.resolve(this.head))}}class ee extends ne{constructor(r){let n=r.nodeAfter,i=r.node(0).resolve(r.pos+n.nodeSize);super(r,i),this.node=n}map(r,n){let{deleted:i,pos:o}=n.mapResult(this.anchor),s=r.resolve(o);return i?ne.near(s):new ee(s)}content(){return new $(O.from(this.node),0,0)}eq(r){return r instanceof ee&&r.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Xd(this.anchor)}static fromJSON(r,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ee(r.resolve(n.anchor))}static create(r,n){return new ee(r.resolve(n))}static isSelectable(r){return!r.isText&&r.type.spec.selectable!==!1}}ee.prototype.visible=!1,ne.jsonID("node",ee);class Xd{constructor(r){this.anchor=r}map(r){let{deleted:n,pos:i}=r.mapResult(this.anchor);return n?new Jl(i,i):new Xd(i)}resolve(r){let n=r.resolve(this.anchor),i=n.nodeAfter;return i&&ee.isSelectable(i)?new ee(n):ne.near(n)}}class nr extends ne{constructor(r){super(r.resolve(0),r.resolve(r.content.size))}replace(r,n=$.empty){if(n==$.empty){r.delete(0,r.doc.content.size);let i=ne.atStart(r.doc);i.eq(r.selection)||r.setSelection(i)}else super.replace(r,n)}toJSON(){return{type:"all"}}static fromJSON(r){return new nr(r)}map(r){return new nr(r)}eq(r){return r instanceof nr}getBookmark(){return yw}}ne.jsonID("all",nr);const yw={map(){return this},resolve(e){return new nr(e)}};function wi(e,r,n,i,o,s=!1){if(r.inlineContent)return Q.create(e,n);for(let a=i-(o>0?0:1);o>0?a<r.childCount:a>=0;a+=o){let l=r.child(a);if(l.isAtom){if(!s&&ee.isSelectable(l))return ee.create(e,n-(o<0?l.nodeSize:0))}else{let u=wi(e,l,n+o,o<0?l.childCount:0,o,s);if(u)return u}n+=l.nodeSize*o}return null}function Pp(e,r,n){let i=e.steps.length-1;if(i<r)return;let o=e.steps[i];if(!(o instanceof Ye||o instanceof tt))return;let s=e.mapping.maps[i],a;s.forEach((l,u,c,d)=>{a==null&&(a=d)}),e.setSelection(ne.near(e.doc.resolve(a),n))}const Vp=1,js=2,jp=4;let Cw=class extends Jd{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Vp)&~js,this.storedMarks=null,this}get selectionSet(){return(this.updated&Vp)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=js,this}ensureMarks(e){return _e.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&js)>0}addStep(e,r){super.addStep(e,r),this.updated=this.updated&~js,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,r=!0){let n=this.selection;return r&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||_e.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,r,n){let i=this.doc.type.schema;if(r==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(n==null&&(n=r),n=n!=null?n:r,!e)return this.deleteRange(r,n);let o=this.storedMarks;if(!o){let s=this.doc.resolve(r);o=n==r?s.marks():s.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,i.text(e,o)),this.selection.empty||this.setSelection(ne.near(this.selection.$to)),this}}setMeta(e,r){return this.meta[typeof e=="string"?e:e.key]=r,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=jp,this}get scrolledIntoView(){return(this.updated&jp)>0}};function qp(e,r){return!r||!e?e:e.bind(r)}class Eo{constructor(r,n,i){this.name=r,this.init=qp(n.init,i),this.apply=qp(n.apply,i)}}const vw=[new Eo("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Eo("selection",{init(e,r){return e.selection||ne.atStart(r.doc)},apply(e){return e.selection}}),new Eo("storedMarks",{init(e){return e.storedMarks||null},apply(e,r,n,i){return i.selection.$cursor?e.storedMarks:null}}),new Eo("scrollToSelection",{init(){return 0},apply(e,r){return e.scrolledIntoView?r+1:r}})];class zu{constructor(r,n){this.schema=r,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=vw.slice(),n&&n.forEach(i=>{if(this.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");this.plugins.push(i),this.pluginsByKey[i.key]=i,i.spec.state&&this.fields.push(new Eo(i.key,i.spec.state,i))})}}class Mi{constructor(r){this.config=r}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(r){return this.applyTransaction(r).state}filterTransaction(r,n=-1){for(let i=0;i<this.config.plugins.length;i++)if(i!=n){let o=this.config.plugins[i];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,r,this))return!1}return!0}applyTransaction(r){if(!this.filterTransaction(r))return{state:this,transactions:[]};let n=[r],i=this.applyInner(r),o=null;for(;;){let s=!1;for(let a=0;a<this.config.plugins.length;a++){let l=this.config.plugins[a];if(l.spec.appendTransaction){let u=o?o[a].n:0,c=o?o[a].state:this,d=u<n.length&&l.spec.appendTransaction.call(l,u?n.slice(u):n,c,i);if(d&&i.filterTransaction(d,a)){if(d.setMeta("appendedTransaction",r),!o){o=[];for(let h=0;h<this.config.plugins.length;h++)o.push(h<a?{state:i,n:n.length}:{state:this,n:0})}n.push(d),i=i.applyInner(d),s=!0}o&&(o[a]={state:i,n:n.length})}}if(!s)return{state:i,transactions:n}}}applyInner(r){if(!r.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Mi(this.config),i=this.config.fields;for(let o=0;o<i.length;o++){let s=i[o];n[s.name]=s.apply(r,this[s.name],this,n)}return n}get tr(){return new Cw(this)}static create(r){let n=new zu(r.doc?r.doc.type.schema:r.schema,r.plugins),i=new Mi(n);for(let o=0;o<n.fields.length;o++)i[n.fields[o].name]=n.fields[o].init(r,i);return i}reconfigure(r){let n=new zu(this.schema,r.plugins),i=n.fields,o=new Mi(n);for(let s=0;s<i.length;s++){let a=i[s].name;o[a]=this.hasOwnProperty(a)?this[a]:i[s].init(r,o)}return o}toJSON(r){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(i=>i.toJSON())),r&&typeof r=="object")for(let i in r){if(i=="doc"||i=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=r[i],s=o.spec.state;s&&s.toJSON&&(n[i]=s.toJSON.call(o,this[o.key]))}return n}static fromJSON(r,n,i){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!r.schema)throw new RangeError("Required config field 'schema' missing");let o=new zu(r.schema,r.plugins),s=new Mi(o);return o.fields.forEach(a=>{if(a.name=="doc")s.doc=Pn.fromJSON(r.schema,n.doc);else if(a.name=="selection")s.selection=ne.fromJSON(s.doc,n.selection);else if(a.name=="storedMarks")n.storedMarks&&(s.storedMarks=n.storedMarks.map(r.schema.markFromJSON));else{if(i)for(let l in i){let u=i[l],c=u.spec.state;if(u.key==a.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){s[a.name]=c.fromJSON.call(u,r,n[l],s);return}}s[a.name]=a.init(r,s)}}),s}}function Rg(e,r,n){for(let i in e){let o=e[i];o instanceof Function?o=o.bind(r):i=="handleDOMEvents"&&(o=Rg(o,r,{})),n[i]=o}return n}class fe{constructor(r){this.spec=r,this.props={},r.props&&Rg(r.props,this,this.props),this.key=r.key?r.key.key:zg("plugin")}getState(r){return r[this.key]}}const $u=Object.create(null);function zg(e){return e in $u?e+"$"+ ++$u[e]:($u[e]=0,e+"$")}class ve{constructor(r="key"){this.key=zg(r)}get(r){return r.config.pluginsByKey[this.key]}getState(r){return r[this.key]}}const ot=function(e){for(var r=0;;r++)if(e=e.previousSibling,!e)return r},Ko=function(e){let r=e.assignedSlot||e.parentNode;return r&&r.nodeType==11?r.host:r};let Kc=null;const Ir=function(e,r,n){let i=Kc||(Kc=document.createRange());return i.setEnd(e,n!=null?n:e.nodeValue.length),i.setStart(e,r||0),i},kw=function(){Kc=null},Xn=function(e,r,n,i){return n&&(Up(e,r,n,i,-1)||Up(e,r,n,i,1))},ww=/^(img|br|input|textarea|hr)$/i;function Up(e,r,n,i,o){for(;;){if(e==n&&r==i)return!0;if(r==(o<0?0:jt(e))){let s=e.parentNode;if(!s||s.nodeType!=1||Es(e)||ww.test(e.nodeName)||e.contentEditable=="false")return!1;r=ot(e)+(o<0?0:1),e=s}else if(e.nodeType==1){if(e=e.childNodes[r+(o<0?-1:0)],e.contentEditable=="false")return!1;r=o<0?jt(e):0}else return!1}}function jt(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Aw(e,r){for(;;){if(e.nodeType==3&&r)return e;if(e.nodeType==1&&r>0){if(e.contentEditable=="false")return null;e=e.childNodes[r-1],r=jt(e)}else if(e.parentNode&&!Es(e))r=ot(e),e=e.parentNode;else return null}}function _w(e,r){for(;;){if(e.nodeType==3&&r<e.nodeValue.length)return e;if(e.nodeType==1&&r<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[r],r=0}else if(e.parentNode&&!Es(e))r=ot(e)+1,e=e.parentNode;else return null}}function Ew(e,r,n){for(let i=r==0,o=r==jt(e);i||o;){if(e==n)return!0;let s=ot(e);if(e=e.parentNode,!e)return!1;i=i&&s==0,o=o&&s==jt(e)}}function Es(e){let r;for(let n=e;n&&!(r=n.pmViewDesc);n=n.parentNode);return r&&r.node&&r.node.isBlock&&(r.dom==e||r.contentDOM==e)}const Xl=function(e){return e.focusNode&&Xn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Mn(e,r){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=r,n}function xw(e){let r=e.activeElement;for(;r&&r.shadowRoot;)r=r.shadowRoot.activeElement;return r}function Dw(e,r,n){if(e.caretPositionFromPoint)try{let i=e.caretPositionFromPoint(r,n);if(i)return{node:i.offsetNode,offset:Math.min(jt(i.offsetNode),i.offset)}}catch{}if(e.caretRangeFromPoint){let i=e.caretRangeFromPoint(r,n);if(i)return{node:i.startContainer,offset:Math.min(jt(i.startContainer),i.startOffset)}}}const Ar=typeof navigator<"u"?navigator:null,Wp=typeof document<"u"?document:null,kn=Ar&&Ar.userAgent||"",Zc=/Edge\/(\d+)/.exec(kn),$g=/MSIE \d/.exec(kn),Gc=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(kn),_t=!!($g||Gc||Zc),cn=$g?document.documentMode:Gc?+Gc[1]:Zc?+Zc[1]:0,or=!_t&&/gecko\/(\d+)/i.test(kn);or&&+(/Firefox\/(\d+)/.exec(kn)||[0,0])[1];const Jc=!_t&&/Chrome\/(\d+)/.exec(kn),ut=!!Jc,Hg=Jc?+Jc[1]:0,yt=!_t&&!!Ar&&/Apple Computer/.test(Ar.vendor),Gi=yt&&(/Mobile\/\w+/.test(kn)||!!Ar&&Ar.maxTouchPoints>2),Vt=Gi||(Ar?/Mac/.test(Ar.platform):!1),Sw=Ar?/Win/.test(Ar.platform):!1,Yt=/Android \d/.test(kn),xs=!!Wp&&"webkitFontSmoothing"in Wp.documentElement.style,Bw=xs?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Mw(e){let r=e.defaultView&&e.defaultView.visualViewport;return r?{left:0,right:r.width,top:0,bottom:r.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Fr(e,r){return typeof e=="number"?e:e[r]}function Fw(e){let r=e.getBoundingClientRect(),n=r.width/e.offsetWidth||1,i=r.height/e.offsetHeight||1;return{left:r.left,right:r.left+e.clientWidth*n,top:r.top,bottom:r.top+e.clientHeight*i}}function Kp(e,r,n){let i=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,s=e.dom.ownerDocument;for(let a=n||e.dom;a;a=Ko(a)){if(a.nodeType!=1)continue;let l=a,u=l==s.body,c=u?Mw(s):Fw(l),d=0,h=0;if(r.top<c.top+Fr(i,"top")?h=-(c.top-r.top+Fr(o,"top")):r.bottom>c.bottom-Fr(i,"bottom")&&(h=r.bottom-r.top>c.bottom-c.top?r.top+Fr(o,"top")-c.top:r.bottom-c.bottom+Fr(o,"bottom")),r.left<c.left+Fr(i,"left")?d=-(c.left-r.left+Fr(o,"left")):r.right>c.right-Fr(i,"right")&&(d=r.right-c.right+Fr(o,"right")),d||h)if(u)s.defaultView.scrollBy(d,h);else{let p=l.scrollLeft,f=l.scrollTop;h&&(l.scrollTop+=h),d&&(l.scrollLeft+=d);let m=l.scrollLeft-p,b=l.scrollTop-f;r={left:r.left-m,top:r.top-b,right:r.right-m,bottom:r.bottom-b}}if(u||/^(fixed|sticky)$/.test(getComputedStyle(a).position))break}}function Nw(e){let r=e.dom.getBoundingClientRect(),n=Math.max(0,r.top),i,o;for(let s=(r.left+r.right)/2,a=n+1;a<Math.min(innerHeight,r.bottom);a+=5){let l=e.root.elementFromPoint(s,a);if(!l||l==e.dom||!e.dom.contains(l))continue;let u=l.getBoundingClientRect();if(u.top>=n-20){i=l,o=u.top;break}}return{refDOM:i,refTop:o,stack:Pg(e.dom)}}function Pg(e){let r=[],n=e.ownerDocument;for(let i=e;i&&(r.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),e!=n);i=Ko(i));return r}function Ow({refDOM:e,refTop:r,stack:n}){let i=e?e.getBoundingClientRect().top:0;Vg(n,i==0?0:i-r)}function Vg(e,r){for(let n=0;n<e.length;n++){let{dom:i,top:o,left:s}=e[n];i.scrollTop!=o+r&&(i.scrollTop=o+r),i.scrollLeft!=s&&(i.scrollLeft=s)}}let fi=null;function Tw(e){if(e.setActive)return e.setActive();if(fi)return e.focus(fi);let r=Pg(e);e.focus(fi==null?{get preventScroll(){return fi={preventScroll:!0},!0}}:void 0),fi||(fi=!1,Vg(r,0))}function jg(e,r){let n,i=2e8,o,s=0,a=r.top,l=r.top,u,c;for(let d=e.firstChild,h=0;d;d=d.nextSibling,h++){let p;if(d.nodeType==1)p=d.getClientRects();else if(d.nodeType==3)p=Ir(d).getClientRects();else continue;for(let f=0;f<p.length;f++){let m=p[f];if(m.top<=a&&m.bottom>=l){a=Math.max(m.bottom,a),l=Math.min(m.top,l);let b=m.left>r.left?m.left-r.left:m.right<r.left?r.left-m.right:0;if(b<i){n=d,i=b,o=b&&n.nodeType==3?{left:m.right<r.left?m.right:m.left,top:r.top}:r,d.nodeType==1&&b&&(s=h+(r.left>=(m.left+m.right)/2?1:0));continue}}else m.top>r.top&&!u&&m.left<=r.left&&m.right>=r.left&&(u=d,c={left:Math.max(m.left,Math.min(m.right,r.left)),top:m.top});!n&&(r.left>=m.right&&r.top>=m.top||r.left>=m.left&&r.top>=m.bottom)&&(s=h+1)}}return!n&&u&&(n=u,o=c,i=0),n&&n.nodeType==3?Lw(n,o):!n||i&&n.nodeType==1?{node:e,offset:s}:jg(n,o)}function Lw(e,r){let n=e.nodeValue.length,i=document.createRange();for(let o=0;o<n;o++){i.setEnd(e,o+1),i.setStart(e,o);let s=Kr(i,1);if(s.top!=s.bottom&&Qd(r,s))return{node:e,offset:o+(r.left>=(s.left+s.right)/2?1:0)}}return{node:e,offset:0}}function Qd(e,r){return e.left>=r.left-1&&e.left<=r.right+1&&e.top>=r.top-1&&e.top<=r.bottom+1}function Iw(e,r){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&r.left<e.getBoundingClientRect().left?n:e}function Rw(e,r,n){let{node:i,offset:o}=jg(r,n),s=-1;if(i.nodeType==1&&!i.firstChild){let a=i.getBoundingClientRect();s=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return e.docView.posFromDOM(i,o,s)}function zw(e,r,n,i){let o=-1;for(let s=r,a=!1;s!=e.dom;){let l=e.docView.nearestDesc(s,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)){let u=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&(!a&&u.left>i.left||u.top>i.top?o=l.posBefore:(!a&&u.right<i.left||u.bottom<i.top)&&(o=l.posAfter),a=!0),!l.contentDOM&&o<0&&!l.node.isText)return(l.node.isBlock?i.top<(u.top+u.bottom)/2:i.left<(u.left+u.right)/2)?l.posBefore:l.posAfter}s=l.dom.parentNode}return o>-1?o:e.docView.posFromDOM(r,n,-1)}function qg(e,r,n){let i=e.childNodes.length;if(i&&n.top<n.bottom)for(let o=Math.max(0,Math.min(i-1,Math.floor(i*(r.top-n.top)/(n.bottom-n.top))-2)),s=o;;){let a=e.childNodes[s];if(a.nodeType==1){let l=a.getClientRects();for(let u=0;u<l.length;u++){let c=l[u];if(Qd(r,c))return qg(a,r,c)}}if((s=(s+1)%i)==o)break}return e}function $w(e,r){let n=e.dom.ownerDocument,i,o=0,s=Dw(n,r.left,r.top);s&&({node:i,offset:o}=s);let a=(e.root.elementFromPoint?e.root:n).elementFromPoint(r.left,r.top),l;if(!a||!e.dom.contains(a.nodeType!=1?a.parentNode:a)){let c=e.dom.getBoundingClientRect();if(!Qd(r,c)||(a=qg(e.dom,r,c),!a))return null}if(yt)for(let c=a;i&&c;c=Ko(c))c.draggable&&(i=void 0);if(a=Iw(a,r),i){if(or&&i.nodeType==1&&(o=Math.min(o,i.childNodes.length),o<i.childNodes.length)){let d=i.childNodes[o],h;d.nodeName=="IMG"&&(h=d.getBoundingClientRect()).right<=r.left&&h.bottom>r.top&&o++}let c;xs&&o&&i.nodeType==1&&(c=i.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=r.top&&o--,i==e.dom&&o==i.childNodes.length-1&&i.lastChild.nodeType==1&&r.top>i.lastChild.getBoundingClientRect().bottom?l=e.state.doc.content.size:(o==0||i.nodeType!=1||i.childNodes[o-1].nodeName!="BR")&&(l=zw(e,i,o,r))}l==null&&(l=Rw(e,a,r));let u=e.docView.nearestDesc(a,!0);return{pos:l,inside:u?u.posAtStart-u.border:-1}}function Zp(e){return e.top<e.bottom||e.left<e.right}function Kr(e,r){let n=e.getClientRects();if(n.length){let i=n[r<0?0:n.length-1];if(Zp(i))return i}return Array.prototype.find.call(n,Zp)||e.getBoundingClientRect()}const Hw=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Ug(e,r,n){let{node:i,offset:o,atom:s}=e.docView.domFromPos(r,n<0?-1:1),a=xs||or;if(i.nodeType==3)if(a&&(Hw.test(i.nodeValue)||(n<0?!o:o==i.nodeValue.length))){let l=Kr(Ir(i,o,o),n);if(or&&o&&/\s/.test(i.nodeValue[o-1])&&o<i.nodeValue.length){let u=Kr(Ir(i,o-1,o-1),-1);if(u.top==l.top){let c=Kr(Ir(i,o,o+1),-1);if(c.top!=l.top)return Co(c,c.left<u.left)}}return l}else{let l=o,u=o,c=n<0?1:-1;return n<0&&!o?(u++,c=-1):n>=0&&o==i.nodeValue.length?(l--,c=1):n<0?l--:u++,Co(Kr(Ir(i,l,u),c),c<0)}if(!e.state.doc.resolve(r-(s||0)).parent.inlineContent){if(s==null&&o&&(n<0||o==jt(i))){let l=i.childNodes[o-1];if(l.nodeType==1)return Hu(l.getBoundingClientRect(),!1)}if(s==null&&o<jt(i)){let l=i.childNodes[o];if(l.nodeType==1)return Hu(l.getBoundingClientRect(),!0)}return Hu(i.getBoundingClientRect(),n>=0)}if(s==null&&o&&(n<0||o==jt(i))){let l=i.childNodes[o-1],u=l.nodeType==3?Ir(l,jt(l)-(a?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Co(Kr(u,1),!1)}if(s==null&&o<jt(i)){let l=i.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?Ir(l,0,a?0:1):l.nodeType==1?l:null:null;if(u)return Co(Kr(u,-1),!0)}return Co(Kr(i.nodeType==3?Ir(i):i,-n),n>=0)}function Co(e,r){if(e.width==0)return e;let n=r?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Hu(e,r){if(e.height==0)return e;let n=r?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Wg(e,r,n){let i=e.state,o=e.root.activeElement;i!=r&&e.updateState(r),o!=e.dom&&e.focus();try{return n()}finally{i!=r&&e.updateState(i),o!=e.dom&&o&&o.focus()}}function Pw(e,r,n){let i=r.selection,o=n=="up"?i.$from:i.$to;return Wg(e,r,()=>{let{node:s}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let l=e.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let a=Ug(e,o.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let u;if(l.nodeType==1)u=l.getClientRects();else if(l.nodeType==3)u=Ir(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;c<u.length;c++){let d=u[c];if(d.bottom>d.top+1&&(n=="up"?a.top-d.top>(d.bottom-a.top)*2:d.bottom-a.bottom>(a.bottom-d.top)*2))return!1}}return!0})}const Vw=/[\u0590-\u08ac]/;function jw(e,r,n){let{$head:i}=r.selection;if(!i.parent.isTextblock)return!1;let o=i.parentOffset,s=!o,a=o==i.parent.content.size,l=e.domSelection();return l?!Vw.test(i.parent.textContent)||!l.modify?n=="left"||n=="backward"?s:a:Wg(e,r,()=>{let{focusNode:u,focusOffset:c,anchorNode:d,anchorOffset:h}=e.domSelectionRange(),p=l.caretBidiLevel;l.modify("move",n,"character");let f=i.depth?e.docView.domAfterPos(i.before()):e.dom,{focusNode:m,focusOffset:b}=e.domSelectionRange(),g=m&&!f.contains(m.nodeType==1?m:m.parentNode)||u==m&&c==b;try{l.collapse(d,h),u&&(u!=d||c!=h)&&l.extend&&l.extend(u,c)}catch{}return p!=null&&(l.caretBidiLevel=p),g}):i.pos==i.start()||i.pos==i.end()}let Gp=null,Jp=null,Xp=!1;function qw(e,r,n){return Gp==r&&Jp==n?Xp:(Gp=r,Jp=n,Xp=n=="up"||n=="down"?Pw(e,r,n):jw(e,r,n))}const Kt=0,Qp=1,Tn=2,_r=3;class Ds{constructor(r,n,i,o){this.parent=r,this.children=n,this.dom=i,this.contentDOM=o,this.dirty=Kt,i.pmViewDesc=this}matchesWidget(r){return!1}matchesMark(r){return!1}matchesNode(r,n,i){return!1}matchesHack(r){return!1}parseRule(){return null}stopEvent(r){return!1}get size(){let r=0;for(let n=0;n<this.children.length;n++)r+=this.children[n].size;return r}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let r=0;r<this.children.length;r++)this.children[r].destroy()}posBeforeChild(r){for(let n=0,i=this.posAtStart;;n++){let o=this.children[n];if(o==r)return i;i+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(r,n,i){if(this.contentDOM&&this.contentDOM.contains(r.nodeType==1?r:r.parentNode))if(i<0){let s,a;if(r==this.contentDOM)s=r.childNodes[n-1];else{for(;r.parentNode!=this.contentDOM;)r=r.parentNode;s=r.previousSibling}for(;s&&!((a=s.pmViewDesc)&&a.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(a)+a.size:this.posAtStart}else{let s,a;if(r==this.contentDOM)s=r.childNodes[n];else{for(;r.parentNode!=this.contentDOM;)r=r.parentNode;s=r.nextSibling}for(;s&&!((a=s.pmViewDesc)&&a.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(a):this.posAtEnd}let o;if(r==this.dom&&this.contentDOM)o=n>ot(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=r.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let s=r;;s=s.parentNode){if(s==this.dom){o=!1;break}if(s.previousSibling)break}if(o==null&&n==r.childNodes.length)for(let s=r;;s=s.parentNode){if(s==this.dom){o=!0;break}if(s.nextSibling)break}}return(o!=null?o:i>0)?this.posAtEnd:this.posAtStart}nearestDesc(r,n=!1){for(let i=!0,o=r;o;o=o.parentNode){let s=this.getDesc(o),a;if(s&&(!n||s.node))if(i&&(a=s.nodeDOM)&&!(a.nodeType==1?a.contains(r.nodeType==1?r:r.parentNode):a==r))i=!1;else return s}}getDesc(r){let n=r.pmViewDesc;for(let i=n;i;i=i.parent)if(i==this)return n}posFromDOM(r,n,i){for(let o=r;o;o=o.parentNode){let s=this.getDesc(o);if(s)return s.localPosFromDOM(r,n,i)}return-1}descAt(r){for(let n=0,i=0;n<this.children.length;n++){let o=this.children[n],s=i+o.size;if(i==r&&s!=i){for(;!o.border&&o.children.length;)o=o.children[0];return o}if(r<s)return o.descAt(r-i-o.border);i=s}}domFromPos(r,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:r+1};let i=0,o=0;for(let s=0;i<this.children.length;i++){let a=this.children[i],l=s+a.size;if(l>r||a instanceof Zg){o=r-s;break}s=l}if(o)return this.children[i].domFromPos(o-this.children[i].border,n);for(let s;i&&!(s=this.children[i-1]).size&&s instanceof Kg&&s.side>=0;i--);if(n<=0){let s,a=!0;for(;s=i?this.children[i-1]:null,!(!s||s.dom.parentNode==this.contentDOM);i--,a=!1);return s&&n&&a&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?ot(s.dom)+1:0}}else{let s,a=!0;for(;s=i<this.children.length?this.children[i]:null,!(!s||s.dom.parentNode==this.contentDOM);i++,a=!1);return s&&a&&!s.border&&!s.domAtom?s.domFromPos(0,n):{node:this.contentDOM,offset:s?ot(s.dom):this.contentDOM.childNodes.length}}}parseRange(r,n,i=0){if(this.children.length==0)return{node:this.contentDOM,from:r,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,s=-1;for(let a=i,l=0;;l++){let u=this.children[l],c=a+u.size;if(o==-1&&r<=c){let d=a+u.border;if(r>=d&&n<=c-u.border&&u.node&&u.contentDOM&&this.contentDOM.contains(u.contentDOM))return u.parseRange(r,n,d);r=a;for(let h=l;h>0;h--){let p=this.children[h-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){o=ot(p.dom)+1;break}r-=p.size}o==-1&&(o=0)}if(o>-1&&(c>n||l==this.children.length-1)){n=c;for(let d=l+1;d<this.children.length;d++){let h=this.children[d];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){s=ot(h.dom);break}n+=h.size}s==-1&&(s=this.contentDOM.childNodes.length);break}a=c}return{node:this.contentDOM,from:r,to:n,fromOffset:o,toOffset:s}}emptyChildAt(r){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[r<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(r)}domAfterPos(r){let{node:n,offset:i}=this.domFromPos(r,0);if(n.nodeType!=1||i==n.childNodes.length)throw new RangeError("No node after pos "+r);return n.childNodes[i]}setSelection(r,n,i,o=!1){let s=Math.min(r,n),a=Math.max(r,n);for(let p=0,f=0;p<this.children.length;p++){let m=this.children[p],b=f+m.size;if(s>f&&a<b)return m.setSelection(r-f-m.border,n-f-m.border,i,o);f=b}let l=this.domFromPos(r,r?-1:1),u=n==r?l:this.domFromPos(n,n?-1:1),c=i.getSelection(),d=!1;if((or||yt)&&r==n){let{node:p,offset:f}=l;if(p.nodeType==3){if(d=!!(f&&p.nodeValue[f-1]=="\n"),d&&f==p.nodeValue.length)for(let m=p,b;m;m=m.parentNode){if(b=m.nextSibling){b.nodeName=="BR"&&(l=u={node:b.parentNode,offset:ot(b)+1});break}let g=m.pmViewDesc;if(g&&g.node&&g.node.isBlock)break}}else{let m=p.childNodes[f-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(or&&c.focusNode&&c.focusNode!=u.node&&c.focusNode.nodeType==1){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(o=!0)}if(!(o||d&&yt)&&Xn(l.node,l.offset,c.anchorNode,c.anchorOffset)&&Xn(u.node,u.offset,c.focusNode,c.focusOffset))return;let h=!1;if((c.extend||r==n)&&!d){c.collapse(l.node,l.offset);try{r!=n&&c.extend(u.node,u.offset),h=!0}catch{}}if(!h){if(r>n){let f=l;l=u,u=f}let p=document.createRange();p.setEnd(u.node,u.offset),p.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(r){return!this.contentDOM&&r.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(r,n){for(let i=0,o=0;o<this.children.length;o++){let s=this.children[o],a=i+s.size;if(i==a?r<=a&&n>=i:r<a&&n>i){let l=i+s.border,u=a-s.border;if(r>=l&&n<=u){this.dirty=r==i||n==a?Tn:Qp,r==l&&n==u&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=_r:s.markDirty(r-l,n-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Tn:_r}i=a}this.dirty=Tn}markParentsDirty(){let r=1;for(let n=this.parent;n;n=n.parent,r++){let i=r==1?Tn:Qp;n.dirty<i&&(n.dirty=i)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(r){return!1}}class Kg extends Ds{constructor(r,n,i,o){let s,a=n.type.toDOM;if(typeof a=="function"&&(a=a(i,()=>{if(!s)return o;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(a.nodeType!=1){let l=document.createElement("span");l.appendChild(a),a=l}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(r,[],a,null),this.widget=n,this.widget=n,s=this}matchesWidget(r){return this.dirty==Kt&&r.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(r){let n=this.widget.spec.stopEvent;return n?n(r):!1}ignoreMutation(r){return r.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Uw extends Ds{constructor(r,n,i,o){super(r,[],n,null),this.textDOM=i,this.text=o}get size(){return this.text.length}localPosFromDOM(r,n){return r!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(r){return{node:this.textDOM,offset:r}}ignoreMutation(r){return r.type==="characterData"&&r.target.nodeValue==r.oldValue}}class Qn extends Ds{constructor(r,n,i,o){super(r,[],i,o),this.mark=n}static create(r,n,i,o){let s=o.nodeViews[n.type.name],a=s&&s(n,o,i);return(!a||!a.dom)&&(a=oi.renderSpec(document,n.type.spec.toDOM(n,i),null,n.attrs)),new Qn(r,n,a.dom,a.contentDOM||a.dom)}parseRule(){return this.dirty&_r||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(r){return this.dirty!=_r&&this.mark.eq(r)}markDirty(r,n){if(super.markDirty(r,n),this.dirty!=Kt){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty<this.dirty&&(i.dirty=this.dirty),this.dirty=Kt}}slice(r,n,i){let o=Qn.create(this.parent,this.mark,!0,i),s=this.children,a=this.size;n<a&&(s=Qc(s,n,a,i)),r>0&&(s=Qc(s,0,r,i));for(let l=0;l<s.length;l++)s[l].parent=o;return o.children=s,o}}class dn extends Ds{constructor(r,n,i,o,s,a,l,u,c){super(r,[],s,a),this.node=n,this.outerDeco=i,this.innerDeco=o,this.nodeDOM=l}static create(r,n,i,o,s,a){let l=s.nodeViews[n.type.name],u,c=l&&l(n,s,()=>{if(!u)return a;if(u.parent)return u.parent.posBeforeChild(u)},i,o),d=c&&c.dom,h=c&&c.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:h}=oi.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!h&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let p=d;return d=Xg(d,i,n),c?u=new Ww(r,n,i,o,d,h||null,p,c,s,a+1):n.isText?new Ql(r,n,i,o,d,p,s):new dn(r,n,i,o,d,h||null,p,s,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let r={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(r.preserveWhitespace="full"),!this.contentDOM)r.getContent=()=>this.node.content;else if(!this.contentLost)r.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let i=this.children[n];if(this.dom.contains(i.dom.parentNode)){r.contentElement=i.dom.parentNode;break}}r.contentElement||(r.getContent=()=>O.empty)}return r}matchesNode(r,n,i){return this.dirty==Kt&&r.eq(this.node)&&Ua(n,this.outerDeco)&&i.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(r,n){let i=this.node.inlineContent,o=n,s=r.composing?this.localCompositionInfo(r,n):null,a=s&&s.pos>-1?s:null,l=s&&s.pos<0,u=new Zw(this,a&&a.node,r);Xw(this.node,this.innerDeco,(c,d,h)=>{c.spec.marks?u.syncToMarks(c.spec.marks,i,r):c.type.side>=0&&!h&&u.syncToMarks(d==this.node.childCount?_e.none:this.node.child(d).marks,i,r),u.placeWidget(c,r,o)},(c,d,h,p)=>{u.syncToMarks(c.marks,i,r);let f;u.findNodeMatch(c,d,h,p)||l&&r.state.selection.from>o&&r.state.selection.to<o+c.nodeSize&&(f=u.findIndexWithChild(s.node))>-1&&u.updateNodeAt(c,d,h,f,r)||u.updateNextNode(c,d,h,r,p,o)||u.addNode(c,d,h,r,o),o+=c.nodeSize}),u.syncToMarks([],i,r),this.node.isTextblock&&u.addTextblockHacks(),u.destroyRest(),(u.changed||this.dirty==Tn)&&(a&&this.protectLocalComposition(r,a),Gg(this.contentDOM,this.children,r),Gi&&Qw(this.dom))}localCompositionInfo(r,n){let{from:i,to:o}=r.state.selection;if(!(r.state.selection instanceof Q)||i<n||o>n+this.node.content.size)return null;let s=r.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,l=Yw(this.node.content,a,i-n,o-n);return l<0?null:{node:s,pos:l,text:a}}else return{node:s,pos:-1,text:""}}protectLocalComposition(r,{node:n,pos:i,text:o}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let a=new Uw(this,s,n,o);r.input.compositionNodes.push(a),this.children=Qc(this.children,i,i+o.length,r,a)}update(r,n,i,o){return this.dirty==_r||!r.sameMarkup(this.node)?!1:(this.updateInner(r,n,i,o),!0)}updateInner(r,n,i,o){this.updateOuterDeco(n),this.node=r,this.innerDeco=i,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Kt}updateOuterDeco(r){if(Ua(r,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,i=this.dom;this.dom=Jg(this.dom,this.nodeDOM,Xc(this.outerDeco,this.node,n),Xc(r,this.node,n)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=r}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Yp(e,r,n,i,o){Xg(i,r,e);let s=new dn(void 0,e,r,n,i,i,i,o,0);return s.contentDOM&&s.updateChildren(o,0),s}class Ql extends dn{constructor(r,n,i,o,s,a,l){super(r,n,i,o,s,null,a,l,0)}parseRule(){let r=this.nodeDOM.parentNode;for(;r&&r!=this.dom&&!r.pmIsDeco;)r=r.parentNode;return{skip:r||!0}}update(r,n,i,o){return this.dirty==_r||this.dirty!=Kt&&!this.inParent()||!r.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Kt||r.text!=this.node.text)&&r.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=r.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=r,this.dirty=Kt,!0)}inParent(){let r=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==r)return!0;return!1}domFromPos(r){return{node:this.nodeDOM,offset:r}}localPosFromDOM(r,n,i){return r==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(r,n,i)}ignoreMutation(r){return r.type!="characterData"&&r.type!="selection"}slice(r,n,i){let o=this.node.cut(r,n),s=document.createTextNode(o.text);return new Ql(this.parent,o,this.outerDeco,this.innerDeco,s,s,i)}markDirty(r,n){super.markDirty(r,n),this.dom!=this.nodeDOM&&(r==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=_r)}get domAtom(){return!1}isText(r){return this.node.text==r}}class Zg extends Ds{parseRule(){return{ignore:!0}}matchesHack(r){return this.dirty==Kt&&this.dom.nodeName==r}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Ww extends dn{constructor(r,n,i,o,s,a,l,u,c,d){super(r,n,i,o,s,a,l,c,d),this.spec=u}update(r,n,i,o){if(this.dirty==_r)return!1;if(this.spec.update){let s=this.spec.update(r,n,i);return s&&this.updateInner(r,n,i,o),s}else return!this.contentDOM&&!r.isLeaf?!1:super.update(r,n,i,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(r,n,i,o){this.spec.setSelection?this.spec.setSelection(r,n,i):super.setSelection(r,n,i,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(r){return this.spec.stopEvent?this.spec.stopEvent(r):!1}ignoreMutation(r){return this.spec.ignoreMutation?this.spec.ignoreMutation(r):super.ignoreMutation(r)}}function Gg(e,r,n){let i=e.firstChild,o=!1;for(let s=0;s<r.length;s++){let a=r[s],l=a.dom;if(l.parentNode==e){for(;l!=i;)i=e0(i),o=!0;i=i.nextSibling}else o=!0,e.insertBefore(l,i);if(a instanceof Qn){let u=i?i.previousSibling:e.lastChild;Gg(a.contentDOM,a.children,n),i=u?u.nextSibling:e.firstChild}}for(;i;)i=e0(i),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const To=function(e){e&&(this.nodeName=e)};To.prototype=Object.create(null);const Ln=[new To];function Xc(e,r,n){if(e.length==0)return Ln;let i=n?Ln[0]:new To,o=[i];for(let s=0;s<e.length;s++){let a=e[s].type.attrs;if(a){a.nodeName&&o.push(i=new To(a.nodeName));for(let l in a){let u=a[l];u!=null&&(n&&o.length==1&&o.push(i=new To(r.isInline?"span":"div")),l=="class"?i.class=(i.class?i.class+" ":"")+u:l=="style"?i.style=(i.style?i.style+";":"")+u:l!="nodeName"&&(i[l]=u))}}}return o}function Jg(e,r,n,i){if(n==Ln&&i==Ln)return r;let o=r;for(let s=0;s<i.length;s++){let a=i[s],l=n[s];if(s){let u;l&&l.nodeName==a.nodeName&&o!=e&&(u=o.parentNode)&&u.nodeName.toLowerCase()==a.nodeName||(u=document.createElement(a.nodeName),u.pmIsDeco=!0,u.appendChild(o),l=Ln[0]),o=u}Kw(o,l||Ln[0],a)}return o}function Kw(e,r,n){for(let i in r)i!="class"&&i!="style"&&i!="nodeName"&&!(i in n)&&e.removeAttribute(i);for(let i in n)i!="class"&&i!="style"&&i!="nodeName"&&n[i]!=r[i]&&e.setAttribute(i,n[i]);if(r.class!=n.class){let i=r.class?r.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let s=0;s<i.length;s++)o.indexOf(i[s])==-1&&e.classList.remove(i[s]);for(let s=0;s<o.length;s++)i.indexOf(o[s])==-1&&e.classList.add(o[s]);e.classList.length==0&&e.removeAttribute("class")}if(r.style!=n.style){if(r.style){let i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=i.exec(r.style);)e.style.removeProperty(o[1])}n.style&&(e.style.cssText+=n.style)}}function Xg(e,r,n){return Jg(e,e,Ln,Xc(r,n,e.nodeType!=1))}function Ua(e,r){if(e.length!=r.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(r[n].type))return!1;return!0}function e0(e){let r=e.nextSibling;return e.parentNode.removeChild(e),r}class Zw{constructor(r,n,i){this.lock=n,this.view=i,this.index=0,this.stack=[],this.changed=!1,this.top=r,this.preMatch=Gw(r.node.content,r)}destroyBetween(r,n){if(r!=n){for(let i=r;i<n;i++)this.top.children[i].destroy();this.top.children.splice(r,n-r),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(r,n,i){let o=0,s=this.stack.length>>1,a=Math.min(s,r.length);for(;o<a&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(r[o])&&r[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=Kt,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<r.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let u=this.index;u<Math.min(this.index+3,this.top.children.length);u++){let c=this.top.children[u];if(c.matchesMark(r[s])&&!this.isLocked(c.dom)){l=u;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let u=Qn.create(this.top,r[s],n,i);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,s++}}findNodeMatch(r,n,i,o){let s=-1,a;if(o>=this.preMatch.index&&(a=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&a.matchesNode(r,n,i))s=this.top.children.indexOf(a,this.index);else for(let l=this.index,u=Math.min(this.top.children.length,l+5);l<u;l++){let c=this.top.children[l];if(c.matchesNode(r,n,i)&&!this.preMatch.matched.has(c)){s=l;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(r,n,i,o,s){let a=this.top.children[o];return a.dirty==_r&&a.dom==a.contentDOM&&(a.dirty=Tn),a.update(r,n,i,s)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(r){for(;;){let n=r.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let i=r.pmViewDesc;if(i){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==i)return o}return-1}r=n}}updateNextNode(r,n,i,o,s,a){for(let l=this.index;l<this.top.children.length;l++){let u=this.top.children[l];if(u instanceof dn){let c=this.preMatch.matched.get(u);if(c!=null&&c!=s)return!1;let d=u.dom,h,p=this.isLocked(d)&&!(r.isText&&u.node&&u.node.isText&&u.nodeDOM.nodeValue==r.text&&u.dirty!=_r&&Ua(n,u.outerDeco));if(!p&&u.update(r,n,i,o))return this.destroyBetween(this.index,l),u.dom!=d&&(this.changed=!0),this.index++,!0;if(!p&&(h=this.recreateWrapper(u,r,n,i,o,a)))return this.destroyBetween(this.index,l),this.top.children[this.index]=h,h.contentDOM&&(h.dirty=Tn,h.updateChildren(o,a+1),h.dirty=Kt),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(r,n,i,o,s,a){if(r.dirty||n.isAtom||!r.children.length||!r.node.content.eq(n.content)||!Ua(i,r.outerDeco)||!o.eq(r.innerDeco))return null;let l=dn.create(this.top,n,i,o,s,a);if(l.contentDOM){l.children=r.children,r.children=[];for(let u of l.children)u.parent=l}return r.destroy(),l}addNode(r,n,i,o,s){let a=dn.create(this.top,r,n,i,o,s);a.contentDOM&&a.updateChildren(o,s+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(r,n,i){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(r)&&(r==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let s=new Kg(this.top,r,n,i);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let r=this.top.children[this.index-1],n=this.top;for(;r instanceof Qn;)n=r,r=n.children[n.children.length-1];(!r||!(r instanceof Ql)||/\n$/.test(r.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(r.node.text))&&((yt||ut)&&r&&r.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(r,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(r))this.index++;else{let i=document.createElement(r);r=="IMG"&&(i.className="ProseMirror-separator",i.alt=""),r=="BR"&&(i.className="ProseMirror-trailingBreak");let o=new Zg(this.top,[],i,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(r){return this.lock&&(r==this.lock||r.nodeType==1&&r.contains(this.lock.parentNode))}}function Gw(e,r){let n=r,i=n.children.length,o=e.childCount,s=new Map,a=[];e:for(;o>0;){let l;for(;;)if(i){let c=n.children[i-1];if(c instanceof Qn)n=c,i=c.children.length;else{l=c,i--;break}}else{if(n==r)break e;i=n.parent.children.indexOf(n),n=n.parent}let u=l.node;if(u){if(u!=e.child(o-1))break;--o,s.set(l,o),a.push(l)}}return{index:o,matched:s,matches:a.reverse()}}function Jw(e,r){return e.type.side-r.type.side}function Xw(e,r,n,i){let o=r.locals(e),s=0;if(o.length==0){for(let c=0;c<e.childCount;c++){let d=e.child(c);i(d,o,r.forChild(s,d),c),s+=d.nodeSize}return}let a=0,l=[],u=null;for(let c=0;;){let d,h;for(;a<o.length&&o[a].to==s;){let g=o[a++];g.widget&&(d?(h||(h=[d])).push(g):d=g)}if(d)if(h){h.sort(Jw);for(let g=0;g<h.length;g++)n(h[g],c,!!u)}else n(d,c,!!u);let p,f;if(u)f=-1,p=u,u=null;else if(c<e.childCount)f=c,p=e.child(c++);else break;for(let g=0;g<l.length;g++)l[g].to<=s&&l.splice(g--,1);for(;a<o.length&&o[a].from<=s&&o[a].to>s;)l.push(o[a++]);let m=s+p.nodeSize;if(p.isText){let g=m;a<o.length&&o[a].from<g&&(g=o[a].from);for(let y=0;y<l.length;y++)l[y].to<g&&(g=l[y].to);g<m&&(u=p.cut(g-s),p=p.cut(0,g-s),m=g,f=-1)}else for(;a<o.length&&o[a].to<m;)a++;let b=p.isInline&&!p.isLeaf?l.filter(g=>!g.inline):l.slice();i(p,b,r.forChild(s,p),f),s=m}}function Qw(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let r=e.style.cssText;e.style.cssText=r+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=r}}function Yw(e,r,n,i){for(let o=0,s=0;o<e.childCount&&s<=i;){let a=e.child(o++),l=s;if(s+=a.nodeSize,!a.isText)continue;let u=a.text;for(;o<e.childCount;){let c=e.child(o++);if(s+=c.nodeSize,!c.isText)break;u+=c.text}if(s>=n){if(s>=i&&u.slice(i-r.length-l,i-l)==r)return i-r.length;let c=l<i?u.lastIndexOf(r,i-l-1):-1;if(c>=0&&c+r.length+l>=n)return l+c;if(n==i&&u.length>=i+r.length-l&&u.slice(i-l,i-l+r.length)==r)return i}}return-1}function Qc(e,r,n,i,o){let s=[];for(let a=0,l=0;a<e.length;a++){let u=e[a],c=l,d=l+=u.size;c>=n||d<=r?s.push(u):(c<r&&s.push(u.slice(0,r-c,i)),o&&(s.push(o),o=void 0),d>n&&s.push(u.slice(n-c,u.size,i)))}return s}function Yd(e,r=null){let n=e.domSelectionRange(),i=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),s=o&&o.size==0,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let l=i.resolve(a),u,c;if(Xl(n)){for(u=a;o&&!o.node;)o=o.parent;let h=o.node;if(o&&h.isAtom&&ee.isSelectable(h)&&o.parent&&!(h.isInline&&Ew(n.focusNode,n.focusOffset,o.dom))){let p=o.posBefore;c=new ee(a==p?l:i.resolve(p))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let h=a,p=a;for(let f=0;f<n.rangeCount;f++){let m=n.getRangeAt(f);h=Math.min(h,e.docView.posFromDOM(m.startContainer,m.startOffset,1)),p=Math.max(p,e.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(h<0)return null;[u,a]=p==e.state.selection.anchor?[p,h]:[h,p],l=i.resolve(a)}else u=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(u<0)return null}let d=i.resolve(u);if(!c){let h=r=="pointer"||e.state.selection.head<l.pos&&!s?1:-1;c=eh(e,d,l,h)}return c}function Qg(e){return e.editable?e.hasFocus():e2(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function zr(e,r=!1){let n=e.state.selection;if(Yg(e,n),!!Qg(e)){if(!r&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&ut){let i=e.domSelectionRange(),o=e.domObserver.currentSelection;if(i.anchorNode&&o.anchorNode&&Xn(i.anchorNode,i.anchorOffset,o.anchorNode,o.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)tA(e);else{let{anchor:i,head:o}=n,s,a;t0&&!(n instanceof Q)&&(n.$from.parent.inlineContent||(s=r0(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=r0(e,n.to))),e.docView.setSelection(i,o,e.root,r),t0&&(s&&n0(s),a&&n0(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&eA(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const t0=yt||ut&&Hg<63;function r0(e,r){let{node:n,offset:i}=e.docView.domFromPos(r,0),o=i<n.childNodes.length?n.childNodes[i]:null,s=i?n.childNodes[i-1]:null;if(yt&&o&&o.contentEditable=="false")return Pu(o);if((!o||o.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(o)return Pu(o);if(s)return Pu(s)}}function Pu(e){return e.contentEditable="true",yt&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function n0(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function eA(e){let r=e.dom.ownerDocument;r.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),i=n.anchorNode,o=n.anchorOffset;r.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=i||n.anchorOffset!=o)&&(r.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!Qg(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function tA(e){let r=e.domSelection(),n=document.createRange();if(!r)return;let i=e.cursorWrapper.dom,o=i.nodeName=="IMG";o?n.setStart(i.parentNode,ot(i)+1):n.setStart(i,0),n.collapse(!0),r.removeAllRanges(),r.addRange(n),!o&&!e.state.selection.visible&&_t&&cn<=11&&(i.disabled=!0,i.disabled=!1)}function Yg(e,r){if(r instanceof ee){let n=e.docView.descAt(r.from);n!=e.lastSelectedViewDesc&&(i0(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else i0(e)}function i0(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function eh(e,r,n,i){return e.someProp("createSelectionBetween",o=>o(e,r,n))||Q.between(r,n,i)}function o0(e){return e.editable&&!e.hasFocus()?!1:e2(e)}function e2(e){let r=e.domSelectionRange();if(!r.anchorNode)return!1;try{return e.dom.contains(r.anchorNode.nodeType==3?r.anchorNode.parentNode:r.anchorNode)&&(e.editable||e.dom.contains(r.focusNode.nodeType==3?r.focusNode.parentNode:r.focusNode))}catch{return!1}}function rA(e){let r=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Xn(r.node,r.offset,n.anchorNode,n.anchorOffset)}function Yc(e,r){let{$anchor:n,$head:i}=e.selection,o=r>0?n.max(i):n.min(i),s=o.parent.inlineContent?o.depth?e.doc.resolve(r>0?o.after():o.before()):null:o;return s&&ne.findFrom(s,r)}function Zr(e,r){return e.dispatch(e.state.tr.setSelection(r).scrollIntoView()),!0}function s0(e,r,n){let i=e.state.selection;if(i instanceof Q)if(n.indexOf("s")>-1){let{$head:o}=i,s=o.textOffset?null:r<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let a=e.state.doc.resolve(o.pos+s.nodeSize*(r<0?-1:1));return Zr(e,new Q(i.$anchor,a))}else if(i.empty){if(e.endOfTextblock(r>0?"forward":"backward")){let o=Yc(e.state,r);return o&&o instanceof ee?Zr(e,o):!1}else if(!(Vt&&n.indexOf("m")>-1)){let o=i.$head,s=o.textOffset?null:r<0?o.nodeBefore:o.nodeAfter,a;if(!s||s.isText)return!1;let l=r<0?o.pos-s.nodeSize:o.pos;return s.isAtom||(a=e.docView.descAt(l))&&!a.contentDOM?ee.isSelectable(s)?Zr(e,new ee(r<0?e.state.doc.resolve(o.pos-s.nodeSize):o)):xs?Zr(e,new Q(e.state.doc.resolve(r<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(i instanceof ee&&i.node.isInline)return Zr(e,new Q(r>0?i.$to:i.$from));{let o=Yc(e.state,r);return o?Zr(e,o):!1}}}function Wa(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Lo(e,r){let n=e.pmViewDesc;return n&&n.size==0&&(r<0||e.nextSibling||e.nodeName!="BR")}function mi(e,r){return r<0?nA(e):iA(e)}function nA(e){let r=e.domSelectionRange(),n=r.focusNode,i=r.focusOffset;if(!n)return;let o,s,a=!1;for(or&&n.nodeType==1&&i<Wa(n)&&Lo(n.childNodes[i],-1)&&(a=!0);;)if(i>0){if(n.nodeType!=1)break;{let l=n.childNodes[i-1];if(Lo(l,-1))o=n,s=--i;else if(l.nodeType==3)n=l,i=n.nodeValue.length;else break}}else{if(t2(n))break;{let l=n.previousSibling;for(;l&&Lo(l,-1);)o=n.parentNode,s=ot(l),l=l.previousSibling;if(l)n=l,i=Wa(n);else{if(n=n.parentNode,n==e.dom)break;i=0}}}a?ed(e,n,i):o&&ed(e,o,s)}function iA(e){let r=e.domSelectionRange(),n=r.focusNode,i=r.focusOffset;if(!n)return;let o=Wa(n),s,a;for(;;)if(i<o){if(n.nodeType!=1)break;let l=n.childNodes[i];if(Lo(l,1))s=n,a=++i;else break}else{if(t2(n))break;{let l=n.nextSibling;for(;l&&Lo(l,1);)s=l.parentNode,a=ot(l)+1,l=l.nextSibling;if(l)n=l,i=0,o=Wa(n);else{if(n=n.parentNode,n==e.dom)break;i=o=0}}}s&&ed(e,s,a)}function t2(e){let r=e.pmViewDesc;return r&&r.node&&r.node.isBlock}function oA(e,r){for(;e&&r==e.childNodes.length&&!Es(e);)r=ot(e)+1,e=e.parentNode;for(;e&&r<e.childNodes.length;){let n=e.childNodes[r];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,r=0}}function sA(e,r){for(;e&&!r&&!Es(e);)r=ot(e),e=e.parentNode;for(;e&&r;){let n=e.childNodes[r-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,r=e.childNodes.length}}function ed(e,r,n){if(r.nodeType!=3){let s,a;(a=oA(r,n))?(r=a,n=0):(s=sA(r,n))&&(r=s,n=s.nodeValue.length)}let i=e.domSelection();if(!i)return;if(Xl(i)){let s=document.createRange();s.setEnd(r,n),s.setStart(r,n),i.removeAllRanges(),i.addRange(s)}else i.extend&&i.extend(r,n);e.domObserver.setCurSelection();let{state:o}=e;setTimeout(()=>{e.state==o&&zr(e)},50)}function a0(e,r){let n=e.state.doc.resolve(r);if(!(ut||Sw)&&n.parent.inlineContent){let i=e.coordsAtPos(r);if(r>n.start()){let o=e.coordsAtPos(r-1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(r<n.end()){let o=e.coordsAtPos(r+1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function l0(e,r,n){let i=e.state.selection;if(i instanceof Q&&!i.empty||n.indexOf("s")>-1||Vt&&n.indexOf("m")>-1)return!1;let{$from:o,$to:s}=i;if(!o.parent.inlineContent||e.endOfTextblock(r<0?"up":"down")){let a=Yc(e.state,r);if(a&&a instanceof ee)return Zr(e,a)}if(!o.parent.inlineContent){let a=r<0?o:s,l=i instanceof nr?ne.near(a,r):ne.findFrom(a,r);return l?Zr(e,l):!1}return!1}function u0(e,r){if(!(e.state.selection instanceof Q))return!0;let{$head:n,$anchor:i,empty:o}=e.state.selection;if(!n.sameParent(i))return!0;if(!o)return!1;if(e.endOfTextblock(r>0?"forward":"backward"))return!0;let s=!n.textOffset&&(r<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let a=e.state.tr;return r<0?a.delete(n.pos-s.nodeSize,n.pos):a.delete(n.pos,n.pos+s.nodeSize),e.dispatch(a),!0}return!1}function c0(e,r,n){e.domObserver.stop(),r.contentEditable=n,e.domObserver.start()}function aA(e){if(!yt||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:r,focusOffset:n}=e.domSelectionRange();if(r&&r.nodeType==1&&n==0&&r.firstChild&&r.firstChild.contentEditable=="false"){let i=r.firstChild;c0(e,i,"true"),setTimeout(()=>c0(e,i,"false"),20)}return!1}function lA(e){let r="";return e.ctrlKey&&(r+="c"),e.metaKey&&(r+="m"),e.altKey&&(r+="a"),e.shiftKey&&(r+="s"),r}function uA(e,r){let n=r.keyCode,i=lA(r);if(n==8||Vt&&n==72&&i=="c")return u0(e,-1)||mi(e,-1);if(n==46&&!r.shiftKey||Vt&&n==68&&i=="c")return u0(e,1)||mi(e,1);if(n==13||n==27)return!0;if(n==37||Vt&&n==66&&i=="c"){let o=n==37?a0(e,e.state.selection.from)=="ltr"?-1:1:-1;return s0(e,o,i)||mi(e,o)}else if(n==39||Vt&&n==70&&i=="c"){let o=n==39?a0(e,e.state.selection.from)=="ltr"?1:-1:1;return s0(e,o,i)||mi(e,o)}else{if(n==38||Vt&&n==80&&i=="c")return l0(e,-1,i)||mi(e,-1);if(n==40||Vt&&n==78&&i=="c")return aA(e)||l0(e,1,i)||mi(e,1);if(i==(Vt?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function r2(e,r){e.someProp("transformCopied",f=>{r=f(r,e)});let n=[],{content:i,openStart:o,openEnd:s}=r;for(;o>1&&s>1&&i.childCount==1&&i.firstChild.childCount==1;){o--,s--;let f=i.firstChild;n.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),i=f.content}let a=e.someProp("clipboardSerializer")||oi.fromSchema(e.state.schema),l=l2(),u=l.createElement("div");u.appendChild(a.serializeFragment(i,{document:l}));let c=u.firstChild,d,h=0;for(;c&&c.nodeType==1&&(d=a2[c.nodeName.toLowerCase()]);){for(let f=d.length-1;f>=0;f--){let m=l.createElement(d[f]);for(;u.firstChild;)m.appendChild(u.firstChild);u.appendChild(m),h++}c=u.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice","".concat(o," ").concat(s).concat(h?" -".concat(h):""," ").concat(JSON.stringify(n)));let p=e.someProp("clipboardTextSerializer",f=>f(r,e))||r.content.textBetween(0,r.content.size,"\n\n");return{dom:u,text:p,slice:r}}function n2(e,r,n,i,o){let s=o.parent.type.spec.code,a,l;if(!n&&!r)return null;let u=r&&(i||s||!n);if(u){if(e.someProp("transformPastedText",p=>{r=p(r,s||i,e)}),s)return r?new $(O.from(e.state.schema.text(r.replace(/\r\n?/g,"\n"))),0,0):$.empty;let h=e.someProp("clipboardTextParser",p=>p(r,o,i,e));if(h)l=h;else{let p=o.marks(),{schema:f}=e.state,m=oi.fromSchema(f);a=document.createElement("div"),r.split(/(?:\r\n?|\n)+/).forEach(b=>{let g=a.appendChild(document.createElement("p"));b&&g.appendChild(m.serializeNode(f.text(b,p)))})}}else e.someProp("transformPastedHTML",h=>{n=h(n,e)}),a=pA(n),xs&&fA(a);let c=a&&a.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let h=+d[3];h>0;h--){let p=a.firstChild;for(;p&&p.nodeType!=1;)p=p.nextSibling;if(!p)break;a=p}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||Vn.fromSchema(e.state.schema)).parseSlice(a,{preserveWhitespace:!!(u||d),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!cA.test(h.parentNode.nodeName)?{ignore:!0}:null}})),d)l=mA(d0(l,+d[1],+d[2]),d[4]);else if(l=$.maxOpen(dA(l.content,o),!0),l.openStart||l.openEnd){let h=0,p=0;for(let f=l.content.firstChild;h<l.openStart&&!f.type.spec.isolating;h++,f=f.firstChild);for(let f=l.content.lastChild;p<l.openEnd&&!f.type.spec.isolating;p++,f=f.lastChild);l=d0(l,h,p)}return e.someProp("transformPasted",h=>{l=h(l,e)}),l}const cA=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function dA(e,r){if(e.childCount<2)return e;for(let n=r.depth;n>=0;n--){let i=r.node(n).contentMatchAt(r.index(n)),o,s=[];if(e.forEach(a=>{if(!s)return;let l=i.findWrapping(a.type),u;if(!l)return s=null;if(u=s.length&&o.length&&o2(l,o,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=s2(s[s.length-1],o.length));let c=i2(a,l);s.push(c),i=i.matchType(c.type),o=l}}),s)return O.from(s)}return e}function i2(e,r,n=0){for(let i=r.length-1;i>=n;i--)e=r[i].create(null,O.from(e));return e}function o2(e,r,n,i,o){if(o<e.length&&o<r.length&&e[o]==r[o]){let s=o2(e,r,n,i.lastChild,o+1);if(s)return i.copy(i.content.replaceChild(i.childCount-1,s));if(i.contentMatchAt(i.childCount).matchType(o==e.length-1?n.type:e[o+1]))return i.copy(i.content.append(O.from(i2(n,e,o+1))))}}function s2(e,r){if(r==0)return e;let n=e.content.replaceChild(e.childCount-1,s2(e.lastChild,r-1)),i=e.contentMatchAt(e.childCount).fillBefore(O.empty,!0);return e.copy(n.append(i))}function td(e,r,n,i,o,s){let a=r<0?e.firstChild:e.lastChild,l=a.content;return e.childCount>1&&(s=0),o<i-1&&(l=td(l,r,n,i,o+1,s)),o>=n&&(l=r<0?a.contentMatchAt(0).fillBefore(l,s<=o).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(O.empty,!0))),e.replaceChild(r<0?0:e.childCount-1,a.copy(l))}function d0(e,r,n){return r<e.openStart&&(e=new $(td(e.content,-1,r,e.openStart,0,e.openEnd),r,e.openEnd)),n<e.openEnd&&(e=new $(td(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const a2={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let h0=null;function l2(){return h0||(h0=document.implementation.createHTMLDocument("title"))}function hA(e){let r=window.trustedTypes;return r?r.createPolicy("detachedDocument",{createHTML:n=>n}).createHTML(e):e}function pA(e){let r=/^(\s*<meta [^>]*>)*/.exec(e);r&&(e=e.slice(r[0].length));let n=l2().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e),o;if((o=i&&a2[i[1].toLowerCase()])&&(e=o.map(s=>"<"+s+">").join("")+e+o.map(s=>"</"+s+">").reverse().join("")),n.innerHTML=hA(e),o)for(let s=0;s<o.length;s++)n=n.querySelector(o[s])||n;return n}function fA(e){let r=e.querySelectorAll(ut?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<r.length;n++){let i=r[n];i.childNodes.length==1&&i.textContent==" "&&i.parentNode&&i.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),i)}}function mA(e,r){if(!e.size)return e;let n=e.content.firstChild.type.schema,i;try{i=JSON.parse(r)}catch{return e}let{content:o,openStart:s,openEnd:a}=e;for(let l=i.length-2;l>=0;l-=2){let u=n.nodes[i[l]];if(!u||u.hasRequiredAttrs())break;o=O.from(u.create(i[l+1],o)),s++,a++}return new $(o,s,a)}const mt={},gt={},gA={touchstart:!0,touchmove:!0};class bA{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function yA(e){for(let r in mt){let n=mt[r];e.dom.addEventListener(r,e.input.eventHandlers[r]=i=>{vA(e,i)&&!th(e,i)&&(e.editable||!(i.type in gt))&&n(e,i)},gA[r]?{passive:!0}:void 0)}yt&&e.dom.addEventListener("input",()=>null),rd(e)}function nn(e,r){e.input.lastSelectionOrigin=r,e.input.lastSelectionTime=Date.now()}function CA(e){e.domObserver.stop();for(let r in e.input.eventHandlers)e.dom.removeEventListener(r,e.input.eventHandlers[r]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function rd(e){e.someProp("handleDOMEvents",r=>{for(let n in r)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=i=>th(e,i))})}function th(e,r){return e.someProp("handleDOMEvents",n=>{let i=n[r.type];return i?i(e,r)||r.defaultPrevented:!1})}function vA(e,r){if(!r.bubbles)return!0;if(r.defaultPrevented)return!1;for(let n=r.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(r))return!1;return!0}function kA(e,r){!th(e,r)&&mt[r.type]&&(e.editable||!(r.type in gt))&&mt[r.type](e,r)}gt.keydown=(e,r)=>{let n=r;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!p0(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Yt&&ut&&n.keyCode==13)))if(e.domObserver.selectionChanged(e.domSelectionRange())?e.domObserver.flush():n.keyCode!=229&&e.domObserver.forceFlush(),Gi&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let i=Date.now();e.input.lastIOSEnter=i,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==i&&(e.someProp("handleKeyDown",o=>o(e,Mn(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",i=>i(e,n))||uA(e,n)?n.preventDefault():nn(e,"key")},gt.keyup=(e,r)=>{r.keyCode==16&&(e.input.shiftKey=!1)},gt.keypress=(e,r)=>{let n=r;if(p0(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Vt&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let i=e.state.selection;if(!(i instanceof Q)||!i.$from.sameParent(i.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",s=>s(e,i.$from.pos,i.$to.pos,o))&&e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function Ka(e){return{left:e.clientX,top:e.clientY}}function wA(e,r){let n=r.x-e.clientX,i=r.y-e.clientY;return n*n+i*i<100}function rh(e,r,n,i,o){if(i==-1)return!1;let s=e.state.doc.resolve(i);for(let a=s.depth+1;a>0;a--)if(e.someProp(r,l=>a>s.depth?l(e,n,s.nodeAfter,s.before(a),o,!0):l(e,n,s.node(a),s.before(a),o,!1)))return!0;return!1}function zi(e,r,n){if(e.focused||e.focus(),e.state.selection.eq(r))return;let i=e.state.tr.setSelection(r);i.setMeta("pointer",!0),e.dispatch(i)}function AA(e,r){if(r==-1)return!1;let n=e.state.doc.resolve(r),i=n.nodeAfter;return i&&i.isAtom&&ee.isSelectable(i)?(zi(e,new ee(n)),!0):!1}function _A(e,r){if(r==-1)return!1;let n=e.state.selection,i,o;n instanceof ee&&(i=n.node);let s=e.state.doc.resolve(r);for(let a=s.depth+1;a>0;a--){let l=a>s.depth?s.nodeAfter:s.node(a);if(ee.isSelectable(l)){i&&n.$from.depth>0&&a>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?o=s.before(n.$from.depth):o=s.before(a);break}}return o!=null?(zi(e,ee.create(e.state.doc,o)),!0):!1}function EA(e,r,n,i,o){return rh(e,"handleClickOn",r,n,i)||e.someProp("handleClick",s=>s(e,r,i))||(o?_A(e,n):AA(e,n))}function xA(e,r,n,i){return rh(e,"handleDoubleClickOn",r,n,i)||e.someProp("handleDoubleClick",o=>o(e,r,i))}function DA(e,r,n,i){return rh(e,"handleTripleClickOn",r,n,i)||e.someProp("handleTripleClick",o=>o(e,r,i))||SA(e,n,i)}function SA(e,r,n){if(n.button!=0)return!1;let i=e.state.doc;if(r==-1)return i.inlineContent?(zi(e,Q.create(i,0,i.content.size)),!0):!1;let o=i.resolve(r);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s),l=o.before(s);if(a.inlineContent)zi(e,Q.create(i,l+1,l+1+a.content.size));else if(ee.isSelectable(a))zi(e,ee.create(i,l));else continue;return!0}}function nd(e){return Za(e)}const u2=Vt?"metaKey":"ctrlKey";mt.mousedown=(e,r)=>{let n=r;e.input.shiftKey=n.shiftKey;let i=nd(e),o=Date.now(),s="singleClick";o-e.input.lastClick.time<500&&wA(n,e.input.lastClick)&&!n[u2]&&(e.input.lastClick.type=="singleClick"?s="doubleClick":e.input.lastClick.type=="doubleClick"&&(s="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:s};let a=e.posAtCoords(Ka(n));a&&(s=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new BA(e,a,n,!!i)):(s=="doubleClick"?xA:DA)(e,a.pos,a.inside,n)?n.preventDefault():nn(e,"pointer"))};class BA{constructor(r,n,i,o){this.view=r,this.pos=n,this.event=i,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=r.state.doc,this.selectNode=!!i[u2],this.allowDefault=i.shiftKey;let s,a;if(n.inside>-1)s=r.state.doc.nodeAt(n.inside),a=n.inside;else{let d=r.state.doc.resolve(n.pos);s=d.parent,a=d.depth?d.before():0}const l=o?null:i.target,u=l?r.docView.nearestDesc(l,!0):null;this.target=u&&u.dom.nodeType==1?u.dom:null;let{selection:c}=r.state;(i.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof ee&&c.from<=a&&c.to>a)&&(this.mightDrag={node:s,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&or&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),r.root.addEventListener("mouseup",this.up=this.up.bind(this)),r.root.addEventListener("mousemove",this.move=this.move.bind(this)),nn(r,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>zr(this.view)),this.view.input.mouseDown=null}up(r){if(this.done(),!this.view.dom.contains(r.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Ka(r))),this.updateAllowDefault(r),this.allowDefault||!n?nn(this.view,"pointer"):EA(this.view,n.pos,n.inside,r,this.selectNode)?r.preventDefault():r.button==0&&(this.flushed||yt&&this.mightDrag&&!this.mightDrag.node.isAtom||ut&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(zi(this.view,ne.near(this.view.state.doc.resolve(n.pos))),r.preventDefault()):nn(this.view,"pointer")}move(r){this.updateAllowDefault(r),nn(this.view,"pointer"),r.buttons==0&&this.done()}updateAllowDefault(r){!this.allowDefault&&(Math.abs(this.event.x-r.clientX)>4||Math.abs(this.event.y-r.clientY)>4)&&(this.allowDefault=!0)}}mt.touchstart=e=>{e.input.lastTouch=Date.now(),nd(e),nn(e,"pointer")},mt.touchmove=e=>{e.input.lastTouch=Date.now(),nn(e,"pointer")},mt.contextmenu=e=>nd(e);function p0(e,r){return e.composing?!0:yt&&Math.abs(r.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const MA=Yt?5e3:-1;gt.compositionstart=gt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:r}=e,n=r.selection.$to;if(r.selection instanceof Q&&(r.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(i=>i.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Za(e,!0),e.markCursor=null;else if(Za(e,!r.selection.empty),or&&r.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let i=e.domSelectionRange();for(let o=i.focusNode,s=i.focusOffset;o&&o.nodeType==1&&s!=0;){let a=s<0?o.lastChild:o.childNodes[s-1];if(!a)break;if(a.nodeType==3){let l=e.domSelection();l&&l.collapse(a,a.nodeValue.length);break}else o=a,s=-1}}e.input.composing=!0}f0(e,MA)},gt.compositionend=(e,r)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=r.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,f0(e,20))};function f0(e,r){clearTimeout(e.input.composingTimeout),r>-1&&(e.input.composingTimeout=setTimeout(()=>Za(e),r))}function c2(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=NA());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function FA(e){let r=e.domSelectionRange();if(!r.focusNode)return null;let n=Aw(r.focusNode,r.focusOffset),i=_w(r.focusNode,r.focusOffset);if(n&&i&&n!=i){let o=i.pmViewDesc,s=e.domObserver.lastChangedTextNode;if(n==s||i==s)return s;if(!o||!o.isText(i.nodeValue))return i;if(e.input.compositionNode==i){let a=n.pmViewDesc;if(!(!a||!a.isText(n.nodeValue)))return i}}return n||i}function NA(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Za(e,r=!1){if(!(Yt&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),c2(e),r||e.docView&&e.docView.dirty){let n=Yd(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||r)&&!e.state.selection.empty?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function OA(e,r){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(r),n.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),o=document.createRange();o.selectNodeContents(r),e.dom.blur(),i.removeAllRanges(),i.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const Io=_t&&cn<15||Gi&&Bw<604;mt.copy=gt.cut=(e,r)=>{let n=r,i=e.state.selection,o=n.type=="cut";if(i.empty)return;let s=Io?null:n.clipboardData,a=i.content(),{dom:l,text:u}=r2(e,a);s?(n.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",u)):OA(e,l),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function TA(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function LA(e,r){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,i=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),i.parentNode&&i.parentNode.removeChild(i),n?Zo(e,i.value,null,o,r):Zo(e,i.textContent,i.innerHTML,o,r)},50)}function Zo(e,r,n,i,o){let s=n2(e,r,n,i,e.state.selection.$from);if(e.someProp("handlePaste",u=>u(e,o,s||$.empty)))return!0;if(!s)return!1;let a=TA(s),l=a?e.state.tr.replaceSelectionWith(a,i):e.state.tr.replaceSelection(s);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function d2(e){let r=e.getData("text/plain")||e.getData("Text");if(r)return r;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}gt.paste=(e,r)=>{let n=r;if(e.composing&&!Yt)return;let i=Io?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;i&&Zo(e,d2(i),i.getData("text/html"),o,n)?n.preventDefault():LA(e,n)};class h2{constructor(r,n,i){this.slice=r,this.move=n,this.node=i}}const m0=Vt?"altKey":"ctrlKey";mt.dragstart=(e,r)=>{let n=r,i=e.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let o=e.state.selection,s=o.empty?null:e.posAtCoords(Ka(n)),a;if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof ee?o.to-1:o.to))){if(i&&i.mightDrag)a=ee.create(e.state.doc,i.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let h=e.docView.nearestDesc(n.target,!0);h&&h.node.type.spec.draggable&&h!=e.docView&&(a=ee.create(e.state.doc,h.posBefore))}}let l=(a||e.state.selection).content(),{dom:u,text:c,slice:d}=r2(e,l);(!n.dataTransfer.files.length||!ut||Hg>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Io?"Text":"text/html",u.innerHTML),n.dataTransfer.effectAllowed="copyMove",Io||n.dataTransfer.setData("text/plain",c),e.dragging=new h2(d,!n[m0],a)},mt.dragend=e=>{let r=e.dragging;window.setTimeout(()=>{e.dragging==r&&(e.dragging=null)},50)},gt.dragover=gt.dragenter=(e,r)=>r.preventDefault(),gt.drop=(e,r)=>{let n=r,i=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(Ka(n));if(!o)return;let s=e.state.doc.resolve(o.pos),a=i&&i.slice;a?e.someProp("transformPasted",m=>{a=m(a,e)}):a=n2(e,d2(n.dataTransfer),Io?null:n.dataTransfer.getData("text/html"),!1,s);let l=!!(i&&!n[m0]);if(e.someProp("handleDrop",m=>m(e,n,a||$.empty,l))){n.preventDefault();return}if(!a)return;n.preventDefault();let u=a?Fg(e.state.doc,s.pos,a):s.pos;u==null&&(u=s.pos);let c=e.state.tr;if(l){let{node:m}=i;m?m.replace(c):c.deleteSelection()}let d=c.mapping.map(u),h=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,p=c.doc;if(h?c.replaceRangeWith(d,d,a.content.firstChild):c.replaceRange(d,d,a),c.doc.eq(p))return;let f=c.doc.resolve(d);if(h&&ee.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new ee(f));else{let m=c.mapping.map(u);c.mapping.maps[c.mapping.maps.length-1].forEach((b,g,y,v)=>m=v),c.setSelection(eh(e,f,c.doc.resolve(m)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},mt.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&zr(e)},20))},mt.blur=(e,r)=>{let n=r;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},mt.beforeinput=(e,r)=>{if(ut&&Yt&&r.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",o=>o(e,Mn(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in gt)mt[e]=gt[e];function Go(e,r){if(e==r)return!0;for(let n in e)if(e[n]!==r[n])return!1;for(let n in r)if(!(n in e))return!1;return!0}class Ga{constructor(r,n){this.toDOM=r,this.spec=n||jn,this.side=this.spec.side||0}map(r,n,i,o){let{pos:s,deleted:a}=r.mapResult(n.from+o,this.side<0?-1:1);return a?null:new ze(s-i,s-i,this)}valid(){return!0}eq(r){return this==r||r instanceof Ga&&(this.spec.key&&this.spec.key==r.spec.key||this.toDOM==r.toDOM&&Go(this.spec,r.spec))}destroy(r){this.spec.destroy&&this.spec.destroy(r)}}class hn{constructor(r,n){this.attrs=r,this.spec=n||jn}map(r,n,i,o){let s=r.map(n.from+o,this.spec.inclusiveStart?-1:1)-i,a=r.map(n.to+o,this.spec.inclusiveEnd?1:-1)-i;return s>=a?null:new ze(s,a,this)}valid(r,n){return n.from<n.to}eq(r){return this==r||r instanceof hn&&Go(this.attrs,r.attrs)&&Go(this.spec,r.spec)}static is(r){return r.type instanceof hn}destroy(){}}class nh{constructor(r,n){this.attrs=r,this.spec=n||jn}map(r,n,i,o){let s=r.mapResult(n.from+o,1);if(s.deleted)return null;let a=r.mapResult(n.to+o,-1);return a.deleted||a.pos<=s.pos?null:new ze(s.pos-i,a.pos-i,this)}valid(r,n){let{index:i,offset:o}=r.content.findIndex(n.from),s;return o==n.from&&!(s=r.child(i)).isText&&o+s.nodeSize==n.to}eq(r){return this==r||r instanceof nh&&Go(this.attrs,r.attrs)&&Go(this.spec,r.spec)}destroy(){}}class ze{constructor(r,n,i){this.from=r,this.to=n,this.type=i}copy(r,n){return new ze(r,n,this.type)}eq(r,n=0){return this.type.eq(r.type)&&this.from+n==r.from&&this.to+n==r.to}map(r,n,i){return this.type.map(r,this,n,i)}static widget(r,n,i){return new ze(r,r,new Ga(n,i))}static inline(r,n,i,o){return new ze(r,n,new hn(i,o))}static node(r,n,i,o){return new ze(r,n,new nh(i,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof hn}get widget(){return this.type instanceof Ga}}const Ai=[],jn={};class ye{constructor(r,n){this.local=r.length?r:Ai,this.children=n.length?n:Ai}static create(r,n){return n.length?Ja(n,r,0,jn):lt}find(r,n,i){let o=[];return this.findInner(r!=null?r:0,n!=null?n:1e9,o,0,i),o}findInner(r,n,i,o,s){for(let a=0;a<this.local.length;a++){let l=this.local[a];l.from<=n&&l.to>=r&&(!s||s(l.spec))&&i.push(l.copy(l.from+o,l.to+o))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<n&&this.children[a+1]>r){let l=this.children[a]+1;this.children[a+2].findInner(r-l,n-l,i,o+l,s)}}map(r,n,i){return this==lt||r.maps.length==0?this:this.mapInner(r,n,0,0,i||jn)}mapInner(r,n,i,o,s){let a;for(let l=0;l<this.local.length;l++){let u=this.local[l].map(r,i,o);u&&u.type.valid(n,u)?(a||(a=[])).push(u):s.onRemove&&s.onRemove(this.local[l].spec)}return this.children.length?IA(this.children,a||[],r,n,i,o,s):a?new ye(a.sort(qn),Ai):lt}add(r,n){return n.length?this==lt?ye.create(r,n):this.addInner(r,n,0):this}addInner(r,n,i){let o,s=0;r.forEach((l,u)=>{let c=u+i,d;if(d=f2(n,l,c)){for(o||(o=this.children.slice());s<o.length&&o[s]<u;)s+=3;o[s]==u?o[s+2]=o[s+2].addInner(l,d,c+1):o.splice(s,0,u,u+l.nodeSize,Ja(d,l,c+1,jn)),s+=3}});let a=p2(s?m2(n):n,-i);for(let l=0;l<a.length;l++)a[l].type.valid(r,a[l])||a.splice(l--,1);return new ye(a.length?this.local.concat(a).sort(qn):this.local,o||this.children)}remove(r){return r.length==0||this==lt?this:this.removeInner(r,0)}removeInner(r,n){let i=this.children,o=this.local;for(let s=0;s<i.length;s+=3){let a,l=i[s]+n,u=i[s+1]+n;for(let d=0,h;d<r.length;d++)(h=r[d])&&h.from>l&&h.to<u&&(r[d]=null,(a||(a=[])).push(h));if(!a)continue;i==this.children&&(i=this.children.slice());let c=i[s+2].removeInner(a,l+1);c!=lt?i[s+2]=c:(i.splice(s,3),s-=3)}if(o.length){for(let s=0,a;s<r.length;s++)if(a=r[s])for(let l=0;l<o.length;l++)o[l].eq(a,n)&&(o==this.local&&(o=this.local.slice()),o.splice(l--,1))}return i==this.children&&o==this.local?this:o.length||i.length?new ye(o,i):lt}forChild(r,n){if(this==lt)return this;if(n.isLeaf)return ye.empty;let i,o;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=r){this.children[l]==r&&(i=this.children[l+2]);break}let s=r+1,a=s+n.content.size;for(let l=0;l<this.local.length;l++){let u=this.local[l];if(u.from<a&&u.to>s&&u.type instanceof hn){let c=Math.max(s,u.from)-s,d=Math.min(a,u.to)-s;c<d&&(o||(o=[])).push(u.copy(c,d))}}if(o){let l=new ye(o.sort(qn),Ai);return i?new Jr([l,i]):l}return i||lt}eq(r){if(this==r)return!0;if(!(r instanceof ye)||this.local.length!=r.local.length||this.children.length!=r.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(r.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=r.children[n]||this.children[n+1]!=r.children[n+1]||!this.children[n+2].eq(r.children[n+2]))return!1;return!0}locals(r){return ih(this.localsInner(r))}localsInner(r){if(this==lt)return Ai;if(r.inlineContent||!this.local.some(hn.is))return this.local;let n=[];for(let i=0;i<this.local.length;i++)this.local[i].type instanceof hn||n.push(this.local[i]);return n}forEachSet(r){r(this)}}ye.empty=new ye([],[]),ye.removeOverlap=ih;const lt=ye.empty;class Jr{constructor(r){this.members=r}map(r,n){const i=this.members.map(o=>o.map(r,n,jn));return Jr.from(i)}forChild(r,n){if(n.isLeaf)return ye.empty;let i=[];for(let o=0;o<this.members.length;o++){let s=this.members[o].forChild(r,n);s!=lt&&(s instanceof Jr?i=i.concat(s.members):i.push(s))}return Jr.from(i)}eq(r){if(!(r instanceof Jr)||r.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(r.members[n]))return!1;return!0}locals(r){let n,i=!0;for(let o=0;o<this.members.length;o++){let s=this.members[o].localsInner(r);if(s.length)if(!n)n=s;else{i&&(n=n.slice(),i=!1);for(let a=0;a<s.length;a++)n.push(s[a])}}return n?ih(i?n:n.sort(qn)):Ai}static from(r){switch(r.length){case 0:return lt;case 1:return r[0];default:return new Jr(r.every(n=>n instanceof ye)?r:r.reduce((n,i)=>n.concat(i instanceof ye?i:i.members),[]))}}forEachSet(r){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(r)}}function IA(e,r,n,i,o,s,a){let l=e.slice();for(let c=0,d=s;c<n.maps.length;c++){let h=0;n.maps[c].forEach((p,f,m,b)=>{let g=b-m-(f-p);for(let y=0;y<l.length;y+=3){let v=l[y+1];if(v<0||p>v+d-h)continue;let k=l[y]+d-h;f>=k?l[y+1]=p<=k?-2:-1:p>=d&&g&&(l[y]+=g,l[y+1]+=g)}h+=g}),d=n.maps[c].map(d,-1)}let u=!1;for(let c=0;c<l.length;c+=3)if(l[c+1]<0){if(l[c+1]==-2){u=!0,l[c+1]=-1;continue}let d=n.map(e[c]+s),h=d-o;if(h<0||h>=i.content.size){u=!0;continue}let p=n.map(e[c+1]+s,-1),f=p-o,{index:m,offset:b}=i.content.findIndex(h),g=i.maybeChild(m);if(g&&b==h&&b+g.nodeSize==f){let y=l[c+2].mapInner(n,g,d+1,e[c]+s+1,a);y!=lt?(l[c]=h,l[c+1]=f,l[c+2]=y):(l[c+1]=-2,u=!0)}else u=!0}if(u){let c=RA(l,e,r,n,o,s,a),d=Ja(c,i,0,a);r=d.local;for(let h=0;h<l.length;h+=3)l[h+1]<0&&(l.splice(h,3),h-=3);for(let h=0,p=0;h<d.children.length;h+=3){let f=d.children[h];for(;p<l.length&&l[p]<f;)p+=3;l.splice(p,0,d.children[h],d.children[h+1],d.children[h+2])}}return new ye(r.sort(qn),l)}function p2(e,r){if(!r||!e.length)return e;let n=[];for(let i=0;i<e.length;i++){let o=e[i];n.push(new ze(o.from+r,o.to+r,o.type))}return n}function RA(e,r,n,i,o,s,a){function l(u,c){for(let d=0;d<u.local.length;d++){let h=u.local[d].map(i,o,c);h?n.push(h):a.onRemove&&a.onRemove(u.local[d].spec)}for(let d=0;d<u.children.length;d+=3)l(u.children[d+2],u.children[d]+c+1)}for(let u=0;u<e.length;u+=3)e[u+1]==-1&&l(e[u+2],r[u]+s+1);return n}function f2(e,r,n){if(r.isLeaf)return null;let i=n+r.nodeSize,o=null;for(let s=0,a;s<e.length;s++)(a=e[s])&&a.from>n&&a.to<i&&((o||(o=[])).push(a),e[s]=null);return o}function m2(e){let r=[];for(let n=0;n<e.length;n++)e[n]!=null&&r.push(e[n]);return r}function Ja(e,r,n,i){let o=[],s=!1;r.forEach((l,u)=>{let c=f2(e,l,u+n);if(c){s=!0;let d=Ja(c,l,n+u+1,i);d!=lt&&o.push(u,u+l.nodeSize,d)}});let a=p2(s?m2(e):e,-n).sort(qn);for(let l=0;l<a.length;l++)a[l].type.valid(r,a[l])||(i.onRemove&&i.onRemove(a[l].spec),a.splice(l--,1));return a.length||o.length?new ye(a,o):lt}function qn(e,r){return e.from-r.from||e.to-r.to}function ih(e){let r=e;for(let n=0;n<r.length-1;n++){let i=r[n];if(i.from!=i.to)for(let o=n+1;o<r.length;o++){let s=r[o];if(s.from==i.from){s.to!=i.to&&(r==e&&(r=e.slice()),r[o]=s.copy(s.from,i.to),g0(r,o+1,s.copy(i.to,s.to)));continue}else{s.from<i.to&&(r==e&&(r=e.slice()),r[n]=i.copy(i.from,s.from),g0(r,o,i.copy(s.from,i.to)));break}}}return r}function g0(e,r,n){for(;r<e.length&&qn(n,e[r])>0;)r++;e.splice(r,0,n)}function Vu(e){let r=[];return e.someProp("decorations",n=>{let i=n(e.state);i&&i!=lt&&r.push(i)}),e.cursorWrapper&&r.push(ye.create(e.state.doc,[e.cursorWrapper.deco])),Jr.from(r)}const zA={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},$A=_t&&cn<=11;class HA{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(r){this.anchorNode=r.anchorNode,this.anchorOffset=r.anchorOffset,this.focusNode=r.focusNode,this.focusOffset=r.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(r){return r.anchorNode==this.anchorNode&&r.anchorOffset==this.anchorOffset&&r.focusNode==this.focusNode&&r.focusOffset==this.focusOffset}}class PA{constructor(r,n){this.view=r,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new HA,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(i=>{for(let o=0;o<i.length;o++)this.queue.push(i[o]);_t&&cn<=11&&i.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),$A&&(this.onCharData=i=>{this.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,zA)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let r=this.observer.takeRecords();if(r.length){for(let n=0;n<r.length;n++)this.queue.push(r[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(o0(this.view)){if(this.suppressingSelectionUpdates)return zr(this.view);if(_t&&cn<=11&&!this.view.state.selection.empty){let r=this.view.domSelectionRange();if(r.focusNode&&Xn(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(r){if(!r.focusNode)return!0;let n=new Set,i;for(let s=r.focusNode;s;s=Ko(s))n.add(s);for(let s=r.anchorNode;s;s=Ko(s))if(n.has(s)){i=s;break}let o=i&&this.view.docView.nearestDesc(i);if(o&&o.ignoreMutation({type:"selection",target:i.nodeType==3?i.parentNode:i}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let r of this.observer.takeRecords())this.queue.push(r);return this.queue}selectionChanged(r){return!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&o0(this.view)&&!this.ignoreSelectionChange(r)}flush(){let{view:r}=this;if(!r.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let i=r.domSelectionRange(),o=this.selectionChanged(i),s=-1,a=-1,l=!1,u=[];if(r.editable)for(let d=0;d<n.length;d++){let h=this.registerMutation(n[d],u);h&&(s=s<0?h.from:Math.min(h.from,s),a=a<0?h.to:Math.max(h.to,a),h.typeOver&&(l=!0))}if(or&&u.length){let d=u.filter(h=>h.nodeName=="BR");if(d.length==2){let[h,p]=d;h.parentNode&&h.parentNode.parentNode==p.parentNode?p.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let p of d){let f=p.parentNode;f&&f.nodeName=="LI"&&(!h||qA(r,h)!=f)&&p.remove()}}}let c=null;s<0&&o&&r.input.lastFocus>Date.now()-200&&Math.max(r.input.lastTouch,r.input.lastClick.time)<Date.now()-300&&Xl(i)&&(c=Yd(r))&&c.eq(ne.near(r.state.doc.resolve(0),1))?(r.input.lastFocus=0,zr(r),this.currentSelection.set(i),r.scrollToSelection()):(s>-1||o)&&(s>-1&&(r.docView.markDirty(s,a),VA(r)),this.handleDOMChange(s,a,l,u),r.docView&&r.docView.dirty?r.updateState(r.state):this.currentSelection.eq(i)||zr(r),this.currentSelection.set(i))}registerMutation(r,n){if(n.indexOf(r.target)>-1)return null;let i=this.view.docView.nearestDesc(r.target);if(r.type=="attributes"&&(i==this.view.docView||r.attributeName=="contenteditable"||r.attributeName=="style"&&!r.oldValue&&!r.target.getAttribute("style"))||!i||i.ignoreMutation(r))return null;if(r.type=="childList"){for(let d=0;d<r.addedNodes.length;d++){let h=r.addedNodes[d];n.push(h),h.nodeType==3&&(this.lastChangedTextNode=h)}if(i.contentDOM&&i.contentDOM!=i.dom&&!i.contentDOM.contains(r.target))return{from:i.posBefore,to:i.posAfter};let o=r.previousSibling,s=r.nextSibling;if(_t&&cn<=11&&r.addedNodes.length)for(let d=0;d<r.addedNodes.length;d++){let{previousSibling:h,nextSibling:p}=r.addedNodes[d];(!h||Array.prototype.indexOf.call(r.addedNodes,h)<0)&&(o=h),(!p||Array.prototype.indexOf.call(r.addedNodes,p)<0)&&(s=p)}let a=o&&o.parentNode==r.target?ot(o)+1:0,l=i.localPosFromDOM(r.target,a,-1),u=s&&s.parentNode==r.target?ot(s):r.target.childNodes.length,c=i.localPosFromDOM(r.target,u,1);return{from:l,to:c}}else return r.type=="attributes"?{from:i.posAtStart-i.border,to:i.posAtEnd+i.border}:(this.lastChangedTextNode=r.target,{from:i.posAtStart,to:i.posAtEnd,typeOver:r.target.nodeValue==r.oldValue})}}let b0=new WeakMap,y0=!1;function VA(e){if(!b0.has(e)&&(b0.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=or,y0)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),y0=!0}}function C0(e,r){let n=r.startContainer,i=r.startOffset,o=r.endContainer,s=r.endOffset,a=e.domAtPos(e.state.selection.anchor);return Xn(a.node,a.offset,o,s)&&([n,i,o,s]=[o,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:o,focusOffset:s}}function jA(e,r){if(r.getComposedRanges){let o=r.getComposedRanges(e.root)[0];if(o)return C0(e,o)}let n;function i(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",i,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",i,!0),n?C0(e,n):null}function qA(e,r){for(let n=r.parentNode;n&&n!=e.dom;n=n.parentNode){let i=e.docView.nearestDesc(n,!0);if(i&&i.node.isBlock)return n}return null}function UA(e,r,n){let{node:i,fromOffset:o,toOffset:s,from:a,to:l}=e.docView.parseRange(r,n),u=e.domSelectionRange(),c,d=u.anchorNode;if(d&&e.dom.contains(d.nodeType==1?d:d.parentNode)&&(c=[{node:d,offset:u.anchorOffset}],Xl(u)||c.push({node:u.focusNode,offset:u.focusOffset})),ut&&e.input.lastKeyCode===8)for(let g=s;g>o;g--){let y=i.childNodes[g-1],v=y.pmViewDesc;if(y.nodeName=="BR"&&!v){s=g;break}if(!v||v.size)break}let h=e.state.doc,p=e.someProp("domParser")||Vn.fromSchema(e.state.schema),f=h.resolve(a),m=null,b=p.parse(i,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:o,to:s,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:WA,context:f});if(c&&c[0].pos!=null){let g=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=g),m={anchor:g+a,head:y+a}}return{doc:b,sel:m,from:a,to:l}}function WA(e){let r=e.pmViewDesc;if(r)return r.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(yt&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||yt&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const KA=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function ZA(e,r,n,i,o){let s=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,r<0){let D=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,P=Yd(e,D);if(P&&!e.state.selection.eq(P)){if(ut&&Yt&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",J=>J(e,Mn(13,"Enter"))))return;let U=e.state.tr.setSelection(P);D=="pointer"?U.setMeta("pointer",!0):D=="key"&&U.scrollIntoView(),s&&U.setMeta("composition",s),e.dispatch(U)}return}let a=e.state.doc.resolve(r),l=a.sharedDepth(n);r=a.before(l+1),n=e.state.doc.resolve(n).after(l+1);let u=e.state.selection,c=UA(e,r,n),d=e.state.doc,h=d.slice(c.from,c.to),p,f;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(p=e.state.selection.to,f="end"):(p=e.state.selection.from,f="start"),e.input.lastKeyCode=null;let m=XA(h.content,c.doc.content,c.from,p,f);if(m&&e.input.domChangeCount++,(Gi&&e.input.lastIOSEnter>Date.now()-225||Yt)&&o.some(D=>D.nodeType==1&&!KA.test(D.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",D=>D(e,Mn(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!m)if(i&&u instanceof Q&&!u.empty&&u.$head.sameParent(u.$anchor)&&!e.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))m={start:u.from,endA:u.to,endB:u.to};else{if(c.sel){let D=v0(e,e.state.doc,c.sel);if(D&&!D.eq(e.state.selection)){let P=e.state.tr.setSelection(D);s&&P.setMeta("composition",s),e.dispatch(P)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof Q&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=c.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),_t&&cn<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>c.from&&c.doc.textBetween(m.start-c.from-1,m.start-c.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let b=c.doc.resolveNoCache(m.start-c.from),g=c.doc.resolveNoCache(m.endB-c.from),y=d.resolve(m.start),v=b.sameParent(g)&&b.parent.inlineContent&&y.end()>=m.endA,k;if((Gi&&e.input.lastIOSEnter>Date.now()-225&&(!v||o.some(D=>D.nodeName=="DIV"||D.nodeName=="P"))||!v&&b.pos<c.doc.content.size&&!b.sameParent(g)&&(k=ne.findFrom(c.doc.resolve(b.pos+1),1,!0))&&k.head==g.pos)&&e.someProp("handleKeyDown",D=>D(e,Mn(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&JA(d,m.start,m.endA,b,g)&&e.someProp("handleKeyDown",D=>D(e,Mn(8,"Backspace")))){Yt&&ut&&e.domObserver.suppressSelectionUpdates();return}ut&&Yt&&m.endB==m.start&&(e.input.lastAndroidDelete=Date.now()),Yt&&!v&&b.start()!=g.start()&&g.parentOffset==0&&b.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==m.endA&&(m.endB-=2,g=c.doc.resolveNoCache(m.endB-c.from),setTimeout(()=>{e.someProp("handleKeyDown",function(D){return D(e,Mn(13,"Enter"))})},20));let C=m.start,A=m.endA,_,S,L;if(v){if(b.pos==g.pos)_t&&cn<=11&&b.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>zr(e),20)),_=e.state.tr.delete(C,A),S=d.resolve(m.start).marksAcross(d.resolve(m.endA));else if(m.endA==m.endB&&(L=GA(b.parent.content.cut(b.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,m.endA-y.start()))))_=e.state.tr,L.type=="add"?_.addMark(C,A,L.mark):_.removeMark(C,A,L.mark);else if(b.parent.child(b.index()).isText&&b.index()==g.index()-(g.textOffset?0:1)){let D=b.parent.textBetween(b.parentOffset,g.parentOffset);if(e.someProp("handleTextInput",P=>P(e,C,A,D)))return;_=e.state.tr.insertText(D,C,A)}}if(_||(_=e.state.tr.replace(C,A,c.doc.slice(m.start-c.from,m.endB-c.from))),c.sel){let D=v0(e,_.doc,c.sel);D&&!(ut&&Yt&&e.composing&&D.empty&&(m.start!=m.endB||e.input.lastAndroidDelete<Date.now()-100)&&(D.head==C||D.head==_.mapping.map(A)-1)||_t&&D.empty&&D.head==C)&&_.setSelection(D)}S&&_.ensureMarks(S),s&&_.setMeta("composition",s),e.dispatch(_.scrollIntoView())}function v0(e,r,n){return Math.max(n.anchor,n.head)>r.content.size?null:eh(e,r.resolve(n.anchor),r.resolve(n.head))}function GA(e,r){let n=e.firstChild.marks,i=r.firstChild.marks,o=n,s=i,a,l,u;for(let d=0;d<i.length;d++)o=i[d].removeFromSet(o);for(let d=0;d<n.length;d++)s=n[d].removeFromSet(s);if(o.length==1&&s.length==0)l=o[0],a="add",u=d=>d.mark(l.addToSet(d.marks));else if(o.length==0&&s.length==1)l=s[0],a="remove",u=d=>d.mark(l.removeFromSet(d.marks));else return null;let c=[];for(let d=0;d<r.childCount;d++)c.push(u(r.child(d)));if(O.from(c).eq(e))return{mark:l,type:a}}function JA(e,r,n,i,o){if(n-r<=o.pos-i.pos||ju(i,!0,!1)<o.pos)return!1;let s=e.resolve(r);if(!i.parent.isTextblock){let l=s.nodeAfter;return l!=null&&n==r+l.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let a=e.resolve(ju(s,!0,!0));return!a.parent.isTextblock||a.pos>n||ju(a,!0,!1)<n?!1:i.parent.content.cut(i.parentOffset).eq(a.parent.content)}function ju(e,r,n){let i=e.depth,o=r?e.end():e.pos;for(;i>0&&(r||e.indexAfter(i)==e.node(i).childCount);)i--,o++,r=!1;if(n){let s=e.node(i).maybeChild(e.indexAfter(i));for(;s&&!s.isLeaf;)s=s.firstChild,o++}return o}function XA(e,r,n,i,o){let s=e.findDiffStart(r,n);if(s==null)return null;let{a,b:l}=e.findDiffEnd(r,n+e.size,n+r.size);if(o=="end"){let u=Math.max(0,s-Math.min(a,l));i-=a+u-s}if(a<s&&e.size<r.size){let u=i<=s&&i>=a?s-i:0;s-=u,s&&s<r.size&&k0(r.textBetween(s-1,s+1))&&(s+=u?1:-1),l=s+(l-a),a=s}else if(l<s){let u=i<=s&&i>=l?s-i:0;s-=u,s&&s<e.size&&k0(e.textBetween(s-1,s+1))&&(s+=u?1:-1),a=s+(a-l),l=s}return{start:s,endA:a,endB:l}}function k0(e){if(e.length!=2)return!1;let r=e.charCodeAt(0),n=e.charCodeAt(1);return r>=56320&&r<=57343&&n>=55296&&n<=56319}class QA{constructor(r,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new bA,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(x0),this.dispatch=this.dispatch.bind(this),this.dom=r&&r.mount||document.createElement("div"),r&&(r.appendChild?r.appendChild(this.dom):typeof r=="function"?r(this.dom):r.mount&&(this.mounted=!0)),this.editable=_0(this),A0(this),this.nodeViews=E0(this),this.docView=Yp(this.state.doc,w0(this),Vu(this),this.dom,this),this.domObserver=new PA(this,(i,o,s,a)=>ZA(this,i,o,s,a)),this.domObserver.start(),yA(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let r=this._props;this._props={};for(let n in r)this._props[n]=r[n];this._props.state=this.state}return this._props}update(r){r.handleDOMEvents!=this._props.handleDOMEvents&&rd(this);let n=this._props;this._props=r,r.plugins&&(r.plugins.forEach(x0),this.directPlugins=r.plugins),this.updateStateInner(r.state,n)}setProps(r){let n={};for(let i in this._props)n[i]=this._props[i];n.state=this.state;for(let i in r)n[i]=r[i];this.update(n)}updateState(r){this.updateStateInner(r,this._props)}updateStateInner(r,n){var i;let o=this.state,s=!1,a=!1;r.storedMarks&&this.composing&&(c2(this),a=!0),this.state=r;let l=o.plugins!=r.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let f=E0(this);e_(f,this.nodeViews)&&(this.nodeViews=f,s=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&rd(this),this.editable=_0(this),A0(this);let u=Vu(this),c=w0(this),d=o.plugins!=r.plugins&&!o.doc.eq(r.doc)?"reset":r.scrollToSelection>o.scrollToSelection?"to selection":"preserve",h=s||!this.docView.matchesNode(r.doc,c,u);(h||!r.selection.eq(o.selection))&&(a=!0);let p=d=="preserve"&&a&&this.dom.style.overflowAnchor==null&&Nw(this);if(a){this.domObserver.stop();let f=h&&(_t||ut)&&!this.composing&&!o.selection.empty&&!r.selection.empty&&YA(o.selection,r.selection);if(h){let m=ut?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=FA(this)),(s||!this.docView.update(r.doc,c,u,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Yp(r.doc,c,u,this.dom,this)),m&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&rA(this))?zr(this,f):(Yg(this,r.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((i=this.dragging)===null||i===void 0)&&i.node&&!o.doc.eq(r.doc)&&this.updateDraggedNode(this.dragging,o),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():p&&Ow(p)}scrollToSelection(){let r=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof ee){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Kp(this,n.getBoundingClientRect(),r)}else Kp(this,this.coordsAtPos(this.state.selection.head,1),r)}destroyPluginViews(){let r;for(;r=this.pluginViews.pop();)r.destroy&&r.destroy()}updatePluginViews(r){if(!r||r.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n];i.spec.view&&this.pluginViews.push(i.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let i=this.state.plugins[n];i.spec.view&&this.pluginViews.push(i.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let i=this.pluginViews[n];i.update&&i.update(this,r)}}updateDraggedNode(r,n){let i=r.node,o=-1;if(this.state.doc.nodeAt(i.from)==i.node)o=i.from;else{let s=i.from+(this.state.doc.content.size-n.doc.content.size);(s>0&&this.state.doc.nodeAt(s))==i.node&&(o=s)}this.dragging=new h2(r.slice,r.move,o<0?void 0:ee.create(this.state.doc,o))}someProp(r,n){let i=this._props&&this._props[r],o;if(i!=null&&(o=n?n(i):i))return o;for(let a=0;a<this.directPlugins.length;a++){let l=this.directPlugins[a].props[r];if(l!=null&&(o=n?n(l):l))return o}let s=this.state.plugins;if(s)for(let a=0;a<s.length;a++){let l=s[a].props[r];if(l!=null&&(o=n?n(l):l))return o}}hasFocus(){if(_t){let r=this.root.activeElement;if(r==this.dom)return!0;if(!r||!this.dom.contains(r))return!1;for(;r&&this.dom!=r&&this.dom.contains(r);){if(r.contentEditable=="false")return!1;r=r.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Tw(this.dom),zr(this),this.domObserver.start()}get root(){let r=this._root;if(r==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return r||document}updateRoot(){this._root=null}posAtCoords(r){return $w(this,r)}coordsAtPos(r,n=1){return Ug(this,r,n)}domAtPos(r,n=0){return this.docView.domFromPos(r,n)}nodeDOM(r){let n=this.docView.descAt(r);return n?n.nodeDOM:null}posAtDOM(r,n,i=-1){let o=this.docView.posFromDOM(r,n,i);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(r,n){return qw(this,n||this.state,r)}pasteHTML(r,n){return Zo(this,"",r,!1,n||new ClipboardEvent("paste"))}pasteText(r,n){return Zo(this,r,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(CA(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Vu(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,kw())}get isDestroyed(){return this.docView==null}dispatchEvent(r){return kA(this,r)}dispatch(r){let n=this._props.dispatchTransaction;n?n.call(this,r):this.updateState(this.state.apply(r))}domSelectionRange(){let r=this.domSelection();return r?yt&&this.root.nodeType===11&&xw(this.dom.ownerDocument)==this.dom&&jA(this,r)||r:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function w0(e){let r=Object.create(null);return r.class="ProseMirror",r.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let i in n)i=="class"?r.class+=" "+n[i]:i=="style"?r.style=(r.style?r.style+";":"")+n[i]:!r[i]&&i!="contenteditable"&&i!="nodeName"&&(r[i]=String(n[i]))}),r.translate||(r.translate="no"),[ze.node(0,e.state.doc.content.size,r)]}function A0(e){if(e.markCursor){let r=document.createElement("img");r.className="ProseMirror-separator",r.setAttribute("mark-placeholder","true"),r.setAttribute("alt",""),e.cursorWrapper={dom:r,deco:ze.widget(e.state.selection.from,r,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function _0(e){return!e.someProp("editable",r=>r(e.state)===!1)}function YA(e,r){let n=Math.min(e.$anchor.sharedDepth(e.head),r.$anchor.sharedDepth(r.head));return e.$anchor.start(n)!=r.$anchor.start(n)}function E0(e){let r=Object.create(null);function n(i){for(let o in i)Object.prototype.hasOwnProperty.call(r,o)||(r[o]=i[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),r}function e_(e,r){let n=0,i=0;for(let o in e){if(e[o]!=r[o])return!0;n++}for(let o in r)i++;return n!=i}function x0(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var pn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},Xa={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},D0=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),t_=typeof navigator<"u"&&/Apple Computer/.test(navigator.vendor),r_=typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent),S0=typeof navigator<"u"&&/Mac/.test(navigator.platform),n_=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),i_=D0&&(S0||+D0[1]<57)||r_&&S0,st=0;st<10;st++)pn[48+st]=pn[96+st]=String(st);for(var st=1;st<=24;st++)pn[st+111]="F"+st;for(var st=65;st<=90;st++)pn[st]=String.fromCharCode(st+32),Xa[st]=String.fromCharCode(st);for(var qu in pn)Xa.hasOwnProperty(qu)||(Xa[qu]=pn[qu]);function o_(e){var r=i_&&(e.ctrlKey||e.altKey||e.metaKey)||(t_||n_)&&e.shiftKey&&e.key&&e.key.length==1,n=!r&&e.key||(e.shiftKey?Xa:pn)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const s_=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function a_(e){let r=e.split(/-(?!$)/),n=r[r.length-1];n=="Space"&&(n=" ");let i,o,s,a;for(let l=0;l<r.length-1;l++){let u=r[l];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))i=!0;else if(/^(c|ctrl|control)$/i.test(u))o=!0;else if(/^s(hift)?$/i.test(u))s=!0;else if(/^mod$/i.test(u))s_?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+u)}return i&&(n="Alt-"+n),o&&(n="Ctrl-"+n),a&&(n="Meta-"+n),s&&(n="Shift-"+n),n}function l_(e){let r=Object.create(null);for(let n in e)r[a_(n)]=e[n];return r}function Uu(e,r,n=!0){return r.altKey&&(e="Alt-"+e),r.ctrlKey&&(e="Ctrl-"+e),r.metaKey&&(e="Meta-"+e),n&&r.shiftKey&&(e="Shift-"+e),e}function u_(e){return new fe({props:{handleKeyDown:oh(e)}})}function oh(e){let r=l_(e);return function(n,i){let o=o_(i),s,a=r[Uu(o,i)];if(a&&a(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(i.shiftKey){let l=r[Uu(o,i,!1)];if(l&&l(n.state,n.dispatch,n))return!0}if((i.shiftKey||i.altKey||i.metaKey||o.charCodeAt(0)>127)&&(s=pn[i.keyCode])&&s!=o){let l=r[Uu(s,i)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}const c_=(e,r)=>e.selection.empty?!1:(r&&r(e.tr.deleteSelection().scrollIntoView()),!0);function g2(e,r){let{$cursor:n}=e.selection;return!n||(r?!r.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const d_=(e,r,n)=>{let i=g2(e,n);if(!i)return!1;let o=sh(i);if(!o){let a=i.blockRange(),l=a&&lo(a);return l==null?!1:(r&&r(e.tr.lift(a,l).scrollIntoView()),!0)}let s=o.nodeBefore;if(v2(e,o,r,-1))return!0;if(i.parent.content.size==0&&(Ji(s,"end")||ee.isSelectable(s)))for(let a=i.depth;;a--){let l=Gl(e.doc,i.before(a),i.after(a),$.empty);if(l&&l.slice.size<l.to-l.from){if(r){let u=e.tr.step(l);u.setSelection(Ji(s,"end")?ne.findFrom(u.doc.resolve(u.mapping.map(o.pos,-1)),-1):ee.create(u.doc,o.pos-s.nodeSize)),r(u.scrollIntoView())}return!0}if(a==1||i.node(a-1).childCount>1)break}return s.isAtom&&o.depth==i.depth-1?(r&&r(e.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0):!1},h_=(e,r,n)=>{let i=g2(e,n);if(!i)return!1;let o=sh(i);return o?b2(e,o,r):!1},p_=(e,r,n)=>{let i=y2(e,n);if(!i)return!1;let o=ah(i);return o?b2(e,o,r):!1};function b2(e,r,n){let i=r.nodeBefore,o=i,s=r.pos-1;for(;!o.isTextblock;s--){if(o.type.spec.isolating)return!1;let d=o.lastChild;if(!d)return!1;o=d}let a=r.nodeAfter,l=a,u=r.pos+1;for(;!l.isTextblock;u++){if(l.type.spec.isolating)return!1;let d=l.firstChild;if(!d)return!1;l=d}let c=Gl(e.doc,s,u,$.empty);if(!c||c.from!=s||c instanceof Ye&&c.slice.size>=u-s)return!1;if(n){let d=e.tr.step(c);d.setSelection(Q.create(d.doc,s)),n(d.scrollIntoView())}return!0}function Ji(e,r,n=!1){for(let i=e;i;i=r=="start"?i.firstChild:i.lastChild){if(i.isTextblock)return!0;if(n&&i.childCount!=1)return!1}return!1}const f_=(e,r,n)=>{let{$head:i,empty:o}=e.selection,s=i;if(!o)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):i.parentOffset>0)return!1;s=sh(i)}let a=s&&s.nodeBefore;return!a||!ee.isSelectable(a)?!1:(r&&r(e.tr.setSelection(ee.create(e.doc,s.pos-a.nodeSize)).scrollIntoView()),!0)};function sh(e){if(!e.parent.type.spec.isolating)for(let r=e.depth-1;r>=0;r--){if(e.index(r)>0)return e.doc.resolve(e.before(r+1));if(e.node(r).type.spec.isolating)break}return null}function y2(e,r){let{$cursor:n}=e.selection;return!n||(r?!r.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const m_=(e,r,n)=>{let i=y2(e,n);if(!i)return!1;let o=ah(i);if(!o)return!1;let s=o.nodeAfter;if(v2(e,o,r,1))return!0;if(i.parent.content.size==0&&(Ji(s,"start")||ee.isSelectable(s))){let a=Gl(e.doc,i.before(),i.after(),$.empty);if(a&&a.slice.size<a.to-a.from){if(r){let l=e.tr.step(a);l.setSelection(Ji(s,"start")?ne.findFrom(l.doc.resolve(l.mapping.map(o.pos)),1):ee.create(l.doc,l.mapping.map(o.pos))),r(l.scrollIntoView())}return!0}}return s.isAtom&&o.depth==i.depth-1?(r&&r(e.tr.delete(o.pos,o.pos+s.nodeSize).scrollIntoView()),!0):!1},g_=(e,r,n)=>{let{$head:i,empty:o}=e.selection,s=i;if(!o)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):i.parentOffset<i.parent.content.size)return!1;s=ah(i)}let a=s&&s.nodeAfter;return!a||!ee.isSelectable(a)?!1:(r&&r(e.tr.setSelection(ee.create(e.doc,s.pos)).scrollIntoView()),!0)};function ah(e){if(!e.parent.type.spec.isolating)for(let r=e.depth-1;r>=0;r--){let n=e.node(r);if(e.index(r)+1<n.childCount)return e.doc.resolve(e.after(r+1));if(n.type.spec.isolating)break}return null}const b_=(e,r)=>{let n=e.selection,i=n instanceof ee,o;if(i){if(n.node.isTextblock||!vn(e.doc,n.from))return!1;o=n.from}else if(o=Zl(e.doc,n.from,-1),o==null)return!1;if(r){let s=e.tr.join(o);i&&s.setSelection(ee.create(s.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),r(s.scrollIntoView())}return!0},y_=(e,r)=>{let n=e.selection,i;if(n instanceof ee){if(n.node.isTextblock||!vn(e.doc,n.to))return!1;i=n.to}else if(i=Zl(e.doc,n.to,1),i==null)return!1;return r&&r(e.tr.join(i).scrollIntoView()),!0},C_=(e,r)=>{let{$from:n,$to:i}=e.selection,o=n.blockRange(i),s=o&&lo(o);return s==null?!1:(r&&r(e.tr.lift(o,s).scrollIntoView()),!0)},v_=(e,r)=>{let{$head:n,$anchor:i}=e.selection;return!n.parent.type.spec.code||!n.sameParent(i)?!1:(r&&r(e.tr.insertText("\n").scrollIntoView()),!0)};function C2(e){for(let r=0;r<e.edgeCount;r++){let{type:n}=e.edge(r);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const k_=(e,r)=>{let{$head:n,$anchor:i}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(i))return!1;let o=n.node(-1),s=n.indexAfter(-1),a=C2(o.contentMatchAt(s));if(!a||!o.canReplaceWith(s,s,a))return!1;if(r){let l=n.after(),u=e.tr.replaceWith(l,l,a.createAndFill());u.setSelection(ne.near(u.doc.resolve(l),1)),r(u.scrollIntoView())}return!0},w_=(e,r)=>{let n=e.selection,{$from:i,$to:o}=n;if(n instanceof nr||i.parent.inlineContent||o.parent.inlineContent)return!1;let s=C2(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(r){let a=(!i.parentOffset&&o.index()<o.parent.childCount?i:o).pos,l=e.tr.insert(a,s.createAndFill());l.setSelection(Q.create(l.doc,a+1)),r(l.scrollIntoView())}return!0},A_=(e,r)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let s=n.before();if(Ii(e.doc,s))return r&&r(e.tr.split(s).scrollIntoView()),!0}let i=n.blockRange(),o=i&&lo(i);return o==null?!1:(r&&r(e.tr.lift(i,o).scrollIntoView()),!0)},__=(e,r)=>{let{$from:n,to:i}=e.selection,o,s=n.sharedDepth(i);return s==0?!1:(o=n.before(s),r&&r(e.tr.setSelection(ee.create(e.doc,o))),!0)};function E_(e,r,n){let i=r.nodeBefore,o=r.nodeAfter,s=r.index();return!i||!o||!i.type.compatibleContent(o.type)?!1:!i.content.size&&r.parent.canReplace(s-1,s)?(n&&n(e.tr.delete(r.pos-i.nodeSize,r.pos).scrollIntoView()),!0):!r.parent.canReplace(s,s+1)||!(o.isTextblock||vn(e.doc,r.pos))?!1:(n&&n(e.tr.join(r.pos).scrollIntoView()),!0)}function v2(e,r,n,i){let o=r.nodeBefore,s=r.nodeAfter,a,l,u=o.type.spec.isolating||s.type.spec.isolating;if(!u&&E_(e,r,n))return!0;let c=!u&&r.parent.canReplace(r.index(),r.index()+1);if(c&&(a=(l=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&l.matchType(a[0]||s.type).validEnd){if(n){let f=r.pos+s.nodeSize,m=O.empty;for(let y=a.length-1;y>=0;y--)m=O.from(a[y].create(null,m));m=O.from(o.copy(m));let b=e.tr.step(new tt(r.pos-1,f,r.pos,f,new $(m,1,0),a.length,!0)),g=b.doc.resolve(f+2*a.length);g.nodeAfter&&g.nodeAfter.type==o.type&&vn(b.doc,g.pos)&&b.join(g.pos),n(b.scrollIntoView())}return!0}let d=s.type.spec.isolating||i>0&&u?null:ne.findFrom(r,1),h=d&&d.$from.blockRange(d.$to),p=h&&lo(h);if(p!=null&&p>=r.depth)return n&&n(e.tr.lift(h,p).scrollIntoView()),!0;if(c&&Ji(s,"start",!0)&&Ji(o,"end")){let f=o,m=[];for(;m.push(f),!f.isTextblock;)f=f.lastChild;let b=s,g=1;for(;!b.isTextblock;b=b.firstChild)g++;if(f.canReplace(f.childCount,f.childCount,b.content)){if(n){let y=O.empty;for(let k=m.length-1;k>=0;k--)y=O.from(m[k].copy(y));let v=e.tr.step(new tt(r.pos-m.length,r.pos+s.nodeSize,r.pos+g,r.pos+s.nodeSize-g,new $(y,m.length,0),0,!0));n(v.scrollIntoView())}return!0}}return!1}function k2(e){return function(r,n){let i=r.selection,o=e<0?i.$from:i.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return o.node(s).isTextblock?(n&&n(r.tr.setSelection(Q.create(r.doc,e<0?o.start(s):o.end(s)))),!0):!1}}const x_=k2(-1),D_=k2(1);function S_(e,r=null){return function(n,i){let{$from:o,$to:s}=n.selection,a=o.blockRange(s),l=a&&Gd(a,e,r);return l?(i&&i(n.tr.wrap(a,l).scrollIntoView()),!0):!1}}function B0(e,r=null){return function(n,i){let o=!1;for(let s=0;s<n.selection.ranges.length&&!o;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];n.doc.nodesBetween(a,l,(u,c)=>{if(o)return!1;if(!(!u.isTextblock||u.hasMarkup(e,r)))if(u.type==e)o=!0;else{let d=n.doc.resolve(c),h=d.index();o=d.parent.canReplaceWith(h,h+1,e)}})}if(!o)return!1;if(i){let s=n.tr;for(let a=0;a<n.selection.ranges.length;a++){let{$from:{pos:l},$to:{pos:u}}=n.selection.ranges[a];s.setBlockType(l,u,e,r)}i(s.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function B_(e,r=null){return function(n,i){let{$from:o,$to:s}=n.selection,a=o.blockRange(s),l=!1,u=a;if(!a)return!1;if(a.depth>=2&&o.node(a.depth-1).type.compatibleContent(e)&&a.startIndex==0){if(o.index(a.depth-1)==0)return!1;let d=n.doc.resolve(a.start-2);u=new Pa(d,d,a.depth),a.endIndex<a.parent.childCount&&(a=new Pa(o,n.doc.resolve(s.end(a.depth)),a.depth)),l=!0}let c=Gd(u,e,r,a);return c?(i&&i(M_(n.tr,a,c,l,e).scrollIntoView()),!0):!1}}function M_(e,r,n,i,o){let s=O.empty;for(let d=n.length-1;d>=0;d--)s=O.from(n[d].type.create(n[d].attrs,s));e.step(new tt(r.start-(i?2:0),r.end,r.start,r.end,new $(s,0,0),n.length,!0));let a=0;for(let d=0;d<n.length;d++)n[d].type==o&&(a=d+1);let l=n.length-a,u=r.start+n.length-(i?2:0),c=r.parent;for(let d=r.startIndex,h=r.endIndex,p=!0;d<h;d++,p=!1)!p&&Ii(e.doc,u,l)&&(e.split(u,l),u+=2*l),u+=c.child(d).nodeSize;return e}function F_(e){return function(r,n){let{$from:i,$to:o}=r.selection,s=i.blockRange(o,a=>a.childCount>0&&a.firstChild.type==e);return s?n?i.node(s.depth-1).type==e?N_(r,n,e,s):O_(r,n,s):!0:!1}}function N_(e,r,n,i){let o=e.tr,s=i.end,a=i.$to.end(i.depth);s<a&&(o.step(new tt(s-1,a,s,a,new $(O.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new Pa(o.doc.resolve(i.$from.pos),o.doc.resolve(a),i.depth));const l=lo(i);if(l==null)return!1;o.lift(i,l);let u=o.mapping.map(s,-1)-1;return vn(o.doc,u)&&o.join(u),r(o.scrollIntoView()),!0}function O_(e,r,n){let i=e.tr,o=n.parent;for(let f=n.end,m=n.endIndex-1,b=n.startIndex;m>b;m--)f-=o.child(m).nodeSize,i.delete(f-1,f+1);let s=i.doc.resolve(n.start),a=s.nodeAfter;if(i.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,u=n.endIndex==o.childCount,c=s.node(-1),d=s.index(-1);if(!c.canReplace(d+(l?0:1),d+1,a.content.append(u?O.empty:O.from(o))))return!1;let h=s.pos,p=h+a.nodeSize;return i.step(new tt(h-(l?1:0),p+(u?1:0),h+1,p-1,new $((l?O.empty:O.from(o.copy(O.empty))).append(u?O.empty:O.from(o.copy(O.empty))),l?0:1,u?0:1),l?0:1)),r(i.scrollIntoView()),!0}function T_(e){return function(r,n){let{$from:i,$to:o}=r.selection,s=i.blockRange(o,c=>c.childCount>0&&c.firstChild.type==e);if(!s)return!1;let a=s.startIndex;if(a==0)return!1;let l=s.parent,u=l.child(a-1);if(u.type!=e)return!1;if(n){let c=u.lastChild&&u.lastChild.type==l.type,d=O.from(c?e.create():null),h=new $(O.from(e.create(null,O.from(l.type.create(null,d)))),c?3:1,0),p=s.start,f=s.end;n(r.tr.step(new tt(p-(c?3:1),f,p,f,h,1,!0)).scrollIntoView())}return!0}}function Yl(e){const{state:r,transaction:n}=e;let{selection:i}=n,{doc:o}=n,{storedMarks:s}=n;return{...r,apply:r.apply.bind(r),applyTransaction:r.applyTransaction.bind(r),plugins:r.plugins,schema:r.schema,reconfigure:r.reconfigure.bind(r),toJSON:r.toJSON.bind(r),get storedMarks(){return s},get selection(){return i},get doc(){return o},get tr(){return i=n.selection,o=n.doc,s=n.storedMarks,n}}}class eu{constructor(r){this.editor=r.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=r.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:r,editor:n,state:i}=this,{view:o}=n,{tr:s}=i,a=this.buildProps(s);return Object.fromEntries(Object.entries(r).map(([l,u])=>[l,(...c)=>{const d=u(...c)(a);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(s),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(r,n=!0){const{rawCommands:i,editor:o,state:s}=this,{view:a}=o,l=[],u=!!r,c=r||s.tr,d=()=>(!u&&n&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&a.dispatch(c),l.every(p=>p===!0)),h={...Object.fromEntries(Object.entries(i).map(([p,f])=>[p,(...m)=>{const b=this.buildProps(c,n),g=f(...m)(b);return l.push(g),h}])),run:d};return h}createCan(r){const{rawCommands:n,state:i}=this,o=!1,s=r||i.tr,a=this.buildProps(s,o);return{...Object.fromEntries(Object.entries(n).map(([l,u])=>[l,(...c)=>u(...c)({...a,dispatch:void 0})])),chain:()=>this.createChain(s,o)}}buildProps(r,n=!0){const{rawCommands:i,editor:o,state:s}=this,{view:a}=o,l={tr:r,editor:o,view:a,state:Yl({state:s,transaction:r}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(r,n),can:()=>this.createCan(r),get commands(){return Object.fromEntries(Object.entries(i).map(([u,c])=>[u,(...d)=>c(...d)(l)]))}};return l}}class L_{constructor(){this.callbacks={}}on(r,n){return this.callbacks[r]||(this.callbacks[r]=[]),this.callbacks[r].push(n),this}emit(r,...n){const i=this.callbacks[r];return i&&i.forEach(o=>o.apply(this,n)),this}off(r,n){const i=this.callbacks[r];return i&&(n?this.callbacks[r]=i.filter(o=>o!==n):delete this.callbacks[r]),this}removeAllListeners(){this.callbacks={}}}function q(e,r,n){return e.config[r]===void 0&&e.parent?q(e.parent,r,n):typeof e.config[r]=="function"?e.config[r].bind({...n,parent:e.parent?q(e.parent,r,n):null}):e.config[r]}function tu(e){const r=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),i=e.filter(o=>o.type==="mark");return{baseExtensions:r,nodeExtensions:n,markExtensions:i}}function w2(e){const r=[],{nodeExtensions:n,markExtensions:i}=tu(e),o=[...n,...i],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(a=>{const l={name:a.name,options:a.options,storage:a.storage,extensions:o},u=q(a,"addGlobalAttributes",l);u&&u().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([h,p])=>{r.push({type:d,name:h,attribute:{...s,...p}})})})})}),o.forEach(a=>{const l={name:a.name,options:a.options,storage:a.storage},u=q(a,"addAttributes",l);if(!u)return;const c=u();Object.entries(c).forEach(([d,h])=>{const p={...s,...h};typeof(p==null?void 0:p.default)=="function"&&(p.default=p.default()),p!=null&&p.isRequired&&(p==null?void 0:p.default)===void 0&&delete p.default,r.push({type:a.name,name:d,attribute:p})})}),r}function Ze(e,r){if(typeof e=="string"){if(!r.nodes[e])throw Error("There is no node type named '".concat(e,"'. Maybe you forgot to add the extension?"));return r.nodes[e]}return e}function be(...e){return e.filter(r=>!!r).reduce((r,n)=>{const i={...r};return Object.entries(n).forEach(([o,s])=>{if(!i[o]){i[o]=s;return}if(o==="class"){const a=s?s.split(" "):[],l=i[o]?i[o].split(" "):[],u=a.filter(c=>!l.includes(c));i[o]=[...l,...u].join(" ")}else if(o==="style"){const a=s?s.split(";").map(c=>c.trim()).filter(Boolean):[],l=i[o]?i[o].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;l.forEach(c=>{const[d,h]=c.split(":").map(p=>p.trim());u.set(d,h)}),a.forEach(c=>{const[d,h]=c.split(":").map(p=>p.trim());u.set(d,h)}),i[o]=Array.from(u.entries()).map(([c,d])=>"".concat(c,": ").concat(d)).join("; ")}else i[o]=s}),i},{})}function id(e,r){return r.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,i)=>be(n,i),{})}function A2(e){return typeof e=="function"}function he(e,r=void 0,...n){return A2(e)?r?e.bind(r)(...n):e(...n):e}function I_(e={}){return Object.keys(e).length===0&&e.constructor===Object}function R_(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function M0(e,r){return"style"in e?e:{...e,getAttrs:n=>{const i=e.getAttrs?e.getAttrs(n):e.attrs;if(i===!1)return!1;const o=r.reduce((s,a)=>{const l=a.attribute.parseHTML?a.attribute.parseHTML(n):R_(n.getAttribute(a.name));return l==null?s:{...s,[a.name]:l}},{});return{...i,...o}}}}function F0(e){return Object.fromEntries(Object.entries(e).filter(([r,n])=>r==="attrs"&&I_(n)?!1:n!=null))}function _2(e,r){var n;const i=w2(e),{nodeExtensions:o,markExtensions:s}=tu(e),a=(n=o.find(c=>q(c,"topNode")))===null||n===void 0?void 0:n.name,l=Object.fromEntries(o.map(c=>{const d=i.filter(y=>y.type===c.name),h={name:c.name,options:c.options,storage:c.storage,editor:r},p=e.reduce((y,v)=>{const k=q(v,"extendNodeSchema",h);return{...y,...k?k(c):{}}},{}),f=F0({...p,content:he(q(c,"content",h)),marks:he(q(c,"marks",h)),group:he(q(c,"group",h)),inline:he(q(c,"inline",h)),atom:he(q(c,"atom",h)),selectable:he(q(c,"selectable",h)),draggable:he(q(c,"draggable",h)),code:he(q(c,"code",h)),whitespace:he(q(c,"whitespace",h)),defining:he(q(c,"defining",h)),isolating:he(q(c,"isolating",h)),attrs:Object.fromEntries(d.map(y=>{var v;return[y.name,{default:(v=y==null?void 0:y.attribute)===null||v===void 0?void 0:v.default}]}))}),m=he(q(c,"parseHTML",h));m&&(f.parseDOM=m.map(y=>M0(y,d)));const b=q(c,"renderHTML",h);b&&(f.toDOM=y=>b({node:y,HTMLAttributes:id(y,d)}));const g=q(c,"renderText",h);return g&&(f.toText=g),[c.name,f]})),u=Object.fromEntries(s.map(c=>{const d=i.filter(g=>g.type===c.name),h={name:c.name,options:c.options,storage:c.storage,editor:r},p=e.reduce((g,y)=>{const v=q(y,"extendMarkSchema",h);return{...g,...v?v(c):{}}},{}),f=F0({...p,inclusive:he(q(c,"inclusive",h)),excludes:he(q(c,"excludes",h)),group:he(q(c,"group",h)),spanning:he(q(c,"spanning",h)),code:he(q(c,"code",h)),attrs:Object.fromEntries(d.map(g=>{var y;return[g.name,{default:(y=g==null?void 0:g.attribute)===null||y===void 0?void 0:y.default}]}))}),m=he(q(c,"parseHTML",h));m&&(f.parseDOM=m.map(g=>M0(g,d)));const b=q(c,"renderHTML",h);return b&&(f.toDOM=g=>b({mark:g,HTMLAttributes:id(g,d)})),[c.name,f]}));return new Wd({topNode:a,nodes:l,marks:u})}function Wu(e,r){return r.nodes[e]||r.marks[e]||null}function N0(e,r){return Array.isArray(r)?r.some(n=>(typeof n=="string"?n:n.name)===e.name):r}const z_=(e,r=500)=>{let n="";const i=e.parentOffset;return e.parent.nodesBetween(Math.max(0,i-r),i,(o,s,a,l)=>{var u,c;const d=((c=(u=o.type.spec).toText)===null||c===void 0?void 0:c.call(u,{node:o,pos:s,parent:a,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?d:d.slice(0,Math.max(0,i-s))}),n};function lh(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class Ss{constructor(r){this.find=r.find,this.handler=r.handler}}const $_=(e,r)=>{if(lh(r))return r.exec(e);const n=r(e);if(!n)return null;const i=[n.text];return i.index=n.index,i.input=e,i.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),i.push(n.replaceWith)),i};function qs(e){var r;const{editor:n,from:i,to:o,text:s,rules:a,plugin:l}=e,{view:u}=n;if(u.composing)return!1;const c=u.state.doc.resolve(i);if(c.parent.type.spec.code||!((r=c.nodeBefore||c.nodeAfter)===null||r===void 0)&&r.marks.find(p=>p.type.spec.code))return!1;let d=!1;const h=z_(c)+s;return a.forEach(p=>{if(d)return;const f=$_(h,p.find);if(!f)return;const m=u.state.tr,b=Yl({state:u.state,transaction:m}),g={from:i-(f[0].length-s.length),to:o},{commands:y,chain:v,can:k}=new eu({editor:n,state:b});p.handler({state:b,range:g,match:f,commands:y,chain:v,can:k})===null||!m.steps.length||(m.setMeta(l,{transform:m,from:i,to:o,text:s}),u.dispatch(m),d=!0)}),d}function H_(e){const{editor:r,rules:n}=e,i=new fe({state:{init(){return null},apply(o,s){const a=o.getMeta(i);if(a)return a;const l=o.getMeta("applyInputRules");return l&&setTimeout(()=>{const{from:u,text:c}=l,d=u+c.length;qs({editor:r,from:u,to:d,text:c,rules:n,plugin:i})}),o.selectionSet||o.docChanged?null:s}},props:{handleTextInput(o,s,a,l){return qs({editor:r,from:s,to:a,text:l,rules:n,plugin:i})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:s}=o.state.selection;s&&qs({editor:r,from:s.pos,to:s.pos,text:"",rules:n,plugin:i})}),!1)},handleKeyDown(o,s){if(s.key!=="Enter")return!1;const{$cursor:a}=o.state.selection;return a?qs({editor:r,from:a.pos,to:a.pos,text:"\n",rules:n,plugin:i}):!1}},isInputRules:!0});return i}function P_(e){return Object.prototype.toString.call(e).slice(8,-1)}function Us(e){return P_(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function ru(e,r){const n={...e};return Us(e)&&Us(r)&&Object.keys(r).forEach(i=>{Us(r[i])&&Us(e[i])?n[i]=ru(e[i],r[i]):n[i]=r[i]}),n}class sr{constructor(r={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...r},this.name=this.config.name,r.defaultOptions&&Object.keys(r.defaultOptions).length>0&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=he(q(this,"addOptions",{name:this.name}))),this.storage=he(q(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(r={}){return new sr(r)}configure(r={}){const n=this.extend({...this.config,addOptions:()=>ru(this.options,r)});return n.name=this.name,n.parent=this.parent,n}extend(r={}){const n=new sr(r);return n.parent=this,this.child=n,n.name=r.name?r.name:n.parent.name,r.defaultOptions&&Object.keys(r.defaultOptions).length>0&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=he(q(n,"addOptions",{name:n.name})),n.storage=he(q(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:r,mark:n}){const{tr:i}=r.state,o=r.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!s.find(l=>(l==null?void 0:l.type.name)===n.name))return!1;const a=s.find(l=>(l==null?void 0:l.type.name)===n.name);return a&&i.removeStoredMark(a),i.insertText(" ",o.pos),r.view.dispatch(i),!0}return!1}}function V_(e){return typeof e=="number"}class j_{constructor(r){this.find=r.find,this.handler=r.handler}}const q_=(e,r,n)=>{if(lh(r))return[...e.matchAll(r)];const i=r(e,n);return i?i.map(o=>{const s=[o.text];return s.index=o.index,s.input=e,s.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(o.replaceWith)),s}):[]};function U_(e){const{editor:r,state:n,from:i,to:o,rule:s,pasteEvent:a,dropEvent:l}=e,{commands:u,chain:c,can:d}=new eu({editor:r,state:n}),h=[];return n.doc.nodesBetween(i,o,(p,f)=>{if(!p.isTextblock||p.type.spec.code)return;const m=Math.max(i,f),b=Math.min(o,f+p.content.size),g=p.textBetween(m-f,b-f,void 0,"");q_(g,s.find,a).forEach(y=>{if(y.index===void 0)return;const v=m+y.index+1,k=v+y[0].length,C={from:n.tr.mapping.map(v),to:n.tr.mapping.map(k)},A=s.handler({state:n,range:C,match:y,commands:u,chain:c,can:d,pasteEvent:a,dropEvent:l});h.push(A)})}),h.every(p=>p!==null)}const W_=e=>{var r;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(r=n.clipboardData)===null||r===void 0||r.setData("text/html",e),n};function K_(e){const{editor:r,rules:n}=e;let i=null,o=!1,s=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l=typeof DragEvent<"u"?new DragEvent("drop"):null;const u=({state:c,from:d,to:h,rule:p,pasteEvt:f})=>{const m=c.tr,b=Yl({state:c,transaction:m});if(!(!U_({editor:r,state:b,from:Math.max(d-1,0),to:h.b-1,rule:p,pasteEvent:f,dropEvent:l})||!m.steps.length))return l=typeof DragEvent<"u"?new DragEvent("drop"):null,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m};return n.map(c=>new fe({view(d){const h=p=>{var f;i=!((f=d.dom.parentElement)===null||f===void 0)&&f.contains(p.target)?d.dom.parentElement:null};return window.addEventListener("dragstart",h),{destroy(){window.removeEventListener("dragstart",h)}}},props:{handleDOMEvents:{drop:(d,h)=>(s=i===d.dom.parentElement,l=h,!1),paste:(d,h)=>{var p;const f=(p=h.clipboardData)===null||p===void 0?void 0:p.getData("text/html");return a=h,o=!!(f!=null&&f.includes("data-pm-slice")),!1}}},appendTransaction:(d,h,p)=>{const f=d[0],m=f.getMeta("uiEvent")==="paste"&&!o,b=f.getMeta("uiEvent")==="drop"&&!s,g=f.getMeta("applyPasteRules"),y=!!g;if(!m&&!b&&!y)return;if(y){const{from:C,text:A}=g,_=C+A.length,S=W_(A);return u({rule:c,state:p,from:C,to:{b:_},pasteEvt:S})}const v=h.doc.content.findDiffStart(p.doc.content),k=h.doc.content.findDiffEnd(p.doc.content);if(!(!V_(v)||!k||v===k.b))return u({rule:c,state:p,from:v,to:k,pasteEvt:a})}}))}function Z_(e){const r=e.filter((n,i)=>e.indexOf(n)!==i);return Array.from(new Set(r))}class In{constructor(r,n){this.splittableMarks=[],this.editor=n,this.extensions=In.resolve(r),this.schema=_2(this.extensions,n),this.setupExtensions()}static resolve(r){const n=In.sort(In.flatten(r)),i=Z_(n.map(o=>o.name));return i.length&&console.warn("[tiptap warn]: Duplicate extension names found: [".concat(i.map(o=>"'".concat(o,"'")).join(", "),"]. This can lead to issues.")),n}static flatten(r){return r.map(n=>{const i={name:n.name,options:n.options,storage:n.storage},o=q(n,"addExtensions",i);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(r){return r.sort((n,i)=>{const o=q(n,"priority")||100,s=q(i,"priority")||100;return o>s?-1:o<s?1:0})}get commands(){return this.extensions.reduce((r,n)=>{const i={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:Wu(n.name,this.schema)},o=q(n,"addCommands",i);return o?{...r,...o()}:r},{})}get plugins(){const{editor:r}=this,n=In.sort([...this.extensions].reverse()),i=[],o=[],s=n.map(a=>{const l={name:a.name,options:a.options,storage:a.storage,editor:r,type:Wu(a.name,this.schema)},u=[],c=q(a,"addKeyboardShortcuts",l);let d={};if(a.type==="mark"&&q(a,"exitable",l)&&(d.ArrowRight=()=>sr.handleExit({editor:r,mark:a})),c){const b=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:r})]));d={...d,...b}}const h=u_(d);u.push(h);const p=q(a,"addInputRules",l);N0(a,r.options.enableInputRules)&&p&&i.push(...p());const f=q(a,"addPasteRules",l);N0(a,r.options.enablePasteRules)&&f&&o.push(...f());const m=q(a,"addProseMirrorPlugins",l);if(m){const b=m();u.push(...b)}return u}).flat();return[H_({editor:r,rules:i}),...K_({editor:r,rules:o}),...s]}get attributes(){return w2(this.extensions)}get nodeViews(){const{editor:r}=this,{nodeExtensions:n}=tu(this.extensions);return Object.fromEntries(n.filter(i=>!!q(i,"addNodeView")).map(i=>{const o=this.attributes.filter(u=>u.type===i.name),s={name:i.name,options:i.options,storage:i.storage,editor:r,type:Ze(i.name,this.schema)},a=q(i,"addNodeView",s);if(!a)return[];const l=(u,c,d,h,p)=>{const f=id(u,o);return a()({node:u,view:c,getPos:d,decorations:h,innerDecorations:p,editor:r,extension:i,HTMLAttributes:f})};return[i.name,l]}))}setupExtensions(){this.extensions.forEach(r=>{var n;this.editor.extensionStorage[r.name]=r.storage;const i={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:Wu(r.name,this.schema)};r.type==="mark"&&(!((n=he(q(r,"keepOnSplit",i)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(r.name);const o=q(r,"onBeforeCreate",i),s=q(r,"onCreate",i),a=q(r,"onUpdate",i),l=q(r,"onSelectionUpdate",i),u=q(r,"onTransaction",i),c=q(r,"onFocus",i),d=q(r,"onBlur",i),h=q(r,"onDestroy",i);o&&this.editor.on("beforeCreate",o),s&&this.editor.on("create",s),a&&this.editor.on("update",a),l&&this.editor.on("selectionUpdate",l),u&&this.editor.on("transaction",u),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),h&&this.editor.on("destroy",h)})}}class Me{constructor(r={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...r},this.name=this.config.name,r.defaultOptions&&Object.keys(r.defaultOptions).length>0&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=he(q(this,"addOptions",{name:this.name}))),this.storage=he(q(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(r={}){return new Me(r)}configure(r={}){const n=this.extend({...this.config,addOptions:()=>ru(this.options,r)});return n.name=this.name,n.parent=this.parent,n}extend(r={}){const n=new Me({...this.config,...r});return n.parent=this,this.child=n,n.name=r.name?r.name:n.parent.name,r.defaultOptions&&Object.keys(r.defaultOptions).length>0&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=he(q(n,"addOptions",{name:n.name})),n.storage=he(q(n,"addStorage",{name:n.name,options:n.options})),n}}function E2(e,r,n){const{from:i,to:o}=r,{blockSeparator:s="\n\n",textSerializers:a={}}=n||{};let l="";return e.nodesBetween(i,o,(u,c,d,h)=>{var p;u.isBlock&&c>i&&(l+=s);const f=a==null?void 0:a[u.type.name];if(f)return d&&(l+=f({node:u,pos:c,parent:d,index:h,range:r})),!1;u.isText&&(l+=(p=u==null?void 0:u.text)===null||p===void 0?void 0:p.slice(Math.max(i,c)-c,o-c))}),l}function x2(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,r])=>r.spec.toText).map(([r,n])=>[r,n.spec.toText]))}const G_=Me.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new fe({key:new ve("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:r,schema:n}=e,{doc:i,selection:o}=r,{ranges:s}=o,a=Math.min(...s.map(c=>c.$from.pos)),l=Math.max(...s.map(c=>c.$to.pos)),u=x2(n);return E2(i,{from:a,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:u})}}})]}}),J_=()=>({editor:e,view:r})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(r.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),X_=(e=!1)=>({commands:r})=>r.setContent("",e),Q_=()=>({state:e,tr:r,dispatch:n})=>{const{selection:i}=r,{ranges:o}=i;return n&&o.forEach(({$from:s,$to:a})=>{e.doc.nodesBetween(s.pos,a.pos,(l,u)=>{if(l.type.isText)return;const{doc:c,mapping:d}=r,h=c.resolve(d.map(u)),p=c.resolve(d.map(u+l.nodeSize)),f=h.blockRange(p);if(!f)return;const m=lo(f);if(l.type.isTextblock){const{defaultType:b}=h.parent.contentMatchAt(h.index());r.setNodeMarkup(f.start,b)}(m||m===0)&&r.lift(f,m)})}),!0},Y_=e=>r=>e(r),eE=()=>({state:e,dispatch:r})=>w_(e,r),tE=(e,r)=>({editor:n,tr:i})=>{const{state:o}=n,s=o.doc.slice(e.from,e.to);i.deleteRange(e.from,e.to);const a=i.mapping.map(r);return i.insert(a,s.content),i.setSelection(new Q(i.doc.resolve(a-1))),!0},rE=()=>({tr:e,dispatch:r})=>{const{selection:n}=e,i=n.$anchor.node();if(i.content.size>0)return!1;const o=e.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i.type){if(r){const a=o.before(s),l=o.after(s);e.delete(a,l).scrollIntoView()}return!0}return!1},nE=e=>({tr:r,state:n,dispatch:i})=>{const o=Ze(e,n.schema),s=r.selection.$anchor;for(let a=s.depth;a>0;a-=1)if(s.node(a).type===o){if(i){const l=s.before(a),u=s.after(a);r.delete(l,u).scrollIntoView()}return!0}return!1},iE=e=>({tr:r,dispatch:n})=>{const{from:i,to:o}=e;return n&&r.delete(i,o),!0},oE=()=>({state:e,dispatch:r})=>c_(e,r),sE=()=>({commands:e})=>e.keyboardShortcut("Enter"),aE=()=>({state:e,dispatch:r})=>k_(e,r);function Qa(e,r,n={strict:!0}){const i=Object.keys(r);return i.length?i.every(o=>n.strict?r[o]===e[o]:lh(r[o])?r[o].test(e[o]):r[o]===e[o]):!0}function od(e,r,n={}){return e.find(i=>i.type===r&&Qa(i.attrs,n))}function lE(e,r,n={}){return!!od(e,r,n)}function uh(e,r,n={}){if(!e||!r)return;let i=e.parent.childAfter(e.parentOffset);if((!i.node||!i.node.marks.some(c=>c.type===r))&&(i=e.parent.childBefore(e.parentOffset)),!i.node||!i.node.marks.some(c=>c.type===r))return;const o=od([...i.node.marks],r,n);if(!o)return;let s=i.index,a=e.start()+i.offset,l=s+1,u=a+i.node.nodeSize;for(od([...i.node.marks],r,n);s>0&&o.isInSet(e.parent.child(s-1).marks);)s-=1,a-=e.parent.child(s).nodeSize;for(;l<e.parent.childCount&&lE([...e.parent.child(l).marks],r,n);)u+=e.parent.child(l).nodeSize,l+=1;return{from:a,to:u}}function wn(e,r){if(typeof e=="string"){if(!r.marks[e])throw Error("There is no mark type named '".concat(e,"'. Maybe you forgot to add the extension?"));return r.marks[e]}return e}const uE=(e,r={})=>({tr:n,state:i,dispatch:o})=>{const s=wn(e,i.schema),{doc:a,selection:l}=n,{$from:u,from:c,to:d}=l;if(o){const h=uh(u,s,r);if(h&&h.from<=c&&h.to>=d){const p=Q.create(a,h.from,h.to);n.setSelection(p)}}return!0},cE=e=>r=>{const n=typeof e=="function"?e(r):e;for(let i=0;i<n.length;i+=1)if(n[i](r))return!0;return!1};function D2(e){return e instanceof Q}function Rr(e=0,r=0,n=0){return Math.min(Math.max(e,r),n)}function S2(e,r=null){if(!r)return null;const n=ne.atStart(e),i=ne.atEnd(e);if(r==="start"||r===!0)return n;if(r==="end")return i;const o=n.from,s=i.to;return r==="all"?Q.create(e,Rr(0,o,s),Rr(e.content.size,o,s)):Q.create(e,Rr(r,o,s),Rr(r,o,s))}function nu(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const dE=(e=null,r={})=>({editor:n,view:i,tr:o,dispatch:s})=>{r={scrollIntoView:!0,...r};const a=()=>{nu()&&i.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(i.focus(),r!=null&&r.scrollIntoView&&n.commands.scrollIntoView())})};if(i.hasFocus()&&e===null||e===!1)return!0;if(s&&e===null&&!D2(n.state.selection))return a(),!0;const l=S2(o.doc,e)||n.state.selection,u=n.state.selection.eq(l);return s&&(u||o.setSelection(l),u&&o.storedMarks&&o.setStoredMarks(o.storedMarks),a()),!0},hE=(e,r)=>n=>e.every((i,o)=>r(i,{...n,index:o})),pE=(e,r)=>({tr:n,commands:i})=>i.insertContentAt({from:n.selection.from,to:n.selection.to},e,r),B2=e=>{const r=e.childNodes;for(let n=r.length-1;n>=0;n-=1){const i=r[n];i.nodeType===3&&i.nodeValue&&/^(\n\s\s|\n)$/.test(i.nodeValue)?e.removeChild(i):i.nodeType===1&&B2(i)}return e};function xo(e){const r="<body>".concat(e,"</body>"),n=new window.DOMParser().parseFromString(r,"text/html").body;return B2(n)}function Ya(e,r,n){n={slice:!0,parseOptions:{},...n};const i=typeof e=="object"&&e!==null,o=typeof e=="string";if(i)try{if(Array.isArray(e)&&e.length>0)return O.fromArray(e.map(a=>r.nodeFromJSON(a)));const s=r.nodeFromJSON(e);return n.errorOnInvalidContent&&s.check(),s}catch(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",s),Ya("",r,n)}if(o){if(n.errorOnInvalidContent){let a=!1,l="";const u=new Wd({topNode:r.spec.topNode,marks:r.spec.marks,nodes:r.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(a=!0,l=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?Vn.fromSchema(u).parseSlice(xo(e),n.parseOptions):Vn.fromSchema(u).parse(xo(e),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error("Invalid element found: ".concat(l))})}const s=Vn.fromSchema(r);return n.slice?s.parseSlice(xo(e),n.parseOptions).content:s.parse(xo(e),n.parseOptions)}return Ya("",r,n)}function fE(e,r,n){const i=e.steps.length-1;if(i<r)return;const o=e.steps[i];if(!(o instanceof Ye||o instanceof tt))return;const s=e.mapping.maps[i];let a=0;s.forEach((l,u,c,d)=>{a===0&&(a=d)}),e.setSelection(ne.near(e.doc.resolve(a),n))}const mE=e=>!("type"in e),gE=(e,r,n)=>({tr:i,dispatch:o,editor:s})=>{var a;if(o){n={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l;try{l=Ya(r,s.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:(a=n.errorOnInvalidContent)!==null&&a!==void 0?a:s.options.enableContentCheck})}catch(f){return s.emit("contentError",{editor:s,error:f,disableCollaboration:()=>{s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}}),!1}let{from:u,to:c}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},d=!0,h=!0;if((mE(l)?l:[l]).forEach(f=>{f.check(),d=d?f.isText&&f.marks.length===0:!1,h=h?f.isBlock:!1}),u===c&&h){const{parent:f}=i.doc.resolve(u);f.isTextblock&&!f.type.spec.code&&!f.childCount&&(u-=1,c+=1)}let p;d?(Array.isArray(r)?p=r.map(f=>f.text||"").join(""):typeof r=="object"&&r&&r.text?p=r.text:p=r,i.insertText(p,u,c)):(p=l,i.replaceWith(u,c,p)),n.updateSelection&&fE(i,i.steps.length-1,-1),n.applyInputRules&&i.setMeta("applyInputRules",{from:u,text:p}),n.applyPasteRules&&i.setMeta("applyPasteRules",{from:u,text:p})}return!0},bE=()=>({state:e,dispatch:r})=>b_(e,r),yE=()=>({state:e,dispatch:r})=>y_(e,r),CE=()=>({state:e,dispatch:r})=>d_(e,r),vE=()=>({state:e,dispatch:r})=>m_(e,r),kE=()=>({state:e,dispatch:r,tr:n})=>{try{const i=Zl(e.doc,e.selection.$from.pos,-1);return i==null?!1:(n.join(i,2),r&&r(n),!0)}catch{return!1}},wE=()=>({state:e,dispatch:r,tr:n})=>{try{const i=Zl(e.doc,e.selection.$from.pos,1);return i==null?!1:(n.join(i,2),r&&r(n),!0)}catch{return!1}},AE=()=>({state:e,dispatch:r})=>h_(e,r),_E=()=>({state:e,dispatch:r})=>p_(e,r);function M2(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function EE(e){const r=e.split(/-(?!$)/);let n=r[r.length-1];n==="Space"&&(n=" ");let i,o,s,a;for(let l=0;l<r.length-1;l+=1){const u=r[l];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))i=!0;else if(/^(c|ctrl|control)$/i.test(u))o=!0;else if(/^s(hift)?$/i.test(u))s=!0;else if(/^mod$/i.test(u))nu()||M2()?a=!0:o=!0;else throw new Error("Unrecognized modifier name: ".concat(u))}return i&&(n="Alt-".concat(n)),o&&(n="Ctrl-".concat(n)),a&&(n="Meta-".concat(n)),s&&(n="Shift-".concat(n)),n}const xE=e=>({editor:r,view:n,tr:i,dispatch:o})=>{const s=EE(e).split(/-(?!$)/),a=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),l=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),u=r.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,l))});return u==null||u.steps.forEach(c=>{const d=c.map(i.mapping);d&&o&&i.maybeStep(d)}),!0};function fn(e,r,n={}){const{from:i,to:o,empty:s}=e.selection,a=r?Ze(r,e.schema):null,l=[];e.doc.nodesBetween(i,o,(d,h)=>{if(d.isText)return;const p=Math.max(i,h),f=Math.min(o,h+d.nodeSize);l.push({node:d,from:p,to:f})});const u=o-i,c=l.filter(d=>a?a.name===d.node.type.name:!0).filter(d=>Qa(d.node.attrs,n,{strict:!1}));return s?!!c.length:c.reduce((d,h)=>d+h.to-h.from,0)>=u}const DE=(e,r={})=>({state:n,dispatch:i})=>{const o=Ze(e,n.schema);return fn(n,o,r)?C_(n,i):!1},SE=()=>({state:e,dispatch:r})=>A_(e,r),BE=e=>({state:r,dispatch:n})=>{const i=Ze(e,r.schema);return F_(i)(r,n)},ME=()=>({state:e,dispatch:r})=>v_(e,r);function iu(e,r){return r.nodes[e]?"node":r.marks[e]?"mark":null}function O0(e,r){const n=typeof r=="string"?[r]:r;return Object.keys(e).reduce((i,o)=>(n.includes(o)||(i[o]=e[o]),i),{})}const FE=(e,r)=>({tr:n,state:i,dispatch:o})=>{let s=null,a=null;const l=iu(typeof e=="string"?e:e.name,i.schema);return l?(l==="node"&&(s=Ze(e,i.schema)),l==="mark"&&(a=wn(e,i.schema)),o&&n.selection.ranges.forEach(u=>{i.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,d)=>{s&&s===c.type&&n.setNodeMarkup(d,void 0,O0(c.attrs,r)),a&&c.marks.length&&c.marks.forEach(h=>{a===h.type&&n.addMark(d,d+c.nodeSize,a.create(O0(h.attrs,r)))})})}),!0):!1},NE=()=>({tr:e,dispatch:r})=>(r&&e.scrollIntoView(),!0),OE=()=>({tr:e,commands:r})=>r.setTextSelection({from:0,to:e.doc.content.size}),TE=()=>({state:e,dispatch:r})=>f_(e,r),LE=()=>({state:e,dispatch:r})=>g_(e,r),IE=()=>({state:e,dispatch:r})=>__(e,r),RE=()=>({state:e,dispatch:r})=>D_(e,r),zE=()=>({state:e,dispatch:r})=>x_(e,r);function sd(e,r,n={},i={}){return Ya(e,r,{slice:!1,parseOptions:n,errorOnInvalidContent:i.errorOnInvalidContent})}const $E=(e,r=!1,n={},i={})=>({editor:o,tr:s,dispatch:a,commands:l})=>{var u,c;const{doc:d}=s;if(n.preserveWhitespace!=="full"){const h=sd(e,o.schema,n,{errorOnInvalidContent:(u=i.errorOnInvalidContent)!==null&&u!==void 0?u:o.options.enableContentCheck});return a&&s.replaceWith(0,d.content.size,h).setMeta("preventUpdate",!r),!0}return a&&s.setMeta("preventUpdate",!r),l.insertContentAt({from:0,to:d.content.size},e,{parseOptions:n,errorOnInvalidContent:(c=i.errorOnInvalidContent)!==null&&c!==void 0?c:o.options.enableContentCheck})};function ch(e,r){const n=wn(r,e.schema),{from:i,to:o,empty:s}=e.selection,a=[];s?(e.storedMarks&&a.push(...e.storedMarks),a.push(...e.selection.$head.marks())):e.doc.nodesBetween(i,o,u=>{a.push(...u.marks)});const l=a.find(u=>u.type.name===n.name);return l?{...l.attrs}:{}}function HE(e,r){const n=new Jd(e);return r.forEach(i=>{i.steps.forEach(o=>{n.step(o)})}),n}function PE(e){for(let r=0;r<e.edgeCount;r+=1){const{type:n}=e.edge(r);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function ad(e,r){const n=[];return e.descendants((i,o)=>{r(i)&&n.push({node:i,pos:o})}),n}function VE(e,r,n){const i=[];return e.nodesBetween(r.from,r.to,(o,s)=>{n(o)&&i.push({node:o,pos:s})}),i}function F2(e,r){for(let n=e.depth;n>0;n-=1){const i=e.node(n);if(r(i))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:i}}}function dh(e){return r=>F2(r.$from,e)}function jE(e,r){const n=oi.fromSchema(r).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function qE(e,r){const n=In.resolve(e);return _2(n,r)}function k4e(e,r){const n=qE(r),i=xo(e);return Vn.fromSchema(n).parse(i).toJSON()}function UE(e,r){const n={from:0,to:e.content.size};return E2(e,n,r)}function WE(e,r){const n=Ze(r,e.schema),{from:i,to:o}=e.selection,s=[];e.doc.nodesBetween(i,o,l=>{s.push(l)});const a=s.reverse().find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function N2(e,r){const n=iu(typeof r=="string"?r:r.name,e.schema);return n==="node"?WE(e,r):n==="mark"?ch(e,r):{}}function KE(e,r=JSON.stringify){const n={};return e.filter(i=>{const o=r(i);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function ZE(e){const r=KE(e);return r.length===1?r:r.filter((n,i)=>!r.filter((o,s)=>s!==i).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function GE(e){const{mapping:r,steps:n}=e,i=[];return r.maps.forEach((o,s)=>{const a=[];if(o.ranges.length)o.forEach((l,u)=>{a.push({from:l,to:u})});else{const{from:l,to:u}=n[s];if(l===void 0||u===void 0)return;a.push({from:l,to:u})}a.forEach(({from:l,to:u})=>{const c=r.slice(s).map(l,-1),d=r.slice(s).map(u),h=r.invert().map(c,-1),p=r.invert().map(d);i.push({oldRange:{from:h,to:p},newRange:{from:c,to:d}})})}),ZE(i)}function hh(e,r,n){const i=[];return e===r?n.resolve(e).marks().forEach(o=>{const s=n.resolve(e),a=uh(s,o.type);a&&i.push({mark:o,...a})}):n.nodesBetween(e,r,(o,s)=>{!o||(o==null?void 0:o.nodeSize)===void 0||i.push(...o.marks.map(a=>({from:s,to:s+o.nodeSize,mark:a})))}),i}function va(e,r,n){return Object.fromEntries(Object.entries(n).filter(([i])=>{const o=e.find(s=>s.type===r&&s.name===i);return o?o.attribute.keepOnSplit:!1}))}function ld(e,r,n={}){const{empty:i,ranges:o}=e.selection,s=r?wn(r,e.schema):null;if(i)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>Qa(d.attrs,n,{strict:!1}));let a=0;const l=[];if(o.forEach(({$from:d,$to:h})=>{const p=d.pos,f=h.pos;e.doc.nodesBetween(p,f,(m,b)=>{if(!m.isText&&!m.marks.length)return;const g=Math.max(p,b),y=Math.min(f,b+m.nodeSize),v=y-g;a+=v,l.push(...m.marks.map(k=>({mark:k,from:g,to:y})))})}),a===0)return!1;const u=l.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>Qa(d.mark.attrs,n,{strict:!1})).reduce((d,h)=>d+h.to-h.from,0),c=l.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,h)=>d+h.to-h.from,0);return(u>0?u+c:u)>=a}function O2(e,r,n={}){if(!r)return fn(e,null,n)||ld(e,null,n);const i=iu(r,e.schema);return i==="node"?fn(e,r,n):i==="mark"?ld(e,r,n):!1}function T0(e,r){const{nodeExtensions:n}=tu(r),i=n.find(a=>a.name===e);if(!i)return!1;const o={name:i.name,options:i.options,storage:i.storage},s=he(q(i,"group",o));return typeof s!="string"?!1:s.split(" ").includes("list")}function ou(e,{checkChildren:r=!0,ignoreWhitespace:n=!1}={}){var i;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((i=e.text)!==null&&i!==void 0?i:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(r){let o=!0;return e.content.forEach(s=>{o!==!1&&(ou(s,{ignoreWhitespace:n,checkChildren:r})||(o=!1))}),o}return!1}function JE(e){return e instanceof ee}function XE(e,r,n){const i=e.state.doc.content.size,o=Rr(r,0,i),s=Rr(n,0,i),a=e.coordsAtPos(o),l=e.coordsAtPos(s,-1),u=Math.min(a.top,l.top),c=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),h=Math.max(a.right,l.right),p=h-d,f=c-u,m={top:u,bottom:c,left:d,right:h,width:p,height:f,x:d,y:u};return{...m,toJSON:()=>m}}function QE(e,r,n){var i;const{selection:o}=r;let s=null;if(D2(o)&&(s=o.$cursor),s){const l=(i=e.storedMarks)!==null&&i!==void 0?i:s.marks();return!!n.isInSet(l)||!l.some(u=>u.type.excludes(n))}const{ranges:a}=o;return a.some(({$from:l,$to:u})=>{let c=l.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(l.pos,u.pos,(d,h,p)=>{if(c)return!1;if(d.isInline){const f=!p||p.type.allowsMarkType(n),m=!!n.isInSet(d.marks)||!d.marks.some(b=>b.type.excludes(n));c=f&&m}return!c}),c})}const YE=(e,r={})=>({tr:n,state:i,dispatch:o})=>{const{selection:s}=n,{empty:a,ranges:l}=s,u=wn(e,i.schema);if(o)if(a){const c=ch(i,u);n.addStoredMark(u.create({...c,...r}))}else l.forEach(c=>{const d=c.$from.pos,h=c.$to.pos;i.doc.nodesBetween(d,h,(p,f)=>{const m=Math.max(f,d),b=Math.min(f+p.nodeSize,h);p.marks.find(g=>g.type===u)?p.marks.forEach(g=>{u===g.type&&n.addMark(m,b,u.create({...g.attrs,...r}))}):n.addMark(m,b,u.create(r))})});return QE(i,n,u)},ex=(e,r)=>({tr:n})=>(n.setMeta(e,r),!0),tx=(e,r={})=>({state:n,dispatch:i,chain:o})=>{const s=Ze(e,n.schema);return s.isTextblock?o().command(({commands:a})=>B0(s,r)(n)?!0:a.clearNodes()).command(({state:a})=>B0(s,r)(a,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},rx=e=>({tr:r,dispatch:n})=>{if(n){const{doc:i}=r,o=Rr(e,0,i.content.size),s=ee.create(i,o);r.setSelection(s)}return!0},nx=e=>({tr:r,dispatch:n})=>{if(n){const{doc:i}=r,{from:o,to:s}=typeof e=="number"?{from:e,to:e}:e,a=Q.atStart(i).from,l=Q.atEnd(i).to,u=Rr(o,a,l),c=Rr(s,a,l),d=Q.create(i,u,c);r.setSelection(d)}return!0},ix=e=>({state:r,dispatch:n})=>{const i=Ze(e,r.schema);return T_(i)(r,n)};function L0(e,r){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const i=n.filter(o=>r==null?void 0:r.includes(o.type.name));e.tr.ensureMarks(i)}}const ox=({keepMarks:e=!0}={})=>({tr:r,state:n,dispatch:i,editor:o})=>{const{selection:s,doc:a}=r,{$from:l,$to:u}=s,c=o.extensionManager.attributes,d=va(c,l.node().type.name,l.node().attrs);if(s instanceof ee&&s.node.isBlock)return!l.parentOffset||!Ii(a,l.pos)?!1:(i&&(e&&L0(n,o.extensionManager.splittableMarks),r.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const h=u.parentOffset===u.parent.content.size,p=l.depth===0?void 0:PE(l.node(-1).contentMatchAt(l.indexAfter(-1)));let f=h&&p?[{type:p,attrs:d}]:void 0,m=Ii(r.doc,r.mapping.map(l.pos),1,f);if(!f&&!m&&Ii(r.doc,r.mapping.map(l.pos),1,p?[{type:p}]:void 0)&&(m=!0,f=p?[{type:p,attrs:d}]:void 0),i){if(m&&(s instanceof Q&&r.deleteSelection(),r.split(r.mapping.map(l.pos),1,f),p&&!h&&!l.parentOffset&&l.parent.type!==p)){const b=r.mapping.map(l.before()),g=r.doc.resolve(b);l.node(-1).canReplaceWith(g.index(),g.index()+1,p)&&r.setNodeMarkup(r.mapping.map(l.before()),p)}e&&L0(n,o.extensionManager.splittableMarks),r.scrollIntoView()}return m},sx=(e,r={})=>({tr:n,state:i,dispatch:o,editor:s})=>{var a;const l=Ze(e,i.schema),{$from:u,$to:c}=i.selection,d=i.selection.node;if(d&&d.isBlock||u.depth<2||!u.sameParent(c))return!1;const h=u.node(-1);if(h.type!==l)return!1;const p=s.extensionManager.attributes;if(u.parent.content.size===0&&u.node(-1).childCount===u.indexAfter(-1)){if(u.depth===2||u.node(-3).type!==l||u.index(-2)!==u.node(-2).childCount-1)return!1;if(o){let y=O.empty;const v=u.index(-1)?1:u.index(-2)?2:3;for(let L=u.depth-v;L>=u.depth-3;L-=1)y=O.from(u.node(L).copy(y));const k=u.indexAfter(-1)<u.node(-2).childCount?1:u.indexAfter(-2)<u.node(-3).childCount?2:3,C={...va(p,u.node().type.name,u.node().attrs),...r},A=((a=l.contentMatch.defaultType)===null||a===void 0?void 0:a.createAndFill(C))||void 0;y=y.append(O.from(l.createAndFill(null,A)||void 0));const _=u.before(u.depth-(v-1));n.replace(_,u.after(-k),new $(y,4-v,0));let S=-1;n.doc.nodesBetween(_,n.doc.content.size,(L,D)=>{if(S>-1)return!1;L.isTextblock&&L.content.size===0&&(S=D+1)}),S>-1&&n.setSelection(Q.near(n.doc.resolve(S))),n.scrollIntoView()}return!0}const f=c.pos===u.end()?h.contentMatchAt(0).defaultType:null,m={...va(p,h.type.name,h.attrs),...r},b={...va(p,u.node().type.name,u.node().attrs),...r};n.delete(u.pos,c.pos);const g=f?[{type:l,attrs:m},{type:f,attrs:b}]:[{type:l,attrs:m}];if(!Ii(n.doc,u.pos,2))return!1;if(o){const{selection:y,storedMarks:v}=i,{splittableMarks:k}=s.extensionManager,C=v||y.$to.parentOffset&&y.$from.marks();if(n.split(u.pos,2,g).scrollIntoView(),!C||!o)return!0;const A=C.filter(_=>k.includes(_.type.name));n.ensureMarks(A)}return!0},Ku=(e,r)=>{const n=dh(s=>s.type===r)(e.selection);if(!n)return!0;const i=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(i===void 0)return!0;const o=e.doc.nodeAt(i);return n.node.type===(o==null?void 0:o.type)&&vn(e.doc,n.pos)&&e.join(n.pos),!0},Zu=(e,r)=>{const n=dh(s=>s.type===r)(e.selection);if(!n)return!0;const i=e.doc.resolve(n.start).after(n.depth);if(i===void 0)return!0;const o=e.doc.nodeAt(i);return n.node.type===(o==null?void 0:o.type)&&vn(e.doc,i)&&e.join(i),!0},ax=(e,r,n,i={})=>({editor:o,tr:s,state:a,dispatch:l,chain:u,commands:c,can:d})=>{const{extensions:h,splittableMarks:p}=o.extensionManager,f=Ze(e,a.schema),m=Ze(r,a.schema),{selection:b,storedMarks:g}=a,{$from:y,$to:v}=b,k=y.blockRange(v),C=g||b.$to.parentOffset&&b.$from.marks();if(!k)return!1;const A=dh(_=>T0(_.type.name,h))(b);if(k.depth>=1&&A&&k.depth-A.depth<=1){if(A.node.type===f)return c.liftListItem(m);if(T0(A.node.type.name,h)&&f.validContent(A.node.content)&&l)return u().command(()=>(s.setNodeMarkup(A.pos,f),!0)).command(()=>Ku(s,f)).command(()=>Zu(s,f)).run()}return!n||!C||!l?u().command(()=>d().wrapInList(f,i)?!0:c.clearNodes()).wrapInList(f,i).command(()=>Ku(s,f)).command(()=>Zu(s,f)).run():u().command(()=>{const _=d().wrapInList(f,i),S=C.filter(L=>p.includes(L.type.name));return s.ensureMarks(S),_?!0:c.clearNodes()}).wrapInList(f,i).command(()=>Ku(s,f)).command(()=>Zu(s,f)).run()},lx=(e,r={},n={})=>({state:i,commands:o})=>{const{extendEmptyMarkRange:s=!1}=n,a=wn(e,i.schema);return ld(i,a,r)?o.unsetMark(a,{extendEmptyMarkRange:s}):o.setMark(a,r)},ux=(e,r,n={})=>({state:i,commands:o})=>{const s=Ze(e,i.schema),a=Ze(r,i.schema),l=fn(i,s,n);let u;return i.selection.$anchor.sameParent(i.selection.$head)&&(u=i.selection.$anchor.parent.attrs),l?o.setNode(a,u):o.setNode(s,{...u,...n})},cx=(e,r={})=>({state:n,commands:i})=>{const o=Ze(e,n.schema);return fn(n,o,r)?i.lift(o):i.wrapIn(o,r)},dx=()=>({state:e,dispatch:r})=>{const n=e.plugins;for(let i=0;i<n.length;i+=1){const o=n[i];let s;if(o.spec.isInputRules&&(s=o.getState(e))){if(r){const a=e.tr,l=s.transform;for(let u=l.steps.length-1;u>=0;u-=1)a.step(l.steps[u].invert(l.docs[u]));if(s.text){const u=a.doc.resolve(s.from).marks();a.replaceWith(s.from,s.to,e.schema.text(s.text,u))}else a.delete(s.from,s.to)}return!0}}return!1},hx=()=>({tr:e,dispatch:r})=>{const{selection:n}=e,{empty:i,ranges:o}=n;return i||r&&o.forEach(s=>{e.removeMark(s.$from.pos,s.$to.pos)}),!0},px=(e,r={})=>({tr:n,state:i,dispatch:o})=>{var s;const{extendEmptyMarkRange:a=!1}=r,{selection:l}=n,u=wn(e,i.schema),{$from:c,empty:d,ranges:h}=l;if(!o)return!0;if(d&&a){let{from:p,to:f}=l;const m=(s=c.marks().find(g=>g.type===u))===null||s===void 0?void 0:s.attrs,b=uh(c,u,m);b&&(p=b.from,f=b.to),n.removeMark(p,f,u)}else h.forEach(p=>{n.removeMark(p.$from.pos,p.$to.pos,u)});return n.removeStoredMark(u),!0},fx=(e,r={})=>({tr:n,state:i,dispatch:o})=>{let s=null,a=null;const l=iu(typeof e=="string"?e:e.name,i.schema);return l?(l==="node"&&(s=Ze(e,i.schema)),l==="mark"&&(a=wn(e,i.schema)),o&&n.selection.ranges.forEach(u=>{const c=u.$from.pos,d=u.$to.pos;i.doc.nodesBetween(c,d,(h,p)=>{s&&s===h.type&&n.setNodeMarkup(p,void 0,{...h.attrs,...r}),a&&h.marks.length&&h.marks.forEach(f=>{if(a===f.type){const m=Math.max(p,c),b=Math.min(p+h.nodeSize,d);n.addMark(m,b,a.create({...f.attrs,...r}))}})})}),!0):!1},mx=(e,r={})=>({state:n,dispatch:i})=>{const o=Ze(e,n.schema);return S_(o,r)(n,i)},gx=(e,r={})=>({state:n,dispatch:i})=>{const o=Ze(e,n.schema);return B_(o,r)(n,i)};var bx=Object.freeze({__proto__:null,blur:J_,clearContent:X_,clearNodes:Q_,command:Y_,createParagraphNear:eE,cut:tE,deleteCurrentNode:rE,deleteNode:nE,deleteRange:iE,deleteSelection:oE,enter:sE,exitCode:aE,extendMarkRange:uE,first:cE,focus:dE,forEach:hE,insertContent:pE,insertContentAt:gE,joinBackward:CE,joinDown:yE,joinForward:vE,joinItemBackward:kE,joinItemForward:wE,joinTextblockBackward:AE,joinTextblockForward:_E,joinUp:bE,keyboardShortcut:xE,lift:DE,liftEmptyBlock:SE,liftListItem:BE,newlineInCode:ME,resetAttributes:FE,scrollIntoView:NE,selectAll:OE,selectNodeBackward:TE,selectNodeForward:LE,selectParentNode:IE,selectTextblockEnd:RE,selectTextblockStart:zE,setContent:$E,setMark:YE,setMeta:ex,setNode:tx,setNodeSelection:rx,setTextSelection:nx,sinkListItem:ix,splitBlock:ox,splitListItem:sx,toggleList:ax,toggleMark:lx,toggleNode:ux,toggleWrap:cx,undoInputRule:dx,unsetAllMarks:hx,unsetMark:px,updateAttributes:fx,wrapIn:mx,wrapInList:gx});const yx=Me.create({name:"commands",addCommands(){return{...bx}}}),Cx=Me.create({name:"drop",addProseMirrorPlugins(){return[new fe({key:new ve("tiptapDrop"),props:{handleDrop:(e,r,n,i)=>{this.editor.emit("drop",{editor:this.editor,event:r,slice:n,moved:i})}}})]}}),vx=Me.create({name:"editable",addProseMirrorPlugins(){return[new fe({key:new ve("editable"),props:{editable:()=>this.editor.options.editable}})]}}),kx=Me.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new fe({key:new ve("focusEvents"),props:{handleDOMEvents:{focus:(r,n)=>{e.isFocused=!0;const i=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return r.dispatch(i),!1},blur:(r,n)=>{e.isFocused=!1;const i=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return r.dispatch(i),!1}}}})]}}),wx=Me.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:u}=a,{empty:c,$anchor:d}=l,{pos:h,parent:p}=d,f=d.parent.isTextblock&&h>0?a.doc.resolve(h-1):d,m=f.parent.type.spec.isolating,b=d.pos-d.parentOffset,g=m&&f.parent.childCount===1?b===d.pos:ne.atStart(u).from===h;return!c||!p.type.isTextblock||p.textContent.length||!g||g&&d.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),r=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:r,"Mod-Delete":r,"Mod-a":()=>this.editor.commands.selectAll()},i={...n},o={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":r,"Ctrl-Alt-Backspace":r,"Alt-Delete":r,"Alt-d":r,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return nu()||M2()?o:i},addProseMirrorPlugins(){return[new fe({key:new ve("clearDocument"),appendTransaction:(e,r,n)=>{const i=e.some(f=>f.docChanged)&&!r.doc.eq(n.doc),o=e.some(f=>f.getMeta("preventClearDocument"));if(!i||o)return;const{empty:s,from:a,to:l}=r.selection,u=ne.atStart(r.doc).from,c=ne.atEnd(r.doc).to;if(s||!(a===u&&l===c)||!ou(n.doc))return;const d=n.tr,h=Yl({state:n,transaction:d}),{commands:p}=new eu({editor:this.editor,state:h});if(p.clearNodes(),!!d.steps.length)return d}})]}}),Ax=Me.create({name:"paste",addProseMirrorPlugins(){return[new fe({key:new ve("tiptapPaste"),props:{handlePaste:(e,r,n)=>{this.editor.emit("paste",{editor:this.editor,event:r,slice:n})}}})]}}),_x=Me.create({name:"tabindex",addProseMirrorPlugins(){return[new fe({key:new ve("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Fn{get name(){return this.node.type.name}constructor(r,n,i=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=i,this.resolvedPos=r,this.editor=n,this.currentNode=o}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var r;return(r=this.actualDepth)!==null&&r!==void 0?r:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(r){let n=this.from,i=this.to;if(this.isBlock){if(this.content.size===0){console.error("You can’t set content on a block node. Tried to set content on ".concat(this.name," at ").concat(this.pos));return}n=this.from+1,i=this.to-1}this.editor.commands.insertContentAt({from:n,to:i},r)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const r=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(r);return new Fn(n,this.editor)}get before(){let r=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return r.depth!==this.depth&&(r=this.resolvedPos.doc.resolve(this.from-3)),new Fn(r,this.editor)}get after(){let r=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return r.depth!==this.depth&&(r=this.resolvedPos.doc.resolve(this.to+3)),new Fn(r,this.editor)}get children(){const r=[];return this.node.content.forEach((n,i)=>{const o=n.isBlock&&!n.isTextblock,s=n.isAtom&&!n.isText,a=this.pos+i+(s?0:1),l=this.resolvedPos.doc.resolve(a);if(!o&&l.depth<=this.depth)return;const u=new Fn(l,this.editor,o,o?n:null);o&&(u.actualDepth=this.depth+1),r.push(new Fn(l,this.editor,o,o?n:null))}),r}get firstChild(){return this.children[0]||null}get lastChild(){const r=this.children;return r[r.length-1]||null}closest(r,n={}){let i=null,o=this.parent;for(;o&&!i;){if(o.node.type.name===r)if(Object.keys(n).length>0){const s=o.node.attrs,a=Object.keys(n);for(let l=0;l<a.length;l+=1){const u=a[l];if(s[u]!==n[u])break}}else i=o;o=o.parent}return i}querySelector(r,n={}){return this.querySelectorAll(r,n,!0)[0]||null}querySelectorAll(r,n={},i=!1){let o=[];if(!this.children||this.children.length===0)return o;const s=Object.keys(n);return this.children.forEach(a=>{i&&o.length>0||(a.node.type.name===r&&s.every(l=>n[l]===a.node.attrs[l])&&o.push(a),!(i&&o.length>0)&&(o=o.concat(a.querySelectorAll(r,n,i))))}),o}setAttribute(r){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...r}),this.editor.view.dispatch(n)}}const Ex='.ProseMirror {\n  position: relative;\n}\n\n.ProseMirror {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  white-space: break-spaces;\n  -webkit-font-variant-ligatures: none;\n  font-variant-ligatures: none;\n  font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n  white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n  white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n  white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n  display: inline !important;\n  border: none !important;\n  margin: 0 !important;\n  width: 0 !important;\n  height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n  display: none;\n  pointer-events: none;\n  position: absolute;\n  margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n  content: "";\n  display: block;\n  position: absolute;\n  top: -2px;\n  width: 20px;\n  border-top: 1px solid black;\n  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n  to {\n    visibility: hidden;\n  }\n}\n\n.ProseMirror-hideselection *::selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection * {\n  caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n  display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n  opacity: 0\n}';function xx(e,r,n){const i=document.querySelector("style[data-tiptap-style]");if(i!==null)return i;const o=document.createElement("style");return r&&o.setAttribute("nonce",r),o.setAttribute("data-tiptap-style",""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}let w4e=class extends L_{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:n,moved:i})=>this.options.onDrop(r,n,i)),this.on("paste",({event:r,slice:n})=>this.options.onPaste(r,n)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=xx(Ex,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,r=!0){this.setOptions({editable:e}),r&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,r){const n=A2(r)?r(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}unregisterPlugin(e){if(this.isDestroyed)return;const r=this.state.plugins;let n=r;if([].concat(e).forEach(o=>{const s=typeof o=="string"?"".concat(o,"$"):o.key;n=r.filter(a=>!a.key.startsWith(s))}),r.length===n.length)return;const i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}createExtensionManager(){var e,r;const n=[...this.options.enableCoreExtensions?[vx,G_.configure({blockSeparator:(r=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||r===void 0?void 0:r.blockSeparator}),yx,kx,wx,_x,Cx,Ax].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new In(n,this)}createCommandManager(){this.commandManager=new eu({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){let e;try{e=sd(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(s=>s.name!=="collaboration"),this.createExtensionManager()}}),e=sd(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=S2(e,this.options.autofocus);this.view=new QA(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:Mi.create({doc:e,selection:r||void 0})}),this.view.dom.setAttribute("role","textbox"),this.view.dom.getAttribute("aria-label")||this.view.dom.setAttribute("aria-label","Rich-Text Editor");const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className="tiptap ".concat(this.view.dom.className)}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const r=this.capturedTransaction;return this.capturedTransaction=null,r}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const r=this.state.apply(e),n=!this.state.selection.eq(r.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:r}),this.view.updateState(r),this.emit("transaction",{editor:this,transaction:e}),n&&this.emit("selectionUpdate",{editor:this,transaction:e});const i=e.getMeta("focus"),o=e.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return N2(this.state,e)}isActive(e,r){const n=typeof e=="string"?e:null,i=typeof e=="string"?r:e;return O2(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return jE(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:r="\n\n",textSerializers:n={}}=e||{};return UE(this.state.doc,{blockSeparator:r,textSerializers:{...x2(this.schema),...n}})}get isEmpty(){return ou(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(e,r))||null}$nodes(e,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(e,r))||null}$pos(e){const r=this.state.doc.resolve(e);return new Fn(r,this)}get $doc(){return this.$pos(0)}};function Pr(e){return new Ss({find:e.find,handler:({state:r,range:n,match:i})=>{const o=he(e.getAttributes,void 0,i);if(o===!1||o===null)return null;const{tr:s}=r,a=i[i.length-1],l=i[0];if(a){const u=l.search(/\S/),c=n.from+l.indexOf(a),d=c+a.length;if(hh(n.from,n.to,r.doc).filter(p=>p.mark.type.excluded.find(f=>f===e.type&&f!==p.mark.type)).filter(p=>p.to>c).length)return null;d<n.to&&s.delete(d,n.to),c>n.from&&s.delete(n.from+u,c);const h=n.from+u+a.length;s.addMark(n.from+u,h,e.type.create(o||{})),s.removeStoredMark(e.type)}}})}function T2(e){return new Ss({find:e.find,handler:({state:r,range:n,match:i})=>{const o=he(e.getAttributes,void 0,i)||{},{tr:s}=r,a=n.from;let l=n.to;const u=e.type.create(o);if(i[1]){const c=i[0].lastIndexOf(i[1]);let d=a+c;d>l?d=l:l=d+i[1].length;const h=i[0][i[0].length-1];s.insertText(h,a+i[0].length-1),s.replaceWith(d,l,u)}else if(i[0]){const c=e.type.isInline?a:a-1;s.insert(c,e.type.create(o)).delete(s.mapping.map(a),s.mapping.map(l))}s.scrollIntoView()}})}function ud(e){return new Ss({find:e.find,handler:({state:r,range:n,match:i})=>{const o=r.doc.resolve(n.from),s=he(e.getAttributes,void 0,i)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;r.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,s)}})}function mn(e){return new Ss({find:e.find,handler:({state:r,range:n,match:i,chain:o})=>{const s=he(e.getAttributes,void 0,i)||{},a=r.tr.delete(n.from,n.to),l=a.doc.resolve(n.from).blockRange(),u=l&&Gd(l,e.type,s);if(!u)return null;if(a.wrap(l,u),e.keepMarks&&e.editor){const{selection:d,storedMarks:h}=r,{splittableMarks:p}=e.editor.extensionManager,f=h||d.$to.parentOffset&&d.$from.marks();if(f){const m=f.filter(b=>p.includes(b.type.name));a.ensureMarks(m)}}if(e.keepAttributes){const d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,s).run()}const c=a.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&vn(a.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(i,c))&&a.join(n.from-1)}})}class Fe{constructor(r={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...r},this.name=this.config.name,r.defaultOptions&&Object.keys(r.defaultOptions).length>0&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=he(q(this,"addOptions",{name:this.name}))),this.storage=he(q(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(r={}){return new Fe(r)}configure(r={}){const n=this.extend({...this.config,addOptions:()=>ru(this.options,r)});return n.name=this.name,n.parent=this.parent,n}extend(r={}){const n=new Fe(r);return n.parent=this,this.child=n,n.name=r.name?r.name:n.parent.name,r.defaultOptions&&Object.keys(r.defaultOptions).length>0&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=he(q(n,"addOptions",{name:n.name})),n.storage=he(q(n,"addStorage",{name:n.name,options:n.options})),n}}function Dx(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}class Sx{constructor(r,n,i){this.isDragging=!1,this.component=r,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...i},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.innerDecorations=n.innerDecorations,this.view=n.view,this.HTMLAttributes=n.HTMLAttributes,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(r){var n,i,o,s,a,l,u;const{view:c}=this.editor,d=r.target,h=d.nodeType===3?(n=d.parentElement)===null||n===void 0?void 0:n.closest("[data-drag-handle]"):d.closest("[data-drag-handle]");if(!this.dom||!((i=this.contentDOM)===null||i===void 0)&&i.contains(d)||!h)return;let p=0,f=0;if(this.dom!==h){const y=this.dom.getBoundingClientRect(),v=h.getBoundingClientRect(),k=(o=r.offsetX)!==null&&o!==void 0?o:(s=r.nativeEvent)===null||s===void 0?void 0:s.offsetX,C=(a=r.offsetY)!==null&&a!==void 0?a:(l=r.nativeEvent)===null||l===void 0?void 0:l.offsetY;p=v.x-y.x+k,f=v.y-y.y+C}(u=r.dataTransfer)===null||u===void 0||u.setDragImage(this.dom,p,f);const m=this.getPos();if(typeof m!="number")return;const b=ee.create(c.state.doc,m),g=c.state.tr.setSelection(b);c.dispatch(g)}stopEvent(r){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:r});const i=r.target;if(!(this.dom.contains(i)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(i))))return!1;const o=r.type.startsWith("drag"),s=r.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(i.tagName)||i.isContentEditable)&&!s&&!o)return!0;const{isEditable:a}=this.editor,{isDragging:l}=this,u=!!this.node.type.spec.draggable,c=ee.isSelectable(this.node),d=r.type==="copy",h=r.type==="paste",p=r.type==="cut",f=r.type==="mousedown";if(!u&&c&&o&&r.preventDefault(),u&&o&&!l)return r.preventDefault(),!1;if(u&&a&&!l&&f){const m=i.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||s||d||h||p||f&&c)}ignoreMutation(r){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:r}):this.node.isLeaf||this.node.isAtom?!0:r.type==="selection"||this.dom.contains(r.target)&&r.type==="childList"&&(nu()||Dx())&&this.editor.isFocused&&[...Array.from(r.addedNodes),...Array.from(r.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===r.target&&r.type==="attributes"?!0:!this.contentDOM.contains(r.target)}updateAttributes(r){this.editor.commands.command(({tr:n})=>{const i=this.getPos();return typeof i!="number"?!1:(n.setNodeMarkup(i,void 0,{...this.node.attrs,...r}),!0)})}deleteNode(){const r=this.getPos();if(typeof r!="number")return;const n=r+this.node.nodeSize;this.editor.commands.deleteRange({from:r,to:n})}}function Vr(e){return new j_({find:e.find,handler:({state:r,range:n,match:i,pasteEvent:o})=>{const s=he(e.getAttributes,void 0,i,o);if(s===!1||s===null)return null;const{tr:a}=r,l=i[i.length-1],u=i[0];let c=n.to;if(l){const d=u.search(/\S/),h=n.from+u.indexOf(l),p=h+l.length;if(hh(n.from,n.to,r.doc).filter(f=>f.mark.type.excluded.find(m=>m===e.type&&m!==f.mark.type)).filter(f=>f.to>h).length)return null;p<n.to&&a.delete(p,n.to),h>n.from&&a.delete(n.from+d,h),c=n.from+d+l.length,a.addMark(n.from+d,c,e.type.create(s||{})),a.removeStoredMark(e.type)}}})}function Bx(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var Et="top",Gt="bottom",Jt="right",xt="left",ph="auto",Bs=[Et,Gt,Jt,xt],Xi="start",Jo="end",Mx="clippingParents",L2="viewport",vo="popper",Fx="reference",I0=Bs.reduce(function(e,r){return e.concat([r+"-"+Xi,r+"-"+Jo])},[]),I2=[].concat(Bs,[ph]).reduce(function(e,r){return e.concat([r,r+"-"+Xi,r+"-"+Jo])},[]),Nx="beforeRead",Ox="read",Tx="afterRead",Lx="beforeMain",Ix="main",Rx="afterMain",zx="beforeWrite",$x="write",Hx="afterWrite",Px=[Nx,Ox,Tx,Lx,Ix,Rx,zx,$x,Hx];function Er(e){return e?(e.nodeName||"").toLowerCase():null}function ur(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var r=e.ownerDocument;return r&&r.defaultView||window}return e}function Qi(e){var r=ur(e).Element;return e instanceof r||e instanceof Element}function Zt(e){var r=ur(e).HTMLElement;return e instanceof r||e instanceof HTMLElement}function fh(e){if(typeof ShadowRoot>"u")return!1;var r=ur(e).ShadowRoot;return e instanceof r||e instanceof ShadowRoot}function Vx(e){var r=e.state;Object.keys(r.elements).forEach(function(n){var i=r.styles[n]||{},o=r.attributes[n]||{},s=r.elements[n];!Zt(s)||!Er(s)||(Object.assign(s.style,i),Object.keys(o).forEach(function(a){var l=o[a];l===!1?s.removeAttribute(a):s.setAttribute(a,l===!0?"":l)}))})}function jx(e){var r=e.state,n={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(r.elements.popper.style,n.popper),r.styles=n,r.elements.arrow&&Object.assign(r.elements.arrow.style,n.arrow),function(){Object.keys(r.elements).forEach(function(i){var o=r.elements[i],s=r.attributes[i]||{},a=Object.keys(r.styles.hasOwnProperty(i)?r.styles[i]:n[i]),l=a.reduce(function(u,c){return u[c]="",u},{});!Zt(o)||!Er(o)||(Object.assign(o.style,l),Object.keys(s).forEach(function(u){o.removeAttribute(u)}))})}}const R2={name:"applyStyles",enabled:!0,phase:"write",fn:Vx,effect:jx,requires:["computeStyles"]};function kr(e){return e.split("-")[0]}var Un=Math.max,el=Math.min,Yi=Math.round;function eo(e,r){r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;if(Zt(e)&&r){var s=e.offsetHeight,a=e.offsetWidth;a>0&&(i=Yi(n.width)/a||1),s>0&&(o=Yi(n.height)/s||1)}return{width:n.width/i,height:n.height/o,top:n.top/o,right:n.right/i,bottom:n.bottom/o,left:n.left/i,x:n.left/i,y:n.top/o}}function mh(e){var r=eo(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(r.width-n)<=1&&(n=r.width),Math.abs(r.height-i)<=1&&(i=r.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function z2(e,r){var n=r.getRootNode&&r.getRootNode();if(e.contains(r))return!0;if(n&&fh(n)){var i=r;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function jr(e){return ur(e).getComputedStyle(e)}function qx(e){return["table","td","th"].indexOf(Er(e))>=0}function An(e){return((Qi(e)?e.ownerDocument:e.document)||window.document).documentElement}function su(e){return Er(e)==="html"?e:e.assignedSlot||e.parentNode||(fh(e)?e.host:null)||An(e)}function R0(e){return!Zt(e)||jr(e).position==="fixed"?null:e.offsetParent}function Ux(e){var r=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Zt(e)){var i=jr(e);if(i.position==="fixed")return null}var o=su(e);for(fh(o)&&(o=o.host);Zt(o)&&["html","body"].indexOf(Er(o))<0;){var s=jr(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||r&&s.willChange==="filter"||r&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Ms(e){for(var r=ur(e),n=R0(e);n&&qx(n)&&jr(n).position==="static";)n=R0(n);return n&&(Er(n)==="html"||Er(n)==="body"&&jr(n).position==="static")?r:n||Ux(e)||r}function gh(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ro(e,r,n){return Un(e,el(r,n))}function Wx(e,r,n){var i=Ro(e,r,n);return i>n?n:i}function $2(){return{top:0,right:0,bottom:0,left:0}}function H2(e){return Object.assign({},$2(),e)}function P2(e,r){return r.reduce(function(n,i){return n[i]=e,n},{})}var Kx=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,H2(typeof e!="number"?e:P2(e,Bs))};function Zx(e){var r,n=e.state,i=e.name,o=e.options,s=n.elements.arrow,a=n.modifiersData.popperOffsets,l=kr(n.placement),u=gh(l),c=[xt,Jt].indexOf(l)>=0,d=c?"height":"width";if(!(!s||!a)){var h=Kx(o.padding,n),p=mh(s),f=u==="y"?Et:xt,m=u==="y"?Gt:Jt,b=n.rects.reference[d]+n.rects.reference[u]-a[u]-n.rects.popper[d],g=a[u]-n.rects.reference[u],y=Ms(s),v=y?u==="y"?y.clientHeight||0:y.clientWidth||0:0,k=b/2-g/2,C=h[f],A=v-p[d]-h[m],_=v/2-p[d]/2+k,S=Ro(C,_,A),L=u;n.modifiersData[i]=(r={},r[L]=S,r.centerOffset=S-_,r)}}function Gx(e){var r=e.state,n=e.options,i=n.element,o=i===void 0?"[data-popper-arrow]":i;o!=null&&(typeof o=="string"&&(o=r.elements.popper.querySelector(o),!o)||z2(r.elements.popper,o)&&(r.elements.arrow=o))}const Jx={name:"arrow",enabled:!0,phase:"main",fn:Zx,effect:Gx,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function to(e){return e.split("-")[1]}var Xx={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Qx(e){var r=e.x,n=e.y,i=window,o=i.devicePixelRatio||1;return{x:Yi(r*o)/o||0,y:Yi(n*o)/o||0}}function z0(e){var r,n=e.popper,i=e.popperRect,o=e.placement,s=e.variation,a=e.offsets,l=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=a.x,f=p===void 0?0:p,m=a.y,b=m===void 0?0:m,g=typeof d=="function"?d({x:f,y:b}):{x:f,y:b};f=g.x,b=g.y;var y=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),k=xt,C=Et,A=window;if(c){var _=Ms(n),S="clientHeight",L="clientWidth";if(_===ur(n)&&(_=An(n),jr(_).position!=="static"&&l==="absolute"&&(S="scrollHeight",L="scrollWidth")),_=_,o===Et||(o===xt||o===Jt)&&s===Jo){C=Gt;var D=h&&_===A&&A.visualViewport?A.visualViewport.height:_[S];b-=D-i.height,b*=u?1:-1}if(o===xt||(o===Et||o===Gt)&&s===Jo){k=Jt;var P=h&&_===A&&A.visualViewport?A.visualViewport.width:_[L];f-=P-i.width,f*=u?1:-1}}var U=Object.assign({position:l},c&&Xx),J=d===!0?Qx({x:f,y:b}):{x:f,y:b};if(f=J.x,b=J.y,u){var Z;return Object.assign({},U,(Z={},Z[C]=v?"0":"",Z[k]=y?"0":"",Z.transform=(A.devicePixelRatio||1)<=1?"translate("+f+"px, "+b+"px)":"translate3d("+f+"px, "+b+"px, 0)",Z))}return Object.assign({},U,(r={},r[C]=v?b+"px":"",r[k]=y?f+"px":"",r.transform="",r))}function Yx(e){var r=e.state,n=e.options,i=n.gpuAcceleration,o=i===void 0?!0:i,s=n.adaptive,a=s===void 0?!0:s,l=n.roundOffsets,u=l===void 0?!0:l,c={placement:kr(r.placement),variation:to(r.placement),popper:r.elements.popper,popperRect:r.rects.popper,gpuAcceleration:o,isFixed:r.options.strategy==="fixed"};r.modifiersData.popperOffsets!=null&&(r.styles.popper=Object.assign({},r.styles.popper,z0(Object.assign({},c,{offsets:r.modifiersData.popperOffsets,position:r.options.strategy,adaptive:a,roundOffsets:u})))),r.modifiersData.arrow!=null&&(r.styles.arrow=Object.assign({},r.styles.arrow,z0(Object.assign({},c,{offsets:r.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),r.attributes.popper=Object.assign({},r.attributes.popper,{"data-popper-placement":r.placement})}const e3={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Yx,data:{}};var Ws={passive:!0};function t3(e){var r=e.state,n=e.instance,i=e.options,o=i.scroll,s=o===void 0?!0:o,a=i.resize,l=a===void 0?!0:a,u=ur(r.elements.popper),c=[].concat(r.scrollParents.reference,r.scrollParents.popper);return s&&c.forEach(function(d){d.addEventListener("scroll",n.update,Ws)}),l&&u.addEventListener("resize",n.update,Ws),function(){s&&c.forEach(function(d){d.removeEventListener("scroll",n.update,Ws)}),l&&u.removeEventListener("resize",n.update,Ws)}}const r3={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:t3,data:{}};var n3={left:"right",right:"left",bottom:"top",top:"bottom"};function ka(e){return e.replace(/left|right|bottom|top/g,function(r){return n3[r]})}var i3={start:"end",end:"start"};function $0(e){return e.replace(/start|end/g,function(r){return i3[r]})}function bh(e){var r=ur(e),n=r.pageXOffset,i=r.pageYOffset;return{scrollLeft:n,scrollTop:i}}function yh(e){return eo(An(e)).left+bh(e).scrollLeft}function o3(e){var r=ur(e),n=An(e),i=r.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;return i&&(o=i.width,s=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=i.offsetLeft,l=i.offsetTop)),{width:o,height:s,x:a+yh(e),y:l}}function s3(e){var r,n=An(e),i=bh(e),o=(r=e.ownerDocument)==null?void 0:r.body,s=Un(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Un(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-i.scrollLeft+yh(e),u=-i.scrollTop;return jr(o||n).direction==="rtl"&&(l+=Un(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:a,x:l,y:u}}function Ch(e){var r=jr(e),n=r.overflow,i=r.overflowX,o=r.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function V2(e){return["html","body","#document"].indexOf(Er(e))>=0?e.ownerDocument.body:Zt(e)&&Ch(e)?e:V2(su(e))}function zo(e,r){var n;r===void 0&&(r=[]);var i=V2(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=ur(i),a=o?[s].concat(s.visualViewport||[],Ch(i)?i:[]):i,l=r.concat(a);return o?l:l.concat(zo(su(a)))}function cd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function a3(e){var r=eo(e);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function H0(e,r){return r===L2?cd(o3(e)):Qi(r)?a3(r):cd(s3(An(e)))}function l3(e){var r=zo(su(e)),n=["absolute","fixed"].indexOf(jr(e).position)>=0,i=n&&Zt(e)?Ms(e):e;return Qi(i)?r.filter(function(o){return Qi(o)&&z2(o,i)&&Er(o)!=="body"}):[]}function u3(e,r,n){var i=r==="clippingParents"?l3(e):[].concat(r),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,u){var c=H0(e,u);return l.top=Un(c.top,l.top),l.right=el(c.right,l.right),l.bottom=el(c.bottom,l.bottom),l.left=Un(c.left,l.left),l},H0(e,s));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function j2(e){var r=e.reference,n=e.element,i=e.placement,o=i?kr(i):null,s=i?to(i):null,a=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2,u;switch(o){case Et:u={x:a,y:r.y-n.height};break;case Gt:u={x:a,y:r.y+r.height};break;case Jt:u={x:r.x+r.width,y:l};break;case xt:u={x:r.x-n.width,y:l};break;default:u={x:r.x,y:r.y}}var c=o?gh(o):null;if(c!=null){var d=c==="y"?"height":"width";switch(s){case Xi:u[c]=u[c]-(r[d]/2-n[d]/2);break;case Jo:u[c]=u[c]+(r[d]/2-n[d]/2);break}}return u}function Xo(e,r){r===void 0&&(r={});var n=r,i=n.placement,o=i===void 0?e.placement:i,s=n.boundary,a=s===void 0?Mx:s,l=n.rootBoundary,u=l===void 0?L2:l,c=n.elementContext,d=c===void 0?vo:c,h=n.altBoundary,p=h===void 0?!1:h,f=n.padding,m=f===void 0?0:f,b=H2(typeof m!="number"?m:P2(m,Bs)),g=d===vo?Fx:vo,y=e.rects.popper,v=e.elements[p?g:d],k=u3(Qi(v)?v:v.contextElement||An(e.elements.popper),a,u),C=eo(e.elements.reference),A=j2({reference:C,element:y,strategy:"absolute",placement:o}),_=cd(Object.assign({},y,A)),S=d===vo?_:C,L={top:k.top-S.top+b.top,bottom:S.bottom-k.bottom+b.bottom,left:k.left-S.left+b.left,right:S.right-k.right+b.right},D=e.modifiersData.offset;if(d===vo&&D){var P=D[o];Object.keys(L).forEach(function(U){var J=[Jt,Gt].indexOf(U)>=0?1:-1,Z=[Et,Gt].indexOf(U)>=0?"y":"x";L[U]+=P[Z]*J})}return L}function c3(e,r){r===void 0&&(r={});var n=r,i=n.placement,o=n.boundary,s=n.rootBoundary,a=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?I2:u,d=to(i),h=d?l?I0:I0.filter(function(m){return to(m)===d}):Bs,p=h.filter(function(m){return c.indexOf(m)>=0});p.length===0&&(p=h);var f=p.reduce(function(m,b){return m[b]=Xo(e,{placement:b,boundary:o,rootBoundary:s,padding:a})[kr(b)],m},{});return Object.keys(f).sort(function(m,b){return f[m]-f[b]})}function d3(e){if(kr(e)===ph)return[];var r=ka(e);return[$0(e),r,$0(r)]}function h3(e){var r=e.state,n=e.options,i=e.name;if(!r.modifiersData[i]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,a=n.altAxis,l=a===void 0?!0:a,u=n.fallbackPlacements,c=n.padding,d=n.boundary,h=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,m=f===void 0?!0:f,b=n.allowedAutoPlacements,g=r.options.placement,y=kr(g),v=y===g,k=u||(v||!m?[ka(g)]:d3(g)),C=[g].concat(k).reduce(function(se,G){return se.concat(kr(G)===ph?c3(r,{placement:G,boundary:d,rootBoundary:h,padding:c,flipVariations:m,allowedAutoPlacements:b}):G)},[]),A=r.rects.reference,_=r.rects.popper,S=new Map,L=!0,D=C[0],P=0;P<C.length;P++){var U=C[P],J=kr(U),Z=to(U)===Xi,F=[Et,Gt].indexOf(J)>=0,T=F?"width":"height",Y=Xo(r,{placement:U,boundary:d,rootBoundary:h,altBoundary:p,padding:c}),w=F?Z?Jt:xt:Z?Gt:Et;A[T]>_[T]&&(w=ka(w));var E=ka(w),R=[];if(s&&R.push(Y[J]<=0),l&&R.push(Y[w]<=0,Y[E]<=0),R.every(function(se){return se})){D=U,L=!1;break}S.set(U,R)}if(L)for(var B=m?3:1,I=function(se){var G=C.find(function(re){var Ee=S.get(re);if(Ee)return Ee.slice(0,se).every(function(De){return De})});if(G)return D=G,"break"},V=B;V>0;V--){var te=I(V);if(te==="break")break}r.placement!==D&&(r.modifiersData[i]._skip=!0,r.placement=D,r.reset=!0)}}const p3={name:"flip",enabled:!0,phase:"main",fn:h3,requiresIfExists:["offset"],data:{_skip:!1}};function P0(e,r,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-r.height-n.y,right:e.right-r.width+n.x,bottom:e.bottom-r.height+n.y,left:e.left-r.width-n.x}}function V0(e){return[Et,Jt,Gt,xt].some(function(r){return e[r]>=0})}function f3(e){var r=e.state,n=e.name,i=r.rects.reference,o=r.rects.popper,s=r.modifiersData.preventOverflow,a=Xo(r,{elementContext:"reference"}),l=Xo(r,{altBoundary:!0}),u=P0(a,i),c=P0(l,o,s),d=V0(u),h=V0(c);r.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},r.attributes.popper=Object.assign({},r.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const m3={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:f3};function g3(e,r,n){var i=kr(e),o=[xt,Et].indexOf(i)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},r,{placement:e})):n,a=s[0],l=s[1];return a=a||0,l=(l||0)*o,[xt,Jt].indexOf(i)>=0?{x:l,y:a}:{x:a,y:l}}function b3(e){var r=e.state,n=e.options,i=e.name,o=n.offset,s=o===void 0?[0,0]:o,a=I2.reduce(function(d,h){return d[h]=g3(h,r.rects,s),d},{}),l=a[r.placement],u=l.x,c=l.y;r.modifiersData.popperOffsets!=null&&(r.modifiersData.popperOffsets.x+=u,r.modifiersData.popperOffsets.y+=c),r.modifiersData[i]=a}const y3={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:b3};function C3(e){var r=e.state,n=e.name;r.modifiersData[n]=j2({reference:r.rects.reference,element:r.rects.popper,strategy:"absolute",placement:r.placement})}const v3={name:"popperOffsets",enabled:!0,phase:"read",fn:C3,data:{}};function k3(e){return e==="x"?"y":"x"}function w3(e){var r=e.state,n=e.options,i=e.name,o=n.mainAxis,s=o===void 0?!0:o,a=n.altAxis,l=a===void 0?!1:a,u=n.boundary,c=n.rootBoundary,d=n.altBoundary,h=n.padding,p=n.tether,f=p===void 0?!0:p,m=n.tetherOffset,b=m===void 0?0:m,g=Xo(r,{boundary:u,rootBoundary:c,padding:h,altBoundary:d}),y=kr(r.placement),v=to(r.placement),k=!v,C=gh(y),A=k3(C),_=r.modifiersData.popperOffsets,S=r.rects.reference,L=r.rects.popper,D=typeof b=="function"?b(Object.assign({},r.rects,{placement:r.placement})):b,P=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),U=r.modifiersData.offset?r.modifiersData.offset[r.placement]:null,J={x:0,y:0};if(_){if(s){var Z,F=C==="y"?Et:xt,T=C==="y"?Gt:Jt,Y=C==="y"?"height":"width",w=_[C],E=w+g[F],R=w-g[T],B=f?-L[Y]/2:0,I=v===Xi?S[Y]:L[Y],V=v===Xi?-L[Y]:-S[Y],te=r.elements.arrow,se=f&&te?mh(te):{width:0,height:0},G=r.modifiersData["arrow#persistent"]?r.modifiersData["arrow#persistent"].padding:$2(),re=G[F],Ee=G[T],De=Ro(0,S[Y],se[Y]),ae=k?S[Y]/2-B-De-re-P.mainAxis:I-De-re-P.mainAxis,Le=k?-S[Y]/2+B+De+Ee+P.mainAxis:V+De+Ee+P.mainAxis,Ae=r.elements.arrow&&Ms(r.elements.arrow),Ie=Ae?C==="y"?Ae.clientTop||0:Ae.clientLeft||0:0,Pe=(Z=U==null?void 0:U[C])!=null?Z:0,Re=w+ae-Pe-Ie,Ge=w+Le-Pe,we=Ro(f?el(E,Re):E,w,f?Un(R,Ge):R);_[C]=we,J[C]=we-w}if(l){var Mr,It=C==="x"?Et:xt,z=C==="x"?Gt:Jt,pt=_[A],le=A==="y"?"height":"width",X=pt+g[It],rt=pt-g[z],Ve=[Et,xt].indexOf(y)!==-1,Rt=(Mr=U==null?void 0:U[A])!=null?Mr:0,zt=Ve?X:pt-S[le]-L[le]-Rt+P.altAxis,x=Ve?pt+S[le]+L[le]-Rt-P.altAxis:rt,N=f&&Ve?Wx(zt,pt,x):Ro(f?zt:X,pt,f?x:rt);_[A]=N,J[A]=N-pt}r.modifiersData[i]=J}}const A3={name:"preventOverflow",enabled:!0,phase:"main",fn:w3,requiresIfExists:["offset"]};function _3(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function E3(e){return e===ur(e)||!Zt(e)?bh(e):_3(e)}function x3(e){var r=e.getBoundingClientRect(),n=Yi(r.width)/e.offsetWidth||1,i=Yi(r.height)/e.offsetHeight||1;return n!==1||i!==1}function D3(e,r,n){n===void 0&&(n=!1);var i=Zt(r),o=Zt(r)&&x3(r),s=An(r),a=eo(e,o),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!n)&&((Er(r)!=="body"||Ch(s))&&(l=E3(r)),Zt(r)?(u=eo(r,!0),u.x+=r.clientLeft,u.y+=r.clientTop):s&&(u.x=yh(s))),{x:a.left+l.scrollLeft-u.x,y:a.top+l.scrollTop-u.y,width:a.width,height:a.height}}function S3(e){var r=new Map,n=new Set,i=[];e.forEach(function(s){r.set(s.name,s)});function o(s){n.add(s.name);var a=[].concat(s.requires||[],s.requiresIfExists||[]);a.forEach(function(l){if(!n.has(l)){var u=r.get(l);u&&o(u)}}),i.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),i}function B3(e){var r=S3(e);return Px.reduce(function(n,i){return n.concat(r.filter(function(o){return o.phase===i}))},[])}function M3(e){var r;return function(){return r||(r=new Promise(function(n){Promise.resolve().then(function(){r=void 0,n(e())})})),r}}function F3(e){var r=e.reduce(function(n,i){var o=n[i.name];return n[i.name]=o?Object.assign({},o,i,{options:Object.assign({},o.options,i.options),data:Object.assign({},o.data,i.data)}):i,n},{});return Object.keys(r).map(function(n){return r[n]})}var j0={placement:"bottom",modifiers:[],strategy:"absolute"};function q0(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return!r.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function N3(e){e===void 0&&(e={});var r=e,n=r.defaultModifiers,i=n===void 0?[]:n,o=r.defaultOptions,s=o===void 0?j0:o;return function(a,l,u){u===void 0&&(u=s);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},j0,s),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],h=!1,p={state:c,setOptions:function(b){var g=typeof b=="function"?b(c.options):b;m(),c.options=Object.assign({},s,c.options,g),c.scrollParents={reference:Qi(a)?zo(a):a.contextElement?zo(a.contextElement):[],popper:zo(l)};var y=B3(F3([].concat(i,c.options.modifiers)));return c.orderedModifiers=y.filter(function(v){return v.enabled}),f(),p.update()},forceUpdate:function(){if(!h){var b=c.elements,g=b.reference,y=b.popper;if(q0(g,y)){c.rects={reference:D3(g,Ms(y),c.options.strategy==="fixed"),popper:mh(y)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(L){return c.modifiersData[L.name]=Object.assign({},L.data)});for(var v=0;v<c.orderedModifiers.length;v++){if(c.reset===!0){c.reset=!1,v=-1;continue}var k=c.orderedModifiers[v],C=k.fn,A=k.options,_=A===void 0?{}:A,S=k.name;typeof C=="function"&&(c=C({state:c,options:_,name:S,instance:p})||c)}}}},update:M3(function(){return new Promise(function(b){p.forceUpdate(),b(c)})}),destroy:function(){m(),h=!0}};if(!q0(a,l))return p;p.setOptions(u).then(function(b){!h&&u.onFirstUpdate&&u.onFirstUpdate(b)});function f(){c.orderedModifiers.forEach(function(b){var g=b.name,y=b.options,v=y===void 0?{}:y,k=b.effect;if(typeof k=="function"){var C=k({state:c,name:g,instance:p,options:v}),A=function(){};d.push(C||A)}})}function m(){d.forEach(function(b){return b()}),d=[]}return p}}var O3=[r3,v3,e3,R2,y3,p3,A3,Jx,m3],T3=N3({defaultModifiers:O3}),L3="tippy-box",q2="tippy-content",I3="tippy-backdrop",U2="tippy-arrow",W2="tippy-svg-arrow",Sn={passive:!0,capture:!0},K2=function(){return document.body};function Gu(e,r,n){if(Array.isArray(e)){var i=e[r];return i!=null?i:Array.isArray(n)?n[r]:n}return e}function vh(e,r){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(r+"]")>-1}function Z2(e,r){return typeof e=="function"?e.apply(void 0,r):e}function U0(e,r){if(r===0)return e;var n;return function(i){clearTimeout(n),n=setTimeout(function(){e(i)},r)}}function R3(e){return e.split(/\s+/).filter(Boolean)}function _i(e){return[].concat(e)}function W0(e,r){e.indexOf(r)===-1&&e.push(r)}function z3(e){return e.filter(function(r,n){return e.indexOf(r)===n})}function $3(e){return e.split("-")[0]}function tl(e){return[].slice.call(e)}function K0(e){return Object.keys(e).reduce(function(r,n){return e[n]!==void 0&&(r[n]=e[n]),r},{})}function $o(){return document.createElement("div")}function au(e){return["Element","Fragment"].some(function(r){return vh(e,r)})}function H3(e){return vh(e,"NodeList")}function P3(e){return vh(e,"MouseEvent")}function V3(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function j3(e){return au(e)?[e]:H3(e)?tl(e):Array.isArray(e)?e:tl(document.querySelectorAll(e))}function Ju(e,r){e.forEach(function(n){n&&(n.style.transitionDuration=r+"ms")})}function Z0(e,r){e.forEach(function(n){n&&n.setAttribute("data-state",r)})}function q3(e){var r,n=_i(e),i=n[0];return i!=null&&(r=i.ownerDocument)!=null&&r.body?i.ownerDocument:document}function U3(e,r){var n=r.clientX,i=r.clientY;return e.every(function(o){var s=o.popperRect,a=o.popperState,l=o.props,u=l.interactiveBorder,c=$3(a.placement),d=a.modifiersData.offset;if(!d)return!0;var h=c==="bottom"?d.top.y:0,p=c==="top"?d.bottom.y:0,f=c==="right"?d.left.x:0,m=c==="left"?d.right.x:0,b=s.top-i+h>u,g=i-s.bottom-p>u,y=s.left-n+f>u,v=n-s.right-m>u;return b||g||y||v})}function Xu(e,r,n){var i=r+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){e[i](o,n)})}function G0(e,r){for(var n=r;n;){var i;if(e.contains(n))return!0;n=n.getRootNode==null||(i=n.getRootNode())==null?void 0:i.host}return!1}var mr={isTouch:!1},J0=0;function W3(){mr.isTouch||(mr.isTouch=!0,window.performance&&document.addEventListener("mousemove",G2))}function G2(){var e=performance.now();e-J0<20&&(mr.isTouch=!1,document.removeEventListener("mousemove",G2)),J0=e}function K3(){var e=document.activeElement;if(V3(e)){var r=e._tippy;e.blur&&!r.state.isVisible&&e.blur()}}function Z3(){document.addEventListener("touchstart",W3,Sn),window.addEventListener("blur",K3)}var G3=typeof window<"u"&&typeof document<"u",J3=G3?!!window.msCrypto:!1,X3={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Q3={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},tr=Object.assign({appendTo:K2,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},X3,Q3),Y3=Object.keys(tr),eD=function(e){var r=Object.keys(e);r.forEach(function(n){tr[n]=e[n]})};function J2(e){var r=e.plugins||[],n=r.reduce(function(i,o){var s=o.name,a=o.defaultValue;if(s){var l;i[s]=e[s]!==void 0?e[s]:(l=tr[s])!=null?l:a}return i},{});return Object.assign({},e,n)}function tD(e,r){var n=r?Object.keys(J2(Object.assign({},tr,{plugins:r}))):Y3,i=n.reduce(function(o,s){var a=(e.getAttribute("data-tippy-"+s)||"").trim();if(!a)return o;if(s==="content")o[s]=a;else try{o[s]=JSON.parse(a)}catch{o[s]=a}return o},{});return i}function X0(e,r){var n=Object.assign({},r,{content:Z2(r.content,[e])},r.ignoreAttributes?{}:tD(e,r.plugins));return n.aria=Object.assign({},tr.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?r.interactive:n.aria.expanded,content:n.aria.content==="auto"?r.interactive?null:"describedby":n.aria.content},n}var rD=function(){return"innerHTML"};function dd(e,r){e[rD()]=r}function Q0(e){var r=$o();return e===!0?r.className=U2:(r.className=W2,au(e)?r.appendChild(e):dd(r,e)),r}function Y0(e,r){au(r.content)?(dd(e,""),e.appendChild(r.content)):typeof r.content!="function"&&(r.allowHTML?dd(e,r.content):e.textContent=r.content)}function hd(e){var r=e.firstElementChild,n=tl(r.children);return{box:r,content:n.find(function(i){return i.classList.contains(q2)}),arrow:n.find(function(i){return i.classList.contains(U2)||i.classList.contains(W2)}),backdrop:n.find(function(i){return i.classList.contains(I3)})}}function X2(e){var r=$o(),n=$o();n.className=L3,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=$o();i.className=q2,i.setAttribute("data-state","hidden"),Y0(i,e.props),r.appendChild(n),n.appendChild(i),o(e.props,e.props);function o(s,a){var l=hd(r),u=l.box,c=l.content,d=l.arrow;a.theme?u.setAttribute("data-theme",a.theme):u.removeAttribute("data-theme"),typeof a.animation=="string"?u.setAttribute("data-animation",a.animation):u.removeAttribute("data-animation"),a.inertia?u.setAttribute("data-inertia",""):u.removeAttribute("data-inertia"),u.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?u.setAttribute("role",a.role):u.removeAttribute("role"),(s.content!==a.content||s.allowHTML!==a.allowHTML)&&Y0(c,e.props),a.arrow?d?s.arrow!==a.arrow&&(u.removeChild(d),u.appendChild(Q0(a.arrow))):u.appendChild(Q0(a.arrow)):d&&u.removeChild(d)}return{popper:r,onUpdate:o}}X2.$$tippy=!0;var nD=1,Ks=[],Qu=[];function iD(e,r){var n=X0(e,Object.assign({},tr,J2(K0(r)))),i,o,s,a=!1,l=!1,u=!1,c=!1,d,h,p,f=[],m=U0(Re,n.interactiveDebounce),b,g=nD++,y=null,v=z3(n.plugins),k={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},C={id:g,reference:e,popper:$o(),popperInstance:y,props:n,state:k,plugins:v,clearDelayTimeouts:zt,setProps:x,setContent:N,show:H,hide:K,hideWithInteractivity:ge,enable:Ve,disable:Rt,unmount:je,destroy:bo};if(!n.render)return C;var A=n.render(C),_=A.popper,S=A.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+C.id,C.popper=_,e._tippy=C,_._tippy=C;var L=v.map(function(M){return M.fn(C)}),D=e.hasAttribute("aria-expanded");return Ae(),B(),w(),E("onCreate",[C]),n.showOnCreate&&X(),_.addEventListener("mouseenter",function(){C.props.interactive&&C.state.isVisible&&C.clearDelayTimeouts()}),_.addEventListener("mouseleave",function(){C.props.interactive&&C.props.trigger.indexOf("mouseenter")>=0&&F().addEventListener("mousemove",m)}),C;function P(){var M=C.props.touch;return Array.isArray(M)?M:[M,0]}function U(){return P()[0]==="hold"}function J(){var M;return!!((M=C.props.render)!=null&&M.$$tippy)}function Z(){return b||e}function F(){var M=Z().parentNode;return M?q3(M):document}function T(){return hd(_)}function Y(M){return C.state.isMounted&&!C.state.isVisible||mr.isTouch||d&&d.type==="focus"?0:Gu(C.props.delay,M?0:1,tr.delay)}function w(M){M===void 0&&(M=!1),_.style.pointerEvents=C.props.interactive&&!M?"":"none",_.style.zIndex=""+C.props.zIndex}function E(M,W,oe){if(oe===void 0&&(oe=!0),L.forEach(function(Ce){Ce[M]&&Ce[M].apply(Ce,W)}),oe){var xe;(xe=C.props)[M].apply(xe,W)}}function R(){var M=C.props.aria;if(M.content){var W="aria-"+M.content,oe=_.id,xe=_i(C.props.triggerTarget||e);xe.forEach(function(Ce){var ft=Ce.getAttribute(W);if(C.state.isVisible)Ce.setAttribute(W,ft?ft+" "+oe:oe);else{var $t=ft&&ft.replace(oe,"").trim();$t?Ce.setAttribute(W,$t):Ce.removeAttribute(W)}})}}function B(){if(!(D||!C.props.aria.expanded)){var M=_i(C.props.triggerTarget||e);M.forEach(function(W){C.props.interactive?W.setAttribute("aria-expanded",C.state.isVisible&&W===Z()?"true":"false"):W.removeAttribute("aria-expanded")})}}function I(){F().removeEventListener("mousemove",m),Ks=Ks.filter(function(M){return M!==m})}function V(M){if(!(mr.isTouch&&(u||M.type==="mousedown"))){var W=M.composedPath&&M.composedPath()[0]||M.target;if(!(C.props.interactive&&G0(_,W))){if(_i(C.props.triggerTarget||e).some(function(oe){return G0(oe,W)})){if(mr.isTouch||C.state.isVisible&&C.props.trigger.indexOf("click")>=0)return}else E("onClickOutside",[C,M]);C.props.hideOnClick===!0&&(C.clearDelayTimeouts(),C.hide(),l=!0,setTimeout(function(){l=!1}),C.state.isMounted||re())}}}function te(){u=!0}function se(){u=!1}function G(){var M=F();M.addEventListener("mousedown",V,!0),M.addEventListener("touchend",V,Sn),M.addEventListener("touchstart",se,Sn),M.addEventListener("touchmove",te,Sn)}function re(){var M=F();M.removeEventListener("mousedown",V,!0),M.removeEventListener("touchend",V,Sn),M.removeEventListener("touchstart",se,Sn),M.removeEventListener("touchmove",te,Sn)}function Ee(M,W){ae(M,function(){!C.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&W()})}function De(M,W){ae(M,W)}function ae(M,W){var oe=T().box;function xe(Ce){Ce.target===oe&&(Xu(oe,"remove",xe),W())}if(M===0)return W();Xu(oe,"remove",h),Xu(oe,"add",xe),h=xe}function Le(M,W,oe){oe===void 0&&(oe=!1);var xe=_i(C.props.triggerTarget||e);xe.forEach(function(Ce){Ce.addEventListener(M,W,oe),f.push({node:Ce,eventType:M,handler:W,options:oe})})}function Ae(){U()&&(Le("touchstart",Pe,{passive:!0}),Le("touchend",Ge,{passive:!0})),R3(C.props.trigger).forEach(function(M){if(M!=="manual")switch(Le(M,Pe),M){case"mouseenter":Le("mouseleave",Ge);break;case"focus":Le(J3?"focusout":"blur",we);break;case"focusin":Le("focusout",we);break}})}function Ie(){f.forEach(function(M){var W=M.node,oe=M.eventType,xe=M.handler,Ce=M.options;W.removeEventListener(oe,xe,Ce)}),f=[]}function Pe(M){var W,oe=!1;if(!(!C.state.isEnabled||Mr(M)||l)){var xe=((W=d)==null?void 0:W.type)==="focus";d=M,b=M.currentTarget,B(),!C.state.isVisible&&P3(M)&&Ks.forEach(function(Ce){return Ce(M)}),M.type==="click"&&(C.props.trigger.indexOf("mouseenter")<0||a)&&C.props.hideOnClick!==!1&&C.state.isVisible?oe=!0:X(M),M.type==="click"&&(a=!oe),oe&&!xe&&rt(M)}}function Re(M){var W=M.target,oe=Z().contains(W)||_.contains(W);if(!(M.type==="mousemove"&&oe)){var xe=le().concat(_).map(function(Ce){var ft,$t=Ce._tippy,di=(ft=$t.popperInstance)==null?void 0:ft.state;return di?{popperRect:Ce.getBoundingClientRect(),popperState:di,props:n}:null}).filter(Boolean);U3(xe,M)&&(I(),rt(M))}}function Ge(M){var W=Mr(M)||C.props.trigger.indexOf("click")>=0&&a;if(!W){if(C.props.interactive){C.hideWithInteractivity(M);return}rt(M)}}function we(M){C.props.trigger.indexOf("focusin")<0&&M.target!==Z()||C.props.interactive&&M.relatedTarget&&_.contains(M.relatedTarget)||rt(M)}function Mr(M){return mr.isTouch?U()!==M.type.indexOf("touch")>=0:!1}function It(){z();var M=C.props,W=M.popperOptions,oe=M.placement,xe=M.offset,Ce=M.getReferenceClientRect,ft=M.moveTransition,$t=J()?hd(_).arrow:null,di=Ce?{getBoundingClientRect:Ce,contextElement:Ce.contextElement||Z()}:e,zs={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function($s){var hi=$s.state;if(J()){var Lv=T(),Bu=Lv.box;["placement","reference-hidden","escaped"].forEach(function(Hs){Hs==="placement"?Bu.setAttribute("data-placement",hi.placement):hi.attributes.popper["data-popper-"+Hs]?Bu.setAttribute("data-"+Hs,""):Bu.removeAttribute("data-"+Hs)}),hi.attributes.popper={}}}},xn=[{name:"offset",options:{offset:xe}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ft}},zs];J()&&$t&&xn.push({name:"arrow",options:{element:$t,padding:3}}),xn.push.apply(xn,(W==null?void 0:W.modifiers)||[]),C.popperInstance=T3(di,_,Object.assign({},W,{placement:oe,onFirstUpdate:p,modifiers:xn}))}function z(){C.popperInstance&&(C.popperInstance.destroy(),C.popperInstance=null)}function pt(){var M=C.props.appendTo,W,oe=Z();C.props.interactive&&M===K2||M==="parent"?W=oe.parentNode:W=Z2(M,[oe]),W.contains(_)||W.appendChild(_),C.state.isMounted=!0,It()}function le(){return tl(_.querySelectorAll("[data-tippy-root]"))}function X(M){C.clearDelayTimeouts(),M&&E("onTrigger",[C,M]),G();var W=Y(!0),oe=P(),xe=oe[0],Ce=oe[1];mr.isTouch&&xe==="hold"&&Ce&&(W=Ce),W?i=setTimeout(function(){C.show()},W):C.show()}function rt(M){if(C.clearDelayTimeouts(),E("onUntrigger",[C,M]),!C.state.isVisible){re();return}if(!(C.props.trigger.indexOf("mouseenter")>=0&&C.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(M.type)>=0&&a)){var W=Y(!1);W?o=setTimeout(function(){C.state.isVisible&&C.hide()},W):s=requestAnimationFrame(function(){C.hide()})}}function Ve(){C.state.isEnabled=!0}function Rt(){C.hide(),C.state.isEnabled=!1}function zt(){clearTimeout(i),clearTimeout(o),cancelAnimationFrame(s)}function x(M){if(!C.state.isDestroyed){E("onBeforeUpdate",[C,M]),Ie();var W=C.props,oe=X0(e,Object.assign({},W,K0(M),{ignoreAttributes:!0}));C.props=oe,Ae(),W.interactiveDebounce!==oe.interactiveDebounce&&(I(),m=U0(Re,oe.interactiveDebounce)),W.triggerTarget&&!oe.triggerTarget?_i(W.triggerTarget).forEach(function(xe){xe.removeAttribute("aria-expanded")}):oe.triggerTarget&&e.removeAttribute("aria-expanded"),B(),w(),S&&S(W,oe),C.popperInstance&&(It(),le().forEach(function(xe){requestAnimationFrame(xe._tippy.popperInstance.forceUpdate)})),E("onAfterUpdate",[C,M])}}function N(M){C.setProps({content:M})}function H(){var M=C.state.isVisible,W=C.state.isDestroyed,oe=!C.state.isEnabled,xe=mr.isTouch&&!C.props.touch,Ce=Gu(C.props.duration,0,tr.duration);if(!(M||W||oe||xe)&&!Z().hasAttribute("disabled")&&(E("onShow",[C],!1),C.props.onShow(C)!==!1)){if(C.state.isVisible=!0,J()&&(_.style.visibility="visible"),w(),G(),C.state.isMounted||(_.style.transition="none"),J()){var ft=T(),$t=ft.box,di=ft.content;Ju([$t,di],0)}p=function(){var zs;if(!(!C.state.isVisible||c)){if(c=!0,_.offsetHeight,_.style.transition=C.props.moveTransition,J()&&C.props.animation){var xn=T(),$s=xn.box,hi=xn.content;Ju([$s,hi],Ce),Z0([$s,hi],"visible")}R(),B(),W0(Qu,C),(zs=C.popperInstance)==null||zs.forceUpdate(),E("onMount",[C]),C.props.animation&&J()&&De(Ce,function(){C.state.isShown=!0,E("onShown",[C])})}},pt()}}function K(){var M=!C.state.isVisible,W=C.state.isDestroyed,oe=!C.state.isEnabled,xe=Gu(C.props.duration,1,tr.duration);if(!(M||W||oe)&&(E("onHide",[C],!1),C.props.onHide(C)!==!1)){if(C.state.isVisible=!1,C.state.isShown=!1,c=!1,a=!1,J()&&(_.style.visibility="hidden"),I(),re(),w(!0),J()){var Ce=T(),ft=Ce.box,$t=Ce.content;C.props.animation&&(Ju([ft,$t],xe),Z0([ft,$t],"hidden"))}R(),B(),C.props.animation?J()&&Ee(xe,C.unmount):C.unmount()}}function ge(M){F().addEventListener("mousemove",m),W0(Ks,m),m(M)}function je(){C.state.isVisible&&C.hide(),C.state.isMounted&&(z(),le().forEach(function(M){M._tippy.unmount()}),_.parentNode&&_.parentNode.removeChild(_),Qu=Qu.filter(function(M){return M!==C}),C.state.isMounted=!1,E("onHidden",[C]))}function bo(){C.state.isDestroyed||(C.clearDelayTimeouts(),C.unmount(),Ie(),delete e._tippy,C.state.isDestroyed=!0,E("onDestroy",[C]))}}function Rn(e,r){r===void 0&&(r={});var n=tr.plugins.concat(r.plugins||[]);Z3();var i=Object.assign({},r,{plugins:n}),o=j3(e),s=o.reduce(function(a,l){var u=l&&iD(l,i);return u&&a.push(u),a},[]);return au(e)?s[0]:s}Rn.defaultProps=tr,Rn.setDefaultProps=eD,Rn.currentInput=mr,Object.assign({},R2,{effect:function(e){var r=e.state,n={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,n.popper),r.styles=n,r.elements.arrow&&Object.assign(r.elements.arrow.style,n.arrow)}}),Rn.setDefaultProps({render:X2});class oD{constructor({editor:r,element:n,view:i,tippyOptions:o={},shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l})=>{const{selection:u}=l,{$anchor:c,empty:d}=u,h=c.depth===1,p=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent;return!(!a.hasFocus()||!d||!h||!p||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;if(this.preventHide){this.preventHide=!1;return}a!=null&&a.relatedTarget&&!((l=this.element.parentNode)===null||l===void 0)&&l.contains(a.relatedTarget)||(a==null?void 0:a.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.editor=r,this.element=n,this.view=i,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:r}=this.editor.options,n=!!r.parentElement;this.tippy||!n||(this.tippy=Rn(r,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(r,n){var i,o,s;const{state:a}=r,{doc:l,selection:u}=a,{from:c,to:d}=u;if(!(n&&n.doc.eq(l)&&n.selection.eq(u))){if(this.createTooltip(),!(!((i=this.shouldShow)===null||i===void 0)&&i.call(this,{editor:this.editor,view:r,state:a,oldState:n}))){this.hide();return}(o=this.tippy)===null||o===void 0||o.setProps({getReferenceClientRect:((s=this.tippyOptions)===null||s===void 0?void 0:s.getReferenceClientRect)||(()=>XE(r,c,d))}),this.show()}}show(){var r;(r=this.tippy)===null||r===void 0||r.show()}hide(){var r;(r=this.tippy)===null||r===void 0||r.hide()}destroy(){var r,n;!((r=this.tippy)===null||r===void 0)&&r.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Q2=e=>new fe({key:typeof e.pluginKey=="string"?new ve(e.pluginKey):e.pluginKey,view:r=>new oD({view:r,...e})});Me.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Q2({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});var Or={},rl={},Ct={},si={};const sD=fk(pk);var nl={};Object.defineProperty(nl,"__esModule",{value:!0}),nl.isInstanceOf=void 0;const aD=e=>r=>{if(!(r instanceof e))return"value should be an instance of ".concat(e.name)};nl.isInstanceOf=aD;var il={};Object.defineProperty(il,"__esModule",{value:!0}),il.isInteger=void 0;const lD=e=>{if(typeof e!="number"||!Number.isInteger(e))return"value should be an integer"};il.isInteger=lD;var ol={};Object.defineProperty(ol,"__esModule",{value:!0}),ol.isOneOf=void 0;const uD=e=>r=>{if(!e.includes(r))return'value should be one of "'.concat(e.join('", "'),'"')};ol.isOneOf=uD;var sl={};Object.defineProperty(sl,"__esModule",{value:!0}),sl.isSymbol=void 0;const cD=e=>{if(typeof e!="symbol")return"value should be a symbol"};sl.isSymbol=cD,function(e){var r=un&&un.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.isSymbol=e.isOneOf=e.isInteger=e.isInstanceOf=e.vuePropValidator=void 0;const n=r(sD);function i(u,...c){const d=u?[...c,u]:c;if(d.length!==0)return h=>{for(const p of d){const f=p(h);if(f)return typeof n.default=="object"&&"util"in n.default?n.default.util.warn("".concat(f," (received: '").concat(String(h),"')")):console.warn("".concat(f," (received: '").concat(String(h),"')")),!1}return!0}}e.vuePropValidator=i;var o=nl;Object.defineProperty(e,"isInstanceOf",{enumerable:!0,get:function(){return o.isInstanceOf}});var s=il;Object.defineProperty(e,"isInteger",{enumerable:!0,get:function(){return s.isInteger}});var a=ol;Object.defineProperty(e,"isOneOf",{enumerable:!0,get:function(){return a.isOneOf}});var l=sl;Object.defineProperty(e,"isSymbol",{enumerable:!0,get:function(){return l.isSymbol}})}(si),Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.propOptionsGenerator=void 0;const Zs=si,dD=(e,r,...n)=>({optional:{type:e,required:!1,default:void 0,validator:(0,Zs.vuePropValidator)(r,...n)},nullable:{type:e,required:!1,default:null,validator:(0,Zs.vuePropValidator)(r,...n)},withDefault:i=>({type:e,required:!1,default:i,validator:(0,Zs.vuePropValidator)(r,...n)}),required:{type:e,required:!0,validator:(0,Zs.vuePropValidator)(r,...n)}});Ct.propOptionsGenerator=dD,Object.defineProperty(rl,"__esModule",{value:!0}),rl.stringProp=void 0;const hD=Ct,pD=e=>(0,hD.propOptionsGenerator)(String,e);rl.stringProp=pD;var al={};Object.defineProperty(al,"__esModule",{value:!0}),al.booleanProp=void 0;const fD=Ct,mD=e=>(0,fD.propOptionsGenerator)(Boolean,e);al.booleanProp=mD;var ll={};Object.defineProperty(ll,"__esModule",{value:!0}),ll.numberProp=void 0;const gD=Ct,bD=e=>(0,gD.propOptionsGenerator)(Number,e);ll.numberProp=bD;var ul={};Object.defineProperty(ul,"__esModule",{value:!0}),ul.integerProp=void 0;const yD=Ct,CD=si,vD=e=>(0,yD.propOptionsGenerator)(Number,e,CD.isInteger);ul.integerProp=vD;var cl={};Object.defineProperty(cl,"__esModule",{value:!0}),cl.symbolProp=void 0;const kD=Ct,wD=si,AD=e=>(0,kD.propOptionsGenerator)(void 0,e,wD.isSymbol);cl.symbolProp=AD;var dl={};Object.defineProperty(dl,"__esModule",{value:!0}),dl.vueComponentProp=void 0;const _D=Ct,ED=e=>(0,_D.propOptionsGenerator)([Object,String],e);dl.vueComponentProp=ED;var hl={};Object.defineProperty(hl,"__esModule",{value:!0}),hl.anyProp=void 0;const xD=Ct,DD=e=>(0,xD.propOptionsGenerator)(void 0,e);hl.anyProp=DD;var pl={};Object.defineProperty(pl,"__esModule",{value:!0}),pl.arrayProp=void 0;const SD=Ct,BD=e=>(0,SD.propOptionsGenerator)(Array,e);pl.arrayProp=BD;var fl={};Object.defineProperty(fl,"__esModule",{value:!0}),fl.objectProp=void 0;const MD=Ct,FD=e=>(0,MD.propOptionsGenerator)(Object,e);fl.objectProp=FD;var ml={};Object.defineProperty(ml,"__esModule",{value:!0}),ml.functionProp=void 0;const Yu=si,ND=e=>({optional:{type:Function,required:!1,default:void 0,validator:(0,Yu.vuePropValidator)(e)},nullable:{type:Function,required:!1,default:null,validator:(0,Yu.vuePropValidator)(e)},required:{type:Function,required:!0,validator:(0,Yu.vuePropValidator)(e)}});ml.functionProp=ND;var Qo={};Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.oneOfProp=void 0;const OD=Ct,TD=si,LD=e=>{const r=[...new Set(e.flatMap(n=>{var i;return n==null?[]:(i=n.constructor)!==null&&i!==void 0?i:[]}))];if(r.length!==0)return r.length===1?r[0]:r},ID=(e,r)=>(0,OD.propOptionsGenerator)(LD(e),r,(0,TD.isOneOf)(e));Qo.oneOfProp=ID;var gl={};Object.defineProperty(gl,"__esModule",{value:!0}),gl.oneOfObjectKeysProp=void 0;const RD=Qo,zD=(e,r)=>(0,RD.oneOfProp)(Object.keys(e),r);gl.oneOfObjectKeysProp=zD;var bl={};Object.defineProperty(bl,"__esModule",{value:!0}),bl.oneOfTypesProp=void 0;const $D=Ct,HD=(e,r)=>(0,$D.propOptionsGenerator)(e,r);bl.oneOfTypesProp=HD;var yl={};Object.defineProperty(yl,"__esModule",{value:!0}),yl.instanceOfProp=void 0;const PD=Ct,VD=si,jD=(e,r)=>(0,PD.propOptionsGenerator)(e,r,(0,VD.isInstanceOf)(e));yl.instanceOfProp=jD;var Cl={};Object.defineProperty(Cl,"__esModule",{value:!0}),Cl.isNegative=void 0;const qD=e=>{if(typeof e!="number"||e>=0||Number.isNaN(e))return"value should be a negative number"};Cl.isNegative=qD;var vl={};Object.defineProperty(vl,"__esModule",{value:!0}),vl.isPositive=void 0;const UD=e=>{if(typeof e!="number"||e<=0||Number.isNaN(e))return"value should be a positive number"};vl.isPositive=UD;var kl={};Object.defineProperty(kl,"__esModule",{value:!0}),kl.isNonNegative=void 0;const WD=e=>{if(typeof e!="number"||e<0||Number.isNaN(e))return"value should be a non-negative number"};kl.isNonNegative=WD;var wl={};Object.defineProperty(wl,"__esModule",{value:!0}),wl.isNonPositive=void 0;const KD=e=>{if(typeof e!="number"||e>0||Number.isNaN(e))return"value should be a non-positive number"};wl.isNonPositive=KD,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isNonPositive=e.isNonNegative=e.isPositive=e.isNegative=e.instanceOfProp=e.oneOfTypesProp=e.oneOfObjectKeysProp=e.oneOfProp=e.functionProp=e.objectProp=e.arrayProp=e.anyProp=e.vueComponentProp=e.symbolProp=e.integerProp=e.numberProp=e.booleanProp=e.stringProp=void 0;var r=rl;Object.defineProperty(e,"stringProp",{enumerable:!0,get:function(){return r.stringProp}});var n=al;Object.defineProperty(e,"booleanProp",{enumerable:!0,get:function(){return n.booleanProp}});var i=ll;Object.defineProperty(e,"numberProp",{enumerable:!0,get:function(){return i.numberProp}});var o=ul;Object.defineProperty(e,"integerProp",{enumerable:!0,get:function(){return o.integerProp}});var s=cl;Object.defineProperty(e,"symbolProp",{enumerable:!0,get:function(){return s.symbolProp}});var a=dl;Object.defineProperty(e,"vueComponentProp",{enumerable:!0,get:function(){return a.vueComponentProp}});var l=hl;Object.defineProperty(e,"anyProp",{enumerable:!0,get:function(){return l.anyProp}});var u=pl;Object.defineProperty(e,"arrayProp",{enumerable:!0,get:function(){return u.arrayProp}});var c=fl;Object.defineProperty(e,"objectProp",{enumerable:!0,get:function(){return c.objectProp}});var d=ml;Object.defineProperty(e,"functionProp",{enumerable:!0,get:function(){return d.functionProp}});var h=Qo;Object.defineProperty(e,"oneOfProp",{enumerable:!0,get:function(){return h.oneOfProp}});var p=gl;Object.defineProperty(e,"oneOfObjectKeysProp",{enumerable:!0,get:function(){return p.oneOfObjectKeysProp}});var f=bl;Object.defineProperty(e,"oneOfTypesProp",{enumerable:!0,get:function(){return f.oneOfTypesProp}});var m=yl;Object.defineProperty(e,"instanceOfProp",{enumerable:!0,get:function(){return m.instanceOfProp}});var b=Cl;Object.defineProperty(e,"isNegative",{enumerable:!0,get:function(){return b.isNegative}});var g=vl;Object.defineProperty(e,"isPositive",{enumerable:!0,get:function(){return g.isPositive}});var y=kl;Object.defineProperty(e,"isNonNegative",{enumerable:!0,get:function(){return y.isNonNegative}});var v=wl;Object.defineProperty(e,"isNonPositive",{enumerable:!0,get:function(){return v.isNonPositive}})}(Or);const A4e={name:"EditorContent",props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler(e){e&&e.options.element&&this.$nextTick(()=>{const r=this.$el;!r||!e.options.element.firstChild||(r.append(...e.options.element.childNodes),e.contentComponent=this,e.setOptions({element:r}),e.createNodeViews())})}}},render(e){return e("div")},beforeDestroy(){const{editor:e}=this;if(!e||(e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,!e.options.element.firstChild))return;const r=document.createElement("div");r.append(...e.options.element.childNodes),e.setOptions({element:r})}},_4e={name:"FloatingMenu",props:{pluginKey:{type:[String,Object],default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},watch:{editor:{immediate:!0,handler(e){e&&this.$nextTick(()=>{e.registerPlugin(Q2({pluginKey:this.pluginKey,editor:e,element:this.$el,tippyOptions:this.tippyOptions,shouldShow:this.shouldShow}))})}}},render(e){return e("div",{style:{visibility:"hidden"}},this.$slots.default)},beforeDestroy(){this.editor.unregisterPlugin(this.pluginKey)}},uo={props:{as:{type:String,default:"div"}},render(e){return e(this.as,{style:{whiteSpace:"pre-wrap"},attrs:{"data-node-view-content":""}})}},_n={props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(e){return e(this.as,{class:this.decorationClasses.value,style:{whiteSpace:"normal"},attrs:{"data-node-view-wrapper":""},on:{dragstart:this.onDragStart}},this.$slots.default)}};class kh{constructor(r,n){const i=typeof r=="function"?r:Gn.extend(r);this.ref=new i(n).$mount()}get element(){return this.ref.$el}updateProps(r={}){var n,i,o;if(!this.ref.$props)return;const s=(o=(i=(n=this.ref.$props.editor)===null||n===void 0?void 0:n.contentComponent)===null||i===void 0?void 0:i.$options._base)!==null&&o!==void 0?o:Gn,a=s.config.silent;s.config.silent=!0,Object.entries(r).forEach(([l,u])=>{this.ref.$props[l]=u}),s.config.silent=a}destroy(){this.ref.$destroy()}}const ZD={editor:Or.objectProp().required,node:Or.objectProp().required,decorations:Or.objectProp().required,selected:Or.booleanProp().required,extension:Or.objectProp().required,getPos:Or.functionProp().required,updateAttributes:Or.functionProp().required,deleteNode:Or.functionProp().required};class GD extends Sx{mount(){var r,n;const i={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(a={})=>this.updateAttributes(a),deleteNode:()=>this.deleteNode()},o=this.onDragStart.bind(this);this.decorationClasses=Gn.observable({value:this.getDecorationClasses()});const s=((n=(r=this.editor.contentComponent)===null||r===void 0?void 0:r.$options._base)!==null&&n!==void 0?n:Gn).extend(this.component).extend({props:Object.keys(i),provide:()=>({onDragStart:o,decorationClasses:this.decorationClasses})});this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new kh(s,{parent:this.editor.contentComponent,propsData:i})}get dom(){if(!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.dom.querySelector("[data-node-view-content]")||this.dom}handleSelectionUpdate(){const{from:r,to:n}=this.editor.state.selection,i=this.getPos();if(typeof i=="number")if(r<=i&&n>=i+this.node.nodeSize){if(this.renderer.ref.$props.selected)return;this.selectNode()}else{if(!this.renderer.ref.$props.selected)return;this.deselectNode()}}update(r,n,i){const o=s=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(s)};if(typeof this.options.update=="function"){const s=this.node,a=this.decorations,l=this.innerDecorations;return this.node=r,this.decorations=n,this.innerDecorations=i,this.options.update({oldNode:s,oldDecorations:a,newNode:r,newDecorations:n,oldInnerDecorations:l,innerDecorations:i,updateProps:()=>o({node:r,decorations:n,innerDecorations:i})})}return r.type!==this.node.type?!1:(r===this.node&&this.decorations===n&&this.innerDecorations===i||(this.node=r,this.decorations=n,this.innerDecorations=i,o({node:r,decorations:n,innerDecorations:i})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.map(r=>r.type.attrs.class).flat().join(" ")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate)}}function En(e,r){return n=>n.editor.contentComponent?new GD(e,n,r):{}}const JD=Symbol("wrapper:outline-state"),XD=Symbol("wrapper:outline-actions"),Y2={inject:{$outlineState:{from:JD,default:{visible:!1,enable:!1}}}},eb={inject:{$outlineActions:{from:XD,default:{toggle:()=>{}}}}},QD={name:"NcActionCaption",inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{name:{type:String,required:!0}}};var YD=function(){var e=this,r=e._self._c;return r("li",{staticClass:"app-navigation-caption",attrs:{role:e.isInSemanticMenu&&"presentation"}},[e._v(" "+e._s(e.name)+" ")])},e4=[],t4=_s(QD,YD,e4,!1,null,"b9668c9e");const r4=t4.exports,n4={name:"NcActionRadio",mixins:[zv],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},model:{prop:"modelValue",event:"update:modelValue"},props:{id:{type:String,default:()=>"action-"+Xv(),validator:e=>e.trim()!==""},checked:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:!1},name:{type:String,required:!0},value:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1}},emits:["update:checked","update:modelValue","update:model-value","change"],setup(){return{model:$v("checked","update:checked")}},computed:{isFocusable(){return!this.disabled},ariaChecked(){if(this.isInSemanticMenu)return this.model?"true":"false"}},methods:{toggleInput(e){this.$refs.label.click()},onChange(e){this.model=this.$refs.radio.checked,this.$emit("change",e)}}};var i4=function(){var e=this,r=e._self._c;return r("li",{staticClass:"action",class:{"action--disabled":e.disabled},attrs:{role:e.isInSemanticMenu&&"presentation"}},[r("span",{staticClass:"action-radio",attrs:{role:"menuitemradio","aria-checked":e.ariaChecked}},[r("input",{ref:"radio",staticClass:"radio action-radio__radio",class:{focusable:e.isFocusable},attrs:{id:e.id,disabled:e.disabled,name:e.name,type:"radio"},domProps:{checked:e.checked,value:e.value},on:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")||n.ctrlKey||n.shiftKey||n.altKey||n.metaKey?null:(n.preventDefault(),e.toggleInput.apply(null,arguments))},change:e.onChange}}),r("label",{ref:"label",staticClass:"action-radio__label",attrs:{for:e.id}},[e._v(e._s(e.text))]),e._e()],2)])},o4=[],s4=_s(n4,i4,o4,!1,null,"f9884718");const a4=s4.exports,l4={name:"NcActionSeparator"};var u4=function(){var e=this,r=e._self._c;return r("li",{staticClass:"action action-separator action--disabled",attrs:{role:"separator"}})},c4=[],d4=_s(l4,u4,c4,!1,null,"3e2324b7");const tb=d4.exports,h4={name:"NcUserBubbleDiv"};var p4=function(){var e=this,r=e._self._c;return r("div",[e._t("trigger")],2)},f4=[],m4=_s(h4,p4,f4,!1,null,null);const g4=m4.exports,b4={name:"NcUserBubble",components:{NcAvatar:Hv,NcPopover:Qv,NcUserBubbleDiv:g4},props:{avatarImage:{type:String,default:void 0},user:{type:String,default:void 0},displayName:{type:String,default:void 0},showUserStatus:{type:Boolean,default:!1},url:{type:String,default:void 0,validator:e=>{var r;try{return e=new URL(e,(r=e==null?void 0:e.startsWith)!=null&&r.call(e,"/")?window.location.href:void 0),!0}catch{return!1}}},to:{type:[String,Object],default:void 0},open:{type:Boolean,default:!1},primary:{type:Boolean,default:!1},size:{type:Number,default:20},margin:{type:Number,default:2}},emits:["click","update:open"],computed:{isPopoverComponent(){return this.popoverEmpty?"NcUserBubbleDiv":"NcPopover"},isAvatarUrl(){if(!this.avatarImage)return!1;try{return!!new URL(this.avatarImage)}catch{return!1}},isCustomAvatar(){return!!this.avatarImage},hasUrl(){return this.url&&this.url.trim()!==""},isLinkComponent(){return this.hasUrl?"a":this.to?Pv:"div"},popoverEmpty(){return!("default"in this.$slots)},styles(){return{content:{height:this.size+"px",lineHeight:this.size+"px",borderRadius:this.size/2+"px"},avatar:{marginLeft:this.margin+"px"}}}},mounted(){!this.displayName&&!this.user&&Gn.util.warn("[NcUserBubble] At least `displayName` or `user` property should be set.")},methods:{onOpenChange(e){this.$emit("update:open",e)},onClick(e){this.$emit("click",e)}}};var y4=function(){var e=this,r=e._self._c;return r(e.isPopoverComponent,{tag:"component",staticClass:"user-bubble__wrapper",attrs:{trigger:"hover focus",shown:e.open},on:{"update:open":e.onOpenChange},scopedSlots:e._u([{key:"trigger",fn:function({attrs:n}){return[r(e.isLinkComponent,e._b({tag:"component",staticClass:"user-bubble__content",class:{"user-bubble__content--primary":e.primary},style:e.styles.content,attrs:{to:e.to,href:e.hasUrl?e.url:null},on:{click:e.onClick}},"component",n,!1),[r("NcAvatar",{staticClass:"user-bubble__avatar",style:e.styles.avatar,attrs:{url:e.isCustomAvatar&&e.isAvatarUrl?e.avatarImage:void 0,"icon-class":e.isCustomAvatar&&!e.isAvatarUrl?e.avatarImage:void 0,user:e.user,"display-name":e.displayName,size:e.size-e.margin*2,"disable-tooltip":!0,"disable-menu":!0,"show-user-status":e.showUserStatus}}),r("span",{staticClass:"user-bubble__name"},[e._v(" "+e._s(e.displayName||e.user)+" ")]),e.$slots.name?r("span",{staticClass:"user-bubble__secondary"},[e._t("name")],2):e._e()],1)]}}],null,!0)},[e._t("default")],2)},C4=[],v4=_s(b4,y4,C4,!1,null,"b07a6c57");const k4=v4.exports,lu={data(){return{$store:Hc}},beforeMount(){typeof this.$store>"u"?this.$store=Hc:this.$store.hasModule("text")||this.$store.registerModule("text",tk)}},w4={name:"TableOfContents",mixins:[lu,rg],data:()=>({initialRender:!0}),computed:{...rk({headings:e=>e.text.headings})},mounted(){setTimeout(()=>{this.initialRender=!1},1e3)},methods:{goto(e){document.getElementById(e.id).scrollIntoView(),this.$nextTick(()=>{window.location.hash=e.id})}}};var A4=function(){var e=this,r=e._self._c;return r("div",{staticClass:"editor--toc",class:{"--initial-render":e.initialRender},attrs:{"data-text-el":"editor-table-of-contents"}},[r("ul",{staticClass:"editor--toc__list"},e._l(e.headings,function(n){return r("li",{key:n.id,staticClass:"editor--toc__item",class:{["editor--toc__item--".concat(n.level)]:!0,["editor--toc__item--previous-".concat(n.previous)]:n.previous>0},attrs:{"data-toc-level":n.level}},[r("a",{attrs:{href:"#".concat(n.id)},on:{click:function(i){return i.preventDefault(),e.goto(n)}}},[e._v(" "+e._s(n.text)+" ")])])}),0)])},_4=[],E4=j(w4,A4,_4,!1,null,null);const x4=E4.exports,D4={name:"AlphabeticalVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var S4=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon alphabetical-variant-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M3 7A2 2 0 0 0 1 9V17H3V13H5V17H7V9A2 2 0 0 0 5 7H3M3 9H5V11H3M15 10.5V9A2 2 0 0 0 13 7H9V17H13A2 2 0 0 0 15 15V13.5A1.54 1.54 0 0 0 13.5 12A1.54 1.54 0 0 0 15 10.5M13 15H11V13H13V15M13 11H11V9H13M19 7A2 2 0 0 0 17 9V15A2 2 0 0 0 19 17H21A2 2 0 0 0 23 15V14H21V15H19V9H21V10H23V9A2 2 0 0 0 21 7Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},B4=[],M4=j(D4,S4,B4,!1,null,null);const F4=M4.exports,N4={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var O4=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon close-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},T4=[],L4=j(N4,O4,T4,!1,null,null);const rb=L4.exports,I4={name:"CheckIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var R4=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon check-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},z4=[],$4=j(I4,R4,z4,!1,null,null);const nb=$4.exports,H4={name:"CodeTagsIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var P4=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon code-tags-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M14.6,16.6L19.2,12L14.6,7.4L16,6L22,12L16,18L14.6,16.6M9.4,16.6L4.8,12L9.4,7.4L8,6L2,12L8,18L9.4,16.6Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},V4=[],j4=j(H4,P4,V4,!1,null,null);const q4=j4.exports,U4={name:"AlertDecagramIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var W4=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon alert-decagram-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M23,12L20.56,9.22L20.9,5.54L17.29,4.72L15.4,1.54L12,3L8.6,1.54L6.71,4.72L3.1,5.53L3.44,9.21L1,12L3.44,14.78L3.1,18.47L6.71,19.29L8.6,22.47L12,21L15.4,22.46L17.29,19.28L20.9,18.46L20.56,14.78L23,12M13,17H11V15H13V17M13,13H11V7H13V13Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},K4=[],Z4=j(U4,W4,K4,!1,null,null);const G4=Z4.exports,J4={name:"DeleteIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var X4=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon delete-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},Q4=[],Y4=j(J4,X4,Q4,!1,null,null);const ib=Y4.exports,e6={name:"FileDocumentIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var t6=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon file-document-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},r6=[],n6=j(e6,t6,r6,!1,null,null);const i6=n6.exports,o6={name:"DotsHorizontalIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var s6=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon dots-horizontal-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},a6=[],l6=j(o6,s6,a6,!1,null,null);const u6=l6.exports,c6={name:"EmoticonOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var d6=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon emoticon-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M12,17.5C14.33,17.5 16.3,16.04 17.11,14H6.89C7.69,16.04 9.67,17.5 12,17.5M8.5,11A1.5,1.5 0 0,0 10,9.5A1.5,1.5 0 0,0 8.5,8A1.5,1.5 0 0,0 7,9.5A1.5,1.5 0 0,0 8.5,11M15.5,11A1.5,1.5 0 0,0 17,9.5A1.5,1.5 0 0,0 15.5,8A1.5,1.5 0 0,0 14,9.5A1.5,1.5 0 0,0 15.5,11M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},h6=[],p6=j(c6,d6,h6,!1,null,null);const f6=p6.exports,m6={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var g6=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon folder-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},b6=[],y6=j(m6,g6,b6,!1,null,null);const C6=y6.exports,v6={name:"FormatBoldIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var k6=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-bold-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},w6=[],A6=j(v6,k6,w6,!1,null,null);const _6=A6.exports,E6={name:"AlignHorizontalCenterIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var x6=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon align-horizontal-center-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M11 2H13V7H21V10H13V14H18V17H13V22H11V17H6V14H11V10H3V7H11V2Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},D6=[],S6=j(E6,x6,D6,!1,null,null);const B6=S6.exports,M6={name:"AlignHorizontalLeftIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var F6=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon align-horizontal-left-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M4 22H2V2H4V22M22 7H6V10H22V7M16 14H6V17H16V14Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},N6=[],O6=j(M6,F6,N6,!1,null,null);const T6=O6.exports,L6={name:"AlignHorizontalRightIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var I6=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon align-horizontal-right-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M20 2H22V22H20V2M2 10H18V7H2V10M8 17H18V14H8V17Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},R6=[],z6=j(L6,I6,R6,!1,null,null);const $6=z6.exports,H6={name:"FormatHeader1Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var P6=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-header1-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M14,18V16H16V6.31L13.5,7.75V5.44L16,4H18V16H20V18H14Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},V6=[],j6=j(H6,P6,V6,!1,null,null);const q6=j6.exports,U6={name:"FormatHeader2Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var W6=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-header2-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M21,18H15A2,2 0 0,1 13,16C13,15.47 13.2,15 13.54,14.64L18.41,9.41C18.78,9.05 19,8.55 19,8A2,2 0 0,0 17,6A2,2 0 0,0 15,8H13A4,4 0 0,1 17,4A4,4 0 0,1 21,8C21,9.1 20.55,10.1 19.83,10.83L15,16H21V18Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},K6=[],Z6=j(U6,W6,K6,!1,null,null);const G6=Z6.exports,J6={name:"FormatHeader3Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var X6=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-header3-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H19A2,2 0 0,1 21,6V16A2,2 0 0,1 19,18H15A2,2 0 0,1 13,16V15H15V16H19V12H15V10H19V6H15V7H13V6A2,2 0 0,1 15,4Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},Q6=[],Y6=j(J6,X6,Q6,!1,null,null);const e5=Y6.exports,t5={name:"FormatHeader4Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var r5=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-header4-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M18,18V13H13V11L18,4H20V11H21V13H20V18H18M18,11V7.42L15.45,11H18Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},n5=[],i5=j(t5,r5,n5,!1,null,null);const o5=i5.exports,s5={name:"FormatHeader5Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var a5=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-header5-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H20V6H15V10H17A4,4 0 0,1 21,14A4,4 0 0,1 17,18H15A2,2 0 0,1 13,16V15H15V16H17A2,2 0 0,0 19,14A2,2 0 0,0 17,12H15A2,2 0 0,1 13,10V6A2,2 0 0,1 15,4Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},l5=[],u5=j(s5,a5,l5,!1,null,null);const c5=u5.exports,d5={name:"FormatHeader6Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var h5=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-header6-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H19A2,2 0 0,1 21,6V7H19V6H15V10H19A2,2 0 0,1 21,12V16A2,2 0 0,1 19,18H15A2,2 0 0,1 13,16V6A2,2 0 0,1 15,4M15,12V16H19V12H15Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},p5=[],f5=j(d5,h5,p5,!1,null,null);const m5=f5.exports,g5={name:"FormatIndentDecreaseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var b5=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-indent-decrease-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M3,21H21V19H3M3,12L7,16V8M11,17H21V15H11V17Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},y5=[],C5=j(g5,b5,y5,!1,null,null);const v5=C5.exports,k5={name:"FormatIndentIncreaseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var w5=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-indent-increase-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M11,17H21V15H11M3,8V16L7,12M3,21H21V19H3V21Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},A5=[],_5=j(k5,w5,A5,!1,null,null);const E5=_5.exports,x5={name:"FormatItalicIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var D5=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-italic-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},S5=[],B5=j(x5,D5,S5,!1,null,null);const M5=B5.exports,F5={name:"FormatListBulletedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var N5=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-list-bulleted-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},O5=[],T5=j(F5,N5,O5,!1,null,null);const L5=T5.exports,I5={name:"FormatListCheckboxIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var R5=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-list-checkbox-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M21,19V17H8V19H21M21,13V11H8V13H21M8,7H21V5H8V7M4,5V7H6V5H4M3,5A1,1 0 0,1 4,4H6A1,1 0 0,1 7,5V7A1,1 0 0,1 6,8H4A1,1 0 0,1 3,7V5M4,11V13H6V11H4M3,11A1,1 0 0,1 4,10H6A1,1 0 0,1 7,11V13A1,1 0 0,1 6,14H4A1,1 0 0,1 3,13V11M4,17V19H6V17H4M3,17A1,1 0 0,1 4,16H6A1,1 0 0,1 7,17V19A1,1 0 0,1 6,20H4A1,1 0 0,1 3,19V17Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},z5=[],$5=j(I5,R5,z5,!1,null,null);const H5=$5.exports,P5={name:"FormatListNumberedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var V5=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-list-numbered-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M7,13V11H21V13H7M7,19V17H21V19H7M7,7V5H21V7H7M3,8V5H2V4H4V8H3M2,17V16H5V20H2V19H4V18.5H3V17.5H4V17H2M4.25,10A0.75,0.75 0 0,1 5,10.75C5,10.95 4.92,11.14 4.79,11.27L3.12,13H5V14H2V13.08L4,11H2V10H4.25Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},j5=[],q5=j(P5,V5,j5,!1,null,null);const U5=q5.exports,W5={name:"FormatQuoteCloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var K5=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-quote-close-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M14,17H17L19,13V7H13V13H16M6,17H9L11,13V7H5V13H8L6,17Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},Z5=[],G5=j(W5,K5,Z5,!1,null,null);const J5=G5.exports,X5={name:"FormatStrikethroughIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Q5=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-strikethrough-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M3,14H21V12H3M5,4V7H10V10H14V7H19V4M10,19H14V16H10V19Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},Y5=[],eS=j(X5,Q5,Y5,!1,null,null);const tS=eS.exports,rS={name:"FormatUnderlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var nS=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon format-underline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},iS=[],oS=j(rS,nS,iS,!1,null,null);const sS=oS.exports,aS={name:"HelpCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var lS=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon help-circle-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},uS=[],cS=j(aS,lS,uS,!1,null,null);const dS=cS.exports,hS={name:"ImageOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var pS=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon image-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M19,19H5V5H19M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M13.96,12.29L11.21,15.83L9.25,13.47L6.5,17H17.5L13.96,12.29Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},fS=[],mS=j(hS,pS,fS,!1,null,null);const gS=mS.exports,bS={name:"InformationIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var yS=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon information-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},CS=[],vS=j(bS,yS,CS,!1,null,null);const kS=vS.exports,wS={name:"LinkIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var AS=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon link-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},_S=[],ES=j(wS,AS,_S,!1,null,null);const xS=ES.exports,DS={name:"LinkOffIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var SS=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon link-off-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.43 19.12,14.63 17.79,15L19.25,16.44C20.88,15.61 22,13.95 22,12A5,5 0 0,0 17,7M16,11H13.81L15.81,13H16V11M2,4.27L5.11,7.38C3.29,8.12 2,9.91 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12C3.9,10.41 5.11,9.1 6.66,8.93L8.73,11H8V13H10.73L13,15.27V17H14.73L18.74,21L20,19.74L3.27,3L2,4.27Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},BS=[],MS=j(DS,SS,BS,!1,null,null);const ob=MS.exports,FS={name:"LoadingIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var NS=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon loading-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},OS=[],TS=j(FS,NS,OS,!1,null,null);const LS=TS.exports,IS={name:"PaperclipIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var RS=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon paperclip-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M16.5,6V17.5A4,4 0 0,1 12.5,21.5A4,4 0 0,1 8.5,17.5V5A2.5,2.5 0 0,1 11,2.5A2.5,2.5 0 0,1 13.5,5V15.5A1,1 0 0,1 12.5,16.5A1,1 0 0,1 11.5,15.5V6H10V15.5A2.5,2.5 0 0,0 12.5,18A2.5,2.5 0 0,0 15,15.5V5A4,4 0 0,0 11,1A4,4 0 0,0 7,5V17.5A5.5,5.5 0 0,0 12.5,23A5.5,5.5 0 0,0 18,17.5V6H16.5Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},zS=[],$S=j(IS,RS,zS,!1,null,null);const HS=$S.exports,PS={name:"CheckboxMarkedCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var VS=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon checkbox-marked-circle-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},jS=[],qS=j(PS,VS,jS,!1,null,null);const US=qS.exports,WS={name:"ArrowURightTopIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var KS=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon arrow-u-right-top-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M10.5 18H18V20H10.5C6.91 20 4 17.09 4 13.5S6.91 7 10.5 7H16.17L13.08 3.91L14.5 2.5L20 8L14.5 13.5L13.09 12.09L16.17 9H10.5C8 9 6 11 6 13.5S8 18 10.5 18Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},ZS=[],GS=j(WS,KS,ZS,!1,null,null);const JS=GS.exports,XS={name:"ShapeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var QS=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon shape-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M11,13.5V21.5H3V13.5H11M12,2L17.5,11H6.5L12,2M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},YS=[],eB=j(XS,QS,YS,!1,null,null);const tB=eB.exports,rB={name:"TableIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var nB=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon table-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M5,4H19A2,2 0 0,1 21,6V18A2,2 0 0,1 19,20H5A2,2 0 0,1 3,18V6A2,2 0 0,1 5,4M5,8V12H11V8H5M13,8V12H19V8H13M5,14V18H11V14H5M13,14V18H19V14H13Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},iB=[],oB=j(rB,nB,iB,!1,null,null);const sB=oB.exports,aB={name:"TableColumnPlusAfterIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var lB=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon table-column-plus-after-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},uB=[],cB=j(aB,lB,uB,!1,null,null);const dB=cB.exports,hB={name:"TableColumnPlusBeforeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var pB=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon table-column-plus-before-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M13,2A2,2 0 0,0 11,4V20A2,2 0 0,0 13,22H22V2H13M20,10V14H13V10H20M20,16V20H13V16H20M20,4V8H13V4H20M9,11H6V8H4V11H1V13H4V16H6V13H9V11Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},fB=[],mB=j(hB,pB,fB,!1,null,null);const gB=mB.exports,bB={name:"TableRowPlusAfterIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var yB=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon table-row-plus-after-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},CB=[],vB=j(bB,yB,CB,!1,null,null);const kB=vB.exports,wB={name:"TableRowPlusBeforeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var AB=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon table-row-plus-before-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M22,14A2,2 0 0,0 20,12H4A2,2 0 0,0 2,14V21H4V19H8V21H10V19H14V21H16V19H20V21H22V14M4,14H8V17H4V14M10,14H14V17H10V14M20,14V17H16V14H20M11,10H13V7H16V5H13V2H11V5H8V7H11V10Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},_B=[],EB=j(wB,AB,_B,!1,null,null);const xB=EB.exports,DB={name:"TableCogIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var SB=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon table-cog-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M3 3H17C18.11 3 19 3.9 19 5V12.08C17.45 11.82 15.92 12.18 14.68 13H11V17H12.08C11.97 17.68 11.97 18.35 12.08 19H3C1.9 19 1 18.11 1 17V5C1 3.9 1.9 3 3 3M3 7V11H9V7H3M11 7V11H17V7H11M3 13V17H9V13H3M22.78 19.32L21.71 18.5C21.73 18.33 21.75 18.17 21.75 18S21.74 17.67 21.71 17.5L22.77 16.68C22.86 16.6 22.89 16.47 22.83 16.36L21.83 14.63C21.77 14.5 21.64 14.5 21.5 14.5L20.28 15C20 14.82 19.74 14.65 19.43 14.53L19.24 13.21C19.23 13.09 19.12 13 19 13H17C16.88 13 16.77 13.09 16.75 13.21L16.56 14.53C16.26 14.66 15.97 14.82 15.71 15L14.47 14.5C14.36 14.5 14.23 14.5 14.16 14.63L13.16 16.36C13.1 16.47 13.12 16.6 13.22 16.68L14.28 17.5C14.26 17.67 14.25 17.83 14.25 18S14.26 18.33 14.28 18.5L13.22 19.32C13.13 19.4 13.1 19.53 13.16 19.64L14.16 21.37C14.22 21.5 14.35 21.5 14.47 21.5L15.71 21C15.97 21.18 16.25 21.35 16.56 21.47L16.75 22.79C16.77 22.91 16.87 23 17 23H19C19.12 23 19.23 22.91 19.25 22.79L19.44 21.47C19.74 21.34 20 21.18 20.28 21L21.5 21.5C21.64 21.5 21.77 21.5 21.84 21.37L22.84 19.64C22.9 19.53 22.87 19.4 22.78 19.32M18 19.5C17.17 19.5 16.5 18.83 16.5 18S17.18 16.5 18 16.5 19.5 17.17 19.5 18 18.84 19.5 18 19.5Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},BB=[],MB=j(DB,SB,BB,!1,null,null);const FB=MB.exports,NB={name:"ArrowULeftTopIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var OB=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon arrow-u-left-top-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M20 13.5C20 17.09 17.09 20 13.5 20H6V18H13.5C16 18 18 16 18 13.5S16 9 13.5 9H7.83L10.91 12.09L9.5 13.5L4 8L9.5 2.5L10.92 3.91L7.83 7H13.5C17.09 7 20 9.91 20 13.5Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},TB=[],LB=j(NB,OB,TB,!1,null,null);const IB=LB.exports,RB={name:"UploadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var zB=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon upload-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},$B=[],HB=j(RB,zB,$B,!1,null,null);const PB=HB.exports,VB={name:"AlertIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var jB=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon alert-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},qB=[],UB=j(VB,jB,qB,!1,null,null);const WB=UB.exports,KB={name:"WebIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var ZB=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon web-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},GB=[],JB=j(KB,ZB,GB,!1,null,null);const XB=JB.exports,QB={name:"TranslateVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var YB=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon translate-variant-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M11 1H3C1.9 1 1 1.9 1 3V15L4 12H9V11C9 8.8 10.79 7 13 7V3C13 1.9 12.1 1 11 1M11 4L9.5 4C9.16 5.19 8.54 6.3 7.68 7.26L7.66 7.28L8.92 8.53L8.55 9.54L7 8L4.5 10.5L3.81 9.77L6.34 7.28C5.72 6.59 5.22 5.82 4.86 5H5.85C6.16 5.6 6.54 6.17 7 6.68C7.72 5.88 8.24 4.97 8.57 4L3 4V3H6.5V2H7.5V3H11V4M21 9H13C11.9 9 11 9.9 11 11V18C11 19.1 11.9 20 13 20H20L23 23V11C23 9.9 22.1 9 21 9M19.63 19L18.78 16.75H15.22L14.38 19H12.88L16.25 10H17.75L21.13 19H19.63M17 12L18.22 15.25H15.79L17 12Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},eM=[],tM=j(QB,YB,eM,!1,null,null);const rM=tM.exports,sb=20,ie=e=>({functional:!0,render(r,{data:n,props:i}){return r(e,{data:n,key:n.key,staticClass:n.staticClass,props:{size:sb,...i}})}}),pd={functional:!0,render(e,{data:r,props:n}){return e(LS,{data:r,staticClass:"animation-rotate",props:{size:sb,...n}})}},E4e=ie(F4),nM=ie(B6),iM=ie(T6),oM=ie($6),sM=ie(rb),aM=ie(q4),ab=ie(G4),uu=ie(ib),lM=ie(i6),x4e=ie(u6),uM=ie(f6),cM=ie(C6),dM=ie(_6),ef=ie(q6),hM=ie(G6),pM=ie(e5),fM=ie(o5),mM=ie(c5),gM=ie(m5),bM=ie(v5),yM=ie(E5),CM=ie(M5),wa=ie(L5),vM=ie(H5),kM=ie(U5),wM=ie(J5),AM=ie(tS),_M=ie(sS),D4e=ie(dS),EM=ie(gS),Al=ie(kS),xM=ie(xS),DM=ie(ob),SM=ie(HS),lb=ie(US),BM=ie(JS),MM=ie(tB),FM=ie(sB),NM=ie(dB),OM=ie(gB),TM=ie(kB),LM=ie(xB),IM=ie(FB),S4e=ie(rM),RM=ie(IB),zM=ie(PB),ub=ie(WB),$M=ie(XB),HM={name:"EditorOutline",components:{Close:sM,NcButton:Wl,TableOfContents:x4},mixins:[lu,Y2,eb],data:()=>({mobile:!1}),mounted(){this.$resizeObserver=new ResizeObserver(this.onResize),this.$resizeObserver.observe(this.$el.parentElement),this.onResize([this.$el.parentElement])},beforeDestroy(){this.$resizeObserver.unobserve(this.$el.parentElement),this.$resizeObserver=null,this.$onResize=null},methods:{onResize([e]){window.requestAnimationFrame(()=>{this.mobile=e.clientWidth<320})}}};var PM=function(){var e=this,r=e._self._c;return r("div",{staticClass:"editor--outline",class:{"editor--outline-mobile":e.mobile},attrs:{"data-text-el":"editor-outline"}},[r("header",{staticClass:"editor--outline__header"},[r("NcButton",{staticClass:"editor--outline__btn-close",attrs:{type:"tertiary","aria-label":e.t("text","Close outline view")},on:{click:e.$outlineActions.toggle},scopedSlots:e._u([{key:"icon",fn:function(){return[r("Close")]},proxy:!0}])}),r("h2",[e._v(e._s(e.t("text","Outline")))])],1),r("TableOfContents")],1)},VM=[],jM=j(HM,PM,VM,!1,null,"06016c06");const B4e=jM.exports,bt=()=>new Map,fd=e=>{const r=bt();return e.forEach((n,i)=>{r.set(i,n)}),r},Sr=(e,r,n)=>{let i=e.get(r);return i===void 0&&e.set(r,i=n()),i},qM=(e,r)=>{const n=[];for(const[i,o]of e)n.push(r(o,i));return n},UM=(e,r)=>{for(const[n,i]of e)if(r(i,n))return!0;return!1},gn=()=>new Set,ec=e=>e[e.length-1],WM=(e,r)=>{for(let n=0;n<r.length;n++)e.push(r[n])},qr=Array.from,KM=(e,r)=>{for(let n=0;n<e.length;n++)if(r(e[n],n,e))return!0;return!1},md=Array.isArray;class cb{constructor(){this._observers=bt()}on(r,n){return Sr(this._observers,r,gn).add(n),n}once(r,n){const i=(...o)=>{this.off(r,i),n(...o)};this.on(r,i)}off(r,n){const i=this._observers.get(r);i!==void 0&&(i.delete(n),i.size===0&&this._observers.delete(r))}emit(r,n){return qr((this._observers.get(r)||bt()).values()).forEach(i=>i(...n))}destroy(){this._observers=bt()}}class M4e{constructor(){this._observers=bt()}on(r,n){Sr(this._observers,r,gn).add(n)}once(r,n){const i=(...o)=>{this.off(r,i),n(...o)};this.on(r,i)}off(r,n){const i=this._observers.get(r);i!==void 0&&(i.delete(n),i.size===0&&this._observers.delete(r))}emit(r,n){return qr((this._observers.get(r)||bt()).values()).forEach(i=>i(...n))}destroy(){this._observers=bt()}}const Ur=Math.floor,Aa=Math.abs,$r=(e,r)=>e<r?e:r,ar=(e,r)=>e>r?e:r,F4e=Math.pow,db=e=>e!==0?e<0:1/e<0,tf=1,rf=2,tc=4,rc=8,Yo=32,Hr=64,Ot=128,cu=31,gd=63,Wn=127,ZM=2147483647,hb=Number.MAX_SAFE_INTEGER,GM=Number.isInteger||(e=>typeof e=="number"&&isFinite(e)&&Ur(e)===e),JM=String.fromCharCode,XM=e=>e.toLowerCase(),QM=/^\s*/g,YM=e=>e.replace(QM,""),eF=/([A-Z])/g,nf=(e,r)=>YM(e.replace(eF,n=>"".concat(r).concat(XM(n)))),tF=e=>{const r=unescape(encodeURIComponent(e)),n=r.length,i=new Uint8Array(n);for(let o=0;o<n;o++)i[o]=r.codePointAt(o);return i},es=typeof TextEncoder<"u"?new TextEncoder:null,rF=e=>es.encode(e),nF=es?rF:tF;let Ho=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});Ho&&Ho.decode(new Uint8Array).length===1&&(Ho=null);class Fs{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const du=()=>new Fs,iF=e=>{let r=e.cpos;for(let n=0;n<e.bufs.length;n++)r+=e.bufs[n].length;return r},yr=e=>{const r=new Uint8Array(iF(e));let n=0;for(let i=0;i<e.bufs.length;i++){const o=e.bufs[i];r.set(o,n),n+=o.length}return r.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),r},oF=(e,r)=>{const n=e.cbuf.length;n-e.cpos<r&&(e.bufs.push(new Uint8Array(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(ar(n,r)*2),e.cpos=0)},Xe=(e,r)=>{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=r},bd=Xe,me=(e,r)=>{for(;r>Wn;)Xe(e,Ot|Wn&r),r=Ur(r/128);Xe(e,Wn&r)},wh=(e,r)=>{const n=db(r);for(n&&(r=-r),Xe(e,(r>gd?Ot:0)|(n?Hr:0)|gd&r),r=Ur(r/64);r>0;)Xe(e,(r>Wn?Ot:0)|Wn&r),r=Ur(r/128)},yd=new Uint8Array(3e4),sF=yd.length/3,aF=(e,r)=>{if(r.length<sF){const n=es.encodeInto(r,yd).written||0;me(e,n);for(let i=0;i<n;i++)Xe(e,yd[i])}else St(e,nF(r))},lF=(e,r)=>{const n=unescape(encodeURIComponent(r)),i=n.length;me(e,i);for(let o=0;o<i;o++)Xe(e,n.codePointAt(o))},$i=es&&es.encodeInto?aF:lF,hu=(e,r)=>{const n=e.cbuf.length,i=e.cpos,o=$r(n-i,r.length),s=r.length-o;e.cbuf.set(r.subarray(0,o),i),e.cpos+=o,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(ar(n*2,s)),e.cbuf.set(r.subarray(o)),e.cpos=s)},St=(e,r)=>{me(e,r.byteLength),hu(e,r)},Ah=(e,r)=>{oF(e,r);const n=new DataView(e.cbuf.buffer,e.cpos,r);return e.cpos+=r,n},uF=(e,r)=>Ah(e,4).setFloat32(0,r,!1),cF=(e,r)=>Ah(e,8).setFloat64(0,r,!1),dF=(e,r)=>Ah(e,8).setBigInt64(0,r,!1),of=new DataView(new ArrayBuffer(4)),hF=e=>(of.setFloat32(0,e),of.getFloat32(0)===e),ts=(e,r)=>{switch(typeof r){case"string":Xe(e,119),$i(e,r);break;case"number":GM(r)&&Aa(r)<=ZM?(Xe(e,125),wh(e,r)):hF(r)?(Xe(e,124),uF(e,r)):(Xe(e,123),cF(e,r));break;case"bigint":Xe(e,122),dF(e,r);break;case"object":if(r===null)Xe(e,126);else if(md(r)){Xe(e,117),me(e,r.length);for(let n=0;n<r.length;n++)ts(e,r[n])}else if(r instanceof Uint8Array)Xe(e,116),St(e,r);else{Xe(e,118);const n=Object.keys(r);me(e,n.length);for(let i=0;i<n.length;i++){const o=n[i];$i(e,o),ts(e,r[o])}}break;case"boolean":Xe(e,r?120:121);break;default:Xe(e,127)}};class sf extends Fs{constructor(r){super(),this.w=r,this.s=null,this.count=0}write(r){this.s===r?this.count++:(this.count>0&&me(this,this.count-1),this.count=1,this.w(this,r),this.s=r)}}const af=e=>{e.count>0&&(wh(e.encoder,e.count===1?e.s:-e.s),e.count>1&&me(e.encoder,e.count-2))};class _a{constructor(){this.encoder=new Fs,this.s=0,this.count=0}write(r){this.s===r?this.count++:(af(this),this.count=1,this.s=r)}toUint8Array(){return af(this),yr(this.encoder)}}const lf=e=>{if(e.count>0){const r=e.diff*2+(e.count===1?0:1);wh(e.encoder,r),e.count>1&&me(e.encoder,e.count-2)}};class nc{constructor(){this.encoder=new Fs,this.s=0,this.count=0,this.diff=0}write(r){this.diff===r-this.s?(this.s=r,this.count++):(lf(this),this.count=1,this.diff=r-this.s,this.s=r)}toUint8Array(){return lf(this),yr(this.encoder)}}class pF{constructor(){this.sarr=[],this.s="",this.lensE=new _a}write(r){this.s+=r,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(r.length)}toUint8Array(){const r=new Fs;return this.sarr.push(this.s),this.s="",$i(r,this.sarr.join("")),hu(r,this.lensE.toUint8Array()),yr(r)}}const bn=e=>new Error(e),ir=()=>{throw bn("Method unimplemented")},Lt=()=>{throw bn("Unexpected case")},pb=bn("Unexpected end of array"),fb=bn("Integer out of Range");class pu{constructor(r){this.arr=r,this.pos=0}}const ai=e=>new pu(e),fF=e=>e.pos!==e.arr.length,N4e=(e,r=e.pos)=>{const n=ai(e.arr);return n.pos=r,n},mF=(e,r)=>{const n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,r);return e.pos+=r,n},Bt=e=>mF(e,pe(e)),ro=e=>e.arr[e.pos++],pe=e=>{let r=0,n=1;const i=e.arr.length;for(;e.pos<i;){const o=e.arr[e.pos++];if(r=r+(o&Wn)*n,n*=128,o<Ot)return r;if(r>hb)throw fb}throw pb},_h=e=>{let r=e.arr[e.pos++],n=r&gd,i=64;const o=(r&Hr)>0?-1:1;if(!(r&Ot))return o*n;const s=e.arr.length;for(;e.pos<s;){if(r=e.arr[e.pos++],n=n+(r&Wn)*i,i*=128,r<Ot)return o*n;if(n>hb)throw fb}throw pb},gF=e=>{let r=pe(e);if(r===0)return"";{let n=String.fromCodePoint(ro(e));if(--r<100)for(;r--;)n+=String.fromCodePoint(ro(e));else for(;r>0;){const i=r<1e4?r:1e4,o=e.arr.subarray(e.pos,e.pos+i);e.pos+=i,n+=String.fromCodePoint.apply(null,o),r-=i}return decodeURIComponent(escape(n))}},bF=e=>Ho.decode(Bt(e)),Hi=Ho?bF:gF,Eh=(e,r)=>{const n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,r);return e.pos+=r,n},yF=e=>Eh(e,4).getFloat32(0,!1),CF=e=>Eh(e,8).getFloat64(0,!1),vF=e=>Eh(e,8).getBigInt64(0,!1),kF=[e=>{},e=>null,_h,yF,CF,vF,e=>!1,e=>!0,Hi,e=>{const r=pe(e),n={};for(let i=0;i<r;i++){const o=Hi(e);n[o]=rs(e)}return n},e=>{const r=pe(e),n=[];for(let i=0;i<r;i++)n.push(rs(e));return n},Bt],rs=e=>kF[127-ro(e)](e);class uf extends pu{constructor(r,n){super(r),this.reader=n,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),fF(this)?this.count=pe(this)+1:this.count=-1),this.count--,this.s}}class Ea extends pu{constructor(r){super(r),this.s=0,this.count=0}read(){if(this.count===0){this.s=_h(this);const r=db(this.s);this.count=1,r&&(this.s=-this.s,this.count=pe(this)+2)}return this.count--,this.s}}class ic extends pu{constructor(r){super(r),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const r=_h(this),n=r&1;this.diff=Ur(r/2),this.count=1,n&&(this.count=pe(this)+2)}return this.s+=this.diff,this.count--,this.s}}class wF{constructor(r){this.decoder=new Ea(r),this.str=Hi(this.decoder),this.spos=0}read(){const r=this.spos+this.decoder.read(),n=this.str.slice(this.spos,r);return this.spos=r,n}}const AF=crypto.getRandomValues.bind(crypto),_F=Math.random,mb=()=>AF(new Uint32Array(1))[0],EF=e=>e[Ur(_F()*e.length)],xF="10000000-1000-4000-8000"+-1e11,DF=()=>xF.replace(/[018]/g,e=>(e^mb()&15>>e/4).toString(16)),SF=Date.now,cf=e=>new Promise(e);Promise.all.bind(Promise);const BF=e=>e===void 0?null:e;class MF{constructor(){this.map=new Map}setItem(r,n){this.map.set(r,n)}getItem(r){return this.map.get(r)}}let gb=new MF,xh=!0;try{typeof localStorage<"u"&&localStorage&&(gb=localStorage,xh=!1)}catch{}const FF=gb,O4e=e=>xh||addEventListener("storage",e),T4e=e=>xh||removeEventListener("storage",e),NF=Object.assign,Dh=Object.keys,OF=(e,r)=>{for(const n in e)r(e[n],n)},L4e=(e,r)=>{const n=[];for(const i in e)n.push(r(e[i],i));return n},df=e=>Dh(e).length,hf=e=>Dh(e).length,TF=e=>{for(const r in e)return!1;return!0},LF=(e,r)=>{for(const n in e)if(!r(e[n],n))return!1;return!0},bb=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),IF=(e,r)=>e===r||hf(e)===hf(r)&&LF(e,(n,i)=>(n!==void 0||bb(r,i))&&r[i]===n),RF=Object.freeze,yb=e=>{for(const r in e){const n=e[r];(typeof n=="object"||typeof n=="function")&&yb(e[r])}return RF(e)},Sh=(e,r,n=0)=>{try{for(;n<e.length;n++)e[n](...r)}finally{n<e.length&&Sh(e,r,n+1)}},zF=e=>e,$F=(e,r)=>e===r,oc=(e,r)=>{if(e==null||r==null)return $F(e,r);if(e.constructor!==r.constructor)return!1;if(e===r)return!0;switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),r=new Uint8Array(r);case Uint8Array:{if(e.byteLength!==r.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==r[n])return!1;break}case Set:{if(e.size!==r.size)return!1;for(const n of e)if(!r.has(n))return!1;break}case Map:{if(e.size!==r.size)return!1;for(const n of e.keys())if(!r.has(n)||!oc(e.get(n),r.get(n)))return!1;break}case Object:if(df(e)!==df(r))return!1;for(const n in e)if(!bb(e,n)||!oc(e[n],r[n]))return!1;break;case Array:if(e.length!==r.length)return!1;for(let n=0;n<e.length;n++)if(!oc(e[n],r[n]))return!1;break;default:return!1}return!0},HF=(e,r)=>r.includes(e);var Cb={};const no=typeof Bn<"u"&&Bn.release&&/node|io\.js/.test(Bn.release.name)&&Object.prototype.toString.call(typeof Bn<"u"?Bn:0)==="[object process]",Bh=typeof window<"u"&&typeof document<"u"&&!no;let cr;const PF=()=>{if(cr===void 0)if(no){cr=bt();const e=Bn.argv;let r=null;for(let n=0;n<e.length;n++){const i=e[n];i[0]==="-"?(r!==null&&cr.set(r,""),r=i):r!==null&&(cr.set(r,i),r=null)}r!==null&&cr.set(r,"")}else typeof location=="object"?(cr=bt(),(location.search||"?").slice(1).split("&").forEach(e=>{if(e.length!==0){const[r,n]=e.split("=");cr.set("--".concat(nf(r,"-")),n),cr.set("-".concat(nf(r,"-")),n)}})):cr=bt();return cr},Cd=e=>PF().has(e),_l=e=>BF(no?Cb[e.toUpperCase().replaceAll("-","_")]:FF.getItem(e)),vb=e=>Cd("--"+e)||_l(e)!==null;vb("production");const VF=no&&HF(Cb.FORCE_COLOR,["true","1","2"]),jF=VF||!Cd("--no-colors")&&!vb("no-color")&&(!no||Bn.stdout.isTTY)&&(!no||Cd("--color")||_l("COLORTERM")!==null||(_l("TERM")||"").includes("color")),kb=e=>new Uint8Array(e),qF=(e,r,n)=>new Uint8Array(e,r,n),I4e=e=>new Uint8Array(e),UF=e=>{let r="";for(let n=0;n<e.byteLength;n++)r+=JM(e[n]);return btoa(r)},WF=e=>qd.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),KF=e=>{const r=atob(e),n=kb(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n},ZF=e=>{const r=qd.from(e,"base64");return qF(r.buffer,r.byteOffset,r.byteLength)},R4e=Bh?UF:WF,z4e=Bh?KF:ZF,GF=e=>{const r=kb(e.byteLength);return r.set(e),r};class JF{constructor(r,n){this.left=r,this.right=n}}const Nr=(e,r)=>new JF(e,r),XF=typeof document<"u"?document:{};typeof DOMParser<"u"&&new DOMParser;const QF=e=>qM(e,(r,n)=>"".concat(n,":").concat(r,";")).join(""),YF=e=>class{constructor(r){this._=r}destroy(){e(this._)}},e9=YF(clearTimeout),Mh=(e,r)=>new e9(setTimeout(r,e)),Wr=Symbol,wb=Wr(),Ab=Wr(),t9=Wr(),r9=Wr(),n9=Wr(),_b=Wr(),i9=Wr(),Fh=Wr(),o9=Wr(),s9=e=>{var o;e.length===1&&((o=e[0])==null?void 0:o.constructor)===Function&&(e=e[0]());const r=[],n=[];let i=0;for(;i<e.length;i++){const s=e[i];if(s===void 0)break;if(s.constructor===String||s.constructor===Number)r.push(s);else if(s.constructor===Object)break}for(i>0&&n.push(r.join(""));i<e.length;i++){const s=e[i];s instanceof Symbol||n.push(s)}return n},a9={[wb]:Nr("font-weight","bold"),[Ab]:Nr("font-weight","normal"),[t9]:Nr("color","blue"),[n9]:Nr("color","green"),[r9]:Nr("color","grey"),[_b]:Nr("color","red"),[i9]:Nr("color","purple"),[Fh]:Nr("color","orange"),[o9]:Nr("color","black")},l9=e=>{var a;e.length===1&&((a=e[0])==null?void 0:a.constructor)===Function&&(e=e[0]());const r=[],n=[],i=bt();let o=[],s=0;for(;s<e.length;s++){const l=e[s],u=a9[l];if(u!==void 0)i.set(u.left,u.right);else{if(l===void 0)break;if(l.constructor===String||l.constructor===Number){const c=QF(i);s>0||c.length>0?(r.push("%c"+l),n.push(c)):r.push(l)}else break}}for(s>0&&(o=n,o.unshift(r.join("")));s<e.length;s++){const l=e[s];l instanceof Symbol||o.push(l)}return o},Eb=jF?l9:s9,u9=(...e)=>{console.log(...Eb(e)),Db.forEach(r=>r.print(e))},xb=(...e)=>{console.warn(...Eb(e)),e.unshift(Fh),Db.forEach(r=>r.print(e))},Db=gn(),Sb=e=>({[Symbol.iterator](){return this},next:e}),c9=(e,r)=>Sb(()=>{let n;do n=e.next();while(!n.done&&!r(n.value));return n}),sc=(e,r)=>Sb(()=>{const{done:n,value:i}=e.next();return{done:n,value:n?void 0:r(i)}});class Nh{constructor(r,n){this.clock=r,this.len=n}}class co{constructor(){this.clients=new Map}}const yn=(e,r,n)=>r.clients.forEach((i,o)=>{const s=e.doc.store.clients.get(o);for(let a=0;a<i.length;a++){const l=i[a];Vb(e,s,l.clock,l.len,n)}}),d9=(e,r)=>{let n=0,i=e.length-1;for(;n<=i;){const o=Ur((n+i)/2),s=e[o],a=s.clock;if(a<=r){if(r<a+s.len)return o;n=o+1}else i=o-1}return null},ho=(e,r)=>{const n=e.clients.get(r.client);return n!==void 0&&d9(n,r.clock)!==null},Oh=e=>{e.clients.forEach(r=>{r.sort((o,s)=>o.clock-s.clock);let n,i;for(n=1,i=1;n<r.length;n++){const o=r[i-1],s=r[n];o.clock+o.len>=s.clock?o.len=ar(o.len,s.clock+s.len-o.clock):(i<n&&(r[i]=s),i++)}r.length=i})},vd=e=>{const r=new co;for(let n=0;n<e.length;n++)e[n].clients.forEach((i,o)=>{if(!r.clients.has(o)){const s=i.slice();for(let a=n+1;a<e.length;a++)WM(s,e[a].clients.get(o)||[]);r.clients.set(o,s)}});return Oh(r),r},ns=(e,r,n,i)=>{Sr(e.clients,r,()=>[]).push(new Nh(n,i))},Bb=()=>new co,Mb=e=>{const r=Bb();return e.clients.forEach((n,i)=>{const o=[];for(let s=0;s<n.length;s++){const a=n[s];if(a.deleted){const l=a.id.clock;let u=a.length;if(s+1<n.length)for(let c=n[s+1];s+1<n.length&&c.deleted;c=n[++s+1])u+=c.length;o.push(new Nh(l,u))}}o.length>0&&r.clients.set(i,o)}),r},po=(e,r)=>{me(e.restEncoder,r.clients.size),qr(r.clients.entries()).sort((n,i)=>i[0]-n[0]).forEach(([n,i])=>{e.resetDsCurVal(),me(e.restEncoder,n);const o=i.length;me(e.restEncoder,o);for(let s=0;s<o;s++){const a=i[s];e.writeDsClock(a.clock),e.writeDsLen(a.len)}})},Th=e=>{const r=new co,n=pe(e.restDecoder);for(let i=0;i<n;i++){e.resetDsCurVal();const o=pe(e.restDecoder),s=pe(e.restDecoder);if(s>0){const a=Sr(r.clients,o,()=>[]);for(let l=0;l<s;l++)a.push(new Nh(e.readDsClock(),e.readDsLen()))}}return r},pf=(e,r,n)=>{const i=new co,o=pe(e.restDecoder);for(let s=0;s<o;s++){e.resetDsCurVal();const a=pe(e.restDecoder),l=pe(e.restDecoder),u=n.clients.get(a)||[],c=qe(n,a);for(let d=0;d<l;d++){const h=e.readDsClock(),p=h+e.readDsLen();if(h<c){c<p&&ns(i,a,c,p-c);let f=xr(u,h),m=u[f];for(!m.deleted&&m.id.clock<h&&(u.splice(f+1,0,Fl(r,m,h-m.id.clock)),f++);f<u.length&&(m=u[f++],m.id.clock<p);)m.deleted||(p<m.id.clock+m.length&&u.splice(f,0,Fl(r,m,p-m.id.clock)),m.delete(r))}else ns(i,a,h,p-h)}}if(i.clients.size>0){const s=new Yn;return me(s.restEncoder,0),po(s,i),s.toUint8Array()}return null},Fb=mb;class fo extends cb{constructor({guid:r=DF(),collectionid:n=null,gc:i=!0,gcFilter:o=()=>!0,meta:s=null,autoLoad:a=!1,shouldLoad:l=!0}={}){super(),this.gc=i,this.gcFilter=o,this.clientID=Fb(),this.guid=r,this.collectionid=n,this.share=new Map,this.store=new Hb,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=l,this.autoLoad=a,this.meta=s,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=cf(c=>{this.on("load",()=>{this.isLoaded=!0,c(this)})});const u=()=>cf(c=>{const d=h=>{(h===void 0||h===!0)&&(this.off("sync",d),c())};this.on("sync",d)});this.on("sync",c=>{c===!1&&this.isSynced&&(this.whenSynced=u()),this.isSynced=c===void 0||c===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=u()}load(){const r=this._item;r!==null&&!this.shouldLoad&&Be(r.parent.doc,n=>{n.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(qr(this.subdocs).map(r=>r.guid))}transact(r,n=null){return Be(this,r,n)}get(r,n=at){const i=Sr(this.share,r,()=>{const s=new n;return s._integrate(this,null),s}),o=i.constructor;if(n!==at&&o!==n)if(o===at){const s=new n;s._map=i._map,i._map.forEach(a=>{for(;a!==null;a=a.left)a.parent=s}),s._start=i._start;for(let a=s._start;a!==null;a=a.right)a.parent=s;return s._length=i._length,this.share.set(r,s),s._integrate(this,null),s}else throw new Error("Type with the name ".concat(r," has already been defined with a different constructor"));return i}getArray(r=""){return this.get(r,ji)}getText(r=""){return this.get(r,ei)}getMap(r=""){return this.get(r,oo)}getXmlElement(r=""){return this.get(r,At)}getXmlFragment(r=""){return this.get(r,Cn)}toJSON(){const r={};return this.share.forEach((n,i)=>{r[i]=n.toJSON()}),r}destroy(){this.isDestroyed=!0,qr(this.subdocs).forEach(n=>n.destroy());const r=this._item;if(r!==null){this._item=null;const n=r.content;n.doc=new fo({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=r,Be(r.parent.doc,i=>{const o=n.doc;r.deleted||i.subdocsAdded.add(o),i.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class Nb{constructor(r){this.restDecoder=r}resetDsCurVal(){}readDsClock(){return pe(this.restDecoder)}readDsLen(){return pe(this.restDecoder)}}class Ob extends Nb{readLeftID(){return ue(pe(this.restDecoder),pe(this.restDecoder))}readRightID(){return ue(pe(this.restDecoder),pe(this.restDecoder))}readClient(){return pe(this.restDecoder)}readInfo(){return ro(this.restDecoder)}readString(){return Hi(this.restDecoder)}readParentInfo(){return pe(this.restDecoder)===1}readTypeRef(){return pe(this.restDecoder)}readLen(){return pe(this.restDecoder)}readAny(){return rs(this.restDecoder)}readBuf(){return GF(Bt(this.restDecoder))}readJSON(){return JSON.parse(Hi(this.restDecoder))}readKey(){return Hi(this.restDecoder)}}class h9{constructor(r){this.dsCurrVal=0,this.restDecoder=r}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=pe(this.restDecoder),this.dsCurrVal}readDsLen(){const r=pe(this.restDecoder)+1;return this.dsCurrVal+=r,r}}class io extends h9{constructor(r){super(r),this.keys=[],pe(r),this.keyClockDecoder=new ic(Bt(r)),this.clientDecoder=new Ea(Bt(r)),this.leftClockDecoder=new ic(Bt(r)),this.rightClockDecoder=new ic(Bt(r)),this.infoDecoder=new uf(Bt(r),ro),this.stringDecoder=new wF(Bt(r)),this.parentInfoDecoder=new uf(Bt(r),ro),this.typeRefDecoder=new Ea(Bt(r)),this.lenDecoder=new Ea(Bt(r))}readLeftID(){return new Pi(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Pi(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return rs(this.restDecoder)}readBuf(){return Bt(this.restDecoder)}readJSON(){return rs(this.restDecoder)}readKey(){const r=this.keyClockDecoder.read();if(r<this.keys.length)return this.keys[r];{const n=this.stringDecoder.read();return this.keys.push(n),n}}}class Tb{constructor(){this.restEncoder=du()}toUint8Array(){return yr(this.restEncoder)}resetDsCurVal(){}writeDsClock(r){me(this.restEncoder,r)}writeDsLen(r){me(this.restEncoder,r)}}class Ns extends Tb{writeLeftID(r){me(this.restEncoder,r.client),me(this.restEncoder,r.clock)}writeRightID(r){me(this.restEncoder,r.client),me(this.restEncoder,r.clock)}writeClient(r){me(this.restEncoder,r)}writeInfo(r){bd(this.restEncoder,r)}writeString(r){$i(this.restEncoder,r)}writeParentInfo(r){me(this.restEncoder,r?1:0)}writeTypeRef(r){me(this.restEncoder,r)}writeLen(r){me(this.restEncoder,r)}writeAny(r){ts(this.restEncoder,r)}writeBuf(r){St(this.restEncoder,r)}writeJSON(r){$i(this.restEncoder,JSON.stringify(r))}writeKey(r){$i(this.restEncoder,r)}}class Lb{constructor(){this.restEncoder=du(),this.dsCurrVal=0}toUint8Array(){return yr(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(r){const n=r-this.dsCurrVal;this.dsCurrVal=r,me(this.restEncoder,n)}writeDsLen(r){r===0&&Lt(),me(this.restEncoder,r-1),this.dsCurrVal+=r}}class Yn extends Lb{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new nc,this.clientEncoder=new _a,this.leftClockEncoder=new nc,this.rightClockEncoder=new nc,this.infoEncoder=new sf(bd),this.stringEncoder=new pF,this.parentInfoEncoder=new sf(bd),this.typeRefEncoder=new _a,this.lenEncoder=new _a}toUint8Array(){const r=du();return me(r,0),St(r,this.keyClockEncoder.toUint8Array()),St(r,this.clientEncoder.toUint8Array()),St(r,this.leftClockEncoder.toUint8Array()),St(r,this.rightClockEncoder.toUint8Array()),St(r,yr(this.infoEncoder)),St(r,this.stringEncoder.toUint8Array()),St(r,yr(this.parentInfoEncoder)),St(r,this.typeRefEncoder.toUint8Array()),St(r,this.lenEncoder.toUint8Array()),hu(r,yr(this.restEncoder)),yr(r)}writeLeftID(r){this.clientEncoder.write(r.client),this.leftClockEncoder.write(r.clock)}writeRightID(r){this.clientEncoder.write(r.client),this.rightClockEncoder.write(r.clock)}writeClient(r){this.clientEncoder.write(r)}writeInfo(r){this.infoEncoder.write(r)}writeString(r){this.stringEncoder.write(r)}writeParentInfo(r){this.parentInfoEncoder.write(r?1:0)}writeTypeRef(r){this.typeRefEncoder.write(r)}writeLen(r){this.lenEncoder.write(r)}writeAny(r){ts(this.restEncoder,r)}writeBuf(r){St(this.restEncoder,r)}writeJSON(r){ts(this.restEncoder,r)}writeKey(r){const n=this.keyMap.get(r);n===void 0?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(r)):this.keyClockEncoder.write(n)}}const p9=(e,r,n,i)=>{i=ar(i,r[0].id.clock);const o=xr(r,i);me(e.restEncoder,r.length-o),e.writeClient(n),me(e.restEncoder,i);const s=r[o];s.write(e,i-s.id.clock);for(let a=o+1;a<r.length;a++)r[a].write(e,0)},Lh=(e,r,n)=>{const i=new Map;n.forEach((o,s)=>{qe(r,s)>o&&i.set(s,o)}),Os(r).forEach((o,s)=>{n.has(s)||i.set(s,0)}),me(e.restEncoder,i.size),qr(i.entries()).sort((o,s)=>s[0]-o[0]).forEach(([o,s])=>{p9(e,r.clients.get(o),o,s)})},f9=(e,r)=>{const n=bt(),i=pe(e.restDecoder);for(let o=0;o<i;o++){const s=pe(e.restDecoder),a=new Array(s),l=e.readClient();let u=pe(e.restDecoder);n.set(l,{i:0,refs:a});for(let c=0;c<s;c++){const d=e.readInfo();switch(cu&d){case 0:{const h=e.readLen();a[c]=new qt(ue(l,u),h),u+=h;break}case 10:{const h=pe(e.restDecoder);a[c]=new Ut(ue(l,u),h),u+=h;break}default:{const h=(d&(Hr|Ot))===0,p=new Se(ue(l,u),null,(d&Ot)===Ot?e.readLeftID():null,null,(d&Hr)===Hr?e.readRightID():null,h?e.readParentInfo()?r.get(e.readString()):e.readLeftID():null,h&&(d&Yo)===Yo?e.readString():null,uy(e,d));a[c]=p,u+=p.length}}}}return n},m9=(e,r,n)=>{const i=[];let o=qr(n.keys()).sort((f,m)=>f-m);if(o.length===0)return null;const s=()=>{if(o.length===0)return null;let f=n.get(o[o.length-1]);for(;f.refs.length===f.i;)if(o.pop(),o.length>0)f=n.get(o[o.length-1]);else return null;return f};let a=s();if(a===null)return null;const l=new Hb,u=new Map,c=(f,m)=>{const b=u.get(f);(b==null||b>m)&&u.set(f,m)};let d=a.refs[a.i++];const h=new Map,p=()=>{for(const f of i){const m=f.id.client,b=n.get(m);b?(b.i--,l.clients.set(m,b.refs.slice(b.i)),n.delete(m),b.i=0,b.refs=[]):l.clients.set(m,[f]),o=o.filter(g=>g!==m)}i.length=0};for(;;){if(d.constructor!==Ut){const f=Sr(h,d.id.client,()=>qe(r,d.id.client))-d.id.clock;if(f<0)i.push(d),c(d.id.client,d.id.clock-1),p();else{const m=d.getMissing(e,r);if(m!==null){i.push(d);const b=n.get(m)||{refs:[],i:0};if(b.refs.length===b.i)c(m,qe(r,m)),p();else{d=b.refs[b.i++];continue}}else(f===0||f<d.length)&&(d.integrate(e,f),h.set(d.id.client,d.id.clock+d.length))}}if(i.length>0)d=i.pop();else if(a!==null&&a.i<a.refs.length)d=a.refs[a.i++];else{if(a=s(),a===null)break;d=a.refs[a.i++]}}if(l.clients.size>0){const f=new Yn;return Lh(f,l,new Map),me(f.restEncoder,0),{missing:u,update:f.toUint8Array()}}return null},g9=(e,r)=>Lh(e,r.doc.store,r.beforeState),b9=(e,r,n,i=new io(e))=>Be(r,o=>{o.local=!1;let s=!1;const a=o.doc,l=a.store,u=f9(i,a),c=m9(o,l,u),d=l.pendingStructs;if(d){for(const[p,f]of d.missing)if(f<qe(l,p)){s=!0;break}if(c){for(const[p,f]of c.missing){const m=d.missing.get(p);(m==null||m>f)&&d.missing.set(p,f)}d.update=xl([d.update,c.update])}}else l.pendingStructs=c;const h=pf(i,o,l);if(l.pendingDs){const p=new io(ai(l.pendingDs));pe(p.restDecoder);const f=pf(p,o,l);h&&f?l.pendingDs=xl([h,f]):l.pendingDs=h||f}else l.pendingDs=h;if(s){const p=l.pendingStructs.update;l.pendingStructs=null,El(o.doc,p)}},n,!1),El=(e,r,n,i=io)=>{const o=ai(r);b9(o,e,n,new i(o))},$4e=(e,r,n)=>El(e,r,n,Ob),y9=(e,r,n=new Map)=>{Lh(e,r.store,n),po(e,Mb(r.store))},C9=(e,r=new Uint8Array([0]),n=new Yn)=>{const i=Ib(r);y9(n,e,i);const o=[n.toUint8Array()];if(e.store.pendingDs&&o.push(e.store.pendingDs),e.store.pendingStructs&&o.push(R9(e.store.pendingStructs.update,r)),o.length>1){if(n.constructor===Ns)return L9(o.map((s,a)=>a===0?s:$9(s)));if(n.constructor===Yn)return xl(o)}return o[0]},H4e=(e,r)=>C9(e,r,new Ns),v9=e=>{const r=new Map,n=pe(e.restDecoder);for(let i=0;i<n;i++){const o=pe(e.restDecoder),s=pe(e.restDecoder);r.set(o,s)}return r},Ib=e=>v9(new Nb(ai(e))),Rb=(e,r)=>(me(e.restEncoder,r.size),qr(r.entries()).sort((n,i)=>i[0]-n[0]).forEach(([n,i])=>{me(e.restEncoder,n),me(e.restEncoder,i)}),e),k9=(e,r)=>Rb(e,Os(r.store)),w9=(e,r=new Lb)=>(e instanceof Map?Rb(r,e):k9(r,e),r.toUint8Array()),P4e=e=>w9(e,new Tb);class A9{constructor(){this.l=[]}}const ff=()=>new A9,mf=(e,r)=>e.l.push(r),gf=(e,r)=>{const n=e.l,i=n.length;e.l=n.filter(o=>r!==o),i===e.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},zb=(e,r,n)=>Sh(e.l,[r,n]);class Pi{constructor(r,n){this.client=r,this.clock=n}}const Fi=(e,r)=>e===r||e!==null&&r!==null&&e.client===r.client&&e.clock===r.clock,ue=(e,r)=>new Pi(e,r),is=e=>{for(const[r,n]of e.doc.share.entries())if(n===e)return r;throw Lt()},ss=(e,r)=>{for(;r!==null;){if(r.parent===e)return!0;r=r.parent._item}return!1};class as{constructor(r,n,i,o=0){this.type=r,this.tname=n,this.item=i,this.assoc=o}}const Po=e=>{var r;return new as(e.type==null?null:ue(e.type.client,e.type.clock),(r=e.tname)!=null?r:null,e.item==null?null:ue(e.item.client,e.item.clock),e.assoc==null?0:e.assoc)};class _9{constructor(r,n,i=0){this.type=r,this.index=n,this.assoc=i}}const E9=(e,r,n=0)=>new _9(e,r,n),Gs=(e,r,n)=>{let i=null,o=null;return e._item===null?o=is(e):i=ue(e._item.id.client,e._item.id.clock),new as(i,o,r,n)},ac=(e,r,n=0)=>{let i=e._start;if(n<0){if(r===0)return Gs(e,null,n);r--}for(;i!==null;){if(!i.deleted&&i.countable){if(i.length>r)return Gs(e,ue(i.id.client,i.id.clock+r),n);r-=i.length}if(i.right===null&&n<0)return Gs(e,i.lastId,n);i=i.right}return Gs(e,null,n)},x9=(e,r,n=!0)=>{const i=r.store,o=e.item,s=e.type,a=e.tname,l=e.assoc;let u=null,c=0;if(o!==null){if(qe(i,o.client)<=o.clock)return null;const d=n?_d(i,o):{item:Vi(i,o),diff:0},h=d.item;if(!(h instanceof Se))return null;if(u=h.parent,u._item===null||!u._item.deleted){c=h.deleted||!h.countable?0:d.diff+(l>=0?0:1);let p=h.left;for(;p!==null;)!p.deleted&&p.countable&&(c+=p.length),p=p.left}}else{if(a!==null)u=r.get(a);else if(s!==null){if(qe(i,s.client)<=s.clock)return null;const{item:d}=n?_d(i,s):{item:Vi(i,s)};if(d instanceof Se&&d.content instanceof Br)u=d.content.type;else return null}else throw Lt();l>=0?c=u._length:c=0}return E9(u,c,e.assoc)},bf=(e,r)=>e===r||e!==null&&r!==null&&e.tname===r.tname&&Fi(e.item,r.item)&&Fi(e.type,r.type)&&e.assoc===r.assoc;class Ih{constructor(r,n){this.ds=r,this.sv=n}}const $b=(e,r)=>new Ih(e,r),lc=e=>$b(Mb(e.store),Os(e.store)),Nn=(e,r)=>r===void 0?!e.deleted:r.sv.has(e.id.client)&&(r.sv.get(e.id.client)||0)>e.id.clock&&!ho(r.ds,e.id),kd=(e,r)=>{const n=Sr(e.meta,kd,gn),i=e.doc.store;n.has(r)||(r.sv.forEach((o,s)=>{o<qe(i,s)&&wt(e,ue(s,o))}),yn(e,r.ds,o=>{}),n.add(r))};class Hb{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const Os=e=>{const r=new Map;return e.clients.forEach((n,i)=>{const o=n[n.length-1];r.set(i,o.id.clock+o.length)}),r},qe=(e,r)=>{const n=e.clients.get(r);if(n===void 0)return 0;const i=n[n.length-1];return i.id.clock+i.length},Pb=(e,r)=>{let n=e.clients.get(r.id.client);if(n===void 0)n=[],e.clients.set(r.id.client,n);else{const i=n[n.length-1];if(i.id.clock+i.length!==r.id.clock)throw Lt()}n.push(r)},xr=(e,r)=>{let n=0,i=e.length-1,o=e[i],s=o.id.clock;if(s===r)return i;let a=Ur(r/(s+o.length-1)*i);for(;n<=i;){if(o=e[a],s=o.id.clock,s<=r){if(r<s+o.length)return a;n=a+1}else i=a-1;a=Ur((n+i)/2)}throw Lt()},D9=(e,r)=>{const n=e.clients.get(r.client);return n[xr(n,r.clock)]},Vi=D9,wd=(e,r,n)=>{const i=xr(r,n),o=r[i];return o.id.clock<n&&o instanceof Se?(r.splice(i+1,0,Fl(e,o,n-o.id.clock)),i+1):i},wt=(e,r)=>{const n=e.doc.store.clients.get(r.client);return n[wd(e,n,r.clock)]},yf=(e,r,n)=>{const i=r.clients.get(n.client),o=xr(i,n.clock),s=i[o];return n.clock!==s.id.clock+s.length-1&&s.constructor!==qt&&i.splice(o+1,0,Fl(e,s,n.clock-s.id.clock+1)),s},S9=(e,r,n)=>{const i=e.clients.get(r.id.client);i[xr(i,r.id.clock)]=n},Vb=(e,r,n,i,o)=>{if(i===0)return;const s=n+i;let a=wd(e,r,n),l;do l=r[a++],s<l.id.clock+l.length&&wd(e,r,s),o(l);while(a<r.length&&r[a].id.clock<s)};class B9{constructor(r,n,i){this.doc=r,this.deleteSet=new co,this.beforeState=Os(r.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=n,this.meta=new Map,this.local=i,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}}const Cf=(e,r)=>r.deleteSet.clients.size===0&&!UM(r.afterState,(n,i)=>r.beforeState.get(i)!==n)?!1:(Oh(r.deleteSet),g9(e,r),po(e,r.deleteSet),!0),vf=(e,r,n)=>{const i=r._item;(i===null||i.id.clock<(e.beforeState.get(i.id.client)||0)&&!i.deleted)&&Sr(e.changed,r,gn).add(n)},xa=(e,r)=>{let n=e[r],i=e[r-1],o=r;for(;o>0;n=i,i=e[--o-1]){if(i.deleted===n.deleted&&i.constructor===n.constructor&&i.mergeWith(n)){n instanceof Se&&n.parentSub!==null&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,i);continue}break}const s=r-o;return s&&e.splice(r+1-s,s),s},M9=(e,r,n)=>{for(const[i,o]of e.clients.entries()){const s=r.clients.get(i);for(let a=o.length-1;a>=0;a--){const l=o[a],u=l.clock+l.len;for(let c=xr(s,l.clock),d=s[c];c<s.length&&d.id.clock<u;d=s[++c]){const h=s[c];if(l.clock+l.len<=h.id.clock)break;h instanceof Se&&h.deleted&&!h.keep&&n(h)&&h.gc(r,!1)}}}},F9=(e,r)=>{e.clients.forEach((n,i)=>{const o=r.clients.get(i);for(let s=n.length-1;s>=0;s--){const a=n[s],l=$r(o.length-1,1+xr(o,a.clock+a.len-1));for(let u=l,c=o[u];u>0&&c.id.clock>=a.clock;c=o[u])u-=1+xa(o,u)}})},jb=(e,r)=>{if(r<e.length){const n=e[r],i=n.doc,o=i.store,s=n.deleteSet,a=n._mergeStructs;try{Oh(s),n.afterState=Os(n.doc.store),i.emit("beforeObserverCalls",[n,i]);const l=[];n.changed.forEach((u,c)=>l.push(()=>{(c._item===null||!c._item.deleted)&&c._callObserver(n,u)})),l.push(()=>{n.changedParentTypes.forEach((u,c)=>{c._dEH.l.length>0&&(c._item===null||!c._item.deleted)&&(u=u.filter(d=>d.target._item===null||!d.target._item.deleted),u.forEach(d=>{d.currentTarget=c,d._path=null}),u.sort((d,h)=>d.path.length-h.path.length),zb(c._dEH,u,n))})}),l.push(()=>i.emit("afterTransaction",[n,i])),Sh(l,[]),n._needFormattingCleanup&&Y9(n)}finally{i.gc&&M9(s,o,i.gcFilter),F9(s,o),n.afterState.forEach((d,h)=>{const p=n.beforeState.get(h)||0;if(p!==d){const f=o.clients.get(h),m=ar(xr(f,p),1);for(let b=f.length-1;b>=m;)b-=1+xa(f,b)}});for(let d=a.length-1;d>=0;d--){const{client:h,clock:p}=a[d].id,f=o.clients.get(h),m=xr(f,p);m+1<f.length&&xa(f,m+1)>1||m>0&&xa(f,m)}if(!n.local&&n.afterState.get(i.clientID)!==n.beforeState.get(i.clientID)&&(u9(Fh,wb,"[yjs] ",Ab,_b,"Changed the client-id because another client seems to be using it."),i.clientID=Fb()),i.emit("afterTransactionCleanup",[n,i]),i._observers.has("update")){const d=new Ns;Cf(d,n)&&i.emit("update",[d.toUint8Array(),n.origin,i,n])}if(i._observers.has("updateV2")){const d=new Yn;Cf(d,n)&&i.emit("updateV2",[d.toUint8Array(),n.origin,i,n])}const{subdocsAdded:l,subdocsLoaded:u,subdocsRemoved:c}=n;(l.size>0||c.size>0||u.size>0)&&(l.forEach(d=>{d.clientID=i.clientID,d.collectionid==null&&(d.collectionid=i.collectionid),i.subdocs.add(d)}),c.forEach(d=>i.subdocs.delete(d)),i.emit("subdocs",[{loaded:u,added:l,removed:c},i,n]),c.forEach(d=>d.destroy())),e.length<=r+1?(i._transactionCleanups=[],i.emit("afterAllTransactions",[i,e])):jb(e,r+1)}}},Be=(e,r,n=null,i=!0)=>{const o=e._transactionCleanups;let s=!1,a=null;e._transaction===null&&(s=!0,e._transaction=new B9(e,n,i),o.push(e._transaction),o.length===1&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{a=r(e._transaction)}finally{if(s){const l=e._transaction===o[0];e._transaction=null,l&&jb(o,0)}}return a};class N9{constructor(r,n){this.insertions=n,this.deletions=r,this.meta=new Map}}const kf=(e,r,n)=>{yn(e,n.deletions,i=>{i instanceof Se&&r.scope.some(o=>ss(o,i))&&qh(i,!1)})},wf=(e,r,n)=>{let i=null;const o=e.doc,s=e.scope;Be(o,l=>{for(;r.length>0&&e.currStackItem===null;){const u=o.store,c=r.pop(),d=new Set,h=[];let p=!1;yn(l,c.insertions,f=>{if(f instanceof Se){if(f.redone!==null){let{item:m,diff:b}=_d(u,f.id);b>0&&(m=wt(l,ue(m.id.client,m.id.clock+b))),f=m}!f.deleted&&s.some(m=>ss(m,f))&&h.push(f)}}),yn(l,c.deletions,f=>{f instanceof Se&&s.some(m=>ss(m,f))&&!ho(c.insertions,f.id)&&d.add(f)}),d.forEach(f=>{p=ly(l,f,d,c.insertions,e.ignoreRemoteMapChanges,e)!==null||p});for(let f=h.length-1;f>=0;f--){const m=h[f];e.deleteFilter(m)&&(m.delete(l),p=!0)}e.currStackItem=p?c:null}l.changed.forEach((u,c)=>{u.has(null)&&c._searchMarker&&(c._searchMarker.length=0)}),i=l},e);const a=e.currStackItem;if(a!=null){const l=i.changedParentTypes;e.emit("stack-item-popped",[{stackItem:a,type:n,changedParentTypes:l,origin:e},e]),e.currStackItem=null}return a};class O9 extends cb{constructor(r,{captureTimeout:n=500,captureTransaction:i=u=>!0,deleteFilter:o=()=>!0,trackedOrigins:s=new Set([null]),ignoreRemoteMapChanges:a=!1,doc:l=md(r)?r[0].doc:r.doc}={}){super(),this.scope=[],this.doc=l,this.addToScope(r),this.deleteFilter=o,s.add(this),this.trackedOrigins=s,this.captureTransaction=i,this.undoStack=[],this.redoStack=[],this.undoing=!1,this.redoing=!1,this.currStackItem=null,this.lastChange=0,this.ignoreRemoteMapChanges=a,this.captureTimeout=n,this.afterTransactionHandler=u=>{if(!this.captureTransaction(u)||!this.scope.some(g=>u.changedParentTypes.has(g))||!this.trackedOrigins.has(u.origin)&&(!u.origin||!this.trackedOrigins.has(u.origin.constructor)))return;const c=this.undoing,d=this.redoing,h=c?this.redoStack:this.undoStack;c?this.stopCapturing():d||this.clear(!1,!0);const p=new co;u.afterState.forEach((g,y)=>{const v=u.beforeState.get(y)||0,k=g-v;k>0&&ns(p,y,v,k)});const f=SF();let m=!1;if(this.lastChange>0&&f-this.lastChange<this.captureTimeout&&h.length>0&&!c&&!d){const g=h[h.length-1];g.deletions=vd([g.deletions,u.deleteSet]),g.insertions=vd([g.insertions,p])}else h.push(new N9(u.deleteSet,p)),m=!0;!c&&!d&&(this.lastChange=f),yn(u,u.deleteSet,g=>{g instanceof Se&&this.scope.some(y=>ss(y,g))&&qh(g,!0)});const b=[{stackItem:h[h.length-1],origin:u.origin,type:c?"redo":"undo",changedParentTypes:u.changedParentTypes},this];m?this.emit("stack-item-added",b):this.emit("stack-item-updated",b)},this.doc.on("afterTransaction",this.afterTransactionHandler),this.doc.on("destroy",()=>{this.destroy()})}addToScope(r){r=md(r)?r:[r],r.forEach(n=>{this.scope.every(i=>i!==n)&&(n.doc!==this.doc&&xb("[yjs#509] Not same Y.Doc"),this.scope.push(n))})}addTrackedOrigin(r){this.trackedOrigins.add(r)}removeTrackedOrigin(r){this.trackedOrigins.delete(r)}clear(r=!0,n=!0){(r&&this.canUndo()||n&&this.canRedo())&&this.doc.transact(i=>{r&&(this.undoStack.forEach(o=>kf(i,this,o)),this.undoStack=[]),n&&(this.redoStack.forEach(o=>kf(i,this,o)),this.redoStack=[]),this.emit("stack-cleared",[{undoStackCleared:r,redoStackCleared:n}])})}stopCapturing(){this.lastChange=0}undo(){this.undoing=!0;let r;try{r=wf(this,this.undoStack,"undo")}finally{this.undoing=!1}return r}redo(){this.redoing=!0;let r;try{r=wf(this,this.redoStack,"redo")}finally{this.redoing=!1}return r}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.trackedOrigins.delete(this),this.doc.off("afterTransaction",this.afterTransactionHandler),super.destroy()}}function*T9(e){const r=pe(e.restDecoder);for(let n=0;n<r;n++){const i=pe(e.restDecoder),o=e.readClient();let s=pe(e.restDecoder);for(let a=0;a<i;a++){const l=e.readInfo();if(l===10){const u=pe(e.restDecoder);yield new Ut(ue(o,s),u),s+=u}else if(cu&l){const u=(l&(Hr|Ot))===0,c=new Se(ue(o,s),null,(l&Ot)===Ot?e.readLeftID():null,null,(l&Hr)===Hr?e.readRightID():null,u?e.readParentInfo()?e.readString():e.readLeftID():null,u&&(l&Yo)===Yo?e.readString():null,uy(e,l));yield c,s+=c.length}else{const u=e.readLen();yield new qt(ue(o,s),u),s+=u}}}}class Rh{constructor(r,n){this.gen=T9(r),this.curr=null,this.done=!1,this.filterSkips=n,this.next()}next(){do this.curr=this.gen.next().value||null;while(this.filterSkips&&this.curr!==null&&this.curr.constructor===Ut);return this.curr}}class zh{constructor(r){this.currClient=0,this.startClock=0,this.written=0,this.encoder=r,this.clientStructs=[]}}const L9=e=>xl(e,Ob,Ns),I9=(e,r)=>{if(e.constructor===qt){const{client:n,clock:i}=e.id;return new qt(ue(n,i+r),e.length-r)}else if(e.constructor===Ut){const{client:n,clock:i}=e.id;return new Ut(ue(n,i+r),e.length-r)}else{const n=e,{client:i,clock:o}=n.id;return new Se(ue(i,o+r),null,ue(i,o+r-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(r))}},xl=(e,r=io,n=Yn)=>{if(e.length===1)return e[0];const i=e.map(d=>new r(ai(d)));let o=i.map(d=>new Rh(d,!0)),s=null;const a=new n,l=new zh(a);for(;o=o.filter(d=>d.curr!==null),o.sort((d,h)=>{if(d.curr.id.client===h.curr.id.client){const p=d.curr.id.clock-h.curr.id.clock;return p===0?d.curr.constructor===h.curr.constructor?0:d.curr.constructor===Ut?1:-1:p}else return h.curr.id.client-d.curr.id.client}),o.length!==0;){const d=o[0],h=d.curr.id.client;if(s!==null){let p=d.curr,f=!1;for(;p!==null&&p.id.clock+p.length<=s.struct.id.clock+s.struct.length&&p.id.client>=s.struct.id.client;)p=d.next(),f=!0;if(p===null||p.id.client!==h||f&&p.id.clock>s.struct.id.clock+s.struct.length)continue;if(h!==s.struct.id.client)Xr(l,s.struct,s.offset),s={struct:p,offset:0},d.next();else if(s.struct.id.clock+s.struct.length<p.id.clock)if(s.struct.constructor===Ut)s.struct.length=p.id.clock+p.length-s.struct.id.clock;else{Xr(l,s.struct,s.offset);const m=p.id.clock-s.struct.id.clock-s.struct.length;s={struct:new Ut(ue(h,s.struct.id.clock+s.struct.length),m),offset:0}}else{const m=s.struct.id.clock+s.struct.length-p.id.clock;m>0&&(s.struct.constructor===Ut?s.struct.length-=m:p=I9(p,m)),s.struct.mergeWith(p)||(Xr(l,s.struct,s.offset),s={struct:p,offset:0},d.next())}}else s={struct:d.curr,offset:0},d.next();for(let p=d.curr;p!==null&&p.id.client===h&&p.id.clock===s.struct.id.clock+s.struct.length&&p.constructor!==Ut;p=d.next())Xr(l,s.struct,s.offset),s={struct:p,offset:0}}s!==null&&(Xr(l,s.struct,s.offset),s=null),$h(l);const u=i.map(d=>Th(d)),c=vd(u);return po(a,c),a.toUint8Array()},R9=(e,r,n=io,i=Yn)=>{const o=Ib(r),s=new i,a=new zh(s),l=new n(ai(e)),u=new Rh(l,!1);for(;u.curr;){const d=u.curr,h=d.id.client,p=o.get(h)||0;if(u.curr.constructor===Ut){u.next();continue}if(d.id.clock+d.length>p)for(Xr(a,d,ar(p-d.id.clock,0)),u.next();u.curr&&u.curr.id.client===h;)Xr(a,u.curr,0),u.next();else for(;u.curr&&u.curr.id.client===h&&u.curr.id.clock+u.curr.length<=p;)u.next()}$h(a);const c=Th(l);return po(s,c),s.toUint8Array()},qb=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:yr(e.encoder.restEncoder)}),e.encoder.restEncoder=du(),e.written=0)},Xr=(e,r,n)=>{e.written>0&&e.currClient!==r.id.client&&qb(e),e.written===0&&(e.currClient=r.id.client,e.encoder.writeClient(r.id.client),me(e.encoder.restEncoder,r.id.clock+n)),r.write(e.encoder,n),e.written++},$h=e=>{qb(e);const r=e.encoder.restEncoder;me(r,e.clientStructs.length);for(let n=0;n<e.clientStructs.length;n++){const i=e.clientStructs[n];me(r,i.written),hu(r,i.restEncoder)}},z9=(e,r,n,i)=>{const o=new n(ai(e)),s=new Rh(o,!1),a=new i,l=new zh(a);for(let c=s.curr;c!==null;c=s.next())Xr(l,r(c),0);$h(l);const u=Th(o);return po(a,u),a.toUint8Array()},$9=e=>z9(e,zF,io,Ns),Af="You must not compute changes after the event-handler fired.";class fu{constructor(r,n){this.target=r,this.currentTarget=r,this.transaction=n,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=H9(this.currentTarget,this.target))}deletes(r){return ho(this.transaction.deleteSet,r.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw bn(Af);const r=new Map,n=this.target;this.transaction.changed.get(n).forEach(i=>{if(i!==null){const o=n._map.get(i);let s,a;if(this.adds(o)){let l=o.left;for(;l!==null&&this.adds(l);)l=l.left;if(this.deletes(o))if(l!==null&&this.deletes(l))s="delete",a=ec(l.content.getContent());else return;else l!==null&&this.deletes(l)?(s="update",a=ec(l.content.getContent())):(s="add",a=void 0)}else if(this.deletes(o))s="delete",a=ec(o.content.getContent());else return;r.set(i,{action:s,oldValue:a})}}),this._keys=r}return this._keys}get delta(){return this.changes.delta}adds(r){return r.id.clock>=(this.transaction.beforeState.get(r.id.client)||0)}get changes(){let r=this._changes;if(r===null){if(this.transaction.doc._transactionCleanups.length===0)throw bn(Af);const n=this.target,i=gn(),o=gn(),s=[];if(r={added:i,deleted:o,delta:s,keys:this.keys},this.transaction.changed.get(n).has(null)){let a=null;const l=()=>{a&&s.push(a)};for(let u=n._start;u!==null;u=u.right)u.deleted?this.deletes(u)&&!this.adds(u)&&((a===null||a.delete===void 0)&&(l(),a={delete:0}),a.delete+=u.length,o.add(u)):this.adds(u)?((a===null||a.insert===void 0)&&(l(),a={insert:[]}),a.insert=a.insert.concat(u.content.getContent()),i.add(u)):((a===null||a.retain===void 0)&&(l(),a={retain:0}),a.retain+=u.length);a!==null&&a.retain===void 0&&l()}this._changes=r}return r}}const H9=(e,r)=>{const n=[];for(;r._item!==null&&r!==e;){if(r._item.parentSub!==null)n.unshift(r._item.parentSub);else{let i=0,o=r._item.parent._start;for(;o!==r._item&&o!==null;)!o.deleted&&o.countable&&(i+=o.length),o=o.right;n.unshift(i)}r=r._item.parent}return n},ct=()=>{xb("Invalid access: Add Yjs type to a document before reading data.")},Ub=80;let Hh=0;class P9{constructor(r,n){r.marker=!0,this.p=r,this.index=n,this.timestamp=Hh++}}const V9=e=>{e.timestamp=Hh++},Wb=(e,r,n)=>{e.p.marker=!1,e.p=r,r.marker=!0,e.index=n,e.timestamp=Hh++},j9=(e,r,n)=>{if(e.length>=Ub){const i=e.reduce((o,s)=>o.timestamp<s.timestamp?o:s);return Wb(i,r,n),i}else{const i=new P9(r,n);return e.push(i),i}},mu=(e,r)=>{if(e._start===null||r===0||e._searchMarker===null)return null;const n=e._searchMarker.length===0?null:e._searchMarker.reduce((s,a)=>Aa(r-s.index)<Aa(r-a.index)?s:a);let i=e._start,o=0;for(n!==null&&(i=n.p,o=n.index,V9(n));i.right!==null&&o<r;){if(!i.deleted&&i.countable){if(r<o+i.length)break;o+=i.length}i=i.right}for(;i.left!==null&&o>r;)i=i.left,!i.deleted&&i.countable&&(o-=i.length);for(;i.left!==null&&i.left.id.client===i.id.client&&i.left.id.clock+i.left.length===i.id.clock;)i=i.left,!i.deleted&&i.countable&&(o-=i.length);return n!==null&&Aa(n.index-o)<i.parent.length/Ub?(Wb(n,i,o),n):j9(e._searchMarker,i,o)},ls=(e,r,n)=>{for(let i=e.length-1;i>=0;i--){const o=e[i];if(n>0){let s=o.p;for(s.marker=!1;s&&(s.deleted||!s.countable);)s=s.left,s&&!s.deleted&&s.countable&&(o.index-=s.length);if(s===null||s.marker===!0){e.splice(i,1);continue}o.p=s,s.marker=!0}(r<o.index||n>0&&r===o.index)&&(o.index=ar(r,o.index+n))}},gu=(e,r,n)=>{const i=e,o=r.changedParentTypes;for(;Sr(o,e,()=>[]).push(n),e._item!==null;)e=e._item.parent;zb(i._eH,n,r)};class at{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=ff(),this._dEH=ff(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(r,n){this.doc=r,this._item=n}_copy(){throw ir()}clone(){throw ir()}_write(r){}get _first(){let r=this._start;for(;r!==null&&r.deleted;)r=r.right;return r}_callObserver(r,n){!r.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(r){mf(this._eH,r)}observeDeep(r){mf(this._dEH,r)}unobserve(r){gf(this._eH,r)}unobserveDeep(r){gf(this._dEH,r)}toJSON(){}}const Kb=(e,r,n)=>{var a;(a=e.doc)!=null||ct(),r<0&&(r=e._length+r),n<0&&(n=e._length+n);let i=n-r;const o=[];let s=e._start;for(;s!==null&&i>0;){if(s.countable&&!s.deleted){const l=s.content.getContent();if(l.length<=r)r-=l.length;else{for(let u=r;u<l.length&&i>0;u++)o.push(l[u]),i--;r=0}}s=s.right}return o},Zb=e=>{var i;(i=e.doc)!=null||ct();const r=[];let n=e._start;for(;n!==null;){if(n.countable&&!n.deleted){const o=n.content.getContent();for(let s=0;s<o.length;s++)r.push(o[s])}n=n.right}return r},Gb=(e,r)=>{const n=[];let i=e._start;for(;i!==null;){if(i.countable&&Nn(i,r)){const o=i.content.getContent();for(let s=0;s<o.length;s++)n.push(o[s])}i=i.right}return n},us=(e,r)=>{var o;let n=0,i=e._start;for((o=e.doc)!=null?o:ct();i!==null;){if(i.countable&&!i.deleted){const s=i.content.getContent();for(let a=0;a<s.length;a++)r(s[a],n++,e)}i=i.right}},Jb=(e,r)=>{const n=[];return us(e,(i,o)=>{n.push(r(i,o,e))}),n},q9=e=>{let r=e._start,n=null,i=0;return{[Symbol.iterator](){return this},next:()=>{if(n===null){for(;r!==null&&r.deleted;)r=r.right;if(r===null)return{done:!0,value:void 0};n=r.content.getContent(),i=0,r=r.right}const o=n[i++];return n.length<=i&&(n=null),{done:!1,value:o}}}},Xb=(e,r)=>{var o;(o=e.doc)!=null||ct();const n=mu(e,r);let i=e._start;for(n!==null&&(i=n.p,r-=n.index);i!==null;i=i.right)if(!i.deleted&&i.countable){if(r<i.length)return i.content.getContent()[r];r-=i.length}},Dl=(e,r,n,i)=>{let o=n;const s=e.doc,a=s.clientID,l=s.store,u=n===null?r._start:n.right;let c=[];const d=()=>{c.length>0&&(o=new Se(ue(a,qe(l,a)),o,o&&o.lastId,u,u&&u.id,r,null,new ti(c)),o.integrate(e,0),c=[])};i.forEach(h=>{if(h===null)c.push(h);else switch(h.constructor){case Number:case Object:case Boolean:case Array:case String:c.push(h);break;default:switch(d(),h.constructor){case Uint8Array:case ArrayBuffer:o=new Se(ue(a,qe(l,a)),o,o&&o.lastId,u,u&&u.id,r,null,new Ts(new Uint8Array(h))),o.integrate(e,0);break;case fo:o=new Se(ue(a,qe(l,a)),o,o&&o.lastId,u,u&&u.id,r,null,new Ls(h)),o.integrate(e,0);break;default:if(h instanceof at)o=new Se(ue(a,qe(l,a)),o,o&&o.lastId,u,u&&u.id,r,null,new Br(h)),o.integrate(e,0);else throw new Error("Unexpected content type in insert operation")}}}),d()},Qb=()=>bn("Length exceeded!"),Yb=(e,r,n,i)=>{if(n>r._length)throw Qb();if(n===0)return r._searchMarker&&ls(r._searchMarker,n,i.length),Dl(e,r,null,i);const o=n,s=mu(r,n);let a=r._start;for(s!==null&&(a=s.p,n-=s.index,n===0&&(a=a.prev,n+=a&&a.countable&&!a.deleted?a.length:0));a!==null;a=a.right)if(!a.deleted&&a.countable){if(n<=a.length){n<a.length&&wt(e,ue(a.id.client,a.id.clock+n));break}n-=a.length}return r._searchMarker&&ls(r._searchMarker,o,i.length),Dl(e,r,a,i)},U9=(e,r,n)=>{let i=(r._searchMarker||[]).reduce((o,s)=>s.index>o.index?s:o,{index:0,p:r._start}).p;if(i)for(;i.right;)i=i.right;return Dl(e,r,i,n)},ey=(e,r,n,i)=>{if(i===0)return;const o=n,s=i,a=mu(r,n);let l=r._start;for(a!==null&&(l=a.p,n-=a.index);l!==null&&n>0;l=l.right)!l.deleted&&l.countable&&(n<l.length&&wt(e,ue(l.id.client,l.id.clock+n)),n-=l.length);for(;i>0&&l!==null;)l.deleted||(i<l.length&&wt(e,ue(l.id.client,l.id.clock+i)),l.delete(e),i-=l.length),l=l.right;if(i>0)throw Qb();r._searchMarker&&ls(r._searchMarker,o,-s+i)},Sl=(e,r,n)=>{const i=r._map.get(n);i!==void 0&&i.delete(e)},Ph=(e,r,n,i)=>{const o=r._map.get(n)||null,s=e.doc,a=s.clientID;let l;if(i==null)l=new ti([i]);else switch(i.constructor){case Number:case Object:case Boolean:case Array:case String:l=new ti([i]);break;case Uint8Array:l=new Ts(i);break;case fo:l=new Ls(i);break;default:if(i instanceof at)l=new Br(i);else throw new Error("Unexpected content type")}new Se(ue(a,qe(s.store,a)),o,o&&o.lastId,null,null,r,n,l).integrate(e,0)},Vh=(e,r)=>{var i;(i=e.doc)!=null||ct();const n=e._map.get(r);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},ty=e=>{var n;const r={};return(n=e.doc)!=null||ct(),e._map.forEach((i,o)=>{i.deleted||(r[o]=i.content.getContent()[i.length-1])}),r},ry=(e,r)=>{var i;(i=e.doc)!=null||ct();const n=e._map.get(r);return n!==void 0&&!n.deleted},W9=(e,r)=>{const n={};return e._map.forEach((i,o)=>{let s=i;for(;s!==null&&(!r.sv.has(s.id.client)||s.id.clock>=(r.sv.get(s.id.client)||0));)s=s.left;s!==null&&Nn(s,r)&&(n[o]=s.content.getContent()[s.length-1])}),n},Js=e=>{var r;return(r=e.doc)!=null||ct(),c9(e._map.entries(),n=>!n[1].deleted)};class K9 extends fu{}class ji extends at{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(r){const n=new ji;return n.push(r),n}_integrate(r,n){super._integrate(r,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new ji}clone(){const r=new ji;return r.insert(0,this.toArray().map(n=>n instanceof at?n.clone():n)),r}get length(){var r;return(r=this.doc)!=null||ct(),this._length}_callObserver(r,n){super._callObserver(r,n),gu(this,r,new K9(this,r))}insert(r,n){this.doc!==null?Be(this.doc,i=>{Yb(i,this,r,n)}):this._prelimContent.splice(r,0,...n)}push(r){this.doc!==null?Be(this.doc,n=>{U9(n,this,r)}):this._prelimContent.push(...r)}unshift(r){this.insert(0,r)}delete(r,n=1){this.doc!==null?Be(this.doc,i=>{ey(i,this,r,n)}):this._prelimContent.splice(r,n)}get(r){return Xb(this,r)}toArray(){return Zb(this)}slice(r=0,n=this.length){return Kb(this,r,n)}toJSON(){return this.map(r=>r instanceof at?r.toJSON():r)}map(r){return Jb(this,r)}forEach(r){us(this,r)}[Symbol.iterator](){return q9(this)}_write(r){r.writeTypeRef(y8)}}const Z9=e=>new ji;class G9 extends fu{constructor(r,n,i){super(r,n),this.keysChanged=i}}class oo extends at{constructor(r){super(),this._prelimContent=null,r===void 0?this._prelimContent=new Map:this._prelimContent=new Map(r)}_integrate(r,n){super._integrate(r,n),this._prelimContent.forEach((i,o)=>{this.set(o,i)}),this._prelimContent=null}_copy(){return new oo}clone(){const r=new oo;return this.forEach((n,i)=>{r.set(i,n instanceof at?n.clone():n)}),r}_callObserver(r,n){gu(this,r,new G9(this,r,n))}toJSON(){var n;(n=this.doc)!=null||ct();const r={};return this._map.forEach((i,o)=>{if(!i.deleted){const s=i.content.getContent()[i.length-1];r[o]=s instanceof at?s.toJSON():s}}),r}get size(){return[...Js(this)].length}keys(){return sc(Js(this),r=>r[0])}values(){return sc(Js(this),r=>r[1].content.getContent()[r[1].length-1])}entries(){return sc(Js(this),r=>[r[0],r[1].content.getContent()[r[1].length-1]])}forEach(r){var n;(n=this.doc)!=null||ct(),this._map.forEach((i,o)=>{i.deleted||r(i.content.getContent()[i.length-1],o,this)})}[Symbol.iterator](){return this.entries()}delete(r){this.doc!==null?Be(this.doc,n=>{Sl(n,this,r)}):this._prelimContent.delete(r)}set(r,n){return this.doc!==null?Be(this.doc,i=>{Ph(i,this,r,n)}):this._prelimContent.set(r,n),n}get(r){return Vh(this,r)}has(r){return ry(this,r)}clear(){this.doc!==null?Be(this.doc,r=>{this.forEach(function(n,i,o){Sl(r,o,i)})}):this._prelimContent.clear()}_write(r){r.writeTypeRef(C8)}}const J9=e=>new oo,on=(e,r)=>e===r||typeof e=="object"&&typeof r=="object"&&e&&r&&IF(e,r);class Ad{constructor(r,n,i,o){this.left=r,this.right=n,this.index=i,this.currentAttributes=o}forward(){switch(this.right===null&&Lt(),this.right.content.constructor){case We:this.right.deleted||mo(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const _f=(e,r,n)=>{for(;r.right!==null&&n>0;){switch(r.right.content.constructor){case We:r.right.deleted||mo(r.currentAttributes,r.right.content);break;default:r.right.deleted||(n<r.right.length&&wt(e,ue(r.right.id.client,r.right.id.clock+n)),r.index+=r.right.length,n-=r.right.length);break}r.left=r.right,r.right=r.right.right}return r},Xs=(e,r,n,i)=>{const o=new Map,s=i?mu(r,n):null;if(s){const a=new Ad(s.p.left,s.p,s.index,o);return _f(e,a,n-s.index)}else{const a=new Ad(null,r._start,0,o);return _f(e,a,n)}},ny=(e,r,n,i)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===We&&on(i.get(n.right.content.key),n.right.content.value));)n.right.deleted||i.delete(n.right.content.key),n.forward();const o=e.doc,s=o.clientID;i.forEach((a,l)=>{const u=n.left,c=n.right,d=new Se(ue(s,qe(o.store,s)),u,u&&u.lastId,c,c&&c.id,r,null,new We(l,a));d.integrate(e,0),n.right=d,n.forward()})},mo=(e,r)=>{const{key:n,value:i}=r;i===null?e.delete(n):e.set(n,i)},iy=(e,r)=>{var n;for(;e.right!==null&&(e.right.deleted||e.right.content.constructor===We&&on((n=r[e.right.content.key])!=null?n:null,e.right.content.value));)e.forward()},oy=(e,r,n,i)=>{var l;const o=e.doc,s=o.clientID,a=new Map;for(const u in i){const c=i[u],d=(l=n.currentAttributes.get(u))!=null?l:null;if(!on(d,c)){a.set(u,d);const{left:h,right:p}=n;n.right=new Se(ue(s,qe(o.store,s)),h,h&&h.lastId,p,p&&p.id,r,null,new We(u,c)),n.right.integrate(e,0),n.forward()}}return a},uc=(e,r,n,i,o)=>{n.currentAttributes.forEach((p,f)=>{o[f]===void 0&&(o[f]=null)});const s=e.doc,a=s.clientID;iy(n,o);const l=oy(e,r,n,o),u=i.constructor===String?new lr(i):i instanceof at?new Br(i):new li(i);let{left:c,right:d,index:h}=n;r._searchMarker&&ls(r._searchMarker,n.index,u.getLength()),d=new Se(ue(a,qe(s.store,a)),c,c&&c.lastId,d,d&&d.id,r,null,u),d.integrate(e,0),n.right=d,n.index=h,n.forward(),ny(e,r,n,l)},Ef=(e,r,n,i,o)=>{const s=e.doc,a=s.clientID;iy(n,o);const l=oy(e,r,n,o);e:for(;n.right!==null&&(i>0||l.size>0&&(n.right.deleted||n.right.content.constructor===We));){if(!n.right.deleted)switch(n.right.content.constructor){case We:{const{key:u,value:c}=n.right.content,d=o[u];if(d!==void 0){if(on(d,c))l.delete(u);else{if(i===0)break e;l.set(u,c)}n.right.delete(e)}else n.currentAttributes.set(u,c);break}default:i<n.right.length&&wt(e,ue(n.right.id.client,n.right.id.clock+i)),i-=n.right.length;break}n.forward()}if(i>0){let u="";for(;i>0;i--)u+="\n";n.right=new Se(ue(a,qe(s.store,a)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,r,null,new lr(u)),n.right.integrate(e,0),n.forward()}ny(e,r,n,l)},sy=(e,r,n,i,o)=>{var c,d;let s=r;const a=bt();for(;s&&(!s.countable||s.deleted);){if(!s.deleted&&s.content.constructor===We){const h=s.content;a.set(h.key,h)}s=s.right}let l=0,u=!1;for(;r!==s;){if(n===r&&(u=!0),!r.deleted){const h=r.content;switch(h.constructor){case We:{const{key:p,value:f}=h,m=(c=i.get(p))!=null?c:null;(a.get(p)!==h||m===f)&&(r.delete(e),l++,!u&&((d=o.get(p))!=null?d:null)===f&&m!==f&&(m===null?o.delete(p):o.set(p,m))),!u&&!r.deleted&&mo(o,h);break}}}r=r.right}return l},X9=(e,r)=>{for(;r&&r.right&&(r.right.deleted||!r.right.countable);)r=r.right;const n=new Set;for(;r&&(r.deleted||!r.countable);){if(!r.deleted&&r.content.constructor===We){const i=r.content.key;n.has(i)?r.delete(e):n.add(i)}r=r.left}},Q9=e=>{let r=0;return Be(e.doc,n=>{let i=e._start,o=e._start,s=bt();const a=fd(s);for(;o;){if(o.deleted===!1)switch(o.content.constructor){case We:mo(a,o.content);break;default:r+=sy(n,i,o,s,a),s=fd(a),i=o;break}o=o.right}}),r},Y9=e=>{const r=new Set,n=e.doc;for(const[i,o]of e.afterState.entries()){const s=e.beforeState.get(i)||0;o!==s&&Vb(e,n.store.clients.get(i),s,o,a=>{!a.deleted&&a.content.constructor===We&&a.constructor!==qt&&r.add(a.parent)})}Be(n,i=>{yn(e,e.deleteSet,o=>{if(o instanceof qt||!o.parent._hasFormatting||r.has(o.parent))return;const s=o.parent;o.content.constructor===We?r.add(s):X9(i,o)});for(const o of r)Q9(o)})},xf=(e,r,n)=>{const i=n,o=fd(r.currentAttributes),s=r.right;for(;n>0&&r.right!==null;){if(r.right.deleted===!1)switch(r.right.content.constructor){case Br:case li:case lr:n<r.right.length&&wt(e,ue(r.right.id.client,r.right.id.clock+n)),n-=r.right.length,r.right.delete(e);break}r.forward()}s&&sy(e,s,r.right,o,r.currentAttributes);const a=(r.left||r.right).parent;return a._searchMarker&&ls(a._searchMarker,r.index,-i+n),r};class e8 extends fu{constructor(r,n,i){super(r,n),this.childListChanged=!1,this.keysChanged=new Set,i.forEach(o=>{o===null?this.childListChanged=!0:this.keysChanged.add(o)})}get changes(){if(this._changes===null){const r={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=r}return this._changes}get delta(){if(this._delta===null){const r=this.target.doc,n=[];Be(r,i=>{var f,m,b;const o=new Map,s=new Map;let a=this.target._start,l=null;const u={};let c="",d=0,h=0;const p=()=>{if(l!==null){let g=null;switch(l){case"delete":h>0&&(g={delete:h}),h=0;break;case"insert":(typeof c=="object"||c.length>0)&&(g={insert:c},o.size>0&&(g.attributes={},o.forEach((y,v)=>{y!==null&&(g.attributes[v]=y)}))),c="";break;case"retain":d>0&&(g={retain:d},TF(u)||(g.attributes=NF({},u))),d=0;break}g&&n.push(g),l=null}};for(;a!==null;){switch(a.content.constructor){case Br:case li:this.adds(a)?this.deletes(a)||(p(),l="insert",c=a.content.getContent()[0],p()):this.deletes(a)?(l!=="delete"&&(p(),l="delete"),h+=1):a.deleted||(l!=="retain"&&(p(),l="retain"),d+=1);break;case lr:this.adds(a)?this.deletes(a)||(l!=="insert"&&(p(),l="insert"),c+=a.content.str):this.deletes(a)?(l!=="delete"&&(p(),l="delete"),h+=a.length):a.deleted||(l!=="retain"&&(p(),l="retain"),d+=a.length);break;case We:{const{key:g,value:y}=a.content;if(this.adds(a)){if(!this.deletes(a)){const v=(f=o.get(g))!=null?f:null;on(v,y)?y!==null&&a.delete(i):(l==="retain"&&p(),on(y,(m=s.get(g))!=null?m:null)?delete u[g]:u[g]=y)}}else if(this.deletes(a)){s.set(g,y);const v=(b=o.get(g))!=null?b:null;on(v,y)||(l==="retain"&&p(),u[g]=v)}else if(!a.deleted){s.set(g,y);const v=u[g];v!==void 0&&(on(v,y)?v!==null&&a.delete(i):(l==="retain"&&p(),y===null?delete u[g]:u[g]=y))}a.deleted||(l==="insert"&&p(),mo(o,a.content));break}}a=a.right}for(p();n.length>0;){const g=n[n.length-1];if(g.retain!==void 0&&g.attributes===void 0)n.pop();else break}}),this._delta=n}return this._delta}}class ei extends at{constructor(r){super(),this._pending=r!==void 0?[()=>this.insert(0,r)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){var r;return(r=this.doc)!=null||ct(),this._length}_integrate(r,n){super._integrate(r,n);try{this._pending.forEach(i=>i())}catch(i){console.error(i)}this._pending=null}_copy(){return new ei}clone(){const r=new ei;return r.applyDelta(this.toDelta()),r}_callObserver(r,n){super._callObserver(r,n);const i=new e8(this,r,n);gu(this,r,i),!r.local&&this._hasFormatting&&(r._needFormattingCleanup=!0)}toString(){var i;(i=this.doc)!=null||ct();let r="",n=this._start;for(;n!==null;)!n.deleted&&n.countable&&n.content.constructor===lr&&(r+=n.content.str),n=n.right;return r}toJSON(){return this.toString()}applyDelta(r,{sanitize:n=!0}={}){this.doc!==null?Be(this.doc,i=>{const o=new Ad(null,this._start,0,new Map);for(let s=0;s<r.length;s++){const a=r[s];if(a.insert!==void 0){const l=!n&&typeof a.insert=="string"&&s===r.length-1&&o.right===null&&a.insert.slice(-1)==="\n"?a.insert.slice(0,-1):a.insert;(typeof l!="string"||l.length>0)&&uc(i,this,o,l,a.attributes||{})}else a.retain!==void 0?Ef(i,this,o,a.retain,a.attributes||{}):a.delete!==void 0&&xf(i,o,a.delete)}}):this._pending.push(()=>this.applyDelta(r))}toDelta(r,n,i){var h;(h=this.doc)!=null||ct();const o=[],s=new Map,a=this.doc;let l="",u=this._start;function c(){if(l.length>0){const p={};let f=!1;s.forEach((b,g)=>{f=!0,p[g]=b});const m={insert:l};f&&(m.attributes=p),o.push(m),l=""}}const d=()=>{for(;u!==null;){if(Nn(u,r)||n!==void 0&&Nn(u,n))switch(u.content.constructor){case lr:{const p=s.get("ychange");r!==void 0&&!Nn(u,r)?(p===void 0||p.user!==u.id.client||p.type!=="removed")&&(c(),s.set("ychange",i?i("removed",u.id):{type:"removed"})):n!==void 0&&!Nn(u,n)?(p===void 0||p.user!==u.id.client||p.type!=="added")&&(c(),s.set("ychange",i?i("added",u.id):{type:"added"})):p!==void 0&&(c(),s.delete("ychange")),l+=u.content.str;break}case Br:case li:{c();const p={insert:u.content.getContent()[0]};if(s.size>0){const f={};p.attributes=f,s.forEach((m,b)=>{f[b]=m})}o.push(p);break}case We:Nn(u,r)&&(c(),mo(s,u.content));break}u=u.right}c()};return r||n?Be(a,p=>{r&&kd(p,r),n&&kd(p,n),d()},"cleanup"):d(),o}insert(r,n,i){if(n.length<=0)return;const o=this.doc;o!==null?Be(o,s=>{const a=Xs(s,this,r,!i);i||(i={},a.currentAttributes.forEach((l,u)=>{i[u]=l})),uc(s,this,a,n,i)}):this._pending.push(()=>this.insert(r,n,i))}insertEmbed(r,n,i){const o=this.doc;o!==null?Be(o,s=>{const a=Xs(s,this,r,!i);uc(s,this,a,n,i||{})}):this._pending.push(()=>this.insertEmbed(r,n,i||{}))}delete(r,n){if(n===0)return;const i=this.doc;i!==null?Be(i,o=>{xf(o,Xs(o,this,r,!0),n)}):this._pending.push(()=>this.delete(r,n))}format(r,n,i){if(n===0)return;const o=this.doc;o!==null?Be(o,s=>{const a=Xs(s,this,r,!1);a.right!==null&&Ef(s,this,a,n,i)}):this._pending.push(()=>this.format(r,n,i))}removeAttribute(r){this.doc!==null?Be(this.doc,n=>{Sl(n,this,r)}):this._pending.push(()=>this.removeAttribute(r))}setAttribute(r,n){this.doc!==null?Be(this.doc,i=>{Ph(i,this,r,n)}):this._pending.push(()=>this.setAttribute(r,n))}getAttribute(r){return Vh(this,r)}getAttributes(){return ty(this)}_write(r){r.writeTypeRef(v8)}}const t8=e=>new ei;class cc{constructor(r,n=()=>!0){var i;this._filter=n,this._root=r,this._currentNode=r._start,this._firstCall=!0,(i=r.doc)!=null||ct()}[Symbol.iterator](){return this}next(){let r=this._currentNode,n=r&&r.content&&r.content.type;if(r!==null&&(!this._firstCall||r.deleted||!this._filter(n)))do if(n=r.content.type,!r.deleted&&(n.constructor===At||n.constructor===Cn)&&n._start!==null)r=n._start;else for(;r!==null;)if(r.right!==null){r=r.right;break}else r.parent===this._root?r=null:r=r.parent._item;while(r!==null&&(r.deleted||!this._filter(r.content.type)));return this._firstCall=!1,r===null?{value:void 0,done:!0}:(this._currentNode=r,{value:r.content.type,done:!1})}}class Cn extends at{constructor(){super(),this._prelimContent=[]}get firstChild(){const r=this._first;return r?r.content.getContent()[0]:null}_integrate(r,n){super._integrate(r,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Cn}clone(){const r=new Cn;return r.insert(0,this.toArray().map(n=>n instanceof at?n.clone():n)),r}get length(){var r;return(r=this.doc)!=null||ct(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(r){return new cc(this,r)}querySelector(r){r=r.toUpperCase();const n=new cc(this,i=>i.nodeName&&i.nodeName.toUpperCase()===r).next();return n.done?null:n.value}querySelectorAll(r){return r=r.toUpperCase(),qr(new cc(this,n=>n.nodeName&&n.nodeName.toUpperCase()===r))}_callObserver(r,n){gu(this,r,new i8(this,n,r))}toString(){return Jb(this,r=>r.toString()).join("")}toJSON(){return this.toString()}toDOM(r=document,n={},i){const o=r.createDocumentFragment();return i!==void 0&&i._createAssociation(o,this),us(this,s=>{o.insertBefore(s.toDOM(r,n,i),null)}),o}insert(r,n){this.doc!==null?Be(this.doc,i=>{Yb(i,this,r,n)}):this._prelimContent.splice(r,0,...n)}insertAfter(r,n){if(this.doc!==null)Be(this.doc,i=>{const o=r&&r instanceof at?r._item:r;Dl(i,this,o,n)});else{const i=this._prelimContent,o=r===null?0:i.findIndex(s=>s===r)+1;if(o===0&&r!==null)throw bn("Reference item not found");i.splice(o,0,...n)}}delete(r,n=1){this.doc!==null?Be(this.doc,i=>{ey(i,this,r,n)}):this._prelimContent.splice(r,n)}toArray(){return Zb(this)}push(r){this.insert(this.length,r)}unshift(r){this.insert(0,r)}get(r){return Xb(this,r)}slice(r=0,n=this.length){return Kb(this,r,n)}forEach(r){us(this,r)}_write(r){r.writeTypeRef(w8)}}const r8=e=>new Cn;class At extends Cn{constructor(r="UNDEFINED"){super(),this.nodeName=r,this._prelimAttrs=new Map}get nextSibling(){const r=this._item?this._item.next:null;return r?r.content.type:null}get prevSibling(){const r=this._item?this._item.prev:null;return r?r.content.type:null}_integrate(r,n){super._integrate(r,n),this._prelimAttrs.forEach((i,o)=>{this.setAttribute(o,i)}),this._prelimAttrs=null}_copy(){return new At(this.nodeName)}clone(){const r=new At(this.nodeName),n=this.getAttributes();return OF(n,(i,o)=>{typeof i=="string"&&r.setAttribute(o,i)}),r.insert(0,this.toArray().map(i=>i instanceof at?i.clone():i)),r}toString(){const r=this.getAttributes(),n=[],i=[];for(const l in r)i.push(l);i.sort();const o=i.length;for(let l=0;l<o;l++){const u=i[l];n.push(u+'="'+r[u]+'"')}const s=this.nodeName.toLocaleLowerCase(),a=n.length>0?" "+n.join(" "):"";return"<".concat(s).concat(a,">").concat(super.toString(),"</").concat(s,">")}removeAttribute(r){this.doc!==null?Be(this.doc,n=>{Sl(n,this,r)}):this._prelimAttrs.delete(r)}setAttribute(r,n){this.doc!==null?Be(this.doc,i=>{Ph(i,this,r,n)}):this._prelimAttrs.set(r,n)}getAttribute(r){return Vh(this,r)}hasAttribute(r){return ry(this,r)}getAttributes(r){return r?W9(this,r):ty(this)}toDOM(r=document,n={},i){const o=r.createElement(this.nodeName),s=this.getAttributes();for(const a in s){const l=s[a];typeof l=="string"&&o.setAttribute(a,l)}return us(this,a=>{o.appendChild(a.toDOM(r,n,i))}),i!==void 0&&i._createAssociation(o,this),o}_write(r){r.writeTypeRef(k8),r.writeKey(this.nodeName)}}const n8=e=>new At(e.readKey());class i8 extends fu{constructor(r,n,i){super(r,i),this.childListChanged=!1,this.attributesChanged=new Set,n.forEach(o=>{o===null?this.childListChanged=!0:this.attributesChanged.add(o)})}}class Bl extends oo{constructor(r){super(),this.hookName=r}_copy(){return new Bl(this.hookName)}clone(){const r=new Bl(this.hookName);return this.forEach((n,i)=>{r.set(i,n)}),r}toDOM(r=document,n={},i){const o=n[this.hookName];let s;return o!==void 0?s=o.createDom(this):s=document.createElement(this.hookName),s.setAttribute("data-yjs-hook",this.hookName),i!==void 0&&i._createAssociation(s,this),s}_write(r){r.writeTypeRef(A8),r.writeKey(this.hookName)}}const o8=e=>new Bl(e.readKey());class Tt extends ei{get nextSibling(){const r=this._item?this._item.next:null;return r?r.content.type:null}get prevSibling(){const r=this._item?this._item.prev:null;return r?r.content.type:null}_copy(){return new Tt}clone(){const r=new Tt;return r.applyDelta(this.toDelta()),r}toDOM(r=document,n,i){const o=r.createTextNode(this.toString());return i!==void 0&&i._createAssociation(o,this),o}toString(){return this.toDelta().map(r=>{const n=[];for(const o in r.attributes){const s=[];for(const a in r.attributes[o])s.push({key:a,value:r.attributes[o][a]});s.sort((a,l)=>a.key<l.key?-1:1),n.push({nodeName:o,attrs:s})}n.sort((o,s)=>o.nodeName<s.nodeName?-1:1);let i="";for(let o=0;o<n.length;o++){const s=n[o];i+="<".concat(s.nodeName);for(let a=0;a<s.attrs.length;a++){const l=s.attrs[a];i+=" ".concat(l.key,'="').concat(l.value,'"')}i+=">"}i+=r.insert;for(let o=n.length-1;o>=0;o--)i+="</".concat(n[o].nodeName,">");return i}).join("")}toJSON(){return this.toString()}_write(r){r.writeTypeRef(_8)}}const s8=e=>new Tt;class jh{constructor(r,n){this.id=r,this.length=n}get deleted(){throw ir()}mergeWith(r){return!1}write(r,n,i){throw ir()}integrate(r,n){throw ir()}}const a8=0;class qt extends jh{get deleted(){return!0}delete(){}mergeWith(r){return this.constructor!==r.constructor?!1:(this.length+=r.length,!0)}integrate(r,n){n>0&&(this.id.clock+=n,this.length-=n),Pb(r.doc.store,this)}write(r,n){r.writeInfo(a8),r.writeLen(this.length-n)}getMissing(r,n){return null}}class Ts{constructor(r){this.content=r}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Ts(this.content)}splice(r){throw ir()}mergeWith(r){return!1}integrate(r,n){}delete(r){}gc(r){}write(r,n){r.writeBuf(this.content)}getRef(){return 3}}const l8=e=>new Ts(e.readBuf());class cs{constructor(r){this.len=r}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new cs(this.len)}splice(r){const n=new cs(this.len-r);return this.len=r,n}mergeWith(r){return this.len+=r.len,!0}integrate(r,n){ns(r.deleteSet,n.id.client,n.id.clock,this.len),n.markDeleted()}delete(r){}gc(r){}write(r,n){r.writeLen(this.len-n)}getRef(){return 1}}const u8=e=>new cs(e.readLen()),ay=(e,r)=>new fo({guid:e,...r,shouldLoad:r.shouldLoad||r.autoLoad||!1});class Ls{constructor(r){r._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=r;const n={};this.opts=n,r.gc||(n.gc=!1),r.autoLoad&&(n.autoLoad=!0),r.meta!==null&&(n.meta=r.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Ls(ay(this.doc.guid,this.opts))}splice(r){throw ir()}mergeWith(r){return!1}integrate(r,n){this.doc._item=n,r.subdocsAdded.add(this.doc),this.doc.shouldLoad&&r.subdocsLoaded.add(this.doc)}delete(r){r.subdocsAdded.has(this.doc)?r.subdocsAdded.delete(this.doc):r.subdocsRemoved.add(this.doc)}gc(r){}write(r,n){r.writeString(this.doc.guid),r.writeAny(this.opts)}getRef(){return 9}}const c8=e=>new Ls(ay(e.readString(),e.readAny()));class li{constructor(r){this.embed=r}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new li(this.embed)}splice(r){throw ir()}mergeWith(r){return!1}integrate(r,n){}delete(r){}gc(r){}write(r,n){r.writeJSON(this.embed)}getRef(){return 5}}const d8=e=>new li(e.readJSON());class We{constructor(r,n){this.key=r,this.value=n}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new We(this.key,this.value)}splice(r){throw ir()}mergeWith(r){return!1}integrate(r,n){const i=n.parent;i._searchMarker=null,i._hasFormatting=!0}delete(r){}gc(r){}write(r,n){r.writeKey(this.key),r.writeJSON(this.value)}getRef(){return 6}}const h8=e=>new We(e.readKey(),e.readJSON());class Ml{constructor(r){this.arr=r}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Ml(this.arr)}splice(r){const n=new Ml(this.arr.slice(r));return this.arr=this.arr.slice(0,r),n}mergeWith(r){return this.arr=this.arr.concat(r.arr),!0}integrate(r,n){}delete(r){}gc(r){}write(r,n){const i=this.arr.length;r.writeLen(i-n);for(let o=n;o<i;o++){const s=this.arr[o];r.writeString(s===void 0?"undefined":JSON.stringify(s))}}getRef(){return 2}}const p8=e=>{const r=e.readLen(),n=[];for(let i=0;i<r;i++){const o=e.readString();o==="undefined"?n.push(void 0):n.push(JSON.parse(o))}return new Ml(n)},f8=_l("node_env")==="development";class ti{constructor(r){this.arr=r,f8&&yb(r)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new ti(this.arr)}splice(r){const n=new ti(this.arr.slice(r));return this.arr=this.arr.slice(0,r),n}mergeWith(r){return this.arr=this.arr.concat(r.arr),!0}integrate(r,n){}delete(r){}gc(r){}write(r,n){const i=this.arr.length;r.writeLen(i-n);for(let o=n;o<i;o++){const s=this.arr[o];r.writeAny(s)}}getRef(){return 8}}const m8=e=>{const r=e.readLen(),n=[];for(let i=0;i<r;i++)n.push(e.readAny());return new ti(n)};class lr{constructor(r){this.str=r}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new lr(this.str)}splice(r){const n=new lr(this.str.slice(r));this.str=this.str.slice(0,r);const i=this.str.charCodeAt(r-1);return i>=55296&&i<=56319&&(this.str=this.str.slice(0,r-1)+"�",n.str="�"+n.str.slice(1)),n}mergeWith(r){return this.str+=r.str,!0}integrate(r,n){}delete(r){}gc(r){}write(r,n){r.writeString(n===0?this.str:this.str.slice(n))}getRef(){return 4}}const g8=e=>new lr(e.readString()),b8=[Z9,J9,t8,n8,r8,o8,s8],y8=0,C8=1,v8=2,k8=3,w8=4,A8=5,_8=6;class Br{constructor(r){this.type=r}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new Br(this.type._copy())}splice(r){throw ir()}mergeWith(r){return!1}integrate(r,n){this.type._integrate(r.doc,n)}delete(r){let n=this.type._start;for(;n!==null;)n.deleted?n.id.clock<(r.beforeState.get(n.id.client)||0)&&r._mergeStructs.push(n):n.delete(r),n=n.right;this.type._map.forEach(i=>{i.deleted?i.id.clock<(r.beforeState.get(i.id.client)||0)&&r._mergeStructs.push(i):i.delete(r)}),r.changed.delete(this.type)}gc(r){let n=this.type._start;for(;n!==null;)n.gc(r,!0),n=n.right;this.type._start=null,this.type._map.forEach(i=>{for(;i!==null;)i.gc(r,!0),i=i.left}),this.type._map=new Map}write(r,n){this.type._write(r)}getRef(){return 7}}const E8=e=>new Br(b8[e.readTypeRef()](e)),_d=(e,r)=>{let n=r,i=0,o;do i>0&&(n=ue(n.client,n.clock+i)),o=Vi(e,n),i=n.clock-o.id.clock,n=o.redone;while(n!==null&&o instanceof Se);return{item:o,diff:i}},qh=(e,r)=>{for(;e!==null&&e.keep!==r;)e.keep=r,e=e.parent._item},Fl=(e,r,n)=>{const{client:i,clock:o}=r.id,s=new Se(ue(i,o+n),r,ue(i,o+n-1),r.right,r.rightOrigin,r.parent,r.parentSub,r.content.splice(n));return r.deleted&&s.markDeleted(),r.keep&&(s.keep=!0),r.redone!==null&&(s.redone=ue(r.redone.client,r.redone.clock+n)),r.right=s,s.right!==null&&(s.right.left=s),e._mergeStructs.push(s),s.parentSub!==null&&s.right===null&&s.parent._map.set(s.parentSub,s),r.length=n,s},Df=(e,r)=>KM(e,n=>ho(n.deletions,r)),ly=(e,r,n,i,o,s)=>{const a=e.doc,l=a.store,u=a.clientID,c=r.redone;if(c!==null)return wt(e,c);let d=r.parent._item,h=null,p;if(d!==null&&d.deleted===!0){if(d.redone===null&&(!n.has(d)||ly(e,d,n,i,o,s)===null))return null;for(;d.redone!==null;)d=wt(e,d.redone)}const f=d===null?r.parent:d.content.type;if(r.parentSub===null){for(h=r.left,p=r;h!==null;){let y=h;for(;y!==null&&y.parent._item!==d;)y=y.redone===null?null:wt(e,y.redone);if(y!==null&&y.parent._item===d){h=y;break}h=h.left}for(;p!==null;){let y=p;for(;y!==null&&y.parent._item!==d;)y=y.redone===null?null:wt(e,y.redone);if(y!==null&&y.parent._item===d){p=y;break}p=p.right}}else if(p=null,r.right&&!o){for(h=r;h!==null&&h.right!==null&&(h.right.redone||ho(i,h.right.id)||Df(s.undoStack,h.right.id)||Df(s.redoStack,h.right.id));)for(h=h.right;h.redone;)h=wt(e,h.redone);if(h&&h.right!==null)return null}else h=f._map.get(r.parentSub)||null;const m=qe(l,u),b=ue(u,m),g=new Se(b,h,h&&h.lastId,p,p&&p.id,f,r.parentSub,r.content.copy());return r.redone=b,qh(g,!0),g.integrate(e,0),g};class Se extends jh{constructor(r,n,i,o,s,a,l,u){super(r,u.getLength()),this.origin=i,this.left=n,this.right=o,this.rightOrigin=s,this.parent=a,this.parentSub=l,this.redone=null,this.content=u,this.info=this.content.isCountable()?rf:0}set marker(r){(this.info&rc)>0!==r&&(this.info^=rc)}get marker(){return(this.info&rc)>0}get keep(){return(this.info&tf)>0}set keep(r){this.keep!==r&&(this.info^=tf)}get countable(){return(this.info&rf)>0}get deleted(){return(this.info&tc)>0}set deleted(r){this.deleted!==r&&(this.info^=tc)}markDeleted(){this.info|=tc}getMissing(r,n){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=qe(n,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=qe(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Pi&&this.id.client!==this.parent.client&&this.parent.clock>=qe(n,this.parent.client))return this.parent.client;if(this.origin&&(this.left=yf(r,n,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=wt(r,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===qt||this.right&&this.right.constructor===qt)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===Se&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===Se&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Pi){const i=Vi(n,this.parent);i.constructor===qt?this.parent=null:this.parent=i.content.type}return null}integrate(r,n){if(n>0&&(this.id.clock+=n,this.left=yf(r,r.doc.store,ue(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(n),this.length-=n),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let i=this.left,o;if(i!==null)o=i.right;else if(this.parentSub!==null)for(o=this.parent._map.get(this.parentSub)||null;o!==null&&o.left!==null;)o=o.left;else o=this.parent._start;const s=new Set,a=new Set;for(;o!==null&&o!==this.right;){if(a.add(o),s.add(o),Fi(this.origin,o.origin)){if(o.id.client<this.id.client)i=o,s.clear();else if(Fi(this.rightOrigin,o.rightOrigin))break}else if(o.origin!==null&&a.has(Vi(r.doc.store,o.origin)))s.has(Vi(r.doc.store,o.origin))||(i=o,s.clear());else break;o=o.right}this.left=i}if(this.left!==null){const i=this.left.right;this.right=i,this.left.right=this}else{let i;if(this.parentSub!==null)for(i=this.parent._map.get(this.parentSub)||null;i!==null&&i.left!==null;)i=i.left;else i=this.parent._start,this.parent._start=this;this.right=i}this.right!==null?this.right.left=this:this.parentSub!==null&&(this.parent._map.set(this.parentSub,this),this.left!==null&&this.left.delete(r)),this.parentSub===null&&this.countable&&!this.deleted&&(this.parent._length+=this.length),Pb(r.doc.store,this),this.content.integrate(r,this),vf(r,this.parent,this.parentSub),(this.parent._item!==null&&this.parent._item.deleted||this.parentSub!==null&&this.right!==null)&&this.delete(r)}else new qt(this.id,this.length).integrate(r,0)}get next(){let r=this.right;for(;r!==null&&r.deleted;)r=r.right;return r}get prev(){let r=this.left;for(;r!==null&&r.deleted;)r=r.left;return r}get lastId(){return this.length===1?this.id:ue(this.id.client,this.id.clock+this.length-1)}mergeWith(r){if(this.constructor===r.constructor&&Fi(r.origin,this.lastId)&&this.right===r&&Fi(this.rightOrigin,r.rightOrigin)&&this.id.client===r.id.client&&this.id.clock+this.length===r.id.clock&&this.deleted===r.deleted&&this.redone===null&&r.redone===null&&this.content.constructor===r.content.constructor&&this.content.mergeWith(r.content)){const n=this.parent._searchMarker;return n&&n.forEach(i=>{i.p===r&&(i.p=this,!this.deleted&&this.countable&&(i.index-=this.length))}),r.keep&&(this.keep=!0),this.right=r.right,this.right!==null&&(this.right.left=this),this.length+=r.length,!0}return!1}delete(r){if(!this.deleted){const n=this.parent;this.countable&&this.parentSub===null&&(n._length-=this.length),this.markDeleted(),ns(r.deleteSet,this.id.client,this.id.clock,this.length),vf(r,n,this.parentSub),this.content.delete(r)}}gc(r,n){if(!this.deleted)throw Lt();this.content.gc(r),n?S9(r,this,new qt(this.id,this.length)):this.content=new cs(this.length)}write(r,n){const i=n>0?ue(this.id.client,this.id.clock+n-1):this.origin,o=this.rightOrigin,s=this.parentSub,a=this.content.getRef()&cu|(i===null?0:Ot)|(o===null?0:Hr)|(s===null?0:Yo);if(r.writeInfo(a),i!==null&&r.writeLeftID(i),o!==null&&r.writeRightID(o),i===null&&o===null){const l=this.parent;if(l._item!==void 0){const u=l._item;if(u===null){const c=is(l);r.writeParentInfo(!0),r.writeString(c)}else r.writeParentInfo(!1),r.writeLeftID(u.id)}else l.constructor===String?(r.writeParentInfo(!0),r.writeString(l)):l.constructor===Pi?(r.writeParentInfo(!1),r.writeLeftID(l)):Lt();s!==null&&r.writeString(s)}this.content.write(r,n)}}const uy=(e,r)=>x8[r&cu](e),x8=[()=>{Lt()},u8,p8,l8,g8,d8,h8,E8,m8,c8,()=>{Lt()}],D8=10;class Ut extends jh{get deleted(){return!0}delete(){}mergeWith(r){return this.constructor!==r.constructor?!1:(this.length+=r.length,!0)}integrate(r,n){Lt()}write(r,n){r.writeInfo(D8),me(r.restEncoder,this.length-n)}getMissing(r,n){return null}}const Sf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Ep<"u"?Ep:{},Bf="__ $YJS$ __";Sf[Bf]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438"),Sf[Bf]=!0;const S8=()=>{let e=!0;return(r,n)=>{if(e){e=!1;try{r()}finally{e=!0}}else n!==void 0&&n()}},B8=/[\uD800-\uDBFF]/,M8=/[\uDC00-\uDFFF]/,F8=(e,r)=>{let n=0,i=0;for(;n<e.length&&n<r.length&&e[n]===r[n];)n++;for(n>0&&B8.test(e[n-1])&&n--;i+n<e.length&&i+n<r.length&&e[e.length-i-1]===r[r.length-i-1];)i++;return i>0&&M8.test(e[e.length-i])&&i--,{index:n,remove:e.length-n-i,insert:r.slice(n,r.length-i)}},N8=F8,Ke=new ve("y-sync"),O8=new ve("y-undo"),Qs=new ve("yjs-cursor"),Nl=(e,r)=>r===void 0?!e.deleted:r.sv.has(e.id.client)&&r.sv.get(e.id.client)>e.id.clock&&!ho(r.ds,e.id),T8=[{light:"#ecd44433",dark:"#ecd444"}],L8=(e,r,n)=>{if(!e.has(n)){if(e.size<r.length){const i=gn();e.forEach(o=>i.add(o)),r=r.filter(o=>!i.has(o))}e.set(n,EF(r))}return e.get(n)},V4e=(e,{colors:r=T8,colorMapping:n=new Map,permanentUserData:i=null,onFirstRender:o=()=>{},mapping:s}={})=>{let a=!1;const l=new R8(e,s),u=new fe({props:{editable:c=>{const d=Ke.getState(c);return d.snapshot==null&&d.prevSnapshot==null}},key:Ke,state:{init:(c,d)=>({type:e,doc:e.doc,binding:l,snapshot:null,prevSnapshot:null,isChangeOrigin:!1,isUndoRedoOperation:!1,addToHistory:!0,colors:r,colorMapping:n,permanentUserData:i}),apply:(c,d)=>{const h=c.getMeta(Ke);if(h!==void 0){d=Object.assign({},d);for(const p in h)d[p]=h[p]}return d.addToHistory=c.getMeta("addToHistory")!==!1,d.isChangeOrigin=h!==void 0&&!!h.isChangeOrigin,d.isUndoRedoOperation=h!==void 0&&!!h.isChangeOrigin&&!!h.isUndoRedoOperation,l.prosemirrorView!==null&&h!==void 0&&(h.snapshot!=null||h.prevSnapshot!=null)&&Mh(0,()=>{l.prosemirrorView!=null&&(h.restore==null?l._renderSnapshot(h.snapshot,h.prevSnapshot,d):(l._renderSnapshot(h.snapshot,h.snapshot,d),delete d.restore,delete d.snapshot,delete d.prevSnapshot,l.mux(()=>{l._prosemirrorChanged(l.prosemirrorView.state.doc)})))}),d}},view:c=>(l.initView(c),s==null&&l._forceRerender(),o(),{update:()=>{const d=u.getState(c.state);if(d.snapshot==null&&d.prevSnapshot==null&&(a||c.state.doc.content.findDiffStart(c.state.doc.type.createAndFill().content)!==null)){if(a=!0,d.addToHistory===!1&&!d.isChangeOrigin){const h=O8.getState(c.state),p=h&&h.undoManager;p&&p.stopCapturing()}l.mux(()=>{d.doc.transact(h=>{h.meta.set("addToHistory",d.addToHistory),l._prosemirrorChanged(c.state.doc)},Ke)})}},destroy:()=>{l.destroy()}})});return u},I8=(e,r,n)=>{if(r!==null&&r.anchor!==null&&r.head!==null){const i=hs(n.doc,n.type,r.anchor,n.mapping),o=hs(n.doc,n.type,r.head,n.mapping);i!==null&&o!==null&&(e=e.setSelection(Q.create(e.doc,i,o)))}},Mf=(e,r)=>({anchor:Ll(r.selection.anchor,e.type,e.mapping),head:Ll(r.selection.head,e.type,e.mapping)});class R8{constructor(r,n=new Map){this.type=r,this.prosemirrorView=null,this.mux=S8(),this.mapping=n,this._observeFunction=this._typeChanged.bind(this),this.doc=r.doc,this.beforeTransactionSelection=null,this.beforeAllTransactions=()=>{this.beforeTransactionSelection===null&&this.prosemirrorView!=null&&(this.beforeTransactionSelection=Mf(this,this.prosemirrorView.state))},this.afterAllTransactions=()=>{this.beforeTransactionSelection=null},this._domSelectionInView=null}get _tr(){return this.prosemirrorView.state.tr.setMeta("addToHistory",!1)}_isLocalCursorInView(){return this.prosemirrorView.hasFocus()?(Bh&&this._domSelectionInView===null&&(Mh(0,()=>{this._domSelectionInView=null}),this._domSelectionInView=this._isDomSelectionInView()),this._domSelectionInView):!1}_isDomSelectionInView(){const r=this.prosemirrorView._root.getSelection();if(r==null||r.anchorNode==null)return!1;const n=this.prosemirrorView._root.createRange();n.setStart(r.anchorNode,r.anchorOffset),n.setEnd(r.focusNode,r.focusOffset),n.getClientRects().length===0&&n.startContainer&&n.collapsed&&n.selectNodeContents(n.startContainer);const i=n.getBoundingClientRect(),o=XF.documentElement;return i.bottom>=0&&i.right>=0&&i.left<=(window.innerWidth||o.clientWidth||0)&&i.top<=(window.innerHeight||o.clientHeight||0)}renderSnapshot(r,n){n||(n=$b(Bb(),new Map)),this.prosemirrorView.dispatch(this._tr.setMeta(Ke,{snapshot:r,prevSnapshot:n}))}unrenderSnapshot(){this.mapping.clear(),this.mux(()=>{const r=this.type.toArray().map(i=>Da(i,this.prosemirrorView.state.schema,this.mapping)).filter(i=>i!==null),n=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new $(O.from(r),0,0));n.setMeta(Ke,{snapshot:null,prevSnapshot:null}),this.prosemirrorView.dispatch(n)})}_forceRerender(){this.mapping.clear(),this.mux(()=>{const r=this.beforeTransactionSelection!==null?null:this.prosemirrorView.state.selection,n=this.type.toArray().map(o=>Da(o,this.prosemirrorView.state.schema,this.mapping)).filter(o=>o!==null),i=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new $(O.from(n),0,0));if(r){const o=$r(ar(r.anchor,0),i.doc.content.size),s=$r(ar(r.head,0),i.doc.content.size);i.setSelection(Q.create(i.doc,o,s))}this.prosemirrorView.dispatch(i.setMeta(Ke,{isChangeOrigin:!0,binding:this}))})}_renderSnapshot(r,n,i){let o=this.doc;r||(r=lc(this.doc)),(r instanceof Uint8Array||n instanceof Uint8Array)&&((!(r instanceof Uint8Array)||!(n instanceof Uint8Array))&&Lt(),o=new fo({gc:!1}),El(o,n),n=lc(o),El(o,r),r=lc(o)),this.mapping.clear(),this.mux(()=>{o.transact(s=>{const a=i.permanentUserData;a&&a.dss.forEach(d=>{yn(s,d,h=>{})});const l=(d,h)=>{const p=d==="added"?a.getUserByClientId(h.client):a.getUserByDeletedId(h);return{user:p,type:d,color:L8(i.colorMapping,i.colors,p)}},u=Gb(this.type,new Ih(n.ds,r.sv)).map(d=>!d._item.deleted||Nl(d._item,r)||Nl(d._item,n)?Da(d,this.prosemirrorView.state.schema,new Map,r,n,l):null).filter(d=>d!==null),c=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new $(O.from(u),0,0));this.prosemirrorView.dispatch(c.setMeta(Ke,{isChangeOrigin:!0}))},Ke)})}_typeChanged(r,n){if(this.prosemirrorView==null)return;const i=Ke.getState(this.prosemirrorView.state);if(r.length===0||i.snapshot!=null||i.prevSnapshot!=null){this.renderSnapshot(i.snapshot,i.prevSnapshot);return}this.mux(()=>{const o=(l,u)=>this.mapping.delete(u);yn(n,n.deleteSet,l=>{if(l.constructor===Se){const u=l.content.type;u&&this.mapping.delete(u)}}),n.changed.forEach(o),n.changedParentTypes.forEach(o);const s=this.type.toArray().map(l=>cy(l,this.prosemirrorView.state.schema,this.mapping)).filter(l=>l!==null);let a=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new $(O.from(s),0,0));I8(a,this.beforeTransactionSelection,this),a=a.setMeta(Ke,{isChangeOrigin:!0,isUndoRedoOperation:n.origin instanceof O9}),this.beforeTransactionSelection!==null&&this._isLocalCursorInView()&&a.scrollIntoView(),this.prosemirrorView.dispatch(a)})}_prosemirrorChanged(r){this.doc.transact(()=>{Tl(this.doc,this.type,r,this.mapping),this.beforeTransactionSelection=Mf(this,this.prosemirrorView.state)},Ke)}initView(r){this.prosemirrorView!=null&&this.destroy(),this.prosemirrorView=r,this.doc.on("beforeAllTransactions",this.beforeAllTransactions),this.doc.on("afterAllTransactions",this.afterAllTransactions),this.type.observeDeep(this._observeFunction)}destroy(){this.prosemirrorView!=null&&(this.prosemirrorView=null,this.type.unobserveDeep(this._observeFunction),this.doc.off("beforeAllTransactions",this.beforeAllTransactions),this.doc.off("afterAllTransactions",this.afterAllTransactions))}}const cy=(e,r,n,i,o,s)=>{const a=n.get(e);if(a===void 0){if(e instanceof At)return Da(e,r,n,i,o,s);throw ir()}return a},Da=(e,r,n,i,o,s)=>{const a=[],l=u=>{var c;if(u.constructor===At){const d=cy(u,r,n,i,o,s);d!==null&&a.push(d)}else{const d=(c=u._item.right)==null?void 0:c.content.type;d instanceof ei&&!d._item.deleted&&d._item.id.client===d.doc.clientID&&(u.applyDelta([{retain:u.length},...d.toDelta()]),d.doc.transact(p=>{d._item.delete(p)}));const h=z8(u,r,n,i,o,s);h!==null&&h.forEach(p=>{p!==null&&a.push(p)})}};i===void 0||o===void 0?e.toArray().forEach(l):Gb(e,new Ih(o.ds,i.sv)).forEach(l);try{const u=e.getAttributes(i);i!==void 0&&(Nl(e._item,i)?Nl(e._item,o)||(u.ychange=s?s("added",e._item.id):{type:"added"}):u.ychange=s?s("removed",e._item.id):{type:"removed"});const c=r.node(e.nodeName,u,a);return n.set(e,c),c}catch{return e.doc.transact(u=>{e._item.delete(u)},Ke),n.delete(e),null}},z8=(e,r,n,i,o,s)=>{const a=[],l=e.toDelta(i,o,s);try{for(let u=0;u<l.length;u++){const c=l[u],d=[];for(const h in c.attributes)d.push(r.mark(h,c.attributes[h]));a.push(r.text(c.insert,d))}}catch{return e.doc.transact(u=>{e._item.delete(u)},Ke),null}return a},$8=(e,r)=>{const n=new Tt,i=e.map(o=>({insert:o.text,attributes:hy(o.marks)}));return n.applyDelta(i),r.set(n,e),n},H8=(e,r)=>{const n=new At(e.type.name);for(const i in e.attrs){const o=e.attrs[i];o!==null&&i!=="ychange"&&n.setAttribute(i,o)}return n.insert(0,bu(e).map(i=>Ed(i,r))),r.set(n,e),n},Ed=(e,r)=>e instanceof Array?$8(e,r):H8(e,r),Ff=e=>typeof e=="object"&&e!==null,Uh=(e,r)=>{const n=Object.keys(e).filter(o=>e[o]!==null);let i=n.length===Object.keys(r).filter(o=>r[o]!==null).length;for(let o=0;o<n.length&&i;o++){const s=n[o],a=e[s],l=r[s];i=s==="ychange"||a===l||Ff(a)&&Ff(l)&&Uh(a,l)}return i},bu=e=>{const r=e.content.content,n=[];for(let i=0;i<r.length;i++){const o=r[i];if(o.isText){const s=[];for(let a=r[i];i<r.length&&a.isText;a=r[++i])s.push(a);i--,n.push(s)}else n.push(o)}return n},dy=(e,r)=>{const n=e.toDelta();return n.length===r.length&&n.every((i,o)=>i.insert===r[o].text&&Dh(i.attributes||{}).length===r[o].marks.length&&r[o].marks.every(s=>Uh(i.attributes[s.type.name]||{},s.attrs)))},ds=(e,r)=>{if(e instanceof At&&!(r instanceof Array)&&xd(e,r)){const n=bu(r);return e._length===n.length&&Uh(e.getAttributes(),r.attrs)&&e.toArray().every((i,o)=>ds(i,n[o]))}return e instanceof Tt&&r instanceof Array&&dy(e,r)},Ol=(e,r)=>e===r||e instanceof Array&&r instanceof Array&&e.length===r.length&&e.every((n,i)=>r[i]===n),Nf=(e,r,n)=>{const i=e.toArray(),o=bu(r),s=o.length,a=i.length,l=$r(a,s);let u=0,c=0,d=!1;for(;u<l;u++){const h=i[u],p=o[u];if(Ol(n.get(h),p))d=!0;else if(!ds(h,p))break}for(;u+c<l;c++){const h=i[a-c-1],p=o[s-c-1];if(Ol(n.get(h),p))d=!0;else if(!ds(h,p))break}return{equalityFactor:u+c,foundMappedChild:d}},P8=e=>{let r="",n=e._start;const i={};for(;n!==null;)n.deleted||(n.countable&&n.content instanceof lr?r+=n.content.str:n.content instanceof We&&(i[n.content.key]=null)),n=n.right;return{str:r,nAttrs:i}},V8=(e,r,n)=>{n.set(e,r);const{nAttrs:i,str:o}=P8(e),s=r.map(c=>({insert:c.text,attributes:Object.assign({},i,hy(c.marks))})),{insert:a,remove:l,index:u}=N8(o,s.map(c=>c.insert).join(""));e.delete(u,l),e.insert(u,a),e.applyDelta(s.map(c=>({retain:c.insert.length,attributes:c.attributes})))},hy=e=>{const r={};return e.forEach(n=>{n.type.name!=="ychange"&&(r[n.type.name]=n.attrs)}),r},Tl=(e,r,n,i)=>{if(r instanceof At&&r.nodeName!==n.type.name)throw new Error("node name mismatch!");if(i.set(r,n),r instanceof At){const h=r.getAttributes(),p=n.attrs;for(const f in p)p[f]!==null?h[f]!==p[f]&&f!=="ychange"&&r.setAttribute(f,p[f]):r.removeAttribute(f);for(const f in h)p[f]===void 0&&r.removeAttribute(f)}const o=bu(n),s=o.length,a=r.toArray(),l=a.length,u=$r(s,l);let c=0,d=0;for(;c<u;c++){const h=a[c],p=o[c];if(!Ol(i.get(h),p))if(ds(h,p))i.set(h,p);else break}for(;d+c+1<u;d++){const h=a[l-d-1],p=o[s-d-1];if(!Ol(i.get(h),p))if(ds(h,p))i.set(h,p);else break}e.transact(()=>{for(;l-c-d>0&&s-c-d>0;){const p=a[c],f=o[c],m=a[l-d-1],b=o[s-d-1];if(p instanceof Tt&&f instanceof Array)dy(p,f)||V8(p,f,i),c+=1;else{let g=p instanceof At&&xd(p,f),y=m instanceof At&&xd(m,b);if(g&&y){const v=Nf(p,f,i),k=Nf(m,b,i);v.foundMappedChild&&!k.foundMappedChild?y=!1:!v.foundMappedChild&&k.foundMappedChild||v.equalityFactor<k.equalityFactor?g=!1:y=!1}g?(Tl(e,p,f,i),c+=1):y?(Tl(e,m,b,i),d+=1):(i.delete(r.get(c)),r.delete(c,1),r.insert(c,[Ed(f,i)]),c+=1)}}const h=l-c-d;if(l===1&&s===0&&a[0]instanceof Tt?(i.delete(a[0]),a[0].delete(0,a[0].length)):h>0&&(r.slice(c,c+h).forEach(p=>i.delete(p)),r.delete(c,h)),c+d<s){const p=[];for(let f=c;f<s-d;f++)p.push(Ed(o[f],i));r.insert(c,p)}},Ke)},xd=(e,r)=>!(r instanceof Array)&&e.nodeName===r.type.name;let Vo=null;const j8=()=>{const e=Vo;Vo=null,e.forEach((r,n)=>{const i=n.state.tr,o=Ke.getState(n.state);o&&o.binding&&!o.binding.isDestroyed&&(r.forEach((s,a)=>{i.setMeta(a,s)}),n.dispatch(i))})},q8=(e,r,n)=>{Vo||(Vo=new Map,Mh(0,j8)),Sr(Vo,e,bt).set(r,n)},Ll=(e,r,n)=>{if(e===0)return ac(r,0,-1);let i=r._first===null?null:r._first.content.type;for(;i!==null&&r!==i;){if(i instanceof Tt){if(i._length>=e)return ac(i,e,-1);if(e-=i._length,i._item!==null&&i._item.next!==null)i=i._item.next.content.type;else{do i=i._item===null?null:i._item.parent,e--;while(i!==r&&i!==null&&i._item!==null&&i._item.next===null);i!==null&&i!==r&&(i=i._item===null?null:i._item.next.content.type)}}else{const o=(n.get(i)||{nodeSize:0}).nodeSize;if(i._first!==null&&e<o)i=i._first.content.type,e--;else{if(e===1&&i._length===0&&o>1)return new as(i._item===null?null:i._item.id,i._item===null?is(i):null,null);if(e-=o,i._item!==null&&i._item.next!==null)i=i._item.next.content.type;else{if(e===0)return i=i._item===null?i:i._item.parent,new as(i._item===null?null:i._item.id,i._item===null?is(i):null,null);do i=i._item.parent,e--;while(i!==r&&i._item.next===null);i!==r&&(i=i._item.next.content.type)}}}if(i===null)throw Lt();if(e===0&&i.constructor!==Tt&&i!==r)return U8(i._item.parent,i._item)}return ac(r,r._length,-1)},U8=(e,r)=>{let n=null,i=null;return e._item===null?i=is(e):n=ue(e._item.id.client,e._item.id.clock),new as(n,i,r.id)},hs=(e,r,n,i)=>{const o=x9(n,e);if(o===null||o.type!==r&&!ss(r,o.type._item))return null;let s=o.type,a=0;if(s.constructor===Tt)a=o.index;else if(s._item===null||!s._item.deleted){let l=s._first,u=0;for(;u<s._length&&u<o.index&&l!==null;){if(!l.deleted){const c=l.content.type;u++,c instanceof Tt?a+=c._length:a+=i.get(c).nodeSize}l=l.right}a+=1}for(;s!==r&&s._item!==null;){const l=s._item.parent;if(l._item===null||!l._item.deleted){a+=1;let u=l._first;for(;u!==null;){const c=u.content.type;if(c===s)break;u.deleted||(c instanceof Tt?a+=c._length:a+=i.get(c).nodeSize),u=u.right}}s=l}return a-1};function j4e(e,r){const n=r||new Cn,i=n.doc?n.doc:{transact:o=>o(void 0)};return Tl(i,n,e,new Map),n}function q4e(e){const r=e.toArray();function n(i){let o;if(!i.nodeName)o=i.toDelta().map(s=>{const a={type:"text",text:s.insert};return s.attributes&&(a.marks=Object.keys(s.attributes).map(l=>{const u=s.attributes[l],c={type:l};return Object.keys(u)&&(c.attrs=u),c})),a});else{o={type:i.nodeName};const s=i.getAttributes();Object.keys(s).length&&(o.attrs=s);const a=i.toArray();a.length&&(o.content=a.map(n).flat())}return o}return{type:"doc",content:r.map(n)}}const W8=(e,r,n)=>e!==r,K8=e=>{const r=document.createElement("span");r.classList.add("ProseMirror-yjs-cursor"),r.setAttribute("style","border-color: ".concat(e.color));const n=document.createElement("div");n.setAttribute("style","background-color: ".concat(e.color)),n.insertBefore(document.createTextNode(e.name),null);const i=document.createTextNode("⁠"),o=document.createTextNode("⁠");return r.insertBefore(i,null),r.insertBefore(n,null),r.insertBefore(o,null),r},py=e=>({style:"background-color: ".concat(e.color,"70"),class:"ProseMirror-yjs-selection"}),Z8=/^#[0-9a-fA-F]{6}$/,Of=(e,r,n,i,o)=>{const s=Ke.getState(e),a=s.doc,l=[];return s.snapshot!=null||s.prevSnapshot!=null||s.binding.mapping.size===0?ye.create(e.doc,[]):(r.getStates().forEach((u,c)=>{if(n(a.clientID,c,u)&&u.cursor!=null){const d=u.user||{};d.color==null?d.color="#ffa500":Z8.test(d.color)||console.warn("A user uses an unsupported color format",d),d.name==null&&(d.name="User: ".concat(c));let h=hs(a,s.type,Po(u.cursor.anchor),s.binding.mapping),p=hs(a,s.type,Po(u.cursor.head),s.binding.mapping);if(h!==null&&p!==null){const f=ar(e.doc.content.size-1,0);h=$r(h,f),p=$r(p,f),l.push(ze.widget(p,()=>i(d),{key:c+"",side:10}));const m=$r(h,p),b=ar(h,p);l.push(ze.inline(m,b,o(d),{inclusiveEnd:!0,inclusiveStart:!1}))}}}),ye.create(e.doc,l))},G8=(e,{awarenessStateFilter:r=W8,cursorBuilder:n=K8,selectionBuilder:i=py,getSelection:o=a=>a.selection}={},s="cursor")=>new fe({key:Qs,state:{init(a,l){return Of(l,e,r,n,i)},apply(a,l,u,c){const d=Ke.getState(c),h=a.getMeta(Qs);return d&&d.isChangeOrigin||h&&h.awarenessUpdated?Of(c,e,r,n,i):l.map(a.mapping,a.doc)}},props:{decorations:a=>Qs.getState(a)},view:a=>{const l=()=>{a.docView&&q8(a,Qs,{awarenessUpdated:!0})},u=()=>{const c=Ke.getState(a.state),d=e.getLocalState()||{};if(a.hasFocus()){const h=o(a.state),p=Ll(h.anchor,c.type,c.binding.mapping),f=Ll(h.head,c.type,c.binding.mapping);(d.cursor==null||!bf(Po(d.cursor.anchor),p)||!bf(Po(d.cursor.head),f))&&e.setLocalStateField(s,{anchor:p,head:f})}else d.cursor!=null&&hs(c.doc,c.type,Po(d.cursor.anchor),c.binding.mapping)!==null&&e.setLocalStateField(s,null)};return e.on("change",l),a.dom.addEventListener("focusin",u),a.dom.addEventListener("focusout",u),{update:u,destroy:()=>{a.dom.removeEventListener("focusin",u),a.dom.removeEventListener("focusout",u),e.off("change",l),e.setLocalStateField(s,null)}}}}),Tf=e=>Array.from(e.entries()).map(([r,n])=>({clientId:r,...n.user})),Lf=()=>null,J8=Me.create({name:"collaborationCursor",priority:999,addOptions(){return{provider:null,user:{name:null,color:null},render:e=>{const r=document.createElement("span");r.classList.add("collaboration-cursor__caret"),r.setAttribute("style","border-color: ".concat(e.color));const n=document.createElement("div");return n.classList.add("collaboration-cursor__label"),n.setAttribute("style","background-color: ".concat(e.color)),n.insertBefore(document.createTextNode(e.name),null),r.insertBefore(n,null),r},selectionRender:py,onUpdate:Lf}},onCreate(){if(this.options.onUpdate!==Lf&&console.warn('[tiptap warn]: DEPRECATED: The "onUpdate" option is deprecated. Please use `editor.storage.collaborationCursor.users` instead. Read more: https://tiptap.dev/api/extensions/collaboration-cursor'),!this.options.provider)throw new Error('The "provider" option is required for the CollaborationCursor extension')},addStorage(){return{users:[]}},addCommands(){return{updateUser:e=>()=>(this.options.user=e,this.options.provider.awareness.setLocalStateField("user",this.options.user),!0),user:e=>({editor:r})=>(console.warn('[tiptap warn]: DEPRECATED: The "user" command is deprecated. Please use "updateUser" instead. Read more: https://tiptap.dev/api/extensions/collaboration-cursor'),r.commands.updateUser(e))}},addProseMirrorPlugins(){return[G8((this.options.provider.awareness.setLocalStateField("user",this.options.user),this.storage.users=Tf(this.options.provider.awareness.states),this.options.provider.awareness.on("update",()=>{this.storage.users=Tf(this.options.provider.awareness.states)}),this.options.provider.awareness),{cursorBuilder:this.options.render,selectionBuilder:this.options.selectionRender})]}});function X8(e){setTimeout(()=>{const r=document.getElementById("collaboration-cursor__label__".concat(e));r&&(r.classList.add("collaboration-cursor__label__active"),setTimeout(()=>{r==null||r.classList.remove("collaboration-cursor__label__active")},50))},50)}function If(){return Math.floor(Date.now()/1e3)}const U4e=J8.extend({addOptions(){return{provider:null,user:{name:null,clientId:null,color:null,lastUpdate:If()},render:e=>{const r=document.createElement("span");r.classList.add("collaboration-cursor__caret"),r.setAttribute("style","border-color: ".concat(e.color));const n=document.createElement("div");return n.classList.add("collaboration-cursor__label"),n.id="collaboration-cursor__label__".concat(e.clientId),n.setAttribute("style","background-color: ".concat(e.color)),n.insertBefore(document.createTextNode(e.name),null),r.insertBefore(n,null),r}}},onCreate(){this.options.provider.awareness.on("change",({added:e,removed:r,updated:n},i)=>{if(i!=="local")for(const o of[...e,...n])o!==this.options.user.clientId&&X8(o)})},onTransaction({transaction:e}){var i;const{updated:r,meta:n}=e;r&&((i=n.addToHistory)==null||i)&&!n.pointer&&(this.options.user.lastUpdate=If(),this.options.provider.awareness.setLocalStateField("user",this.options.user))}});function Q8(e){var r;const{char:n,allowSpaces:i,allowedPrefixes:o,startOfLine:s,$position:a}=e,l=Bx(n),u=new RegExp("\\s".concat(l,"$")),c=s?"^":"",d=i?new RegExp("".concat(c).concat(l,".*?(?=\\s").concat(l,"|$)"),"gm"):new RegExp("".concat(c,"(?:^)?").concat(l,"[^\\s").concat(l,"]*"),"gm"),h=((r=a.nodeBefore)===null||r===void 0?void 0:r.isText)&&a.nodeBefore.text;if(!h)return null;const p=a.pos-h.length,f=Array.from(h.matchAll(d)).pop();if(!f||f.input===void 0||f.index===void 0)return null;const m=f.input.slice(Math.max(0,f.index-1),f.index),b=new RegExp("^[".concat(o==null?void 0:o.join(""),"\0]?$")).test(m);if(o!==null&&!b)return null;const g=p+f.index;let y=g+f[0].length;return i&&u.test(h.slice(y-1,y+1))&&(f[0]+=" ",y+=1),g<a.pos&&y>=a.pos?{range:{from:g,to:y},query:f[0].slice(n.length),text:f[0]}:null}const Y8=new ve("suggestion");function Wh({pluginKey:e=Y8,editor:r,char:n="@",allowSpaces:i=!1,allowedPrefixes:o=[" "],startOfLine:s=!1,decorationTag:a="span",decorationClass:l="suggestion",command:u=()=>null,items:c=()=>[],render:d=()=>({}),allow:h=()=>!0,findSuggestionMatch:p=Q8}){let f;const m=d==null?void 0:d(),b=new fe({key:e,view(){return{update:async(g,y)=>{var v,k,C,A,_,S,L;const D=(v=this.key)===null||v===void 0?void 0:v.getState(y),P=(k=this.key)===null||k===void 0?void 0:k.getState(g.state),U=D.active&&P.active&&D.range.from!==P.range.from,J=!D.active&&P.active,Z=D.active&&!P.active,F=!J&&!Z&&D.query!==P.query,T=J||U&&F,Y=F||U,w=Z||U&&F;if(!T&&!Y&&!w)return;const E=w&&!T?D:P,R=g.dom.querySelector('[data-decoration-id="'.concat(E.decorationId,'"]'));f={editor:r,range:E.range,query:E.query,text:E.text,items:[],command:B=>u({editor:r,range:E.range,props:B}),decorationNode:R,clientRect:R?()=>{var B;const{decorationId:I}=(B=this.key)===null||B===void 0?void 0:B.getState(r.state),V=g.dom.querySelector('[data-decoration-id="'.concat(I,'"]'));return(V==null?void 0:V.getBoundingClientRect())||null}:null},T&&((C=m==null?void 0:m.onBeforeStart)===null||C===void 0||C.call(m,f)),Y&&((A=m==null?void 0:m.onBeforeUpdate)===null||A===void 0||A.call(m,f)),(Y||T)&&(f.items=await c({editor:r,query:E.query})),w&&((_=m==null?void 0:m.onExit)===null||_===void 0||_.call(m,f)),Y&&((S=m==null?void 0:m.onUpdate)===null||S===void 0||S.call(m,f)),T&&((L=m==null?void 0:m.onStart)===null||L===void 0||L.call(m,f))},destroy:()=>{var g;f&&((g=m==null?void 0:m.onExit)===null||g===void 0||g.call(m,f))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(g,y,v,k){const{isEditable:C}=r,{composing:A}=r.view,{selection:_}=g,{empty:S,from:L}=_,D={...y};if(D.composing=A,C&&(S||r.view.composing)){(L<y.range.from||L>y.range.to)&&!A&&!y.composing&&(D.active=!1);const P=p({char:n,allowSpaces:i,allowedPrefixes:o,startOfLine:s,$position:_.$from}),U="id_".concat(Math.floor(Math.random()*4294967295));P&&h({editor:r,state:k,range:P.range,isActive:y.active})?(D.active=!0,D.decorationId=y.decorationId?y.decorationId:U,D.range=P.range,D.query=P.query,D.text=P.text):D.active=!1}else D.active=!1;return D.active||(D.decorationId=null,D.range={from:0,to:0},D.query=null,D.text=null),D}},props:{handleKeyDown(g,y){var v;const{active:k,range:C}=b.getState(g.state);return k&&((v=m==null?void 0:m.onKeyDown)===null||v===void 0?void 0:v.call(m,{view:g,event:y,range:C}))||!1},decorations(g){const{active:y,range:v,decorationId:k}=b.getState(g);return y?ye.create(g.doc,[ze.inline(v.from,v.to,{nodeName:a,class:l,"data-decoration-id":k})]):null}}});return b}const eN=new ve("emoji"),tN=Fe.create({name:"emoji",addOptions(){return{HTMLAttributes:{},suggestion:{char:":",allowedPrefixes:[" "],pluginKey:eN}}},content:"text*",addCommands(){return{emoji:e=>({commands:r})=>r.insertContent(e.native+" ")}},addProseMirrorPlugins(){return[Wh({editor:this.editor,...this.options.suggestion})]}});let dc=!1;const Ys=({editor:e})=>{var i;const r=(i=window._nc_focus_trap)!=null?i:[],n=r[r.length-1];e.can().sinkListItem("listItem")||e.can().goToNextCell()||e.can().goToPreviousCell()?(n==null||n.pause(),dc=!0):dc&&(dc=!1,n==null||n.unpause())},rN=({editor:e})=>{var n,i;const r=(n=window._nc_focus_trap)!=null?n:[];(i=r[r.length-1])==null||i.unpause()},W4e=Me.create({name:"focustrap",onFocus:Ys,onBlur:rN,onSelectionUpdate:Ys,onTransaction:Ys,onUpdate:Ys});Me.create({name:"customkeymap",addKeyboardShortcuts(){return this.options},addProseMirrorPlugins(){return[new fe({props:{handleKeyDown(e,r){const n=r.key||r.keyCode;if((r.ctrlKey||r.metaKey)&&!r.shiftKey&&(n==="f"||n===70)||r.key==="Delete"&&r.ctrlKey===!0)return r.stopPropagation(),window.dispatchEvent(r),!0}}})]}});class jo{constructor(r,n,i){this.from=r,this.to=n,this.author=i}}function nN(e,r,n){const i=[],o=r.mapping;for(let s=0;s<e.length;s++){const a=e[s],l=o.map(a.from,1),u=o.map(a.to,-1);l<u&&i.push(new jo(l,u,a.author))}for(let s=0;s<o.maps.length;s++){const a=o.maps[s],l=o.slice(s+1);a.forEach((u,c,d,h)=>{iN(i,l.map(d,1),l.map(h,-1),n[s])})}return i}function iN(e,r,n,i){if(r>=n)return;let o=0,s;for(;o<e.length;o++)if(s=e[o],s.author===i){if(s.to>=r)break}else if(s.to>r){if(s.from<r){const a=new jo(s.from,r,s.author);s.to>n?e.splice(o++,0,a):e[o++]=a}break}for(;s=e[o];)if(s.author===i){if(s.from>n)break;r=Math.min(r,s.from),n=Math.max(n,s.to),e.splice(o,1)}else{if(s.from>=n)break;if(s.to>n){e[o]=new jo(n,s.to,s.author);break}else e.splice(o,1)}e.splice(o,0,new jo(r,n,i))}class Kh{constructor(r){this.blameMap=r}applyTransform(r){var o;const n=(o=r.getMeta("clientID"))!=null?o:r.steps.map(s=>"self"),i=nN(this.blameMap,r,n);return new Kh(i)}}Me.create({name:"users",addOptions(){return{clientID:0,color:e=>"#"+Math.floor(Math.abs(Math.sin(e)*16777215)%16777215).toString(16)+"aa",name:e=>"Unknown user "+e}},addProseMirrorPlugins(){let e=null;return[new fe({clientID:this.options.clientID,color:this.options.color,name:this.options.name,view:r=>(e=r,{}),state:{init(r,n){return{tracked:new Kh([new jo(0,n.doc.content.size,null)],[],[],[]),deco:ye.empty}},apply(r,n,i,o){let{tracked:s,decos:a}=n,l=this.getState(i).tracked;return r.docChanged&&(r.getMeta("clientID")||r.setMeta("clientID",r.steps.map(u=>this.spec.clientID)),e.composing||(s=s.applyTransform(r),l=s)),a=l.blameMap.map(u=>{const c=u.author;return ze.inline(u.from,u.to,{class:"author-annotation",style:"background-color: "+this.spec.color(c)+"66;",title:this.spec.name(c)})}).filter(u=>u!==null),{tracked:s,deco:ye.create(o.doc,a)}}},props:{decorations(r){return this.getState(r).deco}}})]}});const Rf={};function oN(e){let r=Rf[e];if(r)return r;r=Rf[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);r.push(i)}for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);r[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2)}return r}function so(e,r){typeof r!="string"&&(r=so.defaultChars);const n=oN(r);return e.replace(/(%[a-f0-9]{2})+/gi,function(i){let o="";for(let s=0,a=i.length;s<a;s+=3){const l=parseInt(i.slice(s+1,s+3),16);if(l<128){o+=n[l];continue}if((l&224)===192&&s+3<a){const u=parseInt(i.slice(s+4,s+6),16);if((u&192)===128){const c=l<<6&1984|u&63;c<128?o+="��":o+=String.fromCharCode(c),s+=3;continue}}if((l&240)===224&&s+6<a){const u=parseInt(i.slice(s+4,s+6),16),c=parseInt(i.slice(s+7,s+9),16);if((u&192)===128&&(c&192)===128){const d=l<<12&61440|u<<6&4032|c&63;d<2048||d>=55296&&d<=57343?o+="���":o+=String.fromCharCode(d),s+=6;continue}}if((l&248)===240&&s+9<a){const u=parseInt(i.slice(s+4,s+6),16),c=parseInt(i.slice(s+7,s+9),16),d=parseInt(i.slice(s+10,s+12),16);if((u&192)===128&&(c&192)===128&&(d&192)===128){let h=l<<18&1835008|u<<12&258048|c<<6&4032|d&63;h<65536||h>1114111?o+="����":(h-=65536,o+=String.fromCharCode(55296+(h>>10),56320+(h&1023))),s+=9;continue}}o+="�"}return o})}so.defaultChars=";/?:@&=+$,#",so.componentChars="";const zf={};function sN(e){let r=zf[e];if(r)return r;r=zf[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);/^[0-9a-z]$/i.test(i)?r.push(i):r.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)r[e.charCodeAt(n)]=e[n];return r}function ps(e,r,n){typeof r!="string"&&(n=r,r=ps.defaultChars),typeof n>"u"&&(n=!0);const i=sN(r);let o="";for(let s=0,a=e.length;s<a;s++){const l=e.charCodeAt(s);if(n&&l===37&&s+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(s+1,s+3))){o+=e.slice(s,s+3),s+=2;continue}if(l<128){o+=i[l];continue}if(l>=55296&&l<=57343){if(l>=55296&&l<=56319&&s+1<a){const u=e.charCodeAt(s+1);if(u>=56320&&u<=57343){o+=encodeURIComponent(e[s]+e[s+1]),s++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[s])}return o}ps.defaultChars=";/?:@&=+$,-_.!~*'()#",ps.componentChars="-_.!~*'()";function Zh(e){let r="";return r+=e.protocol||"",r+=e.slashes?"//":"",r+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?r+="["+e.hostname+"]":r+=e.hostname||"",r+=e.port?":"+e.port:"",r+=e.pathname||"",r+=e.search||"",r+=e.hash||"",r}function Il(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const aN=/^([a-z0-9.+-]+:)/i,lN=/:[0-9]*$/,uN=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,cN=["<",">",'"',"`"," ","\r","\n","	"],dN=["{","}","|","\\","^","`"].concat(cN),hN=["'"].concat(dN),$f=["%","/","?",";","#"].concat(hN),Hf=["/","?","#"],pN=255,Pf=/^[+a-z0-9A-Z_-]{0,63}$/,fN=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Vf={javascript:!0,"javascript:":!0},jf={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Gh(e,r){if(e&&e instanceof Il)return e;const n=new Il;return n.parse(e,r),n}Il.prototype.parse=function(e,r){let n,i,o,s=e;if(s=s.trim(),!r&&e.split("#").length===1){const c=uN.exec(s);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let a=aN.exec(s);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,s=s.substr(a.length)),(r||a||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=s.substr(0,2)==="//",o&&!(a&&Vf[a])&&(s=s.substr(2),this.slashes=!0)),!Vf[a]&&(o||a&&!jf[a])){let c=-1;for(let m=0;m<Hf.length;m++)i=s.indexOf(Hf[m]),i!==-1&&(c===-1||i<c)&&(c=i);let d,h;c===-1?h=s.lastIndexOf("@"):h=s.lastIndexOf("@",c),h!==-1&&(d=s.slice(0,h),s=s.slice(h+1),this.auth=d),c=-1;for(let m=0;m<$f.length;m++)i=s.indexOf($f[m]),i!==-1&&(c===-1||i<c)&&(c=i);c===-1&&(c=s.length),s[c-1]===":"&&c--;const p=s.slice(0,c);s=s.slice(c),this.parseHost(p),this.hostname=this.hostname||"";const f=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!f){const m=this.hostname.split(/\./);for(let b=0,g=m.length;b<g;b++){const y=m[b];if(y&&!y.match(Pf)){let v="";for(let k=0,C=y.length;k<C;k++)y.charCodeAt(k)>127?v+="x":v+=y[k];if(!v.match(Pf)){const k=m.slice(0,b),C=m.slice(b+1),A=y.match(fN);A&&(k.push(A[1]),C.unshift(A[2])),C.length&&(s=C.join(".")+s),this.hostname=k.join(".");break}}}}this.hostname.length>pN&&(this.hostname=""),f&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=s.indexOf("#");l!==-1&&(this.hash=s.substr(l),s=s.slice(0,l));const u=s.indexOf("?");return u!==-1&&(this.search=s.substr(u),s=s.slice(0,u)),s&&(this.pathname=s),jf[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Il.prototype.parseHost=function(e){let r=lN.exec(e);r&&(r=r[0],r!==":"&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)};const mN=Object.freeze(Object.defineProperty({__proto__:null,decode:so,encode:ps,format:Zh,parse:Gh},Symbol.toStringTag,{value:"Module"})),fy=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,my=/[\0-\x1F\x7F-\x9F]/,gN=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Jh=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,gy=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,by=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,bN=Object.freeze(Object.defineProperty({__proto__:null,Any:fy,Cc:my,Cf:gN,P:Jh,S:gy,Z:by},Symbol.toStringTag,{value:"Module"})),yN=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),CN=new Uint16Array("Ȁaglq	\x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var hc;const vN=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),kN=(hc=String.fromCodePoint)!==null&&hc!==void 0?hc:function(e){let r="";return e>65535&&(e-=65536,r+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),r+=String.fromCharCode(e),r};function wN(e){var r;return e>=55296&&e<=57343||e>1114111?65533:(r=vN.get(e))!==null&&r!==void 0?r:e}var et;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(et||(et={}));const AN=32;var sn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(sn||(sn={}));function Dd(e){return e>=et.ZERO&&e<=et.NINE}function _N(e){return e>=et.UPPER_A&&e<=et.UPPER_F||e>=et.LOWER_A&&e<=et.LOWER_F}function EN(e){return e>=et.UPPER_A&&e<=et.UPPER_Z||e>=et.LOWER_A&&e<=et.LOWER_Z||Dd(e)}function xN(e){return e===et.EQUALS||EN(e)}var Je;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Je||(Je={}));var Qr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Qr||(Qr={}));class DN{constructor(r,n,i){this.decodeTree=r,this.emitCodePoint=n,this.errors=i,this.state=Je.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Qr.Strict}startEntity(r){this.decodeMode=r,this.state=Je.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(r,n){switch(this.state){case Je.EntityStart:return r.charCodeAt(n)===et.NUM?(this.state=Je.NumericStart,this.consumed+=1,this.stateNumericStart(r,n+1)):(this.state=Je.NamedEntity,this.stateNamedEntity(r,n));case Je.NumericStart:return this.stateNumericStart(r,n);case Je.NumericDecimal:return this.stateNumericDecimal(r,n);case Je.NumericHex:return this.stateNumericHex(r,n);case Je.NamedEntity:return this.stateNamedEntity(r,n)}}stateNumericStart(r,n){return n>=r.length?-1:(r.charCodeAt(n)|AN)===et.LOWER_X?(this.state=Je.NumericHex,this.consumed+=1,this.stateNumericHex(r,n+1)):(this.state=Je.NumericDecimal,this.stateNumericDecimal(r,n))}addToNumericResult(r,n,i,o){if(n!==i){const s=i-n;this.result=this.result*Math.pow(o,s)+parseInt(r.substr(n,s),o),this.consumed+=s}}stateNumericHex(r,n){const i=n;for(;n<r.length;){const o=r.charCodeAt(n);if(Dd(o)||_N(o))n+=1;else return this.addToNumericResult(r,i,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(r,i,n,16),-1}stateNumericDecimal(r,n){const i=n;for(;n<r.length;){const o=r.charCodeAt(n);if(Dd(o))n+=1;else return this.addToNumericResult(r,i,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(r,i,n,10),-1}emitNumericEntity(r,n){var i;if(this.consumed<=n)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(r===et.SEMI)this.consumed+=1;else if(this.decodeMode===Qr.Strict)return 0;return this.emitCodePoint(wN(this.result),this.consumed),this.errors&&(r!==et.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(r,n){const{decodeTree:i}=this;let o=i[this.treeIndex],s=(o&sn.VALUE_LENGTH)>>14;for(;n<r.length;n++,this.excess++){const a=r.charCodeAt(n);if(this.treeIndex=SN(i,o,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Qr.Attribute&&(s===0||xN(a))?0:this.emitNotTerminatedNamedEntity();if(o=i[this.treeIndex],s=(o&sn.VALUE_LENGTH)>>14,s!==0){if(a===et.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Qr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var r;const{result:n,decodeTree:i}=this,o=(i[n]&sn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(r=this.errors)===null||r===void 0||r.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(r,n,i){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[r]&~sn.VALUE_LENGTH:o[r+1],i),n===3&&this.emitCodePoint(o[r+2],i),i}end(){var r;switch(this.state){case Je.NamedEntity:return this.result!==0&&(this.decodeMode!==Qr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Je.NumericDecimal:return this.emitNumericEntity(0,2);case Je.NumericHex:return this.emitNumericEntity(0,3);case Je.NumericStart:return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Je.EntityStart:return 0}}}function yy(e){let r="";const n=new DN(e,i=>r+=kN(i));return function(i,o){let s=0,a=0;for(;(a=i.indexOf("&",a))>=0;){r+=i.slice(s,a),n.startEntity(o);const u=n.write(i,a+1);if(u<0){s=a+n.end();break}s=a+u,a=u===0?s+1:s}const l=r+i.slice(s);return r="",l}}function SN(e,r,n,i){const o=(r&sn.BRANCH_LENGTH)>>7,s=r&sn.JUMP_TABLE;if(o===0)return s!==0&&i===s?n:-1;if(s){const u=i-s;return u<0||u>=o?-1:e[n+u]-1}let a=n,l=a+o-1;for(;a<=l;){const u=a+l>>>1,c=e[u];if(c<i)a=u+1;else if(c>i)l=u-1;else return e[u+o]}return-1}const BN=yy(yN);yy(CN);function Cy(e,r=Qr.Legacy){return BN(e,r)}function MN(e){return Object.prototype.toString.call(e)}function Xh(e){return MN(e)==="[object String]"}const FN=Object.prototype.hasOwnProperty;function NN(e,r){return FN.call(e,r)}function yu(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(n){e[n]=r[n]})}}),e}function vy(e,r,n){return[].concat(e.slice(0,r),n,e.slice(r+1))}function Qh(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Rl(e){if(e>65535){e-=65536;const r=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(r,n)}return String.fromCharCode(e)}const ky=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,ON=/&([a-z#][a-z0-9]{1,31});/gi,TN=new RegExp(ky.source+"|"+ON.source,"gi"),LN=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function IN(e,r){if(r.charCodeAt(0)===35&&LN.test(r)){const i=r[1].toLowerCase()==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10);return Qh(i)?Rl(i):e}const n=Cy(e);return n!==e?n:e}function RN(e){return e.indexOf("\\")<0?e:e.replace(ky,"$1")}function ao(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(TN,function(r,n,i){return n||IN(r,i)})}const zN=/[&<>"]/,$N=/[&<>"]/g,HN={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function PN(e){return HN[e]}function Yr(e){return zN.test(e)?e.replace($N,PN):e}const VN=/[.?*+^$[\]\\(){}|-]/g;function jN(e){return e.replace(VN,"\\$&")}function Oe(e){switch(e){case 9:case 32:return!0}return!1}function fs(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function ms(e){return Jh.test(e)||gy.test(e)}function gs(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Cu(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const qN={mdurl:mN,ucmicro:bN},UN=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:vy,assign:yu,escapeHtml:Yr,escapeRE:jN,fromCodePoint:Rl,has:NN,isMdAsciiPunct:gs,isPunctChar:ms,isSpace:Oe,isString:Xh,isValidEntityCode:Qh,isWhiteSpace:fs,lib:qN,normalizeReference:Cu,unescapeAll:ao,unescapeMd:RN},Symbol.toStringTag,{value:"Module"}));function WN(e,r,n){let i,o,s,a;const l=e.posMax,u=e.pos;for(e.pos=r+1,i=1;e.pos<l;){if(s=e.src.charCodeAt(e.pos),s===93&&(i--,i===0)){o=!0;break}if(a=e.pos,e.md.inline.skipToken(e),s===91){if(a===e.pos-1)i++;else if(n)return e.pos=u,-1}}let c=-1;return o&&(c=e.pos),e.pos=u,c}function KN(e,r,n){let i,o=r;const s={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<n;){if(i=e.charCodeAt(o),i===10||i===60)return s;if(i===62)return s.pos=o+1,s.str=ao(e.slice(r+1,o)),s.ok=!0,s;if(i===92&&o+1<n){o+=2;continue}o++}return s}let a=0;for(;o<n&&(i=e.charCodeAt(o),!(i===32||i<32||i===127));){if(i===92&&o+1<n){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(i===40&&(a++,a>32))return s;if(i===41){if(a===0)break;a--}o++}return r===o||a!==0||(s.str=ao(e.slice(r,o)),s.pos=o,s.ok=!0),s}function ZN(e,r,n,i){let o,s=r;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)a.str=i.str,a.marker=i.marker;else{if(s>=n)return a;let l=e.charCodeAt(s);if(l!==34&&l!==39&&l!==40)return a;r++,s++,l===40&&(l=41),a.marker=l}for(;s<n;){if(o=e.charCodeAt(s),o===a.marker)return a.pos=s+1,a.str+=ao(e.slice(r,s)),a.ok=!0,a;if(o===40&&a.marker===41)return a;o===92&&s+1<n&&s++,s++}return a.can_continue=!0,a.str+=ao(e.slice(r,s)),a}const GN=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:KN,parseLinkLabel:WN,parseLinkTitle:ZN},Symbol.toStringTag,{value:"Module"})),dr={};dr.code_inline=function(e,r,n,i,o){const s=e[r];return"<code"+o.renderAttrs(s)+">"+Yr(s.content)+"</code>"},dr.code_block=function(e,r,n,i,o){const s=e[r];return"<pre"+o.renderAttrs(s)+"><code>"+Yr(e[r].content)+"</code></pre>\n"},dr.fence=function(e,r,n,i,o){const s=e[r],a=s.info?ao(s.info).trim():"";let l="",u="";if(a){const d=a.split(/(\s+)/g);l=d[0],u=d.slice(2).join("")}let c;if(n.highlight?c=n.highlight(s.content,l,u)||Yr(s.content):c=Yr(s.content),c.indexOf("<pre")===0)return c+"\n";if(a){const d=s.attrIndex("class"),h=s.attrs?s.attrs.slice():[];d<0?h.push(["class",n.langPrefix+l]):(h[d]=h[d].slice(),h[d][1]+=" "+n.langPrefix+l);const p={attrs:h};return"<pre><code".concat(o.renderAttrs(p),">").concat(c,"</code></pre>\n")}return"<pre><code".concat(o.renderAttrs(s),">").concat(c,"</code></pre>\n")},dr.image=function(e,r,n,i,o){const s=e[r];return s.attrs[s.attrIndex("alt")][1]=o.renderInlineAsText(s.children,n,i),o.renderToken(e,r,n)},dr.hardbreak=function(e,r,n){return n.xhtmlOut?"<br />\n":"<br>\n"},dr.softbreak=function(e,r,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},dr.text=function(e,r){return Yr(e[r].content)},dr.html_block=function(e,r){return e[r].content},dr.html_inline=function(e,r){return e[r].content};function Ei(){this.rules=yu({},dr)}Ei.prototype.renderAttrs=function(e){let r,n,i;if(!e.attrs)return"";for(i="",r=0,n=e.attrs.length;r<n;r++)i+=" "+Yr(e.attrs[r][0])+'="'+Yr(e.attrs[r][1])+'"';return i},Ei.prototype.renderToken=function(e,r,n){const i=e[r];let o="";if(i.hidden)return"";i.block&&i.nesting!==-1&&r&&e[r-1].hidden&&(o+="\n"),o+=(i.nesting===-1?"</":"<")+i.tag,o+=this.renderAttrs(i),i.nesting===0&&n.xhtmlOut&&(o+=" /");let s=!1;if(i.block&&(s=!0,i.nesting===1&&r+1<e.length)){const a=e[r+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===i.tag)&&(s=!1)}return o+=s?">\n":">",o},Ei.prototype.renderInline=function(e,r,n){let i="";const o=this.rules;for(let s=0,a=e.length;s<a;s++){const l=e[s].type;typeof o[l]<"u"?i+=o[l](e,s,r,n,this):i+=this.renderToken(e,s,r)}return i},Ei.prototype.renderInlineAsText=function(e,r,n){let i="";for(let o=0,s=e.length;o<s;o++)switch(e[o].type){case"text":i+=e[o].content;break;case"image":i+=this.renderInlineAsText(e[o].children,r,n);break;case"html_inline":case"html_block":i+=e[o].content;break;case"softbreak":case"hardbreak":i+="\n";break}return i},Ei.prototype.render=function(e,r,n){let i="";const o=this.rules;for(let s=0,a=e.length;s<a;s++){const l=e[s].type;l==="inline"?i+=this.renderInline(e[s].children,r,n):typeof o[l]<"u"?i+=o[l](e,s,r,n,this):i+=this.renderToken(e,s,r,n)}return i};function vt(){this.__rules__=[],this.__cache__=null}vt.prototype.__find__=function(e){for(let r=0;r<this.__rules__.length;r++)if(this.__rules__[r].name===e)return r;return-1},vt.prototype.__compile__=function(){const e=this,r=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(i){r.indexOf(i)<0&&r.push(i)})}),e.__cache__={},r.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(i){i.enabled&&(n&&i.alt.indexOf(n)<0||e.__cache__[n].push(i.fn))})})},vt.prototype.at=function(e,r,n){const i=this.__find__(e),o=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__[i].fn=r,this.__rules__[i].alt=o.alt||[],this.__cache__=null},vt.prototype.before=function(e,r,n,i){const o=this.__find__(e),s=i||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:r,enabled:!0,fn:n,alt:s.alt||[]}),this.__cache__=null},vt.prototype.after=function(e,r,n,i){const o=this.__find__(e),s=i||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:r,enabled:!0,fn:n,alt:s.alt||[]}),this.__cache__=null},vt.prototype.push=function(e,r,n){const i=n||{};this.__rules__.push({name:e,enabled:!0,fn:r,alt:i.alt||[]}),this.__cache__=null},vt.prototype.enable=function(e,r){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(i){const o=this.__find__(i);if(o<0){if(r)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[o].enabled=!0,n.push(i)},this),this.__cache__=null,n},vt.prototype.enableOnly=function(e,r){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,r)},vt.prototype.disable=function(e,r){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(i){const o=this.__find__(i);if(o<0){if(r)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[o].enabled=!1,n.push(i)},this),this.__cache__=null,n},vt.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function er(e,r,n){this.type=e,this.tag=r,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}er.prototype.attrIndex=function(e){if(!this.attrs)return-1;const r=this.attrs;for(let n=0,i=r.length;n<i;n++)if(r[n][0]===e)return n;return-1},er.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},er.prototype.attrSet=function(e,r){const n=this.attrIndex(e),i=[e,r];n<0?this.attrPush(i):this.attrs[n]=i},er.prototype.attrGet=function(e){const r=this.attrIndex(e);let n=null;return r>=0&&(n=this.attrs[r][1]),n},er.prototype.attrJoin=function(e,r){const n=this.attrIndex(e);n<0?this.attrPush([e,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r};function wy(e,r,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=r}wy.prototype.Token=er;const JN=/\r\n?|\n/g,XN=/\0/g;function QN(e){let r;r=e.src.replace(JN,"\n"),r=r.replace(XN,"�"),e.src=r}function YN(e){let r;e.inlineMode?(r=new e.Token("inline","",0),r.content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function eO(e){const r=e.tokens;for(let n=0,i=r.length;n<i;n++){const o=r[n];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function tO(e){return/^<a[>\s]/i.test(e)}function rO(e){return/^<\/a\s*>/i.test(e)}function nO(e){const r=e.tokens;if(e.md.options.linkify)for(let n=0,i=r.length;n<i;n++){if(r[n].type!=="inline"||!e.md.linkify.pretest(r[n].content))continue;let o=r[n].children,s=0;for(let a=o.length-1;a>=0;a--){const l=o[a];if(l.type==="link_close"){for(a--;o[a].level!==l.level&&o[a].type!=="link_open";)a--;continue}if(l.type==="html_inline"&&(tO(l.content)&&s>0&&s--,rO(l.content)&&s++),!(s>0)&&l.type==="text"&&e.md.linkify.test(l.content)){const u=l.content;let c=e.md.linkify.match(u);const d=[];let h=l.level,p=0;c.length>0&&c[0].index===0&&a>0&&o[a-1].type==="text_special"&&(c=c.slice(1));for(let f=0;f<c.length;f++){const m=c[f].url,b=e.md.normalizeLink(m);if(!e.md.validateLink(b))continue;let g=c[f].text;c[f].schema?c[f].schema==="mailto:"&&!/^mailto:/i.test(g)?g=e.md.normalizeLinkText("mailto:"+g).replace(/^mailto:/,""):g=e.md.normalizeLinkText(g):g=e.md.normalizeLinkText("http://"+g).replace(/^http:\/\//,"");const y=c[f].index;if(y>p){const A=new e.Token("text","",0);A.content=u.slice(p,y),A.level=h,d.push(A)}const v=new e.Token("link_open","a",1);v.attrs=[["href",b]],v.level=h++,v.markup="linkify",v.info="auto",d.push(v);const k=new e.Token("text","",0);k.content=g,k.level=h,d.push(k);const C=new e.Token("link_close","a",-1);C.level=--h,C.markup="linkify",C.info="auto",d.push(C),p=c[f].lastIndex}if(p<u.length){const f=new e.Token("text","",0);f.content=u.slice(p),f.level=h,d.push(f)}r[n].children=o=vy(o,a,d)}}}}const Ay=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,iO=/\((c|tm|r)\)/i,oO=/\((c|tm|r)\)/ig,sO={c:"©",r:"®",tm:"™"};function aO(e,r){return sO[r.toLowerCase()]}function lO(e){let r=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!r&&(i.content=i.content.replace(oO,aO)),i.type==="link_open"&&i.info==="auto"&&r--,i.type==="link_close"&&i.info==="auto"&&r++}}function uO(e){let r=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!r&&Ay.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),i.type==="link_open"&&i.info==="auto"&&r--,i.type==="link_close"&&i.info==="auto"&&r++}}function cO(e){let r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)e.tokens[r].type==="inline"&&(iO.test(e.tokens[r].content)&&lO(e.tokens[r].children),Ay.test(e.tokens[r].content)&&uO(e.tokens[r].children))}const dO=/['"]/,qf=/['"]/g,Uf="’";function ea(e,r,n){return e.slice(0,r)+n+e.slice(r+1)}function hO(e,r){let n;const i=[];for(let o=0;o<e.length;o++){const s=e[o],a=e[o].level;for(n=i.length-1;n>=0&&!(i[n].level<=a);n--);if(i.length=n+1,s.type!=="text")continue;let l=s.content,u=0,c=l.length;e:for(;u<c;){qf.lastIndex=u;const d=qf.exec(l);if(!d)break;let h=!0,p=!0;u=d.index+1;const f=d[0]==="'";let m=32;if(d.index-1>=0)m=l.charCodeAt(d.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let b=32;if(u<c)b=l.charCodeAt(u);else for(n=o+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){b=e[n].content.charCodeAt(0);break}const g=gs(m)||ms(String.fromCharCode(m)),y=gs(b)||ms(String.fromCharCode(b)),v=fs(m),k=fs(b);if(k?h=!1:y&&(v||g||(h=!1)),v?p=!1:g&&(k||y||(p=!1)),b===34&&d[0]==='"'&&m>=48&&m<=57&&(p=h=!1),h&&p&&(h=g,p=y),!h&&!p){f&&(s.content=ea(s.content,d.index,Uf));continue}if(p)for(n=i.length-1;n>=0;n--){let C=i[n];if(i[n].level<a)break;if(C.single===f&&i[n].level===a){C=i[n];let A,_;f?(A=r.md.options.quotes[2],_=r.md.options.quotes[3]):(A=r.md.options.quotes[0],_=r.md.options.quotes[1]),s.content=ea(s.content,d.index,_),e[C.token].content=ea(e[C.token].content,C.pos,A),u+=_.length-1,C.token===o&&(u+=A.length-1),l=s.content,c=l.length,i.length=n;continue e}}h?i.push({token:o,pos:d.index,single:f,level:a}):p&&f&&(s.content=ea(s.content,d.index,Uf))}}}function pO(e){if(e.md.options.typographer)for(let r=e.tokens.length-1;r>=0;r--)e.tokens[r].type!=="inline"||!dO.test(e.tokens[r].content)||hO(e.tokens[r].children,e)}function fO(e){let r,n;const i=e.tokens,o=i.length;for(let s=0;s<o;s++){if(i[s].type!=="inline")continue;const a=i[s].children,l=a.length;for(r=0;r<l;r++)a[r].type==="text_special"&&(a[r].type="text");for(r=n=0;r<l;r++)a[r].type==="text"&&r+1<l&&a[r+1].type==="text"?a[r+1].content=a[r].content+a[r+1].content:(r!==n&&(a[n]=a[r]),n++);r!==n&&(a.length=n)}}const pc=[["normalize",QN],["block",YN],["inline",eO],["linkify",nO],["replacements",cO],["smartquotes",pO],["text_join",fO]];function Sd(){this.ruler=new vt;for(let e=0;e<pc.length;e++)this.ruler.push(pc[e][0],pc[e][1])}Sd.prototype.process=function(e){const r=this.ruler.getRules("");for(let n=0,i=r.length;n<i;n++)r[n](e)},Sd.prototype.State=wy;function hr(e,r,n,i){this.src=e,this.md=r,this.env=n,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let s=0,a=0,l=0,u=0,c=o.length,d=!1;a<c;a++){const h=o.charCodeAt(a);if(!d)if(Oe(h)){l++,h===9?u+=4-u%4:u++;continue}else d=!0;(h===10||a===c-1)&&(h!==10&&a++,this.bMarks.push(s),this.eMarks.push(a),this.tShift.push(l),this.sCount.push(u),this.bsCount.push(0),d=!1,l=0,u=0,s=a+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}hr.prototype.push=function(e,r,n){const i=new er(e,r,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i},hr.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},hr.prototype.skipEmptyLines=function(e){for(let r=this.lineMax;e<r&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},hr.prototype.skipSpaces=function(e){for(let r=this.src.length;e<r;e++){const n=this.src.charCodeAt(e);if(!Oe(n))break}return e},hr.prototype.skipSpacesBack=function(e,r){if(e<=r)return e;for(;e>r;)if(!Oe(this.src.charCodeAt(--e)))return e+1;return e},hr.prototype.skipChars=function(e,r){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===r;e++);return e},hr.prototype.skipCharsBack=function(e,r,n){if(e<=n)return e;for(;e>n;)if(r!==this.src.charCodeAt(--e))return e+1;return e},hr.prototype.getLines=function(e,r,n,i){if(e>=r)return"";const o=new Array(r-e);for(let s=0,a=e;a<r;a++,s++){let l=0;const u=this.bMarks[a];let c=u,d;for(a+1<r||i?d=this.eMarks[a]+1:d=this.eMarks[a];c<d&&l<n;){const h=this.src.charCodeAt(c);if(Oe(h))h===9?l+=4-(l+this.bsCount[a])%4:l++;else if(c-u<this.tShift[a])l++;else break;c++}l>n?o[s]=new Array(l-n+1).join(" ")+this.src.slice(c,d):o[s]=this.src.slice(c,d)}return o.join("")},hr.prototype.Token=er;const mO=65536;function fc(e,r){const n=e.bMarks[r]+e.tShift[r],i=e.eMarks[r];return e.src.slice(n,i)}function Wf(e){const r=[],n=e.length;let i=0,o=e.charCodeAt(i),s=!1,a=0,l="";for(;i<n;)o===124&&(s?(l+=e.substring(a,i-1),a=i):(r.push(l+e.substring(a,i)),l="",a=i+1)),s=o===92,i++,o=e.charCodeAt(i);return r.push(l+e.substring(a)),r}function gO(e,r,n,i){if(r+2>n)return!1;let o=r+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let s=e.bMarks[o]+e.tShift[o];if(s>=e.eMarks[o])return!1;const a=e.src.charCodeAt(s++);if(a!==124&&a!==45&&a!==58||s>=e.eMarks[o])return!1;const l=e.src.charCodeAt(s++);if(l!==124&&l!==45&&l!==58&&!Oe(l)||a===45&&Oe(l))return!1;for(;s<e.eMarks[o];){const C=e.src.charCodeAt(s);if(C!==124&&C!==45&&C!==58&&!Oe(C))return!1;s++}let u=fc(e,r+1),c=u.split("|");const d=[];for(let C=0;C<c.length;C++){const A=c[C].trim();if(!A){if(C===0||C===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(A))return!1;A.charCodeAt(A.length-1)===58?d.push(A.charCodeAt(0)===58?"center":"right"):A.charCodeAt(0)===58?d.push("left"):d.push("")}if(u=fc(e,r).trim(),u.indexOf("|")===-1||e.sCount[r]-e.blkIndent>=4)return!1;c=Wf(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const h=c.length;if(h===0||h!==d.length)return!1;if(i)return!0;const p=e.parentType;e.parentType="table";const f=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),b=[r,0];m.map=b;const g=e.push("thead_open","thead",1);g.map=[r,r+1];const y=e.push("tr_open","tr",1);y.map=[r,r+1];for(let C=0;C<c.length;C++){const A=e.push("th_open","th",1);d[C]&&(A.attrs=[["style","text-align:"+d[C]]]);const _=e.push("inline","",0);_.content=c[C].trim(),_.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let v,k=0;for(o=r+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let C=!1;for(let _=0,S=f.length;_<S;_++)if(f[_](e,o,n,!0)){C=!0;break}if(C||(u=fc(e,o).trim(),!u)||e.sCount[o]-e.blkIndent>=4||(c=Wf(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),k+=h-c.length,k>mO))break;if(o===r+2){const _=e.push("tbody_open","tbody",1);_.map=v=[r+2,0]}const A=e.push("tr_open","tr",1);A.map=[o,o+1];for(let _=0;_<h;_++){const S=e.push("td_open","td",1);d[_]&&(S.attrs=[["style","text-align:"+d[_]]]);const L=e.push("inline","",0);L.content=c[_]?c[_].trim():"",L.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return v&&(e.push("tbody_close","tbody",-1),v[1]=o),e.push("table_close","table",-1),b[1]=o,e.parentType=p,e.line=o,!0}function bO(e,r,n){if(e.sCount[r]-e.blkIndent<4)return!1;let i=r+1,o=i;for(;i<n;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,o=i;continue}break}e.line=o;const s=e.push("code_block","code",0);return s.content=e.getLines(r,o,4+e.blkIndent,!1)+"\n",s.map=[r,e.line],!0}function yO(e,r,n,i){let o=e.bMarks[r]+e.tShift[r],s=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||o+3>s)return!1;const a=e.src.charCodeAt(o);if(a!==126&&a!==96)return!1;let l=o;o=e.skipChars(o,a);let u=o-l;if(u<3)return!1;const c=e.src.slice(l,o),d=e.src.slice(o,s);if(a===96&&d.indexOf(String.fromCharCode(a))>=0)return!1;if(i)return!0;let h=r,p=!1;for(;h++,!(h>=n||(o=l=e.bMarks[h]+e.tShift[h],s=e.eMarks[h],o<s&&e.sCount[h]<e.blkIndent));)if(e.src.charCodeAt(o)===a&&!(e.sCount[h]-e.blkIndent>=4)&&(o=e.skipChars(o,a),!(o-l<u)&&(o=e.skipSpaces(o),!(o<s)))){p=!0;break}u=e.sCount[r],e.line=h+(p?1:0);const f=e.push("fence","code",0);return f.info=d,f.content=e.getLines(r+1,h,u,!0),f.markup=c,f.map=[r,e.line],!0}function CO(e,r,n,i){let o=e.bMarks[r]+e.tShift[r],s=e.eMarks[r];const a=e.lineMax;if(e.sCount[r]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(i)return!0;const l=[],u=[],c=[],d=[],h=e.md.block.ruler.getRules("blockquote"),p=e.parentType;e.parentType="blockquote";let f=!1,m;for(m=r;m<n;m++){const k=e.sCount[m]<e.blkIndent;if(o=e.bMarks[m]+e.tShift[m],s=e.eMarks[m],o>=s)break;if(e.src.charCodeAt(o++)===62&&!k){let A=e.sCount[m]+1,_,S;e.src.charCodeAt(o)===32?(o++,A++,S=!1,_=!0):e.src.charCodeAt(o)===9?(_=!0,(e.bsCount[m]+A)%4===3?(o++,A++,S=!1):S=!0):_=!1;let L=A;for(l.push(e.bMarks[m]),e.bMarks[m]=o;o<s;){const D=e.src.charCodeAt(o);if(Oe(D))D===9?L+=4-(L+e.bsCount[m]+(S?1:0))%4:L++;else break;o++}f=o>=s,u.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(_?1:0),c.push(e.sCount[m]),e.sCount[m]=L-A,d.push(e.tShift[m]),e.tShift[m]=o-e.bMarks[m];continue}if(f)break;let C=!1;for(let A=0,_=h.length;A<_;A++)if(h[A](e,m,n,!0)){C=!0;break}if(C){e.lineMax=m,e.blkIndent!==0&&(l.push(e.bMarks[m]),u.push(e.bsCount[m]),d.push(e.tShift[m]),c.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}l.push(e.bMarks[m]),u.push(e.bsCount[m]),d.push(e.tShift[m]),c.push(e.sCount[m]),e.sCount[m]=-1}const b=e.blkIndent;e.blkIndent=0;const g=e.push("blockquote_open","blockquote",1);g.markup=">";const y=[r,0];g.map=y,e.md.block.tokenize(e,r,m);const v=e.push("blockquote_close","blockquote",-1);v.markup=">",e.lineMax=a,e.parentType=p,y[1]=e.line;for(let k=0;k<d.length;k++)e.bMarks[k+r]=l[k],e.tShift[k+r]=d[k],e.sCount[k+r]=c[k],e.bsCount[k+r]=u[k];return e.blkIndent=b,!0}function vO(e,r,n,i){const o=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4)return!1;let s=e.bMarks[r]+e.tShift[r];const a=e.src.charCodeAt(s++);if(a!==42&&a!==45&&a!==95)return!1;let l=1;for(;s<o;){const c=e.src.charCodeAt(s++);if(c!==a&&!Oe(c))return!1;c===a&&l++}if(l<3)return!1;if(i)return!0;e.line=r+1;const u=e.push("hr","hr",0);return u.map=[r,e.line],u.markup=Array(l+1).join(String.fromCharCode(a)),!0}function Kf(e,r){const n=e.eMarks[r];let i=e.bMarks[r]+e.tShift[r];const o=e.src.charCodeAt(i++);if(o!==42&&o!==45&&o!==43)return-1;if(i<n){const s=e.src.charCodeAt(i);if(!Oe(s))return-1}return i}function Zf(e,r){const n=e.bMarks[r]+e.tShift[r],i=e.eMarks[r];let o=n;if(o+1>=i)return-1;let s=e.src.charCodeAt(o++);if(s<48||s>57)return-1;for(;;){if(o>=i)return-1;if(s=e.src.charCodeAt(o++),s>=48&&s<=57){if(o-n>=10)return-1;continue}if(s===41||s===46)break;return-1}return o<i&&(s=e.src.charCodeAt(o),!Oe(s))?-1:o}function kO(e,r){const n=e.level+2;for(let i=r+2,o=e.tokens.length-2;i<o;i++)e.tokens[i].level===n&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].hidden=!0,e.tokens[i].hidden=!0,i+=2)}function wO(e,r,n,i){let o,s,a,l,u=r,c=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let d=!1;i&&e.parentType==="paragraph"&&e.sCount[u]>=e.blkIndent&&(d=!0);let h,p,f;if((f=Zf(e,u))>=0){if(h=!0,a=e.bMarks[u]+e.tShift[u],p=Number(e.src.slice(a,f-1)),d&&p!==1)return!1}else if((f=Kf(e,u))>=0)h=!1;else return!1;if(d&&e.skipSpaces(f)>=e.eMarks[u])return!1;if(i)return!0;const m=e.src.charCodeAt(f-1),b=e.tokens.length;h?(l=e.push("ordered_list_open","ol",1),p!==1&&(l.attrs=[["start",p]])):l=e.push("bullet_list_open","ul",1);const g=[u,0];l.map=g,l.markup=String.fromCharCode(m);let y=!1;const v=e.md.block.ruler.getRules("list"),k=e.parentType;for(e.parentType="list";u<n;){s=f,o=e.eMarks[u];const C=e.sCount[u]+f-(e.bMarks[u]+e.tShift[u]);let A=C;for(;s<o;){const T=e.src.charCodeAt(s);if(T===9)A+=4-(A+e.bsCount[u])%4;else if(T===32)A++;else break;s++}const _=s;let S;_>=o?S=1:S=A-C,S>4&&(S=1);const L=C+S;l=e.push("list_item_open","li",1),l.markup=String.fromCharCode(m);const D=[u,0];l.map=D,h&&(l.info=e.src.slice(a,f-1));const P=e.tight,U=e.tShift[u],J=e.sCount[u],Z=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=L,e.tight=!0,e.tShift[u]=_-e.bMarks[u],e.sCount[u]=A,_>=o&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||y)&&(c=!1),y=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=Z,e.tShift[u]=U,e.sCount[u]=J,e.tight=P,l=e.push("list_item_close","li",-1),l.markup=String.fromCharCode(m),u=e.line,D[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let F=!1;for(let T=0,Y=v.length;T<Y;T++)if(v[T](e,u,n,!0)){F=!0;break}if(F)break;if(h){if(f=Zf(e,u),f<0)break;a=e.bMarks[u]+e.tShift[u]}else if(f=Kf(e,u),f<0)break;if(m!==e.src.charCodeAt(f-1))break}return h?l=e.push("ordered_list_close","ol",-1):l=e.push("bullet_list_close","ul",-1),l.markup=String.fromCharCode(m),g[1]=u,e.line=u,e.parentType=k,c&&kO(e,b),!0}function AO(e,r,n,i){let o=e.bMarks[r]+e.tShift[r],s=e.eMarks[r],a=r+1;if(e.sCount[r]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function l(v){const k=e.lineMax;if(v>=k||e.isEmpty(v))return null;let C=!1;if(e.sCount[v]-e.blkIndent>3&&(C=!0),e.sCount[v]<0&&(C=!0),!C){const S=e.md.block.ruler.getRules("reference"),L=e.parentType;e.parentType="reference";let D=!1;for(let P=0,U=S.length;P<U;P++)if(S[P](e,v,k,!0)){D=!0;break}if(e.parentType=L,D)return null}const A=e.bMarks[v]+e.tShift[v],_=e.eMarks[v];return e.src.slice(A,_+1)}let u=e.src.slice(o,s+1);s=u.length;let c=-1;for(o=1;o<s;o++){const v=u.charCodeAt(o);if(v===91)return!1;if(v===93){c=o;break}else if(v===10){const k=l(a);k!==null&&(u+=k,s=u.length,a++)}else if(v===92&&(o++,o<s&&u.charCodeAt(o)===10)){const k=l(a);k!==null&&(u+=k,s=u.length,a++)}}if(c<0||u.charCodeAt(c+1)!==58)return!1;for(o=c+2;o<s;o++){const v=u.charCodeAt(o);if(v===10){const k=l(a);k!==null&&(u+=k,s=u.length,a++)}else if(!Oe(v))break}const d=e.md.helpers.parseLinkDestination(u,o,s);if(!d.ok)return!1;const h=e.md.normalizeLink(d.str);if(!e.md.validateLink(h))return!1;o=d.pos;const p=o,f=a,m=o;for(;o<s;o++){const v=u.charCodeAt(o);if(v===10){const k=l(a);k!==null&&(u+=k,s=u.length,a++)}else if(!Oe(v))break}let b=e.md.helpers.parseLinkTitle(u,o,s);for(;b.can_continue;){const v=l(a);if(v===null)break;u+=v,o=s,s=u.length,a++,b=e.md.helpers.parseLinkTitle(u,o,s,b)}let g;for(o<s&&m!==o&&b.ok?(g=b.str,o=b.pos):(g="",o=p,a=f);o<s;){const v=u.charCodeAt(o);if(!Oe(v))break;o++}if(o<s&&u.charCodeAt(o)!==10&&g)for(g="",o=p,a=f;o<s;){const v=u.charCodeAt(o);if(!Oe(v))break;o++}if(o<s&&u.charCodeAt(o)!==10)return!1;const y=Cu(u.slice(1,c));return y?(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[y]>"u"&&(e.env.references[y]={title:g,href:h}),e.line=a),!0):!1}const _O=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],EO="[a-zA-Z_:][a-zA-Z0-9:._-]*",xO="[^\"'=<>`\\x00-\\x20]+",DO="'[^']*'",SO='"[^"]*"',BO="(?:"+xO+"|"+DO+"|"+SO+")",MO="(?:\\s+"+EO+"(?:\\s*=\\s*"+BO+")?)",_y="<[A-Za-z][A-Za-z0-9\\-]*"+MO+"*\\s*\\/?>",Ey="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",FO="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",NO="<[?][\\s\\S]*?[?]>",OO="<![A-Za-z][^>]*>",TO="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",LO=new RegExp("^(?:"+_y+"|"+Ey+"|"+FO+"|"+NO+"|"+OO+"|"+TO+")"),IO=new RegExp("^(?:"+_y+"|"+Ey+")"),gi=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+_O.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(IO.source+"\\s*$"),/^$/,!1]];function RO(e,r,n,i){let o=e.bMarks[r]+e.tShift[r],s=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let a=e.src.slice(o,s),l=0;for(;l<gi.length&&!gi[l][0].test(a);l++);if(l===gi.length)return!1;if(i)return gi[l][2];let u=r+1;if(!gi[l][1].test(a)){for(;u<n&&!(e.sCount[u]<e.blkIndent);u++)if(o=e.bMarks[u]+e.tShift[u],s=e.eMarks[u],a=e.src.slice(o,s),gi[l][1].test(a)){a.length!==0&&u++;break}}e.line=u;const c=e.push("html_block","",0);return c.map=[r,u],c.content=e.getLines(r,u,e.blkIndent,!0),!0}function zO(e,r,n,i){let o=e.bMarks[r]+e.tShift[r],s=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(o);if(a!==35||o>=s)return!1;let l=1;for(a=e.src.charCodeAt(++o);a===35&&o<s&&l<=6;)l++,a=e.src.charCodeAt(++o);if(l>6||o<s&&!Oe(a))return!1;if(i)return!0;s=e.skipSpacesBack(s,o);const u=e.skipCharsBack(s,35,o);u>o&&Oe(e.src.charCodeAt(u-1))&&(s=u),e.line=r+1;const c=e.push("heading_open","h"+String(l),1);c.markup="########".slice(0,l),c.map=[r,e.line];const d=e.push("inline","",0);d.content=e.src.slice(o,s).trim(),d.map=[r,e.line],d.children=[];const h=e.push("heading_close","h"+String(l),-1);return h.markup="########".slice(0,l),!0}function $O(e,r,n){const i=e.md.block.ruler.getRules("paragraph");if(e.sCount[r]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let s=0,a,l=r+1;for(;l<n&&!e.isEmpty(l);l++){if(e.sCount[l]-e.blkIndent>3)continue;if(e.sCount[l]>=e.blkIndent){let f=e.bMarks[l]+e.tShift[l];const m=e.eMarks[l];if(f<m&&(a=e.src.charCodeAt(f),(a===45||a===61)&&(f=e.skipChars(f,a),f=e.skipSpaces(f),f>=m))){s=a===61?1:2;break}}if(e.sCount[l]<0)continue;let p=!1;for(let f=0,m=i.length;f<m;f++)if(i[f](e,l,n,!0)){p=!0;break}if(p)break}if(!s)return!1;const u=e.getLines(r,l,e.blkIndent,!1).trim();e.line=l+1;const c=e.push("heading_open","h"+String(s),1);c.markup=String.fromCharCode(a),c.map=[r,e.line];const d=e.push("inline","",0);d.content=u,d.map=[r,e.line-1],d.children=[];const h=e.push("heading_close","h"+String(s),-1);return h.markup=String.fromCharCode(a),e.parentType=o,!0}function HO(e,r,n){const i=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let s=r+1;for(e.parentType="paragraph";s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3||e.sCount[s]<0)continue;let c=!1;for(let d=0,h=i.length;d<h;d++)if(i[d](e,s,n,!0)){c=!0;break}if(c)break}const a=e.getLines(r,s,e.blkIndent,!1).trim();e.line=s;const l=e.push("paragraph_open","p",1);l.map=[r,e.line];const u=e.push("inline","",0);return u.content=a,u.map=[r,e.line],u.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}const ta=[["table",gO,["paragraph","reference"]],["code",bO],["fence",yO,["paragraph","reference","blockquote","list"]],["blockquote",CO,["paragraph","reference","blockquote","list"]],["hr",vO,["paragraph","reference","blockquote","list"]],["list",wO,["paragraph","reference","blockquote"]],["reference",AO],["html_block",RO,["paragraph","reference","blockquote"]],["heading",zO,["paragraph","reference","blockquote"]],["lheading",$O],["paragraph",HO]];function Sa(){this.ruler=new vt;for(let e=0;e<ta.length;e++)this.ruler.push(ta[e][0],ta[e][1],{alt:(ta[e][2]||[]).slice()})}Sa.prototype.tokenize=function(e,r,n){const i=this.ruler.getRules(""),o=i.length,s=e.md.options.maxNesting;let a=r,l=!1;for(;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n||e.sCount[a]<e.blkIndent));){if(e.level>=s){e.line=n;break}const u=e.line;let c=!1;for(let d=0;d<o;d++)if(c=i[d](e,a,n,!1),c){if(u>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!l,e.isEmpty(e.line-1)&&(l=!0),a=e.line,a<n&&e.isEmpty(a)&&(l=!0,a++,e.line=a)}},Sa.prototype.parse=function(e,r,n,i){if(!e)return;const o=new this.State(e,r,n,i);this.tokenize(o,o.line,o.lineMax)},Sa.prototype.State=hr;function Do(e,r,n,i){this.src=e,this.env=n,this.md=r,this.tokens=i,this.tokens_meta=Array(i.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Do.prototype.pushPending=function(){const e=new er("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Do.prototype.push=function(e,r,n){this.pending&&this.pushPending();const i=new er(e,r,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(o),i},Do.prototype.scanDelims=function(e,r){const n=this.posMax,i=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32;let s=e;for(;s<n&&this.src.charCodeAt(s)===i;)s++;const a=s-e,l=s<n?this.src.charCodeAt(s):32,u=gs(o)||ms(String.fromCharCode(o)),c=gs(l)||ms(String.fromCharCode(l)),d=fs(o),h=fs(l),p=!h&&(!c||d||u),f=!d&&(!u||h||c);return{can_open:p&&(r||!f||u),can_close:f&&(r||!p||c),length:a}},Do.prototype.Token=er;function PO(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function VO(e,r){let n=e.pos;for(;n<e.posMax&&!PO(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(r||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const jO=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function qO(e,r){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const o=e.pending.match(jO);if(!o)return!1;const s=o[1],a=e.md.linkify.matchAtStart(e.src.slice(n-s.length));if(!a)return!1;let l=a.url;if(l.length<=s.length)return!1;l=l.replace(/\*+$/,"");const u=e.md.normalizeLink(l);if(!e.md.validateLink(u))return!1;if(!r){e.pending=e.pending.slice(0,-s.length);const c=e.push("link_open","a",1);c.attrs=[["href",u]],c.markup="linkify",c.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(l);const h=e.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return e.pos+=l.length-s.length,!0}function UO(e,r){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const i=e.pending.length-1,o=e.posMax;if(!r)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let s=i-1;for(;s>=1&&e.pending.charCodeAt(s-1)===32;)s--;e.pending=e.pending.slice(0,s),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<o&&Oe(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const Yh=[];for(let e=0;e<256;e++)Yh.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Yh[e.charCodeAt(0)]=1});function WO(e,r){let n=e.pos;const i=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=i))return!1;let o=e.src.charCodeAt(n);if(o===10){for(r||e.push("hardbreak","br",0),n++;n<i&&(o=e.src.charCodeAt(n),!!Oe(o));)n++;return e.pos=n,!0}let s=e.src[n];if(o>=55296&&o<=56319&&n+1<i){const l=e.src.charCodeAt(n+1);l>=56320&&l<=57343&&(s+=e.src[n+1],n++)}const a="\\"+s;if(!r){const l=e.push("text_special","",0);o<256&&Yh[o]!==0?l.content=s:l.content=a,l.markup=a,l.info="escape"}return e.pos=n+1,!0}function KO(e,r){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const o=e.posMax;for(;n<o&&e.src.charCodeAt(n)===96;)n++;const s=e.src.slice(i,n),a=s.length;if(e.backticksScanned&&(e.backticks[a]||0)<=i)return r||(e.pending+=s),e.pos+=a,!0;let l=n,u;for(;(u=e.src.indexOf("`",l))!==-1;){for(l=u+1;l<o&&e.src.charCodeAt(l)===96;)l++;const c=l-u;if(c===a){if(!r){const d=e.push("code_inline","code",0);d.markup=s,d.content=e.src.slice(n,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[c]=u}return e.backticksScanned=!0,r||(e.pending+=s),e.pos+=a,!0}function ZO(e,r){const n=e.pos,i=e.src.charCodeAt(n);if(r||i!==126)return!1;const o=e.scanDelims(e.pos,!0);let s=o.length;const a=String.fromCharCode(i);if(s<2)return!1;let l;s%2&&(l=e.push("text","",0),l.content=a,s--);for(let u=0;u<s;u+=2)l=e.push("text","",0),l.content=a+a,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function Gf(e,r){let n;const i=[],o=r.length;for(let s=0;s<o;s++){const a=r[s];if(a.marker!==126||a.end===-1)continue;const l=r[a.end];n=e.tokens[a.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[l.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[l.token-1].type==="text"&&e.tokens[l.token-1].content==="~"&&i.push(l.token-1)}for(;i.length;){const s=i.pop();let a=s+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,s!==a&&(n=e.tokens[a],e.tokens[a]=e.tokens[s],e.tokens[s]=n)}}function GO(e){const r=e.tokens_meta,n=e.tokens_meta.length;Gf(e,e.delimiters);for(let i=0;i<n;i++)r[i]&&r[i].delimiters&&Gf(e,r[i].delimiters)}const xy={tokenize:ZO,postProcess:GO};function JO(e,r){const n=e.pos,i=e.src.charCodeAt(n);if(r||i!==95&&i!==42)return!1;const o=e.scanDelims(e.pos,i===42);for(let s=0;s<o.length;s++){const a=e.push("text","",0);a.content=String.fromCharCode(i),e.delimiters.push({marker:i,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0}function Jf(e,r){const n=r.length;for(let i=n-1;i>=0;i--){const o=r[i];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const s=r[o.end],a=i>0&&r[i-1].end===o.end+1&&r[i-1].marker===o.marker&&r[i-1].token===o.token-1&&r[o.end+1].token===s.token+1,l=String.fromCharCode(o.marker),u=e.tokens[o.token];u.type=a?"strong_open":"em_open",u.tag=a?"strong":"em",u.nesting=1,u.markup=a?l+l:l,u.content="";const c=e.tokens[s.token];c.type=a?"strong_close":"em_close",c.tag=a?"strong":"em",c.nesting=-1,c.markup=a?l+l:l,c.content="",a&&(e.tokens[r[i-1].token].content="",e.tokens[r[o.end+1].token].content="",i--)}}function XO(e){const r=e.tokens_meta,n=e.tokens_meta.length;Jf(e,e.delimiters);for(let i=0;i<n;i++)r[i]&&r[i].delimiters&&Jf(e,r[i].delimiters)}const Dy={tokenize:JO,postProcess:XO};function QO(e,r){let n,i,o,s,a="",l="",u=e.pos,c=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const d=e.pos,h=e.posMax,p=e.pos+1,f=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(f<0)return!1;let m=f+1;if(m<h&&e.src.charCodeAt(m)===40){for(c=!1,m++;m<h&&(n=e.src.charCodeAt(m),!(!Oe(n)&&n!==10));m++);if(m>=h)return!1;if(u=m,o=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),o.ok){for(a=e.md.normalizeLink(o.str),e.md.validateLink(a)?m=o.pos:a="",u=m;m<h&&(n=e.src.charCodeAt(m),!(!Oe(n)&&n!==10));m++);if(o=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<h&&u!==m&&o.ok)for(l=o.str,m=o.pos;m<h&&(n=e.src.charCodeAt(m),!(!Oe(n)&&n!==10));m++);}(m>=h||e.src.charCodeAt(m)!==41)&&(c=!0),m++}if(c){if(typeof e.env.references>"u")return!1;if(m<h&&e.src.charCodeAt(m)===91?(u=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?i=e.src.slice(u,m++):m=f+1):m=f+1,i||(i=e.src.slice(p,f)),s=e.env.references[Cu(i)],!s)return e.pos=d,!1;a=s.href,l=s.title}if(!r){e.pos=p,e.posMax=f;const b=e.push("link_open","a",1),g=[["href",a]];b.attrs=g,l&&g.push(["title",l]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=h,!0}function YO(e,r){let n,i,o,s,a,l,u,c,d="";const h=e.pos,p=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const f=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(s=m+1,s<p&&e.src.charCodeAt(s)===40){for(s++;s<p&&(n=e.src.charCodeAt(s),!(!Oe(n)&&n!==10));s++);if(s>=p)return!1;for(c=s,l=e.md.helpers.parseLinkDestination(e.src,s,e.posMax),l.ok&&(d=e.md.normalizeLink(l.str),e.md.validateLink(d)?s=l.pos:d=""),c=s;s<p&&(n=e.src.charCodeAt(s),!(!Oe(n)&&n!==10));s++);if(l=e.md.helpers.parseLinkTitle(e.src,s,e.posMax),s<p&&c!==s&&l.ok)for(u=l.str,s=l.pos;s<p&&(n=e.src.charCodeAt(s),!(!Oe(n)&&n!==10));s++);else u="";if(s>=p||e.src.charCodeAt(s)!==41)return e.pos=h,!1;s++}else{if(typeof e.env.references>"u")return!1;if(s<p&&e.src.charCodeAt(s)===91?(c=s+1,s=e.md.helpers.parseLinkLabel(e,s),s>=0?o=e.src.slice(c,s++):s=m+1):s=m+1,o||(o=e.src.slice(f,m)),a=e.env.references[Cu(o)],!a)return e.pos=h,!1;d=a.href,u=a.title}if(!r){i=e.src.slice(f,m);const b=[];e.md.inline.parse(i,e.md,e.env,b);const g=e.push("image","img",0),y=[["src",d],["alt",""]];g.attrs=y,g.children=b,g.content=i,u&&y.push(["title",u])}return e.pos=s,e.posMax=p,!0}const eT=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,tT=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function rT(e,r){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const i=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const s=e.src.slice(i+1,n);if(tT.test(s)){const a=e.md.normalizeLink(s);if(!e.md.validateLink(a))return!1;if(!r){const l=e.push("link_open","a",1);l.attrs=[["href",a]],l.markup="autolink",l.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(s);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=s.length+2,!0}if(eT.test(s)){const a=e.md.normalizeLink("mailto:"+s);if(!e.md.validateLink(a))return!1;if(!r){const l=e.push("link_open","a",1);l.attrs=[["href",a]],l.markup="autolink",l.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(s);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=s.length+2,!0}return!1}function nT(e){return/^<a[>\s]/i.test(e)}function iT(e){return/^<\/a\s*>/i.test(e)}function oT(e){const r=e|32;return r>=97&&r<=122}function sT(e,r){if(!e.md.options.html)return!1;const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==60||i+2>=n)return!1;const o=e.src.charCodeAt(i+1);if(o!==33&&o!==63&&o!==47&&!oT(o))return!1;const s=e.src.slice(i).match(LO);if(!s)return!1;if(!r){const a=e.push("html_inline","",0);a.content=s[0],nT(a.content)&&e.linkLevel++,iT(a.content)&&e.linkLevel--}return e.pos+=s[0].length,!0}const aT=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,lT=/^&([a-z][a-z0-9]{1,31});/i;function uT(e,r){const n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(aT);if(o){if(!r){const s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),a=e.push("text_special","",0);a.content=Qh(s)?Rl(s):Rl(65533),a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(lT);if(o){const s=Cy(o[0]);if(s!==o[0]){if(!r){const a=e.push("text_special","",0);a.content=s,a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function Xf(e){const r={},n=e.length;if(!n)return;let i=0,o=-2;const s=[];for(let a=0;a<n;a++){const l=e[a];if(s.push(0),(e[i].marker!==l.marker||o!==l.token-1)&&(i=a),o=l.token,l.length=l.length||0,!l.close)continue;r.hasOwnProperty(l.marker)||(r[l.marker]=[-1,-1,-1,-1,-1,-1]);const u=r[l.marker][(l.open?3:0)+l.length%3];let c=i-s[i]-1,d=c;for(;c>u;c-=s[c]+1){const h=e[c];if(h.marker===l.marker&&h.open&&h.end<0){let p=!1;if((h.close||l.open)&&(h.length+l.length)%3===0&&(h.length%3!==0||l.length%3!==0)&&(p=!0),!p){const f=c>0&&!e[c-1].open?s[c-1]+1:0;s[a]=a-c+f,s[c]=f,l.open=!1,h.end=a,h.close=!1,d=-1,o=-2;break}}}d!==-1&&(r[l.marker][(l.open?3:0)+(l.length||0)%3]=d)}}function cT(e){const r=e.tokens_meta,n=e.tokens_meta.length;Xf(e.delimiters);for(let i=0;i<n;i++)r[i]&&r[i].delimiters&&Xf(r[i].delimiters)}function dT(e){let r,n,i=0;const o=e.tokens,s=e.tokens.length;for(r=n=0;r<s;r++)o[r].nesting<0&&i--,o[r].level=i,o[r].nesting>0&&i++,o[r].type==="text"&&r+1<s&&o[r+1].type==="text"?o[r+1].content=o[r].content+o[r+1].content:(r!==n&&(o[n]=o[r]),n++);r!==n&&(o.length=n)}const mc=[["text",VO],["linkify",qO],["newline",UO],["escape",WO],["backticks",KO],["strikethrough",xy.tokenize],["emphasis",Dy.tokenize],["link",QO],["image",YO],["autolink",rT],["html_inline",sT],["entity",uT]],gc=[["balance_pairs",cT],["strikethrough",xy.postProcess],["emphasis",Dy.postProcess],["fragments_join",dT]];function So(){this.ruler=new vt;for(let e=0;e<mc.length;e++)this.ruler.push(mc[e][0],mc[e][1]);this.ruler2=new vt;for(let e=0;e<gc.length;e++)this.ruler2.push(gc[e][0],gc[e][1])}So.prototype.skipToken=function(e){const r=e.pos,n=this.ruler.getRules(""),i=n.length,o=e.md.options.maxNesting,s=e.cache;if(typeof s[r]<"u"){e.pos=s[r];return}let a=!1;if(e.level<o){for(let l=0;l<i;l++)if(e.level++,a=n[l](e,!0),e.level--,a){if(r>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,s[r]=e.pos},So.prototype.tokenize=function(e){const r=this.ruler.getRules(""),n=r.length,i=e.posMax,o=e.md.options.maxNesting;for(;e.pos<i;){const s=e.pos;let a=!1;if(e.level<o){for(let l=0;l<n;l++)if(a=r[l](e,!1),a){if(s>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},So.prototype.parse=function(e,r,n,i){const o=new this.State(e,r,n,i);this.tokenize(o);const s=this.ruler2.getRules(""),a=s.length;for(let l=0;l<a;l++)s[l](o)},So.prototype.State=Do;function hT(e){const r={};e=e||{},r.src_Any=fy.source,r.src_Cc=my.source,r.src_Z=by.source,r.src_P=Jh.source,r.src_ZPCc=[r.src_Z,r.src_P,r.src_Cc].join("|"),r.src_ZCc=[r.src_Z,r.src_Cc].join("|");const n="[><|]";return r.src_pseudo_letter="(?:(?!"+n+"|"+r.src_ZPCc+")"+r.src_Any+")",r.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",r.src_auth="(?:(?:(?!"+r.src_ZCc+"|[@/\\[\\]()]).)+@)?",r.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",r.src_host_terminator="(?=$|"+n+"|"+r.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+r.src_ZPCc+"))",r.src_path="(?:[/?#](?:(?!"+r.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+r.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+r.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+r.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+r.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+r.src_ZCc+"|[']).)+\\'|\\'(?="+r.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+r.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+r.src_ZCc+"|$)|;(?!"+r.src_ZCc+"|$)|\\!+(?!"+r.src_ZCc+"|[!]|$)|\\?(?!"+r.src_ZCc+"|[?]|$))+|\\/)?",r.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',r.src_xn="xn--[a-z0-9\\-]{1,59}",r.src_domain_root="(?:"+r.src_xn+"|"+r.src_pseudo_letter+"{1,63})",r.src_domain="(?:"+r.src_xn+"|(?:"+r.src_pseudo_letter+")|(?:"+r.src_pseudo_letter+"(?:-|"+r.src_pseudo_letter+"){0,61}"+r.src_pseudo_letter+"))",r.src_host="(?:(?:(?:(?:"+r.src_domain+")\\.)*"+r.src_domain+"))",r.tpl_host_fuzzy="(?:"+r.src_ip4+"|(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%)))",r.tpl_host_no_ip_fuzzy="(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%))",r.src_host_strict=r.src_host+r.src_host_terminator,r.tpl_host_fuzzy_strict=r.tpl_host_fuzzy+r.src_host_terminator,r.src_host_port_strict=r.src_host+r.src_port+r.src_host_terminator,r.tpl_host_port_fuzzy_strict=r.tpl_host_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_port_no_ip_fuzzy_strict=r.tpl_host_no_ip_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+r.src_ZPCc+"|>|$))",r.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+r.src_ZCc+")("+r.src_email_name+"@"+r.tpl_host_fuzzy_strict+")",r.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+r.src_ZPCc+"))((?![$+<=>^`||])"+r.tpl_host_port_fuzzy_strict+r.src_path+")",r.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+r.src_ZPCc+"))((?![$+<=>^`||])"+r.tpl_host_port_no_ip_fuzzy_strict+r.src_path+")",r}function Bd(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){e[n]=r[n]})}),e}function vu(e){return Object.prototype.toString.call(e)}function pT(e){return vu(e)==="[object String]"}function fT(e){return vu(e)==="[object Object]"}function mT(e){return vu(e)==="[object RegExp]"}function Qf(e){return vu(e)==="[object Function]"}function gT(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Sy={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function bT(e){return Object.keys(e||{}).reduce(function(r,n){return r||Sy.hasOwnProperty(n)},!1)}const yT={"http:":{validate:function(e,r,n){const i=e.slice(r);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(i)?i.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,r,n){const i=e.slice(r);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(i)?r>=3&&e[r-3]===":"||r>=3&&e[r-3]==="/"?0:i.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,r,n){const i=e.slice(r);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(i)?i.match(n.re.mailto)[0].length:0}}},CT="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",vT="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function kT(e){e.__index__=-1,e.__text_cache__=""}function wT(e){return function(r,n){const i=r.slice(n);return e.test(i)?i.match(e)[0].length:0}}function Yf(){return function(e,r){r.normalize(e)}}function Ba(e){const r=e.re=hT(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(CT),n.push(r.src_xn),r.src_tlds=n.join("|");function i(l){return l.replace("%TLDS%",r.src_tlds)}r.email_fuzzy=RegExp(i(r.tpl_email_fuzzy),"i"),r.link_fuzzy=RegExp(i(r.tpl_link_fuzzy),"i"),r.link_no_ip_fuzzy=RegExp(i(r.tpl_link_no_ip_fuzzy),"i"),r.host_fuzzy_test=RegExp(i(r.tpl_host_fuzzy_test),"i");const o=[];e.__compiled__={};function s(l,u){throw new Error('(LinkifyIt) Invalid schema "'+l+'": '+u)}Object.keys(e.__schemas__).forEach(function(l){const u=e.__schemas__[l];if(u===null)return;const c={validate:null,link:null};if(e.__compiled__[l]=c,fT(u)){mT(u.validate)?c.validate=wT(u.validate):Qf(u.validate)?c.validate=u.validate:s(l,u),Qf(u.normalize)?c.normalize=u.normalize:u.normalize?s(l,u):c.normalize=Yf();return}if(pT(u)){o.push(l);return}s(l,u)}),o.forEach(function(l){e.__compiled__[e.__schemas__[l]]&&(e.__compiled__[l].validate=e.__compiled__[e.__schemas__[l]].validate,e.__compiled__[l].normalize=e.__compiled__[e.__schemas__[l]].normalize)}),e.__compiled__[""]={validate:null,normalize:Yf()};const a=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(gT).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+r.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+r.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),kT(e)}function AT(e,r){const n=e.__index__,i=e.__last_index__,o=e.__text_cache__.slice(n,i);this.schema=e.__schema__.toLowerCase(),this.index=n+r,this.lastIndex=i+r,this.raw=o,this.text=o,this.url=o}function bc(e,r){const n=new AT(e,r);return e.__compiled__[n.schema].normalize(n,e),n}function Mt(e,r){if(!(this instanceof Mt))return new Mt(e,r);r||bT(e)&&(r=e,e={}),this.__opts__=Bd({},Sy,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Bd({},yT,e),this.__compiled__={},this.__tlds__=vT,this.__tlds_replaced__=!1,this.re={},Ba(this)}Mt.prototype.add=function(e,r){return this.__schemas__[e]=r,Ba(this),this},Mt.prototype.set=function(e){return this.__opts__=Bd(this.__opts__,e),this},Mt.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let r,n,i,o,s,a,l,u,c;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(r=l.exec(e))!==null;)if(o=this.testSchemaAt(e,r[2],l.lastIndex),o){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=n.index+n[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=e.indexOf("@"),c>=0&&(i=e.match(this.re.email_fuzzy))!==null&&(s=i.index+i[1].length,a=i.index+i[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0},Mt.prototype.pretest=function(e){return this.re.pretest.test(e)},Mt.prototype.testSchemaAt=function(e,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,n,this):0},Mt.prototype.match=function(e){const r=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(r.push(bc(this,n)),n=this.__last_index__);let i=n?e.slice(n):e;for(;this.test(i);)r.push(bc(this,n)),i=i.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null},Mt.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const r=this.re.schema_at_start.exec(e);if(!r)return null;const n=this.testSchemaAt(e,r[2],r[0].length);return n?(this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+n,bc(this,0)):null},Mt.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,i,o){return n!==o[i-1]}).reverse(),Ba(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Ba(this),this)},Mt.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},Mt.prototype.onCompile=function(){};const qi=2147483647,Cr=36,ep=1,bs=26,_T=38,ET=700,By=72,My=128,Fy="-",xT=/^xn--/,DT=/[^\0-\x7F]/,ST=/[\x2E\u3002\uFF0E\uFF61]/g,BT={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},yc=Cr-ep,vr=Math.floor,Cc=String.fromCharCode;function Gr(e){throw new RangeError(BT[e])}function MT(e,r){const n=[];let i=e.length;for(;i--;)n[i]=r(e[i]);return n}function Ny(e,r){const n=e.split("@");let i="";n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(ST,".");const o=e.split("."),s=MT(o,r).join(".");return i+s}function Oy(e){const r=[];let n=0;const i=e.length;for(;n<i;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<i){const s=e.charCodeAt(n++);(s&64512)==56320?r.push(((o&1023)<<10)+(s&1023)+65536):(r.push(o),n--)}else r.push(o)}return r}const FT=e=>String.fromCodePoint(...e),NT=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Cr},em=function(e,r){return e+22+75*(e<26)-((r!=0)<<5)},Ty=function(e,r,n){let i=0;for(e=n?vr(e/ET):e>>1,e+=vr(e/r);e>yc*bs>>1;i+=Cr)e=vr(e/yc);return vr(i+(yc+1)*e/(e+_T))},Ly=function(e){const r=[],n=e.length;let i=0,o=My,s=By,a=e.lastIndexOf(Fy);a<0&&(a=0);for(let l=0;l<a;++l)e.charCodeAt(l)>=128&&Gr("not-basic"),r.push(e.charCodeAt(l));for(let l=a>0?a+1:0;l<n;){const u=i;for(let d=1,h=Cr;;h+=Cr){l>=n&&Gr("invalid-input");const p=NT(e.charCodeAt(l++));p>=Cr&&Gr("invalid-input"),p>vr((qi-i)/d)&&Gr("overflow"),i+=p*d;const f=h<=s?ep:h>=s+bs?bs:h-s;if(p<f)break;const m=Cr-f;d>vr(qi/m)&&Gr("overflow"),d*=m}const c=r.length+1;s=Ty(i-u,c,u==0),vr(i/c)>qi-o&&Gr("overflow"),o+=vr(i/c),i%=c,r.splice(i++,0,o)}return String.fromCodePoint(...r)},Iy=function(e){const r=[];e=Oy(e);const n=e.length;let i=My,o=0,s=By;for(const u of e)u<128&&r.push(Cc(u));const a=r.length;let l=a;for(a&&r.push(Fy);l<n;){let u=qi;for(const d of e)d>=i&&d<u&&(u=d);const c=l+1;u-i>vr((qi-o)/c)&&Gr("overflow"),o+=(u-i)*c,i=u;for(const d of e)if(d<i&&++o>qi&&Gr("overflow"),d===i){let h=o;for(let p=Cr;;p+=Cr){const f=p<=s?ep:p>=s+bs?bs:p-s;if(h<f)break;const m=h-f,b=Cr-f;r.push(Cc(em(f+m%b,0))),h=vr(m/b)}r.push(Cc(em(h,0))),s=Ty(o,c,l===a),o=0,++l}++o,++i}return r.join("")},OT=function(e){return Ny(e,function(r){return xT.test(r)?Ly(r.slice(4).toLowerCase()):r})},TT=function(e){return Ny(e,function(r){return DT.test(r)?"xn--"+Iy(r):r})},Ry={version:"2.3.1",ucs2:{decode:Oy,encode:FT},decode:Ly,encode:Iy,toASCII:TT,toUnicode:OT},LT={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},IT={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},RT={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},zT={default:LT,zero:IT,commonmark:RT},$T=/^(vbscript|javascript|file|data):/,HT=/^data:image\/(gif|png|jpeg|webp);/;function PT(e){const r=e.trim().toLowerCase();return $T.test(r)?HT.test(r):!0}const zy=["http:","https:","mailto:"];function VT(e){const r=Gh(e,!0);if(r.hostname&&(!r.protocol||zy.indexOf(r.protocol)>=0))try{r.hostname=Ry.toASCII(r.hostname)}catch{}return ps(Zh(r))}function jT(e){const r=Gh(e,!0);if(r.hostname&&(!r.protocol||zy.indexOf(r.protocol)>=0))try{r.hostname=Ry.toUnicode(r.hostname)}catch{}return so(Zh(r),so.defaultChars+"%")}function Ht(e,r){if(!(this instanceof Ht))return new Ht(e,r);r||Xh(e)||(r=e||{},e="default"),this.inline=new So,this.block=new Sa,this.core=new Sd,this.renderer=new Ei,this.linkify=new Mt,this.validateLink=PT,this.normalizeLink=VT,this.normalizeLinkText=jT,this.utils=UN,this.helpers=yu({},GN),this.options={},this.configure(e),r&&this.set(r)}Ht.prototype.set=function(e){return yu(this.options,e),this},Ht.prototype.configure=function(e){const r=this;if(Xh(e)){const n=e;if(e=zT[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&r.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&r[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&r[n].ruler2.enableOnly(e.components[n].rules2)}),this},Ht.prototype.enable=function(e,r){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const i=e.filter(function(o){return n.indexOf(o)<0});if(i.length&&!r)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this},Ht.prototype.disable=function(e,r){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const i=e.filter(function(o){return n.indexOf(o)<0});if(i.length&&!r)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this},Ht.prototype.use=function(e){const r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},Ht.prototype.parse=function(e,r){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,r);return this.core.process(n),n.tokens},Ht.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},Ht.prototype.parseInline=function(e,r){const n=new this.core.State(e,this,r);return n.inlineMode=!0,this.core.process(n),n.tokens},Ht.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)};const qT=new Wd({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM(e){return["ol",{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>e.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name=="strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(e){return["a",e.attrs]}},code:{parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function UT(e,r){if(e.isText&&r.isText&&_e.sameSet(e.marks,r.marks))return e.withText(e.text+r.text)}class WT{constructor(r,n){this.schema=r,this.tokenHandlers=n,this.stack=[{type:r.topNodeType,attrs:null,content:[],marks:_e.none}]}top(){return this.stack[this.stack.length-1]}push(r){this.stack.length&&this.top().content.push(r)}addText(r){if(!r)return;let n=this.top(),i=n.content,o=i[i.length-1],s=this.schema.text(r,n.marks),a;o&&(a=UT(o,s))?i[i.length-1]=a:i.push(s)}openMark(r){let n=this.top();n.marks=r.addToSet(n.marks)}closeMark(r){let n=this.top();n.marks=r.removeFromSet(n.marks)}parseTokens(r){for(let n=0;n<r.length;n++){let i=r[n],o=this.tokenHandlers[i.type];if(!o)throw new Error("Token type `"+i.type+"` not supported by Markdown parser");o(this,i,r,n)}}addNode(r,n,i){let o=this.top(),s=r.createAndFill(n,i,o?o.marks:[]);return s?(this.push(s),s):null}openNode(r,n){this.stack.push({type:r,attrs:n,content:[],marks:_e.none})}closeNode(){let r=this.stack.pop();return this.addNode(r.type,r.attrs,r.content)}}function ko(e,r,n,i){return e.getAttrs?e.getAttrs(r,n,i):e.attrs instanceof Function?e.attrs(r):e.attrs}function vc(e,r){return e.noCloseToken||r=="code_inline"||r=="code_block"||r=="fence"}function tm(e){return e[e.length-1]=="\n"?e.slice(0,e.length-1):e}function kc(){}function KT(e,r){let n=Object.create(null);for(let i in r){let o=r[i];if(o.block){let s=e.nodeType(o.block);vc(o,i)?n[i]=(a,l,u,c)=>{a.openNode(s,ko(o,l,u,c)),a.addText(tm(l.content)),a.closeNode()}:(n[i+"_open"]=(a,l,u,c)=>a.openNode(s,ko(o,l,u,c)),n[i+"_close"]=a=>a.closeNode())}else if(o.node){let s=e.nodeType(o.node);n[i]=(a,l,u,c)=>a.addNode(s,ko(o,l,u,c))}else if(o.mark){let s=e.marks[o.mark];vc(o,i)?n[i]=(a,l,u,c)=>{a.openMark(s.create(ko(o,l,u,c))),a.addText(tm(l.content)),a.closeMark(s)}:(n[i+"_open"]=(a,l,u,c)=>a.openMark(s.create(ko(o,l,u,c))),n[i+"_close"]=a=>a.closeMark(s))}else if(o.ignore)vc(o,i)?n[i]=kc:(n[i+"_open"]=kc,n[i+"_close"]=kc);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o))}return n.text=(i,o)=>i.addText(o.content),n.inline=(i,o)=>i.parseTokens(o.children),n.softbreak=n.softbreak||(i=>i.addText(" ")),n}class ZT{constructor(r,n,i){this.schema=r,this.tokenizer=n,this.tokens=i,this.tokenHandlers=KT(r,i)}parse(r,n={}){let i=new WT(this.schema,this.tokenHandlers),o;i.parseTokens(this.tokenizer.parse(r,n));do o=i.closeNode();while(i.stack.length);return o||this.schema.topNodeType.createAndFill()}}function rm(e,r){for(;++r<e.length;)if(e[r].type!="list_item_open")return e[r].hidden;return!1}new ZT(qT,Ht("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(e,r,n)=>({tight:rm(r,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,r,n)=>({order:+e.attrGet("start")||1,tight:rm(r,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}});const GT={open:"",close:"",mixable:!0};class tp{constructor(r,n,i={}){this.nodes=r,this.marks=n,this.options=i}serialize(r,n={}){n=Object.assign({},this.options,n);let i=new XT(this.nodes,this.marks,n);return i.renderContent(r),i.out}}const Is=new tp({blockquote(e,r){e.wrapBlock("> ",null,r,()=>e.renderContent(r))},code_block(e,r){const n=r.textContent.match(/`{3,}/gm),i=n?n.sort().slice(-1)[0]+"`":"```";e.write(i+(r.attrs.params||"")+"\n"),e.text(r.textContent,!1),e.write("\n"),e.write(i),e.closeBlock(r)},heading(e,r){e.write(e.repeat("#",r.attrs.level)+" "),e.renderInline(r,!1),e.closeBlock(r)},horizontal_rule(e,r){e.write(r.attrs.markup||"---"),e.closeBlock(r)},bullet_list(e,r){e.renderList(r,"  ",()=>(r.attrs.bullet||"*")+" ")},ordered_list(e,r){let n=r.attrs.order||1,i=String(n+r.childCount-1).length,o=e.repeat(" ",i+2);e.renderList(r,o,s=>{let a=String(n+s);return e.repeat(" ",i-a.length)+a+". "})},list_item(e,r){e.renderContent(r)},paragraph(e,r){e.renderInline(r),e.closeBlock(r)},image(e,r){e.write("!["+e.esc(r.attrs.alt||"")+"]("+r.attrs.src.replace(/[\(\)]/g,"\\$&")+(r.attrs.title?' "'+r.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,r,n,i){for(let o=i+1;o<n.childCount;o++)if(n.child(o).type!=r.type){e.write("\\\n");return}},text(e,r){e.text(r.text,!e.inAutolink)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open(e,r,n,i){return e.inAutolink=JT(r,n,i),e.inAutolink?"<":"["},close(e,r,n,i){let{inAutolink:o}=e;return e.inAutolink=void 0,o?">":"]("+r.attrs.href.replace(/[\(\)"]/g,"\\$&")+(r.attrs.title?' "'.concat(r.attrs.title.replace(/"/g,'\\"'),'"'):"")+")"},mixable:!0},code:{open(e,r,n,i){return nm(n.child(i),-1)},close(e,r,n,i){return nm(n.child(i-1),1)},escape:!1}});function nm(e,r){let n=/`+/g,i,o=0;if(e.isText)for(;i=n.exec(e.text);)o=Math.max(o,i[0].length);let s=o>0&&r>0?" `":"`";for(let a=0;a<o;a++)s+="`";return o>0&&r<0&&(s+=" "),s}function JT(e,r,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let i=r.child(n);return!i.isText||i.text!=e.attrs.href||i.marks[i.marks.length-1]!=e?!1:n==r.childCount-1||!e.isInSet(r.child(n+1).marks)}class XT{constructor(r,n,i){this.nodes=r,this.marks=n,this.options=i,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(r=2){if(this.closed){if(this.atBlank()||(this.out+="\n"),r>1){let n=this.delim,i=/\s+$/.exec(n);i&&(n=n.slice(0,n.length-i[0].length));for(let o=1;o<r;o++)this.out+=n+"\n"}this.closed=null}}getMark(r){let n=this.marks[r];if(!n){if(this.options.strict!==!1)throw new Error("Mark type `".concat(r,"` not supported by Markdown renderer"));n=GT}return n}wrapBlock(r,n,i,o){let s=this.delim;this.write(n!=null?n:r),this.delim+=r,o(),this.delim=s,this.closeBlock(i)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+="\n")}write(r){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),r&&(this.out+=r)}closeBlock(r){this.closed=r}text(r,n=!0){let i=r.split("\n");for(let o=0;o<i.length;o++)this.write(),!n&&i[o][0]=="["&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+"\\!"),this.out+=n?this.esc(i[o],this.atBlockStart):i[o],o!=i.length-1&&(this.out+="\n")}render(r,n,i){if(this.nodes[r.type.name])this.nodes[r.type.name](this,r,n,i);else{if(this.options.strict!==!1)throw new Error("Token type `"+r.type.name+"` not supported by Markdown renderer");r.type.isLeaf||(r.type.inlineContent?this.renderInline(r):this.renderContent(r),r.isBlock&&this.closeBlock(r))}}renderContent(r){r.forEach((n,i,o)=>this.render(n,r,o))}renderInline(r,n=!0){this.atBlockStart=n;let i=[],o="",s=(a,l,u)=>{let c=a?a.marks:[];a&&a.type.name===this.options.hardBreakNodeName&&(c=c.filter(b=>{if(u+1==r.childCount)return!1;let g=r.child(u+1);return b.isInSet(g.marks)&&(!g.isText||/\S/.test(g.text))}));let d=o;if(o="",a&&a.isText&&c.some(b=>{let g=this.getMark(b.type.name);return g&&g.expelEnclosingWhitespace&&!b.isInSet(i)})){let[b,g,y]=/^(\s*)(.*)$/m.exec(a.text);g&&(d+=g,a=y?a.withText(y):null,a||(c=i))}if(a&&a.isText&&c.some(b=>{let g=this.getMark(b.type.name);return g&&g.expelEnclosingWhitespace&&(u==r.childCount-1||!b.isInSet(r.child(u+1).marks))})){let[b,g,y]=/^(.*?)(\s*)$/m.exec(a.text);y&&(o=y,a=g?a.withText(g):null,a||(c=i))}let h=c.length?c[c.length-1]:null,p=h&&this.getMark(h.type.name).escape===!1,f=c.length-(p?1:0);e:for(let b=0;b<f;b++){let g=c[b];if(!this.getMark(g.type.name).mixable)break;for(let y=0;y<i.length;y++){let v=i[y];if(!this.getMark(v.type.name).mixable)break;if(g.eq(v)){b>y?c=c.slice(0,y).concat(g).concat(c.slice(y,b)).concat(c.slice(b+1,f)):y>b&&(c=c.slice(0,b).concat(c.slice(b+1,y)).concat(g).concat(c.slice(y,f)));continue e}}}let m=0;for(;m<Math.min(i.length,f)&&c[m].eq(i[m]);)++m;for(;m<i.length;)this.text(this.markString(i.pop(),!1,r,u),!1);if(d&&this.text(d),a){for(;i.length<f;){let b=c[i.length];i.push(b),this.text(this.markString(b,!0,r,u),!1),this.atBlockStart=!1}p&&a.isText?this.text(this.markString(h,!0,r,u)+a.text+this.markString(h,!1,r,u+1),!1):this.render(a,r,u),this.atBlockStart=!1}a!=null&&a.isText&&a.nodeSize>0&&(this.atBlockStart=!1)};r.forEach(s),s(null,0,r.childCount),this.atBlockStart=!1}renderList(r,n,i){this.closed&&this.closed.type==r.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let o=typeof r.attrs.tight<"u"?r.attrs.tight:this.options.tightLists,s=this.inTightList;this.inTightList=o,r.forEach((a,l,u)=>{u&&o&&this.flushClose(1),this.wrapBlock(n,i(u),r,()=>this.render(a,r,u))}),this.inTightList=s}esc(r,n=!1){return r=r.replace(/[`*\\~\[\]_]/g,(i,o)=>i=="_"&&o>0&&o+1<r.length&&r[o-1].match(/\w/)&&r[o+1].match(/\w/)?i:"\\"+i),n&&(r=r.replace(/^(\+[ ]|[\-*>])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(r=r.replace(this.options.escapeExtraCharacters,"\\$&")),r}quote(r){let n=r.indexOf('"')==-1?'""':r.indexOf("'")==-1?"''":"()";return n[0]+r+n[1]}repeat(r,n){let i="";for(let o=0;o<n;o++)i+=r;return i}markString(r,n,i,o){let s=this.getMark(r.type.name),a=n?s.open:s.close;return typeof a=="string"?a:a(this,r,i,o)}getEnclosingWhitespace(r){return{leading:(r.match(/^(\s+)/)||[void 0])[0],trailing:(r.match(/(\s+)$/)||[void 0])[0]}}}var ke={};const QT="Á",YT="á",e7="Ă",t7="ă",r7="∾",n7="∿",i7="∾̳",o7="Â",s7="â",a7="´",l7="А",u7="а",c7="Æ",d7="æ",h7="⁡",p7="𝔄",f7="𝔞",m7="À",g7="à",b7="ℵ",y7="ℵ",C7="Α",v7="α",k7="Ā",w7="ā",A7="⨿",_7="&",E7="&",x7="⩕",D7="⩓",S7="∧",B7="⩜",M7="⩘",F7="⩚",N7="∠",O7="⦤",T7="∠",L7="⦨",I7="⦩",R7="⦪",z7="⦫",$7="⦬",H7="⦭",P7="⦮",V7="⦯",j7="∡",q7="∟",U7="⊾",W7="⦝",K7="∢",Z7="Å",G7="⍼",J7="Ą",X7="ą",Q7="𝔸",Y7="𝕒",eL="⩯",tL="≈",rL="⩰",nL="≊",iL="≋",oL="'",sL="⁡",aL="≈",lL="≊",uL="Å",cL="å",dL="𝒜",hL="𝒶",pL="≔",fL="*",mL="≈",gL="≍",bL="Ã",yL="ã",CL="Ä",vL="ä",kL="∳",wL="⨑",AL="≌",_L="϶",EL="‵",xL="∽",DL="⋍",SL="∖",BL="⫧",ML="⊽",FL="⌅",NL="⌆",OL="⌅",TL="⎵",LL="⎶",IL="≌",RL="Б",zL="б",$L="„",HL="∵",PL="∵",VL="∵",jL="⦰",qL="϶",UL="ℬ",WL="ℬ",KL="Β",ZL="β",GL="ℶ",JL="≬",XL="𝔅",QL="𝔟",YL="⋂",eI="◯",tI="⋃",rI="⨀",nI="⨁",iI="⨂",oI="⨆",sI="★",aI="▽",lI="△",uI="⨄",cI="⋁",dI="⋀",hI="⤍",pI="⧫",fI="▪",mI="▴",gI="▾",bI="◂",yI="▸",CI="␣",vI="▒",kI="░",wI="▓",AI="█",_I="=⃥",EI="≡⃥",xI="⫭",DI="⌐",SI="𝔹",BI="𝕓",MI="⊥",FI="⊥",NI="⋈",OI="⧉",TI="┐",LI="╕",II="╖",RI="╗",zI="┌",$I="╒",HI="╓",PI="╔",VI="─",jI="═",qI="┬",UI="╤",WI="╥",KI="╦",ZI="┴",GI="╧",JI="╨",XI="╩",QI="⊟",YI="⊞",eR="⊠",tR="┘",rR="╛",nR="╜",iR="╝",oR="└",sR="╘",aR="╙",lR="╚",uR="│",cR="║",dR="┼",hR="╪",pR="╫",fR="╬",mR="┤",gR="╡",bR="╢",yR="╣",CR="├",vR="╞",kR="╟",wR="╠",AR="‵",_R="˘",ER="˘",xR="¦",DR="𝒷",SR="ℬ",BR="⁏",MR="∽",FR="⋍",NR="⧅",OR="\\",TR="⟈",LR="•",IR="•",RR="≎",zR="⪮",$R="≏",HR="≎",PR="≏",VR="Ć",jR="ć",qR="⩄",UR="⩉",WR="⩋",KR="∩",ZR="⋒",GR="⩇",JR="⩀",XR="ⅅ",QR="∩︀",YR="⁁",ez="ˇ",tz="ℭ",rz="⩍",nz="Č",iz="č",oz="Ç",sz="ç",az="Ĉ",lz="ĉ",uz="∰",cz="⩌",dz="⩐",hz="Ċ",pz="ċ",fz="¸",mz="¸",gz="⦲",bz="¢",yz="·",Cz="·",vz="𝔠",kz="ℭ",wz="Ч",Az="ч",_z="✓",Ez="✓",xz="Χ",Dz="χ",Sz="ˆ",Bz="≗",Mz="↺",Fz="↻",Nz="⊛",Oz="⊚",Tz="⊝",Lz="⊙",Iz="®",Rz="Ⓢ",zz="⊖",$z="⊕",Hz="⊗",Pz="○",Vz="⧃",jz="≗",qz="⨐",Uz="⫯",Wz="⧂",Kz="∲",Zz="”",Gz="’",Jz="♣",Xz="♣",Qz=":",Yz="∷",e$="⩴",t$="≔",r$="≔",n$=",",i$="@",o$="∁",s$="∘",a$="∁",l$="ℂ",u$="≅",c$="⩭",d$="≡",h$="∮",p$="∯",f$="∮",m$="𝕔",g$="ℂ",b$="∐",y$="∐",C$="©",v$="©",k$="℗",w$="∳",A$="↵",_$="✗",E$="⨯",x$="𝒞",D$="𝒸",S$="⫏",B$="⫑",M$="⫐",F$="⫒",N$="⋯",O$="⤸",T$="⤵",L$="⋞",I$="⋟",R$="↶",z$="⤽",$$="⩈",H$="⩆",P$="≍",V$="∪",j$="⋓",q$="⩊",U$="⊍",W$="⩅",K$="∪︀",Z$="↷",G$="⤼",J$="⋞",X$="⋟",Q$="⋎",Y$="⋏",eH="¤",tH="↶",rH="↷",nH="⋎",iH="⋏",oH="∲",sH="∱",aH="⌭",lH="†",uH="‡",cH="ℸ",dH="↓",hH="↡",pH="⇓",fH="‐",mH="⫤",gH="⊣",bH="⤏",yH="˝",CH="Ď",vH="ď",kH="Д",wH="д",AH="‡",_H="⇊",EH="ⅅ",xH="ⅆ",DH="⤑",SH="⩷",BH="°",MH="∇",FH="Δ",NH="δ",OH="⦱",TH="⥿",LH="𝔇",IH="𝔡",RH="⥥",zH="⇃",$H="⇂",HH="´",PH="˙",VH="˝",jH="`",qH="˜",UH="⋄",WH="⋄",KH="⋄",ZH="♦",GH="♦",JH="¨",XH="ⅆ",QH="ϝ",YH="⋲",eP="÷",tP="÷",rP="⋇",nP="⋇",iP="Ђ",oP="ђ",sP="⌞",aP="⌍",lP="$",uP="𝔻",cP="𝕕",dP="¨",hP="˙",pP="⃜",fP="≐",mP="≑",gP="≐",bP="∸",yP="∔",CP="⊡",vP="⌆",kP="∯",wP="¨",AP="⇓",_P="⇐",EP="⇔",xP="⫤",DP="⟸",SP="⟺",BP="⟹",MP="⇒",FP="⊨",NP="⇑",OP="⇕",TP="∥",LP="⤓",IP="↓",RP="↓",zP="⇓",$P="⇵",HP="̑",PP="⇊",VP="⇃",jP="⇂",qP="⥐",UP="⥞",WP="⥖",KP="↽",ZP="⥟",GP="⥗",JP="⇁",XP="↧",QP="⊤",YP="⤐",eV="⌟",tV="⌌",rV="𝒟",nV="𝒹",iV="Ѕ",oV="ѕ",sV="⧶",aV="Đ",lV="đ",uV="⋱",cV="▿",dV="▾",hV="⇵",pV="⥯",fV="⦦",mV="Џ",gV="џ",bV="⟿",yV="É",CV="é",vV="⩮",kV="Ě",wV="ě",AV="Ê",_V="ê",EV="≖",xV="≕",DV="Э",SV="э",BV="⩷",MV="Ė",FV="ė",NV="≑",OV="ⅇ",TV="≒",LV="𝔈",IV="𝔢",RV="⪚",zV="È",$V="è",HV="⪖",PV="⪘",VV="⪙",jV="∈",qV="⏧",UV="ℓ",WV="⪕",KV="⪗",ZV="Ē",GV="ē",JV="∅",XV="∅",QV="◻",YV="∅",ej="▫",tj=" ",rj=" ",nj=" ",ij="Ŋ",oj="ŋ",sj=" ",aj="Ę",lj="ę",uj="𝔼",cj="𝕖",dj="⋕",hj="⧣",pj="⩱",fj="ε",mj="Ε",gj="ε",bj="ϵ",yj="≖",Cj="≕",vj="≂",kj="⪖",wj="⪕",Aj="⩵",_j="=",Ej="≂",xj="≟",Dj="⇌",Sj="≡",Bj="⩸",Mj="⧥",Fj="⥱",Nj="≓",Oj="ℯ",Tj="ℰ",Lj="≐",Ij="⩳",Rj="≂",zj="Η",$j="η",Hj="Ð",Pj="ð",Vj="Ë",jj="ë",qj="€",Uj="!",Wj="∃",Kj="∃",Zj="ℰ",Gj="ⅇ",Jj="ⅇ",Xj="≒",Qj="Ф",Yj="ф",eq="♀",tq="ffi",rq="ff",nq="ffl",iq="𝔉",oq="𝔣",sq="fi",aq="◼",lq="▪",uq="fj",cq="♭",dq="fl",hq="▱",pq="ƒ",fq="𝔽",mq="𝕗",gq="∀",bq="∀",yq="⋔",Cq="⫙",vq="ℱ",kq="⨍",wq="½",Aq="⅓",_q="¼",Eq="⅕",xq="⅙",Dq="⅛",Sq="⅔",Bq="⅖",Mq="¾",Fq="⅗",Nq="⅜",Oq="⅘",Tq="⅚",Lq="⅝",Iq="⅞",Rq="⁄",zq="⌢",$q="𝒻",Hq="ℱ",Pq="ǵ",Vq="Γ",jq="γ",qq="Ϝ",Uq="ϝ",Wq="⪆",Kq="Ğ",Zq="ğ",Gq="Ģ",Jq="Ĝ",Xq="ĝ",Qq="Г",Yq="г",eU="Ġ",tU="ġ",rU="≥",nU="≧",iU="⪌",oU="⋛",sU="≥",aU="≧",lU="⩾",uU="⪩",cU="⩾",dU="⪀",hU="⪂",pU="⪄",fU="⋛︀",mU="⪔",gU="𝔊",bU="𝔤",yU="≫",CU="⋙",vU="⋙",kU="ℷ",wU="Ѓ",AU="ѓ",_U="⪥",EU="≷",xU="⪒",DU="⪤",SU="⪊",BU="⪊",MU="⪈",FU="≩",NU="⪈",OU="≩",TU="⋧",LU="𝔾",IU="𝕘",RU="`",zU="≥",$U="⋛",HU="≧",PU="⪢",VU="≷",jU="⩾",qU="≳",UU="𝒢",WU="ℊ",KU="≳",ZU="⪎",GU="⪐",JU="⪧",XU="⩺",QU=">",YU=">",eW="≫",tW="⋗",rW="⦕",nW="⩼",iW="⪆",oW="⥸",sW="⋗",aW="⋛",lW="⪌",uW="≷",cW="≳",dW="≩︀",hW="≩︀",pW="ˇ",fW=" ",mW="½",gW="ℋ",bW="Ъ",yW="ъ",CW="⥈",vW="↔",kW="⇔",wW="↭",AW="^",_W="ℏ",EW="Ĥ",xW="ĥ",DW="♥",SW="♥",BW="…",MW="⊹",FW="𝔥",NW="ℌ",OW="ℋ",TW="⤥",LW="⤦",IW="⇿",RW="∻",zW="↩",$W="↪",HW="𝕙",PW="ℍ",VW="―",jW="─",qW="𝒽",UW="ℋ",WW="ℏ",KW="Ħ",ZW="ħ",GW="≎",JW="≏",XW="⁃",QW="‐",YW="Í",eK="í",tK="⁣",rK="Î",nK="î",iK="И",oK="и",sK="İ",aK="Е",lK="е",uK="¡",cK="⇔",dK="𝔦",hK="ℑ",pK="Ì",fK="ì",mK="ⅈ",gK="⨌",bK="∭",yK="⧜",CK="℩",vK="IJ",kK="ij",wK="Ī",AK="ī",_K="ℑ",EK="ⅈ",xK="ℐ",DK="ℑ",SK="ı",BK="ℑ",MK="⊷",FK="Ƶ",NK="⇒",OK="℅",TK="∞",LK="⧝",IK="ı",RK="⊺",zK="∫",$K="∬",HK="ℤ",PK="∫",VK="⊺",jK="⋂",qK="⨗",UK="⨼",WK="⁣",KK="⁢",ZK="Ё",GK="ё",JK="Į",XK="į",QK="𝕀",YK="𝕚",eZ="Ι",tZ="ι",rZ="⨼",nZ="¿",iZ="𝒾",oZ="ℐ",sZ="∈",aZ="⋵",lZ="⋹",uZ="⋴",cZ="⋳",dZ="∈",hZ="⁢",pZ="Ĩ",fZ="ĩ",mZ="І",gZ="і",bZ="Ï",yZ="ï",CZ="Ĵ",vZ="ĵ",kZ="Й",wZ="й",AZ="𝔍",_Z="𝔧",EZ="ȷ",xZ="𝕁",DZ="𝕛",SZ="𝒥",BZ="𝒿",MZ="Ј",FZ="ј",NZ="Є",OZ="є",TZ="Κ",LZ="κ",IZ="ϰ",RZ="Ķ",zZ="ķ",$Z="К",HZ="к",PZ="𝔎",VZ="𝔨",jZ="ĸ",qZ="Х",UZ="х",WZ="Ќ",KZ="ќ",ZZ="𝕂",GZ="𝕜",JZ="𝒦",XZ="𝓀",QZ="⇚",YZ="Ĺ",eG="ĺ",tG="⦴",rG="ℒ",nG="Λ",iG="λ",oG="⟨",sG="⟪",aG="⦑",lG="⟨",uG="⪅",cG="ℒ",dG="«",hG="⇤",pG="⤟",fG="←",mG="↞",gG="⇐",bG="⤝",yG="↩",CG="↫",vG="⤹",kG="⥳",wG="↢",AG="⤙",_G="⤛",EG="⪫",xG="⪭",DG="⪭︀",SG="⤌",BG="⤎",MG="❲",FG="{",NG="[",OG="⦋",TG="⦏",LG="⦍",IG="Ľ",RG="ľ",zG="Ļ",$G="ļ",HG="⌈",PG="{",VG="Л",jG="л",qG="⤶",UG="“",WG="„",KG="⥧",ZG="⥋",GG="↲",JG="≤",XG="≦",QG="⟨",YG="⇤",eJ="←",tJ="←",rJ="⇐",nJ="⇆",iJ="↢",oJ="⌈",sJ="⟦",aJ="⥡",lJ="⥙",uJ="⇃",cJ="⌊",dJ="↽",hJ="↼",pJ="⇇",fJ="↔",mJ="↔",gJ="⇔",bJ="⇆",yJ="⇋",CJ="↭",vJ="⥎",kJ="↤",wJ="⊣",AJ="⥚",_J="⋋",EJ="⧏",xJ="⊲",DJ="⊴",SJ="⥑",BJ="⥠",MJ="⥘",FJ="↿",NJ="⥒",OJ="↼",TJ="⪋",LJ="⋚",IJ="≤",RJ="≦",zJ="⩽",$J="⪨",HJ="⩽",PJ="⩿",VJ="⪁",jJ="⪃",qJ="⋚︀",UJ="⪓",WJ="⪅",KJ="⋖",ZJ="⋚",GJ="⪋",JJ="⋚",XJ="≦",QJ="≶",YJ="≶",eX="⪡",tX="≲",rX="⩽",nX="≲",iX="⥼",oX="⌊",sX="𝔏",aX="𝔩",lX="≶",uX="⪑",cX="⥢",dX="↽",hX="↼",pX="⥪",fX="▄",mX="Љ",gX="љ",bX="⇇",yX="≪",CX="⋘",vX="⌞",kX="⇚",wX="⥫",AX="◺",_X="Ŀ",EX="ŀ",xX="⎰",DX="⎰",SX="⪉",BX="⪉",MX="⪇",FX="≨",NX="⪇",OX="≨",TX="⋦",LX="⟬",IX="⇽",RX="⟦",zX="⟵",$X="⟵",HX="⟸",PX="⟷",VX="⟷",jX="⟺",qX="⟼",UX="⟶",WX="⟶",KX="⟹",ZX="↫",GX="↬",JX="⦅",XX="𝕃",QX="𝕝",YX="⨭",eQ="⨴",tQ="∗",rQ="_",nQ="↙",iQ="↘",oQ="◊",sQ="◊",aQ="⧫",lQ="(",uQ="⦓",cQ="⇆",dQ="⌟",hQ="⇋",pQ="⥭",fQ="‎",mQ="⊿",gQ="‹",bQ="𝓁",yQ="ℒ",CQ="↰",vQ="↰",kQ="≲",wQ="⪍",AQ="⪏",_Q="[",EQ="‘",xQ="‚",DQ="Ł",SQ="ł",BQ="⪦",MQ="⩹",FQ="<",NQ="<",OQ="≪",TQ="⋖",LQ="⋋",IQ="⋉",RQ="⥶",zQ="⩻",$Q="◃",HQ="⊴",PQ="◂",VQ="⦖",jQ="⥊",qQ="⥦",UQ="≨︀",WQ="≨︀",KQ="¯",ZQ="♂",GQ="✠",JQ="✠",XQ="↦",QQ="↦",YQ="↧",eY="↤",tY="↥",rY="▮",nY="⨩",iY="М",oY="м",sY="—",aY="∺",lY="∡",uY=" ",cY="ℳ",dY="𝔐",hY="𝔪",pY="℧",fY="µ",mY="*",gY="⫰",bY="∣",yY="·",CY="⊟",vY="−",kY="∸",wY="⨪",AY="∓",_Y="⫛",EY="…",xY="∓",DY="⊧",SY="𝕄",BY="𝕞",MY="∓",FY="𝓂",NY="ℳ",OY="∾",TY="Μ",LY="μ",IY="⊸",RY="⊸",zY="∇",$Y="Ń",HY="ń",PY="∠⃒",VY="≉",jY="⩰̸",qY="≋̸",UY="ʼn",WY="≉",KY="♮",ZY="ℕ",GY="♮",JY=" ",XY="≎̸",QY="≏̸",YY="⩃",eee="Ň",tee="ň",ree="Ņ",nee="ņ",iee="≇",oee="⩭̸",see="⩂",aee="Н",lee="н",uee="–",cee="⤤",dee="↗",hee="⇗",pee="↗",fee="≠",mee="≐̸",gee="​",bee="​",yee="​",Cee="​",vee="≢",kee="⤨",wee="≂̸",Aee="≫",_ee="≪",Eee="\n",xee="∄",Dee="∄",See="𝔑",Bee="𝔫",Mee="≧̸",Fee="≱",Nee="≱",Oee="≧̸",Tee="⩾̸",Lee="⩾̸",Iee="⋙̸",Ree="≵",zee="≫⃒",$ee="≯",Hee="≯",Pee="≫̸",Vee="↮",jee="⇎",qee="⫲",Uee="∋",Wee="⋼",Kee="⋺",Zee="∋",Gee="Њ",Jee="њ",Xee="↚",Qee="⇍",Yee="‥",ete="≦̸",tte="≰",rte="↚",nte="⇍",ite="↮",ote="⇎",ste="≰",ate="≦̸",lte="⩽̸",ute="⩽̸",cte="≮",dte="⋘̸",hte="≴",pte="≪⃒",fte="≮",mte="⋪",gte="⋬",bte="≪̸",yte="∤",Cte="⁠",vte=" ",kte="𝕟",wte="ℕ",Ate="⫬",_te="¬",Ete="≢",xte="≭",Dte="∦",Ste="∉",Bte="≠",Mte="≂̸",Fte="∄",Nte="≯",Ote="≱",Tte="≧̸",Lte="≫̸",Ite="≹",Rte="⩾̸",zte="≵",$te="≎̸",Hte="≏̸",Pte="∉",Vte="⋵̸",jte="⋹̸",qte="∉",Ute="⋷",Wte="⋶",Kte="⧏̸",Zte="⋪",Gte="⋬",Jte="≮",Xte="≰",Qte="≸",Yte="≪̸",ere="⩽̸",tre="≴",rre="⪢̸",nre="⪡̸",ire="∌",ore="∌",sre="⋾",are="⋽",lre="⊀",ure="⪯̸",cre="⋠",dre="∌",hre="⧐̸",pre="⋫",fre="⋭",mre="⊏̸",gre="⋢",bre="⊐̸",yre="⋣",Cre="⊂⃒",vre="⊈",kre="⊁",wre="⪰̸",Are="⋡",_re="≿̸",Ere="⊃⃒",xre="⊉",Dre="≁",Sre="≄",Bre="≇",Mre="≉",Fre="∤",Nre="∦",Ore="∦",Tre="⫽⃥",Lre="∂̸",Ire="⨔",Rre="⊀",zre="⋠",$re="⊀",Hre="⪯̸",Pre="⪯̸",Vre="⤳̸",jre="↛",qre="⇏",Ure="↝̸",Wre="↛",Kre="⇏",Zre="⋫",Gre="⋭",Jre="⊁",Xre="⋡",Qre="⪰̸",Yre="𝒩",ene="𝓃",tne="∤",rne="∦",nne="≁",ine="≄",one="≄",sne="∤",ane="∦",lne="⋢",une="⋣",cne="⊄",dne="⫅̸",hne="⊈",pne="⊂⃒",fne="⊈",mne="⫅̸",gne="⊁",bne="⪰̸",yne="⊅",Cne="⫆̸",vne="⊉",kne="⊃⃒",wne="⊉",Ane="⫆̸",_ne="≹",Ene="Ñ",xne="ñ",Dne="≸",Sne="⋪",Bne="⋬",Mne="⋫",Fne="⋭",Nne="Ν",One="ν",Tne="#",Lne="№",Ine=" ",Rne="≍⃒",zne="⊬",$ne="⊭",Hne="⊮",Pne="⊯",Vne="≥⃒",jne=">⃒",qne="⤄",Une="⧞",Wne="⤂",Kne="≤⃒",Zne="<⃒",Gne="⊴⃒",Jne="⤃",Xne="⊵⃒",Qne="∼⃒",Yne="⤣",eie="↖",tie="⇖",rie="↖",nie="⤧",iie="Ó",oie="ó",sie="⊛",aie="Ô",lie="ô",uie="⊚",cie="О",die="о",hie="⊝",pie="Ő",fie="ő",mie="⨸",gie="⊙",bie="⦼",yie="Œ",Cie="œ",vie="⦿",kie="𝔒",wie="𝔬",Aie="˛",_ie="Ò",Eie="ò",xie="⧁",Die="⦵",Sie="Ω",Bie="∮",Mie="↺",Fie="⦾",Nie="⦻",Oie="‾",Tie="⧀",Lie="Ō",Iie="ō",Rie="Ω",zie="ω",$ie="Ο",Hie="ο",Pie="⦶",Vie="⊖",jie="𝕆",qie="𝕠",Uie="⦷",Wie="“",Kie="‘",Zie="⦹",Gie="⊕",Jie="↻",Xie="⩔",Qie="∨",Yie="⩝",eoe="ℴ",toe="ℴ",roe="ª",noe="º",ioe="⊶",ooe="⩖",soe="⩗",aoe="⩛",loe="Ⓢ",uoe="𝒪",coe="ℴ",doe="Ø",hoe="ø",poe="⊘",foe="Õ",moe="õ",goe="⨶",boe="⨷",yoe="⊗",Coe="Ö",voe="ö",koe="⌽",woe="‾",Aoe="⏞",_oe="⎴",Eoe="⏜",xoe="¶",Doe="∥",Soe="∥",Boe="⫳",Moe="⫽",Foe="∂",Noe="∂",Ooe="П",Toe="п",Loe="%",Ioe=".",Roe="‰",zoe="⊥",$oe="‱",Hoe="𝔓",Poe="𝔭",Voe="Φ",joe="φ",qoe="ϕ",Uoe="ℳ",Woe="☎",Koe="Π",Zoe="π",Goe="⋔",Joe="ϖ",Xoe="ℏ",Qoe="ℎ",Yoe="ℏ",ese="⨣",tse="⊞",rse="⨢",nse="+",ise="∔",ose="⨥",sse="⩲",ase="±",lse="±",use="⨦",cse="⨧",dse="±",hse="ℌ",pse="⨕",fse="𝕡",mse="ℙ",gse="£",bse="⪷",yse="⪻",Cse="≺",vse="≼",kse="⪷",wse="≺",Ase="≼",_se="≺",Ese="⪯",xse="≼",Dse="≾",Sse="⪯",Bse="⪹",Mse="⪵",Fse="⋨",Nse="⪯",Ose="⪳",Tse="≾",Lse="′",Ise="″",Rse="ℙ",zse="⪹",$se="⪵",Hse="⋨",Pse="∏",Vse="∏",jse="⌮",qse="⌒",Use="⌓",Wse="∝",Kse="∝",Zse="∷",Gse="∝",Jse="≾",Xse="⊰",Qse="𝒫",Yse="𝓅",eae="Ψ",tae="ψ",rae=" ",nae="𝔔",iae="𝔮",oae="⨌",sae="𝕢",aae="ℚ",lae="⁗",uae="𝒬",cae="𝓆",dae="ℍ",hae="⨖",pae="?",fae="≟",mae='"',gae='"',bae="⇛",yae="∽̱",Cae="Ŕ",vae="ŕ",kae="√",wae="⦳",Aae="⟩",_ae="⟫",Eae="⦒",xae="⦥",Dae="⟩",Sae="»",Bae="⥵",Mae="⇥",Fae="⤠",Nae="⤳",Oae="→",Tae="↠",Lae="⇒",Iae="⤞",Rae="↪",zae="↬",$ae="⥅",Hae="⥴",Pae="⤖",Vae="↣",jae="↝",qae="⤚",Uae="⤜",Wae="∶",Kae="ℚ",Zae="⤍",Gae="⤏",Jae="⤐",Xae="❳",Qae="}",Yae="]",ele="⦌",tle="⦎",rle="⦐",nle="Ř",ile="ř",ole="Ŗ",sle="ŗ",ale="⌉",lle="}",ule="Р",cle="р",dle="⤷",hle="⥩",ple="”",fle="”",mle="↳",gle="ℜ",ble="ℛ",yle="ℜ",Cle="ℝ",vle="ℜ",kle="▭",wle="®",Ale="®",_le="∋",Ele="⇋",xle="⥯",Dle="⥽",Sle="⌋",Ble="𝔯",Mle="ℜ",Fle="⥤",Nle="⇁",Ole="⇀",Tle="⥬",Lle="Ρ",Ile="ρ",Rle="ϱ",zle="⟩",$le="⇥",Hle="→",Ple="→",Vle="⇒",jle="⇄",qle="↣",Ule="⌉",Wle="⟧",Kle="⥝",Zle="⥕",Gle="⇂",Jle="⌋",Xle="⇁",Qle="⇀",Yle="⇄",eue="⇌",tue="⇉",rue="↝",nue="↦",iue="⊢",oue="⥛",sue="⋌",aue="⧐",lue="⊳",uue="⊵",cue="⥏",due="⥜",hue="⥔",pue="↾",fue="⥓",mue="⇀",gue="˚",bue="≓",yue="⇄",Cue="⇌",vue="‏",kue="⎱",wue="⎱",Aue="⫮",_ue="⟭",Eue="⇾",xue="⟧",Due="⦆",Sue="𝕣",Bue="ℝ",Mue="⨮",Fue="⨵",Nue="⥰",Oue=")",Tue="⦔",Lue="⨒",Iue="⇉",Rue="⇛",zue="›",$ue="𝓇",Hue="ℛ",Pue="↱",Vue="↱",jue="]",que="’",Uue="’",Wue="⋌",Kue="⋊",Zue="▹",Gue="⊵",Jue="▸",Xue="⧎",Que="⧴",Yue="⥨",ece="℞",tce="Ś",rce="ś",nce="‚",ice="⪸",oce="Š",sce="š",ace="⪼",lce="≻",uce="≽",cce="⪰",dce="⪴",hce="Ş",pce="ş",fce="Ŝ",mce="ŝ",gce="⪺",bce="⪶",yce="⋩",Cce="⨓",vce="≿",kce="С",wce="с",Ace="⊡",_ce="⋅",Ece="⩦",xce="⤥",Dce="↘",Sce="⇘",Bce="↘",Mce="§",Fce=";",Nce="⤩",Oce="∖",Tce="∖",Lce="✶",Ice="𝔖",Rce="𝔰",zce="⌢",$ce="♯",Hce="Щ",Pce="щ",Vce="Ш",jce="ш",qce="↓",Uce="←",Wce="∣",Kce="∥",Zce="→",Gce="↑",Jce="­",Xce="Σ",Qce="σ",Yce="ς",ede="ς",tde="∼",rde="⩪",nde="≃",ide="≃",ode="⪞",sde="⪠",ade="⪝",lde="⪟",ude="≆",cde="⨤",dde="⥲",hde="←",pde="∘",fde="∖",mde="⨳",gde="⧤",bde="∣",yde="⌣",Cde="⪪",vde="⪬",kde="⪬︀",wde="Ь",Ade="ь",_de="⌿",Ede="⧄",xde="/",Dde="𝕊",Sde="𝕤",Bde="♠",Mde="♠",Fde="∥",Nde="⊓",Ode="⊓︀",Tde="⊔",Lde="⊔︀",Ide="√",Rde="⊏",zde="⊑",$de="⊏",Hde="⊑",Pde="⊐",Vde="⊒",jde="⊐",qde="⊒",Ude="□",Wde="□",Kde="⊓",Zde="⊏",Gde="⊑",Jde="⊐",Xde="⊒",Qde="⊔",Yde="▪",ehe="□",the="▪",rhe="→",nhe="𝒮",ihe="𝓈",ohe="∖",she="⌣",ahe="⋆",lhe="⋆",uhe="☆",che="★",dhe="ϵ",hhe="ϕ",phe="¯",fhe="⊂",mhe="⋐",ghe="⪽",bhe="⫅",yhe="⊆",Che="⫃",vhe="⫁",khe="⫋",whe="⊊",Ahe="⪿",_he="⥹",Ehe="⊂",xhe="⋐",Dhe="⊆",She="⫅",Bhe="⊆",Mhe="⊊",Fhe="⫋",Nhe="⫇",Ohe="⫕",The="⫓",Lhe="⪸",Ihe="≻",Rhe="≽",zhe="≻",$he="⪰",Hhe="≽",Phe="≿",Vhe="⪰",jhe="⪺",qhe="⪶",Uhe="⋩",Whe="≿",Khe="∋",Zhe="∑",Ghe="∑",Jhe="♪",Xhe="¹",Qhe="²",Yhe="³",epe="⊃",tpe="⋑",rpe="⪾",npe="⫘",ipe="⫆",ope="⊇",spe="⫄",ape="⊃",lpe="⊇",upe="⟉",cpe="⫗",dpe="⥻",hpe="⫂",ppe="⫌",fpe="⊋",mpe="⫀",gpe="⊃",bpe="⋑",ype="⊇",Cpe="⫆",vpe="⊋",kpe="⫌",wpe="⫈",Ape="⫔",_pe="⫖",Epe="⤦",xpe="↙",Dpe="⇙",Spe="↙",Bpe="⤪",Mpe="ß",Fpe="	",Npe="⌖",Ope="Τ",Tpe="τ",Lpe="⎴",Ipe="Ť",Rpe="ť",zpe="Ţ",$pe="ţ",Hpe="Т",Ppe="т",Vpe="⃛",jpe="⌕",qpe="𝔗",Upe="𝔱",Wpe="∴",Kpe="∴",Zpe="∴",Gpe="Θ",Jpe="θ",Xpe="ϑ",Qpe="ϑ",Ype="≈",e0e="∼",t0e="  ",r0e=" ",n0e=" ",i0e="≈",o0e="∼",s0e="Þ",a0e="þ",l0e="˜",u0e="∼",c0e="≃",d0e="≅",h0e="≈",p0e="⨱",f0e="⊠",m0e="×",g0e="⨰",b0e="∭",y0e="⤨",C0e="⌶",v0e="⫱",k0e="⊤",w0e="𝕋",A0e="𝕥",_0e="⫚",E0e="⤩",x0e="‴",D0e="™",S0e="™",B0e="▵",M0e="▿",F0e="◃",N0e="⊴",O0e="≜",T0e="▹",L0e="⊵",I0e="◬",R0e="≜",z0e="⨺",$0e="⃛",H0e="⨹",P0e="⧍",V0e="⨻",j0e="⏢",q0e="𝒯",U0e="𝓉",W0e="Ц",K0e="ц",Z0e="Ћ",G0e="ћ",J0e="Ŧ",X0e="ŧ",Q0e="≬",Y0e="↞",efe="↠",tfe="Ú",rfe="ú",nfe="↑",ife="↟",ofe="⇑",sfe="⥉",afe="Ў",lfe="ў",ufe="Ŭ",cfe="ŭ",dfe="Û",hfe="û",pfe="У",ffe="у",mfe="⇅",gfe="Ű",bfe="ű",yfe="⥮",Cfe="⥾",vfe="𝔘",kfe="𝔲",wfe="Ù",Afe="ù",_fe="⥣",Efe="↿",xfe="↾",Dfe="▀",Sfe="⌜",Bfe="⌜",Mfe="⌏",Ffe="◸",Nfe="Ū",Ofe="ū",Tfe="¨",Lfe="_",Ife="⏟",Rfe="⎵",zfe="⏝",$fe="⋃",Hfe="⊎",Pfe="Ų",Vfe="ų",jfe="𝕌",qfe="𝕦",Ufe="⤒",Wfe="↑",Kfe="↑",Zfe="⇑",Gfe="⇅",Jfe="↕",Xfe="↕",Qfe="⇕",Yfe="⥮",eme="↿",tme="↾",rme="⊎",nme="↖",ime="↗",ome="υ",sme="ϒ",ame="ϒ",lme="Υ",ume="υ",cme="↥",dme="⊥",hme="⇈",pme="⌝",fme="⌝",mme="⌎",gme="Ů",bme="ů",yme="◹",Cme="𝒰",vme="𝓊",kme="⋰",wme="Ũ",Ame="ũ",_me="▵",Eme="▴",xme="⇈",Dme="Ü",Sme="ü",Bme="⦧",Mme="⦜",Fme="ϵ",Nme="ϰ",Ome="∅",Tme="ϕ",Lme="ϖ",Ime="∝",Rme="↕",zme="⇕",$me="ϱ",Hme="ς",Pme="⊊︀",Vme="⫋︀",jme="⊋︀",qme="⫌︀",Ume="ϑ",Wme="⊲",Kme="⊳",Zme="⫨",Gme="⫫",Jme="⫩",Xme="В",Qme="в",Yme="⊢",e1e="⊨",t1e="⊩",r1e="⊫",n1e="⫦",i1e="⊻",o1e="∨",s1e="⋁",a1e="≚",l1e="⋮",u1e="|",c1e="‖",d1e="|",h1e="‖",p1e="∣",f1e="|",m1e="❘",g1e="≀",b1e=" ",y1e="𝔙",C1e="𝔳",v1e="⊲",k1e="⊂⃒",w1e="⊃⃒",A1e="𝕍",_1e="𝕧",E1e="∝",x1e="⊳",D1e="𝒱",S1e="𝓋",B1e="⫋︀",M1e="⊊︀",F1e="⫌︀",N1e="⊋︀",O1e="⊪",T1e="⦚",L1e="Ŵ",I1e="ŵ",R1e="⩟",z1e="∧",$1e="⋀",H1e="≙",P1e="℘",V1e="𝔚",j1e="𝔴",q1e="𝕎",U1e="𝕨",W1e="℘",K1e="≀",Z1e="≀",G1e="𝒲",J1e="𝓌",X1e="⋂",Q1e="◯",Y1e="⋃",ege="▽",tge="𝔛",rge="𝔵",nge="⟷",ige="⟺",oge="Ξ",sge="ξ",age="⟵",lge="⟸",uge="⟼",cge="⋻",dge="⨀",hge="𝕏",pge="𝕩",fge="⨁",mge="⨂",gge="⟶",bge="⟹",yge="𝒳",Cge="𝓍",vge="⨆",kge="⨄",wge="△",Age="⋁",_ge="⋀",Ege="Ý",xge="ý",Dge="Я",Sge="я",Bge="Ŷ",Mge="ŷ",Fge="Ы",Nge="ы",Oge="¥",Tge="𝔜",Lge="𝔶",Ige="Ї",Rge="ї",zge="𝕐",$ge="𝕪",Hge="𝒴",Pge="𝓎",Vge="Ю",jge="ю",qge="ÿ",Uge="Ÿ",Wge="Ź",Kge="ź",Zge="Ž",Gge="ž",Jge="З",Xge="з",Qge="Ż",Yge="ż",e2e="ℨ",t2e="​",r2e="Ζ",n2e="ζ",i2e="𝔷",o2e="ℨ",s2e="Ж",a2e="ж",l2e="⇝",u2e="𝕫",c2e="ℤ",d2e="𝒵",h2e="𝓏",p2e="‍",f2e="‌",m2e={Aacute:QT,aacute:YT,Abreve:e7,abreve:t7,ac:r7,acd:n7,acE:i7,Acirc:o7,acirc:s7,acute:a7,Acy:l7,acy:u7,AElig:c7,aelig:d7,af:h7,Afr:p7,afr:f7,Agrave:m7,agrave:g7,alefsym:b7,aleph:y7,Alpha:C7,alpha:v7,Amacr:k7,amacr:w7,amalg:A7,amp:_7,AMP:E7,andand:x7,And:D7,and:S7,andd:B7,andslope:M7,andv:F7,ang:N7,ange:O7,angle:T7,angmsdaa:L7,angmsdab:I7,angmsdac:R7,angmsdad:z7,angmsdae:$7,angmsdaf:H7,angmsdag:P7,angmsdah:V7,angmsd:j7,angrt:q7,angrtvb:U7,angrtvbd:W7,angsph:K7,angst:Z7,angzarr:G7,Aogon:J7,aogon:X7,Aopf:Q7,aopf:Y7,apacir:eL,ap:tL,apE:rL,ape:nL,apid:iL,apos:oL,ApplyFunction:sL,approx:aL,approxeq:lL,Aring:uL,aring:cL,Ascr:dL,ascr:hL,Assign:pL,ast:fL,asymp:mL,asympeq:gL,Atilde:bL,atilde:yL,Auml:CL,auml:vL,awconint:kL,awint:wL,backcong:AL,backepsilon:_L,backprime:EL,backsim:xL,backsimeq:DL,Backslash:SL,Barv:BL,barvee:ML,barwed:FL,Barwed:NL,barwedge:OL,bbrk:TL,bbrktbrk:LL,bcong:IL,Bcy:RL,bcy:zL,bdquo:$L,becaus:HL,because:PL,Because:VL,bemptyv:jL,bepsi:qL,bernou:UL,Bernoullis:WL,Beta:KL,beta:ZL,beth:GL,between:JL,Bfr:XL,bfr:QL,bigcap:YL,bigcirc:eI,bigcup:tI,bigodot:rI,bigoplus:nI,bigotimes:iI,bigsqcup:oI,bigstar:sI,bigtriangledown:aI,bigtriangleup:lI,biguplus:uI,bigvee:cI,bigwedge:dI,bkarow:hI,blacklozenge:pI,blacksquare:fI,blacktriangle:mI,blacktriangledown:gI,blacktriangleleft:bI,blacktriangleright:yI,blank:CI,blk12:vI,blk14:kI,blk34:wI,block:AI,bne:_I,bnequiv:EI,bNot:xI,bnot:DI,Bopf:SI,bopf:BI,bot:MI,bottom:FI,bowtie:NI,boxbox:OI,boxdl:TI,boxdL:LI,boxDl:II,boxDL:RI,boxdr:zI,boxdR:$I,boxDr:HI,boxDR:PI,boxh:VI,boxH:jI,boxhd:qI,boxHd:UI,boxhD:WI,boxHD:KI,boxhu:ZI,boxHu:GI,boxhU:JI,boxHU:XI,boxminus:QI,boxplus:YI,boxtimes:eR,boxul:tR,boxuL:rR,boxUl:nR,boxUL:iR,boxur:oR,boxuR:sR,boxUr:aR,boxUR:lR,boxv:uR,boxV:cR,boxvh:dR,boxvH:hR,boxVh:pR,boxVH:fR,boxvl:mR,boxvL:gR,boxVl:bR,boxVL:yR,boxvr:CR,boxvR:vR,boxVr:kR,boxVR:wR,bprime:AR,breve:_R,Breve:ER,brvbar:xR,bscr:DR,Bscr:SR,bsemi:BR,bsim:MR,bsime:FR,bsolb:NR,bsol:OR,bsolhsub:TR,bull:LR,bullet:IR,bump:RR,bumpE:zR,bumpe:$R,Bumpeq:HR,bumpeq:PR,Cacute:VR,cacute:jR,capand:qR,capbrcup:UR,capcap:WR,cap:KR,Cap:ZR,capcup:GR,capdot:JR,CapitalDifferentialD:XR,caps:QR,caret:YR,caron:ez,Cayleys:tz,ccaps:rz,Ccaron:nz,ccaron:iz,Ccedil:oz,ccedil:sz,Ccirc:az,ccirc:lz,Cconint:uz,ccups:cz,ccupssm:dz,Cdot:hz,cdot:pz,cedil:fz,Cedilla:mz,cemptyv:gz,cent:bz,centerdot:yz,CenterDot:Cz,cfr:vz,Cfr:kz,CHcy:wz,chcy:Az,check:_z,checkmark:Ez,Chi:xz,chi:Dz,circ:Sz,circeq:Bz,circlearrowleft:Mz,circlearrowright:Fz,circledast:Nz,circledcirc:Oz,circleddash:Tz,CircleDot:Lz,circledR:Iz,circledS:Rz,CircleMinus:zz,CirclePlus:$z,CircleTimes:Hz,cir:Pz,cirE:Vz,cire:jz,cirfnint:qz,cirmid:Uz,cirscir:Wz,ClockwiseContourIntegral:Kz,CloseCurlyDoubleQuote:Zz,CloseCurlyQuote:Gz,clubs:Jz,clubsuit:Xz,colon:Qz,Colon:Yz,Colone:e$,colone:t$,coloneq:r$,comma:n$,commat:i$,comp:o$,compfn:s$,complement:a$,complexes:l$,cong:u$,congdot:c$,Congruent:d$,conint:h$,Conint:p$,ContourIntegral:f$,copf:m$,Copf:g$,coprod:b$,Coproduct:y$,copy:C$,COPY:v$,copysr:k$,CounterClockwiseContourIntegral:w$,crarr:A$,cross:_$,Cross:E$,Cscr:x$,cscr:D$,csub:S$,csube:B$,csup:M$,csupe:F$,ctdot:N$,cudarrl:O$,cudarrr:T$,cuepr:L$,cuesc:I$,cularr:R$,cularrp:z$,cupbrcap:$$,cupcap:H$,CupCap:P$,cup:V$,Cup:j$,cupcup:q$,cupdot:U$,cupor:W$,cups:K$,curarr:Z$,curarrm:G$,curlyeqprec:J$,curlyeqsucc:X$,curlyvee:Q$,curlywedge:Y$,curren:eH,curvearrowleft:tH,curvearrowright:rH,cuvee:nH,cuwed:iH,cwconint:oH,cwint:sH,cylcty:aH,dagger:lH,Dagger:uH,daleth:cH,darr:dH,Darr:hH,dArr:pH,dash:fH,Dashv:mH,dashv:gH,dbkarow:bH,dblac:yH,Dcaron:CH,dcaron:vH,Dcy:kH,dcy:wH,ddagger:AH,ddarr:_H,DD:EH,dd:xH,DDotrahd:DH,ddotseq:SH,deg:BH,Del:MH,Delta:FH,delta:NH,demptyv:OH,dfisht:TH,Dfr:LH,dfr:IH,dHar:RH,dharl:zH,dharr:$H,DiacriticalAcute:HH,DiacriticalDot:PH,DiacriticalDoubleAcute:VH,DiacriticalGrave:jH,DiacriticalTilde:qH,diam:UH,diamond:WH,Diamond:KH,diamondsuit:ZH,diams:GH,die:JH,DifferentialD:XH,digamma:QH,disin:YH,div:eP,divide:tP,divideontimes:rP,divonx:nP,DJcy:iP,djcy:oP,dlcorn:sP,dlcrop:aP,dollar:lP,Dopf:uP,dopf:cP,Dot:dP,dot:hP,DotDot:pP,doteq:fP,doteqdot:mP,DotEqual:gP,dotminus:bP,dotplus:yP,dotsquare:CP,doublebarwedge:vP,DoubleContourIntegral:kP,DoubleDot:wP,DoubleDownArrow:AP,DoubleLeftArrow:_P,DoubleLeftRightArrow:EP,DoubleLeftTee:xP,DoubleLongLeftArrow:DP,DoubleLongLeftRightArrow:SP,DoubleLongRightArrow:BP,DoubleRightArrow:MP,DoubleRightTee:FP,DoubleUpArrow:NP,DoubleUpDownArrow:OP,DoubleVerticalBar:TP,DownArrowBar:LP,downarrow:IP,DownArrow:RP,Downarrow:zP,DownArrowUpArrow:$P,DownBreve:HP,downdownarrows:PP,downharpoonleft:VP,downharpoonright:jP,DownLeftRightVector:qP,DownLeftTeeVector:UP,DownLeftVectorBar:WP,DownLeftVector:KP,DownRightTeeVector:ZP,DownRightVectorBar:GP,DownRightVector:JP,DownTeeArrow:XP,DownTee:QP,drbkarow:YP,drcorn:eV,drcrop:tV,Dscr:rV,dscr:nV,DScy:iV,dscy:oV,dsol:sV,Dstrok:aV,dstrok:lV,dtdot:uV,dtri:cV,dtrif:dV,duarr:hV,duhar:pV,dwangle:fV,DZcy:mV,dzcy:gV,dzigrarr:bV,Eacute:yV,eacute:CV,easter:vV,Ecaron:kV,ecaron:wV,Ecirc:AV,ecirc:_V,ecir:EV,ecolon:xV,Ecy:DV,ecy:SV,eDDot:BV,Edot:MV,edot:FV,eDot:NV,ee:OV,efDot:TV,Efr:LV,efr:IV,eg:RV,Egrave:zV,egrave:$V,egs:HV,egsdot:PV,el:VV,Element:jV,elinters:qV,ell:UV,els:WV,elsdot:KV,Emacr:ZV,emacr:GV,empty:JV,emptyset:XV,EmptySmallSquare:QV,emptyv:YV,EmptyVerySmallSquare:ej,emsp13:tj,emsp14:rj,emsp:nj,ENG:ij,eng:oj,ensp:sj,Eogon:aj,eogon:lj,Eopf:uj,eopf:cj,epar:dj,eparsl:hj,eplus:pj,epsi:fj,Epsilon:mj,epsilon:gj,epsiv:bj,eqcirc:yj,eqcolon:Cj,eqsim:vj,eqslantgtr:kj,eqslantless:wj,Equal:Aj,equals:_j,EqualTilde:Ej,equest:xj,Equilibrium:Dj,equiv:Sj,equivDD:Bj,eqvparsl:Mj,erarr:Fj,erDot:Nj,escr:Oj,Escr:Tj,esdot:Lj,Esim:Ij,esim:Rj,Eta:zj,eta:$j,ETH:Hj,eth:Pj,Euml:Vj,euml:jj,euro:qj,excl:Uj,exist:Wj,Exists:Kj,expectation:Zj,exponentiale:Gj,ExponentialE:Jj,fallingdotseq:Xj,Fcy:Qj,fcy:Yj,female:eq,ffilig:tq,fflig:rq,ffllig:nq,Ffr:iq,ffr:oq,filig:sq,FilledSmallSquare:aq,FilledVerySmallSquare:lq,fjlig:uq,flat:cq,fllig:dq,fltns:hq,fnof:pq,Fopf:fq,fopf:mq,forall:gq,ForAll:bq,fork:yq,forkv:Cq,Fouriertrf:vq,fpartint:kq,frac12:wq,frac13:Aq,frac14:_q,frac15:Eq,frac16:xq,frac18:Dq,frac23:Sq,frac25:Bq,frac34:Mq,frac35:Fq,frac38:Nq,frac45:Oq,frac56:Tq,frac58:Lq,frac78:Iq,frasl:Rq,frown:zq,fscr:$q,Fscr:Hq,gacute:Pq,Gamma:Vq,gamma:jq,Gammad:qq,gammad:Uq,gap:Wq,Gbreve:Kq,gbreve:Zq,Gcedil:Gq,Gcirc:Jq,gcirc:Xq,Gcy:Qq,gcy:Yq,Gdot:eU,gdot:tU,ge:rU,gE:nU,gEl:iU,gel:oU,geq:sU,geqq:aU,geqslant:lU,gescc:uU,ges:cU,gesdot:dU,gesdoto:hU,gesdotol:pU,gesl:fU,gesles:mU,Gfr:gU,gfr:bU,gg:yU,Gg:CU,ggg:vU,gimel:kU,GJcy:wU,gjcy:AU,gla:_U,gl:EU,glE:xU,glj:DU,gnap:SU,gnapprox:BU,gne:MU,gnE:FU,gneq:NU,gneqq:OU,gnsim:TU,Gopf:LU,gopf:IU,grave:RU,GreaterEqual:zU,GreaterEqualLess:$U,GreaterFullEqual:HU,GreaterGreater:PU,GreaterLess:VU,GreaterSlantEqual:jU,GreaterTilde:qU,Gscr:UU,gscr:WU,gsim:KU,gsime:ZU,gsiml:GU,gtcc:JU,gtcir:XU,gt:QU,GT:YU,Gt:eW,gtdot:tW,gtlPar:rW,gtquest:nW,gtrapprox:iW,gtrarr:oW,gtrdot:sW,gtreqless:aW,gtreqqless:lW,gtrless:uW,gtrsim:cW,gvertneqq:dW,gvnE:hW,Hacek:pW,hairsp:fW,half:mW,hamilt:gW,HARDcy:bW,hardcy:yW,harrcir:CW,harr:vW,hArr:kW,harrw:wW,Hat:AW,hbar:_W,Hcirc:EW,hcirc:xW,hearts:DW,heartsuit:SW,hellip:BW,hercon:MW,hfr:FW,Hfr:NW,HilbertSpace:OW,hksearow:TW,hkswarow:LW,hoarr:IW,homtht:RW,hookleftarrow:zW,hookrightarrow:$W,hopf:HW,Hopf:PW,horbar:VW,HorizontalLine:jW,hscr:qW,Hscr:UW,hslash:WW,Hstrok:KW,hstrok:ZW,HumpDownHump:GW,HumpEqual:JW,hybull:XW,hyphen:QW,Iacute:YW,iacute:eK,ic:tK,Icirc:rK,icirc:nK,Icy:iK,icy:oK,Idot:sK,IEcy:aK,iecy:lK,iexcl:uK,iff:cK,ifr:dK,Ifr:hK,Igrave:pK,igrave:fK,ii:mK,iiiint:gK,iiint:bK,iinfin:yK,iiota:CK,IJlig:vK,ijlig:kK,Imacr:wK,imacr:AK,image:_K,ImaginaryI:EK,imagline:xK,imagpart:DK,imath:SK,Im:BK,imof:MK,imped:FK,Implies:NK,incare:OK,in:"∈",infin:TK,infintie:LK,inodot:IK,intcal:RK,int:zK,Int:$K,integers:HK,Integral:PK,intercal:VK,Intersection:jK,intlarhk:qK,intprod:UK,InvisibleComma:WK,InvisibleTimes:KK,IOcy:ZK,iocy:GK,Iogon:JK,iogon:XK,Iopf:QK,iopf:YK,Iota:eZ,iota:tZ,iprod:rZ,iquest:nZ,iscr:iZ,Iscr:oZ,isin:sZ,isindot:aZ,isinE:lZ,isins:uZ,isinsv:cZ,isinv:dZ,it:hZ,Itilde:pZ,itilde:fZ,Iukcy:mZ,iukcy:gZ,Iuml:bZ,iuml:yZ,Jcirc:CZ,jcirc:vZ,Jcy:kZ,jcy:wZ,Jfr:AZ,jfr:_Z,jmath:EZ,Jopf:xZ,jopf:DZ,Jscr:SZ,jscr:BZ,Jsercy:MZ,jsercy:FZ,Jukcy:NZ,jukcy:OZ,Kappa:TZ,kappa:LZ,kappav:IZ,Kcedil:RZ,kcedil:zZ,Kcy:$Z,kcy:HZ,Kfr:PZ,kfr:VZ,kgreen:jZ,KHcy:qZ,khcy:UZ,KJcy:WZ,kjcy:KZ,Kopf:ZZ,kopf:GZ,Kscr:JZ,kscr:XZ,lAarr:QZ,Lacute:YZ,lacute:eG,laemptyv:tG,lagran:rG,Lambda:nG,lambda:iG,lang:oG,Lang:sG,langd:aG,langle:lG,lap:uG,Laplacetrf:cG,laquo:dG,larrb:hG,larrbfs:pG,larr:fG,Larr:mG,lArr:gG,larrfs:bG,larrhk:yG,larrlp:CG,larrpl:vG,larrsim:kG,larrtl:wG,latail:AG,lAtail:_G,lat:EG,late:xG,lates:DG,lbarr:SG,lBarr:BG,lbbrk:MG,lbrace:FG,lbrack:NG,lbrke:OG,lbrksld:TG,lbrkslu:LG,Lcaron:IG,lcaron:RG,Lcedil:zG,lcedil:$G,lceil:HG,lcub:PG,Lcy:VG,lcy:jG,ldca:qG,ldquo:UG,ldquor:WG,ldrdhar:KG,ldrushar:ZG,ldsh:GG,le:JG,lE:XG,LeftAngleBracket:QG,LeftArrowBar:YG,leftarrow:eJ,LeftArrow:tJ,Leftarrow:rJ,LeftArrowRightArrow:nJ,leftarrowtail:iJ,LeftCeiling:oJ,LeftDoubleBracket:sJ,LeftDownTeeVector:aJ,LeftDownVectorBar:lJ,LeftDownVector:uJ,LeftFloor:cJ,leftharpoondown:dJ,leftharpoonup:hJ,leftleftarrows:pJ,leftrightarrow:fJ,LeftRightArrow:mJ,Leftrightarrow:gJ,leftrightarrows:bJ,leftrightharpoons:yJ,leftrightsquigarrow:CJ,LeftRightVector:vJ,LeftTeeArrow:kJ,LeftTee:wJ,LeftTeeVector:AJ,leftthreetimes:_J,LeftTriangleBar:EJ,LeftTriangle:xJ,LeftTriangleEqual:DJ,LeftUpDownVector:SJ,LeftUpTeeVector:BJ,LeftUpVectorBar:MJ,LeftUpVector:FJ,LeftVectorBar:NJ,LeftVector:OJ,lEg:TJ,leg:LJ,leq:IJ,leqq:RJ,leqslant:zJ,lescc:$J,les:HJ,lesdot:PJ,lesdoto:VJ,lesdotor:jJ,lesg:qJ,lesges:UJ,lessapprox:WJ,lessdot:KJ,lesseqgtr:ZJ,lesseqqgtr:GJ,LessEqualGreater:JJ,LessFullEqual:XJ,LessGreater:QJ,lessgtr:YJ,LessLess:eX,lesssim:tX,LessSlantEqual:rX,LessTilde:nX,lfisht:iX,lfloor:oX,Lfr:sX,lfr:aX,lg:lX,lgE:uX,lHar:cX,lhard:dX,lharu:hX,lharul:pX,lhblk:fX,LJcy:mX,ljcy:gX,llarr:bX,ll:yX,Ll:CX,llcorner:vX,Lleftarrow:kX,llhard:wX,lltri:AX,Lmidot:_X,lmidot:EX,lmoustache:xX,lmoust:DX,lnap:SX,lnapprox:BX,lne:MX,lnE:FX,lneq:NX,lneqq:OX,lnsim:TX,loang:LX,loarr:IX,lobrk:RX,longleftarrow:zX,LongLeftArrow:$X,Longleftarrow:HX,longleftrightarrow:PX,LongLeftRightArrow:VX,Longleftrightarrow:jX,longmapsto:qX,longrightarrow:UX,LongRightArrow:WX,Longrightarrow:KX,looparrowleft:ZX,looparrowright:GX,lopar:JX,Lopf:XX,lopf:QX,loplus:YX,lotimes:eQ,lowast:tQ,lowbar:rQ,LowerLeftArrow:nQ,LowerRightArrow:iQ,loz:oQ,lozenge:sQ,lozf:aQ,lpar:lQ,lparlt:uQ,lrarr:cQ,lrcorner:dQ,lrhar:hQ,lrhard:pQ,lrm:fQ,lrtri:mQ,lsaquo:gQ,lscr:bQ,Lscr:yQ,lsh:CQ,Lsh:vQ,lsim:kQ,lsime:wQ,lsimg:AQ,lsqb:_Q,lsquo:EQ,lsquor:xQ,Lstrok:DQ,lstrok:SQ,ltcc:BQ,ltcir:MQ,lt:FQ,LT:NQ,Lt:OQ,ltdot:TQ,lthree:LQ,ltimes:IQ,ltlarr:RQ,ltquest:zQ,ltri:$Q,ltrie:HQ,ltrif:PQ,ltrPar:VQ,lurdshar:jQ,luruhar:qQ,lvertneqq:UQ,lvnE:WQ,macr:KQ,male:ZQ,malt:GQ,maltese:JQ,Map:"⤅",map:XQ,mapsto:QQ,mapstodown:YQ,mapstoleft:eY,mapstoup:tY,marker:rY,mcomma:nY,Mcy:iY,mcy:oY,mdash:sY,mDDot:aY,measuredangle:lY,MediumSpace:uY,Mellintrf:cY,Mfr:dY,mfr:hY,mho:pY,micro:fY,midast:mY,midcir:gY,mid:bY,middot:yY,minusb:CY,minus:vY,minusd:kY,minusdu:wY,MinusPlus:AY,mlcp:_Y,mldr:EY,mnplus:xY,models:DY,Mopf:SY,mopf:BY,mp:MY,mscr:FY,Mscr:NY,mstpos:OY,Mu:TY,mu:LY,multimap:IY,mumap:RY,nabla:zY,Nacute:$Y,nacute:HY,nang:PY,nap:VY,napE:jY,napid:qY,napos:UY,napprox:WY,natural:KY,naturals:ZY,natur:GY,nbsp:JY,nbump:XY,nbumpe:QY,ncap:YY,Ncaron:eee,ncaron:tee,Ncedil:ree,ncedil:nee,ncong:iee,ncongdot:oee,ncup:see,Ncy:aee,ncy:lee,ndash:uee,nearhk:cee,nearr:dee,neArr:hee,nearrow:pee,ne:fee,nedot:mee,NegativeMediumSpace:gee,NegativeThickSpace:bee,NegativeThinSpace:yee,NegativeVeryThinSpace:Cee,nequiv:vee,nesear:kee,nesim:wee,NestedGreaterGreater:Aee,NestedLessLess:_ee,NewLine:Eee,nexist:xee,nexists:Dee,Nfr:See,nfr:Bee,ngE:Mee,nge:Fee,ngeq:Nee,ngeqq:Oee,ngeqslant:Tee,nges:Lee,nGg:Iee,ngsim:Ree,nGt:zee,ngt:$ee,ngtr:Hee,nGtv:Pee,nharr:Vee,nhArr:jee,nhpar:qee,ni:Uee,nis:Wee,nisd:Kee,niv:Zee,NJcy:Gee,njcy:Jee,nlarr:Xee,nlArr:Qee,nldr:Yee,nlE:ete,nle:tte,nleftarrow:rte,nLeftarrow:nte,nleftrightarrow:ite,nLeftrightarrow:ote,nleq:ste,nleqq:ate,nleqslant:lte,nles:ute,nless:cte,nLl:dte,nlsim:hte,nLt:pte,nlt:fte,nltri:mte,nltrie:gte,nLtv:bte,nmid:yte,NoBreak:Cte,NonBreakingSpace:vte,nopf:kte,Nopf:wte,Not:Ate,not:_te,NotCongruent:Ete,NotCupCap:xte,NotDoubleVerticalBar:Dte,NotElement:Ste,NotEqual:Bte,NotEqualTilde:Mte,NotExists:Fte,NotGreater:Nte,NotGreaterEqual:Ote,NotGreaterFullEqual:Tte,NotGreaterGreater:Lte,NotGreaterLess:Ite,NotGreaterSlantEqual:Rte,NotGreaterTilde:zte,NotHumpDownHump:$te,NotHumpEqual:Hte,notin:Pte,notindot:Vte,notinE:jte,notinva:qte,notinvb:Ute,notinvc:Wte,NotLeftTriangleBar:Kte,NotLeftTriangle:Zte,NotLeftTriangleEqual:Gte,NotLess:Jte,NotLessEqual:Xte,NotLessGreater:Qte,NotLessLess:Yte,NotLessSlantEqual:ere,NotLessTilde:tre,NotNestedGreaterGreater:rre,NotNestedLessLess:nre,notni:ire,notniva:ore,notnivb:sre,notnivc:are,NotPrecedes:lre,NotPrecedesEqual:ure,NotPrecedesSlantEqual:cre,NotReverseElement:dre,NotRightTriangleBar:hre,NotRightTriangle:pre,NotRightTriangleEqual:fre,NotSquareSubset:mre,NotSquareSubsetEqual:gre,NotSquareSuperset:bre,NotSquareSupersetEqual:yre,NotSubset:Cre,NotSubsetEqual:vre,NotSucceeds:kre,NotSucceedsEqual:wre,NotSucceedsSlantEqual:Are,NotSucceedsTilde:_re,NotSuperset:Ere,NotSupersetEqual:xre,NotTilde:Dre,NotTildeEqual:Sre,NotTildeFullEqual:Bre,NotTildeTilde:Mre,NotVerticalBar:Fre,nparallel:Nre,npar:Ore,nparsl:Tre,npart:Lre,npolint:Ire,npr:Rre,nprcue:zre,nprec:$re,npreceq:Hre,npre:Pre,nrarrc:Vre,nrarr:jre,nrArr:qre,nrarrw:Ure,nrightarrow:Wre,nRightarrow:Kre,nrtri:Zre,nrtrie:Gre,nsc:Jre,nsccue:Xre,nsce:Qre,Nscr:Yre,nscr:ene,nshortmid:tne,nshortparallel:rne,nsim:nne,nsime:ine,nsimeq:one,nsmid:sne,nspar:ane,nsqsube:lne,nsqsupe:une,nsub:cne,nsubE:dne,nsube:hne,nsubset:pne,nsubseteq:fne,nsubseteqq:mne,nsucc:gne,nsucceq:bne,nsup:yne,nsupE:Cne,nsupe:vne,nsupset:kne,nsupseteq:wne,nsupseteqq:Ane,ntgl:_ne,Ntilde:Ene,ntilde:xne,ntlg:Dne,ntriangleleft:Sne,ntrianglelefteq:Bne,ntriangleright:Mne,ntrianglerighteq:Fne,Nu:Nne,nu:One,num:Tne,numero:Lne,numsp:Ine,nvap:Rne,nvdash:zne,nvDash:$ne,nVdash:Hne,nVDash:Pne,nvge:Vne,nvgt:jne,nvHarr:qne,nvinfin:Une,nvlArr:Wne,nvle:Kne,nvlt:Zne,nvltrie:Gne,nvrArr:Jne,nvrtrie:Xne,nvsim:Qne,nwarhk:Yne,nwarr:eie,nwArr:tie,nwarrow:rie,nwnear:nie,Oacute:iie,oacute:oie,oast:sie,Ocirc:aie,ocirc:lie,ocir:uie,Ocy:cie,ocy:die,odash:hie,Odblac:pie,odblac:fie,odiv:mie,odot:gie,odsold:bie,OElig:yie,oelig:Cie,ofcir:vie,Ofr:kie,ofr:wie,ogon:Aie,Ograve:_ie,ograve:Eie,ogt:xie,ohbar:Die,ohm:Sie,oint:Bie,olarr:Mie,olcir:Fie,olcross:Nie,oline:Oie,olt:Tie,Omacr:Lie,omacr:Iie,Omega:Rie,omega:zie,Omicron:$ie,omicron:Hie,omid:Pie,ominus:Vie,Oopf:jie,oopf:qie,opar:Uie,OpenCurlyDoubleQuote:Wie,OpenCurlyQuote:Kie,operp:Zie,oplus:Gie,orarr:Jie,Or:Xie,or:Qie,ord:Yie,order:eoe,orderof:toe,ordf:roe,ordm:noe,origof:ioe,oror:ooe,orslope:soe,orv:aoe,oS:loe,Oscr:uoe,oscr:coe,Oslash:doe,oslash:hoe,osol:poe,Otilde:foe,otilde:moe,otimesas:goe,Otimes:boe,otimes:yoe,Ouml:Coe,ouml:voe,ovbar:koe,OverBar:woe,OverBrace:Aoe,OverBracket:_oe,OverParenthesis:Eoe,para:xoe,parallel:Doe,par:Soe,parsim:Boe,parsl:Moe,part:Foe,PartialD:Noe,Pcy:Ooe,pcy:Toe,percnt:Loe,period:Ioe,permil:Roe,perp:zoe,pertenk:$oe,Pfr:Hoe,pfr:Poe,Phi:Voe,phi:joe,phiv:qoe,phmmat:Uoe,phone:Woe,Pi:Koe,pi:Zoe,pitchfork:Goe,piv:Joe,planck:Xoe,planckh:Qoe,plankv:Yoe,plusacir:ese,plusb:tse,pluscir:rse,plus:nse,plusdo:ise,plusdu:ose,pluse:sse,PlusMinus:ase,plusmn:lse,plussim:use,plustwo:cse,pm:dse,Poincareplane:hse,pointint:pse,popf:fse,Popf:mse,pound:gse,prap:bse,Pr:yse,pr:Cse,prcue:vse,precapprox:kse,prec:wse,preccurlyeq:Ase,Precedes:_se,PrecedesEqual:Ese,PrecedesSlantEqual:xse,PrecedesTilde:Dse,preceq:Sse,precnapprox:Bse,precneqq:Mse,precnsim:Fse,pre:Nse,prE:Ose,precsim:Tse,prime:Lse,Prime:Ise,primes:Rse,prnap:zse,prnE:$se,prnsim:Hse,prod:Pse,Product:Vse,profalar:jse,profline:qse,profsurf:Use,prop:Wse,Proportional:Kse,Proportion:Zse,propto:Gse,prsim:Jse,prurel:Xse,Pscr:Qse,pscr:Yse,Psi:eae,psi:tae,puncsp:rae,Qfr:nae,qfr:iae,qint:oae,qopf:sae,Qopf:aae,qprime:lae,Qscr:uae,qscr:cae,quaternions:dae,quatint:hae,quest:pae,questeq:fae,quot:mae,QUOT:gae,rAarr:bae,race:yae,Racute:Cae,racute:vae,radic:kae,raemptyv:wae,rang:Aae,Rang:_ae,rangd:Eae,range:xae,rangle:Dae,raquo:Sae,rarrap:Bae,rarrb:Mae,rarrbfs:Fae,rarrc:Nae,rarr:Oae,Rarr:Tae,rArr:Lae,rarrfs:Iae,rarrhk:Rae,rarrlp:zae,rarrpl:$ae,rarrsim:Hae,Rarrtl:Pae,rarrtl:Vae,rarrw:jae,ratail:qae,rAtail:Uae,ratio:Wae,rationals:Kae,rbarr:Zae,rBarr:Gae,RBarr:Jae,rbbrk:Xae,rbrace:Qae,rbrack:Yae,rbrke:ele,rbrksld:tle,rbrkslu:rle,Rcaron:nle,rcaron:ile,Rcedil:ole,rcedil:sle,rceil:ale,rcub:lle,Rcy:ule,rcy:cle,rdca:dle,rdldhar:hle,rdquo:ple,rdquor:fle,rdsh:mle,real:gle,realine:ble,realpart:yle,reals:Cle,Re:vle,rect:kle,reg:wle,REG:Ale,ReverseElement:_le,ReverseEquilibrium:Ele,ReverseUpEquilibrium:xle,rfisht:Dle,rfloor:Sle,rfr:Ble,Rfr:Mle,rHar:Fle,rhard:Nle,rharu:Ole,rharul:Tle,Rho:Lle,rho:Ile,rhov:Rle,RightAngleBracket:zle,RightArrowBar:$le,rightarrow:Hle,RightArrow:Ple,Rightarrow:Vle,RightArrowLeftArrow:jle,rightarrowtail:qle,RightCeiling:Ule,RightDoubleBracket:Wle,RightDownTeeVector:Kle,RightDownVectorBar:Zle,RightDownVector:Gle,RightFloor:Jle,rightharpoondown:Xle,rightharpoonup:Qle,rightleftarrows:Yle,rightleftharpoons:eue,rightrightarrows:tue,rightsquigarrow:rue,RightTeeArrow:nue,RightTee:iue,RightTeeVector:oue,rightthreetimes:sue,RightTriangleBar:aue,RightTriangle:lue,RightTriangleEqual:uue,RightUpDownVector:cue,RightUpTeeVector:due,RightUpVectorBar:hue,RightUpVector:pue,RightVectorBar:fue,RightVector:mue,ring:gue,risingdotseq:bue,rlarr:yue,rlhar:Cue,rlm:vue,rmoustache:kue,rmoust:wue,rnmid:Aue,roang:_ue,roarr:Eue,robrk:xue,ropar:Due,ropf:Sue,Ropf:Bue,roplus:Mue,rotimes:Fue,RoundImplies:Nue,rpar:Oue,rpargt:Tue,rppolint:Lue,rrarr:Iue,Rrightarrow:Rue,rsaquo:zue,rscr:$ue,Rscr:Hue,rsh:Pue,Rsh:Vue,rsqb:jue,rsquo:que,rsquor:Uue,rthree:Wue,rtimes:Kue,rtri:Zue,rtrie:Gue,rtrif:Jue,rtriltri:Xue,RuleDelayed:Que,ruluhar:Yue,rx:ece,Sacute:tce,sacute:rce,sbquo:nce,scap:ice,Scaron:oce,scaron:sce,Sc:ace,sc:lce,sccue:uce,sce:cce,scE:dce,Scedil:hce,scedil:pce,Scirc:fce,scirc:mce,scnap:gce,scnE:bce,scnsim:yce,scpolint:Cce,scsim:vce,Scy:kce,scy:wce,sdotb:Ace,sdot:_ce,sdote:Ece,searhk:xce,searr:Dce,seArr:Sce,searrow:Bce,sect:Mce,semi:Fce,seswar:Nce,setminus:Oce,setmn:Tce,sext:Lce,Sfr:Ice,sfr:Rce,sfrown:zce,sharp:$ce,SHCHcy:Hce,shchcy:Pce,SHcy:Vce,shcy:jce,ShortDownArrow:qce,ShortLeftArrow:Uce,shortmid:Wce,shortparallel:Kce,ShortRightArrow:Zce,ShortUpArrow:Gce,shy:Jce,Sigma:Xce,sigma:Qce,sigmaf:Yce,sigmav:ede,sim:tde,simdot:rde,sime:nde,simeq:ide,simg:ode,simgE:sde,siml:ade,simlE:lde,simne:ude,simplus:cde,simrarr:dde,slarr:hde,SmallCircle:pde,smallsetminus:fde,smashp:mde,smeparsl:gde,smid:bde,smile:yde,smt:Cde,smte:vde,smtes:kde,SOFTcy:wde,softcy:Ade,solbar:_de,solb:Ede,sol:xde,Sopf:Dde,sopf:Sde,spades:Bde,spadesuit:Mde,spar:Fde,sqcap:Nde,sqcaps:Ode,sqcup:Tde,sqcups:Lde,Sqrt:Ide,sqsub:Rde,sqsube:zde,sqsubset:$de,sqsubseteq:Hde,sqsup:Pde,sqsupe:Vde,sqsupset:jde,sqsupseteq:qde,square:Ude,Square:Wde,SquareIntersection:Kde,SquareSubset:Zde,SquareSubsetEqual:Gde,SquareSuperset:Jde,SquareSupersetEqual:Xde,SquareUnion:Qde,squarf:Yde,squ:ehe,squf:the,srarr:rhe,Sscr:nhe,sscr:ihe,ssetmn:ohe,ssmile:she,sstarf:ahe,Star:lhe,star:uhe,starf:che,straightepsilon:dhe,straightphi:hhe,strns:phe,sub:fhe,Sub:mhe,subdot:ghe,subE:bhe,sube:yhe,subedot:Che,submult:vhe,subnE:khe,subne:whe,subplus:Ahe,subrarr:_he,subset:Ehe,Subset:xhe,subseteq:Dhe,subseteqq:She,SubsetEqual:Bhe,subsetneq:Mhe,subsetneqq:Fhe,subsim:Nhe,subsub:Ohe,subsup:The,succapprox:Lhe,succ:Ihe,succcurlyeq:Rhe,Succeeds:zhe,SucceedsEqual:$he,SucceedsSlantEqual:Hhe,SucceedsTilde:Phe,succeq:Vhe,succnapprox:jhe,succneqq:qhe,succnsim:Uhe,succsim:Whe,SuchThat:Khe,sum:Zhe,Sum:Ghe,sung:Jhe,sup1:Xhe,sup2:Qhe,sup3:Yhe,sup:epe,Sup:tpe,supdot:rpe,supdsub:npe,supE:ipe,supe:ope,supedot:spe,Superset:ape,SupersetEqual:lpe,suphsol:upe,suphsub:cpe,suplarr:dpe,supmult:hpe,supnE:ppe,supne:fpe,supplus:mpe,supset:gpe,Supset:bpe,supseteq:ype,supseteqq:Cpe,supsetneq:vpe,supsetneqq:kpe,supsim:wpe,supsub:Ape,supsup:_pe,swarhk:Epe,swarr:xpe,swArr:Dpe,swarrow:Spe,swnwar:Bpe,szlig:Mpe,Tab:Fpe,target:Npe,Tau:Ope,tau:Tpe,tbrk:Lpe,Tcaron:Ipe,tcaron:Rpe,Tcedil:zpe,tcedil:$pe,Tcy:Hpe,tcy:Ppe,tdot:Vpe,telrec:jpe,Tfr:qpe,tfr:Upe,there4:Wpe,therefore:Kpe,Therefore:Zpe,Theta:Gpe,theta:Jpe,thetasym:Xpe,thetav:Qpe,thickapprox:Ype,thicksim:e0e,ThickSpace:t0e,ThinSpace:r0e,thinsp:n0e,thkap:i0e,thksim:o0e,THORN:s0e,thorn:a0e,tilde:l0e,Tilde:u0e,TildeEqual:c0e,TildeFullEqual:d0e,TildeTilde:h0e,timesbar:p0e,timesb:f0e,times:m0e,timesd:g0e,tint:b0e,toea:y0e,topbot:C0e,topcir:v0e,top:k0e,Topf:w0e,topf:A0e,topfork:_0e,tosa:E0e,tprime:x0e,trade:D0e,TRADE:S0e,triangle:B0e,triangledown:M0e,triangleleft:F0e,trianglelefteq:N0e,triangleq:O0e,triangleright:T0e,trianglerighteq:L0e,tridot:I0e,trie:R0e,triminus:z0e,TripleDot:$0e,triplus:H0e,trisb:P0e,tritime:V0e,trpezium:j0e,Tscr:q0e,tscr:U0e,TScy:W0e,tscy:K0e,TSHcy:Z0e,tshcy:G0e,Tstrok:J0e,tstrok:X0e,twixt:Q0e,twoheadleftarrow:Y0e,twoheadrightarrow:efe,Uacute:tfe,uacute:rfe,uarr:nfe,Uarr:ife,uArr:ofe,Uarrocir:sfe,Ubrcy:afe,ubrcy:lfe,Ubreve:ufe,ubreve:cfe,Ucirc:dfe,ucirc:hfe,Ucy:pfe,ucy:ffe,udarr:mfe,Udblac:gfe,udblac:bfe,udhar:yfe,ufisht:Cfe,Ufr:vfe,ufr:kfe,Ugrave:wfe,ugrave:Afe,uHar:_fe,uharl:Efe,uharr:xfe,uhblk:Dfe,ulcorn:Sfe,ulcorner:Bfe,ulcrop:Mfe,ultri:Ffe,Umacr:Nfe,umacr:Ofe,uml:Tfe,UnderBar:Lfe,UnderBrace:Ife,UnderBracket:Rfe,UnderParenthesis:zfe,Union:$fe,UnionPlus:Hfe,Uogon:Pfe,uogon:Vfe,Uopf:jfe,uopf:qfe,UpArrowBar:Ufe,uparrow:Wfe,UpArrow:Kfe,Uparrow:Zfe,UpArrowDownArrow:Gfe,updownarrow:Jfe,UpDownArrow:Xfe,Updownarrow:Qfe,UpEquilibrium:Yfe,upharpoonleft:eme,upharpoonright:tme,uplus:rme,UpperLeftArrow:nme,UpperRightArrow:ime,upsi:ome,Upsi:sme,upsih:ame,Upsilon:lme,upsilon:ume,UpTeeArrow:cme,UpTee:dme,upuparrows:hme,urcorn:pme,urcorner:fme,urcrop:mme,Uring:gme,uring:bme,urtri:yme,Uscr:Cme,uscr:vme,utdot:kme,Utilde:wme,utilde:Ame,utri:_me,utrif:Eme,uuarr:xme,Uuml:Dme,uuml:Sme,uwangle:Bme,vangrt:Mme,varepsilon:Fme,varkappa:Nme,varnothing:Ome,varphi:Tme,varpi:Lme,varpropto:Ime,varr:Rme,vArr:zme,varrho:$me,varsigma:Hme,varsubsetneq:Pme,varsubsetneqq:Vme,varsupsetneq:jme,varsupsetneqq:qme,vartheta:Ume,vartriangleleft:Wme,vartriangleright:Kme,vBar:Zme,Vbar:Gme,vBarv:Jme,Vcy:Xme,vcy:Qme,vdash:Yme,vDash:e1e,Vdash:t1e,VDash:r1e,Vdashl:n1e,veebar:i1e,vee:o1e,Vee:s1e,veeeq:a1e,vellip:l1e,verbar:u1e,Verbar:c1e,vert:d1e,Vert:h1e,VerticalBar:p1e,VerticalLine:f1e,VerticalSeparator:m1e,VerticalTilde:g1e,VeryThinSpace:b1e,Vfr:y1e,vfr:C1e,vltri:v1e,vnsub:k1e,vnsup:w1e,Vopf:A1e,vopf:_1e,vprop:E1e,vrtri:x1e,Vscr:D1e,vscr:S1e,vsubnE:B1e,vsubne:M1e,vsupnE:F1e,vsupne:N1e,Vvdash:O1e,vzigzag:T1e,Wcirc:L1e,wcirc:I1e,wedbar:R1e,wedge:z1e,Wedge:$1e,wedgeq:H1e,weierp:P1e,Wfr:V1e,wfr:j1e,Wopf:q1e,wopf:U1e,wp:W1e,wr:K1e,wreath:Z1e,Wscr:G1e,wscr:J1e,xcap:X1e,xcirc:Q1e,xcup:Y1e,xdtri:ege,Xfr:tge,xfr:rge,xharr:nge,xhArr:ige,Xi:oge,xi:sge,xlarr:age,xlArr:lge,xmap:uge,xnis:cge,xodot:dge,Xopf:hge,xopf:pge,xoplus:fge,xotime:mge,xrarr:gge,xrArr:bge,Xscr:yge,xscr:Cge,xsqcup:vge,xuplus:kge,xutri:wge,xvee:Age,xwedge:_ge,Yacute:Ege,yacute:xge,YAcy:Dge,yacy:Sge,Ycirc:Bge,ycirc:Mge,Ycy:Fge,ycy:Nge,yen:Oge,Yfr:Tge,yfr:Lge,YIcy:Ige,yicy:Rge,Yopf:zge,yopf:$ge,Yscr:Hge,yscr:Pge,YUcy:Vge,yucy:jge,yuml:qge,Yuml:Uge,Zacute:Wge,zacute:Kge,Zcaron:Zge,zcaron:Gge,Zcy:Jge,zcy:Xge,Zdot:Qge,zdot:Yge,zeetrf:e2e,ZeroWidthSpace:t2e,Zeta:r2e,zeta:n2e,zfr:i2e,Zfr:o2e,ZHcy:s2e,zhcy:a2e,zigrarr:l2e,zopf:u2e,Zopf:c2e,Zscr:d2e,zscr:h2e,zwj:p2e,zwnj:f2e};var $y=m2e,rp=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Ni={},im={};function g2e(e){var r,n,i=im[e];if(i)return i;for(i=im[e]=[],r=0;r<128;r++)n=String.fromCharCode(r),/^[0-9a-z]$/i.test(n)?i.push(n):i.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2));for(r=0;r<e.length;r++)i[e.charCodeAt(r)]=e[r];return i}function zl(e,r,n){var i,o,s,a,l,u="";for(typeof r!="string"&&(n=r,r=zl.defaultChars),typeof n>"u"&&(n=!0),l=g2e(r),i=0,o=e.length;i<o;i++){if(s=e.charCodeAt(i),n&&s===37&&i+2<o&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))){u+=e.slice(i,i+3),i+=2;continue}if(s<128){u+=l[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&i+1<o&&(a=e.charCodeAt(i+1),a>=56320&&a<=57343)){u+=encodeURIComponent(e[i]+e[i+1]),i++;continue}u+="%EF%BF%BD";continue}u+=encodeURIComponent(e[i])}return u}zl.defaultChars=";/?:@&=+$,-_.!~*'()#",zl.componentChars="-_.!~*'()";var b2e=zl,om={};function y2e(e){var r,n,i=om[e];if(i)return i;for(i=om[e]=[],r=0;r<128;r++)n=String.fromCharCode(r),i.push(n);for(r=0;r<e.length;r++)n=e.charCodeAt(r),i[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return i}function $l(e,r){var n;return typeof r!="string"&&(r=$l.defaultChars),n=y2e(r),e.replace(/(%[a-f0-9]{2})+/gi,function(i){var o,s,a,l,u,c,d,h="";for(o=0,s=i.length;o<s;o+=3){if(a=parseInt(i.slice(o+1,o+3),16),a<128){h+=n[a];continue}if((a&224)===192&&o+3<s&&(l=parseInt(i.slice(o+4,o+6),16),(l&192)===128)){d=a<<6&1984|l&63,d<128?h+="��":h+=String.fromCharCode(d),o+=3;continue}if((a&240)===224&&o+6<s&&(l=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16),(l&192)===128&&(u&192)===128)){d=a<<12&61440|l<<6&4032|u&63,d<2048||d>=55296&&d<=57343?h+="���":h+=String.fromCharCode(d),o+=6;continue}if((a&248)===240&&o+9<s&&(l=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16),c=parseInt(i.slice(o+10,o+12),16),(l&192)===128&&(u&192)===128&&(c&192)===128)){d=a<<18&1835008|l<<12&258048|u<<6&4032|c&63,d<65536||d>1114111?h+="����":(d-=65536,h+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}h+="�"}return h})}$l.defaultChars=";/?:@&=+$,#",$l.componentChars="";var C2e=$l,v2e=function(e){var r="";return r+=e.protocol||"",r+=e.slashes?"//":"",r+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?r+="["+e.hostname+"]":r+=e.hostname||"",r+=e.port?":"+e.port:"",r+=e.pathname||"",r+=e.search||"",r+=e.hash||"",r};function Hl(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var k2e=/^([a-z0-9.+-]+:)/i,w2e=/:[0-9]*$/,A2e=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,_2e=["<",">",'"',"`"," ","\r","\n","	"],E2e=["{","}","|","\\","^","`"].concat(_2e),x2e=["'"].concat(E2e),sm=["%","/","?",";","#"].concat(x2e),am=["/","?","#"],D2e=255,lm=/^[+a-z0-9A-Z_-]{0,63}$/,S2e=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,um={javascript:!0,"javascript:":!0},cm={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function B2e(e,r){if(e&&e instanceof Hl)return e;var n=new Hl;return n.parse(e,r),n}Hl.prototype.parse=function(e,r){var n,i,o,s,a,l=e;if(l=l.trim(),!r&&e.split("#").length===1){var u=A2e.exec(l);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}var c=k2e.exec(l);if(c&&(c=c[0],o=c.toLowerCase(),this.protocol=c,l=l.substr(c.length)),(r||c||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(a=l.substr(0,2)==="//",a&&!(c&&um[c])&&(l=l.substr(2),this.slashes=!0)),!um[c]&&(a||c&&!cm[c])){var d=-1;for(n=0;n<am.length;n++)s=l.indexOf(am[n]),s!==-1&&(d===-1||s<d)&&(d=s);var h,p;for(d===-1?p=l.lastIndexOf("@"):p=l.lastIndexOf("@",d),p!==-1&&(h=l.slice(0,p),l=l.slice(p+1),this.auth=h),d=-1,n=0;n<sm.length;n++)s=l.indexOf(sm[n]),s!==-1&&(d===-1||s<d)&&(d=s);d===-1&&(d=l.length),l[d-1]===":"&&d--;var f=l.slice(0,d);l=l.slice(d),this.parseHost(f),this.hostname=this.hostname||"";var m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m){var b=this.hostname.split(/\./);for(n=0,i=b.length;n<i;n++){var g=b[n];if(g&&!g.match(lm)){for(var y="",v=0,k=g.length;v<k;v++)g.charCodeAt(v)>127?y+="x":y+=g[v];if(!y.match(lm)){var C=b.slice(0,n),A=b.slice(n+1),_=g.match(S2e);_&&(C.push(_[1]),A.unshift(_[2])),A.length&&(l=A.join(".")+l),this.hostname=C.join(".");break}}}}this.hostname.length>D2e&&(this.hostname=""),m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var S=l.indexOf("#");S!==-1&&(this.hash=l.substr(S),l=l.slice(0,S));var L=l.indexOf("?");return L!==-1&&(this.search=l.substr(L),l=l.slice(0,L)),l&&(this.pathname=l),cm[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Hl.prototype.parseHost=function(e){var r=w2e.exec(e);r&&(r=r[0],r!==":"&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)};var M2e=B2e;Ni.encode=b2e,Ni.decode=C2e,Ni.format=v2e,Ni.parse=M2e;var bi={},dm,hm;function Hy(){return hm||(hm=1,dm=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),dm}var pm,fm;function Py(){return fm||(fm=1,pm=/[\0-\x1F\x7F-\x9F]/),pm}var mm,gm;function F2e(){return gm||(gm=1,mm=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),mm}var bm,ym;function Vy(){return ym||(ym=1,bm=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),bm}var Cm;function N2e(){return Cm||(Cm=1,bi.Any=Hy(),bi.Cc=Py(),bi.Cf=F2e(),bi.P=rp,bi.Z=Vy()),bi}(function(e){function r(F){return Object.prototype.toString.call(F)}function n(F){return r(F)==="[object String]"}var i=Object.prototype.hasOwnProperty;function o(F,T){return i.call(F,T)}function s(F){var T=Array.prototype.slice.call(arguments,1);return T.forEach(function(Y){if(Y){if(typeof Y!="object")throw new TypeError(Y+"must be object");Object.keys(Y).forEach(function(w){F[w]=Y[w]})}}),F}function a(F,T,Y){return[].concat(F.slice(0,T),Y,F.slice(T+1))}function l(F){return!(F>=55296&&F<=57343||F>=64976&&F<=65007||(F&65535)===65535||(F&65535)===65534||F>=0&&F<=8||F===11||F>=14&&F<=31||F>=127&&F<=159||F>1114111)}function u(F){if(F>65535){F-=65536;var T=55296+(F>>10),Y=56320+(F&1023);return String.fromCharCode(T,Y)}return String.fromCharCode(F)}var c=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,d=/&([a-z#][a-z0-9]{1,31});/gi,h=new RegExp(c.source+"|"+d.source,"gi"),p=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i,f=$y;function m(F,T){var Y;return o(f,T)?f[T]:T.charCodeAt(0)===35&&p.test(T)&&(Y=T[1].toLowerCase()==="x"?parseInt(T.slice(2),16):parseInt(T.slice(1),10),l(Y))?u(Y):F}function b(F){return F.indexOf("\\")<0?F:F.replace(c,"$1")}function g(F){return F.indexOf("\\")<0&&F.indexOf("&")<0?F:F.replace(h,function(T,Y,w){return Y||m(T,w)})}var y=/[&<>"]/,v=/[&<>"]/g,k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function C(F){return k[F]}function A(F){return y.test(F)?F.replace(v,C):F}var _=/[.?*+^$[\]\\(){}|-]/g;function S(F){return F.replace(_,"\\$&")}function L(F){switch(F){case 9:case 32:return!0}return!1}function D(F){if(F>=8192&&F<=8202)return!0;switch(F){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var P=rp;function U(F){return P.test(F)}function J(F){switch(F){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Z(F){return F=F.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(F=F.replace(/ẞ/g,"ß")),F.toLowerCase().toUpperCase()}e.lib={},e.lib.mdurl=Ni,e.lib.ucmicro=N2e(),e.assign=s,e.isString=n,e.has=o,e.unescapeMd=b,e.unescapeAll=g,e.isValidEntityCode=l,e.fromCodePoint=u,e.escapeHtml=A,e.arrayReplaceAt=a,e.isSpace=L,e.isWhiteSpace=D,e.isMdAsciiPunct=J,e.isPunctChar=U,e.escapeRE=S,e.normalizeReference=Z})(ke);var Ma={},O2e=function(e,r,n){var i,o,s,a,l=-1,u=e.posMax,c=e.pos;for(e.pos=r+1,i=1;e.pos<u;){if(s=e.src.charCodeAt(e.pos),s===93&&(i--,i===0)){o=!0;break}if(a=e.pos,e.md.inline.skipToken(e),s===91){if(a===e.pos-1)i++;else if(n)return e.pos=c,-1}}return o&&(l=e.pos),e.pos=c,l},vm=ke.unescapeAll,T2e=function(e,r,n){var i,o,s=r,a={ok:!1,pos:0,lines:0,str:""};if(e.charCodeAt(s)===60){for(s++;s<n;){if(i=e.charCodeAt(s),i===10||i===60)return a;if(i===62)return a.pos=s+1,a.str=vm(e.slice(r+1,s)),a.ok=!0,a;if(i===92&&s+1<n){s+=2;continue}s++}return a}for(o=0;s<n&&(i=e.charCodeAt(s),!(i===32||i<32||i===127));){if(i===92&&s+1<n){if(e.charCodeAt(s+1)===32)break;s+=2;continue}if(i===40&&(o++,o>32))return a;if(i===41){if(o===0)break;o--}s++}return r===s||o!==0||(a.str=vm(e.slice(r,s)),a.pos=s,a.ok=!0),a},L2e=ke.unescapeAll,I2e=function(e,r,n){var i,o,s=0,a=r,l={ok:!1,pos:0,lines:0,str:""};if(a>=n||(o=e.charCodeAt(a),o!==34&&o!==39&&o!==40))return l;for(a++,o===40&&(o=41);a<n;){if(i=e.charCodeAt(a),i===o)return l.pos=a+1,l.lines=s,l.str=L2e(e.slice(r+1,a)),l.ok=!0,l;if(i===40&&o===41)return l;i===10?s++:i===92&&a+1<n&&(a++,e.charCodeAt(a)===10&&s++),a++}return l};Ma.parseLinkLabel=O2e,Ma.parseLinkDestination=T2e,Ma.parseLinkTitle=I2e;var R2e=ke.assign,z2e=ke.unescapeAll,On=ke.escapeHtml,pr={};pr.code_inline=function(e,r,n,i,o){var s=e[r];return"<code"+o.renderAttrs(s)+">"+On(s.content)+"</code>"},pr.code_block=function(e,r,n,i,o){var s=e[r];return"<pre"+o.renderAttrs(s)+"><code>"+On(e[r].content)+"</code></pre>\n"},pr.fence=function(e,r,n,i,o){var s=e[r],a=s.info?z2e(s.info).trim():"",l="",u="",c,d,h,p,f;return a&&(h=a.split(/(\s+)/g),l=h[0],u=h.slice(2).join("")),n.highlight?c=n.highlight(s.content,l,u)||On(s.content):c=On(s.content),c.indexOf("<pre")===0?c+"\n":a?(d=s.attrIndex("class"),p=s.attrs?s.attrs.slice():[],d<0?p.push(["class",n.langPrefix+l]):(p[d]=p[d].slice(),p[d][1]+=" "+n.langPrefix+l),f={attrs:p},"<pre><code"+o.renderAttrs(f)+">"+c+"</code></pre>\n"):"<pre><code"+o.renderAttrs(s)+">"+c+"</code></pre>\n"},pr.image=function(e,r,n,i,o){var s=e[r];return s.attrs[s.attrIndex("alt")][1]=o.renderInlineAsText(s.children,n,i),o.renderToken(e,r,n)},pr.hardbreak=function(e,r,n){return n.xhtmlOut?"<br />\n":"<br>\n"},pr.softbreak=function(e,r,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},pr.text=function(e,r){return On(e[r].content)},pr.html_block=function(e,r){return e[r].content},pr.html_inline=function(e,r){return e[r].content};function xi(){this.rules=R2e({},pr)}xi.prototype.renderAttrs=function(e){var r,n,i;if(!e.attrs)return"";for(i="",r=0,n=e.attrs.length;r<n;r++)i+=" "+On(e.attrs[r][0])+'="'+On(e.attrs[r][1])+'"';return i},xi.prototype.renderToken=function(e,r,n){var i,o="",s=!1,a=e[r];return a.hidden?"":(a.block&&a.nesting!==-1&&r&&e[r-1].hidden&&(o+="\n"),o+=(a.nesting===-1?"</":"<")+a.tag,o+=this.renderAttrs(a),a.nesting===0&&n.xhtmlOut&&(o+=" /"),a.block&&(s=!0,a.nesting===1&&r+1<e.length&&(i=e[r+1],(i.type==="inline"||i.hidden||i.nesting===-1&&i.tag===a.tag)&&(s=!1))),o+=s?">\n":">",o)},xi.prototype.renderInline=function(e,r,n){for(var i,o="",s=this.rules,a=0,l=e.length;a<l;a++)i=e[a].type,typeof s[i]<"u"?o+=s[i](e,a,r,n,this):o+=this.renderToken(e,a,r);return o},xi.prototype.renderInlineAsText=function(e,r,n){for(var i="",o=0,s=e.length;o<s;o++)e[o].type==="text"?i+=e[o].content:e[o].type==="image"?i+=this.renderInlineAsText(e[o].children,r,n):e[o].type==="softbreak"&&(i+="\n");return i},xi.prototype.render=function(e,r,n){var i,o,s,a="",l=this.rules;for(i=0,o=e.length;i<o;i++)s=e[i].type,s==="inline"?a+=this.renderInline(e[i].children,r,n):typeof l[s]<"u"?a+=l[s](e,i,r,n,this):a+=this.renderToken(e,i,r,n);return a};var $2e=xi;function Qt(){this.__rules__=[],this.__cache__=null}Qt.prototype.__find__=function(e){for(var r=0;r<this.__rules__.length;r++)if(this.__rules__[r].name===e)return r;return-1},Qt.prototype.__compile__=function(){var e=this,r=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(i){r.indexOf(i)<0&&r.push(i)})}),e.__cache__={},r.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(i){i.enabled&&(n&&i.alt.indexOf(n)<0||e.__cache__[n].push(i.fn))})})},Qt.prototype.at=function(e,r,n){var i=this.__find__(e),o=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__[i].fn=r,this.__rules__[i].alt=o.alt||[],this.__cache__=null},Qt.prototype.before=function(e,r,n,i){var o=this.__find__(e),s=i||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:r,enabled:!0,fn:n,alt:s.alt||[]}),this.__cache__=null},Qt.prototype.after=function(e,r,n,i){var o=this.__find__(e),s=i||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:r,enabled:!0,fn:n,alt:s.alt||[]}),this.__cache__=null},Qt.prototype.push=function(e,r,n){var i=n||{};this.__rules__.push({name:e,enabled:!0,fn:r,alt:i.alt||[]}),this.__cache__=null},Qt.prototype.enable=function(e,r){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(i){var o=this.__find__(i);if(o<0){if(r)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[o].enabled=!0,n.push(i)},this),this.__cache__=null,n},Qt.prototype.enableOnly=function(e,r){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,r)},Qt.prototype.disable=function(e,r){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(i){var o=this.__find__(i);if(o<0){if(r)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[o].enabled=!1,n.push(i)},this),this.__cache__=null,n},Qt.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};var np=Qt,H2e=/\r\n?|\n/g,P2e=/\0/g,V2e=function(e){var r;r=e.src.replace(H2e,"\n"),r=r.replace(P2e,"�"),e.src=r},j2e=function(e){var r;e.inlineMode?(r=new e.Token("inline","",0),r.content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)},q2e=function(e){var r=e.tokens,n,i,o;for(i=0,o=r.length;i<o;i++)n=r[i],n.type==="inline"&&e.md.inline.parse(n.content,e.md,e.env,n.children)},U2e=ke.arrayReplaceAt;function W2e(e){return/^<a[>\s]/i.test(e)}function K2e(e){return/^<\/a\s*>/i.test(e)}var Z2e=function(e){var r,n,i,o,s,a,l,u,c,d,h,p,f,m,b,g,y=e.tokens,v;if(e.md.options.linkify){for(n=0,i=y.length;n<i;n++)if(!(y[n].type!=="inline"||!e.md.linkify.pretest(y[n].content)))for(o=y[n].children,f=0,r=o.length-1;r>=0;r--){if(a=o[r],a.type==="link_close"){for(r--;o[r].level!==a.level&&o[r].type!=="link_open";)r--;continue}if(a.type==="html_inline"&&(W2e(a.content)&&f>0&&f--,K2e(a.content)&&f++),!(f>0)&&a.type==="text"&&e.md.linkify.test(a.content)){for(c=a.content,v=e.md.linkify.match(c),l=[],p=a.level,h=0,v.length>0&&v[0].index===0&&r>0&&o[r-1].type==="text_special"&&(v=v.slice(1)),u=0;u<v.length;u++)m=v[u].url,b=e.md.normalizeLink(m),e.md.validateLink(b)&&(g=v[u].text,v[u].schema?v[u].schema==="mailto:"&&!/^mailto:/i.test(g)?g=e.md.normalizeLinkText("mailto:"+g).replace(/^mailto:/,""):g=e.md.normalizeLinkText(g):g=e.md.normalizeLinkText("http://"+g).replace(/^http:\/\//,""),d=v[u].index,d>h&&(s=new e.Token("text","",0),s.content=c.slice(h,d),s.level=p,l.push(s)),s=new e.Token("link_open","a",1),s.attrs=[["href",b]],s.level=p++,s.markup="linkify",s.info="auto",l.push(s),s=new e.Token("text","",0),s.content=g,s.level=p,l.push(s),s=new e.Token("link_close","a",-1),s.level=--p,s.markup="linkify",s.info="auto",l.push(s),h=v[u].lastIndex);h<c.length&&(s=new e.Token("text","",0),s.content=c.slice(h),s.level=p,l.push(s)),y[n].children=o=U2e(o,r,l)}}}},jy=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,G2e=/\((c|tm|r)\)/i,J2e=/\((c|tm|r)\)/ig,X2e={c:"©",r:"®",tm:"™"};function Q2e(e,r){return X2e[r.toLowerCase()]}function Y2e(e){var r,n,i=0;for(r=e.length-1;r>=0;r--)n=e[r],n.type==="text"&&!i&&(n.content=n.content.replace(J2e,Q2e)),n.type==="link_open"&&n.info==="auto"&&i--,n.type==="link_close"&&n.info==="auto"&&i++}function ebe(e){var r,n,i=0;for(r=e.length-1;r>=0;r--)n=e[r],n.type==="text"&&!i&&jy.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&i--,n.type==="link_close"&&n.info==="auto"&&i++}var tbe=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)e.tokens[r].type==="inline"&&(G2e.test(e.tokens[r].content)&&Y2e(e.tokens[r].children),jy.test(e.tokens[r].content)&&ebe(e.tokens[r].children))},km=ke.isWhiteSpace,wm=ke.isPunctChar,Am=ke.isMdAsciiPunct,rbe=/['"]/,_m=/['"]/g,Em="’";function ra(e,r,n){return e.slice(0,r)+n+e.slice(r+1)}function nbe(e,r){var n,i,o,s,a,l,u,c,d,h,p,f,m,b,g,y,v,k,C,A,_;for(C=[],n=0;n<e.length;n++){for(i=e[n],u=e[n].level,v=C.length-1;v>=0&&!(C[v].level<=u);v--);if(C.length=v+1,i.type==="text"){o=i.content,a=0,l=o.length;e:for(;a<l&&(_m.lastIndex=a,s=_m.exec(o),!!s);){if(g=y=!0,a=s.index+1,k=s[0]==="'",d=32,s.index-1>=0)d=o.charCodeAt(s.index-1);else for(v=n-1;v>=0&&!(e[v].type==="softbreak"||e[v].type==="hardbreak");v--)if(e[v].content){d=e[v].content.charCodeAt(e[v].content.length-1);break}if(h=32,a<l)h=o.charCodeAt(a);else for(v=n+1;v<e.length&&!(e[v].type==="softbreak"||e[v].type==="hardbreak");v++)if(e[v].content){h=e[v].content.charCodeAt(0);break}if(p=Am(d)||wm(String.fromCharCode(d)),f=Am(h)||wm(String.fromCharCode(h)),m=km(d),b=km(h),b?g=!1:f&&(m||p||(g=!1)),m?y=!1:p&&(b||f||(y=!1)),h===34&&s[0]==='"'&&d>=48&&d<=57&&(y=g=!1),g&&y&&(g=p,y=f),!g&&!y){k&&(i.content=ra(i.content,s.index,Em));continue}if(y){for(v=C.length-1;v>=0&&(c=C[v],!(C[v].level<u));v--)if(c.single===k&&C[v].level===u){c=C[v],k?(A=r.md.options.quotes[2],_=r.md.options.quotes[3]):(A=r.md.options.quotes[0],_=r.md.options.quotes[1]),i.content=ra(i.content,s.index,_),e[c.token].content=ra(e[c.token].content,c.pos,A),a+=_.length-1,c.token===n&&(a+=A.length-1),o=i.content,l=o.length,C.length=v;continue e}}g?C.push({token:n,pos:s.index,single:k,level:u}):y&&k&&(i.content=ra(i.content,s.index,Em))}}}}var ibe=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)e.tokens[r].type!=="inline"||!rbe.test(e.tokens[r].content)||nbe(e.tokens[r].children,e)},obe=function(e){var r,n,i,o,s,a,l=e.tokens;for(r=0,n=l.length;r<n;r++)if(l[r].type==="inline"){for(i=l[r].children,s=i.length,o=0;o<s;o++)i[o].type==="text_special"&&(i[o].type="text");for(o=a=0;o<s;o++)i[o].type==="text"&&o+1<s&&i[o+1].type==="text"?i[o+1].content=i[o].content+i[o+1].content:(o!==a&&(i[a]=i[o]),a++);o!==a&&(i.length=a)}};function Di(e,r,n){this.type=e,this.tag=r,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Di.prototype.attrIndex=function(e){var r,n,i;if(!this.attrs)return-1;for(r=this.attrs,n=0,i=r.length;n<i;n++)if(r[n][0]===e)return n;return-1},Di.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},Di.prototype.attrSet=function(e,r){var n=this.attrIndex(e),i=[e,r];n<0?this.attrPush(i):this.attrs[n]=i},Di.prototype.attrGet=function(e){var r=this.attrIndex(e),n=null;return r>=0&&(n=this.attrs[r][1]),n},Di.prototype.attrJoin=function(e,r){var n=this.attrIndex(e);n<0?this.attrPush([e,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r};var ku=Di;const wc=Dr(ku);var sbe=ku;function qy(e,r,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=r}qy.prototype.Token=sbe;var abe=qy,lbe=np,Ac=[["normalize",V2e],["block",j2e],["inline",q2e],["linkify",Z2e],["replacements",tbe],["smartquotes",ibe],["text_join",obe]];function Md(){this.ruler=new lbe;for(var e=0;e<Ac.length;e++)this.ruler.push(Ac[e][0],Ac[e][1])}Md.prototype.process=function(e){var r,n,i;for(i=this.ruler.getRules(""),r=0,n=i.length;r<n;r++)i[r](e)},Md.prototype.State=abe;var ube=Md,_c=ke.isSpace;function Ec(e,r){var n=e.bMarks[r]+e.tShift[r],i=e.eMarks[r];return e.src.slice(n,i)}function xm(e){var r=[],n=0,i=e.length,o,s=!1,a=0,l="";for(o=e.charCodeAt(n);n<i;)o===124&&(s?(l+=e.substring(a,n-1),a=n):(r.push(l+e.substring(a,n)),l="",a=n+1)),s=o===92,n++,o=e.charCodeAt(n);return r.push(l+e.substring(a)),r}var cbe=function(e,r,n,i){var o,s,a,l,u,c,d,h,p,f,m,b,g,y,v,k,C,A;if(r+2>n||(c=r+1,e.sCount[c]<e.blkIndent)||e.sCount[c]-e.blkIndent>=4||(a=e.bMarks[c]+e.tShift[c],a>=e.eMarks[c])||(C=e.src.charCodeAt(a++),C!==124&&C!==45&&C!==58)||a>=e.eMarks[c]||(A=e.src.charCodeAt(a++),A!==124&&A!==45&&A!==58&&!_c(A))||C===45&&_c(A))return!1;for(;a<e.eMarks[c];){if(o=e.src.charCodeAt(a),o!==124&&o!==45&&o!==58&&!_c(o))return!1;a++}for(s=Ec(e,r+1),d=s.split("|"),f=[],l=0;l<d.length;l++){if(m=d[l].trim(),!m){if(l===0||l===d.length-1)continue;return!1}if(!/^:?-+:?$/.test(m))return!1;m.charCodeAt(m.length-1)===58?f.push(m.charCodeAt(0)===58?"center":"right"):m.charCodeAt(0)===58?f.push("left"):f.push("")}if(s=Ec(e,r).trim(),s.indexOf("|")===-1||e.sCount[r]-e.blkIndent>=4||(d=xm(s),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),h=d.length,h===0||h!==f.length))return!1;if(i)return!0;for(y=e.parentType,e.parentType="table",k=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),p.map=b=[r,0],p=e.push("thead_open","thead",1),p.map=[r,r+1],p=e.push("tr_open","tr",1),p.map=[r,r+1],l=0;l<d.length;l++)p=e.push("th_open","th",1),f[l]&&(p.attrs=[["style","text-align:"+f[l]]]),p=e.push("inline","",0),p.content=d[l].trim(),p.children=[],p=e.push("th_close","th",-1);for(p=e.push("tr_close","tr",-1),p=e.push("thead_close","thead",-1),c=r+2;c<n&&!(e.sCount[c]<e.blkIndent);c++){for(v=!1,l=0,u=k.length;l<u;l++)if(k[l](e,c,n,!0)){v=!0;break}if(v||(s=Ec(e,c).trim(),!s)||e.sCount[c]-e.blkIndent>=4)break;for(d=xm(s),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),c===r+2&&(p=e.push("tbody_open","tbody",1),p.map=g=[r+2,0]),p=e.push("tr_open","tr",1),p.map=[c,c+1],l=0;l<h;l++)p=e.push("td_open","td",1),f[l]&&(p.attrs=[["style","text-align:"+f[l]]]),p=e.push("inline","",0),p.content=d[l]?d[l].trim():"",p.children=[],p=e.push("td_close","td",-1);p=e.push("tr_close","tr",-1)}return g&&(p=e.push("tbody_close","tbody",-1),g[1]=c),p=e.push("table_close","table",-1),b[1]=c,e.parentType=y,e.line=c,!0},dbe=function(e,r,n){var i,o,s;if(e.sCount[r]-e.blkIndent<4)return!1;for(o=i=r+1;i<n;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,o=i;continue}break}return e.line=o,s=e.push("code_block","code",0),s.content=e.getLines(r,o,4+e.blkIndent,!1)+"\n",s.map=[r,e.line],!0},hbe=function(e,r,n,i){var o,s,a,l,u,c,d,h=!1,p=e.bMarks[r]+e.tShift[r],f=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||p+3>f||(o=e.src.charCodeAt(p),o!==126&&o!==96)||(u=p,p=e.skipChars(p,o),s=p-u,s<3)||(d=e.src.slice(u,p),a=e.src.slice(p,f),o===96&&a.indexOf(String.fromCharCode(o))>=0))return!1;if(i)return!0;for(l=r;l++,!(l>=n||(p=u=e.bMarks[l]+e.tShift[l],f=e.eMarks[l],p<f&&e.sCount[l]<e.blkIndent));)if(e.src.charCodeAt(p)===o&&!(e.sCount[l]-e.blkIndent>=4)&&(p=e.skipChars(p,o),!(p-u<s)&&(p=e.skipSpaces(p),!(p<f)))){h=!0;break}return s=e.sCount[r],e.line=l+(h?1:0),c=e.push("fence","code",0),c.info=a,c.content=e.getLines(r+1,l,s,!0),c.markup=d,c.map=[r,e.line],!0},pbe=ke.isSpace,fbe=function(e,r,n,i){var o,s,a,l,u,c,d,h,p,f,m,b,g,y,v,k,C,A,_,S,L=e.lineMax,D=e.bMarks[r]+e.tShift[r],P=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||e.src.charCodeAt(D)!==62)return!1;if(i)return!0;for(f=[],m=[],y=[],v=[],A=e.md.block.ruler.getRules("blockquote"),g=e.parentType,e.parentType="blockquote",h=r;h<n&&(S=e.sCount[h]<e.blkIndent,D=e.bMarks[h]+e.tShift[h],P=e.eMarks[h],!(D>=P));h++){if(e.src.charCodeAt(D++)===62&&!S){for(l=e.sCount[h]+1,e.src.charCodeAt(D)===32?(D++,l++,o=!1,k=!0):e.src.charCodeAt(D)===9?(k=!0,(e.bsCount[h]+l)%4===3?(D++,l++,o=!1):o=!0):k=!1,p=l,f.push(e.bMarks[h]),e.bMarks[h]=D;D<P&&(s=e.src.charCodeAt(D),pbe(s));)s===9?p+=4-(p+e.bsCount[h]+(o?1:0))%4:p++,D++;c=D>=P,m.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(k?1:0),y.push(e.sCount[h]),e.sCount[h]=p-l,v.push(e.tShift[h]),e.tShift[h]=D-e.bMarks[h];continue}if(c)break;for(C=!1,a=0,u=A.length;a<u;a++)if(A[a](e,h,n,!0)){C=!0;break}if(C){e.lineMax=h,e.blkIndent!==0&&(f.push(e.bMarks[h]),m.push(e.bsCount[h]),v.push(e.tShift[h]),y.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}f.push(e.bMarks[h]),m.push(e.bsCount[h]),v.push(e.tShift[h]),y.push(e.sCount[h]),e.sCount[h]=-1}for(b=e.blkIndent,e.blkIndent=0,_=e.push("blockquote_open","blockquote",1),_.markup=">",_.map=d=[r,0],e.md.block.tokenize(e,r,h),_=e.push("blockquote_close","blockquote",-1),_.markup=">",e.lineMax=L,e.parentType=g,d[1]=e.line,a=0;a<v.length;a++)e.bMarks[a+r]=f[a],e.tShift[a+r]=v[a],e.sCount[a+r]=y[a],e.bsCount[a+r]=m[a];return e.blkIndent=b,!0},mbe=ke.isSpace,gbe=function(e,r,n,i){var o,s,a,l,u=e.bMarks[r]+e.tShift[r],c=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||(o=e.src.charCodeAt(u++),o!==42&&o!==45&&o!==95))return!1;for(s=1;u<c;){if(a=e.src.charCodeAt(u++),a!==o&&!mbe(a))return!1;a===o&&s++}return s<3?!1:(i||(e.line=r+1,l=e.push("hr","hr",0),l.map=[r,e.line],l.markup=Array(s+1).join(String.fromCharCode(o))),!0)},Uy=ke.isSpace;function Dm(e,r){var n,i,o,s;return i=e.bMarks[r]+e.tShift[r],o=e.eMarks[r],n=e.src.charCodeAt(i++),n!==42&&n!==45&&n!==43||i<o&&(s=e.src.charCodeAt(i),!Uy(s))?-1:i}function Sm(e,r){var n,i=e.bMarks[r]+e.tShift[r],o=i,s=e.eMarks[r];if(o+1>=s||(n=e.src.charCodeAt(o++),n<48||n>57))return-1;for(;;){if(o>=s)return-1;if(n=e.src.charCodeAt(o++),n>=48&&n<=57){if(o-i>=10)return-1;continue}if(n===41||n===46)break;return-1}return o<s&&(n=e.src.charCodeAt(o),!Uy(n))?-1:o}function bbe(e,r){var n,i,o=e.level+2;for(n=r+2,i=e.tokens.length-2;n<i;n++)e.tokens[n].level===o&&e.tokens[n].type==="paragraph_open"&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}var ybe=function(e,r,n,i){var o,s,a,l,u,c,d,h,p,f,m,b,g,y,v,k,C,A,_,S,L,D,P,U,J,Z,F,T=r,Y=!1,w=!0;if(e.sCount[T]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[T]-e.listIndent>=4&&e.sCount[T]<e.blkIndent)return!1;if(i&&e.parentType==="paragraph"&&e.sCount[T]>=e.blkIndent&&(Y=!0),(D=Sm(e,T))>=0){if(d=!0,U=e.bMarks[T]+e.tShift[T],g=Number(e.src.slice(U,D-1)),Y&&g!==1)return!1}else if((D=Dm(e,T))>=0)d=!1;else return!1;if(Y&&e.skipSpaces(D)>=e.eMarks[T])return!1;if(i)return!0;for(b=e.src.charCodeAt(D-1),m=e.tokens.length,d?(F=e.push("ordered_list_open","ol",1),g!==1&&(F.attrs=[["start",g]])):F=e.push("bullet_list_open","ul",1),F.map=f=[T,0],F.markup=String.fromCharCode(b),P=!1,Z=e.md.block.ruler.getRules("list"),C=e.parentType,e.parentType="list";T<n;){for(L=D,y=e.eMarks[T],c=v=e.sCount[T]+D-(e.bMarks[T]+e.tShift[T]);L<y;){if(o=e.src.charCodeAt(L),o===9)v+=4-(v+e.bsCount[T])%4;else if(o===32)v++;else break;L++}if(s=L,s>=y?u=1:u=v-c,u>4&&(u=1),l=c+u,F=e.push("list_item_open","li",1),F.markup=String.fromCharCode(b),F.map=h=[T,0],d&&(F.info=e.src.slice(U,D-1)),S=e.tight,_=e.tShift[T],A=e.sCount[T],k=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=l,e.tight=!0,e.tShift[T]=s-e.bMarks[T],e.sCount[T]=v,s>=y&&e.isEmpty(T+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,T,n,!0),(!e.tight||P)&&(w=!1),P=e.line-T>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=k,e.tShift[T]=_,e.sCount[T]=A,e.tight=S,F=e.push("list_item_close","li",-1),F.markup=String.fromCharCode(b),T=e.line,h[1]=T,T>=n||e.sCount[T]<e.blkIndent||e.sCount[T]-e.blkIndent>=4)break;for(J=!1,a=0,p=Z.length;a<p;a++)if(Z[a](e,T,n,!0)){J=!0;break}if(J)break;if(d){if(D=Sm(e,T),D<0)break;U=e.bMarks[T]+e.tShift[T]}else if(D=Dm(e,T),D<0)break;if(b!==e.src.charCodeAt(D-1))break}return d?F=e.push("ordered_list_close","ol",-1):F=e.push("bullet_list_close","ul",-1),F.markup=String.fromCharCode(b),f[1]=T,e.line=T,e.parentType=C,w&&bbe(e,m),!0},Cbe=ke.normalizeReference,na=ke.isSpace,vbe=function(e,r,n,i){var o,s,a,l,u,c,d,h,p,f,m,b,g,y,v,k,C=0,A=e.bMarks[r]+e.tShift[r],_=e.eMarks[r],S=r+1;if(e.sCount[r]-e.blkIndent>=4||e.src.charCodeAt(A)!==91)return!1;for(;++A<_;)if(e.src.charCodeAt(A)===93&&e.src.charCodeAt(A-1)!==92){if(A+1===_||e.src.charCodeAt(A+1)!==58)return!1;break}for(l=e.lineMax,v=e.md.block.ruler.getRules("reference"),f=e.parentType,e.parentType="reference";S<l&&!e.isEmpty(S);S++)if(!(e.sCount[S]-e.blkIndent>3)&&!(e.sCount[S]<0)){for(y=!1,c=0,d=v.length;c<d;c++)if(v[c](e,S,l,!0)){y=!0;break}if(y)break}for(g=e.getLines(r,S,e.blkIndent,!1).trim(),_=g.length,A=1;A<_;A++){if(o=g.charCodeAt(A),o===91)return!1;if(o===93){p=A;break}else o===10?C++:o===92&&(A++,A<_&&g.charCodeAt(A)===10&&C++)}if(p<0||g.charCodeAt(p+1)!==58)return!1;for(A=p+2;A<_;A++)if(o=g.charCodeAt(A),o===10)C++;else if(!na(o))break;if(m=e.md.helpers.parseLinkDestination(g,A,_),!m.ok||(u=e.md.normalizeLink(m.str),!e.md.validateLink(u)))return!1;for(A=m.pos,C+=m.lines,s=A,a=C,b=A;A<_;A++)if(o=g.charCodeAt(A),o===10)C++;else if(!na(o))break;for(m=e.md.helpers.parseLinkTitle(g,A,_),A<_&&b!==A&&m.ok?(k=m.str,A=m.pos,C+=m.lines):(k="",A=s,C=a);A<_&&(o=g.charCodeAt(A),!!na(o));)A++;if(A<_&&g.charCodeAt(A)!==10&&k)for(k="",A=s,C=a;A<_&&(o=g.charCodeAt(A),!!na(o));)A++;return A<_&&g.charCodeAt(A)!==10||(h=Cbe(g.slice(1,p)),!h)?!1:(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[h]>"u"&&(e.env.references[h]={title:k,href:u}),e.parentType=f,e.line=r+C+1),!0)},kbe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Pl={},wbe="[a-zA-Z_:][a-zA-Z0-9:._-]*",Abe="[^\"'=<>`\\x00-\\x20]+",_be="'[^']*'",Ebe='"[^"]*"',xbe="(?:"+Abe+"|"+_be+"|"+Ebe+")",Dbe="(?:\\s+"+wbe+"(?:\\s*=\\s*"+xbe+")?)",Wy="<[A-Za-z][A-Za-z0-9\\-]*"+Dbe+"*\\s*\\/?>",Ky="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Sbe="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Bbe="<[?][\\s\\S]*?[?]>",Mbe="<![A-Z]+\\s+[^>]*>",Fbe="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Nbe=new RegExp("^(?:"+Wy+"|"+Ky+"|"+Sbe+"|"+Bbe+"|"+Mbe+"|"+Fbe+")"),Obe=new RegExp("^(?:"+Wy+"|"+Ky+")");Pl.HTML_TAG_RE=Nbe,Pl.HTML_OPEN_CLOSE_TAG_RE=Obe;var Tbe=kbe,Lbe=Pl.HTML_OPEN_CLOSE_TAG_RE,yi=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Tbe.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Lbe.source+"\\s*$"),/^$/,!1]],Ibe=function(e,r,n,i){var o,s,a,l,u=e.bMarks[r]+e.tShift[r],c=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(u)!==60)return!1;for(l=e.src.slice(u,c),o=0;o<yi.length&&!yi[o][0].test(l);o++);if(o===yi.length)return!1;if(i)return yi[o][2];if(s=r+1,!yi[o][1].test(l)){for(;s<n&&!(e.sCount[s]<e.blkIndent);s++)if(u=e.bMarks[s]+e.tShift[s],c=e.eMarks[s],l=e.src.slice(u,c),yi[o][1].test(l)){l.length!==0&&s++;break}}return e.line=s,a=e.push("html_block","",0),a.map=[r,s],a.content=e.getLines(r,s,e.blkIndent,!0),!0},Bm=ke.isSpace,Rbe=function(e,r,n,i){var o,s,a,l,u=e.bMarks[r]+e.tShift[r],c=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||(o=e.src.charCodeAt(u),o!==35||u>=c))return!1;for(s=1,o=e.src.charCodeAt(++u);o===35&&u<c&&s<=6;)s++,o=e.src.charCodeAt(++u);return s>6||u<c&&!Bm(o)?!1:(i||(c=e.skipSpacesBack(c,u),a=e.skipCharsBack(c,35,u),a>u&&Bm(e.src.charCodeAt(a-1))&&(c=a),e.line=r+1,l=e.push("heading_open","h"+String(s),1),l.markup="########".slice(0,s),l.map=[r,e.line],l=e.push("inline","",0),l.content=e.src.slice(u,c).trim(),l.map=[r,e.line],l.children=[],l=e.push("heading_close","h"+String(s),-1),l.markup="########".slice(0,s)),!0)},zbe=function(e,r,n){var i,o,s,a,l,u,c,d,h,p=r+1,f,m=e.md.block.ruler.getRules("paragraph");if(e.sCount[r]-e.blkIndent>=4)return!1;for(f=e.parentType,e.parentType="paragraph";p<n&&!e.isEmpty(p);p++)if(!(e.sCount[p]-e.blkIndent>3)){if(e.sCount[p]>=e.blkIndent&&(u=e.bMarks[p]+e.tShift[p],c=e.eMarks[p],u<c&&(h=e.src.charCodeAt(u),(h===45||h===61)&&(u=e.skipChars(u,h),u=e.skipSpaces(u),u>=c)))){d=h===61?1:2;break}if(!(e.sCount[p]<0)){for(o=!1,s=0,a=m.length;s<a;s++)if(m[s](e,p,n,!0)){o=!0;break}if(o)break}}return d?(i=e.getLines(r,p,e.blkIndent,!1).trim(),e.line=p+1,l=e.push("heading_open","h"+String(d),1),l.markup=String.fromCharCode(h),l.map=[r,e.line],l=e.push("inline","",0),l.content=i,l.map=[r,e.line-1],l.children=[],l=e.push("heading_close","h"+String(d),-1),l.markup=String.fromCharCode(h),e.parentType=f,!0):!1},$be=function(e,r,n){var i,o,s,a,l,u,c=r+1,d=e.md.block.ruler.getRules("paragraph");for(u=e.parentType,e.parentType="paragraph";c<n&&!e.isEmpty(c);c++)if(!(e.sCount[c]-e.blkIndent>3)&&!(e.sCount[c]<0)){for(o=!1,s=0,a=d.length;s<a;s++)if(d[s](e,c,n,!0)){o=!0;break}if(o)break}return i=e.getLines(r,c,e.blkIndent,!1).trim(),e.line=c,l=e.push("paragraph_open","p",1),l.map=[r,e.line],l=e.push("inline","",0),l.content=i,l.map=[r,e.line],l.children=[],l=e.push("paragraph_close","p",-1),e.parentType=u,!0},Mm=ku,Fa=ke.isSpace;function fr(e,r,n,i){var o,s,a,l,u,c,d,h;for(this.src=e,this.md=r,this.env=n,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",s=this.src,h=!1,a=l=c=d=0,u=s.length;l<u;l++){if(o=s.charCodeAt(l),!h)if(Fa(o)){c++,o===9?d+=4-d%4:d++;continue}else h=!0;(o===10||l===u-1)&&(o!==10&&l++,this.bMarks.push(a),this.eMarks.push(l),this.tShift.push(c),this.sCount.push(d),this.bsCount.push(0),h=!1,c=0,d=0,a=l+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}fr.prototype.push=function(e,r,n){var i=new Mm(e,r,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i},fr.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},fr.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;e<r&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},fr.prototype.skipSpaces=function(e){for(var r,n=this.src.length;e<n&&(r=this.src.charCodeAt(e),!!Fa(r));e++);return e},fr.prototype.skipSpacesBack=function(e,r){if(e<=r)return e;for(;e>r;)if(!Fa(this.src.charCodeAt(--e)))return e+1;return e},fr.prototype.skipChars=function(e,r){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===r;e++);return e},fr.prototype.skipCharsBack=function(e,r,n){if(e<=n)return e;for(;e>n;)if(r!==this.src.charCodeAt(--e))return e+1;return e},fr.prototype.getLines=function(e,r,n,i){var o,s,a,l,u,c,d,h=e;if(e>=r)return"";for(c=new Array(r-e),o=0;h<r;h++,o++){for(s=0,d=l=this.bMarks[h],h+1<r||i?u=this.eMarks[h]+1:u=this.eMarks[h];l<u&&s<n;){if(a=this.src.charCodeAt(l),Fa(a))a===9?s+=4-(s+this.bsCount[h])%4:s++;else if(l-d<this.tShift[h])s++;else break;l++}s>n?c[o]=new Array(s-n+1).join(" ")+this.src.slice(l,u):c[o]=this.src.slice(l,u)}return c.join("")},fr.prototype.Token=Mm;var Hbe=fr,Pbe=np,ia=[["table",cbe,["paragraph","reference"]],["code",dbe],["fence",hbe,["paragraph","reference","blockquote","list"]],["blockquote",fbe,["paragraph","reference","blockquote","list"]],["hr",gbe,["paragraph","reference","blockquote","list"]],["list",ybe,["paragraph","reference","blockquote"]],["reference",vbe],["html_block",Ibe,["paragraph","reference","blockquote"]],["heading",Rbe,["paragraph","reference","blockquote"]],["lheading",zbe],["paragraph",$be]];function Na(){this.ruler=new Pbe;for(var e=0;e<ia.length;e++)this.ruler.push(ia[e][0],ia[e][1],{alt:(ia[e][2]||[]).slice()})}Na.prototype.tokenize=function(e,r,n){for(var i,o,s,a=this.ruler.getRules(""),l=a.length,u=r,c=!1,d=e.md.options.maxNesting;u<n&&(e.line=u=e.skipEmptyLines(u),!(u>=n||e.sCount[u]<e.blkIndent));){if(e.level>=d){e.line=n;break}for(s=e.line,o=0;o<l;o++)if(i=a[o](e,u,n,!1),i){if(s>=e.line)throw new Error("block rule didn't increment state.line");break}if(!i)throw new Error("none of the block rules matched");e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),u=e.line,u<n&&e.isEmpty(u)&&(c=!0,u++,e.line=u)}},Na.prototype.parse=function(e,r,n,i){var o;e&&(o=new this.State(e,r,n,i),this.tokenize(o,o.line,o.lineMax))},Na.prototype.State=Hbe;var Vbe=Na;function jbe(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}var qbe=function(e,r){for(var n=e.pos;n<e.posMax&&!jbe(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(r||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)},Ube=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,Wbe=function(e,r){var n,i,o,s,a,l,u,c;return!e.md.options.linkify||e.linkLevel>0||(n=e.pos,i=e.posMax,n+3>i)||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47||(o=e.pending.match(Ube),!o)||(s=o[1],a=e.md.linkify.matchAtStart(e.src.slice(n-s.length)),!a)||(l=a.url,l.length<=s.length)||(l=l.replace(/\*+$/,""),u=e.md.normalizeLink(l),!e.md.validateLink(u))?!1:(r||(e.pending=e.pending.slice(0,-s.length),c=e.push("link_open","a",1),c.attrs=[["href",u]],c.markup="linkify",c.info="auto",c=e.push("text","",0),c.content=e.md.normalizeLinkText(l),c=e.push("link_close","a",-1),c.markup="linkify",c.info="auto"),e.pos+=l.length-s.length,!0)},Kbe=ke.isSpace,Zy=function(e,r){var n,i,o,s=e.pos;if(e.src.charCodeAt(s)!==10)return!1;if(n=e.pending.length-1,i=e.posMax,!r)if(n>=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){for(o=n-1;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(s++;s<i&&Kbe(e.src.charCodeAt(s));)s++;return e.pos=s,!0};const Zbe=Dr(Zy);for(var Gbe=ke.isSpace,ip=[],Fm=0;Fm<256;Fm++)ip.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){ip[e.charCodeAt(0)]=1});var Gy=function(e,r){var n,i,o,s,a,l=e.pos,u=e.posMax;if(e.src.charCodeAt(l)!==92||(l++,l>=u))return!1;if(n=e.src.charCodeAt(l),n===10){for(r||e.push("hardbreak","br",0),l++;l<u&&(n=e.src.charCodeAt(l),!!Gbe(n));)l++;return e.pos=l,!0}return s=e.src[l],n>=55296&&n<=56319&&l+1<u&&(i=e.src.charCodeAt(l+1),i>=56320&&i<=57343&&(s+=e.src[l+1],l++)),o="\\"+s,r||(a=e.push("text_special","",0),n<256&&ip[n]!==0?a.content=s:a.content=o,a.markup=o,a.info="escape"),e.pos=l+1,!0};const Jbe=Dr(Gy);var Xbe=function(e,r){var n,i,o,s,a,l,u,c,d=e.pos,h=e.src.charCodeAt(d);if(h!==96)return!1;for(n=d,d++,i=e.posMax;d<i&&e.src.charCodeAt(d)===96;)d++;if(o=e.src.slice(n,d),u=o.length,e.backticksScanned&&(e.backticks[u]||0)<=n)return r||(e.pending+=o),e.pos+=u,!0;for(l=d;(a=e.src.indexOf("`",l))!==-1;){for(l=a+1;l<i&&e.src.charCodeAt(l)===96;)l++;if(c=l-a,c===u)return r||(s=e.push("code_inline","code",0),s.markup=o,s.content=e.src.slice(d,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=l,!0;e.backticks[c]=a}return e.backticksScanned=!0,r||(e.pending+=o),e.pos+=u,!0},wu={};wu.tokenize=function(e,r){var n,i,o,s,a,l=e.pos,u=e.src.charCodeAt(l);if(r||u!==126||(i=e.scanDelims(e.pos,!0),s=i.length,a=String.fromCharCode(u),s<2))return!1;for(s%2&&(o=e.push("text","",0),o.content=a,s--),n=0;n<s;n+=2)o=e.push("text","",0),o.content=a+a,e.delimiters.push({marker:u,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0};function Nm(e,r){var n,i,o,s,a,l=[],u=r.length;for(n=0;n<u;n++)o=r[n],o.marker===126&&o.end!==-1&&(s=r[o.end],a=e.tokens[o.token],a.type="s_open",a.tag="s",a.nesting=1,a.markup="~~",a.content="",a=e.tokens[s.token],a.type="s_close",a.tag="s",a.nesting=-1,a.markup="~~",a.content="",e.tokens[s.token-1].type==="text"&&e.tokens[s.token-1].content==="~"&&l.push(s.token-1));for(;l.length;){for(n=l.pop(),i=n+1;i<e.tokens.length&&e.tokens[i].type==="s_close";)i++;i--,n!==i&&(a=e.tokens[i],e.tokens[i]=e.tokens[n],e.tokens[n]=a)}}wu.postProcess=function(e){var r,n=e.tokens_meta,i=e.tokens_meta.length;for(Nm(e,e.delimiters),r=0;r<i;r++)n[r]&&n[r].delimiters&&Nm(e,n[r].delimiters)};var Au={};Au.tokenize=function(e,r){var n,i,o,s=e.pos,a=e.src.charCodeAt(s);if(r||a!==95&&a!==42)return!1;for(i=e.scanDelims(e.pos,a===42),n=0;n<i.length;n++)o=e.push("text","",0),o.content=String.fromCharCode(a),e.delimiters.push({marker:a,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0};function Om(e,r){var n,i,o,s,a,l,u=r.length;for(n=u-1;n>=0;n--)i=r[n],!(i.marker!==95&&i.marker!==42)&&i.end!==-1&&(o=r[i.end],l=n>0&&r[n-1].end===i.end+1&&r[n-1].marker===i.marker&&r[n-1].token===i.token-1&&r[i.end+1].token===o.token+1,a=String.fromCharCode(i.marker),s=e.tokens[i.token],s.type=l?"strong_open":"em_open",s.tag=l?"strong":"em",s.nesting=1,s.markup=l?a+a:a,s.content="",s=e.tokens[o.token],s.type=l?"strong_close":"em_close",s.tag=l?"strong":"em",s.nesting=-1,s.markup=l?a+a:a,s.content="",l&&(e.tokens[r[n-1].token].content="",e.tokens[r[i.end+1].token].content="",n--))}Au.postProcess=function(e){var r,n=e.tokens_meta,i=e.tokens_meta.length;for(Om(e,e.delimiters),r=0;r<i;r++)n[r]&&n[r].delimiters&&Om(e,n[r].delimiters)};var Qbe=ke.normalizeReference,xc=ke.isSpace,Ybe=function(e,r){var n,i,o,s,a,l,u,c,d,h="",p="",f=e.pos,m=e.posMax,b=e.pos,g=!0;if(e.src.charCodeAt(e.pos)!==91||(a=e.pos+1,s=e.md.helpers.parseLinkLabel(e,e.pos,!0),s<0))return!1;if(l=s+1,l<m&&e.src.charCodeAt(l)===40){for(g=!1,l++;l<m&&(i=e.src.charCodeAt(l),!(!xc(i)&&i!==10));l++);if(l>=m)return!1;if(b=l,u=e.md.helpers.parseLinkDestination(e.src,l,e.posMax),u.ok){for(h=e.md.normalizeLink(u.str),e.md.validateLink(h)?l=u.pos:h="",b=l;l<m&&(i=e.src.charCodeAt(l),!(!xc(i)&&i!==10));l++);if(u=e.md.helpers.parseLinkTitle(e.src,l,e.posMax),l<m&&b!==l&&u.ok)for(p=u.str,l=u.pos;l<m&&(i=e.src.charCodeAt(l),!(!xc(i)&&i!==10));l++);}(l>=m||e.src.charCodeAt(l)!==41)&&(g=!0),l++}if(g){if(typeof e.env.references>"u")return!1;if(l<m&&e.src.charCodeAt(l)===91?(b=l+1,l=e.md.helpers.parseLinkLabel(e,l),l>=0?o=e.src.slice(b,l++):l=s+1):l=s+1,o||(o=e.src.slice(a,s)),c=e.env.references[Qbe(o)],!c)return e.pos=f,!1;h=c.href,p=c.title}return r||(e.pos=a,e.posMax=s,d=e.push("link_open","a",1),d.attrs=n=[["href",h]],p&&n.push(["title",p]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,d=e.push("link_close","a",-1)),e.pos=l,e.posMax=m,!0},eye=ke.normalizeReference,Dc=ke.isSpace,tye=function(e,r){var n,i,o,s,a,l,u,c,d,h,p,f,m,b="",g=e.pos,y=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91||(l=e.pos+2,a=e.md.helpers.parseLinkLabel(e,e.pos+1,!1),a<0))return!1;if(u=a+1,u<y&&e.src.charCodeAt(u)===40){for(u++;u<y&&(i=e.src.charCodeAt(u),!(!Dc(i)&&i!==10));u++);if(u>=y)return!1;for(m=u,d=e.md.helpers.parseLinkDestination(e.src,u,e.posMax),d.ok&&(b=e.md.normalizeLink(d.str),e.md.validateLink(b)?u=d.pos:b=""),m=u;u<y&&(i=e.src.charCodeAt(u),!(!Dc(i)&&i!==10));u++);if(d=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<y&&m!==u&&d.ok)for(h=d.str,u=d.pos;u<y&&(i=e.src.charCodeAt(u),!(!Dc(i)&&i!==10));u++);else h="";if(u>=y||e.src.charCodeAt(u)!==41)return e.pos=g,!1;u++}else{if(typeof e.env.references>"u")return!1;if(u<y&&e.src.charCodeAt(u)===91?(m=u+1,u=e.md.helpers.parseLinkLabel(e,u),u>=0?s=e.src.slice(m,u++):u=a+1):u=a+1,s||(s=e.src.slice(l,a)),c=e.env.references[eye(s)],!c)return e.pos=g,!1;b=c.href,h=c.title}return r||(o=e.src.slice(l,a),e.md.inline.parse(o,e.md,e.env,f=[]),p=e.push("image","img",0),p.attrs=n=[["src",b],["alt",""]],p.children=f,p.content=o,h&&n.push(["title",h])),e.pos=u,e.posMax=y,!0},rye=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,nye=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,iye=function(e,r){var n,i,o,s,a,l,u=e.pos;if(e.src.charCodeAt(u)!==60)return!1;for(a=e.pos,l=e.posMax;;){if(++u>=l||(s=e.src.charCodeAt(u),s===60))return!1;if(s===62)break}return n=e.src.slice(a+1,u),nye.test(n)?(i=e.md.normalizeLink(n),e.md.validateLink(i)?(r||(o=e.push("link_open","a",1),o.attrs=[["href",i]],o.markup="autolink",o.info="auto",o=e.push("text","",0),o.content=e.md.normalizeLinkText(n),o=e.push("link_close","a",-1),o.markup="autolink",o.info="auto"),e.pos+=n.length+2,!0):!1):rye.test(n)?(i=e.md.normalizeLink("mailto:"+n),e.md.validateLink(i)?(r||(o=e.push("link_open","a",1),o.attrs=[["href",i]],o.markup="autolink",o.info="auto",o=e.push("text","",0),o.content=e.md.normalizeLinkText(n),o=e.push("link_close","a",-1),o.markup="autolink",o.info="auto"),e.pos+=n.length+2,!0):!1):!1},oye=Pl.HTML_TAG_RE;function sye(e){return/^<a[>\s]/i.test(e)}function aye(e){return/^<\/a\s*>/i.test(e)}function lye(e){var r=e|32;return r>=97&&r<=122}var uye=function(e,r){var n,i,o,s,a=e.pos;return!e.md.options.html||(o=e.posMax,e.src.charCodeAt(a)!==60||a+2>=o)||(n=e.src.charCodeAt(a+1),n!==33&&n!==63&&n!==47&&!lye(n))||(i=e.src.slice(a).match(oye),!i)?!1:(r||(s=e.push("html_inline","",0),s.content=i[0],sye(s.content)&&e.linkLevel++,aye(s.content)&&e.linkLevel--),e.pos+=i[0].length,!0)},Tm=$y,cye=ke.has,dye=ke.isValidEntityCode,Lm=ke.fromCodePoint,hye=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,pye=/^&([a-z][a-z0-9]{1,31});/i,fye=function(e,r){var n,i,o,s,a=e.pos,l=e.posMax;if(e.src.charCodeAt(a)!==38||a+1>=l)return!1;if(n=e.src.charCodeAt(a+1),n===35){if(o=e.src.slice(a).match(hye),o)return r||(i=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),s=e.push("text_special","",0),s.content=dye(i)?Lm(i):Lm(65533),s.markup=o[0],s.info="entity"),e.pos+=o[0].length,!0}else if(o=e.src.slice(a).match(pye),o&&cye(Tm,o[1]))return r||(s=e.push("text_special","",0),s.content=Tm[o[1]],s.markup=o[0],s.info="entity"),e.pos+=o[0].length,!0;return!1};function Im(e){var r,n,i,o,s,a,l,u,c={},d=e.length;if(d){var h=0,p=-2,f=[];for(r=0;r<d;r++)if(i=e[r],f.push(0),(e[h].marker!==i.marker||p!==i.token-1)&&(h=r),p=i.token,i.length=i.length||0,!!i.close){for(c.hasOwnProperty(i.marker)||(c[i.marker]=[-1,-1,-1,-1,-1,-1]),s=c[i.marker][(i.open?3:0)+i.length%3],n=h-f[h]-1,a=n;n>s;n-=f[n]+1)if(o=e[n],o.marker===i.marker&&o.open&&o.end<0&&(l=!1,(o.close||i.open)&&(o.length+i.length)%3===0&&(o.length%3!==0||i.length%3!==0)&&(l=!0),!l)){u=n>0&&!e[n-1].open?f[n-1]+1:0,f[r]=r-n+u,f[n]=u,i.open=!1,o.end=r,o.close=!1,a=-1,p=-2;break}a!==-1&&(c[i.marker][(i.open?3:0)+(i.length||0)%3]=a)}}}var mye=function(e){var r,n=e.tokens_meta,i=e.tokens_meta.length;for(Im(e.delimiters),r=0;r<i;r++)n[r]&&n[r].delimiters&&Im(n[r].delimiters)},gye=function(e){var r,n,i=0,o=e.tokens,s=e.tokens.length;for(r=n=0;r<s;r++)o[r].nesting<0&&i--,o[r].level=i,o[r].nesting>0&&i++,o[r].type==="text"&&r+1<s&&o[r+1].type==="text"?o[r+1].content=o[r].content+o[r+1].content:(r!==n&&(o[n]=o[r]),n++);r!==n&&(o.length=n)},Sc=ku,Rm=ke.isWhiteSpace,zm=ke.isPunctChar,$m=ke.isMdAsciiPunct;function Bo(e,r,n,i){this.src=e,this.env=n,this.md=r,this.tokens=i,this.tokens_meta=Array(i.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Bo.prototype.pushPending=function(){var e=new Sc("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Bo.prototype.push=function(e,r,n){this.pending&&this.pushPending();var i=new Sc(e,r,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(o),i},Bo.prototype.scanDelims=function(e,r){var n=e,i,o,s,a,l,u,c,d,h,p=!0,f=!0,m=this.posMax,b=this.src.charCodeAt(e);for(i=e>0?this.src.charCodeAt(e-1):32;n<m&&this.src.charCodeAt(n)===b;)n++;return s=n-e,o=n<m?this.src.charCodeAt(n):32,c=$m(i)||zm(String.fromCharCode(i)),h=$m(o)||zm(String.fromCharCode(o)),u=Rm(i),d=Rm(o),d?p=!1:h&&(u||c||(p=!1)),u?f=!1:c&&(d||h||(f=!1)),r?(a=p,l=f):(a=p&&(!f||c),l=f&&(!p||h)),{can_open:a,can_close:l,length:s}},Bo.prototype.Token=Sc;var bye=Bo,Hm=np,Bc=[["text",qbe],["linkify",Wbe],["newline",Zy],["escape",Gy],["backticks",Xbe],["strikethrough",wu.tokenize],["emphasis",Au.tokenize],["link",Ybe],["image",tye],["autolink",iye],["html_inline",uye],["entity",fye]],Mc=[["balance_pairs",mye],["strikethrough",wu.postProcess],["emphasis",Au.postProcess],["fragments_join",gye]];function Mo(){var e;for(this.ruler=new Hm,e=0;e<Bc.length;e++)this.ruler.push(Bc[e][0],Bc[e][1]);for(this.ruler2=new Hm,e=0;e<Mc.length;e++)this.ruler2.push(Mc[e][0],Mc[e][1])}Mo.prototype.skipToken=function(e){var r,n,i=e.pos,o=this.ruler.getRules(""),s=o.length,a=e.md.options.maxNesting,l=e.cache;if(typeof l[i]<"u"){e.pos=l[i];return}if(e.level<a){for(n=0;n<s;n++)if(e.level++,r=o[n](e,!0),e.level--,r){if(i>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;r||e.pos++,l[i]=e.pos},Mo.prototype.tokenize=function(e){for(var r,n,i,o=this.ruler.getRules(""),s=o.length,a=e.posMax,l=e.md.options.maxNesting;e.pos<a;){if(i=e.pos,e.level<l){for(n=0;n<s;n++)if(r=o[n](e,!1),r){if(i>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(r){if(e.pos>=a)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Mo.prototype.parse=function(e,r,n,i){var o,s,a,l=new this.State(e,r,n,i);for(this.tokenize(l),s=this.ruler2.getRules(""),a=s.length,o=0;o<a;o++)s[o](l)},Mo.prototype.State=bye;var yye=Mo,Pm,Vm;function Cye(){return Vm||(Vm=1,Pm=function(e){var r={};e=e||{},r.src_Any=Hy().source,r.src_Cc=Py().source,r.src_Z=Vy().source,r.src_P=rp.source,r.src_ZPCc=[r.src_Z,r.src_P,r.src_Cc].join("|"),r.src_ZCc=[r.src_Z,r.src_Cc].join("|");var n="[><|]";return r.src_pseudo_letter="(?:(?!"+n+"|"+r.src_ZPCc+")"+r.src_Any+")",r.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",r.src_auth="(?:(?:(?!"+r.src_ZCc+"|[@/\\[\\]()]).)+@)?",r.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",r.src_host_terminator="(?=$|"+n+"|"+r.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+r.src_ZPCc+"))",r.src_path="(?:[/?#](?:(?!"+r.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+r.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+r.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+r.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+r.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+r.src_ZCc+"|[']).)+\\'|\\'(?="+r.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+r.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+r.src_ZCc+"|$)|;(?!"+r.src_ZCc+"|$)|\\!+(?!"+r.src_ZCc+"|[!]|$)|\\?(?!"+r.src_ZCc+"|[?]|$))+|\\/)?",r.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',r.src_xn="xn--[a-z0-9\\-]{1,59}",r.src_domain_root="(?:"+r.src_xn+"|"+r.src_pseudo_letter+"{1,63})",r.src_domain="(?:"+r.src_xn+"|(?:"+r.src_pseudo_letter+")|(?:"+r.src_pseudo_letter+"(?:-|"+r.src_pseudo_letter+"){0,61}"+r.src_pseudo_letter+"))",r.src_host="(?:(?:(?:(?:"+r.src_domain+")\\.)*"+r.src_domain+"))",r.tpl_host_fuzzy="(?:"+r.src_ip4+"|(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%)))",r.tpl_host_no_ip_fuzzy="(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%))",r.src_host_strict=r.src_host+r.src_host_terminator,r.tpl_host_fuzzy_strict=r.tpl_host_fuzzy+r.src_host_terminator,r.src_host_port_strict=r.src_host+r.src_port+r.src_host_terminator,r.tpl_host_port_fuzzy_strict=r.tpl_host_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_port_no_ip_fuzzy_strict=r.tpl_host_no_ip_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+r.src_ZPCc+"|>|$))",r.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+r.src_ZCc+")("+r.src_email_name+"@"+r.tpl_host_fuzzy_strict+")",r.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+r.src_ZPCc+"))((?![$+<=>^`||])"+r.tpl_host_port_fuzzy_strict+r.src_path+")",r.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+r.src_ZPCc+"))((?![$+<=>^`||])"+r.tpl_host_port_no_ip_fuzzy_strict+r.src_path+")",r}),Pm}function Fd(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(n){n&&Object.keys(n).forEach(function(i){e[i]=n[i]})}),e}function _u(e){return Object.prototype.toString.call(e)}function vye(e){return _u(e)==="[object String]"}function kye(e){return _u(e)==="[object Object]"}function wye(e){return _u(e)==="[object RegExp]"}function jm(e){return _u(e)==="[object Function]"}function Aye(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var Jy={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function _ye(e){return Object.keys(e||{}).reduce(function(r,n){return r||Jy.hasOwnProperty(n)},!1)}var Eye={"http:":{validate:function(e,r,n){var i=e.slice(r);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(i)?i.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,r,n){var i=e.slice(r);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(i)?r>=3&&e[r-3]===":"||r>=3&&e[r-3]==="/"?0:i.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,r,n){var i=e.slice(r);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(i)?i.match(n.re.mailto)[0].length:0}}},xye="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Dye="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Sye(e){e.__index__=-1,e.__text_cache__=""}function Bye(e){return function(r,n){var i=r.slice(n);return e.test(i)?i.match(e)[0].length:0}}function qm(){return function(e,r){r.normalize(e)}}function Oa(e){var r=e.re=Cye()(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(xye),n.push(r.src_xn),r.src_tlds=n.join("|");function i(l){return l.replace("%TLDS%",r.src_tlds)}r.email_fuzzy=RegExp(i(r.tpl_email_fuzzy),"i"),r.link_fuzzy=RegExp(i(r.tpl_link_fuzzy),"i"),r.link_no_ip_fuzzy=RegExp(i(r.tpl_link_no_ip_fuzzy),"i"),r.host_fuzzy_test=RegExp(i(r.tpl_host_fuzzy_test),"i");var o=[];e.__compiled__={};function s(l,u){throw new Error('(LinkifyIt) Invalid schema "'+l+'": '+u)}Object.keys(e.__schemas__).forEach(function(l){var u=e.__schemas__[l];if(u!==null){var c={validate:null,link:null};if(e.__compiled__[l]=c,kye(u)){wye(u.validate)?c.validate=Bye(u.validate):jm(u.validate)?c.validate=u.validate:s(l,u),jm(u.normalize)?c.normalize=u.normalize:u.normalize?s(l,u):c.normalize=qm();return}if(vye(u)){o.push(l);return}s(l,u)}}),o.forEach(function(l){e.__compiled__[e.__schemas__[l]]&&(e.__compiled__[l].validate=e.__compiled__[e.__schemas__[l]].validate,e.__compiled__[l].normalize=e.__compiled__[e.__schemas__[l]].normalize)}),e.__compiled__[""]={validate:null,normalize:qm()};var a=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(Aye).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+r.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+r.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Sye(e)}function Mye(e,r){var n=e.__index__,i=e.__last_index__,o=e.__text_cache__.slice(n,i);this.schema=e.__schema__.toLowerCase(),this.index=n+r,this.lastIndex=i+r,this.raw=o,this.text=o,this.url=o}function Fc(e,r){var n=new Mye(e,r);return e.__compiled__[n.schema].normalize(n,e),n}function Ft(e,r){if(!(this instanceof Ft))return new Ft(e,r);r||_ye(e)&&(r=e,e={}),this.__opts__=Fd({},Jy,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Fd({},Eye,e),this.__compiled__={},this.__tlds__=Dye,this.__tlds_replaced__=!1,this.re={},Oa(this)}Ft.prototype.add=function(e,r){return this.__schemas__[e]=r,Oa(this),this},Ft.prototype.set=function(e){return this.__opts__=Fd(this.__opts__,e),this},Ft.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var r,n,i,o,s,a,l,u,c;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(r=l.exec(e))!==null;)if(o=this.testSchemaAt(e,r[2],l.lastIndex),o){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=n.index+n[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=e.indexOf("@"),c>=0&&(i=e.match(this.re.email_fuzzy))!==null&&(s=i.index+i[1].length,a=i.index+i[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0},Ft.prototype.pretest=function(e){return this.re.pretest.test(e)},Ft.prototype.testSchemaAt=function(e,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,n,this):0},Ft.prototype.match=function(e){var r=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(Fc(this,r)),r=this.__last_index__);for(var i=r?e.slice(r):e;this.test(i);)n.push(Fc(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null},Ft.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;var r=this.re.schema_at_start.exec(e);if(!r)return null;var n=this.testSchemaAt(e,r[2],r[0].length);return n?(this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+n,Fc(this,0)):null},Ft.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,i,o){return n!==o[i-1]}).reverse(),Oa(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Oa(this),this)},Ft.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},Ft.prototype.onCompile=function(){};var Fye=Ft,Ta={exports:{}};Ta.exports,function(e,r){(function(n){var i=r&&!r.nodeType&&r,o=e&&!e.nodeType&&e,s=typeof un=="object"&&un;(s.global===s||s.window===s||s.self===s)&&(n=s);var a,l=2147483647,u=36,c=1,d=26,h=38,p=700,f=72,m=128,b="-",g=/^xn--/,y=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=u-c,A=Math.floor,_=String.fromCharCode,S;function L(B){throw new RangeError(k[B])}function D(B,I){for(var V=B.length,te=[];V--;)te[V]=I(B[V]);return te}function P(B,I){var V=B.split("@"),te="";V.length>1&&(te=V[0]+"@",B=V[1]),B=B.replace(v,".");var se=B.split("."),G=D(se,I).join(".");return te+G}function U(B){for(var I=[],V=0,te=B.length,se,G;V<te;)se=B.charCodeAt(V++),se>=55296&&se<=56319&&V<te?(G=B.charCodeAt(V++),(G&64512)==56320?I.push(((se&1023)<<10)+(G&1023)+65536):(I.push(se),V--)):I.push(se);return I}function J(B){return D(B,function(I){var V="";return I>65535&&(I-=65536,V+=_(I>>>10&1023|55296),I=56320|I&1023),V+=_(I),V}).join("")}function Z(B){return B-48<10?B-22:B-65<26?B-65:B-97<26?B-97:u}function F(B,I){return B+22+75*(B<26)-((I!=0)<<5)}function T(B,I,V){var te=0;for(B=V?A(B/p):B>>1,B+=A(B/I);B>C*d>>1;te+=u)B=A(B/C);return A(te+(C+1)*B/(B+h))}function Y(B){var I=[],V=B.length,te,se=0,G=m,re=f,Ee,De,ae,Le,Ae,Ie,Pe,Re,Ge;for(Ee=B.lastIndexOf(b),Ee<0&&(Ee=0),De=0;De<Ee;++De)B.charCodeAt(De)>=128&&L("not-basic"),I.push(B.charCodeAt(De));for(ae=Ee>0?Ee+1:0;ae<V;){for(Le=se,Ae=1,Ie=u;ae>=V&&L("invalid-input"),Pe=Z(B.charCodeAt(ae++)),(Pe>=u||Pe>A((l-se)/Ae))&&L("overflow"),se+=Pe*Ae,Re=Ie<=re?c:Ie>=re+d?d:Ie-re,!(Pe<Re);Ie+=u)Ge=u-Re,Ae>A(l/Ge)&&L("overflow"),Ae*=Ge;te=I.length+1,re=T(se-Le,te,Le==0),A(se/te)>l-G&&L("overflow"),G+=A(se/te),se%=te,I.splice(se++,0,G)}return J(I)}function w(B){var I,V,te,se,G,re,Ee,De,ae,Le,Ae,Ie=[],Pe,Re,Ge,we;for(B=U(B),Pe=B.length,I=m,V=0,G=f,re=0;re<Pe;++re)Ae=B[re],Ae<128&&Ie.push(_(Ae));for(te=se=Ie.length,se&&Ie.push(b);te<Pe;){for(Ee=l,re=0;re<Pe;++re)Ae=B[re],Ae>=I&&Ae<Ee&&(Ee=Ae);for(Re=te+1,Ee-I>A((l-V)/Re)&&L("overflow"),V+=(Ee-I)*Re,I=Ee,re=0;re<Pe;++re)if(Ae=B[re],Ae<I&&++V>l&&L("overflow"),Ae==I){for(De=V,ae=u;Le=ae<=G?c:ae>=G+d?d:ae-G,!(De<Le);ae+=u)we=De-Le,Ge=u-Le,Ie.push(_(F(Le+we%Ge,0))),De=A(we/Ge);Ie.push(_(F(De,0))),G=T(V,Re,te==se),V=0,++te}++V,++I}return Ie.join("")}function E(B){return P(B,function(I){return g.test(I)?Y(I.slice(4).toLowerCase()):I})}function R(B){return P(B,function(I){return y.test(I)?"xn--"+w(I):I})}if(a={version:"1.4.1",ucs2:{decode:U,encode:J},decode:Y,encode:w,toASCII:R,toUnicode:E},i&&o)if(e.exports==i)o.exports=a;else for(S in a)a.hasOwnProperty(S)&&(i[S]=a[S]);else n.punycode=a})(un)}(Ta,Ta.exports);var Nye=Ta.exports,Oye={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Tye={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},Lye={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},qo=ke,Iye=Ma,Rye=$2e,zye=ube,$ye=Vbe,Hye=yye,Pye=Fye,zn=Ni,Xy=Nye,Vye={default:Oye,zero:Tye,commonmark:Lye},jye=/^(vbscript|javascript|file|data):/,qye=/^data:image\/(gif|png|jpeg|webp);/;function Uye(e){var r=e.trim().toLowerCase();return jye.test(r)?!!qye.test(r):!0}var Qy=["http:","https:","mailto:"];function Wye(e){var r=zn.parse(e,!0);if(r.hostname&&(!r.protocol||Qy.indexOf(r.protocol)>=0))try{r.hostname=Xy.toASCII(r.hostname)}catch{}return zn.encode(zn.format(r))}function Kye(e){var r=zn.parse(e,!0);if(r.hostname&&(!r.protocol||Qy.indexOf(r.protocol)>=0))try{r.hostname=Xy.toUnicode(r.hostname)}catch{}return zn.decode(zn.format(r),zn.decode.defaultChars+"%")}function Pt(e,r){if(!(this instanceof Pt))return new Pt(e,r);r||qo.isString(e)||(r=e||{},e="default"),this.inline=new Hye,this.block=new $ye,this.core=new zye,this.renderer=new Rye,this.linkify=new Pye,this.validateLink=Uye,this.normalizeLink=Wye,this.normalizeLinkText=Kye,this.utils=qo,this.helpers=qo.assign({},Iye),this.options={},this.configure(e),r&&this.set(r)}Pt.prototype.set=function(e){return qo.assign(this.options,e),this},Pt.prototype.configure=function(e){var r=this,n;if(qo.isString(e)&&(n=e,e=Vye[n],!e))throw new Error('Wrong `markdown-it` preset "'+n+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&r.set(e.options),e.components&&Object.keys(e.components).forEach(function(i){e.components[i].rules&&r[i].ruler.enableOnly(e.components[i].rules),e.components[i].rules2&&r[i].ruler2.enableOnly(e.components[i].rules2)}),this},Pt.prototype.enable=function(e,r){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));var i=e.filter(function(o){return n.indexOf(o)<0});if(i.length&&!r)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this},Pt.prototype.disable=function(e,r){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));var i=e.filter(function(o){return n.indexOf(o)<0});if(i.length&&!r)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this},Pt.prototype.use=function(e){var r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},Pt.prototype.parse=function(e,r){if(typeof e!="string")throw new Error("Input data should be a String");var n=new this.core.State(e,this,r);return this.core.process(n),n.tokens},Pt.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},Pt.prototype.parseInline=function(e,r){var n=new this.core.State(e,this,r);return n.inlineMode=!0,this.core.process(n),n.tokens},Pt.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)};var Zye=Pt,Gye=Zye;const Jye=Dr(Gye),Nd=/^ *\[([\sx])] /i;function Xye(e,r={enabled:!1,label:!1,lineNumber:!1}){e.core.ruler.after("inline","task-lists",n=>function(i,o){const s=i.tokens;for(let u=2;u<s.length;u++){if((a=s)[l=u].type!=="inline"||a[l-1].type!=="paragraph_open"||a[l-2].type!=="list_item_open"||!Nd.test(a[l].content))continue;Yye(s[u],o),s[u-2].attrJoin("class","task-list-item "+(o.enabled?" enabled":""));const c=Qye(s,u-2);c&&c.attrJoin("class","contains-task-list")}var a,l;return!1}(n,r)),e.renderer.rules.taskListItemCheckbox=n=>{const i=n[0],o=i.attrGet("checked")?'checked="" ':"",s=i.attrGet("disabled")?'disabled="" ':"",a=i.attrGet("line"),l='id="'.concat(i.attrGet("id"),'" ');return'<input class="task-list-item-checkbox" type="checkbox" '.concat(o).concat(s).concat(a&&r.lineNumber?'data-line="'.concat(a,'" '):"").concat(l,"/>")},e.renderer.rules.taskListItemLabel_close=()=>"</label>",e.renderer.rules.taskListItemLabel_open=n=>'<label for="'.concat(n[0].attrGet("id"),'">')}function Qye(e,r){const n=e[r].level-1;for(let i=r-1;i>=0;i--)if(e[i].level===n)return e[i]}function Yye(e,r){if(e.children==null)return;const n=function(i){return i.map?"task-item-".concat(i.map[0]):"task-item-".concat(Math.ceil(1e7*Math.random()-1e3))}(e);e.children.splice(0,0,function(i,o,s){const a=new wc("taskListItemCheckbox","",0);o||a.attrSet("disabled","true"),i.map&&a.attrSet("line",i.map[0].toString()),a.attrSet("id",s);const l=Nd.exec(i.content);return(l==null?void 0:l[1].toLowerCase())==="x"&&a.attrSet("checked","true"),a}(e,r.enabled,n)),e.children[1].content=e.children[1].content.replace(Nd,""),r.label&&(e.children.splice(1,0,function(i){const o=new wc("taskListItemLabel_open","",1);return o.attrSet("id",i),o}(n)),e.children.push(new wc("taskListItemLabel_close","",-1)))}var Od={exports:{}},eCe=function(e,r){if(r=r.split(":")[0],e=+e,!e)return!1;switch(r){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0},Td={},tCe=Object.prototype.hasOwnProperty,rCe;function Um(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function Wm(e){try{return encodeURIComponent(e)}catch{return null}}function nCe(e){for(var r=/([^=?#&]+)=?([^&]*)/g,n={},i;i=r.exec(e);){var o=Um(i[1]),s=Um(i[2]);o===null||s===null||o in n||(n[o]=s)}return n}function iCe(e,r){r=r||"";var n=[],i,o;typeof r!="string"&&(r="?");for(o in e)if(tCe.call(e,o)){if(i=e[o],!i&&(i===null||i===rCe||isNaN(i))&&(i=""),o=Wm(o),i=Wm(i),o===null||i===null)continue;n.push(o+"="+i)}return n.length?r+n.join("&"):""}Td.stringify=iCe,Td.parse=nCe;var Yy=eCe,Eu=Td,oCe=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,eC=/[\n\r\t]/g,sCe=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,tC=/:\d+$/,aCe=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,lCe=/^[a-zA-Z]:/;function op(e){return(e||"").toString().replace(oCe,"")}var Ld=[["#","hash"],["?","query"],function(e,r){return wr(r.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],Km={hash:1,query:1};function rC(e){var r;typeof window<"u"?r=window:typeof un<"u"?r=un:typeof self<"u"?r=self:r={};var n=r.location||{};e=e||n;var i={},o=typeof e,s;if(e.protocol==="blob:")i=new gr(unescape(e.pathname),{});else if(o==="string"){i=new gr(e,{});for(s in Km)delete i[s]}else if(o==="object"){for(s in e)s in Km||(i[s]=e[s]);i.slashes===void 0&&(i.slashes=sCe.test(e.href))}return i}function wr(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function nC(e,r){e=op(e),e=e.replace(eC,""),r=r||{};var n=aCe.exec(e),i=n[1]?n[1].toLowerCase():"",o=!!n[2],s=!!n[3],a=0,l;return o?s?(l=n[2]+n[3]+n[4],a=n[2].length+n[3].length):(l=n[2]+n[4],a=n[2].length):s?(l=n[3]+n[4],a=n[3].length):l=n[4],i==="file:"?a>=2&&(l=l.slice(2)):wr(i)?l=n[4]:i?o&&(l=l.slice(2)):a>=2&&wr(r.protocol)&&(l=n[4]),{protocol:i,slashes:o||wr(i),slashesCount:a,rest:l}}function uCe(e,r){if(e==="")return r;for(var n=(r||"/").split("/").slice(0,-1).concat(e.split("/")),i=n.length,o=n[i-1],s=!1,a=0;i--;)n[i]==="."?n.splice(i,1):n[i]===".."?(n.splice(i,1),a++):a&&(i===0&&(s=!0),n.splice(i,1),a--);return s&&n.unshift(""),(o==="."||o==="..")&&n.push(""),n.join("/")}function gr(e,r,n){if(e=op(e),e=e.replace(eC,""),!(this instanceof gr))return new gr(e,r,n);var i,o,s,a,l,u,c=Ld.slice(),d=typeof r,h=this,p=0;for(d!=="object"&&d!=="string"&&(n=r,r=null),n&&typeof n!="function"&&(n=Eu.parse),r=rC(r),o=nC(e||"",r),i=!o.protocol&&!o.slashes,h.slashes=o.slashes||i&&r.slashes,h.protocol=o.protocol||r.protocol||"",e=o.rest,(o.protocol==="file:"&&(o.slashesCount!==2||lCe.test(e))||!o.slashes&&(o.protocol||o.slashesCount<2||!wr(h.protocol)))&&(c[3]=[/(.*)/,"pathname"]);p<c.length;p++){if(a=c[p],typeof a=="function"){e=a(e,h);continue}s=a[0],u=a[1],s!==s?h[u]=e:typeof s=="string"?(l=s==="@"?e.lastIndexOf(s):e.indexOf(s),~l&&(typeof a[2]=="number"?(h[u]=e.slice(0,l),e=e.slice(l+a[2])):(h[u]=e.slice(l),e=e.slice(0,l)))):(l=s.exec(e))&&(h[u]=l[1],e=e.slice(0,l.index)),h[u]=h[u]||i&&a[3]&&r[u]||"",a[4]&&(h[u]=h[u].toLowerCase())}n&&(h.query=n(h.query)),i&&r.slashes&&h.pathname.charAt(0)!=="/"&&(h.pathname!==""||r.pathname!=="")&&(h.pathname=uCe(h.pathname,r.pathname)),h.pathname.charAt(0)!=="/"&&wr(h.protocol)&&(h.pathname="/"+h.pathname),Yy(h.port,h.protocol)||(h.host=h.hostname,h.port=""),h.username=h.password="",h.auth&&(l=h.auth.indexOf(":"),~l?(h.username=h.auth.slice(0,l),h.username=encodeURIComponent(decodeURIComponent(h.username)),h.password=h.auth.slice(l+1),h.password=encodeURIComponent(decodeURIComponent(h.password))):h.username=encodeURIComponent(decodeURIComponent(h.auth)),h.auth=h.password?h.username+":"+h.password:h.username),h.origin=h.protocol!=="file:"&&wr(h.protocol)&&h.host?h.protocol+"//"+h.host:"null",h.href=h.toString()}function cCe(e,r,n){var i=this;switch(e){case"query":typeof r=="string"&&r.length&&(r=(n||Eu.parse)(r)),i[e]=r;break;case"port":i[e]=r,Yy(r,i.protocol)?r&&(i.host=i.hostname+":"+r):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=r,i.port&&(r+=":"+i.port),i.host=r;break;case"host":i[e]=r,tC.test(r)?(r=r.split(":"),i.port=r.pop(),i.hostname=r.join(":")):(i.hostname=r,i.port="");break;case"protocol":i.protocol=r.toLowerCase(),i.slashes=!n;break;case"pathname":case"hash":if(r){var o=e==="pathname"?"/":"#";i[e]=r.charAt(0)!==o?o+r:r}else i[e]=r;break;case"username":case"password":i[e]=encodeURIComponent(r);break;case"auth":var s=r.indexOf(":");~s?(i.username=r.slice(0,s),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=r.slice(s+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(r))}for(var a=0;a<Ld.length;a++){var l=Ld[a];l[4]&&(i[l[1]]=i[l[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin=i.protocol!=="file:"&&wr(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i}function dCe(e){(!e||typeof e!="function")&&(e=Eu.stringify);var r,n=this,i=n.host,o=n.protocol;o&&o.charAt(o.length-1)!==":"&&(o+=":");var s=o+(n.protocol&&n.slashes||wr(n.protocol)?"//":"");return n.username?(s+=n.username,n.password&&(s+=":"+n.password),s+="@"):n.password?(s+=":"+n.password,s+="@"):n.protocol!=="file:"&&wr(n.protocol)&&!i&&n.pathname!=="/"&&(s+="@"),(i[i.length-1]===":"||tC.test(n.hostname)&&!n.port)&&(i+=":"),s+=i+n.pathname,r=typeof n.query=="object"?e(n.query):n.query,r&&(s+=r.charAt(0)!=="?"?"?"+r:r),n.hash&&(s+=n.hash),s}gr.prototype={set:cCe,toString:dCe},gr.extractProtocol=nC,gr.location=rC,gr.trimLeft=op,gr.qs=Eu;var hCe=gr;(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});function n(u){return u&&typeof u=="object"&&"default"in u?u.default:u}var i=n(hCe),o=function(){function u(c,d){var h=[],p=!0,f=!1,m=void 0;try{for(var b=c[Symbol.iterator](),g;!(p=(g=b.next()).done)&&(h.push(g.value),!(d&&h.length===d));p=!0);}catch(y){f=!0,m=y}finally{try{!p&&b.return&&b.return()}finally{if(f)throw m}}return h}return function(c,d){if(Array.isArray(c))return c;if(Symbol.iterator in Object(c))return u(c,d);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function s(u,c){return'<span class="mention" data-type="'+u[c].mention.type+'" data-id="'+u[c].mention.id+'">'+u[c].mention.label+"</span>"}function a(u){var c=i(u);return{type:c.host,id:c.pathname.slice(1)}}function l(u){var c=/@$/;u.tokens.forEach(function(d){if(d.type==="inline"){var h=d.children;h.forEach(function(p,f){if(!(f+3>h.length)){var m=h.slice(f,f+4),b=o(m,4),g=b[0],y=b[1],v=b[2],k=b[3],C=k===void 0?{}:k;if(v.type==="link_close"&&(C=v,v=null),g.type==="text"&&c.test(g.content)&&y.type==="link_open"&&C.type==="link_close"){var A=y.attrs.reduce(function(_,S){return S[0]==="href"?S[1]:_},"");g.content=g.content.slice(0,-1),y.type="mention",y.mention=a(A),y.mention.label=v&&v.content||"",h.splice(f+2,v?2:1)}}}),d.children=h}})}e.exports=function(u,c){u.renderer.rules.mention=s,u.core.ruler.after("inline","mention",l)},r.renderMention=s,r.parseUri=a,r.parseMentions=l})(Od,Od.exports);var pCe=Od.exports;const fCe=Dr(pCe);function mCe(e){e.inline.ruler2.after("emphasis","underline",r=>{const n=r.tokens;for(let i=n.length-1;i>0;i--){const o=n[i];o.markup==="__"&&(o.type==="strong_open"&&(n[i].tag="u",n[i].type="u_open"),o.type==="strong_close"&&(n[i].tag="u",n[i].type="u_close"))}return!1})}function gCe(e){e.core.ruler.after("task-lists","split-mixed-task-lists",r=>{const n=r.tokens;for(let i=0;i<n.length;i++){const o=n[i];if(!Nc(o,"contains-task-list"))continue;const s=n[i+1],a=Nc(s,"task-list-item");a||(o.attrs.splice(o.attrIndex("class")),o.attrs.length===0&&(o.attrs=null));const l=yCe(n,i,u=>u.nesting===1&&Nc(u,"task-list-item")!==a);l>i&&bCe(n,l,r.Token)}return!1})}function Nc(e,r){var n;return((n=e.attrGet("class"))==null?void 0:n.split(" ").includes(r))||!1}function bCe(e,r,n){const i=new n("bullet_list_close","ul",-1);i.block=!0;const o=new n("bullet_list_open","ul",1);o.attrSet("class","contains-task-list"),o.block=!0,o.markup=e[r].markup,e.splice(r,0,i,o)}function yCe(e,r,n){const i=e[r].level+1;for(let o=r+1;o<e.length;o++){const s=e[o];if(s.level<i)return-1;if(s.level===i&&n(e[o]))return o}return-1}function CCe(e,r,n){function i(p){return p.trim().split(" ",2)[0]===r}function o(p,f,m,b,g){return p[f].nesting===1&&p[f].attrJoin("class",r),g.renderToken(p,f,m,b,g)}n=n||{};const s=3,a=n.marker||":",l=a.charCodeAt(0),u=a.length,c=n.validate||i,d=n.render||o;function h(p,f,m,b){let g,y=!1,v=p.bMarks[f]+p.tShift[f],k=p.eMarks[f];if(l!==p.src.charCodeAt(v))return!1;for(g=v+1;g<=k&&a[(g-v)%u]===p.src[g];g++);const C=Math.floor((g-v)/u);if(C<s)return!1;g-=(g-v)%u;const A=p.src.slice(v,g),_=p.src.slice(g,k);if(!c(_,A))return!1;if(b)return!0;let S=f;for(;S++,!(S>=m||(v=p.bMarks[S]+p.tShift[S],k=p.eMarks[S],v<k&&p.sCount[S]<p.blkIndent));)if(l===p.src.charCodeAt(v)&&!(p.sCount[S]-p.blkIndent>=4)){for(g=v+1;g<=k&&a[(g-v)%u]===p.src[g];g++);if(!(Math.floor((g-v)/u)<C)&&(g-=(g-v)%u,g=p.skipSpaces(g),!(g<k))){y=!0;break}}const L=p.parentType,D=p.lineMax;p.parentType="container",p.lineMax=S;const P=p.push("container_"+r+"_open","div",1);P.markup=A,P.block=!0,P.info=_,P.map=[f,S],p.md.block.tokenize(p,f+1,S);const U=p.push("container_"+r+"_close","div",-1);return U.markup=p.src.slice(v,g),U.block=!0,p.parentType=L,p.lineMax=D,p.line=S+(y?1:0),!0}e.block.ruler.before("fence","container_"+r,h,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules["container_"+r+"_open"]=d,e.renderer.rules["container_"+r+"_close"]=d}const Id=["info","warn","error","success"],vCe=e=>(r,n,i,o,s)=>{const a=r[n];return a.nesting===1&&(a.attrSet("data-callout",e),a.attrJoin("class","callout callout-".concat(e))),s.renderToken(r,n,i,o,s)},kCe=e=>(Id.forEach(r=>{e.use(CCe,r,{render:vCe(r)})}),e);function wCe(e,r){const[n,i,o]=e.slice(r-1,r+2);return(n==null?void 0:n.type)==="paragraph_open"&&i.type==="inline"&&i.children&&i.children.length===3&&i.children[0].type==="link_open"&&i.children[0].attrGet("title")==="preview"&&i.children[1].type==="text"&&i.children[2].type==="link_close"&&o.type==="paragraph_close"}function ACe(e,r){e.splice(r+1,1),e.splice(r-1,1)}const _Ce=e=>{function r({tokens:n}){for(let i=1,o=n.length;i<o-1;++i)wCe(n,i)&&ACe(n,i)}e.core.ruler.before("linkify","link_previews",r)};function ECe(e){e.inline.ruler.at("newline",(r,n)=>{const i=Zbe(r,n);return i&&r.tokens.length&&r.tokens[r.tokens.length-1].type==="hardbreak"&&r.tokens[r.tokens.length-1].attrSet("syntax","  "),i}),e.inline.ruler.at("escape",(r,n)=>{const i=Jbe(r,n);return i&&r.tokens.length&&r.tokens[r.tokens.length-1].type==="hardbreak"&&r.tokens[r.tokens.length-1].attrSet("syntax","\\"),i}),e.inline.ruler.after("html_inline","html_breaks",r=>{const n=r.src.slice(r.pos).match(/^\s*<br\s*\/?>/);return n?(r.push("hardbreak","br",0).attrPush(["syntax","html"]),r.pos+=n[0].length,!0):!1}),e.renderer.rules.hardbreak=(r,n,i)=>'<br data-syntax="'.concat(r[n].attrGet("syntax"),'" ').concat(i.xhtmlOut?"/":"",">")}function xCe(e){const r=/(\n(?<linestart>[#\-*+>])|(?<special>[`*\\~[\]]+))/;e.core.ruler.before("text_join","tag-markdown-syntax",n=>{var s;const i=new n.Token("keep_md_open","span",1);i.attrSet("class","keep-md");const o=new n.Token("keep_md_close","span",-1);for(let a=0;a<n.tokens.length;a++){const l=n.tokens[a];if(l.type==="inline")for(let u=0;u<l.children.length;u++){const c=l.children[u];if(c.type==="text"){const d=r.exec(c.content);if(d){const h=d.groups.linestart?d.index+1:d.index,p=(s=d.groups.linestart)!=null?s:d.groups.special,f=h+p.length;l.children.splice(u,1,Object.assign({},c,{content:c.content.slice(0,h)}),Object.assign({},i),Object.assign({},c,{content:c.content.slice(h,f)}),Object.assign({},o),Object.assign({},c,{content:c.content.slice(f)})),u+=3}}}}return!1})}var DCe=function(e,r){var n=3,i="-",o=i.charCodeAt(0),s=i.length;function a(l,u,c,d){var h,p,f,m,b,g,y,v=!1,k=l.bMarks[u]+l.tShift[u],C=l.eMarks[u];if(u!==0||o!==l.src.charCodeAt(0))return!1;for(h=k+1;h<=C;h++)if(i[(h-k)%s]!==l.src[h]){y=h+1;break}if(f=Math.floor((h-k)/s),f<n)return!1;if(h-=(h-k)%s,d)return!0;for(p=u;p++,!(p>=c||l.src.slice(k,C)==="..."||(k=l.bMarks[p]+l.tShift[p],C=l.eMarks[p],k<C&&l.sCount[p]<l.blkIndent));)if(o===l.src.charCodeAt(k)&&!(l.sCount[p]-l.blkIndent>=4)){for(h=k+1;h<=C&&i[(h-k)%s]===l.src[h];h++);if(!(Math.floor((h-k)/s)<f)&&(h-=(h-k)%s,h=l.skipSpaces(h),!(h<C))){v=!0;break}}return b=l.parentType,g=l.lineMax,l.parentType="container",l.lineMax=p,m=l.push("front_matter",null,0),m.hidden=!0,m.markup=l.src.slice(u,h),m.block=!0,m.map=[u,p+(v?1:0)],m.meta=l.src.slice(y,k-1),l.parentType=b,l.lineMax=g,l.line=p+(v?1:0),r(m.meta),!0}e.block.ruler.before("table","front_matter",a,{alt:["paragraph","reference","blockquote","list"]})};const SCe=Dr(DCe),Zm=new Set([!0,!1,"alt","title"]);function iC(e,r){return(Array.isArray(e)?e:[]).filter(([n])=>n!==r)}function oC(e,r){e&&e.attrs&&(e.attrs=iC(e.attrs,r))}function BCe(e,r){if(!Zm.has(e))throw new TypeError("figcaption must be one of: ".concat([...Zm],"."));if(e==="alt")return r.content;const n=r.attrs.find(([i])=>i==="title");return Array.isArray(n)&&n[1]?(oC(r,"title"),n[1]):void 0}function MCe(e,r){r=r||{},e.core.ruler.before("linkify","image_figures",function(n){let i=1;for(let o=1,s=n.tokens.length;o<s-1;++o){const a=n.tokens[o];if(a.type!=="inline"||!a.children||a.children.length!==1&&a.children.length!==3||a.children.length===1&&a.children[0].type!=="image")continue;if(a.children.length===3){const[c,d,h]=a.children;if(c.type!=="link_open"||d.type!=="image"||h.type!=="link_close")continue}if(o!==0&&n.tokens[o-1].type!=="paragraph_open"||o!==s-1&&n.tokens[o+1].type!=="paragraph_close")continue;const l=n.tokens[o-1];let u;if(l.type="figure_open",l.tag="figure",n.tokens[o+1].type="figure_close",n.tokens[o+1].tag="figure",r.dataType&&n.tokens[o-1].attrPush(["data-type","image"]),r.link&&a.children.length===1){[u]=a.children;const c=new n.Token("link_open","a",1);c.attrPush(["href",u.attrGet("src")]),a.children.unshift(c),a.children.push(new n.Token("link_close","a",-1))}if(u=a.children.length===1?a.children[0]:a.children[1],r.figcaption){const c=BCe(r.figcaption,u);if(c){const[d]=e.parseInline(c,n.env);a.children.push(new n.Token("figcaption_open","figcaption",1)),a.children.push(...d.children),a.children.push(new n.Token("figcaption_close","figcaption",-1)),u.attrs&&(u.attrs=iC(u.attrs,"title"))}}if(r.copyAttrs&&u.attrs){const c=r.copyAttrs===!0?"":r.copyAttrs;l.attrs=u.attrs.filter(([d])=>d.match(c)).map(d=>Array.from(d))}if(r.tabindex&&(n.tokens[o-1].attrPush(["tabindex",i]),i++),r.lazy&&(u.attrs.some(([c])=>c==="loading")||u.attrs.push(["loading","lazy"])),r.async&&(u.attrs.some(([c])=>c==="decoding")||u.attrs.push(["decoding","async"])),r.classes&&typeof r.classes=="string"){let c=!1;for(let d=0,h=u.attrs.length;d<h&&!c;d++){const p=u.attrs[d];p[0]==="class"&&(p[1]="".concat(p[1]," ").concat(r.classes),c=!0)}c||u.attrs.push(["class",r.classes])}if(r.removeSrc){const c=u.attrs.find(([d])=>d==="src");u.attrs.push(["data-src",c[1]]),oC(u,"src")}}})}const Ui=Jye("commonmark",{html:!1,breaks:!1}).enable("strikethrough").enable("table").use(Xye,{enable:!0,labelAfter:!0}).use(SCe,e=>{}).use(gCe).use(mCe).use(ECe).use(kCe).use(_Ce).use(xCe).use(fCe).use(MCe);Ui.renderer.rules.front_matter=(e,r,n)=>'<pre id="frontmatter"><code>'.concat(ke.escapeHtml(e[r].meta),"</code></pre>"),Ui.renderer.rules.bullet_list_open=(e,r,n)=>(e[r].attrs=[...e[r].attrs||[],["data-bullet",e[r].markup]],Ui.renderer.renderToken(e,r,n));function FCe(e){const r=new DOMParser().parseFromString(e,"text/html");return NCe(r,n=>{OCe(n)&&(n.textContent=n.textContent.replaceAll("\n"," "))}),r.body.innerHTML}function NCe(e,r){const n=e.createNodeIterator(e.body,NodeFilter.SHOW_TEXT);let i=n.nextNode();for(;i;)r(i),i=n.nextNode()}function OCe(e){var i;const r=["normal","nowrap"];let n=e.parentElement;for(;n;){const o=(i=getComputedStyle(n))==null?void 0:i.getPropertyValue("white-space");if(o)return r.includes(o);if(n.tagName==="PRE")return!1;n=n.parentElement}return!0}const TCe=Me.create({name:"markdown",extendMarkSchema(e){const r={name:e.name,options:e.options,storage:e.storage};return{toMarkdown:q(e,"toMarkdown",r)}},extendNodeSchema(e){const r={name:e.name,options:e.options,storage:e.storage};return{toMarkdown:q(e,"toMarkdown",r)}},addProseMirrorPlugins(){let e=!1;return[new fe({key:new ve("pasteEventHandler"),props:{handleDOMEvents:{mouseup(r,n){return e=n.shiftKey,!1}},handleKeyDown(r,n){return e=n.shiftKey,!1},clipboardTextParser(r,n,i,o){const s=Vn.fromSchema(o.state.schema),a=document.cloneNode(!1),l=a.createElement("div");if(e)for(const u of r.split("\n\n")){const c=a.createElement("p");c.innerText=u,l.append(c)}else l.innerHTML=Ui.render(r);return s.parseSlice(l,{preserveWhitespace:!0,context:n})},clipboardTextSerializer:r=>{const n=i=>i.content.childCount>1?LCe(this.editor.schema).serialize(i.content):i.isLeaf?i.textContent:n(i.content.firstChild);return n(r)},transformPastedHTML:FCe}})]}}),K4e=({nodes:e,marks:r})=>({serializer:new tp(aC(e),RCe(r)),serialize(n,i){return this.serializer.serialize(n,{...i,tightLists:!0})}}),LCe=({nodes:e,marks:r})=>({serializer:new tp(aC(e),ICe(r)),serialize(n,i){return this.serializer.serialize(n,{...i,tightLists:!0})}}),ICe=e=>{const r={open:"",close:"",mixable:!0,expelEnclosingWhitespace:!0},n=sp(Is.marks),i=Object.entries({...n,...e}).map(([o,s])=>[o,r]);return Object.fromEntries(i)},sC=e=>{const r=Object.entries(e).map(([n,i])=>[n,i.spec.toMarkdown]).filter(([,n])=>n);return Object.fromEntries(r)},aC=e=>{const r=sp(Is.nodes),n=sC(e);return{...r,...n}},RCe=e=>{const r=sp(Is.marks),n=sC(e);return{...r,...n}},sp=e=>{const r=n=>n.replace(/_(\w)/g,(i,o)=>o.toUpperCase());return Object.fromEntries(Object.entries(e).map(([n,i])=>[r(n),i]))},lC=Fe.create({name:"text",group:"inline"}),zCe=Fe.create({name:"doc",content:"block",addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.insertContent("	")}}}),Z4e=Me.create({name:"PlainText",addExtensions(){return[zCe,lC]}});function $Ce(e){const r=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+i+"|"+r.optional(o)+"[a-zA-Z_]\\w*"+r.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l={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})"/})]},u={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(l,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:r.optional(o)+e.IDENT_RE,relevance:0},h=r.optional(o)+e.IDENT_RE+"\\s*\\(",p=["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"],f=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],m=["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"],b=["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"],g={type:f,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:m},y={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:r.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,r.lookahead(/(<[^<>]+>|)\s*\(/))},v=[y,c,a,n,e.C_BLOCK_COMMENT_MODE,u,l],k={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:g,contains:v.concat([{begin:/\(/,end:/\)/,keywords:g,contains:v.concat(["self"]),relevance:0}]),relevance:0},C={className:"function",begin:"("+s+"[\\*&\\s]+)+"+h,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:g,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:g,relevance:0},{begin:h,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,l,u,a,{begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,l,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:g,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(k,C,y,v,[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:g,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:g},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function HCe(e){const r={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=$Ce(e),i=n.keywords;return i.type=[...i.type,...r.type],i.literal=[...i.literal,...r.literal],i.built_in=[...i.built_in,...r.built_in],i._hints=r._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function PCe(e){const r=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:r.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(a);const l={className:"",begin:/\\"/},u={className:"string",begin:/'/,end:/'/},c={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},d=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],h=e.SHEBANG({binary:"(".concat(d.join("|"),")"),relevance:10}),p={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},f=["if","then","else","elif","fi","for","while","until","in","do","done","case","esac","function","select"],m=["true","false"],b={match:/(\/[a-z._-]+)+/},g=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],y=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias"],v=["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"],k=["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"];return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:f,literal:m,built_in:[...g,...y,"set","shopt",...v,...k]},contains:[h,e.SHEBANG(),p,c,e.HASH_COMMENT_MODE,s,b,a,l,u,n]}}function VCe(e){const r=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="("+i+"|"+r.optional(o)+"[a-zA-Z_]\\w*"+r.optional("<[^<>]+>")+")",a={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},l={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})"/})]},u={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(l,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:r.optional(o)+e.IDENT_RE,relevance:0},h=r.optional(o)+e.IDENT_RE+"\\s*\\(",p={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"},f=[c,a,n,e.C_BLOCK_COMMENT_MODE,u,l],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:f.concat([{begin:/\(/,end:/\)/,keywords:p,contains:f.concat(["self"]),relevance:0}]),relevance:0},b={begin:"("+s+"[\\*&\\s]+)+"+h,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:p,relevance:0},{begin:h,returnBegin:!0,contains:[e.inherit(d,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,l,u,a,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,l,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:p,disableAutodetect:!0,illegal:"</",contains:[].concat(m,b,f,[c,{begin:e.IDENT_RE+"::",keywords:p},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:l,keywords:p}}}function jCe(e){const r=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",s="(?!struct)("+i+"|"+r.optional(o)+"[a-zA-Z_]\\w*"+r.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l={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})"/})]},u={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(l,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:r.optional(o)+e.IDENT_RE,relevance:0},h=r.optional(o)+e.IDENT_RE+"\\s*\\(",p=["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"],f=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],m=["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"],b=["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"],g={type:f,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:m},y={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:r.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,r.lookahead(/(<[^<>]+>|)\s*\(/))},v=[y,c,a,n,e.C_BLOCK_COMMENT_MODE,u,l],k={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:g,contains:v.concat([{begin:/\(/,end:/\)/,keywords:g,contains:v.concat(["self"]),relevance:0}]),relevance:0},C={className:"function",begin:"("+s+"[\\*&\\s]+)+"+h,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:g,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:g,relevance:0},{begin:h,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,l,u,a,{begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,l,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:g,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(k,C,y,v,[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:g,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:g},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function qCe(e){const r=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],i=["default","false","null","true"],o=["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"],s=["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"],a={keyword:o.concat(s),built_in:r,literal:i},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),u={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},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(c,{illegal:/\n/}),h={className:"subst",begin:/\{/,end:/\}/,keywords:a},p=e.inherit(h,{illegal:/\n/}),f={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]},b=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});h.contains=[m,f,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,e.C_BLOCK_COMMENT_MODE],p.contains=[b,f,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const g={variants:[m,f,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},v=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",k={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{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"}},g,u,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,y,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:"("+v+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,y],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[g,u,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},k]}}const UCe=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_-]*/}}),WCe=["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"],KCe=["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"],ZCe=["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"],GCe=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],JCe=["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 XCe(e){const r=e.regex,n=UCe(e),i={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",s=/@-?\w[\w]*(-\w+)*/,a="[a-zA-Z-][a-zA-Z0-9_-]*",l=[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,i,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+a,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+ZCe.join("|")+")"},{begin:":(:)?("+GCe.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+JCe.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:r.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:KCe.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+WCe.join("|")+")\\b"}]}}function QCe(e){const r=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:r.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:r.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function YCe(e){const r={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:r,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:r,illegal:/["']/}]}]}}function eve(e){const r=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;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:r.concat(n,r.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function tve(e){const r=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:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},a={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},l={begin:/\[/,end:/\]/,contains:[i,s,o,a,n,"self"],relevance:0},u=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,d=/'[^']*'/,h=r.either(u,c,d),p=r.concat(h,"(\\s*\\.\\s*",h,")*",r.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:p,className:"attr",starts:{end:/$/,contains:[i,l,s,o,a,n]}}]}}var Si="[0-9](_*[0-9])*",oa="\\.(".concat(Si,")"),sa="[0-9a-fA-F](_*[0-9a-fA-F])*",Gm={className:"number",variants:[{begin:"(\\b(".concat(Si,")((").concat(oa,")|\\.)?|(").concat(oa,"))[eE][+-]?(").concat(Si,")[fFdD]?\\b")},{begin:"\\b(".concat(Si,")((").concat(oa,")[fFdD]?\\b|\\.([fFdD]\\b)?)")},{begin:"(".concat(oa,")[fFdD]?\\b")},{begin:"\\b(".concat(Si,")[fFdD]\\b")},{begin:"\\b0[xX]((".concat(sa,")\\.?|(").concat(sa,")?\\.(").concat(sa,"))[pP][+-]?(").concat(Si,")[fFdD]?\\b")},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:"\\b0[xX](".concat(sa,")[lL]?\\b")},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function uC(e,r,n){return n===-1?"":e.replace(r,i=>uC(e,r,n-1))}function rve(e){const r=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",i=n+uC("(?:<"+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","yield","permits"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},s={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},a={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:[r.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[a,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:[s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Gm,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Gm,s]}}const Jm="[A-Za-z$_][0-9A-Za-z$_]*",nve=["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"],ive=["true","false","null","undefined","NaN","Infinity"],cC=["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"],dC=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],hC=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],ove=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],sve=[].concat(hC,cC,dC);function ave(e){const r=e.regex,n=(w,{after:E})=>{const R="</"+w[0].slice(1);return w.input.indexOf(R,E)!==-1},i=Jm,o={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(w,E)=>{const R=w[0].length+w.index,B=w.input[R];if(B==="<"||B===","){E.ignoreMatch();return}B===">"&&(n(w,{after:R})||E.ignoreMatch());let I;const V=w.input.substring(R);if(I=V.match(/^\s*=/)){E.ignoreMatch();return}if((I=V.match(/^\s+extends\s+/))&&I.index===0){E.ignoreMatch();return}}},l={$pattern:Jm,keyword:nve,literal:ive,built_in:sve,"variable.language":ove},u="[0-9](_?[0-9])*",c="\\.(".concat(u,")"),d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:"(\\b(".concat(d,")((").concat(c,")|\\.)?|(").concat(c,"))[eE][+-]?(").concat(u,")\\b")},{begin:"\\b(".concat(d,")\\b((").concat(c,")\\b|\\.)?|(").concat(c,")\\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},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},f={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},m={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},b={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},g={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},y={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:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,m,b,g,{match:/\$\d+/},h];p.contains=v.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(v)});const k=[].concat(y,p.contains),C=k.concat([{begin:/\(/,end:/\)/,keywords:l,contains:["self"].concat(k)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:C},_={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,r.concat(i,"(",r.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},S={relevance:0,match:r.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:{_:[...cC,...dC]}},L={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function U(w){return r.concat("(?!",w.join("|"),")")}const J={match:r.concat(/\b/,U([...hC,"super","import"]),i,r.lookahead(/\(/)),className:"title.function",relevance:0},Z={begin:r.concat(/\./,r.lookahead(r.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},F={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},T="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,r.lookahead(T)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:S},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),L,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,m,b,g,y,{match:/\$\d+/},h,S,{className:"attr",begin:i+r.lookahead(":"),relevance:0},Y,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:T,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:l,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:s},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},J,P,_,F,{match:/\$[(.]/}]}}function lve(e){const r={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],o={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",keywords:{literal:i},contains:[r,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Bi="[0-9](_*[0-9])*",aa="\\.(".concat(Bi,")"),la="[0-9a-fA-F](_*[0-9a-fA-F])*",uve={className:"number",variants:[{begin:"(\\b(".concat(Bi,")((").concat(aa,")|\\.)?|(").concat(aa,"))[eE][+-]?(").concat(Bi,")[fFdD]?\\b")},{begin:"\\b(".concat(Bi,")((").concat(aa,")[fFdD]?\\b|\\.([fFdD]\\b)?)")},{begin:"(".concat(aa,")[fFdD]?\\b")},{begin:"\\b(".concat(Bi,")[fFdD]\\b")},{begin:"\\b0[xX]((".concat(la,")\\.?|(").concat(la,")?\\.(").concat(la,"))[pP][+-]?(").concat(Bi,")[fFdD]?\\b")},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:"\\b0[xX](".concat(la,")[lL]?\\b")},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function cve(e){const r={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:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},o={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},a={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,o]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,o]}]};o.contains.push(a);const l={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},u={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(a,{className:"string"}),"self"]}]},c=uve,d=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),h={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},p=h;return p.variants[1].contains=[h],h.variants[1].contains=[p],{name:"Kotlin",aliases:["kt","kts"],keywords:r,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,d,n,i,l,u,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:r,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:r,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[h,e.C_LINE_COMMENT_MODE,d],relevance:0},e.C_LINE_COMMENT_MODE,d,l,u,a,e.C_NUMBER_MODE]},d]},{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},l,u]},a,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},c]}}const dve=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_-]*/}}),hve=["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"],pve=["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"],pC=["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"],fC=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],fve=["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(),mve=pC.concat(fC);function gve(e){const r=dve(e),n=mve,i="and or not only",o="[\\w-]+",s="("+o+"|@\\{"+o+"\\})",a=[],l=[],u=function(k){return{className:"string",begin:"~?"+k+".*?"+k}},c=function(k,C,A){return{className:k,begin:C,relevance:A}},d={$pattern:/[a-z-]+/,keyword:i,attribute:pve.join(" ")},h={begin:"\\(",end:"\\)",contains:l,keywords:d,relevance:0};l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,u("'"),u('"'),r.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},r.HEXCOLOR,h,c("variable","@@?"+o,10),c("variable","@\\{"+o+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:o+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},r.IMPORTANT,{beginKeywords:"and not"},r.FUNCTION_DISPATCH);const p=l.concat({begin:/\{/,end:/\}/,contains:a}),f={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(l)},m={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+fve.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:l}}]},b={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:d,returnEnd:!0,contains:l,relevance:0}},g={className:"variable",variants:[{begin:"@"+o+"\\s*:",relevance:15},{begin:"@"+o}],starts:{end:"[;}]",returnEnd:!0,contains:p}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,c("keyword","all\\b"),c("variable","@\\{"+o+"\\}"),{begin:"\\b("+hve.join("|")+")\\b",className:"selector-tag"},r.CSS_NUMBER_MODE,c("selector-tag",s,0),c("selector-id","#"+s),c("selector-class","\\."+s,0),c("selector-tag","&",0),r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+pC.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+fC.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:p},{begin:"!important"},r.FUNCTION_DISPATCH]},v={begin:o+":(:)?(".concat(n.join("|"),")"),returnBegin:!0,contains:[y]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,b,g,v,m,y,f,r.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:a}}function bve(e){const r="\\[=*\\[",n="\\]=*\\]",i={begin:r,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+r+")","$"),e.COMMENT("--"+r,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:r,end:n,contains:[i],relevance:5}])}}function yve(e){const r={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r]},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:[r]},o={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},a={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[r]};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,r,n,i,o,s,a]}}function Cve(e){const r=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},o={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}]},s={className:"bullet",begin:"^[ 	]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,u={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:r.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),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}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=e.inherit(c,{contains:[]}),p=e.inherit(d,{contains:[]});c.contains.push(p),d.contains.push(h);let f=[n,u];return[c,d,h,p].forEach(m=>{m.contains=m.contains.concat(f)}),f=f.concat(c,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:f},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:f}]}]},n,s,c,d,{className:"quote",begin:"^>\\s+",contains:f,end:"$"},o,i,u,a]}}function vve(e){const r={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+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,i={"variable.language":["this","super"],$pattern:n,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"]},o={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:i,illegal:"</",contains:[r,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:"("+o.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:o,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function kve(e){const r=e.regex,n=["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"],i=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},a={begin:/->\{/,end:/\}/},l={variants:[{begin:/\$\d/},{begin:r.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@][^\s\w{]/,relevance:0}]},u=[e.BACKSLASH_ESCAPE,s,l],c=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],d=(f,m,b="\\1")=>{const g=b==="\\1"?b:r.concat(b,m);return r.concat(r.concat("(?:",f,")"),m,/(?:\\.|[^\\\/])*?/,g,/(?:\\.|[^\\\/])*?/,b,i)},h=(f,m,b)=>r.concat(r.concat("(?:",f,")"),m,/(?:\\.|[^\\\/])*?/,b,i),p=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:u,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:d("s|tr|y",r.either(...c,{capture:!0}))},{begin:d("s|tr|y","\\(","\\)")},{begin:d("s|tr|y","\\[","\\]")},{begin:d("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:h("(?:m|qr)?",/\//,/\//)},{begin:h("m|qr",r.either(...c,{capture:!0}),/\1/)},{begin:h("m|qr",/\(/,/\)/)},{begin:h("m|qr",/\[/,/\]/)},{begin:h("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 s.contains=p,a.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:p}}function wve(e){const r=e.regex,n=/(?![A-Za-z0-9])(?![$])/,i=r.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=r.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s={scope:"variable",match:"\\$+"+i},a={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(J,Z)=>{Z.data._beginMatch=J[1]||J[2]},"on:end":(J,Z)=>{Z.data._beginMatch!==J[1]&&Z.ignoreMatch()}},h=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p="[ 	\n]",f={scope:"string",variants:[c,u,d,h]},m={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},b=["false","null","true"],g=["__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"],y=["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"],v={keyword:g,literal:(J=>{const Z=[];return J.forEach(F=>{Z.push(F),F.toLowerCase()===F?Z.push(F.toUpperCase()):Z.push(F.toLowerCase())}),Z})(b),built_in:y},k=J=>J.map(Z=>Z.replace(/\|\d+$/,"")),C={variants:[{match:[/new/,r.concat(p,"+"),r.concat("(?!",k(y).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},A=r.concat(i,"\\b(?!\\()"),_={variants:[{match:[r.concat(/::/,r.lookahead(/(?!class\b)/)),A],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,r.concat(/::/,r.lookahead(/(?!class\b)/)),A],scope:{1:"title.class",3:"variable.constant"}},{match:[o,r.concat("::",r.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},S={scope:"attr",match:r.concat(i,r.lookahead(":"),r.lookahead(/(?!::)/))},L={relevance:0,begin:/\(/,end:/\)/,keywords:v,contains:[S,s,_,e.C_BLOCK_COMMENT_MODE,f,m,C]},D={relevance:0,match:[/\b/,r.concat("(?!fn\\b|function\\b|",k(g).join("\\b|"),"|",k(y).join("\\b|"),"\\b)"),i,r.concat(p,"*"),r.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[L]};L.contains.push(D);const P=[S,_,e.C_BLOCK_COMMENT_MODE,f,m,C],U={begin:r.concat(/#\[\s*/,o),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...P]},...P,{scope:"meta",match:o}]};return{case_insensitive:!1,keywords:v,contains:[U,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}]}},a,{scope:"variable.language",match:/\$this\b/},s,D,_,{match:[/const/,/\s/,i],scope:{1:"keyword",3:"variable.constant"}},C,{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:v,contains:["self",s,_,e.C_BLOCK_COMMENT_MODE,f,m]}]},{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]},f,m]}}function Ave(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})]}]}}function _ve(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Eve(e){const r=e.regex,n=new RegExp("[\\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"]},s={className:"meta",begin:/^(>>>|\.\.\.) /},a={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},l={begin:/\{\{/,relevance:0},u={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,s,l,a]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s,l,a]},{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,l,a]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,l,a]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",d="(\\b(".concat(c,"))?\\.(").concat(c,")|\\b(").concat(c,")\\."),h="\\b|".concat(i.join("|")),p={className:"number",relevance:0,variants:[{begin:"(\\b(".concat(c,")|(").concat(d,"))[eE][+-]?(").concat(c,")[jJ]?(?=").concat(h,")")},{begin:"(".concat(d,")[jJ]?")},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=".concat(h,")")},{begin:"\\b0[bB](_?[01])+[lL]?(?=".concat(h,")")},{begin:"\\b0[oO](_?[0-7])+[lL]?(?=".concat(h,")")},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=".concat(h,")")},{begin:"\\b(".concat(c,")[jJ](?=").concat(h,")")}]},f={className:"comment",begin:r.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",s,p,u,e.HASH_COMMENT_MODE]}]};return a.contains=[u,p,s],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[s,p,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},u,f,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:[p,m,u]}]}}function xve(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Dve(e){const r=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,i=r.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=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=r.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:r.lookahead(r.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:[s,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:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Sve(e){const r=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i=r.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=r.concat(i,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield","include","extend","prepend","public","private","protected","raise","throw"],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},a={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[a]}),e.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:s},d={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:r.concat(/<<[-~]?'?/,r.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]})]}]},h="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",f={className:"number",relevance:0,variants:[{begin:"\\b(".concat(h,")(\\.(").concat(p,"))?([eE][+-]?(").concat(p,")|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"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},b=[d,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:s},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:i,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},f,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{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(l,u),relevance:0}].concat(l,u);c.contains=b,m.contains=b;const g=[{begin:/^\s*=>/,starts:{end:"$",contains:b}},{className:"meta.prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",keywords:s,contains:b}}];return u.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(g).concat(u).concat(b)}}function Bve(e){const r=e.regex,n={className:"title.function.invoke",relevance:0,begin:r.concat(/\b/,/(?!let\b)/,e.IDENT_RE,r.lookahead(/\s*\(/))},i="([ui](8|16|32|64|128|size)|f(32|64))?",o=["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"],s=["true","false","Some","None","Ok","Err"],a=["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!"],l=["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:l,keyword:o,literal:s,built_in:a},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:a,type:l}},{className:"punctuation",begin:"->"},n]}}const Mve=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_-]*/}}),Fve=["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"],Nve=["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"],Ove=["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"],Tve=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],Lve=["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 Ive(e){const r=Mve(e),n=Tve,i=Ove,o="@[a-z-]+",s="and or not only",a={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,r.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+Fve.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},a,{begin:/\(/,end:/\)/,contains:[r.CSS_NUMBER_MODE]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Lve.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:[r.BLOCK_COMMENT,a,r.HEXCOLOR,r.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,r.IMPORTANT,r.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:Nve.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,r.HEXCOLOR,r.CSS_NUMBER_MODE]},r.FUNCTION_DISPATCH]}}function Rve(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function zve(e){const r=e.regex,n=e.COMMENT("--","$"),i={className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},o={begin:/"/,end:/"/,contains:[{begin:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],l=["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"],u=["add","asc","collation","desc","final","first","last","view"],c=["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"],d=["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"],h=["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"],p=["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"],f=d,m=[...c,...u].filter(k=>!d.includes(k)),b={className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},g={className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={begin:r.concat(/\b/,r.either(...f),/\s*\(/),relevance:0,keywords:{built_in:f}};function v(k,{exceptions:C,when:A}={}){const _=A;return C=C||[],k.map(S=>S.match(/\|\d+$/)||C.includes(S)?S:_(S)?"".concat(S,"|0"):S)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:v(m,{when:k=>k.length<3}),literal:s,type:l,built_in:h},contains:[{begin:r.either(...p),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:m.concat(p),literal:s,type:l}},{className:"type",begin:r.either(...a)},y,b,i,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,g]}}function mC(e){return e?typeof e=="string"?e:e.source:null}function ua(e){return Ne("(?=",e,")")}function Ne(...e){return e.map(r=>mC(r)).join("")}function $ve(e){const r=e[e.length-1];return typeof r=="object"&&r.constructor===Object?(e.splice(e.length-1,1),r):{}}function kt(...e){return"("+($ve(e).capture?"":"?:")+e.map(r=>mC(r)).join("|")+")"}const ap=e=>Ne(/\b/,e,/\w$/.test(e)?/\b/:/\B/),Hve=["Protocol","Type"].map(ap),Xm=["init","self"].map(ap),Pve=["Any","Self"],Oc=["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"],Qm=["false","nil","true"],Vve=["assignment","associativity","higherThan","left","lowerThan","none","right"],jve=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],Ym=["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"],gC=kt(/[/=\-+!*%<>&|^~?]/,/[\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]/),bC=kt(gC,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Tc=Ne(gC,bC,"*"),yC=kt(/[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]/),Vl=kt(yC,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Tr=Ne(yC,Vl,"*"),Lc=Ne(/[A-Z]/,Vl,"*"),qve=["autoclosure",Ne(/convention\(/,kt("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ne(/objc\(/,Tr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],Uve=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Wve(e){const r={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),i=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,kt(...Hve,...Xm)],className:{2:"keyword"}},s={match:Ne(/\./,kt(...Oc)),relevance:0},a=Oc.filter(ae=>typeof ae=="string").concat(["_|0"]),l=Oc.filter(ae=>typeof ae!="string").concat(Pve).map(ap),u={variants:[{className:"keyword",match:kt(...l,...Xm)}]},c={$pattern:kt(/\b\w+/,/#\w+/),keyword:a.concat(jve),literal:Qm},d=[o,s,u],h={match:Ne(/\./,kt(...Ym)),relevance:0},p={className:"built_in",match:Ne(/\b/,kt(...Ym),/(?=\()/)},f=[h,p],m={match:/->/,relevance:0},b={className:"operator",relevance:0,variants:[{match:Tc},{match:"\\.(\\.|".concat(bC,")+")}]},g=[m,b],y="([0-9]_*)+",v="([0-9a-fA-F]_*)+",k={className:"number",relevance:0,variants:[{match:"\\b(".concat(y,")(\\.(").concat(y,"))?([eE][+-]?(").concat(y,"))?\\b")},{match:"\\b0x(".concat(v,")(\\.(").concat(v,"))?([pP][+-]?(").concat(y,"))?\\b")},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},C=(ae="")=>({className:"subst",variants:[{match:Ne(/\\/,ae,/[0\\tnr"']/)},{match:Ne(/\\/,ae,/u\{[0-9a-fA-F]{1,8}\}/)}]}),A=(ae="")=>({className:"subst",match:Ne(/\\/,ae,/[\t ]*(?:[\r\n]|\r\n)/)}),_=(ae="")=>({className:"subst",label:"interpol",begin:Ne(/\\/,ae,/\(/),end:/\)/}),S=(ae="")=>({begin:Ne(ae,/"""/),end:Ne(/"""/,ae),contains:[C(ae),A(ae),_(ae)]}),L=(ae="")=>({begin:Ne(ae,/"/),end:Ne(/"/,ae),contains:[C(ae),_(ae)]}),D={className:"string",variants:[S(),S("#"),S("##"),S("###"),L(),L("#"),L("##"),L("###")]},P={match:Ne(/`/,Tr,/`/)},U={className:"variable",match:/\$\d+/},J={className:"variable",match:"\\$".concat(Vl,"+")},Z=[P,U,J],F={match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Uve,contains:[...g,k,D]}]}},T={className:"keyword",match:Ne(/@/,kt(...qve))},Y={className:"meta",match:Ne(/@/,Tr)},w=[F,T,Y],E={match:ua(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ne(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Vl,"+")},{className:"type",match:Lc,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ne(/\s+&\s+/,ua(Lc)),relevance:0}]},R={begin:/</,end:/>/,keywords:c,contains:[...i,...d,...w,m,E]};E.contains.push(R);const B={match:Ne(Tr,/\s*:/),keywords:"_|0",relevance:0},I={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",B,...i,...d,...f,...g,k,D,...Z,...w,E]},V={begin:/</,end:/>/,contains:[...i,E]},te={begin:kt(ua(Ne(Tr,/\s*:/)),ua(Ne(Tr,/\s+/,Tr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Tr}]},se={begin:/\(/,end:/\)/,keywords:c,contains:[te,...i,...d,...g,k,D,...w,E,I],endsParent:!0,illegal:/["']/},G={match:[/func/,/\s+/,kt(P.match,Tr,Tc)],className:{1:"keyword",3:"title.function"},contains:[V,se,r],illegal:[/\[/,/%/]},re={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[V,se,r],illegal:/\[|%/},Ee={match:[/operator/,/\s+/,Tc],className:{1:"keyword",3:"title"}},De={begin:[/precedencegroup/,/\s+/,Lc],className:{1:"keyword",3:"title"},contains:[E],keywords:[...Vve,...Qm],end:/}/};for(const ae of D.variants){const Le=ae.contains.find(Ie=>Ie.label==="interpol");Le.keywords=c;const Ae=[...d,...f,...g,k,D,...Z];Le.contains=[...Ae,{begin:/\(/,end:/\)/,contains:["self",...Ae]}]}return{name:"Swift",keywords:c,contains:[...i,G,re,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:c,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...d]},Ee,De,{beginKeywords:"import",end:/$/,contains:[...i],relevance:0},...d,...f,...g,k,D,...Z,...w,E,I]}}const jl="[A-Za-z$_][0-9A-Za-z$_]*",CC=["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"],vC=["true","false","null","undefined","NaN","Infinity"],kC=["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"],wC=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],AC=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],_C=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],EC=[].concat(AC,kC,wC);function Kve(e){const r=e.regex,n=(w,{after:E})=>{const R="</"+w[0].slice(1);return w.input.indexOf(R,E)!==-1},i=jl,o={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(w,E)=>{const R=w[0].length+w.index,B=w.input[R];if(B==="<"||B===","){E.ignoreMatch();return}B===">"&&(n(w,{after:R})||E.ignoreMatch());let I;const V=w.input.substring(R);if(I=V.match(/^\s*=/)){E.ignoreMatch();return}if((I=V.match(/^\s+extends\s+/))&&I.index===0){E.ignoreMatch();return}}},l={$pattern:jl,keyword:CC,literal:vC,built_in:EC,"variable.language":_C},u="[0-9](_?[0-9])*",c="\\.(".concat(u,")"),d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:"(\\b(".concat(d,")((").concat(c,")|\\.)?|(").concat(c,"))[eE][+-]?(").concat(u,")\\b")},{begin:"\\b(".concat(d,")\\b((").concat(c,")\\b|\\.)?|(").concat(c,")\\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},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},f={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},m={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},b={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},g={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},y={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:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,m,b,g,{match:/\$\d+/},h];p.contains=v.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(v)});const k=[].concat(y,p.contains),C=k.concat([{begin:/\(/,end:/\)/,keywords:l,contains:["self"].concat(k)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:C},_={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,r.concat(i,"(",r.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},S={relevance:0,match:r.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:{_:[...kC,...wC]}},L={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function U(w){return r.concat("(?!",w.join("|"),")")}const J={match:r.concat(/\b/,U([...AC,"super","import"]),i,r.lookahead(/\(/)),className:"title.function",relevance:0},Z={begin:r.concat(/\./,r.lookahead(r.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},F={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},T="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,r.lookahead(T)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:S},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),L,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,m,b,g,y,{match:/\$\d+/},h,S,{className:"attr",begin:i+r.lookahead(":"),relevance:0},Y,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:T,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:l,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:s},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},J,P,_,F,{match:/\$[(.]/}]}}function Zve(e){const r=Kve(e),n=jl,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[r.exports.CLASS_REFERENCE]},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[r.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],u={$pattern:jl,keyword:CC.concat(l),literal:vC,built_in:EC.concat(i),"variable.language":_C},c={className:"meta",begin:"@"+n},d=(p,f,m)=>{const b=p.contains.findIndex(g=>g.label===f);if(b===-1)throw new Error("can not find mode to replace");p.contains.splice(b,1,m)};Object.assign(r.keywords,u),r.exports.PARAMS_CONTAINS.push(c),r.contains=r.contains.concat([c,o,s]),d(r,"shebang",e.SHEBANG()),d(r,"use_strict",a);const h=r.contains.find(p=>p.label==="func.def");return h.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function Gve(e){const r=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},i={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,u={className:"literal",variants:[{begin:r.concat(/# */,r.either(s,o),/ *#/)},{begin:r.concat(/# */,l,/ *#/)},{begin:r.concat(/# */,a,/ *#/)},{begin:r.concat(/# */,r.either(s,o),/ +/,r.either(a,l),/ *#/)}]},c={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])|[%&])?/}]},d={className:"label",begin:/^\w+:/},h=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),p=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:[n,i,u,c,d,h,p,{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:[p]}]}}function Jve(e){e.regex;const r=e.COMMENT(/\(;/,/;\)/);r.contains.push("self");const n=e.COMMENT(/;;/,/$/),i=["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"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={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/},u={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={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/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:i},contains:[n,r,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,o,e.QUOTE_STRING_MODE,u,c,l]}}function Xve(e){const r=e.regex,n=r.concat(/[\p{L}_]/u,r.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=e.inherit(s,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),u=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:i,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[o]},{begin:/'/,end:/'/,contains:[o]},{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:[s,u,l,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,a,u,l]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[u]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:r.concat(/</,r.lookahead(r.concat(n,r.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:r.concat(/<\//,r.lookahead(r.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Qve(e){const r="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ 	]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ 	]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ 	]|$)"}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},a=e.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={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"},u={end:",",endsWithParent:!0,excludeEnd:!0,keywords:r,relevance:0},c={begin:/\{/,end:/\}/,contains:[u],illegal:"\\n",relevance:0},d={begin:"\\[",end:"\\]",contains:[u],illegal:"\\n",relevance:0},h=[i,{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:r,keywords:{literal:r}},l,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},c,d,s],p=[...h];return p.pop(),p.push(a),u.contains=p,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:h}}function xC(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(r=>{const n=e[r],i=typeof n;(i==="object"||i==="function")&&!Object.isFrozen(n)&&xC(n)}),e}let e1=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function DC(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function an(e,...r){const n=Object.create(null);for(const i in e)n[i]=e[i];return r.forEach(function(i){for(const o in i)n[o]=i[o]}),n}const Yve="</span>",t1=e=>!!e.scope,eke=(e,{prefix:r})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return["".concat(r).concat(n.shift()),...n.map((i,o)=>"".concat(i).concat("_".repeat(o+1)))].join(" ")}return"".concat(r).concat(e)};let tke=class{constructor(e,r){this.buffer="",this.classPrefix=r.classPrefix,e.walk(this)}addText(e){this.buffer+=DC(e)}openNode(e){if(!t1(e))return;const r=eke(e.scope,{prefix:this.classPrefix});this.span(r)}closeNode(e){t1(e)&&(this.buffer+=Yve)}value(){return this.buffer}span(e){this.buffer+='<span class="'.concat(e,'">')}};const r1=(e={})=>{const r={children:[]};return Object.assign(r,e),r};let rke=class SC{constructor(){this.rootNode=r1(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(r){this.top.children.push(r)}openNode(r){const n=r1({scope:r});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(r){return this.constructor._walk(r,this.rootNode)}static _walk(r,n){return typeof n=="string"?r.addText(n):n.children&&(r.openNode(n),n.children.forEach(i=>this._walk(r,i)),r.closeNode(n)),r}static _collapse(r){typeof r!="string"&&r.children&&(r.children.every(n=>typeof n=="string")?r.children=[r.children.join("")]:r.children.forEach(n=>{SC._collapse(n)}))}},nke=class extends rke{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,r){const n=e.root;r&&(n.scope="language:".concat(r)),this.add(n)}toHTML(){return new tke(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function ys(e){return e?typeof e=="string"?e:e.source:null}function BC(e){return ui("(?=",e,")")}function ike(e){return ui("(?:",e,")*")}function oke(e){return ui("(?:",e,")?")}function ui(...e){return e.map(r=>ys(r)).join("")}function ske(e){const r=e[e.length-1];return typeof r=="object"&&r.constructor===Object?(e.splice(e.length-1,1),r):{}}function lp(...e){return"("+(ske(e).capture?"":"?:")+e.map(r=>ys(r)).join("|")+")"}function MC(e){return new RegExp(e.toString()+"|").exec("").length-1}function ake(e,r){const n=e&&e.exec(r);return n&&n.index===0}const lke=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function up(e,{joinWith:r}){let n=0;return e.map(i=>{n+=1;const o=n;let s=ys(i),a="";for(;s.length>0;){const l=lke.exec(s);if(!l){a+=s;break}a+=s.substring(0,l.index),s=s.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?a+="\\"+String(Number(l[1])+o):(a+=l[0],l[0]==="("&&n++)}return a}).map(i=>"(".concat(i,")")).join(r)}const uke=/\b\B/,FC="[a-zA-Z]\\w*",cp="[a-zA-Z_]\\w*",NC="\\b\\d+(\\.\\d+)?",TC="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",LC="\\b(0b[01]+)",cke="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",dke=(e={})=>{const r=/^#![ ]*\//;return e.binary&&(e.begin=ui(r,/.*\b/,e.binary,/\b.*/)),an({scope:"meta",begin:r,end:/$/,relevance:0,"on:begin":(n,i)=>{n.index!==0&&i.ignoreMatch()}},e)},Cs={begin:"\\\\[\\s\\S]",relevance:0},hke={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Cs]},pke={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Cs]},fke={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/},xu=function(e,r,n={}){const i=an({scope:"comment",begin:e,end:r,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=lp("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:ui(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},mke=xu("//","$"),gke=xu("/\\*","\\*/"),bke=xu("#","$"),yke={scope:"number",begin:NC,relevance:0},Cke={scope:"number",begin:TC,relevance:0},vke={scope:"number",begin:LC,relevance:0},kke={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Cs,{begin:/\[/,end:/\]/,relevance:0,contains:[Cs]}]}]},wke={scope:"title",begin:FC,relevance:0},Ake={scope:"title",begin:cp,relevance:0},_ke={begin:"\\.\\s*"+cp,relevance:0},Eke=function(e){return Object.assign(e,{"on:begin":(r,n)=>{n.data._beginMatch=r[1]},"on:end":(r,n)=>{n.data._beginMatch!==r[1]&&n.ignoreMatch()}})};var ca=Object.freeze({__proto__:null,MATCH_NOTHING_RE:uke,IDENT_RE:FC,UNDERSCORE_IDENT_RE:cp,NUMBER_RE:NC,C_NUMBER_RE:TC,BINARY_NUMBER_RE:LC,RE_STARTERS_RE:cke,SHEBANG:dke,BACKSLASH_ESCAPE:Cs,APOS_STRING_MODE:hke,QUOTE_STRING_MODE:pke,PHRASAL_WORDS_MODE:fke,COMMENT:xu,C_LINE_COMMENT_MODE:mke,C_BLOCK_COMMENT_MODE:gke,HASH_COMMENT_MODE:bke,NUMBER_MODE:yke,C_NUMBER_MODE:Cke,BINARY_NUMBER_MODE:vke,REGEXP_MODE:kke,TITLE_MODE:wke,UNDERSCORE_TITLE_MODE:Ake,METHOD_GUARD:_ke,END_SAME_AS_BEGIN:Eke});function xke(e,r){e.input[e.index-1]==="."&&r.ignoreMatch()}function Dke(e,r){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Ske(e,r){r&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=xke,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Bke(e,r){Array.isArray(e.illegal)&&(e.illegal=lp(...e.illegal))}function Mke(e,r){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 Fke(e,r){e.relevance===void 0&&(e.relevance=1)}const Nke=(e,r)=>{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(i=>{delete e[i]}),e.keywords=n.keywords,e.begin=ui(n.beforeMatch,BC(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Oke=["of","and","for","in","not","or","if","then","parent","list","value"],Tke="keyword";function IC(e,r,n=Tke){const i=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(s){Object.assign(i,IC(e[s],r,s))}),i;function o(s,a){r&&(a=a.map(l=>l.toLowerCase())),a.forEach(function(l){const u=l.split("|");i[u[0]]=[s,Lke(u[0],u[1])]})}}function Lke(e,r){return r?Number(r):Ike(e)?0:1}function Ike(e){return Oke.includes(e.toLowerCase())}const n1={},Kn=e=>{console.error(e)},i1=(e,...r)=>{console.log("WARN: ".concat(e),...r)},Ci=(e,r)=>{n1["".concat(e,"/").concat(r)]||(console.log("Deprecated as of ".concat(e,". ").concat(r)),n1["".concat(e,"/").concat(r)]=!0)},ql=new Error;function RC(e,r,{key:n}){let i=0;const o=e[n],s={},a={};for(let l=1;l<=r.length;l++)a[l+i]=o[l],s[l+i]=!0,i+=MC(r[l-1]);e[n]=a,e[n]._emit=s,e[n]._multi=!0}function Rke(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Kn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ql;if(typeof e.beginScope!="object"||e.beginScope===null)throw Kn("beginScope must be object"),ql;RC(e,e.begin,{key:"beginScope"}),e.begin=up(e.begin,{joinWith:""})}}function zke(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Kn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ql;if(typeof e.endScope!="object"||e.endScope===null)throw Kn("endScope must be object"),ql;RC(e,e.end,{key:"endScope"}),e.end=up(e.end,{joinWith:""})}}function $ke(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Hke(e){$ke(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Rke(e),zke(e)}function Pke(e){function r(a,l){return new RegExp(ys(a),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,u){u.position=this.position++,this.matchIndexes[this.matchAt]=u,this.regexes.push([u,l]),this.matchAt+=MC(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(u=>u[1]);this.matcherRe=r(up(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const u=this.matcherRe.exec(l);if(!u)return null;const c=u.findIndex((h,p)=>p>0&&h!==void 0),d=this.matchIndexes[c];return u.splice(0,c),Object.assign(u,d)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const u=new n;return this.rules.slice(l).forEach(([c,d])=>u.addRule(c,d)),u.compile(),this.multiRegexes[l]=u,u}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,u){this.rules.push([l,u]),u.type==="begin"&&this.count++}exec(l){const u=this.getMatcher(this.regexIndex);u.lastIndex=this.lastIndex;let c=u.exec(l);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,c=d.exec(l)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function o(a){const l=new i;return a.contains.forEach(u=>l.addRule(u.begin,{rule:u,type:"begin"})),a.terminatorEnd&&l.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&l.addRule(a.illegal,{type:"illegal"}),l}function s(a,l){const u=a;if(a.isCompiled)return u;[Dke,Mke,Hke,Nke].forEach(d=>d(a,l)),e.compilerExtensions.forEach(d=>d(a,l)),a.__beforeBegin=null,[Ske,Bke,Fke].forEach(d=>d(a,l)),a.isCompiled=!0;let c=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),c=a.keywords.$pattern,delete a.keywords.$pattern),c=c||/\w+/,a.keywords&&(a.keywords=IC(a.keywords,e.case_insensitive)),u.keywordPatternRe=r(c,!0),l&&(a.begin||(a.begin=/\B|\b/),u.beginRe=r(u.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(u.endRe=r(u.end)),u.terminatorEnd=ys(u.end)||"",a.endsWithParent&&l.terminatorEnd&&(u.terminatorEnd+=(a.end?"|":"")+l.terminatorEnd)),a.illegal&&(u.illegalRe=r(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(d){return Vke(d==="self"?a:d)})),a.contains.forEach(function(d){s(d,u)}),a.starts&&s(a.starts,l),u.matcher=o(u),u}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=an(e.classNameAliases||{}),s(e)}function zC(e){return e?e.endsWithParent||zC(e.starts):!1}function Vke(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(r){return an(e,{variants:null},r)})),e.cachedVariants?e.cachedVariants:zC(e)?an(e,{starts:e.starts?an(e.starts):null}):Object.isFrozen(e)?an(e):e}var jke="11.8.0";let qke=class extends Error{constructor(e,r){super(e),this.name="HTMLInjectionError",this.html=r}};const Ic=DC,o1=an,s1=Symbol("nomatch"),Uke=7,$C=function(e){const r=Object.create(null),n=Object.create(null),i=[];let o=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:nke};function u(w){return l.noHighlightRe.test(w)}function c(w){let E=w.className+" ";E+=w.parentNode?w.parentNode.className:"";const R=l.languageDetectRe.exec(E);if(R){const B=D(R[1]);return B||(i1(s.replace("{}",R[1])),i1("Falling back to no-highlight mode for this block.",w)),B?R[1]:"no-highlight"}return E.split(/\s+/).find(B=>u(B)||D(B))}function d(w,E,R){let B="",I="";typeof E=="object"?(B=w,R=E.ignoreIllegals,I=E.language):(Ci("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ci("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),I=w,B=E),R===void 0&&(R=!0);const V={code:B,language:I};T("before:highlight",V);const te=V.result?V.result:h(V.language,V.code,R);return te.code=V.code,T("after:highlight",te),te}function h(w,E,R,B){const I=Object.create(null);function V(x,N){return x.keywords[N]}function te(){if(!z.keywords){le.addText(X);return}let x=0;z.keywordPatternRe.lastIndex=0;let N=z.keywordPatternRe.exec(X),H="";for(;N;){H+=X.substring(x,N.index);const K=we.case_insensitive?N[0].toLowerCase():N[0],ge=V(z,K);if(ge){const[je,bo]=ge;if(le.addText(H),H="",I[K]=(I[K]||0)+1,I[K]<=Uke&&(rt+=bo),je.startsWith("_"))H+=N[0];else{const M=we.classNameAliases[je]||je;re(N[0],M)}}else H+=N[0];x=z.keywordPatternRe.lastIndex,N=z.keywordPatternRe.exec(X)}H+=X.substring(x),le.addText(H)}function se(){if(X==="")return;let x=null;if(typeof z.subLanguage=="string"){if(!r[z.subLanguage]){le.addText(X);return}x=h(z.subLanguage,X,!0,pt[z.subLanguage]),pt[z.subLanguage]=x._top}else x=f(X,z.subLanguage.length?z.subLanguage:null);z.relevance>0&&(rt+=x.relevance),le.__addSublanguage(x._emitter,x.language)}function G(){z.subLanguage!=null?se():te(),X=""}function re(x,N){x!==""&&(le.startScope(N),le.addText(x),le.endScope())}function Ee(x,N){let H=1;const K=N.length-1;for(;H<=K;){if(!x._emit[H]){H++;continue}const ge=we.classNameAliases[x[H]]||x[H],je=N[H];ge?re(je,ge):(X=je,te(),X=""),H++}}function De(x,N){return x.scope&&typeof x.scope=="string"&&le.openNode(we.classNameAliases[x.scope]||x.scope),x.beginScope&&(x.beginScope._wrap?(re(X,we.classNameAliases[x.beginScope._wrap]||x.beginScope._wrap),X=""):x.beginScope._multi&&(Ee(x.beginScope,N),X="")),z=Object.create(x,{parent:{value:z}}),z}function ae(x,N,H){let K=ake(x.endRe,H);if(K){if(x["on:end"]){const ge=new e1(x);x["on:end"](N,ge),ge.isMatchIgnored&&(K=!1)}if(K){for(;x.endsParent&&x.parent;)x=x.parent;return x}}if(x.endsWithParent)return ae(x.parent,N,H)}function Le(x){return z.matcher.regexIndex===0?(X+=x[0],1):(zt=!0,0)}function Ae(x){const N=x[0],H=x.rule,K=new e1(H),ge=[H.__beforeBegin,H["on:begin"]];for(const je of ge)if(je&&(je(x,K),K.isMatchIgnored))return Le(N);return H.skip?X+=N:(H.excludeBegin&&(X+=N),G(),!H.returnBegin&&!H.excludeBegin&&(X=N)),De(H,x),H.returnBegin?0:N.length}function Ie(x){const N=x[0],H=E.substring(x.index),K=ae(z,x,H);if(!K)return s1;const ge=z;z.endScope&&z.endScope._wrap?(G(),re(N,z.endScope._wrap)):z.endScope&&z.endScope._multi?(G(),Ee(z.endScope,x)):ge.skip?X+=N:(ge.returnEnd||ge.excludeEnd||(X+=N),G(),ge.excludeEnd&&(X=N));do z.scope&&le.closeNode(),!z.skip&&!z.subLanguage&&(rt+=z.relevance),z=z.parent;while(z!==K.parent);return K.starts&&De(K.starts,x),ge.returnEnd?0:N.length}function Pe(){const x=[];for(let N=z;N!==we;N=N.parent)N.scope&&x.unshift(N.scope);x.forEach(N=>le.openNode(N))}let Re={};function Ge(x,N){const H=N&&N[0];if(X+=x,H==null)return G(),0;if(Re.type==="begin"&&N.type==="end"&&Re.index===N.index&&H===""){if(X+=E.slice(N.index,N.index+1),!o){const K=new Error("0 width match regex (".concat(w,")"));throw K.languageName=w,K.badRule=Re.rule,K}return 1}if(Re=N,N.type==="begin")return Ae(N);if(N.type==="illegal"&&!R){const K=new Error('Illegal lexeme "'+H+'" for mode "'+(z.scope||"<unnamed>")+'"');throw K.mode=z,K}else if(N.type==="end"){const K=Ie(N);if(K!==s1)return K}if(N.type==="illegal"&&H==="")return 1;if(Rt>1e5&&Rt>N.index*3)throw new Error("potential infinite loop, way more iterations than matches");return X+=H,H.length}const we=D(w);if(!we)throw Kn(s.replace("{}",w)),new Error('Unknown language: "'+w+'"');const Mr=Pke(we);let It="",z=B||Mr;const pt={},le=new l.__emitter(l);Pe();let X="",rt=0,Ve=0,Rt=0,zt=!1;try{if(we.__emitTokens)we.__emitTokens(E,le);else{for(z.matcher.considerAll();;){Rt++,zt?zt=!1:z.matcher.considerAll(),z.matcher.lastIndex=Ve;const x=z.matcher.exec(E);if(!x)break;const N=E.substring(Ve,x.index),H=Ge(N,x);Ve=x.index+H}Ge(E.substring(Ve))}return le.finalize(),It=le.toHTML(),{language:w,value:It,relevance:rt,illegal:!1,_emitter:le,_top:z}}catch(x){if(x.message&&x.message.includes("Illegal"))return{language:w,value:Ic(E),illegal:!0,relevance:0,_illegalBy:{message:x.message,index:Ve,context:E.slice(Ve-100,Ve+100),mode:x.mode,resultSoFar:It},_emitter:le};if(o)return{language:w,value:Ic(E),illegal:!1,relevance:0,errorRaised:x,_emitter:le,_top:z};throw x}}function p(w){const E={value:Ic(w),illegal:!1,relevance:0,_top:a,_emitter:new l.__emitter(l)};return E._emitter.addText(w),E}function f(w,E){E=E||l.languages||Object.keys(r);const R=p(w),B=E.filter(D).filter(U).map(G=>h(G,w,!1));B.unshift(R);const I=B.sort((G,re)=>{if(G.relevance!==re.relevance)return re.relevance-G.relevance;if(G.language&&re.language){if(D(G.language).supersetOf===re.language)return 1;if(D(re.language).supersetOf===G.language)return-1}return 0}),[V,te]=I,se=V;return se.secondBest=te,se}function m(w,E,R){const B=E&&n[E]||R;w.classList.add("hljs"),w.classList.add("language-".concat(B))}function b(w){let E=null;const R=c(w);if(u(R))return;if(T("before:highlightElement",{el:w,language:R}),w.children.length>0&&(l.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(w)),l.throwUnescapedHTML))throw new qke("One of your code blocks includes unescaped HTML.",w.innerHTML);E=w;const B=E.textContent,I=R?d(B,{language:R,ignoreIllegals:!0}):f(B);w.innerHTML=I.value,m(w,R,I.language),w.result={language:I.language,re:I.relevance,relevance:I.relevance},I.secondBest&&(w.secondBest={language:I.secondBest.language,relevance:I.secondBest.relevance}),T("after:highlightElement",{el:w,result:I,text:B})}function g(w){l=o1(l,w)}const y=()=>{C(),Ci("10.6.0","initHighlighting() deprecated.  Use highlightAll() now.")};function v(){C(),Ci("10.6.0","initHighlightingOnLoad() deprecated.  Use highlightAll() now.")}let k=!1;function C(){if(document.readyState==="loading"){k=!0;return}document.querySelectorAll(l.cssSelector).forEach(b)}function A(){k&&C()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function _(w,E){let R=null;try{R=E(e)}catch(B){if(Kn("Language definition for '{}' could not be registered.".replace("{}",w)),o)Kn(B);else throw B;R=a}R.name||(R.name=w),r[w]=R,R.rawDefinition=E.bind(null,e),R.aliases&&P(R.aliases,{languageName:w})}function S(w){delete r[w];for(const E of Object.keys(n))n[E]===w&&delete n[E]}function L(){return Object.keys(r)}function D(w){return w=(w||"").toLowerCase(),r[w]||r[n[w]]}function P(w,{languageName:E}){typeof w=="string"&&(w=[w]),w.forEach(R=>{n[R.toLowerCase()]=E})}function U(w){const E=D(w);return E&&!E.disableAutodetect}function J(w){w["before:highlightBlock"]&&!w["before:highlightElement"]&&(w["before:highlightElement"]=E=>{w["before:highlightBlock"](Object.assign({block:E.el},E))}),w["after:highlightBlock"]&&!w["after:highlightElement"]&&(w["after:highlightElement"]=E=>{w["after:highlightBlock"](Object.assign({block:E.el},E))})}function Z(w){J(w),i.push(w)}function F(w){const E=i.indexOf(w);E!==-1&&i.splice(E,1)}function T(w,E){const R=w;i.forEach(function(B){B[R]&&B[R](E)})}function Y(w){return Ci("10.7.0","highlightBlock will be removed entirely in v12.0"),Ci("10.7.0","Please use highlightElement now."),b(w)}Object.assign(e,{highlight:d,highlightAuto:f,highlightAll:C,highlightElement:b,highlightBlock:Y,configure:g,initHighlighting:y,initHighlightingOnLoad:v,registerLanguage:_,unregisterLanguage:S,listLanguages:L,getLanguage:D,registerAliases:P,autoDetection:U,inherit:o1,addPlugin:Z,removePlugin:F}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=jke,e.regex={concat:ui,lookahead:BC,either:lp,optional:oke,anyNumberOfTimes:ike};for(const w in ca)typeof ca[w]=="object"&&xC(ca[w]);return Object.assign(e,ca),e},Oi=$C({});Oi.newInstance=()=>$C({});var Wke=Oi;Oi.HighlightJS=Oi,Oi.default=Oi;const rr=Dr(Wke);var HC={exports:{}};(function(e){(function(){var r;r=e.exports=o,r.format=o,r.vsprintf=i,typeof console<"u"&&typeof console.log=="function"&&(r.printf=n);function n(){console.log(o.apply(null,arguments))}function i(s,a){return o.apply(null,[s].concat(a))}function o(s){for(var a=1,l=[].slice.call(arguments),u=0,c=s.length,d="",h,p=!1,f,m,b=!1,g,y=function(){return l[a++]},v=function(){for(var k="";/\d/.test(s[u]);)k+=s[u++],h=s[u];return k.length>0?parseInt(k):null};u<c;++u)if(h=s[u],p)switch(p=!1,h=="."?(b=!1,h=s[++u]):h=="0"&&s[u+1]=="."?(b=!0,u+=2,h=s[u]):b=!0,g=v(),h){case"b":d+=parseInt(y(),10).toString(2);break;case"c":f=y(),typeof f=="string"||f instanceof String?d+=f:d+=String.fromCharCode(parseInt(f,10));break;case"d":d+=parseInt(y(),10);break;case"f":m=String(parseFloat(y()).toFixed(g||6)),d+=b?m:m.replace(/^0/,"");break;case"j":d+=JSON.stringify(y());break;case"o":d+="0"+parseInt(y(),10).toString(8);break;case"s":d+=y();break;case"x":d+="0x"+parseInt(y(),10).toString(16);break;case"X":d+="0x"+parseInt(y(),10).toString(16).toUpperCase();break;default:d+=h;break}else h==="%"?p=!0:d+=h;return d}})()})(HC);var Kke=HC.exports;const Zke=Dr(Kke),La=Object.assign(Dn(Error),{eval:Dn(EvalError),range:Dn(RangeError),reference:Dn(ReferenceError),syntax:Dn(SyntaxError),type:Dn(TypeError),uri:Dn(URIError)});function Dn(e){return r.displayName=e.displayName||e.name,r;function r(n,...i){const o=n&&Zke(n,...i);return new e(o)}}const Gke={}.hasOwnProperty,Jke="hljs-";function PC(e,r,n={}){let i=n.prefix;if(typeof e!="string")throw La("Expected `string` for name, got `%s`",e);if(!rr.getLanguage(e))throw La("Unknown language: `%s` is not registered",e);if(typeof r!="string")throw La("Expected `string` for value, got `%s`",r);i==null&&(i=Jke),rr.configure({__emitter:rwe,classPrefix:i});const o=rr.highlight(r,{language:e,ignoreIllegals:!0});if(rr.configure({}),o.errorRaised)throw o.errorRaised;return o._emitter.root.data.language=o.language,o._emitter.root.data.relevance=o.relevance,o._emitter.root}function Xke(e,r={}){const n=r.subset||rr.listLanguages();r.prefix;let i=-1,o={type:"root",data:{language:null,relevance:0},children:[]};if(typeof e!="string")throw La("Expected `string` for value, got `%s`",e);for(;++i<n.length;){const s=n[i];if(!rr.getLanguage(s))continue;const a=PC(s,e,r);a.data.relevance>o.data.relevance&&(o=a)}return o}function Qke(e,r){rr.registerLanguage(e,r)}const Yke=function(e,r){if(typeof e=="string")rr.registerAliases(r,{languageName:e});else{let n;for(n in e)Gke.call(e,n)&&rr.registerAliases(e[n],{languageName:n})}};function ewe(e){return!!rr.getLanguage(e)}function twe(){return rr.listLanguages()}class rwe{constructor(r){this.options=r,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(r){if(r==="")return;const n=this.stack[this.stack.length-1],i=n.children[n.children.length-1];i&&i.type==="text"?i.value+=r:n.children.push({type:"text",value:r})}startScope(r){this.openNode(String(r))}endScope(){this.closeNode()}__addSublanguage(r,n){const i=this.stack[this.stack.length-1],o=r.root.children;n?i.children.push({type:"element",tagName:"span",properties:{className:[n]},children:o}):i.children.push(...o)}openNode(r){const n=r.split(".").map((s,a)=>a?s+"_".repeat(a):this.options.classPrefix+s),i=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:n},children:[]};i.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const ce={highlight:PC,highlightAuto:Xke,registerLanguage:Qke,registered:ewe,listLanguages:twe,registerAlias:Yke};ce.registerLanguage("arduino",HCe),ce.registerLanguage("bash",PCe),ce.registerLanguage("c",VCe),ce.registerLanguage("cpp",jCe),ce.registerLanguage("csharp",qCe),ce.registerLanguage("css",XCe),ce.registerLanguage("diff",QCe),ce.registerLanguage("go",YCe),ce.registerLanguage("graphql",eve),ce.registerLanguage("ini",tve),ce.registerLanguage("java",rve),ce.registerLanguage("javascript",ave),ce.registerLanguage("json",lve),ce.registerLanguage("kotlin",cve),ce.registerLanguage("less",gve),ce.registerLanguage("lua",bve),ce.registerLanguage("makefile",yve),ce.registerLanguage("markdown",Cve),ce.registerLanguage("objectivec",vve),ce.registerLanguage("perl",kve),ce.registerLanguage("php",wve),ce.registerLanguage("php-template",Ave),ce.registerLanguage("plaintext",_ve),ce.registerLanguage("python",Eve),ce.registerLanguage("python-repl",xve),ce.registerLanguage("r",Dve),ce.registerLanguage("ruby",Sve),ce.registerLanguage("rust",Bve),ce.registerLanguage("scss",Ive),ce.registerLanguage("shell",Rve),ce.registerLanguage("sql",zve),ce.registerLanguage("swift",Wve),ce.registerLanguage("typescript",Zve),ce.registerLanguage("vbnet",Gve),ce.registerLanguage("wasm",Jve),ce.registerLanguage("xml",Xve),ce.registerLanguage("yaml",Qve);const nwe=/^\s*>\s$/,iwe=Fe.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",be(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[mn({find:nwe,type:this.type})]}}),owe="listItem",a1="textStyle",l1=/^\s*([-+*])\s$/,swe=Fe.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return"".concat(this.options.itemTypeName,"+")},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",be(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:r})=>this.options.keepAttributes?r().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(owe,this.editor.getAttributes(a1)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=mn({find:l1,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=mn({find:l1,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(a1),editor:this.editor})),[e]}});function awe(e,r,n){const i=({state:o,range:s,match:a})=>{mn({find:e,type:r,getAttributes:n}).handler({state:o,range:s,match:a}),a.length>=3&&o.tr.insertText(a[2])};return new Ss({find:e,handler:i})}const lwe=swe.extend({parseHTML(){return this.parent().map(e=>Object.assign(e,{preserveWhitespace:!0}))},addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),isList:{default:!0,rendered:!1},bullet:{default:"-",rendered:!1,isRequired:!0,parseHTML:r=>r.getAttribute("data-bullet")}}},addInputRules(){return[awe(/^\s*([-+*])\s([^\s[]+)$/,this.type)]}}),uwe={info:Al,success:lb,error:ab,warn:ub},cwe={name:"Callout",components:{NodeViewWrapper:_n,NodeViewContent:uo},props:{node:{type:Object,required:!0}},computed:{icon(){return uwe[this.type]||Al},type(){var e,r;return((r=(e=this.node)==null?void 0:e.attrs)==null?void 0:r.type)||"info"}}};var dwe=function(){var e=this,r=e._self._c;return r("NodeViewWrapper",{staticClass:"callout",class:"callout--".concat(e.type),attrs:{"data-text-el":"callout",as:"div"}},[r(e.icon,{tag:"component",staticClass:"callout__icon"}),r("NodeViewContent",{staticClass:"callout__content"})],1)},hwe=[],pwe=j(cwe,dwe,hwe,!1,null,"4eaefb6e");const fwe=pwe.exports,mwe=Fe.create({name:"callout",content:"paragraph+",group:"block",defining:!0,addOptions(){return{types:Id,HTMLAttributes:{class:"callout"}}},addAttributes(){return{type:{default:"info",rendered:!1,parseHTML:e=>e.getAttribute("data-callout")||Id.find(r=>e.classList.contains(r))||e.classList.contains("warning")&&"warn",renderHTML:e=>({"data-callout":e.type,class:"callout-".concat(e.type)})}}},parseHTML(){return[{tag:"div.callout"},{tag:"p.callout",priority:1001}]},renderHTML({node:e,HTMLAttributes:r}){const{class:n}=this.options.HTMLAttributes,i={...this.options.HTMLAttributes,"data-callout":e.attrs.type,class:"".concat(n," ").concat(n,"-").concat(e.attrs.type)};return["div",be(i,r),0]},toMarkdown:(e,r)=>{e.write("::: "+(r.attrs.type||"info")+"\n"),e.renderContent(r),e.ensureNewLine(),e.write(":::"),e.closeBlock(r)},addNodeView(){return En(fwe)},addCommands(){return{setCallout:e=>({commands:r})=>r.wrapIn(this.name,e),toggleCallout:e=>({commands:r,state:n})=>fn(n,this.name)?fn(n,this.name,e)?r.unsetCallout():r.updateAttributes(this.name,e):r.setCallout(e),unsetCallout:()=>({commands:e})=>e.lift(this.name)}}}),gwe=Me.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(r=>r!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{const r=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){const n=r.textBetween(0,r.content.size,void 0," ");return this.options.textCounter(n)}return r.nodeSize},this.storage.words=e=>{const r=(e==null?void 0:e.node)||this.editor.state.doc,n=r.textBetween(0,r.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){return[new fe({key:new ve("characterCount"),filterTransaction:(e,r)=>{const n=this.options.limit;if(!e.docChanged||n===0||n===null||n===void 0)return!0;const i=this.storage.characters({node:r.doc}),o=this.storage.characters({node:e.doc});if(o<=n||i>n&&o>n&&o<=i)return!0;if(i>n&&o>n&&o>i||!e.getMeta("paste"))return!1;const s=e.selection.$head.pos,a=o-n,l=s-a,u=s;return e.deleteRange(l,u),!(this.storage.characters({node:e.doc})>n)}})]}}),bwe=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/,ywe=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g,Cwe=sr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",be(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[Pr({find:bwe,type:this.type})]},addPasteRules(){return[Vr({find:ywe,type:this.type})]}}),vwe=/^```([a-z]+)?[\s\n]$/,kwe=/^~~~([a-z]+)?[\s\n]$/,VC=Fe.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var r;const{languageClassPrefix:n}=this.options;return[...((r=e.firstElementChild)===null||r===void 0?void 0:r.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0]||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:r}){return["pre",be(this.options.HTMLAttributes,r),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:r})=>r.setNode(this.name,e),toggleCodeBlock:e=>({commands:r})=>r.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:r}=this.editor.state.selection,n=r.pos===1;return!e||r.parent.type.name!==this.name?!1:n||!r.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:r}=e,{selection:n}=r,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type)return!1;const s=i.parentOffset===i.parent.nodeSize-2,a=i.parent.textContent.endsWith("\n\n");return!s||!a?!1:e.chain().command(({tr:l})=>(l.delete(i.pos-2,i.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:r}=e,{selection:n,doc:i}=r,{$from:o,empty:s}=n;if(!s||o.parent.type!==this.type||o.parentOffset!==o.parent.nodeSize-2)return!1;const a=o.after();return a===void 0?!1:i.nodeAt(a)?e.commands.command(({tr:l})=>(l.setSelection(ne.near(i.resolve(a))),!0)):e.commands.exitCode()}}},addInputRules(){return[ud({find:vwe,type:this.type,getAttributes:e=>({language:e[1]})}),ud({find:kwe,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new fe({key:new ve("codeBlockVSCodeHandler"),props:{handlePaste:(e,r)=>{if(!r.clipboardData||this.editor.isActive(this.type.name))return!1;const n=r.clipboardData.getData("text/plain"),i=r.clipboardData.getData("vscode-editor-data"),o=i?JSON.parse(i):void 0,s=o==null?void 0:o.mode;if(!n||!s)return!1;const{tr:a,schema:l}=e.state,u=l.text(n.replace(/\r\n?/g,"\n"));return a.replaceSelectionWith(this.type.create({language:s},u)),a.selection.$from.parent.type!==this.type&&a.setSelection(Q.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),e.dispatch(a),!0}}})]}});function wwe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jC(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(r=>{const n=e[r],i=typeof n;(i==="object"||i==="function")&&!Object.isFrozen(n)&&jC(n)}),e}class u1{constructor(r){r.data===void 0&&(r.data={}),this.data=r.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function qC(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function ln(e,...r){const n=Object.create(null);for(const i in e)n[i]=e[i];return r.forEach(function(i){for(const o in i)n[o]=i[o]}),n}const Awe="</span>",c1=e=>!!e.scope,_we=(e,{prefix:r})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return["".concat(r).concat(n.shift()),...n.map((i,o)=>"".concat(i).concat("_".repeat(o+1)))].join(" ")}return"".concat(r).concat(e)};class Ewe{constructor(r,n){this.buffer="",this.classPrefix=n.classPrefix,r.walk(this)}addText(r){this.buffer+=qC(r)}openNode(r){if(!c1(r))return;const n=_we(r.scope,{prefix:this.classPrefix});this.span(n)}closeNode(r){c1(r)&&(this.buffer+=Awe)}value(){return this.buffer}span(r){this.buffer+='<span class="'.concat(r,'">')}}const d1=(e={})=>{const r={children:[]};return Object.assign(r,e),r};class dp{constructor(){this.rootNode=d1(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(r){this.top.children.push(r)}openNode(r){const n=d1({scope:r});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(r){return this.constructor._walk(r,this.rootNode)}static _walk(r,n){return typeof n=="string"?r.addText(n):n.children&&(r.openNode(n),n.children.forEach(i=>this._walk(r,i)),r.closeNode(n)),r}static _collapse(r){typeof r!="string"&&r.children&&(r.children.every(n=>typeof n=="string")?r.children=[r.children.join("")]:r.children.forEach(n=>{dp._collapse(n)}))}}class xwe extends dp{constructor(r){super(),this.options=r}addText(r){r!==""&&this.add(r)}startScope(r){this.openNode(r)}endScope(){this.closeNode()}__addSublanguage(r,n){const i=r.root;n&&(i.scope="language:".concat(n)),this.add(i)}toHTML(){return new Ewe(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function vs(e){return e?typeof e=="string"?e:e.source:null}function UC(e){return ci("(?=",e,")")}function Dwe(e){return ci("(?:",e,")*")}function Swe(e){return ci("(?:",e,")?")}function ci(...e){return e.map(r=>vs(r)).join("")}function Bwe(e){const r=e[e.length-1];return typeof r=="object"&&r.constructor===Object?(e.splice(e.length-1,1),r):{}}function hp(...e){return"("+(Bwe(e).capture?"":"?:")+e.map(r=>vs(r)).join("|")+")"}function WC(e){return new RegExp(e.toString()+"|").exec("").length-1}function Mwe(e,r){const n=e&&e.exec(r);return n&&n.index===0}const Fwe=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function pp(e,{joinWith:r}){let n=0;return e.map(i=>{n+=1;const o=n;let s=vs(i),a="";for(;s.length>0;){const l=Fwe.exec(s);if(!l){a+=s;break}a+=s.substring(0,l.index),s=s.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?a+="\\"+String(Number(l[1])+o):(a+=l[0],l[0]==="("&&n++)}return a}).map(i=>"(".concat(i,")")).join(r)}const Nwe=/\b\B/,KC="[a-zA-Z]\\w*",fp="[a-zA-Z_]\\w*",ZC="\\b\\d+(\\.\\d+)?",GC="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",JC="\\b(0b[01]+)",Owe="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Twe=(e={})=>{const r=/^#![ ]*\//;return e.binary&&(e.begin=ci(r,/.*\b/,e.binary,/\b.*/)),ln({scope:"meta",begin:r,end:/$/,relevance:0,"on:begin":(n,i)=>{n.index!==0&&i.ignoreMatch()}},e)},ks={begin:"\\\\[\\s\\S]",relevance:0},Lwe={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ks]},Iwe={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ks]},Rwe={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/},Du=function(e,r,n={}){const i=ln({scope:"comment",begin:e,end:r,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=hp("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:ci(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},zwe=Du("//","$"),$we=Du("/\\*","\\*/"),Hwe=Du("#","$"),Pwe={scope:"number",begin:ZC,relevance:0},Vwe={scope:"number",begin:GC,relevance:0},jwe={scope:"number",begin:JC,relevance:0},qwe={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ks,{begin:/\[/,end:/\]/,relevance:0,contains:[ks]}]},Uwe={scope:"title",begin:KC,relevance:0},Wwe={scope:"title",begin:fp,relevance:0},Kwe={begin:"\\.\\s*"+fp,relevance:0},Zwe=function(e){return Object.assign(e,{"on:begin":(r,n)=>{n.data._beginMatch=r[1]},"on:end":(r,n)=>{n.data._beginMatch!==r[1]&&n.ignoreMatch()}})};var da=Object.freeze({__proto__:null,APOS_STRING_MODE:Lwe,BACKSLASH_ESCAPE:ks,BINARY_NUMBER_MODE:jwe,BINARY_NUMBER_RE:JC,COMMENT:Du,C_BLOCK_COMMENT_MODE:$we,C_LINE_COMMENT_MODE:zwe,C_NUMBER_MODE:Vwe,C_NUMBER_RE:GC,END_SAME_AS_BEGIN:Zwe,HASH_COMMENT_MODE:Hwe,IDENT_RE:KC,MATCH_NOTHING_RE:Nwe,METHOD_GUARD:Kwe,NUMBER_MODE:Pwe,NUMBER_RE:ZC,PHRASAL_WORDS_MODE:Rwe,QUOTE_STRING_MODE:Iwe,REGEXP_MODE:qwe,RE_STARTERS_RE:Owe,SHEBANG:Twe,TITLE_MODE:Uwe,UNDERSCORE_IDENT_RE:fp,UNDERSCORE_TITLE_MODE:Wwe});function Gwe(e,r){e.input[e.index-1]==="."&&r.ignoreMatch()}function Jwe(e,r){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Xwe(e,r){r&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Gwe,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Qwe(e,r){Array.isArray(e.illegal)&&(e.illegal=hp(...e.illegal))}function Ywe(e,r){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 eAe(e,r){e.relevance===void 0&&(e.relevance=1)}const tAe=(e,r)=>{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(i=>{delete e[i]}),e.keywords=n.keywords,e.begin=ci(n.beforeMatch,UC(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},rAe=["of","and","for","in","not","or","if","then","parent","list","value"],nAe="keyword";function XC(e,r,n=nAe){const i=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(s){Object.assign(i,XC(e[s],r,s))}),i;function o(s,a){r&&(a=a.map(l=>l.toLowerCase())),a.forEach(function(l){const u=l.split("|");i[u[0]]=[s,iAe(u[0],u[1])]})}}function iAe(e,r){return r?Number(r):oAe(e)?0:1}function oAe(e){return rAe.includes(e.toLowerCase())}const h1={},Zn=e=>{console.error(e)},p1=(e,...r)=>{console.log("WARN: ".concat(e),...r)},vi=(e,r)=>{h1["".concat(e,"/").concat(r)]||(console.log("Deprecated as of ".concat(e,". ").concat(r)),h1["".concat(e,"/").concat(r)]=!0)},Ul=new Error;function QC(e,r,{key:n}){let i=0;const o=e[n],s={},a={};for(let l=1;l<=r.length;l++)a[l+i]=o[l],s[l+i]=!0,i+=WC(r[l-1]);e[n]=a,e[n]._emit=s,e[n]._multi=!0}function sAe(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Zn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ul;if(typeof e.beginScope!="object"||e.beginScope===null)throw Zn("beginScope must be object"),Ul;QC(e,e.begin,{key:"beginScope"}),e.begin=pp(e.begin,{joinWith:""})}}function aAe(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Zn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ul;if(typeof e.endScope!="object"||e.endScope===null)throw Zn("endScope must be object"),Ul;QC(e,e.end,{key:"endScope"}),e.end=pp(e.end,{joinWith:""})}}function lAe(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function uAe(e){lAe(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),sAe(e),aAe(e)}function cAe(e){function r(a,l){return new RegExp(vs(a),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,u){u.position=this.position++,this.matchIndexes[this.matchAt]=u,this.regexes.push([u,l]),this.matchAt+=WC(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(u=>u[1]);this.matcherRe=r(pp(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const u=this.matcherRe.exec(l);if(!u)return null;const c=u.findIndex((h,p)=>p>0&&h!==void 0),d=this.matchIndexes[c];return u.splice(0,c),Object.assign(u,d)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const u=new n;return this.rules.slice(l).forEach(([c,d])=>u.addRule(c,d)),u.compile(),this.multiRegexes[l]=u,u}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,u){this.rules.push([l,u]),u.type==="begin"&&this.count++}exec(l){const u=this.getMatcher(this.regexIndex);u.lastIndex=this.lastIndex;let c=u.exec(l);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,c=d.exec(l)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function o(a){const l=new i;return a.contains.forEach(u=>l.addRule(u.begin,{rule:u,type:"begin"})),a.terminatorEnd&&l.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&l.addRule(a.illegal,{type:"illegal"}),l}function s(a,l){const u=a;if(a.isCompiled)return u;[Jwe,Ywe,uAe,tAe].forEach(d=>d(a,l)),e.compilerExtensions.forEach(d=>d(a,l)),a.__beforeBegin=null,[Xwe,Qwe,eAe].forEach(d=>d(a,l)),a.isCompiled=!0;let c=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),c=a.keywords.$pattern,delete a.keywords.$pattern),c=c||/\w+/,a.keywords&&(a.keywords=XC(a.keywords,e.case_insensitive)),u.keywordPatternRe=r(c,!0),l&&(a.begin||(a.begin=/\B|\b/),u.beginRe=r(u.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(u.endRe=r(u.end)),u.terminatorEnd=vs(u.end)||"",a.endsWithParent&&l.terminatorEnd&&(u.terminatorEnd+=(a.end?"|":"")+l.terminatorEnd)),a.illegal&&(u.illegalRe=r(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(d){return dAe(d==="self"?a:d)})),a.contains.forEach(function(d){s(d,u)}),a.starts&&s(a.starts,l),u.matcher=o(u),u}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=ln(e.classNameAliases||{}),s(e)}function YC(e){return e?e.endsWithParent||YC(e.starts):!1}function dAe(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(r){return ln(e,{variants:null},r)})),e.cachedVariants?e.cachedVariants:YC(e)?ln(e,{starts:e.starts?ln(e.starts):null}):Object.isFrozen(e)?ln(e):e}var hAe="11.10.0";class pAe extends Error{constructor(r,n){super(r),this.name="HTMLInjectionError",this.html=n}}const Rc=qC,f1=ln,m1=Symbol("nomatch"),fAe=7,ev=function(e){const r=Object.create(null),n=Object.create(null),i=[];let o=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:xwe};function u(w){return l.noHighlightRe.test(w)}function c(w){let E=w.className+" ";E+=w.parentNode?w.parentNode.className:"";const R=l.languageDetectRe.exec(E);if(R){const B=D(R[1]);return B||(p1(s.replace("{}",R[1])),p1("Falling back to no-highlight mode for this block.",w)),B?R[1]:"no-highlight"}return E.split(/\s+/).find(B=>u(B)||D(B))}function d(w,E,R){let B="",I="";typeof E=="object"?(B=w,R=E.ignoreIllegals,I=E.language):(vi("10.7.0","highlight(lang, code, ...args) has been deprecated."),vi("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),I=w,B=E),R===void 0&&(R=!0);const V={code:B,language:I};T("before:highlight",V);const te=V.result?V.result:h(V.language,V.code,R);return te.code=V.code,T("after:highlight",te),te}function h(w,E,R,B){const I=Object.create(null);function V(x,N){return x.keywords[N]}function te(){if(!z.keywords){le.addText(X);return}let x=0;z.keywordPatternRe.lastIndex=0;let N=z.keywordPatternRe.exec(X),H="";for(;N;){H+=X.substring(x,N.index);const K=we.case_insensitive?N[0].toLowerCase():N[0],ge=V(z,K);if(ge){const[je,bo]=ge;if(le.addText(H),H="",I[K]=(I[K]||0)+1,I[K]<=fAe&&(rt+=bo),je.startsWith("_"))H+=N[0];else{const M=we.classNameAliases[je]||je;re(N[0],M)}}else H+=N[0];x=z.keywordPatternRe.lastIndex,N=z.keywordPatternRe.exec(X)}H+=X.substring(x),le.addText(H)}function se(){if(X==="")return;let x=null;if(typeof z.subLanguage=="string"){if(!r[z.subLanguage]){le.addText(X);return}x=h(z.subLanguage,X,!0,pt[z.subLanguage]),pt[z.subLanguage]=x._top}else x=f(X,z.subLanguage.length?z.subLanguage:null);z.relevance>0&&(rt+=x.relevance),le.__addSublanguage(x._emitter,x.language)}function G(){z.subLanguage!=null?se():te(),X=""}function re(x,N){x!==""&&(le.startScope(N),le.addText(x),le.endScope())}function Ee(x,N){let H=1;const K=N.length-1;for(;H<=K;){if(!x._emit[H]){H++;continue}const ge=we.classNameAliases[x[H]]||x[H],je=N[H];ge?re(je,ge):(X=je,te(),X=""),H++}}function De(x,N){return x.scope&&typeof x.scope=="string"&&le.openNode(we.classNameAliases[x.scope]||x.scope),x.beginScope&&(x.beginScope._wrap?(re(X,we.classNameAliases[x.beginScope._wrap]||x.beginScope._wrap),X=""):x.beginScope._multi&&(Ee(x.beginScope,N),X="")),z=Object.create(x,{parent:{value:z}}),z}function ae(x,N,H){let K=Mwe(x.endRe,H);if(K){if(x["on:end"]){const ge=new u1(x);x["on:end"](N,ge),ge.isMatchIgnored&&(K=!1)}if(K){for(;x.endsParent&&x.parent;)x=x.parent;return x}}if(x.endsWithParent)return ae(x.parent,N,H)}function Le(x){return z.matcher.regexIndex===0?(X+=x[0],1):(zt=!0,0)}function Ae(x){const N=x[0],H=x.rule,K=new u1(H),ge=[H.__beforeBegin,H["on:begin"]];for(const je of ge)if(je&&(je(x,K),K.isMatchIgnored))return Le(N);return H.skip?X+=N:(H.excludeBegin&&(X+=N),G(),!H.returnBegin&&!H.excludeBegin&&(X=N)),De(H,x),H.returnBegin?0:N.length}function Ie(x){const N=x[0],H=E.substring(x.index),K=ae(z,x,H);if(!K)return m1;const ge=z;z.endScope&&z.endScope._wrap?(G(),re(N,z.endScope._wrap)):z.endScope&&z.endScope._multi?(G(),Ee(z.endScope,x)):ge.skip?X+=N:(ge.returnEnd||ge.excludeEnd||(X+=N),G(),ge.excludeEnd&&(X=N));do z.scope&&le.closeNode(),!z.skip&&!z.subLanguage&&(rt+=z.relevance),z=z.parent;while(z!==K.parent);return K.starts&&De(K.starts,x),ge.returnEnd?0:N.length}function Pe(){const x=[];for(let N=z;N!==we;N=N.parent)N.scope&&x.unshift(N.scope);x.forEach(N=>le.openNode(N))}let Re={};function Ge(x,N){const H=N&&N[0];if(X+=x,H==null)return G(),0;if(Re.type==="begin"&&N.type==="end"&&Re.index===N.index&&H===""){if(X+=E.slice(N.index,N.index+1),!o){const K=new Error("0 width match regex (".concat(w,")"));throw K.languageName=w,K.badRule=Re.rule,K}return 1}if(Re=N,N.type==="begin")return Ae(N);if(N.type==="illegal"&&!R){const K=new Error('Illegal lexeme "'+H+'" for mode "'+(z.scope||"<unnamed>")+'"');throw K.mode=z,K}else if(N.type==="end"){const K=Ie(N);if(K!==m1)return K}if(N.type==="illegal"&&H==="")return 1;if(Rt>1e5&&Rt>N.index*3)throw new Error("potential infinite loop, way more iterations than matches");return X+=H,H.length}const we=D(w);if(!we)throw Zn(s.replace("{}",w)),new Error('Unknown language: "'+w+'"');const Mr=cAe(we);let It="",z=B||Mr;const pt={},le=new l.__emitter(l);Pe();let X="",rt=0,Ve=0,Rt=0,zt=!1;try{if(we.__emitTokens)we.__emitTokens(E,le);else{for(z.matcher.considerAll();;){Rt++,zt?zt=!1:z.matcher.considerAll(),z.matcher.lastIndex=Ve;const x=z.matcher.exec(E);if(!x)break;const N=E.substring(Ve,x.index),H=Ge(N,x);Ve=x.index+H}Ge(E.substring(Ve))}return le.finalize(),It=le.toHTML(),{language:w,value:It,relevance:rt,illegal:!1,_emitter:le,_top:z}}catch(x){if(x.message&&x.message.includes("Illegal"))return{language:w,value:Rc(E),illegal:!0,relevance:0,_illegalBy:{message:x.message,index:Ve,context:E.slice(Ve-100,Ve+100),mode:x.mode,resultSoFar:It},_emitter:le};if(o)return{language:w,value:Rc(E),illegal:!1,relevance:0,errorRaised:x,_emitter:le,_top:z};throw x}}function p(w){const E={value:Rc(w),illegal:!1,relevance:0,_top:a,_emitter:new l.__emitter(l)};return E._emitter.addText(w),E}function f(w,E){E=E||l.languages||Object.keys(r);const R=p(w),B=E.filter(D).filter(U).map(G=>h(G,w,!1));B.unshift(R);const I=B.sort((G,re)=>{if(G.relevance!==re.relevance)return re.relevance-G.relevance;if(G.language&&re.language){if(D(G.language).supersetOf===re.language)return 1;if(D(re.language).supersetOf===G.language)return-1}return 0}),[V,te]=I,se=V;return se.secondBest=te,se}function m(w,E,R){const B=E&&n[E]||R;w.classList.add("hljs"),w.classList.add("language-".concat(B))}function b(w){let E=null;const R=c(w);if(u(R))return;if(T("before:highlightElement",{el:w,language:R}),w.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",w);return}if(w.children.length>0&&(l.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(w)),l.throwUnescapedHTML))throw new pAe("One of your code blocks includes unescaped HTML.",w.innerHTML);E=w;const B=E.textContent,I=R?d(B,{language:R,ignoreIllegals:!0}):f(B);w.innerHTML=I.value,w.dataset.highlighted="yes",m(w,R,I.language),w.result={language:I.language,re:I.relevance,relevance:I.relevance},I.secondBest&&(w.secondBest={language:I.secondBest.language,relevance:I.secondBest.relevance}),T("after:highlightElement",{el:w,result:I,text:B})}function g(w){l=f1(l,w)}const y=()=>{C(),vi("10.6.0","initHighlighting() deprecated.  Use highlightAll() now.")};function v(){C(),vi("10.6.0","initHighlightingOnLoad() deprecated.  Use highlightAll() now.")}let k=!1;function C(){if(document.readyState==="loading"){k=!0;return}document.querySelectorAll(l.cssSelector).forEach(b)}function A(){k&&C()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function _(w,E){let R=null;try{R=E(e)}catch(B){if(Zn("Language definition for '{}' could not be registered.".replace("{}",w)),o)Zn(B);else throw B;R=a}R.name||(R.name=w),r[w]=R,R.rawDefinition=E.bind(null,e),R.aliases&&P(R.aliases,{languageName:w})}function S(w){delete r[w];for(const E of Object.keys(n))n[E]===w&&delete n[E]}function L(){return Object.keys(r)}function D(w){return w=(w||"").toLowerCase(),r[w]||r[n[w]]}function P(w,{languageName:E}){typeof w=="string"&&(w=[w]),w.forEach(R=>{n[R.toLowerCase()]=E})}function U(w){const E=D(w);return E&&!E.disableAutodetect}function J(w){w["before:highlightBlock"]&&!w["before:highlightElement"]&&(w["before:highlightElement"]=E=>{w["before:highlightBlock"](Object.assign({block:E.el},E))}),w["after:highlightBlock"]&&!w["after:highlightElement"]&&(w["after:highlightElement"]=E=>{w["after:highlightBlock"](Object.assign({block:E.el},E))})}function Z(w){J(w),i.push(w)}function F(w){const E=i.indexOf(w);E!==-1&&i.splice(E,1)}function T(w,E){const R=w;i.forEach(function(B){B[R]&&B[R](E)})}function Y(w){return vi("10.7.0","highlightBlock will be removed entirely in v12.0"),vi("10.7.0","Please use highlightElement now."),b(w)}Object.assign(e,{highlight:d,highlightAuto:f,highlightAll:C,highlightElement:b,highlightBlock:Y,configure:g,initHighlighting:y,initHighlightingOnLoad:v,registerLanguage:_,unregisterLanguage:S,listLanguages:L,getLanguage:D,registerAliases:P,autoDetection:U,inherit:f1,addPlugin:Z,removePlugin:F}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=hAe,e.regex={concat:ci,lookahead:UC,either:hp,optional:Swe,anyNumberOfTimes:Dwe};for(const w in da)typeof da[w]=="object"&&jC(da[w]);return Object.assign(e,da),e},Ti=ev({});Ti.newInstance=()=>ev({});var mAe=Ti;Ti.HighlightJS=Ti,Ti.default=Ti;var gAe=wwe(mAe);function tv(e,r=[]){return e.map(n=>{const i=[...r,...n.properties?n.properties.className:[]];return n.children?tv(n.children,i):{text:n.value,classes:i}}).flat()}function g1(e){return e.value||e.children||[]}function bAe(e){return!!gAe.getLanguage(e)}function b1({doc:e,name:r,lowlight:n,defaultLanguage:i}){const o=[];return ad(e,s=>s.type.name===r).forEach(s=>{var a;let l=s.pos+1;const u=s.node.attrs.language||i,c=n.listLanguages(),d=u&&(c.includes(u)||bAe(u)||!((a=n.registered)===null||a===void 0)&&a.call(n,u))?g1(n.highlight(u,s.node.textContent)):g1(n.highlightAuto(s.node.textContent));tv(d).forEach(h=>{const p=l+h.text.length;if(h.classes.length){const f=ze.inline(l,p,{class:h.classes.join(" ")});o.push(f)}l=p})}),ye.create(e,o)}function yAe(e){return typeof e=="function"}function CAe({name:e,lowlight:r,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every(o=>yAe(r[o])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const i=new fe({key:new ve("lowlight"),state:{init:(o,{doc:s})=>b1({doc:s,name:e,lowlight:r,defaultLanguage:n}),apply:(o,s,a,l)=>{const u=a.selection.$head.parent.type.name,c=l.selection.$head.parent.type.name,d=ad(a.doc,p=>p.type.name===e),h=ad(l.doc,p=>p.type.name===e);return o.docChanged&&([u,c].includes(e)||h.length!==d.length||o.steps.some(p=>p.from!==void 0&&p.to!==void 0&&d.some(f=>f.pos>=p.from&&f.pos+f.node.nodeSize<=p.to)))?b1({doc:o.doc,name:e,lowlight:r,defaultLanguage:n}):s.map(o.mapping,o.doc)}},props:{decorations(o){return i.getState(o)}}});return i}const vAe=VC.extend({addOptions(){var e;return{...(e=this.parent)===null||e===void 0?void 0:e.call(this),lowlight:{}}},addProseMirrorPlugins(){var e;return[...((e=this.parent)===null||e===void 0?void 0:e.call(this))||[],CAe({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}});for(var nt=[],zc=0;zc<256;++zc)nt.push((zc+256).toString(16).slice(1));function kAe(e,r=0){return(nt[e[r+0]]+nt[e[r+1]]+nt[e[r+2]]+nt[e[r+3]]+"-"+nt[e[r+4]]+nt[e[r+5]]+"-"+nt[e[r+6]]+nt[e[r+7]]+"-"+nt[e[r+8]]+nt[e[r+9]]+"-"+nt[e[r+10]]+nt[e[r+11]]+nt[e[r+12]]+nt[e[r+13]]+nt[e[r+14]]+nt[e[r+15]]).toLowerCase()}var ha,wAe=new Uint8Array(16);function AAe(){if(!ha&&(ha=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ha))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ha(wAe)}var _Ae=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const y1={randomUUID:_Ae};function EAe(e,r,n){if(y1.randomUUID&&!r&&!e)return y1.randomUUID();e=e||{};var i=e.random||(e.rng||AAe)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,kAe(i)}const xAe={name:"ViewSplitVerticalIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var DAe=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon view-split-vertical-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M13,5H21V19H13V5M3,5H11V7H3V5M3,11V9H11V11H3M3,19V17H11V19H3M3,15V13H11V15H3Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},SAe=[],BAe=j(xAe,DAe,SAe,!1,null,null);const MAe=BAe.exports,FAe={name:"CodeBracesIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var NAe=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon code-braces-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M8,3A2,2 0 0,0 6,5V9A2,2 0 0,1 4,11H3V13H4A2,2 0 0,1 6,15V19A2,2 0 0,0 8,21H10V19H8V14A2,2 0 0,0 6,12A2,2 0 0,0 8,10V5H10V3M16,3A2,2 0 0,1 18,5V9A2,2 0 0,0 20,11H21V13H20A2,2 0 0,0 18,15V19A2,2 0 0,1 16,21H14V19H16V14A2,2 0 0,1 18,12A2,2 0 0,1 16,10V5H14V3H16Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},OAe=[],TAe=j(FAe,NAe,OAe,!1,null,null);const LAe=TAe.exports,IAe={name:"EyeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var RAe=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon eye-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},zAe=[],$Ae=j(IAe,RAe,zAe,!1,null,null);const HAe=$Ae.exports,PAe={name:"MarkerIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var VAe=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon marker-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M18.5,1.15C17.97,1.15 17.46,1.34 17.07,1.73L11.26,7.55L16.91,13.2L22.73,7.39C23.5,6.61 23.5,5.35 22.73,4.56L19.89,1.73C19.5,1.34 19,1.15 18.5,1.15M10.3,8.5L4.34,14.46C3.56,15.24 3.56,16.5 4.36,17.31C3.14,18.54 1.9,19.77 0.67,21H6.33L7.19,20.14C7.97,20.9 9.22,20.89 10,20.12L15.95,14.16"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},jAe=[],qAe=j(PAe,VAe,jAe,!1,null,null);const UAe=qAe.exports,WAe={name:"HelpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var KAe=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon help-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M10,19H13V22H10V19M12,2C17.35,2.22 19.68,7.62 16.5,11.67C15.67,12.67 14.33,13.33 13.67,14.17C13,15 13,16 13,17H10C10,15.33 10,13.92 10.67,12.92C11.33,11.92 12.67,11.33 13.5,10.67C15.92,8.43 15.32,5.26 12,5A3,3 0 0,0 9,8H6A6,6 0 0,1 12,2Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},ZAe=[],GAe=j(WAe,KAe,ZAe,!1,null,null);const JAe=GAe.exports,XAe={name:"ContentCopyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var QAe=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon content-copy-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},YAe=[],e_e=j(XAe,QAe,YAe,!1,null,null);const rv=e_e.exports,nv={data(){return{copied:!1,copyLoading:!1,copySuccess:!1}},methods:{async copyToClipboard(e){this.copyLoading=!0;try{await navigator.clipboard.writeText(e),this.copySuccess=!0,this.copied=!0,bk(t("text","Copied to the clipboard"))}catch{this.copySuccess=!1,this.copied=!0,ng("<div>".concat(t("text","Could not copy to the clipboard"),"</div>"),{isHTML:!0})}finally{this.copyLoading=!1,setTimeout(()=>{this.copySuccess=!1,this.copied=!1},4e3)}}}},t_e={name:"CodeBlockView",components:{MarkerIcon:UAe,ContentCopy:rv,Help:JAe,Check:nb,Eye:HAe,ViewSplitVertical:MAe,CodeBraces:LAe,NcActions:ii,NcActionButton:ni,NcActionInput:Z1,NcActionLink:Vv,NcActionSeparator:tb,NcLoadingIcon:Q1,NodeViewWrapper:_n,NodeViewContent:uo},mixins:[nv],props:{node:{type:Object,required:!0},editor:{type:Object,required:!0}},setup(){return{mermaid:null}},data(){return{isEditable:!1,viewMode:"preview",targetId:"mermaid-view-"+EAe()}},computed:{hasCode(){var e;return(e=this.node)==null?void 0:e.textContent},type(){var e,r;return((r=(e=this.node)==null?void 0:e.attrs)==null?void 0:r.language)||""},supportPreview(){return["mermaid"].includes(this.type)},showCode(){return!this.supportPreview||this.viewMode==="code"||this.viewMode==="side-by-side"},showPreview(){return this.supportPreview&&(this.viewMode==="preview"||this.viewMode==="side-by-side")},defaultMode(){return this.isEditable?"side-by-side":this.supportPreview()?"code":"preview"},renderMermaidDebounced(){return tg(this.renderMermaid,250)}},watch:{"node.textContent":{handler(){this.renderMermaidDebounced()},immediate:!0}},beforeMount(){this.isEditable=this.editor.isEditable,this.editor.on("update",({editor:e})=>{this.isEditable=e.isEditable})},methods:{async copyCode(){var e;await this.copyToClipboard((e=this.node)==null?void 0:e.textContent)},updateLanguage(e){this.updateAttributes({language:e.target.value})},async renderMermaid(){var r;if(!this.supportPreview){this.viewMode="code";return}const e=((r=this.node)==null?void 0:r.textContent)||"";e.trim()===""&&(this.viewMode=this.defaultMode,this.$refs.preview.innerHTML="");try{this.mermaid===null&&(this.mermaid=(await Y1(async()=>{const{default:o}=await import("./mermaid.core-ChD64xgE.chunk.mjs").then(s=>s.b6);return{default:o}},__vite__mapDeps([4,1,2,3]),import.meta.url)).default,this.mermaid.initialize({startOnLoad:!1})),await this.mermaid.parse(e);const{svg:n}=await this.mermaid.render(this.targetId,e),i=document.getElementById(this.targetId);i&&(i.style.display="none"),this.$refs.preview.innerHTML=n}catch(n){console.debug("Invalid mermaid source",n),this.viewMode==="preview"&&(this.viewMode=this.isEditable?"side-by-side":"code")}}}};var r_e=function(){var e=this,r=e._self._c;return r("NodeViewWrapper",{staticClass:"code-block",attrs:{as:"div","data-mode":e.viewMode}},[r("div",{staticClass:"code-block-header"},[r("div",{staticClass:"view-switch"},[r("NcActions",{attrs:{"aria-label":e.t("text","Copy code block")}},[e.hasCode?r("NcActionButton",{attrs:{"data-cy":"copy-code","aria-label":e.t("text","Copy code"),"close-after-click":!1},on:{click:e.copyCode},scopedSlots:e._u([{key:"icon",fn:function(){return[e.copySuccess?r("Check",{attrs:{size:20}}):e.copyLoading?r("NcLoadingIcon",{attrs:{size:20}}):r("ContentCopy",{attrs:{size:20}})]},proxy:!0}],null,!1,2104404999)}):e._e()],1),e.isEditable?r("NcActions",{attrs:{"data-cy":"code-action-group","aria-label":e.t("text","Code block options")}},[r("NcActionInput",{attrs:{label:e.t("text","Code block language"),value:e.type,"show-trailing-button":!1,placeholder:e.t("text","e.g. php, javascript, json…")},on:{input:e.updateLanguage},scopedSlots:e._u([{key:"icon",fn:function(){return[r("MarkerIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,3768505569)}),e.supportPreview?r("NcActionSeparator"):e._e(),e.supportPreview?r("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(n){e.viewMode="code"}},scopedSlots:e._u([{key:"icon",fn:function(){return[r("CodeBraces",{attrs:{size:20}})]},proxy:!0}],null,!1,2428748609)},[e._v(" "+e._s(e.t("text","Source code"))+" ")]):e._e(),e.supportPreview?r("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(n){e.viewMode="preview"}},scopedSlots:e._u([{key:"icon",fn:function(){return[r("Eye",{attrs:{size:20}})]},proxy:!0}],null,!1,1151454737)},[e._v(" "+e._s(e.t("text","Diagram"))+" ")]):e._e(),e.supportPreview?r("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(n){e.viewMode="side-by-side"}},scopedSlots:e._u([{key:"icon",fn:function(){return[r("ViewSplitVertical",{attrs:{size:20}})]},proxy:!0}],null,!1,3354721413)},[e._v(" "+e._s(e.t("text","Both"))+" ")]):e._e(),e.supportPreview?r("NcActionSeparator"):e._e(),e.supportPreview?r("NcActionLink",{attrs:{href:"https://mermaid.js.org/intro/",target:"_blank"},scopedSlots:e._u([{key:"icon",fn:function(){return[r("Help",{attrs:{size:20}})]},proxy:!0}],null,!1,802739225)},[e._v(" "+e._s(e.t("text","Mermaid documentation"))+" ")]):e._e()],1):e._e()],1)]),r("div",{class:{"split-view":e.showCode&&e.showPreview}},[r("pre",{directives:[{name:"show",rawName:"v-show",value:e.showCode,expression:"showCode"}],staticClass:"split-view__code"},[r("NodeViewContent",{attrs:{spellcheck:"false",as:"code",contenteditable:e.isEditable}})],1),r("div",{directives:[{name:"show",rawName:"v-show",value:e.showPreview,expression:"showPreview"}],ref:"preview",staticClass:"split-view__preview",attrs:{contenteditable:!1}}),r("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],attrs:{id:e.targetId,contenteditable:!1}})])])},n_e=[],i_e=j(t_e,r_e,n_e,!1,null,"aa876a65");const o_e=i_e.exports,s_e=vAe.extend({parseHTML(){return[{tag:"pre",preserveWhitespace:"full",getContent:(e,r)=>{const n=e.textContent.replace(/\n$/,""),i=n?[r.text(n)]:[];return r.nodes.codeBlock.create(null,i)}}]},toMarkdown(e,r,n,i){r.attrs.params=r.attrs.language;const o=r.textContent.match(/`{3,}/gm),s=o?o.sort().slice(-1)[0]+"`":"```",a=r.attrs.params!=="plaintext"?r.attrs.params:"";e.write(s+(a||"")+"\n"),e.text(r.textContent,!1),e.ensureNewLine(),e.write(s),e.closeBlock(r)},addNodeView(){return En(o_e)},addKeyboardShortcuts(){return{"Mod-a":()=>{if(!this.editor.isActive("codeBlock"))return;const e=this.editor.state.selection.$from.node().nodeSize;this.editor.commands.selectParentNode();const r=this.editor.state.selection.$from.pos,n=r+e;return this.editor.commands.setTextSelection({from:r,to:n}),!0}}}}),a_e=Fe.create({name:"doc",topNode:!0,content:"block+"});function l_e(e={}){return new fe({view(r){return new u_e(r,e)}})}class u_e{constructor(r,n){var i;this.editorView=r,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(i=n.width)!==null&&i!==void 0?i:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let s=a=>{this[o](a)};return r.dom.addEventListener(o,s),{name:o,handler:s}})}destroy(){this.handlers.forEach(({name:r,handler:n})=>this.editorView.dom.removeEventListener(r,n))}update(r,n){this.cursorPos!=null&&n.doc!=r.state.doc&&(this.cursorPos>r.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(r){r!=this.cursorPos&&(this.cursorPos=r,r==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let r=this.editorView.state.doc.resolve(this.cursorPos),n=!r.parent.inlineContent,i;if(n){let l=r.nodeBefore,u=r.nodeAfter;if(l||u){let c=this.editorView.nodeDOM(this.cursorPos-(l?l.nodeSize:0));if(c){let d=c.getBoundingClientRect(),h=l?d.bottom:d.top;l&&u&&(h=(h+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),i={left:d.left,right:d.right,top:h-this.width/2,bottom:h+this.width/2}}}}if(!i){let l=this.editorView.coordsAtPos(this.cursorPos);i={left:l.left-this.width/2,right:l.left+this.width/2,top:l.top,bottom:l.bottom}}let o=this.editorView.dom.offsetParent;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;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let s,a;if(!o||o==document.body&&getComputedStyle(o).position=="static")s=-pageXOffset,a=-pageYOffset;else{let l=o.getBoundingClientRect();s=l.left-o.scrollLeft,a=l.top-o.scrollTop}this.element.style.left=i.left-s+"px",this.element.style.top=i.top-a+"px",this.element.style.width=i.right-i.left+"px",this.element.style.height=i.bottom-i.top+"px"}scheduleRemoval(r){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),r)}dragover(r){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:r.clientX,top:r.clientY}),i=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=i&&i.type.spec.disableDropCursor,s=typeof o=="function"?o(this.editorView,n,r):o;if(n&&!s){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=Fg(this.editorView.state.doc,a,this.editorView.dragging.slice);l!=null&&(a=l)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(r){(r.target==this.editorView.dom||!this.editorView.dom.contains(r.relatedTarget))&&this.setCursor(null)}}const c_e=Me.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[l_e(this.options)]}});var Rd,zd;if(typeof WeakMap<"u"){let e=new WeakMap;Rd=r=>e.get(r),zd=(r,n)=>(e.set(r,n),n)}else{const e=[];let r=0;Rd=n=>{for(let i=0;i<e.length;i+=2)if(e[i]==n)return e[i+1]},zd=(n,i)=>(r==10&&(r=0),e[r++]=n,e[r++]=i)}var He=class{constructor(e,r,n,i){this.width=e,this.height=r,this.map=n,this.problems=i}findCell(e){for(let r=0;r<this.map.length;r++){const n=this.map[r];if(n!=e)continue;const i=r%this.width,o=r/this.width|0;let s=i+1,a=o+1;for(let l=1;s<this.width&&this.map[r+l]==n;l++)s++;for(let l=1;a<this.height&&this.map[r+this.width*l]==n;l++)a++;return{left:i,top:o,right:s,bottom:a}}throw new RangeError("No cell with offset ".concat(e," found"))}colCount(e){for(let r=0;r<this.map.length;r++)if(this.map[r]==e)return r%this.width;throw new RangeError("No cell with offset ".concat(e," found"))}nextCell(e,r,n){const{left:i,right:o,top:s,bottom:a}=this.findCell(e);return r=="horiz"?(n<0?i==0:o==this.width)?null:this.map[s*this.width+(n<0?i-1:o)]:(n<0?s==0:a==this.height)?null:this.map[i+this.width*(n<0?s-1:a)]}rectBetween(e,r){const{left:n,right:i,top:o,bottom:s}=this.findCell(e),{left:a,right:l,top:u,bottom:c}=this.findCell(r);return{left:Math.min(n,a),top:Math.min(o,u),right:Math.max(i,l),bottom:Math.max(s,c)}}cellsInRect(e){const r=[],n={};for(let i=e.top;i<e.bottom;i++)for(let o=e.left;o<e.right;o++){const s=i*this.width+o,a=this.map[s];n[a]||(n[a]=!0,!(o==e.left&&o&&this.map[s-1]==a||i==e.top&&i&&this.map[s-this.width]==a)&&r.push(a))}return r}positionAt(e,r,n){for(let i=0,o=0;;i++){const s=o+n.child(i).nodeSize;if(i==e){let a=r+e*this.width;const l=(e+1)*this.width;for(;a<l&&this.map[a]<o;)a++;return a==l?s-1:this.map[a]}o=s}}static get(e){return Rd(e)||zd(e,d_e(e))}};function d_e(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const r=h_e(e),n=e.childCount,i=[];let o=0,s=null;const a=[];for(let c=0,d=r*n;c<d;c++)i[c]=0;for(let c=0,d=0;c<n;c++){const h=e.child(c);d++;for(let m=0;;m++){for(;o<i.length&&i[o]!=0;)o++;if(m==h.childCount)break;const b=h.child(m),{colspan:g,rowspan:y,colwidth:v}=b.attrs;for(let k=0;k<y;k++){if(k+c>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:d,n:y-k});break}const C=o+k*r;for(let A=0;A<g;A++){i[C+A]==0?i[C+A]=d:(s||(s=[])).push({type:"collision",row:c,pos:d,n:g-A});const _=v&&v[A];if(_){const S=(C+A)%r*2,L=a[S];L==null||L!=_&&a[S+1]==1?(a[S]=_,a[S+1]=1):L==_&&a[S+1]++}}}o+=g,d+=b.nodeSize}const p=(c+1)*r;let f=0;for(;o<p;)i[o++]==0&&f++;f&&(s||(s=[])).push({type:"missing",row:c,n:f}),d++}const l=new He(r,n,i,s);let u=!1;for(let c=0;!u&&c<a.length;c+=2)a[c]!=null&&a[c+1]<n&&(u=!0);return u&&p_e(l,a,e),l}function h_e(e){let r=-1,n=!1;for(let i=0;i<e.childCount;i++){const o=e.child(i);let s=0;if(n)for(let a=0;a<i;a++){const l=e.child(a);for(let u=0;u<l.childCount;u++){const c=l.child(u);a+c.attrs.rowspan>i&&(s+=c.attrs.colspan)}}for(let a=0;a<o.childCount;a++){const l=o.child(a);s+=l.attrs.colspan,l.attrs.rowspan>1&&(n=!0)}r==-1?r=s:r!=s&&(r=Math.max(r,s))}return r}function p_e(e,r,n){e.problems||(e.problems=[]);const i={};for(let o=0;o<e.map.length;o++){const s=e.map[o];if(i[s])continue;i[s]=!0;const a=n.nodeAt(s);if(!a)throw new RangeError("No cell with offset ".concat(s," found"));let l=null;const u=a.attrs;for(let c=0;c<u.colspan;c++){const d=(o+c)%e.width,h=r[d*2];h!=null&&(!u.colwidth||u.colwidth[c]!=h)&&((l||(l=f_e(u)))[c]=h)}l&&e.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function f_e(e){if(e.colwidth)return e.colwidth.slice();const r=[];for(let n=0;n<e.colspan;n++)r.push(0);return r}function dt(e){let r=e.cached.tableNodeTypes;if(!r){r=e.cached.tableNodeTypes={};for(const n in e.nodes){const i=e.nodes[n],o=i.spec.tableRole;o&&(r[o]=i)}}return r}var en=new ve("selectingCells");function go(e){for(let r=e.depth-1;r>0;r--)if(e.node(r).type.spec.tableRole=="row")return e.node(0).resolve(e.before(r+1));return null}function m_e(e){for(let r=e.depth;r>0;r--){const n=e.node(r).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(r)}return null}function Dt(e){const r=e.selection.$head;for(let n=r.depth;n>0;n--)if(r.node(n).type.spec.tableRole=="row")return!0;return!1}function Rs(e){const r=e.selection;if("$anchorCell"in r&&r.$anchorCell)return r.$anchorCell.pos>r.$headCell.pos?r.$anchorCell:r.$headCell;if("node"in r&&r.node&&r.node.type.spec.tableRole=="cell")return r.$anchor;const n=go(r.$head)||g_e(r.$head);if(n)return n;throw new RangeError("No cell found around position ".concat(r.head))}function g_e(e){for(let r=e.nodeAfter,n=e.pos;r;r=r.firstChild,n++){const i=r.type.spec.tableRole;if(i=="cell"||i=="header_cell")return e.doc.resolve(n)}for(let r=e.nodeBefore,n=e.pos;r;r=r.lastChild,n--){const i=r.type.spec.tableRole;if(i=="cell"||i=="header_cell")return e.doc.resolve(n-r.nodeSize)}}function $d(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function iv(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function mp(e,r){return e.depth==r.depth&&e.pos>=r.start(-1)&&e.pos<=r.end(-1)}function ov(e,r,n){const i=e.node(-1),o=He.get(i),s=e.start(-1),a=o.nextCell(e.pos-s,r,n);return a==null?null:e.node(0).resolve(s+a)}function ri(e,r,n=1){const i={...e,colspan:e.colspan-n};return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(r,n),i.colwidth.some(o=>o>0)||(i.colwidth=null)),i}function sv(e,r,n=1){const i={...e,colspan:e.colspan+n};if(i.colwidth){i.colwidth=i.colwidth.slice();for(let o=0;o<n;o++)i.colwidth.splice(r,0,0)}return i}function b_e(e,r,n){const i=dt(r.type.schema).header_cell;for(let o=0;o<e.height;o++)if(r.nodeAt(e.map[n+o*e.width]).type!=i)return!1;return!0}var Te=class Lr extends ne{constructor(r,n=r){const i=r.node(-1),o=He.get(i),s=r.start(-1),a=o.rectBetween(r.pos-s,n.pos-s),l=r.node(0),u=o.cellsInRect(a).filter(d=>d!=n.pos-s);u.unshift(n.pos-s);const c=u.map(d=>{const h=i.nodeAt(d);if(!h)throw RangeError("No cell with offset ".concat(d," found"));const p=s+d+1;return new Ig(l.resolve(p),l.resolve(p+h.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=r,this.$headCell=n}map(r,n){const i=r.resolve(n.map(this.$anchorCell.pos)),o=r.resolve(n.map(this.$headCell.pos));if($d(i)&&$d(o)&&mp(i,o)){const s=this.$anchorCell.node(-1)!=i.node(-1);return s&&this.isRowSelection()?Lr.rowSelection(i,o):s&&this.isColSelection()?Lr.colSelection(i,o):new Lr(i,o)}return Q.between(i,o)}content(){const r=this.$anchorCell.node(-1),n=He.get(r),i=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),s={},a=[];for(let u=o.top;u<o.bottom;u++){const c=[];for(let d=u*n.width+o.left,h=o.left;h<o.right;h++,d++){const p=n.map[d];if(s[p])continue;s[p]=!0;const f=n.findCell(p);let m=r.nodeAt(p);if(!m)throw RangeError("No cell with offset ".concat(p," found"));const b=o.left-f.left,g=f.right-o.right;if(b>0||g>0){let y=m.attrs;if(b>0&&(y=ri(y,0,b)),g>0&&(y=ri(y,y.colspan-g,g)),f.left<o.left){if(m=m.type.createAndFill(y),!m)throw RangeError("Could not create cell with attrs ".concat(JSON.stringify(y)))}else m=m.type.create(y,m.content)}if(f.top<o.top||f.bottom>o.bottom){const y={...m.attrs,rowspan:Math.min(f.bottom,o.bottom)-Math.max(f.top,o.top)};f.top<o.top?m=m.type.createAndFill(y):m=m.type.create(y,m.content)}c.push(m)}a.push(r.child(u).copy(O.from(c)))}const l=this.isColSelection()&&this.isRowSelection()?r:a;return new $(O.from(l),1,1)}replace(r,n=$.empty){const i=r.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){const{$from:l,$to:u}=o[a],c=r.mapping.slice(i);r.replace(c.map(l.pos),c.map(u.pos),a?$.empty:n)}const s=ne.findFrom(r.doc.resolve(r.mapping.slice(i).map(this.to)),-1);s&&r.setSelection(s)}replaceWith(r,n){this.replace(r,new $(O.from(n),0,0))}forEachCell(r){const n=this.$anchorCell.node(-1),i=He.get(n),o=this.$anchorCell.start(-1),s=i.cellsInRect(i.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let a=0;a<s.length;a++)r(n.nodeAt(s[a]),o+s[a])}isColSelection(){const r=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(r,n)>0)return!1;const i=r+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(i,o)==this.$headCell.node(-1).childCount}static colSelection(r,n=r){const i=r.node(-1),o=He.get(i),s=r.start(-1),a=o.findCell(r.pos-s),l=o.findCell(n.pos-s),u=r.node(0);return a.top<=l.top?(a.top>0&&(r=u.resolve(s+o.map[a.left])),l.bottom<o.height&&(n=u.resolve(s+o.map[o.width*(o.height-1)+l.right-1]))):(l.top>0&&(n=u.resolve(s+o.map[l.left])),a.bottom<o.height&&(r=u.resolve(s+o.map[o.width*(o.height-1)+a.right-1]))),new Lr(r,n)}isRowSelection(){const r=this.$anchorCell.node(-1),n=He.get(r),i=this.$anchorCell.start(-1),o=n.colCount(this.$anchorCell.pos-i),s=n.colCount(this.$headCell.pos-i);if(Math.min(o,s)>0)return!1;const a=o+this.$anchorCell.nodeAfter.attrs.colspan,l=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,l)==n.width}eq(r){return r instanceof Lr&&r.$anchorCell.pos==this.$anchorCell.pos&&r.$headCell.pos==this.$headCell.pos}static rowSelection(r,n=r){const i=r.node(-1),o=He.get(i),s=r.start(-1),a=o.findCell(r.pos-s),l=o.findCell(n.pos-s),u=r.node(0);return a.left<=l.left?(a.left>0&&(r=u.resolve(s+o.map[a.top*o.width])),l.right<o.width&&(n=u.resolve(s+o.map[o.width*(l.top+1)-1]))):(l.left>0&&(n=u.resolve(s+o.map[l.top*o.width])),a.right<o.width&&(r=u.resolve(s+o.map[o.width*(a.top+1)-1]))),new Lr(r,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(r,n){return new Lr(r.resolve(n.anchor),r.resolve(n.head))}static create(r,n,i=n){return new Lr(r.resolve(n),r.resolve(i))}getBookmark(){return new y_e(this.$anchorCell.pos,this.$headCell.pos)}};Te.prototype.visible=!1,ne.jsonID("cell",Te);var y_e=class av{constructor(r,n){this.anchor=r,this.head=n}map(r){return new av(r.map(this.anchor),r.map(this.head))}resolve(r){const n=r.resolve(this.anchor),i=r.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&i.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&i.index()<i.parent.childCount&&mp(n,i)?new Te(n,i):ne.near(i,1)}};function C_e(e){if(!(e.selection instanceof Te))return null;const r=[];return e.selection.forEachCell((n,i)=>{r.push(ze.node(i,i+n.nodeSize,{class:"selectedCell"}))}),ye.create(e.doc,r)}function v_e({$from:e,$to:r}){if(e.pos==r.pos||e.pos<e.pos-6)return!1;let n=e.pos,i=r.pos,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,n++);for(let s=r.depth;s>=0&&!(r.before(s+1)>r.start(s));s--,i--);return n==i&&/row|table/.test(e.node(o).type.spec.tableRole)}function k_e({$from:e,$to:r}){let n,i;for(let o=e.depth;o>0;o--){const s=e.node(o);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}for(let o=r.depth;o>0;o--){const s=r.node(o);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){i=s;break}}return n!==i&&r.parentOffset===0}function w_e(e,r,n){const i=(r||e).selection,o=(r||e).doc;let s,a;if(i instanceof ee&&(a=i.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")s=Te.create(o,i.from);else if(a=="row"){const l=o.resolve(i.from+1);s=Te.rowSelection(l,l)}else if(!n){const l=He.get(i.node),u=i.from+1,c=u+l.map[l.width*l.height-1];s=Te.create(o,u+1,c)}}else i instanceof Q&&v_e(i)?s=Q.create(o,i.from):i instanceof Q&&k_e(i)&&(s=Q.create(o,i.$from.start(),i.$from.end()));return s&&(r||(r=e.tr)).setSelection(s),r}var A_e=new ve("fix-tables");function lv(e,r,n,i){const o=e.childCount,s=r.childCount;e:for(let a=0,l=0;a<s;a++){const u=r.child(a);for(let c=l,d=Math.min(o,a+3);c<d;c++)if(e.child(c)==u){l=c+1,n+=u.nodeSize;continue e}i(u,n),l<o&&e.child(l).sameMarkup(u)?lv(e.child(l),u,n+1,i):u.nodesBetween(0,u.content.size,i,n+1),n+=u.nodeSize}}function uv(e,r){let n;const i=(o,s)=>{o.type.spec.tableRole=="table"&&(n=__e(e,o,s,n))};return r?r.doc!=e.doc&&lv(r.doc,e.doc,0,i):e.doc.descendants(i),n}function __e(e,r,n,i){const o=He.get(r);if(!o.problems)return i;i||(i=e.tr);const s=[];for(let u=0;u<o.height;u++)s.push(0);for(let u=0;u<o.problems.length;u++){const c=o.problems[u];if(c.type=="collision"){const d=r.nodeAt(c.pos);if(!d)continue;const h=d.attrs;for(let p=0;p<h.rowspan;p++)s[c.row+p]+=c.n;i.setNodeMarkup(i.mapping.map(n+1+c.pos),null,ri(h,h.colspan-c.n,c.n))}else if(c.type=="missing")s[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const d=r.nodeAt(c.pos);if(!d)continue;i.setNodeMarkup(i.mapping.map(n+1+c.pos),null,{...d.attrs,rowspan:d.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const d=r.nodeAt(c.pos);if(!d)continue;i.setNodeMarkup(i.mapping.map(n+1+c.pos),null,{...d.attrs,colwidth:c.colwidth})}}let a,l;for(let u=0;u<s.length;u++)s[u]&&(a==null&&(a=u),l=u);for(let u=0,c=n+1;u<o.height;u++){const d=r.child(u),h=c+d.nodeSize,p=s[u];if(p>0){let f="cell";d.firstChild&&(f=d.firstChild.type.spec.tableRole);const m=[];for(let g=0;g<p;g++){const y=dt(e.schema)[f].createAndFill();y&&m.push(y)}const b=(u==0||a==u-1)&&l==u?c+1:h-1;i.insert(i.mapping.map(b),m)}c=h}return i.setMeta(A_e,{fixTables:!0})}function E_e(e){if(!e.size)return null;let{content:r,openStart:n,openEnd:i}=e;for(;r.childCount==1&&(n>0&&i>0||r.child(0).type.spec.tableRole=="table");)n--,i--,r=r.child(0).content;const o=r.child(0),s=o.type.spec.tableRole,a=o.type.schema,l=[];if(s=="row")for(let u=0;u<r.childCount;u++){let c=r.child(u).content;const d=u?0:Math.max(0,n-1),h=u<r.childCount-1?0:Math.max(0,i-1);(d||h)&&(c=Hd(dt(a).row,new $(c,d,h)).content),l.push(c)}else if(s=="cell"||s=="header_cell")l.push(n||i?Hd(dt(a).row,new $(r,n,i)).content:r);else return null;return x_e(a,l)}function x_e(e,r){const n=[];for(let o=0;o<r.length;o++){const s=r[o];for(let a=s.childCount-1;a>=0;a--){const{rowspan:l,colspan:u}=s.child(a).attrs;for(let c=o;c<o+l;c++)n[c]=(n[c]||0)+u}}let i=0;for(let o=0;o<n.length;o++)i=Math.max(i,n[o]);for(let o=0;o<n.length;o++)if(o>=r.length&&r.push(O.empty),n[o]<i){const s=dt(e).cell.createAndFill(),a=[];for(let l=n[o];l<i;l++)a.push(s);r[o]=r[o].append(O.from(a))}return{height:r.length,width:i,rows:r}}function Hd(e,r){const n=e.createAndFill();return new Jd(n).replace(0,n.content.size,r).doc}function D_e({width:e,height:r,rows:n},i,o){if(e!=i){const s=[],a=[];for(let l=0;l<n.length;l++){const u=n[l],c=[];for(let d=s[l]||0,h=0;d<i;h++){let p=u.child(h%u.childCount);d+p.attrs.colspan>i&&(p=p.type.createChecked(ri(p.attrs,p.attrs.colspan,d+p.attrs.colspan-i),p.content)),c.push(p),d+=p.attrs.colspan;for(let f=1;f<p.attrs.rowspan;f++)s[l+f]=(s[l+f]||0)+p.attrs.colspan}a.push(O.from(c))}n=a,e=i}if(r!=o){const s=[];for(let a=0,l=0;a<o;a++,l++){const u=[],c=n[l%r];for(let d=0;d<c.childCount;d++){let h=c.child(d);a+h.attrs.rowspan>o&&(h=h.type.create({...h.attrs,rowspan:Math.max(1,o-h.attrs.rowspan)},h.content)),u.push(h)}s.push(O.from(u))}n=s,r=o}return{width:e,height:r,rows:n}}function S_e(e,r,n,i,o,s,a){const l=e.doc.type.schema,u=dt(l);let c,d;if(o>r.width)for(let h=0,p=0;h<r.height;h++){const f=n.child(h);p+=f.nodeSize;const m=[];let b;f.lastChild==null||f.lastChild.type==u.cell?b=c||(c=u.cell.createAndFill()):b=d||(d=u.header_cell.createAndFill());for(let g=r.width;g<o;g++)m.push(b);e.insert(e.mapping.slice(a).map(p-1+i),m)}if(s>r.height){const h=[];for(let m=0,b=(r.height-1)*r.width;m<Math.max(r.width,o);m++){const g=m>=r.width?!1:n.nodeAt(r.map[b+m]).type==u.header_cell;h.push(g?d||(d=u.header_cell.createAndFill()):c||(c=u.cell.createAndFill()))}const p=u.row.create(null,O.from(h)),f=[];for(let m=r.height;m<s;m++)f.push(p);e.insert(e.mapping.slice(a).map(i+n.nodeSize-2),f)}return!!(c||d)}function C1(e,r,n,i,o,s,a,l){if(a==0||a==r.height)return!1;let u=!1;for(let c=o;c<s;c++){const d=a*r.width+c,h=r.map[d];if(r.map[d-r.width]==h){u=!0;const p=n.nodeAt(h),{top:f,left:m}=r.findCell(h);e.setNodeMarkup(e.mapping.slice(l).map(h+i),null,{...p.attrs,rowspan:a-f}),e.insert(e.mapping.slice(l).map(r.positionAt(a,m,n)),p.type.createAndFill({...p.attrs,rowspan:f+p.attrs.rowspan-a})),c+=p.attrs.colspan-1}}return u}function v1(e,r,n,i,o,s,a,l){if(a==0||a==r.width)return!1;let u=!1;for(let c=o;c<s;c++){const d=c*r.width+a,h=r.map[d];if(r.map[d-1]==h){u=!0;const p=n.nodeAt(h),f=r.colCount(h),m=e.mapping.slice(l).map(h+i);e.setNodeMarkup(m,null,ri(p.attrs,a-f,p.attrs.colspan-(a-f))),e.insert(m+p.nodeSize,p.type.createAndFill(ri(p.attrs,0,a-f))),c+=p.attrs.rowspan-1}}return u}function k1(e,r,n,i,o){let s=n?e.doc.nodeAt(n-1):e.doc;if(!s)throw new Error("No table found");let a=He.get(s);const{top:l,left:u}=i,c=u+o.width,d=l+o.height,h=e.tr;let p=0;function f(){if(s=n?h.doc.nodeAt(n-1):h.doc,!s)throw new Error("No table found");a=He.get(s),p=h.mapping.maps.length}S_e(h,a,s,n,c,d,p)&&f(),C1(h,a,s,n,u,c,l,p)&&f(),C1(h,a,s,n,u,c,d,p)&&f(),v1(h,a,s,n,l,d,u,p)&&f(),v1(h,a,s,n,l,d,c,p)&&f();for(let m=l;m<d;m++){const b=a.positionAt(m,u,s),g=a.positionAt(m,c,s);h.replace(h.mapping.slice(p).map(b+n),h.mapping.slice(p).map(g+n),new $(o.rows[m-l],0,0))}f(),h.setSelection(new Te(h.doc.resolve(n+a.positionAt(l,u,s)),h.doc.resolve(n+a.positionAt(d-1,c-1,s)))),r(h)}var B_e=oh({ArrowLeft:pa("horiz",-1),ArrowRight:pa("horiz",1),ArrowUp:pa("vert",-1),ArrowDown:pa("vert",1),"Shift-ArrowLeft":fa("horiz",-1),"Shift-ArrowRight":fa("horiz",1),"Shift-ArrowUp":fa("vert",-1),"Shift-ArrowDown":fa("vert",1),Backspace:ma,"Mod-Backspace":ma,Delete:ma,"Mod-Delete":ma});function Ia(e,r,n){return n.eq(e.selection)?!1:(r&&r(e.tr.setSelection(n).scrollIntoView()),!0)}function pa(e,r){return(n,i,o)=>{if(!o)return!1;const s=n.selection;if(s instanceof Te)return Ia(n,i,ne.near(s.$headCell,r));if(e!="horiz"&&!s.empty)return!1;const a=cv(o,e,r);if(a==null)return!1;if(e=="horiz")return Ia(n,i,ne.near(n.doc.resolve(s.head+r),r));{const l=n.doc.resolve(a),u=ov(l,e,r);let c;return u?c=ne.near(u,1):r<0?c=ne.near(n.doc.resolve(l.before(-1)),-1):c=ne.near(n.doc.resolve(l.after(-1)),1),Ia(n,i,c)}}}function fa(e,r){return(n,i,o)=>{if(!o)return!1;const s=n.selection;let a;if(s instanceof Te)a=s;else{const u=cv(o,e,r);if(u==null)return!1;a=new Te(n.doc.resolve(u))}const l=ov(a.$headCell,e,r);return l?Ia(n,i,new Te(a.$anchorCell,l)):!1}}function ma(e,r){const n=e.selection;if(!(n instanceof Te))return!1;if(r){const i=e.tr,o=dt(e.schema).cell.createAndFill().content;n.forEachCell((s,a)=>{s.content.eq(o)||i.replace(i.mapping.map(a+1),i.mapping.map(a+s.nodeSize-1),new $(o,0,0))}),i.docChanged&&r(i)}return!0}function M_e(e,r){const n=e.state.doc,i=go(n.resolve(r));return i?(e.dispatch(e.state.tr.setSelection(new Te(i))),!0):!1}function F_e(e,r,n){if(!Dt(e.state))return!1;let i=E_e(n);const o=e.state.selection;if(o instanceof Te){i||(i={width:1,height:1,rows:[O.from(Hd(dt(e.state.schema).cell,n))]});const s=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),l=He.get(s).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return i=D_e(i,l.right-l.left,l.bottom-l.top),k1(e.state,e.dispatch,a,l,i),!0}else if(i){const s=Rs(e.state),a=s.start(-1);return k1(e.state,e.dispatch,a,He.get(s.node(-1)).findCell(s.pos-a),i),!0}else return!1}function N_e(e,r){var n;if(r.ctrlKey||r.metaKey)return;const i=w1(e,r.target);let o;if(r.shiftKey&&e.state.selection instanceof Te)s(e.state.selection.$anchorCell,r),r.preventDefault();else if(r.shiftKey&&i&&(o=go(e.state.selection.$anchor))!=null&&((n=$c(e,r))==null?void 0:n.pos)!=o.pos)s(o,r),r.preventDefault();else if(!i)return;function s(u,c){let d=$c(e,c);const h=en.getState(e.state)==null;if(!d||!mp(u,d))if(h)d=u;else return;const p=new Te(u,d);if(h||!e.state.selection.eq(p)){const f=e.state.tr.setSelection(p);h&&f.setMeta(en,u.pos),e.dispatch(f)}}function a(){e.root.removeEventListener("mouseup",a),e.root.removeEventListener("dragstart",a),e.root.removeEventListener("mousemove",l),en.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(en,-1))}function l(u){const c=u,d=en.getState(e.state);let h;if(d!=null)h=e.state.doc.resolve(d);else if(w1(e,c.target)!=i&&(h=$c(e,r),!h))return a();h&&s(h,c)}e.root.addEventListener("mouseup",a),e.root.addEventListener("dragstart",a),e.root.addEventListener("mousemove",l)}function cv(e,r,n){if(!(e.state.selection instanceof Q))return null;const{$head:i}=e.state.selection;for(let o=i.depth-1;o>=0;o--){const s=i.node(o);if((n<0?i.index(o):i.indexAfter(o))!=(n<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const a=i.before(o),l=r=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?a:null}}return null}function w1(e,r){for(;r&&r!=e.dom;r=r.parentNode)if(r.nodeName=="TD"||r.nodeName=="TH")return r;return null}function $c(e,r){const n=e.posAtCoords({left:r.clientX,top:r.clientY});return n&&n?go(e.state.doc.resolve(n.pos)):null}var O_e=class{constructor(e,r){this.node=e,this.cellMinWidth=r,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Pd(e,this.colgroup,this.table,r),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,Pd(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Pd(e,r,n,i,o,s){var a;let l=0,u=!0,c=r.firstChild;const d=e.firstChild;if(d){for(let h=0,p=0;h<d.childCount;h++){const{colspan:f,colwidth:m}=d.child(h).attrs;for(let b=0;b<f;b++,p++){const g=o==p?s:m&&m[b],y=g?g+"px":"";l+=g||i,g||(u=!1),c?(c.style.width!=y&&(c.style.width=y),c=c.nextSibling):r.appendChild(document.createElement("col")).style.width=y}}for(;c;){const h=c.nextSibling;(a=c.parentNode)==null||a.removeChild(c),c=h}u?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var Wt=new ve("tableColumnResizing");function T_e({handleWidth:e=5,cellMinWidth:r=25,View:n=O_e,lastColumnResizable:i=!0}={}){const o=new fe({key:Wt,state:{init(s,a){var l,u;const c=(u=(l=o.spec)==null?void 0:l.props)==null?void 0:u.nodeViews,d=dt(a.schema).table.name;return n&&c&&(c[d]=(h,p)=>new n(h,r,p)),new L_e(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=Wt.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{I_e(s,a,e,r,i)},mouseleave:s=>{R_e(s)},mousedown:(s,a)=>{z_e(s,a,r)}},decorations:s=>{const a=Wt.getState(s);if(a&&a.activeHandle>-1)return q_e(s,a.activeHandle)},nodeViews:{}}});return o}var L_e=class Ra{constructor(r,n){this.activeHandle=r,this.dragging=n}apply(r){const n=this,i=r.getMeta(Wt);if(i&&i.setHandle!=null)return new Ra(i.setHandle,!1);if(i&&i.setDragging!==void 0)return new Ra(n.activeHandle,i.setDragging);if(n.activeHandle>-1&&r.docChanged){let o=r.mapping.map(n.activeHandle,-1);return $d(r.doc.resolve(o))||(o=-1),new Ra(o,n.dragging)}return n}};function I_e(e,r,n,i,o){const s=Wt.getState(e.state);if(s&&!s.dragging){const a=H_e(r.target);let l=-1;if(a){const{left:u,right:c}=a.getBoundingClientRect();r.clientX-u<=n?l=A1(e,r,"left",n):c-r.clientX<=n&&(l=A1(e,r,"right",n))}if(l!=s.activeHandle){if(!o&&l!==-1){const u=e.state.doc.resolve(l),c=u.node(-1),d=He.get(c),h=u.start(-1);if(d.colCount(u.pos-h)+u.nodeAfter.attrs.colspan-1==d.width-1)return}dv(e,l)}}}function R_e(e){const r=Wt.getState(e.state);r&&r.activeHandle>-1&&!r.dragging&&dv(e,-1)}function z_e(e,r,n){var i;const o=(i=e.dom.ownerDocument.defaultView)!=null?i:window,s=Wt.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=e.state.doc.nodeAt(s.activeHandle),l=$_e(e,s.activeHandle,a.attrs);e.dispatch(e.state.tr.setMeta(Wt,{setDragging:{startX:r.clientX,startWidth:l}}));function u(d){o.removeEventListener("mouseup",u),o.removeEventListener("mousemove",c);const h=Wt.getState(e.state);h!=null&&h.dragging&&(P_e(e,h.activeHandle,_1(h.dragging,d,n)),e.dispatch(e.state.tr.setMeta(Wt,{setDragging:null})))}function c(d){if(!d.which)return u(d);const h=Wt.getState(e.state);if(h&&h.dragging){const p=_1(h.dragging,d,n);V_e(e,h.activeHandle,p,n)}}return o.addEventListener("mouseup",u),o.addEventListener("mousemove",c),r.preventDefault(),!0}function $_e(e,r,{colspan:n,colwidth:i}){const o=i&&i[i.length-1];if(o)return o;const s=e.domAtPos(r);let a=s.node.childNodes[s.offset].offsetWidth,l=n;if(i)for(let u=0;u<n;u++)i[u]&&(a-=i[u],l--);return a/l}function H_e(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function A1(e,r,n,i){const o=n=="right"?-i:i,s=e.posAtCoords({left:r.clientX+o,top:r.clientY});if(!s)return-1;const{pos:a}=s,l=go(e.state.doc.resolve(a));if(!l)return-1;if(n=="right")return l.pos;const u=He.get(l.node(-1)),c=l.start(-1),d=u.map.indexOf(l.pos-c);return d%u.width==0?-1:c+u.map[d-1]}function _1(e,r,n){const i=r.clientX-e.startX;return Math.max(n,e.startWidth+i)}function dv(e,r){e.dispatch(e.state.tr.setMeta(Wt,{setHandle:r}))}function P_e(e,r,n){const i=e.state.doc.resolve(r),o=i.node(-1),s=He.get(o),a=i.start(-1),l=s.colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1,u=e.state.tr;for(let c=0;c<s.height;c++){const d=c*s.width+l;if(c&&s.map[d]==s.map[d-s.width])continue;const h=s.map[d],p=o.nodeAt(h).attrs,f=p.colspan==1?0:l-s.colCount(h);if(p.colwidth&&p.colwidth[f]==n)continue;const m=p.colwidth?p.colwidth.slice():j_e(p.colspan);m[f]=n,u.setNodeMarkup(a+h,null,{...p,colwidth:m})}u.docChanged&&e.dispatch(u)}function V_e(e,r,n,i){const o=e.state.doc.resolve(r),s=o.node(-1),a=o.start(-1),l=He.get(s).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1;let u=e.domAtPos(o.start(-1)).node;for(;u&&u.nodeName!="TABLE";)u=u.parentNode;u&&Pd(s,u.firstChild,u,i,l,n)}function j_e(e){return Array(e).fill(0)}function q_e(e,r){const n=[],i=e.doc.resolve(r),o=i.node(-1);if(!o)return ye.empty;const s=He.get(o),a=i.start(-1),l=s.colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1;for(let u=0;u<s.height;u++){const c=l+u*s.width;if((l==s.width-1||s.map[c]!=s.map[c+1])&&(u==0||s.map[c]!=s.map[c-s.width])){const d=s.map[c],h=a+d+o.nodeAt(d).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",n.push(ze.widget(h,p))}}return ye.create(e.doc,n)}function Xt(e){const r=e.selection,n=Rs(e),i=n.node(-1),o=n.start(-1),s=He.get(i);return{...r instanceof Te?s.rectBetween(r.$anchorCell.pos-o,r.$headCell.pos-o):s.findCell(n.pos-o),tableStart:o,map:s,table:i}}function hv(e,{map:r,tableStart:n,table:i},o){let s=o>0?-1:0;b_e(r,i,o+s)&&(s=o==0||o==r.width?null:0);for(let a=0;a<r.height;a++){const l=a*r.width+o;if(o>0&&o<r.width&&r.map[l-1]==r.map[l]){const u=r.map[l],c=i.nodeAt(u);e.setNodeMarkup(e.mapping.map(n+u),null,sv(c.attrs,o-r.colCount(u))),a+=c.attrs.rowspan-1}else{const u=s==null?dt(i.type.schema).cell:i.nodeAt(r.map[l+s]).type,c=r.positionAt(a,o,i);e.insert(e.mapping.map(n+c),u.createAndFill())}}return e}function U_e(e,r){if(!Dt(e))return!1;if(r){const n=Xt(e);r(hv(e.tr,n,n.left))}return!0}function W_e(e,r){if(!Dt(e))return!1;if(r){const n=Xt(e);r(hv(e.tr,n,n.right))}return!0}function K_e(e,{map:r,table:n,tableStart:i},o){const s=e.mapping.maps.length;for(let a=0;a<r.height;){const l=a*r.width+o,u=r.map[l],c=n.nodeAt(u),d=c.attrs;if(o>0&&r.map[l-1]==u||o<r.width-1&&r.map[l+1]==u)e.setNodeMarkup(e.mapping.slice(s).map(i+u),null,ri(d,o-r.colCount(u)));else{const h=e.mapping.slice(s).map(i+u);e.delete(h,h+c.nodeSize)}a+=d.rowspan}}function Z_e(e,r){if(!Dt(e))return!1;if(r){const n=Xt(e),i=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;K_e(i,n,o),o!=n.left;o--){const s=n.tableStart?i.doc.nodeAt(n.tableStart-1):i.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=He.get(s)}r(i)}return!0}function G_e(e,r,n){var i;const o=dt(r.type.schema).header_cell;for(let s=0;s<e.width;s++)if(((i=r.nodeAt(e.map[s+n*e.width]))==null?void 0:i.type)!=o)return!1;return!0}function pv(e,{map:r,tableStart:n,table:i},o){var s;let a=n;for(let c=0;c<o;c++)a+=i.child(c).nodeSize;const l=[];let u=o>0?-1:0;G_e(r,i,o+u)&&(u=o==0||o==r.height?null:0);for(let c=0,d=r.width*o;c<r.width;c++,d++)if(o>0&&o<r.height&&r.map[d]==r.map[d-r.width]){const h=r.map[d],p=i.nodeAt(h).attrs;e.setNodeMarkup(n+h,null,{...p,rowspan:p.rowspan+1}),c+=p.colspan-1}else{const h=u==null?dt(i.type.schema).cell:(s=i.nodeAt(r.map[d+u*r.width]))==null?void 0:s.type,p=h==null?void 0:h.createAndFill();p&&l.push(p)}return e.insert(a,dt(i.type.schema).row.create(null,l)),e}function fv(e,r){if(!Dt(e))return!1;if(r){const n=Xt(e);r(pv(e.tr,n,n.top))}return!0}function mv(e,r){if(!Dt(e))return!1;if(r){const n=Xt(e);r(pv(e.tr,n,n.bottom))}return!0}function J_e(e,{map:r,table:n,tableStart:i},o){let s=0;for(let c=0;c<o;c++)s+=n.child(c).nodeSize;const a=s+n.child(o).nodeSize,l=e.mapping.maps.length;e.delete(s+i,a+i);const u=new Set;for(let c=0,d=o*r.width;c<r.width;c++,d++){const h=r.map[d];if(!u.has(h)){if(u.add(h),o>0&&h==r.map[d-r.width]){const p=n.nodeAt(h).attrs;e.setNodeMarkup(e.mapping.slice(l).map(h+i),null,{...p,rowspan:p.rowspan-1}),c+=p.colspan-1}else if(o<r.height&&h==r.map[d+r.width]){const p=n.nodeAt(h),f=p.attrs,m=p.type.create({...f,rowspan:p.attrs.rowspan-1},p.content),b=r.positionAt(o+1,c,n);e.insert(e.mapping.slice(l).map(i+b),m),c+=f.colspan-1}}}}function X_e(e,r){if(!Dt(e))return!1;if(r){const n=Xt(e),i=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;J_e(i,n,o),o!=n.top;o--){const s=n.tableStart?i.doc.nodeAt(n.tableStart-1):i.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=He.get(n.table)}r(i)}return!0}function E1(e){const r=e.content;return r.childCount==1&&r.child(0).isTextblock&&r.child(0).childCount==0}function Q_e({width:e,height:r,map:n},i){let o=i.top*e+i.left,s=o,a=(i.bottom-1)*e+i.left,l=o+(i.right-i.left-1);for(let u=i.top;u<i.bottom;u++){if(i.left>0&&n[s]==n[s-1]||i.right<e&&n[l]==n[l+1])return!0;s+=e,l+=e}for(let u=i.left;u<i.right;u++){if(i.top>0&&n[o]==n[o-e]||i.bottom<r&&n[a]==n[a+e])return!0;o++,a++}return!1}function x1(e,r){const n=e.selection;if(!(n instanceof Te)||n.$anchorCell.pos==n.$headCell.pos)return!1;const i=Xt(e),{map:o}=i;if(Q_e(o,i))return!1;if(r){const s=e.tr,a={};let l=O.empty,u,c;for(let d=i.top;d<i.bottom;d++)for(let h=i.left;h<i.right;h++){const p=o.map[d*o.width+h],f=i.table.nodeAt(p);if(!(a[p]||!f))if(a[p]=!0,u==null)u=p,c=f;else{E1(f)||(l=l.append(f.content));const m=s.mapping.map(p+i.tableStart);s.delete(m,m+f.nodeSize)}}if(u==null||c==null)return!0;if(s.setNodeMarkup(u+i.tableStart,null,{...sv(c.attrs,c.attrs.colspan,i.right-i.left-c.attrs.colspan),rowspan:i.bottom-i.top}),l.size){const d=u+1+c.content.size,h=E1(c)?u+1:d;s.replaceWith(h+i.tableStart,d+i.tableStart,l)}s.setSelection(new Te(s.doc.resolve(u+i.tableStart))),r(s)}return!0}function D1(e,r){const n=dt(e.schema);return Y_e(({node:i})=>n[i.type.spec.tableRole])(e,r)}function Y_e(e){return(r,n)=>{var i;const o=r.selection;let s,a;if(o instanceof Te){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;s=o.$anchorCell.nodeAfter,a=o.$anchorCell.pos}else{if(s=m_e(o.$from),!s)return!1;a=(i=go(o.$from))==null?void 0:i.pos}if(s==null||a==null||s.attrs.colspan==1&&s.attrs.rowspan==1)return!1;if(n){let l=s.attrs;const u=[],c=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});const d=Xt(r),h=r.tr;for(let f=0;f<d.right-d.left;f++)u.push(c?{...l,colwidth:c&&c[f]?[c[f]]:null}:l);let p;for(let f=d.top;f<d.bottom;f++){let m=d.map.positionAt(f,d.left,d.table);f==d.top&&(m+=s.nodeSize);for(let b=d.left,g=0;b<d.right;b++,g++)b==d.left&&f==d.top||h.insert(p=h.mapping.map(m+d.tableStart,1),e({node:s,row:f,col:b}).createAndFill(u[g]))}h.setNodeMarkup(a,e({node:s,row:d.top,col:d.left}),u[0]),o instanceof Te&&h.setSelection(new Te(h.doc.resolve(o.$anchorCell.pos),p?h.doc.resolve(p):void 0)),n(h)}return!0}}function eEe(e,r){return function(n,i){if(!Dt(n))return!1;const o=Rs(n);if(o.nodeAfter.attrs[e]===r)return!1;if(i){const s=n.tr;n.selection instanceof Te?n.selection.forEachCell((a,l)=>{a.attrs[e]!==r&&s.setNodeMarkup(l,null,{...a.attrs,[e]:r})}):s.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:r}),i(s)}return!0}}function tEe(e){return function(r,n){if(!Dt(r))return!1;if(n){const i=dt(r.schema),o=Xt(r),s=r.tr,a=o.map.cellsInRect(e=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:e=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=a.map(u=>o.table.nodeAt(u));for(let u=0;u<a.length;u++)l[u].type==i.header_cell&&s.setNodeMarkup(o.tableStart+a[u],i.cell,l[u].attrs);if(s.steps.length==0)for(let u=0;u<a.length;u++)s.setNodeMarkup(o.tableStart+a[u],i.header_cell,l[u].attrs);n(s)}return!0}}function S1(e,r,n){const i=r.map.cellsInRect({left:0,top:0,right:e=="row"?r.map.width:1,bottom:e=="column"?r.map.height:1});for(let o=0;o<i.length;o++){const s=r.table.nodeAt(i[o]);if(s&&s.type!==n.header_cell)return!1}return!0}function ws(e,r){return r=r||{useDeprecatedLogic:!1},r.useDeprecatedLogic?tEe(e):function(n,i){if(!Dt(n))return!1;if(i){const o=dt(n.schema),s=Xt(n),a=n.tr,l=S1("row",s,o),u=S1("column",s,o),c=(e==="column"?l:e==="row"&&u)?1:0,d=e=="column"?{left:0,top:c,right:1,bottom:s.map.height}:e=="row"?{left:c,top:0,right:s.map.width,bottom:1}:s,h=e=="column"?u?o.cell:o.header_cell:e=="row"?l?o.cell:o.header_cell:o.cell;s.map.cellsInRect(d).forEach(p=>{const f=p+s.tableStart,m=a.doc.nodeAt(f);m&&a.setNodeMarkup(f,h,m.attrs)}),i(a)}return!0}}ws("row",{useDeprecatedLogic:!0}),ws("column",{useDeprecatedLogic:!0});var rEe=ws("cell",{useDeprecatedLogic:!0});function nEe(e,r){if(r<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let i=e.index(-1)-1,o=e.before();i>=0;i--){const s=e.node(-1).child(i),a=s.lastChild;if(a)return o-1-a.nodeSize;o-=s.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let i=e.indexAfter(-1),o=e.after();i<n.childCount;i++){const s=n.child(i);if(s.childCount)return o+1;o+=s.nodeSize}}return null}function B1(e){return function(r,n){if(!Dt(r))return!1;const i=nEe(Rs(r),e);if(i==null)return!1;if(n){const o=r.doc.resolve(i);n(r.tr.setSelection(Q.between(o,iv(o))).scrollIntoView())}return!0}}function iEe(e,r){const n=e.selection.$anchor;for(let i=n.depth;i>0;i--)if(n.node(i).type.spec.tableRole=="table")return r&&r(e.tr.delete(n.before(i),n.after(i)).scrollIntoView()),!0;return!1}function oEe({allowTableNodeSelection:e=!1}={}){return new fe({key:en,state:{init(){return null},apply(r,n){const i=r.getMeta(en);if(i!=null)return i==-1?null:i;if(n==null||!r.docChanged)return n;const{deleted:o,pos:s}=r.mapping.mapResult(n);return o?null:s}},props:{decorations:C_e,handleDOMEvents:{mousedown:N_e},createSelectionBetween(r){return en.getState(r.state)!=null?r.state.selection:null},handleTripleClick:M_e,handleKeyDown:B_e,handlePaste:F_e},appendTransaction(r,n,i){return w_e(i,uv(i,n),e)}})}function M1(e,r,n,i,o,s){let a=0,l=!0,u=r.firstChild;const c=e.firstChild;for(let d=0,h=0;d<c.childCount;d+=1){const{colspan:p,colwidth:f}=c.child(d).attrs;for(let m=0;m<p;m+=1,h+=1){const b=o===h?s:f&&f[m],g=b?"".concat(b,"px"):"";a+=b||i,b||(l=!1),u?(u.style.width!==g&&(u.style.width=g),u=u.nextSibling):r.appendChild(document.createElement("col")).style.width=g}}for(;u;){const d=u.nextSibling;u.parentNode.removeChild(u),u=d}l?(n.style.width="".concat(a,"px"),n.style.minWidth=""):(n.style.width="",n.style.minWidth="".concat(a,"px"))}let sEe=class{constructor(e,r){this.node=e,this.cellMinWidth=r,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),M1(e,this.colgroup,this.table,r),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,M1(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}};function aEe(e,r,n,i){let o=0,s=!0;const a=[],l=e.firstChild;if(!l)return{};for(let d=0,h=0;d<l.childCount;d+=1){const{colspan:p,colwidth:f}=l.child(d).attrs;for(let m=0;m<p;m+=1,h+=1){const b=n===h?i:f&&f[m],g=b?"".concat(b,"px"):"";o+=b||r,b||(s=!1),a.push(["col",g?{style:"width: ".concat(g)}:{}])}}const u=s?"".concat(o,"px"):"",c=s?"":"".concat(o,"px");return{colgroup:["colgroup",{},...a],tableWidth:u,tableMinWidth:c}}function F1(e,r){return e.createAndFill()}function lEe(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const r={};return Object.keys(e.nodes).forEach(n=>{const i=e.nodes[n];i.spec.tableRole&&(r[i.spec.tableRole]=i)}),e.cached.tableNodeTypes=r,r}function uEe(e,r,n,i,o){const s=lEe(e),a=[],l=[];for(let c=0;c<n;c+=1){const d=F1(s.cell);if(d&&l.push(d),i){const h=F1(s.header_cell);h&&a.push(h)}}const u=[];for(let c=0;c<r;c+=1)u.push(s.row.createChecked(null,i&&c===0?a:l));return s.table.createChecked(null,u)}function cEe(e){return e instanceof Te}const ga=({editor:e})=>{const{selection:r}=e.state;if(!cEe(r))return!1;let n=0;const i=F2(r.ranges[0].$from,o=>o.type.name==="table");return i==null||i.node.descendants(o=>{if(o.type.name==="table")return!1;["tableCell","tableHeader"].includes(o.type.name)&&(n+=1)}),n===r.ranges.length?(e.commands.deleteTable(),!0):!1},dEe=Fe.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:sEe,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:r}){const{colgroup:n,tableWidth:i,tableMinWidth:o}=aEe(e,this.options.cellMinWidth);return["table",be(this.options.HTMLAttributes,r,{style:i?"width: ".concat(i):"min-width: ".concat(o)}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:e=3,cols:r=3,withHeaderRow:n=!0}={})=>({tr:i,dispatch:o,editor:s})=>{const a=uEe(s.schema,e,r,n);if(o){const l=i.selection.from+1;i.replaceSelectionWith(a).scrollIntoView().setSelection(Q.near(i.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:e,dispatch:r})=>U_e(e,r),addColumnAfter:()=>({state:e,dispatch:r})=>W_e(e,r),deleteColumn:()=>({state:e,dispatch:r})=>Z_e(e,r),addRowBefore:()=>({state:e,dispatch:r})=>fv(e,r),addRowAfter:()=>({state:e,dispatch:r})=>mv(e,r),deleteRow:()=>({state:e,dispatch:r})=>X_e(e,r),deleteTable:()=>({state:e,dispatch:r})=>iEe(e,r),mergeCells:()=>({state:e,dispatch:r})=>x1(e,r),splitCell:()=>({state:e,dispatch:r})=>D1(e,r),toggleHeaderColumn:()=>({state:e,dispatch:r})=>ws("column")(e,r),toggleHeaderRow:()=>({state:e,dispatch:r})=>ws("row")(e,r),toggleHeaderCell:()=>({state:e,dispatch:r})=>rEe(e,r),mergeOrSplit:()=>({state:e,dispatch:r})=>x1(e,r)?!0:D1(e,r),setCellAttribute:(e,r)=>({state:n,dispatch:i})=>eEe(e,r)(n,i),goToNextCell:()=>({state:e,dispatch:r})=>B1(1)(e,r),goToPreviousCell:()=>({state:e,dispatch:r})=>B1(-1)(e,r),fixTables:()=>({state:e,dispatch:r})=>(r&&uv(e),!0),setCellSelection:e=>({tr:r,dispatch:n})=>{if(n){const i=Te.create(r.doc,e.anchorCell,e.headCell);r.setSelection(i)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:ga,"Mod-Backspace":ga,Delete:ga,"Mod-Delete":ga}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[T_e({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],oEe({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){const r={name:e.name,options:e.options,storage:e.storage};return{tableRole:he(q(e,"tableRole",r))}}}),gv=Fe.create({name:"tableCaption",content:"inline*",allowGapCursor:!1,addAttributes(){return{}},renderHTML(){return["caption"]},toMarkdown(e,r){},parseHTML(){return[{tag:"table caption",priority:90}]}}),hEe=Fe.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const r=e.getAttribute("colwidth");return r?r.split(",").map(n=>parseInt(n,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",be(this.options.HTMLAttributes,e),0]}}),bv=hEe.extend({content:"inline*",toMarkdown(e,r){var d,h;e.write(" ");const n=(d=e.options)==null?void 0:d.escapeExtraCharacters,i=e.options.currentColumnIndex;e.options.escapeExtraCharacters=/\|/;let o=0;r.content.forEach((p,f,m)=>{var b,g;o+=((b=p.text)==null?void 0:b.length)||6,(g=p.text)!=null&&g.includes("|")&&(o+=1),p.attrs.syntax==="  "&&(r.child(m).attrs.syntax="html")});const s=e.options.columnWidths[i],a=((h=r.attrs)==null?void 0:h.textAlign)||"left",l=s-o,u=Math.floor(l/2),c=Math.ceil(l/2);a==="center"&&e.write(" ".repeat(u)),a==="right"&&e.write(" ".repeat(l)),e.renderInline(r),a==="center"&&e.write(" ".repeat(c)),a==="left"&&e.write(" ".repeat(l)),e.options.escapeExtraCharacters=n,e.write(" |"),e.options.currentColumnIndex++},parseHTML(){return[{tag:"td",preserveWhitespace:!0},{tag:"th",preserveWhitespace:!0},{tag:"table thead ~ tbody th",priority:70,preserveWhitespace:!0},{tag:"table thead ~ tbody td",priority:70,preserveWhitespace:!0}]},addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),textAlign:{rendered:!1,parseHTML:r=>r.style.textAlign||null}}},addProseMirrorPlugins(){return[new fe({props:{handlePaste:(e,r,n)=>{if(!this.editor.isActive(this.type.name))return!1;const{state:i}=e,{schema:o}=i,s=[];n.content.descendants((l,u)=>{l.isText?s.push(o.text(l.textContent,l.marks)):s.length!==0&&l.type===o.nodes.hardBreak&&s.push(l)});const a=o.node("paragraph",[],s);n.content=O.empty.addToStart(a)}}})]}}),pEe=Fe.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const r=e.getAttribute("colwidth");return r?r.split(",").map(n=>parseInt(n,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",be(this.options.HTMLAttributes,e),0]}}),yv=pEe.extend({content:"inline*",toMarkdown(e,r){var u;const n=e.options.currentHeaderIndex,i=e.options.columnWidths[n],o=((u=r.attrs)==null?void 0:u.textAlign)||"left",s=i-r.content.size,a=Math.floor(s/2),l=Math.ceil(s/2);e.write(" "),o==="center"&&e.write(" ".repeat(a)),o==="right"&&e.write(" ".repeat(s)),e.renderInline(r),o==="center"&&e.write(" ".repeat(l)),o==="left"&&e.write(" ".repeat(s)),e.write(" |"),e.options.currentHeaderIndex++},parseHTML(){return[{tag:"table thead:empty ~ tbody :first-child th",priority:80},{tag:"table thead:empty ~ tbody :first-child td",priority:80},{tag:"table thead :first-child th",priority:60},{tag:"table thead :first-child td",priority:60},{tag:"table tbody :first-child th",priority:60},{tag:"table tbody :first-child td",priority:60},{tag:"table > :first-child > th",priority:60},{tag:"table > :first-child > td",priority:60}]},addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),textAlign:{rendered:!1,parseHTML:r=>r.style.textAlign||null}}}}),fEe=Fe.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",be(this.options.HTMLAttributes,e),0]}}),gp=fEe.extend({content:"tableCell*",allowGapCursor:!1,toMarkdown(e,r){e.write("|"),e.options.currentColumnIndex=0,e.renderInline(r),e.ensureNewLine()},parseHTML(){return[{tag:"tr",priority:70}]}}),Cv=gp.extend({name:"tableHeadRow",content:"tableHeader+",allowGapCursor:!1,toMarkdown(e,r){e.write("|"),e.renderInline(r),e.ensureNewLine(),e.write("|"),r.forEach((n,i,o)=>{var l;let s=e.repeat("-",e.options.columnWidths[o]+2);const a=(l=n.attrs)==null?void 0:l.textAlign;(a==="center"||a==="left")&&(s=":"+s.slice(1)),(a==="center"||a==="right")&&(s=s.slice(0,-1)+":"),e.write(s),e.write("|")}),e.ensureNewLine()},parseHTML(){return[{tag:"tr:first-of-type",priority:80}]}});function mEe(e,r,n,i){const o=[],s=[];for(let u=0;u<n;u+=1){const c=e.nodes.tableCell.createAndFill();c&&s.push(c);const d=e.nodes.tableHeader.createAndFill();d&&o.push(d)}const a=e.nodes.tableHeadRow.createChecked(null,o),l=[];for(let u=1;u<r;u+=1)l.push(e.nodes.tableRow.createChecked(null,s));return e.nodes.table.createChecked(null,[a,...l])}function gEe(e){if(e.index(-1)===e.node(-1).childCount-1)return null;let r=e.after();const n=e.node(-1);for(let i=e.indexAfter(-1);i<n.childCount;i++){const o=n.child(i);if(o.childCount>=e.index()){for(let s=0;s<e.index();s++){const a=o.child(s);r+=a.nodeSize}return r+1}r+=o.nodeSize}}function bEe(e){const r=[];return e.content.forEach(n=>{n.content.forEach((i,o,s)=>{r[s]||(r[s]=[]),r[s].push(i)})}),r}function yEe(e){const r=[];return e.forEach(n=>{let i=0;n.forEach(o=>{let s=0;o.content.forEach(a=>{var l,u;s+=((l=a.text)==null?void 0:l.length)||6,(u=a.text)!=null&&u.includes("|")&&(s+=1)}),i=Math.max(i,s)}),r.push(i)}),r}const vv=dEe.extend({content:"tableCaption? tableHeadRow tableRow*",addExtensions(){return[gv,bv,yv,Cv,gp]},addCommands(){return{...this.parent(),addRowAfter:()=>({chain:e,dispatch:r})=>e().command(({state:n})=>mv(n,r)).command(({state:n,tr:i})=>{const{tableStart:o,table:s,bottom:a}=Xt(n);if(r){const l=s.child(a-1),u=s.child(a);let c=o+1;for(let d=0;d<a;d++)c+=s.child(d).nodeSize;for(let d=0;d<l.childCount;d++)i.setNodeAttribute(c,"textAlign",l.child(d).attrs.textAlign),c+=u.child(d).nodeSize}return!0}).run(),addRowBefore:()=>({chain:e,dispatch:r})=>e().command(({state:n})=>fv(n,r)).command(({state:n,tr:i})=>{const{tableStart:o,table:s,top:a}=Xt(n);if(r){const l=s.child(a),u=s.child(a-1);let c=o+1;for(let d=0;d<a-1;d++)c+=s.child(d).nodeSize;for(let d=0;d<l.childCount;d++)i.setNodeAttribute(c,"textAlign",l.child(d).attrs.textAlign),c+=u.child(d).nodeSize}return!0}).run(),insertTable:()=>({tr:e,dispatch:r,editor:n})=>{if(Dt(e))return!1;const i=mEe(n.schema,3,3);if(r){const o=e.selection.anchor+1;e.replaceSelectionWith(i).scrollIntoView().setSelection(Q.near(e.doc.resolve(o)))}return!0},leaveTable:()=>({tr:e,dispatch:r,editor:n})=>{if(!Dt(e))return!1;const{$head:i,empty:o}=e.selection;if(!o)return!1;const s=i.depth<3?1:i.depth-2;if(r){const a=e.doc.resolve(i.after(s)+1),l=Q.near(a);r(e.setSelection(l).scrollIntoView())}return!0},goToNextRow:()=>({tr:e,dispatch:r,editor:n})=>{if(!Dt(e))return!1;const i=gEe(Rs(e));if(i!=null){if(r){const o=e.doc.resolve(i),s=Q.between(o,iv(o));r(e.setSelection(s).scrollIntoView())}return!0}}}},renderHTML({HTMLAttributes:e}){return["div",{class:"table-wrapper",style:"overflow-x: auto;"},["table",be(this.options.HTMLAttributes,e),0]]},toMarkdown(e,r){const n=bEe(r);e.options.columnWidths=yEe(n),e.options.currentHeaderIndex=0,e.renderContent(r),e.closeBlock(r)},addKeyboardShortcuts(){return{...this.parent(),Tab:()=>this.editor.commands.goToNextCell()||this.editor.commands.leaveTable(),Enter:({editor:e})=>{var n;const{selection:r}=e.state;return r.$from.parent.type.name.startsWith("table")?((n=r.$from.nodeBefore)==null?void 0:n.type.name)==="hardBreak"?e.can().goToNextRow()||e.can().addRowAfter()?(e.chain().setTextSelection({from:r.from-1,to:r.from}).deleteSelection().run(),e.commands.goToNextRow()?!0:e.chain().addRowAfter().goToNextRow().run()):!1:e.chain().insertContent('<br data-syntax="html" />').focus().run():!1}}}}),CEe={name:"TableView",components:{NcActionButton:ni,NcActions:ii,NodeViewWrapper:_n,NodeViewContent:uo,TableSettings:IM,Delete:uu},props:{editor:{type:Object,required:!0},deleteNode:{type:Function,required:!0}},data(){return{isEditable:!1}},beforeMount(){this.isEditable=this.editor.isEditable,this.editor.on("update",({editor:e})=>{this.isEditable=e.isEditable})}};var vEe=function(){var e=this,r=e._self._c;return r("NodeViewWrapper",{staticClass:"table-wrapper",attrs:{"data-text-el":"table-view"}},[e.isEditable?r("NcActions",{staticClass:"table-settings",attrs:{"force-menu":"","data-text-table-actions":"settings"},scopedSlots:e._u([{key:"icon",fn:function(){return[r("TableSettings")]},proxy:!0}],null,!1,1699550424)},[r("NcActionButton",{attrs:{"data-text-table-action":"delete","close-after-click":""},on:{click:e.deleteNode},scopedSlots:e._u([{key:"icon",fn:function(){return[r("Delete")]},proxy:!0}],null,!1,3429380666)},[e._v(" "+e._s(e.t("text","Delete this table"))+" ")])],1):e._e(),r("NodeViewContent",{staticClass:"content",attrs:{as:"table"}}),r("div",{staticClass:"clearfix"})],1)},kEe=[],wEe=j(CEe,vEe,kEe,!1,null,"0b453ac9");const AEe=wEe.exports,_Ee={name:"TableCellView",components:{NcActionButton:ni,NcActions:ii,NodeViewWrapper:_n,NodeViewContent:uo,TableAddRowBefore:LM,TableAddRowAfter:TM,Delete:uu},props:{editor:{type:Object,required:!0},getPos:{type:Function,required:!0}},data(){return{isEditable:!1}},computed:{textAlign(){return{"text-align":this.node.attrs.textAlign}}},beforeMount(){this.isEditable=this.editor.isEditable,this.editor.on("update",({editor:e})=>{this.isEditable=e.isEditable})},methods:{deleteRow(){this.editor.chain().focus().setTextSelection(this.getPos()).deleteRow().run()},addRowBefore(){this.editor.chain().focus().setTextSelection(this.getPos()).addRowBefore().run()},addRowAfter(){this.editor.chain().focus().setTextSelection(this.getPos()).addRowAfter().run()}}};var EEe=function(){var e=this,r=e._self._c;return r("NodeViewWrapper",{style:e.textAlign,attrs:{"data-text-el":"table-cell",as:"td"}},[r("div",{staticClass:"container"},[r("NodeViewContent",{staticClass:"content"}),e.isEditable?r("NcActions",{attrs:{"data-text-table-actions":"row"}},[r("NcActionButton",{attrs:{"data-text-table-action":"add-row-before","close-after-click":""},on:{click:e.addRowBefore},scopedSlots:e._u([{key:"icon",fn:function(){return[r("TableAddRowBefore")]},proxy:!0}],null,!1,1805502767)},[e._v(" "+e._s(e.t("text","Add row before"))+" ")]),r("NcActionButton",{attrs:{"data-text-table-action":"add-row-after","close-after-click":""},on:{click:e.addRowAfter},scopedSlots:e._u([{key:"icon",fn:function(){return[r("TableAddRowAfter")]},proxy:!0}],null,!1,3179199218)},[e._v(" "+e._s(e.t("text","Add row after"))+" ")]),r("NcActionButton",{attrs:{"data-text-table-action":"remove-row","close-after-click":""},on:{click:e.deleteRow},scopedSlots:e._u([{key:"icon",fn:function(){return[r("Delete")]},proxy:!0}],null,!1,3429380666)},[e._v(" "+e._s(e.t("text","Delete this row"))+" ")])],1):e._e()],1)])},xEe=[],DEe=j(_Ee,EEe,xEe,!1,null,"7bad4a88");const SEe=DEe.exports,BEe={name:"TableHeaderView",components:{AlignHorizontalCenter:nM,AlignHorizontalLeft:iM,AlignHorizontalRight:oM,Delete:uu,NcActionButton:ni,NcActionButtonGroup:jv,NcActions:ii,NodeViewWrapper:_n,NodeViewContent:uo,TableAddColumnBefore:OM,TableAddColumnAfter:NM},props:{editor:{type:Object,required:!0},getPos:{type:Function,required:!0},node:{type:Object,required:!0}},data(){return{isEditable:!1}},computed:{textAlign(){return{"text-align":this.node.attrs.textAlign}}},beforeMount(){this.isEditable=this.editor.isEditable,this.editor.on("update",({editor:e})=>{this.isEditable=e.isEditable})},methods:{alignCenter(){this.align("center")},alignLeft(){this.align("left")},alignRight(){this.align("right")},align(e){for(this.editor.chain().focus().setTextSelection(this.getPos()).setCellAttribute("textAlign",e).run();this.editor.commands.goToNextRow();)this.editor.commands.setCellAttribute("textAlign",e);this.editor.chain().setTextSelection(this.getPos()).focus().run(),this.$refs.menu.closeMenu(!1)},deleteColumn(){this.editor.chain().focus().setTextSelection(this.getPos()).deleteColumn().run()},addColumnBefore(){this.editor.chain().focus().setTextSelection(this.getPos()).addColumnBefore().run()},addColumnAfter(){this.editor.chain().focus().setTextSelection(this.getPos()).addColumnAfter().run()}}};var MEe=function(){var e=this,r=e._self._c;return r("NodeViewWrapper",{style:e.textAlign,attrs:{"data-text-el":"table-header",as:"th"}},[r("div",[r("NodeViewContent",{staticClass:"content"}),e.isEditable?r("NcActions",{ref:"menu",attrs:{"data-text-table-actions":"header"}},[r("NcActionButtonGroup",[r("NcActionButton",{attrs:{"data-text-table-action":"align-column-left","aria-label":e.t("text","Left align column"),type:"radio",value:"left","model-value":e.node.attrs.textAlign},on:{click:e.alignLeft},scopedSlots:e._u([{key:"icon",fn:function(){return[r("AlignHorizontalLeft")]},proxy:!0}],null,!1,2968467243)}),r("NcActionButton",{attrs:{"data-text-table-action":"align-column-center","aria-label":e.t("text","Center align column"),type:"radio",value:"center","model-value":e.node.attrs.textAlign},on:{click:e.alignCenter},scopedSlots:e._u([{key:"icon",fn:function(){return[r("AlignHorizontalCenter")]},proxy:!0}],null,!1,536750267)}),r("NcActionButton",{attrs:{"data-text-table-action":"align-column-right","aria-label":e.t("text","Right align column"),type:"radio",value:"right","model-value":e.node.attrs.textAlign},on:{click:e.alignRight},scopedSlots:e._u([{key:"icon",fn:function(){return[r("AlignHorizontalRight")]},proxy:!0}],null,!1,3861151024)})],1),r("NcActionButton",{attrs:{"data-text-table-action":"add-column-before","close-after-click":""},on:{click:e.addColumnBefore},scopedSlots:e._u([{key:"icon",fn:function(){return[r("TableAddColumnBefore")]},proxy:!0}],null,!1,3782681875)},[e._v(" "+e._s(e.t("text","Add column before"))+" ")]),r("NcActionButton",{attrs:{"data-text-table-action":"add-column-after","close-after-click":""},on:{click:e.addColumnAfter},scopedSlots:e._u([{key:"icon",fn:function(){return[r("TableAddColumnAfter")]},proxy:!0}],null,!1,1608287598)},[e._v(" "+e._s(e.t("text","Add column after"))+" ")]),r("NcActionButton",{attrs:{"data-text-table-action":"remove-column","close-after-click":""},on:{click:e.deleteColumn},scopedSlots:e._u([{key:"icon",fn:function(){return[r("Delete")]},proxy:!0}],null,!1,3429380666)},[e._v(" "+e._s(e.t("text","Delete this column"))+" ")])],1):e._e()],1)])},FEe=[],NEe=j(BEe,MEe,FEe,!1,null,"d05d6af6");const OEe=NEe.exports;function N1(e,r){return e.extend({addNodeView(){return En(r)}})}const TEe=vv.extend({addNodeView(){return En(AEe)},addExtensions(){return[gv,N1(bv,SEe),N1(yv,OEe),Cv,gp]}}),kv=({listComponent:e,items:r=()=>{},command:n=({editor:i,range:o,props:s})=>{}})=>({items:r,command:n,render:()=>{let i,o;return{onStart:s=>{i=new kh(e,{parent:void 0,propsData:s}),s.clientRect&&(o=Rn("body",{getReferenceClientRect:s.clientRect,appendTo:()=>document.body,content:i.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}),i.ref.$on("select",()=>{o.length>0&&o[0].hide()}))},onUpdate(s){i.updateProps(s),!(!s.clientRect||!o)&&o[0].setProps({getReferenceClientRect:s.clientRect})},onKeyDown(s){var a,l;if(o)return s.event.key==="Escape"?(o[0].hide(),o[0].destroy(),i.destroy(),o=null,!0):(l=(a=i.ref)==null?void 0:a.onKeyDown)==null?void 0:l.call(a,s)},onExit(){o&&(o[0].destroy(),i.destroy())}}}}),LEe={name:"EmojiList",props:{items:{type:Array,required:!0},command:{type:Function,required:!0}},data(){return{selectedIndex:0}},computed:{hasResults(){return this.items.length>0},itemHeight(){return this.$el.scrollHeight/this.items.length},itemInsideScrollView(){return this.selectedIndex*this.itemHeight>=this.$el.scrollTop&&(this.selectedIndex+1)*this.itemHeight<=this.$el.scrollTop+this.$el.clientHeight}},watch:{items(){this.selectedIndex=0,this.$el.scrollTop=0}},methods:{t:Li,onKeyDown({event:e}){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?!1:e.key==="ArrowUp"?(this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length,this.itemInsideScrollView||(this.$el.scrollTop=this.selectedIndex*this.itemHeight),!0):e.key==="ArrowDown"?(this.selectedIndex=(this.selectedIndex+1)%this.items.length,this.itemInsideScrollView||(this.$el.scrollTop=(this.selectedIndex+1)*this.itemHeight-this.$el.clientHeight),!0):e.key==="Enter"||e.key==="Tab"?(this.selectItem(this.selectedIndex),!0):!1},selectItem(e){const r=this.items[e];r&&(this.command(r),qv(r))}}};var IEe=function(){var e=this,r=e._self._c;return r("div",{staticClass:"emoji-list"},[e.hasResults?e._l(e.items,function(n,i){return r("div",{key:i,staticClass:"emoji-list__item",class:{"is-selected":i===e.selectedIndex},on:{click:function(o){return e.selectItem(i)}}},[r("span",{staticClass:"emoji-list__item__emoji"},[e._v(" "+e._s(n.native)+" ")]),e._v(" :"+e._s(n.short_name)+" ")])}):r("div",{staticClass:"emoji-list__item is-empty"},[e._v(" "+e._s(e.t("text","No emoji found"))+" ")])],2)},REe=[],zEe=j(LEe,IEe,REe,!1,null,"7c3e1f7c");const $Ee=zEe.exports,HEe=()=>kv({listComponent:$Ee,items:({query:e})=>Uv(e),command:({editor:e,range:r,props:n})=>{e.chain().focus().insertContentAt(r,n.native+" ").run()}}),PEe=VC.extend({name:"frontMatter",draggable:!1,renderHTML({node:e,HTMLAttributes:r}){return this.parent({node:e,HTMLAttributes:be(r,{"data-title":t("text","Front matter"),class:"frontmatter"})})},parseHTML(){return[{tag:"pre#frontmatter",preserveWhitespace:"full",priority:9001,attrs:{language:"yaml"}}]},toMarkdown:(e,r)=>{if(!e.out.match(/^\s*/))throw Error("FrontMatter must be the first node of the document!");const n=r.textContent,i=n.match(/-{3,}/gm),o=i?i.sort().slice(-1)[0]+"-":"---";e.write(""),e.out="",e.write("".concat(o,"\n")),e.text(n,!1),e.ensureNewLine(),e.write(o),e.closeBlock(r)},addInputRules(){return[{find:/^---$/g,handler:({state:e,range:r,chain:n})=>r.from===1?e.doc.resolve(1).parent.type.name===this.name?!1:(n().deleteRange(r).insertContentAt(0,{type:this.name}),!0):!1}]},addCommands(){return{}},addPasteRules:()=>[],addProseMirrorPlugins:()=>[]});class $e extends ne{constructor(r){super(r,r)}map(r,n){let i=r.resolve(n.map(this.head));return $e.valid(i)?new $e(i):ne.near(i)}content(){return $.empty}eq(r){return r instanceof $e&&r.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(r,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new $e(r.resolve(n.pos))}getBookmark(){return new bp(this.anchor)}static valid(r){let n=r.parent;if(n.isTextblock||!VEe(r)||!jEe(r))return!1;let i=n.type.spec.allowGapCursor;if(i!=null)return i;let o=n.contentMatchAt(r.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(r,n,i=!1){e:for(;;){if(!i&&$e.valid(r))return r;let o=r.pos,s=null;for(let a=r.depth;;a--){let l=r.node(a);if(n>0?r.indexAfter(a)<l.childCount:r.index(a)>0){s=l.child(n>0?r.indexAfter(a):r.index(a)-1);break}else if(a==0)return null;o+=n;let u=r.doc.resolve(o);if($e.valid(u))return u}for(;;){let a=n>0?s.firstChild:s.lastChild;if(!a){if(s.isAtom&&!s.isText&&!ee.isSelectable(s)){r=r.doc.resolve(o+s.nodeSize*n),i=!1;continue e}break}s=a,o+=n;let l=r.doc.resolve(o);if($e.valid(l))return l}return null}}}$e.prototype.visible=!1,$e.findFrom=$e.findGapCursorFrom,ne.jsonID("gapcursor",$e);class bp{constructor(r){this.pos=r}map(r){return new bp(r.map(this.pos))}resolve(r){let n=r.resolve(this.pos);return $e.valid(n)?new $e(n):ne.near(n)}}function VEe(e){for(let r=e.depth;r>=0;r--){let n=e.index(r),i=e.node(r);if(n==0){if(i.type.spec.isolating)return!0;continue}for(let o=i.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function jEe(e){for(let r=e.depth;r>=0;r--){let n=e.indexAfter(r),i=e.node(r);if(n==i.childCount){if(i.type.spec.isolating)return!0;continue}for(let o=i.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function qEe(){return new fe({props:{decorations:ZEe,createSelectionBetween(e,r,n){return r.pos==n.pos&&$e.valid(n)?new $e(n):null},handleClick:WEe,handleKeyDown:UEe,handleDOMEvents:{beforeinput:KEe}}})}const UEe=oh({ArrowLeft:ba("horiz",-1),ArrowRight:ba("horiz",1),ArrowUp:ba("vert",-1),ArrowDown:ba("vert",1)});function ba(e,r){const n=e=="vert"?r>0?"down":"up":r>0?"right":"left";return function(i,o,s){let a=i.selection,l=r>0?a.$to:a.$from,u=a.empty;if(a instanceof Q){if(!s.endOfTextblock(n)||l.depth==0)return!1;u=!1,l=i.doc.resolve(r>0?l.after():l.before())}let c=$e.findGapCursorFrom(l,r,u);return c?(o&&o(i.tr.setSelection(new $e(c))),!0):!1}}function WEe(e,r,n){if(!e||!e.editable)return!1;let i=e.state.doc.resolve(r);if(!$e.valid(i))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&ee.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new $e(i))),!0)}function KEe(e,r){if(r.inputType!="insertCompositionText"||!(e.state.selection instanceof $e))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=O.empty;for(let a=i.length-1;a>=0;a--)o=O.from(i[a].createAndFill(null,o));let s=e.state.tr.replace(n.pos,n.pos,new $(o,0,0));return s.setSelection(Q.near(s.doc.resolve(n.pos+1))),e.dispatch(s),!1}function ZEe(e){if(!(e.selection instanceof $e))return null;let r=document.createElement("div");return r.className="ProseMirror-gapcursor",ye.create(e.doc,[ze.widget(e.selection.head,r,{key:"gapcursor"})])}const GEe=Me.create({name:"gapCursor",addProseMirrorPlugins(){return[qEe()]},extendNodeSchema(e){var r;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(r=he(q(e,"allowGapCursor",n)))!==null&&r!==void 0?r:null}}}),JEe=Fe.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",be(this.options.HTMLAttributes,e)]},renderText(){return"\n"},addCommands(){return{setHardBreak:()=>({commands:e,chain:r,state:n,editor:i})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:o,storedMarks:s}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:l}=i.extensionManager,u=s||o.$to.parentOffset&&o.$from.marks();return r().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&u&&a){const h=u.filter(p=>l.includes(p.type.name));c.ensureMarks(h)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),XEe=JEe.extend({addAttributes(){return{syntax:{default:"  ",rendered:!1,keepOnSplit:!0,parseHTML:e=>e.getAttribute("data-syntax")||"  "}}},addCommands(){return{...this==null?void 0:this.parent(),setHardBreak:()=>e=>{for(let r=e.state.selection.$from.depth;r>=0;r--)if(e.state.selection.$from.node(r).type.name==="heading")return!1;return this.parent().setHardBreak()(e)}}},toMarkdown(e,r,n,i){var o;for(let s=i+1;s<n.childCount;s++)if(n.child(s).type!==r.type){r.attrs.syntax!=="html"?(e.write(r.attrs.syntax),(o=n.child(s).text)!=null&&o.startsWith("\n")||e.write("\n")):e.write("<br />");return}}}),QEe=Fe.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:"h".concat(e),attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:r}){return["h".concat(this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]),be(this.options.HTMLAttributes,r),0]},addCommands(){return{setHeading:e=>({commands:r})=>this.options.levels.includes(e.level)?r.setNode(this.name,e):!1,toggleHeading:e=>({commands:r})=>this.options.levels.includes(e.level)?r.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,r)=>({...e,["Mod-Alt-".concat(r)]:()=>this.editor.commands.toggleHeading({level:r})}),{})},addInputRules(){return this.options.levels.map(e=>ud({find:new RegExp("^(#{1,".concat(e,"})\\s$")),type:this.type,getAttributes:{level:e}}))}});var wv={exports:{}};(function(e){(function(r){let n;function i(d,h){const p=d.charCodeAt(h);if(isNaN(p))throw new RangeError("Index "+h+' out of range for string "'+d+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(p<55296||p>57343)return[d.charAt(h),h];if(p>=55296&&p<=56319){if(d.length<=h+1)return[" ",h];const m=d.charCodeAt(h+1);return m<56320||m>57343?[" ",h]:[d.charAt(h)+d.charAt(h+1),h+1]}if(h===0)return[" ",h];const f=d.charCodeAt(h-1);if(f<55296||f>56319)return[" ",h];throw new Error('String "'+d+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?n=function(d){return btoa(unescape(encodeURIComponent(d)))}:n=function(d){const h=unescape(encodeURIComponent(d+""));let p="";for(let f,m,b=0,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";h.charAt(b|0)||(g="=",b%1);p+=g.charAt(63&f>>8-b%1*8)){if(m=h.charCodeAt(b+=3/4),m>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");f=f<<8|m}return p}:n=function(d){return qd.from(d).toString("base64")};function o(d,h){let p=l(d,h);if((h&&h.fallback!==void 0?h.fallback:o.defaults.fallback)===!0&&p===""){let f="";for(let m=0;m<d.length;m++){const b=i(d,m);m=b[1],f+=b[0]}p=l(n(f),h)}return p}const s={bg:{Й:"Y",й:"y",X:"H",x:"h",Ц:"Ts",ц:"ts",Щ:"Sht",щ:"sht",Ъ:"A",ъ:"a",Ь:"Y",ь:"y"},de:{Ä:"AE",ä:"ae",Ö:"OE",ö:"oe",Ü:"UE",ü:"ue"},sr:{đ:"dj",Đ:"DJ"},uk:{И:"Y",и:"y",Й:"Y",й:"y",Ц:"Ts",ц:"ts",Х:"Kh",х:"kh",Щ:"Shch",щ:"shch",Г:"H",г:"h"}};let a={};function l(d,h){if(typeof d!="string")throw new Error("slug() requires a string argument, received "+typeof d);typeof h=="string"&&(h={replacement:h}),h=h?Object.assign({},h):{},h.mode=h.mode||o.defaults.mode;const p=o.defaults.modes[h.mode],f=["replacement","multicharmap","charmap","remove","lower","trim"];for(let v,k=0,C=f.length;k<C;k++)v=f[k],h[v]=v in h?h[v]:p[v];const m=s[h.locale]||a;let b=[];for(const v in h.multicharmap){if(!Object.prototype.hasOwnProperty.call(h.multicharmap,v))continue;const k=v.length;b.indexOf(k)===-1&&b.push(k)}b=b.sort(function(v,k){return k-v});const g=h.mode==="rfc3986"?/[^\w\s\-.~]/:/[^A-Za-z0-9\s]/;let y="";for(let v,k=0,C=d.length;k<C;k++){v=d[k];let A=!1;for(let _=0;_<b.length;_++){const S=b[_],L=d.substr(k,S);if(h.multicharmap[L]){k+=S-1,v=h.multicharmap[L],A=!0;break}}A||(m[v]?v=m[v]:h.charmap[v]?v=h.charmap[v].replace(h.replacement," "):v.includes(h.replacement)?v=v.replace(h.replacement," "):v=v.replace(g,"")),y+=v}return h.remove&&(y=y.replace(h.remove,"")),h.trim&&(y=y.trim()),y=y.replace(/\s+/g,h.replacement),h.lower&&(y=y.toLowerCase()),y}const u={फ़:"Fi",ग़:"Ghi",ख़:"Khi",क़:"Qi",ड़:"ugDha",ढ़:"ugDhha",य़:"Yi",ज़:"Za",בִי:"i",בֵ:"e",בֵי:"e",בֶ:"e",בַ:"a",בָ:"a",בֹ:"o",וֹ:"o",בֻ:"u",וּ:"u",בּ:"b",כּ:"k",ךּ:"k",פּ:"p",שׁ:"sh",שׂ:"s",בְ:"e",חֱ:"e",חֲ:"a",חֳ:"o",בִ:"i"},c={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ő:"O",Ø:"O",Ō:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ő:"o",ø:"o",ō:"o",Œ:"OE",œ:"oe",ù:"u",ú:"u",û:"u",ü:"u",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",α:"a",β:"b",γ:"g",δ:"d",ε:"e",ζ:"z",η:"h",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"3",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"w",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"h",ώ:"w",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"H",Θ:"Th",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"3",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"W",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"H",Ώ:"W",Ϊ:"I",Ϋ:"Y",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"j",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"u",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"J",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"H",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"U",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"K",Ļ:"L",Ņ:"N",Ū:"U",أ:"a",إ:"i",ب:"b",ت:"t",ث:"th",ج:"g",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"d",ط:"t",ظ:"th",ع:"aa",غ:"gh",ف:"f",ق:"k",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"o",ي:"y",ء:"aa",ة:"a",آ:"a",ا:"a",پ:"p",ژ:"zh",گ:"g",چ:"ch",ک:"k",ی:"i",ė:"e",į:"i",ų:"u",Ė:"E",Į:"I",Ų:"U",ț:"t",Ț:"T",ţ:"t",Ţ:"T",ș:"s",Ș:"S",ă:"a",Ă:"A",Ạ:"A",Ả:"A",Ầ:"A",Ấ:"A",Ậ:"A",Ẩ:"A",Ẫ:"A",Ằ:"A",Ắ:"A",Ặ:"A",Ẳ:"A",Ẵ:"A",Ẹ:"E",Ẻ:"E",Ẽ:"E",Ề:"E",Ế:"E",Ệ:"E",Ể:"E",Ễ:"E",Ị:"I",Ỉ:"I",Ĩ:"I",Ọ:"O",Ỏ:"O",Ồ:"O",Ố:"O",Ộ:"O",Ổ:"O",Ỗ:"O",Ơ:"O",Ờ:"O",Ớ:"O",Ợ:"O",Ở:"O",Ỡ:"O",Ụ:"U",Ủ:"U",Ũ:"U",Ư:"U",Ừ:"U",Ứ:"U",Ự:"U",Ử:"U",Ữ:"U",Ỳ:"Y",Ỵ:"Y",Ỷ:"Y",Ỹ:"Y",Đ:"D",ạ:"a",ả:"a",ầ:"a",ấ:"a",ậ:"a",ẩ:"a",ẫ:"a",ằ:"a",ắ:"a",ặ:"a",ẳ:"a",ẵ:"a",ẹ:"e",ẻ:"e",ẽ:"e",ề:"e",ế:"e",ệ:"e",ể:"e",ễ:"e",ị:"i",ỉ:"i",ĩ:"i",ọ:"o",ỏ:"o",ồ:"o",ố:"o",ộ:"o",ổ:"o",ỗ:"o",ơ:"o",ờ:"o",ớ:"o",ợ:"o",ở:"o",ỡ:"o",ụ:"u",ủ:"u",ũ:"u",ư:"u",ừ:"u",ứ:"u",ự:"u",ử:"u",ữ:"u",ỳ:"y",ỵ:"y",ỷ:"y",ỹ:"y",đ:"d",Ә:"AE",ә:"ae",Ғ:"GH",ғ:"gh",Қ:"KH",қ:"kh",Ң:"NG",ң:"ng",Ү:"UE",ү:"ue",Ұ:"U",ұ:"u",Һ:"H",һ:"h",Ө:"OE",ө:"oe",ђ:"dj",ј:"j",љ:"lj",њ:"nj",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Љ:"Lj",Њ:"Nj",Ћ:"C",Џ:"Dz",nj:"nj",lj:"lj",Nj:"NJ",Lj:"LJ",अ:"a",आ:"aa",ए:"e",ई:"ii",ऍ:"ei",ऎ:"ae",ऐ:"ai",इ:"i",ओ:"o",ऑ:"oi",ऒ:"oii",ऊ:"uu",औ:"ou",उ:"u",ब:"B",भ:"Bha",च:"Ca",छ:"Chha",ड:"Da",ढ:"Dha",फ:"Fa",ग:"Ga",घ:"Gha",ग़:"Ghi",ह:"Ha",ज:"Ja",झ:"Jha",क:"Ka",ख:"Kha",ख़:"Khi",ल:"L",ळ:"Li",ऌ:"Li",ऴ:"Lii",ॡ:"Lii",म:"Ma",न:"Na",ङ:"Na",ञ:"Nia",ण:"Nae",ऩ:"Ni",ॐ:"oms",प:"Pa",क़:"Qi",र:"Ra",ऋ:"Ri",ॠ:"Ri",ऱ:"Ri",स:"Sa",श:"Sha",ष:"Shha",ट:"Ta",त:"Ta",ठ:"Tha",द:"Tha",थ:"Tha",ध:"Thha",ड़:"ugDha",ढ़:"ugDhha",व:"Va",य:"Ya",य़:"Yi",ज़:"Za",ə:"e",Ə:"E",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",ב:"v",גּ:"g",ג:"g",ד:"d",דּ:"d",ה:"h",ו:"v",ז:"z",ח:"h",ט:"t",י:"y",כ:"kh",ך:"kh",ל:"l",מ:"m",ם:"m",נ:"n",ן:"n",ס:"s",פ:"f",ף:"f",ץ:"ts",צ:"ts",ק:"k",ר:"r",תּ:"t",ת:"t"};o.charmap=Object.assign({},c),o.multicharmap=Object.assign({},u),o.defaults={charmap:o.charmap,mode:"pretty",modes:{rfc3986:{replacement:"-",remove:null,lower:!0,charmap:o.charmap,multicharmap:o.multicharmap,trim:!0},pretty:{replacement:"-",remove:null,lower:!0,charmap:o.charmap,multicharmap:o.multicharmap,trim:!0}},multicharmap:o.multicharmap,fallback:!0},o.reset=function(){o.defaults.modes.rfc3986.charmap=o.defaults.modes.pretty.charmap=o.charmap=o.defaults.charmap=Object.assign({},c),o.defaults.modes.rfc3986.multicharmap=o.defaults.modes.pretty.multicharmap=o.multicharmap=o.defaults.multicharmap=Object.assign({},u),a=""},o.extend=function(d){const h=Object.keys(d),p={},f={};for(let m=0;m<h.length;m++)h[m].length>1?p[h[m]]=d[h[m]]:f[h[m]]=d[h[m]];Object.assign(o.charmap,f),Object.assign(o.multicharmap,p)},o.setLocale=function(d){a=s[d]||{}},e.exports?e.exports=o:r.slug=o})(un)})(wv);var YEe=wv.exports;const exe=Dr(YEe);function O1(e){const r=new Map,n=[],i=o=>{const s=exe(o);if(r.has(s)){const a=r.get(s);return r.set(s,a+1),"h-".concat(s,"--").concat(a)}return r.set(s,1),"h-"+s};return e.descendants((o,s)=>{if(o.type.name!=="heading")return;const a=o.textContent;if(!a)return;const l=i(a);n.push(Object.freeze({level:o.attrs.level,text:a,id:l,offset:s}))}),n}const Av=new ve("headingAnchor");function txe(){return new fe({key:Av,state:{init(e,{doc:r}){const n=O1(r);return{headings:n,decorations:T1(r,n)}},apply(e,r,n,i){if(!e.docChanged)return r;const o=O1(i.doc),s=rxe(r,e,o)||T1(i.doc,o);return{headings:o,decorations:s}}},props:{decorations(e){return this.getState(e).decorations}}})}function rxe(e,r,n){if(nxe(n,e.headings))return!1;let i=!1;const o=e.decorations.map(r.mapping,r.doc,{onRemove:()=>{i=!0}});return i?!1:o}function nxe(e,r){return e.length!==r.length||e.some(ixe(r))}const ixe=e=>(r,n)=>r.id!==e[n].id||r.level!==e[n].level;function T1(e,r){const n=r.map(oxe);return ye.create(e,n)}function oxe(e){return ze.widget(e.offset+1,sxe(e),{side:-1})}function sxe(e){const r=document.createElement("a"),n=document.createTextNode("#");return r.appendChild(n),r.setAttribute("id",e.id),r.setAttribute("aria-hidden","true"),r.className="heading-anchor",r.setAttribute("href","#".concat(e.id)),r.setAttribute("title",window.t("text","Link to this section")),r.setAttribute("contenteditable","false"),r.addEventListener("click",axe),r}function axe(e){e.stopPropagation(),e.target.scrollIntoView(),window.location.hash=e.target.getAttribute("href")}const lxe=e=>Hc.dispatch("text/setHeadings",e),uxe=QEe.extend({addKeyboardShortcuts(){return this.options.levels.reduce((e,r)=>({...e,["Mod-Shift-".concat(r)]:()=>this.editor.commands.toggleHeading({level:r})}),{})},onUpdate({editor:e}){var n,i;const r=(i=(n=Av.getState(e.state))==null?void 0:n.headings)!=null?i:[];lxe(r)},addProseMirrorPlugins(){return[txe()]}}),cxe=Fe.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",be(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:r})=>{const{selection:n}=r,{$from:i,$to:o}=n,s=e();return i.parentOffset===0?s.insertContentAt({from:Math.max(i.pos-1,0),to:o.pos},{type:this.name}):JE(n)?s.insertContentAt(o.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:a,dispatch:l})=>{var u;if(l){const{$to:c}=a.selection,d=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(Q.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(ee.create(a.doc,c.pos)):a.setSelection(Q.create(a.doc,c.pos));else{const h=(u=c.parent.type.contentMatch.defaultType)===null||u===void 0?void 0:u.create();h&&(a.insert(d,h),a.setSelection(Q.create(a.doc,d+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[T2({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),dxe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,_v=Fe.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{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",be(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:r})=>r.insertContent({type:this.name,attrs:e})}},addInputRules(){return[T2({find:dxe,type:this.type,getAttributes:e=>{const[,,r,n,i]=e;return{src:n,alt:r,title:i}}})]}});var Ev={exports:{}};(function(e,r){function n(s){return typeof s.value!="function"?(console.warn("[Vue-click-outside:] provided expression",s.expression,"is not a function."),!1):!0}function i(s,a){if(!s||!a)return!1;for(var l=0,u=a.length;l<u;l++)try{if(s.contains(a[l]))return!0;if(a[l].contains(s))return!1}catch{return!1}return!1}function o(s){return typeof s.componentInstance<"u"&&s.componentInstance.$isServer}e.exports={bind:function(s,a,l){if(!n(a))return;function u(d){if(l.context){var h=d.path||d.composedPath&&d.composedPath();h&&h.length>0&&h.unshift(d.target),!(s.contains(d.target)||i(l.context.popupItem,h))&&s.__vueClickOutside__.callback(d)}}s.__vueClickOutside__={handler:u,callback:a.value};const c="ontouchstart"in document.documentElement?"touchstart":"click";!o(l)&&document.addEventListener(c,u)},update:function(s,a){n(a)&&(s.__vueClickOutside__.callback=a.value)},unbind:function(s,a,l){const u="ontouchstart"in document.documentElement?"touchstart":"click";!o(l)&&s.__vueClickOutside__&&document.removeEventListener(u,s.__vueClickOutside__.handler),delete s.__vueClickOutside__}}})(Ev);var hxe=Ev.exports;const pxe=Dr(hxe),fxe={name:"ShowImageModal",components:{NcModal:Yv},props:{images:{type:Array,required:!0},startIndex:{type:Number,default:0},show:{type:Boolean,default:!1}},data(){return{currentImageIndex:0}},computed:{currentImage(){return this.images[this.currentImageIndex]}},watch:{startIndex(e){this.currentImageIndex=e}},methods:{showNextImage(){this.currentImageIndex=(this.currentImageIndex+1)%this.images.length},showPreviousImage(){this.currentImageIndex=this.currentImageIndex<=0?this.images.length-1:this.currentImageIndex-1}}};var mxe=function(){var e=this,r=e._self._c;return e.show?r("NcModal",{attrs:{size:"large",name:e.currentImage.name,"out-transition":!0,"has-next":!0,"has-previous":!0,"close-button-contained":!1,dark:!0},on:{next:e.showNextImage,previous:e.showPreviousImage,close:function(n){return e.$emit("close")}}},[r("div",{staticClass:"modal__content"},[r("img",{attrs:{src:e.currentImage.previewUrl}})])]):e._e()},gxe=[],bxe=j(fxe,mxe,gxe,!1,null,"0f41ce0d");const yxe=bxe.exports;class L1 extends Error{constructor(r,n){super((r==null?void 0:r.message)||t("text","Failed to load")),this.reason=r,this.imageUrl=n}}const Cxe={name:"ImageView",components:{ImageIcon:EM,DeleteIcon:uu,NcButton:Wl,ShowImageModal:yxe,NodeViewWrapper:_n},directives:{ClickOutside:pxe},mixins:[lu,ik],props:["editor","node","extension","updateAttributes","deleteNode"],data(){return{attachment:null,imageLoaded:!1,loaded:!1,failed:!1,showIcons:!1,imageUrl:null,errorMessage:null,attachmentSize:null,showImageModal:!1,imageIndex:null,isEditable:!1,embeddedImageList:[]}},computed:{...nk({imageAttachments:"text/imageAttachments"}),attachmentType(){return this.attachment?this.attachment.isImage?"image":"media":null},isMediaAttachment(){return this.attachmentType==="media"},showDeleteIcon(){return this.isEditable&&this.showIcons},showImageDeleteIcon(){return this.showDeleteIcon&&!this.isMediaAttachment},canDisplayImage(){return this.failed&&this.loaded?!0:this.loaded&&this.imageLoaded},src:{get(){return this.node.attrs.src||""},set(e){this.updateAttributes({src:e})}},alt:{get(){return this.node.attrs.alt?this.node.attrs.alt:""},set(e){this.updateAttributes({alt:e})}}},beforeMount(){this.isEditable=this.editor.isEditable,this.editor.on("update",({editor:e})=>{this.isEditable=e.isEditable}),this.loadPreview().catch(this.onImageLoadFailure)},methods:{async loadPreview(){if(this.attachment=await this.$attachmentResolver.resolve(this.src),!this.attachment.previewUrl)throw new Error("Attachment source was not resolved");return new Promise((e,r)=>{const n=new Image;n.onload=async()=>{this.imageUrl=this.attachment.previewUrl,this.imageLoaded=!0,this.loaded=!0,this.attachmentSize=this.attachment.size},n.onerror=i=>{r(new L1(i,this.attachment.previewUrl))},n.src=this.attachment.previewUrl})},onImageLoadFailure(e){this.failed=!0,this.imageLoaded=!1,this.loaded=!0,this.errorMessage=e.message,e instanceof L1&&(this.errorMessage="".concat(this.errorMessage," ").concat(this.src)),this.$emit("error",{error:e,src:this.src})},updateAlt(e){this.updateAttributes({alt:e.target.value})},onLoaded(){this.loaded=!0,this.$nextTick(()=>{var e;(e=this.$refs.altInput)==null||e.focus()})},async updateEmbeddedImageList(){this.embeddedImageList=[];const e=Array.from(document.querySelectorAll('figure[data-component="image-view"][data-attachment-type="image"]:not(.image-view--failed).image-view'));for(const r of e){const n=r.getAttribute("data-src");if(!this.embeddedImageList.find(i=>i.src===n)){const i=await this.$attachmentResolver.resolve(r.getAttribute("data-src"));this.embeddedImageList.push({src:n,...i})}}},handleAttachmentClick(){if(OCA.Viewer&&!OCA.Viewer.file&&OCA.Viewer.mimetypes.indexOf(this.attachment.mimetype)!==-1&&this.attachment.davPath){OCA.Viewer.open({path:this.attachment.davPath});return}window.location.assign(this.attachment.fullUrl)},async handleImageClick(){await this.updateEmbeddedImageList(),this.imageIndex=this.embeddedImageList.findIndex(e=>e.src===this.src),this.imageIndex!==-1?this.showImageModal=!0:(console.error("Could not find image in attachments list",this.attachment),ng(t("text","Could not find image in attachments list.")))},onDelete(){eg("text:image-node:delete",this.imageUrl),this.deleteNode()}}};var vxe=function(){var e=this,r=e._self._c;return r("NodeViewWrapper",{attrs:{contenteditable:e.isEditable}},[r("figure",{staticClass:"image image-view",class:{"icon-loading":!e.loaded,"image-view--failed":e.failed},attrs:{"data-component":"image-view","data-attachment-type":e.attachmentType,"data-src":e.src}},[e.canDisplayImage?r("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:()=>e.showIcons=!1,expression:"() => showIcons = false"}],staticClass:"image__view",on:{mouseover:function(n){e.showIcons=!0},mouseleave:function(n){e.showIcons=!1}}},[r("transition",{attrs:{name:"fade"}},[e.failed?[r("ImageIcon",{staticClass:"image__main image__main--broken-icon",attrs:{size:100}})]:[e.isMediaAttachment?r("div",{staticClass:"media",attrs:{contenteditable:"false"},on:{click:e.handleAttachmentClick}},[r("div",{staticClass:"media__wrapper"},[r("img",{directives:[{name:"show",rawName:"v-show",value:e.loaded,expression:"loaded"}],staticClass:"image__main",attrs:{src:e.imageUrl,alt:e.alt},on:{load:e.onLoaded}}),r("div",{staticClass:"metadata"},[r("span",{staticClass:"name"},[e._v(e._s(e.alt))]),r("span",{staticClass:"size"},[e._v(e._s(e.attachmentSize))])])]),e.showDeleteIcon?r("div",{staticClass:"buttons"},[r("NcButton",{attrs:{"aria-label":e.t("text","Delete this attachment"),title:e.t("text","Delete this attachment")},on:{click:e.onDelete},scopedSlots:e._u([{key:"icon",fn:function(){return[r("DeleteIcon")]},proxy:!0}],null,!1,3930079857)})],1):e._e()]):r("div",{staticClass:"media",attrs:{contenteditable:"false"}},[r("img",{directives:[{name:"show",rawName:"v-show",value:e.loaded,expression:"loaded"}],staticClass:"image__main",attrs:{src:e.imageUrl,alt:e.alt},on:{click:e.handleImageClick,load:e.onLoaded}})])]],2),r("transition",{attrs:{name:"fade"}},[e.isMediaAttachment?e._e():r("div",{directives:[{name:"show",rawName:"v-show",value:e.loaded,expression:"loaded"}],staticClass:"image__caption",attrs:{title:e.alt}},[e.isEditable?r("div",{staticClass:"image__caption__wrapper"},[r("input",{directives:[{name:"show",rawName:"v-show",value:!e.isMediaAttachment,expression:"!isMediaAttachment"}],ref:"altInput",staticClass:"image__caption__input",attrs:{type:"text"},domProps:{value:e.alt},on:{blur:e.updateAlt,keyup:e.updateAlt}}),e.showImageDeleteIcon?r("div",{staticClass:"image__caption__delete",attrs:{contenteditable:"false"}},[r("NcButton",{attrs:{"aria-label":e.t("text","Delete this image"),title:e.t("text","Delete this image")},on:{click:e.onDelete},scopedSlots:e._u([{key:"icon",fn:function(){return[r("DeleteIcon")]},proxy:!0}],null,!1,3930079857)})],1):e._e()]):r("figcaption",[e._v(" "+e._s(e.alt)+" ")])])]),r("div",{staticClass:"image__modal"},[r("ShowImageModal",{attrs:{images:e.embeddedImageList,"start-index":e.imageIndex,show:e.showImageModal},on:{close:function(n){e.showImageModal=!1}}})],1)],1):r("div",{staticClass:"image-view__cant_display"},[r("transition",{attrs:{name:"fade"}},[r("div",{directives:[{name:"show",rawName:"v-show",value:e.loaded,expression:"loaded"}],staticClass:"image__caption"},[r("input",{ref:"altInput",attrs:{type:"text",disabled:!e.isEditable},domProps:{value:e.alt},on:{blur:e.updateAlt,keyup:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.updateAlt.apply(null,arguments)}}})])])],1),e.errorMessage?r("small",{staticClass:"image__error-message"},[e._v(" "+e._s(e.errorMessage)+" ")]):e._e()])])},kxe=[],wxe=j(Cxe,vxe,kxe,!1,null,"d82905fe");const xv=wxe.exports,Axe=_v.extend({selectable:!1,parseHTML(){return[{tag:this.options.allowBase64?"figure img[src]":'figure img[src]:not([src^="data:"])'}]},renderHTML(){return["img"]},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this)}},addNodeView(){return En(xv)},addProseMirrorPlugins(){return[new fe({props:{handleDrop:(e,r,n)=>{if(r.dataTransfer.files&&r.dataTransfer.files.length>0){const i=e.posAtCoords({left:r.clientX,top:r.clientY}),o=new CustomEvent("file-drop",{bubbles:!0,detail:{files:r.dataTransfer.files,position:i.pos}});return r.target.dispatchEvent(o),!0}},handlePaste:(e,r,n)=>{if(r.clipboardData.files&&r.clipboardData.files.length>0){const i=new CustomEvent("image-paste",{bubbles:!0,detail:{files:r.clipboardData.files}});return r.target.dispatchEvent(i),!0}}}})]},toMarkdown(e,r,n,i){r.attrs.alt=r.attrs.alt.toString(),Is.nodes.image(e,r,n,i),e.closeBlock(r)}}),_xe=_v.extend({name:"image-inline",priority:99,selectable:!1,parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),inline:!0}},addCommands(){return{}},addInputRules(){return[]},addNodeView(){return En(xv)},toMarkdown(e,r,n,i){return Is.nodes.image(e,r,n,i)}}),Exe=sr.create({name:"keep-syntax",parseHTML(){return[{tag:"span.keep-md"}]},renderHTML(){return["span",{class:"keep-md"},0]},toMarkdown:{open:"",close:"",mixable:!0,escape:!1,expelEnclosingWhitespace:!0},onUpdate(){const e=this.editor.state.tr;this.editor.state.doc.descendants((r,n,i,o)=>{r.marks.findIndex(s=>s.type.name===this.name)!==-1&&(r.type.name!=="text"||r.text.length!==1)&&e.removeMark(n,n+r.nodeSize,this.type)}),e.docChanged&&(e.setMeta("addToHistory",!1),e.setMeta("preventUpdate",!0),this.editor.view.dispatch(e))}}),xxe={name:"SuggestionListWrapper",props:{items:{type:Array,required:!0},command:{type:Function,required:!0}},data(){return{selectedIndex:0}},computed:{hasGroups(){return Object.keys(this.itemGroups).includes(void 0)},hasResults(){return this.items.length>0},itemHeight(){return this.$el.scrollHeight/this.items.length},itemInsideScrollView(){return this.selectedIndex*this.itemHeight>=this.$el.scrollTop&&(this.selectedIndex+1)*this.itemHeight<=this.$el.scrollTop+this.$el.clientHeight},itemGroups(){const e={};return this.items.forEach(r=>{e[r.suggestGroup]||(e[r.suggestGroup]=[]),e[r.suggestGroup].push(r)}),e},combineIndex(){return(e,r)=>Object.values(this.itemGroups).slice(0,e).reduce((n,i)=>n+i.length,0)+r}},watch:{items(){this.selectedIndex=0,this.$el.scrollTop=0}},methods:{t:Li,onKeyDown({event:e}){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?!1:e.key==="ArrowUp"?(this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length,this.itemInsideScrollView||(this.$el.scrollTop=this.selectedIndex*this.itemHeight),!0):e.key==="ArrowDown"?(this.selectedIndex=(this.selectedIndex+1)%this.items.length,this.itemInsideScrollView||(this.$el.scrollTop=(this.selectedIndex+1)*this.itemHeight-this.$el.clientHeight),!0):e.key==="Enter"||e.key==="Tab"?(this.selectItem(this.selectedIndex),!0):!1},selectItem(e){const r=this.items[e];r&&(this.$emit("select",r),this.command(r))}}};var Dxe=function(){var e=this,r=e._self._c;return r("div",{staticClass:"suggestion-list"},[e.hasResults?e._l(e.itemGroups,function(n,i,o){return r("div",{key:i},[e.hasGroups?r("div",{staticClass:"suggestion-list__group"},[e._v(" "+e._s(i)+" ")]):e._e(),e._l(n,function(s,a){return r("div",{key:e.combineIndex(o,a),staticClass:"suggestion-list__item",class:{"is-selected":e.combineIndex(o,a)===e.selectedIndex},on:{click:function(l){e.selectItem(e.combineIndex(o,a))}}},[e._t("default",null,{item:s,active:e.combineIndex(o,a)===e.selectedIndex})],2)})],2)}):r("div",{staticClass:"suggestion-list__item is-empty"},[e._v(" "+e._s(e.t("text","No suggestion found"))+" ")])],2)},Sxe=[],Bxe=j(xxe,Dxe,Sxe,!1,null,"60040cc2");const Mxe=Bxe.exports,Fxe={components:{SuggestionListWrapper:Mxe},props:{items:{type:Array,required:!0},command:{type:Function,required:!0}},methods:{onKeyDown({event:e}){var r;return(r=this.$refs.suggestionList)==null?void 0:r.onKeyDown({event:e})}}};var Nxe=function(){var e=this,r=e._self._c;return r("SuggestionListWrapper",{ref:"suggestionList",attrs:{command:e.command,items:e.items},on:{select:n=>e.$emit("select",n)},scopedSlots:e._u([{key:"default",fn:function({item:n}){return[r("div",{staticClass:"link-picker__item",attrs:{"data-key":n.key}},[typeof n.icon!="string"?r(n.icon,{tag:"compoent"}):r("img",{attrs:{src:n.icon}}),r("div",[e._v(e._s(n.label))])],1)]}},{key:"empty",fn:function(){return[e._v(" "+e._s(e.t("text","No command found"))+" ")]},proxy:!0}])})},Oxe=[],Txe=j(Fxe,Nxe,Oxe,!1,null,"651257bc");const Lxe=Txe.exports,Vd=navigator.userAgent.includes("Mac"),de={Mod:Vd?"Meta":"Control",Alt:"Alt",Control:"Control",Shift:"Shift"},Ixe={[de.Mod]:Vd?t("text","Command"):t("text","Control"),[de.Control]:t("text","Ctrl"),[de.Alt]:t("text",Vd?"Option":"Alt"),[de.Shift]:t("text","Shift")},Rxe=(e,r)=>({"is-active":r,["action-menu-".concat(e.key)]:!0}),zxe=(e,r=[])=>r.map(n=>Ixe[n]).concat(e.toUpperCase()).join("+"),$xe=({keyChar:e,keyModifiers:r=[]})=>r.map(n=>de[n]).concat(e).join("+"),I1=(e,{keyChar:r,keyModifiers:n})=>!e&&r?"(".concat(zxe(r,n),")"):"",Hxe=(e,r)=>e.action&&!e.action(r.can(),r),Dv=({isActive:e},r)=>{if(!e)return!1;const n=Array.isArray(e)?e:[e];return r.isActive(...n)},Pxe=e=>Array.isArray(e.isActive)?"radio":typeof e.isActive=="string"?"checkbox":"button",R1=(e,r)=>{const n=Dv(e,r);return{disabled:Hxe(e,r),class:Rxe(e,n),active:n,type:Pxe(e)}},yp={mixins:[rg,ok,lu,eb,Y2],props:{actionEntry:{type:Object,required:!0},canBeFocussed:{type:Boolean,default:null}},data(){return{state:R1(this.actionEntry,this.$editor)}},computed:{label(){const{label:e}=this.actionEntry;return typeof e=="function"?e(this):e},icon(){return this.actionEntry.icon},keyshortcuts(){return $xe(this.actionEntry)},tooltip(){return[this.label,I1(this.$isMobile,this.actionEntry)].join(" ")},listItemTooltip(){return[I1(this.$isMobile,this.actionEntry)].join(" ")}},watch:{canBeFocussed(){this.setTabIndexOnButton()}},mounted(){this.$_updateState=tg(this.updateState.bind(this),50),this.$editor.on("update",this.$_updateState),this.$editor.on("selectionUpdate",this.$_updateState),this.$emit("disabled",this.state.disabled),this.setTabIndexOnButton()},beforeDestroy(){this.$editor.off("update",this.$_updateState),this.$editor.off("selectionUpdate",this.$_updateState)},methods:{updateState(){this.state=R1(this.actionEntry,this.$editor),this.$emit("disabled",this.state.disabled)},setTabIndexOnButton(){const e=this.$el.tagName.toLowerCase()==="button"?this.$el:this.$el.querySelector("button");this.canBeFocussed===null?e.removeAttribute("tabindex"):e.setAttribute("tabindex",this.canBeFocussed?"0":"-1")},focusButton(){(this.$el.tagName.toLowerCase()==="button"?this.$el:this.$el.querySelector("button")).focus()}}},Vxe=Symbol("menu::id"),Cp={inject:{$menuID:{from:Vxe,default:null}},computed:{menuIDSelector(){return"#".concat(this.$menuID)}}},jxe={name:"EmojiPickerAction",components:{NcEmojiPicker:Wv,NcButton:Wl},extends:yp,mixins:[Cp],methods:{addEmoji({id:e,native:r}){this.actionEntry.action(this.$editor.chain(),{id:e,native:r}).focus().run()}}};var qxe=function(){var e=this,r=e._self._c;return r("NcEmojiPicker",{staticClass:"entry-action entry-action__emoji",attrs:{"data-text-action-entry":e.actionEntry.key,container:e.menuIDSelector},on:{"select-data":e.addEmoji}},[r("div",[r("NcButton",{staticClass:"entry-action__button",attrs:{role:"menu",title:e.actionEntry.label,"aria-label":e.actionEntry.label},scopedSlots:e._u([{key:"icon",fn:function(){return[r(e.icon,{tag:"component"})]},proxy:!0}])})],1)])},Uxe=[],Wxe=j(jxe,qxe,Uxe,!1,null,null);const Kxe=Wxe.exports,Zxe={name:"ActionAttachmentUpload",components:{NcActions:ii,NcActionButton:ni,Loading:pd,Folder:cM,Upload:zM},extends:yp,mixins:[sk,ak,lk,uk,ck,Cp],computed:{icon(){return this.isUploadingAttachments?pd:this.actionEntry.icon},isUploadingAttachments(){return this.$uploadingState.isUploadingAttachments}}};var Gxe=function(){var e=this,r=e._self._c;return r("NcActions",{staticClass:"entry-action entry-action__image-upload",attrs:{"data-text-action-entry":e.actionEntry.key,name:e.actionEntry.label,title:e.actionEntry.label,"aria-label":e.actionEntry.label,container:e.menuIDSelector},scopedSlots:e._u([{key:"icon",fn:function(){return[r(e.icon,{tag:"component",attrs:{name:e.actionEntry.label,"aria-label":e.actionEntry.label}})]},proxy:!0}])},[e.$editorUpload?r("NcActionButton",{attrs:{"close-after-click":"",disabled:e.isUploadingAttachments,"data-text-action-entry":"".concat(e.actionEntry.key,"-upload")},on:{click:e.$callChooseLocalAttachment},scopedSlots:e._u([{key:"icon",fn:function(){return[r("Upload")]},proxy:!0}],null,!1,933298848)},[e._v(" "+e._s(e.t("text","Upload from computer"))+" ")]):e._e(),e.$isPublic?e._e():r("NcActionButton",{attrs:{"close-after-click":"",disabled:e.isUploadingAttachments,"data-text-action-entry":"".concat(e.actionEntry.key,"-insert")},on:{click:e.$callAttachmentPrompt},scopedSlots:e._u([{key:"icon",fn:function(){return[r("Folder")]},proxy:!0}],null,!1,2750733237)},[e._v(" "+e._s(e.t("text","Insert from Files"))+" ")])],1)},Jxe=[],Xxe=j(Zxe,Gxe,Jxe,!1,null,null);const Qxe=Xxe.exports,Yxe={name:"ActionInsertLink",components:{NcActions:ii,NcActionButton:ni,NcActionInput:Z1,Document:lM,Loading:pd,LinkOff:DM,Web:$M,Shape:MM},extends:yp,mixins:[dk,Cp],data:()=>({href:"",isInputMode:!1,startPath:null,menuOpen:!1,isUsingDirectEditing:ig("text","directEditingToken",null)!==null}),computed:{activeClass(){return this.state.active?"is-active":""},relativePath(){var e,r;return(r=(e=this.$file)==null?void 0:e.relativePath)!=null?r:"/"}},methods:{linkFile(){this.startPath===null&&(this.startPath=this.relativePath.split("/").slice(0,-1).join("/")),xk(t("text","Select file or folder to link to")).startAt(this.startPath).allowDirectories(!0).setMultiSelect(!1).setType(og.Choose).build().pick().then(e=>{OC.Files.getClient().getFileInfo(e).then((r,n)=>{const i=new URL(Ud("/f/".concat(n.id)),window.origin);this.setLink(i.href,n.name),this.startPath=n.path+(n.type==="dir"?"/".concat(n.name,"/"):"")}),this.menuOpen=!1}).catch(()=>{this.$refs.buttonFile.$el.focus()})},linkWebsite(e){if((e==null?void 0:e.type)==="submit"){const r=[...e.target.elements].filter(n=>(n==null?void 0:n.type)==="text")[0].value;return this.menuOpen=!1,this.isInputMode=!1,this.href="",this.setLink(r,r)}if(O2(this.$editor.state,"link")){const r=ch(this.$editor.state,"link");this.href=r.href}this.isInputMode=!0},setLink(e,r){var o;e&&![/^[a-zA-Z]+:/,/^\//,/\?fileId=/,/^\.\.?\//,/^[^.]*[/$]/,/^#/].find(s=>e.match(s))&&(e="https://"+e);const n=e.replaceAll(" ","%20"),i=this.$editor.chain();(o=this.$editor.view.state)!=null&&o.selection.empty?i.insertContent({type:"paragraph",content:[{type:"text",marks:[{type:"link",attrs:{href:n}}],text:r}]}):i.setLink({href:n}),i.focus().run()},removeLink(){this.$editor.chain().unsetLink().focus().run(),this.menuOpen=!1},linkPicker(){G1(null,!0).then(e=>{var n;const r=this.$editor.chain();(n=this.$editor.view.state)!=null&&n.selection.empty?r.focus().insertPreview(e).run():r.setLink({href:e}).focus().run()}).catch(e=>{console.error("Smart picker promise rejected",e)})}}};var e3e=function(){var e=this,r=e._self._c;return r("NcActions",{staticClass:"entry-action entry-action__insert-link",class:e.activeClass,attrs:{title:e.actionEntry.label,"aria-label":e.actionEntry.label,container:e.menuIDSelector,"data-text-action-entry":e.actionEntry.key,name:e.actionEntry.label,open:e.menuOpen},on:{"update:open":n=>{e.menuOpen=e.menuOpen||n}},scopedSlots:e._u([{key:"icon",fn:function(){return[r(e.icon,{tag:"component",attrs:{name:e.actionEntry.label,"aria-label":e.actionEntry.label}})]},proxy:!0}])},[e.state.active?r("NcActionButton",{attrs:{"data-text-action-entry":"".concat(e.actionEntry.key,"-remove")},on:{click:e.removeLink},scopedSlots:e._u([{key:"icon",fn:function(){return[r("LinkOff")]},proxy:!0}],null,!1,3589828876)},[e._v(" "+e._s(e.t("text","Remove link"))+" ")]):e._e(),e.isUsingDirectEditing?e._e():r("NcActionButton",{ref:"buttonFile",attrs:{"data-text-action-entry":"".concat(e.actionEntry.key,"-file")},on:{click:e.linkFile},scopedSlots:e._u([{key:"icon",fn:function(){return[r("Document")]},proxy:!0}],null,!1,1149029676)},[e._v(" "+e._s(e.t("text","Link to file or folder"))+" ")]),e.isInputMode?r("NcActionInput",{attrs:{type:"text",value:e.href,"data-text-action-entry":"".concat(e.actionEntry.key,"-input")},on:{"update:value":function(n){e.href=n},submit:e.linkWebsite},scopedSlots:e._u([{key:"icon",fn:function(){return[r("Web")]},proxy:!0}],null,!1,1844845715)},[e._v(" "+e._s(e.t("text","Link to website"))+" ")]):r("NcActionButton",{attrs:{"data-text-action-entry":"".concat(e.actionEntry.key,"-website")},on:{click:e.linkWebsite},scopedSlots:e._u([{key:"icon",fn:function(){return[r("Web")]},proxy:!0}])},[e._v(" "+e._s(e.state.active?e.t("text","Update link"):e.t("text","Link to website"))+" ")]),r("NcActionButton",{attrs:{"data-text-action-entry":"".concat(e.actionEntry.key,"-picker")},on:{click:e.linkPicker},scopedSlots:e._u([{key:"icon",fn:function(){return[r("Shape")]},proxy:!0}])},[e._v(" "+e._s(e.t("text","Open the Smart Picker"))+" ")])],1)},t3e=[],r3e=j(Yxe,e3e,t3e,!1,null,"4930d73a");const n3e=r3e.exports,G4e=[{key:"outline",forceLabel:!0,icon:wa,click:({$outlineActions:e})=>e.toggle(),label:({$outlineState:e})=>e.visible?t("text","Hide outline"):t("text","Show outline")}],wo=[{key:"undo",label:t("text","Undo"),keyChar:"z",keyModifiers:[de.Mod],icon:RM,action:e=>e.undo(),priority:7},{key:"redo",label:t("text","Redo"),keyChar:"y",keyModifiers:[de.Mod],icon:BM,action:e=>e.redo(),priority:10},{key:"bold",label:t("text","Bold"),keyChar:"b",keyModifiers:[de.Mod],icon:dM,isActive:"strong",action:e=>e.toggleBold(),priority:8},{key:"italic",label:t("text","Italic"),keyChar:"i",keyModifiers:[de.Mod],icon:CM,isActive:"em",action:e=>e.toggleItalic(),priority:9},{key:"underline",label:t("text","Underline"),keyChar:"u",keyModifiers:[de.Mod],icon:_M,isActive:"underline",action:e=>e.toggleUnderline(),priority:13},{key:"strikethrough",label:t("text","Strikethrough"),keyChar:"s",keyModifiers:[de.Mod,de.Shift],icon:AM,isActive:"strike",action:e=>e.toggleStrike(),priority:14},{key:"headings",label:t("text","Headings"),keyChar:"1…6",keyModifiers:[de.Mod,de.Shift],icon:ef,isActive:"heading",children:[{key:"headings-h1",label:t("text","Heading 1"),keyChar:"1",keyModifiers:[de.Mod,de.Shift],icon:ef,isActive:["heading",{level:1}],action:e=>e.toggleHeading({level:1})},{key:"headings-h2",label:t("text","Heading 2"),keyChar:"2",keyModifiers:[de.Mod,de.Shift],icon:hM,isActive:["heading",{level:2}],action:e=>e.toggleHeading({level:2})},{key:"headings-h3",label:t("text","Heading 3"),keyChar:"3",keyModifiers:[de.Mod,de.Shift],icon:pM,isActive:["heading",{level:3}],action:e=>e.toggleHeading({level:3})},{key:"headings-h4",label:t("text","Heading 4"),keyChar:"4",keyModifiers:[de.Mod,de.Shift],isActive:["heading",{level:4}],icon:fM,action:e=>e.toggleHeading({level:4})},{key:"headings-h5",label:t("text","Heading 5"),keyChar:"5",keyModifiers:[de.Mod,de.Shift],isActive:["heading",{level:5}],icon:mM,action:e=>e.toggleHeading({level:5})},{key:"headings-h6",label:t("text","Heading 6"),keyChar:"6",keyModifiers:[de.Mod,de.Shift],isActive:["heading",{level:6}],icon:gM,action:e=>e.toggleHeading({level:6})},{key:"headings-separator",isSeparator:!0,visible:({$outlineState:e})=>e.enable},{key:"outline",icon:wa,click:({$outlineActions:e})=>e.toggle(),visible:({$outlineState:e})=>e.enable,label:({$outlineState:e})=>e.visible?t("text","Hide outline"):t("text","Show outline")}],priority:1},{key:"lists",label:t("text","Lists"),keyChar:"7…9",keyModifiers:[de.Mod,de.Shift],isActive:[{isList:!0}],icon:wa,children:[{key:"unordered-list",label:t("text","Unordered list"),keyChar:"8",keyModifiers:[de.Mod,de.Shift],isActive:"bulletList",icon:wa,action:e=>e.toggleBulletList()},{key:"ordered-list",label:t("text","Ordered list"),keyChar:"7",keyModifiers:[de.Mod,de.Shift],isActive:"orderedList",icon:kM,action:e=>e.toggleOrderedList()},{key:"task-list",label:t("text","To-Do list"),keyChar:"9",keyModifiers:[de.Mod,de.Shift],isActive:"taskList",icon:vM,action:e=>e.toggleTaskList()},{key:"lists-separator",isSeparator:!0},{key:"list-indent-increase",label:t("text","Increase indentation"),keyChar:"Tab",icon:yM,action:(e,r=null)=>r&&r.isActive("taskItem")?e.sinkListItem("taskItem"):e.sinkListItem("listItem")},{key:"list-indent-decrease",label:t("text","Decrease indentation"),keyChar:"Tab",keyModifiers:[de.Shift],icon:bM,action:(e,r=null)=>r&&r.isActive("taskItem")?e.liftListItem("taskItem"):e.liftListItem("listItem")}],priority:2},{key:"insert-link",label:t("text","Insert link"),isActive:"link",icon:xM,component:n3e,priority:3},{key:"blockquote",label:t("text","Blockquote"),keyChar:"b",keyModifiers:[de.Mod,de.Shift],isActive:"blockquote",icon:wM,action:e=>e.toggleBlockquote(),priority:11},{key:"callouts",label:t("text","Callouts"),visible:!1,icon:Al,isActive:"callout",children:[{key:"callout-info",label:t("text","Info"),isActive:["callout",{type:"info"}],icon:Al,action:e=>e.toggleCallout({type:"info"})},{key:"callout-success",label:t("text","Success"),isActive:["callout",{type:"success"}],icon:lb,action:e=>e.toggleCallout({type:"success"})},{key:"callout-warn",label:t("text","Warning"),isActive:["callout",{type:"warn"}],icon:ub,action:e=>e.toggleCallout({type:"warn"})},{key:"callout-error",label:t("text","Danger"),isActive:["callout",{type:"error"}],icon:ab,action:e=>e.toggleCallout({type:"error"})}],priority:4},{key:"code-block",label:t("text","Code block"),keyChar:"c",keyModifiers:[de.Mod,de.Alt],isActive:"codeBlock",icon:aM,action:e=>e.toggleCodeBlock(),priority:12},{key:"table",label:t("text","Table"),isActive:"table",icon:FM,action:e=>e.insertTable(),priority:15},{key:"emoji-picker",label:t("text","Insert emoji"),icon:uM,component:Kxe,action:(e,r={})=>e.emoji(r),priority:5},{key:"insert-attachment",label:t("text","Insert attachment"),icon:SM,component:Qxe,priority:6}];function i3e(e){return[/\*\*.*?\*\*/,/\*.*?\*/,/\[.*?\(.*?\)/,/^#{1,6}\s.*$/,/^\s*[-+*]\s.*/m,/^\s\d\..*/m,/^>+\s.*/,/`.*?`/].some(r=>r.test(e))}function o3e(e){try{return Ui.parse(e),!0}catch{return!1}}function s3e(e){return i3e(e)&&o3e(e)}const a3e=t("text","Formatting"),l3e=t("text","Smart picker"),u3e=e=>["undo","redo","outline","emoji-picker"].indexOf(e.key)>-1,z1=["task-list","table"],c3e=e=>{try{return!!new URL(e)}catch{return!1}},d3e=e=>[...e.filter(r=>z1.indexOf(r.key)>-1),...e.filter(r=>z1.indexOf(r.key)===-1)],h3e=e=>d3e([...wo.find(r=>r.key==="headings").children,...wo.find(r=>r.key==="lists").children,...wo.filter(r=>r.action&&!u3e(r)),...wo.find(r=>r.key==="callouts").children,{...wo.find(r=>r.key==="emoji-picker"),action:r=>r.insertContent(":")}].filter(r=>{var n,i,o;return(o=(i=(n=r==null?void 0:r.label)==null?void 0:n.toLowerCase)==null?void 0:i.call(n))==null?void 0:o.includes(e.toLowerCase())}).map(r=>({...r,suggestGroup:a3e}))),p3e=()=>kv({listComponent:Lxe,command:({editor:e,range:r,props:n})=>{if(n.action){const i=e.chain().deleteRange(r);n.action(i),i.run();return}G1(n.providerId,!0).then(i=>{if(!c3e(i)){const o=s3e(i)?Ui.render(i):i;e.chain().focus().insertContentAt(r,o+" ").run();return}e.chain().focus().deleteRange(r).insertPreview(i).run()}).catch(i=>{console.error("Smart picker promise rejected",i)})},items:({editor:e,query:r})=>[...Kv(r).map(n=>({suggestGroup:l3e,label:n.title,icon:n.icon_url,providerId:n.id})).filter(n=>{var i,o,s;return(s=(o=(i=n==null?void 0:n.label)==null?void 0:i.toLowerCase)==null?void 0:o.call(i))==null?void 0:s.includes(r.toLowerCase())}),...h3e(r).filter(({action:n,isActive:i})=>{const o=n(e==null?void 0:e.can()),s=i&&Dv({isActive:i},e);return o&&!s})]}),f3e=new ve("linkPicker"),m3e=Me.create({name:"linkPicker",addOptions(){return{suggestion:{char:"/",allowedPrefixes:[" "],pluginKey:f3e,allow:({state:e,range:r})=>e.doc.resolve(r.from).parent.type.name!=="codeBlock",...p3e()}}},addProseMirrorPlugins(){return[Wh({editor:this.editor,...this.options.suggestion})]}}),vp=function(e,r){var o;const n=e.attrs.href;if(!n||!((o=window.OCA)!=null&&o.Viewer)||n.match(/^[a-zA-Z]*:/)||n.startsWith("#")||ig("core","active-app","")==="collectives"||n.includes("/apps/collectives/"))return n;const i=n.match(/^([^?]*)\?fileId=(\d+)/);if(i){const[,,s]=i;return new URL(Ud("/f/".concat(s)),window.origin).href}return n},Sv=function(e){const r=e.getAttribute("href");if(!r)return r;const n=r.match(/\?dir=([^&]*)&openfile=([^&]*)#relPath=([^&]*)/);if(n){const[,,i]=n;return new URL(Ud("/f/".concat(i)),window.origin).href}return r},Su=function(e){const r=window.location.origin+window.location.pathname+window.location.search;return(e==null?void 0:e.startsWith("#"))||(e==null?void 0:e.startsWith(r+"#"))},g3e={name:"PencilIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var b3e=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon pencil-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},y3e=[],C3e=j(g3e,b3e,y3e,!1,null,null);const v3e=C3e.exports,k3e=["http:","https:"],w3e={name:"LinkBubbleView",components:{CheckIcon:nb,CloseIcon:rb,ContentCopyIcon:rv,NcButton:Wl,NcLoadingIcon:Q1,NcReferenceList:J1,NcTextField:Zv,LinkOffIcon:ob,PencilIcon:v3e},mixins:[nv],props:{editor:{type:Object,required:!0},href:{type:String,default:null}},data(){return{isEditable:!1,edit:!1,newHref:null,referenceTitle:null}},computed:{key(){return this.href||"no-href"},copyLinkTooltip(){return this.copied?this.copySuccess?"":Li("text","Cannot copy, please copy the link manually"):Li("text","Copy link to clipboard")},sanitizedHref(){return new URL(this.href,window.location).href},title(){return this.referenceTitle?this.referenceTitle:this.sanitizedHref},showPreview(){const e=new URL(this.href,window.location);return this.href&&k3e.includes(e.protocol)}},watch:{key(){this.resetBubble()}},beforeMount(){this.isEditable=this.editor.isEditable,this.editor.on("update",({editor:e})=>{this.isEditable=e.isEditable})},methods:{t:Li,resetBubble(){this.edit=!1,this.newHref=null,this.referenceTitle=null},async copyLink(){await this.copyToClipboard(this.href)},onReferenceListLoaded(){var e,r,n;this.referenceTitle=(n=(r=(e=this.$refs.referencelist.firstReference)==null?void 0:e.openGraphObject)==null?void 0:r.name)!=null?n:null},startEdit(){this.edit=!0,this.newHref=this.href},stopEdit(){this.edit=!1,this.newHref=null},updateLink(){this.href!==this.newHref&&this.setLinkUrl(this.newHref),this.stopEdit()},setLinkUrl(e){const r={...this.editor.view.state.selection},{ranges:n}=r,i=Math.min(...n.map(s=>s.$from.pos)),o=Math.max(...n.map(s=>s.$to.pos));console.debug("selection",r),this.editor.chain().extendMarkRange("link").setLink({href:e}).setTextSelection({from:i,to:o}).focus().run()},removeLink(){this.editor.chain().hideLinkBubble().unsetLink().focus().run(),this.stopEdit()}}};var A3e=function(){var e=this,r=e._self._c;return r("div",{key:e.key,staticClass:"link-view-bubble"},[r("div",{staticClass:"link-view-bubble__header"},[r("div",{staticClass:"link-view-bubble__title"},[e._v(" "+e._s(e.title)+" ")]),r("NcButton",{attrs:{title:e.copyLinkTooltip,"aria-label":e.copyLinkTooltip,type:"tertiary"},on:{click:e.copyLink},scopedSlots:e._u([{key:"icon",fn:function(){return[e.copySuccess?r("CheckIcon",{attrs:{size:20}}):e.copyLoading?r("NcLoadingIcon",{attrs:{size:20}}):r("ContentCopyIcon",{attrs:{size:20}})]},proxy:!0}])}),e.isEditable?r("div",{staticClass:"edit-buttons"},[e.edit?r("NcButton",{attrs:{title:e.t("text","Save changes"),"aria-label":e.t("text","Save changes"),type:"tertiary"},on:{click:e.updateLink},scopedSlots:e._u([{key:"icon",fn:function(){return[r("CheckIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2630571749)}):r("NcButton",{attrs:{title:e.t("text","Edit link"),"aria-label":e.t("text","Edit link"),type:"tertiary"},on:{click:e.startEdit},scopedSlots:e._u([{key:"icon",fn:function(){return[r("PencilIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,4260349822)}),e.edit?r("NcButton",{attrs:{title:e.t("text","Cancel"),"aria-label":e.t("text","Cancel"),type:"tertiary"},on:{click:e.stopEdit},scopedSlots:e._u([{key:"icon",fn:function(){return[r("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)}):r("NcButton",{attrs:{title:e.t("text","Remove link"),"aria-label":e.t("text","Remove link"),type:"tertiary"},on:{click:e.removeLink},scopedSlots:e._u([{key:"icon",fn:function(){return[r("LinkOffIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2250374828)})],1):e._e()],1),e.isEditable&&e.edit?r("div",{staticClass:"link-view-bubble__edit"},[r("NcTextField",{attrs:{name:"newHref",label:e.t("text","URL"),value:e.newHref},on:{"update:value":function(n){e.newHref=n},keypress:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.preventDefault(),e.updateLink.apply(null,arguments))}}})],1):e.showPreview?r("NcReferenceList",{ref:"referencelist",staticClass:"link-view-bubble__reference-list",attrs:{text:e.sanitizedHref,limit:1,interactive:!1,"display-fallback":!0},on:{loaded:e.onReferenceListLoaded}}):e._e()],1)},_3e=[],E3e=j(w3e,A3e,_3e,!1,null,"4b82257e");const x3e=E3e.exports;var Ki,As;class D3e{constructor({view:r,options:n,plugin:i}){Mu(this,Ki,null);Mu(this,As,null);wp(this,"closeOnExternalEvents",r=>{var n,i;(i=(n=this.tippy)==null?void 0:n.popper)!=null&&i.contains(r.target)||window.Cypress&&r.type==="scroll"||yo(this,As).commands.hideLinkBubble()});this.options=n,this.view=r,this.plugin=i,Fu(this,As,this.options.editor)}addEventListeners(){this.view.dom.addEventListener("dragstart",this.closeOnExternalEvents),document.addEventListener("mousedown",this.closeOnExternalEvents),document.addEventListener("scroll",this.closeOnExternalEvents,{capture:!0})}removeEventListeners(){this.view.dom.removeEventListener("dragstart",this.closeOnExternalEvents),document.removeEventListener("mousedown",this.closeOnExternalEvents),document.removeEventListener("scroll",this.closeOnExternalEvents,{capture:!0})}createTooltip(){const r=this.options.editor.options.element,n=!!r.parentElement;this.tippy||!n||(yo(this,Ki)||Fu(this,Ki,new kh(x3e,{parent:this.options.parent,propsData:{editor:this.options.editor,href:null}})),this.tippy=Rn(r,{duration:100,getReferenceClientRect:null,content:yo(this,Ki).element,interactive:!0,trigger:"manual",placement:"bottom",hideOnClick:"toggle",popperOptions:{strategy:"fixed"}}))}update(r,n){const{active:i}=this.plugin.getState(r.state);r.composing||(this.createTooltip(),i!=null&&i.mark?setTimeout(()=>{this.updateTooltip(r,i)},100):(this.removeEventListeners(),setTimeout(()=>{var o;(o=this.tippy)==null||o.hide()},100)))}updateTooltip(r,{mark:n,nodeStart:i}){var a,l,u;let o=r.nodeDOM(i);Object.prototype.toString.call(o)==="[object Text]"&&(o=o.parentElement);const s=o==null?void 0:o.getBoundingClientRect();(a=yo(this,Ki))==null||a.updateProps({href:vp(n)}),(l=this.tippy)==null||l.setProps({getReferenceClientRect:()=>s}),(u=this.tippy)==null||u.show(),this.addEventListeners()}destroy(){var r;(r=this.tippy)==null||r.destroy()}}Ki=new WeakMap,As=new WeakMap;function S3e({selection:e,doc:r}){const{ranges:n}=e,i=Math.min(...n.map(h=>h.$from.pos)),o=Math.max(...n.map(h=>h.$to.pos)),s=r.resolve(i);if(s.parent.type.name==="preview")return!1;const a=s.parent.maybeChild(s.index()),l=s.pos-s.textOffset,u=l+(a==null?void 0:a.nodeSize);if(o>u)return null;const c=$1(a,l);if(c)return c;const d=s.nodeBefore;return d?$1(d,l-d.nodeSize):null}function $1(e,r){const n=B3e(e);return n?{mark:n,nodeStart:r}:null}function B3e(e){const r=e==null?void 0:e.marks.find(n=>n.type.name==="link");if(r&&!Su(r.attrs.href))return r}const M3e=e=>(r,n)=>{const i=e.marks().find(a=>a.type.name==="link");if(!i)return!1;const o=e.pos-e.textOffset,s={mark:i,nodeStart:o};return n&&n(r.tr.setMeta(Wi,{active:s})),!0},Bv=(e,r)=>{var n;return(n=Wi.getState(e))!=null&&n.active?(r&&r(e.tr.setMeta(Wi,{active:null})),!0):!1},Wi=new ve("linkBubble");function F3e(e){const r=new fe({key:Wi,state:{init:()=>({active:null}),apply:(n,i)=>{const o=n.getMeta(Wi);return o?{...i,active:o.active}:i}},view:n=>new D3e({view:n,options:e,plugin:r}),appendTransaction:(n,i,o)=>{if((i==null?void 0:i.doc.content.size)===2)return;const s=i==null?void 0:i.selection.eq(o.selection),a=i==null?void 0:i.doc.eq(o.doc),l=n.every(c=>c.meta.addToHistory===!1);if(s&&(l||a))return;const u=S3e(o);return o.tr.setMeta(Wi,{active:u})},props:{handleClickOn:(n,i,o,s,a,l)=>{if(!l||a.button!==0||a.ctrlKey||a.metaKey)return!1;const{state:u,dispatch:c}=n,d=u.doc.resolve(i);return M3e(d)(u,c)},handleDOMEvents:{keydown:(n,i)=>{const{state:o,dispatch:s}=n;if(i.key==="Escape")return Bv(o,s)}}}});return r}const N3e=new ve("textHandleClickLink");function O3e(){return new fe({key:N3e,props:{handleDOMEvents:{auxclick:(e,r)=>{if(r.target.closest("a")&&r.button===1&&!r.ctrlKey&&!r.metaKey&&!r.shiftKey){r.preventDefault(),r.stopImmediatePropagation();const n=r.target.closest("a");window.open(n.href,"_blank")}},paste:(e,r)=>{r.target.closest("a")&&(r.stopPropagation(),r.preventDefault(),r.stopImmediatePropagation())},click:(e,r)=>{var i;const n=r.target.closest("a");if(r.button===0&&n){if(n.closest('svg[id^="mermaid-view"]'))return!1;r.preventDefault(),Su((i=n.attributes.href)==null?void 0:i.value)?location.href=n.attributes.href.value:(r.ctrlKey||r.metaKey)&&window.open(n.href,"_blank")}}}}})}const T3e=Me.create({name:"linkViewBubble",addCommands(){return{hideLinkBubble:()=>({state:e,dispatch:r})=>Bv(e,r)}},addProseMirrorPlugins(){return[F3e({editor:this.editor,parent:this.editor.contentComponent})]}}),L3e=Fe.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",be(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)}}}),I3e=new ve("mention"),R3e=Fe.create({name:"mention",priority:101,addOptions(){return{HTMLAttributes:{},renderText({options:e,node:r}){var n;return"".concat(e.suggestion.char).concat((n=r.attrs.label)!==null&&n!==void 0?n:r.attrs.id)},deleteTriggerWithBackspace:!1,renderHTML({options:e,node:r}){var n;return["span",be(this.HTMLAttributes,e.HTMLAttributes),"".concat(e.suggestion.char).concat((n=r.attrs.label)!==null&&n!==void 0?n:r.attrs.id)]},suggestion:{char:"@",pluginKey:I3e,command:({editor:e,range:r,props:n})=>{var i,o,s;const a=e.view.state.selection.$to.nodeAfter;!((i=a==null?void 0:a.text)===null||i===void 0)&&i.startsWith(" ")&&(r.to+=1),e.chain().focus().insertContentAt(r,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),(s=(o=e.view.dom.ownerDocument.defaultView)===null||o===void 0?void 0:o.getSelection())===null||s===void 0||s.collapseToEnd()},allow:({state:e,range:r})=>{const n=e.doc.resolve(r.from),i=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(i)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{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="'.concat(this.name,'"]')}]},renderHTML({node:e,HTMLAttributes:r}){if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",be({"data-type":this.name},this.options.HTMLAttributes,r),this.options.renderLabel({options:this.options,node:e})];const n={...this.options};n.HTMLAttributes=be({"data-type":this.name},this.options.HTMLAttributes,r);const i=this.options.renderHTML({options:n,node:e});return typeof i=="string"?["span",be({"data-type":this.name},this.options.HTMLAttributes,r),i]:i},renderText({node:e}){return this.options.renderLabel!==void 0?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel({options:this.options,node:e})):this.options.renderText({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:r})=>{let n=!1;const{selection:i}=r,{empty:o,anchor:s}=i;return o?(r.doc.nodesBetween(s-1,s,(a,l)=>{if(a.type.name===this.name)return n=!0,e.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",l,l+a.nodeSize),!1}),n):!1})}},addProseMirrorPlugins(){return[Wh({editor:this.editor,...this.options.suggestion})]}}),z3e={name:"Mention",components:{NcUserBubble:k4,NodeViewWrapper:_n},props:{updateAttributes:{type:Function,required:!0},node:{type:Object,required:!0}},data(){return{username:this.node.attrs.label}},computed:{isCurrentUser(){var e;return this.node.attrs.id===((e=ek())==null?void 0:e.uid)}}};var $3e=function(){var e=this,r=e._self._c;return r("NodeViewWrapper",{staticClass:"mention",attrs:{as:"span",contenteditable:"false"}},[r("NcUserBubble",{staticClass:"mention-user-bubble",attrs:{user:e.node.attrs.id,"display-name":e.username,primary:e.isCurrentUser}},[e._v(" @"+e._s(e.username)+" ")])],1)},H3e=[],P3e=j(z3e,$3e,H3e,!1,null,"4024ec45");const V3e=P3e.exports,j3e=R3e.extend({parseHTML(){return[{tag:'span[data-type="user"]',getAttrs:e=>({id:decodeURIComponent(e.getAttribute("data-id")),label:e.innerText||e.textContent||e.getAttribute("data-label")}),priority:100}]},renderHTML({node:e,HTMLAttributes:r}){return["span",be({"data-type":"user",class:"mention"},this.options.HTMLAttributes,r),this.options.renderHTML({options:this.options,node:e})]},addNodeView(){return En(V3e)},toMarkdown(e,r){e.write("@[".concat(r.attrs.label,"](mention://user/").concat(encodeURIComponent(r.attrs.id),")"))}}),jd=new ve("searchQuery");function q3e(){return new fe({key:jd,state:{init:()=>({query:"",matchAll:!0,index:0}),apply:(e,r)=>{var i,o;const n=e.getMeta("searchQuery");if((n==null?void 0:n.query)!==void 0||n!=null&&n.match){const s={query:(i=n.query)!=null?i:r.query,matchAll:(o=n.matchAll)!=null?o:r.matchAll,index:r.index};return n!=null&&n.match&&(s.matchAll=!1,s.index=r.index+n.match),s}else return r}}})}const U3e=(e,r)=>({tr:n})=>n.setMeta("searchQuery",{query:e,matchAll:r}),W3e=()=>({tr:e})=>e.setMeta("searchQuery",{match:1}),K3e=()=>({tr:e})=>e.setMeta("searchQuery",{match:-1});function Z3e(){return new fe({key:new ve("searchDecorations"),state:{init(e,{doc:r}){const n=H1(r,"");return P1(r,n.results)},apply(e,r,n,i){const o=jd.getState(n),s=jd.getState(i),a=s.query!==o.query,l=s.index!==o.index,u=s.matchAll!==o.matchAll;if(e.docChanged||a||l||u){const{results:c,total:d,index:h}=H1(e.doc,s.query,{matchAll:s.matchAll,index:s.index});return eg("text:editor:search-results",{totalMatches:s.query===""?null:d,matchIndex:h}),P1(e.doc,c)}else return r}},props:{decorations(e){return this.getState(e)}}})}function H1(e,r,n){var o,s,a;n={matchAll:(o=n==null?void 0:n.matchAll)!=null?o:!0,index:(s=n==null?void 0:n.index)!=null?s:0};const i=[];if(!r||r==="")return{results:i,total:i.length,index:n.index};if(e.descendants((l,u,c)=>{if(!l.isText)return;const d=l.text.matchAll(new RegExp(r,"gi"));for(const h of d)i.push({from:h.index+u,to:h.index+u+r.length})}),n.matchAll)return{results:i,total:i.length,index:n.index};{const l=G3e(n.index,i.length);return{results:[(a=i[l])!=null?a:i],total:i.length,index:l}}}function P1(e,r){const n=[];return r.length<1?ye.empty:(r.forEach(i=>{n.push(ze.inline(i.from,i.to,{"data-text-el":"search-decoration",style:"background-color: #ead637; color: black; border-radius: 2px;"}))}),ye.create(e,n))}function G3e(e,r){return r<1?0:e<0?(e%r+r)%r:e%r}const J3e=Me.create({name:"Search",addCommands(){return{setSearchQuery:U3e,nextMatch:W3e,previousMatch:K3e}},addProseMirrorPlugins(){return[q3e(),Z3e()]}}),X3e="listItem",V1="textStyle",j1=/^(\d+)\.\s$/,Q3e=Fe.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return"".concat(this.options.itemTypeName,"+")},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:r,...n}=e;return r===1?["ol",be(this.options.HTMLAttributes,n),0]:["ol",be(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:r})=>this.options.keepAttributes?r().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(X3e,this.editor.getAttributes(V1)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=mn({find:j1,type:this.type,getAttributes:r=>({start:+r[1]}),joinPredicate:(r,n)=>n.childCount+n.attrs.start===+r[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=mn({find:j1,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:r=>({start:+r[1],...this.editor.getAttributes(V1)}),joinPredicate:(r,n)=>n.childCount+n.attrs.start===+r[1],editor:this.editor})),[e]}}),Y3e=Q3e.extend({addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),isList:{default:!0,rendered:!1}}}}),eDe=Fe.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",be(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});function q1(e){const r=[];return e.descendants((n,i)=>{tDe(n)?r.push(Object.freeze({offset:i,nodeSize:n.nodeSize,type:"text-only"})):n.type.name==="preview"&&r.push(Object.freeze({offset:i,nodeSize:n.nodeSize,type:"link-preview"}))}),r}function tDe(e){if(e.type.name!=="paragraph"||rDe(e))return!1;const r=nDe(e.firstChild);return!(!r||Su(r))}function rDe(e){return e.childCount>2||e.childCount===2&&e.lastChild.textContent.trim()}function nDe(e){var r;return e?(r=e.marks.find(n=>n.type.name==="link"))==null?void 0:r.attrs.href:void 0}const iDe={name:"DotsVerticalIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var oDe=function(){var e=this,r=e._self._c;return r("span",e._b({staticClass:"material-design-icon dots-vertical-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[r("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[r("path",{attrs:{d:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"}},[e.title?r("title",[e._v(e._s(e.title))]):e._e()])])])},sDe=[],aDe=j(iDe,oDe,sDe,!1,null,null);const lDe=aDe.exports,uDe={name:"PreviewOptions",components:{DotsVerticalIcon:lDe,NcActions:ii,NcActionButton:ni,NcActionCaption:r4,NcActionRadio:a4,NcActionSeparator:tb,DeleteIcon:ib},props:{type:{type:String,required:!0},offset:{type:Number,required:!0},nodeSize:{type:Number,required:!0},$editor:{type:Object,required:!0}},data(){return{open:!1}},methods:{onOpen(){this.$editor.commands.hideLinkBubble()},toggle(e){this.open=!1;const r=this.$editor.chain().focus().setTextSelection(this.offset+1);if(e==="text-only"){r.unsetPreview().run();return}r.setPreview().run()},deleteNode(){this.$editor.commands.deleteRange({from:this.offset,to:this.offset+this.nodeSize})}}};var cDe=function(){var e=this,r=e._self._c;return r("div",{staticClass:"preview-options-container",attrs:{contenteditable:"false"}},[r("NcActions",{staticClass:"preview-options",attrs:{"data-text-preview-options":"select",open:e.open},on:{"update:open":function(n){e.open=n},open:e.onOpen},scopedSlots:e._u([{key:"icon",fn:function(){return[r("DotsVerticalIcon",{attrs:{size:20}})]},proxy:!0}])},[r("NcActionCaption",{attrs:{name:e.t("text","Preview options")}}),r("NcActionRadio",{attrs:{"data-text-preview-option":"text-only",name:"preview-option",value:"text-only",checked:e.type==="text-only"},on:{change:n=>e.toggle(n.currentTarget.value)}},[e._v(" "+e._s(e.t("text","Text only"))+" ")]),r("NcActionRadio",{attrs:{"data-text-preview-option":"link-preview",name:"preview-option",value:"link-preview",checked:e.type==="link-preview"},on:{change:n=>e.toggle(n.currentTarget.value)}},[e._v(" "+e._s(e.t("text","Show link preview"))+" ")]),r("NcActionSeparator"),r("NcActionButton",{attrs:{"close-after-click":"true"},on:{click:e.deleteNode},scopedSlots:e._u([{key:"icon",fn:function(){return[r("DeleteIcon",{attrs:{size:20}})]},proxy:!0}])},[e._v(" "+e._s(e.t("text","Remove link"))+" ")])],1)],1)},dDe=[],hDe=j(uDe,cDe,dDe,!1,null,"aa76e56a");const pDe=hDe.exports,fDe=new ve("linkParagraphMenu");function mDe({editor:e}){return new fe({key:fDe,state:{init(r,{doc:n}){if(!e.options.editable)return{decorations:ye.create()};const i=q1(n);return{linkParagraphs:i,decorations:U1(n,i,e)}},apply(r,n,i,o){if(!r.docChanged||!e.options.editable)return n;const s=q1(o.doc),a=gDe(n,r,s)||U1(o.doc,s,e);return{linkParagraphs:s,decorations:a}}},props:{decorations(r){return this.getState(r).decorations}}})}function gDe(e,r,n){if(bDe(n,e.linkParagraphs))return!1;let i=!1;const o=e.decorations.map(r.mapping,r.doc,{onRemove:()=>{i=!0}});return i?!1:o}function bDe(e,r){return e.length!==r.length||e.some(yDe(r))}const yDe=e=>(r,n)=>r.type!==e[n].type||r.nodeSize!==e[n].nodeSize;function U1(e,r,n){const i=r.map(o=>CDe(o,n));return ye.create(e,i)}function CDe(e,r){return ze.widget(e.offset+1,vDe(e,r),{side:-1})}function vDe(e,r){const n={$editor:r,...e},i=document.createElement("div"),o=Gn.extend(pDe);return new o({propsData:n}).$mount(i).$el}const kDe=eDe.extend({parseHTML(){return this.parent().map(e=>Object.assign(e,{preserveWhitespace:"full"}))},addKeyboardShortcuts(){return{Backspace:()=>{const e=this.editor.state.selection;if(e.$from.parentOffset!==0)return!1;const r=e.$from.parent,n=e.$from.index(e.$from.depth-1);if(n===0)return!1;const i=e.$from.node(e.$from.depth-1).child(n-1);return r.type.name===this.name&&i.type.name===this.name?this.editor.chain().joinBackward().setHardBreak().run():!1}}},addProseMirrorPlugins(){return[mDe({editor:this.editor})]}}),wDe=Me.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new fe({key:new ve("placeholder"),props:{decorations:({doc:e,selection:r})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=r,o=[];if(!n)return null;const s=this.editor.isEmpty;return e.descendants((a,l)=>{const u=i>=l&&i<=l+a.nodeSize,c=!a.isLeaf&&ou(a);if((u||!this.options.showOnlyCurrent)&&c){const d=[this.options.emptyNodeClass];s&&d.push(this.options.emptyEditorClass);const h=ze.node(l,l+a.nodeSize,{class:d.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:u}):this.options.placeholder});o.push(h)}return this.options.includeChildren}),ye.create(e,o)}}})]}}),ADe={name:"Preview",components:{NodeViewWrapper:_n,NodeViewContent:uo,NcReferenceList:J1},props:ZD};var _De=function(){var e=this,r=e._self._c;return r("NodeViewWrapper",{staticClass:"preview",attrs:{"data-text-el":"preview",as:"div",contenteditable:"false"}},[r("NodeViewContent"),r("NcReferenceList",{attrs:{text:e.node.attrs.href,limit:1,interactive:!e.extension.options.isEmbedded,"display-fallback":!0}})],1)},EDe=[],xDe=j(ADe,_De,EDe,!1,null,"72691579");const DDe=xDe.exports,SDe=Fe.create({name:"preview",group:"block",content:"text?",atom:!0,marks:"link",isolating:!0,addOptions(){return{isEmbedded:!1,relativePath:null}},addAttributes(){return{href:{parseHTML:Sv},title:{parseHTML:e=>e.getAttribute("title")}}},parseHTML(){return[{tag:'a[title="preview"]',priority:1001}]},renderHTML({node:e}){return["a",{...e.attrs,href:vp(e,this.options.relativePath),rel:"noopener noreferrer nofollow"},0]},addNodeView(){return En(DDe)},toMarkdown:(e,r)=>{e.write("["),e.text(r.textContent,!1),e.write("](".concat(r.attrs.href," (").concat(r.attrs.title,"))")),e.closeBlock(r)},addCommands(){return{setPreview:()=>({state:e,chain:r})=>FDe(e)&&r().setNode(this.name,BDe(e)).run(),unsetPreview:()=>({state:e,chain:r})=>MDe(this.name,this.attributes,e)&&r().setNode("paragraph").run(),insertPreview:e=>({state:r,chain:n})=>n().insertContent({type:"preview",attrs:{href:e,title:"preview"},content:[{type:"text",marks:[{type:"link",attrs:{href:e}}],text:e}]}).run()}}});function BDe({selection:e}){const{$from:r}=e;return{href:Mv(r.nodeAfter),title:"preview"}}function MDe(e,r,n){const i=Ze(e,n.schema);return fn(n,i,r)}function FDe({selection:e}){const{$from:r}=e;if(NDe(r.parent))return!1;const n=Mv(r.parent.firstChild);return!(!n||Su(n))}function NDe(e){return e.childCount>2||e.childCount===2&&e.lastChild.textContent.trim()}function Mv(e){var r;return e?(r=e.marks.find(n=>n.type.name==="link"))==null?void 0:r.attrs.href:void 0}const ODe=/^\s*(\[([( |x])?\])\s$/,TDe=Fe.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{const r=e.getAttribute("data-checked");return r===""||r==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:'li[data-type="'.concat(this.name,'"]'),priority:51}]},renderHTML({node:e,HTMLAttributes:r}){return["li",be(this.options.HTMLAttributes,r,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:r,getPos:n,editor:i})=>{const o=document.createElement("li"),s=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input"),u=document.createElement("div");return s.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",c=>c.preventDefault()),l.addEventListener("change",c=>{if(!i.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}const{checked:d}=c.target;i.isEditable&&typeof n=="function"&&i.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{const p=n();if(typeof p!="number")return!1;const f=h.doc.nodeAt(p);return h.setNodeMarkup(p,void 0,{...f==null?void 0:f.attrs,checked:d}),!0}).run(),!i.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,d)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,d])=>{o.setAttribute(c,d)}),o.dataset.checked=e.attrs.checked,e.attrs.checked&&l.setAttribute("checked","checked"),s.append(l,a),o.append(s,u),Object.entries(r).forEach(([c,d])=>{o.setAttribute(c,d)}),{dom:o,contentDOM:u,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,c.attrs.checked?l.setAttribute("checked","checked"):l.removeAttribute("checked"),!0)}}},addInputRules(){return[mn({find:ODe,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),LDe=(e,r)=>{for(let n=e.depth;n>0;n--){const i=e.node(n);if(r(i))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:i}}},IDe=TDe.extend({addOptions(){return{nested:!0,HTMLAttributes:{}}},draggable:!1,content:"paragraph block*",addAttributes(){const e={...this.parent()};return e.checked.parseHTML=r=>{var n;return(n=r.querySelector("input[type=checkbox]"))==null?void 0:n.checked},e},parseHTML:[{priority:101,tag:"li",getAttrs:e=>e.querySelector("input[type=checkbox]"),context:"taskList/"}],renderHTML({node:e,HTMLAttributes:r}){const n={class:"task-list-item checkbox-item"},i={type:"checkbox",class:"",contenteditable:!1};return e.attrs.checked&&(i.checked=!0,n.class+=" checked"),["li",be(r,n),["input",i],["label",0]]},addNodeView:!1,toMarkdown:(e,r)=>{e.write("[".concat(r.attrs.checked?"x":" ","] ")),e.renderContent(r)},addInputRules(){return[...this.parent(),mn({find:/^\s*([-+*])\s(\[(x|X|\s)?\])\s$/,type:this.type,getAttributes:e=>({checked:"xX".includes(e[e.length-1])})})]},addProseMirrorPlugins(){return[new fe({props:{handleClick:(e,r,n)=>{const i=e.state,o=i.schema,s=e.posAtCoords({left:n.clientX,top:n.clientY}),a=i.doc.resolve(s.pos),l=LDe(a,function(c){return c.type===o.nodes.taskItem||c.type===o.nodes.listItem});if(n.target.tagName.toLowerCase()!=="li"||!l||l.node.type!==o.nodes.taskItem||!e.editable)return;const u=i.tr;u.setNodeMarkup(l.pos,o.nodes.taskItem,{checked:!l.node.attrs.checked}),e.dispatch(u)}}})]}}),RDe=Fe.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return"".concat(this.options.itemTypeName,"+")},parseHTML(){return[{tag:'ul[data-type="'.concat(this.name,'"]'),priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",be(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),zDe=RDe.extend({parseHTML:[{priority:100,tag:"ul.contains-task-list"}],renderHTML({HTMLAttributes:e}){return["ul",be(this.options.HTMLAttributes,e,{class:"contains-task-list"}),0]},addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),isList:{default:!0,rendered:!1},bullet:{default:"-",rendered:!1,isRequired:!0,parseHTML:r=>r.getAttribute("data-bullet")}}},toMarkdown:(e,r)=>{e.renderList(r,"  ",()=>"".concat(r.attrs.bullet," "))}});function W1({types:e,node:r}){return Array.isArray(e)&&e.includes(r.type)||r.type===e}const $De=Me.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:["paragraph"]}},addProseMirrorPlugins(){const e=new ve(this.name),r=Object.entries(this.editor.schema.nodes).map(([,n])=>n).filter(n=>this.options.notAfter.includes(n.name));return[new fe({key:e,appendTransaction:(n,i,o)=>{const{doc:s,tr:a,schema:l}=o,u=e.getState(o),c=s.content.size,d=l.nodes[this.options.node];if(u)return a.insert(c,d.create())},state:{init:(n,i)=>{const o=i.tr.doc.lastChild;return!W1({node:o,types:r})},apply:(n,i)=>{if(!n.docChanged)return i;const o=n.doc.lastChild;return!W1({node:o,types:r})}}})]}}),HDe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,PDe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,VDe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,jDe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,qDe=sr.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",be(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[Pr({find:HDe,type:this.type}),Pr({find:VDe,type:this.type})]},addPasteRules(){return[Vr({find:PDe,type:this.type}),Vr({find:jDe,type:this.type})]}});function UDe(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function WDe(e){return new fe({key:new ve("autolink"),appendTransaction:(r,n,i)=>{const o=r.some(u=>u.docChanged)&&!n.doc.eq(i.doc),s=r.some(u=>u.getMeta("preventAutolink"));if(!o||s)return;const{tr:a}=i,l=HE(n.doc,[...r]);if(GE(l).forEach(({newRange:u})=>{const c=VE(i.doc,u,p=>p.isTextblock);let d,h;if(c.length>1?(d=c[0],h=i.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):c.length&&i.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(d=c[0],h=i.doc.textBetween(d.pos,u.to,void 0," ")),d&&h){const p=h.split(" ").filter(g=>g!=="");if(p.length<=0)return!1;const f=p[p.length-1],m=d.pos+h.lastIndexOf(f);if(!f)return!1;const b=Gv(f).map(g=>g.toObject(e.defaultProtocol));if(!UDe(b))return!1;b.filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>i.schema.marks.code?!i.doc.rangeHasMark(g.from,g.to,i.schema.marks.code):!0).filter(g=>e.validate(g.value)).forEach(g=>{hh(g.from,g.to,i.doc).some(y=>y.mark.type===e.type)||a.addMark(g.from,g.to,e.type.create({href:g.href}))})}}),!!a.steps.length)return a}})}function KDe(e){return new fe({key:new ve("handleClickLink"),props:{handleClick:(r,n,i)=>{var o,s;if(i.button!==0||!r.editable)return!1;let a=i.target;const l=[];for(;a.nodeName!=="DIV";)l.push(a),a=a.parentNode;if(!l.find(p=>p.nodeName==="A"))return!1;const u=N2(r.state,e.type.name),c=i.target,d=(o=c==null?void 0:c.href)!==null&&o!==void 0?o:u.href,h=(s=c==null?void 0:c.target)!==null&&s!==void 0?s:u.target;return c&&d?(window.open(d,h),!0):!1}}})}function ZDe(e){return new fe({key:new ve("handlePasteLink"),props:{handlePaste:(r,n,i)=>{const{state:o}=r,{selection:s}=o,{empty:a}=s;if(a)return!1;let l="";i.content.forEach(c=>{l+=c.textContent});const u=X1(l,{defaultProtocol:e.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!u?!1:(e.editor.commands.setMark(e.type,{href:u.href}),!0)}}})}const GDe=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function K1(e,r){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return r&&r.forEach(i=>{const o=typeof i=="string"?i:i.scheme;o&&n.push(o)}),!e||e.replace(GDe,"").match(new RegExp("^(?:(?:".concat(n.join("|"),"):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))"),"i"))}const JDe=sr.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(e=>{if(typeof e=="string"){_p(e);return}_p(e.scheme,e.optionalSlashes)})},onDestroy(){Jv()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const r=e.getAttribute("href");return!r||!K1(r,this.options.protocols)?!1:null}}]},renderHTML({HTMLAttributes:e}){return K1(e.href,this.options.protocols)?["a",be(this.options.HTMLAttributes,e),0]:["a",be(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:r})=>r().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:r})=>r().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[Vr({find:e=>{const r=[];if(e){const{validate:n}=this.options,i=X1(e).filter(o=>o.isLink&&n(o.value));i.length&&i.forEach(o=>r.push({text:o.value,data:{href:o.href},index:o.start}))}return r},type:this.type,getAttributes:e=>{var r;return{href:(r=e.data)===null||r===void 0?void 0:r.href}}})]},addProseMirrorPlugins(){const e=[];return this.options.autolink&&e.push(WDe({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate})),this.options.openOnClick===!0&&e.push(KDe({type:this.type})),this.options.linkOnPaste&&e.push(ZDe({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}}),XDe=["http:","https:","mailto:","tel:"],QDe=e=>({href:e.groups.href}),YDe=e=>(e.pop(),QDe(e)),e4e=JDe.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),relativePath:null}},addAttributes(){return{href:{default:null},title:{default:null}}},inclusive:!1,parseHTML:[{tag:"a[href]",getAttrs:e=>({href:Sv(e),title:e.getAttribute("title")})}],renderHTML(e){const{mark:r}=e,n=new URL(r.attrs.href,window.location),i=XDe.includes(n.protocol)?vp(r,this.options.relativePath):"#";return["a",{...r.attrs,href:i,"data-md-href":r.attrs.href,rel:"noopener noreferrer nofollow"},0]},addInputRules(){return[Pr({find:/(?:^|\s)\[([\w|\s|-]+)\]\((?<href>.+?)\)$/gm,type:this.type,getAttributes:YDe})]},addProseMirrorPlugins(){return[...this.parent().filter(({key:e})=>!e.startsWith("handleClickLink")&&!e.startsWith("textHandleClickLink")),O3e()]}}),t4e=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,r4e=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,n4e=sr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",be(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-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Pr({find:t4e,type:this.type})]},addPasteRules(){return[Vr({find:r4e,type:this.type})]}}),i4e=n4e.extend({parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",getAttrs:e=>e==="line-through"}]},renderHTML(){return["s",0]},toMarkdown:{open:"~~",close:"~~",mixable:!0,expelEnclosingWhitespace:!0}}),Fv=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Nv=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Ov=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Tv=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,o4e=sr.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",be(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[Pr({find:Fv,type:this.type}),Pr({find:Ov,type:this.type})]},addPasteRules(){return[Vr({find:Nv,type:this.type}),Vr({find:Tv,type:this.type})]}}),s4e=o4e.extend({name:"strong",addInputRules(){return[Pr({find:Fv,type:this.type})]},addPasteRules(){return[Vr({find:Nv,type:this.type})]}}),a4e=sr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",be(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()}}}),l4e=a4e.extend({parseHTML(){return[{tag:"u"},{style:"text-decoration",getAttrs:e=>e==="underline"}]},renderHTML(){return["u",0]},toMarkdown:{open:"__",close:"__",mixable:!0,expelEnclosingWhitespace:!0},addInputRules(){return[Pr({find:Ov,type:this.type})]},addPasteRules(){return[Vr({find:Tv,type:this.type})]}}),u4e=qDe.extend({name:"em"});ce.registerAlias("plaintext","mermaid");const J4e=Me.create({name:"RichText",addOptions(){return{editing:!0,extensions:[],component:null,relativePath:null,isEmbedded:!1}},addExtensions(){const e=[this.options.editing?TCe:null,a_e,lC,kDe,XEe,uxe,s4e,u4e,i4e,iwe,gwe,Cwe,s_e.configure({lowlight:ce,defaultLanguage:"plaintext"}),lwe,cxe,Y3e,L3e,this.options.editing?TEe:vv,zDe,IDe,mwe,SDe.configure({isEmbedded:this.options.isEmbedded}),l4e,Axe,_xe,c_e,GEe,Exe,PEe,j3e,J3e,tN.configure({suggestion:HEe()}),m3e,e4e.configure({openOnClick:!0,validate:n=>/^https?:\/\//.test(n),relativePath:this.options.relativePath}),T3e,this.options.editing?wDe.configure({placeholder:Li("text","Start writing, or try '/' to add, '@' to mention…")}):null,$De],r=this.options.extensions.map(n=>n.name);return[...e.filter(n=>n&&!r.includes(n.name)),...this.options.extensions]}});export{Ui as $,O4e as A,FF as B,Br as C,I4e as D,Me as E,T4e as F,L4e as G,fo as H,Se as I,iF as J,no as K,N4e as L,$r as M,F4e as N,M4e as O,fe as P,kv as Q,ce as R,Mxe as S,J4e as T,O9 as U,j3e as V,W4e as W,Z4e as X,ei as Y,vAe as Z,w4e as _,$i as a,k4e as a0,Pn as a1,Cn as a2,j4e as a3,_4e as a4,ib as a5,v3e as a6,q6 as a7,rM as a8,tb as a9,s3e as aa,XE as ab,K4e as ac,U4e as ad,Oo as ae,yp as af,lu as ag,Y2 as ah,Cp as ai,Dv as aj,R1 as ak,G4e as al,D4e as am,E4e as an,S4e as ao,wo as ap,x4e as aq,Vxe as ar,A4e as as,B4e as at,JD as au,XD as av,VC as aw,eb as ax,Hi as b,du as c,ai as d,oc as e,Ur as f,SF as g,Ke as h,Mf as i,At as j,V4e as k,q4e as l,ve as m,R4e as n,z4e as o,P4e as p,St as q,pe as r,H4e as s,yr as t,Bt as u,$4e as v,me as w,Sr as x,O8 as y,gn as z};

Zerion Mini Shell 1.0