%PDF- %PDF-
Direktori : /www/varak.net/nextcloud.varak.net/apps_old/apps/text/js/ |
Current File : //www/varak.net/nextcloud.varak.net/apps_old/apps/text/js/RichText-CcSEp-9N.chunk.mjs |
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('text', '', 'js/index-C1azEbgd-qDYxBT-w.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-CHhv7cmw.chunk.mjs'),window.OC.filePath('text', '', 'js/NcNoteCard-CImn6F9p-7OG_jBLc.chunk.mjs'),window.OC.filePath('text', '', 'css/NcNoteCard-CImn6F9p-B6WZzrWi.chunk.css')])))=>i.map(i=>d[i]); /*! third party licenses: js/vendor.LICENSE.txt */ var Iv=Object.defineProperty;var _p=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 Ep=(e,r,n)=>Rv(e,typeof r!="symbol"?r+"":r,n),xp=(e,r,n)=>r.has(e)||_p("Cannot "+n);var yo=(e,r,n)=>(xp(e,r,"read from private field"),n?n.call(e):r.get(e)),Mu=(e,r,n)=>r.has(e)?_p("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,n),Fu=(e,r,n,i)=>(xp(e,r,"write to private field"),i?i.call(e,n):r.set(e,n),n);import{i as zv,j as $v,U as Dp,k as Hv,L as Pv,n as j,a as ni,l as Y1,m as Vv,o as jv,t as Li,p as qv,q as Uv,r as Wv,s as eg,u as Kv,v as Zv,w as Sp,x as tg,y as Gv,z as Jv}from"./_plugin-vue2_normalizer-CBD_Jxxq.chunk.mjs";import{n as ao,G as Xv,d as Qv,N as Zl,a as ii,c as rg,b as Yv}from"./NcNoteCard-CImn6F9p-7OG_jBLc.chunk.mjs";import{_ as ng,g as ig,p as Dn,e as og}from"./modulepreload-polyfill-DMTabKmO.chunk.mjs";import{c as js,v as qs,B as Wd,a as sg,_ as Kd}from"./index-Br6XaFoY.chunk.mjs";import{s as Hc,t as ek,m as tk,a as rk}from"./index-COlIf7vj.chunk.mjs";import{u as ag,p as nk,e as ik,f as ok,o as sk,q as ak,r as lk,s as uk,h as ck}from"./MediaHandler.provider-CSBQhvYP.chunk.mjs";import{V as Zn,j as dk,v as hk,g as Bp}from"./vue.runtime.esm-fZsuJKoo.chunk.mjs";import{a as pk,c as an,g as Er}from"./emoji-picker-SoWZqoso.chunk.mjs";import{p as fk,t as pi,n as mk,g as Mp,a as gk,s as lg}from"./public-BnJZpQLY.chunk.mjs";import{l as ug}from"./index-Ubm2itxG.chunk.mjs";const bk=(e,r,n=()=>{})=>{const i=document.createElement("div");(document.querySelector(r==null?void 0:r.container)||document.body).appendChild(i);const o=new Zn({el:i,name:"VueDialogHelper",render:s=>s(e,{props:r,on:{close:(...a)=>{n(...a.map(l=>dk(l))),o.$destroy()}}})});return o},yk='<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>',Ck='<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 vk=Object.defineProperty,kk=(e,r,n)=>r in e?vk(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,Qe=(e,r,n)=>kk(e,typeof r!="symbol"?r+"":r,n),cg=(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))(cg||{});class Ak extends Error{}class wk{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 ng(async()=>{const{FilePickerVue:n}=await import("./index-C1azEbgd-qDYxBT-w.chunk.mjs");return{FilePickerVue:n}},__vite__mapDeps([0,1,2,3]),import.meta.url);return new Promise((n,i)=>{bk(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 _k{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||fk.basename(i);if(r===1){let d=pi("Choose");n.length===1?d=pi("Choose {file}",{file:u}):this.multiSelect&&(d=mk("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:Ck}),(r===2||r===4)&&l.push({callback:()=>{},label:c?pi("Move to {target}",{target:c}):pi("Move"),type:r===2?"primary":"secondary",icon:yk}),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 wk(this.title,this.multiSelect,this.mimeTypeFilter,this.directoriesAllowed,this.buttons,this.path,this.filter,this.container,this.disabledNavigation)}}function Ek(e){return new _k(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 dg(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=dg(o.content,s.content,n+1);if(a!=null)return a}n+=o.nodeSize}}function hg(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=hg(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 dg(this,r,n)}findDiffEnd(r,n=this.size,i=r.size){return hg(this,r,n,i)}findIndex(r,n=-1){if(r==0)return Us(0,r);if(r==this.size)return Us(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?Us(i+1,a):Us(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 Us(e,r){return Nu.index=e,Nu.offset=r,Nu}function Va(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(!Va(e[i],r[i]))return!1}else{for(let i in e)if(!(i in r)||!Va(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&&Va(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 ja 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=fg(this.content,r+this.openStart,n);return i&&new $(i,this.openStart,this.openEnd)}removeBetween(r,n){return new $(pg(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 pg(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(pg(s.content,r-o-1,n-o-1)))}function fg(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=fg(a.content,r-s-1,n);return l&&e.replaceChild(o,a.copy(l))}function xk(e,r,n){if(n.openStart>e.depth)throw new ja("Inserted content deeper than insertion position");if(e.depth-n.openStart!=r.depth-n.openEnd)throw new ja("Inconsistent open depths");return mg(e,r,n,0)}function mg(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=mg(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 zn(a,l.cut(0,e.parentOffset).append(n.content).append(l.cut(r.parentOffset)))}else{let{start:a,end:l}=Dk(n,e);return zn(s,bg(e,a,l,r,i))}else return zn(s,qa(e,r,i))}function gg(e,r){if(!r.type.compatibleContent(e.type))throw new ja("Cannot join "+r.type.name+" onto "+e.type.name)}function Vc(e,r,n){let i=e.node(n);return gg(i,r.node(n)),i}function Rn(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&&(Rn(e.nodeAfter,i),s++));for(let l=s;l<a;l++)Rn(o.child(l),i);r&&r.depth==n&&r.textOffset&&Rn(r.nodeBefore,i)}function zn(e,r){return e.type.checkContent(r),e.copy(r)}function bg(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)?(gg(s,a),Rn(zn(s,bg(e,r,n,i,o+1)),l)):(s&&Rn(zn(s,qa(e,r,o+1)),l),Fo(r,n,o,l),a&&Rn(zn(a,qa(n,i,o+1)),l)),Fo(i,null,o,l),new O(l)}function qa(e,r,n){let i=[];if(Fo(null,e,n,i),e.depth>n){let o=Vc(e,r,n+1);Rn(zn(o,qa(e,r,n+1)),i)}return Fo(r,null,n,i),new O(i)}function Dk(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 Ua(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=Fp.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 Fp.set(r,i=new Sk);let o=i.elts[i.i]=Uo.resolve(r,n);return i.i=(i.i+1)%Bk,o}}class Sk{constructor(){this.elts=[],this.i=0}}const Bk=12,Fp=new WeakMap;class Ua{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 Mk=Object.create(null);let $n=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&&Va(this.attrs,n||r.defaultAttrs||Mk)&&_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 xk(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()+")"),yg(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}};$n.prototype.text=void 0;class Wa extends $n{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):yg(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 Wa(this.type,this.attrs,this.text,r)}withText(r){return r==this.text?this:new Wa(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 yg(e,r){for(let n=e.length-1;n>=0;n--)r=e[n].type.name+"("+r+")";return r}class Gn{constructor(r){this.validEnd=r,this.next=[],this.wrapCache=[]}static parse(r,n){let i=new Fk(r,n);if(i.next==null)return Gn.empty;let o=Cg(i);i.next&&i.err("Unexpected trailing text");let s=zk(Rk(o));return $k(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")}}Gn.empty=new Gn(!0);class Fk{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 Cg(e){let r=[];do r.push(Nk(e));while(e.eat("|"));return r.length==1?r[0]:{type:"choice",exprs:r}}function Nk(e){let r=[];do r.push(Ok(e));while(e.next&&e.next!=")"&&e.next!="|");return r.length==1?r[0]:{type:"seq",exprs:r}}function Ok(e){let r=Ik(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=Tk(e,r);else break;return r}function Np(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let r=Number(e.next);return e.pos++,r}function Tk(e,r){let n=Np(e),i=n;return e.eat(",")&&(e.next!="}"?i=Np(e):i=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:r}}function Lk(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 Ik(e){if(e.eat("(")){let r=Cg(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=Lk(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 Rk(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 vg(e,r){return r-e}function Op(e,r){let n=[];return i(r),n.sort(vg);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 zk(e){let r=Object.create(null);return n(Op(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]);Op(e,u).forEach(d=>{c||o.push([l,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let s=r[i.join(",")]=new Gn(i.indexOf(e.length-1)>-1);for(let a=0;a<o.length;a++){let l=o[a][1].sort(vg);s.next.push({type:o[a][0],next:r[l.join(",")]||n(l)})}return s}}function $k(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 kg(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 Ag(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 wg(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 _g(e,r){let n=Object.create(null);if(r)for(let i in r)n[i]=new Pk(e,i,r[i]);return n}let Tp=class Eg{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=_g(r,i.attrs),this.defaultAttrs=kg(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==Gn.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:Ag(this.attrs,r)}create(r=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new $n(this,this.computeAttrs(r),O.from(n),_e.setFrom(i))}createChecked(r=null,n,i){return n=O.from(n),this.checkContent(n),new $n(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 $n(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){wg(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 Eg(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 Hk(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 Pk{constructor(r,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?Hk(r,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class Gl{constructor(r,n,i,o){this.name=r,this.rank=n,this.schema=i,this.spec=o,this.attrs=_g(r,o.attrs),this.excluded=null;let s=kg(this.attrs);this.instance=s?new _e(this,s):null}create(r=null){return!r&&this.instance?this.instance:new _e(this,Ag(this.attrs,r))}static compile(r,n){let i=Object.create(null),o=0;return r.forEach((s,a)=>i[s]=new Gl(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){wg(this.attrs,r,"mark",this.name)}excludes(r){return this.excluded.indexOf(r)>-1}}class Zd{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=Tp.compile(this.spec.nodes,this),this.marks=Gl.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]=Gn.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?Lp(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==""?[]:Lp(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 Tp){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 Wa(i,i.defaultAttrs,r,_e.setFrom(n))}mark(r,n){return typeof r=="string"&&(r=this.marks[r]),r.create(n)}nodeFromJSON(r){return $n.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 Lp(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 Vk(e){return e.tag!=null}function jk(e){return e.style!=null}let Hn=class qc{constructor(r,n){this.schema=r,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(o=>{if(Vk(o))this.tags.push(o);else if(jk(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 Rp(this,n,!1);return i.addAll(r,_e.none,n.from,n.to),i.finish()}parseSlice(r,n={}){let i=new Rp(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(Wk(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=zp(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=zp(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 xg={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},qk={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Dg={ol:!0,ul:!0},Ka=1,Za=2,No=4;function Ip(e,r,n){return r!=null?(r?Ka:0)|(r==="full"?Za:0):e&&e.whitespace=="pre"?Ka|Za:n&~No}class Ws{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&Ka)){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&&!xg.hasOwnProperty(r.parentNode.nodeName.toLowerCase())}}class Rp{constructor(r,n,i){this.parser=r,this.options=n,this.isOpen=i,this.open=0;let o=n.topNode,s,a=Ip(null,n.preserveWhitespace,0)|(i?No:0);o?s=new Ws(o.type,o.attrs,_e.none,!0,n.topMatch||o.type.contentMatch,a):i?s=new Ws(null,null,_e.none,!0,null,a):s=new Ws(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&Za||o.inlineContext(r)||/[^ \t\r\n\u000c]/.test(i)){if(o.options&Ka)o.options&Za?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;Dg.hasOwnProperty(o)&&this.parser.normalizeLists&&Uk(r);let a=this.options.ruleFromNode&&this.options.ruleFromNode(r)||(s=this.parser.matchTag(r,this,i));if(a?a.ignore:qk.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(xg.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):$p(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=Ip(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):$p(c.type,r))?(u=c.addToSet(u),!1):!0),this.nodes.push(new Ws(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 Uk(e){for(let r=e.firstChild,n=null;r;r=r.nextSibling){let i=r.nodeType==1?r.nodeName.toLowerCase():null;i&&Dg.hasOwnProperty(i)&&n?(n.appendChild(r),r=n):i=="li"?n=r:i&&(n=null)}}function Wk(e,r){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,r)}function zp(e){let r={};for(let n in e)r[n]=e[n];return r}function $p(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}=Aa(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&&Aa(Ou(i),o(r,n),null,r.attrs)}static renderSpec(r,n,i=null,o){return Aa(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=Hp(r.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(r){return Hp(r.marks)}}function Hp(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 Pp=new WeakMap;function Kk(e){let r=Pp.get(e);return r===void 0&&Pp.set(e,r=Zk(e)),r}function Zk(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 Aa(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=Kk(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}=Aa(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 Sg=65535,Bg=Math.pow(2,16);function Gk(e,r){return e+r*Bg}function Vp(e){return e&Sg}function Jk(e){return(e-(e&Sg))/Bg}const Mg=1,Fg=2,wa=4,Ng=8;class Uc{constructor(r,n,i){this.pos=r,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&Ng)>0}get deletedBefore(){return(this.delInfo&(Mg|wa))>0}get deletedAfter(){return(this.delInfo&(Fg|wa))>0}get deletedAcross(){return(this.delInfo&wa)>0}}class Ft{constructor(r,n=!1){if(this.ranges=r,this.inverted=n,!r.length&&Ft.empty)return Ft.empty}recover(r){let n=0,i=Vp(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+Jk(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:Gk(l/3,r-u),b=r==u?Fg:r==h?Mg:wa;return(n<0?r!=u:r!=h)&&(b|=Ng),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=Vp(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 Ft(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(r){return r==0?Ft.empty:new Ft(r<0?[0,-r,0]:[0,0,r])}}Ft.empty=new Ft([]);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 dt{getMap(){return Ft.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 ja)return Ue.fail(s.message);throw s}}}function Gd(e,r,n){let i=[];for(let o=0;o<e.childCount;o++){let s=e.child(o);s.content.size&&(s=s.copy(Gd(s.content,r,s))),s.isInline&&(s=r(s,n,o)),i.push(s)}return O.fromArray(i)}class Yr extends dt{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 $(Gd(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 gr(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 Yr(n.pos,i.pos,this.mark)}merge(r){return r instanceof Yr&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from?new Yr(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 Yr(n.from,n.to,r.markFromJSON(n.mark))}}dt.jsonID("addMark",Yr);class gr extends dt{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 $(Gd(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 Yr(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 gr(n.pos,i.pos,this.mark)}merge(r){return r instanceof gr&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from?new gr(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 gr(n.from,n.to,r.markFromJSON(n.mark))}}dt.jsonID("removeMark",gr);class en extends dt{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 en(this.pos,n.marks[o]);return new en(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 en(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 en(n.pos,r.markFromJSON(n.mark))}}dt.jsonID("addNodeMark",en);class Zi extends dt{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 en(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))}}dt.jsonID("removeNodeMark",Zi);class Ye extends dt{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 Ft([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)}}dt.jsonID("replace",Ye);class tt extends dt{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 Ft([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)}}dt.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 Xk(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 gr(p,f,h[b])));l&&l.to==p?l.to=f:s.push(l=new Yr(p,f,i))}}),o.forEach(u=>e.step(u)),s.forEach(u=>e.step(u))}function Qk(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 Gl){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 gr(a.from,a.to,a.style)))}function Og(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 gr(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 Yk(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||!Yk(i,o,s))break}return null}function eA(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 Jd(e,r,n=null,i=e){let o=tA(e,r),s=o&&rA(i,r);return s?o.map(jp).concat({type:r,attrs:n}).concat(s.map(jp)):null}function jp(e){return{type:e,attrs:null}}function tA(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 rA(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 nA(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 iA(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)&&aA(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&&sA(e,a,l,s),Og(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&&oA(e,a,l,s),!1}})}function oA(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 sA(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 aA(e,r,n){let i=e.resolve(r),o=i.index();return i.parent.canReplaceWith(o,o+1,n)}function lA(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 uA(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 yn(e,r){let n=e.resolve(r),i=n.index();return Tg(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(i,i+1)}function Tg(e,r){return!!(e&&r&&!e.isLeaf&&e.canAppend(r))}function Jl(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&&Tg(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 cA(e,r,n){let i=new Ye(r-n,r+n,$.empty,!0);e.step(i)}function dA(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 Lg(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 Xl(e,r,n=r,i=$.empty){if(r==n&&!i.size)return null;let o=e.resolve(r),s=e.resolve(n);return Ig(o,s,i)?new Ye(r,n,i):new hA(o,s,i).fit()}function Ig(e,r,n){return!n.openStart&&!n.openEnd&&e.start()==r.start()&&e.parent.canReplace(e.index(),r.index(),n.content)}class hA{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 $(wo(r,n-1,1),n-1,s?n-1:i)}else this.unplaced=new $(wo(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(Rg(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 $(wo(a.content,r-1,1),r-1,f<0?a.openEnd:r-1):new $(wo(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 wo(e,r,n){return r==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(wo(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 Rg(e,r,n){if(r<=0)return e;let i=e.content;return r>1&&(i=i.replaceChild(0,Rg(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&&!pA(n,s.content,a)?l:null}function pA(e,r,n){for(let i=n;i<r.childCount;i++)if(!e.allowsMarks(r.child(i).marks))return!0;return!1}function fA(e){return e.spec.defining||e.spec.definingForContent}function mA(e,r,n,i){if(!i.size)return e.deleteRange(r,n);let o=e.doc.resolve(r),s=e.doc.resolve(n);if(Ig(o,s,i))return e.step(new Ye(r,n,i));let a=$g(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=fA(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 $(zg(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 zg(e,r,n,i,o){if(r<n){let s=e.firstChild;e=e.replaceChild(0,s.copy(zg(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 gA(e,r,n,i){if(!i.isInline&&r==n&&e.doc.resolve(r).parent.content.size){let o=dA(e.doc,r,i.type);o!=null&&(r=n=o)}e.replaceRange(r,n,new $(O.from(i),0,0))}function bA(e,r,n){let i=e.doc.resolve(r),o=e.doc.resolve(n),s=$g(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)return e.delete(i.before(a),n);e.delete(r,n)}function $g(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 dt{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 Ft.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)}}dt.jsonID("attr",Ri);class Wo extends dt{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 Ft.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)}}dt.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 Xd{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=Xl(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 mA(this,r,n,i),this}replaceRangeWith(r,n,i){return gA(this,r,n,i),this}deleteRange(r,n){return bA(this,r,n),this}lift(r,n){return eA(this,r,n),this}join(r,n=1){return cA(this,r,n),this}wrap(r,n){return nA(this,r,n),this}setBlockType(r,n=r,i,o=null){return iA(this,r,n,i,o),this}setNodeMarkup(r,n,i=null,o){return lA(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 en(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 uA(this,r,n,i),this}addMark(r,n,i){return Xk(this,r,n,i),this}removeMark(r,n,i){return Qk(this,r,n,i),this}clearIncompatible(r,n,i){return Og(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 Hg(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&&Wp(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),Wp(r,i,n.isInline?-1:1))}}static findFrom(r,n,i=!1){let o=r.parent.inlineContent?new Q(r):Ai(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?Ai(r.node(0),r.node(s),r.before(s+1),r.index(s),n,i):Ai(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 Ai(r,r,0,0,1)||new nr(r)}static atEnd(r){return Ai(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 Hg{constructor(r,n){this.$from=r,this.$to=n}}let qp=!1;function Up(e){!qp&&!e.parent.inlineContent&&(qp=!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){Up(r),Up(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 Ql(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 Ql{constructor(r,n){this.anchor=r,this.head=n}map(r){return new Ql(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 Qd(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 Qd{constructor(r){this.anchor=r}map(r){let{deleted:n,pos:i}=r.mapResult(this.anchor);return n?new Ql(i,i):new Qd(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 yA}}ne.jsonID("all",nr);const yA={map(){return this},resolve(e){return new nr(e)}};function Ai(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=Ai(e,l,n+o,o<0?l.childCount:0,o,s);if(u)return u}n+=l.nodeSize*o}return null}function Wp(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 Kp=1,Ks=2,Zp=4;let CA=class extends Xd{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|Kp)&~Ks,this.storedMarks=null,this}get selectionSet(){return(this.updated&Kp)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Ks,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&Ks)>0}addStep(e,r){super.addStep(e,r),this.updated=this.updated&~Ks,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|=Zp,this}get scrolledIntoView(){return(this.updated&Zp)>0}};function Gp(e,r){return!r||!e?e:e.bind(r)}class Eo{constructor(r,n,i){this.name=r,this.init=Gp(n.init,i),this.apply=Gp(n.apply,i)}}const vA=[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=vA.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 CA(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=$n.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 Pg(e,r,n){for(let i in e){let o=e[i];o instanceof Function?o=o.bind(r):i=="handleDOMEvents"&&(o=Pg(o,r,{})),n[i]=o}return n}class ge{constructor(r){this.spec=r,this.props={},r.props&&Pg(r.props,this,this.props),this.key=r.key?r.key.key:Vg("plugin")}getState(r){return r[this.key]}}const $u=Object.create(null);function Vg(e){return e in $u?e+"$"+ ++$u[e]:($u[e]=0,e+"$")}class Ae{constructor(r="key"){this.key=Vg(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 Tr=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},kA=function(){Kc=null},Jn=function(e,r,n,i){return n&&(Jp(e,r,n,i,-1)||Jp(e,r,n,i,1))},AA=/^(img|br|input|textarea|hr)$/i;function Jp(e,r,n,i,o){for(;;){if(e==n&&r==i)return!0;if(r==(o<0?0:fr(e))){let s=e.parentNode;if(!s||s.nodeType!=1||_s(e)||AA.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?fr(e):0}else return!1}}function fr(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function wA(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=fr(e)}else if(e.parentNode&&!_s(e))r=ot(e),e=e.parentNode;else return null}}function _A(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&&!_s(e))r=ot(e)+1,e=e.parentNode;else return null}}function EA(e,r,n){for(let i=r==0,o=r==fr(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==fr(e)}}function _s(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 Yl=function(e){return e.focusNode&&Jn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Sn(e,r){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=r,n}function xA(e){let r=e.activeElement;for(;r&&r.shadowRoot;)r=r.shadowRoot.activeElement;return r}function DA(e,r,n){if(e.caretPositionFromPoint)try{let i=e.caretPositionFromPoint(r,n);if(i)return{node:i.offsetNode,offset:i.offset}}catch{}if(e.caretRangeFromPoint){let i=e.caretRangeFromPoint(r,n);if(i)return{node:i.startContainer,offset:i.startOffset}}}const kr=typeof navigator<"u"?navigator:null,Xp=typeof document<"u"?document:null,Cn=kr&&kr.userAgent||"",Zc=/Edge\/(\d+)/.exec(Cn),jg=/MSIE \d/.exec(Cn),Gc=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Cn),wt=!!(jg||Gc||Zc),ln=jg?document.documentMode:Gc?+Gc[1]:Zc?+Zc[1]:0,or=!wt&&/gecko\/(\d+)/i.test(Cn);or&&+(/Firefox\/(\d+)/.exec(Cn)||[0,0])[1];const Jc=!wt&&/Chrome\/(\d+)/.exec(Cn),ut=!!Jc,qg=Jc?+Jc[1]:0,bt=!wt&&!!kr&&/Apple Computer/.test(kr.vendor),Gi=bt&&(/Mobile\/\w+/.test(Cn)||!!kr&&kr.maxTouchPoints>2),jt=Gi||(kr?/Mac/.test(kr.platform):!1),SA=kr?/Win/.test(kr.platform):!1,Qt=/Android \d/.test(Cn),Es=!!Xp&&"webkitFontSmoothing"in Xp.documentElement.style,BA=Es?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function MA(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 Br(e,r){return typeof e=="number"?e:e[r]}function FA(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 Qp(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?MA(s):FA(l),d=0,h=0;if(r.top<c.top+Br(i,"top")?h=-(c.top-r.top+Br(o,"top")):r.bottom>c.bottom-Br(i,"bottom")&&(h=r.bottom-r.top>c.bottom-c.top?r.top+Br(o,"top")-c.top:r.bottom-c.bottom+Br(o,"bottom")),r.left<c.left+Br(i,"left")?d=-(c.left-r.left+Br(o,"left")):r.right>c.right-Br(i,"right")&&(d=r.right-c.right+Br(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 NA(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:Ug(e.dom)}}function Ug(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 OA({refDOM:e,refTop:r,stack:n}){let i=e?e.getBoundingClientRect().top:0;Wg(n,i==0?0:i-r)}function Wg(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 TA(e){if(e.setActive)return e.setActive();if(fi)return e.focus(fi);let r=Ug(e);e.focus(fi==null?{get preventScroll(){return fi={preventScroll:!0},!0}}:void 0),fi||(fi=!1,Wg(r,0))}function Kg(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=Tr(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?LA(n,o):!n||i&&n.nodeType==1?{node:e,offset:s}:Kg(n,o)}function LA(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=Ur(i,1);if(s.top!=s.bottom&&Yd(r,s))return{node:e,offset:o+(r.left>=(s.left+s.right)/2?1:0)}}return{node:e,offset:0}}function Yd(e,r){return e.left>=r.left-1&&e.left<=r.right+1&&e.top>=r.top-1&&e.top<=r.bottom+1}function IA(e,r){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&r.left<e.getBoundingClientRect().left?n:e}function RA(e,r,n){let{node:i,offset:o}=Kg(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 zA(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 Zg(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(Yd(r,c))return Zg(a,r,c)}}if((s=(s+1)%i)==o)break}return e}function $A(e,r){let n=e.dom.ownerDocument,i,o=0,s=DA(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(!Yd(r,c)||(a=Zg(e.dom,r,c),!a))return null}if(bt)for(let c=a;i&&c;c=Ko(c))c.draggable&&(i=void 0);if(a=IA(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;Es&&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=zA(e,i,o,r))}l==null&&(l=RA(e,a,r));let u=e.docView.nearestDesc(a,!0);return{pos:l,inside:u?u.posAtStart-u.border:-1}}function Yp(e){return e.top<e.bottom||e.left<e.right}function Ur(e,r){let n=e.getClientRects();if(n.length){let i=n[r<0?0:n.length-1];if(Yp(i))return i}return Array.prototype.find.call(n,Yp)||e.getBoundingClientRect()}const HA=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Gg(e,r,n){let{node:i,offset:o,atom:s}=e.docView.domFromPos(r,n<0?-1:1),a=Es||or;if(i.nodeType==3)if(a&&(HA.test(i.nodeValue)||(n<0?!o:o==i.nodeValue.length))){let l=Ur(Tr(i,o,o),n);if(or&&o&&/\s/.test(i.nodeValue[o-1])&&o<i.nodeValue.length){let u=Ur(Tr(i,o-1,o-1),-1);if(u.top==l.top){let c=Ur(Tr(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(Ur(Tr(i,l,u),c),c<0)}if(!e.state.doc.resolve(r-(s||0)).parent.inlineContent){if(s==null&&o&&(n<0||o==fr(i))){let l=i.childNodes[o-1];if(l.nodeType==1)return Hu(l.getBoundingClientRect(),!1)}if(s==null&&o<fr(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==fr(i))){let l=i.childNodes[o-1],u=l.nodeType==3?Tr(l,fr(l)-(a?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Co(Ur(u,1),!1)}if(s==null&&o<fr(i)){let l=i.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?Tr(l,0,a?0:1):l.nodeType==1?l:null:null;if(u)return Co(Ur(u,-1),!0)}return Co(Ur(i.nodeType==3?Tr(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 Jg(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 PA(e,r,n){let i=r.selection,o=n=="up"?i.$from:i.$to;return Jg(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=Gg(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=Tr(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 VA=/[\u0590-\u08ac]/;function jA(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?!VA.test(i.parent.textContent)||!l.modify?n=="left"||n=="backward"?s:a:Jg(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 e0=null,t0=null,r0=!1;function qA(e,r,n){return e0==r&&t0==n?r0:(e0=r,t0=n,r0=n=="up"||n=="down"?PA(e,r,n):jA(e,r,n))}const Wt=0,n0=1,Nn=2,Ar=3;class xs{constructor(r,n,i,o){this.parent=r,this.children=n,this.dom=i,this.contentDOM=o,this.dirty=Wt,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 Qg){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 Xg&&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||bt)&&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&&bt)&&Jn(l.node,l.offset,c.anchorNode,c.anchorOffset)&&Jn(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?Nn:n0,r==l&&n==u&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Ar:s.markDirty(r-l,n-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Nn:Ar}i=a}this.dirty=Nn}markParentsDirty(){let r=1;for(let n=this.parent;n;n=n.parent,r++){let i=r==1?Nn:n0;n.dirty<i&&(n.dirty=i)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(r){return!1}}class Xg extends xs{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==Wt&&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 UA extends xs{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 Xn extends xs{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 Xn(r,n,a.dom,a.contentDOM||a.dom)}parseRule(){return this.dirty&Ar||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(r){return this.dirty!=Ar&&this.mark.eq(r)}markDirty(r,n){if(super.markDirty(r,n),this.dirty!=Wt){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty<this.dirty&&(i.dirty=this.dirty),this.dirty=Wt}}slice(r,n,i){let o=Xn.create(this.parent,this.mark,!0,i),s=this.children,a=this.size;n<a&&(s=Yc(s,n,a,i)),r>0&&(s=Yc(s,0,r,i));for(let l=0;l<s.length;l++)s[l].parent=o;return o.children=s,o}}class un extends xs{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=t2(d,i,n),c?u=new WA(r,n,i,o,d,h||null,p,c,s,a+1):n.isText?new eu(r,n,i,o,d,p,s):new un(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==Wt&&r.eq(this.node)&&Qc(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 ZA(this,a&&a.node,r);XA(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==Nn)&&(a&&this.protectLocalComposition(r,a),Yg(this.contentDOM,this.children,r),Gi&&QA(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=YA(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 UA(this,s,n,o);r.input.compositionNodes.push(a),this.children=Yc(this.children,i,i+o.length,r,a)}update(r,n,i,o){return this.dirty==Ar||!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=Wt}updateOuterDeco(r){if(Qc(r,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,i=this.dom;this.dom=e2(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 i0(e,r,n,i,o){t2(i,r,e);let s=new un(void 0,e,r,n,i,i,i,o,0);return s.contentDOM&&s.updateChildren(o,0),s}class eu extends un{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==Ar||this.dirty!=Wt&&!this.inParent()||!r.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Wt||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=Wt,!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 eu(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=Ar)}get domAtom(){return!1}isText(r){return this.node.text==r}}class Qg extends xs{parseRule(){return{ignore:!0}}matchesHack(r){return this.dirty==Wt&&this.dom.nodeName==r}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class WA extends un{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==Ar)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 Yg(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=o0(i),o=!0;i=i.nextSibling}else o=!0,e.insertBefore(l,i);if(a instanceof Xn){let u=i?i.previousSibling:e.lastChild;Yg(a.contentDOM,a.children,n),i=u?u.nextSibling:e.firstChild}}for(;i;)i=o0(i),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const To=function(e){e&&(this.nodeName=e)};To.prototype=Object.create(null);const On=[new To];function Xc(e,r,n){if(e.length==0)return On;let i=n?On[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 e2(e,r,n,i){if(n==On&&i==On)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=On[0]),o=u}KA(o,l||On[0],a)}return o}function KA(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 t2(e,r,n){return e2(e,e,On,Xc(r,n,e.nodeType!=1))}function Qc(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 o0(e){let r=e.nextSibling;return e.parentNode.removeChild(e),r}class ZA{constructor(r,n,i){this.lock=n,this.view=i,this.index=0,this.stack=[],this.changed=!1,this.top=r,this.preMatch=GA(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=Wt,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=Xn.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==Ar&&a.dom==a.contentDOM&&(a.dirty=Nn),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 un){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!=Ar&&Qc(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.top.children[this.index]=h,h.contentDOM&&(h.dirty=Nn,h.updateChildren(o,a+1),h.dirty=Wt),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))return null;let l=un.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=un.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 Xg(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 Xn;)n=r,r=n.children[n.children.length-1];(!r||!(r instanceof eu)||/\n$/.test(r.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(r.node.text))&&((bt||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 Qg(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 GA(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 Xn)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 JA(e,r){return e.type.side-r.type.side}function XA(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(JA);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 QA(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 YA(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 Yc(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 eh(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(Yl(n)){for(u=l;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&ee.isSelectable(d)&&o.parent&&!(d.isInline&&EA(n.focusNode,n.focusOffset,o.dom))){let h=o.posBefore;c=new ee(a==h?l:i.resolve(h))}}else{let d=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(d<0)return null;u=i.resolve(d)}if(!c){let d=r=="pointer"||e.state.selection.head<l.pos&&!s?1:-1;c=th(e,u,l,d)}return c}function r2(e){return e.editable?e.hasFocus():i2(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Ir(e,r=!1){let n=e.state.selection;if(n2(e,n),!!r2(e)){if(!r&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&ut){let i=e.domSelectionRange(),o=e.domObserver.currentSelection;if(i.anchorNode&&o.anchorNode&&Jn(i.anchorNode,i.anchorOffset,o.anchorNode,o.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)tw(e);else{let{anchor:i,head:o}=n,s,a;s0&&!(n instanceof Q)&&(n.$from.parent.inlineContent||(s=a0(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=a0(e,n.to))),e.docView.setSelection(i,o,e.root,r),s0&&(s&&l0(s),a&&l0(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&ew(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const s0=bt||ut&&qg<63;function a0(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(bt&&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",bt&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function l0(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function ew(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(()=>{(!r2(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function tw(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);let s=e.state.selection;if(s.empty)n.collapse(!0);else{let a=e.domAtPos(s.to);n.setEnd(a.node,a.offset)}r.removeAllRanges(),r.addRange(n),!o&&!e.state.selection.visible&&wt&&ln<=11&&(i.disabled=!0,i.disabled=!1)}function n2(e,r){if(r instanceof ee){let n=e.docView.descAt(r.from);n!=e.lastSelectedViewDesc&&(u0(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else u0(e)}function u0(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function th(e,r,n,i){return e.someProp("createSelectionBetween",o=>o(e,r,n))||Q.between(r,n,i)}function c0(e){return e.editable&&!e.hasFocus()?!1:i2(e)}function i2(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 rw(e){let r=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Jn(r.node,r.offset,n.anchorNode,n.anchorOffset)}function ed(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 Wr(e,r){return e.dispatch(e.state.tr.setSelection(r).scrollIntoView()),!0}function d0(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 Wr(e,new Q(i.$anchor,a))}else if(i.empty){if(e.endOfTextblock(r>0?"forward":"backward")){let o=ed(e.state,r);return o&&o instanceof ee?Wr(e,o):!1}else if(!(jt&&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)?Wr(e,new ee(r<0?e.state.doc.resolve(o.pos-s.nodeSize):o)):Es?Wr(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 Wr(e,new Q(r>0?i.$to:i.$from));{let o=ed(e.state,r);return o?Wr(e,o):!1}}}function Ga(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?nw(e):iw(e)}function nw(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<Ga(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(o2(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=Ga(n);else{if(n=n.parentNode,n==e.dom)break;i=0}}}a?td(e,n,i):o&&td(e,o,s)}function iw(e){let r=e.domSelectionRange(),n=r.focusNode,i=r.focusOffset;if(!n)return;let o=Ga(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(o2(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=Ga(n);else{if(n=n.parentNode,n==e.dom)break;i=o=0}}}s&&td(e,s,a)}function o2(e){let r=e.pmViewDesc;return r&&r.node&&r.node.isBlock}function ow(e,r){for(;e&&r==e.childNodes.length&&!_s(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 sw(e,r){for(;e&&!r&&!_s(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 td(e,r,n){if(r.nodeType!=3){let s,a;(a=ow(r,n))?(r=a,n=0):(s=sw(r,n))&&(r=s,n=s.nodeValue.length)}let i=e.domSelection();if(!i)return;if(Yl(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&&Ir(e)},50)}function h0(e,r){let n=e.state.doc.resolve(r);if(!(ut||SA)&&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 p0(e,r,n){let i=e.state.selection;if(i instanceof Q&&!i.empty||n.indexOf("s")>-1||jt&&n.indexOf("m")>-1)return!1;let{$from:o,$to:s}=i;if(!o.parent.inlineContent||e.endOfTextblock(r<0?"up":"down")){let a=ed(e.state,r);if(a&&a instanceof ee)return Wr(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?Wr(e,l):!1}return!1}function f0(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 m0(e,r,n){e.domObserver.stop(),r.contentEditable=n,e.domObserver.start()}function aw(e){if(!bt||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;m0(e,i,"true"),setTimeout(()=>m0(e,i,"false"),20)}return!1}function lw(e){let r="";return e.ctrlKey&&(r+="c"),e.metaKey&&(r+="m"),e.altKey&&(r+="a"),e.shiftKey&&(r+="s"),r}function uw(e,r){let n=r.keyCode,i=lw(r);if(n==8||jt&&n==72&&i=="c")return f0(e,-1)||mi(e,-1);if(n==46&&!r.shiftKey||jt&&n==68&&i=="c")return f0(e,1)||mi(e,1);if(n==13||n==27)return!0;if(n==37||jt&&n==66&&i=="c"){let o=n==37?h0(e,e.state.selection.from)=="ltr"?-1:1:-1;return d0(e,o,i)||mi(e,o)}else if(n==39||jt&&n==70&&i=="c"){let o=n==39?h0(e,e.state.selection.from)=="ltr"?1:-1:1;return d0(e,o,i)||mi(e,o)}else{if(n==38||jt&&n==80&&i=="c")return p0(e,-1,i)||mi(e,-1);if(n==40||jt&&n==78&&i=="c")return aw(e)||p0(e,1,i)||mi(e,1);if(i==(jt?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function s2(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=h2(),u=l.createElement("div");u.appendChild(a.serializeFragment(i,{document:l}));let c=u.firstChild,d,h=0;for(;c&&c.nodeType==1&&(d=d2[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 a2(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=hw(n),Es&&pw(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")||Hn.fromSchema(e.state.schema)).parseSlice(a,{preserveWhitespace:!!(u||d),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!cw.test(h.parentNode.nodeName)?{ignore:!0}:null}})),d)l=fw(g0(l,+d[1],+d[2]),d[4]);else if(l=$.maxOpen(dw(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=g0(l,h,p)}return e.someProp("transformPasted",h=>{l=h(l,e)}),l}const cw=/^(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 dw(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&&u2(l,o,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=c2(s[s.length-1],o.length));let c=l2(a,l);s.push(c),i=i.matchType(c.type),o=l}}),s)return O.from(s)}return e}function l2(e,r,n=0){for(let i=r.length-1;i>=n;i--)e=r[i].create(null,O.from(e));return e}function u2(e,r,n,i,o){if(o<e.length&&o<r.length&&e[o]==r[o]){let s=u2(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(l2(n,e,o+1))))}}function c2(e,r){if(r==0)return e;let n=e.content.replaceChild(e.childCount-1,c2(e.lastChild,r-1)),i=e.contentMatchAt(e.childCount).fillBefore(O.empty,!0);return e.copy(n.append(i))}function rd(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=rd(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 g0(e,r,n){return r<e.openStart&&(e=new $(rd(e.content,-1,r,e.openStart,0,e.openEnd),r,e.openEnd)),n<e.openEnd&&(e=new $(rd(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const d2={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 b0=null;function h2(){return b0||(b0=document.implementation.createHTMLDocument("title"))}function hw(e){let r=/^(\s*<meta [^>]*>)*/.exec(e);r&&(e=e.slice(r[0].length));let n=h2().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e),o;if((o=i&&d2[i[1].toLowerCase()])&&(e=o.map(s=>"<"+s+">").join("")+e+o.map(s=>"</"+s+">").reverse().join("")),n.innerHTML=e,o)for(let s=0;s<o.length;s++)n=n.querySelector(o[s])||n;return n}function pw(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 fw(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 ft={},mt={},mw={touchstart:!0,touchmove:!0};class gw{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 bw(e){for(let r in ft){let n=ft[r];e.dom.addEventListener(r,e.input.eventHandlers[r]=i=>{Cw(e,i)&&!rh(e,i)&&(e.editable||!(i.type in mt))&&n(e,i)},mw[r]?{passive:!0}:void 0)}bt&&e.dom.addEventListener("input",()=>null),nd(e)}function tn(e,r){e.input.lastSelectionOrigin=r,e.input.lastSelectionTime=Date.now()}function yw(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 nd(e){e.someProp("handleDOMEvents",r=>{for(let n in r)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=i=>rh(e,i))})}function rh(e,r){return e.someProp("handleDOMEvents",n=>{let i=n[r.type];return i?i(e,r)||r.defaultPrevented:!1})}function Cw(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 vw(e,r){!rh(e,r)&&ft[r.type]&&(e.editable||!(r.type in mt))&&ft[r.type](e,r)}mt.keydown=(e,r)=>{let n=r;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!y0(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Qt&&ut&&n.keyCode==13)))if(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,Sn(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",i=>i(e,n))||uw(e,n)?n.preventDefault():tn(e,"key")},mt.keyup=(e,r)=>{r.keyCode==16&&(e.input.shiftKey=!1)},mt.keypress=(e,r)=>{let n=r;if(y0(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||jt&&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 Ja(e){return{left:e.clientX,top:e.clientY}}function kw(e,r){let n=r.x-e.clientX,i=r.y-e.clientY;return n*n+i*i<100}function nh(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 Aw(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 ww(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 _w(e,r,n,i,o){return nh(e,"handleClickOn",r,n,i)||e.someProp("handleClick",s=>s(e,r,i))||(o?ww(e,n):Aw(e,n))}function Ew(e,r,n,i){return nh(e,"handleDoubleClickOn",r,n,i)||e.someProp("handleDoubleClick",o=>o(e,r,i))}function xw(e,r,n,i){return nh(e,"handleTripleClickOn",r,n,i)||e.someProp("handleTripleClick",o=>o(e,r,i))||Dw(e,n,i)}function Dw(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 id(e){return Xa(e)}const p2=jt?"metaKey":"ctrlKey";ft.mousedown=(e,r)=>{let n=r;e.input.shiftKey=n.shiftKey;let i=id(e),o=Date.now(),s="singleClick";o-e.input.lastClick.time<500&&kw(n,e.input.lastClick)&&!n[p2]&&(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(Ja(n));a&&(s=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Sw(e,a,n,!!i)):(s=="doubleClick"?Ew:xw)(e,a.pos,a.inside,n)?n.preventDefault():tn(e,"pointer"))};class Sw{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[p2],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)),tn(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(()=>Ir(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(Ja(r))),this.updateAllowDefault(r),this.allowDefault||!n?tn(this.view,"pointer"):_w(this.view,n.pos,n.inside,r,this.selectNode)?r.preventDefault():r.button==0&&(this.flushed||bt&&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()):tn(this.view,"pointer")}move(r){this.updateAllowDefault(r),tn(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)}}ft.touchstart=e=>{e.input.lastTouch=Date.now(),id(e),tn(e,"pointer")},ft.touchmove=e=>{e.input.lastTouch=Date.now(),tn(e,"pointer")},ft.contextmenu=e=>id(e);function y0(e,r){return e.composing?!0:bt&&Math.abs(r.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const Bw=Qt?5e3:-1;mt.compositionstart=mt.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(),Xa(e,!0),e.markCursor=null;else if(Xa(e),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}C0(e,Bw)},mt.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++,C0(e,20))};function C0(e,r){clearTimeout(e.input.composingTimeout),r>-1&&(e.input.composingTimeout=setTimeout(()=>Xa(e),r))}function f2(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Fw());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Mw(e){let r=e.domSelectionRange();if(!r.focusNode)return null;let n=wA(r.focusNode,r.focusOffset),i=_A(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 Fw(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Xa(e,r=!1){if(!(Qt&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),f2(e),r||e.docView&&e.docView.dirty){let n=eh(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}function Nw(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=wt&&ln<15||Gi&&BA<604;ft.copy=mt.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}=s2(e,a);s?(n.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",u)):Nw(e,l),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Ow(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function Tw(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=a2(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=Ow(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 m2(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," "):""}mt.paste=(e,r)=>{let n=r;if(e.composing&&!Qt)return;let i=Io?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;i&&Zo(e,m2(i),i.getData("text/html"),o,n)?n.preventDefault():Tw(e,n)};class g2{constructor(r,n,i){this.slice=r,this.move=n,this.node=i}}const v0=jt?"altKey":"ctrlKey";ft.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(Ja(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}=s2(e,l);(!n.dataTransfer.files.length||!ut||qg>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 g2(d,!n[v0],a)},ft.dragend=e=>{let r=e.dragging;window.setTimeout(()=>{e.dragging==r&&(e.dragging=null)},50)},mt.dragover=mt.dragenter=(e,r)=>r.preventDefault(),mt.drop=(e,r)=>{let n=r,i=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(Ja(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=a2(e,m2(n.dataTransfer),Io?null:n.dataTransfer.getData("text/html"),!1,s);let l=!!(i&&!n[v0]);if(e.someProp("handleDrop",m=>m(e,n,a||$.empty,l))){n.preventDefault();return}if(!a)return;n.preventDefault();let u=a?Lg(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(th(e,f,c.doc.resolve(m)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},ft.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())&&Ir(e)},20))},ft.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)},ft.beforeinput=(e,r)=>{if(ut&&Qt&&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,Sn(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 mt)ft[e]=mt[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 Qa{constructor(r,n){this.toDOM=r,this.spec=n||Pn,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 Qa&&(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 cn{constructor(r,n){this.attrs=r,this.spec=n||Pn}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 cn&&Go(this.attrs,r.attrs)&&Go(this.spec,r.spec)}static is(r){return r.type instanceof cn}destroy(){}}class ih{constructor(r,n){this.attrs=r,this.spec=n||Pn}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 ih&&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 Qa(n,i))}static inline(r,n,i,o){return new ze(r,n,new cn(i,o))}static node(r,n,i,o){return new ze(r,n,new ih(i,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof cn}get widget(){return this.type instanceof Qa}}const wi=[],Pn={};class ye{constructor(r,n){this.local=r.length?r:wi,this.children=n.length?n:wi}static create(r,n){return n.length?Ya(n,r,0,Pn):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||Pn)}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?Lw(this.children,a||[],r,n,i,o,s):a?new ye(a.sort(Vn),wi):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=y2(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,Ya(d,l,c+1,Pn)),s+=3}});let a=b2(s?C2(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(Vn):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 cn){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(Vn),wi);return i?new Zr([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 oh(this.localsInner(r))}localsInner(r){if(this==lt)return wi;if(r.inlineContent||!this.local.some(cn.is))return this.local;let n=[];for(let i=0;i<this.local.length;i++)this.local[i].type instanceof cn||n.push(this.local[i]);return n}}ye.empty=new ye([],[]),ye.removeOverlap=oh;const lt=ye.empty;class Zr{constructor(r){this.members=r}map(r,n){const i=this.members.map(o=>o.map(r,n,Pn));return Zr.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 Zr?i=i.concat(s.members):i.push(s))}return Zr.from(i)}eq(r){if(!(r instanceof Zr)||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?oh(i?n:n.sort(Vn)):wi}static from(r){switch(r.length){case 0:return lt;case 1:return r[0];default:return new Zr(r.every(n=>n instanceof ye)?r:r.reduce((n,i)=>n.concat(i instanceof ye?i:i.members),[]))}}}function Lw(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=Iw(l,e,r,n,o,s,a),d=Ya(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(Vn),l)}function b2(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 Iw(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 y2(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 C2(e){let r=[];for(let n=0;n<e.length;n++)e[n]!=null&&r.push(e[n]);return r}function Ya(e,r,n,i){let o=[],s=!1;r.forEach((l,u)=>{let c=y2(e,l,u+n);if(c){s=!0;let d=Ya(c,l,n+u+1,i);d!=lt&&o.push(u,u+l.nodeSize,d)}});let a=b2(s?C2(e):e,-n).sort(Vn);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 Vn(e,r){return e.from-r.from||e.to-r.to}function oh(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),k0(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),k0(r,o,i.copy(s.from,i.to)));break}}}return r}function k0(e,r,n){for(;r<e.length&&Vn(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])),Zr.from(r)}const Rw={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},zw=wt&&ln<=11;class $w{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 Hw{constructor(r,n){this.view=r,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new $w,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]);wt&&ln<=11&&i.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),zw&&(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,Rw)),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(c0(this.view)){if(this.suppressingSelectionUpdates)return Ir(this.view);if(wt&&ln<=11&&!this.view.state.selection.empty){let r=this.view.domSelectionRange();if(r.focusNode&&Jn(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}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.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&c0(r)&&!this.ignoreSelectionChange(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||jw(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&&Yl(i)&&(c=eh(r))&&c.eq(ne.near(r.state.doc.resolve(0),1))?(r.input.lastFocus=0,Ir(r),this.currentSelection.set(i),r.scrollToSelection()):(s>-1||o)&&(s>-1&&(r.docView.markDirty(s,a),Pw(r)),this.handleDOMChange(s,a,l,u),r.docView&&r.docView.dirty?r.updateState(r.state):this.currentSelection.eq(i)||Ir(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(wt&&ln<=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 A0=new WeakMap,w0=!1;function Pw(e){if(!A0.has(e)&&(A0.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=or,w0)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."),w0=!0}}function _0(e,r){let n=r.startContainer,i=r.startOffset,o=r.endContainer,s=r.endOffset,a=e.domAtPos(e.state.selection.anchor);return Jn(a.node,a.offset,o,s)&&([n,i,o,s]=[o,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:o,focusOffset:s}}function Vw(e,r){if(r.getComposedRanges){let o=r.getComposedRanges(e.root)[0];if(o)return _0(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?_0(e,n):null}function jw(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 qw(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}],Yl(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")||Hn.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:Uw,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 Uw(e){let r=e.pmViewDesc;if(r)return r.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(bt&&/^(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||bt&&/^(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 Ww=/^(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 Kw(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=eh(e,D);if(P&&!e.state.selection.eq(P)){if(ut&&Qt&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",J=>J(e,Sn(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=qw(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=Jw(h.content,c.doc.content,c.from,p,f);if((Gi&&e.input.lastIOSEnter>Date.now()-225||Qt)&&o.some(D=>D.nodeType==1&&!Ww.test(D.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",D=>D(e,Sn(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=E0(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.input.domChangeCount++,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)),wt&&ln<=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,Sn(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&Gw(d,m.start,m.endA,b,g)&&e.someProp("handleKeyDown",D=>D(e,Sn(8,"Backspace")))){Qt&&ut&&e.domObserver.suppressSelectionUpdates();return}ut&&Qt&&m.endB==m.start&&(e.input.lastAndroidDelete=Date.now()),Qt&&!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,Sn(13,"Enter"))})},20));let C=m.start,w=m.endA,_,S,L;if(v){if(b.pos==g.pos)wt&&ln<=11&&b.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ir(e),20)),_=e.state.tr.delete(C,w),S=d.resolve(m.start).marksAcross(d.resolve(m.endA));else if(m.endA==m.endB&&(L=Zw(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,w,L.mark):_.removeMark(C,w,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,w,D)))return;_=e.state.tr.insertText(D,C,w)}}if(_||(_=e.state.tr.replace(C,w,c.doc.slice(m.start-c.from,m.endB-c.from))),c.sel){let D=E0(e,_.doc,c.sel);D&&!(ut&&Qt&&e.composing&&D.empty&&(m.start!=m.endB||e.input.lastAndroidDelete<Date.now()-100)&&(D.head==C||D.head==_.mapping.map(w)-1)||wt&&D.empty&&D.head==C)&&_.setSelection(D)}S&&_.ensureMarks(S),s&&_.setMeta("composition",s),e.dispatch(_.scrollIntoView())}function E0(e,r,n){return Math.max(n.anchor,n.head)>r.content.size?null:th(e,r.resolve(n.anchor),r.resolve(n.head))}function Zw(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 Gw(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 Jw(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&&x0(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&&x0(e.textBetween(s-1,s+1))&&(s+=u?1:-1),a=s+(a-l),l=s}return{start:s,endA:a,endB:l}}function x0(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 Xw{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 gw,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(F0),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=B0(this),S0(this),this.nodeViews=M0(this),this.docView=i0(this.state.doc,D0(this),Vu(this),this.dom,this),this.domObserver=new Hw(this,(i,o,s,a)=>Kw(this,i,o,s,a)),this.domObserver.start(),bw(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&&nd(this);let n=this._props;this._props=r,r.plugins&&(r.plugins.forEach(F0),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&&(f2(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=M0(this);Yw(f,this.nodeViews)&&(this.nodeViews=f,s=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&nd(this),this.editable=B0(this),S0(this);let u=Vu(this),c=D0(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&&NA(this);if(a){this.domObserver.stop();let f=h&&(wt||ut)&&!this.composing&&!o.selection.empty&&!r.selection.empty&&Qw(o.selection,r.selection);if(h){let m=ut?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Mw(this)),(s||!this.docView.update(r.doc,c,u,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=i0(r.doc,c,u,this.dom,this)),m&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&rw(this))?Ir(this,f):(n2(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&&OA(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&&Qp(this,n.getBoundingClientRect(),r)}else Qp(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 g2(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(wt){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&&TA(this.dom),Ir(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 $A(this,r)}coordsAtPos(r,n=1){return Gg(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 qA(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&&(yw(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,kA())}get isDestroyed(){return this.docView==null}dispatchEvent(r){return vw(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?bt&&this.root.nodeType===11&&xA(this.dom.ownerDocument)==this.dom&&Vw(this,r)||r:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function D0(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 S0(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 B0(e){return!e.someProp("editable",r=>r(e.state)===!1)}function Qw(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 M0(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 Yw(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 F0(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 dn={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"},el={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"},N0=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),e_=typeof navigator<"u"&&/Apple Computer/.test(navigator.vendor),t_=typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent),O0=typeof navigator<"u"&&/Mac/.test(navigator.platform),r_=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),n_=N0&&(O0||+N0[1]<57)||t_&&O0,st=0;st<10;st++)dn[48+st]=dn[96+st]=String(st);for(var st=1;st<=24;st++)dn[st+111]="F"+st;for(var st=65;st<=90;st++)dn[st]=String.fromCharCode(st+32),el[st]=String.fromCharCode(st);for(var qu in dn)el.hasOwnProperty(qu)||(el[qu]=dn[qu]);function i_(e){var r=n_&&(e.ctrlKey||e.altKey||e.metaKey)||(e_||r_)&&e.shiftKey&&e.key&&e.key.length==1,n=!r&&e.key||(e.shiftKey?el:dn)[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 o_=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function s_(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))o_?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 a_(e){let r=Object.create(null);for(let n in e)r[s_(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 l_(e){return new ge({props:{handleKeyDown:sh(e)}})}function sh(e){let r=a_(e);return function(n,i){let o=i_(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=dn[i.keyCode])&&s!=o){let l=r[Uu(s,i)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}const u_=(e,r)=>e.selection.empty?!1:(r&&r(e.tr.deleteSelection().scrollIntoView()),!0);function v2(e,r){let{$cursor:n}=e.selection;return!n||(r?!r.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const c_=(e,r,n)=>{let i=v2(e,n);if(!i)return!1;let o=ah(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(!s.type.spec.isolating&&_2(e,o,r))return!0;if(i.parent.content.size==0&&(Ji(s,"end")||ee.isSelectable(s))){let a=Xl(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,"end")?ne.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):ee.create(l.doc,o.pos-s.nodeSize)),r(l.scrollIntoView())}return!0}}return s.isAtom&&o.depth==i.depth-1?(r&&r(e.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0):!1},d_=(e,r,n)=>{let i=v2(e,n);if(!i)return!1;let o=ah(i);return o?k2(e,o,r):!1},h_=(e,r,n)=>{let i=A2(e,n);if(!i)return!1;let o=lh(i);return o?k2(e,o,r):!1};function k2(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=Xl(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 p_=(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=ah(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 ah(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 A2(e,r){let{$cursor:n}=e.selection;return!n||(r?!r.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const f_=(e,r,n)=>{let i=A2(e,n);if(!i)return!1;let o=lh(i);if(!o)return!1;let s=o.nodeAfter;if(_2(e,o,r))return!0;if(i.parent.content.size==0&&(Ji(s,"start")||ee.isSelectable(s))){let a=Xl(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},m_=(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=lh(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 lh(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 g_=(e,r)=>{let n=e.selection,i=n instanceof ee,o;if(i){if(n.node.isTextblock||!yn(e.doc,n.from))return!1;o=n.from}else if(o=Jl(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},b_=(e,r)=>{let n=e.selection,i;if(n instanceof ee){if(n.node.isTextblock||!yn(e.doc,n.to))return!1;i=n.to}else if(i=Jl(e.doc,n.to,1),i==null)return!1;return r&&r(e.tr.join(i).scrollIntoView()),!0},y_=(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)},C_=(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 w2(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 v_=(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=w2(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},k_=(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=w2(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)},w_=(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,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||yn(e.doc,r.pos))?!1:(n&&n(e.tr.clearIncompatible(r.pos,i.type,i.contentMatchAt(i.childCount)).join(r.pos).scrollIntoView()),!0)}function _2(e,r,n){let i=r.nodeBefore,o=r.nodeAfter,s,a;if(i.type.spec.isolating||o.type.spec.isolating)return!1;if(__(e,r,n))return!0;let l=r.parent.canReplace(r.index(),r.index()+1);if(l&&(s=(a=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(n){let h=r.pos+o.nodeSize,p=O.empty;for(let b=s.length-1;b>=0;b--)p=O.from(s[b].create(null,p));p=O.from(i.copy(p));let f=e.tr.step(new tt(r.pos-1,h,r.pos,h,new $(p,1,0),s.length,!0)),m=h+2*s.length;yn(f.doc,m)&&f.join(m),n(f.scrollIntoView())}return!0}let u=ne.findFrom(r,1),c=u&&u.$from.blockRange(u.$to),d=c&&lo(c);if(d!=null&&d>=r.depth)return n&&n(e.tr.lift(c,d).scrollIntoView()),!0;if(l&&Ji(o,"start",!0)&&Ji(i,"end")){let h=i,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let f=o,m=1;for(;!f.isTextblock;f=f.firstChild)m++;if(h.canReplace(h.childCount,h.childCount,f.content)){if(n){let b=O.empty;for(let y=p.length-1;y>=0;y--)b=O.from(p[y].copy(b));let g=e.tr.step(new tt(r.pos-p.length,r.pos+o.nodeSize,r.pos+m,r.pos+o.nodeSize-m,new $(b,p.length,0),0,!0));n(g.scrollIntoView())}return!0}}return!1}function E2(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 E_=E2(-1),x_=E2(1);function D_(e,r=null){return function(n,i){let{$from:o,$to:s}=n.selection,a=o.blockRange(s),l=a&&Jd(a,e,r);return l?(i&&i(n.tr.wrap(a,l).scrollIntoView()),!0):!1}}function T0(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 S_(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 Ua(d,d,a.depth),a.endIndex<a.parent.childCount&&(a=new Ua(o,n.doc.resolve(s.end(a.depth)),a.depth)),l=!0}let c=Jd(u,e,r,a);return c?(i&&i(B_(n.tr,a,c,l,e).scrollIntoView()),!0):!1}}function B_(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 M_(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?F_(r,n,e,s):N_(r,n,s):!0:!1}}function F_(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 Ua(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 yn(o.doc,u)&&o.join(u),r(o.scrollIntoView()),!0}function N_(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 O_(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 tu(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 ru{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:tu({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 T_{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 nu(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 x2(e){const r=[],{nodeExtensions:n,markExtensions:i}=nu(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 fe(...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 o==="style"?i[o]=[i[o],s].join("; "):i[o]=s}),i},{})}function od(e,r){return r.filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,i)=>fe(n,i),{})}function D2(e){return typeof e=="function"}function pe(e,r=void 0,...n){return D2(e)?r?e.bind(r)(...n):e(...n):e}function L_(e={}){return Object.keys(e).length===0&&e.constructor===Object}function I_(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function L0(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):I_(n.getAttribute(a.name));return l==null?s:{...s,[a.name]:l}},{});return{...i,...o}}}}function I0(e){return Object.fromEntries(Object.entries(e).filter(([r,n])=>r==="attrs"&&L_(n)?!1:n!=null))}function S2(e,r){var n;const i=x2(e),{nodeExtensions:o,markExtensions:s}=nu(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=I0({...p,content:pe(q(c,"content",h)),marks:pe(q(c,"marks",h)),group:pe(q(c,"group",h)),inline:pe(q(c,"inline",h)),atom:pe(q(c,"atom",h)),selectable:pe(q(c,"selectable",h)),draggable:pe(q(c,"draggable",h)),code:pe(q(c,"code",h)),whitespace:pe(q(c,"whitespace",h)),defining:pe(q(c,"defining",h)),isolating:pe(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=pe(q(c,"parseHTML",h));m&&(f.parseDOM=m.map(y=>L0(y,d)));const b=q(c,"renderHTML",h);b&&(f.toDOM=y=>b({node:y,HTMLAttributes:od(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=I0({...p,inclusive:pe(q(c,"inclusive",h)),excludes:pe(q(c,"excludes",h)),group:pe(q(c,"group",h)),spanning:pe(q(c,"spanning",h)),code:pe(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=pe(q(c,"parseHTML",h));m&&(f.parseDOM=m.map(g=>L0(g,d)));const b=q(c,"renderHTML",h);return b&&(f.toDOM=g=>b({mark:g,HTMLAttributes:od(g,d)})),[c.name,f]}));return new Zd({topNode:a,nodes:l,marks:u})}function Wu(e,r){return r.nodes[e]||r.marks[e]||null}function R0(e,r){return Array.isArray(r)?r.some(n=>(typeof n=="string"?n:n.name)===e.name):r}const R_=(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 uh(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class Ds{constructor(r){this.find=r.find,this.handler=r.handler}}const z_=(e,r)=>{if(uh(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 Zs(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=R_(c)+s;return a.forEach(p=>{if(d)return;const f=z_(h,p.find);if(!f)return;const m=u.state.tr,b=tu({state:u.state,transaction:m}),g={from:i-(f[0].length-s.length),to:o},{commands:y,chain:v,can:k}=new ru({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 $_(e){const{editor:r,rules:n}=e,i=new ge({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;Zs({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 Zs({editor:r,from:s,to:a,text:l,rules:n,plugin:i})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:s}=o.state.selection;s&&Zs({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?Zs({editor:r,from:a.pos,to:a.pos,text:"\n",rules:n,plugin:i}):!1}},isInputRules:!0});return i}function H_(e){return typeof e=="number"}class P_{constructor(r){this.find=r.find,this.handler=r.handler}}const V_=(e,r,n)=>{if(uh(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 j_(e){const{editor:r,state:n,from:i,to:o,rule:s,pasteEvent:a,dropEvent:l}=e,{commands:u,chain:c,can:d}=new ru({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,"");V_(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)},w=s.handler({state:n,range:C,match:y,commands:u,chain:c,can:d,pasteEvent:a,dropEvent:l});h.push(w)})}),h.every(p=>p!==null)}const q_=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 U_(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=tu({state:c,transaction:m});if(!(!j_({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 ge({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:w}=g,_=C+w.length,S=q_(w);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(!(!H_(v)||!k||v===k.b))return u({rule:c,state:p,from:v,to:k,pasteEvt:a})}}))}function W_(e){const r=e.filter((n,i)=>e.indexOf(n)!==i);return Array.from(new Set(r))}class Tn{constructor(r,n){this.splittableMarks=[],this.editor=n,this.extensions=Tn.resolve(r),this.schema=S2(this.extensions,n),this.setupExtensions()}static resolve(r){const n=Tn.sort(Tn.flatten(r)),i=W_(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=Tn.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=()=>Lt.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=l_(d);u.push(h);const p=q(a,"addInputRules",l);R0(a,r.options.enableInputRules)&&p&&i.push(...p());const f=q(a,"addPasteRules",l);R0(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[$_({editor:r,rules:i}),...U_({editor:r,rules:o}),...s]}get attributes(){return x2(this.extensions)}get nodeViews(){const{editor:r}=this,{nodeExtensions:n}=nu(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)=>{const p=od(u,o);return a()({editor:r,node:u,getPos:d,decorations:h,HTMLAttributes:p,extension:i})};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=pe(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)})}}function K_(e){return Object.prototype.toString.call(e).slice(8,-1)}function Gs(e){return K_(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function iu(e,r){const n={...e};return Gs(e)&&Gs(r)&&Object.keys(r).forEach(i=>{Gs(r[i])&&Gs(e[i])?n[i]=iu(e[i],r[i]):n[i]=r[i]}),n}class Le{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=pe(q(this,"addOptions",{name:this.name}))),this.storage=pe(q(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(r={}){return new Le(r)}configure(r={}){const n=this.extend({...this.config,addOptions:()=>iu(this.options,r)});return n.name=this.name,n.parent=this.parent,n}extend(r={}){const n=new Le({...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=pe(q(n,"addOptions",{name:n.name})),n.storage=pe(q(n,"addStorage",{name:n.name,options:n.options})),n}}function B2(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 M2(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,r])=>r.spec.toText).map(([r,n])=>[r,n.spec.toText]))}const Z_=Le.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new ge({key:new Ae("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=M2(n);return B2(i,{from:a,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:u})}}})]}}),G_=()=>({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),J_=(e=!1)=>({commands:r})=>r.setContent("",e),X_=()=>({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},Q_=e=>r=>e(r),Y_=()=>({state:e,dispatch:r})=>k_(e,r),eE=(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},tE=()=>({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},rE=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},nE=e=>({tr:r,dispatch:n})=>{const{from:i,to:o}=e;return n&&r.delete(i,o),!0},iE=()=>({state:e,dispatch:r})=>u_(e,r),oE=()=>({commands:e})=>e.keyboardShortcut("Enter"),sE=()=>({state:e,dispatch:r})=>v_(e,r);function tl(e,r,n={strict:!0}){const i=Object.keys(r);return i.length?i.every(o=>n.strict?r[o]===e[o]:uh(r[o])?r[o].test(e[o]):r[o]===e[o]):!0}function sd(e,r,n={}){return e.find(i=>i.type===r&&tl(i.attrs,n))}function aE(e,r,n={}){return!!sd(e,r,n)}function ch(e,r,n={}){if(!e||!r)return;let i=e.parent.childAfter(e.parentOffset);if(e.parentOffset===i.offset&&i.offset!==0&&(i=e.parent.childBefore(e.parentOffset)),!i.node)return;const o=sd([...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(sd([...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&&aE([...e.parent.child(l).marks],r,n);)u+=e.parent.child(l).nodeSize,l+=1;return{from:a,to:u}}function vn(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 lE=(e,r={})=>({tr:n,state:i,dispatch:o})=>{const s=vn(e,i.schema),{doc:a,selection:l}=n,{$from:u,from:c,to:d}=l;if(o){const h=ch(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},uE=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 F2(e){return e instanceof Q}function Lr(e=0,r=0,n=0){return Math.min(Math.max(e,r),n)}function N2(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,Lr(0,o,s),Lr(e.content.size,o,s)):Q.create(e,Lr(r,o,s),Lr(r,o,s))}function ou(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const cE=(e=null,r={})=>({editor:n,view:i,tr:o,dispatch:s})=>{r={scrollIntoView:!0,...r};const a=()=>{ou()&&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&&!F2(n.state.selection))return a(),!0;const l=N2(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},dE=(e,r)=>n=>e.every((i,o)=>r(i,{...n,index:o})),hE=(e,r)=>({tr:n,commands:i})=>i.insertContentAt({from:n.selection.from,to:n.selection.to},e,r),O2=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&&O2(i)}return e};function xo(e){const r="<body>".concat(e,"</body>"),n=new window.DOMParser().parseFromString(r,"text/html").body;return O2(n)}function rl(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),rl("",r,n)}if(o){if(n.errorOnInvalidContent){let a=!1,l="";const u=new Zd({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?Hn.fromSchema(u).parseSlice(xo(e),n.parseOptions):Hn.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=Hn.fromSchema(r);return n.slice?s.parseSlice(xo(e),n.parseOptions).content:s.parse(xo(e),n.parseOptions)}return rl("",r,n)}function pE(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 fE=e=>!("type"in e),mE=(e,r,n)=>({tr:i,dispatch:o,editor:s})=>{var a;if(o){n={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l;try{l=rl(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:()=>{console.error("[tiptap error]: Unable to disable collaboration at this point in time")}}),!1}let{from:u,to:c}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},d=!0,h=!0;if((fE(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&&pE(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},gE=()=>({state:e,dispatch:r})=>g_(e,r),bE=()=>({state:e,dispatch:r})=>b_(e,r),yE=()=>({state:e,dispatch:r})=>c_(e,r),CE=()=>({state:e,dispatch:r})=>f_(e,r),vE=()=>({state:e,dispatch:r,tr:n})=>{try{const i=Jl(e.doc,e.selection.$from.pos,-1);return i==null?!1:(n.join(i,2),r&&r(n),!0)}catch{return!1}},kE=()=>({state:e,dispatch:r,tr:n})=>{try{const i=Jl(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})=>d_(e,r),wE=()=>({state:e,dispatch:r})=>h_(e,r);function T2(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function _E(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))ou()||T2()?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 EE=e=>({editor:r,view:n,tr:i,dispatch:o})=>{const s=_E(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 hn(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=>tl(d.node.attrs,n,{strict:!1}));return s?!!c.length:c.reduce((d,h)=>d+h.to-h.from,0)>=u}const xE=(e,r={})=>({state:n,dispatch:i})=>{const o=Ze(e,n.schema);return hn(n,o,r)?y_(n,i):!1},DE=()=>({state:e,dispatch:r})=>A_(e,r),SE=e=>({state:r,dispatch:n})=>{const i=Ze(e,r.schema);return M_(i)(r,n)},BE=()=>({state:e,dispatch:r})=>C_(e,r);function su(e,r){return r.nodes[e]?"node":r.marks[e]?"mark":null}function z0(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 ME=(e,r)=>({tr:n,state:i,dispatch:o})=>{let s=null,a=null;const l=su(typeof e=="string"?e:e.name,i.schema);return l?(l==="node"&&(s=Ze(e,i.schema)),l==="mark"&&(a=vn(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,z0(c.attrs,r)),a&&c.marks.length&&c.marks.forEach(h=>{a===h.type&&n.addMark(d,d+c.nodeSize,a.create(z0(h.attrs,r)))})})}),!0):!1},FE=()=>({tr:e,dispatch:r})=>(r&&e.scrollIntoView(),!0),NE=()=>({tr:e,commands:r})=>r.setTextSelection({from:0,to:e.doc.content.size}),OE=()=>({state:e,dispatch:r})=>p_(e,r),TE=()=>({state:e,dispatch:r})=>m_(e,r),LE=()=>({state:e,dispatch:r})=>w_(e,r),IE=()=>({state:e,dispatch:r})=>x_(e,r),RE=()=>({state:e,dispatch:r})=>E_(e,r);function ad(e,r,n={},i={}){return rl(e,r,{slice:!1,parseOptions:n,errorOnInvalidContent:i.errorOnInvalidContent})}const zE=(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=ad(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 Ss(e,r){const n=vn(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 $E(e,r){const n=new Xd(e);return r.forEach(i=>{i.steps.forEach(o=>{n.step(o)})}),n}function HE(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 ld(e,r){const n=[];return e.descendants((i,o)=>{r(i)&&n.push({node:i,pos:o})}),n}function PE(e,r,n){const i=[];return e.nodesBetween(r.from,r.to,(o,s)=>{n(o)&&i.push({node:o,pos:s})}),i}function L2(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=>L2(r.$from,e)}function VE(e,r){const n=oi.fromSchema(r).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function jE(e,r){const n=Tn.resolve(e);return S2(n,r)}function A4e(e,r){const n=jE(r),i=xo(e);return Hn.fromSchema(n).parse(i).toJSON()}function qE(e,r){const n={from:0,to:e.content.size};return B2(e,n,r)}function UE(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 I2(e,r){const n=su(typeof r=="string"?r:r.name,e.schema);return n==="node"?UE(e,r):n==="mark"?Ss(e,r):{}}function WE(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 KE(e){const r=WE(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 ZE(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}})})}),KE(i)}function hh(e,r,n){const i=[];return e===r?n.resolve(e).marks().forEach(o=>{const s=n.resolve(e),a=ch(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 _a(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 ud(e,r,n={}){const{empty:i,ranges:o}=e.selection,s=r?vn(r,e.schema):null;if(i)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>tl(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=>tl(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 R2(e,r,n={}){if(!r)return hn(e,null,n)||ud(e,null,n);const i=su(r,e.schema);return i==="node"?hn(e,r,n):i==="mark"?ud(e,r,n):!1}function $0(e,r){const{nodeExtensions:n}=nu(r),i=n.find(a=>a.name===e);if(!i)return!1;const o={name:i.name,options:i.options,storage:i.storage},s=pe(q(i,"group",o));return typeof s!="string"?!1:s.split(" ").includes("list")}function ph(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&&(ph(s,{ignoreWhitespace:n,checkChildren:r})||(o=!1))}),o}return!1}function GE(e){return e instanceof ee}function JE(e,r,n){const i=e.state.doc.content.size,o=Lr(r,0,i),s=Lr(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 XE(e,r,n){var i;const{selection:o}=r;let s=null;if(F2(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 QE=(e,r={})=>({tr:n,state:i,dispatch:o})=>{const{selection:s}=n,{empty:a,ranges:l}=s,u=vn(e,i.schema);if(o)if(a){const c=Ss(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 XE(i,n,u)},YE=(e,r)=>({tr:n})=>(n.setMeta(e,r),!0),ex=(e,r={})=>({state:n,dispatch:i,chain:o})=>{const s=Ze(e,n.schema);return s.isTextblock?o().command(({commands:a})=>T0(s,r)(n)?!0:a.clearNodes()).command(({state:a})=>T0(s,r)(a,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},tx=e=>({tr:r,dispatch:n})=>{if(n){const{doc:i}=r,o=Lr(e,0,i.content.size),s=ee.create(i,o);r.setSelection(s)}return!0},rx=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=Lr(o,a,l),c=Lr(s,a,l),d=Q.create(i,u,c);r.setSelection(d)}return!0},nx=e=>({state:r,dispatch:n})=>{const i=Ze(e,r.schema);return O_(i)(r,n)};function H0(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 ix=({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=_a(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&&H0(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:HE(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&&H0(n,o.extensionManager.splittableMarks),r.scrollIntoView()}return m},ox=(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={..._a(p,u.node().type.name,u.node().attrs),...r},w=((a=l.contentMatch.defaultType)===null||a===void 0?void 0:a.createAndFill(C))||void 0;y=y.append(O.from(l.createAndFill(null,w)||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={..._a(p,h.type.name,h.attrs),...r},b={..._a(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 w=C.filter(_=>k.includes(_.type.name));n.ensureMarks(w)}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)&&yn(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)&&yn(e.doc,i)&&e.join(i),!0},sx=(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 w=dh(_=>$0(_.type.name,h))(b);if(k.depth>=1&&w&&k.depth-w.depth<=1){if(w.node.type===f)return c.liftListItem(m);if($0(w.node.type.name,h)&&f.validContent(w.node.content)&&l)return u().command(()=>(s.setNodeMarkup(w.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()},ax=(e,r={},n={})=>({state:i,commands:o})=>{const{extendEmptyMarkRange:s=!1}=n,a=vn(e,i.schema);return ud(i,a,r)?o.unsetMark(a,{extendEmptyMarkRange:s}):o.setMark(a,r)},lx=(e,r,n={})=>({state:i,commands:o})=>{const s=Ze(e,i.schema),a=Ze(r,i.schema);return hn(i,s,n)?o.setNode(a):o.setNode(s,n)},ux=(e,r={})=>({state:n,commands:i})=>{const o=Ze(e,n.schema);return hn(n,o,r)?i.lift(o):i.wrapIn(o,r)},cx=()=>({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},dx=()=>({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},hx=(e,r={})=>({tr:n,state:i,dispatch:o})=>{var s;const{extendEmptyMarkRange:a=!1}=r,{selection:l}=n,u=vn(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=ch(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},px=(e,r={})=>({tr:n,state:i,dispatch:o})=>{let s=null,a=null;const l=su(typeof e=="string"?e:e.name,i.schema);return l?(l==="node"&&(s=Ze(e,i.schema)),l==="mark"&&(a=vn(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},fx=(e,r={})=>({state:n,dispatch:i})=>{const o=Ze(e,n.schema);return D_(o,r)(n,i)},mx=(e,r={})=>({state:n,dispatch:i})=>{const o=Ze(e,n.schema);return S_(o,r)(n,i)};var gx=Object.freeze({__proto__:null,blur:G_,clearContent:J_,clearNodes:X_,command:Q_,createParagraphNear:Y_,cut:eE,deleteCurrentNode:tE,deleteNode:rE,deleteRange:nE,deleteSelection:iE,enter:oE,exitCode:sE,extendMarkRange:lE,first:uE,focus:cE,forEach:dE,insertContent:hE,insertContentAt:mE,joinBackward:yE,joinDown:bE,joinForward:CE,joinItemBackward:vE,joinItemForward:kE,joinTextblockBackward:AE,joinTextblockForward:wE,joinUp:gE,keyboardShortcut:EE,lift:xE,liftEmptyBlock:DE,liftListItem:SE,newlineInCode:BE,resetAttributes:ME,scrollIntoView:FE,selectAll:NE,selectNodeBackward:OE,selectNodeForward:TE,selectParentNode:LE,selectTextblockEnd:IE,selectTextblockStart:RE,setContent:zE,setMark:QE,setMeta:YE,setNode:ex,setNodeSelection:tx,setTextSelection:rx,sinkListItem:nx,splitBlock:ix,splitListItem:ox,toggleList:sx,toggleMark:ax,toggleNode:lx,toggleWrap:ux,undoInputRule:cx,unsetAllMarks:dx,unsetMark:hx,updateAttributes:px,wrapIn:fx,wrapInList:mx});const bx=Le.create({name:"commands",addCommands(){return{...gx}}}),yx=Le.create({name:"editable",addProseMirrorPlugins(){return[new ge({key:new Ae("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Cx=Le.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new ge({key:new Ae("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}}}})]}}),vx=Le.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 ou()||T2()?o:i},addProseMirrorPlugins(){return[new ge({key:new Ae("clearDocument"),appendTransaction:(e,r,n)=>{if(!(e.some(h=>h.docChanged)&&!r.doc.eq(n.doc)))return;const{empty:i,from:o,to:s}=r.selection,a=ne.atStart(r.doc).from,l=ne.atEnd(r.doc).to;if(i||!(o===a&&s===l)||n.doc.textBetween(0,n.doc.content.size," "," ").length!==0)return;const u=n.tr,c=tu({state:n,transaction:u}),{commands:d}=new ru({editor:this.editor,state:c});if(d.clearNodes(),!!u.steps.length)return u}})]}}),kx=Le.create({name:"tabindex",addProseMirrorPlugins(){return[new ge({key:new Ae("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Bn{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 Bn(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 Bn(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 Bn(r,this.editor)}get children(){const r=[];return this.node.content.forEach((n,i)=>{const o=n.isBlock&&!n.isTextblock,s=this.pos+i+1,a=this.resolvedPos.doc.resolve(s);if(!o&&a.depth<=this.depth)return;const l=new Bn(a,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),r.push(new Bn(a,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 n=this.editor.state.selection;this.editor.chain().setTextSelection(this.from).updateAttributes(this.node.type.name,r).setTextSelection(n.from).run()}}const Ax='.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 wx(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 T_{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}},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),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=wx(Ax,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=D2(r)?r(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:n});this.view.updateState(i)}unregisterPlugin(e){if(this.isDestroyed)return;const r=typeof e=="string"?"".concat(e,"$"):e.key,n=this.state.reconfigure({plugins:this.state.plugins.filter(i=>!i.key.startsWith(r))});this.view.updateState(n)}createExtensionManager(){var e,r;const n=[...this.options.enableCoreExtensions?[yx,Z_.configure({blockSeparator:(r=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||r===void 0?void 0:r.blockSeparator}),bx,Cx,vx,kx]:[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new Tn(n,this)}createCommandManager(){this.commandManager=new ru({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){let e;try{e=ad(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.options.extensions=this.options.extensions.filter(s=>s.name!=="collaboration"),this.createExtensionManager()}}),e=ad(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=N2(e,this.options.autofocus);this.view=new Xw(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:Mi.create({doc:e,selection:r||void 0})});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 I2(this.state,e)}isActive(e,r){const n=typeof e=="string"?e:null,i=typeof e=="string"?r:e;return R2(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return VE(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:r="\n\n",textSerializers:n={}}=e||{};return qE(this.state.doc,{blockSeparator:r,textSerializers:{...M2(this.schema),...n}})}get isEmpty(){return ph(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(){this.emit("destroy"),this.view&&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 Bn(r,this)}get $doc(){return this.$pos(0)}};function zr(e){return new Ds({find:e.find,handler:({state:r,range:n,match:i})=>{const o=pe(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 z2(e){return new Ds({find:e.find,handler:({state:r,range:n,match:i})=>{const o=pe(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 cd(e){return new Ds({find:e.find,handler:({state:r,range:n,match:i})=>{const o=r.doc.resolve(n.from),s=pe(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 pn(e){return new Ds({find:e.find,handler:({state:r,range:n,match:i,chain:o})=>{const s=pe(e.getAttributes,void 0,i)||{},a=r.tr.delete(n.from,n.to),l=a.doc.resolve(n.from).blockRange(),u=l&&Jd(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&&yn(a.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(i,c))&&a.join(n.from-1)}})}class Lt{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=pe(q(this,"addOptions",{name:this.name}))),this.storage=pe(q(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(r={}){return new Lt(r)}configure(r={}){const n=this.extend({...this.config,addOptions:()=>iu(this.options,r)});return n.name=this.name,n.parent=this.parent,n}extend(r={}){const n=new Lt(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=pe(q(n,"addOptions",{name:n.name})),n.storage=pe(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}}class De{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=pe(q(this,"addOptions",{name:this.name}))),this.storage=pe(q(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(r={}){return new De(r)}configure(r={}){const n=this.extend({...this.config,addOptions:()=>iu(this.options,r)});return n.name=this.name,n.parent=this.parent,n}extend(r={}){const n=new De(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=pe(q(n,"addOptions",{name:n.name})),n.storage=pe(q(n,"addStorage",{name:n.name,options:n.options})),n}}function _x(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}class Ex{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.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 g=this.dom.getBoundingClientRect(),y=h.getBoundingClientRect(),v=(o=r.offsetX)!==null&&o!==void 0?o:(s=r.nativeEvent)===null||s===void 0?void 0:s.offsetX,k=(a=r.offsetY)!==null&&a!==void 0?a:(l=r.nativeEvent)===null||l===void 0?void 0:l.offsetY;p=y.x-g.x+v,f=y.y-g.y+k}(u=r.dataTransfer)===null||u===void 0||u.setDragImage(this.dom,p,f);const m=ee.create(c.state.doc,this.getPos()),b=c.state.tr.setSelection(m);c.dispatch(b)}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"&&(ou()||_x())&&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 n.setNodeMarkup(i,void 0,{...this.node.attrs,...r}),!0})}deleteNode(){const r=this.getPos(),n=r+this.node.nodeSize;this.editor.commands.deleteRange({from:r,to:n})}}function $r(e){return new P_({find:e.find,handler:({state:r,range:n,match:i,pasteEvent:o})=>{const s=pe(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 xx(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var _t="top",Zt="bottom",Gt="right",Et="left",fh="auto",Bs=[_t,Zt,Gt,Et],Xi="start",Jo="end",Dx="clippingParents",$2="viewport",vo="popper",Sx="reference",P0=Bs.reduce(function(e,r){return e.concat([r+"-"+Xi,r+"-"+Jo])},[]),H2=[].concat(Bs,[fh]).reduce(function(e,r){return e.concat([r,r+"-"+Xi,r+"-"+Jo])},[]),Bx="beforeRead",Mx="read",Fx="afterRead",Nx="beforeMain",Ox="main",Tx="afterMain",Lx="beforeWrite",Ix="write",Rx="afterWrite",zx=[Bx,Mx,Fx,Nx,Ox,Tx,Lx,Ix,Rx];function wr(e){return e?(e.nodeName||"").toLowerCase():null}function ar(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=ar(e).Element;return e instanceof r||e instanceof Element}function Kt(e){var r=ar(e).HTMLElement;return e instanceof r||e instanceof HTMLElement}function mh(e){if(typeof ShadowRoot>"u")return!1;var r=ar(e).ShadowRoot;return e instanceof r||e instanceof ShadowRoot}function $x(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];!Kt(s)||!wr(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 Hx(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},{});!Kt(o)||!wr(o)||(Object.assign(o.style,l),Object.keys(s).forEach(function(u){o.removeAttribute(u)}))})}}const P2={name:"applyStyles",enabled:!0,phase:"write",fn:$x,effect:Hx,requires:["computeStyles"]};function Cr(e){return e.split("-")[0]}var jn=Math.max,nl=Math.min,Yi=Math.round;function eo(e,r){r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;if(Kt(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 gh(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 V2(e,r){var n=r.getRootNode&&r.getRootNode();if(e.contains(r))return!0;if(n&&mh(n)){var i=r;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Hr(e){return ar(e).getComputedStyle(e)}function Px(e){return["table","td","th"].indexOf(wr(e))>=0}function kn(e){return((Qi(e)?e.ownerDocument:e.document)||window.document).documentElement}function au(e){return wr(e)==="html"?e:e.assignedSlot||e.parentNode||(mh(e)?e.host:null)||kn(e)}function V0(e){return!Kt(e)||Hr(e).position==="fixed"?null:e.offsetParent}function Vx(e){var r=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Kt(e)){var i=Hr(e);if(i.position==="fixed")return null}var o=au(e);for(mh(o)&&(o=o.host);Kt(o)&&["html","body"].indexOf(wr(o))<0;){var s=Hr(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=ar(e),n=V0(e);n&&Px(n)&&Hr(n).position==="static";)n=V0(n);return n&&(wr(n)==="html"||wr(n)==="body"&&Hr(n).position==="static")?r:n||Vx(e)||r}function bh(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ro(e,r,n){return jn(e,nl(r,n))}function jx(e,r,n){var i=Ro(e,r,n);return i>n?n:i}function j2(){return{top:0,right:0,bottom:0,left:0}}function q2(e){return Object.assign({},j2(),e)}function U2(e,r){return r.reduce(function(n,i){return n[i]=e,n},{})}var qx=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,q2(typeof e!="number"?e:U2(e,Bs))};function Ux(e){var r,n=e.state,i=e.name,o=e.options,s=n.elements.arrow,a=n.modifiersData.popperOffsets,l=Cr(n.placement),u=bh(l),c=[Et,Gt].indexOf(l)>=0,d=c?"height":"width";if(!(!s||!a)){var h=qx(o.padding,n),p=gh(s),f=u==="y"?_t:Et,m=u==="y"?Zt:Gt,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],w=v-p[d]-h[m],_=v/2-p[d]/2+k,S=Ro(C,_,w),L=u;n.modifiersData[i]=(r={},r[L]=S,r.centerOffset=S-_,r)}}function Wx(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)||V2(r.elements.popper,o)&&(r.elements.arrow=o))}const Kx={name:"arrow",enabled:!0,phase:"main",fn:Ux,effect:Wx,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function to(e){return e.split("-")[1]}var Zx={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gx(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 j0(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=Et,C=_t,w=window;if(c){var _=Ms(n),S="clientHeight",L="clientWidth";if(_===ar(n)&&(_=kn(n),Hr(_).position!=="static"&&l==="absolute"&&(S="scrollHeight",L="scrollWidth")),_=_,o===_t||(o===Et||o===Gt)&&s===Jo){C=Zt;var D=h&&_===w&&w.visualViewport?w.visualViewport.height:_[S];b-=D-i.height,b*=u?1:-1}if(o===Et||(o===_t||o===Zt)&&s===Jo){k=Gt;var P=h&&_===w&&w.visualViewport?w.visualViewport.width:_[L];f-=P-i.width,f*=u?1:-1}}var U=Object.assign({position:l},c&&Zx),J=d===!0?Gx({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=(w.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 Jx(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:Cr(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,j0(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,j0(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 Xx={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Jx,data:{}};var Js={passive:!0};function Qx(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=ar(r.elements.popper),c=[].concat(r.scrollParents.reference,r.scrollParents.popper);return s&&c.forEach(function(d){d.addEventListener("scroll",n.update,Js)}),l&&u.addEventListener("resize",n.update,Js),function(){s&&c.forEach(function(d){d.removeEventListener("scroll",n.update,Js)}),l&&u.removeEventListener("resize",n.update,Js)}}const Yx={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Qx,data:{}};var e3={left:"right",right:"left",bottom:"top",top:"bottom"};function Ea(e){return e.replace(/left|right|bottom|top/g,function(r){return e3[r]})}var t3={start:"end",end:"start"};function q0(e){return e.replace(/start|end/g,function(r){return t3[r]})}function yh(e){var r=ar(e),n=r.pageXOffset,i=r.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Ch(e){return eo(kn(e)).left+yh(e).scrollLeft}function r3(e){var r=ar(e),n=kn(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+Ch(e),y:l}}function n3(e){var r,n=kn(e),i=yh(e),o=(r=e.ownerDocument)==null?void 0:r.body,s=jn(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=jn(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-i.scrollLeft+Ch(e),u=-i.scrollTop;return Hr(o||n).direction==="rtl"&&(l+=jn(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:a,x:l,y:u}}function vh(e){var r=Hr(e),n=r.overflow,i=r.overflowX,o=r.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function W2(e){return["html","body","#document"].indexOf(wr(e))>=0?e.ownerDocument.body:Kt(e)&&vh(e)?e:W2(au(e))}function zo(e,r){var n;r===void 0&&(r=[]);var i=W2(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=ar(i),a=o?[s].concat(s.visualViewport||[],vh(i)?i:[]):i,l=r.concat(a);return o?l:l.concat(zo(au(a)))}function dd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function i3(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 U0(e,r){return r===$2?dd(r3(e)):Qi(r)?i3(r):dd(n3(kn(e)))}function o3(e){var r=zo(au(e)),n=["absolute","fixed"].indexOf(Hr(e).position)>=0,i=n&&Kt(e)?Ms(e):e;return Qi(i)?r.filter(function(o){return Qi(o)&&V2(o,i)&&wr(o)!=="body"}):[]}function s3(e,r,n){var i=r==="clippingParents"?o3(e):[].concat(r),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,u){var c=U0(e,u);return l.top=jn(c.top,l.top),l.right=nl(c.right,l.right),l.bottom=nl(c.bottom,l.bottom),l.left=jn(c.left,l.left),l},U0(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 K2(e){var r=e.reference,n=e.element,i=e.placement,o=i?Cr(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 _t:u={x:a,y:r.y-n.height};break;case Zt:u={x:a,y:r.y+r.height};break;case Gt:u={x:r.x+r.width,y:l};break;case Et:u={x:r.x-n.width,y:l};break;default:u={x:r.x,y:r.y}}var c=o?bh(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?Dx:s,l=n.rootBoundary,u=l===void 0?$2: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=q2(typeof m!="number"?m:U2(m,Bs)),g=d===vo?Sx:vo,y=e.rects.popper,v=e.elements[p?g:d],k=s3(Qi(v)?v:v.contextElement||kn(e.elements.popper),a,u),C=eo(e.elements.reference),w=K2({reference:C,element:y,strategy:"absolute",placement:o}),_=dd(Object.assign({},y,w)),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=[Gt,Zt].indexOf(U)>=0?1:-1,Z=[_t,Zt].indexOf(U)>=0?"y":"x";L[U]+=P[Z]*J})}return L}function a3(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?H2:u,d=to(i),h=d?l?P0:P0.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})[Cr(b)],m},{});return Object.keys(f).sort(function(m,b){return f[m]-f[b]})}function l3(e){if(Cr(e)===fh)return[];var r=Ea(e);return[q0(e),r,q0(r)]}function u3(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=Cr(g),v=y===g,k=u||(v||!m?[Ea(g)]:l3(g)),C=[g].concat(k).reduce(function(se,G){return se.concat(Cr(G)===fh?a3(r,{placement:G,boundary:d,rootBoundary:h,padding:c,flipVariations:m,allowedAutoPlacements:b}):G)},[]),w=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=Cr(U),Z=to(U)===Xi,F=[_t,Zt].indexOf(J)>=0,T=F?"width":"height",Y=Xo(r,{placement:U,boundary:d,rootBoundary:h,altBoundary:p,padding:c}),A=F?Z?Gt:Et:Z?Zt:_t;w[T]>_[T]&&(A=Ea(A));var E=Ea(A),R=[];if(s&&R.push(Y[J]<=0),l&&R.push(Y[A]<=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(Se){return Se})});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 c3={name:"flip",enabled:!0,phase:"main",fn:u3,requiresIfExists:["offset"],data:{_skip:!1}};function W0(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 K0(e){return[_t,Gt,Zt,Et].some(function(r){return e[r]>=0})}function d3(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=W0(a,i),c=W0(l,o,s),d=K0(u),h=K0(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 h3={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:d3};function p3(e,r,n){var i=Cr(e),o=[Et,_t].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,[Et,Gt].indexOf(i)>=0?{x:l,y:a}:{x:a,y:l}}function f3(e){var r=e.state,n=e.options,i=e.name,o=n.offset,s=o===void 0?[0,0]:o,a=H2.reduce(function(d,h){return d[h]=p3(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 m3={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:f3};function g3(e){var r=e.state,n=e.name;r.modifiersData[n]=K2({reference:r.rects.reference,element:r.rects.popper,strategy:"absolute",placement:r.placement})}const b3={name:"popperOffsets",enabled:!0,phase:"read",fn:g3,data:{}};function y3(e){return e==="x"?"y":"x"}function C3(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=Cr(r.placement),v=to(r.placement),k=!v,C=bh(y),w=y3(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"?_t:Et,T=C==="y"?Zt:Gt,Y=C==="y"?"height":"width",A=_[C],E=A+g[F],R=A-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?gh(te):{width:0,height:0},G=r.modifiersData["arrow#persistent"]?r.modifiersData["arrow#persistent"].padding:j2(),re=G[F],Ee=G[T],Se=Ro(0,S[Y],se[Y]),ae=k?S[Y]/2-B-Se-re-P.mainAxis:I-Se-re-P.mainAxis,Te=k?-S[Y]/2+B+Se+Ee+P.mainAxis:V+Se+Ee+P.mainAxis,we=r.elements.arrow&&Ms(r.elements.arrow),Ie=we?C==="y"?we.clientTop||0:we.clientLeft||0:0,Pe=(Z=U==null?void 0:U[C])!=null?Z:0,Re=A+ae-Pe-Ie,Ge=A+Te-Pe,ke=Ro(f?nl(E,Re):E,A,f?jn(R,Ge):R);_[C]=ke,J[C]=ke-A}if(l){var Sr,Rt=C==="x"?_t:Et,z=C==="x"?Zt:Gt,ht=_[w],le=w==="y"?"height":"width",X=ht+g[Rt],rt=ht-g[z],Ve=[_t,Et].indexOf(y)!==-1,zt=(Sr=U==null?void 0:U[w])!=null?Sr:0,$t=Ve?X:ht-S[le]-L[le]-zt+P.altAxis,x=Ve?ht+S[le]+L[le]-zt-P.altAxis:rt,N=f&&Ve?jx($t,ht,x):Ro(f?$t:X,ht,f?x:rt);_[w]=N,J[w]=N-ht}r.modifiersData[i]=J}}const v3={name:"preventOverflow",enabled:!0,phase:"main",fn:C3,requiresIfExists:["offset"]};function k3(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function A3(e){return e===ar(e)||!Kt(e)?yh(e):k3(e)}function w3(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 _3(e,r,n){n===void 0&&(n=!1);var i=Kt(r),o=Kt(r)&&w3(r),s=kn(r),a=eo(e,o),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!n)&&((wr(r)!=="body"||vh(s))&&(l=A3(r)),Kt(r)?(u=eo(r,!0),u.x+=r.clientLeft,u.y+=r.clientTop):s&&(u.x=Ch(s))),{x:a.left+l.scrollLeft-u.x,y:a.top+l.scrollTop-u.y,width:a.width,height:a.height}}function E3(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 x3(e){var r=E3(e);return zx.reduce(function(n,i){return n.concat(r.filter(function(o){return o.phase===i}))},[])}function D3(e){var r;return function(){return r||(r=new Promise(function(n){Promise.resolve().then(function(){r=void 0,n(e())})})),r}}function S3(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 Z0={placement:"bottom",modifiers:[],strategy:"absolute"};function G0(){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 B3(e){e===void 0&&(e={});var r=e,n=r.defaultModifiers,i=n===void 0?[]:n,o=r.defaultOptions,s=o===void 0?Z0:o;return function(a,l,u){u===void 0&&(u=s);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Z0,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=x3(S3([].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(G0(g,y)){c.rects={reference:_3(g,Ms(y),c.options.strategy==="fixed"),popper:gh(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,w=k.options,_=w===void 0?{}:w,S=k.name;typeof C=="function"&&(c=C({state:c,options:_,name:S,instance:p})||c)}}}},update:D3(function(){return new Promise(function(b){p.forceUpdate(),b(c)})}),destroy:function(){m(),h=!0}};if(!G0(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}),w=function(){};d.push(C||w)}})}function m(){d.forEach(function(b){return b()}),d=[]}return p}}var M3=[Yx,b3,Xx,P2,m3,c3,v3,Kx,h3],F3=B3({defaultModifiers:M3}),N3="tippy-box",Z2="tippy-content",O3="tippy-backdrop",G2="tippy-arrow",J2="tippy-svg-arrow",xn={passive:!0,capture:!0},X2=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 kh(e,r){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(r+"]")>-1}function Q2(e,r){return typeof e=="function"?e.apply(void 0,r):e}function J0(e,r){if(r===0)return e;var n;return function(i){clearTimeout(n),n=setTimeout(function(){e(i)},r)}}function T3(e){return e.split(/\s+/).filter(Boolean)}function _i(e){return[].concat(e)}function X0(e,r){e.indexOf(r)===-1&&e.push(r)}function L3(e){return e.filter(function(r,n){return e.indexOf(r)===n})}function I3(e){return e.split("-")[0]}function il(e){return[].slice.call(e)}function Q0(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 lu(e){return["Element","Fragment"].some(function(r){return kh(e,r)})}function R3(e){return kh(e,"NodeList")}function z3(e){return kh(e,"MouseEvent")}function $3(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function H3(e){return lu(e)?[e]:R3(e)?il(e):Array.isArray(e)?e:il(document.querySelectorAll(e))}function Ju(e,r){e.forEach(function(n){n&&(n.style.transitionDuration=r+"ms")})}function Y0(e,r){e.forEach(function(n){n&&n.setAttribute("data-state",r)})}function P3(e){var r,n=_i(e),i=n[0];return i!=null&&(r=i.ownerDocument)!=null&&r.body?i.ownerDocument:document}function V3(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=I3(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 ef(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 pr={isTouch:!1},tf=0;function j3(){pr.isTouch||(pr.isTouch=!0,window.performance&&document.addEventListener("mousemove",Y2))}function Y2(){var e=performance.now();e-tf<20&&(pr.isTouch=!1,document.removeEventListener("mousemove",Y2)),tf=e}function q3(){var e=document.activeElement;if($3(e)){var r=e._tippy;e.blur&&!r.state.isVisible&&e.blur()}}function U3(){document.addEventListener("touchstart",j3,xn),window.addEventListener("blur",q3)}var W3=typeof window<"u"&&typeof document<"u",K3=W3?!!window.msCrypto:!1,Z3={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},G3={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},er=Object.assign({appendTo:X2,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},Z3,G3),J3=Object.keys(er),X3=function(e){var r=Object.keys(e);r.forEach(function(n){er[n]=e[n]})};function eb(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=er[s])!=null?l:a}return i},{});return Object.assign({},e,n)}function Q3(e,r){var n=r?Object.keys(eb(Object.assign({},er,{plugins:r}))):J3,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 rf(e,r){var n=Object.assign({},r,{content:Q2(r.content,[e])},r.ignoreAttributes?{}:Q3(e,r.plugins));return n.aria=Object.assign({},er.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 Y3=function(){return"innerHTML"};function hd(e,r){e[Y3()]=r}function nf(e){var r=$o();return e===!0?r.className=G2:(r.className=J2,lu(e)?r.appendChild(e):hd(r,e)),r}function of(e,r){lu(r.content)?(hd(e,""),e.appendChild(r.content)):typeof r.content!="function"&&(r.allowHTML?hd(e,r.content):e.textContent=r.content)}function pd(e){var r=e.firstElementChild,n=il(r.children);return{box:r,content:n.find(function(i){return i.classList.contains(Z2)}),arrow:n.find(function(i){return i.classList.contains(G2)||i.classList.contains(J2)}),backdrop:n.find(function(i){return i.classList.contains(O3)})}}function tb(e){var r=$o(),n=$o();n.className=N3,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=$o();i.className=Z2,i.setAttribute("data-state","hidden"),of(i,e.props),r.appendChild(n),n.appendChild(i),o(e.props,e.props);function o(s,a){var l=pd(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)&&of(c,e.props),a.arrow?d?s.arrow!==a.arrow&&(u.removeChild(d),u.appendChild(nf(a.arrow))):u.appendChild(nf(a.arrow)):d&&u.removeChild(d)}return{popper:r,onUpdate:o}}tb.$$tippy=!0;var eD=1,Xs=[],Qu=[];function tD(e,r){var n=rf(e,Object.assign({},er,eb(Q0(r)))),i,o,s,a=!1,l=!1,u=!1,c=!1,d,h,p,f=[],m=J0(Re,n.interactiveDebounce),b,g=eD++,y=null,v=L3(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:$t,setProps:x,setContent:N,show:H,hide:K,hideWithInteractivity:be,enable:Ve,disable:zt,unmount:je,destroy:bo};if(!n.render)return C;var w=n.render(C),_=w.popper,S=w.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 we(),B(),A(),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?P3(M):document}function T(){return pd(_)}function Y(M){return C.state.isMounted&&!C.state.isVisible||pr.isTouch||d&&d.type==="focus"?0:Gu(C.props.delay,M?0:1,er.delay)}function A(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 pt=Ce.getAttribute(W);if(C.state.isVisible)Ce.setAttribute(W,pt?pt+" "+oe:oe);else{var Ht=pt&&pt.replace(oe,"").trim();Ht?Ce.setAttribute(W,Ht):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),Xs=Xs.filter(function(M){return M!==m})}function V(M){if(!(pr.isTouch&&(u||M.type==="mousedown"))){var W=M.composedPath&&M.composedPath()[0]||M.target;if(!(C.props.interactive&&ef(_,W))){if(_i(C.props.triggerTarget||e).some(function(oe){return ef(oe,W)})){if(pr.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,xn),M.addEventListener("touchstart",se,xn),M.addEventListener("touchmove",te,xn)}function re(){var M=F();M.removeEventListener("mousedown",V,!0),M.removeEventListener("touchend",V,xn),M.removeEventListener("touchstart",se,xn),M.removeEventListener("touchmove",te,xn)}function Ee(M,W){ae(M,function(){!C.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&W()})}function Se(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 Te(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 we(){U()&&(Te("touchstart",Pe,{passive:!0}),Te("touchend",Ge,{passive:!0})),T3(C.props.trigger).forEach(function(M){if(M!=="manual")switch(Te(M,Pe),M){case"mouseenter":Te("mouseleave",Ge);break;case"focus":Te(K3?"focusout":"blur",ke);break;case"focusin":Te("focusout",ke);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||Sr(M)||l)){var xe=((W=d)==null?void 0:W.type)==="focus";d=M,b=M.currentTarget,B(),!C.state.isVisible&&z3(M)&&Xs.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 pt,Ht=Ce._tippy,di=(pt=Ht.popperInstance)==null?void 0:pt.state;return di?{popperRect:Ce.getBoundingClientRect(),popperState:di,props:n}:null}).filter(Boolean);V3(xe,M)&&(I(),rt(M))}}function Ge(M){var W=Sr(M)||C.props.trigger.indexOf("click")>=0&&a;if(!W){if(C.props.interactive){C.hideWithInteractivity(M);return}rt(M)}}function ke(M){C.props.trigger.indexOf("focusin")<0&&M.target!==Z()||C.props.interactive&&M.relatedTarget&&_.contains(M.relatedTarget)||rt(M)}function Sr(M){return pr.isTouch?U()!==M.type.indexOf("touch")>=0:!1}function Rt(){z();var M=C.props,W=M.popperOptions,oe=M.placement,xe=M.offset,Ce=M.getReferenceClientRect,pt=M.moveTransition,Ht=J()?pd(_).arrow:null,di=Ce?{getBoundingClientRect:Ce,contextElement:Ce.contextElement||Z()}:e,Hs={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Ps){var hi=Ps.state;if(J()){var Lv=T(),Bu=Lv.box;["placement","reference-hidden","escaped"].forEach(function(Vs){Vs==="placement"?Bu.setAttribute("data-placement",hi.placement):hi.attributes.popper["data-popper-"+Vs]?Bu.setAttribute("data-"+Vs,""):Bu.removeAttribute("data-"+Vs)}),hi.attributes.popper={}}}},_n=[{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:!pt}},Hs];J()&&Ht&&_n.push({name:"arrow",options:{element:Ht,padding:3}}),_n.push.apply(_n,(W==null?void 0:W.modifiers)||[]),C.popperInstance=F3(di,_,Object.assign({},W,{placement:oe,onFirstUpdate:p,modifiers:_n}))}function z(){C.popperInstance&&(C.popperInstance.destroy(),C.popperInstance=null)}function ht(){var M=C.props.appendTo,W,oe=Z();C.props.interactive&&M===X2||M==="parent"?W=oe.parentNode:W=Q2(M,[oe]),W.contains(_)||W.appendChild(_),C.state.isMounted=!0,Rt()}function le(){return il(_.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];pr.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 zt(){C.hide(),C.state.isEnabled=!1}function $t(){clearTimeout(i),clearTimeout(o),cancelAnimationFrame(s)}function x(M){if(!C.state.isDestroyed){E("onBeforeUpdate",[C,M]),Ie();var W=C.props,oe=rf(e,Object.assign({},W,Q0(M),{ignoreAttributes:!0}));C.props=oe,we(),W.interactiveDebounce!==oe.interactiveDebounce&&(I(),m=J0(Re,oe.interactiveDebounce)),W.triggerTarget&&!oe.triggerTarget?_i(W.triggerTarget).forEach(function(xe){xe.removeAttribute("aria-expanded")}):oe.triggerTarget&&e.removeAttribute("aria-expanded"),B(),A(),S&&S(W,oe),C.popperInstance&&(Rt(),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=pr.isTouch&&!C.props.touch,Ce=Gu(C.props.duration,0,er.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"),A(),G(),C.state.isMounted||(_.style.transition="none"),J()){var pt=T(),Ht=pt.box,di=pt.content;Ju([Ht,di],0)}p=function(){var Hs;if(!(!C.state.isVisible||c)){if(c=!0,_.offsetHeight,_.style.transition=C.props.moveTransition,J()&&C.props.animation){var _n=T(),Ps=_n.box,hi=_n.content;Ju([Ps,hi],Ce),Y0([Ps,hi],"visible")}R(),B(),X0(Qu,C),(Hs=C.popperInstance)==null||Hs.forceUpdate(),E("onMount",[C]),C.props.animation&&J()&&Se(Ce,function(){C.state.isShown=!0,E("onShown",[C])})}},ht()}}function K(){var M=!C.state.isVisible,W=C.state.isDestroyed,oe=!C.state.isEnabled,xe=Gu(C.props.duration,1,er.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(),A(!0),J()){var Ce=T(),pt=Ce.box,Ht=Ce.content;C.props.animation&&(Ju([pt,Ht],xe),Y0([pt,Ht],"hidden"))}R(),B(),C.props.animation?J()&&Ee(xe,C.unmount):C.unmount()}}function be(M){F().addEventListener("mousemove",m),X0(Xs,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 Ln(e,r){r===void 0&&(r={});var n=er.plugins.concat(r.plugins||[]);U3();var i=Object.assign({},r,{plugins:n}),o=H3(e),s=o.reduce(function(a,l){var u=l&&tD(l,i);return u&&a.push(u),a},[]);return lu(e)?s[0]:s}Ln.defaultProps=er,Ln.setDefaultProps=X3,Ln.currentInput=pr,Object.assign({},P2,{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)}}),Ln.setDefaultProps({render:tb});class rD{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)||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=Ln(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)||(()=>JE(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 rb=e=>new ge({key:typeof e.pluginKey=="string"?new Ae(e.pluginKey):e.pluginKey,view:r=>new rD({view:r,...e})});Le.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[rb({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});var Fr={},ol={},yt={},si={};const nD=pk(hk);var sl={};Object.defineProperty(sl,"__esModule",{value:!0}),sl.isInstanceOf=void 0;const iD=e=>r=>{if(!(r instanceof e))return"value should be an instance of ".concat(e.name)};sl.isInstanceOf=iD;var al={};Object.defineProperty(al,"__esModule",{value:!0}),al.isInteger=void 0;const oD=e=>{if(typeof e!="number"||!Number.isInteger(e))return"value should be an integer"};al.isInteger=oD;var ll={};Object.defineProperty(ll,"__esModule",{value:!0}),ll.isOneOf=void 0;const sD=e=>r=>{if(!e.includes(r))return'value should be one of "'.concat(e.join('", "'),'"')};ll.isOneOf=sD;var ul={};Object.defineProperty(ul,"__esModule",{value:!0}),ul.isSymbol=void 0;const aD=e=>{if(typeof e!="symbol")return"value should be a symbol"};ul.isSymbol=aD,function(e){var r=an&&an.__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(nD);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=sl;Object.defineProperty(e,"isInstanceOf",{enumerable:!0,get:function(){return o.isInstanceOf}});var s=al;Object.defineProperty(e,"isInteger",{enumerable:!0,get:function(){return s.isInteger}});var a=ll;Object.defineProperty(e,"isOneOf",{enumerable:!0,get:function(){return a.isOneOf}});var l=ul;Object.defineProperty(e,"isSymbol",{enumerable:!0,get:function(){return l.isSymbol}})}(si),Object.defineProperty(yt,"__esModule",{value:!0}),yt.propOptionsGenerator=void 0;const Qs=si,lD=(e,r,...n)=>({optional:{type:e,required:!1,default:void 0,validator:(0,Qs.vuePropValidator)(r,...n)},nullable:{type:e,required:!1,default:null,validator:(0,Qs.vuePropValidator)(r,...n)},withDefault:i=>({type:e,required:!1,default:i,validator:(0,Qs.vuePropValidator)(r,...n)}),required:{type:e,required:!0,validator:(0,Qs.vuePropValidator)(r,...n)}});yt.propOptionsGenerator=lD,Object.defineProperty(ol,"__esModule",{value:!0}),ol.stringProp=void 0;const uD=yt,cD=e=>(0,uD.propOptionsGenerator)(String,e);ol.stringProp=cD;var cl={};Object.defineProperty(cl,"__esModule",{value:!0}),cl.booleanProp=void 0;const dD=yt,hD=e=>(0,dD.propOptionsGenerator)(Boolean,e);cl.booleanProp=hD;var dl={};Object.defineProperty(dl,"__esModule",{value:!0}),dl.numberProp=void 0;const pD=yt,fD=e=>(0,pD.propOptionsGenerator)(Number,e);dl.numberProp=fD;var hl={};Object.defineProperty(hl,"__esModule",{value:!0}),hl.integerProp=void 0;const mD=yt,gD=si,bD=e=>(0,mD.propOptionsGenerator)(Number,e,gD.isInteger);hl.integerProp=bD;var pl={};Object.defineProperty(pl,"__esModule",{value:!0}),pl.symbolProp=void 0;const yD=yt,CD=si,vD=e=>(0,yD.propOptionsGenerator)(void 0,e,CD.isSymbol);pl.symbolProp=vD;var fl={};Object.defineProperty(fl,"__esModule",{value:!0}),fl.vueComponentProp=void 0;const kD=yt,AD=e=>(0,kD.propOptionsGenerator)([Object,String],e);fl.vueComponentProp=AD;var ml={};Object.defineProperty(ml,"__esModule",{value:!0}),ml.anyProp=void 0;const wD=yt,_D=e=>(0,wD.propOptionsGenerator)(void 0,e);ml.anyProp=_D;var gl={};Object.defineProperty(gl,"__esModule",{value:!0}),gl.arrayProp=void 0;const ED=yt,xD=e=>(0,ED.propOptionsGenerator)(Array,e);gl.arrayProp=xD;var bl={};Object.defineProperty(bl,"__esModule",{value:!0}),bl.objectProp=void 0;const DD=yt,SD=e=>(0,DD.propOptionsGenerator)(Object,e);bl.objectProp=SD;var yl={};Object.defineProperty(yl,"__esModule",{value:!0}),yl.functionProp=void 0;const Yu=si,BD=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)}});yl.functionProp=BD;var Qo={};Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.oneOfProp=void 0;const MD=yt,FD=si,ND=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},OD=(e,r)=>(0,MD.propOptionsGenerator)(ND(e),r,(0,FD.isOneOf)(e));Qo.oneOfProp=OD;var Cl={};Object.defineProperty(Cl,"__esModule",{value:!0}),Cl.oneOfObjectKeysProp=void 0;const TD=Qo,LD=(e,r)=>(0,TD.oneOfProp)(Object.keys(e),r);Cl.oneOfObjectKeysProp=LD;var vl={};Object.defineProperty(vl,"__esModule",{value:!0}),vl.oneOfTypesProp=void 0;const ID=yt,RD=(e,r)=>(0,ID.propOptionsGenerator)(e,r);vl.oneOfTypesProp=RD;var kl={};Object.defineProperty(kl,"__esModule",{value:!0}),kl.instanceOfProp=void 0;const zD=yt,$D=si,HD=(e,r)=>(0,zD.propOptionsGenerator)(e,r,(0,$D.isInstanceOf)(e));kl.instanceOfProp=HD;var Al={};Object.defineProperty(Al,"__esModule",{value:!0}),Al.isNegative=void 0;const PD=e=>{if(typeof e!="number"||e>=0||Number.isNaN(e))return"value should be a negative number"};Al.isNegative=PD;var wl={};Object.defineProperty(wl,"__esModule",{value:!0}),wl.isPositive=void 0;const VD=e=>{if(typeof e!="number"||e<=0||Number.isNaN(e))return"value should be a positive number"};wl.isPositive=VD;var _l={};Object.defineProperty(_l,"__esModule",{value:!0}),_l.isNonNegative=void 0;const jD=e=>{if(typeof e!="number"||e<0||Number.isNaN(e))return"value should be a non-negative number"};_l.isNonNegative=jD;var El={};Object.defineProperty(El,"__esModule",{value:!0}),El.isNonPositive=void 0;const qD=e=>{if(typeof e!="number"||e>0||Number.isNaN(e))return"value should be a non-positive number"};El.isNonPositive=qD,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=ol;Object.defineProperty(e,"stringProp",{enumerable:!0,get:function(){return r.stringProp}});var n=cl;Object.defineProperty(e,"booleanProp",{enumerable:!0,get:function(){return n.booleanProp}});var i=dl;Object.defineProperty(e,"numberProp",{enumerable:!0,get:function(){return i.numberProp}});var o=hl;Object.defineProperty(e,"integerProp",{enumerable:!0,get:function(){return o.integerProp}});var s=pl;Object.defineProperty(e,"symbolProp",{enumerable:!0,get:function(){return s.symbolProp}});var a=fl;Object.defineProperty(e,"vueComponentProp",{enumerable:!0,get:function(){return a.vueComponentProp}});var l=ml;Object.defineProperty(e,"anyProp",{enumerable:!0,get:function(){return l.anyProp}});var u=gl;Object.defineProperty(e,"arrayProp",{enumerable:!0,get:function(){return u.arrayProp}});var c=bl;Object.defineProperty(e,"objectProp",{enumerable:!0,get:function(){return c.objectProp}});var d=yl;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=Cl;Object.defineProperty(e,"oneOfObjectKeysProp",{enumerable:!0,get:function(){return p.oneOfObjectKeysProp}});var f=vl;Object.defineProperty(e,"oneOfTypesProp",{enumerable:!0,get:function(){return f.oneOfTypesProp}});var m=kl;Object.defineProperty(e,"instanceOfProp",{enumerable:!0,get:function(){return m.instanceOfProp}});var b=Al;Object.defineProperty(e,"isNegative",{enumerable:!0,get:function(){return b.isNegative}});var g=wl;Object.defineProperty(e,"isPositive",{enumerable:!0,get:function(){return g.isPositive}});var y=_l;Object.defineProperty(e,"isNonNegative",{enumerable:!0,get:function(){return y.isNonNegative}});var v=El;Object.defineProperty(e,"isNonPositive",{enumerable:!0,get:function(){return v.isNonPositive}})}(Fr);const _4e={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})}},E4e={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(rb({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":""}})}},An={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 Ah{constructor(r,n){const i=typeof r=="function"?r:Zn.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:Zn,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 UD={editor:Fr.objectProp().required,node:Fr.objectProp().required,decorations:Fr.objectProp().required,selected:Fr.booleanProp().required,extension:Fr.objectProp().required,getPos:Fr.functionProp().required,updateAttributes:Fr.functionProp().required,deleteNode:Fr.functionProp().required};class WD extends Ex{mount(){var r,n;const i={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(a={})=>this.updateAttributes(a),deleteNode:()=>this.deleteNode()},o=this.onDragStart.bind(this);this.decorationClasses=Zn.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:Zn).extend(this.component).extend({props:Object.keys(i),provide:()=>({onDragStart:o,decorationClasses:this.decorationClasses})});this.renderer=new Ah(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}update(r,n){const i=o=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(o)};if(typeof this.options.update=="function"){const o=this.node,s=this.decorations;return this.node=r,this.decorations=n,this.options.update({oldNode:o,oldDecorations:s,newNode:r,newDecorations:n,updateProps:()=>i({node:r,decorations:n})})}return r.type!==this.node.type?!1:(r===this.node&&this.decorations===n||(this.node=r,this.decorations=n,i({node:r,decorations:n})),!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()}}function wn(e,r){return n=>n.editor.contentComponent?new WD(e,n,r):{}}const KD=Symbol("wrapper:outline-state"),ZD=Symbol("wrapper:outline-actions"),nb={inject:{$outlineState:{from:KD,default:{visible:!1,enable:!1}}}},ib={inject:{$outlineActions:{from:ZD,default:{toggle:()=>{}}}}},GD={name:"NcActionCaption",inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{name:{type:String,required:!0}}};var JD=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)+" ")])},XD=[],QD=ao(GD,JD,XD,!1,null,"b9668c9e");const YD=QD.exports,e4={name:"NcActionRadio",mixins:[zv],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{id:{type:String,default:()=>"action-"+Xv(),validator:e=>e.trim()!==""},checked:{type:Boolean,default:!1},name:{type:String,required:!0},value:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1}},emits:["update:checked","change"],computed:{isFocusable(){return!this.disabled},ariaChecked(){if(this.isInSemanticMenu)return this.checked?"true":"false"}},methods:{toggleInput(e){this.$refs.label.click()},onChange(e){this.$emit("update:checked",this.$refs.radio.checked),this.$emit("change",e)}}};var t4=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)])},r4=[],n4=ao(e4,t4,r4,!1,null,"8c1a9122");const i4=n4.exports,o4={name:"NcActionSeparator"};var s4=function(){var e=this,r=e._self._c;return r("li",{staticClass:"action action-separator action--disabled",attrs:{role:"separator"}})},a4=[],l4=ao(o4,s4,a4,!1,null,"3e2324b7");const ob=l4.exports,u4={name:"NcReferenceList",components:{NcReferenceWidget:$v},props:{text:{type:String,default:""},referenceData:{type:Object,default:null},limit:{type:Number,default:1},displayFallback:{type:Boolean,default:!1},interactive:{type:Boolean,default:!0},interactiveOptIn:{type:Boolean,default:!1}},data(){return{references:null,loading:!0}},computed:{isVisible(){return this.loading||this.displayedReferences.length!==0},values(){return this.referenceData?this.referenceData:this.displayFallback&&!this.loading&&!this.references?[this.fallbackReference]:this.references?Object.values(this.references):[]},firstReference(){var e;return(e=this.values[0])!=null?e:null},displayedReferences(){return this.values.slice(0,this.limit)},fallbackReference(){return{accessible:!0,openGraphObject:{id:this.text,link:this.text,name:this.text},richObjectType:"open-graph"}}},watch:{text:"fetch"},mounted(){this.fetch()},methods:{fetch(){if(this.loading=!0,this.referenceData){this.references=null,this.loading=!1;return}if(!new RegExp(Dp).exec(this.text)){this.references=null,this.loading=!1;return}this.resolve().then(e=>{this.references=e.data.ocs.data.references,this.loading=!1,this.$emit("loaded")}).catch(e=>{console.error("Failed to extract references",e),this.loading=!1,this.$emit("loaded")})},resolve(){const e=new RegExp(Dp).exec(this.text.trim()),r=ig()===null;return this.limit===1&&e?r?js.get(qs("references/resolvePublic")+"?reference=".concat(encodeURIComponent(e[0]),"&sharingToken=").concat(Mp())):js.get(qs("references/resolve")+"?reference=".concat(encodeURIComponent(e[0]))):r?js.post(qs("references/extractPublic"),{text:this.text,resolve:!0,limit:this.limit,sharingToken:Mp()}):js.post(qs("references/extract"),{text:this.text,resolve:!0,limit:this.limit})}}};var c4=function(){var e=this,r=e._self._c;return e.isVisible?r("div",{staticClass:"widgets--list",class:{"icon-loading":e.loading}},e._l(e.displayedReferences,function(n){var i;return r("div",{key:(i=n==null?void 0:n.openGraphObject)==null?void 0:i.id},[r("NcReferenceWidget",{attrs:{reference:n,interactive:e.interactive,"interactive-opt-in":e.interactiveOptIn}})],1)}),0):e._e()},d4=[],h4=ao(u4,c4,d4,!1,null,"4d1ff3f6");const sb=h4.exports,p4={name:"NcUserBubbleDiv"};var f4=function(){var e=this,r=e._self._c;return r("div",[e._t("trigger")],2)},m4=[],g4=ao(p4,f4,m4,!1,null,null);const b4=g4.exports,y4={name:"NcUserBubble",components:{NcAvatar:Hv,NcPopover:Qv,NcUserBubbleDiv:b4},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&&Zn.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 C4=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)},v4=[],k4=ao(y4,C4,v4,!1,null,"b07a6c57");const A4=k4.exports,uu={data(){return{$store:Hc}},beforeMount(){typeof this.$store>"u"?this.$store=Hc:this.$store.hasModule("text")||this.$store.registerModule("text",ek)}},w4={name:"TableOfContents",mixins:[uu,ag],data:()=>({initialRender:!0}),computed:{...tk({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 _4=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)])},E4=[],x4=j(w4,_4,E4,!1,null,null);const D4=x4.exports,S4={name:"AlphabeticalVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var B4=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:!0,"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()])])])},M4=[],F4=j(S4,B4,M4,!1,null,null);const N4=F4.exports,O4={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var T4=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:!0,"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()])])])},L4=[],I4=j(O4,T4,L4,!1,null,null);const ab=I4.exports,R4={name:"CheckIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var z4=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:!0,"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()])])])},$4=[],H4=j(R4,z4,$4,!1,null,null);const lb=H4.exports,P4={name:"CodeTagsIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var V4=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:!0,"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()])])])},j4=[],q4=j(P4,V4,j4,!1,null,null);const U4=q4.exports,W4={name:"AlertDecagramIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var K4=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:!0,"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()])])])},Z4=[],G4=j(W4,K4,Z4,!1,null,null);const J4=G4.exports,X4={name:"DeleteIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Q4=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:!0,"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()])])])},Y4=[],e6=j(X4,Q4,Y4,!1,null,null);const ub=e6.exports,t6={name:"FileDocumentIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var r6=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:!0,"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()])])])},n6=[],i6=j(t6,r6,n6,!1,null,null);const o6=i6.exports,s6={name:"DotsHorizontalIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var a6=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:!0,"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()])])])},l6=[],u6=j(s6,a6,l6,!1,null,null);const c6=u6.exports,d6={name:"EmoticonOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var h6=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:!0,"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()])])])},p6=[],f6=j(d6,h6,p6,!1,null,null);const m6=f6.exports,g6={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var b6=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:!0,"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()])])])},y6=[],C6=j(g6,b6,y6,!1,null,null);const v6=C6.exports,k6={name:"FormatBoldIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var A6=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:!0,"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=[],_6=j(k6,A6,w6,!1,null,null);const E6=_6.exports,x6={name:"AlignHorizontalCenterIcon",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 align-horizontal-center-icon",attrs:{"aria-hidden":e.title?null:!0,"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()])])])},S6=[],B6=j(x6,D6,S6,!1,null,null);const M6=B6.exports,F6={name:"AlignHorizontalLeftIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var N6=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:!0,"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()])])])},O6=[],T6=j(F6,N6,O6,!1,null,null);const L6=T6.exports,I6={name:"AlignHorizontalRightIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var R6=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:!0,"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()])])])},z6=[],$6=j(I6,R6,z6,!1,null,null);const H6=$6.exports,P6={name:"FormatHeader1Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var V6=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:!0,"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()])])])},j6=[],q6=j(P6,V6,j6,!1,null,null);const U6=q6.exports,W6={name:"FormatHeader2Icon",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-header2-icon",attrs:{"aria-hidden":e.title?null:!0,"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()])])])},Z6=[],G6=j(W6,K6,Z6,!1,null,null);const J6=G6.exports,X6={name:"FormatHeader3Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Q6=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:!0,"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()])])])},Y6=[],e5=j(X6,Q6,Y6,!1,null,null);const t5=e5.exports,r5={name:"FormatHeader4Icon",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-header4-icon",attrs:{"aria-hidden":e.title?null:!0,"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()])])])},i5=[],o5=j(r5,n5,i5,!1,null,null);const s5=o5.exports,a5={name:"FormatHeader5Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var l5=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:!0,"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()])])])},u5=[],c5=j(a5,l5,u5,!1,null,null);const d5=c5.exports,h5={name:"FormatHeader6Icon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var p5=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:!0,"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()])])])},f5=[],m5=j(h5,p5,f5,!1,null,null);const g5=m5.exports,b5={name:"FormatIndentDecreaseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var y5=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:!0,"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()])])])},C5=[],v5=j(b5,y5,C5,!1,null,null);const k5=v5.exports,A5={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:!0,"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()])])])},_5=[],E5=j(A5,w5,_5,!1,null,null);const x5=E5.exports,D5={name:"FormatItalicIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var S5=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:!0,"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()])])])},B5=[],M5=j(D5,S5,B5,!1,null,null);const F5=M5.exports,N5={name:"FormatListBulletedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var O5=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:!0,"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()])])])},T5=[],L5=j(N5,O5,T5,!1,null,null);const I5=L5.exports,R5={name:"FormatListCheckboxIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var z5=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:!0,"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()])])])},$5=[],H5=j(R5,z5,$5,!1,null,null);const P5=H5.exports,V5={name:"FormatListNumberedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var j5=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:!0,"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()])])])},q5=[],U5=j(V5,j5,q5,!1,null,null);const W5=U5.exports,K5={name:"FormatQuoteCloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Z5=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:!0,"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()])])])},G5=[],J5=j(K5,Z5,G5,!1,null,null);const X5=J5.exports,Q5={name:"FormatStrikethroughIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Y5=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:!0,"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()])])])},eS=[],tS=j(Q5,Y5,eS,!1,null,null);const rS=tS.exports,nS={name:"FormatUnderlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var iS=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:!0,"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()])])])},oS=[],sS=j(nS,iS,oS,!1,null,null);const aS=sS.exports,lS={name:"HelpCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var uS=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:!0,"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()])])])},cS=[],dS=j(lS,uS,cS,!1,null,null);const hS=dS.exports,pS={name:"ImageOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var fS=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:!0,"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()])])])},mS=[],gS=j(pS,fS,mS,!1,null,null);const bS=gS.exports,yS={name:"InformationIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var CS=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:!0,"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()])])])},vS=[],kS=j(yS,CS,vS,!1,null,null);const AS=kS.exports,wS={name:"LinkIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var _S=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:!0,"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()])])])},ES=[],xS=j(wS,_S,ES,!1,null,null);const DS=xS.exports,SS={name:"LinkOffIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var BS=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:!0,"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()])])])},MS=[],FS=j(SS,BS,MS,!1,null,null);const cb=FS.exports,NS={name:"LoadingIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var OS=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:!0,"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()])])])},TS=[],LS=j(NS,OS,TS,!1,null,null);const IS=LS.exports,RS={name:"PaperclipIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var zS=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:!0,"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()])])])},$S=[],HS=j(RS,zS,$S,!1,null,null);const PS=HS.exports,VS={name:"CheckboxMarkedCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var jS=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:!0,"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()])])])},qS=[],US=j(VS,jS,qS,!1,null,null);const WS=US.exports,KS={name:"ArrowURightTopIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var ZS=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:!0,"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()])])])},GS=[],JS=j(KS,ZS,GS,!1,null,null);const XS=JS.exports,QS={name:"ShapeIcon",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 shape-icon",attrs:{"aria-hidden":e.title?null:!0,"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()])])])},eB=[],tB=j(QS,YS,eB,!1,null,null);const rB=tB.exports,nB={name:"TableIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var iB=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:!0,"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()])])])},oB=[],sB=j(nB,iB,oB,!1,null,null);const aB=sB.exports,lB={name:"TableColumnPlusAfterIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var uB=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:!0,"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()])])])},cB=[],dB=j(lB,uB,cB,!1,null,null);const hB=dB.exports,pB={name:"TableColumnPlusBeforeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var fB=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:!0,"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()])])])},mB=[],gB=j(pB,fB,mB,!1,null,null);const bB=gB.exports,yB={name:"TableRowPlusAfterIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var CB=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:!0,"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()])])])},vB=[],kB=j(yB,CB,vB,!1,null,null);const AB=kB.exports,wB={name:"TableRowPlusBeforeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var _B=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:!0,"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()])])])},EB=[],xB=j(wB,_B,EB,!1,null,null);const DB=xB.exports,SB={name:"TableCogIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var BB=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:!0,"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()])])])},MB=[],FB=j(SB,BB,MB,!1,null,null);const NB=FB.exports,OB={name:"ArrowULeftTopIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var TB=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:!0,"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()])])])},LB=[],IB=j(OB,TB,LB,!1,null,null);const RB=IB.exports,zB={name:"UploadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var $B=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:!0,"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()])])])},HB=[],PB=j(zB,$B,HB,!1,null,null);const VB=PB.exports,jB={name:"AlertIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var qB=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:!0,"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()])])])},UB=[],WB=j(jB,qB,UB,!1,null,null);const KB=WB.exports,ZB={name:"WebIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var GB=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:!0,"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()])])])},JB=[],XB=j(ZB,GB,JB,!1,null,null);const QB=XB.exports,YB={name:"TranslateVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var eM=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:!0,"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()])])])},tM=[],rM=j(YB,eM,tM,!1,null,null);const nM=rM.exports,db=20,ie=e=>({functional:!0,render(r,{data:n,props:i}){return r(e,{data:n,key:n.key,staticClass:n.staticClass,props:{size:db,...i}})}}),fd={functional:!0,render(e,{data:r,props:n}){return e(IS,{data:r,staticClass:"animation-rotate",props:{size:db,...n}})}},x4e=ie(N4),iM=ie(M6),oM=ie(L6),sM=ie(H6),aM=ie(ab),lM=ie(U4),hb=ie(J4),cu=ie(ub),uM=ie(o6),D4e=ie(c6),cM=ie(m6),dM=ie(v6),hM=ie(E6),sf=ie(U6),pM=ie(J6),fM=ie(t5),mM=ie(s5),gM=ie(d5),bM=ie(g5),yM=ie(k5),CM=ie(x5),vM=ie(F5),xa=ie(I5),kM=ie(P5),AM=ie(W5),wM=ie(X5),_M=ie(rS),EM=ie(aS),S4e=ie(hS),xM=ie(bS),xl=ie(AS),DM=ie(DS),SM=ie(cb),BM=ie(PS),pb=ie(WS),MM=ie(XS),FM=ie(rB),NM=ie(aB),OM=ie(hB),TM=ie(bB),LM=ie(AB),IM=ie(DB),RM=ie(NB),B4e=ie(nM),zM=ie(RB),$M=ie(VB),fb=ie(KB),HM=ie(QB),PM={name:"EditorOutline",components:{Close:aM,NcButton:Zl,TableOfContents:D4},mixins:[uu,nb,ib],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 VM=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)},jM=[],qM=j(PM,VM,jM,!1,null,"06016c06");const M4e=qM.exports,gt=()=>new Map,md=e=>{const r=gt();return e.forEach((n,i)=>{r.set(i,n)}),r},xr=(e,r,n)=>{let i=e.get(r);return i===void 0&&e.set(r,i=n()),i},UM=(e,r)=>{const n=[];for(const[i,o]of e)n.push(r(o,i));return n},WM=(e,r)=>{for(const[n,i]of e)if(r(i,n))return!0;return!1},fn=()=>new Set,ec=e=>e[e.length-1],KM=(e,r)=>{for(let n=0;n<r.length;n++)e.push(r[n])},Pr=Array.from,ZM=(e,r)=>{for(let n=0;n<e.length;n++)if(r(e[n],n,e))return!0;return!1},gd=Array.isArray;class mb{constructor(){this._observers=gt()}on(r,n){return xr(this._observers,r,fn).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 Pr((this._observers.get(r)||gt()).values()).forEach(i=>i(...n))}destroy(){this._observers=gt()}}class F4e{constructor(){this._observers=gt()}on(r,n){xr(this._observers,r,fn).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 Pr((this._observers.get(r)||gt()).values()).forEach(i=>i(...n))}destroy(){this._observers=gt()}}const Vr=Math.floor,Da=Math.abs,qn=(e,r)=>e<r?e:r,jr=(e,r)=>e>r?e:r,N4e=Math.pow,gb=e=>e!==0?e<0:1/e<0,af=1,lf=2,tc=4,rc=8,Yo=32,Rr=64,Ot=128,du=31,bd=63,Un=127,GM=2147483647,bb=Number.MAX_SAFE_INTEGER,JM=Number.isInteger||(e=>typeof e=="number"&&isFinite(e)&&Vr(e)===e),XM=String.fromCharCode,QM=e=>e.toLowerCase(),YM=/^\s*/g,eF=e=>e.replace(YM,""),tF=/([A-Z])/g,uf=(e,r)=>eF(e.replace(tF,n=>"".concat(r).concat(QM(n)))),rF=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,nF=e=>es.encode(e),iF=es?nF:rF;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 Ns=()=>new Fs,oF=e=>{let r=e.cpos;for(let n=0;n<e.bufs.length;n++)r+=e.bufs[n].length;return r},tr=e=>{const r=new Uint8Array(oF(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},sF=(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(jr(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},yd=Xe,ce=(e,r)=>{for(;r>Un;)Xe(e,Ot|Un&r),r=Vr(r/128);Xe(e,Un&r)},wh=(e,r)=>{const n=gb(r);for(n&&(r=-r),Xe(e,(r>bd?Ot:0)|(n?Rr:0)|bd&r),r=Vr(r/64);r>0;)Xe(e,(r>Un?Ot:0)|Un&r),r=Vr(r/128)},Cd=new Uint8Array(3e4),aF=Cd.length/3,lF=(e,r)=>{if(r.length<aF){const n=es.encodeInto(r,Cd).written||0;ce(e,n);for(let i=0;i<n;i++)Xe(e,Cd[i])}else Dt(e,iF(r))},uF=(e,r)=>{const n=unescape(encodeURIComponent(r)),i=n.length;ce(e,i);for(let o=0;o<i;o++)Xe(e,n.codePointAt(o))},$i=es&&es.encodeInto?lF:uF,cF=(e,r)=>Os(e,tr(r)),Os=(e,r)=>{const n=e.cbuf.length,i=e.cpos,o=qn(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(jr(n*2,s)),e.cbuf.set(r.subarray(o)),e.cpos=s)},Dt=(e,r)=>{ce(e,r.byteLength),Os(e,r)},_h=(e,r)=>{sF(e,r);const n=new DataView(e.cbuf.buffer,e.cpos,r);return e.cpos+=r,n},dF=(e,r)=>_h(e,4).setFloat32(0,r,!1),hF=(e,r)=>_h(e,8).setFloat64(0,r,!1),pF=(e,r)=>_h(e,8).setBigInt64(0,r,!1),cf=new DataView(new ArrayBuffer(4)),fF=e=>(cf.setFloat32(0,e),cf.getFloat32(0)===e),ts=(e,r)=>{switch(typeof r){case"string":Xe(e,119),$i(e,r);break;case"number":JM(r)&&Da(r)<=GM?(Xe(e,125),wh(e,r)):fF(r)?(Xe(e,124),dF(e,r)):(Xe(e,123),hF(e,r));break;case"bigint":Xe(e,122),pF(e,r);break;case"object":if(r===null)Xe(e,126);else if(gd(r)){Xe(e,117),ce(e,r.length);for(let n=0;n<r.length;n++)ts(e,r[n])}else if(r instanceof Uint8Array)Xe(e,116),Dt(e,r);else{Xe(e,118);const n=Object.keys(r);ce(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 df extends Fs{constructor(r){super(),this.w=r,this.s=null,this.count=0}write(r){this.s===r?this.count++:(this.count>0&&ce(this,this.count-1),this.count=1,this.w(this,r),this.s=r)}}const hf=e=>{e.count>0&&(wh(e.encoder,e.count===1?e.s:-e.s),e.count>1&&ce(e.encoder,e.count-2))};class Sa{constructor(){this.encoder=new Fs,this.s=0,this.count=0}write(r){this.s===r?this.count++:(hf(this),this.count=1,this.s=r)}toUint8Array(){return hf(this),tr(this.encoder)}}const pf=e=>{if(e.count>0){const r=e.diff*2+(e.count===1?0:1);wh(e.encoder,r),e.count>1&&ce(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++):(pf(this),this.count=1,this.diff=r-this.s,this.s=r)}toUint8Array(){return pf(this),tr(this.encoder)}}class mF{constructor(){this.sarr=[],this.s="",this.lensE=new Sa}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("")),Os(r,this.lensE.toUint8Array()),tr(r)}}const mn=e=>new Error(e),ir=()=>{throw mn("Method unimplemented")},It=()=>{throw mn("Unexpected case")},yb=mn("Unexpected end of array"),Cb=mn("Integer out of Range");class hu{constructor(r){this.arr=r,this.pos=0}}const ai=e=>new hu(e),gF=e=>e.pos!==e.arr.length,bF=(e,r)=>{const n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,r);return e.pos+=r,n},St=e=>bF(e,me(e)),ro=e=>e.arr[e.pos++],me=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&Un)*n,n*=128,o<Ot)return r;if(r>bb)throw Cb}throw yb},Eh=e=>{let r=e.arr[e.pos++],n=r&bd,i=64;const o=(r&Rr)>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&Un)*i,i*=128,r<Ot)return o*n;if(n>bb)throw Cb}throw yb},yF=e=>{let r=me(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))}},CF=e=>Ho.decode(St(e)),Hi=Ho?CF:yF,xh=(e,r)=>{const n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,r);return e.pos+=r,n},vF=e=>xh(e,4).getFloat32(0,!1),kF=e=>xh(e,8).getFloat64(0,!1),AF=e=>xh(e,8).getBigInt64(0,!1),wF=[e=>{},e=>null,Eh,vF,kF,AF,e=>!1,e=>!0,Hi,e=>{const r=me(e),n={};for(let i=0;i<r;i++){const o=Hi(e);n[o]=rs(e)}return n},e=>{const r=me(e),n=[];for(let i=0;i<r;i++)n.push(rs(e));return n},St],rs=e=>wF[127-ro(e)](e);class ff extends hu{constructor(r,n){super(r),this.reader=n,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),gF(this)?this.count=me(this)+1:this.count=-1),this.count--,this.s}}class Ba extends hu{constructor(r){super(r),this.s=0,this.count=0}read(){if(this.count===0){this.s=Eh(this);const r=gb(this.s);this.count=1,r&&(this.s=-this.s,this.count=me(this)+2)}return this.count--,this.s}}class ic extends hu{constructor(r){super(r),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const r=Eh(this),n=r&1;this.diff=Vr(r/2),this.count=1,n&&(this.count=me(this)+2)}return this.s+=this.diff,this.count--,this.s}}class _F{constructor(r){this.decoder=new Ba(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 EF=crypto.getRandomValues.bind(crypto),xF=Math.random,vb=()=>EF(new Uint32Array(1))[0],DF=e=>e[Vr(xF()*e.length)],SF="10000000-1000-4000-8000"+-1e11,BF=()=>SF.replace(/[018]/g,e=>(e^vb()&15>>e/4).toString(16)),MF=Date.now,mf=e=>new Promise(e);Promise.all.bind(Promise);const FF=e=>e===void 0?null:e;class NF{constructor(){this.map=new Map}setItem(r,n){this.map.set(r,n)}getItem(r){return this.map.get(r)}}let kb=new NF,Dh=!0;try{typeof localStorage<"u"&&localStorage&&(kb=localStorage,Dh=!1)}catch{}const OF=kb,O4e=e=>Dh||addEventListener("storage",e),T4e=e=>Dh||removeEventListener("storage",e),TF=Object.assign,Sh=Object.keys,LF=(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},gf=e=>Sh(e).length,bf=e=>Sh(e).length,IF=e=>{for(const r in e)return!1;return!0},RF=(e,r)=>{for(const n in e)if(!r(e[n],n))return!1;return!0},Ab=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),zF=(e,r)=>e===r||bf(e)===bf(r)&&RF(e,(n,i)=>(n!==void 0||Ab(r,i))&&r[i]===n),Bh=(e,r,n=0)=>{try{for(;n<e.length;n++)e[n](...r)}finally{n<e.length&&Bh(e,r,n+1)}},$F=e=>e,HF=(e,r)=>e===r,oc=(e,r)=>{if(e==null||r==null)return HF(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(gf(e)!==gf(r))return!1;for(const n in e)if(!Ab(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},PF=(e,r)=>r.includes(e);var wb={};const no=typeof Dn<"u"&&Dn.release&&/node|io\.js/.test(Dn.release.name)&&Object.prototype.toString.call(typeof Dn<"u"?Dn:0)==="[object process]",Mh=typeof window<"u"&&typeof document<"u"&&!no;let lr;const VF=()=>{if(lr===void 0)if(no){lr=gt();const e=Dn.argv;let r=null;for(let n=0;n<e.length;n++){const i=e[n];i[0]==="-"?(r!==null&&lr.set(r,""),r=i):r!==null&&(lr.set(r,i),r=null)}r!==null&&lr.set(r,"")}else typeof location=="object"?(lr=gt(),(location.search||"?").slice(1).split("&").forEach(e=>{if(e.length!==0){const[r,n]=e.split("=");lr.set("--".concat(uf(r,"-")),n),lr.set("-".concat(uf(r,"-")),n)}})):lr=gt();return lr},vd=e=>VF().has(e),kd=e=>FF(no?wb[e.toUpperCase().replaceAll("-","_")]:OF.getItem(e)),_b=e=>vd("--"+e)||kd(e)!==null;_b("production");const jF=no&&PF(wb.FORCE_COLOR,["true","1","2"]),qF=jF||!vd("--no-colors")&&!_b("no-color")&&(!no||Dn.stdout.isTTY)&&(!no||vd("--color")||kd("COLORTERM")!==null||(kd("TERM")||"").includes("color")),Eb=e=>new Uint8Array(e),UF=(e,r,n)=>new Uint8Array(e,r,n),I4e=e=>new Uint8Array(e),WF=e=>{let r="";for(let n=0;n<e.byteLength;n++)r+=XM(e[n]);return btoa(r)},KF=e=>Wd.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),ZF=e=>{const r=atob(e),n=Eb(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n},GF=e=>{const r=Wd.from(e,"base64");return UF(r.buffer,r.byteOffset,r.byteLength)},R4e=Mh?WF:KF,z4e=Mh?ZF:GF,JF=e=>{const r=Eb(e.byteLength);return r.set(e),r};class XF{constructor(r,n){this.left=r,this.right=n}}const Mr=(e,r)=>new XF(e,r),QF=typeof document<"u"?document:{};typeof DOMParser<"u"&&new DOMParser;const YF=e=>UM(e,(r,n)=>"".concat(n,":").concat(r,";")).join(""),e9=e=>class{constructor(r){this._=r}destroy(){e(this._)}},t9=e9(clearTimeout),Fh=(e,r)=>new t9(setTimeout(r,e)),qr=Symbol,xb=qr(),Db=qr(),r9=qr(),n9=qr(),i9=qr(),Sb=qr(),o9=qr(),Nh=qr(),s9=qr(),a9=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},l9={[xb]:Mr("font-weight","bold"),[Db]:Mr("font-weight","normal"),[r9]:Mr("color","blue"),[i9]:Mr("color","green"),[n9]:Mr("color","grey"),[Sb]:Mr("color","red"),[o9]:Mr("color","purple"),[Nh]:Mr("color","orange"),[s9]:Mr("color","black")},u9=e=>{var a;e.length===1&&((a=e[0])==null?void 0:a.constructor)===Function&&(e=e[0]());const r=[],n=[],i=gt();let o=[],s=0;for(;s<e.length;s++){const l=e[s],u=l9[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=YF(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},Bb=qF?u9:a9,c9=(...e)=>{console.log(...Bb(e)),Mb.forEach(r=>r.print(e))},d9=(...e)=>{console.warn(...Bb(e)),e.unshift(Nh),Mb.forEach(r=>r.print(e))},Mb=fn(),Fb=e=>({[Symbol.iterator](){return this},next:e}),h9=(e,r)=>Fb(()=>{let n;do n=e.next();while(!n.done&&!r(n.value));return n}),sc=(e,r)=>Fb(()=>{const{done:n,value:i}=e.next();return{done:n,value:n?void 0:r(i)}});class Oh{constructor(r,n){this.clock=r,this.len=n}}class co{constructor(){this.clients=new Map}}const gn=(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)}}),p9=(e,r)=>{let n=0,i=e.length-1;for(;n<=i;){const o=Vr((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&&p9(n,r.clock)!==null},Th=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=jr(o.len,s.clock+s.len-o.clock):(i<n&&(r[i]=s),i++)}r.length=i})},Ad=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++)KM(s,e[a].clients.get(o)||[]);r.clients.set(o,s)}});return Th(r),r},ns=(e,r,n,i)=>{xr(e.clients,r,()=>[]).push(new Oh(n,i))},Nb=()=>new co,Ob=e=>{const r=Nb();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 Oh(l,u))}}o.length>0&&r.clients.set(i,o)}),r},po=(e,r)=>{ce(e.restEncoder,r.clients.size),Pr(r.clients.entries()).sort((n,i)=>i[0]-n[0]).forEach(([n,i])=>{e.resetDsCurVal(),ce(e.restEncoder,n);const o=i.length;ce(e.restEncoder,o);for(let s=0;s<o;s++){const a=i[s];e.writeDsClock(a.clock),e.writeDsLen(a.len)}})},Lh=e=>{const r=new co,n=me(e.restDecoder);for(let i=0;i<n;i++){e.resetDsCurVal();const o=me(e.restDecoder),s=me(e.restDecoder);if(s>0){const a=xr(r.clients,o,()=>[]);for(let l=0;l<s;l++)a.push(new Oh(e.readDsClock(),e.readDsLen()))}}return r},yf=(e,r,n)=>{const i=new co,o=me(e.restDecoder);for(let s=0;s<o;s++){e.resetDsCurVal();const a=me(e.restDecoder),l=me(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=_r(u,h),m=u[f];for(!m.deleted&&m.id.clock<h&&(u.splice(f+1,0,Ol(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,Ol(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 ce(s.restEncoder,0),po(s,i),s.toUint8Array()}return null},Tb=vb;class fo extends mb{constructor({guid:r=BF(),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=Tb(),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=mf(c=>{this.on("load",()=>{this.isLoaded=!0,c(this)})});const u=()=>mf(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&&Me(r.parent.doc,n=>{n.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Pr(this.subdocs).map(r=>r.guid))}transact(r,n=null){return Me(this,r,n)}get(r,n=at){const i=xr(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,io)}getXmlElement(r=""){return this.get(r,At)}getXmlFragment(r=""){return this.get(r,bn)}toJSON(){const r={};return this.share.forEach((n,i)=>{r[i]=n.toJSON()}),r}destroy(){this.isDestroyed=!0,Pr(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,Me(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 Lb{constructor(r){this.restDecoder=r}resetDsCurVal(){}readDsClock(){return me(this.restDecoder)}readDsLen(){return me(this.restDecoder)}}class Ih extends Lb{readLeftID(){return ue(me(this.restDecoder),me(this.restDecoder))}readRightID(){return ue(me(this.restDecoder),me(this.restDecoder))}readClient(){return me(this.restDecoder)}readInfo(){return ro(this.restDecoder)}readString(){return Hi(this.restDecoder)}readParentInfo(){return me(this.restDecoder)===1}readTypeRef(){return me(this.restDecoder)}readLen(){return me(this.restDecoder)}readAny(){return rs(this.restDecoder)}readBuf(){return JF(St(this.restDecoder))}readJSON(){return JSON.parse(Hi(this.restDecoder))}readKey(){return Hi(this.restDecoder)}}class f9{constructor(r){this.dsCurrVal=0,this.restDecoder=r}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=me(this.restDecoder),this.dsCurrVal}readDsLen(){const r=me(this.restDecoder)+1;return this.dsCurrVal+=r,r}}class Qn extends f9{constructor(r){super(r),this.keys=[],me(r),this.keyClockDecoder=new ic(St(r)),this.clientDecoder=new Ba(St(r)),this.leftClockDecoder=new ic(St(r)),this.rightClockDecoder=new ic(St(r)),this.infoDecoder=new ff(St(r),ro),this.stringDecoder=new _F(St(r)),this.parentInfoDecoder=new ff(St(r),ro),this.typeRefDecoder=new Ba(St(r)),this.lenDecoder=new Ba(St(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 St(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 Rh{constructor(){this.restEncoder=Ns()}toUint8Array(){return tr(this.restEncoder)}resetDsCurVal(){}writeDsClock(r){ce(this.restEncoder,r)}writeDsLen(r){ce(this.restEncoder,r)}}class Ts extends Rh{writeLeftID(r){ce(this.restEncoder,r.client),ce(this.restEncoder,r.clock)}writeRightID(r){ce(this.restEncoder,r.client),ce(this.restEncoder,r.clock)}writeClient(r){ce(this.restEncoder,r)}writeInfo(r){yd(this.restEncoder,r)}writeString(r){$i(this.restEncoder,r)}writeParentInfo(r){ce(this.restEncoder,r?1:0)}writeTypeRef(r){ce(this.restEncoder,r)}writeLen(r){ce(this.restEncoder,r)}writeAny(r){ts(this.restEncoder,r)}writeBuf(r){Dt(this.restEncoder,r)}writeJSON(r){$i(this.restEncoder,JSON.stringify(r))}writeKey(r){$i(this.restEncoder,r)}}class zh{constructor(){this.restEncoder=Ns(),this.dsCurrVal=0}toUint8Array(){return tr(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(r){const n=r-this.dsCurrVal;this.dsCurrVal=r,ce(this.restEncoder,n)}writeDsLen(r){r===0&&It(),ce(this.restEncoder,r-1),this.dsCurrVal+=r}}class Yn extends zh{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new nc,this.clientEncoder=new Sa,this.leftClockEncoder=new nc,this.rightClockEncoder=new nc,this.infoEncoder=new df(yd),this.stringEncoder=new mF,this.parentInfoEncoder=new df(yd),this.typeRefEncoder=new Sa,this.lenEncoder=new Sa}toUint8Array(){const r=Ns();return ce(r,0),Dt(r,this.keyClockEncoder.toUint8Array()),Dt(r,this.clientEncoder.toUint8Array()),Dt(r,this.leftClockEncoder.toUint8Array()),Dt(r,this.rightClockEncoder.toUint8Array()),Dt(r,tr(this.infoEncoder)),Dt(r,this.stringEncoder.toUint8Array()),Dt(r,tr(this.parentInfoEncoder)),Dt(r,this.typeRefEncoder.toUint8Array()),Dt(r,this.lenEncoder.toUint8Array()),Os(r,tr(this.restEncoder)),tr(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){Dt(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 m9=(e,r,n,i)=>{i=jr(i,r[0].id.clock);const o=_r(r,i);ce(e.restEncoder,r.length-o),e.writeClient(n),ce(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)},$h=(e,r,n)=>{const i=new Map;n.forEach((o,s)=>{qe(r,s)>o&&i.set(s,o)}),Ls(r).forEach((o,s)=>{n.has(s)||i.set(s,0)}),ce(e.restEncoder,i.size),Pr(i.entries()).sort((o,s)=>s[0]-o[0]).forEach(([o,s])=>{m9(e,r.clients.get(o),o,s)})},g9=(e,r)=>{const n=gt(),i=me(e.restDecoder);for(let o=0;o<i;o++){const s=me(e.restDecoder),a=new Array(s),l=e.readClient();let u=me(e.restDecoder);n.set(l,{i:0,refs:a});for(let c=0;c<s;c++){const d=e.readInfo();switch(du&d){case 0:{const h=e.readLen();a[c]=new qt(ue(l,u),h),u+=h;break}case 10:{const h=me(e.restDecoder);a[c]=new Nt(ue(l,u),h),u+=h;break}default:{const h=(d&(Rr|Ot))===0,p=new Be(ue(l,u),null,(d&Ot)===Ot?e.readLeftID():null,null,(d&Rr)===Rr?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},b9=(e,r,n)=>{const i=[];let o=Pr(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!==Nt){const f=xr(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 $h(f,l,new Map),ce(f.restEncoder,0),{missing:u,update:f.toUint8Array()}}return null},y9=(e,r)=>$h(e,r.doc.store,r.beforeState),C9=(e,r,n,i=new Qn(e))=>Me(r,o=>{o.local=!1;let s=!1;const a=o.doc,l=a.store,u=g9(i,a),c=b9(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=Sl([d.update,c.update])}}else l.pendingStructs=c;const h=yf(i,o,l);if(l.pendingDs){const p=new Qn(ai(l.pendingDs));me(p.restDecoder);const f=yf(p,o,l);h&&f?l.pendingDs=Sl([h,f]):l.pendingDs=h||f}else l.pendingDs=h;if(s){const p=l.pendingStructs.update;l.pendingStructs=null,Dl(o.doc,p)}},n,!1),Dl=(e,r,n,i=Qn)=>{const o=ai(r);C9(o,e,n,new i(o))},$4e=(e,r,n)=>Dl(e,r,n,Ih),v9=(e,r,n=new Map)=>{$h(e,r.store,n),po(e,Ob(r.store))},k9=(e,r=new Uint8Array([0]),n=new Yn)=>{const i=Ib(r);v9(n,e,i);const o=[n.toUint8Array()];if(e.store.pendingDs&&o.push(e.store.pendingDs),e.store.pendingStructs&&o.push(H9(e.store.pendingStructs.update,r)),o.length>1){if(n.constructor===Ts)return R9(o.map((s,a)=>a===0?s:V9(s)));if(n.constructor===Yn)return Sl(o)}return o[0]},H4e=(e,r)=>k9(e,r,new Ts),A9=e=>{const r=new Map,n=me(e.restDecoder);for(let i=0;i<n;i++){const o=me(e.restDecoder),s=me(e.restDecoder);r.set(o,s)}return r},Ib=e=>A9(new Lb(ai(e))),Rb=(e,r)=>(ce(e.restEncoder,r.size),Pr(r.entries()).sort((n,i)=>i[0]-n[0]).forEach(([n,i])=>{ce(e.restEncoder,n),ce(e.restEncoder,i)}),e),w9=(e,r)=>Rb(e,Ls(r.store)),_9=(e,r=new zh)=>(e instanceof Map?Rb(r,e):w9(r,e),r.toUint8Array()),P4e=e=>_9(e,new Rh);class E9{constructor(){this.l=[]}}const Cf=()=>new E9,vf=(e,r)=>e.l.push(r),kf=(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)=>Bh(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 It()},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 x9{constructor(r,n,i=0){this.type=r,this.index=n,this.assoc=i}}const D9=(e,r,n=0)=>new x9(e,r,n),Ys=(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 Ys(e,null,n);r--}for(;i!==null;){if(!i.deleted&&i.countable){if(i.length>r)return Ys(e,ue(i.id.client,i.id.clock+r),n);r-=i.length}if(i.right===null&&n<0)return Ys(e,i.lastId,n);i=i.right}return Ys(e,null,n)},S9=(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?xd(i,o):{item:Vi(i,o),diff:0},h=d.item;if(!(h instanceof Be))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?xd(i,s):{item:Vi(i,s)};if(d instanceof Be&&d.content instanceof Dr)u=d.content.type;else return null}else throw It();l>=0?c=u._length:c=0}return D9(u,c,e.assoc)},Af=(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 Hh{constructor(r,n){this.ds=r,this.sv=n}}const $b=(e,r)=>new Hh(e,r),lc=e=>$b(Ob(e.store),Ls(e.store)),Mn=(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),wd=(e,r)=>{const n=xr(e.meta,wd,fn),i=e.doc.store;n.has(r)||(r.sv.forEach((o,s)=>{o<qe(i,s)&&kt(e,ue(s,o))}),gn(e,r.ds,o=>{}),n.add(r))};class Hb{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const Ls=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 It()}n.push(r)},_r=(e,r)=>{let n=0,i=e.length-1,o=e[i],s=o.id.clock;if(s===r)return i;let a=Vr(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=Vr((n+i)/2)}throw It()},B9=(e,r)=>{const n=e.clients.get(r.client);return n[_r(n,r.clock)]},Vi=B9,_d=(e,r,n)=>{const i=_r(r,n),o=r[i];return o.id.clock<n&&o instanceof Be?(r.splice(i+1,0,Ol(e,o,n-o.id.clock)),i+1):i},kt=(e,r)=>{const n=e.doc.store.clients.get(r.client);return n[_d(e,n,r.clock)]},wf=(e,r,n)=>{const i=r.clients.get(n.client),o=_r(i,n.clock),s=i[o];return n.clock!==s.id.clock+s.length-1&&s.constructor!==qt&&i.splice(o+1,0,Ol(e,s,n.clock-s.id.clock+1)),s},M9=(e,r,n)=>{const i=e.clients.get(r.id.client);i[_r(i,r.id.clock)]=n},Vb=(e,r,n,i,o)=>{if(i===0)return;const s=n+i;let a=_d(e,r,n),l;do l=r[a++],s<l.id.clock+l.length&&_d(e,r,s),o(l);while(a<r.length&&r[a].id.clock<s)};class F9{constructor(r,n,i){this.doc=r,this.deleteSet=new co,this.beforeState=Ls(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 _f=(e,r)=>r.deleteSet.clients.size===0&&!WM(r.afterState,(n,i)=>r.beforeState.get(i)!==n)?!1:(Th(r.deleteSet),y9(e,r),po(e,r.deleteSet),!0),Ef=(e,r,n)=>{const i=r._item;(i===null||i.id.clock<(e.beforeState.get(i.id.client)||0)&&!i.deleted)&&xr(e.changed,r,fn).add(n)},Ma=(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 Be&&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},N9=(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=_r(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 Be&&h.deleted&&!h.keep&&n(h)&&h.gc(r,!1)}}}},O9=(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=qn(o.length-1,1+_r(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+Ma(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{Th(s),n.afterState=Ls(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])),Bh(l,[]),n._needFormattingCleanup&&r8(n)}finally{i.gc&&N9(s,o,i.gcFilter),O9(s,o),n.afterState.forEach((d,h)=>{const p=n.beforeState.get(h)||0;if(p!==d){const f=o.clients.get(h),m=jr(_r(f,p),1);for(let b=f.length-1;b>=m;)b-=1+Ma(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=_r(f,p);m+1<f.length&&Ma(f,m+1)>1||m>0&&Ma(f,m)}if(!n.local&&n.afterState.get(i.clientID)!==n.beforeState.get(i.clientID)&&(c9(Nh,xb,"[yjs] ",Db,Sb,"Changed the client-id because another client seems to be using it."),i.clientID=Tb()),i.emit("afterTransactionCleanup",[n,i]),i._observers.has("update")){const d=new Ts;_f(d,n)&&i.emit("update",[d.toUint8Array(),n.origin,i,n])}if(i._observers.has("updateV2")){const d=new Yn;_f(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)}}},Me=(e,r,n=null,i=!0)=>{const o=e._transactionCleanups;let s=!1,a=null;e._transaction===null&&(s=!0,e._transaction=new F9(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 T9{constructor(r,n){this.insertions=n,this.deletions=r,this.meta=new Map}}const xf=(e,r,n)=>{gn(e,n.deletions,i=>{i instanceof Be&&r.scope.some(o=>ss(o,i))&&Kh(i,!1)})},Df=(e,r,n)=>{let i=null;const o=e.doc,s=e.scope;Me(o,l=>{for(;r.length>0&&e.currStackItem===null;){const u=o.store,c=r.pop(),d=new Set,h=[];let p=!1;gn(l,c.insertions,f=>{if(f instanceof Be){if(f.redone!==null){let{item:m,diff:b}=xd(u,f.id);b>0&&(m=kt(l,ue(m.id.client,m.id.clock+b))),f=m}!f.deleted&&s.some(m=>ss(m,f))&&h.push(f)}}),gn(l,c.deletions,f=>{f instanceof Be&&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 L9 extends mb{constructor(r,{captureTimeout:n=500,captureTransaction:i=u=>!0,deleteFilter:o=()=>!0,trackedOrigins:s=new Set([null]),ignoreRemoteMapChanges:a=!1,doc:l=gd(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=MF();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=Ad([g.deletions,u.deleteSet]),g.insertions=Ad([g.insertions,p])}else h.push(new T9(u.deleteSet,p)),m=!0;!c&&!d&&(this.lastChange=f),gn(u,u.deleteSet,g=>{g instanceof Be&&this.scope.some(y=>ss(y,g))&&Kh(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=gd(r)?r:[r],r.forEach(n=>{this.scope.every(i=>i!==n)&&(n.doc!==this.doc&&d9("[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=>xf(i,this,o)),this.undoStack=[]),n&&(this.redoStack.forEach(o=>xf(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=Df(this,this.undoStack,"undo")}finally{this.undoing=!1}return r}redo(){this.redoing=!0;let r;try{r=Df(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*I9(e){const r=me(e.restDecoder);for(let n=0;n<r;n++){const i=me(e.restDecoder),o=e.readClient();let s=me(e.restDecoder);for(let a=0;a<i;a++){const l=e.readInfo();if(l===10){const u=me(e.restDecoder);yield new Nt(ue(o,s),u),s+=u}else if(du&l){const u=(l&(Rr|Ot))===0,c=new Be(ue(o,s),null,(l&Ot)===Ot?e.readLeftID():null,null,(l&Rr)===Rr?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 pu{constructor(r,n){this.gen=I9(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===Nt);return this.curr}}class Ph{constructor(r){this.currClient=0,this.startClock=0,this.written=0,this.encoder=r,this.clientStructs=[]}}const R9=e=>Sl(e,Ih,Ts),z9=(e,r=zh,n=Qn)=>{const i=new r,o=new pu(new n(ai(e)),!1);let s=o.curr;if(s!==null){let a=0,l=s.id.client,u=s.id.clock!==0,c=u?0:s.id.clock+s.length;for(;s!==null;s=o.next())l!==s.id.client&&(c!==0&&(a++,ce(i.restEncoder,l),ce(i.restEncoder,c)),l=s.id.client,c=0,u=s.id.clock!==0),s.constructor===Nt&&(u=!0),u||(c=s.id.clock+s.length);c!==0&&(a++,ce(i.restEncoder,l),ce(i.restEncoder,c));const d=Ns();return ce(d,a),cF(d,i.restEncoder),i.restEncoder=d,i.toUint8Array()}else return ce(i.restEncoder,0),i.toUint8Array()},V4e=e=>z9(e,Rh,Ih),$9=(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===Nt){const{client:n,clock:i}=e.id;return new Nt(ue(n,i+r),e.length-r)}else{const n=e,{client:i,clock:o}=n.id;return new Be(ue(i,o+r),null,ue(i,o+r-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(r))}},Sl=(e,r=Qn,n=Yn)=>{if(e.length===1)return e[0];const i=e.map(d=>new r(ai(d)));let o=i.map(d=>new pu(d,!0)),s=null;const a=new n,l=new Ph(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===Nt?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)Gr(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===Nt)s.struct.length=p.id.clock+p.length-s.struct.id.clock;else{Gr(l,s.struct,s.offset);const m=p.id.clock-s.struct.id.clock-s.struct.length;s={struct:new Nt(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===Nt?s.struct.length-=m:p=$9(p,m)),s.struct.mergeWith(p)||(Gr(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!==Nt;p=d.next())Gr(l,s.struct,s.offset),s={struct:p,offset:0}}s!==null&&(Gr(l,s.struct,s.offset),s=null),Vh(l);const u=i.map(d=>Lh(d)),c=Ad(u);return po(a,c),a.toUint8Array()},H9=(e,r,n=Qn,i=Yn)=>{const o=Ib(r),s=new i,a=new Ph(s),l=new n(ai(e)),u=new pu(l,!1);for(;u.curr;){const d=u.curr,h=d.id.client,p=o.get(h)||0;if(u.curr.constructor===Nt){u.next();continue}if(d.id.clock+d.length>p)for(Gr(a,d,jr(p-d.id.clock,0)),u.next();u.curr&&u.curr.id.client===h;)Gr(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()}Vh(a);const c=Lh(l);return po(s,c),s.toUint8Array()},qb=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:tr(e.encoder.restEncoder)}),e.encoder.restEncoder=Ns(),e.written=0)},Gr=(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),ce(e.encoder.restEncoder,r.id.clock+n)),r.write(e.encoder,n),e.written++},Vh=e=>{qb(e);const r=e.encoder.restEncoder;ce(r,e.clientStructs.length);for(let n=0;n<e.clientStructs.length;n++){const i=e.clientStructs[n];ce(r,i.written),Os(r,i.restEncoder)}},P9=(e,r,n,i)=>{const o=new n(ai(e)),s=new pu(o,!1),a=new i,l=new Ph(a);for(let c=s.curr;c!==null;c=s.next())Gr(l,r(c),0);Vh(l);const u=Lh(o);return po(a,u),a.toUint8Array()},V9=e=>P9(e,$F,Qn,Ts),Sf="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=j9(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 mn(Sf);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 mn(Sf);const n=this.target,i=fn(),o=fn(),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 j9=(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},Ub=80;let jh=0;class q9{constructor(r,n){r.marker=!0,this.p=r,this.index=n,this.timestamp=jh++}}const U9=e=>{e.timestamp=jh++},Wb=(e,r,n)=>{e.p.marker=!1,e.p=r,r.marker=!0,e.index=n,e.timestamp=jh++},W9=(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 q9(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)=>Da(r-s.index)<Da(r-a.index)?s:a);let i=e._start,o=0;for(n!==null&&(i=n.p,o=n.index,U9(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&&Da(n.index-o)<i.parent.length/Ub?(Wb(n,i,o),n):W9(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=jr(r,o.index+n))}},gu=(e,r,n)=>{const i=e,o=r.changedParentTypes;for(;xr(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=Cf(),this._dEH=Cf(),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){vf(this._eH,r)}observeDeep(r){vf(this._dEH,r)}unobserve(r){kf(this._eH,r)}unobserveDeep(r){kf(this._dEH,r)}toJSON(){}}const Kb=(e,r,n)=>{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 a=s.content.getContent();if(a.length<=r)r-=a.length;else{for(let l=r;l<a.length&&i>0;l++)o.push(a[l]),i--;r=0}}s=s.right}return o},Zb=e=>{const r=[];let n=e._start;for(;n!==null;){if(n.countable&&!n.deleted){const i=n.content.getContent();for(let o=0;o<i.length;o++)r.push(i[o])}n=n.right}return r},Gb=(e,r)=>{const n=[];let i=e._start;for(;i!==null;){if(i.countable&&Mn(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)=>{let n=0,i=e._start;for(;i!==null;){if(i.countable&&!i.deleted){const o=i.content.getContent();for(let s=0;s<o.length;s++)r(o[s],n++,e)}i=i.right}},Jb=(e,r)=>{const n=[];return us(e,(i,o)=>{n.push(r(i,o,e))}),n},K9=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)=>{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}},Bl=(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 Be(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 Be(ue(a,qe(l,a)),o,o&&o.lastId,u,u&&u.id,r,null,new Is(new Uint8Array(h))),o.integrate(e,0);break;case fo:o=new Be(ue(a,qe(l,a)),o,o&&o.lastId,u,u&&u.id,r,null,new Rs(h)),o.integrate(e,0);break;default:if(h instanceof at)o=new Be(ue(a,qe(l,a)),o,o&&o.lastId,u,u&&u.id,r,null,new Dr(h)),o.integrate(e,0);else throw new Error("Unexpected content type in insert operation")}}}),d()},Qb=()=>mn("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),Bl(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&&kt(e,ue(a.id.client,a.id.clock+n));break}n-=a.length}return r._searchMarker&&ls(r._searchMarker,o,i.length),Bl(e,r,a,i)},Z9=(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 Bl(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&&kt(e,ue(l.id.client,l.id.clock+n)),n-=l.length);for(;i>0&&l!==null;)l.deleted||(i<l.length&&kt(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)},Ml=(e,r,n)=>{const i=r._map.get(n);i!==void 0&&i.delete(e)},qh=(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 Is(i);break;case fo:l=new Rs(i);break;default:if(i instanceof at)l=new Dr(i);else throw new Error("Unexpected content type")}new Be(ue(a,qe(s.store,a)),o,o&&o.lastId,null,null,r,n,l).integrate(e,0)},Uh=(e,r)=>{const n=e._map.get(r);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},ty=e=>{const r={};return e._map.forEach((n,i)=>{n.deleted||(r[i]=n.content.getContent()[n.length-1])}),r},ry=(e,r)=>{const n=e._map.get(r);return n!==void 0&&!n.deleted},G9=(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&&Mn(s,r)&&(n[o]=s.content.getContent()[s.length-1])}),n},ea=e=>h9(e.entries(),r=>!r[1].deleted);class J9 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(){return this._prelimContent===null?this._length:this._prelimContent.length}_callObserver(r,n){super._callObserver(r,n),gu(this,r,new J9(this,r))}insert(r,n){this.doc!==null?Me(this.doc,i=>{Yb(i,this,r,n)}):this._prelimContent.splice(r,0,...n)}push(r){this.doc!==null?Me(this.doc,n=>{Z9(n,this,r)}):this._prelimContent.push(...r)}unshift(r){this.insert(0,r)}delete(r,n=1){this.doc!==null?Me(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 K9(this)}_write(r){r.writeTypeRef(v8)}}const X9=e=>new ji;class Q9 extends fu{constructor(r,n,i){super(r,n),this.keysChanged=i}}class io 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 io}clone(){const r=new io;return this.forEach((n,i)=>{r.set(i,n instanceof at?n.clone():n)}),r}_callObserver(r,n){gu(this,r,new Q9(this,r,n))}toJSON(){const r={};return this._map.forEach((n,i)=>{if(!n.deleted){const o=n.content.getContent()[n.length-1];r[i]=o instanceof at?o.toJSON():o}}),r}get size(){return[...ea(this._map)].length}keys(){return sc(ea(this._map),r=>r[0])}values(){return sc(ea(this._map),r=>r[1].content.getContent()[r[1].length-1])}entries(){return sc(ea(this._map),r=>[r[0],r[1].content.getContent()[r[1].length-1]])}forEach(r){this._map.forEach((n,i)=>{n.deleted||r(n.content.getContent()[n.length-1],i,this)})}[Symbol.iterator](){return this.entries()}delete(r){this.doc!==null?Me(this.doc,n=>{Ml(n,this,r)}):this._prelimContent.delete(r)}set(r,n){return this.doc!==null?Me(this.doc,i=>{qh(i,this,r,n)}):this._prelimContent.set(r,n),n}get(r){return Uh(this,r)}has(r){return ry(this,r)}clear(){this.doc!==null?Me(this.doc,r=>{this.forEach(function(n,i,o){Ml(r,o,i)})}):this._prelimContent.clear()}_write(r){r.writeTypeRef(k8)}}const Y9=e=>new io,rn=(e,r)=>e===r||typeof e=="object"&&typeof r=="object"&&e&&r&&zF(e,r);class Ed{constructor(r,n,i,o){this.left=r,this.right=n,this.index=i,this.currentAttributes=o}forward(){switch(this.right===null&&It(),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 Bf=(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&&kt(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},ta=(e,r,n,i)=>{const o=new Map,s=i?mu(r,n):null;if(s){const a=new Ed(s.p.left,s.p,s.index,o);return Bf(e,a,n-s.index)}else{const a=new Ed(null,r._start,0,o);return Bf(e,a,n)}},ny=(e,r,n,i)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===We&&rn(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 Be(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&&rn((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(!rn(d,c)){a.set(u,d);const{left:h,right:p}=n;n.right=new Be(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 sr(i):i instanceof at?new Dr(i):new li(i);let{left:c,right:d,index:h}=n;r._searchMarker&&ls(r._searchMarker,n.index,u.getLength()),d=new Be(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)},Mf=(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(rn(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&&kt(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 Be(ue(a,qe(s.store,a)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,r,null,new sr(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=gt();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},e8=(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}},t8=e=>{let r=0;return Me(e.doc,n=>{let i=e._start,o=e._start,s=gt();const a=md(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=md(a),i=o;break}o=o.right}}),r},r8=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)})}Me(n,i=>{gn(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):e8(i,o)});for(const o of r)t8(o)})},Ff=(e,r,n)=>{const i=n,o=md(r.currentAttributes),s=r.right;for(;n>0&&r.right!==null;){if(r.right.deleted===!1)switch(r.right.content.constructor){case Dr:case li:case sr:n<r.right.length&&kt(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 n8 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=[];Me(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},IF(u)||(g.attributes=TF({},u))),d=0;break}g&&n.push(g),l=null}};for(;a!==null;){switch(a.content.constructor){case Dr: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 sr: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;rn(v,y)?y!==null&&a.delete(i):(l==="retain"&&p(),rn(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;rn(v,y)||(l==="retain"&&p(),u[g]=v)}else if(!a.deleted){s.set(g,y);const v=u[g];v!==void 0&&(rn(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(){return 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 n8(this,r,n);gu(this,r,i),!r.local&&this._hasFormatting&&(r._needFormattingCleanup=!0)}toString(){let r="",n=this._start;for(;n!==null;)!n.deleted&&n.countable&&n.content.constructor===sr&&(r+=n.content.str),n=n.right;return r}toJSON(){return this.toString()}applyDelta(r,{sanitize:n=!0}={}){this.doc!==null?Me(this.doc,i=>{const o=new Ed(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?Mf(i,this,o,a.retain,a.attributes||{}):a.delete!==void 0&&Ff(i,o,a.delete)}}):this._pending.push(()=>this.applyDelta(r))}toDelta(r,n,i){const o=[],s=new Map,a=this.doc;let l="",u=this._start;function c(){if(l.length>0){const h={};let p=!1;s.forEach((m,b)=>{p=!0,h[b]=m});const f={insert:l};p&&(f.attributes=h),o.push(f),l=""}}const d=()=>{for(;u!==null;){if(Mn(u,r)||n!==void 0&&Mn(u,n))switch(u.content.constructor){case sr:{const h=s.get("ychange");r!==void 0&&!Mn(u,r)?(h===void 0||h.user!==u.id.client||h.type!=="removed")&&(c(),s.set("ychange",i?i("removed",u.id):{type:"removed"})):n!==void 0&&!Mn(u,n)?(h===void 0||h.user!==u.id.client||h.type!=="added")&&(c(),s.set("ychange",i?i("added",u.id):{type:"added"})):h!==void 0&&(c(),s.delete("ychange")),l+=u.content.str;break}case Dr:case li:{c();const h={insert:u.content.getContent()[0]};if(s.size>0){const p={};h.attributes=p,s.forEach((f,m)=>{p[m]=f})}o.push(h);break}case We:Mn(u,r)&&(c(),mo(s,u.content));break}u=u.right}c()};return r||n?Me(a,h=>{r&&wd(h,r),n&&wd(h,n),d()},"cleanup"):d(),o}insert(r,n,i){if(n.length<=0)return;const o=this.doc;o!==null?Me(o,s=>{const a=ta(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?Me(o,s=>{const a=ta(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?Me(i,o=>{Ff(o,ta(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?Me(o,s=>{const a=ta(s,this,r,!1);a.right!==null&&Mf(s,this,a,n,i)}):this._pending.push(()=>this.format(r,n,i))}removeAttribute(r){this.doc!==null?Me(this.doc,n=>{Ml(n,this,r)}):this._pending.push(()=>this.removeAttribute(r))}setAttribute(r,n){this.doc!==null?Me(this.doc,i=>{qh(i,this,r,n)}):this._pending.push(()=>this.setAttribute(r,n))}getAttribute(r){return Uh(this,r)}getAttributes(){return ty(this)}_write(r){r.writeTypeRef(A8)}}const i8=e=>new ei;class cc{constructor(r,n=()=>!0){this._filter=n,this._root=r,this._currentNode=r._start,this._firstCall=!0}[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===bn)&&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 bn 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 bn}clone(){const r=new bn;return r.insert(0,this.toArray().map(n=>n instanceof at?n.clone():n)),r}get length(){return 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(),Pr(new cc(this,n=>n.nodeName&&n.nodeName.toUpperCase()===r))}_callObserver(r,n){gu(this,r,new a8(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?Me(this.doc,i=>{Yb(i,this,r,n)}):this._prelimContent.splice(r,0,...n)}insertAfter(r,n){if(this.doc!==null)Me(this.doc,i=>{const o=r&&r instanceof at?r._item:r;Bl(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 mn("Reference item not found");i.splice(o,0,...n)}}delete(r,n=1){this.doc!==null?Me(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(_8)}}const o8=e=>new bn;class At extends bn{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 LF(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?Me(this.doc,n=>{Ml(n,this,r)}):this._prelimAttrs.delete(r)}setAttribute(r,n){this.doc!==null?Me(this.doc,i=>{qh(i,this,r,n)}):this._prelimAttrs.set(r,n)}getAttribute(r){return Uh(this,r)}hasAttribute(r){return ry(this,r)}getAttributes(r){return r?G9(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(w8),r.writeKey(this.nodeName)}}const s8=e=>new At(e.readKey());class a8 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 Fl extends io{constructor(r){super(),this.hookName=r}_copy(){return new Fl(this.hookName)}clone(){const r=new Fl(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(E8),r.writeKey(this.hookName)}}const l8=e=>new Fl(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(x8)}}const u8=e=>new Tt;class Wh{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 c8=0;class qt extends Wh{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(c8),r.writeLen(this.length-n)}getMissing(r,n){return null}}class Is{constructor(r){this.content=r}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Is(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 d8=e=>new Is(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 h8=e=>new cs(e.readLen()),ay=(e,r)=>new fo({guid:e,...r,shouldLoad:r.shouldLoad||r.autoLoad||!1});class Rs{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 Rs(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 p8=e=>new Rs(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 f8=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 m8=e=>new We(e.readKey(),e.readJSON());class Nl{constructor(r){this.arr=r}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Nl(this.arr)}splice(r){const n=new Nl(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 g8=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 Nl(n)};class ti{constructor(r){this.arr=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 b8=e=>{const r=e.readLen(),n=[];for(let i=0;i<r;i++)n.push(e.readAny());return new ti(n)};class sr{constructor(r){this.str=r}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new sr(this.str)}splice(r){const n=new sr(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 y8=e=>new sr(e.readString()),C8=[X9,Y9,i8,s8,o8,l8,u8],v8=0,k8=1,A8=2,w8=3,_8=4,E8=5,x8=6;class Dr{constructor(r){this.type=r}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new Dr(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 D8=e=>new Dr(C8[e.readTypeRef()](e)),xd=(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 Be);return{item:o,diff:i}},Kh=(e,r)=>{for(;e!==null&&e.keep!==r;)e.keep=r,e=e.parent._item},Ol=(e,r,n)=>{const{client:i,clock:o}=r.id,s=new Be(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},Nf=(e,r)=>ZM(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 kt(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=kt(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:kt(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:kt(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)||Nf(s.undoStack,h.right.id)||Nf(s.redoStack,h.right.id));)for(h=h.right;h.redone;)h=kt(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 Be(b,h,h&&h.lastId,p,p&&p.id,f,r.parentSub,r.content.copy());return r.redone=b,Kh(g,!0),g.integrate(e,0),g};class Be extends Wh{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()?lf:0}set marker(r){(this.info&rc)>0!==r&&(this.info^=rc)}get marker(){return(this.info&rc)>0}get keep(){return(this.info&af)>0}set keep(r){this.keep!==r&&(this.info^=af)}get countable(){return(this.info&lf)>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=wf(r,n,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=kt(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===Be&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===Be&&(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=wf(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),Ef(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),Ef(r,n,this.parentSub),this.content.delete(r)}}gc(r,n){if(!this.deleted)throw It();this.content.gc(r),n?M9(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()&du|(i===null?0:Ot)|(o===null?0:Rr)|(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)):It();s!==null&&r.writeString(s)}this.content.write(r,n)}}const uy=(e,r)=>S8[r&du](e),S8=[()=>{It()},h8,g8,d8,y8,f8,m8,D8,b8,p8,()=>{It()}],B8=10;class Nt extends Wh{get deleted(){return!0}delete(){}mergeWith(r){return this.constructor!==r.constructor?!1:(this.length+=r.length,!0)}integrate(r,n){It()}write(r,n){r.writeInfo(B8),ce(r.restEncoder,this.length-n)}getMissing(r,n){return null}}const Of=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Bp<"u"?Bp:{},Tf="__ $YJS$ __";Of[Tf]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438"),Of[Tf]=!0;const M8=()=>{let e=!0;return(r,n)=>{if(e){e=!1;try{r()}finally{e=!0}}else n!==void 0&&n()}},F8=/[\uD800-\uDBFF]/,N8=/[\uDC00-\uDFFF]/,O8=(e,r)=>{let n=0,i=0;for(;n<e.length&&n<r.length&&e[n]===r[n];)n++;for(n>0&&F8.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&&N8.test(e[e.length-i])&&i--,{index:n,remove:e.length-n-i,insert:r.slice(n,r.length-i)}},T8=O8,Ke=new Ae("y-sync"),L8=new Ae("y-undo"),ra=new Ae("yjs-cursor"),Tl=(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),I8=[{light:"#ecd44433",dark:"#ecd444"}],R8=(e,r,n)=>{if(!e.has(n)){if(e.size<r.length){const i=fn();e.forEach(o=>i.add(o)),r=r.filter(o=>!i.has(o))}e.set(n,DF(r))}return e.get(n)},j4e=(e,{colors:r=I8,colorMapping:n=new Map,permanentUserData:i=null,onFirstRender:o=()=>{},mapping:s}={})=>{let a=!1;const l=new $8(e,s),u=new ge({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)&&Fh(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=L8.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},z8=(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)))}},Lf=(e,r)=>({anchor:Rl(r.selection.anchor,e.type,e.mapping),head:Rl(r.selection.head,e.type,e.mapping)});class $8{constructor(r,n=new Map){this.type=r,this.prosemirrorView=null,this.mux=M8(),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=Lf(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()?(Mh&&this._domSelectionInView===null&&(Fh(0,()=>{this._domSelectionInView=null}),this._domSelectionInView=this._isDomSelectionInView()),this._domSelectionInView):!1}_isDomSelectionInView(){const r=this.prosemirrorView._root.getSelection(),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=QF.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(Nb(),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=>Fa(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=>Fa(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));r&&i.setSelection(Q.create(i.doc,r.anchor,r.head)),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))&&It(),o=new fo({gc:!1}),Dl(o,n),n=lc(o),Dl(o,r),r=lc(o)),this.mapping.clear(),this.mux(()=>{o.transact(s=>{const a=i.permanentUserData;a&&a.dss.forEach(d=>{gn(s,d,h=>{})});const l=(d,h)=>{const p=d==="added"?a.getUserByClientId(h.client):a.getUserByDeletedId(h);return{user:p,type:d,color:R8(i.colorMapping,i.colors,p)}},u=Gb(this.type,new Hh(n.ds,r.sv)).map(d=>!d._item.deleted||Tl(d._item,r)||Tl(d._item,n)?Fa(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);gn(n,n.deleteSet,l=>{if(l.constructor===Be){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));z8(a,this.beforeTransactionSelection,this),a=a.setMeta(Ke,{isChangeOrigin:!0,isUndoRedoOperation:n.origin instanceof L9}),this.beforeTransactionSelection!==null&&this._isLocalCursorInView()&&a.scrollIntoView(),this.prosemirrorView.dispatch(a)})}_prosemirrorChanged(r){this.doc.transact(()=>{Il(this.doc,this.type,r,this.mapping),this.beforeTransactionSelection=Lf(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 Fa(e,r,n,i,o,s);throw ir()}return a},Fa=(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=H8(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 Hh(o.ds,i.sv)).forEach(l);try{const u=e.getAttributes(i);i!==void 0&&(Tl(e._item,i)?Tl(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}},H8=(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},P8=(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},V8=(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=>Dd(i,r))),r.set(n,e),n},Dd=(e,r)=>e instanceof Array?P8(e,r):V8(e,r),If=e=>typeof e=="object"&&e!==null,Zh=(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||If(a)&&If(l)&&Zh(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&&Sh(i.attributes||{}).length===r[o].marks.length&&r[o].marks.every(s=>Zh(i.attributes[s.type.name]||{},s.attrs)))},ds=(e,r)=>{if(e instanceof At&&!(r instanceof Array)&&Sd(e,r)){const n=bu(r);return e._length===n.length&&Zh(e.getAttributes(),r.attrs)&&e.toArray().every((i,o)=>ds(i,n[o]))}return e instanceof Tt&&r instanceof Array&&dy(e,r)},Ll=(e,r)=>e===r||e instanceof Array&&r instanceof Array&&e.length===r.length&&e.every((n,i)=>r[i]===n),Rf=(e,r,n)=>{const i=e.toArray(),o=bu(r),s=o.length,a=i.length,l=qn(a,s);let u=0,c=0,d=!1;for(;u<l;u++){const h=i[u],p=o[u];if(Ll(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(Ll(n.get(h),p))d=!0;else if(!ds(h,p))break}return{equalityFactor:u+c,foundMappedChild:d}},j8=e=>{let r="",n=e._start;const i={};for(;n!==null;)n.deleted||(n.countable&&n.content instanceof sr?r+=n.content.str:n.content instanceof We&&(i[n.content.key]=null)),n=n.right;return{str:r,nAttrs:i}},q8=(e,r,n)=>{n.set(e,r);const{nAttrs:i,str:o}=j8(e),s=r.map(c=>({insert:c.text,attributes:Object.assign({},i,hy(c.marks))})),{insert:a,remove:l,index:u}=T8(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},Il=(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=qn(s,l);let c=0,d=0;for(;c<u;c++){const h=a[c],p=o[c];if(!Ll(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(!Ll(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)||q8(p,f,i),c+=1;else{let g=p instanceof At&&Sd(p,f),y=m instanceof At&&Sd(m,b);if(g&&y){const v=Rf(p,f,i),k=Rf(m,b,i);v.foundMappedChild&&!k.foundMappedChild?y=!1:!v.foundMappedChild&&k.foundMappedChild||v.equalityFactor<k.equalityFactor?g=!1:y=!1}g?(Il(e,p,f,i),c+=1):y?(Il(e,m,b,i),d+=1):(i.delete(r.get(c)),r.delete(c,1),r.insert(c,[Dd(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(Dd(o[f],i));r.insert(c,p)}},Ke)},Sd=(e,r)=>!(r instanceof Array)&&e.nodeName===r.type.name;let Vo=null;const U8=()=>{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))})},W8=(e,r,n)=>{Vo||(Vo=new Map,Fh(0,U8)),xr(Vo,e,gt).set(r,n)},Rl=(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 It();if(e===0&&i.constructor!==Tt&&i!==r)return K8(i._item.parent,i._item)}return ac(r,r._length,-1)},K8=(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=S9(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 q4e(e,r){const n=r||new bn,i=n.doc?n.doc:{transact:o=>o(void 0)};return Il(i,n,e,new Map),n}const Z8=(e,r,n)=>e!==r,G8=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"}),J8=/^#[0-9a-fA-F]{6}$/,zf=(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":J8.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=jr(e.doc.content.size-1,0);h=qn(h,f),p=qn(p,f),l.push(ze.widget(p,()=>i(d),{key:c+"",side:10}));const m=qn(h,p),b=jr(h,p);l.push(ze.inline(m,b,o(d),{inclusiveEnd:!0,inclusiveStart:!1}))}}}),ye.create(e.doc,l))},X8=(e,{awarenessStateFilter:r=Z8,cursorBuilder:n=G8,selectionBuilder:i=py,getSelection:o=a=>a.selection}={},s="cursor")=>new ge({key:ra,state:{init(a,l){return zf(l,e,r,n,i)},apply(a,l,u,c){const d=Ke.getState(c),h=a.getMeta(ra);return d&&d.isChangeOrigin||h&&h.awarenessUpdated?zf(c,e,r,n,i):l.map(a.mapping,a.doc)}},props:{decorations:a=>ra.getState(a)},view:a=>{const l=()=>{a.docView&&W8(a,ra,{awarenessUpdated:!0})},u=()=>{const c=Ke.getState(a.state),d=e.getLocalState()||{};if(a.hasFocus()){const h=o(a.state),p=Rl(h.anchor,c.type,c.binding.mapping),f=Rl(h.head,c.type,c.binding.mapping);(d.cursor==null||!Af(Po(d.cursor.anchor),p)||!Af(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)}}}}),$f=e=>Array.from(e.entries()).map(([r,n])=>({clientId:r,...n.user})),Hf=()=>null,Q8=Le.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:Hf}},onCreate(){if(this.options.onUpdate!==Hf&&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[X8((this.options.provider.awareness.setLocalStateField("user",this.options.user),this.storage.users=$f(this.options.provider.awareness.states),this.options.provider.awareness.on("update",()=>{this.storage.users=$f(this.options.provider.awareness.states)}),this.options.provider.awareness),{cursorBuilder:this.options.render,selectionBuilder:this.options.selectionRender})]}});function Y8(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 Pf(){return Math.floor(Date.now()/1e3)}const U4e=Q8.extend({addOptions(){return{provider:null,user:{name:null,clientId:null,color:null,lastUpdate:Pf()},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&&Y8(o)})},onTransaction({transaction:e}){var i;const{updated:r,meta:n}=e;r&&((i=n.addToHistory)==null||i)&&!n.pointer&&(this.options.user.lastUpdate=Pf(),this.options.provider.awareness.setLocalStateField("user",this.options.user))}});function eN(e){var r;const{char:n,allowSpaces:i,allowedPrefixes:o,startOfLine:s,$position:a}=e,l=xx(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 tN=new Ae("suggestion");function Gh({pluginKey:e=tN,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=eN}){let f;const m=d==null?void 0:d(),b=new ge({key:e,view(){return{update:async(g,y)=>{var v,k,C,w,_,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,A=Z||U&&F;if(!T&&!Y&&!A)return;const E=A&&!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&&((w=m==null?void 0:m.onBeforeUpdate)===null||w===void 0||w.call(m,f)),(Y||T)&&(f.items=await c({editor:r,query:E.query})),A&&((_=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:w}=r.view,{selection:_}=g,{empty:S,from:L}=_,D={...y};if(D.composing=w,C&&(S||r.view.composing)){(L<y.range.from||L>y.range.to)&&!w&&!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 rN=new Ae("emoji"),nN=De.create({name:"emoji",addOptions(){return{HTMLAttributes:{},suggestion:{char:":",allowedPrefixes:[" "],pluginKey:rN}}},content:"text*",addCommands(){return{emoji:e=>({commands:r})=>r.insertContent(e.native+" ")}},addProseMirrorPlugins(){return[Gh({editor:this.editor,...this.options.suggestion})]}});let dc=!1;const na=({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())},iN=({editor:e})=>{var n,i;const r=(n=window._nc_focus_trap)!=null?n:[];(i=r[r.length-1])==null||i.unpause()},W4e=Le.create({name:"focustrap",onFocus:na,onBlur:iN,onSelectionUpdate:na,onTransaction:na,onUpdate:na});Le.create({name:"customkeymap",addKeyboardShortcuts(){return this.options},addProseMirrorPlugins(){return[new ge({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 oN(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)=>{sN(i,l.map(d,1),l.map(h,-1),n[s])})}return i}function sN(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 Jh{constructor(r){this.blameMap=r}applyTransform(r){var o;const n=(o=r.getMeta("clientID"))!=null?o:r.steps.map(s=>"self"),i=oN(this.blameMap,r,n);return new Jh(i)}}Le.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 ge({clientID:this.options.clientID,color:this.options.color,name:this.options.name,view:r=>(e=r,{}),state:{init(r,n){return{tracked:new Jh([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 Vf={};function aN(e){let r=Vf[e];if(r)return r;r=Vf[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 oo(e,r){typeof r!="string"&&(r=oo.defaultChars);const n=aN(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})}oo.defaultChars=";/?:@&=+$,#",oo.componentChars="";const jf={};function lN(e){let r=jf[e];if(r)return r;r=jf[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=lN(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 Xh(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 zl(){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 uN=/^([a-z0-9.+-]+:)/i,cN=/:[0-9]*$/,dN=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,hN=["<",">",'"',"`"," ","\r","\n"," "],pN=["{","}","|","\\","^","`"].concat(hN),fN=["'"].concat(pN),qf=["%","/","?",";","#"].concat(fN),Uf=["/","?","#"],mN=255,Wf=/^[+a-z0-9A-Z_-]{0,63}$/,gN=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Kf={javascript:!0,"javascript:":!0},Zf={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Qh(e,r){if(e&&e instanceof zl)return e;const n=new zl;return n.parse(e,r),n}zl.prototype.parse=function(e,r){let n,i,o,s=e;if(s=s.trim(),!r&&e.split("#").length===1){const c=dN.exec(s);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let a=uN.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&&Kf[a])&&(s=s.substr(2),this.slashes=!0)),!Kf[a]&&(o||a&&!Zf[a])){let c=-1;for(let m=0;m<Uf.length;m++)i=s.indexOf(Uf[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<qf.length;m++)i=s.indexOf(qf[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(Wf)){let v="";for(let k=0,C=y.length;k<C;k++)y.charCodeAt(k)>127?v+="x":v+=y[k];if(!v.match(Wf)){const k=m.slice(0,b),C=m.slice(b+1),w=y.match(gN);w&&(k.push(w[1]),C.unshift(w[2])),C.length&&(s=C.join(".")+s),this.hostname=k.join(".");break}}}}this.hostname.length>mN&&(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),Zf[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},zl.prototype.parseHost=function(e){let r=cN.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 bN=Object.freeze(Object.defineProperty({__proto__:null,decode:oo,encode:ps,format:Xh,parse:Qh},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]/,yN=/[\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]/,Yh=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,CN=Object.freeze(Object.defineProperty({__proto__:null,Any:fy,Cc:my,Cf:yN,P:Yh,S:gy,Z:by},Symbol.toStringTag,{value:"Module"})),vN=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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))),kN=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var hc;const AN=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]]),wN=(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 _N(e){var r;return e>=55296&&e<=57343||e>1114111?65533:(r=AN.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 EN=32;var nn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(nn||(nn={}));function Bd(e){return e>=et.ZERO&&e<=et.NINE}function xN(e){return e>=et.UPPER_A&&e<=et.UPPER_F||e>=et.LOWER_A&&e<=et.LOWER_F}function DN(e){return e>=et.UPPER_A&&e<=et.UPPER_Z||e>=et.LOWER_A&&e<=et.LOWER_Z||Bd(e)}function SN(e){return e===et.EQUALS||DN(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 Jr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Jr||(Jr={}));class BN{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=Jr.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)|EN)===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(Bd(o)||xN(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(Bd(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===Jr.Strict)return 0;return this.emitCodePoint(_N(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&nn.VALUE_LENGTH)>>14;for(;n<r.length;n++,this.excess++){const a=r.charCodeAt(n);if(this.treeIndex=MN(i,o,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Jr.Attribute&&(s===0||SN(a))?0:this.emitNotTerminatedNamedEntity();if(o=i[this.treeIndex],s=(o&nn.VALUE_LENGTH)>>14,s!==0){if(a===et.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Jr.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]&nn.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]&~nn.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!==Jr.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 BN(e,i=>r+=wN(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 MN(e,r,n,i){const o=(r&nn.BRANCH_LENGTH)>>7,s=r&nn.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 FN=yy(vN);yy(kN);function Cy(e,r=Jr.Legacy){return FN(e,r)}function NN(e){return Object.prototype.toString.call(e)}function ep(e){return NN(e)==="[object String]"}const ON=Object.prototype.hasOwnProperty;function TN(e,r){return ON.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 tp(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 $l(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,LN=/&([a-z#][a-z0-9]{1,31});/gi,IN=new RegExp(ky.source+"|"+LN.source,"gi"),RN=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function zN(e,r){if(r.charCodeAt(0)===35&&RN.test(r)){const i=r[1].toLowerCase()==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10);return tp(i)?$l(i):e}const n=Cy(e);return n!==e?n:e}function $N(e){return e.indexOf("\\")<0?e:e.replace(ky,"$1")}function so(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(IN,function(r,n,i){return n||zN(r,i)})}const HN=/[&<>"]/,PN=/[&<>"]/g,VN={"&":"&","<":"<",">":">",'"':"""};function jN(e){return VN[e]}function Xr(e){return HN.test(e)?e.replace(PN,jN):e}const qN=/[.?*+^$[\]\\(){}|-]/g;function UN(e){return e.replace(qN,"\\$&")}function Ne(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 Yh.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 WN={mdurl:bN,ucmicro:CN},KN=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:vy,assign:yu,escapeHtml:Xr,escapeRE:UN,fromCodePoint:$l,has:TN,isMdAsciiPunct:gs,isPunctChar:ms,isSpace:Ne,isString:ep,isValidEntityCode:tp,isWhiteSpace:fs,lib:WN,normalizeReference:Cu,unescapeAll:so,unescapeMd:$N},Symbol.toStringTag,{value:"Module"}));function ZN(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 GN(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=so(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=so(e.slice(r,o)),s.pos=o,s.ok=!0),s}function JN(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+=so(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+=so(e.slice(r,s)),a}const XN=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:GN,parseLinkLabel:ZN,parseLinkTitle:JN},Symbol.toStringTag,{value:"Module"})),ur={};ur.code_inline=function(e,r,n,i,o){const s=e[r];return"<code"+o.renderAttrs(s)+">"+Xr(s.content)+"</code>"},ur.code_block=function(e,r,n,i,o){const s=e[r];return"<pre"+o.renderAttrs(s)+"><code>"+Xr(e[r].content)+"</code></pre>\n"},ur.fence=function(e,r,n,i,o){const s=e[r],a=s.info?so(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)||Xr(s.content):c=Xr(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")},ur.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)},ur.hardbreak=function(e,r,n){return n.xhtmlOut?"<br />\n":"<br>\n"},ur.softbreak=function(e,r,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},ur.text=function(e,r){return Xr(e[r].content)},ur.html_block=function(e,r){return e[r].content},ur.html_inline=function(e,r){return e[r].content};function Ei(){this.rules=yu({},ur)}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+=" "+Xr(e.attrs[r][0])+'="'+Xr(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 Ct(){this.__rules__=[],this.__cache__=null}Ct.prototype.__find__=function(e){for(let r=0;r<this.__rules__.length;r++)if(this.__rules__[r].name===e)return r;return-1},Ct.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))})})},Ct.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},Ct.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},Ct.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},Ct.prototype.push=function(e,r,n){const i=n||{};this.__rules__.push({name:e,enabled:!0,fn:r,alt:i.alt||[]}),this.__cache__=null},Ct.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},Ct.prototype.enableOnly=function(e,r){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,r)},Ct.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},Ct.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Yt(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}Yt.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},Yt.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},Yt.prototype.attrSet=function(e,r){const n=this.attrIndex(e),i=[e,r];n<0?this.attrPush(i):this.attrs[n]=i},Yt.prototype.attrGet=function(e){const r=this.attrIndex(e);let n=null;return r>=0&&(n=this.attrs[r][1]),n},Yt.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 Ay(e,r,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=r}Ay.prototype.Token=Yt;const QN=/\r\n?|\n/g,YN=/\0/g;function eO(e){let r;r=e.src.replace(QN,"\n"),r=r.replace(YN,"�"),e.src=r}function tO(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 rO(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 nO(e){return/^<a[>\s]/i.test(e)}function iO(e){return/^<\/a\s*>/i.test(e)}function oO(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"&&(nO(l.content)&&s>0&&s--,iO(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 w=new e.Token("text","",0);w.content=u.slice(p,y),w.level=h,d.push(w)}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 wy=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,sO=/\((c|tm|r)\)/i,aO=/\((c|tm|r)\)/ig,lO={c:"©",r:"®",tm:"™"};function uO(e,r){return lO[r.toLowerCase()]}function cO(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(aO,uO)),i.type==="link_open"&&i.info==="auto"&&r--,i.type==="link_close"&&i.info==="auto"&&r++}}function dO(e){let r=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!r&&wy.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 hO(e){let r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)e.tokens[r].type==="inline"&&(sO.test(e.tokens[r].content)&&cO(e.tokens[r].children),wy.test(e.tokens[r].content)&&dO(e.tokens[r].children))}const pO=/['"]/,Gf=/['"]/g,Jf="’";function ia(e,r,n){return e.slice(0,r)+n+e.slice(r+1)}function fO(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;){Gf.lastIndex=u;const d=Gf.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=ia(s.content,d.index,Jf));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 w,_;f?(w=r.md.options.quotes[2],_=r.md.options.quotes[3]):(w=r.md.options.quotes[0],_=r.md.options.quotes[1]),s.content=ia(s.content,d.index,_),e[C.token].content=ia(e[C.token].content,C.pos,w),u+=_.length-1,C.token===o&&(u+=w.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=ia(s.content,d.index,Jf))}}}function mO(e){if(e.md.options.typographer)for(let r=e.tokens.length-1;r>=0;r--)e.tokens[r].type!=="inline"||!pO.test(e.tokens[r].content)||fO(e.tokens[r].children,e)}function gO(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",eO],["block",tO],["inline",rO],["linkify",oO],["replacements",hO],["smartquotes",mO],["text_join",gO]];function Md(){this.ruler=new Ct;for(let e=0;e<pc.length;e++)this.ruler.push(pc[e][0],pc[e][1])}Md.prototype.process=function(e){const r=this.ruler.getRules("");for(let n=0,i=r.length;n<i;n++)r[n](e)},Md.prototype.State=Ay;function cr(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(Ne(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}cr.prototype.push=function(e,r,n){const i=new Yt(e,r,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i},cr.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},cr.prototype.skipEmptyLines=function(e){for(let r=this.lineMax;e<r&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},cr.prototype.skipSpaces=function(e){for(let r=this.src.length;e<r;e++){const n=this.src.charCodeAt(e);if(!Ne(n))break}return e},cr.prototype.skipSpacesBack=function(e,r){if(e<=r)return e;for(;e>r;)if(!Ne(this.src.charCodeAt(--e)))return e+1;return e},cr.prototype.skipChars=function(e,r){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===r;e++);return e},cr.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},cr.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(Ne(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("")},cr.prototype.Token=Yt;const bO=65536;function fc(e,r){const n=e.bMarks[r]+e.tShift[r],i=e.eMarks[r];return e.src.slice(n,i)}function Xf(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 yO(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&&!Ne(l)||a===45&&Ne(l))return!1;for(;s<e.eMarks[o];){const C=e.src.charCodeAt(s);if(C!==124&&C!==45&&C!==58&&!Ne(C))return!1;s++}let u=fc(e,r+1),c=u.split("|");const d=[];for(let C=0;C<c.length;C++){const w=c[C].trim();if(!w){if(C===0||C===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(w))return!1;w.charCodeAt(w.length-1)===58?d.push(w.charCodeAt(0)===58?"center":"right"):w.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=Xf(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 w=e.push("th_open","th",1);d[C]&&(w.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=Xf(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),k+=h-c.length,k>bO))break;if(o===r+2){const _=e.push("tbody_open","tbody",1);_.map=v=[r+2,0]}const w=e.push("tr_open","tr",1);w.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 CO(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 vO(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 kO(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 w=e.sCount[m]+1,_,S;e.src.charCodeAt(o)===32?(o++,w++,S=!1,_=!0):e.src.charCodeAt(o)===9?(_=!0,(e.bsCount[m]+w)%4===3?(o++,w++,S=!1):S=!0):_=!1;let L=w;for(l.push(e.bMarks[m]),e.bMarks[m]=o;o<s;){const D=e.src.charCodeAt(o);if(Ne(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-w,d.push(e.tShift[m]),e.tShift[m]=o-e.bMarks[m];continue}if(f)break;let C=!1;for(let w=0,_=h.length;w<_;w++)if(h[w](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 AO(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&&!Ne(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 Qf(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(!Ne(s))return-1}return i}function Yf(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),!Ne(s))?-1:o}function wO(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 _O(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=Yf(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=Qf(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 w=C;for(;s<o;){const T=e.src.charCodeAt(s);if(T===9)w+=4-(w+e.bsCount[u])%4;else if(T===32)w++;else break;s++}const _=s;let S;_>=o?S=1:S=w-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]=w,_>=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=Yf(e,u),f<0)break;a=e.bMarks[u]+e.tShift[u]}else if(f=Qf(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&&wO(e,b),!0}function EO(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 w=e.bMarks[v]+e.tShift[v],_=e.eMarks[v];return e.src.slice(w,_+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(!Ne(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(!Ne(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(!Ne(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(!Ne(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 xO=["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"],DO="[a-zA-Z_:][a-zA-Z0-9:._-]*",SO="[^\"'=<>`\\x00-\\x20]+",BO="'[^']*'",MO='"[^"]*"',FO="(?:"+SO+"|"+BO+"|"+MO+")",NO="(?:\\s+"+DO+"(?:\\s*=\\s*"+FO+")?)",_y="<[A-Za-z][A-Za-z0-9\\-]*"+NO+"*\\s*\\/?>",Ey="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",OO="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",TO="<[?][\\s\\S]*?[?]>",LO="<![A-Za-z][^>]*>",IO="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",RO=new RegExp("^(?:"+_y+"|"+Ey+"|"+OO+"|"+TO+"|"+LO+"|"+IO+")"),zO=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("^</?("+xO.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(zO.source+"\\s*$"),/^$/,!1]];function $O(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 HO(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&&!Ne(a))return!1;if(i)return!0;s=e.skipSpacesBack(s,o);const u=e.skipCharsBack(s,35,o);u>o&&Ne(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 PO(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 VO(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 oa=[["table",yO,["paragraph","reference"]],["code",CO],["fence",vO,["paragraph","reference","blockquote","list"]],["blockquote",kO,["paragraph","reference","blockquote","list"]],["hr",AO,["paragraph","reference","blockquote","list"]],["list",_O,["paragraph","reference","blockquote"]],["reference",EO],["html_block",$O,["paragraph","reference","blockquote"]],["heading",HO,["paragraph","reference","blockquote"]],["lheading",PO],["paragraph",VO]];function Na(){this.ruler=new Ct;for(let e=0;e<oa.length;e++)this.ruler.push(oa[e][0],oa[e][1],{alt:(oa[e][2]||[]).slice()})}Na.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)}},Na.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)},Na.prototype.State=cr;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 Yt("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 Yt(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=Yt;function jO(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 qO(e,r){let n=e.pos;for(;n<e.posMax&&!jO(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(r||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const UO=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function WO(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(UO);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 KO(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&&Ne(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const rp=[];for(let e=0;e<256;e++)rp.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){rp[e.charCodeAt(0)]=1});function ZO(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),!!Ne(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&&rp[o]!==0?l.content=s:l.content=a,l.markup=a,l.info="escape"}return e.pos=n+1,!0}function GO(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 JO(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 em(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 XO(e){const r=e.tokens_meta,n=e.tokens_meta.length;em(e,e.delimiters);for(let i=0;i<n;i++)r[i]&&r[i].delimiters&&em(e,r[i].delimiters)}const xy={tokenize:JO,postProcess:XO};function QO(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 tm(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 YO(e){const r=e.tokens_meta,n=e.tokens_meta.length;tm(e,e.delimiters);for(let i=0;i<n;i++)r[i]&&r[i].delimiters&&tm(e,r[i].delimiters)}const Dy={tokenize:QO,postProcess:YO};function eT(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),!(!Ne(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),!(!Ne(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),!(!Ne(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 tT(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),!(!Ne(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),!(!Ne(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),!(!Ne(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 rT=/^([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])?)*)$/,nT=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function iT(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(nT.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(rT.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 oT(e){return/^<a[>\s]/i.test(e)}function sT(e){return/^<\/a\s*>/i.test(e)}function aT(e){const r=e|32;return r>=97&&r<=122}function lT(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&&!aT(o))return!1;const s=e.src.slice(i).match(RO);if(!s)return!1;if(!r){const a=e.push("html_inline","",0);a.content=s[0],oT(a.content)&&e.linkLevel++,sT(a.content)&&e.linkLevel--}return e.pos+=s[0].length,!0}const uT=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,cT=/^&([a-z][a-z0-9]{1,31});/i;function dT(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(uT);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=tp(s)?$l(s):$l(65533),a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(cT);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 rm(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 hT(e){const r=e.tokens_meta,n=e.tokens_meta.length;rm(e.delimiters);for(let i=0;i<n;i++)r[i]&&r[i].delimiters&&rm(r[i].delimiters)}function pT(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",qO],["linkify",WO],["newline",KO],["escape",ZO],["backticks",GO],["strikethrough",xy.tokenize],["emphasis",Dy.tokenize],["link",eT],["image",tT],["autolink",iT],["html_inline",lT],["entity",dT]],gc=[["balance_pairs",hT],["strikethrough",xy.postProcess],["emphasis",Dy.postProcess],["fragments_join",pT]];function So(){this.ruler=new Ct;for(let e=0;e<mc.length;e++)this.ruler.push(mc[e][0],mc[e][1]);this.ruler2=new Ct;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 fT(e){const r={};e=e||{},r.src_Any=fy.source,r.src_Cc=my.source,r.src_Z=by.source,r.src_P=Yh.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 Fd(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 mT(e){return vu(e)==="[object String]"}function gT(e){return vu(e)==="[object Object]"}function bT(e){return vu(e)==="[object RegExp]"}function nm(e){return vu(e)==="[object Function]"}function yT(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Sy={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function CT(e){return Object.keys(e||{}).reduce(function(r,n){return r||Sy.hasOwnProperty(n)},!1)}const vT={"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}}},kT="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]",AT="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function wT(e){e.__index__=-1,e.__text_cache__=""}function _T(e){return function(r,n){const i=r.slice(n);return e.test(i)?i.match(e)[0].length:0}}function im(){return function(e,r){r.normalize(e)}}function Oa(e){const r=e.re=fT(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(kT),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,gT(u)){bT(u.validate)?c.validate=_T(u.validate):nm(u.validate)?c.validate=u.validate:s(l,u),nm(u.normalize)?c.normalize=u.normalize:u.normalize?s(l,u):c.normalize=im();return}if(mT(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:im()};const a=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(yT).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"),wT(e)}function ET(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 ET(e,r);return e.__compiled__[n.schema].normalize(n,e),n}function Bt(e,r){if(!(this instanceof Bt))return new Bt(e,r);r||CT(e)&&(r=e,e={}),this.__opts__=Fd({},Sy,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Fd({},vT,e),this.__compiled__={},this.__tlds__=AT,this.__tlds_replaced__=!1,this.re={},Oa(this)}Bt.prototype.add=function(e,r){return this.__schemas__[e]=r,Oa(this),this},Bt.prototype.set=function(e){return this.__opts__=Fd(this.__opts__,e),this},Bt.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},Bt.prototype.pretest=function(e){return this.re.pretest.test(e)},Bt.prototype.testSchemaAt=function(e,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,n,this):0},Bt.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},Bt.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},Bt.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)},Bt.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},Bt.prototype.onCompile=function(){};const qi=2147483647,br=36,np=1,bs=26,xT=38,DT=700,By=72,My=128,Fy="-",ST=/^xn--/,BT=/[^\0-\x7F]/,MT=/[\x2E\u3002\uFF0E\uFF61]/g,FT={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},yc=br-np,yr=Math.floor,Cc=String.fromCharCode;function Kr(e){throw new RangeError(FT[e])}function NT(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(MT,".");const o=e.split("."),s=NT(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 OT=e=>String.fromCodePoint(...e),TT=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:br},om=function(e,r){return e+22+75*(e<26)-((r!=0)<<5)},Ty=function(e,r,n){let i=0;for(e=n?yr(e/DT):e>>1,e+=yr(e/r);e>yc*bs>>1;i+=br)e=yr(e/yc);return yr(i+(yc+1)*e/(e+xT))},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&&Kr("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=br;;h+=br){l>=n&&Kr("invalid-input");const p=TT(e.charCodeAt(l++));p>=br&&Kr("invalid-input"),p>yr((qi-i)/d)&&Kr("overflow"),i+=p*d;const f=h<=s?np:h>=s+bs?bs:h-s;if(p<f)break;const m=br-f;d>yr(qi/m)&&Kr("overflow"),d*=m}const c=r.length+1;s=Ty(i-u,c,u==0),yr(i/c)>qi-o&&Kr("overflow"),o+=yr(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>yr((qi-o)/c)&&Kr("overflow"),o+=(u-i)*c,i=u;for(const d of e)if(d<i&&++o>qi&&Kr("overflow"),d===i){let h=o;for(let p=br;;p+=br){const f=p<=s?np:p>=s+bs?bs:p-s;if(h<f)break;const m=h-f,b=br-f;r.push(Cc(om(f+m%b,0))),h=yr(m/b)}r.push(Cc(om(h,0))),s=Ty(o,c,l===a),o=0,++l}++o,++i}return r.join("")},LT=function(e){return Ny(e,function(r){return ST.test(r)?Ly(r.slice(4).toLowerCase()):r})},IT=function(e){return Ny(e,function(r){return BT.test(r)?"xn--"+Iy(r):r})},Ry={version:"2.3.1",ucs2:{decode:Oy,encode:OT},decode:Ly,encode:Iy,toASCII:IT,toUnicode:LT},RT={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zT={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"]}}},$T={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"]}}},HT={default:RT,zero:zT,commonmark:$T},PT=/^(vbscript|javascript|file|data):/,VT=/^data:image\/(gif|png|jpeg|webp);/;function jT(e){const r=e.trim().toLowerCase();return PT.test(r)?VT.test(r):!0}const zy=["http:","https:","mailto:"];function qT(e){const r=Qh(e,!0);if(r.hostname&&(!r.protocol||zy.indexOf(r.protocol)>=0))try{r.hostname=Ry.toASCII(r.hostname)}catch{}return ps(Xh(r))}function UT(e){const r=Qh(e,!0);if(r.hostname&&(!r.protocol||zy.indexOf(r.protocol)>=0))try{r.hostname=Ry.toUnicode(r.hostname)}catch{}return oo(Xh(r),oo.defaultChars+"%")}function Pt(e,r){if(!(this instanceof Pt))return new Pt(e,r);r||ep(e)||(r=e||{},e="default"),this.inline=new So,this.block=new Na,this.core=new Md,this.renderer=new Ei,this.linkify=new Bt,this.validateLink=jT,this.normalizeLink=qT,this.normalizeLinkText=UT,this.utils=KN,this.helpers=yu({},XN),this.options={},this.configure(e),r&&this.set(r)}Pt.prototype.set=function(e){return yu(this.options,e),this},Pt.prototype.configure=function(e){const r=this;if(ep(e)){const n=e;if(e=HT[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},Pt.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},Pt.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},Pt.prototype.use=function(e){const 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");const 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){const 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)};const WT=new Zd({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 KT(e,r){if(e.isText&&r.isText&&_e.sameSet(e.marks,r.marks))return e.withText(e.text+r.text)}class ZT{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=KT(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 sm(e){return e[e.length-1]=="\n"?e.slice(0,e.length-1):e}function kc(){}function GT(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(sm(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(sm(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 JT{constructor(r,n,i){this.schema=r,this.tokenizer=n,this.tokens=i,this.tokenHandlers=GT(r,i)}parse(r,n={}){let i=new ZT(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 am(e,r){for(;++r<e.length;)if(e[r].type!="list_item_open")return e[r].hidden;return!1}new JT(WT,Pt("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(e,r,n)=>({tight:am(r,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,r,n)=>({order:+e.attrGet("start")||1,tight:am(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 XT={open:"",close:"",mixable:!0};class ip{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 YT(this.nodes,this.marks,n);return i.renderContent(r),i.out}}const zs=new ip({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("]/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=QT(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 lm(n.child(i),-1)},close(e,r,n,i){return lm(n.child(i-1),1)},escape:!1}});function lm(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 QT(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 YT{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=XT}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 ve={};const e7="Á",t7="á",r7="Ă",n7="ă",i7="∾",o7="∿",s7="∾̳",a7="Â",l7="â",u7="´",c7="А",d7="а",h7="Æ",p7="æ",f7="",m7="𝔄",g7="𝔞",b7="À",y7="à",C7="ℵ",v7="ℵ",k7="Α",A7="α",w7="Ā",_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="Ä",AL="ä",wL="∳",_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="␣",AI="▒",wI="░",_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="├",AR="╞",wR="╟",_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="·",Az="𝔠",wz="ℭ",_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$="©",A$="©",w$="℗",_$="∳",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="Ď",AH="ď",wH="Д",_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="⊡",AP="⌆",wP="∯",_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="é",AV="⩮",wV="Ě",_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="≕",Aj="≂",wj="⪖",_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="ф",rq="♀",nq="ffi",iq="ff",oq="ffl",sq="𝔉",aq="𝔣",lq="fi",uq="◼",cq="▪",dq="fj",hq="♭",pq="fl",fq="▱",mq="ƒ",gq="𝔽",bq="𝕗",yq="∀",Cq="∀",vq="⋔",kq="⫙",Aq="ℱ",wq="⨍",_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="⋙",AU="⋙",wU="ℷ",_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="⥈",AW="↔",wW="⇔",_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="⧜",kK="℩",AK="IJ",wK="ij",_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="Ĵ",AZ="ĵ",wZ="Й",_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="↫",AG="⤹",wG="⥳",_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="↭",AJ="⥎",wJ="↤",_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="⋘",AX="⌞",wX="⇚",_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="↰",AQ="↰",wQ="≲",_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="⊟",AY="−",wY="∸",_Y="⨪",EY="∓",xY="⫛",DY="…",SY="∓",BY="⊧",MY="𝕄",FY="𝕞",NY="∓",OY="𝓂",TY="ℳ",LY="∾",IY="Μ",RY="μ",zY="⊸",$Y="⊸",HY="∇",PY="Ń",VY="ń",jY="∠⃒",qY="≉",UY="⩰̸",WY="≋̸",KY="ʼn",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="",Aee="≢",wee="⤨",_ee="≂̸",Eee="≫",xee="≪",Dee="\n",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="",Ate=" ",wte="𝕟",_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="⊂⃒",Are="⊈",wre="⊁",_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="⫆̸",Ane="⊉",wne="⊃⃒",_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="œ",Aie="⦿",wie="𝔒",_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="Ö",Aoe="ö",woe="⌽",_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="≺",Ase="≼",wse="⪷",_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="Ŕ",Aae="ŕ",wae="√",_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="ℝ",Ale="ℜ",wle="▭",_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="⇌",Aue="",wue="⎱",_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="⨓",Ace="≿",wce="С",_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="⪪",Ade="⪬",wde="⪬︀",_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="⫃",Ahe="⫁",whe="⫋",_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="⫆",Ape="⊋",wpe="⫌",_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="⌶",A0e="⫱",w0e="⊤",_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="⥾",Afe="𝔘",wfe="𝔲",_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="𝒰",Ame="𝓊",wme="⋰",_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="𝔳",A1e="⊲",w1e="⊂⃒",_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="𝓍",Age="⨆",wge="⨄",_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="",g2e="",b2e={Aacute:e7,aacute:t7,Abreve:r7,abreve:n7,ac:i7,acd:o7,acE:s7,Acirc:a7,acirc:l7,acute:u7,Acy:c7,acy:d7,AElig:h7,aelig:p7,af:f7,Afr:m7,afr:g7,Agrave:b7,agrave:y7,alefsym:C7,aleph:v7,Alpha:k7,alpha:A7,Amacr:w7,amacr:_7,amalg:E7,amp:x7,AMP:D7,andand:S7,And:B7,and:M7,andd:F7,andslope:N7,andv:O7,ang:T7,ange:L7,angle:I7,angmsdaa:R7,angmsdab:z7,angmsdac:$7,angmsdad:H7,angmsdae:P7,angmsdaf:V7,angmsdag:j7,angmsdah:q7,angmsd:U7,angrt:W7,angrtvb:K7,angrtvbd:Z7,angsph:G7,angst:J7,angzarr:X7,Aogon:Q7,aogon:Y7,Aopf:eL,aopf:tL,apacir:rL,ap:nL,apE:iL,ape:oL,apid:sL,apos:aL,ApplyFunction:lL,approx:uL,approxeq:cL,Aring:dL,aring:hL,Ascr:pL,ascr:fL,Assign:mL,ast:gL,asymp:bL,asympeq:yL,Atilde:CL,atilde:vL,Auml:kL,auml:AL,awconint:wL,awint:_L,backcong:EL,backepsilon:xL,backprime:DL,backsim:SL,backsimeq:BL,Backslash:ML,Barv:FL,barvee:NL,barwed:OL,Barwed:TL,barwedge:LL,bbrk:IL,bbrktbrk:RL,bcong:zL,Bcy:$L,bcy:HL,bdquo:PL,becaus:VL,because:jL,Because:qL,bemptyv:UL,bepsi:WL,bernou:KL,Bernoullis:ZL,Beta:GL,beta:JL,beth:XL,between:QL,Bfr:YL,bfr:eI,bigcap:tI,bigcirc:rI,bigcup:nI,bigodot:iI,bigoplus:oI,bigotimes:sI,bigsqcup:aI,bigstar:lI,bigtriangledown:uI,bigtriangleup:cI,biguplus:dI,bigvee:hI,bigwedge:pI,bkarow:fI,blacklozenge:mI,blacksquare:gI,blacktriangle:bI,blacktriangledown:yI,blacktriangleleft:CI,blacktriangleright:vI,blank:kI,blk12:AI,blk14:wI,blk34:_I,block:EI,bne:xI,bnequiv:DI,bNot:SI,bnot:BI,Bopf:MI,bopf:FI,bot:NI,bottom:OI,bowtie:TI,boxbox:LI,boxdl:II,boxdL:RI,boxDl:zI,boxDL:$I,boxdr:HI,boxdR:PI,boxDr:VI,boxDR:jI,boxh:qI,boxH:UI,boxhd:WI,boxHd:KI,boxhD:ZI,boxHD:GI,boxhu:JI,boxHu:XI,boxhU:QI,boxHU:YI,boxminus:eR,boxplus:tR,boxtimes:rR,boxul:nR,boxuL:iR,boxUl:oR,boxUL:sR,boxur:aR,boxuR:lR,boxUr:uR,boxUR:cR,boxv:dR,boxV:hR,boxvh:pR,boxvH:fR,boxVh:mR,boxVH:gR,boxvl:bR,boxvL:yR,boxVl:CR,boxVL:vR,boxvr:kR,boxvR:AR,boxVr:wR,boxVR:_R,bprime:ER,breve:xR,Breve:DR,brvbar:SR,bscr:BR,Bscr:MR,bsemi:FR,bsim:NR,bsime:OR,bsolb:TR,bsol:LR,bsolhsub:IR,bull:RR,bullet:zR,bump:$R,bumpE:HR,bumpe:PR,Bumpeq:VR,bumpeq:jR,Cacute:qR,cacute:UR,capand:WR,capbrcup:KR,capcap:ZR,cap:GR,Cap:JR,capcup:XR,capdot:QR,CapitalDifferentialD:YR,caps:ez,caret:tz,caron:rz,Cayleys:nz,ccaps:iz,Ccaron:oz,ccaron:sz,Ccedil:az,ccedil:lz,Ccirc:uz,ccirc:cz,Cconint:dz,ccups:hz,ccupssm:pz,Cdot:fz,cdot:mz,cedil:gz,Cedilla:bz,cemptyv:yz,cent:Cz,centerdot:vz,CenterDot:kz,cfr:Az,Cfr:wz,CHcy:_z,chcy:Ez,check:xz,checkmark:Dz,Chi:Sz,chi:Bz,circ:Mz,circeq:Fz,circlearrowleft:Nz,circlearrowright:Oz,circledast:Tz,circledcirc:Lz,circleddash:Iz,CircleDot:Rz,circledR:zz,circledS:$z,CircleMinus:Hz,CirclePlus:Pz,CircleTimes:Vz,cir:jz,cirE:qz,cire:Uz,cirfnint:Wz,cirmid:Kz,cirscir:Zz,ClockwiseContourIntegral:Gz,CloseCurlyDoubleQuote:Jz,CloseCurlyQuote:Xz,clubs:Qz,clubsuit:Yz,colon:e$,Colon:t$,Colone:r$,colone:n$,coloneq:i$,comma:o$,commat:s$,comp:a$,compfn:l$,complement:u$,complexes:c$,cong:d$,congdot:h$,Congruent:p$,conint:f$,Conint:m$,ContourIntegral:g$,copf:b$,Copf:y$,coprod:C$,Coproduct:v$,copy:k$,COPY:A$,copysr:w$,CounterClockwiseContourIntegral:_$,crarr:E$,cross:x$,Cross:D$,Cscr:S$,cscr:B$,csub:M$,csube:F$,csup:N$,csupe:O$,ctdot:T$,cudarrl:L$,cudarrr:I$,cuepr:R$,cuesc:z$,cularr:$$,cularrp:H$,cupbrcap:P$,cupcap:V$,CupCap:j$,cup:q$,Cup:U$,cupcup:W$,cupdot:K$,cupor:Z$,cups:G$,curarr:J$,curarrm:X$,curlyeqprec:Q$,curlyeqsucc:Y$,curlyvee:eH,curlywedge:tH,curren:rH,curvearrowleft:nH,curvearrowright:iH,cuvee:oH,cuwed:sH,cwconint:aH,cwint:lH,cylcty:uH,dagger:cH,Dagger:dH,daleth:hH,darr:pH,Darr:fH,dArr:mH,dash:gH,Dashv:bH,dashv:yH,dbkarow:CH,dblac:vH,Dcaron:kH,dcaron:AH,Dcy:wH,dcy:_H,ddagger:EH,ddarr:xH,DD:DH,dd:SH,DDotrahd:BH,ddotseq:MH,deg:FH,Del:NH,Delta:OH,delta:TH,demptyv:LH,dfisht:IH,Dfr:RH,dfr:zH,dHar:$H,dharl:HH,dharr:PH,DiacriticalAcute:VH,DiacriticalDot:jH,DiacriticalDoubleAcute:qH,DiacriticalGrave:UH,DiacriticalTilde:WH,diam:KH,diamond:ZH,Diamond:GH,diamondsuit:JH,diams:XH,die:QH,DifferentialD:YH,digamma:eP,disin:tP,div:rP,divide:nP,divideontimes:iP,divonx:oP,DJcy:sP,djcy:aP,dlcorn:lP,dlcrop:uP,dollar:cP,Dopf:dP,dopf:hP,Dot:pP,dot:fP,DotDot:mP,doteq:gP,doteqdot:bP,DotEqual:yP,dotminus:CP,dotplus:vP,dotsquare:kP,doublebarwedge:AP,DoubleContourIntegral:wP,DoubleDot:_P,DoubleDownArrow:EP,DoubleLeftArrow:xP,DoubleLeftRightArrow:DP,DoubleLeftTee:SP,DoubleLongLeftArrow:BP,DoubleLongLeftRightArrow:MP,DoubleLongRightArrow:FP,DoubleRightArrow:NP,DoubleRightTee:OP,DoubleUpArrow:TP,DoubleUpDownArrow:LP,DoubleVerticalBar:IP,DownArrowBar:RP,downarrow:zP,DownArrow:$P,Downarrow:HP,DownArrowUpArrow:PP,DownBreve:VP,downdownarrows:jP,downharpoonleft:qP,downharpoonright:UP,DownLeftRightVector:WP,DownLeftTeeVector:KP,DownLeftVectorBar:ZP,DownLeftVector:GP,DownRightTeeVector:JP,DownRightVectorBar:XP,DownRightVector:QP,DownTeeArrow:YP,DownTee:eV,drbkarow:tV,drcorn:rV,drcrop:nV,Dscr:iV,dscr:oV,DScy:sV,dscy:aV,dsol:lV,Dstrok:uV,dstrok:cV,dtdot:dV,dtri:hV,dtrif:pV,duarr:fV,duhar:mV,dwangle:gV,DZcy:bV,dzcy:yV,dzigrarr:CV,Eacute:vV,eacute:kV,easter:AV,Ecaron:wV,ecaron:_V,Ecirc:EV,ecirc:xV,ecir:DV,ecolon:SV,Ecy:BV,ecy:MV,eDDot:FV,Edot:NV,edot:OV,eDot:TV,ee:LV,efDot:IV,Efr:RV,efr:zV,eg:$V,Egrave:HV,egrave:PV,egs:VV,egsdot:jV,el:qV,Element:UV,elinters:WV,ell:KV,els:ZV,elsdot:GV,Emacr:JV,emacr:XV,empty:QV,emptyset:YV,EmptySmallSquare:ej,emptyv:tj,EmptyVerySmallSquare:rj,emsp13:nj,emsp14:ij,emsp:oj,ENG:sj,eng:aj,ensp:lj,Eogon:uj,eogon:cj,Eopf:dj,eopf:hj,epar:pj,eparsl:fj,eplus:mj,epsi:gj,Epsilon:bj,epsilon:yj,epsiv:Cj,eqcirc:vj,eqcolon:kj,eqsim:Aj,eqslantgtr:wj,eqslantless:_j,Equal:Ej,equals:xj,EqualTilde:Dj,equest:Sj,Equilibrium:Bj,equiv:Mj,equivDD:Fj,eqvparsl:Nj,erarr:Oj,erDot:Tj,escr:Lj,Escr:Ij,esdot:Rj,Esim:zj,esim:$j,Eta:Hj,eta:Pj,ETH:Vj,eth:jj,Euml:qj,euml:Uj,euro:Wj,excl:Kj,exist:Zj,Exists:Gj,expectation:Jj,exponentiale:Xj,ExponentialE:Qj,fallingdotseq:Yj,Fcy:eq,fcy:tq,female:rq,ffilig:nq,fflig:iq,ffllig:oq,Ffr:sq,ffr:aq,filig:lq,FilledSmallSquare:uq,FilledVerySmallSquare:cq,fjlig:dq,flat:hq,fllig:pq,fltns:fq,fnof:mq,Fopf:gq,fopf:bq,forall:yq,ForAll:Cq,fork:vq,forkv:kq,Fouriertrf:Aq,fpartint:wq,frac12:_q,frac13:Eq,frac14:xq,frac15:Dq,frac16:Sq,frac18:Bq,frac23:Mq,frac25:Fq,frac34:Nq,frac35:Oq,frac38:Tq,frac45:Lq,frac56:Iq,frac58:Rq,frac78:zq,frasl:$q,frown:Hq,fscr:Pq,Fscr:Vq,gacute:jq,Gamma:qq,gamma:Uq,Gammad:Wq,gammad:Kq,gap:Zq,Gbreve:Gq,gbreve:Jq,Gcedil:Xq,Gcirc:Qq,gcirc:Yq,Gcy:eU,gcy:tU,Gdot:rU,gdot:nU,ge:iU,gE:oU,gEl:sU,gel:aU,geq:lU,geqq:uU,geqslant:cU,gescc:dU,ges:hU,gesdot:pU,gesdoto:fU,gesdotol:mU,gesl:gU,gesles:bU,Gfr:yU,gfr:CU,gg:vU,Gg:kU,ggg:AU,gimel:wU,GJcy:_U,gjcy:EU,gla:xU,gl:DU,glE:SU,glj:BU,gnap:MU,gnapprox:FU,gne:NU,gnE:OU,gneq:TU,gneqq:LU,gnsim:IU,Gopf:RU,gopf:zU,grave:$U,GreaterEqual:HU,GreaterEqualLess:PU,GreaterFullEqual:VU,GreaterGreater:jU,GreaterLess:qU,GreaterSlantEqual:UU,GreaterTilde:WU,Gscr:KU,gscr:ZU,gsim:GU,gsime:JU,gsiml:XU,gtcc:QU,gtcir:YU,gt:eW,GT:tW,Gt:rW,gtdot:nW,gtlPar:iW,gtquest:oW,gtrapprox:sW,gtrarr:aW,gtrdot:lW,gtreqless:uW,gtreqqless:cW,gtrless:dW,gtrsim:hW,gvertneqq:pW,gvnE:fW,Hacek:mW,hairsp:gW,half:bW,hamilt:yW,HARDcy:CW,hardcy:vW,harrcir:kW,harr:AW,hArr:wW,harrw:_W,Hat:EW,hbar:xW,Hcirc:DW,hcirc:SW,hearts:BW,heartsuit:MW,hellip:FW,hercon:NW,hfr:OW,Hfr:TW,HilbertSpace:LW,hksearow:IW,hkswarow:RW,hoarr:zW,homtht:$W,hookleftarrow:HW,hookrightarrow:PW,hopf:VW,Hopf:jW,horbar:qW,HorizontalLine:UW,hscr:WW,Hscr:KW,hslash:ZW,Hstrok:GW,hstrok:JW,HumpDownHump:XW,HumpEqual:QW,hybull:YW,hyphen:eK,Iacute:tK,iacute:rK,ic:nK,Icirc:iK,icirc:oK,Icy:sK,icy:aK,Idot:lK,IEcy:uK,iecy:cK,iexcl:dK,iff:hK,ifr:pK,Ifr:fK,Igrave:mK,igrave:gK,ii:bK,iiiint:yK,iiint:CK,iinfin:vK,iiota:kK,IJlig:AK,ijlig:wK,Imacr:_K,imacr:EK,image:xK,ImaginaryI:DK,imagline:SK,imagpart:BK,imath:MK,Im:FK,imof:NK,imped:OK,Implies:TK,incare:LK,in:"∈",infin:IK,infintie:RK,inodot:zK,intcal:$K,int:HK,Int:PK,integers:VK,Integral:jK,intercal:qK,Intersection:UK,intlarhk:WK,intprod:KK,InvisibleComma:ZK,InvisibleTimes:GK,IOcy:JK,iocy:XK,Iogon:QK,iogon:YK,Iopf:eZ,iopf:tZ,Iota:rZ,iota:nZ,iprod:iZ,iquest:oZ,iscr:sZ,Iscr:aZ,isin:lZ,isindot:uZ,isinE:cZ,isins:dZ,isinsv:hZ,isinv:pZ,it:fZ,Itilde:mZ,itilde:gZ,Iukcy:bZ,iukcy:yZ,Iuml:CZ,iuml:vZ,Jcirc:kZ,jcirc:AZ,Jcy:wZ,jcy:_Z,Jfr:EZ,jfr:xZ,jmath:DZ,Jopf:SZ,jopf:BZ,Jscr:MZ,jscr:FZ,Jsercy:NZ,jsercy:OZ,Jukcy:TZ,jukcy:LZ,Kappa:IZ,kappa:RZ,kappav:zZ,Kcedil:$Z,kcedil:HZ,Kcy:PZ,kcy:VZ,Kfr:jZ,kfr:qZ,kgreen:UZ,KHcy:WZ,khcy:KZ,KJcy:ZZ,kjcy:GZ,Kopf:JZ,kopf:XZ,Kscr:QZ,kscr:YZ,lAarr:eG,Lacute:tG,lacute:rG,laemptyv:nG,lagran:iG,Lambda:oG,lambda:sG,lang:aG,Lang:lG,langd:uG,langle:cG,lap:dG,Laplacetrf:hG,laquo:pG,larrb:fG,larrbfs:mG,larr:gG,Larr:bG,lArr:yG,larrfs:CG,larrhk:vG,larrlp:kG,larrpl:AG,larrsim:wG,larrtl:_G,latail:EG,lAtail:xG,lat:DG,late:SG,lates:BG,lbarr:MG,lBarr:FG,lbbrk:NG,lbrace:OG,lbrack:TG,lbrke:LG,lbrksld:IG,lbrkslu:RG,Lcaron:zG,lcaron:$G,Lcedil:HG,lcedil:PG,lceil:VG,lcub:jG,Lcy:qG,lcy:UG,ldca:WG,ldquo:KG,ldquor:ZG,ldrdhar:GG,ldrushar:JG,ldsh:XG,le:QG,lE:YG,LeftAngleBracket:eJ,LeftArrowBar:tJ,leftarrow:rJ,LeftArrow:nJ,Leftarrow:iJ,LeftArrowRightArrow:oJ,leftarrowtail:sJ,LeftCeiling:aJ,LeftDoubleBracket:lJ,LeftDownTeeVector:uJ,LeftDownVectorBar:cJ,LeftDownVector:dJ,LeftFloor:hJ,leftharpoondown:pJ,leftharpoonup:fJ,leftleftarrows:mJ,leftrightarrow:gJ,LeftRightArrow:bJ,Leftrightarrow:yJ,leftrightarrows:CJ,leftrightharpoons:vJ,leftrightsquigarrow:kJ,LeftRightVector:AJ,LeftTeeArrow:wJ,LeftTee:_J,LeftTeeVector:EJ,leftthreetimes:xJ,LeftTriangleBar:DJ,LeftTriangle:SJ,LeftTriangleEqual:BJ,LeftUpDownVector:MJ,LeftUpTeeVector:FJ,LeftUpVectorBar:NJ,LeftUpVector:OJ,LeftVectorBar:TJ,LeftVector:LJ,lEg:IJ,leg:RJ,leq:zJ,leqq:$J,leqslant:HJ,lescc:PJ,les:VJ,lesdot:jJ,lesdoto:qJ,lesdotor:UJ,lesg:WJ,lesges:KJ,lessapprox:ZJ,lessdot:GJ,lesseqgtr:JJ,lesseqqgtr:XJ,LessEqualGreater:QJ,LessFullEqual:YJ,LessGreater:eX,lessgtr:tX,LessLess:rX,lesssim:nX,LessSlantEqual:iX,LessTilde:oX,lfisht:sX,lfloor:aX,Lfr:lX,lfr:uX,lg:cX,lgE:dX,lHar:hX,lhard:pX,lharu:fX,lharul:mX,lhblk:gX,LJcy:bX,ljcy:yX,llarr:CX,ll:vX,Ll:kX,llcorner:AX,Lleftarrow:wX,llhard:_X,lltri:EX,Lmidot:xX,lmidot:DX,lmoustache:SX,lmoust:BX,lnap:MX,lnapprox:FX,lne:NX,lnE:OX,lneq:TX,lneqq:LX,lnsim:IX,loang:RX,loarr:zX,lobrk:$X,longleftarrow:HX,LongLeftArrow:PX,Longleftarrow:VX,longleftrightarrow:jX,LongLeftRightArrow:qX,Longleftrightarrow:UX,longmapsto:WX,longrightarrow:KX,LongRightArrow:ZX,Longrightarrow:GX,looparrowleft:JX,looparrowright:XX,lopar:QX,Lopf:YX,lopf:eQ,loplus:tQ,lotimes:rQ,lowast:nQ,lowbar:iQ,LowerLeftArrow:oQ,LowerRightArrow:sQ,loz:aQ,lozenge:lQ,lozf:uQ,lpar:cQ,lparlt:dQ,lrarr:hQ,lrcorner:pQ,lrhar:fQ,lrhard:mQ,lrm:gQ,lrtri:bQ,lsaquo:yQ,lscr:CQ,Lscr:vQ,lsh:kQ,Lsh:AQ,lsim:wQ,lsime:_Q,lsimg:EQ,lsqb:xQ,lsquo:DQ,lsquor:SQ,Lstrok:BQ,lstrok:MQ,ltcc:FQ,ltcir:NQ,lt:OQ,LT:TQ,Lt:LQ,ltdot:IQ,lthree:RQ,ltimes:zQ,ltlarr:$Q,ltquest:HQ,ltri:PQ,ltrie:VQ,ltrif:jQ,ltrPar:qQ,lurdshar:UQ,luruhar:WQ,lvertneqq:KQ,lvnE:ZQ,macr:GQ,male:JQ,malt:XQ,maltese:QQ,Map:"⤅",map:YQ,mapsto:eY,mapstodown:tY,mapstoleft:rY,mapstoup:nY,marker:iY,mcomma:oY,Mcy:sY,mcy:aY,mdash:lY,mDDot:uY,measuredangle:cY,MediumSpace:dY,Mellintrf:hY,Mfr:pY,mfr:fY,mho:mY,micro:gY,midast:bY,midcir:yY,mid:CY,middot:vY,minusb:kY,minus:AY,minusd:wY,minusdu:_Y,MinusPlus:EY,mlcp:xY,mldr:DY,mnplus:SY,models:BY,Mopf:MY,mopf:FY,mp:NY,mscr:OY,Mscr:TY,mstpos:LY,Mu:IY,mu:RY,multimap:zY,mumap:$Y,nabla:HY,Nacute:PY,nacute:VY,nang:jY,nap:qY,napE:UY,napid:WY,napos:KY,napprox:ZY,natural:GY,naturals:JY,natur:XY,nbsp:QY,nbump:YY,nbumpe:eee,ncap:tee,Ncaron:ree,ncaron:nee,Ncedil:iee,ncedil:oee,ncong:see,ncongdot:aee,ncup:lee,Ncy:uee,ncy:cee,ndash:dee,nearhk:hee,nearr:pee,neArr:fee,nearrow:mee,ne:gee,nedot:bee,NegativeMediumSpace:yee,NegativeThickSpace:Cee,NegativeThinSpace:vee,NegativeVeryThinSpace:kee,nequiv:Aee,nesear:wee,nesim:_ee,NestedGreaterGreater:Eee,NestedLessLess:xee,NewLine:Dee,nexist:See,nexists:Bee,Nfr:Mee,nfr:Fee,ngE:Nee,nge:Oee,ngeq:Tee,ngeqq:Lee,ngeqslant:Iee,nges:Ree,nGg:zee,ngsim:$ee,nGt:Hee,ngt:Pee,ngtr:Vee,nGtv:jee,nharr:qee,nhArr:Uee,nhpar:Wee,ni:Kee,nis:Zee,nisd:Gee,niv:Jee,NJcy:Xee,njcy:Qee,nlarr:Yee,nlArr:ete,nldr:tte,nlE:rte,nle:nte,nleftarrow:ite,nLeftarrow:ote,nleftrightarrow:ste,nLeftrightarrow:ate,nleq:lte,nleqq:ute,nleqslant:cte,nles:dte,nless:hte,nLl:pte,nlsim:fte,nLt:mte,nlt:gte,nltri:bte,nltrie:yte,nLtv:Cte,nmid:vte,NoBreak:kte,NonBreakingSpace:Ate,nopf:wte,Nopf:_te,Not:Ete,not:xte,NotCongruent:Dte,NotCupCap:Ste,NotDoubleVerticalBar:Bte,NotElement:Mte,NotEqual:Fte,NotEqualTilde:Nte,NotExists:Ote,NotGreater:Tte,NotGreaterEqual:Lte,NotGreaterFullEqual:Ite,NotGreaterGreater:Rte,NotGreaterLess:zte,NotGreaterSlantEqual:$te,NotGreaterTilde:Hte,NotHumpDownHump:Pte,NotHumpEqual:Vte,notin:jte,notindot:qte,notinE:Ute,notinva:Wte,notinvb:Kte,notinvc:Zte,NotLeftTriangleBar:Gte,NotLeftTriangle:Jte,NotLeftTriangleEqual:Xte,NotLess:Qte,NotLessEqual:Yte,NotLessGreater:ere,NotLessLess:tre,NotLessSlantEqual:rre,NotLessTilde:nre,NotNestedGreaterGreater:ire,NotNestedLessLess:ore,notni:sre,notniva:are,notnivb:lre,notnivc:ure,NotPrecedes:cre,NotPrecedesEqual:dre,NotPrecedesSlantEqual:hre,NotReverseElement:pre,NotRightTriangleBar:fre,NotRightTriangle:mre,NotRightTriangleEqual:gre,NotSquareSubset:bre,NotSquareSubsetEqual:yre,NotSquareSuperset:Cre,NotSquareSupersetEqual:vre,NotSubset:kre,NotSubsetEqual:Are,NotSucceeds:wre,NotSucceedsEqual:_re,NotSucceedsSlantEqual:Ere,NotSucceedsTilde:xre,NotSuperset:Dre,NotSupersetEqual:Sre,NotTilde:Bre,NotTildeEqual:Mre,NotTildeFullEqual:Fre,NotTildeTilde:Nre,NotVerticalBar:Ore,nparallel:Tre,npar:Lre,nparsl:Ire,npart:Rre,npolint:zre,npr:$re,nprcue:Hre,nprec:Pre,npreceq:Vre,npre:jre,nrarrc:qre,nrarr:Ure,nrArr:Wre,nrarrw:Kre,nrightarrow:Zre,nRightarrow:Gre,nrtri:Jre,nrtrie:Xre,nsc:Qre,nsccue:Yre,nsce:ene,Nscr:tne,nscr:rne,nshortmid:nne,nshortparallel:ine,nsim:one,nsime:sne,nsimeq:ane,nsmid:lne,nspar:une,nsqsube:cne,nsqsupe:dne,nsub:hne,nsubE:pne,nsube:fne,nsubset:mne,nsubseteq:gne,nsubseteqq:bne,nsucc:yne,nsucceq:Cne,nsup:vne,nsupE:kne,nsupe:Ane,nsupset:wne,nsupseteq:_ne,nsupseteqq:Ene,ntgl:xne,Ntilde:Dne,ntilde:Sne,ntlg:Bne,ntriangleleft:Mne,ntrianglelefteq:Fne,ntriangleright:Nne,ntrianglerighteq:One,Nu:Tne,nu:Lne,num:Ine,numero:Rne,numsp:zne,nvap:$ne,nvdash:Hne,nvDash:Pne,nVdash:Vne,nVDash:jne,nvge:qne,nvgt:Une,nvHarr:Wne,nvinfin:Kne,nvlArr:Zne,nvle:Gne,nvlt:Jne,nvltrie:Xne,nvrArr:Qne,nvrtrie:Yne,nvsim:eie,nwarhk:tie,nwarr:rie,nwArr:nie,nwarrow:iie,nwnear:oie,Oacute:sie,oacute:aie,oast:lie,Ocirc:uie,ocirc:cie,ocir:die,Ocy:hie,ocy:pie,odash:fie,Odblac:mie,odblac:gie,odiv:bie,odot:yie,odsold:Cie,OElig:vie,oelig:kie,ofcir:Aie,Ofr:wie,ofr:_ie,ogon:Eie,Ograve:xie,ograve:Die,ogt:Sie,ohbar:Bie,ohm:Mie,oint:Fie,olarr:Nie,olcir:Oie,olcross:Tie,oline:Lie,olt:Iie,Omacr:Rie,omacr:zie,Omega:$ie,omega:Hie,Omicron:Pie,omicron:Vie,omid:jie,ominus:qie,Oopf:Uie,oopf:Wie,opar:Kie,OpenCurlyDoubleQuote:Zie,OpenCurlyQuote:Gie,operp:Jie,oplus:Xie,orarr:Qie,Or:Yie,or:eoe,ord:toe,order:roe,orderof:noe,ordf:ioe,ordm:ooe,origof:soe,oror:aoe,orslope:loe,orv:uoe,oS:coe,Oscr:doe,oscr:hoe,Oslash:poe,oslash:foe,osol:moe,Otilde:goe,otilde:boe,otimesas:yoe,Otimes:Coe,otimes:voe,Ouml:koe,ouml:Aoe,ovbar:woe,OverBar:_oe,OverBrace:Eoe,OverBracket:xoe,OverParenthesis:Doe,para:Soe,parallel:Boe,par:Moe,parsim:Foe,parsl:Noe,part:Ooe,PartialD:Toe,Pcy:Loe,pcy:Ioe,percnt:Roe,period:zoe,permil:$oe,perp:Hoe,pertenk:Poe,Pfr:Voe,pfr:joe,Phi:qoe,phi:Uoe,phiv:Woe,phmmat:Koe,phone:Zoe,Pi:Goe,pi:Joe,pitchfork:Xoe,piv:Qoe,planck:Yoe,planckh:ese,plankv:tse,plusacir:rse,plusb:nse,pluscir:ise,plus:ose,plusdo:sse,plusdu:ase,pluse:lse,PlusMinus:use,plusmn:cse,plussim:dse,plustwo:hse,pm:pse,Poincareplane:fse,pointint:mse,popf:gse,Popf:bse,pound:yse,prap:Cse,Pr:vse,pr:kse,prcue:Ase,precapprox:wse,prec:_se,preccurlyeq:Ese,Precedes:xse,PrecedesEqual:Dse,PrecedesSlantEqual:Sse,PrecedesTilde:Bse,preceq:Mse,precnapprox:Fse,precneqq:Nse,precnsim:Ose,pre:Tse,prE:Lse,precsim:Ise,prime:Rse,Prime:zse,primes:$se,prnap:Hse,prnE:Pse,prnsim:Vse,prod:jse,Product:qse,profalar:Use,profline:Wse,profsurf:Kse,prop:Zse,Proportional:Gse,Proportion:Jse,propto:Xse,prsim:Qse,prurel:Yse,Pscr:eae,pscr:tae,Psi:rae,psi:nae,puncsp:iae,Qfr:oae,qfr:sae,qint:aae,qopf:lae,Qopf:uae,qprime:cae,Qscr:dae,qscr:hae,quaternions:pae,quatint:fae,quest:mae,questeq:gae,quot:bae,QUOT:yae,rAarr:Cae,race:vae,Racute:kae,racute:Aae,radic:wae,raemptyv:_ae,rang:Eae,Rang:xae,rangd:Dae,range:Sae,rangle:Bae,raquo:Mae,rarrap:Fae,rarrb:Nae,rarrbfs:Oae,rarrc:Tae,rarr:Lae,Rarr:Iae,rArr:Rae,rarrfs:zae,rarrhk:$ae,rarrlp:Hae,rarrpl:Pae,rarrsim:Vae,Rarrtl:jae,rarrtl:qae,rarrw:Uae,ratail:Wae,rAtail:Kae,ratio:Zae,rationals:Gae,rbarr:Jae,rBarr:Xae,RBarr:Qae,rbbrk:Yae,rbrace:ele,rbrack:tle,rbrke:rle,rbrksld:nle,rbrkslu:ile,Rcaron:ole,rcaron:sle,Rcedil:ale,rcedil:lle,rceil:ule,rcub:cle,Rcy:dle,rcy:hle,rdca:ple,rdldhar:fle,rdquo:mle,rdquor:gle,rdsh:ble,real:yle,realine:Cle,realpart:vle,reals:kle,Re:Ale,rect:wle,reg:_le,REG:Ele,ReverseElement:xle,ReverseEquilibrium:Dle,ReverseUpEquilibrium:Sle,rfisht:Ble,rfloor:Mle,rfr:Fle,Rfr:Nle,rHar:Ole,rhard:Tle,rharu:Lle,rharul:Ile,Rho:Rle,rho:zle,rhov:$le,RightAngleBracket:Hle,RightArrowBar:Ple,rightarrow:Vle,RightArrow:jle,Rightarrow:qle,RightArrowLeftArrow:Ule,rightarrowtail:Wle,RightCeiling:Kle,RightDoubleBracket:Zle,RightDownTeeVector:Gle,RightDownVectorBar:Jle,RightDownVector:Xle,RightFloor:Qle,rightharpoondown:Yle,rightharpoonup:eue,rightleftarrows:tue,rightleftharpoons:rue,rightrightarrows:nue,rightsquigarrow:iue,RightTeeArrow:oue,RightTee:sue,RightTeeVector:aue,rightthreetimes:lue,RightTriangleBar:uue,RightTriangle:cue,RightTriangleEqual:due,RightUpDownVector:hue,RightUpTeeVector:pue,RightUpVectorBar:fue,RightUpVector:mue,RightVectorBar:gue,RightVector:bue,ring:yue,risingdotseq:Cue,rlarr:vue,rlhar:kue,rlm:Aue,rmoustache:wue,rmoust:_ue,rnmid:Eue,roang:xue,roarr:Due,robrk:Sue,ropar:Bue,ropf:Mue,Ropf:Fue,roplus:Nue,rotimes:Oue,RoundImplies:Tue,rpar:Lue,rpargt:Iue,rppolint:Rue,rrarr:zue,Rrightarrow:$ue,rsaquo:Hue,rscr:Pue,Rscr:Vue,rsh:jue,Rsh:que,rsqb:Uue,rsquo:Wue,rsquor:Kue,rthree:Zue,rtimes:Gue,rtri:Jue,rtrie:Xue,rtrif:Que,rtriltri:Yue,RuleDelayed:ece,ruluhar:tce,rx:rce,Sacute:nce,sacute:ice,sbquo:oce,scap:sce,Scaron:ace,scaron:lce,Sc:uce,sc:cce,sccue:dce,sce:hce,scE:pce,Scedil:fce,scedil:mce,Scirc:gce,scirc:bce,scnap:yce,scnE:Cce,scnsim:vce,scpolint:kce,scsim:Ace,Scy:wce,scy:_ce,sdotb:Ece,sdot:xce,sdote:Dce,searhk:Sce,searr:Bce,seArr:Mce,searrow:Fce,sect:Nce,semi:Oce,seswar:Tce,setminus:Lce,setmn:Ice,sext:Rce,Sfr:zce,sfr:$ce,sfrown:Hce,sharp:Pce,SHCHcy:Vce,shchcy:jce,SHcy:qce,shcy:Uce,ShortDownArrow:Wce,ShortLeftArrow:Kce,shortmid:Zce,shortparallel:Gce,ShortRightArrow:Jce,ShortUpArrow:Xce,shy:Qce,Sigma:Yce,sigma:ede,sigmaf:tde,sigmav:rde,sim:nde,simdot:ide,sime:ode,simeq:sde,simg:ade,simgE:lde,siml:ude,simlE:cde,simne:dde,simplus:hde,simrarr:pde,slarr:fde,SmallCircle:mde,smallsetminus:gde,smashp:bde,smeparsl:yde,smid:Cde,smile:vde,smt:kde,smte:Ade,smtes:wde,SOFTcy:_de,softcy:Ede,solbar:xde,solb:Dde,sol:Sde,Sopf:Bde,sopf:Mde,spades:Fde,spadesuit:Nde,spar:Ode,sqcap:Tde,sqcaps:Lde,sqcup:Ide,sqcups:Rde,Sqrt:zde,sqsub:$de,sqsube:Hde,sqsubset:Pde,sqsubseteq:Vde,sqsup:jde,sqsupe:qde,sqsupset:Ude,sqsupseteq:Wde,square:Kde,Square:Zde,SquareIntersection:Gde,SquareSubset:Jde,SquareSubsetEqual:Xde,SquareSuperset:Qde,SquareSupersetEqual:Yde,SquareUnion:ehe,squarf:the,squ:rhe,squf:nhe,srarr:ihe,Sscr:ohe,sscr:she,ssetmn:ahe,ssmile:lhe,sstarf:uhe,Star:che,star:dhe,starf:hhe,straightepsilon:phe,straightphi:fhe,strns:mhe,sub:ghe,Sub:bhe,subdot:yhe,subE:Che,sube:vhe,subedot:khe,submult:Ahe,subnE:whe,subne:_he,subplus:Ehe,subrarr:xhe,subset:Dhe,Subset:She,subseteq:Bhe,subseteqq:Mhe,SubsetEqual:Fhe,subsetneq:Nhe,subsetneqq:Ohe,subsim:The,subsub:Lhe,subsup:Ihe,succapprox:Rhe,succ:zhe,succcurlyeq:$he,Succeeds:Hhe,SucceedsEqual:Phe,SucceedsSlantEqual:Vhe,SucceedsTilde:jhe,succeq:qhe,succnapprox:Uhe,succneqq:Whe,succnsim:Khe,succsim:Zhe,SuchThat:Ghe,sum:Jhe,Sum:Xhe,sung:Qhe,sup1:Yhe,sup2:epe,sup3:tpe,sup:rpe,Sup:npe,supdot:ipe,supdsub:ope,supE:spe,supe:ape,supedot:lpe,Superset:upe,SupersetEqual:cpe,suphsol:dpe,suphsub:hpe,suplarr:ppe,supmult:fpe,supnE:mpe,supne:gpe,supplus:bpe,supset:ype,Supset:Cpe,supseteq:vpe,supseteqq:kpe,supsetneq:Ape,supsetneqq:wpe,supsim:_pe,supsub:Epe,supsup:xpe,swarhk:Dpe,swarr:Spe,swArr:Bpe,swarrow:Mpe,swnwar:Fpe,szlig:Npe,Tab:Ope,target:Tpe,Tau:Lpe,tau:Ipe,tbrk:Rpe,Tcaron:zpe,tcaron:$pe,Tcedil:Hpe,tcedil:Ppe,Tcy:Vpe,tcy:jpe,tdot:qpe,telrec:Upe,Tfr:Wpe,tfr:Kpe,there4:Zpe,therefore:Gpe,Therefore:Jpe,Theta:Xpe,theta:Qpe,thetasym:Ype,thetav:e0e,thickapprox:t0e,thicksim:r0e,ThickSpace:n0e,ThinSpace:i0e,thinsp:o0e,thkap:s0e,thksim:a0e,THORN:l0e,thorn:u0e,tilde:c0e,Tilde:d0e,TildeEqual:h0e,TildeFullEqual:p0e,TildeTilde:f0e,timesbar:m0e,timesb:g0e,times:b0e,timesd:y0e,tint:C0e,toea:v0e,topbot:k0e,topcir:A0e,top:w0e,Topf:_0e,topf:E0e,topfork:x0e,tosa:D0e,tprime:S0e,trade:B0e,TRADE:M0e,triangle:F0e,triangledown:N0e,triangleleft:O0e,trianglelefteq:T0e,triangleq:L0e,triangleright:I0e,trianglerighteq:R0e,tridot:z0e,trie:$0e,triminus:H0e,TripleDot:P0e,triplus:V0e,trisb:j0e,tritime:q0e,trpezium:U0e,Tscr:W0e,tscr:K0e,TScy:Z0e,tscy:G0e,TSHcy:J0e,tshcy:X0e,Tstrok:Q0e,tstrok:Y0e,twixt:efe,twoheadleftarrow:tfe,twoheadrightarrow:rfe,Uacute:nfe,uacute:ife,uarr:ofe,Uarr:sfe,uArr:afe,Uarrocir:lfe,Ubrcy:ufe,ubrcy:cfe,Ubreve:dfe,ubreve:hfe,Ucirc:pfe,ucirc:ffe,Ucy:mfe,ucy:gfe,udarr:bfe,Udblac:yfe,udblac:Cfe,udhar:vfe,ufisht:kfe,Ufr:Afe,ufr:wfe,Ugrave:_fe,ugrave:Efe,uHar:xfe,uharl:Dfe,uharr:Sfe,uhblk:Bfe,ulcorn:Mfe,ulcorner:Ffe,ulcrop:Nfe,ultri:Ofe,Umacr:Tfe,umacr:Lfe,uml:Ife,UnderBar:Rfe,UnderBrace:zfe,UnderBracket:$fe,UnderParenthesis:Hfe,Union:Pfe,UnionPlus:Vfe,Uogon:jfe,uogon:qfe,Uopf:Ufe,uopf:Wfe,UpArrowBar:Kfe,uparrow:Zfe,UpArrow:Gfe,Uparrow:Jfe,UpArrowDownArrow:Xfe,updownarrow:Qfe,UpDownArrow:Yfe,Updownarrow:eme,UpEquilibrium:tme,upharpoonleft:rme,upharpoonright:nme,uplus:ime,UpperLeftArrow:ome,UpperRightArrow:sme,upsi:ame,Upsi:lme,upsih:ume,Upsilon:cme,upsilon:dme,UpTeeArrow:hme,UpTee:pme,upuparrows:fme,urcorn:mme,urcorner:gme,urcrop:bme,Uring:yme,uring:Cme,urtri:vme,Uscr:kme,uscr:Ame,utdot:wme,Utilde:_me,utilde:Eme,utri:xme,utrif:Dme,uuarr:Sme,Uuml:Bme,uuml:Mme,uwangle:Fme,vangrt:Nme,varepsilon:Ome,varkappa:Tme,varnothing:Lme,varphi:Ime,varpi:Rme,varpropto:zme,varr:$me,vArr:Hme,varrho:Pme,varsigma:Vme,varsubsetneq:jme,varsubsetneqq:qme,varsupsetneq:Ume,varsupsetneqq:Wme,vartheta:Kme,vartriangleleft:Zme,vartriangleright:Gme,vBar:Jme,Vbar:Xme,vBarv:Qme,Vcy:Yme,vcy:e1e,vdash:t1e,vDash:r1e,Vdash:n1e,VDash:i1e,Vdashl:o1e,veebar:s1e,vee:a1e,Vee:l1e,veeeq:u1e,vellip:c1e,verbar:d1e,Verbar:h1e,vert:p1e,Vert:f1e,VerticalBar:m1e,VerticalLine:g1e,VerticalSeparator:b1e,VerticalTilde:y1e,VeryThinSpace:C1e,Vfr:v1e,vfr:k1e,vltri:A1e,vnsub:w1e,vnsup:_1e,Vopf:E1e,vopf:x1e,vprop:D1e,vrtri:S1e,Vscr:B1e,vscr:M1e,vsubnE:F1e,vsubne:N1e,vsupnE:O1e,vsupne:T1e,Vvdash:L1e,vzigzag:I1e,Wcirc:R1e,wcirc:z1e,wedbar:$1e,wedge:H1e,Wedge:P1e,wedgeq:V1e,weierp:j1e,Wfr:q1e,wfr:U1e,Wopf:W1e,wopf:K1e,wp:Z1e,wr:G1e,wreath:J1e,Wscr:X1e,wscr:Q1e,xcap:Y1e,xcirc:ege,xcup:tge,xdtri:rge,Xfr:nge,xfr:ige,xharr:oge,xhArr:sge,Xi:age,xi:lge,xlarr:uge,xlArr:cge,xmap:dge,xnis:hge,xodot:pge,Xopf:fge,xopf:mge,xoplus:gge,xotime:bge,xrarr:yge,xrArr:Cge,Xscr:vge,xscr:kge,xsqcup:Age,xuplus:wge,xutri:_ge,xvee:Ege,xwedge:xge,Yacute:Dge,yacute:Sge,YAcy:Bge,yacy:Mge,Ycirc:Fge,ycirc:Nge,Ycy:Oge,ycy:Tge,yen:Lge,Yfr:Ige,yfr:Rge,YIcy:zge,yicy:$ge,Yopf:Hge,yopf:Pge,Yscr:Vge,yscr:jge,YUcy:qge,yucy:Uge,yuml:Wge,Yuml:Kge,Zacute:Zge,zacute:Gge,Zcaron:Jge,zcaron:Xge,Zcy:Qge,zcy:Yge,Zdot:e2e,zdot:t2e,zeetrf:r2e,ZeroWidthSpace:n2e,Zeta:i2e,zeta:o2e,zfr:s2e,Zfr:a2e,ZHcy:l2e,zhcy:u2e,zigrarr:c2e,zopf:d2e,Zopf:h2e,Zscr:p2e,zscr:f2e,zwj:m2e,zwnj:g2e};var $y=b2e,op=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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={},um={};function y2e(e){var r,n,i=um[e];if(i)return i;for(i=um[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 Hl(e,r,n){var i,o,s,a,l,u="";for(typeof r!="string"&&(n=r,r=Hl.defaultChars),typeof n>"u"&&(n=!0),l=y2e(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}Hl.defaultChars=";/?:@&=+$,-_.!~*'()#",Hl.componentChars="-_.!~*'()";var C2e=Hl,cm={};function v2e(e){var r,n,i=cm[e];if(i)return i;for(i=cm[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 Pl(e,r){var n;return typeof r!="string"&&(r=Pl.defaultChars),n=v2e(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})}Pl.defaultChars=";/?:@&=+$,#",Pl.componentChars="";var k2e=Pl,A2e=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 Vl(){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 w2e=/^([a-z0-9.+-]+:)/i,_2e=/:[0-9]*$/,E2e=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,x2e=["<",">",'"',"`"," ","\r","\n"," "],D2e=["{","}","|","\\","^","`"].concat(x2e),S2e=["'"].concat(D2e),dm=["%","/","?",";","#"].concat(S2e),hm=["/","?","#"],B2e=255,pm=/^[+a-z0-9A-Z_-]{0,63}$/,M2e=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,fm={javascript:!0,"javascript:":!0},mm={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function F2e(e,r){if(e&&e instanceof Vl)return e;var n=new Vl;return n.parse(e,r),n}Vl.prototype.parse=function(e,r){var n,i,o,s,a,l=e;if(l=l.trim(),!r&&e.split("#").length===1){var u=E2e.exec(l);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}var c=w2e.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&&fm[c])&&(l=l.substr(2),this.slashes=!0)),!fm[c]&&(a||c&&!mm[c])){var d=-1;for(n=0;n<hm.length;n++)s=l.indexOf(hm[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<dm.length;n++)s=l.indexOf(dm[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(pm)){for(var y="",v=0,k=g.length;v<k;v++)g.charCodeAt(v)>127?y+="x":y+=g[v];if(!y.match(pm)){var C=b.slice(0,n),w=b.slice(n+1),_=g.match(M2e);_&&(C.push(_[1]),w.unshift(_[2])),w.length&&(l=w.join(".")+l),this.hostname=C.join(".");break}}}}this.hostname.length>B2e&&(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),mm[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Vl.prototype.parseHost=function(e){var r=_2e.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 N2e=F2e;Ni.encode=C2e,Ni.decode=k2e,Ni.format=A2e,Ni.parse=N2e;var bi={},gm,bm;function Hy(){return bm||(bm=1,gm=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),gm}var ym,Cm;function Py(){return Cm||(Cm=1,ym=/[\0-\x1F\x7F-\x9F]/),ym}var vm,km;function O2e(){return km||(km=1,vm=/[\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]/),vm}var Am,wm;function Vy(){return wm||(wm=1,Am=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),Am}var _m;function T2e(){return _m||(_m=1,bi.Any=Hy(),bi.Cc=Py(),bi.Cf=O2e(),bi.P=op,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(A){F[A]=Y[A]})}}),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,A){return Y||m(T,A)})}var y=/[&<>"]/,v=/[&<>"]/g,k={"&":"&","<":"<",">":">",'"':"""};function C(F){return k[F]}function w(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=op;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=T2e(),e.assign=s,e.isString=n,e.has=o,e.unescapeMd=b,e.unescapeAll=g,e.isValidEntityCode=l,e.fromCodePoint=u,e.escapeHtml=w,e.arrayReplaceAt=a,e.isSpace=L,e.isWhiteSpace=D,e.isMdAsciiPunct=J,e.isPunctChar=U,e.escapeRE=S,e.normalizeReference=Z})(ve);var Ta={},L2e=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},Em=ve.unescapeAll,I2e=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=Em(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=Em(e.slice(r,s)),a.pos=s,a.ok=!0),a},R2e=ve.unescapeAll,z2e=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=R2e(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};Ta.parseLinkLabel=L2e,Ta.parseLinkDestination=I2e,Ta.parseLinkTitle=z2e;var $2e=ve.assign,H2e=ve.unescapeAll,Fn=ve.escapeHtml,dr={};dr.code_inline=function(e,r,n,i,o){var s=e[r];return"<code"+o.renderAttrs(s)+">"+Fn(s.content)+"</code>"},dr.code_block=function(e,r,n,i,o){var s=e[r];return"<pre"+o.renderAttrs(s)+"><code>"+Fn(e[r].content)+"</code></pre>\n"},dr.fence=function(e,r,n,i,o){var s=e[r],a=s.info?H2e(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)||Fn(s.content):c=Fn(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"},dr.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)},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 Fn(e[r].content)},dr.html_block=function(e,r){return e[r].content},dr.html_inline=function(e,r){return e[r].content};function xi(){this.rules=$2e({},dr)}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+=" "+Fn(e.attrs[r][0])+'="'+Fn(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 P2e=xi;function Xt(){this.__rules__=[],this.__cache__=null}Xt.prototype.__find__=function(e){for(var r=0;r<this.__rules__.length;r++)if(this.__rules__[r].name===e)return r;return-1},Xt.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))})})},Xt.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},Xt.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},Xt.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},Xt.prototype.push=function(e,r,n){var i=n||{};this.__rules__.push({name:e,enabled:!0,fn:r,alt:i.alt||[]}),this.__cache__=null},Xt.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},Xt.prototype.enableOnly=function(e,r){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,r)},Xt.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},Xt.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};var sp=Xt,V2e=/\r\n?|\n/g,j2e=/\0/g,q2e=function(e){var r;r=e.src.replace(V2e,"\n"),r=r.replace(j2e,"�"),e.src=r},U2e=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)},W2e=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)},K2e=ve.arrayReplaceAt;function Z2e(e){return/^<a[>\s]/i.test(e)}function G2e(e){return/^<\/a\s*>/i.test(e)}var J2e=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"&&(Z2e(a.content)&&f>0&&f--,G2e(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=K2e(o,r,l)}}}},jy=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,X2e=/\((c|tm|r)\)/i,Q2e=/\((c|tm|r)\)/ig,Y2e={c:"©",r:"®",tm:"™"};function ebe(e,r){return Y2e[r.toLowerCase()]}function tbe(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(Q2e,ebe)),n.type==="link_open"&&n.info==="auto"&&i--,n.type==="link_close"&&n.info==="auto"&&i++}function rbe(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 nbe=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)e.tokens[r].type==="inline"&&(X2e.test(e.tokens[r].content)&&tbe(e.tokens[r].children),jy.test(e.tokens[r].content)&&rbe(e.tokens[r].children))},xm=ve.isWhiteSpace,Dm=ve.isPunctChar,Sm=ve.isMdAsciiPunct,ibe=/['"]/,Bm=/['"]/g,Mm="’";function sa(e,r,n){return e.slice(0,r)+n+e.slice(r+1)}function obe(e,r){var n,i,o,s,a,l,u,c,d,h,p,f,m,b,g,y,v,k,C,w,_;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&&(Bm.lastIndex=a,s=Bm.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=Sm(d)||Dm(String.fromCharCode(d)),f=Sm(h)||Dm(String.fromCharCode(h)),m=xm(d),b=xm(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=sa(i.content,s.index,Mm));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?(w=r.md.options.quotes[2],_=r.md.options.quotes[3]):(w=r.md.options.quotes[0],_=r.md.options.quotes[1]),i.content=sa(i.content,s.index,_),e[c.token].content=sa(e[c.token].content,c.pos,w),a+=_.length-1,c.token===n&&(a+=w.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=sa(i.content,s.index,Mm))}}}}var sbe=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)e.tokens[r].type!=="inline"||!ibe.test(e.tokens[r].content)||obe(e.tokens[r].children,e)},abe=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 Ac=Er(ku);var lbe=ku;function qy(e,r,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=r}qy.prototype.Token=lbe;var ube=qy,cbe=sp,wc=[["normalize",q2e],["block",U2e],["inline",W2e],["linkify",J2e],["replacements",nbe],["smartquotes",sbe],["text_join",abe]];function Nd(){this.ruler=new cbe;for(var e=0;e<wc.length;e++)this.ruler.push(wc[e][0],wc[e][1])}Nd.prototype.process=function(e){var r,n,i;for(i=this.ruler.getRules(""),r=0,n=i.length;r<n;r++)i[r](e)},Nd.prototype.State=ube;var dbe=Nd,_c=ve.isSpace;function Ec(e,r){var n=e.bMarks[r]+e.tShift[r],i=e.eMarks[r];return e.src.slice(n,i)}function Fm(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 hbe=function(e,r,n,i){var o,s,a,l,u,c,d,h,p,f,m,b,g,y,v,k,C,w;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]||(w=e.src.charCodeAt(a++),w!==124&&w!==45&&w!==58&&!_c(w))||C===45&&_c(w))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=Fm(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=Fm(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},pbe=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},fbe=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},mbe=ve.isSpace,gbe=function(e,r,n,i){var o,s,a,l,u,c,d,h,p,f,m,b,g,y,v,k,C,w,_,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=[],w=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),mbe(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=w.length;a<u;a++)if(w[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},bbe=ve.isSpace,ybe=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&&!bbe(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=ve.isSpace;function Nm(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 Om(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 Cbe(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 vbe=function(e,r,n,i){var o,s,a,l,u,c,d,h,p,f,m,b,g,y,v,k,C,w,_,S,L,D,P,U,J,Z,F,T=r,Y=!1,A=!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=Om(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=Nm(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],w=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)&&(A=!1),P=e.line-T>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=k,e.tShift[T]=_,e.sCount[T]=w,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=Om(e,T),D<0)break;U=e.bMarks[T]+e.tShift[T]}else if(D=Nm(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,A&&Cbe(e,m),!0},kbe=ve.normalizeReference,aa=ve.isSpace,Abe=function(e,r,n,i){var o,s,a,l,u,c,d,h,p,f,m,b,g,y,v,k,C=0,w=e.bMarks[r]+e.tShift[r],_=e.eMarks[r],S=r+1;if(e.sCount[r]-e.blkIndent>=4||e.src.charCodeAt(w)!==91)return!1;for(;++w<_;)if(e.src.charCodeAt(w)===93&&e.src.charCodeAt(w-1)!==92){if(w+1===_||e.src.charCodeAt(w+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,w=1;w<_;w++){if(o=g.charCodeAt(w),o===91)return!1;if(o===93){p=w;break}else o===10?C++:o===92&&(w++,w<_&&g.charCodeAt(w)===10&&C++)}if(p<0||g.charCodeAt(p+1)!==58)return!1;for(w=p+2;w<_;w++)if(o=g.charCodeAt(w),o===10)C++;else if(!aa(o))break;if(m=e.md.helpers.parseLinkDestination(g,w,_),!m.ok||(u=e.md.normalizeLink(m.str),!e.md.validateLink(u)))return!1;for(w=m.pos,C+=m.lines,s=w,a=C,b=w;w<_;w++)if(o=g.charCodeAt(w),o===10)C++;else if(!aa(o))break;for(m=e.md.helpers.parseLinkTitle(g,w,_),w<_&&b!==w&&m.ok?(k=m.str,w=m.pos,C+=m.lines):(k="",w=s,C=a);w<_&&(o=g.charCodeAt(w),!!aa(o));)w++;if(w<_&&g.charCodeAt(w)!==10&&k)for(k="",w=s,C=a;w<_&&(o=g.charCodeAt(w),!!aa(o));)w++;return w<_&&g.charCodeAt(w)!==10||(h=kbe(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)},wbe=["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"],jl={},_be="[a-zA-Z_:][a-zA-Z0-9:._-]*",Ebe="[^\"'=<>`\\x00-\\x20]+",xbe="'[^']*'",Dbe='"[^"]*"',Sbe="(?:"+Ebe+"|"+xbe+"|"+Dbe+")",Bbe="(?:\\s+"+_be+"(?:\\s*=\\s*"+Sbe+")?)",Wy="<[A-Za-z][A-Za-z0-9\\-]*"+Bbe+"*\\s*\\/?>",Ky="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Mbe="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Fbe="<[?][\\s\\S]*?[?]>",Nbe="<![A-Z]+\\s+[^>]*>",Obe="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Tbe=new RegExp("^(?:"+Wy+"|"+Ky+"|"+Mbe+"|"+Fbe+"|"+Nbe+"|"+Obe+")"),Lbe=new RegExp("^(?:"+Wy+"|"+Ky+")");jl.HTML_TAG_RE=Tbe,jl.HTML_OPEN_CLOSE_TAG_RE=Lbe;var Ibe=wbe,Rbe=jl.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("^</?("+Ibe.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Rbe.source+"\\s*$"),/^$/,!1]],zbe=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},Tm=ve.isSpace,$be=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&&!Tm(o)?!1:(i||(c=e.skipSpacesBack(c,u),a=e.skipCharsBack(c,35,u),a>u&&Tm(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)},Hbe=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},Pbe=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},Lm=ku,La=ve.isSpace;function hr(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(La(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}hr.prototype.push=function(e,r,n){var i=new Lm(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(var r=this.lineMax;e<r&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},hr.prototype.skipSpaces=function(e){for(var r,n=this.src.length;e<n&&(r=this.src.charCodeAt(e),!!La(r));e++);return e},hr.prototype.skipSpacesBack=function(e,r){if(e<=r)return e;for(;e>r;)if(!La(this.src.charCodeAt(--e)))return e+1;return e},hr.prototype.skipChars=function(e,r){for(var 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){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),La(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("")},hr.prototype.Token=Lm;var Vbe=hr,jbe=sp,la=[["table",hbe,["paragraph","reference"]],["code",pbe],["fence",fbe,["paragraph","reference","blockquote","list"]],["blockquote",gbe,["paragraph","reference","blockquote","list"]],["hr",ybe,["paragraph","reference","blockquote","list"]],["list",vbe,["paragraph","reference","blockquote"]],["reference",Abe],["html_block",zbe,["paragraph","reference","blockquote"]],["heading",$be,["paragraph","reference","blockquote"]],["lheading",Hbe],["paragraph",Pbe]];function Ia(){this.ruler=new jbe;for(var e=0;e<la.length;e++)this.ruler.push(la[e][0],la[e][1],{alt:(la[e][2]||[]).slice()})}Ia.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)}},Ia.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))},Ia.prototype.State=Vbe;var qbe=Ia;function Ube(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 Wbe=function(e,r){for(var n=e.pos;n<e.posMax&&!Ube(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(r||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)},Kbe=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,Zbe=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(Kbe),!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)},Gbe=ve.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&&Gbe(e.src.charCodeAt(s));)s++;return e.pos=s,!0};const Jbe=Er(Zy);for(var Xbe=ve.isSpace,ap=[],Im=0;Im<256;Im++)ap.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){ap[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),!!Xbe(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&&ap[n]!==0?a.content=s:a.content=o,a.markup=o,a.info="escape"),e.pos=l+1,!0};const Qbe=Er(Gy);var Ybe=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},Au={};Au.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 Rm(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)}}Au.postProcess=function(e){var r,n=e.tokens_meta,i=e.tokens_meta.length;for(Rm(e,e.delimiters),r=0;r<i;r++)n[r]&&n[r].delimiters&&Rm(e,n[r].delimiters)};var wu={};wu.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 zm(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--))}wu.postProcess=function(e){var r,n=e.tokens_meta,i=e.tokens_meta.length;for(zm(e,e.delimiters),r=0;r<i;r++)n[r]&&n[r].delimiters&&zm(e,n[r].delimiters)};var eye=ve.normalizeReference,xc=ve.isSpace,tye=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[eye(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},rye=ve.normalizeReference,Dc=ve.isSpace,nye=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[rye(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},iye=/^([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])?)*)$/,oye=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,sye=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),oye.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):iye.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},aye=jl.HTML_TAG_RE;function lye(e){return/^<a[>\s]/i.test(e)}function uye(e){return/^<\/a\s*>/i.test(e)}function cye(e){var r=e|32;return r>=97&&r<=122}var dye=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&&!cye(n))||(i=e.src.slice(a).match(aye),!i)?!1:(r||(s=e.push("html_inline","",0),s.content=i[0],lye(s.content)&&e.linkLevel++,uye(s.content)&&e.linkLevel--),e.pos+=i[0].length,!0)},$m=$y,hye=ve.has,pye=ve.isValidEntityCode,Hm=ve.fromCodePoint,fye=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,mye=/^&([a-z][a-z0-9]{1,31});/i,gye=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(fye),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=pye(i)?Hm(i):Hm(65533),s.markup=o[0],s.info="entity"),e.pos+=o[0].length,!0}else if(o=e.src.slice(a).match(mye),o&&hye($m,o[1]))return r||(s=e.push("text_special","",0),s.content=$m[o[1]],s.markup=o[0],s.info="entity"),e.pos+=o[0].length,!0;return!1};function Pm(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 bye=function(e){var r,n=e.tokens_meta,i=e.tokens_meta.length;for(Pm(e.delimiters),r=0;r<i;r++)n[r]&&n[r].delimiters&&Pm(n[r].delimiters)},yye=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,Vm=ve.isWhiteSpace,jm=ve.isPunctChar,qm=ve.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=qm(i)||jm(String.fromCharCode(i)),h=qm(o)||jm(String.fromCharCode(o)),u=Vm(i),d=Vm(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 Cye=Bo,Um=sp,Bc=[["text",Wbe],["linkify",Zbe],["newline",Zy],["escape",Gy],["backticks",Ybe],["strikethrough",Au.tokenize],["emphasis",wu.tokenize],["link",tye],["image",nye],["autolink",sye],["html_inline",dye],["entity",gye]],Mc=[["balance_pairs",bye],["strikethrough",Au.postProcess],["emphasis",wu.postProcess],["fragments_join",yye]];function Mo(){var e;for(this.ruler=new Um,e=0;e<Bc.length;e++)this.ruler.push(Bc[e][0],Bc[e][1]);for(this.ruler2=new Um,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=Cye;var vye=Mo,Wm,Km;function kye(){return Km||(Km=1,Wm=function(e){var r={};e=e||{},r.src_Any=Hy().source,r.src_Cc=Py().source,r.src_Z=Vy().source,r.src_P=op.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}),Wm}function Od(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 Aye(e){return _u(e)==="[object String]"}function wye(e){return _u(e)==="[object Object]"}function _ye(e){return _u(e)==="[object RegExp]"}function Zm(e){return _u(e)==="[object Function]"}function Eye(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var Jy={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function xye(e){return Object.keys(e||{}).reduce(function(r,n){return r||Jy.hasOwnProperty(n)},!1)}var Dye={"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}}},Sye="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]",Bye="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Mye(e){e.__index__=-1,e.__text_cache__=""}function Fye(e){return function(r,n){var i=r.slice(n);return e.test(i)?i.match(e)[0].length:0}}function Gm(){return function(e,r){r.normalize(e)}}function Ra(e){var r=e.re=kye()(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Sye),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,wye(u)){_ye(u.validate)?c.validate=Fye(u.validate):Zm(u.validate)?c.validate=u.validate:s(l,u),Zm(u.normalize)?c.normalize=u.normalize:u.normalize?s(l,u):c.normalize=Gm();return}if(Aye(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:Gm()};var a=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(Eye).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"),Mye(e)}function Nye(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 Nye(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||xye(e)&&(r=e,e={}),this.__opts__=Od({},Jy,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Od({},Dye,e),this.__compiled__={},this.__tlds__=Bye,this.__tlds_replaced__=!1,this.re={},Ra(this)}Mt.prototype.add=function(e,r){return this.__schemas__[e]=r,Ra(this),this},Mt.prototype.set=function(e){return this.__opts__=Od(this.__opts__,e),this},Mt.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},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){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},Mt.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},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(),Ra(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Ra(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(){};var Oye=Mt,za={exports:{}};za.exports,function(e,r){(function(n){var i=r&&!r.nodeType&&r,o=e&&!e.nodeType&&e,s=typeof an=="object"&&an;(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,w=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?w(B/p):B>>1,B+=w(B/I);B>C*d>>1;te+=u)B=w(B/C);return w(te+(C+1)*B/(B+h))}function Y(B){var I=[],V=B.length,te,se=0,G=m,re=f,Ee,Se,ae,Te,we,Ie,Pe,Re,Ge;for(Ee=B.lastIndexOf(b),Ee<0&&(Ee=0),Se=0;Se<Ee;++Se)B.charCodeAt(Se)>=128&&L("not-basic"),I.push(B.charCodeAt(Se));for(ae=Ee>0?Ee+1:0;ae<V;){for(Te=se,we=1,Ie=u;ae>=V&&L("invalid-input"),Pe=Z(B.charCodeAt(ae++)),(Pe>=u||Pe>w((l-se)/we))&&L("overflow"),se+=Pe*we,Re=Ie<=re?c:Ie>=re+d?d:Ie-re,!(Pe<Re);Ie+=u)Ge=u-Re,we>w(l/Ge)&&L("overflow"),we*=Ge;te=I.length+1,re=T(se-Te,te,Te==0),w(se/te)>l-G&&L("overflow"),G+=w(se/te),se%=te,I.splice(se++,0,G)}return J(I)}function A(B){var I,V,te,se,G,re,Ee,Se,ae,Te,we,Ie=[],Pe,Re,Ge,ke;for(B=U(B),Pe=B.length,I=m,V=0,G=f,re=0;re<Pe;++re)we=B[re],we<128&&Ie.push(_(we));for(te=se=Ie.length,se&&Ie.push(b);te<Pe;){for(Ee=l,re=0;re<Pe;++re)we=B[re],we>=I&&we<Ee&&(Ee=we);for(Re=te+1,Ee-I>w((l-V)/Re)&&L("overflow"),V+=(Ee-I)*Re,I=Ee,re=0;re<Pe;++re)if(we=B[re],we<I&&++V>l&&L("overflow"),we==I){for(Se=V,ae=u;Te=ae<=G?c:ae>=G+d?d:ae-G,!(Se<Te);ae+=u)ke=Se-Te,Ge=u-Te,Ie.push(_(F(Te+ke%Ge,0))),Se=w(ke/Ge);Ie.push(_(F(Se,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--"+A(I):I})}if(a={version:"1.4.1",ucs2:{decode:U,encode:J},decode:Y,encode:A,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})(an)}(za,za.exports);var Tye=za.exports,Lye={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Iye={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"]}}},Rye={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=ve,zye=Ta,$ye=P2e,Hye=dbe,Pye=qbe,Vye=vye,jye=Oye,In=Ni,Xy=Tye,qye={default:Lye,zero:Iye,commonmark:Rye},Uye=/^(vbscript|javascript|file|data):/,Wye=/^data:image\/(gif|png|jpeg|webp);/;function Kye(e){var r=e.trim().toLowerCase();return Uye.test(r)?!!Wye.test(r):!0}var Qy=["http:","https:","mailto:"];function Zye(e){var r=In.parse(e,!0);if(r.hostname&&(!r.protocol||Qy.indexOf(r.protocol)>=0))try{r.hostname=Xy.toASCII(r.hostname)}catch{}return In.encode(In.format(r))}function Gye(e){var r=In.parse(e,!0);if(r.hostname&&(!r.protocol||Qy.indexOf(r.protocol)>=0))try{r.hostname=Xy.toUnicode(r.hostname)}catch{}return In.decode(In.format(r),In.decode.defaultChars+"%")}function Vt(e,r){if(!(this instanceof Vt))return new Vt(e,r);r||qo.isString(e)||(r=e||{},e="default"),this.inline=new Vye,this.block=new Pye,this.core=new Hye,this.renderer=new $ye,this.linkify=new jye,this.validateLink=Kye,this.normalizeLink=Zye,this.normalizeLinkText=Gye,this.utils=qo,this.helpers=qo.assign({},zye),this.options={},this.configure(e),r&&this.set(r)}Vt.prototype.set=function(e){return qo.assign(this.options,e),this},Vt.prototype.configure=function(e){var r=this,n;if(qo.isString(e)&&(n=e,e=qye[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},Vt.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},Vt.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},Vt.prototype.use=function(e){var r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},Vt.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},Vt.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},Vt.prototype.parseInline=function(e,r){var n=new this.core.State(e,this,r);return n.inlineMode=!0,this.core.process(n),n.tokens},Vt.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)};var Jye=Vt,Xye=Jye;const Qye=Er(Xye),Td=/^ *\[([\sx])] /i;function Yye(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"||!Td.test(a[l].content))continue;tCe(s[u],o),s[u-2].attrJoin("class","task-list-item "+(o.enabled?" enabled":""));const c=eCe(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 eCe(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 tCe(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 Ac("taskListItemCheckbox","",0);o||a.attrSet("disabled","true"),i.map&&a.attrSet("line",i.map[0].toString()),a.attrSet("id",s);const l=Td.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(Td,""),r.label&&(e.children.splice(1,0,function(i){const o=new Ac("taskListItemLabel_open","",1);return o.attrSet("id",i),o}(n)),e.children.push(new Ac("taskListItemLabel_close","",-1)))}var Ld={exports:{}},rCe=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},Id={},nCe=Object.prototype.hasOwnProperty,iCe;function Jm(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function Xm(e){try{return encodeURIComponent(e)}catch{return null}}function oCe(e){for(var r=/([^=?#&]+)=?([^&]*)/g,n={},i;i=r.exec(e);){var o=Jm(i[1]),s=Jm(i[2]);o===null||s===null||o in n||(n[o]=s)}return n}function sCe(e,r){r=r||"";var n=[],i,o;typeof r!="string"&&(r="?");for(o in e)if(nCe.call(e,o)){if(i=e[o],!i&&(i===null||i===iCe||isNaN(i))&&(i=""),o=Xm(o),i=Xm(i),o===null||i===null)continue;n.push(o+"="+i)}return n.length?r+n.join("&"):""}Id.stringify=sCe,Id.parse=oCe;var Yy=rCe,Eu=Id,aCe=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,eC=/[\n\r\t]/g,lCe=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,tC=/:\d+$/,uCe=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,cCe=/^[a-zA-Z]:/;function lp(e){return(e||"").toString().replace(aCe,"")}var Rd=[["#","hash"],["?","query"],function(e,r){return vr(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]],Qm={hash:1,query:1};function rC(e){var r;typeof window<"u"?r=window:typeof an<"u"?r=an: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 mr(unescape(e.pathname),{});else if(o==="string"){i=new mr(e,{});for(s in Qm)delete i[s]}else if(o==="object"){for(s in e)s in Qm||(i[s]=e[s]);i.slashes===void 0&&(i.slashes=lCe.test(e.href))}return i}function vr(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function nC(e,r){e=lp(e),e=e.replace(eC,""),r=r||{};var n=uCe.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)):vr(i)?l=n[4]:i?o&&(l=l.slice(2)):a>=2&&vr(r.protocol)&&(l=n[4]),{protocol:i,slashes:o||vr(i),slashesCount:a,rest:l}}function dCe(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 mr(e,r,n){if(e=lp(e),e=e.replace(eC,""),!(this instanceof mr))return new mr(e,r,n);var i,o,s,a,l,u,c=Rd.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||cCe.test(e))||!o.slashes&&(o.protocol||o.slashesCount<2||!vr(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=dCe(h.pathname,r.pathname)),h.pathname.charAt(0)!=="/"&&vr(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:"&&vr(h.protocol)&&h.host?h.protocol+"//"+h.host:"null",h.href=h.toString()}function hCe(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<Rd.length;a++){var l=Rd[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:"&&vr(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i}function pCe(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||vr(n.protocol)?"//":"");return n.username?(s+=n.username,n.password&&(s+=":"+n.password),s+="@"):n.password?(s+=":"+n.password,s+="@"):n.protocol!=="file:"&&vr(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}mr.prototype={set:hCe,toString:pCe},mr.extractProtocol=nC,mr.location=rC,mr.trimLeft=lp,mr.qs=Eu;var fCe=mr;(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(fCe),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 w=y.attrs.reduce(function(_,S){return S[0]==="href"?S[1]:_},"");g.content=g.content.slice(0,-1),y.type="mention",y.mention=a(w),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})(Ld,Ld.exports);var mCe=Ld.exports;const gCe=Er(mCe);function bCe(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 yCe(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=vCe(n,i,u=>u.nesting===1&&Nc(u,"task-list-item")!==a);l>i&&CCe(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 CCe(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 vCe(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 kCe(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 w=p.src.slice(v,g),_=p.src.slice(g,k);if(!c(_,w))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=w,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 zd=["info","warn","error","success"],ACe=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)},wCe=e=>(zd.forEach(r=>{e.use(kCe,r,{render:ACe(r)})}),e);function _Ce(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 ECe(e,r){e.splice(r+1,1),e.splice(r-1,1)}const xCe=e=>{function r({tokens:n}){for(let i=1,o=n.length;i<o-1;++i)_Ce(n,i)&&ECe(n,i)}e.core.ruler.before("linkify","link_previews",r)};function DCe(e){e.inline.ruler.at("newline",(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.at("escape",(r,n)=>{const i=Qbe(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 SCe(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 BCe=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 MCe=Er(BCe),Ym=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 FCe(e,r){if(!Ym.has(e))throw new TypeError("figcaption must be one of: ".concat([...Ym],"."));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 NCe(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=FCe(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=Qye("commonmark",{html:!1,breaks:!1}).enable("strikethrough").enable("table").use(Yye,{enable:!0,labelAfter:!0}).use(MCe,e=>{}).use(yCe).use(bCe).use(DCe).use(wCe).use(xCe).use(SCe).use(gCe).use(NCe);Ui.renderer.rules.front_matter=(e,r,n)=>'<pre id="frontmatter"><code>'.concat(ve.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 OCe(e){const r=new DOMParser().parseFromString(e,"text/html");return TCe(r,n=>{LCe(n)&&(n.textContent=n.textContent.replaceAll("\n"," "))}),r.body.innerHTML}function TCe(e,r){const n=e.createNodeIterator(e.body,NodeFilter.SHOW_TEXT);let i=n.nextNode();for(;i;)r(i),i=n.nextNode()}function LCe(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 ICe=Le.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 ge({key:new Ae("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=Hn.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?RCe(this.editor.schema).serialize(i.content):i.isLeaf?i.textContent:n(i.content.firstChild);return n(r)},transformPastedHTML:OCe}})]}}),K4e=({nodes:e,marks:r})=>({serializer:new ip(aC(e),$Ce(r)),serialize(n,i){return this.serializer.serialize(n,{...i,tightLists:!0})}}),RCe=({nodes:e,marks:r})=>({serializer:new ip(aC(e),zCe(r)),serialize(n,i){return this.serializer.serialize(n,{...i,tightLists:!0})}}),zCe=e=>{const r={open:"",close:"",mixable:!0,expelEnclosingWhitespace:!0},n=up(zs.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=up(zs.nodes),n=sC(e);return{...r,...n}},$Ce=e=>{const r=up(zs.marks),n=sC(e);return{...r,...n}},up=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=De.create({name:"text",group:"inline"}),HCe=De.create({name:"doc",content:"block",addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.insertContent(" ")}}}),Z4e=Le.create({name:"PlainText",addExtensions(){return[HCe,lC]}});function PCe(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 VCe(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=PCe(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 jCe(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 qCe(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 UCe(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 WCe(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 KCe=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_-]*/}}),ZCe=["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"],GCe=["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"],JCe=["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"],XCe=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],QCe=["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 YCe(e){const r=e.regex,n=KCe(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:":("+JCe.join("|")+")"},{begin:":(:)?("+XCe.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+QCe.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:GCe.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+ZCe.join("|")+")\\b"}]}}function eve(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 tve(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 rve(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 nve(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])*",ua="\\.(".concat(Si,")"),ca="[0-9a-fA-F](_*[0-9a-fA-F])*",e1={className:"number",variants:[{begin:"(\\b(".concat(Si,")((").concat(ua,")|\\.)?|(").concat(ua,"))[eE][+-]?(").concat(Si,")[fFdD]?\\b")},{begin:"\\b(".concat(Si,")((").concat(ua,")[fFdD]?\\b|\\.([fFdD]\\b)?)")},{begin:"(".concat(ua,")[fFdD]?\\b")},{begin:"\\b(".concat(Si,")[fFdD]\\b")},{begin:"\\b0[xX]((".concat(ca,")\\.?|(").concat(ca,")?\\.(").concat(ca,"))[pP][+-]?(").concat(Si,")[fFdD]?\\b")},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:"\\b0[xX](".concat(ca,")[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 ive(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,e1,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},e1,s]}}const t1="[A-Za-z$_][0-9A-Za-z$_]*",ove=["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"],sve=["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"],ave=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],lve=[].concat(hC,cC,dC);function uve(e){const r=e.regex,n=(A,{after:E})=>{const R="</"+A[0].slice(1);return A.input.indexOf(R,E)!==-1},i=t1,o={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(A,E)=>{const R=A[0].length+A.index,B=A.input[R];if(B==="<"||B===","){E.ignoreMatch();return}B===">"&&(n(A,{after:R})||E.ignoreMatch());let I;const V=A.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:t1,keyword:ove,literal:sve,built_in:lve,"variable.language":ave},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)}]),w={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:[w],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function U(A){return r.concat("(?!",A.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:/\(\)/},w]},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:[w]};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:[w,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:[w]},J,P,_,F,{match:/\$[(.]/}]}}function cve(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])*",da="\\.(".concat(Bi,")"),ha="[0-9a-fA-F](_*[0-9a-fA-F])*",dve={className:"number",variants:[{begin:"(\\b(".concat(Bi,")((").concat(da,")|\\.)?|(").concat(da,"))[eE][+-]?(").concat(Bi,")[fFdD]?\\b")},{begin:"\\b(".concat(Bi,")((").concat(da,")[fFdD]?\\b|\\.([fFdD]\\b)?)")},{begin:"(".concat(da,")[fFdD]?\\b")},{begin:"\\b(".concat(Bi,")[fFdD]\\b")},{begin:"\\b0[xX]((".concat(ha,")\\.?|(").concat(ha,")?\\.(").concat(ha,"))[pP][+-]?(").concat(Bi,")[fFdD]?\\b")},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:"\\b0[xX](".concat(ha,")[lL]?\\b")},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function hve(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=dve,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 pve=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"],mve=["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"],gve=["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(),bve=pC.concat(fC);function yve(e){const r=pve(e),n=bve,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,w){return{className:k,begin:C,relevance:w}},d={$pattern:/[a-z-]+/,keyword:i,attribute:mve.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("+gve.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("+fve.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 Cve(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 vve(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 kve(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 Ave(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 wve(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 _ve(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"}}]},w=r.concat(i,"\\b(?!\\()"),_={variants:[{match:[r.concat(/::/,r.lookahead(/(?!class\b)/)),w],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,r.concat(/::/,r.lookahead(/(?!class\b)/)),w],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 Eve(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 xve(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Dve(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 Sve(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Bve(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 Mve(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 Fve(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 Nve=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_-]*/}}),Ove=["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"],Tve=["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"],Lve=["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"],Ive=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],Rve=["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 zve(e){const r=Nve(e),n=Ive,i=Lve,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("+Ove.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("+Rve.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:Tve.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 $ve(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function Hve(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:w}={}){const _=w;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 pa(e){return Fe("(?=",e,")")}function Fe(...e){return e.map(r=>mC(r)).join("")}function Pve(e){const r=e[e.length-1];return typeof r=="object"&&r.constructor===Object?(e.splice(e.length-1,1),r):{}}function vt(...e){return"("+(Pve(e).capture?"":"?:")+e.map(r=>mC(r)).join("|")+")"}const cp=e=>Fe(/\b/,e,/\w$/.test(e)?/\b/:/\B/),Vve=["Protocol","Type"].map(cp),r1=["init","self"].map(cp),jve=["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"],n1=["false","nil","true"],qve=["assignment","associativity","higherThan","left","lowerThan","none","right"],Uve=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],i1=["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=vt(/[/=\-+!*%<>&|^~?]/,/[\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=vt(gC,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Tc=Fe(gC,bC,"*"),yC=vt(/[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]/),ql=vt(yC,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Nr=Fe(yC,ql,"*"),Lc=Fe(/[A-Z]/,ql,"*"),Wve=["autoclosure",Fe(/convention\(/,vt("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Fe(/objc\(/,Nr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],Kve=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Zve(e){const r={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),i=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,vt(...Vve,...r1)],className:{2:"keyword"}},s={match:Fe(/\./,vt(...Oc)),relevance:0},a=Oc.filter(ae=>typeof ae=="string").concat(["_|0"]),l=Oc.filter(ae=>typeof ae!="string").concat(jve).map(cp),u={variants:[{className:"keyword",match:vt(...l,...r1)}]},c={$pattern:vt(/\b\w+/,/#\w+/),keyword:a.concat(Uve),literal:n1},d=[o,s,u],h={match:Fe(/\./,vt(...i1)),relevance:0},p={className:"built_in",match:Fe(/\b/,vt(...i1),/(?=\()/)},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:Fe(/\\/,ae,/[0\\tnr"']/)},{match:Fe(/\\/,ae,/u\{[0-9a-fA-F]{1,8}\}/)}]}),w=(ae="")=>({className:"subst",match:Fe(/\\/,ae,/[\t ]*(?:[\r\n]|\r\n)/)}),_=(ae="")=>({className:"subst",label:"interpol",begin:Fe(/\\/,ae,/\(/),end:/\)/}),S=(ae="")=>({begin:Fe(ae,/"""/),end:Fe(/"""/,ae),contains:[C(ae),w(ae),_(ae)]}),L=(ae="")=>({begin:Fe(ae,/"/),end:Fe(/"/,ae),contains:[C(ae),_(ae)]}),D={className:"string",variants:[S(),S("#"),S("##"),S("###"),L(),L("#"),L("##"),L("###")]},P={match:Fe(/`/,Nr,/`/)},U={className:"variable",match:/\$\d+/},J={className:"variable",match:"\\$".concat(ql,"+")},Z=[P,U,J],F={match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Kve,contains:[...g,k,D]}]}},T={className:"keyword",match:Fe(/@/,vt(...Wve))},Y={className:"meta",match:Fe(/@/,Nr)},A=[F,T,Y],E={match:pa(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Fe(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,ql,"+")},{className:"type",match:Lc,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Fe(/\s+&\s+/,pa(Lc)),relevance:0}]},R={begin:/</,end:/>/,keywords:c,contains:[...i,...d,...A,m,E]};E.contains.push(R);const B={match:Fe(Nr,/\s*:/),keywords:"_|0",relevance:0},I={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",B,...i,...d,...f,...g,k,D,...Z,...A,E]},V={begin:/</,end:/>/,contains:[...i,E]},te={begin:vt(pa(Fe(Nr,/\s*:/)),pa(Fe(Nr,/\s+/,Nr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Nr}]},se={begin:/\(/,end:/\)/,keywords:c,contains:[te,...i,...d,...g,k,D,...A,E,I],endsParent:!0,illegal:/["']/},G={match:[/func/,/\s+/,vt(P.match,Nr,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"}},Se={begin:[/precedencegroup/,/\s+/,Lc],className:{1:"keyword",3:"title"},contains:[E],keywords:[...qve,...n1],end:/}/};for(const ae of D.variants){const Te=ae.contains.find(Ie=>Ie.label==="interpol");Te.keywords=c;const we=[...d,...f,...g,k,D,...Z];Te.contains=[...we,{begin:/\(/,end:/\)/,contains:["self",...we]}]}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,Se,{beginKeywords:"import",end:/$/,contains:[...i],relevance:0},...d,...f,...g,k,D,...Z,...A,E,I]}}const Ul="[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"],AC=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],wC=["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(wC,kC,AC);function Gve(e){const r=e.regex,n=(A,{after:E})=>{const R="</"+A[0].slice(1);return A.input.indexOf(R,E)!==-1},i=Ul,o={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(A,E)=>{const R=A[0].length+A.index,B=A.input[R];if(B==="<"||B===","){E.ignoreMatch();return}B===">"&&(n(A,{after:R})||E.ignoreMatch());let I;const V=A.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:Ul,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)}]),w={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,...AC]}},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:[w],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function U(A){return r.concat("(?!",A.join("|"),")")}const J={match:r.concat(/\b/,U([...wC,"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:/\(\)/},w]},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:[w]};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:[w,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:[w]},J,P,_,F,{match:/\$[(.]/}]}}function Jve(e){const r=Gve(e),n=Ul,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:Ul,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 Xve(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 Qve(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 Yve(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 eke(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 o1=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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function on(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 tke="</span>",s1=e=>!!e.scope,rke=(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 nke=class{constructor(e,r){this.buffer="",this.classPrefix=r.classPrefix,e.walk(this)}addText(e){this.buffer+=DC(e)}openNode(e){if(!s1(e))return;const r=rke(e.scope,{prefix:this.classPrefix});this.span(r)}closeNode(e){s1(e)&&(this.buffer+=tke)}value(){return this.buffer}span(e){this.buffer+='<span class="'.concat(e,'">')}};const a1=(e={})=>{const r={children:[]};return Object.assign(r,e),r};let ike=class SC{constructor(){this.rootNode=a1(),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=a1({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)}))}},oke=class extends ike{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 nke(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 ske(e){return ui("(?:",e,")*")}function ake(e){return ui("(?:",e,")?")}function ui(...e){return e.map(r=>ys(r)).join("")}function lke(e){const r=e[e.length-1];return typeof r=="object"&&r.constructor===Object?(e.splice(e.length-1,1),r):{}}function dp(...e){return"("+(lke(e).capture?"":"?:")+e.map(r=>ys(r)).join("|")+")"}function MC(e){return new RegExp(e.toString()+"|").exec("").length-1}function uke(e,r){const n=e&&e.exec(r);return n&&n.index===0}const cke=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function hp(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=cke.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 dke=/\b\B/,FC="[a-zA-Z]\\w*",pp="[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]+)",hke="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",pke=(e={})=>{const r=/^#![ ]*\//;return e.binary&&(e.begin=ui(r,/.*\b/,e.binary,/\b.*/)),on({scope:"meta",begin:r,end:/$/,relevance:0,"on:begin":(n,i)=>{n.index!==0&&i.ignoreMatch()}},e)},Cs={begin:"\\\\[\\s\\S]",relevance:0},fke={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Cs]},mke={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Cs]},gke={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=on({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=dp("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},bke=xu("//","$"),yke=xu("/\\*","\\*/"),Cke=xu("#","$"),vke={scope:"number",begin:NC,relevance:0},kke={scope:"number",begin:TC,relevance:0},Ake={scope:"number",begin:LC,relevance:0},wke={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Cs,{begin:/\[/,end:/\]/,relevance:0,contains:[Cs]}]}]},_ke={scope:"title",begin:FC,relevance:0},Eke={scope:"title",begin:pp,relevance:0},xke={begin:"\\.\\s*"+pp,relevance:0},Dke=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 fa=Object.freeze({__proto__:null,MATCH_NOTHING_RE:dke,IDENT_RE:FC,UNDERSCORE_IDENT_RE:pp,NUMBER_RE:NC,C_NUMBER_RE:TC,BINARY_NUMBER_RE:LC,RE_STARTERS_RE:hke,SHEBANG:pke,BACKSLASH_ESCAPE:Cs,APOS_STRING_MODE:fke,QUOTE_STRING_MODE:mke,PHRASAL_WORDS_MODE:gke,COMMENT:xu,C_LINE_COMMENT_MODE:bke,C_BLOCK_COMMENT_MODE:yke,HASH_COMMENT_MODE:Cke,NUMBER_MODE:vke,C_NUMBER_MODE:kke,BINARY_NUMBER_MODE:Ake,REGEXP_MODE:wke,TITLE_MODE:_ke,UNDERSCORE_TITLE_MODE:Eke,METHOD_GUARD:xke,END_SAME_AS_BEGIN:Dke});function Ske(e,r){e.input[e.index-1]==="."&&r.ignoreMatch()}function Bke(e,r){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Mke(e,r){r&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Ske,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Fke(e,r){Array.isArray(e.illegal)&&(e.illegal=dp(...e.illegal))}function Nke(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 Oke(e,r){e.relevance===void 0&&(e.relevance=1)}const Tke=(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},Lke=["of","and","for","in","not","or","if","then","parent","list","value"],Ike="keyword";function IC(e,r,n=Ike){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,Rke(u[0],u[1])]})}}function Rke(e,r){return r?Number(r):zke(e)?0:1}function zke(e){return Lke.includes(e.toLowerCase())}const l1={},Wn=e=>{console.error(e)},u1=(e,...r)=>{console.log("WARN: ".concat(e),...r)},Ci=(e,r)=>{l1["".concat(e,"/").concat(r)]||(console.log("Deprecated as of ".concat(e,". ").concat(r)),l1["".concat(e,"/").concat(r)]=!0)},Wl=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 $ke(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Wn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Wl;if(typeof e.beginScope!="object"||e.beginScope===null)throw Wn("beginScope must be object"),Wl;RC(e,e.begin,{key:"beginScope"}),e.begin=hp(e.begin,{joinWith:""})}}function Hke(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Wn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Wl;if(typeof e.endScope!="object"||e.endScope===null)throw Wn("endScope must be object"),Wl;RC(e,e.end,{key:"endScope"}),e.end=hp(e.end,{joinWith:""})}}function Pke(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Vke(e){Pke(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),$ke(e),Hke(e)}function jke(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(hp(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;[Bke,Nke,Vke,Tke].forEach(d=>d(a,l)),e.compilerExtensions.forEach(d=>d(a,l)),a.__beforeBegin=null,[Mke,Fke,Oke].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 qke(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=on(e.classNameAliases||{}),s(e)}function zC(e){return e?e.endsWithParent||zC(e.starts):!1}function qke(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(r){return on(e,{variants:null},r)})),e.cachedVariants?e.cachedVariants:zC(e)?on(e,{starts:e.starts?on(e.starts):null}):Object.isFrozen(e)?on(e):e}var Uke="11.8.0";let Wke=class extends Error{constructor(e,r){super(e),this.name="HTMLInjectionError",this.html=r}};const Ic=DC,c1=on,d1=Symbol("nomatch"),Kke=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:oke};function u(A){return l.noHighlightRe.test(A)}function c(A){let E=A.className+" ";E+=A.parentNode?A.parentNode.className:"";const R=l.languageDetectRe.exec(E);if(R){const B=D(R[1]);return B||(u1(s.replace("{}",R[1])),u1("Falling back to no-highlight mode for this block.",A)),B?R[1]:"no-highlight"}return E.split(/\s+/).find(B=>u(B)||D(B))}function d(A,E,R){let B="",I="";typeof E=="object"?(B=A,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=A,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(A,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=ke.case_insensitive?N[0].toLowerCase():N[0],be=V(z,K);if(be){const[je,bo]=be;if(le.addText(H),H="",I[K]=(I[K]||0)+1,I[K]<=Kke&&(rt+=bo),je.startsWith("_"))H+=N[0];else{const M=ke.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,ht[z.subLanguage]),ht[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 be=ke.classNameAliases[x[H]]||x[H],je=N[H];be?re(je,be):(X=je,te(),X=""),H++}}function Se(x,N){return x.scope&&typeof x.scope=="string"&&le.openNode(ke.classNameAliases[x.scope]||x.scope),x.beginScope&&(x.beginScope._wrap?(re(X,ke.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=uke(x.endRe,H);if(K){if(x["on:end"]){const be=new o1(x);x["on:end"](N,be),be.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 Te(x){return z.matcher.regexIndex===0?(X+=x[0],1):($t=!0,0)}function we(x){const N=x[0],H=x.rule,K=new o1(H),be=[H.__beforeBegin,H["on:begin"]];for(const je of be)if(je&&(je(x,K),K.isMatchIgnored))return Te(N);return H.skip?X+=N:(H.excludeBegin&&(X+=N),G(),!H.returnBegin&&!H.excludeBegin&&(X=N)),Se(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 d1;const be=z;z.endScope&&z.endScope._wrap?(G(),re(N,z.endScope._wrap)):z.endScope&&z.endScope._multi?(G(),Ee(z.endScope,x)):be.skip?X+=N:(be.returnEnd||be.excludeEnd||(X+=N),G(),be.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&&Se(K.starts,x),be.returnEnd?0:N.length}function Pe(){const x=[];for(let N=z;N!==ke;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(A,")"));throw K.languageName=A,K.badRule=Re.rule,K}return 1}if(Re=N,N.type==="begin")return we(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!==d1)return K}if(N.type==="illegal"&&H==="")return 1;if(zt>1e5&&zt>N.index*3)throw new Error("potential infinite loop, way more iterations than matches");return X+=H,H.length}const ke=D(A);if(!ke)throw Wn(s.replace("{}",A)),new Error('Unknown language: "'+A+'"');const Sr=jke(ke);let Rt="",z=B||Sr;const ht={},le=new l.__emitter(l);Pe();let X="",rt=0,Ve=0,zt=0,$t=!1;try{if(ke.__emitTokens)ke.__emitTokens(E,le);else{for(z.matcher.considerAll();;){zt++,$t?$t=!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(),Rt=le.toHTML(),{language:A,value:Rt,relevance:rt,illegal:!1,_emitter:le,_top:z}}catch(x){if(x.message&&x.message.includes("Illegal"))return{language:A,value:Ic(E),illegal:!0,relevance:0,_illegalBy:{message:x.message,index:Ve,context:E.slice(Ve-100,Ve+100),mode:x.mode,resultSoFar:Rt},_emitter:le};if(o)return{language:A,value:Ic(E),illegal:!1,relevance:0,errorRaised:x,_emitter:le,_top:z};throw x}}function p(A){const E={value:Ic(A),illegal:!1,relevance:0,_top:a,_emitter:new l.__emitter(l)};return E._emitter.addText(A),E}function f(A,E){E=E||l.languages||Object.keys(r);const R=p(A),B=E.filter(D).filter(U).map(G=>h(G,A,!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(A,E,R){const B=E&&n[E]||R;A.classList.add("hljs"),A.classList.add("language-".concat(B))}function b(A){let E=null;const R=c(A);if(u(R))return;if(T("before:highlightElement",{el:A,language:R}),A.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(A)),l.throwUnescapedHTML))throw new Wke("One of your code blocks includes unescaped HTML.",A.innerHTML);E=A;const B=E.textContent,I=R?d(B,{language:R,ignoreIllegals:!0}):f(B);A.innerHTML=I.value,m(A,R,I.language),A.result={language:I.language,re:I.relevance,relevance:I.relevance},I.secondBest&&(A.secondBest={language:I.secondBest.language,relevance:I.secondBest.relevance}),T("after:highlightElement",{el:A,result:I,text:B})}function g(A){l=c1(l,A)}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 w(){k&&C()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",w,!1);function _(A,E){let R=null;try{R=E(e)}catch(B){if(Wn("Language definition for '{}' could not be registered.".replace("{}",A)),o)Wn(B);else throw B;R=a}R.name||(R.name=A),r[A]=R,R.rawDefinition=E.bind(null,e),R.aliases&&P(R.aliases,{languageName:A})}function S(A){delete r[A];for(const E of Object.keys(n))n[E]===A&&delete n[E]}function L(){return Object.keys(r)}function D(A){return A=(A||"").toLowerCase(),r[A]||r[n[A]]}function P(A,{languageName:E}){typeof A=="string"&&(A=[A]),A.forEach(R=>{n[R.toLowerCase()]=E})}function U(A){const E=D(A);return E&&!E.disableAutodetect}function J(A){A["before:highlightBlock"]&&!A["before:highlightElement"]&&(A["before:highlightElement"]=E=>{A["before:highlightBlock"](Object.assign({block:E.el},E))}),A["after:highlightBlock"]&&!A["after:highlightElement"]&&(A["after:highlightElement"]=E=>{A["after:highlightBlock"](Object.assign({block:E.el},E))})}function Z(A){J(A),i.push(A)}function F(A){const E=i.indexOf(A);E!==-1&&i.splice(E,1)}function T(A,E){const R=A;i.forEach(function(B){B[R]&&B[R](E)})}function Y(A){return Ci("10.7.0","highlightBlock will be removed entirely in v12.0"),Ci("10.7.0","Please use highlightElement now."),b(A)}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:c1,addPlugin:Z,removePlugin:F}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=Uke,e.regex={concat:ui,lookahead:BC,either:dp,optional:ake,anyNumberOfTimes:ske};for(const A in fa)typeof fa[A]=="object"&&xC(fa[A]);return Object.assign(e,fa),e},Oi=$C({});Oi.newInstance=()=>$C({});var Zke=Oi;Oi.HighlightJS=Oi,Oi.default=Oi;const rr=Er(Zke);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 Gke=HC.exports;const Jke=Er(Gke),$a=Object.assign(En(Error),{eval:En(EvalError),range:En(RangeError),reference:En(ReferenceError),syntax:En(SyntaxError),type:En(TypeError),uri:En(URIError)});function En(e){return r.displayName=e.displayName||e.name,r;function r(n,...i){const o=n&&Jke(n,...i);return new e(o)}}const Xke={}.hasOwnProperty,Qke="hljs-";function PC(e,r,n={}){let i=n.prefix;if(typeof e!="string")throw $a("Expected `string` for name, got `%s`",e);if(!rr.getLanguage(e))throw $a("Unknown language: `%s` is not registered",e);if(typeof r!="string")throw $a("Expected `string` for value, got `%s`",r);i==null&&(i=Qke),rr.configure({__emitter:iAe,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 Yke(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 $a("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 eAe(e,r){rr.registerLanguage(e,r)}const tAe=function(e,r){if(typeof e=="string")rr.registerAliases(r,{languageName:e});else{let n;for(n in e)Xke.call(e,n)&&rr.registerAliases(e[n],{languageName:n})}};function rAe(e){return!!rr.getLanguage(e)}function nAe(){return rr.listLanguages()}class iAe{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 de={highlight:PC,highlightAuto:Yke,registerLanguage:eAe,registered:rAe,listLanguages:nAe,registerAlias:tAe};de.registerLanguage("arduino",VCe),de.registerLanguage("bash",jCe),de.registerLanguage("c",qCe),de.registerLanguage("cpp",UCe),de.registerLanguage("csharp",WCe),de.registerLanguage("css",YCe),de.registerLanguage("diff",eve),de.registerLanguage("go",tve),de.registerLanguage("graphql",rve),de.registerLanguage("ini",nve),de.registerLanguage("java",ive),de.registerLanguage("javascript",uve),de.registerLanguage("json",cve),de.registerLanguage("kotlin",hve),de.registerLanguage("less",yve),de.registerLanguage("lua",Cve),de.registerLanguage("makefile",vve),de.registerLanguage("markdown",kve),de.registerLanguage("objectivec",Ave),de.registerLanguage("perl",wve),de.registerLanguage("php",_ve),de.registerLanguage("php-template",Eve),de.registerLanguage("plaintext",xve),de.registerLanguage("python",Dve),de.registerLanguage("python-repl",Sve),de.registerLanguage("r",Bve),de.registerLanguage("ruby",Mve),de.registerLanguage("rust",Fve),de.registerLanguage("scss",zve),de.registerLanguage("shell",$ve),de.registerLanguage("sql",Hve),de.registerLanguage("swift",Zve),de.registerLanguage("typescript",Jve),de.registerLanguage("vbnet",Xve),de.registerLanguage("wasm",Qve),de.registerLanguage("xml",Yve),de.registerLanguage("yaml",eke);const oAe=/^\s*>\s$/,sAe=De.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",fe(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[pn({find:oAe,type:this.type})]}}),aAe=De.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",fe(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)}}}),h1=Lt.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",fe(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:r})=>{const n=Ss(e,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:r.unsetMark(this.name)}}}}),p1=/^\s*([-+*])\s$/,lAe=De.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",fe(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(aAe.name,this.editor.getAttributes(h1.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=pn({find:p1,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=pn({find:p1,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(h1.name),editor:this.editor})),[e]}});function uAe(e,r,n){const i=({state:o,range:s,match:a})=>{pn({find:e,type:r,getAttributes:n}).handler({state:o,range:s,match:a}),a.length>=3&&o.tr.insertText(a[2])};return new Ds({find:e,handler:i})}const cAe=lAe.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[uAe(/^\s*([-+*])\s([^\s[]+)$/,this.type)]}}),dAe={info:xl,success:pb,error:hb,warn:fb},hAe={name:"Callout",components:{NodeViewWrapper:An,NodeViewContent:uo},props:{node:{type:Object,required:!0}},computed:{icon(){return dAe[this.type]||xl},type(){var e,r;return((r=(e=this.node)==null?void 0:e.attrs)==null?void 0:r.type)||"info"}}};var pAe=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)},fAe=[],mAe=j(hAe,pAe,fAe,!1,null,"4eaefb6e");const gAe=mAe.exports,bAe=De.create({name:"callout",content:"paragraph+",group:"block",defining:!0,addOptions(){return{types:zd,HTMLAttributes:{class:"callout"}}},addAttributes(){return{type:{default:"info",rendered:!1,parseHTML:e=>e.getAttribute("data-callout")||zd.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",fe(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 wn(gAe)},addCommands(){return{setCallout:e=>({commands:r})=>r.wrapIn(this.name,e),toggleCallout:e=>({commands:r,state:n})=>hn(n,this.name)?hn(n,this.name,e)?r.unsetCallout():r.updateAttributes(this.name,e):r.setCallout(e),unsetCallout:()=>({commands:e})=>e.lift(this.name)}}}),yAe=Le.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize"}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{const r=(e==null?void 0:e.node)||this.editor.state.doc;return((e==null?void 0:e.mode)||this.options.mode)==="textSize"?r.textBetween(0,r.content.size,void 0," ").length:r.nodeSize},this.storage.words=e=>{const r=(e==null?void 0:e.node)||this.editor.state.doc;return r.textBetween(0,r.content.size," "," ").split(" ").filter(n=>n!=="").length}},addProseMirrorPlugins(){return[new ge({key:new Ae("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)}})]}}),CAe=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/,vAe=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g,kAe=Lt.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",fe(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[zr({find:CAe,type:this.type})]},addPasteRules(){return[$r({find:vAe,type:this.type})]}}),AAe=/^```([a-z]+)?[\s\n]$/,wAe=/^~~~([a-z]+)?[\s\n]$/,VC=De.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",fe(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[cd({find:AAe,type:this.type,getAttributes:e=>({language:e[1]})}),cd({find:wAe,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new ge({key:new Ae("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 _Ae(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 f1{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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function sn(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 EAe="</span>",m1=e=>!!e.scope,xAe=(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 DAe{constructor(r,n){this.buffer="",this.classPrefix=n.classPrefix,r.walk(this)}addText(r){this.buffer+=qC(r)}openNode(r){if(!m1(r))return;const n=xAe(r.scope,{prefix:this.classPrefix});this.span(n)}closeNode(r){m1(r)&&(this.buffer+=EAe)}value(){return this.buffer}span(r){this.buffer+='<span class="'.concat(r,'">')}}const g1=(e={})=>{const r={children:[]};return Object.assign(r,e),r};class fp{constructor(){this.rootNode=g1(),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=g1({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=>{fp._collapse(n)}))}}class SAe extends fp{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 DAe(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 BAe(e){return ci("(?:",e,")*")}function MAe(e){return ci("(?:",e,")?")}function ci(...e){return e.map(r=>vs(r)).join("")}function FAe(e){const r=e[e.length-1];return typeof r=="object"&&r.constructor===Object?(e.splice(e.length-1,1),r):{}}function mp(...e){return"("+(FAe(e).capture?"":"?:")+e.map(r=>vs(r)).join("|")+")"}function WC(e){return new RegExp(e.toString()+"|").exec("").length-1}function NAe(e,r){const n=e&&e.exec(r);return n&&n.index===0}const OAe=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function gp(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=OAe.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 TAe=/\b\B/,KC="[a-zA-Z]\\w*",bp="[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]+)",LAe="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",IAe=(e={})=>{const r=/^#![ ]*\//;return e.binary&&(e.begin=ci(r,/.*\b/,e.binary,/\b.*/)),sn({scope:"meta",begin:r,end:/$/,relevance:0,"on:begin":(n,i)=>{n.index!==0&&i.ignoreMatch()}},e)},ks={begin:"\\\\[\\s\\S]",relevance:0},RAe={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ks]},zAe={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ks]},$Ae={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=sn({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=mp("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},HAe=Du("//","$"),PAe=Du("/\\*","\\*/"),VAe=Du("#","$"),jAe={scope:"number",begin:ZC,relevance:0},qAe={scope:"number",begin:GC,relevance:0},UAe={scope:"number",begin:JC,relevance:0},WAe={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ks,{begin:/\[/,end:/\]/,relevance:0,contains:[ks]}]},KAe={scope:"title",begin:KC,relevance:0},ZAe={scope:"title",begin:bp,relevance:0},GAe={begin:"\\.\\s*"+bp,relevance:0},JAe=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 ma=Object.freeze({__proto__:null,APOS_STRING_MODE:RAe,BACKSLASH_ESCAPE:ks,BINARY_NUMBER_MODE:UAe,BINARY_NUMBER_RE:JC,COMMENT:Du,C_BLOCK_COMMENT_MODE:PAe,C_LINE_COMMENT_MODE:HAe,C_NUMBER_MODE:qAe,C_NUMBER_RE:GC,END_SAME_AS_BEGIN:JAe,HASH_COMMENT_MODE:VAe,IDENT_RE:KC,MATCH_NOTHING_RE:TAe,METHOD_GUARD:GAe,NUMBER_MODE:jAe,NUMBER_RE:ZC,PHRASAL_WORDS_MODE:$Ae,QUOTE_STRING_MODE:zAe,REGEXP_MODE:WAe,RE_STARTERS_RE:LAe,SHEBANG:IAe,TITLE_MODE:KAe,UNDERSCORE_IDENT_RE:bp,UNDERSCORE_TITLE_MODE:ZAe});function XAe(e,r){e.input[e.index-1]==="."&&r.ignoreMatch()}function QAe(e,r){e.className!==void 0&&(e.scope=e.className,delete e.className)}function YAe(e,r){r&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=XAe,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ewe(e,r){Array.isArray(e.illegal)&&(e.illegal=mp(...e.illegal))}function twe(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 rwe(e,r){e.relevance===void 0&&(e.relevance=1)}const nwe=(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},iwe=["of","and","for","in","not","or","if","then","parent","list","value"],owe="keyword";function XC(e,r,n=owe){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,swe(u[0],u[1])]})}}function swe(e,r){return r?Number(r):awe(e)?0:1}function awe(e){return iwe.includes(e.toLowerCase())}const b1={},Kn=e=>{console.error(e)},y1=(e,...r)=>{console.log("WARN: ".concat(e),...r)},vi=(e,r)=>{b1["".concat(e,"/").concat(r)]||(console.log("Deprecated as of ".concat(e,". ").concat(r)),b1["".concat(e,"/").concat(r)]=!0)},Kl=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 lwe(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Kn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Kl;if(typeof e.beginScope!="object"||e.beginScope===null)throw Kn("beginScope must be object"),Kl;QC(e,e.begin,{key:"beginScope"}),e.begin=gp(e.begin,{joinWith:""})}}function uwe(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Kn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Kl;if(typeof e.endScope!="object"||e.endScope===null)throw Kn("endScope must be object"),Kl;QC(e,e.end,{key:"endScope"}),e.end=gp(e.end,{joinWith:""})}}function cwe(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function dwe(e){cwe(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),lwe(e),uwe(e)}function hwe(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(gp(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;[QAe,twe,dwe,nwe].forEach(d=>d(a,l)),e.compilerExtensions.forEach(d=>d(a,l)),a.__beforeBegin=null,[YAe,ewe,rwe].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 pwe(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=sn(e.classNameAliases||{}),s(e)}function YC(e){return e?e.endsWithParent||YC(e.starts):!1}function pwe(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(r){return sn(e,{variants:null},r)})),e.cachedVariants?e.cachedVariants:YC(e)?sn(e,{starts:e.starts?sn(e.starts):null}):Object.isFrozen(e)?sn(e):e}var fwe="11.10.0";class mwe extends Error{constructor(r,n){super(r),this.name="HTMLInjectionError",this.html=n}}const Rc=qC,C1=sn,v1=Symbol("nomatch"),gwe=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:SAe};function u(A){return l.noHighlightRe.test(A)}function c(A){let E=A.className+" ";E+=A.parentNode?A.parentNode.className:"";const R=l.languageDetectRe.exec(E);if(R){const B=D(R[1]);return B||(y1(s.replace("{}",R[1])),y1("Falling back to no-highlight mode for this block.",A)),B?R[1]:"no-highlight"}return E.split(/\s+/).find(B=>u(B)||D(B))}function d(A,E,R){let B="",I="";typeof E=="object"?(B=A,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=A,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(A,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=ke.case_insensitive?N[0].toLowerCase():N[0],be=V(z,K);if(be){const[je,bo]=be;if(le.addText(H),H="",I[K]=(I[K]||0)+1,I[K]<=gwe&&(rt+=bo),je.startsWith("_"))H+=N[0];else{const M=ke.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,ht[z.subLanguage]),ht[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 be=ke.classNameAliases[x[H]]||x[H],je=N[H];be?re(je,be):(X=je,te(),X=""),H++}}function Se(x,N){return x.scope&&typeof x.scope=="string"&&le.openNode(ke.classNameAliases[x.scope]||x.scope),x.beginScope&&(x.beginScope._wrap?(re(X,ke.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=NAe(x.endRe,H);if(K){if(x["on:end"]){const be=new f1(x);x["on:end"](N,be),be.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 Te(x){return z.matcher.regexIndex===0?(X+=x[0],1):($t=!0,0)}function we(x){const N=x[0],H=x.rule,K=new f1(H),be=[H.__beforeBegin,H["on:begin"]];for(const je of be)if(je&&(je(x,K),K.isMatchIgnored))return Te(N);return H.skip?X+=N:(H.excludeBegin&&(X+=N),G(),!H.returnBegin&&!H.excludeBegin&&(X=N)),Se(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 v1;const be=z;z.endScope&&z.endScope._wrap?(G(),re(N,z.endScope._wrap)):z.endScope&&z.endScope._multi?(G(),Ee(z.endScope,x)):be.skip?X+=N:(be.returnEnd||be.excludeEnd||(X+=N),G(),be.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&&Se(K.starts,x),be.returnEnd?0:N.length}function Pe(){const x=[];for(let N=z;N!==ke;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(A,")"));throw K.languageName=A,K.badRule=Re.rule,K}return 1}if(Re=N,N.type==="begin")return we(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!==v1)return K}if(N.type==="illegal"&&H==="")return 1;if(zt>1e5&&zt>N.index*3)throw new Error("potential infinite loop, way more iterations than matches");return X+=H,H.length}const ke=D(A);if(!ke)throw Kn(s.replace("{}",A)),new Error('Unknown language: "'+A+'"');const Sr=hwe(ke);let Rt="",z=B||Sr;const ht={},le=new l.__emitter(l);Pe();let X="",rt=0,Ve=0,zt=0,$t=!1;try{if(ke.__emitTokens)ke.__emitTokens(E,le);else{for(z.matcher.considerAll();;){zt++,$t?$t=!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(),Rt=le.toHTML(),{language:A,value:Rt,relevance:rt,illegal:!1,_emitter:le,_top:z}}catch(x){if(x.message&&x.message.includes("Illegal"))return{language:A,value:Rc(E),illegal:!0,relevance:0,_illegalBy:{message:x.message,index:Ve,context:E.slice(Ve-100,Ve+100),mode:x.mode,resultSoFar:Rt},_emitter:le};if(o)return{language:A,value:Rc(E),illegal:!1,relevance:0,errorRaised:x,_emitter:le,_top:z};throw x}}function p(A){const E={value:Rc(A),illegal:!1,relevance:0,_top:a,_emitter:new l.__emitter(l)};return E._emitter.addText(A),E}function f(A,E){E=E||l.languages||Object.keys(r);const R=p(A),B=E.filter(D).filter(U).map(G=>h(G,A,!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(A,E,R){const B=E&&n[E]||R;A.classList.add("hljs"),A.classList.add("language-".concat(B))}function b(A){let E=null;const R=c(A);if(u(R))return;if(T("before:highlightElement",{el:A,language:R}),A.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",A);return}if(A.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(A)),l.throwUnescapedHTML))throw new mwe("One of your code blocks includes unescaped HTML.",A.innerHTML);E=A;const B=E.textContent,I=R?d(B,{language:R,ignoreIllegals:!0}):f(B);A.innerHTML=I.value,A.dataset.highlighted="yes",m(A,R,I.language),A.result={language:I.language,re:I.relevance,relevance:I.relevance},I.secondBest&&(A.secondBest={language:I.secondBest.language,relevance:I.secondBest.relevance}),T("after:highlightElement",{el:A,result:I,text:B})}function g(A){l=C1(l,A)}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 w(){k&&C()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",w,!1);function _(A,E){let R=null;try{R=E(e)}catch(B){if(Kn("Language definition for '{}' could not be registered.".replace("{}",A)),o)Kn(B);else throw B;R=a}R.name||(R.name=A),r[A]=R,R.rawDefinition=E.bind(null,e),R.aliases&&P(R.aliases,{languageName:A})}function S(A){delete r[A];for(const E of Object.keys(n))n[E]===A&&delete n[E]}function L(){return Object.keys(r)}function D(A){return A=(A||"").toLowerCase(),r[A]||r[n[A]]}function P(A,{languageName:E}){typeof A=="string"&&(A=[A]),A.forEach(R=>{n[R.toLowerCase()]=E})}function U(A){const E=D(A);return E&&!E.disableAutodetect}function J(A){A["before:highlightBlock"]&&!A["before:highlightElement"]&&(A["before:highlightElement"]=E=>{A["before:highlightBlock"](Object.assign({block:E.el},E))}),A["after:highlightBlock"]&&!A["after:highlightElement"]&&(A["after:highlightElement"]=E=>{A["after:highlightBlock"](Object.assign({block:E.el},E))})}function Z(A){J(A),i.push(A)}function F(A){const E=i.indexOf(A);E!==-1&&i.splice(E,1)}function T(A,E){const R=A;i.forEach(function(B){B[R]&&B[R](E)})}function Y(A){return vi("10.7.0","highlightBlock will be removed entirely in v12.0"),vi("10.7.0","Please use highlightElement now."),b(A)}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:C1,addPlugin:Z,removePlugin:F}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=fwe,e.regex={concat:ci,lookahead:UC,either:mp,optional:MAe,anyNumberOfTimes:BAe};for(const A in ma)typeof ma[A]=="object"&&jC(ma[A]);return Object.assign(e,ma),e},Ti=ev({});Ti.newInstance=()=>ev({});var bwe=Ti;Ti.HighlightJS=Ti,Ti.default=Ti;var ywe=_Ae(bwe);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 k1(e){return e.value||e.children||[]}function Cwe(e){return!!ywe.getLanguage(e)}function A1({doc:e,name:r,lowlight:n,defaultLanguage:i}){const o=[];return ld(e,s=>s.type.name===r).forEach(s=>{let a=s.pos+1;const l=s.node.attrs.language||i,u=n.listLanguages(),c=l&&(u.includes(l)||Cwe(l))?k1(n.highlight(l,s.node.textContent)):k1(n.highlightAuto(s.node.textContent));tv(c).forEach(d=>{const h=a+d.text.length;if(d.classes.length){const p=ze.inline(a,h,{class:d.classes.join(" ")});o.push(p)}a=h})}),ye.create(e,o)}function vwe(e){return typeof e=="function"}function kwe({name:e,lowlight:r,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every(o=>vwe(r[o])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const i=new ge({key:new Ae("lowlight"),state:{init:(o,{doc:s})=>A1({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=ld(a.doc,p=>p.type.name===e),h=ld(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)))?A1({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 Awe=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))||[],kwe({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 wwe(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 ga,_we=new Uint8Array(16);function Ewe(){if(!ga&&(ga=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ga))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ga(_we)}var xwe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const w1={randomUUID:xwe};function Dwe(e,r,n){if(w1.randomUUID&&!r&&!e)return w1.randomUUID();e=e||{};var i=e.random||(e.rng||Ewe)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,wwe(i)}const Swe={name:"ViewSplitVerticalIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Bwe=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:!0,"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()])])])},Mwe=[],Fwe=j(Swe,Bwe,Mwe,!1,null,null);const Nwe=Fwe.exports,Owe={name:"CodeBracesIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Twe=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:!0,"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()])])])},Lwe=[],Iwe=j(Owe,Twe,Lwe,!1,null,null);const Rwe=Iwe.exports,zwe={name:"EyeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var $we=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:!0,"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()])])])},Hwe=[],Pwe=j(zwe,$we,Hwe,!1,null,null);const Vwe=Pwe.exports,jwe={name:"MarkerIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var qwe=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:!0,"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()])])])},Uwe=[],Wwe=j(jwe,qwe,Uwe,!1,null,null);const Kwe=Wwe.exports,Zwe={name:"HelpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Gwe=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:!0,"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()])])])},Jwe=[],Xwe=j(Zwe,Gwe,Jwe,!1,null,null);const Qwe=Xwe.exports,Ywe={name:"ContentCopyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var e_e=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:!0,"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()])])])},t_e=[],r_e=j(Ywe,e_e,t_e,!1,null,null);const rv=r_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,gk(t("text","Copied to the clipboard"))}catch{this.copySuccess=!1,this.copied=!0,lg("<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)}}}},n_e={name:"CodeBlockView",components:{MarkerIcon:Kwe,ContentCopy:rv,Help:Qwe,Check:lb,Eye:Vwe,ViewSplitVertical:Nwe,CodeBraces:Rwe,NcActions:ii,NcActionButton:ni,NcActionInput:Y1,NcActionLink:Vv,NcActionSeparator:ob,NcLoadingIcon:rg,NodeViewWrapper:An,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-"+Dwe()}},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 sg(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 ng(async()=>{const{default:o}=await import("./mermaid.core-CHhv7cmw.chunk.mjs").then(s=>s.b6);return{default:o}},__vite__mapDeps([4,1,2,5,3,6]),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 i_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}})])])},o_e=[],s_e=j(n_e,i_e,o_e,!1,null,"aa876a65");const a_e=s_e.exports,l_e=Awe.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 wn(a_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}}}}),u_e=De.create({name:"doc",topNode:!0,content:"block+"});function c_e(e={}){return new ge({view(r){return new d_e(r,e)}})}class d_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=Lg(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 h_e=Le.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[c_e(this.options)]}});var $d,Hd;if(typeof WeakMap<"u"){let e=new WeakMap;$d=r=>e.get(r),Hd=(r,n)=>(e.set(r,n),n)}else{const e=[];let r=0;$d=n=>{for(let i=0;i<e.length;i+=2)if(e[i]==n)return e[i+1]},Hd=(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 $d(e)||Hd(e,p_e(e))}};function p_e(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const r=f_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 w=0;w<g;w++){i[C+w]==0?i[C+w]=d:(s||(s=[])).push({type:"collision",row:c,pos:d,n:g-w});const _=v&&v[w];if(_){const S=(C+w)%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&&m_e(l,a,e),l}function f_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 m_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=g_e(u)))[c]=h)}l&&e.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function g_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 ct(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 Qr=new Ae("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 b_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 xt(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 $s(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)||y_e(r.$head);if(n)return n;throw new RangeError("No cell found around position ".concat(r.head))}function y_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 Pd(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function iv(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function yp(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 C_e(e,r,n){const i=ct(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 Oe=class Or 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 Hg(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(Pd(i)&&Pd(o)&&yp(i,o)){const s=this.$anchorCell.node(-1)!=i.node(-1);return s&&this.isRowSelection()?Or.rowSelection(i,o):s&&this.isColSelection()?Or.colSelection(i,o):new Or(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 Or(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 Or&&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 Or(r,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(r,n){return new Or(r.resolve(n.anchor),r.resolve(n.head))}static create(r,n,i=n){return new Or(r.resolve(n),r.resolve(i))}getBookmark(){return new v_e(this.$anchorCell.pos,this.$headCell.pos)}};Oe.prototype.visible=!1,ne.jsonID("cell",Oe);var v_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&&yp(n,i)?new Oe(n,i):ne.near(i,1)}};function k_e(e){if(!(e.selection instanceof Oe))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 A_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 w_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 __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=Oe.create(o,i.from);else if(a=="row"){const l=o.resolve(i.from+1);s=Oe.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=Oe.create(o,u+1,c)}}else i instanceof Q&&A_e(i)?s=Q.create(o,i.from):i instanceof Q&&w_e(i)&&(s=Q.create(o,i.$from.start(),i.$from.end()));return s&&(r||(r=e.tr)).setSelection(s),r}var E_e=new Ae("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=x_e(e,o,s,n))};return r?r.doc!=e.doc&&lv(r.doc,e.doc,0,i):e.doc.descendants(i),n}function x_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=ct(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(E_e,{fixTables:!0})}function D_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=Vd(ct(a).row,new $(c,d,h)).content),l.push(c)}else if(s=="cell"||s=="header_cell")l.push(n||i?Vd(ct(a).row,new $(r,n,i)).content:r);else return null;return S_e(a,l)}function S_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=ct(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 Vd(e,r){const n=e.createAndFill();return new Xd(n).replace(0,n.content.size,r).doc}function B_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 M_e(e,r,n,i,o,s,a){const l=e.doc.type.schema,u=ct(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 _1(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 E1(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 x1(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}M_e(h,a,s,n,c,d,p)&&f(),_1(h,a,s,n,u,c,l,p)&&f(),_1(h,a,s,n,u,c,d,p)&&f(),E1(h,a,s,n,l,d,u,p)&&f(),E1(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 Oe(h.doc.resolve(n+a.positionAt(l,u,s)),h.doc.resolve(n+a.positionAt(d-1,c-1,s)))),r(h)}var F_e=sh({ArrowLeft:ba("horiz",-1),ArrowRight:ba("horiz",1),ArrowUp:ba("vert",-1),ArrowDown:ba("vert",1),"Shift-ArrowLeft":ya("horiz",-1),"Shift-ArrowRight":ya("horiz",1),"Shift-ArrowUp":ya("vert",-1),"Shift-ArrowDown":ya("vert",1),Backspace:Ca,"Mod-Backspace":Ca,Delete:Ca,"Mod-Delete":Ca});function Ha(e,r,n){return n.eq(e.selection)?!1:(r&&r(e.tr.setSelection(n).scrollIntoView()),!0)}function ba(e,r){return(n,i,o)=>{if(!o)return!1;const s=n.selection;if(s instanceof Oe)return Ha(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 Ha(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),Ha(n,i,c)}}}function ya(e,r){return(n,i,o)=>{if(!o)return!1;const s=n.selection;let a;if(s instanceof Oe)a=s;else{const u=cv(o,e,r);if(u==null)return!1;a=new Oe(n.doc.resolve(u))}const l=ov(a.$headCell,e,r);return l?Ha(n,i,new Oe(a.$anchorCell,l)):!1}}function Ca(e,r){const n=e.selection;if(!(n instanceof Oe))return!1;if(r){const i=e.tr,o=ct(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 N_e(e,r){const n=e.state.doc,i=go(n.resolve(r));return i?(e.dispatch(e.state.tr.setSelection(new Oe(i))),!0):!1}function O_e(e,r,n){if(!xt(e.state))return!1;let i=D_e(n);const o=e.state.selection;if(o instanceof Oe){i||(i={width:1,height:1,rows:[O.from(Vd(ct(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=B_e(i,l.right-l.left,l.bottom-l.top),x1(e.state,e.dispatch,a,l,i),!0}else if(i){const s=$s(e.state),a=s.start(-1);return x1(e.state,e.dispatch,a,He.get(s.node(-1)).findCell(s.pos-a),i),!0}else return!1}function T_e(e,r){var n;if(r.ctrlKey||r.metaKey)return;const i=D1(e,r.target);let o;if(r.shiftKey&&e.state.selection instanceof Oe)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=Qr.getState(e.state)==null;if(!d||!yp(u,d))if(h)d=u;else return;const p=new Oe(u,d);if(h||!e.state.selection.eq(p)){const f=e.state.tr.setSelection(p);h&&f.setMeta(Qr,u.pos),e.dispatch(f)}}function a(){e.root.removeEventListener("mouseup",a),e.root.removeEventListener("dragstart",a),e.root.removeEventListener("mousemove",l),Qr.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Qr,-1))}function l(u){const c=u,d=Qr.getState(e.state);let h;if(d!=null)h=e.state.doc.resolve(d);else if(D1(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 D1(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 L_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")),jd(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,jd(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function jd(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 Ut=new Ae("tableColumnResizing");function I_e({handleWidth:e=5,cellMinWidth:r=25,View:n=L_e,lastColumnResizable:i=!0}={}){const o=new ge({key:Ut,state:{init(s,a){var l,u;const c=(u=(l=o.spec)==null?void 0:l.props)==null?void 0:u.nodeViews,d=ct(a.schema).table.name;return n&&c&&(c[d]=(h,p)=>new n(h,r,p)),new R_e(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=Ut.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{z_e(s,a,e,r,i)},mouseleave:s=>{$_e(s)},mousedown:(s,a)=>{H_e(s,a,r)}},decorations:s=>{const a=Ut.getState(s);if(a&&a.activeHandle>-1)return W_e(s,a.activeHandle)},nodeViews:{}}});return o}var R_e=class Pa{constructor(r,n){this.activeHandle=r,this.dragging=n}apply(r){const n=this,i=r.getMeta(Ut);if(i&&i.setHandle!=null)return new Pa(i.setHandle,!1);if(i&&i.setDragging!==void 0)return new Pa(n.activeHandle,i.setDragging);if(n.activeHandle>-1&&r.docChanged){let o=r.mapping.map(n.activeHandle,-1);return Pd(r.doc.resolve(o))||(o=-1),new Pa(o,n.dragging)}return n}};function z_e(e,r,n,i,o){const s=Ut.getState(e.state);if(s&&!s.dragging){const a=V_e(r.target);let l=-1;if(a){const{left:u,right:c}=a.getBoundingClientRect();r.clientX-u<=n?l=S1(e,r,"left",n):c-r.clientX<=n&&(l=S1(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 $_e(e){const r=Ut.getState(e.state);r&&r.activeHandle>-1&&!r.dragging&&dv(e,-1)}function H_e(e,r,n){var i;const o=(i=e.dom.ownerDocument.defaultView)!=null?i:window,s=Ut.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=e.state.doc.nodeAt(s.activeHandle),l=P_e(e,s.activeHandle,a.attrs);e.dispatch(e.state.tr.setMeta(Ut,{setDragging:{startX:r.clientX,startWidth:l}}));function u(d){o.removeEventListener("mouseup",u),o.removeEventListener("mousemove",c);const h=Ut.getState(e.state);h!=null&&h.dragging&&(j_e(e,h.activeHandle,B1(h.dragging,d,n)),e.dispatch(e.state.tr.setMeta(Ut,{setDragging:null})))}function c(d){if(!d.which)return u(d);const h=Ut.getState(e.state);if(h&&h.dragging){const p=B1(h.dragging,d,n);q_e(e,h.activeHandle,p,n)}}return o.addEventListener("mouseup",u),o.addEventListener("mousemove",c),r.preventDefault(),!0}function P_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 V_e(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function S1(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 B1(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(Ut,{setHandle:r}))}function j_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():U_e(p.colspan);m[f]=n,u.setNodeMarkup(a+h,null,{...p,colwidth:m})}u.docChanged&&e.dispatch(u)}function q_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&&jd(s,u.firstChild,u,i,l,n)}function U_e(e){return Array(e).fill(0)}function W_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 Jt(e){const r=e.selection,n=$s(e),i=n.node(-1),o=n.start(-1),s=He.get(i);return{...r instanceof Oe?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;C_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?ct(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 K_e(e,r){if(!xt(e))return!1;if(r){const n=Jt(e);r(hv(e.tr,n,n.left))}return!0}function Z_e(e,r){if(!xt(e))return!1;if(r){const n=Jt(e);r(hv(e.tr,n,n.right))}return!0}function G_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 J_e(e,r){if(!xt(e))return!1;if(r){const n=Jt(e),i=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;G_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 X_e(e,r,n){var i;const o=ct(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;X_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?ct(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,ct(i.type.schema).row.create(null,l)),e}function fv(e,r){if(!xt(e))return!1;if(r){const n=Jt(e);r(pv(e.tr,n,n.top))}return!0}function mv(e,r){if(!xt(e))return!1;if(r){const n=Jt(e);r(pv(e.tr,n,n.bottom))}return!0}function Q_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 Y_e(e,r){if(!xt(e))return!1;if(r){const n=Jt(e),i=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;Q_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 M1(e){const r=e.content;return r.childCount==1&&r.child(0).isTextblock&&r.child(0).childCount==0}function eEe({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 F1(e,r){const n=e.selection;if(!(n instanceof Oe)||n.$anchorCell.pos==n.$headCell.pos)return!1;const i=Jt(e),{map:o}=i;if(eEe(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{M1(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=M1(c)?u+1:d;s.replaceWith(h+i.tableStart,d+i.tableStart,l)}s.setSelection(new Oe(s.doc.resolve(u+i.tableStart))),r(s)}return!0}function N1(e,r){const n=ct(e.schema);return tEe(({node:i})=>n[i.type.spec.tableRole])(e,r)}function tEe(e){return(r,n)=>{var i;const o=r.selection;let s,a;if(o instanceof Oe){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;s=o.$anchorCell.nodeAfter,a=o.$anchorCell.pos}else{if(s=b_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=Jt(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 Oe&&h.setSelection(new Oe(h.doc.resolve(o.$anchorCell.pos),p?h.doc.resolve(p):void 0)),n(h)}return!0}}function rEe(e,r){return function(n,i){if(!xt(n))return!1;const o=$s(n);if(o.nodeAfter.attrs[e]===r)return!1;if(i){const s=n.tr;n.selection instanceof Oe?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 nEe(e){return function(r,n){if(!xt(r))return!1;if(n){const i=ct(r.schema),o=Jt(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 O1(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 As(e,r){return r=r||{useDeprecatedLogic:!1},r.useDeprecatedLogic?nEe(e):function(n,i){if(!xt(n))return!1;if(i){const o=ct(n.schema),s=Jt(n),a=n.tr,l=O1("row",s,o),u=O1("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}}As("row",{useDeprecatedLogic:!0}),As("column",{useDeprecatedLogic:!0});var iEe=As("cell",{useDeprecatedLogic:!0});function oEe(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 T1(e){return function(r,n){if(!xt(r))return!1;const i=oEe($s(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 sEe(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 aEe({allowTableNodeSelection:e=!1}={}){return new ge({key:Qr,state:{init(){return null},apply(r,n){const i=r.getMeta(Qr);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:k_e,handleDOMEvents:{mousedown:T_e},createSelectionBetween(r){return Qr.getState(r.state)!=null?r.state.selection:null},handleTripleClick:N_e,handleKeyDown:F_e,handlePaste:O_e},appendTransaction(r,n,i){return __e(i,uv(i,n),e)}})}function L1(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 lEe=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")),L1(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,L1(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}};function uEe(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 I1(e,r){return e.createAndFill()}function cEe(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 dEe(e,r,n,i,o){const s=cEe(e),a=[],l=[];for(let c=0;c<n;c+=1){const d=I1(s.cell);if(d&&l.push(d),i){const h=I1(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 hEe(e){return e instanceof Oe}const va=({editor:e})=>{const{selection:r}=e.state;if(!hEe(r))return!1;let n=0;const i=L2(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},pEe=De.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:lEe,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}=uEe(e,this.options.cellMinWidth);return["table",fe(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=dEe(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})=>K_e(e,r),addColumnAfter:()=>({state:e,dispatch:r})=>Z_e(e,r),deleteColumn:()=>({state:e,dispatch:r})=>J_e(e,r),addRowBefore:()=>({state:e,dispatch:r})=>fv(e,r),addRowAfter:()=>({state:e,dispatch:r})=>mv(e,r),deleteRow:()=>({state:e,dispatch:r})=>Y_e(e,r),deleteTable:()=>({state:e,dispatch:r})=>sEe(e,r),mergeCells:()=>({state:e,dispatch:r})=>F1(e,r),splitCell:()=>({state:e,dispatch:r})=>N1(e,r),toggleHeaderColumn:()=>({state:e,dispatch:r})=>As("column")(e,r),toggleHeaderRow:()=>({state:e,dispatch:r})=>As("row")(e,r),toggleHeaderCell:()=>({state:e,dispatch:r})=>iEe(e,r),mergeOrSplit:()=>({state:e,dispatch:r})=>F1(e,r)?!0:N1(e,r),setCellAttribute:(e,r)=>({state:n,dispatch:i})=>rEe(e,r)(n,i),goToNextCell:()=>({state:e,dispatch:r})=>T1(1)(e,r),goToPreviousCell:()=>({state:e,dispatch:r})=>T1(-1)(e,r),fixTables:()=>({state:e,dispatch:r})=>(r&&uv(e),!0),setCellSelection:e=>({tr:r,dispatch:n})=>{if(n){const i=Oe.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:va,"Mod-Backspace":va,Delete:va,"Mod-Delete":va}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[I_e({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],aEe({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){const r={name:e.name,options:e.options,storage:e.storage};return{tableRole:pe(q(e,"tableRole",r))}}}),gv=De.create({name:"tableCaption",content:"inline*",allowGapCursor:!1,addAttributes(){return{}},renderHTML(){return["caption"]},toMarkdown(e,r){},parseHTML(){return[{tag:"table caption",priority:90}]}}),fEe=De.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?[parseInt(r,10)]:null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",fe(this.options.HTMLAttributes,e),0]}}),bv=fEe.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 ge({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)}}})]}}),mEe=De.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?[parseInt(r,10)]:null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",fe(this.options.HTMLAttributes,e),0]}}),yv=mEe.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}}}}),gEe=De.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",fe(this.options.HTMLAttributes,e),0]}}),Cp=gEe.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=Cp.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 bEe(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 yEe(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 CEe(e){const r=[];return e.content.forEach(n=>{n.content.forEach((i,o,s)=>{r[s]||(r[s]=[]),r[s].push(i)})}),r}function vEe(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=pEe.extend({content:"tableCaption? tableHeadRow tableRow*",addExtensions(){return[gv,bv,yv,Cv,Cp]},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}=Jt(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}=Jt(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(xt(e))return!1;const i=bEe(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(!xt(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(!xt(e))return!1;const i=yEe($s(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",fe(this.options.HTMLAttributes,e),0]]},toMarkdown(e,r){const n=CEe(r);e.options.columnWidths=vEe(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}}}}),kEe={name:"TableView",components:{NcActionButton:ni,NcActions:ii,NodeViewWrapper:An,NodeViewContent:uo,TableSettings:RM,Delete:cu},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 AEe=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)},wEe=[],_Ee=j(kEe,AEe,wEe,!1,null,"0b453ac9");const EEe=_Ee.exports,xEe={name:"TableCellView",components:{NcActionButton:ni,NcActions:ii,NodeViewWrapper:An,NodeViewContent:uo,TableAddRowBefore:IM,TableAddRowAfter:LM,Delete:cu},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 DEe=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)])},SEe=[],BEe=j(xEe,DEe,SEe,!1,null,"7bad4a88");const MEe=BEe.exports,FEe={name:"TableHeaderView",components:{AlignHorizontalCenter:iM,AlignHorizontalLeft:oM,AlignHorizontalRight:sM,Delete:cu,NcActionButton:ni,NcActionButtonGroup:jv,NcActions:ii,NodeViewWrapper:An,NodeViewContent:uo,TableAddColumnBefore:TM,TableAddColumnAfter:OM},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 NEe=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)])},OEe=[],TEe=j(FEe,NEe,OEe,!1,null,"d05d6af6");const LEe=TEe.exports;function R1(e,r){return e.extend({addNodeView(){return wn(r)}})}const IEe=vv.extend({addNodeView(){return wn(EEe)},addExtensions(){return[gv,R1(bv,MEe),R1(yv,LEe),Cv,Cp]}}),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 Ah(e,{parent:void 0,propsData:s}),s.clientRect&&(o=Ln("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())}}}}),REe={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 zEe=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)},$Ee=[],HEe=j(REe,zEe,$Ee,!1,null,"7c3e1f7c");const PEe=HEe.exports,VEe=()=>kv({listComponent:PEe,items:({query:e})=>Uv(e),command:({editor:e,range:r,props:n})=>{e.chain().focus().insertContentAt(r,n.native+" ").run()}}),jEe=VC.extend({name:"frontMatter",draggable:!1,renderHTML({node:e,HTMLAttributes:r}){return this.parent({node:e,HTMLAttributes:fe(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 vp(this.anchor)}static valid(r){let n=r.parent;if(n.isTextblock||!qEe(r)||!UEe(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 vp{constructor(r){this.pos=r}map(r){return new vp(r.map(this.pos))}resolve(r){let n=r.resolve(this.pos);return $e.valid(n)?new $e(n):ne.near(n)}}function qEe(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 UEe(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 WEe(){return new ge({props:{decorations:JEe,createSelectionBetween(e,r,n){return r.pos==n.pos&&$e.valid(n)?new $e(n):null},handleClick:ZEe,handleKeyDown:KEe,handleDOMEvents:{beforeinput:GEe}}})}const KEe=sh({ArrowLeft:ka("horiz",-1),ArrowRight:ka("horiz",1),ArrowUp:ka("vert",-1),ArrowDown:ka("vert",1)});function ka(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 ZEe(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 GEe(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 JEe(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 XEe=Le.create({name:"gapCursor",addProseMirrorPlugins(){return[WEe()]},extendNodeSchema(e){var r;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(r=pe(q(e,"allowGapCursor",n)))!==null&&r!==void 0?r:null}}}),QEe=De.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",fe(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()}}}),YEe=QEe.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}}}),exe=De.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]),fe(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=>cd({find:new RegExp("^(#{1,".concat(e,"})\\s$")),type:this.type,getAttributes:{level:e}}))}});var Av={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 Wd.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 w=!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],w=!0;break}}w||(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})(an)})(Av);var txe=Av.exports;const rxe=Er(txe);function z1(e){const r=new Map,n=[],i=o=>{const s=rxe(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 wv=new Ae("headingAnchor");function nxe(){return new ge({key:wv,state:{init(e,{doc:r}){const n=z1(r);return{headings:n,decorations:$1(r,n)}},apply(e,r,n,i){if(!e.docChanged)return r;const o=z1(i.doc),s=ixe(r,e,o)||$1(i.doc,o);return{headings:o,decorations:s}}},props:{decorations(e){return this.getState(e).decorations}}})}function ixe(e,r,n){if(oxe(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 oxe(e,r){return e.length!==r.length||e.some(sxe(r))}const sxe=e=>(r,n)=>r.id!==e[n].id||r.level!==e[n].level;function $1(e,r){const n=r.map(axe);return ye.create(e,n)}function axe(e){return ze.widget(e.offset+1,lxe(e),{side:-1})}function lxe(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",uxe),r}function uxe(e){e.stopPropagation(),e.target.scrollIntoView(),window.location.hash=e.target.getAttribute("href")}const cxe=e=>Hc.dispatch("text/setHeadings",e),dxe=exe.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=wv.getState(e.state))==null?void 0:n.headings)!=null?i:[];cxe(r)},addProseMirrorPlugins(){return[nxe()]}}),hxe=De.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",fe(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}):GE(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[z2({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),pxe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,_v=De.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",fe(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:r})=>r.insertContent({type:this.name,attrs:e})}},addInputRules(){return[z2({find:pxe,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 fxe=Ev.exports;const mxe=Er(fxe),gxe={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 bxe=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()},yxe=[],Cxe=j(gxe,bxe,yxe,!1,null,"0f41ce0d");const vxe=Cxe.exports;class H1 extends Error{constructor(r,n){super((r==null?void 0:r.message)||t("text","Failed to load")),this.reason=r,this.imageUrl=n}}const kxe={name:"ImageView",components:{ImageIcon:xM,DeleteIcon:cu,NcButton:Zl,ShowImageModal:vxe,NodeViewWrapper:An},directives:{ClickOutside:mxe},mixins:[uu,nk],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:{...rk({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 H1(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 H1&&(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},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),lg(t("text","Could not find image in attachments list.")))},onDelete(){og("text:image-node:delete",this.imageUrl),this.deleteNode()}}};var Axe=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",{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()])])},wxe=[],_xe=j(kxe,Axe,wxe,!1,null,"0c39ea3f");const xv=_xe.exports,Exe=_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 wn(xv)},addProseMirrorPlugins(){return[new ge({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(),zs.nodes.image(e,r,n,i),e.closeBlock(r)}}),xxe=_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 wn(xv)},toMarkdown(e,r,n,i){return zs.nodes.image(e,r,n,i)}}),Dxe=Lt.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))}}),Sxe={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 Bxe=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)},Mxe=[],Fxe=j(Sxe,Bxe,Mxe,!1,null,"60040cc2");const Nxe=Fxe.exports,Oxe={components:{SuggestionListWrapper:Nxe},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 Txe=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}])})},Lxe=[],Ixe=j(Oxe,Txe,Lxe,!1,null,"651257bc");const Rxe=Ixe.exports,qd=navigator.userAgent.includes("Mac"),he={Mod:qd?"Meta":"Control",Alt:"Alt",Control:"Control",Shift:"Shift"},zxe={[he.Mod]:qd?t("text","Command"):t("text","Control"),[he.Control]:t("text","Ctrl"),[he.Alt]:t("text",qd?"Option":"Alt"),[he.Shift]:t("text","Shift")},$xe=(e,r)=>({"is-active":r,["action-menu-".concat(e.key)]:!0}),Hxe=(e,r=[])=>r.map(n=>zxe[n]).concat(e.toUpperCase()).join("+"),Pxe=({keyChar:e,keyModifiers:r=[]})=>r.map(n=>he[n]).concat(e).join("+"),P1=(e,{keyChar:r,keyModifiers:n})=>!e&&r?"(".concat(Hxe(r,n),")"):"",Vxe=(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)},jxe=e=>Array.isArray(e.isActive)?"radio":typeof e.isActive=="string"?"checkbox":"button",V1=(e,r)=>{const n=Dv(e,r);return{disabled:Vxe(e,r),class:$xe(e,n),active:n,type:jxe(e)}},kp={mixins:[ag,ik,uu,ib,nb],props:{actionEntry:{type:Object,required:!0},canBeFocussed:{type:Boolean,default:null}},data(){return{state:V1(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 Pxe(this.actionEntry)},tooltip(){return[this.label,P1(this.$isMobile,this.actionEntry)].join(" ")},listItemTooltip(){return[P1(this.$isMobile,this.actionEntry)].join(" ")}},watch:{canBeFocussed(){this.setTabIndexOnButton()}},mounted(){this.$_updateState=sg(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=V1(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()}}},qxe=Symbol("menu::id"),Ap={inject:{$menuID:{from:qxe,default:null}},computed:{menuIDSelector(){return"#".concat(this.$menuID)}}},Uxe={name:"EmojiPickerAction",components:{NcEmojiPicker:Wv,NcButton:Zl},extends:kp,mixins:[Ap],methods:{addEmoji({id:e,native:r}){this.actionEntry.action(this.$editor.chain(),{id:e,native:r}).focus().run()}}};var Wxe=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)])},Kxe=[],Zxe=j(Uxe,Wxe,Kxe,!1,null,null);const Gxe=Zxe.exports,Jxe={name:"ActionAttachmentUpload",components:{NcActions:ii,NcActionButton:ni,Loading:fd,Folder:dM,Upload:$M},extends:kp,mixins:[ok,sk,ak,lk,uk,Ap],computed:{icon(){return this.isUploadingAttachments?fd:this.actionEntry.icon},isUploadingAttachments(){return this.$uploadingState.isUploadingAttachments}}};var Xxe=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)},Qxe=[],Yxe=j(Jxe,Xxe,Qxe,!1,null,null);const e3e=Yxe.exports,t3e={name:"ActionInsertLink",components:{NcActions:ii,NcActionButton:ni,NcActionInput:Y1,Document:uM,Loading:fd,LinkOff:SM,Web:HM,Shape:FM},extends:kp,mixins:[ck,Ap],data:()=>({href:"",isInputMode:!1,startPath:null,menuOpen:!1,isUsingDirectEditing:ug("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("/")),Ek(t("text","Select file or folder to link to")).startAt(this.startPath).allowDirectories(!0).setMultiSelect(!1).setType(cg.Choose).build().pick().then(e=>{OC.Files.getClient().getFileInfo(e).then((r,n)=>{const i=new URL(Kd("/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(R2(this.$editor.state,"link")){const r=Ss(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(){eg(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 r3e=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)},n3e=[],i3e=j(t3e,r3e,n3e,!1,null,"4930d73a");const o3e=i3e.exports,G4e=[{key:"outline",forceLabel:!0,icon:xa,click:({$outlineActions:e})=>e.toggle(),label:({$outlineState:e})=>e.visible?t("text","Hide outline"):t("text","Show outline")}],Ao=[{key:"undo",label:t("text","Undo"),keyChar:"z",keyModifiers:[he.Mod],icon:zM,action:e=>e.undo(),priority:7},{key:"redo",label:t("text","Redo"),keyChar:"y",keyModifiers:[he.Mod],icon:MM,action:e=>e.redo(),priority:10},{key:"bold",label:t("text","Bold"),keyChar:"b",keyModifiers:[he.Mod],icon:hM,isActive:"strong",action:e=>e.toggleBold(),priority:8},{key:"italic",label:t("text","Italic"),keyChar:"i",keyModifiers:[he.Mod],icon:vM,isActive:"em",action:e=>e.toggleItalic(),priority:9},{key:"underline",label:t("text","Underline"),keyChar:"u",keyModifiers:[he.Mod],icon:EM,isActive:"underline",action:e=>e.toggleUnderline(),priority:13},{key:"strikethrough",label:t("text","Strikethrough"),keyChar:"s",keyModifiers:[he.Mod,he.Shift],icon:_M,isActive:"strike",action:e=>e.toggleStrike(),priority:14},{key:"headings",label:t("text","Headings"),keyChar:"1…6",keyModifiers:[he.Mod,he.Shift],icon:sf,isActive:"heading",children:[{key:"headings-h1",label:t("text","Heading 1"),keyChar:"1",keyModifiers:[he.Mod,he.Shift],icon:sf,isActive:["heading",{level:1}],action:e=>e.toggleHeading({level:1})},{key:"headings-h2",label:t("text","Heading 2"),keyChar:"2",keyModifiers:[he.Mod,he.Shift],icon:pM,isActive:["heading",{level:2}],action:e=>e.toggleHeading({level:2})},{key:"headings-h3",label:t("text","Heading 3"),keyChar:"3",keyModifiers:[he.Mod,he.Shift],icon:fM,isActive:["heading",{level:3}],action:e=>e.toggleHeading({level:3})},{key:"headings-h4",label:t("text","Heading 4"),keyChar:"4",keyModifiers:[he.Mod,he.Shift],isActive:["heading",{level:4}],icon:mM,action:e=>e.toggleHeading({level:4})},{key:"headings-h5",label:t("text","Heading 5"),keyChar:"5",keyModifiers:[he.Mod,he.Shift],isActive:["heading",{level:5}],icon:gM,action:e=>e.toggleHeading({level:5})},{key:"headings-h6",label:t("text","Heading 6"),keyChar:"6",keyModifiers:[he.Mod,he.Shift],isActive:["heading",{level:6}],icon:bM,action:e=>e.toggleHeading({level:6})},{key:"headings-separator",isSeparator:!0,visible:({$outlineState:e})=>e.enable},{key:"outline",icon:xa,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:[he.Mod,he.Shift],isActive:[{isList:!0}],icon:xa,children:[{key:"unordered-list",label:t("text","Unordered list"),keyChar:"8",keyModifiers:[he.Mod,he.Shift],isActive:"bulletList",icon:xa,action:e=>e.toggleBulletList()},{key:"ordered-list",label:t("text","Ordered list"),keyChar:"7",keyModifiers:[he.Mod,he.Shift],isActive:"orderedList",icon:AM,action:e=>e.toggleOrderedList()},{key:"task-list",label:t("text","To-Do list"),keyChar:"9",keyModifiers:[he.Mod,he.Shift],isActive:"taskList",icon:kM,action:e=>e.toggleTaskList()},{key:"lists-separator",isSeparator:!0},{key:"list-indent-increase",label:t("text","Increase indentation"),keyChar:"Tab",icon:CM,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:[he.Shift],icon:yM,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:DM,component:o3e,priority:3},{key:"blockquote",label:t("text","Blockquote"),keyChar:"b",keyModifiers:[he.Mod,he.Shift],isActive:"blockquote",icon:wM,action:e=>e.toggleBlockquote(),priority:11},{key:"callouts",label:t("text","Callouts"),visible:!1,icon:xl,isActive:"callout",children:[{key:"callout-info",label:t("text","Info"),isActive:["callout",{type:"info"}],icon:xl,action:e=>e.toggleCallout({type:"info"})},{key:"callout-success",label:t("text","Success"),isActive:["callout",{type:"success"}],icon:pb,action:e=>e.toggleCallout({type:"success"})},{key:"callout-warn",label:t("text","Warning"),isActive:["callout",{type:"warn"}],icon:fb,action:e=>e.toggleCallout({type:"warn"})},{key:"callout-error",label:t("text","Danger"),isActive:["callout",{type:"error"}],icon:hb,action:e=>e.toggleCallout({type:"error"})}],priority:4},{key:"code-block",label:t("text","Code block"),keyChar:"c",keyModifiers:[he.Mod,he.Alt],isActive:"codeBlock",icon:lM,action:e=>e.toggleCodeBlock(),priority:12},{key:"table",label:t("text","Table"),isActive:"table",icon:NM,action:e=>e.insertTable(),priority:15},{key:"emoji-picker",label:t("text","Insert emoji"),icon:cM,component:Gxe,action:(e,r={})=>e.emoji(r),priority:5},{key:"insert-attachment",label:t("text","Insert attachment"),icon:BM,component:e3e,priority:6}],s3e=t("text","Formatting"),a3e=t("text","Smart picker"),l3e=e=>["undo","redo","outline","emoji-picker"].indexOf(e.key)>-1,j1=["task-list","table"],u3e=e=>[/\*\*.*?\*\*/,/\*.*?\*/,/\[.*?\(.*?\)/,/^#{1,6}\s.*$/,/^\s*[-+*]\s.*/m,/^\s\d\..*/m,/^>+\s.*/,/`.*?`/].some(r=>r.test(e)),c3e=e=>{try{return Ui.parse(e),!0}catch{return!1}},d3e=e=>{try{return!!new URL(e)}catch{return!1}},h3e=e=>[...e.filter(r=>j1.indexOf(r.key)>-1),...e.filter(r=>j1.indexOf(r.key)===-1)],p3e=e=>h3e([...Ao.find(r=>r.key==="headings").children,...Ao.find(r=>r.key==="lists").children,...Ao.filter(r=>r.action&&!l3e(r)),...Ao.find(r=>r.key==="callouts").children,{...Ao.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:s3e}))),f3e=()=>kv({listComponent:Rxe,command:({editor:e,range:r,props:n})=>{if(n.action){const i=e.chain().deleteRange(r);n.action(i),i.run();return}eg(n.providerId,!0).then(i=>{if(!d3e(i)){const o=u3e(i)&&c3e(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:a3e,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())}),...p3e(r).filter(({action:n,isActive:i})=>{const o=n(e==null?void 0:e.can()),s=i&&Dv({isActive:i},e);return o&&!s})]}),m3e=new Ae("linkPicker"),g3e=Le.create({name:"linkPicker",addOptions(){return{suggestion:{char:"/",allowedPrefixes:[" "],pluginKey:m3e,allow:({state:e,range:r})=>e.doc.resolve(r.from).parent.type.name!=="codeBlock",...f3e()}}},addProseMirrorPlugins(){return[Gh({editor:this.editor,...this.options.suggestion})]}}),wp=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("#")||ug("core","active-app","")==="collectives"||n.includes("/apps/collectives/"))return n;const i=n.match(/^([^?]*)\?fileId=(\d+)/);if(i){const[,,s]=i;return new URL(Kd("/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(Kd("/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+"#"))},b3e={name:"PencilIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var y3e=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:!0,"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()])])])},C3e=[],v3e=j(b3e,y3e,C3e,!1,null,null);const k3e=v3e.exports,A3e=["http:","https:"],w3e={name:"LinkBubbleView",components:{CheckIcon:lb,CloseIcon:ab,ContentCopyIcon:rv,NcButton:Zl,NcLoadingIcon:rg,NcReferenceList:sb,NcTextField:Zv,LinkOffIcon:cb,PencilIcon:k3e},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&&A3e.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 _3e=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)},E3e=[],x3e=j(w3e,_3e,E3e,!1,null,"4b82257e");const D3e=x3e.exports;var Ki,ws;class S3e{constructor({view:r,options:n,plugin:i}){Mu(this,Ki,null);Mu(this,ws,null);Ep(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,ws).commands.hideLinkBubble()});this.options=n,this.view=r,this.plugin=i,Fu(this,ws,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 Ah(D3e,{parent:this.options.parent,propsData:{editor:this.options.editor,href:null}})),this.tippy=Ln(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:wp(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,ws=new WeakMap;function B3e({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=q1(a,l);if(c)return c;const d=s.nodeBefore;return d?q1(d,l-d.nodeSize):null}function q1(e,r){const n=M3e(e);return n?{mark:n,nodeStart:r}:null}function M3e(e){const r=e==null?void 0:e.marks.find(n=>n.type.name==="link");if(r&&!Su(r.attrs.href))return r}const F3e=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 Ae("linkBubble");function N3e(e){const r=new ge({key:Wi,state:{init:()=>({active:null}),apply:(n,i)=>{const o=n.getMeta(Wi);return o?{...i,active:o.active}:i}},view:n=>new S3e({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=B3e(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 F3e(d)(u,c)},handleDOMEvents:{keydown:(n,i)=>{const{state:o,dispatch:s}=n;if(i.key==="Escape")return Bv(o,s)}}}});return r}const O3e=new Ae("textHandleClickLink");function T3e(){return new ge({key:O3e,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");r.button===0&&n&&(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 L3e=Le.create({name:"linkViewBubble",addCommands(){return{hideLinkBubble:()=>({state:e,dispatch:r})=>Bv(e,r)}},addProseMirrorPlugins(){return[N3e({editor:this.editor,parent:this.editor.contentComponent})]}}),I3e=De.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",fe(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)}}}),R3e=new Ae("mention"),z3e=De.create({name:"mention",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",fe(this.HTMLAttributes,e.HTMLAttributes),"".concat(e.suggestion.char).concat((n=r.attrs.label)!==null&&n!==void 0?n:r.attrs.id)]},suggestion:{char:"@",pluginKey:R3e,command:({editor:e,range:r,props:n})=>{var i,o;const s=e.view.state.selection.$to.nodeAfter;!((i=s==null?void 0:s.text)===null||i===void 0)&&i.startsWith(" ")&&(r.to+=1),e.chain().focus().insertContentAt(r,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),(o=window.getSelection())===null||o===void 0||o.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",fe({"data-type":this.name},this.options.HTMLAttributes,r),this.options.renderLabel({options:this.options,node:e})];const n={...this.options};n.HTMLAttributes=fe({"data-type":this.name},this.options.HTMLAttributes,r);const i=this.options.renderHTML({options:n,node:e});return typeof i=="string"?["span",fe({"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[Gh({editor:this.editor,...this.options.suggestion})]}}),$3e={name:"Mention",components:{NcUserBubble:A4,NodeViewWrapper:An},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=ig())==null?void 0:e.uid)}}};var H3e=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)},P3e=[],V3e=j($3e,H3e,P3e,!1,null,"4024ec45");const j3e=V3e.exports,q3e=z3e.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",fe({"data-type":"user",class:"mention"},this.options.HTMLAttributes,r),this.options.renderHTML({options:this.options,node:e})]},addNodeView(){return wn(j3e)},toMarkdown(e,r){e.write("@[".concat(r.attrs.label,"](mention://user/").concat(encodeURIComponent(r.attrs.id),")"))}}),Ud=new Ae("searchQuery");function U3e(){return new ge({key:Ud,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 W3e=(e,r)=>({tr:n})=>n.setMeta("searchQuery",{query:e,matchAll:r}),K3e=()=>({tr:e})=>e.setMeta("searchQuery",{match:1}),Z3e=()=>({tr:e})=>e.setMeta("searchQuery",{match:-1});function G3e(){return new ge({key:new Ae("searchDecorations"),state:{init(e,{doc:r}){const n=U1(r,"");return W1(r,n.results)},apply(e,r,n,i){const o=Ud.getState(n),s=Ud.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}=U1(e.doc,s.query,{matchAll:s.matchAll,index:s.index});return og("text:editor:search-results",{totalMatches:s.query===""?null:d,matchIndex:h}),W1(e.doc,c)}else return r}},props:{decorations(e){return this.getState(e)}}})}function U1(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=J3e(n.index,i.length);return{results:[(a=i[l])!=null?a:i],total:i.length,index:l}}}function W1(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 J3e(e,r){return r<1?0:e<0?(e%r+r)%r:e%r}const X3e=Le.create({name:"Search",addCommands(){return{setSearchQuery:W3e,nextMatch:K3e,previousMatch:Z3e}},addProseMirrorPlugins(){return[U3e(),G3e()]}}),Q3e=De.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",fe(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)}}}),K1=Lt.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",fe(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:r})=>{const n=Ss(e,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:r.unsetMark(this.name)}}}}),Z1=/^(\d+)\.\s$/,Y3e=De.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",fe(this.options.HTMLAttributes,n),0]:["ol",fe(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(Q3e.name,this.editor.getAttributes(K1.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=pn({find:Z1,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=pn({find:Z1,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:r=>({start:+r[1],...this.editor.getAttributes(K1.name)}),joinPredicate:(r,n)=>n.childCount+n.attrs.start===+r[1],editor:this.editor})),[e]}}),eDe=Y3e.extend({addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),isList:{default:!0,rendered:!1}}}}),tDe=De.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",fe(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});function G1(e){const r=[];return e.descendants((n,i)=>{rDe(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 rDe(e){if(e.type.name!=="paragraph"||nDe(e))return!1;const r=iDe(e.firstChild);return!(!r||Su(r))}function nDe(e){return e.childCount>2||e.childCount===2&&e.lastChild.textContent.trim()}function iDe(e){var r;return e?(r=e.marks.find(n=>n.type.name==="link"))==null?void 0:r.attrs.href:void 0}const oDe={name:"DotsVerticalIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var sDe=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:!0,"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()])])])},aDe=[],lDe=j(oDe,sDe,aDe,!1,null,null);const uDe=lDe.exports,cDe={name:"PreviewOptions",components:{DotsVerticalIcon:uDe,NcActions:ii,NcActionButton:ni,NcActionCaption:YD,NcActionRadio:i4,NcActionSeparator:ob,DeleteIcon:ub},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 dDe=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)},hDe=[],pDe=j(cDe,dDe,hDe,!1,null,"aa76e56a");const fDe=pDe.exports,mDe=new Ae("linkParagraphMenu");function gDe({editor:e}){return new ge({key:mDe,state:{init(r,{doc:n}){if(!e.options.editable)return{decorations:ye.create()};const i=G1(n);return{linkParagraphs:i,decorations:J1(n,i,e)}},apply(r,n,i,o){if(!r.docChanged||!e.options.editable)return n;const s=G1(o.doc),a=bDe(n,r,s)||J1(o.doc,s,e);return{linkParagraphs:s,decorations:a}}},props:{decorations(r){return this.getState(r).decorations}}})}function bDe(e,r,n){if(yDe(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 yDe(e,r){return e.length!==r.length||e.some(CDe(r))}const CDe=e=>(r,n)=>r.type!==e[n].type||r.nodeSize!==e[n].nodeSize;function J1(e,r,n){const i=r.map(o=>vDe(o,n));return ye.create(e,i)}function vDe(e,r){return ze.widget(e.offset+1,kDe(e,r),{side:-1})}function kDe(e,r){const n={$editor:r,...e},i=document.createElement("div"),o=Zn.extend(fDe);return new o({propsData:n}).$mount(i).$el}const ADe=tDe.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[gDe({editor:this.editor})]}}),wDe=Le.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new ge({key:new Ae("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&&ph(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)}}})]}}),_De={name:"Preview",components:{NodeViewWrapper:An,NodeViewContent:uo,NcReferenceList:sb},props:UD};var EDe=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)},xDe=[],DDe=j(_De,EDe,xDe,!1,null,"72691579");const SDe=DDe.exports,BDe=De.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:wp(e,this.options.relativePath),rel:"noopener noreferrer nofollow"},0]},addNodeView(){return wn(SDe)},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})=>NDe(e)&&r().setNode(this.name,MDe(e)).run(),unsetPreview:()=>({state:e,chain:r})=>FDe(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 MDe({selection:e}){const{$from:r}=e;return{href:Mv(r.nodeAfter),title:"preview"}}function FDe(e,r,n){const i=Ze(e,n.schema);return hn(n,i,r)}function NDe({selection:e}){const{$from:r}=e;if(ODe(r.parent))return!1;const n=Mv(r.parent.firstChild);return!(!n||Su(n))}function ODe(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 TDe=/^\s*(\[([( |x])?\])\s$/,LDe=De.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",fe(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("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(),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[pn({find:TDe,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),IDe=(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}}},RDe=LDe.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",fe(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(),pn({find:/^\s*([-+*])\s(\[(x|X|\s)?\])\s$/,type:this.type,getAttributes:e=>({checked:"xX".includes(e[e.length-1])})})]},addProseMirrorPlugins(){return[new ge({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=IDe(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)}}})]}}),zDe=De.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",fe(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()}}}),$De=zDe.extend({parseHTML:[{priority:100,tag:"ul.contains-task-list"}],renderHTML({HTMLAttributes:e}){return["ul",fe(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 X1({types:e,node:r}){return Array.isArray(e)&&e.includes(r.type)||r.type===e}const HDe=Le.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:["paragraph"]}},addProseMirrorPlugins(){const e=new Ae(this.name),r=Object.entries(this.editor.schema.nodes).map(([,n])=>n).filter(n=>this.options.notAfter.includes(n.name));return[new ge({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!X1({node:o,types:r})},apply:(n,i)=>{if(!n.docChanged)return i;const o=n.doc.lastChild;return!X1({node:o,types:r})}}})]}}),PDe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,VDe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,jDe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,qDe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,UDe=Lt.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",fe(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[zr({find:PDe,type:this.type}),zr({find:jDe,type:this.type})]},addPasteRules(){return[$r({find:VDe,type:this.type}),$r({find:qDe,type:this.type})]}});function WDe(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function KDe(e){return new ge({key:new Ae("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=$E(n.doc,[...r]);if(ZE(l).forEach(({newRange:u})=>{const c=PE(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(!WDe(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 ZDe(e){return new ge({key:new Ae("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=I2(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 GDe(e){return new ge({key:new Ae("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=tg(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 JDe=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function Q1(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(JDe,"").match(new RegExp("^(?:(?:".concat(n.join("|"),"):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))"),"i"))}const XDe=Lt.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(e=>{if(typeof e=="string"){Sp(e);return}Sp(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||!Q1(r,this.options.protocols)?!1:null}}]},renderHTML({HTMLAttributes:e}){return Q1(e.href,this.options.protocols)?["a",fe(this.options.HTMLAttributes,e),0]:["a",fe(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[$r({find:e=>{const r=[];if(e){const{validate:n}=this.options,i=tg(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(KDe({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate})),this.options.openOnClick===!0&&e.push(ZDe({type:this.type})),this.options.linkOnPaste&&e.push(GDe({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}}),QDe=["http:","https:","mailto:","tel:"],YDe=e=>({href:e.groups.href}),e4e=e=>(e.pop(),YDe(e)),t4e=XDe.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=QDe.includes(n.protocol)?wp(r,this.options.relativePath):"#";return["a",{...r.attrs,href:i,"data-md-href":r.attrs.href,rel:"noopener noreferrer nofollow"},0]},addInputRules(){return[zr({find:/(?:^|\s)\[([\w|\s|-]+)\]\((?<href>.+?)\)$/gm,type:this.type,getAttributes:e4e})]},addProseMirrorPlugins(){return[...this.parent().filter(({key:e})=>!e.startsWith("handleClickLink")&&!e.startsWith("textHandleClickLink")),T3e()]}}),r4e=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,n4e=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,i4e=Lt.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",fe(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[zr({find:r4e,type:this.type})]},addPasteRules(){return[$r({find:n4e,type:this.type})]}}),o4e=i4e.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,s4e=Lt.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",fe(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[zr({find:Fv,type:this.type}),zr({find:Ov,type:this.type})]},addPasteRules(){return[$r({find:Nv,type:this.type}),$r({find:Tv,type:this.type})]}}),a4e=s4e.extend({name:"strong",addInputRules(){return[zr({find:Fv,type:this.type})]},addPasteRules(){return[$r({find:Nv,type:this.type})]}}),l4e=Lt.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",fe(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()}}}),u4e=l4e.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[zr({find:Ov,type:this.type})]},addPasteRules(){return[$r({find:Tv,type:this.type})]}}),c4e=UDe.extend({name:"em"});de.registerAlias("plaintext","mermaid");const J4e=Le.create({name:"RichText",addOptions(){return{editing:!0,extensions:[],component:null,relativePath:null,isEmbedded:!1}},addExtensions(){const e=[this.options.editing?ICe:null,u_e,lC,ADe,YEe,dxe,a4e,c4e,o4e,sAe,yAe,kAe,l_e.configure({lowlight:de,defaultLanguage:"plaintext"}),cAe,hxe,eDe,I3e,this.options.editing?IEe:vv,$De,RDe,bAe,BDe.configure({isEmbedded:this.options.isEmbedded}),u4e,Exe,xxe,h_e,XEe,Dxe,jEe,q3e,X3e,nN.configure({suggestion:VEe()}),g3e,t4e.configure({openOnClick:!0,validate:n=>/^https?:\/\//.test(n),relativePath:this.options.relativePath}),L3e,this.options.editing?wDe.configure({placeholder:Li("text","Start writing, or try '/' to add, '@' to mention…")}):null,HDe],r=this.options.extensions.map(n=>n.name);return[...e.filter(n=>n&&!r.includes(n.name)),...this.options.extensions]}});export{fo as $,I4e as A,T4e as B,Dr as C,L4e as D,Le as E,oF as F,no as G,qn as H,Be as I,N4e as J,V4e as K,kv as L,de as M,q3e as N,F4e as O,ge as P,W4e as Q,J4e as R,Nxe as S,Z4e as T,L9 as U,Awe as V,w4e as W,Ui as X,ei as Y,A4e as Z,$n as _,$i as a,bn as a0,q4e as a1,E4e as a2,ub as a3,k3e as a4,U6 as a5,nM as a6,ob as a7,JE as a8,K4e as a9,U4e as aa,Ae as ab,Oo as ac,kp as ad,uu as ae,nb as af,Ap as ag,Dv as ah,V1 as ai,G4e as aj,S4e as ak,x4e as al,B4e as am,Ao as an,D4e as ao,qxe as ap,_4e as aq,M4e as ar,KD as as,ZD as at,VC as au,ib as av,Hi as b,Ns as c,ai as d,oc as e,Vr as f,MF as g,Ke as h,Lf as i,At as j,j4e as k,R4e as l,z4e as m,P4e as n,Dt as o,H4e as p,St as q,me as r,$4e as s,tr as t,xr as u,fn as v,ce as w,O4e as x,L8 as y,OF as z};