PageSourceSearch

https://rooftopapp.com/chunk-POZCZV7Q.js

js rooftopapp.com collected 2026-10-04 20:05:02 UTC 579,223 bytes, 640 lines download raw bytes

vendor: 8,598 bytes, line 1
1import{a as du}from"./chunk-XS2CIZ4P.js";import{a as fu}from"./chunk-6G6O36CX.js";import{Ac as ou,Dc as su,Ga as Va,Oc as lu,Pa as Ql,Vb as Zl,Vd as cu,Wb as eu,dc as Wa,ec as ja,fa as Xl,fc as tu,gd as uu,hd as Xn,jb as Ua,la as za,nc as ru,rc as nu,sc as iu,tc as au,xb as Yl}from"./chunk-7GTDZMJG.js";function ke(r){this.content=r}ke.prototype={constructor:ke,find:function(r){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===r)return e;return-1},get:function(r){var e=this.find(r);return e==-1?void 0:this.content[e+1]},update:function(r,e,t){var n=t&&t!=r?this.remove(t):this,i=n.find(r),a=n.content.slice();return i==-1?a.push(t||r,e):(a[i+1]=e,t&&(a[i]=t)),new ke(a)},remove:function(r){var e=this.find(r);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ke(t)},addToStart:function(r,e){return new ke([r,e].concat(this.remove(r).content))},addToEnd:function(r,e){var t=this.remove(r).content.slice();return t.push(r,e),new ke(t)},addBefore:function(r,e,t){var n=this.remove(e),i=n.content.slice(),a=n.find(r);return i.splice(a==-1?i.length:a,0,e,t),new ke(i)},forEach:function(r){for(var e=0;e<this.content.length;e+=2)r(this.content[e],this.content[e+1])},prepend:function(r){return r=ke.from(r),r.size?new ke(r.content.concat(this.subtract(r).content)):this},append:function(r){return r=ke.from(r),r.size?new ke(this.subtract(r).content.concat(r.content)):this},subtract:function(r){var e=this;r=ke.from(r);for(var t=0;t<r.content.length;t+=2)e=e.remove(r.content[t]);return e},toObject:function(){var r={};return this.forEach(function(e,t){r[e]=t}),r},get size(){return this.content.length>>1}};ke.from=function(r){if(r instanceof ke)return r;var e=[];if(r)for(var t in r)e.push(t,r[t]);return new ke(e)};var Ga=ke;function Cu(r,e,t){for(let n=0;;n++){if(n==r.childCount||n==e.childCount)return r.childCount==e.childCount?null:t;let i=r.child(n),a=e.child(n);if(i==a){t+=i.nodeSize;continue}if(!i.sameMarkup(a))return t;if(i.isText&&i.text!=a.text){for(let o=0;i.text[o]==a.text[o];o++)t++;return t}if(i.content.size||a.content.size){let o=Cu(i.content,a.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function Tu(r,e,t,n){for(let i=r.childCount,a=e.childCount;;){if(i==0||a==0)return i==a?null:{a:t,b:n};let o=r.child(--i),s=e.child(--a),l=o.nodeSize;if(o==s){t-=l,n-=l;continue}if(!o.sameMarkup(s))return{a:t,b:n};if(o.isText&&o.text!=s.text){let u=0,c=Math.min(o.text.length,s.text.length);for(;u<c&&o.text[o.text.length-u-1]==s.text[s.text.length-u-1];)u++,t--,n--;return{a:t,b:n}}if(o.content.size||s.content.size){let u=Tu(o.content,s.content,t-1,n-1);if(u)return u}t-=l,n-=l}}var T=class r{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,i=0,a){for(let o=0,s=0;s<t;o++){let l=this.content[o],u=s+l.nodeSize;if(u>e&&n(l,i+s,a||null,o)!==!1&&l.content.size){let c=s+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,t-c),n,i+c)}s=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,i){let a="",o=!0;return this.nodesBetween(e,t,(s,l)=>{let u=s.isText?s.text.slice(Math.max(e,l)-l,t-l):s.isLeaf?i?typeof i=="function"?i(s):i:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&u||s.isTextblock)&&n&&(o?o=!1:a+=n),a+=u},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,i=this.content.slice(),a=0;for(t.isText&&t.sameMarkup(n)&&(i[i.length-1]=t.withText(t.text+n.text),a=1);a<e.content.length;a++)i.push(e.content[a]);return new r(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let n=[],i=0;if(t>e)for(let a=0,o=0;o<t;a++){let s=this.content[a],l=o+s.nodeSize;l>e&&((o<e||l>t)&&(s.isText?s=s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s=s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),n.push(s),i+=s.nodeSize),o=l}return new r(n,i)}cutByIndex(e,t){return e==t?r.empty:e==0&&t==this.content.length?this:new r(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let i=this.content.slice(),a=this.size+t.nodeSize-n.nodeSize;return i[e]=t,new r(i,a)}addToStart(e){return new r([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new r(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let i=this.content[t];e(i,n,t),n+=i.nodeSize}}findDiffStart(e,t=0){return Cu(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Tu(this,e,t,n)}findIndex(e){if(e==0)return Qn(0,e);if(e==this.size)return Qn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let i=this.child(t),a=n+i.nodeSize;if(a>=e)return a==e?Qn(t+1,a):Qn(t,n);n=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return r.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new r(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return r.empty;let t,n=0;for(let i=0;i<e.length;i++){let a=e[i];n+=a.nodeSize,i&&a.isText&&e[i-1].sameMarkup(a)?(t||(t=e.slice(0,i)),t[t.length-1]=a.withText(t[t.length-1].text+a.text)):t&&t.push(a)}return new r(t||e,n)}static from(e){if(!e)return r.empty;if(e instanceof r)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new r([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};T.empty=new T([],0);var Ka={index:0,offset:0};function Qn(r,e){return Ka.index=r,Ka.offset=e,Ka}function Zn(r,e){if(r===e)return!0;if(!(r&&typeof r=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(r);if(Array.isArray(e)!=t)return!1;if(t){if(r.length!=e.length)return!1;for(let n=0;n<r.length;n++)if(!Zn(r[n],e[n]))return!1}else{for(let n in r)if(!(n in e)||!Zn(r[n],e[n]))return!1;for(let n in e)if(!(n in r))return!1}return!0}var _=(()=>{class r{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,i=!1;for(let a=0;a<t.length;a++){let o=t[a];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,a));else{if(o.type.excludes(this.type))return t;!i&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,a)),n.push(this),i=!0),n&&n.push(o)}}return n||(n=t.slice()),i||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Zn(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let i=t.marks[n.type];if(!i)throw new RangeError(`There is no mark type ${n.type} in this schema`);let a=i.create(n.attrs);return i.checkAttrs(a.attrs),a}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let i=0;i<t.length;i++)if(!t[i].eq(n[i]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return r.none;if(t instanceof r)return[t];let n=t.slice();return n.sort((i,a)=>i.type.rank-a.type.rank),n}}return r.none=[],r})(),jt=class extends Error{},M=class r{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=Eu(this.content,e+this.openStart,t);return n&&new r(n,this.openStart,this.openEnd)}removeBetween(e,t){return new r(xu(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return r.empty;
vendor: 5,748 bytes, line 1
1let n=t.openStart||0,i=t.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new r(T.fromJSON(e,t.content),n,i)}static maxOpen(e,t=!0){let n=0,i=0;for(let a=e.firstChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.firstChild)n++;for(let a=e.lastChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.lastChild)i++;return new r(e,n,i)}};M.empty=new M(T.empty,0,0);function xu(r,e,t){let{index:n,offset:i}=r.findIndex(e),a=r.maybeChild(n),{index:o,offset:s}=r.findIndex(t);if(i==e||a.isText){if(s!=t&&!r.child(o).isText)throw new RangeError("Removing non-flat range");return r.cut(0,e).append(r.cut(t))}if(n!=o)throw new RangeError("Removing non-flat range");return r.replaceChild(n,a.copy(xu(a.content,e-i-1,t-i-1)))}function Eu(r,e,t,n){let{index:i,offset:a}=r.findIndex(e),o=r.maybeChild(i);if(a==e||o.isText)return n&&!n.canReplace(i,i,t)?null:r.cut(0,e).append(t).append(r.cut(e));let s=Eu(o.content,e-a-1,t,o);return s&&r.replaceChild(i,o.copy(s))}function rm(r,e,t){if(t.openStart>r.depth)throw new jt("Inserted content deeper than insertion position");if(r.depth-t.openStart!=e.depth-t.openEnd)throw new jt("Inconsistent open depths");return Su(r,e,t,0)}function Su(r,e,t,n){let i=r.index(n),a=r.node(n);if(i==e.index(n)&&n<r.depth-t.openStart){let o=Su(r,e,t,n+1);return a.copy(a.content.replaceChild(i,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&r.depth==n&&e.depth==n){let o=r.parent,s=o.content;return Wt(o,s.cut(0,r.parentOffset).append(t.content).append(s.cut(e.parentOffset)))}else{let{start:o,end:s}=nm(t,r);return Wt(a,Ou(r,o,s,e,n))}else return Wt(a,ei(r,e,n))}function Mu(r,e){if(!e.type.compatibleContent(r.type))throw new jt("Cannot join "+e.type.name+" onto "+r.type.name)}function Xa(r,e,t){let n=r.node(t);return Mu(n,e.node(t)),n}function Ut(r,e){let t=e.length-1;t>=0&&r.isText&&r.sameMarkup(e[t])?e[t]=r.withText(e[t].text+r.text):e.push(r)}function fn(r,e,t,n){let i=(e||r).node(t),a=0,o=e?e.index(t):i.childCount;r&&(a=r.index(t),r.depth>t?a++:r.textOffset&&(Ut(r.nodeAfter,n),a++));for(let s=a;s<o;s++)Ut(i.child(s),n);e&&e.depth==t&&e.textOffset&&Ut(e.nodeBefore,n)}function Wt(r,e){return r.type.checkContent(e),r.copy(e)}function Ou(r,e,t,n,i){let a=r.depth>i&&Xa(r,e,i+1),o=n.depth>i&&Xa(t,n,i+1),s=[];return fn(null,r,i,s),a&&o&&e.index(i)==t.index(i)?(Mu(a,o),Ut(Wt(a,Ou(r,e,t,n,i+1)),s)):(a&&Ut(Wt(a,ei(r,e,i+1)),s),fn(e,t,i,s),o&&Ut(Wt(o,ei(t,n,i+1)),s)),fn(n,null,i,s),new T(s)}function ei(r,e,t){let n=[];if(fn(null,r,t,n),r.depth>t){let i=Xa(r,e,t+1);Ut(Wt(i,ei(r,e,t+1)),n)}return fn(e,null,t,n),new T(n)}function nm(r,e){let t=e.depth-r.openStart,i=e.node(t).copy(r.content);for(let a=t-1;a>=0;a--)i=e.node(a).copy(T.from(i));return{start:i.resolveNoCache(r.openStart+t),end:i.resolveNoCache(i.content.size-r.openEnd-t)}}var ti=class r{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=e.child(t);return n?e.child(t).cut(n):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let a=0;a<e;a++)i+=n.child(a).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),i=e.maybeChild(t);if(!n){let s=n;n=i,i=s}let a=n.marks;for(var o=0;o<a.length;o++)a[o].type.spec.inclusive===!1&&(!i||!a[o].isInSet(i.marks))&&(a=a[o--].removeFromSet(a));return a}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,i=e.parent.maybeChild(e.index());for(var a=0;a<n.length;a++)n[a].type.spec.inclusive===!1&&(!i||!n[a].isInSet(i.marks))&&(n=n[a--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new Gt(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],i=0,a=t;for(let o=e;;){let{index:s,offset:l}=o.content.findIndex(a),u=a-l;if(n.push(o,s,i+l),!u||(o=o.child(s),o.isText))break;a=u-1,i+=l+1}return new r(t,n,a)}
vendor: 4,359 bytes, line 1
1static resolveCached(e,t){let n=hu.get(e);if(n)for(let a=0;a<n.elts.length;a++){let o=n.elts[a];if(o.pos==t)return o}else hu.set(e,n=new Qa);let i=n.elts[n.i]=r.resolve(e,t);return n.i=(n.i+1)%im,i}},Qa=class{constructor(){this.elts=[],this.i=0}},im=12,hu=new WeakMap,Gt=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}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)}},am=Object.create(null),He=class r{constructor(e,t,n,i=_.none){this.type=e,this.attrs=t,this.marks=i,this.content=n||T.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,i=0){this.content.nodesBetween(e,t,n,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,i){return this.content.textBetween(e,t,n,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&Zn(this.attrs,t||e.defaultAttrs||am)&&_.sameSet(this.marks,n||_.none)}copy(e=null){return e==this.content?this:new r(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new r(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return M.empty;let i=this.resolve(e),a=this.resolve(t),o=n?0:i.sharedDepth(t),s=i.start(o),u=i.node(o).content.cut(i.pos-s,a.pos-s);return new M(u,i.depth-o,a.depth-o)}replace(e,t,n){return rm(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let i=this.content.child(t-1);return{node:i,index:t-1,offset:n-i.nodeSize}}resolve(e){return ti.resolveCached(this,e)}resolveNoCache(e){return ti.resolve(this,e)}rangeHasMark(e,t,n){let i=!1;return t>e&&this.nodesBetween(e,t,a=>(n.isInSet(a.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Lu(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=T.empty,i=0,a=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,i,a),s=o&&o.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let l=i;l<a;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,t,n,i){if(i&&!this.type.allowsMarks(i))return!1;let a=this.contentMatchAt(e).matchType(n),o=a&&a.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!_.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}
1`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let i=T.fromJSON(e,t.content),a=e.nodeType(t.type).create(t.attrs,i,n);return a.type.checkAttrs(a.attrs),a}};He.prototype.text=void 0;var Ya=class r extends He{constructor(e,t,n,i){if(super(e,t,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Lu(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new r(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new r(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Lu(r,e){for(let t=r.length-1;t>=0;t--)e=r[t].type.name+"("+e+")";return e}
vendor: 9,297 bytes, lines 1-2
1var Kt=class r{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new Za(e,t);if(n.next==null)return r.empty;let i=Au(n);n.next&&n.err("Unexpected trailing text");let a=dm(fm(i));return hm(a,n),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let i=this;for(let a=t;i&&a<n;a++)i=i.matchType(e.child(a).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let i=[this];function a(o,s){let l=o.matchFragment(e,n);if(l&&(!t||l.validEnd))return T.from(s.map(u=>u.createAndFill()));for(let u=0;u<o.next.length;u++){let{type:c,next:f}=o.next[u];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let d=a(f,s.concat(c));if(d)return d}}return null}return a(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let i=n.shift(),a=i.match;if(a.matchType(e)){let o=[];for(let s=i;s.type;s=s.via)o.push(s.type);return o.reverse()}for(let o=0;o<a.next.length;o++){let{type:s,next:l}=a.next[o];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in t)&&(!i.type||l.validEnd)&&(n.push({match:s.contentMatch,type:s,via:i}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let i=0;i<n.next.length;i++)e.indexOf(n.next[i].next)==-1&&t(n.next[i].next)}return t(this),e.map((n,i)=>{let a=i+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)a+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return a}).join(`
2`)}};Kt.empty=new Kt(!0);var Za=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}};function Au(r){let e=[];do e.push(om(r));while(r.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function om(r){let e=[];do e.push(sm(r));while(r.next&&r.next!=")"&&r.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function sm(r){let e=cm(r);for(;;)if(r.eat("+"))e={type:"plus",expr:e};else if(r.eat("*"))e={type:"star",expr:e};else if(r.eat("?"))e={type:"opt",expr:e};else if(r.eat("{"))e=lm(r,e);else break;return e}function pu(r){/\D/.test(r.next)&&r.err("Expected number, got '"+r.next+"'");let e=Number(r.next);return r.pos++,e}function lm(r,e){let t=pu(r),n=t;return r.eat(",")&&(r.next!="}"?n=pu(r):n=-1),r.eat("}")||r.err("Unclosed braced range"),{type:"range",min:t,max:n,expr:e}}function um(r,e){let t=r.nodeTypes,n=t[e];if(n)return[n];let i=[];for(let a in t){let o=t[a];o.isInGroup(e)&&i.push(o)}return i.length==0&&r.err("No node type or group '"+e+"' found"),i}function cm(r){if(r.eat("(")){let e=Au(r);return r.eat(")")||r.err("Missing closing paren"),e}else if(/\W/.test(r.next))r.err("Unexpected token '"+r.next+"'");else{let e=um(r,r.next).map(t=>(r.inline==null?r.inline=t.isInline:r.inline!=t.isInline&&r.err("Mixing inline and block content"),{type:"name",value:t}));return r.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function fm(r){let e=[[]];return i(a(r,0),t()),e;function t(){return e.push([])-1}function n(o,s,l){let u={term:l,to:s};return e[o].push(u),u}function i(o,s){o.forEach(l=>l.to=s)}function a(o,s){if(o.type=="choice")return o.exprs.reduce((l,u)=>l.concat(a(u,s)),[]);if(o.type=="seq")for(let l=0;;l++){let u=a(o.exprs[l],s);if(l==o.exprs.length-1)return u;i(u,s=t())}else if(o.type=="star"){let l=t();return n(s,l),i(a(o.expr,l),l),[n(l)]}else if(o.type=="plus"){let l=t();return i(a(o.expr,s),l),i(a(o.expr,l),l),[n(l)]}else{if(o.type=="opt")return[n(s)].concat(a(o.expr,s));if(o.type=="range"){let l=s;for(let u=0;u<o.min;u++){let c=t();i(a(o.expr,l),c),l=c}if(o.max==-1)i(a(o.expr,l),l);else for(let u=o.min;u<o.max;u++){let c=t();n(l,c),i(a(o.expr,l),c),l=c}return[n(l)]}else{if(o.type=="name")return[n(s,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Nu(r,e){return e-r}function vu(r,e){let t=[];return n(e),t.sort(Nu);function n(i){let a=r[i];if(a.length==1&&!a[0].term)return n(a[0].to);t.push(i);for(let o=0;o<a.length;o++){let{term:s,to:l}=a[o];!s&&t.indexOf(l)==-1&&n(l)}}}function dm(r){let e=Object.create(null);return t(vu(r,0));function t(n){let i=[];n.forEach(o=>{r[o].forEach(({term:s,to:l})=>{if(!s)return;let u;for(let c=0;c<i.length;c++)i[c][0]==s&&(u=i[c][1]);vu(r,l).forEach(c=>{u||i.push([s,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let a=e[n.join(",")]=new Kt(n.indexOf(r.length-1)>-1);for(let o=0;o<i.length;o++){let s=i[o][1].sort(Nu);a.next.push({type:i[o][0],next:e[s.join(",")]||t(s)})}return a}}function hm(r,e){for(let t=0,n=[r];t<n.length;t++){let i=n[t],a=!i.validEnd,o=[];for(let s=0;s<i.next.length;s++){let{type:l,next:u}=i.next[s];o.push(l.name),a&&!(l.isText||l.hasRequiredAttrs())&&(a=!1),n.indexOf(u)==-1&&n.push(u)}a&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Du(r){let e=Object.create(null);for(let t in r){let n=r[t];if(!n.hasDefault)return null;e[t]=n.default}return e}function Iu(r,e){let t=Object.create(null);for(let n in r){let i=e&&e[n];if(i===void 0){let a=r[n];if(a.hasDefault)i=a.default;else throw new RangeError("No value supplied for attribute "+n)}t[n]=i}return t}function Ru(r,e,t,n){for(let i in e)if(!(i in r))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);for(let i in r){let a=r[i];a.validate&&a.validate(e[i])}}function Bu(r,e){let t=Object.create(null);if(e)for(let n in e)t[n]=new eo(r,n,e[n]);return t}var ri=class r{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=Bu(e,n.attrs),this.defaultAttrs=Du(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Kt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Iu(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new He(this,this.computeAttrs(e),T.from(t),_.setFrom(n))}createChecked(e=null,t,n){return t=T.from(t),this.checkContent(t),new He(this,this.computeAttrs(e),t,_.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=T.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),a=i&&i.fillBefore(T.empty,!0);return a?new He(this,e,t.append(a),_.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Ru(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:_.none:e}static compile(e,t){let n=Object.create(null);e.forEach((a,o)=>n[a]=new r(a,t,o));let i=t.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let a in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function pm(r,e,t){let n=t.split("|");return i=>{let a=i===null?"null":typeof i;if(n.indexOf(a)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${r}, got ${a}`)}}var eo=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?pm(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}
vendor: 9,022 bytes, lines 2-4
2,hn=class r{constructor(e,t,n,i){this.name=e,this.rank=t,this.schema=n,this.spec=i,this.attrs=Bu(e,i.attrs),this.excluded=null;let a=Du(this.attrs);this.instance=a?new _(this,a):null}create(e=null){return!e&&this.instance?this.instance:new _(this,Iu(this.attrs,e))}static compile(e,t){let n=Object.create(null),i=0;return e.forEach((a,o)=>n[a]=new r(a,i++,t,o)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Ru(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}},pn=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=Ga.from(e.nodes),t.marks=Ga.from(e.marks||{}),this.nodes=ri.compile(this.spec.nodes,this),this.marks=hn.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let a=this.nodes[i],o=a.spec.content||"",s=a.spec.marks;if(a.contentMatch=n[o]||(n[o]=Kt.parse(o,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=s=="_"?null:s?mu(this,s.split(" ")):s==""||!a.inlineContent?[]:null}for(let i in this.marks){let a=this.marks[i],o=a.spec.excludes;a.excluded=o==null?[a]:o==""?[]:mu(this,o.split(" "))}this.nodeFromJSON=i=>He.fromJSON(this,i),this.markFromJSON=i=>_.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof ri){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,n,i)}text(e,t){let n=this.nodes.text;return new Ya(n,n.defaultAttrs,e,_.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}};function mu(r,e){let t=[];for(let n=0;n<e.length;n++){let i=e[n],a=r.marks[i],o=a;if(a)t.push(a);else for(let s in r.marks){let l=r.marks[s];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&t.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return t}function vm(r){return r.tag!=null}function mm(r){return r.style!=null}var Lt=class r{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(i=>{if(vm(i))this.tags.push(i);else if(mm(i)){let a=/[^=]*/.exec(i.style)[0];n.indexOf(a)<0&&n.push(a),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let a=e.nodes[i.node];return a.contentMatch.matchType(a)})}parse(e,t={}){let n=new ni(this,t,!1);return n.addAll(e,_.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new ni(this,t,!0);return n.addAll(e,_.none,t.from,t.to),M.maxOpen(n.finish())}matchTag(e,t,n){for(let i=n?this.tags.indexOf(n)+1:0;i<this.tags.length;i++){let a=this.tags[i];if(bm(e,a.tag)&&(a.namespace===void 0||e.namespaceURI==a.namespace)&&(!a.context||t.matchesContext(a.context))){if(a.getAttrs){let o=a.getAttrs(e);if(o===!1)continue;a.attrs=o||void 0}return a}}}matchStyle(e,t,n,i){for(let a=i?this.styles.indexOf(i)+1:0;a<this.styles.length;a++){let o=this.styles[a],s=o.style;if(!(s.indexOf(e)!=0||o.context&&!n.matchesContext(o.context)||s.length>e.length&&(s.charCodeAt(e.length)!=61||s.slice(e.length+1)!=t))){if(o.getAttrs){let l=o.getAttrs(t);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let t=[];function n(i){let a=i.priority==null?50:i.priority,o=0;for(;o<t.length;o++){let s=t[o];if((s.priority==null?50:s.priority)<a)break}t.splice(o,0,i)}for(let i in e.marks){let a=e.marks[i].spec.parseDOM;a&&a.forEach(o=>{n(o=yu(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let a=e.nodes[i].spec.parseDOM;a&&a.forEach(o=>{n(o=yu(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new r(e,r.schemaRules(e)))}},Pu={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},gm={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Hu={ol:!0,ul:!0},vn=1,to=2,dn=4;function gu(r,e,t){return e!=null?(e?vn:0)|(e==="full"?to:0):r&&r.whitespace=="pre"?vn|to:t&~dn}var Or=class{constructor(e,t,n,i,a,o){this.type=e,this.attrs=t,this.marks=n,this.solid=i,this.options=o,this.content=[],this.activeMarks=_.none,this.match=a||(o&dn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(T.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(e.type))?(this.match=n,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&vn)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let a=n;n.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-i[0].length))}}let t=T.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(T.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Pu.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},ni=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let i=t.topNode,a,o=gu(null,t.preserveWhitespace,0)|(n?dn:0);i?a=new Or(i.type,i.attrs,_.none,!0,t.topMatch||i.type.contentMatch,o):n?a=new Or(null,null,_.none,!0,null,o):a=new Or(e.schema.topNodeType,null,_.none,!0,null,o),this.nodes=[a],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,i=this.top,a=i.options&to?"full":this.localPreserveWS||(i.options&vn)>0,{schema:o}=this.parser;if(a==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(a)if(a==="full")n=n.replace(/\r\n?/g,`
3`);else if(o.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(o.linebreakReplacement.create())){let s=n.split(/\r?\n|\r/);for(let l=0;l<s.length;l++)l&&this.insertNode(o.linebreakReplacement.create(),t,!0),s[l]&&this.insertNode(o.text(s[l]),t,!/\S/.test(s[l]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],l=e.previousSibling;(!s||l&&l.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(n=n.slice(1))}n&&this.insertNode(o.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let i=this.localPreserveWS,a=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),s;Hu.hasOwnProperty(o)&&this.parser.normalizeLists&&ym(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,n));e:if(l?l.ignore:gm.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,c=this.needsBlock;if(Pu.hasOwnProperty(o))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),u=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let f=l&&l.skip?t:this.readStyles(e,t);f&&this.addAll(e,f),u&&this.sync(a),this.needsBlock=c}else{let u=this.readStyles(e,t);u&&this.addElementByRule(e,l,u,l.consuming===!1?s:void 0)}this.localPreserveWS=i}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let a=this.parser.matchedStyles[i],o=n.getPropertyValue(a);if(o)for(let s=void 0;;){let l=this.parser.matchStyle(a,o,this,s);if(!l)break;if(l.ignore)return null;if(l.clearMark?t=t.filter(u=>!l.clearMark(u)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return t}addElementByRule(e,t,n,i){let a,o;
vendor: 4,117 bytes, line 4
4if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),n,e.nodeName=="BR")||this.leafFallback(e,n);else{let l=this.enter(o,t.attrs||null,n,t.preserveWhitespace);l&&(a=!0,n=l)}else{let l=this.parser.schema.marks[t.mark];n=n.concat(l.create(t.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,n,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,n,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,n),this.findAround(e,l,!1)}a&&this.sync(s)&&this.open--}addAll(e,t,n,i){let a=n||0;for(let o=n?e.childNodes[n]:e.firstChild,s=i==null?null:e.childNodes[i];o!=s;o=o.nextSibling,++a)this.findAtPoint(e,a),this.addDOM(o,t);this.findAtPoint(e,a)}findPlace(e,t,n){let i,a;for(let o=this.open,s=0;o>=0;o--){let l=this.nodes[o],u=l.findWrapping(e);if(u&&(!i||i.length>u.length+s)&&(i=u,a=l,!u.length))break;if(l.solid){if(n)break;s+=2}}if(!i)return null;this.sync(a);for(let o=0;o<i.length;o++)t=this.enterInner(i[o],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(t=this.enterInner(a,null,t))}let i=this.findPlace(e,t,n);if(i){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(e.type));let o=_.none;for(let s of i.concat(e.marks))(a.type?a.type.allowsMarkType(s.type):bu(s.type,e.type))&&(o=s.addToSet(o));return a.content.push(e.mark(o)),!0}return!1}enter(e,t,n,i){let a=this.findPlace(e.create(t),n,!1);return a&&(a=this.enterInner(e,t,n,!0,i)),a}enterInner(e,t,n,i=!1,a){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let s=gu(e,a,o.options);o.options&dn&&o.content.length==0&&(s|=dn);let l=_.none;return n=n.filter(u=>(o.type?o.type.allowsMarkType(u.type):bu(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new Or(e,t,l,i,null,s)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=vn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let i=n.length-1;i>=0;i--)e+=n[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(n?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),a=-(n?n.depth+1:0)+(i?0:1),o=(s,l)=>{for(;s>=0;s--){let u=t[s];if(u==""){if(s==t.length-1||s==0)continue;for(;l>=a;l--)if(o(s-1,l))return!0;return!1}else{let c=l>0||l==0&&i?this.nodes[l].type:n&&l>=a?n.node(l-a).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let n=this.parser.schema.nodes[t];
vendor: 4,003 bytes, line 4
4if(n.isTextblock&&n.defaultAttrs)return n}}};function ym(r){for(let e=r.firstChild,t=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&Hu.hasOwnProperty(n)&&t?(t.appendChild(e),e=t):n=="li"?t=e:n&&(t=null)}}function bm(r,e){return(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,e)}function yu(r){let e={};for(let t in r)e[t]=r[t];return e}function bu(r,e){let t=e.schema.nodes;for(let n in t){let i=t[n];if(!i.allowsMarkType(r))continue;let a=[],o=s=>{a.push(s);for(let l=0;l<s.edgeCount;l++){let{type:u,next:c}=s.edge(l);if(u==e||a.indexOf(c)<0&&o(c))return!0}};if(o(i.contentMatch))return!0}}var Jt=class r{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=Ja(t).createDocumentFragment());let i=n,a=[];return e.forEach(o=>{if(a.length||o.marks.length){let s=0,l=0;for(;s<a.length&&l<o.marks.length;){let u=o.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(a[s][0])||u.type.spec.spanning===!1)break;s++,l++}for(;s<a.length;)i=a.pop()[1];for(;l<o.marks.length;){let u=o.marks[l++],c=this.serializeMark(u,o.isInline,t);c&&(a.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(o,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:i}=Yn(Ja(t),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let a=this.serializeMark(e.marks[i],e.isInline,t);a&&((a.contentDOM||a.dom).appendChild(n),n=a.dom)}return n}serializeMark(e,t,n={}){let i=this.marks[e.type.name];return i&&Yn(Ja(n),i(e,t),null,e.attrs)}static renderSpec(e,t,n=null,i){return Yn(e,t,n,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new r(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=wu(e.nodes);return t.text||(t.text=n=>n.text),t}static marksFromSchema(e){return wu(e.marks)}};function wu(r){let e={};for(let t in r){let n=r[t].spec.toDOM;n&&(e[t]=n)}return e}function Ja(r){return r.document||window.document}var ku=new WeakMap;function wm(r){let e=ku.get(r);return e===void 0&&ku.set(r,e=km(r)),e}function km(r){let e=null;function t(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let i=0;i<n.length;i++)t(n[i]);else for(let i in n)t(n[i])}return t(r),e}function Yn(r,e,t,n){if(typeof e=="string")return{dom:r.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],a;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(a=wm(n))&&a.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let s,l=t?r.createElementNS(t,i):r.createElement(i),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let f in u)if(u[f]!=null){let d=f.indexOf(" ");d>0?l.setAttributeNS(f.slice(0,d),f.slice(d+1),u[f]):f=="style"&&l.style?l.style.cssText=u[f]:l.setAttribute(f,u[f])}}for(let f=c;f<e.length;f++){let d=e[f];if(d===0){if(f<e.length-1||f>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:p}=Yn(r,d,t,n);if(l.appendChild(h),p){if(s)throw new RangeError("Multiple content holes");s=p}}}return{dom:l,contentDOM:s}}var _u=65535,$u=Math.pow(2,16);function Cm(r,e){return r+e*$u}function Fu(r){return r&_u}function Tm(r){return(r-(r&_u))/$u}var zu=1,Vu=2,ii=4,Uu=8,yn=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&Uu)>0}get deletedBefore(){return(this.delInfo&(zu|ii))>0}get deletedAfter(){return(this.delInfo&(Vu|ii))>0}get deletedAcross(){return(this.delInfo&ii)>0}}
vendor: 11,210 bytes, line 4
4,We=class r{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&r.empty)return r.empty}recover(e){let t=0,n=Fu(e);if(!this.inverted)for(let i=0;i<n;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[n*3]+t+Tm(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let i=0,a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[s+a],c=this.ranges[s+o],f=l+u;if(e<=f){let d=u?e==l?-1:e==f?1:t:t,h=l+i+(d<0?0:c);if(n)return h;let p=e==(t<0?l:f)?null:Cm(s/3,e-l),v=e==l?Vu:e==f?zu:ii;return(t<0?e!=l:e!=f)&&(v|=Uu),new yn(h,v,p)}i+=c-u}return n?e+i:new yn(e+i,0,null)}touches(e,t){let n=0,i=Fu(t),a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?n:0);if(l>e)break;let u=this.ranges[s+a],c=l+u;if(e<=c&&s==i*3)return!0;n+=this.ranges[s+o]-u}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,a=0;i<this.ranges.length;i+=3){let o=this.ranges[i],s=o-(this.inverted?a:0),l=o+(this.inverted?0:a),u=this.ranges[i+t],c=this.ranges[i+n];e(s,s+u,l,l+c),a+=c-u}}invert(){return new r(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?r.empty:new r(e<0?[0,-e,0]:[0,0,e])}};We.empty=new We([]);var bn=class r{constructor(e,t,n=0,i=e?e.length:0){this.mirror=t,this.from=n,this.to=i,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new r(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let i=e.getMirror(t);this.appendMap(e._maps[t],i!=null&&i<t?n+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?n-i-1:void 0)}}invert(){let e=new r;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let i=0;for(let a=this.from;a<this.to;a++){let o=this._maps[a],s=o.mapResult(e,t);if(s.recover!=null){let l=this.getMirror(a);if(l!=null&&l>a&&l<this.to){a=l,e=this._maps[l].recover(s.recover);continue}}i|=s.delInfo,e=s.pos}return n?e:new yn(e,i,null)}},ro=Object.create(null),ne=class{getMap(){return We.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=ro[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in ro)throw new RangeError("Duplicate use of step JSON ID "+e);return ro[e]=t,t.prototype.jsonID=e,t}},le=class r{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new r(e,null)}static fail(e){return new r(null,e)}static fromReplace(e,t,n,i){try{return r.ok(e.replace(t,n,i))}catch(a){if(a instanceof jt)return r.fail(a.message);throw a}}};function so(r,e,t){let n=[];for(let i=0;i<r.childCount;i++){let a=r.child(i);a.content.size&&(a=a.copy(so(a.content,e,a))),a.isInline&&(a=e(a,t,i)),n.push(a)}return T.fromArray(n)}var wn=class r extends ne{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),a=new M(so(t.content,(o,s)=>!o.isAtom||!s.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return le.fromReplace(e,this.from,this.to,a)}invert(){return new Xt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new r(t.pos,n.pos,this.mark)}merge(e){return e instanceof r&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new r(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new r(t.from,t.to,e.markFromJSON(t.mark))}};ne.jsonID("addMark",wn);var Xt=class r extends ne{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new M(so(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return le.fromReplace(e,this.from,this.to,n)}invert(){return new wn(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new r(t.pos,n.pos,this.mark)}merge(e){return e instanceof r&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new r(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new r(t.from,t.to,e.markFromJSON(t.mark))}};ne.jsonID("removeMark",Xt);var kn=class r extends ne{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return le.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return le.fromReplace(e,this.pos,this.pos+1,new M(T.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let n=this.mark.addToSet(t.marks);if(n.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(n))return new r(this.pos,t.marks[i]);return new r(this.pos,this.mark)}}return new Lr(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new r(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new r(t.pos,e.markFromJSON(t.mark))}};ne.jsonID("addNodeMark",kn);var Lr=class r extends ne{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return le.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return le.fromReplace(e,this.pos,this.pos+1,new M(T.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new kn(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new r(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new r(t.pos,e.markFromJSON(t.mark))}};ne.jsonID("removeNodeMark",Lr);var De=class r extends ne{constructor(e,t,n,i=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=i}apply(e){return this.structure&&ao(e,this.from,this.to)?le.fail("Structure replace would overwrite content"):le.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new We([this.from,this.to-this.from,this.slice.size])}invert(e){return new r(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new r(t.pos,Math.max(t.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof r)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?M.empty:new M(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new r(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?M.empty:new M(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new r(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new r(t.from,t.to,M.fromJSON(e,t.slice),!!t.structure)}};ne.jsonID("replace",De);var Z=class r extends ne{constructor(e,t,n,i,a,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=i,this.slice=a,this.insert=o,this.structure=s}apply(e){if(this.structure&&(ao(e,this.from,this.gapFrom)||ao(e,this.gapTo,this.to)))return le.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return le.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?le.fromReplace(e,this.from,this.to,n):le.fail("Content does not fit in gap")}getMap(){return new We([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new r(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),a=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||i<t.pos||a>n.pos?null:new r(t.pos,n.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new r(t.from,t.to,t.gapFrom,t.gapTo,M.fromJSON(e,t.slice),t.insert,!!t.structure)}};ne.jsonID("replaceAround",Z);function ao(r,e,t){let n=r.resolve(e),i=t-e,a=n.depth;for(;i>0&&a>0&&n.indexAfter(a)==n.node(a).childCount;)a--,i--;if(i>0){let o=n.node(a).maybeChild(n.indexAfter(a));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function xm(r,e,t,n){let i=[],a=[],o,s;r.doc.nodesBetween(e,t,(l,u,c)=>{if(!l.isInline)return;let f=l.marks;if(!n.isInSet(f)&&c.type.allowsMarkType(n.type)){let d=Math.max(u,e),h=Math.min(u+l.nodeSize,t),p=n.addToSet(f);for(let v=0;v<f.length;v++)f[v].isInSet(p)||(o&&o.to==d&&o.mark.eq(f[v])?o.to=h:i.push(o=new Xt(d,h,f[v]))
vendor: 7,345 bytes, lines 4-5
4);s&&s.to==d?s.to=h:a.push(s=new wn(d,h,n))}}),i.forEach(l=>r.step(l)),a.forEach(l=>r.step(l))}function Em(r,e,t,n){let i=[],a=0;r.doc.nodesBetween(e,t,(o,s)=>{if(!o.isInline)return;a++;let l=null;if(n instanceof hn){let u=o.marks,c;for(;c=n.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length){let u=Math.min(s+o.nodeSize,t);for(let c=0;c<l.length;c++){let f=l[c],d;for(let h=0;h<i.length;h++){let p=i[h];p.step==a-1&&f.eq(i[h].style)&&(d=p)}d?(d.to=u,d.step=a):i.push({style:f,from:Math.max(s,e),to:u,step:a})}}}),i.forEach(o=>r.step(new Xt(o.from,o.to,o.style)))}function lo(r,e,t,n=t.contentMatch,i=!0){let a=r.doc.nodeAt(e),o=[],s=e+1;for(let l=0;l<a.childCount;l++){let u=a.child(l),c=s+u.nodeSize,f=n.matchType(u.type);if(!f)o.push(new De(s,c,M.empty));else{n=f;for(let d=0;d<u.marks.length;d++)t.allowsMarkType(u.marks[d].type)||r.step(new Xt(s,c,u.marks[d]));if(i&&u.isText&&t.whitespace!="pre"){let d,h=/\r?\n|\r/g,p;for(;d=h.exec(u.text);)p||(p=new M(T.from(t.schema.text(" ",t.allowedMarks(u.marks))),0,0)),o.push(new De(s+d.index,s+d.index+d[0].length,p))}}s=c}if(!n.validEnd){let l=n.fillBefore(T.empty,!0);r.replace(s,s,new M(l,0,0))}for(let l=o.length-1;l>=0;l--)r.step(o[l])}function Sm(r,e,t){return(e==0||r.canReplace(e,r.childCount))&&(t==r.childCount||r.canReplace(0,t))}function Nr(r){let t=r.parent.content.cutByIndex(r.startIndex,r.endIndex);for(let n=r.depth,i=0,a=0;;--n){let o=r.$from.node(n),s=r.$from.index(n)+i,l=r.$to.indexAfter(n)-a;if(n<r.depth&&o.canReplace(s,l,t))return n;if(n==0||o.type.spec.isolating||!Sm(o,s,l))break;s&&(i=1),l<o.childCount&&(a=1)}return null}function Mm(r,e,t){let{$from:n,$to:i,depth:a}=e,o=n.before(a+1),s=i.after(a+1),l=o,u=s,c=T.empty,f=0;for(let p=a,v=!1;p>t;p--)v||n.index(p)>0?(v=!0,c=T.from(n.node(p).copy(c)),f++):l--;let d=T.empty,h=0;for(let p=a,v=!1;p>t;p--)v||i.after(p+1)<i.end(p)?(v=!0,d=T.from(i.node(p).copy(d)),h++):u++;r.step(new Z(l,u,o,s,new M(c.append(d),f,h),c.size-f,!0))}function Wu(r,e,t=null,n=r){let i=Om(r,e),a=i&&Lm(n,e);return a?i.map(qu).concat({type:e,attrs:t}).concat(a.map(qu)):null}function qu(r){return{type:r,attrs:null}}function Om(r,e){let{parent:t,startIndex:n,endIndex:i}=r,a=t.contentMatchAt(n).findWrapping(e);if(!a)return null;let o=a.length?a[0]:e;return t.canReplaceWith(n,i,o)?a:null}function Lm(r,e){let{parent:t,startIndex:n,endIndex:i}=r,a=t.child(n),o=e.contentMatch.findWrapping(a.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let u=n;l&&u<i;u++)l=l.matchType(t.child(u).type);return!l||!l.validEnd?null:o}function Am(r,e,t){let n=T.empty;for(let o=t.length-1;o>=0;o--){if(n.size){let s=t[o].type.contentMatch.matchFragment(n);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=T.from(t[o].type.create(t[o].attrs,n))}let i=e.start,a=e.end;r.step(new Z(i,a,i,a,new M(n,0,0),t.length,!0))}function Nm(r,e,t,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=r.steps.length;r.doc.nodesBetween(e,t,(o,s)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(n,l)&&Dm(r.doc,r.mapping.slice(a).map(s),n)){let u=null;if(n.schema.linebreakReplacement){let h=n.whitespace=="pre",p=!!n.contentMatch.matchType(n.schema.linebreakReplacement);h&&!p?u=!1:!h&&p&&(u=!0)}u===!1&&Gu(r,o,s,a),lo(r,r.mapping.slice(a).map(s,1),n,void 0,u===null);let c=r.mapping.slice(a),f=c.map(s,1),d=c.map(s+o.nodeSize,1);return r.step(new Z(f,d,f+1,d-1,new M(T.from(n.create(l,null,o.marks)),0,0),1,!0)),u===!0&&ju(r,o,s,a),!1}})}function ju(r,e,t,n){e.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let l=r.mapping.slice(n).map(t+1+a+o.index);r.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Gu(r,e,t,n){e.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let o=r.mapping.slice(n).map(t+1+a);r.replaceWith(o,o+1,e.type.schema.text(`
5`))}})}function Dm(r,e,t){let n=r.resolve(e),i=n.index();return n.parent.canReplaceWith(i,i+1,t)}function Im(r,e,t,n,i){let a=r.doc.nodeAt(e);if(!a)throw new RangeError("No node at given position");t||(t=a.type);let o=t.create(n,null,i||a.marks);if(a.isLeaf)return r.replaceWith(e,e+a.nodeSize,o);if(!t.validContent(a.content))throw new RangeError("Invalid content for node type "+t.name);r.step(new Z(e,e+a.nodeSize,e+1,e+a.nodeSize-1,new M(T.from(o),0,0),1,!0))}function At(r,e,t=1,n){let i=r.resolve(e),a=i.depth-t,o=n&&n[n.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,c=t-2;u>a;u--,c--){let f=i.node(u),d=i.index(u);if(f.type.spec.isolating)return!1;let h=f.content.cutByIndex(d,f.childCount),p=n&&n[c+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let v=n&&n[c]||f;if(!f.canReplace(d+1,f.childCount)||!v.type.validContent(h))return!1}let s=i.indexAfter(a),l=n&&n[0];return i.node(a).canReplaceWith(s,s,l?l.type:i.node(a+1).type)}function Rm(r,e,t=1,n){let i=r.doc.resolve(e),a=T.empty,o=T.empty;for(let s=i.depth,l=i.depth-t,u=t-1;s>l;s--,u--){a=T.from(i.node(s).copy(a));let c=n&&n[u];o=T.from(c?c.type.create(c.attrs,o):i.node(s).copy(o))}r.step(new De(e,e,new M(a.append(o),t,t),!0))}function uo(r,e){let t=r.resolve(e),n=t.index();return Pm(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(n,n+1)}function Bm(r,e){e.content.size||r.type.compatibleContent(e.type);let t=r.contentMatchAt(r.childCount),{linebreakReplacement:n}=r.type.schema;for(let i=0;i<e.childCount;i++){let a=e.child(i),o=a.type==n?r.type.schema.nodes.text:a.type;if(t=t.matchType(o),!t||!r.type.allowsMarks(a.marks))return!1}return t.validEnd}function Pm(r,e){return!!(r&&e&&!r.isLeaf&&Bm(r,e))}function Hm(r,e,t){let n=null,{linebreakReplacement:i}=r.doc.type.schema,a=r.doc.resolve(e-t),o=a.node().type;if(i&&o.inlineContent){let c=o.whitespace=="pre",f=!!o.contentMatch.matchType(i);c&&!f?n=!1:!c&&f&&(n=!0)}let s=r.steps.length;if(n===!1){let c=r.doc.resolve(e+t);Gu(r,c.node(),c.before(),s)}o.inlineContent&&lo(r,e+t-1,o,a.node().contentMatchAt(a.index()),n==null);let l=r.mapping.slice(s),u=l.map(e-t);if(r.step(new De(u,l.map(e+t,-1),M.empty,!0)),n===!0){let c=r.doc.resolve(u);ju(r,c.node(),c.before(),r.steps.length)}return r}function Fm(r,e,t){let n=r.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),t))return e;if(n.parentOffset==0)for(let i=n.depth-1;i>=0;i--){let a=n.index(i);if(n.node(i).canReplaceWith(a,a,t))return n.before(i+1);if(a>0)return null}if(n.parentOffset==n.parent.content.size)for(let i=n.depth-1;i>=0;i--){let a=n.indexAfter(i);if(n.node(i).canReplaceWith(a,a,t))return n.after(i+1);if(a<n.node(i).childCount)return null}return null}function Ku(r,e,t){let n=r.resolve(e);if(!t.content.size)return e;let i=t.content;for(let a=0;a<t.openStart;a++)i=i.firstChild.content;for(let a=1;a<=(t.openStart==0&&t.size?2:1);a++)for(let o=n.depth;o>=0;o--){let s=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,l=n.index(o)+(s>0?1:0),u=n.node(o),c=!1;if(a==1)c=u.canReplace(l,l,i);else{let f=u.contentMatchAt(l).findWrapping(i.firstChild.type);c=f&&u.canReplaceWith(l,l,f[0])}if(c)return s==0?n.pos:s<0?n.before(o+1):n.after(o+1)}return null}
vendor: 12,876 bytes, line 5
5function li(r,e,t=e,n=M.empty){if(e==t&&!n.size)return null;let i=r.resolve(e),a=r.resolve(t);return Ju(i,a,n)?new De(e,t,n):new oo(i,a,n).fit()}function Ju(r,e,t){return!t.openStart&&!t.openEnd&&r.start()==e.start()&&r.parent.canReplace(r.index(),e.index(),t.content)}var oo=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=T.empty;for(let i=0;i<=e.depth;i++){let a=e.node(i);this.frontier.push({type:a.type,match:a.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=T.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let a=this.placed,o=n.depth,s=i.depth;for(;o&&s&&a.childCount==1;)a=a.firstChild.content,o--,s--;let l=new M(a,o,s);return e>-1?new Z(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new De(n.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,i=this.unplaced.openEnd;n<e;n++){let a=t.firstChild;if(t.childCount>1&&(i=0),a.type.spec.isolating&&i<=n){e=n;break}t=a.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let i,a=null;n?(a=no(this.unplaced.content,n-1).firstChild,i=a.content):i=this.unplaced.content;let o=i.firstChild;for(let s=this.depth;s>=0;s--){let{type:l,match:u}=this.frontier[s],c,f=null;if(t==1&&(o?u.matchType(o.type)||(f=u.fillBefore(T.from(o),!1)):a&&l.compatibleContent(a.type)))return{sliceDepth:n,frontierDepth:s,parent:a,inject:f};if(t==2&&o&&(c=u.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:s,parent:a,wrap:c};if(a&&u.matchType(a.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=no(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new M(e,t+1,Math.max(n,i.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=no(e,t);if(i.childCount<=1&&t>0){let a=e.size-t<=t+i.size;this.unplaced=new M(mn(e,t-1,1),t-1,a?t-1:n)}else this.unplaced=new M(mn(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:a}){for(;this.depth>t;)this.closeFrontierNode();if(a)for(let v=0;v<a.length;v++)this.openFrontierNode(a[v]);let o=this.unplaced,s=n?n.content:o.content,l=o.openStart-e,u=0,c=[],{match:f,type:d}=this.frontier[t];if(i){for(let v=0;v<i.childCount;v++)c.push(i.child(v));f=f.matchFragment(i)}let h=s.size+e-(o.content.size-o.openEnd);for(;u<s.childCount;){let v=s.child(u),m=f.matchType(v.type);if(!m)break;u++,(u>1||l==0||v.content.size)&&(f=m,c.push(Xu(v.mark(d.allowedMarks(v.marks)),u==1?l:0,u==s.childCount?h:-1)))}let p=u==s.childCount;p||(h=-1),this.placed=gn(this.placed,t,T.from(c)),this.frontier[t].match=f,p&&h<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,m=s;v<h;v++){let g=m.lastChild;this.frontier.push({type:g.type,match:g.contentMatchAt(g.childCount)}),m=g.content}this.unplaced=p?e==0?M.empty:new M(mn(o.content,e-1,1),e-1,h<0?o.openEnd:e-1):new M(mn(o.content,e,u),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!io(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,i=this.$to.after(n);for(;n>1&&i==this.$to.end(--n);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:i}=this.frontier[t],a=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=io(e,t,i,n,a);if(o){for(let s=t-1;s>=0;s--){let{match:l,type:u}=this.frontier[s],c=io(e,s,u,l,!0);if(!c||c.childCount)continue e}return{depth:t,fit:o,move:a?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=gn(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let i=e.node(n),a=i.type.contentMatch.fillBefore(i.content,!0,e.index(n));this.openFrontierNode(i.type,i.attrs,a)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=gn(this.placed,this.depth,T.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(T.empty,!0);t.childCount&&(this.placed=gn(this.placed,this.frontier.length,t))}};function mn(r,e,t){return e==0?r.cutByIndex(t,r.childCount):r.replaceChild(0,r.firstChild.copy(mn(r.firstChild.content,e-1,t)))}function gn(r,e,t){return e==0?r.append(t):r.replaceChild(r.childCount-1,r.lastChild.copy(gn(r.lastChild.content,e-1,t)))}function no(r,e){for(let t=0;t<e;t++)r=r.firstChild.content;return r}function Xu(r,e,t){if(e<=0)return r;let n=r.content;return e>1&&(n=n.replaceChild(0,Xu(n.firstChild,e-1,n.childCount==1?t-1:0))),e>0&&(n=r.type.contentMatch.fillBefore(n).append(n),t<=0&&(n=n.append(r.type.contentMatch.matchFragment(n).fillBefore(T.empty,!0)))),r.copy(n)}function io(r,e,t,n,i){let a=r.node(e),o=i?r.indexAfter(e):r.index(e);if(o==a.childCount&&!t.compatibleContent(a.type))return null;let s=n.fillBefore(a.content,!0,o);return s&&!qm(t,a.content,o)?s:null}function qm(r,e,t){for(let n=t;n<e.childCount;n++)if(!r.allowsMarks(e.child(n).marks))return!0;return!1}function _m(r){return r.spec.defining||r.spec.definingForContent}function $m(r,e,t,n){if(!n.size)return r.deleteRange(e,t);let i=r.doc.resolve(e),a=r.doc.resolve(t);if(Ju(i,a,n))return r.step(new De(e,t,n));let o=Yu(i,a);o[o.length-1]==0&&o.pop();let s=-(i.depth+1);o.unshift(s);for(let d=i.depth,h=i.pos-1;d>0;d--,h--){let p=i.node(d).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(d)>-1?s=d:i.before(d)==h&&o.splice(1,0,-d)}let l=o.indexOf(s),u=[],c=n.openStart;for(let d=n.content,h=0;;h++){let p=d.firstChild;if(u.push(p),h==n.openStart)break;d=p.content}for(let d=c-1;d>=0;d--){let h=u[d],p=_m(h.type);if(p&&!h.sameMarkup(i.node(Math.abs(s)-1)))c=d;else if(p||!h.type.isTextblock)break}for(let d=n.openStart;d>=0;d--){let h=(d+c+1)%(n.openStart+1),p=u[h];if(p)for(let v=0;v<o.length;v++){let m=o[(v+l)%o.length],g=!0;m<0&&(g=!1,m=-m);let w=i.node(m-1),k=i.index(m-1);if(w.canReplaceWith(k,k,p.type,p.marks))return r.replace(i.before(m),g?a.after(m):t,new M(Qu(n.content,0,n.openStart,h),h,n.openEnd))}}let f=r.steps.length;for(let d=o.length-1;d>=0&&(r.replace(e,t,n),!(r.steps.length>f));d--){let h=o[d];h<0||(e=i.before(h),t=a.after(h))}}function Qu(r,e,t,n,i){if(e<t){let a=r.firstChild;r=r.replaceChild(0,a.copy(Qu(a.content,e+1,t,n,a)))}if(e>n){let a=i.contentMatchAt(0),o=a.fillBefore(r).append(r);r=o.append(a.matchFragment(o).fillBefore(T.empty,!0))}return r}function zm(r,e,t,n){if(!n.isInline&&e==t&&r.doc.resolve(e).parent.content.size){let i=Fm(r.doc,e,n.type);i!=null&&(e=t=i)}r.replaceRange(e,t,new M(T.from(n),0,0))}function Vm(r,e,t){let n=r.doc.resolve(e),i=r.doc.resolve(t),a=Yu(n,i);for(let o=0;o<a.length;o++){let s=a[o],l=o==a.length-1;if(l&&s==0||n.node(s).type.contentMatch.validEnd)return r.delete(n.start(s),i.end(s));if(s>0&&(l||n.node(s-1).canReplace(n.index(s-1),i.indexAfter(s-1))))return r.delete(n.before(s),i.after(s))}for(let o=1;o<=n.depth&&o<=i.depth;o++)if(e-n.start(o)==n.depth-o&&t>n.end(o)&&i.end(o)-t!=i.depth-o&&n.start(o-1)==i.start(o-1)&&n.node(o-1).canReplace(n.index(o-1),i.index(o-1)))return r.delete(n.before(o),t);r.delete(e,t)}function Yu(r,e){let t=[],n=Math.min(r.depth,e.depth);for(let i=n;i>=0;i--){let a=r.start(i);if(a<r.pos-(r.depth-i)||e.end(i)>e.pos+(e.depth-i)||r.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(a==e.start(i)||i==r.depth&&i==e.depth&&r.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==a-1)&&t.push(i)}return t}var ai=class r extends ne{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return le.fail("No node at attribute step's position");let n=Object.create(null);for(let a in t.attrs)n[a]=t.attrs[a];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return le.fromReplace(e,this.pos,this.pos+1,new M(T.from(i),0,t.isLeaf?0:1))}getMap(){return We.empty}invert(e){return new r(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new r(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new r(t.pos,t.attr,t.value)}};ne.jsonID("attr",ai);var oi=class r extends ne{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return le.ok(n)}getMap(){return We.empty}invert(e){return new r(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new r(t.attr,t.value)}};ne.jsonID("docAttr",oi);var Ar=class extends Error{};Ar=function r(e){let t=Error.call(this,e);return t.__proto__=r.prototype,t};Ar.prototype=Object.create(Error.prototype);Ar.prototype.constructor=Ar;Ar.prototype.name="TransformError";var si=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new bn}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Ar(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let i=this.mapping.maps[n];n&&(e=i.map(e,1),t=i.map(t,-1)),i.forEach((a,o,s,l)=>{e=Math.min(e,s),t=Math.max(t,l)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=M.empty){let i=li(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new M(T.from(n),0,0))}delete(e,t){return this.replace(e,t,M.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return $m(this,e,t,n),this}replaceRangeWith(e,t,n){return zm(this,e,t,n),this}deleteRange(e,t){return Vm(this,e,t),this}lift(e,t){return Mm(this,e,t),this}join(e,t=1){return Hm(this,e,t),this}wrap(e,t){return Am(this,e,t),this}setBlockType(e,t=e,n,i=null){return Nm(this,e,t,n,i),this}setNodeMarkup(e,t,n=null,i){return Im(this,e,t,n,i),this}setNodeAttribute(e,t,n){return this.step(new ai(e,t,n)),this}setDocAttribute(e,t){return this.step(new oi(e,t)),this}addNodeMark(e,t){return this.step(new kn(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(t instanceof _)t.isInSet(n.marks)&&this.step(new Lr(e,t));else{let i=n.marks,a,o=[];for(;a=t.isInSet(i);)o.push(new Lr(e,a)),i=a.removeFromSet(i);for(let s=o.length-1;s>=0;s--)this.step(o[s])}return this}split(e,t=1,n){return Rm(this,e,t,n),this}addMark(e,t,n){return xm(this,e,t,n),this}removeMark(e,t,n){return Em(this,e,t,n),this}clearIncompatible(e,t,n){return lo(this,e,t,n),this}};var co=Object.create(null),H=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Nt(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=M.empty){let n=t.content.lastChild,i=null;for(let s=0;s<t.openEnd;s++)i=n,n=n.lastChild;let a=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:l,$to:u}=o[s],c=e.mapping.slice(a);e.replaceRange(c.map(l.pos),c.map(u.pos),s?M.empty:t),s==0&&tc(e,a,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){let{$from:o,$to:s}=i[a],l=e.mapping.slice(n),u=l.map(o.pos),c=l.map(s.pos);a?e.deleteRange(u,c):(e.replaceRangeWith(u,c,t),tc(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let i=e.parent.inlineContent?new q(e):Dr(e.node(0),e.parent,e.pos,e.index(),t,n);if(i)return i;for(let a=e.depth-1;a>=0;a--){let o=t<0?Dr(e.node(0),e.node(a),e.before(a+1),e.index(a),t,n):Dr(e.node(0),e.node(a),e.after(a+1),e.index(a)+1,t,n);if(o)return o}return null}
5static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Ce(e.node(0))}static atStart(e){return Dr(e,e,0,0,1)||new Ce(e)}static atEnd(e){return Dr(e,e,e.content.size,e.childCount,-1)||new Ce(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=co[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in co)throw new RangeError("Duplicate use of selection JSON ID "+e);return co[e]=t,t.prototype.jsonID=e,t}getBookmark(){return q.between(this.$anchor,this.$head).getBookmark()}};H.prototype.visible=!0;var Nt=class{constructor(e,t){this.$from=e,this.$to=t}},Zu=!1;function ec(r){!Zu&&!r.parent.inlineContent&&(Zu=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+r.parent.type.name+")"))}var q=class r extends H{constructor(e,t=e){ec(e),ec(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return H.near(n);let i=e.resolve(t.map(this.anchor));return new r(i.parent.inlineContent?i:n,n)}replace(e,t=M.empty){if(super.replace(e,t),t==M.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof r&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new ci(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new r(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let i=e.resolve(t);return new this(i,n==t?i:e.resolve(n))}static between(e,t,n){let i=e.pos-t.pos;if((!n||i)&&(n=i>=0?1:-1),!t.parent.inlineContent){let a=H.findFrom(t,n,!0)||H.findFrom(t,-n,!0);if(a)t=a.$head;else return H.near(t,n)}return e.parent.inlineContent||(i==0?e=t:(e=(H.findFrom(e,-n,!0)||H.findFrom(e,n,!0)).$anchor,e.pos<t.pos!=i<0&&(e=t))),new r(e,t)}};H.jsonID("text",q);var ci=class r{constructor(e,t){this.anchor=e,this.head=t}map(e){return new r(e.map(this.anchor),e.map(this.head))}resolve(e){return q.between(e.resolve(this.anchor),e.resolve(this.head))}},R=class r extends H{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:i}=t.mapResult(this.anchor),a=e.resolve(i);return n?H.near(a):new r(a)}content(){return new M(T.from(this.node),0,0)}eq(e){return e instanceof r&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new ho(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new r(e.resolve(t.anchor))}static create(e,t){return new r(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};R.prototype.visible=!1;H.jsonID("node",R);var ho=class r{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new ci(n,n):new r(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&R.isSelectable(n)?new R(t):H.near(t)}},Ce=class r extends H{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=M.empty){if(t==M.empty){e.delete(0,e.doc.content.size);let n=H.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new r(e)}map(e){return new r(e)}eq(e){return e instanceof r}getBookmark(){return Um}};H.jsonID("all",Ce);var Um={map(){return this},resolve(r){return new Ce(r)}};function Dr(r,e,t,n,i,a=!1){if(e.inlineContent)return q.create(r,t);for(let o=n-(i>0?0:1);i>0?o<e.childCount:o>=0;o+=i){let s=e.child(o);if(s.isAtom){if(!a&&R.isSelectable(s))return R.create(r,t-(i<0?s.nodeSize:0))}else{let l=Dr(r,s,t+i,i<0?s.childCount:0,i,a);if(l)return l}t+=s.nodeSize*i}return null}function tc(r,e,t){let n=r.steps.length-1;if(n<e)return;let i=r.steps[n];if(!(i instanceof De||i instanceof Z))return;let a=r.mapping.maps[n],o;a.forEach((s,l,u,c)=>{o==null&&(o=c)}),r.setSelection(H.near(r.doc.resolve(o),t))}var rc=1,ui=2,nc=4,po=class extends si{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|rc)&~ui,this.storedMarks=null,this}get selectionSet(){return(this.updated&rc)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=ui,this}ensureMarks(e){return _.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&ui)>0}
vendor: 4,790 bytes, line 5
5addStep(e,t){super.addStep(e,t),this.updated=this.updated&~ui,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||_.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(n==null&&(n=t),!e)return this.deleteRange(t,n);let a=this.storedMarks;if(!a){let o=this.doc.resolve(t);a=n==t?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,i.text(e,a)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(H.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,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|=nc,this}get scrolledIntoView(){return(this.updated&nc)>0}};function ic(r,e){return!e||!r?r:r.bind(e)}var Qt=class{constructor(e,t,n){this.name=e,this.init=ic(t.init,n),this.apply=ic(t.apply,n)}},Wm=[new Qt("doc",{init(r){return r.doc||r.schema.topNodeType.createAndFill()},apply(r){return r.doc}}),new Qt("selection",{init(r,e){return r.selection||H.atStart(e.doc)},apply(r){return r.selection}}),new Qt("storedMarks",{init(r){return r.storedMarks||null},apply(r,e,t,n){return n.selection.$cursor?r.storedMarks:null}}),new Qt("scrollToSelection",{init(){return 0},apply(r,e){return r.scrolledIntoView?e+1:e}})],Cn=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Wm.slice(),t&&t.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new Qt(n.key,n.spec.state,n))})}},Tn=class r{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let i=this.config.plugins[n];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),i=null;for(;;){let a=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let l=i?i[o].n:0,u=i?i[o].state:this,c=l<t.length&&s.spec.appendTransaction.call(s,l?t.slice(l):t,u,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",e),!i){i=[];for(let f=0;f<this.config.plugins.length;f++)i.push(f<o?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),a=!0}i&&(i[o]={state:n,n:t.length})}}if(!a)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new r(this.config),n=this.config.fields;for(let i=0;i<n.length;i++){let a=n[i];t[a.name]=a.apply(e,this[a.name],this,t)}return t}get tr(){return new po(this)}static create(e){let t=new Cn(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new r(t);for(let i=0;i<t.fields.length;i++)n[t.fields[i].name]=t.fields[i].init(e,n);return n}reconfigure(e){let t=new Cn(this.schema,e.plugins),n=t.fields,i=new r(t);for(let a=0;a<n.length;a++){let o=n[a].name;i[o]=this.hasOwnProperty(o)?this[o]:n[a].init(e,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(n=>n.toJSON())),e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[n],a=i.spec.state;a&&a.toJSON&&(t[n]=a.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new Cn(e.schema,e.plugins),a=new r(i);return i.fields.forEach(o=>{if(o.name=="doc")a.doc=He.fromJSON(e.schema,t.doc);else if(o.name=="selection")a.selection=H.fromJSON(a.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(a.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let s in n){let l=n[s],u=l.spec.state;if(l.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(t,s)){a[o.name]=u.fromJSON.call(l,e,t[s],a);return}}a[o.name]=o.init(e,a)}}),a}};function ac(r,e,t){for(let n in r){let i=r[n];i instanceof Function?i=i.bind(e):n=="handleDOMEvents"&&(i=ac(i,e,{}
vendor: 14,442 bytes, line 5
5)),t[n]=i}return t}var X=class{constructor(e){this.spec=e,this.props={},e.props&&ac(e.props,this,this.props),this.key=e.key?e.key.key:oc("plugin")}getState(e){return e[this.key]}},fo=Object.create(null);function oc(r){return r in fo?r+"$"+ ++fo[r]:(fo[r]=0,r+"$")}var ht=class{constructor(e="key"){this.key=oc(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}};var ue=function(r){for(var e=0;;e++)if(r=r.previousSibling,!r)return e},Hr=function(r){let e=r.assignedSlot||r.parentNode;return e&&e.nodeType==11?e.host:e},wo=null,vt=function(r,e,t){let n=wo||(wo=document.createRange());return n.setEnd(r,t??r.nodeValue.length),n.setStart(r,e||0),n},jm=function(){wo=null},ir=function(r,e,t,n){return t&&(sc(r,e,t,n,-1)||sc(r,e,t,n,1))},Gm=/^(img|br|input|textarea|hr)$/i;function sc(r,e,t,n,i){for(var a;;){if(r==t&&e==n)return!0;if(e==(i<0?0:qe(r))){let o=r.parentNode;if(!o||o.nodeType!=1||An(r)||Gm.test(r.nodeName)||r.contentEditable=="false")return!1;e=ue(r)+(i<0?0:1),r=o}else if(r.nodeType==1){let o=r.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((a=o.pmViewDesc)===null||a===void 0)&&a.ignoreForSelection)e+=i;else return!1;else r=o,e=i<0?qe(r):0}else return!1}}function qe(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function Km(r,e){for(;;){if(r.nodeType==3&&e)return r;if(r.nodeType==1&&e>0){if(r.contentEditable=="false")return null;r=r.childNodes[e-1],e=qe(r)}else if(r.parentNode&&!An(r))e=ue(r),r=r.parentNode;else return null}}function Jm(r,e){for(;;){if(r.nodeType==3&&e<r.nodeValue.length)return r;if(r.nodeType==1&&e<r.childNodes.length){if(r.contentEditable=="false")return null;r=r.childNodes[e],e=0}else if(r.parentNode&&!An(r))e=ue(r)+1,r=r.parentNode;else return null}}function Xm(r,e,t){for(let n=e==0,i=e==qe(r);n||i;){if(r==t)return!0;let a=ue(r);if(r=r.parentNode,!r)return!1;n=n&&a==0,i=i&&a==qe(r)}}function An(r){let e;for(let t=r;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==r||e.contentDOM==r)}var ki=function(r){return r.focusNode&&ir(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)};function Yt(r,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=r,t.key=t.code=e,t}function Qm(r){let e=r.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Ym(r,e,t){if(r.caretPositionFromPoint)try{let n=r.caretPositionFromPoint(e,t);if(n)return{node:n.offsetNode,offset:Math.min(qe(n.offsetNode),n.offset)}}catch{}if(r.caretRangeFromPoint){let n=r.caretRangeFromPoint(e,t);if(n)return{node:n.startContainer,offset:Math.min(qe(n.startContainer),n.startOffset)}}}var et=typeof navigator<"u"?navigator:null,lc=typeof document<"u"?document:null,Ht=et&&et.userAgent||"",ko=/Edge\/(\d+)/.exec(Ht),_c=/MSIE \d/.exec(Ht),Co=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ht),Ae=!!(_c||Co||ko),Bt=_c?document.documentMode:Co?+Co[1]:ko?+ko[1]:0,_e=!Ae&&/gecko\/(\d+)/i.test(Ht);_e&&+(/Firefox\/(\d+)/.exec(Ht)||[0,0])[1];var To=!Ae&&/Chrome\/(\d+)/.exec(Ht),ie=!!To,$c=To?+To[1]:0,ce=!Ae&&!!et&&/Apple Computer/.test(et.vendor),Fr=ce&&(/Mobile\/\w+/.test(Ht)||!!et&&et.maxTouchPoints>2),Fe=Fr||(et?/Mac/.test(et.platform):!1),zc=et?/Win/.test(et.platform):!1,mt=/Android \d/.test(Ht),Nn=!!lc&&"webkitFontSmoothing"in lc.documentElement.style,Zm=Nn?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function eg(r){let e=r.defaultView&&r.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:r.documentElement.clientWidth,top:0,bottom:r.documentElement.clientHeight}}function pt(r,e){return typeof r=="number"?r:r[e]}function tg(r){let e=r.getBoundingClientRect(),t=e.width/r.offsetWidth||1,n=e.height/r.offsetHeight||1;return{left:e.left,right:e.left+r.clientWidth*t,top:e.top,bottom:e.top+r.clientHeight*n}}function uc(r,e,t){let n=r.someProp("scrollThreshold")||0,i=r.someProp("scrollMargin")||5,a=r.dom.ownerDocument;for(let o=t||r.dom;o;){if(o.nodeType!=1){o=Hr(o);continue}let s=o,l=s==a.body,u=l?eg(a):tg(s),c=0,f=0;if(e.top<u.top+pt(n,"top")?f=-(u.top-e.top+pt(i,"top")):e.bottom>u.bottom-pt(n,"bottom")&&(f=e.bottom-e.top>u.bottom-u.top?e.top+pt(i,"top")-u.top:e.bottom-u.bottom+pt(i,"bottom")),e.left<u.left+pt(n,"left")?c=-(u.left-e.left+pt(i,"left")):e.right>u.right-pt(n,"right")&&(c=e.right-u.right+pt(i,"right")),c||f)if(l)a.defaultView.scrollBy(c,f);else{let h=s.scrollLeft,p=s.scrollTop;f&&(s.scrollTop+=f),c&&(s.scrollLeft+=c);let v=s.scrollLeft-h,m=s.scrollTop-p;e={left:e.left-v,top:e.top-m,right:e.right-v,bottom:e.bottom-m}}let d=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(d))break;o=d=="absolute"?o.offsetParent:Hr(o)}}function rg(r){let e=r.dom.getBoundingClientRect(),t=Math.max(0,e.top),n,i;for(let a=(e.left+e.right)/2,o=t+1;o<Math.min(innerHeight,e.bottom);o+=5){let s=r.root.elementFromPoint(a,o);if(!s||s==r.dom||!r.dom.contains(s))continue;let l=s.getBoundingClientRect();if(l.top>=t-20){n=s,i=l.top;break}}return{refDOM:n,refTop:i,stack:Vc(r.dom)}}function Vc(r){let e=[],t=r.ownerDocument;for(let n=r;n&&(e.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),r!=t);n=Hr(n));return e}function ng({refDOM:r,refTop:e,stack:t}){let n=r?r.getBoundingClientRect().top:0;Uc(t,n==0?0:n-e)}function Uc(r,e){for(let t=0;t<r.length;t++){let{dom:n,top:i,left:a}=r[t];n.scrollTop!=i+e&&(n.scrollTop=i+e),n.scrollLeft!=a&&(n.scrollLeft=a)}}var Ir=null;function ig(r){if(r.setActive)return r.setActive();if(Ir)return r.focus(Ir);let e=Vc(r);r.focus(Ir==null?{get preventScroll(){return Ir={preventScroll:!0},!0}}:void 0),Ir||(Ir=!1,Uc(e,0))}function Wc(r,e){let t,n=2e8,i,a=0,o=e.top,s=e.top,l,u;for(let c=r.firstChild,f=0;c;c=c.nextSibling,f++){let d;if(c.nodeType==1)d=c.getClientRects();else if(c.nodeType==3)d=vt(c).getClientRects();else continue;for(let h=0;h<d.length;h++){let p=d[h];if(p.top<=o&&p.bottom>=s){o=Math.max(p.bottom,o),s=Math.min(p.top,s);let v=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(v<n){t=c,n=v,i=v&&t.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,c.nodeType==1&&v&&(a=f+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!l&&p.left<=e.left&&p.right>=e.left&&(l=c,u={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(a=f+1)}}return!t&&l&&(t=l,i=u,n=0),t&&t.nodeType==3?ag(t,i):!t||n&&t.nodeType==1?{node:r,offset:a}:Wc(t,i)}function ag(r,e){let t=r.nodeValue.length,n=document.createRange(),i;for(let a=0;a<t;a++){n.setEnd(r,a+1),n.setStart(r,a);let o=Dt(n,1);if(o.top!=o.bottom&&Fo(e,o)){i={node:r,offset:a+(e.left>=(o.left+o.right)/2?1:0)};break}}return n.detach(),i||{node:r,offset:0}}function Fo(r,e){return r.left>=e.left-1&&r.left<=e.right+1&&r.top>=e.top-1&&r.top<=e.bottom+1}function og(r,e){let t=r.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<r.getBoundingClientRect().left?t:r}function sg(r,e,t){let{node:n,offset:i}=Wc(e,t),a=-1;if(n.nodeType==1&&!n.firstChild){let o=n.getBoundingClientRect();a=o.left!=o.right&&t.left>(o.left+o.right)/2?1:-1}return r.docView.posFromDOM(n,i,a)}function lg(r,e,t,n){let i=-1;for(let a=e,o=!1;a!=r.dom;){let s=r.docView.nearestDesc(a,!0),l;if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((l=s.dom.getBoundingClientRect()).width||l.height)&&(s.node.isBlock&&s.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(s.dom.nodeName)&&(!o&&l.left>n.left||l.top>n.top?i=s.posBefore:(!o&&l.right<n.left||l.bottom<n.top)&&(i=s.posAfter),o=!0),!s.contentDOM&&i<0&&!s.node.isText))return(s.node.isBlock?n.top<(l.top+l.bottom)/2:n.left<(l.left+l.right)/2)?s.posBefore:s.posAfter;a=s.dom.parentNode}return i>-1?i:r.docView.posFromDOM(e,t,-1)}function jc(r,e,t){let n=r.childNodes.length;if(n&&t.top<t.bottom)for(let i=Math.max(0,Math.min(n-1,Math.floor(n*(e.top-t.top)/(t.bottom-t.top))-2)),a=i;;){let o=r.childNodes[a];if(o.nodeType==1){let s=o.getClientRects();for(let l=0;l<s.length;l++){let u=s[l];if(Fo(e,u))return jc(o,e,u)}}if((a=(a+1)%n)==i)break}return r}function ug(r,e){let t=r.dom.ownerDocument,n,i=0,a=Ym(t,e.left,e.top);a&&({node:n,offset:i}=a);let o=(r.root.elementFromPoint?r.root:t).elementFromPoint(e.left,e.top),s;if(!o||!r.dom.contains(o.nodeType!=1?o.parentNode:o)){let u=r.dom.getBoundingClientRect();if(!Fo(e,u)||(o=jc(r.dom,e,u),!o))return null}if(ce)for(let u=o;n&&u;u=Hr(u))u.draggable&&(n=void 0);if(o=og(o,e),n){if(_e&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let c=n.childNodes[i],f;c.nodeName=="IMG"&&(f=c.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&i++}let u;Nn&&i&&n.nodeType==1&&(u=n.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&i--,n==r.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?s=r.state.doc.content.size:(i==0||n.nodeType!=1||n.childNodes[i-1].nodeName!="BR")&&(s=lg(r,n,i,e))}s==null&&(s=sg(r,o,e));let l=r.docView.nearestDesc(o,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function cc(r){return r.top<r.bottom||r.left<r.right}function Dt(r,e){let t=r.getClientRects();if(t.length){let n=t[e<0?0:t.length-1];if(cc(n))return n}return Array.prototype.find.call(t,cc)||r.getBoundingClientRect()}var cg=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Gc(r,e,t){let{node:n,offset:i,atom:a}=r.docView.domFromPos(e,t<0?-1:1),o=Nn||_e;if(n.nodeType==3)if(o&&(cg.test(n.nodeValue)||(t<0?!i:i==n.nodeValue.length))){let l=Dt(vt(n,i,i),t);if(_e&&i&&/\s/.test(n.nodeValue[i-1])&&i<n.nodeValue.length){let u=Dt(vt(n,i-1,i-1),-1);if(u.top==l.top){let c=Dt(vt(n,i,i+1),-1);if(c.top!=l.top)return xn(c,c.left<u.left)}}return l}else{let l=i,u=i,c=t<0?1:-1;return t<0&&!i?(u++,c=-1):t>=0&&i==n.nodeValue.length?(l--,c=1):t<0?l--:u++,xn(Dt(vt(n,l,u),c),c<0)}if(!r.state.doc.resolve(e-(a||0)).parent.inlineContent){if(a==null&&i&&(t<0||i==qe(n))){let l=n.childNodes[i-1];if(l.nodeType==1)return vo(l.getBoundingClientRect(),!1)}if(a==null&&i<qe(n)){let l=n.childNodes[i];if(l.nodeType==1)return vo(l.getBoundingClientRect(),!0)}return vo(n.getBoundingClientRect(),t>=0)}if(a==null&&i&&(t<0||i==qe(n))){let l=n.childNodes[i-1],u=l.nodeType==3?vt(l,qe(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return xn(Dt(u,1),!1)}if(a==null&&i<qe(n)){let l=n.childNodes[i];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?vt(l,0,o?0:1):l.nodeType==1?l:null:null;if(u)return xn(Dt(u,-1),!0)}return xn(Dt(n.nodeType==3?vt(n):n,-t),t>=0)}function xn(r,e){if(r.width==0)return r;let t=e?r.left:r.right;return{top:r.top,bottom:r.bottom,left:t,right:t}}function vo(r,e){if(r.height==0)return r;let t=e?r.top:r.bottom;return{top:t,bottom:t,left:r.left,right:r.right}}function Kc(r,e,t){let n=r.state,i=r.root.activeElement;n!=e&&r.updateState(e),i!=r.dom&&r.focus();try{return t()}finally{n!=e&&r.updateState(n),i!=r.dom&&i&&i.focus()}}function fg(r,e,t){let n=e.selection,i=t=="up"?n.$from:n.$to;return Kc(r,e,()=>{let{node:a}=r.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let s=r.docView.nearestDesc(a,!0);if(!s)break;if(s.node.isBlock){a=s.contentDOM||s.dom;break}a=s.dom.parentNode}let o=Gc(r,i.pos,1);for(let s=a.firstChild;s;s=s.nextSibling){let l;if(s.nodeType==1)l=s.getClientRects();else if(s.nodeType==3)l=vt(s,0,s.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let c=l[u];if(c.bottom>c.top+1&&(t=="up"?o.top-c.top>(c.bottom-o.top)*2:c.bottom-o.bottom>(o.bottom-c.top)*2))return!1}}return!0})}var dg=/[\u0590-\u08ac]/;function hg(r,e,t){let{$head:n}=e.selection;if(!n.parent.isTextblock)return!1;let i=n.parentOffset,a=!i,o=i==n.parent.content.size,s=r.domSelection();return s?!dg.test(n.parent.textContent)||!s.modify?t=="left"||t=="backward"?a:o:Kc(r,e,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:f}=r.domSelectionRange(),d=s.caretBidiLevel;s.modify("move",t,"character");let h=n.depth?r.docView.domAfterPos(n.before()):r.dom,{focusNode:p,focusOffset:v}=r.domSelectionRange(),m=p&&!h.contains(p.nodeType==1?p:p.parentNode)||l==p&&u==v;try{s.collapse(c,f),l&&(l!=c||u!=f)&&s.extend&&s.extend(l,u)}catch{}return d!=null&&(s.caretBidiLevel=d),m}):n.pos==n.start()||n.pos==n.end()}var fc=null,dc=null,hc=!1;function pg(r,e,t){return fc==e&&dc==t?hc:(fc=e,dc=t,hc=t=="up"||t=="down"?fg(r,e,t):hg(r,e,t))}var $e=0,pc=1,Zt=2,tt=3,ar=class{constructor(e,t,n,i){this.parent=e,this.children=t,this.dom=n,this.contentDOM=i,this.dirty=$e,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let i=this.children[t];if(i==e)return n;n+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let a,o;if(e==this.contentDOM)a=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;a=e.previousSibling}for(;a&&!((o=a.pmViewDesc)&&o.parent==this);)a=a.previousSibling;return a?this.posBeforeChild(o)+o.size:this.posAtStart}else{let a,o;if(e==this.contentDOM)a=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;a=e.nextSibling}for(;a&&!((o=a.pmViewDesc)&&o.parent==this);)a=a.nextSibling;return a?this.posBeforeChild(o):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=t>ue(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let a=e;;a=a.parentNode){if(a==this.dom){i=!1;break}if(a.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let a=e;;a=a.parentNode){if(a==this.dom){i=!0;break}if(a.nextSibling)break}}return i??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,i=e;i;i=i.parentNode){let a=this.getDesc(i),o;
vendor: 4,264 bytes, lines 5-6
5if(a&&(!t||a.node))if(n&&(o=a.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))n=!1;else return a}}getDesc(e){let t=e.pmViewDesc;for(let n=t;n;n=n.parent)if(n==this)return t}posFromDOM(e,t,n){for(let i=e;i;i=i.parentNode){let a=this.getDesc(i);if(a)return a.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let i=this.children[t],a=n+i.size;if(n==e&&a!=n){for(;!i.border&&i.children.length;)for(let o=0;o<i.children.length;o++){let s=i.children[o];if(s.size){i=s;break}}return i}if(e<a)return i.descAt(e-n-i.border);n=a}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,i=0;for(let a=0;n<this.children.length;n++){let o=this.children[n],s=a+o.size;if(s>e||o instanceof hi){i=e-a;break}a=s}if(i)return this.children[n].domFromPos(i-this.children[n].border,t);for(let a;n&&!(a=this.children[n-1]).size&&a instanceof fi&&a.side>=0;n--);if(t<=0){let a,o=!0;for(;a=n?this.children[n-1]:null,!(!a||a.dom.parentNode==this.contentDOM);n--,o=!1);return a&&t&&o&&!a.border&&!a.domAtom?a.domFromPos(a.size,t):{node:this.contentDOM,offset:a?ue(a.dom)+1:0}}else{let a,o=!0;for(;a=n<this.children.length?this.children[n]:null,!(!a||a.dom.parentNode==this.contentDOM);n++,o=!1);return a&&o&&!a.border&&!a.domAtom?a.domFromPos(0,t):{node:this.contentDOM,offset:a?ue(a.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,a=-1;for(let o=n,s=0;;s++){let l=this.children[s],u=o+l.size;if(i==-1&&e<=u){let c=o+l.border;if(e>=c&&t<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,t,c);e=o;for(let f=s;f>0;f--){let d=this.children[f-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){i=ue(d.dom)+1;break}e-=d.size}i==-1&&(i=0)}if(i>-1&&(u>t||s==this.children.length-1)){t=u;for(let c=s+1;c<this.children.length;c++){let f=this.children[c];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){a=ue(f.dom);break}t+=f.size}a==-1&&(a=this.contentDOM.childNodes.length);break}o=u}return{node:this.contentDOM,from:e,to:t,fromOffset:i,toOffset:a}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(t.nodeType!=1||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,i=!1){let a=Math.min(e,t),o=Math.max(e,t);for(let h=0,p=0;h<this.children.length;h++){let v=this.children[h],m=p+v.size;if(a>p&&o<m)return v.setSelection(e-p-v.border,t-p-v.border,n,i);p=m}let s=this.domFromPos(e,e?-1:1),l=t==e?s:this.domFromPos(t,t?-1:1),u=n.root.getSelection(),c=n.domSelectionRange(),f=!1;if((_e||ce)&&e==t){let{node:h,offset:p}=s;if(h.nodeType==3){if(f=!!(p&&h.nodeValue[p-1]==`
6`),f&&p==h.nodeValue.length)for(let v=h,m;v;v=v.parentNode){if(m=v.nextSibling){m.nodeName=="BR"&&(s=l={node:m.parentNode,offset:ue(m)+1});break}let g=v.pmViewDesc;if(g&&g.node&&g.node.isBlock)break}}else{let v=h.childNodes[p-1];f=v&&(v.nodeName=="BR"||v.contentEditable=="false")}}if(_e&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let h=c.focusNode.childNodes[c.focusOffset];h&&h.contentEditable=="false"&&(i=!0)}if(!(i||f&&ce)&&ir(s.node,s.offset,c.anchorNode,c.anchorOffset)&&ir(l.node,l.offset,c.focusNode,c.focusOffset))return;let d=!1;if((u.extend||e==t)&&!(f&&_e)){u.collapse(s.node,s.offset);try{e!=t&&u.extend(l.node,l.offset),d=!0}catch{}}if(!d){if(e>t){let p=s;s=l,l=p}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(s.node,s.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,i=0;i<this.children.length;i++){let a=this.children[i],o=n+a.size;if(n==o?e<=o&&t>=n:e<o&&t>n){let s=n+a.border,l=o-a.border;if(e>=s&&t<=l){this.dirty=e==n||t==o?Zt:pc,e==s&&t==l&&(a.contentLost||a.dom.parentNode!=this.contentDOM)?a.dirty=tt:a.markDirty(e-s,t-s);return}
vendor: 10,145 bytes, line 6
6else a.dirty=a.dom==a.contentDOM&&a.dom.parentNode==this.contentDOM&&!a.children.length?Zt:tt}n=o}this.dirty=Zt}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?Zt:pc;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},fi=class extends ar{constructor(e,t,n,i){let a,o=t.type.toDOM;if(typeof o=="function"&&(o=o(n,()=>{if(!a)return i;if(a.parent)return a.parent.posBeforeChild(a)})),!t.type.spec.raw){if(o.nodeType!=1){let s=document.createElement("span");s.appendChild(o),o=s}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,a=this}matchesWidget(e){return this.dirty==$e&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},xo=class extends ar{constructor(e,t,n,i){super(e,[],t,null),this.textDOM=n,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}},qr=class r extends ar{constructor(e,t,n,i,a){super(e,[],n,i),this.mark=t,this.spec=a}static create(e,t,n,i){let a=i.nodeViews[t.type.name],o=a&&a(t,i,n);return(!o||!o.dom)&&(o=Jt.renderSpec(document,t.type.spec.toDOM(t,n),null,t.attrs)),new r(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&tt||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=tt&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=$e){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty<this.dirty&&(n.dirty=this.dirty),this.dirty=$e}}slice(e,t,n){let i=r.create(this.parent,this.mark,!0,n),a=this.children,o=this.size;t<o&&(a=Oo(a,t,o,n)),e>0&&(a=Oo(a,0,e,n));for(let s=0;s<a.length;s++)a[s].parent=i;return i.children=a,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},Pt=class r extends ar{constructor(e,t,n,i,a,o,s,l,u){super(e,[],a,o),this.node=t,this.outerDeco=n,this.innerDeco=i,this.nodeDOM=s}static create(e,t,n,i,a,o){let s=a.nodeViews[t.type.name],l,u=s&&s(t,a,()=>{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},n,i),c=u&&u.dom,f=u&&u.contentDOM;if(t.isText){if(!c)c=document.createTextNode(t.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:f}=Jt.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!f&&!t.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let d=c;return c=Qc(c,n,t),u?l=new Eo(e,t,n,i,c,f||null,d,u,a,o+1):t.isText?new di(e,t,n,i,c,d,a):new r(e,t,n,i,c,f||null,d,a,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>T.empty)}return e}matchesNode(e,t,n){return this.dirty==$e&&e.eq(this.node)&&pi(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,i=t,a=e.composing?this.localCompositionInfo(e,t):null,o=a&&a.pos>-1?a:null,s=a&&a.pos<0,l=new Mo(this,o&&o.node,e);yg(this.node,this.innerDeco,(u,c,f)=>{u.spec.marks?l.syncToMarks(u.spec.marks,n,e,c):u.type.side>=0&&!f&&l.syncToMarks(c==this.node.childCount?_.none:this.node.child(c).marks,n,e,c),l.placeWidget(u,e,i)},(u,c,f,d)=>{l.syncToMarks(u.marks,n,e,d);let h;l.findNodeMatch(u,c,f,d)||s&&e.state.selection.from>i&&e.state.selection.to<i+u.nodeSize&&(h=l.findIndexWithChild(a.node))>-1&&l.updateNodeAt(u,c,f,h,e)||l.updateNextNode(u,c,f,e,d,i)||l.addNode(u,c,f,e,i),i+=u.nodeSize}),l.syncToMarks([],n,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Zt)&&(o&&this.protectLocalComposition(e,o),Jc(this.contentDOM,this.children,e),Fr&&bg(this.dom))}localCompositionInfo(e,t){let{from:n,to:i}=e.state.selection;if(!(e.state.selection instanceof q)||n<t||i>t+this.node.content.size)return null;let a=e.input.compositionNode;if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){let o=a.nodeValue,s=wg(this.node.content,o,n-t,i-t);return s<0?null:{node:a,pos:s,text:o}}else return{node:a,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:i}){if(this.getDesc(t))return;let a=t;for(;a.parentNode!=this.contentDOM;a=a.parentNode){for(;a.previousSibling;)a.parentNode.removeChild(a.previousSibling);for(;a.nextSibling;)a.parentNode.removeChild(a.nextSibling);a.pmViewDesc&&(a.pmViewDesc=void 0)}let o=new xo(this,a,t,i);e.input.compositionNodes.push(o),this.children=Oo(this.children,n,n+i.length,e,o)}update(e,t,n,i){return this.dirty==tt||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,i),!0)}updateInner(e,t,n,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=$e}updateOuterDeco(e){if(pi(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=Xc(this.dom,this.nodeDOM,So(this.outerDeco,this.node,t),So(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function vc(r,e,t,n,i){Qc(n,e,r);let a=new Pt(void 0,r,e,t,n,n,n,i,0);return a.contentDOM&&a.updateChildren(i,0),a}var di=class r extends Pt{constructor(e,t,n,i,a,o,s){super(e,t,n,i,a,null,o,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,i){return this.dirty==tt||this.dirty!=$e&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=$e||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=$e,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,n){let i=this.node.cut(e,t),a=document.createTextNode(i.text);return new r(this.parent,i,this.outerDeco,this.innerDeco,a,a,n)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=tt)}get domAtom(){return!1}isText(e){return this.node.text==e}},hi=class extends ar{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==$e&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},Eo=class extends Pt{constructor(e,t,n,i,a,o,s,l,u,c){super(e,t,n,i,a,o,s,u,c),this.spec=l}update(e,t,n,i){if(this.dirty==tt)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let a=this.spec.update(e,t,n);return a&&this.updateInner(e,t,n,i),a}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,n,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,i){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function Jc(r,e,t){let n=r.firstChild,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=o.dom;if(s.parentNode==r){for(;s!=n;)n=mc(n),i=!0;n=n.nextSibling}else i=!0,r.insertBefore(s,n);if(o instanceof qr){let l=n?n.previousSibling:r.lastChild;Jc(o.contentDOM,o.children,t),n=l?l.nextSibling:r.firstChild}}for(;n;)n=mc(n),i=!0;i&&t.trackWrites==r&&(t.trackWrites=null)}var En=function(r){r&&(this.nodeName=r)};En.prototype=Object.create(null);var er=[new En];function So(r,e,t){if(r.length==0)return er;let n=t?er[0]:new En,i=[n];for(let a=0;a<r.length;a++){let o=r[a].type.attrs;if(o){o.nodeName&&i.push(n=new En(o.nodeName));for(let s in o){let l=o[s];l!=null&&(t&&i.length==1&&i.push(n=new En(e.isInline?"span":"div")),s=="class"?n.class=(n.class?n.class+" ":"")+l:s=="style"?n.style=(n.style?n.style+";":"")+l:s!="nodeName"&&(n[s]=l))}}}return i}function Xc(r,e,t,n){if(t==er&&n==er)return e;let i=e;for(let a=0;a<n.length;a++){let o=n[a],s=t[a];if(a){let l;s&&s.nodeName==o.nodeName&&i!=r&&(l=i.parentNode)&&l.nodeName.toLowerCase()==o.nodeName||(l=document.createElement(o.nodeName),l.pmIsDeco=!0,l.appendChild(i),s=er[0]),i=l}vg(i,s||er[0],o)}return i}function vg(r,e,t){for(let n in e)n!="class"&&n!="style"&&n!="nodeName"&&!(n in t)&&r.removeAttribute(n);for(let n in t)n!="class"&&n!="style"&&n!="nodeName"&&t[n]!=e[n]&&r.setAttribute(n,t[n]);
vendor: 5,707 bytes, line 6
6if(e.class!=t.class){let n=e.class?e.class.split(" ").filter(Boolean):[],i=t.class?t.class.split(" ").filter(Boolean):[];for(let a=0;a<n.length;a++)i.indexOf(n[a])==-1&&r.classList.remove(n[a]);for(let a=0;a<i.length;a++)n.indexOf(i[a])==-1&&r.classList.add(i[a]);r.classList.length==0&&r.removeAttribute("class")}if(e.style!=t.style){if(e.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=n.exec(e.style);)r.style.removeProperty(i[1])}t.style&&(r.style.cssText+=t.style)}}function Qc(r,e,t){return Xc(r,r,er,So(e,t,r.nodeType!=1))}function pi(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(!r[t].type.eq(e[t].type))return!1;return!0}function mc(r){let e=r.nextSibling;return r.parentNode.removeChild(r),e}var Mo=class{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=mg(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,i){let a=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;a<s&&(a==o-1?this.top:this.stack[a+1<<1]).matchesMark(e[a])&&e[a].type.spec.spanning!==!1;)a++;for(;a<o;)this.destroyRest(),this.top.dirty=$e,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let l=-1,u=this.top.children.length;i<this.preMatch.index&&(u=Math.min(this.index+3,u));for(let c=this.index;c<u;c++){let f=this.top.children[c];if(f.matchesMark(e[o])&&!this.isLocked(f.dom)){l=c;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let c=qr.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,i){let a=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))a=this.top.children.indexOf(o,this.index);else for(let s=this.index,l=Math.min(this.top.children.length,s+5);s<l;s++){let u=this.top.children[s];if(u.matchesNode(e,t,n)&&!this.preMatch.matched.has(u)){a=s;break}}return a<0?!1:(this.destroyBetween(this.index,a),this.index++,!0)}updateNodeAt(e,t,n,i,a){let o=this.top.children[i];return o.dirty==tt&&o.dom==o.contentDOM&&(o.dirty=Zt),o.update(e,t,n,a)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let n=e.pmViewDesc;if(n){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==n)return i}return-1}e=t}}updateNextNode(e,t,n,i,a,o){for(let s=this.index;s<this.top.children.length;s++){let l=this.top.children[s];if(l instanceof Pt){let u=this.preMatch.matched.get(l);if(u!=null&&u!=a)return!1;let c=l.dom,f,d=this.isLocked(c)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=tt&&pi(t,l.outerDeco));if(!d&&l.update(e,t,n,i))return this.destroyBetween(this.index,s),l.dom!=c&&(this.changed=!0),this.index++,!0;if(!d&&(f=this.recreateWrapper(l,e,t,n,i,o)))return this.destroyBetween(this.index,s),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=Zt,f.updateChildren(i,o+1),f.dirty=$e),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,i,a,o){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!pi(n,e.outerDeco)||!i.eq(e.innerDeco))return null;let s=Pt.create(this.top,t,n,i,a,o);if(s.contentDOM){s.children=e.children,e.children=[];for(let l of s.children)l.parent=s}return e.destroy(),s}addNode(e,t,n,i,a){let o=Pt.create(this.top,e,t,n,i,a);o.contentDOM&&o.updateChildren(i,a+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,t,n){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let a=new fi(this.top,e,t,n);this.top.children.splice(this.index++,0,a),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof qr;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof di)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((ce||ie)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e=="IMG"&&(n.className="ProseMirror-separator",n.alt=""),e=="BR"&&(n.className="ProseMirror-trailingBreak");let i=new hi(this.top,[],n,null);t!=this.top?t.children.push(i):t.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}};function mg(r,e){let t=e,n=t.children.length,i=r.childCount,a=new Map,o=[];e:for(;i>0;){let s;for(;;)if(n){let u=t.children[n-1];if(u instanceof qr)t=u,n=u.children.length;else{s=u,n--;break}}else{if(t==e)break e;n=t.parent.children.indexOf(t),t=t.parent}let l=s.node;if(l){if(l!=r.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}function gg(r,e){return r.type.side-e.type.side}function yg(r,e,t,n){let i=e.locals(r),a=0;if(i.length==0){for(let u=0;u<r.childCount;u++){let c=r.child(u);n(c,i,e.forChild(a,c),u),a+=c.nodeSize}return}let o=0,s=[],l=null;for(let u=0;;){let c,f;for(;o<i.length&&i[o].to==a;){let m=i[o++];m.widget&&(c?(f||(f=[c])).push(m):c=m)}if(c)if(f){f.sort(gg);for(let m=0;m<f.length;m++)t(f[m],u,!!l)}else t(c,u,!!l);let d,h;
vendor: 3,056 bytes, line 6
6if(l)h=-1,d=l,l=null;else if(u<r.childCount)h=u,d=r.child(u++);else break;for(let m=0;m<s.length;m++)s[m].to<=a&&s.splice(m--,1);for(;o<i.length&&i[o].from<=a&&i[o].to>a;)s.push(i[o++]);let p=a+d.nodeSize;if(d.isText){let m=p;o<i.length&&i[o].from<m&&(m=i[o].from);for(let g=0;g<s.length;g++)s[g].to<m&&(m=s[g].to);m<p&&(l=d.cut(m-a),d=d.cut(0,m-a),p=m,h=-1)}else for(;o<i.length&&i[o].to<p;)o++;let v=d.isInline&&!d.isLeaf?s.filter(m=>!m.inline):s.slice();n(d,v,e.forChild(a,d),h),a=p}}function bg(r){if(r.nodeName=="UL"||r.nodeName=="OL"){let e=r.style.cssText;r.style.cssText=e+"; list-style: square !important",window.getComputedStyle(r).listStyle,r.style.cssText=e}}function wg(r,e,t,n){for(let i=0,a=0;i<r.childCount&&a<=n;){let o=r.child(i++),s=a;if(a+=o.nodeSize,!o.isText)continue;let l=o.text;for(;i<r.childCount;){let u=r.child(i++);if(a+=u.nodeSize,!u.isText)break;l+=u.text}if(a>=t){if(a>=n&&l.slice(n-e.length-s,n-s)==e)return n-e.length;let u=s<n?l.lastIndexOf(e,n-s-1):-1;if(u>=0&&u+e.length+s>=t)return s+u;if(t==n&&l.length>=n+e.length-s&&l.slice(n-s,n-s+e.length)==e)return n}}return-1}function Oo(r,e,t,n,i){let a=[];for(let o=0,s=0;o<r.length;o++){let l=r[o],u=s,c=s+=l.size;u>=t||c<=e?a.push(l):(u<e&&a.push(l.slice(0,e-u,n)),i&&(a.push(i),i=void 0),c>t&&a.push(l.slice(t-u,l.size,n)))}return a}function qo(r,e=null){let t=r.domSelectionRange(),n=r.state.doc;if(!t.focusNode)return null;let i=r.docView.nearestDesc(t.focusNode),a=i&&i.size==0,o=r.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(o<0)return null;let s=n.resolve(o),l,u;if(ki(t)){for(l=o;i&&!i.node;)i=i.parent;let f=i.node;if(i&&f.isAtom&&R.isSelectable(f)&&i.parent&&!(f.isInline&&Xm(t.focusNode,t.focusOffset,i.dom))){let d=i.posBefore;u=new R(o==d?s:n.resolve(d))}}else{if(t instanceof r.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let f=o,d=o;for(let h=0;h<t.rangeCount;h++){let p=t.getRangeAt(h);f=Math.min(f,r.docView.posFromDOM(p.startContainer,p.startOffset,1)),d=Math.max(d,r.docView.posFromDOM(p.endContainer,p.endOffset,-1))}if(f<0)return null;[l,o]=d==r.state.selection.anchor?[d,f]:[f,d],s=n.resolve(o)}else l=r.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(l<0)return null}let c=n.resolve(l);if(!u){let f=e=="pointer"||r.state.selection.head<s.pos&&!a?1:-1;u=_o(r,c,s,f)}return u}function Yc(r){return r.editable?r.hasFocus():ef(r)&&document.activeElement&&document.activeElement.contains(r.dom)}function gt(r,e=!1){let t=r.state.selection;if(Zc(r,t),!!Yc(r)){if(!e&&r.input.mouseDown&&r.input.mouseDown.allowDefault&&ie){let n=r.domSelectionRange(),i=r.domObserver.currentSelection;if(n.anchorNode&&i.anchorNode&&ir(n.anchorNode,n.anchorOffset,i.anchorNode,i.anchorOffset)){r.input.mouseDown.delayedSelectionSync=!0,r.domObserver.setCurSelection();return}}if(r.domObserver.disconnectSelection(),r.cursorWrapper)Cg(r);else{let{anchor:n,head:i}=t,a,o;gc&&!(t instanceof q)&&(t.$from.parent.inlineContent||(a=yc(r,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(o=yc(r,t.to))),r.docView.setSelection(n,i,r,e),gc&&(a&&bc(a),o&&bc(o)
vendor: 3,791 bytes, line 6
6),t.visible?r.dom.classList.remove("ProseMirror-hideselection"):(r.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&kg(r))}r.domObserver.setCurSelection(),r.domObserver.connectSelection()}}var gc=ce||ie&&$c<63;function yc(r,e){let{node:t,offset:n}=r.docView.domFromPos(e,0),i=n<t.childNodes.length?t.childNodes[n]:null,a=n?t.childNodes[n-1]:null;if(ce&&i&&i.contentEditable=="false")return mo(i);if((!i||i.contentEditable=="false")&&(!a||a.contentEditable=="false")){if(i)return mo(i);if(a)return mo(a)}}function mo(r){return r.contentEditable="true",ce&&r.draggable&&(r.draggable=!1,r.wasDraggable=!0),r}function bc(r){r.contentEditable="false",r.wasDraggable&&(r.draggable=!0,r.wasDraggable=null)}function kg(r){let e=r.dom.ownerDocument;e.removeEventListener("selectionchange",r.input.hideSelectionGuard);let t=r.domSelectionRange(),n=t.anchorNode,i=t.anchorOffset;e.addEventListener("selectionchange",r.input.hideSelectionGuard=()=>{(t.anchorNode!=n||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",r.input.hideSelectionGuard),setTimeout(()=>{(!Yc(r)||r.state.selection.visible)&&r.dom.classList.remove("ProseMirror-hideselection")},20))})}function Cg(r){let e=r.domSelection();if(!e)return;let t=r.cursorWrapper.dom,n=t.nodeName=="IMG";n?e.collapse(t.parentNode,ue(t)+1):e.collapse(t,0),!n&&!r.state.selection.visible&&Ae&&Bt<=11&&(t.disabled=!0,t.disabled=!1)}function Zc(r,e){if(e instanceof R){let t=r.docView.descAt(e.from);t!=r.lastSelectedViewDesc&&(wc(r),t&&t.selectNode(),r.lastSelectedViewDesc=t)}else wc(r)}function wc(r){r.lastSelectedViewDesc&&(r.lastSelectedViewDesc.parent&&r.lastSelectedViewDesc.deselectNode(),r.lastSelectedViewDesc=void 0)}function _o(r,e,t,n){return r.someProp("createSelectionBetween",i=>i(r,e,t))||q.between(e,t,n)}function kc(r){return r.editable&&!r.hasFocus()?!1:ef(r)}function ef(r){let e=r.domSelectionRange();if(!e.anchorNode)return!1;try{return r.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(r.editable||r.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function Tg(r){let e=r.docView.domFromPos(r.state.selection.anchor,0),t=r.domSelectionRange();return ir(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Lo(r,e){let{$anchor:t,$head:n}=r.selection,i=e>0?t.max(n):t.min(n),a=i.parent.inlineContent?i.depth?r.doc.resolve(e>0?i.after():i.before()):null:i;return a&&H.findFrom(a,e)}function It(r,e){return r.dispatch(r.state.tr.setSelection(e).scrollIntoView()),!0}function Cc(r,e,t){let n=r.state.selection;if(n instanceof q)if(t.indexOf("s")>-1){let{$head:i}=n,a=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!a||a.isText||!a.isLeaf)return!1;let o=r.state.doc.resolve(i.pos+a.nodeSize*(e<0?-1:1));return It(r,new q(n.$anchor,o))}else if(n.empty){if(r.endOfTextblock(e>0?"forward":"backward")){let i=Lo(r.state,e);return i&&i instanceof R?It(r,i):!1}else if(!(Fe&&t.indexOf("m")>-1)){let i=n.$head,a=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!a||a.isText)return!1;let s=e<0?i.pos-a.nodeSize:i.pos;return a.isAtom||(o=r.docView.descAt(s))&&!o.contentDOM?R.isSelectable(a)?It(r,new R(e<0?r.state.doc.resolve(i.pos-a.nodeSize):i)):Nn?It(r,new q(r.state.doc.resolve(e<0?s:s+a.nodeSize))):!1:!1}}else return!1;else{if(n instanceof R&&n.node.isInline)return It(r,new q(e>0?n.$to:n.$from));{let i=Lo(r.state,e);return i?It(r,i):!1}}}function vi(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function Sn(r,e){let t=r.pmViewDesc;return t&&t.size==0&&(e<0||r.nextSibling||r.nodeName!="BR")}function Rr(r,e){return e<0?xg(r):Eg(r)}function xg(r){let e=r.domSelectionRange(),t=e.focusNode,n=e.focusOffset;if(!t)return;let i,a,o=!1;for(_e&&t.nodeType==1&&n<vi(t)&&Sn(t.childNodes[n],-1)&&(o=!0);;)if(n>
vendor: 2,353 bytes, line 6
60){if(t.nodeType!=1)break;{let s=t.childNodes[n-1];if(Sn(s,-1))i=t,a=--n;else if(s.nodeType==3)t=s,n=t.nodeValue.length;else break}}else{if(tf(t))break;{let s=t.previousSibling;for(;s&&Sn(s,-1);)i=t.parentNode,a=ue(s),s=s.previousSibling;if(s)t=s,n=vi(t);else{if(t=t.parentNode,t==r.dom)break;n=0}}}o?Ao(r,t,n):i&&Ao(r,i,a)}function Eg(r){let e=r.domSelectionRange(),t=e.focusNode,n=e.focusOffset;if(!t)return;let i=vi(t),a,o;for(;;)if(n<i){if(t.nodeType!=1)break;let s=t.childNodes[n];if(Sn(s,1))a=t,o=++n;else break}else{if(tf(t))break;{let s=t.nextSibling;for(;s&&Sn(s,1);)a=s.parentNode,o=ue(s)+1,s=s.nextSibling;if(s)t=s,n=0,i=vi(t);else{if(t=t.parentNode,t==r.dom)break;n=i=0}}}a&&Ao(r,a,o)}function tf(r){let e=r.pmViewDesc;return e&&e.node&&e.node.isBlock}function Sg(r,e){for(;r&&e==r.childNodes.length&&!An(r);)e=ue(r)+1,r=r.parentNode;for(;r&&e<r.childNodes.length;){let t=r.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;r=t,e=0}}function Mg(r,e){for(;r&&!e&&!An(r);)e=ue(r),r=r.parentNode;for(;r&&e;){let t=r.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;r=t,e=r.childNodes.length}}function Ao(r,e,t){if(e.nodeType!=3){let a,o;(o=Sg(e,t))?(e=o,t=0):(a=Mg(e,t))&&(e=a,t=a.nodeValue.length)}let n=r.domSelection();if(!n)return;if(ki(n)){let a=document.createRange();a.setEnd(e,t),a.setStart(e,t),n.removeAllRanges(),n.addRange(a)}else n.extend&&n.extend(e,t);r.domObserver.setCurSelection();let{state:i}=r;setTimeout(()=>{r.state==i&&gt(r)},50)}function Tc(r,e){let t=r.state.doc.resolve(e);if(!(ie||zc)&&t.parent.inlineContent){let i=r.coordsAtPos(e);if(e>t.start()){let a=r.coordsAtPos(e-1),o=(a.top+a.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(a.left-i.left)>1)return a.left<i.left?"ltr":"rtl"}if(e<t.end()){let a=r.coordsAtPos(e+1),o=(a.top+a.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(a.left-i.left)>1)return a.left>i.left?"ltr":"rtl"}}return getComputedStyle(r.dom).direction=="rtl"?"rtl":"ltr"}function xc(r,e,t){let n=r.state.selection;if(n instanceof q&&!n.empty||t.indexOf("s")>-1||Fe&&t.indexOf("m")>-1)return!1;let{$from:i,$to:a}=n;if(!i.parent.inlineContent||r.endOfTextblock(e<0?"up":"down")){let o=Lo(r.state,e);if(o&&o instanceof R)return It(r,o)}if(!i.parent.inlineContent){let o=e<0?i:a,s=n instanceof Ce?H.near(o,e):H.findFrom(o,e);
vendor: 6,294 bytes, lines 6-9
6return s?It(r,s):!1}return!1}function Ec(r,e){if(!(r.state.selection instanceof q))return!0;let{$head:t,$anchor:n,empty:i}=r.state.selection;if(!t.sameParent(n))return!0;if(!i)return!1;if(r.endOfTextblock(e>0?"forward":"backward"))return!0;let a=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(a&&!a.isText){let o=r.state.tr;return e<0?o.delete(t.pos-a.nodeSize,t.pos):o.delete(t.pos,t.pos+a.nodeSize),r.dispatch(o),!0}return!1}function Sc(r,e,t){r.domObserver.stop(),e.contentEditable=t,r.domObserver.start()}function Og(r){if(!ce||r.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=r.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let n=e.firstChild;Sc(r,n,"true"),setTimeout(()=>Sc(r,n,"false"),20)}return!1}function Lg(r){let e="";return r.ctrlKey&&(e+="c"),r.metaKey&&(e+="m"),r.altKey&&(e+="a"),r.shiftKey&&(e+="s"),e}function Ag(r,e){let t=e.keyCode,n=Lg(e);if(t==8||Fe&&t==72&&n=="c")return Ec(r,-1)||Rr(r,-1);if(t==46&&!e.shiftKey||Fe&&t==68&&n=="c")return Ec(r,1)||Rr(r,1);if(t==13||t==27)return!0;if(t==37||Fe&&t==66&&n=="c"){let i=t==37?Tc(r,r.state.selection.from)=="ltr"?-1:1:-1;return Cc(r,i,n)||Rr(r,i)}else if(t==39||Fe&&t==70&&n=="c"){let i=t==39?Tc(r,r.state.selection.from)=="ltr"?1:-1:1;return Cc(r,i,n)||Rr(r,i)}else{if(t==38||Fe&&t==80&&n=="c")return xc(r,-1,n)||Rr(r,-1);if(t==40||Fe&&t==78&&n=="c")return Og(r)||xc(r,1,n)||Rr(r,1);if(n==(Fe?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function $o(r,e){r.someProp("transformCopied",h=>{e=h(e,r)});let t=[],{content:n,openStart:i,openEnd:a}=e;for(;i>1&&a>1&&n.childCount==1&&n.firstChild.childCount==1;){i--,a--;let h=n.firstChild;t.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),n=h.content}let o=r.someProp("clipboardSerializer")||Jt.fromSchema(r.state.schema),s=lf(),l=s.createElement("div");l.appendChild(o.serializeFragment(n,{document:s}));let u=l.firstChild,c,f=0;for(;u&&u.nodeType==1&&(c=sf[u.nodeName.toLowerCase()]);){for(let h=c.length-1;h>=0;h--){let p=s.createElement(c[h]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),f++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${a}${f?` -${f}`:""} ${JSON.stringify(t)}`);let d=r.someProp("clipboardTextSerializer",h=>h(e,r))||e.content.textBetween(0,e.content.size,`
7
8`);return{dom:l,text:d,slice:e}}function rf(r,e,t,n,i){let a=i.parent.type.spec.code,o,s;if(!t&&!e)return null;let l=!!e&&(n||a||!t);if(l){if(r.someProp("transformPastedText",d=>{e=d(e,a||n,r)}),a)return s=new M(T.from(r.state.schema.text(e.replace(/\r\n?/g,`
9`))),0,0),r.someProp("transformPasted",d=>{s=d(s,r,!0)}),s;let f=r.someProp("clipboardTextParser",d=>d(e,i,n,r));if(f)s=f;else{let d=i.marks(),{schema:h}=r.state,p=Jt.fromSchema(h);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(v=>{let m=o.appendChild(document.createElement("p"));v&&m.appendChild(p.serializeNode(h.text(v,d)))})}}else r.someProp("transformPastedHTML",f=>{t=f(t,r)}),o=Rg(t),Nn&&Bg(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let f=+c[3];f>0;f--){let d=o.firstChild;for(;d&&d.nodeType!=1;)d=d.nextSibling;if(!d)break;o=d}if(s||(s=(r.someProp("clipboardParser")||r.someProp("domParser")||Lt.fromSchema(r.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||c),context:i,ruleFromNode(d){return d.nodeName=="BR"&&!d.nextSibling&&d.parentNode&&!Ng.test(d.parentNode.nodeName)?{ignore:!0}:null}})),c)s=Pg(Mc(s,+c[1],+c[2]),c[4]);else if(s=M.maxOpen(Dg(s.content,i),!0),s.openStart||s.openEnd){let f=0,d=0;for(let h=s.content.firstChild;f<s.openStart&&!h.type.spec.isolating;f++,h=h.firstChild);for(let h=s.content.lastChild;d<s.openEnd&&!h.type.spec.isolating;d++,h=h.lastChild);s=Mc(s,f,d)}return r.someProp("transformPasted",f=>{s=f(s,r,l)}),s}var Ng=/^(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 Dg(r,e){if(r.childCount<2)return r;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),a,o=[];if(r.forEach(s=>{if(!o)return;let l=i.findWrapping(s.type),u;if(!l)return o=null;if(u=o.length&&a.length&&af(l,a,s,o[o.length-1],0))o[o.length-1]=u;else{o.length&&(o[o.length-1]=of(o[o.length-1],a.length));let c=nf(s,l);o.push(c),i=i.matchType(c.type),a=l}}),o)return T.from(o)}return r}function nf(r,e,t=0){for(let n=e.length-1;n>=t;n--)r=e[n].create(null,T.from(r));return r}function af(r,e,t,n,i){if(i<r.length&&i<e.length&&r[i]==e[i]){let a=af(r,e,t,n.lastChild,i+1);if(a)return n.copy(n.content.replaceChild(n.childCount-1,a));if(n.contentMatchAt(n.childCount).matchType(i==r.length-1?t.type:r[i+1]))return n.copy(n.content.append(T.from(nf(t,r,i+1))))}}function of(r,e){if(e==0)return r;let t=r.content.replaceChild(r.childCount-1,of(r.lastChild,e-1)),n=r.contentMatchAt(r.childCount).fillBefore(T.empty,!0);return r.copy(t.append(n))}function No(r,e,t,n,i,a){let o=e<0?r.firstChild:r.lastChild,s=o.content;return r.childCount>1&&(a=0),i<n-1&&(s=No(s,e,t,n,i+1,a)),i>=t&&(s=e<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore(T.empty,!0))),r.replaceChild(e<0?0:r.childCount-1,o.copy(s))}function Mc(r,e,t){return e<r.openStart&&(r=new M(No(r.content,-1,e,r.openStart,0,r.openEnd),e,r.openEnd)),t<r.openEnd&&(r=new M(No(r.content,1,t,r.openEnd,0,0),r.openStart,t)),r}var sf={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Oc=null;function lf(){return Oc||(Oc=document.implementation.createHTMLDocument("title"))}var go=null;function Ig(r){let e=window.trustedTypes;return e?(go||(go=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),go.createHTML(r)):r}function Rg(r){let e=/^(\s*<meta [^>]*>)*/.exec(r);e&&(r=r.slice(e[0].length));let t=lf().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(r),i;if((i=n&&sf[n[1].toLowerCase()])&&(r=i.map(a=>"<"+a+">").join("")+r+i.map(a=>"</"+a+">").reverse().join("")),t.innerHTML=Ig(r),i)for(let a=0;a<i.length;a++)t=t.querySelector(i[a])||t;return t}function Bg(r){let e=r.querySelectorAll(ie?"span:not([class]):not
9([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let n=e[t];n.childNodes.length==1&&n.textContent=="\xA0"&&n.parentNode&&n.parentNode.replaceChild(r.ownerDocument.createTextNode(" "),n)}}function Pg(r,e){if(!r.size)return r;let t=r.content.firstChild.type.schema,n;try{n=JSON.parse(e)}catch{return r}let{content:i,openStart:a,openEnd:o}=r;for(let s=n.length-2;s>=0;s-=2){let l=t.nodes[n[s]];if(!l||l.hasRequiredAttrs())break;i=T.from(l.create(n[s+1],i)),a++,o++}return new M(i,a,o)}var Me={},Oe={},Hg={touchstart:!0,touchmove:!0},Do=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function Fg(r){for(let e in Me){let t=Me[e];r.dom.addEventListener(e,r.input.eventHandlers[e]=n=>{_g(r,n)&&!zo(r,n)&&(r.editable||!(n.type in Oe))&&t(r,n)},Hg[e]?{passive:!0}:void 0)}ce&&r.dom.addEventListener("input",()=>null),Io(r)}function Rt(r,e){r.input.lastSelectionOrigin=e,r.input.lastSelectionTime=Date.now()}function qg(r){r.domObserver.stop();for(let e in r.input.eventHandlers)r.dom.removeEventListener(e,r.input.eventHandlers[e]);clearTimeout(r.input.composingTimeout),clearTimeout(r.input.lastIOSEnterFallbackTimeout)}function Io(r){r.someProp("handleDOMEvents",e=>{for(let t in e)r.input.eventHandlers[t]||r.dom.addEventListener(t,r.input.eventHandlers[t]=n=>zo(r,n))})}function zo(r,e){return r.someProp("handleDOMEvents",t=>{let n=t[e.type];return n?n(r,e)||e.defaultPrevented:!1})}function _g(r,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=r.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function $g(r,e){!zo(r,e)&&Me[e.type]&&(r.editable||!(e.type in Oe))&&Me[e.type](r,e)}Oe.keydown=(r,e)=>{let t=e;if(r.input.shiftKey=t.keyCode==16||t.shiftKey,!cf(r,t)&&(r.input.lastKeyCode=t.keyCode,r.input.lastKeyCodeTime=Date.now(),!(mt&&ie&&t.keyCode==13)))if(t.keyCode!=229&&r.domObserver.forceFlush(),Fr&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let n=Date.now();r.input.lastIOSEnter=n,r.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{r.input.lastIOSEnter==n&&(r.someProp("handleKeyDown",i=>i(r,Yt(13,"Enter"))),r.input.lastIOSEnter=0)},200)}else r.someProp("handleKeyDown",n=>n(r,t))||Ag(r,t)?t.preventDefault():Rt(r,"key")};Oe.keyup=(r,e)=>{e.keyCode==16&&(r.input.shiftKey=!1)};Oe.keypress=(r,e)=>{let t=e;if(cf(r,t)||!t.charCode||t.ctrlKey&&!t.altKey||Fe&&t.metaKey)return;if(r.someProp("handleKeyPress",i=>i(r,t))){t.preventDefault();return}let n=r.state.selection;if(!(n instanceof q)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(t.charCode),a=()=>r.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!r.someProp("handleTextInput",o=>o(r,n.$from.pos,n.$to.pos,i,a))&&r.dispatch(a()),t.preventDefault()}};function Ci(r){return{left:r.clientX,top:r.clientY}}function zg(r,e){let t=e.x-r.clientX,n=e.y-r.clientY;return t*t+n*n<100}function Vo(r,e,t,n,i){if(n==-1)return!1;let a=r.state.doc.resolve(n);for(let o=a.depth+1;o>0;o--)if(r.someProp(e,s=>o>a.depth?s(r,t,a.nodeAfter,a.before(o),i,!0):s(r,t,a.node(o),a.before(o),i,!1)))return!0;return!1}function Pr(r,e,t){if(r.focused||r.focus(),r.state.selection.eq(e))return;let n=r.state.tr.setSelection(e);t=="pointer"&&n.setMeta("pointer",!0),r.dispatch(n)}function Vg(r,e){if(e==-1)return!1;let t=r.state.doc.resolve(e),n=t.nodeAfter;return n&&n.isAtom&&R.isSelectable(n)?(Pr(r,new R(t),"pointer"),!0):!1}function Ug(r,e){if(e==-1)return!1;let t=r.state.selection,n,i;t instanceof R&&(n=t.node);let a=r.state.doc.resolve(e);for(let o=a.depth+1;o>0;o--){let s=o>a.depth?a.nodeAfter:a.node(o);if(R.isSelectable(s)){n&&t.$from.depth>0&&o>=t.$from.depth&&a.before(t.$from.depth+1)==t.$from.pos?i=a.before(t.$from.depth):i=a.before(o);break}}
vendor: 9,304 bytes, line 9
9return i!=null?(Pr(r,R.create(r.state.doc,i),"pointer"),!0):!1}function Wg(r,e,t,n,i){return Vo(r,"handleClickOn",e,t,n)||r.someProp("handleClick",a=>a(r,e,n))||(i?Ug(r,t):Vg(r,t))}function jg(r,e,t,n){return Vo(r,"handleDoubleClickOn",e,t,n)||r.someProp("handleDoubleClick",i=>i(r,e,n))}function Gg(r,e,t,n){return Vo(r,"handleTripleClickOn",e,t,n)||r.someProp("handleTripleClick",i=>i(r,e,n))||Kg(r,t,n)}function Kg(r,e,t){if(t.button!=0)return!1;let n=r.state.doc;if(e==-1)return n.inlineContent?(Pr(r,q.create(n,0,n.content.size),"pointer"),!0):!1;let i=n.resolve(e);for(let a=i.depth+1;a>0;a--){let o=a>i.depth?i.nodeAfter:i.node(a),s=i.before(a);if(o.inlineContent)Pr(r,q.create(n,s+1,s+1+o.content.size),"pointer");else if(R.isSelectable(o))Pr(r,R.create(n,s),"pointer");else continue;return!0}}function Uo(r){return mi(r)}var uf=Fe?"metaKey":"ctrlKey";Me.mousedown=(r,e)=>{let t=e;r.input.shiftKey=t.shiftKey;let n=Uo(r),i=Date.now(),a="singleClick";i-r.input.lastClick.time<500&&zg(t,r.input.lastClick)&&!t[uf]&&r.input.lastClick.button==t.button&&(r.input.lastClick.type=="singleClick"?a="doubleClick":r.input.lastClick.type=="doubleClick"&&(a="tripleClick")),r.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:a,button:t.button};let o=r.posAtCoords(Ci(t));o&&(a=="singleClick"?(r.input.mouseDown&&r.input.mouseDown.done(),r.input.mouseDown=new Ro(r,o,t,!!n)):(a=="doubleClick"?jg:Gg)(r,o.pos,o.inside,t)?t.preventDefault():Rt(r,"pointer"))};var Ro=class{constructor(e,t,n,i){this.view=e,this.pos=t,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[uf],this.allowDefault=n.shiftKey;let a,o;if(t.inside>-1)a=e.state.doc.nodeAt(t.inside),o=t.inside;else{let c=e.state.doc.resolve(t.pos);a=c.parent,o=c.depth?c.before():0}let s=i?null:n.target,l=s?e.docView.nearestDesc(s,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=e.state;(n.button==0&&a.type.spec.draggable&&a.type.spec.selectable!==!1||u instanceof R&&u.from<=o&&u.to>o)&&(this.mightDrag={node:a,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&_e&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Rt(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>gt(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Ci(e))),this.updateAllowDefault(e),this.allowDefault||!t?Rt(this.view,"pointer"):Wg(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||ce&&this.mightDrag&&!this.mightDrag.node.isAtom||ie&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Pr(this.view,H.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Rt(this.view,"pointer")}move(e){this.updateAllowDefault(e),Rt(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}};Me.touchstart=r=>{r.input.lastTouch=Date.now(),Uo(r),Rt(r,"pointer")};Me.touchmove=r=>{r.input.lastTouch=Date.now(),Rt(r,"pointer")};Me.contextmenu=r=>Uo(r);function cf(r,e){return r.composing?!0:ce&&Math.abs(e.timeStamp-r.input.compositionEndedAt)<500?(r.input.compositionEndedAt=-2e8,!0):!1}var Jg=mt?5e3:-1;Oe.compositionstart=Oe.compositionupdate=r=>{if(!r.composing){r.domObserver.flush();let{state:e}=r,t=e.selection.$to;if(e.selection instanceof q&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)||ie&&zc&&Xg(r)))r.markCursor=r.state.storedMarks||t.marks(),mi(r,!0),r.markCursor=null;else if(mi(r,!e.selection.empty),_e&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let n=r.domSelectionRange();for(let i=n.focusNode,a=n.focusOffset;i&&i.nodeType==1&&a!=0;){let o=a<0?i.lastChild:i.childNodes[a-1];if(!o)break;if(o.nodeType==3){let s=r.domSelection();s&&s.collapse(o,o.nodeValue.length);break}else i=o,a=-1}}r.input.composing=!0}ff(r,Jg)};function Xg(r){let{focusNode:e,focusOffset:t}=r.domSelectionRange();if(!e||e.nodeType!=1||t>=e.childNodes.length)return!1;let n=e.childNodes[t];return n.nodeType==1&&n.contentEditable=="false"}Oe.compositionend=(r,e)=>{r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=e.timeStamp,r.input.compositionPendingChanges=r.domObserver.pendingRecords().length?r.input.compositionID:0,r.input.compositionNode=null,r.input.badSafariComposition?r.domObserver.forceFlush():r.input.compositionPendingChanges&&Promise.resolve().then(()=>r.domObserver.flush()),r.input.compositionID++,ff(r,20))};function ff(r,e){clearTimeout(r.input.composingTimeout),e>-1&&(r.input.composingTimeout=setTimeout(()=>mi(r),e))}function df(r){for(r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=Yg());r.input.compositionNodes.length>0;)r.input.compositionNodes.pop().markParentsDirty()}function Qg(r){let e=r.domSelectionRange();if(!e.focusNode)return null;let t=Km(e.focusNode,e.focusOffset),n=Jm(e.focusNode,e.focusOffset);if(t&&n&&t!=n){let i=n.pmViewDesc,a=r.domObserver.lastChangedTextNode;if(t==a||n==a)return a;if(!i||!i.isText(n.nodeValue))return n;if(r.input.compositionNode==n){let o=t.pmViewDesc;if(!(!o||!o.isText(t.nodeValue)))return n}}return t||n}function Yg(){let r=document.createEvent("Event");return r.initEvent("event",!0,!0),r.timeStamp}function mi(r,e=!1){if(!(mt&&r.domObserver.flushingSoon>=0)){if(r.domObserver.forceFlush(),df(r),e||r.docView&&r.docView.dirty){let t=qo(r),n=r.state.selection;return t&&!t.eq(n)?r.dispatch(r.state.tr.setSelection(t)):(r.markCursor||e)&&!n.$from.node(n.$from.sharedDepth(n.to)).inlineContent?r.dispatch(r.state.tr.deleteSelection()):r.updateState(r.state),!0}return!1}}function Zg(r,e){if(!r.dom.parentNode)return;let t=r.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),i=document.createRange();i.selectNodeContents(e),r.dom.blur(),n.removeAllRanges(),n.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),r.focus()},50)}var Mn=Ae&&Bt<15||Fr&&Zm<604;Me.copy=Oe.cut=(r,e)=>{let t=e,n=r.state.selection,i=t.type=="cut";if(n.empty)return;let a=Mn?null:t.clipboardData,o=n.content(),{dom:s,text:l}=$o(r,o);a?(t.preventDefault(),a.clearData(),a.setData("text/html",s.innerHTML),a.setData("text/plain",l)):Zg(r,s),i&&r.dispatch(r.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function ey(r){return r.openStart==0&&r.openEnd==0&&r.content.childCount==1?r.content.firstChild:null}function ty(r,e){if(!r.dom.parentNode)return;let t=r.input.shiftKey||r.state.selection.$from.parent.type.spec.code,n=r.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let i=r.input.shiftKey&&r.input.lastKeyCode!=45;setTimeout(()=>{r.focus(),n.parentNode&&n.parentNode.removeChild(n),t?On(r,n.value,null,i,e):On(r,n.textContent,n.innerHTML,i,e)},50)}function On(r,e,t,n,i){let a=rf(r,e,t,n,r.state.selection.$from);if(r.someProp("handlePaste",l=>l(r,i,a||M.empty)))return!0;if(!a)return!1;let o=ey(a),s=o?r.state.tr.replaceSelectionWith(o,n):r.state.tr.replaceSelection(a);return r.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function hf(r){let e=r.getData("text/plain")||r.getData("Text");if(e)return e;let t=r.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}Oe.paste=(r,e)=>{let t=e;if(r.composing&&!mt)return;let n=Mn?null:t.clipboardData,i=r.input.shiftKey&&r.input.lastKeyCode!=45;n&&On(r,hf(n),n.getData("text/html"),i,t)?t.preventDefault():ty(r,t)};var gi=class{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}},ry=Fe?"altKey":"ctrlKey";function pf(r,e){let t=r.someProp("dragCopies",n=>!n(e));return t??!e[ry]}Me.dragstart=(r,e)=>{let t=e,n=r.input.mouseDown;if(n&&n.done(),!t.dataTransfer)return;let i=r.state.selection,a=i.empty?null:r.posAtCoords(Ci(t)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof R?i.to-1:i.to))){if(n&&n.mightDrag)o=R.create(r.state.doc,n.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let f=r.docView.nearestDesc(t.target,!0);f&&f.node.type.spec.draggable&&f!=r.docView&&(o=R.create(r.state.doc,f.posBefore))}}
vendor: 9,099 bytes, line 9
9let s=(o||r.state.selection).content(),{dom:l,text:u,slice:c}=$o(r,s);(!t.dataTransfer.files.length||!ie||$c>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(Mn?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",Mn||t.dataTransfer.setData("text/plain",u),r.dragging=new gi(c,pf(r,t),o)};Me.dragend=r=>{let e=r.dragging;window.setTimeout(()=>{r.dragging==e&&(r.dragging=null)},50)};Oe.dragover=Oe.dragenter=(r,e)=>e.preventDefault();Oe.drop=(r,e)=>{try{ny(r,e,r.dragging)}finally{r.dragging=null}};function ny(r,e,t){if(!e.dataTransfer)return;let n=r.posAtCoords(Ci(e));if(!n)return;let i=r.state.doc.resolve(n.pos),a=t&&t.slice;a?r.someProp("transformPasted",h=>{a=h(a,r,!1)}):a=rf(r,hf(e.dataTransfer),Mn?null:e.dataTransfer.getData("text/html"),!1,i);let o=!!(t&&pf(r,e));if(r.someProp("handleDrop",h=>h(r,e,a||M.empty,o))){e.preventDefault();return}if(!a)return;e.preventDefault();let s=a?Ku(r.state.doc,i.pos,a):i.pos;s==null&&(s=i.pos);let l=r.state.tr;if(o){let{node:h}=t;h?h.replace(l):l.deleteSelection()}let u=l.mapping.map(s),c=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,f=l.doc;if(c?l.replaceRangeWith(u,u,a.content.firstChild):l.replaceRange(u,u,a),l.doc.eq(f))return;let d=l.doc.resolve(u);if(c&&R.isSelectable(a.content.firstChild)&&d.nodeAfter&&d.nodeAfter.sameMarkup(a.content.firstChild))l.setSelection(new R(d));else{let h=l.mapping.map(s);l.mapping.maps[l.mapping.maps.length-1].forEach((p,v,m,g)=>h=g),l.setSelection(_o(r,d,l.doc.resolve(h)))}r.focus(),r.dispatch(l.setMeta("uiEvent","drop"))}Me.focus=r=>{r.input.lastFocus=Date.now(),r.focused||(r.domObserver.stop(),r.dom.classList.add("ProseMirror-focused"),r.domObserver.start(),r.focused=!0,setTimeout(()=>{r.docView&&r.hasFocus()&&!r.domObserver.currentSelection.eq(r.domSelectionRange())&&gt(r)},20))};Me.blur=(r,e)=>{let t=e;r.focused&&(r.domObserver.stop(),r.dom.classList.remove("ProseMirror-focused"),r.domObserver.start(),t.relatedTarget&&r.dom.contains(t.relatedTarget)&&r.domObserver.currentSelection.clear(),r.focused=!1)};Me.beforeinput=(r,e)=>{if(ie&&mt&&e.inputType=="deleteContentBackward"){r.domObserver.flushSoon();let{domChangeCount:n}=r.input;setTimeout(()=>{if(r.input.domChangeCount!=n||(r.dom.blur(),r.focus(),r.someProp("handleKeyDown",a=>a(r,Yt(8,"Backspace")))))return;let{$cursor:i}=r.state.selection;i&&i.pos>0&&r.dispatch(r.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let r in Oe)Me[r]=Oe[r];function Ln(r,e){if(r==e)return!0;for(let t in r)if(r[t]!==e[t])return!1;for(let t in e)if(!(t in r))return!1;return!0}var yi=class r{constructor(e,t){this.toDOM=e,this.spec=t||rr,this.side=this.spec.side||0}map(e,t,n,i){let{pos:a,deleted:o}=e.mapResult(t.from+i,this.side<0?-1:1);return o?null:new ze(a-n,a-n,this)}valid(){return!0}eq(e){return this==e||e instanceof r&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Ln(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},tr=class r{constructor(e,t){this.attrs=e,this.spec=t||rr}map(e,t,n,i){let a=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-n;return a>=o?null:new ze(a,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof r&&Ln(this.attrs,e.attrs)&&Ln(this.spec,e.spec)}static is(e){return e.type instanceof r}destroy(){}},Bo=class r{constructor(e,t){this.attrs=e,this.spec=t||rr}map(e,t,n,i){let a=e.mapResult(t.from+i,1);if(a.deleted)return null;let o=e.mapResult(t.to+i,-1);return o.deleted||o.pos<=a.pos?null:new ze(a.pos-n,o.pos-n,this)}valid(e,t){let{index:n,offset:i}=e.content.findIndex(t.from),a;return i==t.from&&!(a=e.child(n)).isText&&i+a.nodeSize==t.to}eq(e){return this==e||e instanceof r&&Ln(this.attrs,e.attrs)&&Ln(this.spec,e.spec)}destroy(){}},ze=class r{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new r(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new r(e,e,new yi(t,n))}static inline(e,t,n,i){return new r(e,t,new tr(n,i))}static node(e,t,n,i){return new r(e,t,new Bo(n,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof tr}get widget(){return this.type instanceof yi}},Br=[],rr={},xe=class r{constructor(e,t){this.local=e.length?e:Br,this.children=t.length?t:Br}static create(e,t){return t.length?wi(t,e,0,rr):Te}find(e,t,n){let i=[];return this.findInner(e??0,t??1e9,i,0,n),i}findInner(e,t,n,i,a){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=t&&s.to>=e&&(!a||a(s.spec))&&n.push(s.copy(s.from+i,s.to+i))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,i+s,a)}}map(e,t,n){return this==Te||e.maps.length==0?this:this.mapInner(e,t,0,0,n||rr)}mapInner(e,t,n,i,a){let o;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(e,n,i);l&&l.type.valid(t,l)?(o||(o=[])).push(l):a.onRemove&&a.onRemove(this.local[s].spec)}return this.children.length?iy(this.children,o||[],e,t,n,i,a):o?new r(o.sort(nr),Br):Te}add(e,t){return t.length?this==Te?r.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let i,a=0;e.forEach((s,l)=>{let u=l+n,c;if(c=mf(t,s,u)){for(i||(i=this.children.slice());a<i.length&&i[a]<l;)a+=3;i[a]==l?i[a+2]=i[a+2].addInner(s,c,u+1):i.splice(a,0,l,l+s.nodeSize,wi(c,s,u+1,rr)),a+=3}});let o=vf(a?gf(t):t,-n);for(let s=0;s<o.length;s++)o[s].type.valid(e,o[s])||o.splice(s--,1);return new r(o.length?this.local.concat(o).sort(nr):this.local,i||this.children)}remove(e){return e.length==0||this==Te?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,i=this.local;for(let a=0;a<n.length;a+=3){let o,s=n[a]+t,l=n[a+1]+t;for(let c=0,f;c<e.length;c++)(f=e[c])&&f.from>s&&f.to<l&&(e[c]=null,(o||(o=[])).push(f));if(!o)continue;n==this.children&&(n=this.children.slice());let u=n[a+2].removeInner(o,s+1);u!=Te?n[a+2]=u:(n.splice(a,3),a-=3)}if(i.length){for(let a=0,o;a<e.length;a++)if(o=e[a])for(let s=0;s<i.length;s++)i[s].eq(o,t)&&(i==this.local&&(i=this.local.slice()),i.splice(s--,1))}return n==this.children&&i==this.local?this:i.length||n.length?new r(i,n):Te}forChild(e,t){if(this==Te)return this;if(t.isLeaf)return r.empty;let n,i;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=e){this.children[s]==e&&(n=this.children[s+2]);break}let a=e+1,o=a+t.content.size;for(let s=0;s<this.local.length;s++){let l=this.local[s];if(l.from<o&&l.to>a&&l.type instanceof tr){let u=Math.max(a,l.from)-a,c=Math.min(o,l.to)-a;u<c&&(i||(i=[])).push(l.copy(u,c))}}if(i){let s=new r(i.sort(nr),Br);return n?new bi([s,n]):s}return n||Te}eq(e){if(this==e)return!0;if(!(e instanceof r)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Wo(this.localsInner(e))}localsInner(e){if(this==Te)return Br;if(e.inlineContent||!this.local.some(tr.is))return this.local;let t=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof tr||t.push(this.local[n]);return t}forEachSet(e){e(this)}};xe.empty=new xe([],[]);xe.removeOverlap=Wo;var Te=xe.empty,bi=class r{constructor(e){this.members=e}map(e,t){let n=this.members.map(i=>i.map(e,t,rr));return r.from(n)}forChild(e,t){if(t.isLeaf)return xe.empty;let n=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(e,t);a!=Te&&(a instanceof r?n=n.concat(a.members):n.push(a))}return r.from(n)}eq(e){if(!(e instanceof r)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let i=0;i<this.members.length;i++){let a=this.members[i].localsInner(e);if(a.length)if(!t)t=a;else{n&&(t=t.slice(),n=!1);for(let o=0;o<a.length;o++)t.push(a[o])}}return t?Wo(n?t:t.sort(nr)):Br}static from(e){switch(e.length){case 0:return Te;case 1:return e[0];default:return new r(e.every(t=>t instanceof xe)?e:e.reduce((t,n)=>t.concat(n instanceof xe?n:n.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}};function iy(r,e,t,n,i,a,o){let s=r.slice();for(let u=0,c=a;u<t.maps.length;u++){let f=0;t.maps[u].forEach((d,h,p,v)=>{let m=v-p-(h-d);for(let g=0;g<s.length;g+=3){let w=s[g+1];if(w<0||d>w+c-f)continue;let k=s[g]+c-f;h>=k?s[g+1]=d<=k?-2:-1:d>=c&&m&&(s[g]+=m,s[g+1]+=m)}f+=m}),c=t.maps[u].map(c,-1)}let l=!1;for(let u=0;u<s.length;u+=3)if(s[u+1]<0){if(s[u+1]==-2){l=!0,s[u+1]=-1;continue}let c=t.map(r[u]+a),f=c-i;if(f<0||f>=n.content.size){l=!0;continue}let d=t.map(r[u+1]+a,-1),h=d-i,{index:p,offset:v}=n.content.findIndex(f),m=n.maybeChild(p);if(m&&v==f&&v+m.nodeSize==h){let g=s[u+2].mapInner(t,m,c+1,r[u]+a+1,o);g!=Te?(s[u]=f,s[u+1]=h,s[u+2]=g):(s[u+1]=-2,l=!0)}else l=!0}if(l){let u=ay(s,r,e,t,i,a,o),c=wi(u,n,0,o);e=c.local;for(let f=0;f<s.length;
vendor: 5,382 bytes, line 9
9f+=3)s[f+1]<0&&(s.splice(f,3),f-=3);for(let f=0,d=0;f<c.children.length;f+=3){let h=c.children[f];for(;d<s.length&&s[d]<h;)d+=3;s.splice(d,0,c.children[f],c.children[f+1],c.children[f+2])}}return new xe(e.sort(nr),s)}function vf(r,e){if(!e||!r.length)return r;let t=[];for(let n=0;n<r.length;n++){let i=r[n];t.push(new ze(i.from+e,i.to+e,i.type))}return t}function ay(r,e,t,n,i,a,o){function s(l,u){for(let c=0;c<l.local.length;c++){let f=l.local[c].map(n,i,u);f?t.push(f):o.onRemove&&o.onRemove(l.local[c].spec)}for(let c=0;c<l.children.length;c+=3)s(l.children[c+2],l.children[c]+u+1)}for(let l=0;l<r.length;l+=3)r[l+1]==-1&&s(r[l+2],e[l]+a+1);return t}function mf(r,e,t){if(e.isLeaf)return null;let n=t+e.nodeSize,i=null;for(let a=0,o;a<r.length;a++)(o=r[a])&&o.from>t&&o.to<n&&((i||(i=[])).push(o),r[a]=null);return i}function gf(r){let e=[];for(let t=0;t<r.length;t++)r[t]!=null&&e.push(r[t]);return e}function wi(r,e,t,n){let i=[],a=!1;e.forEach((s,l)=>{let u=mf(r,s,l+t);if(u){a=!0;let c=wi(u,s,t+l+1,n);c!=Te&&i.push(l,l+s.nodeSize,c)}});let o=vf(a?gf(r):r,-t).sort(nr);for(let s=0;s<o.length;s++)o[s].type.valid(e,o[s])||(n.onRemove&&n.onRemove(o[s].spec),o.splice(s--,1));return o.length||i.length?new xe(o,i):Te}function nr(r,e){return r.from-e.from||r.to-e.to}function Wo(r){let e=r;for(let t=0;t<e.length-1;t++){let n=e[t];if(n.from!=n.to)for(let i=t+1;i<e.length;i++){let a=e[i];if(a.from==n.from){a.to!=n.to&&(e==r&&(e=r.slice()),e[i]=a.copy(a.from,n.to),Lc(e,i+1,a.copy(n.to,a.to)));continue}else{a.from<n.to&&(e==r&&(e=r.slice()),e[t]=n.copy(n.from,a.from),Lc(e,i,n.copy(a.from,n.to)));break}}}return e}function Lc(r,e,t){for(;e<r.length&&nr(t,r[e])>0;)e++;r.splice(e,0,t)}function yo(r){let e=[];return r.someProp("decorations",t=>{let n=t(r.state);n&&n!=Te&&e.push(n)}),r.cursorWrapper&&e.push(xe.create(r.state.doc,[r.cursorWrapper.deco])),bi.from(e)}var oy={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},sy=Ae&&Bt<=11,Po=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},Ho=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Po,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let i=0;i<n.length;i++)this.queue.push(n[i]);Ae&&Bt<=11&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():ce&&e.composing&&n.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),sy&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.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,oy)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);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(kc(this.view)){if(this.suppressingSelectionUpdates)return gt(this.view);if(Ae&&Bt<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ir(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let a=e.focusNode;a;a=Hr(a))t.add(a);for(let a=e.anchorNode;a;a=Hr(a))if(t.has(a)){n=a;break}let i=n&&this.view.docView.nearestDesc(n);if(i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&kc(e)&&!this.ignoreSelectionChange(n),a=-1,o=-1,s=!1,l=[];
vendor: 4,324 bytes, line 9
9if(e.editable)for(let c=0;c<t.length;c++){let f=this.registerMutation(t[c],l);f&&(a=a<0?f.from:Math.min(f.from,a),o=o<0?f.to:Math.max(f.to,o),f.typeOver&&(s=!0))}if(_e&&l.length){let c=l.filter(f=>f.nodeName=="BR");if(c.length==2){let[f,d]=c;f.parentNode&&f.parentNode.parentNode==d.parentNode?d.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let d of c){let h=d.parentNode;h&&h.nodeName=="LI"&&(!f||cy(e,f)!=h)&&d.remove()}}}else if((ie||ce)&&l.some(c=>c.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let c of l)if(c.nodeName=="BR"&&c.parentNode){let f=c.nextSibling;f&&f.nodeType==1&&f.contentEditable=="false"&&c.parentNode.removeChild(c)}}let u=null;a<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&ki(n)&&(u=qo(e))&&u.eq(H.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,gt(e),this.currentSelection.set(n),e.scrollToSelection()):(a>-1||i)&&(a>-1&&(e.docView.markDirty(a,o),ly(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,fy(e,l)),this.handleDOMChange(a,o,s,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||gt(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(n==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;c<e.addedNodes.length;c++){let f=e.addedNodes[c];t.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let i=e.previousSibling,a=e.nextSibling;if(Ae&&Bt<=11&&e.addedNodes.length)for(let c=0;c<e.addedNodes.length;c++){let{previousSibling:f,nextSibling:d}=e.addedNodes[c];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f),(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(a=d)}let o=i&&i.parentNode==e.target?ue(i)+1:0,s=n.localPosFromDOM(e.target,o,-1),l=a&&a.parentNode==e.target?ue(a):e.target.childNodes.length,u=n.localPosFromDOM(e.target,l,1);return{from:s,to:u}}else return e.type=="attributes"?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}},Ac=new WeakMap,Nc=!1;function ly(r){if(!Ac.has(r)&&(Ac.set(r,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(r.dom).whiteSpace)!==-1)){if(r.requiresGeckoHackNode=_e,Nc)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."),Nc=!0}}function Dc(r,e){let t=e.startContainer,n=e.startOffset,i=e.endContainer,a=e.endOffset,o=r.domAtPos(r.state.selection.anchor);return ir(o.node,o.offset,i,a)&&([t,n,i,a]=[i,a,t,n]),{anchorNode:t,anchorOffset:n,focusNode:i,focusOffset:a}}function uy(r,e){if(e.getComposedRanges){let i=e.getComposedRanges(r.root)[0];if(i)return Dc(r,i)}let t;function n(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return r.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),r.dom.removeEventListener("beforeinput",n,!0),t?Dc(r,t):null}function cy(r,e){for(let t=e.parentNode;t&&t!=r.dom;t=t.parentNode){let n=r.docView.nearestDesc(t,!0);if(n&&n.node.isBlock)return t}return null}function fy(r,e){var t;let{focusNode:n,focusOffset:i}=r.domSelectionRange();for(let a of e)if(((t=a.parentNode)===null||t===void 0?void 0:t.nodeName)=="TR"){let o=a.nextSibling;for(;o&&o.nodeName!="TD"&&o.nodeName!="TH";)o=o.nextSibling;if(o){let s=o;for(;;){let l=s.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;s=l}s.insertBefore(a,s.firstChild),n==a&&r.domSelection().collapse(a,i)}else a.parentNode.removeChild(a)}}function dy(r,e,t){let{node:n,fromOffset:i,toOffset:a,from:o,to:s}=r.docView.parseRange(e,t),l=r.domSelectionRange(),u,c=l.anchorNode;if(c&&r.dom.contains(c.nodeType==1?c:c.parentNode)&&(u=[{node:c,offset:l.anchorOffset}],ki(l)||u.push({node:l.focusNode,offset:l.focusOffset})),ie&&r.input.lastKeyCode===8)for(let m=a;m>i;
vendor: 4,263 bytes, line 9
9m--){let g=n.childNodes[m-1],w=g.pmViewDesc;if(g.nodeName=="BR"&&!w){a=m;break}if(!w||w.size)break}let f=r.state.doc,d=r.someProp("domParser")||Lt.fromSchema(r.state.schema),h=f.resolve(o),p=null,v=d.parse(n,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:a,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:hy,context:h});if(u&&u[0].pos!=null){let m=u[0].pos,g=u[1]&&u[1].pos;g==null&&(g=m),p={anchor:m+o,head:g+o}}return{doc:v,sel:p,from:o,to:s}}function hy(r){let e=r.pmViewDesc;if(e)return e.parseRule();if(r.nodeName=="BR"&&r.parentNode){if(ce&&/^(ul|ol)$/i.test(r.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(r.parentNode.lastChild==r||ce&&/^(tr|table)$/i.test(r.parentNode.nodeName))return{ignore:!0}}else if(r.nodeName=="IMG"&&r.getAttribute("mark-placeholder"))return{ignore:!0};return null}var py=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function vy(r,e,t,n,i){let a=r.input.compositionPendingChanges||(r.composing?r.input.compositionID:0);if(r.input.compositionPendingChanges=0,e<0){let E=r.input.lastSelectionTime>Date.now()-50?r.input.lastSelectionOrigin:null,N=qo(r,E);if(N&&!r.state.selection.eq(N)){if(ie&&mt&&r.input.lastKeyCode===13&&Date.now()-100<r.input.lastKeyCodeTime&&r.someProp("handleKeyDown",j=>j(r,Yt(13,"Enter"))))return;let P=r.state.tr.setSelection(N);E=="pointer"?P.setMeta("pointer",!0):E=="key"&&P.scrollIntoView(),a&&P.setMeta("composition",a),r.dispatch(P)}return}let o=r.state.doc.resolve(e),s=o.sharedDepth(t);e=o.before(s+1),t=r.state.doc.resolve(t).after(s+1);let l=r.state.selection,u=dy(r,e,t),c=r.state.doc,f=c.slice(u.from,u.to),d,h;r.input.lastKeyCode===8&&Date.now()-100<r.input.lastKeyCodeTime?(d=r.state.selection.to,h="end"):(d=r.state.selection.from,h="start"),r.input.lastKeyCode=null;let p=yy(f.content,u.doc.content,u.from,d,h);if(p&&r.input.domChangeCount++,(Fr&&r.input.lastIOSEnter>Date.now()-225||mt)&&i.some(E=>E.nodeType==1&&!py.test(E.nodeName))&&(!p||p.endA>=p.endB)&&r.someProp("handleKeyDown",E=>E(r,Yt(13,"Enter")))){r.input.lastIOSEnter=0;return}if(!p)if(n&&l instanceof q&&!l.empty&&l.$head.sameParent(l.$anchor)&&!r.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let E=Ic(r,r.state.doc,u.sel);if(E&&!E.eq(r.state.selection)){let N=r.state.tr.setSelection(E);a&&N.setMeta("composition",a),r.dispatch(N)}}return}r.state.selection.from<r.state.selection.to&&p.start==p.endB&&r.state.selection instanceof q&&(p.start>r.state.selection.from&&p.start<=r.state.selection.from+2&&r.state.selection.from>=u.from?p.start=r.state.selection.from:p.endA<r.state.selection.to&&p.endA>=r.state.selection.to-2&&r.state.selection.to<=u.to&&(p.endB+=r.state.selection.to-p.endA,p.endA=r.state.selection.to)),Ae&&Bt<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>u.from&&u.doc.textBetween(p.start-u.from-1,p.start-u.from+1)==" \xA0"&&(p.start--,p.endA--,p.endB--);let v=u.doc.resolveNoCache(p.start-u.from),m=u.doc.resolveNoCache(p.endB-u.from),g=c.resolve(p.start),w=v.sameParent(m)&&v.parent.inlineContent&&g.end()>=p.endA;if((Fr&&r.input.lastIOSEnter>Date.now()-225&&(!w||i.some(E=>E.nodeName=="DIV"||E.nodeName=="P"))||!w&&v.pos<u.doc.content.size&&(!v.sameParent(m)||!v.parent.inlineContent)&&v.pos<m.pos&&!/\S/.test(u.doc.textBetween(v.pos,m.pos,"","")))&&r.someProp("handleKeyDown",E=>E(r,Yt(13,"Enter")))){r.input.lastIOSEnter=0;return}if(r.state.selection.anchor>p.start&&gy(c,p.start,p.endA,v,m)&&r.someProp("handleKeyDown",E=>E(r,Yt(8,"Backspace")))){mt&&ie&&r.domObserver.suppressSelectionUpdates();return}ie&&p.endB==p.start&&(r.input.lastChromeDelete=Date.now()),mt&&!w&&v.start()!=m.start()&&m.parentOffset==0&&v.depth==m.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==p.endA&&(p.endB-=2,m=u.doc.resolveNoCache(p.endB-u.from),setTimeout(()=>{r.someProp("handleKeyDown",function(E){return E(r,Yt(13,"Enter"))})},20));let k=p.start,C=p.endA,x=E=>{let N=E||r.state.tr.replace(k,C,u.doc.slice(p.start-u.from,p.endB-u.from));if(u.sel){let P=Ic(r,N.doc,u.sel);
vendor: 12,722 bytes, line 9
9P&&!(ie&&r.composing&&P.empty&&(p.start!=p.endB||r.input.lastChromeDelete<Date.now()-100)&&(P.head==k||P.head==N.mapping.map(C)-1)||Ae&&P.empty&&P.head==k)&&N.setSelection(P)}return a&&N.setMeta("composition",a),N.scrollIntoView()},L;if(w)if(v.pos==m.pos){Ae&&Bt<=11&&v.parentOffset==0&&(r.domObserver.suppressSelectionUpdates(),setTimeout(()=>gt(r),20));let E=x(r.state.tr.delete(k,C)),N=c.resolve(p.start).marksAcross(c.resolve(p.endA));N&&E.ensureMarks(N),r.dispatch(E)}else if(p.endA==p.endB&&(L=my(v.parent.content.cut(v.parentOffset,m.parentOffset),g.parent.content.cut(g.parentOffset,p.endA-g.start())))){let E=x(r.state.tr);L.type=="add"?E.addMark(k,C,L.mark):E.removeMark(k,C,L.mark),r.dispatch(E)}else if(v.parent.child(v.index()).isText&&v.index()==m.index()-(m.textOffset?0:1)){let E=v.parent.textBetween(v.parentOffset,m.parentOffset),N=()=>x(r.state.tr.insertText(E,k,C));r.someProp("handleTextInput",P=>P(r,k,C,E,N))||r.dispatch(N())}else r.dispatch(x());else r.dispatch(x())}function Ic(r,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:_o(r,e.resolve(t.anchor),e.resolve(t.head))}function my(r,e){let t=r.firstChild.marks,n=e.firstChild.marks,i=t,a=n,o,s,l;for(let c=0;c<n.length;c++)i=n[c].removeFromSet(i);for(let c=0;c<t.length;c++)a=t[c].removeFromSet(a);if(i.length==1&&a.length==0)s=i[0],o="add",l=c=>c.mark(s.addToSet(c.marks));else if(i.length==0&&a.length==1)s=a[0],o="remove",l=c=>c.mark(s.removeFromSet(c.marks));else return null;let u=[];for(let c=0;c<e.childCount;c++)u.push(l(e.child(c)));if(T.from(u).eq(r))return{mark:s,type:o}}function gy(r,e,t,n,i){if(t-e<=i.pos-n.pos||bo(n,!0,!1)<i.pos)return!1;let a=r.resolve(e);if(!n.parent.isTextblock){let s=a.nodeAfter;return s!=null&&t==e+s.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let o=r.resolve(bo(a,!0,!0));return!o.parent.isTextblock||o.pos>t||bo(o,!0,!1)<t?!1:n.parent.content.cut(n.parentOffset).eq(o.parent.content)}function bo(r,e,t){let n=r.depth,i=e?r.end():r.pos;for(;n>0&&(e||r.indexAfter(n)==r.node(n).childCount);)n--,i++,e=!1;if(t){let a=r.node(n).maybeChild(r.indexAfter(n));for(;a&&!a.isLeaf;)a=a.firstChild,i++}return i}function yy(r,e,t,n,i){let a=r.findDiffStart(e,t);if(a==null)return null;let{a:o,b:s}=r.findDiffEnd(e,t+r.size,t+e.size);if(i=="end"){let l=Math.max(0,a-Math.min(o,s));n-=o+l-a}if(o<a&&r.size<e.size){let l=n<=a&&n>=o?a-n:0;a-=l,a&&a<e.size&&Rc(e.textBetween(a-1,a+1))&&(a+=l?1:-1),s=a+(s-o),o=a}else if(s<a){let l=n<=a&&n>=s?a-n:0;a-=l,a&&a<r.size&&Rc(r.textBetween(a-1,a+1))&&(a+=l?1:-1),o=a+(o-s),s=a}return{start:a,endA:o,endB:s}}function Rc(r){if(r.length!=2)return!1;let e=r.charCodeAt(0),t=r.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}var or=class{constructor(e,t){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 Do,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(qc),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Hc(this),Pc(this),this.nodeViews=Fc(this),this.docView=vc(this.state.doc,Bc(this),yo(this),this.dom,this),this.domObserver=new Ho(this,(n,i,a,o)=>vy(this,n,i,a,o)),this.domObserver.start(),Fg(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Io(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(qc),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let n in this._props)t[n]=this._props[n];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n;let i=this.state,a=!1,o=!1;e.storedMarks&&this.composing&&(df(this),o=!0),this.state=e;let s=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(s||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let h=Fc(this);wy(h,this.nodeViews)&&(this.nodeViews=h,a=!0)}(s||t.handleDOMEvents!=this._props.handleDOMEvents)&&Io(this),this.editable=Hc(this),Pc(this);let l=yo(this),u=Bc(this),c=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",f=a||!this.docView.matchesNode(e.doc,u,l);(f||!e.selection.eq(i.selection))&&(o=!0);let d=c=="preserve"&&o&&this.dom.style.overflowAnchor==null&&rg(this);if(o){this.domObserver.stop();let h=f&&(Ae||ie)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&by(i.selection,e.selection);if(f){let p=ie?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Qg(this)),(a||!this.docView.update(e.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=vc(e.doc,u,l,this.dom,this)),p&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Tg(this))?gt(this,h):(Zc(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((n=this.dragging)===null||n===void 0)&&n.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():d&&ng(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof R){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&uc(this,t.getBoundingClientRect(),e)}else uc(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let n=this.directPlugins[t];n.spec.view&&this.pluginViews.push(n.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let n=this.state.plugins[t];n.spec.view&&this.pluginViews.push(n.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,i=-1;if(this.state.doc.nodeAt(n.from)==n.node)i=n.from;else{let a=n.from+(this.state.doc.content.size-t.doc.content.size);(a>0&&this.state.doc.nodeAt(a))==n.node&&(i=a)}this.dragging=new gi(e.slice,e.move,i<0?void 0:R.create(this.state.doc,i))}someProp(e,t){let n=this._props&&this._props[e],i;if(n!=null&&(i=t?t(n):n))return i;for(let o=0;o<this.directPlugins.length;o++){let s=this.directPlugins[o].props[e];if(s!=null&&(i=t?t(s):s))return i}let a=this.state.plugins;if(a)for(let o=0;o<a.length;o++){let s=a[o].props[e];if(s!=null&&(i=t?t(s):s))return i}}hasFocus(){if(Ae){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&ig(this.dom),gt(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return ug(this,e)}coordsAtPos(e,t=1){return Gc(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let i=this.docView.posFromDOM(e,t,n);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return pg(this,t||this.state,e)}pasteHTML(e,t){return On(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return On(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return $o(this,e)}destroy(){this.docView&&(qg(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],yo(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,jm())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return $g(this,e)}domSelectionRange(){let e=this.domSelection();return e?ce&&this.root.nodeType===11&&Qm(this.dom.ownerDocument)==this.dom&&uy(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};or.prototype.dispatch=function(r){let e=this._props.dispatchTransaction;e?e.call(this,r):this.updateState(this.state.apply(r))};function Bc(r){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(r.editable),r.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(r.state)),t)for(let n in t)n=="class"?e.class+=" "+t[n]:n=="style"?e.style=(e.style?e.style+";":"")+t[n]:!e[n]&&n!="contenteditable"&&n!="nodeName"&&(e[n]=String(t[n]))}),e.translate||(e.translate="no"),[ze.node(0,r.state.doc.content.size,e)]}function Pc(r){if(r.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),r.cursorWrapper={dom:e,deco:ze.widget(r.state.selection.from,e,{raw:!0,marks:r.markCursor})}}else r.cursorWrapper=null}function Hc(r){return!r.someProp("editable",e=>e(r.state)===!1)}function by(r,e){let t=Math.min(r.$anchor.sharedDepth(r.head),e.$anchor.sharedDepth(e.head));return r.$anchor.start(t)!=e.$anchor.start(t)}function Fc(r){let e=Object.create(null);function t(n){for(let i in n)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=n[i])}return r.someProp("nodeViews",t),r.someProp("markViews",t),e}function wy(r,e){let t=0,n=0;for(let i in r){if(r[i]!=e[i])return!0;t++}for(let i in e)n++;return t!=n}function qc(r){if(r.spec.state||r.spec.filterTransaction||r.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var yt={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:"'"},xi={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},ky=typeof navigator<"u"&&/Mac/.test(navigator.platform),Cy=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Q=0;Q<10;Q++)yt[48+Q]=yt[96+Q]=String(Q);var Q;for(Q=1;Q<=24;Q++)yt[Q+111]="F"+Q;var Q;for(Q=65;Q<=90;Q++)yt[Q]=String.fromCharCode(Q+32),xi[Q]=String.fromCharCode(Q);var Q;for(Ti in yt)xi.hasOwnProperty(Ti)||(xi[Ti]=yt[Ti]);var Ti;function yf(r){var e=ky&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||Cy&&r.shiftKey&&r.key&&r.key.length==1||r.key=="Unidentified",t=!e&&r.key||(r.shiftKey?xi:yt)[r.keyCode]||r.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}var Ty=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),xy=typeof navigator<"u"&&/Win/.test(navigator.platform);function Ey(r){let e=r.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let n,i,a,o;for(let s=0;s<e.length-1;s++){let l=e[s];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))a=!0;else if(/^mod$/i.test(l))Ty?o=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return n&&(t="Alt-"+t),i&&(t="Ctrl-"+t),o&&(t="Meta-"+t),a&&(t="Shift-"+t),t}function Sy(r){let e=Object.create(null);for(let t in r)e[Ey(t)]=r[t];return e}
vendor: 8,444 bytes, lines 9-10
9function jo(r,e,t=!0){return e.altKey&&(r="Alt-"+r),e.ctrlKey&&(r="Ctrl-"+r),e.metaKey&&(r="Meta-"+r),t&&e.shiftKey&&(r="Shift-"+r),r}function _r(r){return new X({props:{handleKeyDown:My(r)}})}function My(r){let e=Sy(r);return function(t,n){let i=yf(n),a,o=e[jo(i,n)];if(o&&o(t.state,t.dispatch,t))return!0;if(i.length==1&&i!=" "){if(n.shiftKey){let s=e[jo(i,n,!1)];if(s&&s(t.state,t.dispatch,t))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(xy&&n.ctrlKey&&n.altKey)&&(a=yt[n.keyCode])&&a!=i){let s=e[jo(a,n)];if(s&&s(t.state,t.dispatch,t))return!0}}return!1}}var Ei=(r,e)=>r.selection.empty?!1:(e&&e(r.tr.deleteSelection().scrollIntoView()),!0);function Oy(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("backward",r):t.parentOffset>0)?null:t}var Ly=(r,e,t)=>{let n=Oy(r,t);if(!n)return!1;let i=wf(n);if(!i){let o=n.blockRange(),s=o&&Nr(o);return s==null?!1:(e&&e(r.tr.lift(o,s).scrollIntoView()),!0)}let a=i.nodeBefore;if(Cf(r,i,e,-1))return!0;if(n.parent.content.size==0&&($r(a,"end")||R.isSelectable(a)))for(let o=n.depth;;o--){let s=li(r.doc,n.before(o),n.after(o),M.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=r.tr.step(s);l.setSelection($r(a,"end")?H.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):R.create(l.doc,i.pos-a.nodeSize)),e(l.scrollIntoView())}return!0}if(o==1||n.node(o-1).childCount>1)break}return a.isAtom&&i.depth==n.depth-1?(e&&e(r.tr.delete(i.pos-a.nodeSize,i.pos).scrollIntoView()),!0):!1};function $r(r,e,t=!1){for(let n=r;n;n=e=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(t&&n.childCount!=1)return!1}return!1}var Ay=(r,e,t)=>{let{$head:n,empty:i}=r.selection,a=n;if(!i)return!1;if(n.parent.isTextblock){if(t?!t.endOfTextblock("backward",r):n.parentOffset>0)return!1;a=wf(n)}let o=a&&a.nodeBefore;return!o||!R.isSelectable(o)?!1:(e&&e(r.tr.setSelection(R.create(r.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function wf(r){if(!r.parent.type.spec.isolating)for(let e=r.depth-1;e>=0;e--){if(r.index(e)>0)return r.doc.resolve(r.before(e+1));if(r.node(e).type.spec.isolating)break}return null}function Ny(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("forward",r):t.parentOffset<t.parent.content.size)?null:t}var Ko=(r,e,t)=>{let n=Ny(r,t);if(!n)return!1;let i=kf(n);if(!i)return!1;let a=i.nodeAfter;if(Cf(r,i,e,1))return!0;if(n.parent.content.size==0&&($r(a,"start")||R.isSelectable(a))){let o=li(r.doc,n.before(),n.after(),M.empty);if(o&&o.slice.size<o.to-o.from){if(e){let s=r.tr.step(o);s.setSelection($r(a,"start")?H.findFrom(s.doc.resolve(s.mapping.map(i.pos)),1):R.create(s.doc,s.mapping.map(i.pos))),e(s.scrollIntoView())}return!0}}return a.isAtom&&i.depth==n.depth-1?(e&&e(r.tr.delete(i.pos,i.pos+a.nodeSize).scrollIntoView()),!0):!1},Dy=(r,e,t)=>{let{$head:n,empty:i}=r.selection,a=n;if(!i)return!1;if(n.parent.isTextblock){if(t?!t.endOfTextblock("forward",r):n.parentOffset<n.parent.content.size)return!1;a=kf(n)}let o=a&&a.nodeAfter;return!o||!R.isSelectable(o)?!1:(e&&e(r.tr.setSelection(R.create(r.doc,a.pos)).scrollIntoView()),!0)};function kf(r){if(!r.parent.type.spec.isolating)for(let e=r.depth-1;e>=0;e--){let t=r.node(e);if(r.index(e)+1<t.childCount)return r.doc.resolve(r.after(e+1));if(t.type.spec.isolating)break}return null}var Jo=(r,e)=>{let{$head:t,$anchor:n}=r.selection;return!t.parent.type.spec.code||!t.sameParent(n)?!1:(e&&e(r.tr.insertText(`
10`).scrollIntoView()),!0)};function Xo(r){for(let e=0;e<r.edgeCount;e++){let{type:t}=r.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}var Si=(r,e)=>{let{$head:t,$anchor:n}=r.selection;if(!t.parent.type.spec.code||!t.sameParent(n))return!1;let i=t.node(-1),a=t.indexAfter(-1),o=Xo(i.contentMatchAt(a));if(!o||!i.canReplaceWith(a,a,o))return!1;if(e){let s=t.after(),l=r.tr.replaceWith(s,s,o.createAndFill());l.setSelection(H.near(l.doc.resolve(s),1)),e(l.scrollIntoView())}return!0},Iy=(r,e)=>{let t=r.selection,{$from:n,$to:i}=t;if(t instanceof Ce||n.parent.inlineContent||i.parent.inlineContent)return!1;let a=Xo(i.parent.contentMatchAt(i.indexAfter()));if(!a||!a.isTextblock)return!1;if(e){let o=(!n.parentOffset&&i.index()<i.parent.childCount?n:i).pos,s=r.tr.insert(o,a.createAndFill());s.setSelection(q.create(s.doc,o+1)),e(s.scrollIntoView())}return!0},Ry=(r,e)=>{let{$cursor:t}=r.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let a=t.before();if(At(r.doc,a))return e&&e(r.tr.split(a).scrollIntoView()),!0}let n=t.blockRange(),i=n&&Nr(n);return i==null?!1:(e&&e(r.tr.lift(n,i).scrollIntoView()),!0)};function By(r){return(e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof R&&e.selection.node.isBlock)return!n.parentOffset||!At(e.doc,n.pos)?!1:(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let a=[],o,s,l=!1,u=!1;for(let h=n.depth;;h--)if(n.node(h).isBlock){l=n.end(h)==n.pos+(n.depth-h),u=n.start(h)==n.pos-(n.depth-h),s=Xo(n.node(h-1).contentMatchAt(n.indexAfter(h-1)));let v=r&&r(i.parent,l,n);a.unshift(v||(l&&s?{type:s}:null)),o=h;break}else{if(h==1)return!1;a.unshift(null)}let c=e.tr;(e.selection instanceof q||e.selection instanceof Ce)&&c.deleteSelection();let f=c.mapping.map(n.pos),d=At(c.doc,f,a.length,a);if(d||(a[0]=s?{type:s}:null,d=At(c.doc,f,a.length,a)),!d)return!1;if(c.split(f,a.length,a),!l&&u&&n.node(o).type!=s){let h=c.mapping.map(n.before(o)),p=c.doc.resolve(h);s&&n.node(o-1).canReplaceWith(p.index(),p.index()+1,s)&&c.setNodeMarkup(c.mapping.map(n.before(o)),s)}return t&&t(c.scrollIntoView()),!0}}var Py=By();var Qo=(r,e)=>(e&&e(r.tr.setSelection(new Ce(r.doc))),!0);function Hy(r,e,t){let n=e.nodeBefore,i=e.nodeAfter,a=e.index();return!n||!i||!n.type.compatibleContent(i.type)?!1:!n.content.size&&e.parent.canReplace(a-1,a)?(t&&t(r.tr.delete(e.pos-n.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(a,a+1)||!(i.isTextblock||uo(r.doc,e.pos))?!1:(t&&t(r.tr.join(e.pos).scrollIntoView()),!0)}function Cf(r,e,t,n){let i=e.nodeBefore,a=e.nodeAfter,o,s,l=i.type.spec.isolating||a.type.spec.isolating;if(!l&&Hy(r,e,t))return!0;let u=!l&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&s.matchType(o[0]||a.type).validEnd){if(t){let h=e.pos+a.nodeSize,p=T.empty;for(let g=o.length-1;g>=0;g--)p=T.from(o[g].create(null,p));p=T.from(i.copy(p));let v=r.tr.step(new Z(e.pos-1,h,e.pos,h,new M(p,1,0),o.length,!0)),m=v.doc.resolve(h+2*o.length);m.nodeAfter&&m.nodeAfter.type==i.type&&uo(v.doc,m.pos)&&v.join(m.pos),t(v.scrollIntoView())}return!0}let c=a.type.spec.isolating||n>0&&l?null:H.findFrom(e,1),f=c&&c.$from.blockRange(c.$to),d=f&&Nr(f);if(d!=null&&d>=e.depth)return t&&t(r.tr.lift(f,d).scrollIntoView()),!0;if(u&&$r(a,"start",!0)&&$r(i,"end")){let h=i,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let v=a,m=1;for(;!v.isTextblock;v=v.firstChild)m++;if(h.canReplace(h.childCount,h.childCount,v.content)){if(t){let g=T.empty;for(let k=p.length-1;k>=0;k--)g=T.from(p[k].copy(g));let w=r.tr.step(new Z(e.pos-p.length,e.pos+a.nodeSize,e.pos+m,e.pos+a.nodeSize-m,new M(g,p.length,0),0,!0));t(w.scrollIntoView())}return!0}}return!1}function Tf(r){return function(e,t){let n=e.selection,i=r<0?n.$from:n.$to,a=i.depth;for(;i.node(a).isInline;){if(!a)return!1;a--}return i.node(a).isTextblock?(t&&t(e.tr.setSelection(q.create(e.doc,r<0?i.start(a):i.end(a)))),!0):!1}}var Fy=Tf(-1),qy=Tf(1);function xf(r,e=null){return function(t,n){let{$from:i,$to:a}=t.selection,o=i.blockRange(a),s=o&&Wu(o,r,e);return s?(n&&n(t.tr.wrap(o,s).scrollIntoView()),!0):!1}}function Mi(r,e=null){return function(t,n){let i=!1;for(let a=0;a<t.selection.ranges.length&&!i;a++){let{$from:{pos:o},$to:{pos:s}}=t.selection.ranges[a];t.doc.nodesBetween(o,s,(l,u)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(r,e)))if(l.type==r)i=!0;else{let c=t.doc.resolve(u),f=c.index();i=c.parent.canReplaceWith(f,f+1,r)}})}if(!i)return!1;if(n){let a=t.tr;for(let o=0;o<t.selection.ranges.length;o++){let{$from:{pos:s},$to:{pos:l}}=t.selection.ranges[o];a.setBlockType(s,l,r,e)}n(a.scrollIntoView())}return!0}}function _y(r,e,t,n){for(let i=0;i<e.length;i++){let{$from:a,$to:o}=e[i],s=a.depth==0?r.inlineContent&&r.type.allowsMarkType(t):!1;if(r.nodesBetween(a.pos,o.pos,(l,u)=>{if(s||!n&&l.isAtom&&l.isInline&&u>=a.pos&&u+l.nodeSize<=o.pos)return!1;s=l.inlineContent&&l.type.allowsMarkType(t)}),s)return!0}return!1}function $y(r){let e=[];for(let t=0;t<r.length;t++){let{$from:n,$to:i}=r[t];n.doc.nodesBetween(n.pos,i.pos,(a,o)=>
10{if(a.isAtom&&a.content.size&&a.isInline&&o>=n.pos&&o+a.nodeSize<=i.pos)return o+1>n.pos&&e.push(new Nt(n,n.doc.resolve(o+1))),n=n.doc.resolve(o+1+a.content.size),!1}),n.pos<i.pos&&e.push(new Nt(n,i))}return e}function zr(r,e=null,t){let n=(t&&t.removeWhenPresent)!==!1,i=(t&&t.enterInlineAtoms)!==!1,a=!(t&&t.includeWhitespace);return function(o,s){let{empty:l,$cursor:u,ranges:c}=o.selection;if(l&&!u||!_y(o.doc,c,r,i))return!1;if(s)if(u)r.isInSet(o.storedMarks||u.marks())?s(o.tr.removeStoredMark(r)):s(o.tr.addStoredMark(r.create(e)));else{let f,d=o.tr;i||(c=$y(c)),n?f=!c.some(h=>o.doc.rangeHasMark(h.$from.pos,h.$to.pos,r)):f=!c.every(h=>{let p=!1;return d.doc.nodesBetween(h.$from.pos,h.$to.pos,(v,m,g)=>{if(p)return!1;p=!r.isInSet(v.marks)&&!!g&&g.type.allowsMarkType(r)&&!(v.isText&&/^\s*$/.test(v.textBetween(Math.max(0,h.$from.pos-m),Math.min(v.nodeSize,h.$to.pos-m))))}),!p});for(let h=0;h<c.length;h++){let{$from:p,$to:v}=c[h];if(!f)d.removeMark(p.pos,v.pos,r);else{let m=p.pos,g=v.pos,w=p.nodeAfter,k=v.nodeBefore,C=a&&w&&w.isText?/^\s*/.exec(w.text)[0].length:0,x=a&&k&&k.isText?/\s*$/.exec(k.text)[0].length:0;m+C<g&&(m+=C,g-=x),d.addMark(m,g,r.create(e))}}s(d.scrollIntoView())}return!0}}function Dn(...r){return function(e,t,n){for(let i=0;i<r.length;i++)if(r[i](e,t,n))return!0;return!1}}var Go=Dn(Ei,Ly,Ay),bf=Dn(Ei,Ko,Dy),bt={Enter:Dn(Jo,Iy,Ry,Py),"Mod-Enter":Si,Backspace:Go,"Mod-Backspace":Go,"Shift-Backspace":Go,Delete:bf,"Mod-Delete":bf,"Mod-a":Qo},Ef={"Ctrl-h":bt.Backspace,"Alt-Backspace":bt["Mod-Backspace"],"Ctrl-d":bt.Delete,"Ctrl-Alt-Backspace":bt["Mod-Delete"],"Alt-Delete":bt["Mod-Delete"],"Alt-d":bt["Mod-Delete"],"Ctrl-a":Fy,"Ctrl-e":qy};for(let r in bt)Ef[r]=bt[r];var zy=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,Yo=zy?Ef:bt;var je=class{constructor(e,t,n={}){this.match=e,this.match=e,this.handler=typeof t=="string"?Vy(t):t,this.undoable=n.undoable!==!1,this.inCode=n.inCode||!1,this.inCodeMark=n.inCodeMark!==!1}};function Vy(r){return function(e,t,n,i){let a=r;if(t[1]){let o=t[0].lastIndexOf(t[1]);a+=t[0].slice(o+t[1].length),n+=o;let s=n-i;s>0&&(a=t[0].slice(o-s,o)+a,n=i)}return e.tr.insertText(a,n,i)}}var Uy=500;function Zo({rules:r}){let e=new X({state:{init(){return null},apply(t,n){let i=t.getMeta(this);return i||(t.selectionSet||t.docChanged?null:n)}},props:{handleTextInput(t,n,i,a){return Sf(t,n,i,a,r,e)},handleDOMEvents:{compositionend:t=>{setTimeout(()=>{let{$cursor:n}=t.state.selection;n&&Sf(t,n.pos,n.pos,"",r,e)})}}},isInputRules:!0});return e}function Sf(r,e,t,n,i,a){if(r.composing)return!1;let o=r.state,s=o.doc.resolve(e),l=s.parent.textBetween(Math.max(0,s.parentOffset-Uy),s.parentOffset,null,"\uFFFC")+n;for(let u=0;u<i.length;u++){let c=i[u];if(!c.inCodeMark&&s.marks().some(p=>p.type.spec.code))continue;if(s.parent.type.spec.code){if(!c.inCode)continue}else if(c.inCode==="only")continue;let f=c.match.exec(l);if(!f||f[0].length<n.length)continue;let d=e-(f[0].length-n.length);if(!c.inCodeMark){let p=!1;if(o.doc.nodesBetween(d,s.pos,v=>{v.isInline&&v.marks.some(m=>m.type.spec.code)&&(p=!0)}),p)continue}let h=c.handler(o,f,d,t);if(h)return c.undoable&&h.setMeta(a,{transform:h,from:e,to:t,text:n}),r.dispatch(h),!0}return!1}var Mf=(r,e)=>{let t=r.plugins;for(let n=0;n<t.length;n++){let i=t[n],a;if(i.spec.isInputRules&&(a=i.getState(r))){if(e){let o=r.tr,s=a.transform;for(let l=s.steps.length-1;l>=0;l--)o.step(s.steps[l].invert(s.docs[l]));if(a.text){let l=o.doc.resolve(a.from).marks();o.replaceWith(a.from,a.to,r.schema.text(a.text,l))}else o.delete(a.from,a.to);e(o)}return!0}}return!1},tle=new je(/--$/,"\u2014",{inCodeMark:!1}),rle=new je(/\.\.\.$/,"\u2026",{inCodeMark:!1}),nle=new je(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"\u201C",{inCodeMark:!1}),ile=new je(/"$/,"\u201D",{inCodeMark:!1}),ale=new je(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"\u2018",{inCodeMark:!1}),ole=new je(/'$/,"\u2019",{inCodeMark:!1});var Oi=200,fe=function(){};fe.prototype.append=function(e){return e.length?(e=fe.from(e),!this.length&&e||e.length<Oi&&this.leafAppend(e)||this.length<Oi&&e.leafPrepend(this)||this.appendInner(e)):this};fe.prototype.prepend=function(e){return e.length?fe.from(e).append(this):this};fe.prototype.appendInner=function(e){return new Wy(this,e)};fe.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?fe.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};fe.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};fe.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)};fe.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var i=[];return this.forEach(function(a,o){return i.push(e(a,o))},t,n),i};fe.from=function(e){return e instanceof fe?e:e&&e.length?new Of(e):fe.empty};var Of=(function(r){function e(n){r.call(this),this.values=n}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,a){return i==0&&a==this.length?this:new e(this.values.slice(i,a))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,a,o,s){for(var l=a;l<o;l++)if(i(this.values[l],s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,a,o,s){for(var l=a-1;l>=o;l--)if(i(this.values[l],s+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=Oi)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Oi)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e})(fe);fe.empty=new Of([]);var Wy=(function(r){function e(t,n){r.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,i,a,o){var s=this.left.length;if(i<s&&this.left.forEachInner(n,i,Math.min(a,s),o)===!1||a>s&&this.right.forEachInner(n,Math.max(i-s,0),Math.min(this.length,a)-s,o+s)===!1)return!1},e.prototype.forEachInvertedInner=function(n,i,a,o){var s=this.left.length;if(i>s&&this.right.forEachInvertedInner(n,i-s,Math.max(a,s)-s,o+s)===!1||a<s&&this.left.forEachInvertedInner(n,Math.min(i,s),a,o)===!1)return!1}
vendor: 73,800 bytes, lines 10-17
10,e.prototype.sliceInner=function(n,i){if(n==0&&i==this.length)return this;var a=this.left.length;return i<=a?this.left.slice(n,i):n>=a?this.right.slice(n-a,i-a):this.left.slice(n,a).append(this.right.slice(0,i-a))},e.prototype.leafAppend=function(n){var i=this.right.leafAppend(n);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(n){var i=this.left.leafPrepend(n);if(i)return new e(i,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e})(fe),es=fe;var jy=500,sr=class r{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let i,a;t&&(i=this.remapping(n,this.items.length),a=i.maps.length);let o=e.tr,s,l,u=[],c=[];return this.items.forEach((f,d)=>{if(!f.step){i||(i=this.remapping(n,d+1),a=i.maps.length),a--,c.push(f);return}if(i){c.push(new rt(f.map));let h=f.step.map(i.slice(a)),p;h&&o.maybeStep(h).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],u.push(new rt(p,void 0,void 0,u.length+c.length))),a--,p&&i.appendMap(p,a)}else o.maybeStep(f.step);if(f.selection)return s=i?f.selection.map(i.slice(a)):f.selection,l=new r(this.items.slice(0,n).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:s}}addTransform(e,t,n,i){let a=[],o=this.eventCount,s=this.items,l=!i&&s.length?s.get(s.length-1):null;for(let c=0;c<e.steps.length;c++){let f=e.steps[c].invert(e.docs[c]),d=new rt(e.mapping.maps[c],f,t),h;(h=l&&l.merge(d))&&(d=h,c?a.pop():s=s.slice(0,s.length-1)),a.push(d),t&&(o++,t=void 0),i||(l=d)}let u=o-n.depth;return u>Ky&&(s=Gy(s,u),o-=u),new r(s.append(a),o)}remapping(e,t){let n=new bn;return this.items.forEach((i,a)=>{let o=i.mirrorOffset!=null&&a-i.mirrorOffset>=e?n.maps.length-i.mirrorOffset:void 0;n.appendMap(i.map,o)},e,t),n}addMaps(e){return this.eventCount==0?this:new r(this.items.append(e.map(t=>new rt(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-t),a=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach(d=>{d.selection&&s--},i);let l=t;this.items.forEach(d=>{let h=a.getMirror(--l);if(h==null)return;o=Math.min(o,h);let p=a.maps[h];if(d.step){let v=e.steps[h].invert(e.docs[h]),m=d.selection&&d.selection.map(a.slice(l+1,h));m&&s++,n.push(new rt(p,v,m))}else n.push(new rt(p))},i);let u=[];for(let d=t;d<o;d++)u.push(new rt(a.maps[d]));let c=this.items.slice(0,i).append(u).append(n),f=new r(c,s);return f.emptyItemCount()>jy&&(f=f.compress(this.items.length-n.length)),f}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,i=[],a=0;return this.items.forEach((o,s)=>{if(s>=e)i.push(o),o.selection&&a++;else if(o.step){let l=o.step.map(t.slice(n)),u=l&&l.getMap();if(n--,u&&t.appendMap(u,n),l){let c=o.selection&&o.selection.map(t.slice(n));c&&a++;let f=new rt(u.invert(),l,c),d,h=i.length-1;(d=i.length&&i[h].merge(f))?i[h]=d:i.push(f)}}else o.map&&n--},this.items.length,0),new r(es.from(i.reverse()),a)}};sr.empty=new sr(es.empty,0);function Gy(r,e){let t;return r.forEach((n,i)=>{if(n.selection&&e--==0)return t=i,!1}),r.slice(t)}var rt=class r{constructor(e,t,n,i){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new r(t.getMap().invert(),t,this.selection)}}},nt=class{constructor(e,t,n,i,a){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=i,this.prevComposition=a}},Ky=20;function Jy(r,e,t,n){let i=t.getMeta(Ft),a;if(i)return i.historyState;t.getMeta(Yy)&&(r=new nt(r.done,r.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return r;if(o&&o.getMeta(Ft))return o.getMeta(Ft).redo?new nt(r.done.addTransform(t,void 0,n,Li(e)),r.undone,Lf(t.mapping.maps),r.prevTime,r.prevComposition):new nt(r.done,r.undone.addTransform(t,void 0,n,Li(e)),null,r.prevTime,r.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let s=t.getMeta("composition"),l=r.prevTime==0||!o&&r.prevComposition!=s&&(r.prevTime<(t.time||0)-n.newGroupDelay||!Xy(t,r.prevRanges)),u=o?ts(r.prevRanges,t.mapping):Lf(t.mapping.maps);return new nt(r.done.addTransform(t,l?e.selection.getBookmark():void 0,n,Li(e)),sr.empty,u,t.time,s??r.prevComposition)}else return(a=t.getMeta("rebased"))?new nt(r.done.rebased(t,a),r.undone.rebased(t,a),ts(r.prevRanges,t.mapping),r.prevTime,r.prevComposition):new nt(r.done.addMaps(t.mapping.maps),r.undone.addMaps(t.mapping.maps),ts(r.prevRanges,t.mapping),r.prevTime,r.prevComposition)}function Xy(r,e){if(!e)return!1;if(!r.docChanged)return!0;let t=!1;return r.mapping.maps[0].forEach((n,i)=>{for(let a=0;a<e.length;a+=2)n<=e[a+1]&&i>=e[a]&&(t=!0)}),t}function Lf(r){let e=[];for(let t=r.length-1;t>=0&&e.length==0;t--)r[t].forEach((n,i,a,o)=>e.push(a,o));return e}function ts(r,e){if(!r)return null;let t=[];for(let n=0;n<r.length;n+=2){let i=e.map(r[n],1),a=e.map(r[n+1],-1);i<=a&&t.push(i,a)}return t}function Qy(r,e,t){let n=Li(e),i=Ft.get(e).spec.config,a=(t?r.undone:r.done).popEvent(e,n);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(t?r.done:r.undone).addTransform(a.transform,e.selection.getBookmark(),i,n),l=new nt(t?s:a.remaining,t?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(Ft,{redo:t,historyState:l})}var rs=!1,Af=null;function Li(r){let e=r.plugins;if(Af!=e){rs=!1,Af=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){rs=!0;break}}return rs}var Ft=new ht("history"),Yy=new ht("closeHistory");function ns(r={}){return r={depth:r.depth||100,newGroupDelay:r.newGroupDelay||500},new X({key:Ft,state:{init(){return new nt(sr.empty,sr.empty,null,0,-1)},apply(e,t,n){return Jy(t,n,e,r)}},config:r,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,i=n=="historyUndo"?Vr:n=="historyRedo"?Ni:null;return!i||!e.editable?!1:(t.preventDefault(),i(e.state,e.dispatch))}}}})}function Ai(r,e){return(t,n)=>{let i=Ft.getState(t);if(!i||(r?i.undone:i.done).eventCount==0)return!1;if(n){let a=Qy(i,t,r);a&&n(e?a.scrollIntoView():a)}return!0}}var Vr=Ai(!1,!0),Ni=Ai(!0,!0),dle=Ai(!1,!1),hle=Ai(!0,!1);function Nf(r){let e=Ft.getState(r);return e?e.done.eventCount:0}var Ms=function(r,e){return Ms=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Ms(r,e)};function O(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ms(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var b=function(){return b=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},b.apply(this,arguments)};function Ne(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))}function $(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}function Zy(r,e,t){var n;t=t||null;for(n in r)if(r.hasOwnProperty(n)&&e.call(t,r[n],n,r)===!1)break}var Xr=Zy;function eb(r,e){var t=Object.prototype.hasOwnProperty,n,i,a,o;for(a=1,o=arguments.length;a<o;a+=1){n=arguments[a];for(i in n)t.call(n,i)&&(r[i]=n[i])}return r}var Zs=eb;function tb(r){return typeof r=="string"||r instanceof String}var St=tb;function rb(r){return r instanceof Array}var sn=rb;function nb(r,e,t){var n=0,i=r.length;for(t=t||null;n<i&&e.call(t,r[n],n,r)!==!1;n+=1);}var Qr=nb,ib=sn,ab=Qr,ob=Xr;function sb(r,e,t){ib(r)?ab(r,e,t):ob(r,e,t)}var pa=sb,lb=St,ub=pa;function cb(r,e,t){var n=r.style;if(lb(e)){n[e]=t;return}ub(e,function(i,a){n[a]=i})}var lt=cb,fb=sn;function db(r,e,t){var n,i;if(t=t||0,!fb(e))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(e,r,t);for(i=e.length,n=t;t>=0&&n<i;n+=1)if(e[n]===r)return n;return-1}var pr=db;function hb(r){return r===void 0}var Qe=hb,pb=Qe;function vb(r){return!r||!r.className?"":pb(r.className.baseVal)?r.className:r.className.baseVal}var el=vb,mb=sn,gb=Qe;function yb(r,e){if(e=mb(e)?e.join(" "):e,e=e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),gb(r.className.baseVal)){r.className=e;return}r.className.baseVal=e}var Gh=yb,Df=pa,bb=pr,wb=el,kb=Gh;function Cb(r){var e=Array.prototype.slice.call(arguments,1),t=r.classList,n=[],i;if(t){Df(e,function(a){r.classList.add(a)});return}i=wb(r),i&&(e=[].concat(i.split(/\s+/),e)),Df(e,function(a){bb(a,n)<0&&n.push(a)}),kb(r,n)}var ot=Cb,If=Qr,Tb=pr,xb=el,Eb=Gh;function Sb(r){var e=Array.prototype.slice.call(arguments,1),t=r.classList,n,i;if(t){If(e,function(a){t.remove(a)});return}n=xb(r).split(/\s+/),i=[],If(n,function(a){Tb(a,e)<0&&i.push(a)}),Eb(r,i)}var Ke=Sb;function Mb(r){return typeof r=="number"||r instanceof Number}var kt=Mb;function Ob(r){return r===null}var Xi=Ob,Lb=Xr;function Ab(r,e){var t=document.createElement("img"),n="";return Lb(e,function(i,a){n+="&"+a+"="+i}),n=n.substring(1),t.src=r+"?"+n,t.style.display="none",document.body.appendChild(t),document.body.removeChild(t),t}var Nb=Ab,Db=Qe,Ib=Nb,Rb=10080*60*1e3;function Bb(r){var e=new Date().getTime();return e-r>Rb}function Pb(r,e){var t="https://www.google-analytics.com/collect",n=location.hostname,i="event",a="use",o="TOAST UI "+r+" for "+n+": Statistics",s=window.localStorage.getItem(o);!Db(window.tui)&&window.tui.usageStatistics===!1||s&&!Bb(s)||(window.localStorage.setItem(o,new Date().getTime()),setTimeout(function(){(document.readyState==="interactive"||document.readyState==="complete")&&Ib(t,{v:1,t:i,tid:e,cid:n,dp:n,dh:r,el:r,ec:a})},1e3))}var Hb=Pb;/Mac/.test(navigator.platform);var Fb=/[\u0020]+/g,qb=/[>(){}[\]+-.!#|]/g,Rf=/<([a-zA-Z_][a-zA-Z0-9\-._]*)(\s|[^\\>])*\/?>|<(\/)([a-zA-Z_][a-zA-Z0-9\-._]*)\s*\/?>|<!--[^-]+-->|<([a-zA-Z_][a-zA-Z0-9\-.:/]*)>/g,Bf=/\\[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~\\]/g,_b=/[*_~`]/g,Pf=/!\[.*\]\(.*\)/g,$b=/[[\]]/g,Hf=/(?:^|[^\\])\\(?!\\)/g,zb='[&<>"]',Ff=new RegExp(zb,"g");function Vb(r){switch(r){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";default:return r}}function Kr(r){return Ff.test(r)?r.replace(Ff,Vb):r}function Ub(){Hb("editor","UA-129966929-1")}function ve(r,e){return r.indexOf(e)!==-1}var Wb=["rel","target","hreflang","type"],jb={codeblock:/(^ {4}[^\n]+\n*)+/,thematicBreak:/^ *((\* *){3,}|(- *){3,} *|(_ *){3,}) */,atxHeading:/^(#{1,6}) +[\s\S]+/,seTextheading:/^([^\n]+)\n *(=|-){2,} */,blockquote:/^( *>[^\n]+.*)+/,list:/^ *(\*+|-+|\d+\.) [\s\S]+/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? */,link:/!?\[.*\]\(.*\)/,reflink:/!?\[.*\]\s*\[([^\]]*)\]/,verticalBar:/\u007C/,fencedCodeblock:/^((`|~){3,})/};function Kh(r){if(!r)return null;var e={};return Wb.forEach(function(t){Qe(r[t])||(e[t]=r[t])}),e}function Qi(r,e){for(var t="",n=0;n<e;n+=1)t+=r;return t}function Gb(r){var e=!1;return Xr(jb,function(t){return t.test(r)&&(e=!0),!e}),e}function Yi(r){for(var e=[],t=Pf.exec(r);t;)e.push([t.index,t.index+t[0].length]),t=Pf.exec(r);return r.replace($b,function(n,i){var a=e.some(function(o){return i>o[0]&&i<o[1]});return a?n:"\\"+n})}function Kb(r){var e=function(i){return"\\"+i},t=function(i){return i+"\\"},n=r.replace(Fb," ");return Bf.test(n)&&(n=n.replace(Bf,e)),Hf.test(n)&&(n=n.replace(Hf,t)),n=n.replace(_b,e),Rf.test(n)&&(n=n.replace(Rf,e)),Gb(n)&&(n=n.replace(qb,e)),n}function Jb(r){var e;return r.indexOf('"')===-1?e='""':e=r.indexOf("'")===-1?"''":"()",e[0]+r+e[1]}function Os(r){return Xi(r)||Qe(r)}function tl(r,e){if(r===null&&r===e)return!0;if(typeof r!="object"||typeof e!="object"||Os(r)||Os(e))return r===e;for(var t in r)if(r[t]!==e[t])return!1;for(var t in e)if(!(t in r))return!1;return!0}function Ee(r){return r[r.length-1]}function Xb(r,e,t){return r>=e&&r<=t}function rl(r){return typeof r=="object"&&r!==null}function Zi(r,e){var t=b({},r);return r&&e&&Object.keys(e).forEach(function(n){rl(t[n])?Array.isArray(e[n])?t[n]=nl(e[n]):t.hasOwnProperty(n)?t[n]=Zi(t[n],e[n]):t[n]=il(e[n]):t[n]=e[n]}),t}function nl(r){return r.map(function(e){return rl(e)?Array.isArray(e)?nl(e):il(e):e})}function il(r){var e=Object.keys(r);return e.length?e.reduce(function(t,n){return rl(r[n])?t[n]=Array.isArray(r[n])?nl(r[n]):il(r[n]):t[n]=r[n],t},{}):r}function al(r,e){return e===void 0&&(e={}),Object.keys(e).forEach(function(t){r.hasOwnProperty(t)&&typeof r[t]=="object"?Array.isArray(e[t])?r[t]=e[t]:al(r[t],e[t]):r[t]=e[t]}),r}function qf(r,e){return r>e?[e,r]:[r,e]}var Qb=Qr;function Yb(r){var e;try{e=Array.prototype.slice.call(r)}catch{e=[],Qb(r,function(n){e.push(n)})}return e}var ut=Yb;function ea(r,e){var t=r.nodes.paragraph;return e?t.create(null,St(e)?r.text(e):e):t.createAndFill()}function pe(r,e,t){return r.text(e,t)}function G(r,e,t){t===void 0&&(t=e);var n=r.doc.content.size,i=n>0?n-1:1;return q.create(r.doc,Math.min(e,i),Math.min(t,i))}function ol(r,e,t){var n=e.pos;return r.replaceWith(n,n,ea(t)),r.setSelection(G(r,n+1))}function ta(r){for(var e=r.state,t=r.from,n=r.startIndex,i=r.endIndex,a=r.createText,o=e.tr,s=e.doc,l=e.schema,u=n;u<=i;u+=1){var c=s.child(u),f=c.nodeSize,d=c.textContent,h=c.content,p=a(d),v=p?pe(l,p):T.empty,m=o.mapping.map(t),g=m+h.size;o.replaceWith(m,g,v),t+=f}return o}function sl(r,e,t,n){var i=t.length;r.split(e).delete(e-i,e).insert(r.mapping.map(e),n).setSelection(G(r,r.mapping.map(e)-i))}function Vn(r){return r.sourcepos[0][0]}function va(r){return r.sourcepos[1][0]}function ma(r){return r.sourcepos[0][1]}function $t(r){return r.sourcepos[1][1]}function Zb(r){var e=r.type;return e==="htmlBlock"||e==="htmlInline"}function ew(r){var e=r.type;return e==="strike"||e==="strong"||e==="emph"||e==="code"||e==="link"||e==="image"}function tw(r){return r&&r.type==="codeBlock"}function vr(r){return r&&(r.type==="item"||r.type==="list")}function Jh(r){return vr(r)&&r.listData.type==="ordered"}function rw(r){return vr(r)&&r.listData.type!=="ordered"}function _f(r){return r&&(r.type==="tableCell"||r.type==="tableDelimCell")}function nw(r){switch(r.type){case"code":case"text":case"emph":case"strong":case"strike":case"link":case"image":case"htmlInline":case"linebreak":case"softbreak":case"customInline":return!0;default:return!1}}function Yr(r,e,t){for(t===void 0&&(t=!0),r=t?r:r.parent;r&&r.type!=="document";){if(e(r))return r;r=r.parent}return null}function iw(r,e,t){for(t===void 0&&(t=!0),r=t?r:r.parent;r&&r.type!=="document";)e(r),r=r.parent}function ae(r,e){return[r[0],r[1]+e]}function zt(r,e){return[r[0],e]}function aw(r){var e=r.firstChild.literal;switch(r.type){case"emph":return"*"+e+"*";case"strong":return"**"+e+"**";case"strike":return"~~"+e+"~~";case"code":return"`"+e+"`";case"link":case"image":var t=r,n=t.destination,i=t.title,a=r.type==="link"?"":"!";return a+"["+e+"]("+n+(i?' "'+i+'"':"")+")";default:return null}}function ow(r){switch(r.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}function sw(r){for(var e=[],t=r.walker(),n=null;n=t.next();){var i=n.node;i.type==="text"&&e.push(i.literal)}return e.join("")}var $n=[],Xh={},$f=/\$\$widget\d+\s/;function ga(r){var e=r.search($f);if(e!==-1){var t=r.substring(e),n=t.replace($f,"").replace("$$","");r=r.substring(0,e),r+=ga(n)}return r}function Qh(r,e){return"$$"+r+" "+e+"$$"}function Yh(r,e){var t=Xh[r],n=t.rule,i=t.toDOM,a=ga(e).match(n);return a&&(e=a[0]),i(e)}function lw(){return $n}function uw(r){$n=r,$n.forEach(function(e,t){Xh["widget"+t]=e})}function is(r,e,t,n){return r.concat(hr(e,t,n))}function hr(r,e,t){t===void 0&&(t=0);var n=[],i=($n[t]||{}).rule,a=t+1;if(r=ga(r),i&&i.test(r)){for(var o=void 0;(o=r.search(i))!==-1;){var s=r.substring(0,o);s&&(n=is(n,s,e,a)),r=r.substring(o);var l=r.match(i)[0],u="widget"+t;n.push(e.nodes.widget.create({info:u},e.text(Qh(u,l)))),r=r.substring(l.length)}r&&(n=is(n,r,e,a))}else r&&(n=t<$n.length-1?is(n,r,e,a):[e.text(r)]);return n}function Zh(r){for(var e,t="",n=r.walker();e=n.next();){var i=e.node,a=e.entering;a&&(i!==r&&i.type!=="text"?(t+=aw(i),n.resumeAt(r,!1),n.next()):i.type==="text"&&(t+=i.literal))}return t}function ep(){return{deleteSelection:function(){return Ei},selectAll:function(){return Qo},undo:function(){return Vr},redo:function(){return Ni}}}function cw(r){return new X({props:{decorations:function(e){var t=e.doc;if(r.text&&t.childCount===1&&t.firstChild.isTextblock&&t.firstChild.content.size===0){var n=document.createElement("span");return ot(n,"placeholder"),r.className&&ot(n,r.className),n.textContent=r.text,xe.create(t,[ze.widget(1,n)])}return null}}})}var fw=pr,dw=el;function hw(r,e){var t;return r.classList?r.classList.contains(e):(t=dw(r).split(/\s+/),fw(e,t)>-1)}var tp=hw,pw=pr,vw=ut,Di=Element.prototype,mw=Di.matches||Di.webkitMatchesSelector||Di.mozMatchesSelector||Di.msMatchesSelector||function(r){var e=this.document||this.ownerDocument;return pw(this,vw(e.querySelectorAll(r)))>-1};function gw(r,e){return mw.call(r,e)}var yw=gw,rp="[A-Za-z][A-Za-z0-9-]*",bw="[a-zA-Z_:][a-zA-Z0-9:._-]*",ww="[^\"'=<>`\\x00-\\x20]+",kw="'[^']*'",Cw='"[^"]*"',Tw="(?:"+ww+"|"+kw+"|"+Cw+")",xw="(?:\\s*=\\s*"+Tw+")",np="(?:\\s+"+bw+xw+"?)",ip="<("+rp+")("+np+")*\\s*/?>",Ew="</("+rp+")\\s*[>]",ap="(?:"+ip+"|"+Ew+")",Zr=new RegExp("^"+ap,"i"),Ls=/<br\s*\/*>/i,Sw=/<! ---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,op="</p><p>";function ll(r,e,t){var n=parseInt(r.left,10),i=parseInt(r.top,10),a=parseInt(r.width,10)+parseInt(r.paddingLeft,10)+parseInt(r.paddingRight,10),o=parseInt(r.height,10)+parseInt(r.paddingTop,10)+parseInt(r.paddingBottom,10);return e>=n&&e<=n+a&&t>=i&&t<=i+o}var sp="toastui-editor-";function A(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=[],n=0,i=r;n<i.length;n++){var a=i[n],o=void 0;Array.isArray(a)?o=a[0]?a[1]:null:o=a,o&&t.push(""+sp+o)}return t.join(" ")}function re(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.map(function(t){return sp+"md-"+t}).join(" ")}function Mw(r){return r?.nodeType===Node.TEXT_NODE}function ya(r){return r&&r.nodeType===Node.ELEMENT_NODE}function Ow(r,e){var t=ut(r.querySelectorAll(e));return t.length?t:[]}function Lw(r,e){e=sn(e)?ut(e):[e],e.forEach(function(t){r.appendChild(t)})}function Aw(r,e){e.parentNode&&e.parentNode.insertBefore(r,e)}function mr(r){r.parentNode&&r.parentNode.removeChild(r)}function Nw(r){for(var e=[];r.firstChild;)e.push(r.firstChild),r.parentNode&&r.parentNode.insertBefore(r.firstChild,r);return mr(r),e}function ul(r,e,t){Qe(t)&&(t=!tp(r,e));var n=t?ot:Ke;n(r,e)}function lp(r,e){var t=document.createElement("div");St(r)?t.innerHTML=r:t.appendChild(r);var n=t.firstChild;return e&&e.appendChild(n),n}function cl(r){var e=window.getComputedStyle(r);return["margin-left","margin-right"].reduce(function(t,n){return t+parseInt(e.getPropertyValue(n),10)},0)+r.offsetWidth}function st(r,e){var t;for(St(e)?t=function(n){return yw(n,e)}:t=function(n){return n===e};r&&r!==document;){if(ya(r)&&t(r))return r;r=r.parentNode}return null}function up(r,e){for(var t=0,n=0;r&&r!==e;){var i=r.offsetTop,a=r.offsetLeft,o=r.offsetParent;if(t+=i,n+=a,o===e.offsetParent)break;r=r.offsetParent}return{offsetTop:t,offsetLeft:n}}function fl(r,e){Object.keys(r).forEach(function(t){Os(r[t])?e.removeAttribute(t):e.setAttribute(t,r[t])})}function Dw(r){var e=r.replace(/<p><br\s*\/*><\/p>/gi,"<p></p>"),t=new RegExp(ap,"ig"),n=e.match(t);return n?.forEach(function(i,a){if(Ls.test(i)){var o=op;if(a){var s=n[a-1],l=s.match(ip);if(l&&!/br/i.test(l[1])){var u=l[1];o="</"+u+"><"+u+">"}}e=e.replace(Ls,o)}}),e}function dl(r){var e=/<img class="ProseMirror-separator" alt="">/g,t=/ class="ProseMirror-trailingBreak"/g,n=r;return n=n.replace(e,""),n=n.replace(t,""),n}var cp=new ht("widget"),zf=5,Iw=(function(){function r(e,t){var n=this;this.popup=null,this.removeWidget=function(){n.popup&&(n.rootEl.removeChild(n.popup),n.popup=null)},this.rootEl=e.dom.parentElement,this.eventEmitter=t,this.eventEmitter.listen("blur",this.removeWidget),this.eventEmitter.listen("loadUI",function(){n.rootEl=st(e.dom.parentElement,"."+A("defaultUI"))}),this.eventEmitter.listen("removePopupWidget",this.removeWidget)}return r.prototype.update=function(e){var t=cp.getState(e.state);if(this.removeWidget(),t){var n=t.node,i=t.style,a=e.coordsAtPos(t.pos),o=a.top,s=a.left,l=a.bottom,u=l-o,c=this.rootEl.getBoundingClientRect(),f=o-c.top;lt(n,{opacity:"0"}),this.rootEl.appendChild(n),lt(n,{position:"absolute",left:s-c.left+zf+"px",top:(i==="bottom"?f+u-zf:f-u)+"px",opacity:"1"}),this.popup=n,e.focus()}},r.prototype.destroy=function(){this.eventEmitter.removeEventHandler("blur",this.removeWidget)},r})();function Rw(r){return new X({key:cp,state:{init:function(){return null},apply:function(e){return e.getMeta("widget")}},view:function(e){return new Iw(e,r)}})}function Bw(r){r.listen("addImageBlobHook",function(e,t){var n=new FileReader;n.onload=function(i){var a=i.target;return t(a.result)},n.readAsDataURL(e)})}function hl(r,e,t){var n=function(i,a){r.emit("command","addImage",{imageUrl:i,altText:a||e.name||"image"})};r.emit("addImageBlobHook",e,n,t)}function fp(r){var e=ut(r).filter(function(n){var i=n.type;return i.indexOf("image")!==-1});if(e.length===1){var t=e[0];if(t)return t.getAsFile()}return null}function Pw(r){var e=r.eventEmitter;return new X({props:{handleDOMEvents:{drop:function(t,n){var i,a=(i=n.dataTransfer)===null||i===void 0?void 0:i.files;return a&&Qr(a,function(o){return o.type.indexOf("image")!==-1?(n.preventDefault(),n.stopPropagation(),hl(e,o,n.type),!1):!0}),!0}}}})}var W=(function(){function r(){}return Object.defineProperty(r.prototype,"type",{get:function(){return"node"},enumerable:!1,configurable:!0}),r.prototype.setContext=function(e){this.context=e},r})();function dp(r){var e=document.createElement("span"),t=Yh(r.attrs.info,r.textContent);return e.className="tui-widget",e.appendChild(t),{dom:e}}function As(r){return r.type.name==="widget"}var hp=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"widget"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{info:{default:null}},group:"inline",inline:!0,content:"text*",selectable:!1,atom:!0,toDOM:function(){return["span",{class:"tui-widget"},0]},parseDOM:[{tag:"span.tui-widget",getAttrs:function(t){var n=t.textContent,i=n.match(/\$\$(widget\d+)/),a=i[1];return{info:a}}}]}},enumerable:!1,configurable:!0}),e})(W),pp=(function(){function r(e){this.timer=null,this.el=document.createElement("div"),this.el.className="toastui-editor",this.eventEmitter=e,this.placeholder={text:""}}return r.prototype.createState=function(){return Tn.create({schema:this.schema,plugins:this.createPlugins()})},r.prototype.initEvent=function(){var e=this,t=e.eventEmitter,n=e.view,i=e.editorType;n.dom.addEventListener("focus",function(){return t.emit("focus",i)}),n.dom.addEventListener("blur",function(){return t.emit("blur",i)})},r.prototype.emitChangeEvent=function(e){this.eventEmitter.emit("caretChange",this.editorType),e.docChanged&&this.eventEmitter.emit("change",this.editorType)},Object.defineProperty(r.prototype,"defaultPlugins",{get:function(){var e=this.createInputRules(),t=Ne(Ne([],this.keymaps),[_r(b({"Shift-Enter":Yo.Enter},Yo)),ns(),cw(this.placeholder),Rw(this.eventEmitter),Pw(this.context)]);return e?t.concat(e):t},enumerable:!1,configurable:!0}),r.prototype.createInputRules=function(){var e=lw(),t=e.map(function(n){var i=n.rule;return new je(i,function(a,o,s,l){var u=a.schema,c=a.tr,f=a.doc,d=o.input.match(new RegExp(i,"g")),h=f.resolve(s),p=h.parent,v=0;if(As(p)&&(p=h.node(h.depth-1)),p.forEach(function(w){return As(w)&&(v+=1)}),d.length>v){var m=Ee(d),g=hr(m,u);return c.replaceWith(l-m.length+1,l,g)}return null})});return t.length?Zo({rules:t}):null},r.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},r.prototype.createSchema=function(){return new pn({nodes:this.specs.nodes,marks:this.specs.marks})},r.prototype.createKeymaps=function(e){var t=ep(),n=t.undo,i=t.redo,a=this.specs.keymaps(e),o={"Mod-z":n(),"Shift-Mod-z":i()};return e?a.concat(_r(o)):a},r.prototype.createCommands=function(){return this.specs.commands(this.view)},r.prototype.createPluginProps=function(){var e=this;return this.extraPlugins.map(function(t){return t(e.eventEmitter)})},r.prototype.focus=function(){var e=this;this.clearTimer(),this.timer=setTimeout(function(){e.view.focus(),e.view.dispatch(e.view.state.tr.scrollIntoView())})},r.prototype.blur=function(){this.view.dom.blur()},r.prototype.destroy=function(){var e=this;this.clearTimer(),this.view.destroy(),Object.keys(this).forEach(function(t){delete e[t]})},r.prototype.moveCursorToStart=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(G(t,1)).scrollIntoView()),e&&this.focus()},r.prototype.moveCursorToEnd=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(G(t,t.doc.content.size-1)).scrollIntoView()),e&&this.focus()},r.prototype.setScrollTop=function(e){this.view.dom.scrollTop=e},r.prototype.getScrollTop=function(){return this.view.dom.scrollTop},r.prototype.setPlaceholder=function(e){this.placeholder.text=e,this.view.dispatch(this.view.state.tr.scrollIntoView())},r.prototype.setHeight=function(e){lt(this.el,{height:e+"px"})},r.prototype.setMinHeight=function(e){lt(this.el,{minHeight:e+"px"})},r.prototype.getElement=function(){return this.el},r})();function Hw(r){return r instanceof Function}var Ve=Hw,Fw=["Enter","Shift-Enter","Mod-Enter","Tab","Shift-Tab","Delete","Backspace","Mod-Delete","Mod-Backspace","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Mod-d","Mod-D","Alt-ArrowUp","Alt-ArrowDown"];function Ii(r,e,t){return r.focus(),e(t)(r.state,r.dispatch,r)}var vp=(function(){function r(e){this.specs=e}return Object.defineProperty(r.prototype,"nodes",{get:function(){return this.specs.filter(function(e){return e.type==="node"}).reduce(function(e,t){var n,i=t.name,a=t.schema;return b(b({},e),(n={},n[i]=a,n))},{})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"marks",{get:function(){return this.specs.filter(function(e){return e.type==="mark"}).reduce(function(e,t){var n,i=t.name,a=t.schema;return b(b({},e),(n={},n[i]=a,n))},{})},enumerable:!1,configurable:!0}),r.prototype.commands=function(e,t){var n=this.specs.filter(function(a){var o=a.commands;return o}).reduce(function(a,o){var s={},l=o.commands();return Ve(l)?s[o.name]=function(u){return Ii(e,l,u)}:Object.keys(l).forEach(function(u){s[u]=function(c){return Ii(e,l[u],c)}}),b(b({},a),s)},{}),i=ep();return Object.keys(i).forEach(function(a){n[a]=function(o){return Ii(e,i[a],o)}}),t&&Object.keys(t).forEach(function(a){n[a]=function(o){return Ii(e,t[a],o)}}),n},r.prototype.keymaps=function(e){var t=this.specs.filter(function(n){return n.keymaps}).map(function(n){return n.keymaps()});return t.map(function(n){return e||Object.keys(n).forEach(function(i){ve(Fw,i)||delete n[i]}),_r(n)})},r.prototype.setContext=function(e){this.specs.forEach(function(t){t.setContext(e)})},r})();function mp(r){var e=r.from,t=r.to;return r instanceof Ce?[e+1,t-1]:[e,t]}function Vf(r){return r.index(0)+1}function en(r,e,t){t===void 0&&(t=1);var n=0;return r.forEach(function(i,a){As(i)&&a+2<e&&(n+=2*t)}),n}function Vi(r,e,t){t===void 0&&(t=e);var n=e===t,i=r.resolve(e),a=Vf(i),o=a,s=i.start(1),l=s;if(!n){var u=r.resolve(t===r.content.size?t-1:t);l=u.start(1),o=Vf(u),u.pos===r.content.size&&(t=r.content.size-2)}var c=Math.max(e-s+1,1),f=Math.max(t-l+1,1);return[[a,c+en(r.child(a-1),c,-1)],[o,f+en(r.child(o-1),f,-1)]]}function gp(r,e){for(var t=[],n=0,i=0;n<e;n+=1){var a=r.child(n);t[n]=i,i+=a.nodeSize}return t}function dr(r,e,t){var n=gp(r,t[0]),i=e[0]-1,a=t[0]-1,o=r.child(i),s=r.child(a),l=n[i],u=n[a];return l+=e[1]+en(o,e[1]-1),u+=t[1]+en(s,t[1]-1),[l,Math.min(u,r.content.size)]}function te(r){var e=r.$from,t=r.$to,n=r.from,i=r.to,a=e.doc;return r instanceof Ce&&(e=a.resolve(n+1),t=a.resolve(i-1)),e.depth===0&&(e=a.resolve(n-1),t=e),{startFromOffset:e.start(1),endFromOffset:t.start(1),startToOffset:e.end(1),endToOffset:t.end(1),startIndex:e.index(0),endIndex:t.index(0),from:e.pos,to:t.pos}}function ra(r,e){for(var t=1,n=1,i=0,a=0;i<r.childCount;i+=1){var o=r.child(i).nodeSize;if(t=a+1,n=a+o-1,i===e)break;a+=o}return{startOffset:t,endOffset:n}}var Uf="heading",qw="blockQuote",_w="listItem",$w="table",zw="tableCell",Vw="codeBlock",Uw="thematicBreak",Ui="link",Ri="code",ba="meta",gr="delimiter",Ww="taskDelimiter",pl="markedText",jw="html",Gw="customBlock",Wf={strong:2,emph:1,strike:2};function V(r,e,t,n){return{start:r,end:e,spec:{type:t,attrs:n}}}function Kw(r,e,t){var n=r.level,i=r.headingType,a=[V(e,t,Uf,{level:n})];return i==="atx"?a.push(V(e,ae(e,n),gr)):a.push(V(zt(t,0),t,Uf,{seText:!0})),a}function as(r,e,t){var n=r.type,i=ae(e,Wf[n]),a=ae(t,-Wf[n]);return[V(i,a,n),V(e,i,gr),V(a,t,gr)]}function yp(r,e,t,n){return[V(r,e,Ui),V(zt(r,t[1]+1),zt(e,n),Ui,{desc:!0}),V(zt(e,n+2),ae(e,-1),Ui,{url:!0})]}function Jw(r,e,t){var n=r.lastChild,i=n?$t(n)+1:3,a=ae(e,1);return Ne([V(e,a,ba)],yp(e,t,a,i))}function Xw(r,e,t){var n=r.lastChild,i=r.extendedAutolink,a=n?$t(n)+1:2;return i?[V(e,t,Ui,{desc:!0})]:yp(e,t,e,a)}function Qw(r,e,t){var n=r.tickCount,i=ae(e,n),a=ae(t,-n);return[V(e,t,Ri),V(e,i,Ri,{start:!0}),V(i,a,Ri,{marked:!0}),V(a,t,Ri,{end:!0})]}function bp(r,e,t,n){var i={start:e,end:t,spec:{attrs:{className:n+"-line-background",codeStart:e[0],codeEnd:t[0]}},lineBackground:!0};return r.type!=="item"&&r.type!=="blockQuote"?[b(b({},i),{end:e,spec:{attrs:{className:n+"-line-background start"}}}),b(b({},i),{start:[Math.min(e[0]+1,t[0]),e[1]]})]:null}function Yw(r,e,t,n){var i=r.fenceOffset,a=r.fenceLength,o=r.fenceChar,s=r.info,l=r.infoPadding,u=r.parent,c=i+a,f=[V(zt(e,1),t,Vw)];o&&f.push(V(e,ae(e,c),gr)),s&&f.push(V(ae(e,a),ae(e,a+l+s.length),ba));var d="^(\\s{0,4})("+o+"{"+a+",})",h=new RegExp(d);h.test(n)&&f.push(V(zt(t,1),t,gr));var p=bp(u,e,t,"code-block");return p?f.concat(p):f}function Zw(r,e,t){var n=r,i=n.offset,a=n.syntaxLength,o=n.info,s=n.parent,l=i+a,u=[V(zt(e,1),t,Gw)];u.push(V(e,ae(e,l),gr)),o&&u.push(V(ae(e,l),ae(e,a+o.length),ba)),u.push(V(zt(t,1),t,gr));var c=bp(s,e,t,"custom-block");return c?u.concat(c):u}function wp(r,e){for(var t=[];r;){var n=r.type;(n==="paragraph"||n==="codeBlock")&&t.push(V([Vn(r),ma(r)-1],[va(r),$t(r)+1],e)),r=r.next}return t}function ek(r){for(var e=[];r;)e.push(V([Vn(r),ma(r)],[va(r),$t(r)+1],pl)),r=r.next;return e}function tk(r,e,t){var n=r.parent&&r.parent.type!=="blockQuote"?[V(e,t,qw)]:[];if(r.firstChild){var i=[];r.firstChild.type==="paragraph"?i=ek(r.firstChild.firstChild):r.firstChild.type==="list"&&(i=wp(r.firstChild,pl)),n=Ne(Ne([],n),i)}return n}function rk(r){for(var e=0;r.parent.parent&&r.parent.parent.type==="item";)r=r.parent.parent,e+=1;var t=[{odd:!0},{even:!0}][e%2];return[_w,b(b({},t),{listStyle:!0})]}function nk(r,e){var t=r.listData,n=t.padding,i=t.task,a=rk(r),o=[V.apply(void 0,Ne([e,ae(e,n)],a))];return i&&(o.push(V(ae(e,n),ae(e,n+3),Ww)),o.push(V(ae(e,n+1),ae(e,n+2),ba))),o.concat(wp(r.firstChild,pl))}var jf={heading:Kw,strong:as,emph:as,strike:as,link:Xw,image:Jw,code:Qw,codeBlock:Yw,blockQuote:tk,item:nk,customBlock:Zw},Gf={thematicBreak:Uw,table:$w,tableCell:zw,htmlInline:jw};function ik(r,e,t,n){var i=r.type;return Ve(jf[i])?jf[i](r,e,t,n):Gf[i]?[V(e,t,Gf[i])]:null}var zn={};function ak(r){var e=r.schema,t=r.toastMark;return new X({appendTransaction:function(n,i,a){var o=n[0],s=a.tr;if(o.docChanged){var l=[],u=o.getMeta("editResult");u.forEach(function(c){var f=c.nodes,d=c.removedNodeRange;if(f.length){l=l.concat(fk(s,f));for(var h=0,p=f;h<p.length;h++)for(var v=p[h],m=v.walker(),g=m.next();g;){var w=g.node,k=g.entering;k&&(l=l.concat(dk(w,t))),g=m.next()}}else if(d)for(var C=s.doc.childCount-1,x=d.line,L=x[0],E=x[1],N=Math.min(L,C),P=Math.min(E,C),j=N;j<=P;j+=1)zn[j]=!0}),lk(s,e,l)}return s.setMeta("widget",o.getMeta("widget"))}})}function ok(r,e,t){return Object.keys(t).some(function(n){return t[n]!==r.child(e).attrs[n]})}function sk(r,e,t,n,i){i===void 0&&(i={});for(var a=n.startIndex,o=n.endIndex,s=n.from,l=n.to,u=!1,c=a;c<=o;c+=1)delete zn[c],u=ok(e,c,i);u&&r.setBlockType(s,l,t,i)}function lk(r,e,t){var n=r.doc,i=e.nodes.paragraph,a=gp(n,n.childCount);t.forEach(function(o){var s=o.start,l=o.end,u=o.spec,c=o.lineBackground,f=Math.min(s[0],n.childCount)-1,d=Math.min(l[0],n.childCount)-1,h=n.child(f),p=n.child(d),v=a[f],m=a[d];if(v+=s[1]+en(h,s[1]-1),m+=l[1]+en(p,l[1]-1),u)if(c){var g={from:v,to:m,startIndex:f,endIndex:d};sk(r,n,i,g,u.attrs)}else r.addMark(v,m,e.mark(u.type,u.attrs));else r.removeMark(v,m)}),uk(r,a,i)}function uk(r,e,t){Object.keys(zn).forEach(function(n){var i=Number(n),a=Math.min(Number(n)+1,r.doc.childCount-1),o=e[i],s=e[a]-1;i===a&&(s+=2),r.setBlockType(o,s,t)})}function ck(r,e,t){var n=[];zn={};for(var i=e[0]-1;i<t[0];i+=1){var a=r.child(i),o=a.attrs.codeEnd,s=a.attrs.codeStart;if(s&&o&&!ve(n,s)){n.push(s),o=Math.min(o,r.childCount);for(var l=s-1,u=t[0],c=l;c<u;c+=1)zn[c]=!0}}}function fk(r,e){var t=r.doc,n=e[0].sourcepos[0],i=Ee(e).sourcepos,a=i[1],o=[n[0],n[1]],s=[a[0],a[1]+1],l=[];return ck(t,n,a),l.push({start:o,end:s}),l}function dk(r,e){var t=e.getLineTexts(),n=[Vn(r),ma(r)],i=[va(r),$t(r)+1],a=ik(r,n,i,t[i[0]-1]);return a??[]}var hk=["taskList","orderedList","bulletList","table","strong","emph","strike","heading","thematicBreak","blockQuote","code","codeBlock","indent","outdent"];function pk(r){var e=r.type;return vr(r)?r.listData.task?"taskList":r.listData.type==="ordered"?"orderedList":"bulletList":e.indexOf("table")!==-1?"table":ve(hk,e)?e:null}function vk(r){var e={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}},t=!0;return iw(r,function(n){var i=pk(n);i&&(i==="bulletList"||i==="orderedList"?t&&(e[i]={active:!0},e.indent.disabled=!1,e.outdent.disabled=!1,t=!1):e[i]={active:!0})}),e}function mk(r){var e=r.toastMark,t=r.eventEmitter;return new X({view:function(){return{update:function(n,i){var a=n.state,o=a.doc,s=a.selection;if(!(i&&i.doc.eq(o)&&i.selection.eq(s))){var l=s.from,u=a.doc.resolve(l).start(),c=a.doc.content.findIndex(l).index+1,f=l-u;l===u&&(f+=1);var d=[c,f],h=e.findNodeAtPosition(d),p=vk(h);t.emit("changeToolbarState",{cursorPos:d,mdNode:h,toolbarState:p}),t.emit("setFocusedNode",h)}}}}})}var gk=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"doc"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"block+"}},enumerable:!1,configurable:!0}),e})(W),K=(function(){function r(){}return Object.defineProperty(r.prototype,"type",{get:function(){return"mark"},enumerable:!1,configurable:!0}),r.prototype.setContext=function(e){this.context=e},r})();function Ie(r,e){return Vt(r,e-1)}function Vt(r,e){return r.child(e).textContent}var Fn=/^\s*> ?/,yk=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("block-quote")},0]}}},enumerable:!1,configurable:!0}),e.prototype.createBlockQuoteText=function(t,n){return n?t.replace(Fn,"").trim():"> "+t.trim()},e.prototype.extendBlockQuote=function(){var t=this;return function(n,i){var a=n.selection,o=n.doc,s=n.tr,l=n.schema,u=te(a),c=u.endFromOffset,f=u.endToOffset,d=u.endIndex,h=u.to,p=Vt(o,d),v=Fn.test(p);if(v&&h>c&&a.empty){var m=!p.replace(Fn,"").trim();if(m)s.deleteRange(c,f).split(s.mapping.map(f));else{var g=p.slice(h-c).trim(),w=pe(l,t.createBlockQuoteText(g));sl(s,f,g,w)}return i(s),!0}return!1}},e.prototype.commands=function(){var t=this;return function(){return function(n,i){var a=n.selection,o=n.doc,s=te(a),l=s.startFromOffset,u=s.endToOffset,c=s.startIndex,f=s.endIndex,d=Fn.test(Vt(o,c)),h=ta({state:n,startIndex:c,endIndex:f,from:l,createText:function(p){return t.createBlockQuoteText(p,d)}});return i(h.setSelection(G(h,h.mapping.map(u)))),!0}}},e.prototype.keymaps=function(){var t=this.commands()();return{"alt-q":t,"alt-Q":t,Enter:this.extendBlockQuote()}},e})(K),yr=/(^\s*)([-*+] |[\d]+\. )/,vl=/(^\s*)([\d])+\.( \[[ xX]])? /,Tt=/^(\s*)((\d+)([.)]\s(?:\[(?:x|\s)\]\s)?))(.*)/,na=/(^\s*)([-*+]|[\d]+\.)( \[[ xX]])? /,bk=/^(\s*)([-*+]+(\s(?:\[(?:x|\s)\]\s)?))(.*)/,wk=/(^\s*)([-*+] |[\d]+\. )(\[[ xX]] )/,kk=/(^\s*)([-*+])( \[[ xX]]) /;function ml(r){return vl.test(r)?"ordered":"bullet"}function gl(r){for(var e=0;r&&r.type!=="document";)r.type==="list"&&(e+=1),r=r.parent;return e}function Ns(r,e,t,n){for(var i=r.getLineTexts(),a=i.length,o=[],s=e;n?s<a:s>1;){s=n?s+1:s-1;var l=r.findFirstNodeAtLine(s),u=gl(l);if(u===t)o.push({line:s,depth:t,mdNode:l});else if(u<t)break}return o}function Ck(r){var e=r.toastMark,t=r.mdNode,n=r.line,i=gl(t),a=Ns(e,n,i,!1).reverse(),o=Ns(e,n,i,!0);return a.concat([{line:n,depth:i,mdNode:t}]).concat(o)}function Tk(r){if(!yr.test(r))return"* "+r;var e=ml(r);return e==="bullet"&&na.test(r)?r=r.replace(kk,"$1$2 "):e==="ordered"&&(r=r.replace(vl,"$1* ")),r}function xk(r,e){if(!yr.test(r))return e+". "+r;var t=ml(r);if(t==="bullet"||t==="ordered"&&na.test(r))r=r.replace(na,"$1"+e+". ");else if(t==="ordered"){var n=Tt.exec(r)[3];Number(n)!==e&&(r=r.replace(vl,"$1"+e+". "))}return r}function kp(r,e,t,n){n===void 0&&(n=0);var i=Number.MAX_VALUE,a=0,o=e.map(function(s,l){var u=s.line;i=Math.min(u-1,i),a=Math.max(u-1,a);var c=Ie(r,u);return c=t==="bullet"?Tk(c):xk(c,l+1+n),{text:c,line:u}});return{changedResults:o,firstIndex:i,lastIndex:a}}function Kf(r,e){var t=Ck(e);return kp(e.doc,t,r)}var Ek={bullet:function(r){return Kf("bullet",r)},ordered:function(r){return Kf("ordered",r)},task:function(r){var e=r.mdNode,t=r.doc,n=r.line,i=Ie(t,n);return e.listData.task?i=i.replace(wk,"$1$2"):vr(e)&&(i=i.replace(yr,"$1$2[ ] ")),{changedResults:[{text:i,line:n}]}}},Sk={bullet:function(r){var e=r.doc,t=r.line,n=Ie(e,t),i=[{text:"* "+n,line:t}];return{changedResults:i}},ordered:function(r){for(var e=r.toastMark,t=r.doc,n=r.line,i=r.startLine,a=Ie(t,n),o=1,s=i,l=0,u=i-1;u>0;u-=1){var c=e.findFirstNodeAtLine(u),f=Ie(t,u),d=f&&!!Yr(c,function(k){return vr(k)}),h=Tt.exec(Ie(t,u));if(!h&&!d)break;if(!h&&d){l+=1;continue}var p=h,v=p[1],m=p[3];if(!v){o=Number(m),s=u;break}}var g=o+n-s-l,w=[{text:g+". "+a,line:n}];return{changedResults:w}},task:function(r){var e=r.doc,t=r.line,n=Ie(e,t),i=[{text:"* [ ] "+n,line:t}];return{changedResults:i}}},Mk={bullet:function(r){var e=r.line,t=r.doc,n=Ie(t,e),i=bk.exec(n),a=i[1],o=i[2];return{listSyntax:""+a+o}},ordered:function(r){var e=r.toastMark,t=r.line,n=r.mdNode,i=r.doc,a=gl(n),o=Ie(i,t),s=Tt.exec(o),l=s[1],u=s[3],c=s[4],f=Number(u)+1,d=""+l+f+c,h=Ns(e,t,a,!0),p=h.filter(function(v){var m=Tt.exec(Ie(i,v.line));return m&&m[1].length===l.length&&!!Yr(v.mdNode,function(g){return Jh(g)})});return b({listSyntax:d},kp(i,p,"ordered",f))}};function Cp(r,e,t,n,i){for(var a=[],o=Ie(r,t),s=Tt.exec(o);s;){var l=s[1],u=s[4],c=s[5],f=l.length;if(f===i)a.push(pe(e,""+l+n+u+c)),n+=1,t+=1;else if(f>i){var d=Cp(r,e,t,1,f);t=d.line,a=a.concat(d.nodes)}if(f<i||t>r.childCount)break;o=Ie(r,t),s=Tt.exec(o)}return{nodes:a,line:t}}var Jf=/(^\s{1,4})(.*)/;function Xf(r,e,t){return r<e||yr.test(t)||Fn.test(t)}function Qf(r,e,t){var n=t.$from;n.depth===0&&(n=r.resolve(n.pos-1));var i=n.node(1),a=n.start(1),o=i.content.size;return i.rangeHasMark(0,o,e.marks.table)&&n.pos-a!==o&&n.pos!==a}function Yf(r,e){var t=e.from,n=e.to;if(e.type==="indent"){var i=4;t+=i,n+=(e.lineLen+1)*i}else{var a=e.spaceLenList;t-=a[0];for(var o=0;o<a.length;o+=1)n-=a[o]}return G(r,t,n)}var Ok=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"paragraph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"inline*",attrs:{className:{default:null},codeStart:{default:null},codeEnd:{default:null}},selectable:!1,group:"block",parseDOM:[{tag:"div"}],toDOM:function(t){var n=t.attrs;return n.className?["div",{class:re(n.className)},0]:["div",0]}}},enumerable:!1,configurable:!0}),e.prototype.reorderList=function(t,n){for(var i=this.context,a=i.view,o=i.toastMark,s=i.schema,l=a.state,u=l.tr,c=l.selection,f=l.doc,d=o.findFirstNodeAtLine(t),h=d;d&&!rw(d)&&d.parent.type!=="document";)if(d=d.parent,Jh(d)){h=d;break}h&&(t=h.sourcepos[0][0]);var p=Tt.exec(Ie(f,t)),v=p[1],m=p[3],g=v.length,w=Cp(f,s,t,Number(m),g),k=w.line,C=w.nodes;n=Math.max(n,k-1);for(var x=ra(f,t-1).startOffset,L=t-1;L<=n-1;L+=1){var E=f.child(L),N=E.nodeSize,P=E.content,j=u.mapping.map(x),se=j+P.size;u.replaceWith(j,se,C[L-t+1]),x+=N}var Pe=G(u,c.from,c.to);a.dispatch(u.setSelection(Pe))},e.prototype.indent=function(t){var n=this;return t===void 0&&(t=!1),function(){return function(i,a){var o=i.schema,s=i.selection,l=i.doc,u=te(s),c=u.from,f=u.to,d=u.startFromOffset,h=u.startIndex,p=u.endIndex;if(t&&Qf(l,o,s))return!1;var v=Vt(l,h);if(t&&Xf(c,f,v)||!t&&yr.test(v)){var m=ta({state:i,from:d,startIndex:h,endIndex:p,createText:function(w){return"    "+w}}),g={type:"indent",from:c,to:f,lineLen:p-h};a(m.setSelection(Yf(m,g))),Tt.test(v)&&n.reorderList(h+1,p+1)}else t&&a(i.tr.insert(f,pe(o,"    ")));return!0}}},e.prototype.outdent=function(t){var n=this;return t===void 0&&(t=!1),function(){return function(i,a){var o=i.selection,s=i.doc,l=i.schema,u=te(o),c=u.from,f=u.to,d=u.startFromOffset,h=u.startIndex,p=u.endIndex;if(t&&Qf(s,l,o))return!1;var v=Vt(s,h);if(t&&Xf(c,f,v)||!t&&yr.test(v)){var m=[],g=ta({state:i,from:d,startIndex:h,endIndex:p,createText:function(L){var E=Jf.exec(L);return m.push(E?E[1].length:0),L.replace(Jf,"$2")}}),w={type:"outdent",from:c,to:f,spaceLenList:m};a(g.setSelection(Yf(g,w))),Tt.test(v)&&n.reorderList(h+1,p+1)}else if(t){var k=v.slice(0,f-d),C=k.replace(/\s{1,4}$/,""),x=f-(k.length-C.length);a(i.tr.delete(x,f))}return!0}}},e.prototype.deleteLines=function(){var t=this;return function(n,i){var a=t.context.view,o=te(n.selection),s=o.startFromOffset,l=o.endToOffset,u=function(){return i(n.tr.deleteRange(s,l)),!0};return Dn(u,Ko)(n,i,a)}},e.prototype.moveDown=function(){return function(t,n){var i=t.doc,a=t.tr,o=t.selection,s=t.schema,l=te(o),u=l.startFromOffset,c=l.endToOffset,f=l.endIndex;if(f<i.content.childCount-1){var d=i.child(f+1),h=d.nodeSize,p=d.textContent;return a.delete(c,c+h).split(u).insert(a.mapping.map(u)-2,pe(s,p)),n(a),!0}return!1}},e.prototype.moveUp=function(){return function(t,n){var i=t.tr,a=t.doc,o=t.selection,s=t.schema,l=te(o),u=l.startFromOffset,c=l.endToOffset,f=l.startIndex;if(f>0){var d=a.child(f-1),h=d.nodeSize,p=d.textContent;return i.delete(u-h,u).split(i.mapping.map(c)).insert(i.mapping.map(c),pe(s,p)),n(i),!0}return!1}},e.prototype.commands=function(){return{indent:this.indent(),outdent:this.outdent()}},e.prototype.keymaps=function(){return{Tab:this.indent(!0)(),"Shift-Tab":this.outdent(!0)(),"Mod-d":this.deleteLines(),"Mod-D":this.deleteLines(),"Alt-ArrowUp":this.moveUp(),"Alt-ArrowDown":this.moveDown()}},e})(W),Lk=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"text"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{group:"inline"}},enumerable:!1,configurable:!0}),e})(W),Ak=/^#{1,6}\s/,Nk=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"heading"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{level:{default:1},seText:{default:!1}},toDOM:function(t){var n=t.attrs,i=n.level,a=n.seText,o="heading|heading"+i;return a&&(o+="|delimiter|setext"),["span",{class:re.apply(void 0,o.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.createHeadingText=function(t,n,i){for(var a=n.replace(i,"").trim(),o="";t>0;)o+="#",t-=1;return o+" "+a},e.prototype.commands=function(){var t=this;return function(n){return function(i,a){var o=n.level,s=te(i.selection),l=s.startFromOffset,u=s.endToOffset,c=s.startIndex,f=s.endIndex,d=ta({state:i,from:l,startIndex:c,endIndex:f,createText:function(h){var p=h.match(Ak),v=p?p[0]:"";return t.createHeadingText(o,h,v)}});return a(d.setSelection(G(d,d.mapping.map(u)))),!0}}},e})(K),ss="```",Dk=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("code-block")},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){var i=t.selection,a=t.schema,o=t.tr,s=te(i),l=s.startFromOffset,u=s.endToOffset,c=pe(a,ss);return o.insert(l,c).split(l+ss.length),o.split(o.mapping.map(u)).insert(o.mapping.map(u),c),n(o.setSelection(G(o,o.mapping.map(u)-(ss.length+2)))),!0}}},e.prototype.keepIndentation=function(){var t=this;return function(n,i){var a=n.selection,o=n.tr,s=n.doc,l=n.schema,u=t.context.toastMark,c=te(a),f=c.startFromOffset,d=c.endToOffset,h=c.endIndex,p=c.from,v=c.to,m=Vt(s,h);if(p===v&&m.trim()){var g=m.match(/^\s+/),w=u.findFirstNodeAtLine(h+1);if(tw(w)&&g){var k=g[0],C=m.slice(v-f),x=pe(l,k+C);return sl(o,d,C,x),i(o),!0}}return!1}},e.prototype.keymaps=function(){var t=this.commands()();return{"Shift-Mod-p":t,"Shift-Mod-P":t,Enter:this.keepIndentation()}},e})(K),Ik=/\||\s/g;function Rk(r){return[ia(r),ia(r,!0)]}function Bk(r,e){for(var t=[],n=0;n<e;n+=1)t.push(ia(r));return t}function ia(r,e){for(var t="|",n=0;n<r;n+=1)t+=e?" --- |":"  |";return t}function Pk(r){return r?{type:"next",parentType:"tableHead",childType:"firstChild"}:{type:"prev",parentType:"tableBody",childType:"lastChild"}}var Hk=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"table"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("table")},0]}}},enumerable:!1,configurable:!0}),e.prototype.extendTable=function(){var t=this;return function(n,i){var a=n.selection,o=n.doc,s=n.tr,l=n.schema;if(!a.empty)return!1;var u=te(a),c=u.endFromOffset,f=u.endToOffset,d=u.endIndex,h=u.to,p=Vt(o,d),v=[d+1,h-c+1],m=t.context.toastMark.findNodeAtPosition(v),g=Yr(m,function(L){return _f(L)&&(L.parent.type==="tableDelimRow"||L.parent.parent.type==="tableBody")});if(g){var w=!p.replace(Ik,"").trim(),k=g.parent,C=k.parent.parent.columns.length,x=ia(C);return w?s.deleteRange(c,f).split(s.mapping.map(f)):s.split(f).insert(s.mapping.map(f),pe(l,x)).setSelection(G(s,s.mapping.map(f)-2)),i(s),!0}return!1}},e.prototype.moveTableCell=function(t){var n=this;return function(i,a){var o=i.selection,s=i.tr,l=te(o),u=l.endFromOffset,c=l.endIndex,f=l.to,d=[c+1,f-u],h=n.context.toastMark.findNodeAtPosition(d),p=Yr(h,function(E){return _f(E)});if(p){var v=p.parent,m=Pk(t),g=m.type,w=m.parentType,k=m.childType,C=$t(p);if(p[g])C=$t(p[g])-1;else{var x=!v[g]&&v.parent.type===w?v.parent[g][k]:v[g];if(g==="next"){var L=x?$t(x[k]):0;C+=L+2}else g==="prev"&&(C=x?-4:0)}return a(s.setSelection(G(s,u+C))),!0}return!1}},e.prototype.addTable=function(){return function(t){return function(n,i){var a=n.selection,o=n.tr,s=n.schema,l=t,u=l.columnCount,c=l.rowCount,f=te(a).endToOffset,d=Rk(u),h=Bk(u,c-1),p=Ne(Ne([],d),h);return p.forEach(function(v){o.split(o.mapping.map(f)).insert(o.mapping.map(f),pe(s,v))}),i(o.setSelection(G(o,f+4))),!0}}},e.prototype.commands=function(){return{addTable:this.addTable()}},e.prototype.keymaps=function(){return{Enter:this.extendTable(),Tab:this.moveTableCell(!0),"Shift-Tab":this.moveTableCell(!1)}},e})(K),Fk="***",qk=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("thematic-break")},0]}}},enumerable:!1,configurable:!0}),e.prototype.hr=function(){return function(){return function(t,n){var i=t.selection,a=t.schema,o=t.tr,s=te(i),l=s.from,u=s.to,c=s.endToOffset,f=pe(a,Fk);return o.split(l).replaceWith(o.mapping.map(l),o.mapping.map(u),f).split(o.mapping.map(u)).setSelection(G(o,o.mapping.map(c))),n(o),!0}}},e.prototype.commands=function(){return{hr:this.hr()}},e.prototype.keymaps=function(){var t=this.hr()();return{"Mod-l":t,"Mod-L":t}},e})(K);function _k(r,e){var t=r.type,n=r.sourcepos,i=n[0][0];return e<=i&&(t==="codeBlock"||t==="heading"||t.match("table"))}var $k=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"listItem"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{odd:{default:!1},even:{default:!1},listStyle:{default:!1}},toDOM:function(t){var n=t.attrs,i=n.odd,a=n.even,o=n.listStyle,s="list-item";return o&&(s+="|list-item-style"),i&&(s+="|list-item-odd"),a&&(s+="|list-item-even"),["span",{class:re.apply(void 0,s.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.extendList=function(){var t=this;return function(n,i){var a=n.selection,o=n.doc,s=n.schema,l=n.tr,u=t.context.toastMark,c=te(a),f=c.to,d=c.startFromOffset,h=c.endFromOffset,p=c.endIndex,v=c.endToOffset,m=Vt(o,p),g=yr.test(m);if(!g||a.from===d||!a.empty)return!1;var w=!m.replace(na,"").trim();if(w)l.deleteRange(h,v).split(l.mapping.map(v));else{var k=ml(m),C=u.findFirstNodeAtLine(p+1),x=m.slice(f-h),L={toastMark:u,mdNode:C,doc:o,line:p+1},E=Mk[k](L),N=E.listSyntax,P=E.changedResults;if(P?.length){l.split(f),P.unshift({text:N+x,line:p+1}),t.changeToListPerLine(l,P,{from:f,startLine:P[0].line,endLine:Ee(P).line});var j=l.mapping.map(v)-x.length;l.setSelection(G(l,j))}else{var se=pe(s,N+x);sl(l,v,x,se)}}return i(l),!0}},e.prototype.toList=function(t){var n=this;return function(){return function(i,a){for(var o=i.doc,s=i.tr,l=i.selection,u=n.context.toastMark,c=te(l),f=c.startIndex+1,d=c.endIndex+1,h=c.endToOffset,p=[],v=f;v<=d;v+=1){var m=u.findFirstNodeAtLine(v);if(m&&_k(m,v))break;if(p.indexOf(v)===-1){var g={toastMark:u,mdNode:m,doc:o,line:v,startLine:f},w=(vr(m)?Ek[t](g):Sk[t](g)).changedResults,k=n.changeToListPerLine(s,w,{from:ra(o,w[0].line-1).startOffset,startLine:w[0].line,endLine:Ee(w).line,indexDiff:1});h=Math.max(k,h),w&&(p=p.concat(w.map(function(C){return C.line})))}}return a(s.setSelection(G(s,s.mapping.map(h)))),!0}}},e.prototype.changeToListPerLine=function(t,n,i){for(var a=i.from,o=i.startLine,s=i.endLine,l=i.indexDiff,u=l===void 0?0:l,c=0,f=function(p){var v=t.doc.child(p),m=v.nodeSize,g=v.content,w=t.mapping.map(a),k=w+g.size,C=n.filter(function(x){return x.line-u===p})[0];C&&(t.replaceWith(w,k,pe(d.context.schema,C.text)),c=Math.max(c,a+g.size)),a+=m},d=this,h=o-u;h<=s-u;h+=1)f(h);return c},e.prototype.toggleTask=function(){var t=this;return function(n,i){for(var a=n.selection,o=n.tr,s=n.doc,l=n.schema,u=t.context.toastMark,c=te(a),f=c.startIndex,d=c.endIndex,h=null,p=f;p<=d;p+=1){var v=u.findFirstNodeAtLine(p+1);if(vr(v)&&v.listData.task){var m=v.listData,g=m.checked,w=m.padding,k=g?" ":"x",C=v.sourcepos[0],x=ra(s,C[0]-1).startOffset;x+=C[1]+w,h=o.replaceWith(x,x+1,l.text(k))}}return h?(i(h),!0):!1}},e.prototype.commands=function(){return{bulletList:this.toList("bullet"),orderedList:this.toList("ordered"),taskList:this.toList("task")}},e.prototype.keymaps=function(){var t=this.toList("bullet")(),n=this.toList("ordered")(),i=this.toList("task")(),a=this.toggleTask();return{"Mod-u":t,"Mod-U":t,"Mod-o":n,"Mod-O":n,"alt-t":i,"alt-T":i,"Shift-Ctrl-x":a,"Shift-Ctrl-X":a,Enter:this.extendList()}},e})(K);function wa(r,e){return function(){return function(t,n){var i=t.tr,a=t.selection,o=Ve(r)?r:function(k){return r.test(k)},s=e.length,l=i.doc,u=mp(a),c=u[0],f=u[1],d=Math.max(c-s,1),h=Math.min(f+s,l.content.size-1),p=a.content(),v=p.content.textBetween(0,p.content.size,`
11`),m=l.textBetween(d,c,`
12`),g=l.textBetween(f,h,`
13`);if(v=""+m+v+g,m&&g&&o(v))i.delete(h-s,h).delete(d,d+s);else{i.insertText(e,f).insertText(e,c);var w=a.empty?G(i,c+s):G(i,c+s,f+s);i.setSelection(w)}return n(i),!0}}}var zk=/^(\*{2}|_{2}).*([\s\S]*)\1$/m,Vk="**",Uk=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strong"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("strong")},0]}}},enumerable:!1,configurable:!0}),e.prototype.bold=function(){return wa(zk,Vk)},e.prototype.commands=function(){return{bold:this.bold()}},e.prototype.keymaps=function(){var t=this.bold()();return{"Mod-b":t,"Mod-B":t}},e})(K),Wk=/^(~{2}).*([\s\S]*)\1$/m,jk="~~",Gk=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strike"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("strike")},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return wa(Wk,jk)},e.prototype.keymaps=function(){var t=this.commands()();return{"Mod-s":t,"Mod-S":t}},e})(K),Kk=/^(\*|_).*([\s\S]*)\1$/m,Jk="*",Xk=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"emph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("emph")},0]}}},enumerable:!1,configurable:!0}),e.prototype.italic=function(){return wa(Kk,Jk)},e.prototype.commands=function(){return{italic:this.italic()}},e.prototype.keymaps=function(){var t=this.italic()();return{"Mod-i":t,"Mod-I":t}},e})(K),Qk=/^(`).*([\s\S]*)\1$/m,Yk="`",Zk=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"code"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{start:{default:!1},end:{default:!1},marked:{default:!1}},toDOM:function(t){var n=t.attrs,i=n.start,a=n.end,o=n.marked,s="code";return i&&(s+="|delimiter|start"),a&&(s+="|delimiter|end"),o&&(s+="|marked-text"),["span",{class:re.apply(void 0,s.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return wa(Qk,Yk)},e.prototype.keymaps=function(){var t=this.commands()();return{"Shift-Mod-c":t,"Shift-Mod-C":t}},e})(K),eC=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"link"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{url:{default:!1},desc:{default:!1}},toDOM:function(t){var n=t.attrs,i=n.url,a=n.desc,o="link";return i&&(o+="|link-url|marked-text"),a&&(o+="|link-desc|marked-text"),["span",{class:re.apply(void 0,o.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.addLinkOrImage=function(t){return function(n){return function(i,a){var o=i.selection,s=i.tr,l=i.schema,u=mp(o),c=u[0],f=u[1],d=n,h=d.linkText,p=d.altText,v=d.linkUrl,m=d.imageUrl,g=h,w=v,k="";return t==="image"&&(g=p,w=m,k="!"),g=Yi(g),k+="["+g+"]("+w+")",a(s.replaceWith(c,f,pe(l,k))),!0}}},e.prototype.commands=function(){return{addImage:this.addLinkOrImage("image"),addLink:this.addLinkOrImage("link")}},e})(K),tC=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"taskDelimiter"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("delimiter","list-item")},0]}}},enumerable:!1,configurable:!0}),e})(K),rC=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"delimiter"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("delimiter")},0]}}},enumerable:!1,configurable:!0}),e})(K),nC=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"meta"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("meta")},0]}}},enumerable:!1,configurable:!0}),e})(K),iC=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"markedText"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("marked-text")},0]}}},enumerable:!1,configurable:!0}),e})(K),aC=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("table-cell")},0]}}},enumerable:!1,configurable:!0}),e})(K),oC=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"html"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("html")},0]}}},enumerable:!1,configurable:!0}),e})(K),ls="$$",sC=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"customBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:re("custom-block")},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(t){return function(n,i){var a=n.selection,o=n.schema,s=n.tr,l=te(a),u=l.startFromOffset,c=l.endToOffset;if(!t?.info)return!1;var f=""+ls+t.info,d=pe(o,f),h=pe(o,ls);return s.insert(u,d).split(u+f.length),s.split(s.mapping.map(c)).insert(s.mapping.map(c),h),i(s.setSelection(G(s,s.mapping.map(c)-(ls.length+2)))),!0}}},e})(K),lC=/x|backspace/i,uC=/^\[(\s*)(x?)(\s*)\](?:\s+)/i;function cC(r){var e=r.schema,t=r.toastMark;return new X({props:{handleDOMEvents:{keyup:function(n,i){var a,o=n.state,s=o.doc,l=o.tr,u=o.selection;if(u.empty&&lC.test(i.key)){var c=te(u),f=c.startIndex,d=c.startFromOffset,h=c.from,p=[f+1,h-d+1],v=t.findNodeAtPosition(p),m=Yr(v,function(se){var Pe;return se.type==="paragraph"&&((Pe=se.parent)===null||Pe===void 0?void 0:Pe.type)==="item"});if(!((a=m?.firstChild)===null||a===void 0)&&a.literal){var g=m.firstChild,w=g.literal.match(uC);if(w){var k=g.sourcepos[0],C=w[1],x=w[2],L=w[3],E=C.length+L.length,N=ra(s,k[0]-1).startOffset,P=k[1]+N;if(x){var j=E?E+1:0;l.replaceWith(P,j+P,e.text(x)),n.dispatch(l)}else E||(l.insertText(" ",P),n.dispatch(l))}}}return!1}}}})}var us="cut",Zf=/\r\n|\n|\r/,fC=(function(r){O(e,r);function e(t,n){var i=r.call(this,t)||this,a=n.toastMark,o=n.useCommandShortcut,s=o===void 0?!0:o,l=n.mdPlugins,u=l===void 0?[]:l;return i.editorType="markdown",i.el.classList.add("md-mode"),i.toastMark=a,i.extraPlugins=u,i.specs=i.createSpecs(),i.schema=i.createSchema(),i.context=i.createContext(),i.keymaps=i.createKeymaps(s),i.view=i.createView(),i.commands=i.createCommands(),i.specs.setContext(b(b({},i.context),{view:i.view})),i.createClipboard(),i.eventEmitter.listen("changePreviewTabWrite",function(c){return i.toggleActive(!0,c)}),i.eventEmitter.listen("changePreviewTabPreview",function(){return i.toggleActive(!1)}),i.initEvent(),i}return e.prototype.toggleActive=function(t,n){ul(this.el,"active",t),t?n||this.focus():this.blur()},e.prototype.createClipboard=function(){var t=this;this.clipboard=document.createElement("textarea"),this.clipboard.className=A("pseudo-clipboard"),this.clipboard.addEventListener("paste",function(n){var i=n.clipboardData||window.clipboardData,a=i&&i.items;if(a){var o=ut(a).some(function(l){return l.kind==="string"&&l.type==="text/rtf"});if(!o){var s=fp(a);s&&(n.preventDefault(),hl(t.eventEmitter,s,n.type))}}}),this.clipboard.addEventListener("input",function(n){var i=n.target.value;t.replaceSelection(i),n.preventDefault(),n.target.value=""}),this.el.insertBefore(this.clipboard,this.view.dom)},e.prototype.createContext=function(){return{toastMark:this.toastMark,schema:this.schema,eventEmitter:this.eventEmitter}},e.prototype.createSpecs=function(){return new vp([new gk,new Ok,new hp,new Lk,new Nk,new yk,new Dk,new sC,new Hk,new aC,new qk,new $k,new Uk,new Gk,new Xk,new Zk,new eC,new rC,new tC,new iC,new nC,new oC])},e.prototype.createPlugins=function(){return Ne([ak(this.context),mk(this.context),cC(this.context)],this.createPluginProps()).concat(this.defaultPlugins)},e.prototype.createView=function(){var t=this;return new or(this.el,{state:this.createState(),dispatchTransaction:function(n){t.updateMarkdown(n);var i=t.view.state.applyTransaction(n).state;t.view.updateState(i),t.emitChangeEvent(n)},handleKeyDown:function(n,i){return(i.metaKey||i.ctrlKey)&&i.key.toUpperCase()==="V"&&t.clipboard.focus(),t.eventEmitter.emit("keydown",t.editorType,i),!1},handleDOMEvents:{copy:function(n,i){return t.captureCopy(i)},cut:function(n,i){return t.captureCopy(i,us)},scroll:function(){return t.eventEmitter.emit("scroll","editor"),!0},keyup:function(n,i){return t.eventEmitter.emit("keyup",t.editorType,i),!1}},nodeViews:{widget:dp}})},e.prototype.createCommands=function(){return this.specs.commands(this.view)},e.prototype.captureCopy=function(t,n){t.preventDefault();var i=this.view.state,a=i.selection,o=i.tr;if(a.empty)return!0;var s=this.getChanged(a.content());return t.clipboardData?t.clipboardData.setData("text/plain",s):window.clipboardData.setData("Text",s),n===us&&this.view.dispatch(o.deleteSelection().scrollIntoView().setMeta("uiEvent",us)),!0},e.prototype.updateMarkdown=function(t){var n=this;t.docChanged&&t.steps.forEach(function(i,a){if(i.slice&&!(i instanceof Z)){var o=t.docs[a],s=[i.from,i.to],l=s[0],u=s[1],c=Vi(o,l,u),f=c[0],d=c[1],h=n.getChanged(i.slice);f[0]===d[0]&&f[1]===d[1]&&h===""&&(h=`
14`);var p=n.toastMark.editMarkdown(f,d,h);n.eventEmitter.emit("updatePreview",p),t.setMeta("editResult",p).scrollIntoView()}})},e.prototype.getChanged=function(t){var n="",i=0,a=t.content.size;return t.content.nodesBetween(i,a,function(o,s){o.isText?n+=o.text.slice(Math.max(i,s)-s,a-s):o.isBlock&&s>0&&(n+=`
15`)}),n},e.prototype.setSelection=function(t,n){n===void 0&&(n=t);var i=this.view.state.tr,a=dr(i.doc,t,n),o=a[0],s=a[1];this.view.dispatch(i.setSelection(G(i,o,s)).scrollIntoView())},e.prototype.replaceSelection=function(t,n,i){var a,o=this.view.state,s=o.tr,l=o.schema,u=o.doc,c=t.split(Zf),f=c.map(function(m){return ea(l,hr(m,l))}),d=new M(T.from(f),1,1);if(this.focus(),n&&i){var h=dr(u,n,i),p=h[0],v=h[1];a=s.replaceRange(p,v,d)}else a=s.replaceSelection(d);this.view.dispatch(a.scrollIntoView())},e.prototype.deleteSelection=function(t,n){var i,a=this.view.state,o=a.tr,s=a.doc;if(t&&n){var l=dr(s,t,n),u=l[0],c=l[1];i=o.deleteRange(u,c)}else i=o.deleteSelection();this.view.dispatch(i.scrollIntoView())},e.prototype.getSelectedText=function(t,n){var i=this.view.state,a=i.doc,o=i.selection,s=o.from,l=o.to;if(t&&n){var u=dr(a,t,n);s=u[0],l=u[1]}return a.textBetween(s,l,`
16`)},e.prototype.getSelection=function(){var t=this.view.state.selection,n=t.from,i=t.to;return Vi(this.view.state.tr.doc,n,i)},e.prototype.setMarkdown=function(t,n){n===void 0&&(n=!0);var i=t.split(Zf),a=this.view.state,o=a.tr,s=a.doc,l=a.schema,u=i.map(function(c){return ea(l,hr(c,l))});this.view.dispatch(o.replaceWith(0,s.content.size,u)),n&&this.moveCursorToEnd(!0)},e.prototype.addWidget=function(t,n,i){var a=this.view.state,o=a.tr,s=a.doc,l=a.selection,u=i?dr(s,i,i)[0]:l.to;this.view.dispatch(o.setMeta("widget",{pos:u,node:t,style:n}))},e.prototype.replaceWithWidget=function(t,n,i){var a=this.view.state,o=a.tr,s=a.schema,l=a.doc,u=dr(l,t,n),c=hr(i,s);this.view.dispatch(o.replaceWith(u[0],u[1],c))},e.prototype.getRangeInfoOfNode=function(t){var n=this.view.state,i=n.doc,a=n.selection,o=t||Vi(i,a.from)[0],s=this.toastMark.findNodeAtPosition(o);return s.type==="text"&&s.parent.type!=="paragraph"&&(s=s.parent),s.sourcepos[1][1]+=1,{range:s.sourcepos,type:s.type}},e.prototype.getMarkdown=function(){return this.toastMark.getLineTexts().map(function(t){return ga(t)}).join(`
17`)},e.prototype.getToastMark=function(){return this.toastMark},e})(pp),ed="_feEventKey";function dC(r,e){var t=r[ed],n;return t||(t=r[ed]={}),n=t[e],n||(n=t[e]=[]),n}var Tp=dC,hC=St,aa=pa,pC=Tp;function vC(r,e,t){if(hC(e)){aa(e.split(/\s+/g),function(n){td(r,n,t)});return}aa(e,function(n,i){td(r,i,n)})}function td(r,e,t){var n=pC(r,e),i;t?(aa(n,function(a,o){return t===a.handler?(rd(r,e,a.wrappedHandler),i=o,!1):!0}),n.splice(i,1)):(aa(n,function(a){rd(r,e,a.wrappedHandler)}),n.splice(0,n.length))}function rd(r,e,t){"removeEventListener"in r?r.removeEventListener(e,t):"detachEvent"in r&&r.detachEvent("on"+e,t)}var xp=vC,mC=St,Ds=pa,gC=Tp;function yC(r,e,t,n){if(mC(e)){Ds(e.split(/\s+/g),function(i){nd(r,i,t,n)});return}Ds(e,function(i,a){nd(r,a,i,t)})}function nd(r,e,t,n){function i(a){t.call(n||r,a||window.event)}"addEventListener"in r?r.addEventListener(e,i):"attachEvent"in r&&r.attachEvent("on"+e,i),bC(r,e,t,i)}function bC(r,e,t,n){var i=gC(r,e),a=!1;Ds(i,function(o){return o.handler===t?(a=!0,!1):!0}),a||i.push({handler:t,wrappedHandler:n})}var Ep=yC;var Is=function(r,e){return Is=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Is(r,e)};function Ue(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Is(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var he=function(){return he=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},he.apply(this,arguments)};function Rs(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))}var tn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},id={};function wC(r){var e,t,n=id[r];if(n)return n;for(n=id[r]=[],e=0;e<128;e++)t=String.fromCharCode(e),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e<r.length;e++)n[r.charCodeAt(e)]=r[e];return n}function ka(r,e,t){var n,i,a,o,s,l="";for(typeof e!="string"&&(t=e,e=ka.defaultChars),typeof t>"u"&&(t=!0),s=wC(e),n=0,i=r.length;n<i;n++){if(a=r.charCodeAt(n),t&&a===37&&n+2<i&&/^[0-9a-f]{2}$/i.test(r.slice(n+1,n+3))){l+=r.slice(n,n+3),n+=2;continue}if(a<128){l+=s[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&n+1<i&&(o=r.charCodeAt(n+1),o>=56320&&o<=57343)){l+=encodeURIComponent(r[n]+r[n+1]),n++;continue}l+="%EF%BF%BD";continue}l+=encodeURIComponent(r[n])}return l}ka.defaultChars=";/?:@&=+$,-_.!~*'()#";ka.componentChars="-_.!~*'()";var kC=ka,yl={},xt={},CC="\xC1",TC="\xE1",xC="\u0102",EC="\u0103",SC="\u223E",MC="\u223F",OC="\u223E\u0333",LC="\xC2",AC="\xE2",NC="\xB4",DC="\u0410",IC="\u0430",RC="\xC6",BC="\xE6",PC="\u2061",HC="\u{1D504}",FC="\u{1D51E}",qC="\xC0",_C="\xE0",$C="\u2135",zC="\u2135",VC="\u0391",UC="\u03B1",WC="\u0100",jC="\u0101",GC="\u2A3F",KC="&",JC="&",XC="\u2A55",QC="\u2A53",YC="\u2227",ZC="\u2A5C",e0="\u2A58",t0="\u2A5A",r0="\u2220",n0="\u29A4",i0="\u2220",a0="\u29A8",o0="\u29A9",s0="\u29AA",l0="\u29AB",u0="\u29AC",c0="\u29AD",f0="\u29AE",d0="\u29AF",h0="\u2221",p0="\u221F",v0="\u22BE",m0="\u299D",g0="\u2222",y0="\xC5",b0="\u237C",w0="\u0104",k0="\u0105",C0="\u{1D538}",T0="\u{1D552}",x0="\u2A6F",E0="\u2248",S0="\u2A70",M0="\u224A",O0="\u224B",L0="'",A0="\u2061",N0="\u2248",D0="\u224A",I0="\xC5",R0="\xE5",B0="\u{1D49C}",P0="\u{1D4B6}",H0="\u2254",F0="*",q0="\u2248",_0="\u224D",$0="\xC3",z0="\xE3",V0="\xC4",U0="\xE4",W0="\u2233",j0="\u2A11",G0="\u224C",K0="\u03F6",J0="\u2035",X0="\u223D",Q0="\u22CD",Y0="\u2216",Z0="\u2AE7",eT="\u22BD",tT="\u2305",rT="\u2306",nT="\u2305",iT="\u23B5",aT="\u23B6",oT="\u224C",sT="\u0411",lT="\u0431",uT="\u201E",cT="\u2235",fT="\u2235",dT="\u2235",hT="\u29B0",pT="\u03F6",vT="\u212C",mT="\u212C",gT="\u0392",yT="\u03B2",bT="\u2136",wT="\u226C",kT="\u{1D505}",CT="\u{1D51F}",TT="\u22C2",xT="\u25EF",ET="\u22C3",ST="\u2A00",MT="\u2A01",OT="\u2A02",LT="\u2A06",AT="\u2605",NT="\u25BD",DT="\u25B3",IT="\u2A04",RT="\u22C1",BT="\u22C0",PT="\u290D",HT="\u29EB",FT="\u25AA",qT="\u25B4",_T="\u25BE",$T="\u25C2",zT="\u25B8",VT="\u2423",UT="\u2592",WT="\u2591",jT="\u2593",GT="\u2588",KT="=\u20E5",JT="\u2261\u20E5",XT="\u2AED",QT="\u2310",YT="\u{1D539}",ZT="\u{1D553}",e1="\u22A5",t1="\u22A5",r1="\u22C8",n1="\u29C9",i1="\u2510",a1="\u2555",o1="\u2556",s1="\u2557",l1="\u250C",u1="\u2552",c1="\u2553",f1="\u2554",d1="\u2500",h1="\u2550",p1="\u252C",v1="\u2564",m1="\u2565",g1="\u2566",y1="\u2534",b1="\u2567",w1="\u2568",k1="\u2569",C1="\u229F",T1="\u229E",x1="\u22A0",E1="\u2518",S1="\u255B",M1="\u255C",O1="\u255D",L1="\u2514",A1="\u2558",N1="\u2559",D1="\u255A",I1="\u2502",R1="\u2551",B1="\u253C",P1="\u256A",H1="\u256B",F1="\u256C",q1="\u2524",_1="\u2561",$1="\u2562",z1="\u2563",V1="\u251C",U1="\u255E",W1="\u255F",j1="\u2560",G1="\u2035",K1="\u02D8",J1="\u02D8",X1="\xA6",Q1="\u{1D4B7}",Y1="\u212C",Z1="\u204F",ex="\u223D",tx="\u22CD",rx="\u29C5",nx="\\",ix="\u27C8",ax="\u2022",ox="\u2022",sx="\u224E",lx="\u2AAE",ux="\u224F",cx="\u224E",fx="\u224F",dx="\u0106",hx="\u0107",px="\u2A44",vx="\u2A49",mx="\u2A4B",gx="\u2229",yx="\u22D2",bx="\u2A47",wx="\u2A40",kx="\u2145",Cx="\u2229\uFE00",Tx="\u2041",xx="\u02C7",Ex="\u212D",Sx="\u2A4D",Mx="\u010C",Ox="\u010D",Lx="\xC7",Ax="\xE7",Nx="\u0108",Dx="\u0109",Ix="\u2230",Rx="\u2A4C",Bx="\u2A50",Px="\u010A",Hx="\u010B",Fx="\xB8",qx="\xB8",_x="\u29B2",$x="\xA2",zx="\xB7",Vx="\xB7",Ux="\u{1D520}",Wx="\u212D",jx="\u0427",Gx="\u0447",Kx="\u2713",Jx="\u2713",Xx="\u03A7",Qx="\u03C7",Yx="\u02C6",Zx="\u2257",eE="\u21BA",tE="\u21BB",rE="\u229B",nE="\u229A",iE="\u229D",aE="\u2299",oE="\xAE",sE="\u24C8",lE="\u2296",uE="\u2295",cE="\u2297",fE="\u25CB",dE="\u29C3",hE="\u2257",pE="\u2A10",vE="\u2AEF",mE="\u29C2",gE="\u2232",yE="\u201D",bE="\u2019",wE="\u2663",kE="\u2663",CE=":",TE="\u2237",xE="\u2A74",EE="\u2254",SE="\u2254",ME=",",OE="@",LE="\u2201",AE="\u2218",NE="\u2201",DE="\u2102",IE="\u2245",RE="\u2A6D",BE="\u2261",PE="\u222E",HE="\u222F",FE="\u222E",qE="\u{1D554}",_E="\u2102",$E="\u2210",zE="\u2210",VE="\xA9",UE="\xA9",WE="\u2117",jE="\u2233",GE="\u21B5",KE="\u2717",JE="\u2A2F",XE="\u{1D49E}",QE="\u{1D4B8}",YE="\u2ACF",ZE="\u2AD1",eS="\u2AD0",tS="\u2AD2",rS="\u22EF",nS="\u2938",iS="\u2935",aS="\u22DE",oS="\u22DF",sS="\u21B6",lS="\u293D",uS="\u2A48",cS="\u2A46",fS="\u224D",dS="\u222A",hS="\u22D3",pS="\u2A4A",vS="\u228D",mS="\u2A45",gS="\u222A\uFE00",yS="\u21B7",bS="\u293C",wS="\u22DE",kS="\u22DF",CS="\u22CE",TS="\u22CF",xS="\xA4",ES="\u21B6",SS="\u21B7",MS="\u22CE",OS="\u22CF",LS="\u2232",AS="\u2231",NS="\u232D",DS="\u2020",IS="\u2021",RS="\u2138",BS="\u2193",PS="\u21A1",HS="\u21D3",FS="\u2010",qS="\u2AE4",_S="\u22A3",$S="\u290F",zS="\u02DD",VS="\u010E",US="\u010F",WS="\u0414",jS="\u0434",GS="\u2021",KS="\u21CA",JS="\u2145",XS="\u2146",QS="\u2911",YS="\u2A77",ZS="\xB0",eM="\u2207",tM="\u0394",rM="\u03B4",nM="\u29B1",iM="\u297F",aM="\u{1D507}",oM="\u{1D521}",sM="\u2965",lM="\u21C3",uM="\u21C2",cM="\xB4",fM="\u02D9",dM="\u02DD",hM="`",pM="\u02DC",vM="\u22C4",mM="\u22C4",gM="\u22C4",yM="\u2666",bM="\u2666",wM="\xA8",kM="\u2146",CM="\u03DD",TM="\u22F2",xM="\xF7",EM="\xF7",SM="\u22C7",MM="\u22C7",OM="\u0402",LM="\u0452",AM="\u231E",NM="\u230D",DM="$",IM="\u{1D53B}",RM="\u{1D555}",BM="\xA8",PM="\u02D9",HM="\u20DC",FM="\u2250",qM="\u2251",_M="\u2250",$M="\u2238",zM="\u2214",VM="\u22A1",UM="\u2306",WM="\u222F",jM="\xA8",GM="\u21D3",KM="\u21D0",JM="\u21D4",XM="\u2AE4",QM="\u27F8",YM="\u27FA",ZM="\u27F9",eO="\u21D2",tO="\u22A8",rO="\u21D1",nO="\u21D5",iO="\u2225",aO="\u2913",oO="\u2193",sO="\u2193",lO="\u21D3",uO="\u21F5",cO="\u0311",fO="\u21CA",dO="\u21C3",hO="\u21C2",pO="\u2950",vO="\u295E",mO="\u2956",gO="\u21BD",yO="\u295F",bO="\u2957",wO="\u21C1",kO="\u21A7",CO="\u22A4",TO="\u2910",xO="\u231F",EO="\u230C",SO="\u{1D49F}",MO="\u{1D4B9}
17",OO="\u0405",LO="\u0455",AO="\u29F6",NO="\u0110",DO="\u0111",IO="\u22F1",RO="\u25BF",BO="\u25BE",PO="\u21F5",HO="\u296F",FO="\u29A6",qO="\u040F",_O="\u045F",$O="\u27FF",zO="\xC9",VO="\xE9",UO="\u2A6E",WO="\u011A",jO="\u011B",GO="\xCA",KO="\xEA",JO="\u2256",XO="\u2255",QO="\u042D",YO="\u044D",ZO="\u2A77",eL="\u0116",tL="\u0117",rL="\u2251",nL="\u2147",iL="\u2252",aL="\u{1D508}",oL="\u{1D522}",sL="\u2A9A",lL="\xC8",uL="\xE8",cL="\u2A96",fL="\u2A98",dL="\u2A99",hL="\u2208",pL="\u23E7",vL="\u2113",mL="\u2A95",gL="\u2A97",yL="\u0112",bL="\u0113",wL="\u2205",kL="\u2205",CL="\u25FB",TL="\u2205",xL="\u25AB",EL="\u2004",SL="\u2005",ML="\u2003",OL="\u014A",LL="\u014B",AL="\u2002",NL="\u0118",DL="\u0119",IL="\u{1D53C}",RL="\u{1D556}",BL="\u22D5",PL="\u29E3",HL="\u2A71",FL="\u03B5",qL="\u0395",_L="\u03B5",$L="\u03F5",zL="\u2256",VL="\u2255",UL="\u2242",WL="\u2A96",jL="\u2A95",GL="\u2A75",KL="=",JL="\u2242",XL="\u225F",QL="\u21CC",YL="\u2261",ZL="\u2A78",eA="\u29E5",tA="\u2971",rA="\u2253",nA="\u212F",iA="\u2130",aA="\u2250",oA="\u2A73",sA="\u2242",lA="\u0397",uA="\u03B7",cA="\xD0",fA="\xF0",dA="\xCB",hA="\xEB",pA="\u20AC",vA="!",mA="\u2203",gA="\u2203",yA="\u2130",bA="\u2147",wA="\u2147",kA="\u2252",CA="\u0424",TA="\u0444",xA="\u2640",EA="\uFB03",SA="\uFB00",MA="\uFB04",OA="\u{1D509}",LA="\u{1D523}",AA="\uFB01",NA="\u25FC",DA="\u25AA",IA="fj",RA="\u266D",BA="\uFB02",PA="\u25B1",HA="\u0192",FA="\u{1D53D}",qA="\u{1D557}",_A="\u2200",$A="\u2200",zA="\u22D4",VA="\u2AD9",UA="\u2131",WA="\u2A0D",jA="\xBD",GA="\u2153",KA="\xBC",JA="\u2155",XA="\u2159",QA="\u215B",YA="\u2154",ZA="\u2156",eN="\xBE",tN="\u2157",rN="\u215C",nN="\u2158",iN="\u215A",aN="\u215D",oN="\u215E",sN="\u2044",lN="\u2322",uN="\u{1D4BB}",cN="\u2131",fN="\u01F5",dN="\u0393",hN="\u03B3",pN="\u03DC",vN="\u03DD",mN="\u2A86",gN="\u011E",yN="\u011F",bN="\u0122",wN="\u011C",kN="\u011D",CN="\u0413",TN="\u0433",xN="\u0120",EN="\u0121",SN="\u2265",MN="\u2267",ON="\u2A8C",LN="\u22DB",AN="\u2265",NN="\u2267",DN="\u2A7E",IN="\u2AA9",RN="\u2A7E",BN="\u2A80",PN="\u2A82",HN="\u2A84",FN="\u22DB\uFE00",qN="\u2A94",_N="\u{1D50A}",$N="\u{1D524}",zN="\u226B",VN="\u22D9",UN="\u22D9",WN="\u2137",jN="\u0403",GN="\u0453",KN="\u2AA5",JN="\u2277",XN="\u2A92",QN="\u2AA4",YN="\u2A8A",ZN="\u2A8A",eD="\u2A88",tD="\u2269",rD="\u2A88",nD="\u2269",iD="\u22E7",aD="\u{1D53E}",oD="\u{1D558}",sD="`",lD="\u2265",uD="\u22DB",cD="\u2267",fD="\u2AA2",dD="\u2277",hD="\u2A7E",pD="\u2273",vD="\u{1D4A2}",mD="\u210A",gD="\u2273",yD="\u2A8E",bD="\u2A90",wD="\u2AA7",kD="\u2A7A",CD=">",TD=">",xD="\u226B",ED="\u22D7",SD="\u2995",MD="\u2A7C",OD="\u2A86",LD="\u2978",AD="\u22D7",ND="\u22DB",DD="\u2A8C",ID="\u2277",RD="\u2273",BD="\u2269\uFE00",PD="\u2269\uFE00",HD="\u02C7",FD="\u200A",qD="\xBD",_D="\u210B",$D="\u042A",zD="\u044A",VD="\u2948",UD="\u2194",WD="\u21D4",jD="\u21AD",GD="^",KD="\u210F",JD="\u0124",XD="\u0125",QD="\u2665",YD="\u2665",ZD="\u2026",eI="\u22B9",tI="\u{1D525}",rI="\u210C",nI="\u210B",iI="\u2925",aI="\u2926",oI="\u21FF",sI="\u223B",lI="\u21A9",uI="\u21AA",cI="\u{1D559}",fI="\u210D",dI="\u2015",hI="\u2500",pI="\u{1D4BD}",vI="\u210B",mI="\u210F",gI="\u0126",yI="\u0127",bI="\u224E",wI="\u224F",kI="\u2043",CI="\u2010",TI="\xCD",xI="\xED",EI="\u2063",SI="\xCE",MI="\xEE",OI="\u0418",LI="\u0438",AI="\u0130",NI="\u0415",DI="\u0435",II="\xA1",RI="\u21D4",BI="\u{1D526}",PI="\u2111",HI="\xCC",FI="\xEC",qI="\u2148",_I="\u2A0C",$I="\u222D",zI="\u29DC",VI="\u2129",UI="\u0132",WI="\u0133",jI="\u012A",GI="\u012B",KI="\u2111",JI="\u2148",XI="\u2110",QI="\u2111",YI="\u0131",ZI="\u2111",eR="\u22B7",tR="\u01B5",rR="\u21D2",nR="\u2105",iR="\u221E",aR="\u29DD",oR="\u0131",sR="\u22BA",lR="\u222B",uR="\u222C",cR="\u2124",fR="\u222B",dR="\u22BA",hR="\u22C2",pR="\u2A17",vR="\u2A3C",mR="\u2063",gR="\u2062",yR="\u0401",bR="\u0451",wR="\u012E",kR="\u012F",CR="\u{1D540}",TR="\u{1D55A}",xR="\u0399",ER="\u03B9",SR="\u2A3C",MR="\xBF",OR="\u{1D4BE}",LR="\u2110",AR="\u2208",NR="\u22F5",DR="\u22F9",IR="\u22F4",RR="\u22F3",BR="\u2208",PR="\u2062",HR="\u0128",FR="\u0129",qR="\u0406",_R="\u0456",$R="\xCF",zR="\xEF",VR="\u0134",UR="\u0135",WR="\u0419",jR="\u0439",GR="\u{1D50D}",KR="\u{1D527}",JR="\u0237",XR="\u{1D541}",QR="\u{1D55B}",YR="\u{1D4A5}",ZR="\u{1D4BF}",eB="\u0408",tB="\u0458",rB="\u0404",nB="\u0454",iB="\u039A",aB="\u03BA",oB="\u03F0",sB="\u0136",lB="\u0137",uB="\u041A",cB="\u043A",fB="\u{1D50E}",dB="\u{1D528}",hB="\u0138",pB="\u0425",vB="\u0445",mB="\u040C",gB="\u045C",yB="\u{1D542}",bB="\u{1D55C}",wB="\u{1D4A6}",kB="\u{1D4C0}",CB="\u21DA",TB="\u0139",xB="\u013A",EB="\u29B4",SB="\u2112",MB="\u039B",OB="\u03BB",LB="\u27E8",AB="\u27EA",NB="\u2991",DB="\u27E8",IB="\u2A85",RB="\u2112",BB="\xAB",PB="\u21E4",HB="\u291F",FB="\u2190",qB="\u219E",_B="\u21D0",$B="\u291D",zB="\u21A9",VB="\u21AB",UB="\u2939",WB="\u2973",jB="\u21A2",GB="\u2919",KB="\u291B",JB="\u2AAB",XB="\u2AAD",QB="\u2AAD\uFE00",YB="\u290C",ZB="\u290E",eP="\u2772",tP="{",rP="[",nP="\u298B",iP="\u298F",aP="\u298D",oP="\u013D",sP="\u013E",lP="\u013B",uP="\u
17013C",cP="\u2308",fP="{",dP="\u041B",hP="\u043B",pP="\u2936",vP="\u201C",mP="\u201E",gP="\u2967",yP="\u294B",bP="\u21B2",wP="\u2264",kP="\u2266",CP="\u27E8",TP="\u21E4",xP="\u2190",EP="\u2190",SP="\u21D0",MP="\u21C6",OP="\u21A2",LP="\u2308",AP="\u27E6",NP="\u2961",DP="\u2959",IP="\u21C3",RP="\u230A",BP="\u21BD",PP="\u21BC",HP="\u21C7",FP="\u2194",qP="\u2194",_P="\u21D4",$P="\u21C6",zP="\u21CB",VP="\u21AD",UP="\u294E",WP="\u21A4",jP="\u22A3",GP="\u295A",KP="\u22CB",JP="\u29CF",XP="\u22B2",QP="\u22B4",YP="\u2951",ZP="\u2960",eH="\u2958",tH="\u21BF",rH="\u2952",nH="\u21BC",iH="\u2A8B",aH="\u22DA",oH="\u2264",sH="\u2266",lH="\u2A7D",uH="\u2AA8",cH="\u2A7D",fH="\u2A7F",dH="\u2A81",hH="\u2A83",pH="\u22DA\uFE00",vH="\u2A93",mH="\u2A85",gH="\u22D6",yH="\u22DA",bH="\u2A8B",wH="\u22DA",kH="\u2266",CH="\u2276",TH="\u2276",xH="\u2AA1",EH="\u2272",SH="\u2A7D",MH="\u2272",OH="\u297C",LH="\u230A",AH="\u{1D50F}",NH="\u{1D529}",DH="\u2276",IH="\u2A91",RH="\u2962",BH="\u21BD",PH="\u21BC",HH="\u296A",FH="\u2584",qH="\u0409",_H="\u0459",$H="\u21C7",zH="\u226A",VH="\u22D8",UH="\u231E",WH="\u21DA",jH="\u296B",GH="\u25FA",KH="\u013F",JH="\u0140",XH="\u23B0",QH="\u23B0",YH="\u2A89",ZH="\u2A89",eF="\u2A87",tF="\u2268",rF="\u2A87",nF="\u2268",iF="\u22E6",aF="\u27EC",oF="\u21FD",sF="\u27E6",lF="\u27F5",uF="\u27F5",cF="\u27F8",fF="\u27F7",dF="\u27F7",hF="\u27FA",pF="\u27FC",vF="\u27F6",mF="\u27F6",gF="\u27F9",yF="\u21AB",bF="\u21AC",wF="\u2985",kF="\u{1D543}",CF="\u{1D55D}",TF="\u2A2D",xF="\u2A34",EF="\u2217",SF="_",MF="\u2199",OF="\u2198",LF="\u25CA",AF="\u25CA",NF="\u29EB",DF="(",IF="\u2993",RF="\u21C6",BF="\u231F",PF="\u21CB",HF="\u296D",FF="\u200E",qF="\u22BF",_F="\u2039",$F="\u{1D4C1}",zF="\u2112",VF="\u21B0",UF="\u21B0",WF="\u2272",jF="\u2A8D",GF="\u2A8F",KF="[",JF="\u2018",XF="\u201A",QF="\u0141",YF="\u0142",ZF="\u2AA6",eq="\u2A79",tq="<",rq="<",nq="\u226A",iq="\u22D6",aq="\u22CB",oq="\u22C9",sq="\u2976",lq="\u2A7B",uq="\u25C3",cq="\u22B4",fq="\u25C2",dq="\u2996",hq="\u294A",pq="\u2966",vq="\u2268\uFE00",mq="\u2268\uFE00",gq="\xAF",yq="\u2642",bq="\u2720",wq="\u2720",kq="\u21A6",Cq="\u21A6",Tq="\u21A7",xq="\u21A4",Eq="\u21A5",Sq="\u25AE",Mq="\u2A29",Oq="\u041C",Lq="\u043C",Aq="\u2014",Nq="\u223A",Dq="\u2221",Iq="\u205F",Rq="\u2133",Bq="\u{1D510}",Pq="\u{1D52A}",Hq="\u2127",Fq="\xB5",qq="*",_q="\u2AF0",$q="\u2223",zq="\xB7",Vq="\u229F",Uq="\u2212",Wq="\u2238",jq="\u2A2A",Gq="\u2213",Kq="\u2ADB",Jq="\u2026",Xq="\u2213",Qq="\u22A7",Yq="\u{1D544}",Zq="\u{1D55E}",e_="\u2213",t_="\u{1D4C2}",r_="\u2133",n_="\u223E",i_="\u039C",a_="\u03BC",o_="\u22B8",s_="\u22B8",l_="\u2207",u_="\u0143",c_="\u0144",f_="\u2220\u20D2",d_="\u2249",h_="\u2A70\u0338",p_="\u224B\u0338",v_="\u0149",m_="\u2249",g_="\u266E",y_="\u2115",b_="\u266E",w_="\xA0",k_="\u224E\u0338",C_="\u224F\u0338",T_="\u2A43",x_="\u0147",E_="\u0148",S_="\u0145",M_="\u0146",O_="\u2247",L_="\u2A6D\u0338",A_="\u2A42",N_="\u041D",D_="\u043D",I_="\u2013",R_="\u2924",B_="\u2197",P_="\u21D7",H_="\u2197",F_="\u2260",q_="\u2250\u0338",__="\u200B",$_="\u200B",z_="\u200B",V_="\u200B",U_="\u2262",W_="\u2928",j_="\u2242\u0338",G_="\u226B",K_="\u226A",J_=`
18`,X_="\u2204",Q_="\u2204",Y_="\u{1D511}",Z_="\u{1D52B}",e$="\u2267\u0338",t$="\u2271",r$="\u2271",n$="\u2267\u0338",i$="\u2A7E\u0338",a$="\u2A7E\u0338",o$="\u22D9\u0338",s$="\u2275",l$="\u226B\u20D2",u$="\u226F",c$="\u226F",f$="\u226B\u0338",d$="\u21AE",h$="\u21CE",p$="\u2AF2",v$="\u220B",m$="\u22FC",g$="\u22FA",y$="\u220B",b$="\u040A",w$="\u045A",k$="\u219A",C$="\u21CD",T$="\u2025",x$="\u2266\u0338",E$="\u2270",S$="\u219A",M$="\u21CD",O$="\u21AE",L$="\u21CE",A$="\u2270",N$="\u2266\u0338",D$="\u2A7D\u0338",I$="\u2A7D\u0338",R$="\u226E",B$="\u22D8\u0338",P$="\u2274",H$="\u226A\u20D2",F$="\u226E",q$="\u22EA",_$="\u22EC",$$="\u226A\u0338",z$="\u2224",V$="\u2060",U$="\xA0",W$="\u{1D55F}",j$="\u2115",G$="\u2AEC",K$="\xAC",J$="\u2262",X$="\u226D",Q$="\u2226",Y$="\u2209",Z$="\u2260",ez="\u2242\u0338",tz="\u2204",rz="\u226F",nz="\u2271",iz="\u2267\u0338",az="\u226B\u0338",oz="\u2279",sz="\u2A7E\u0338",lz="\u2275",uz="\u224E\u0338",cz="\u224F\u0338",fz="\u2209",dz="\u22F5\u0338",hz="\u22F9\u0338",pz="\u2209",vz="\u22F7",mz="\u22F6",gz="\u29CF\u0338",yz="\u22EA",bz="\u22EC",wz="\u226E",kz="\u2270",Cz="\u2278",Tz="\u226A\u0338",xz="\u2A7D\u0338",Ez="\u2274",Sz="\u2AA2\u0338",Mz="\u2AA1\u0338",Oz="\u220C",Lz="\u220C",Az="\u22FE",Nz="\u22FD",Dz="\u2280",Iz="\u2AAF\u0338",Rz="\u22E0",Bz="\u220C",Pz="\u29D0\u0338",Hz="\u22EB",Fz="\u22ED",qz="\u228F\u0338",_z="\u22E2",$z="\u2290\u0338",zz="\u22E3",Vz="\u2282\u20D2",Uz="\u2288",Wz="\u2281",jz="\u2AB0\u0338",Gz="\u22E1",Kz="\u227F\u0338",Jz="\u2283\u20D2",Xz="\u2289",Qz="\u2241",Yz="\u2244",Zz="\u2247",eV="\u2249",tV="\u2224",rV="\u2226",nV="\u2226",iV="\u2AFD\u20E5",aV="\u2202\u
180338",oV="\u2A14",sV="\u2280",lV="\u22E0",uV="\u2280",cV="\u2AAF\u0338",fV="\u2AAF\u0338",dV="\u2933\u0338",hV="\u219B",pV="\u21CF",vV="\u219D\u0338",mV="\u219B",gV="\u21CF",yV="\u22EB",bV="\u22ED",wV="\u2281",kV="\u22E1",CV="\u2AB0\u0338",TV="\u{1D4A9}",xV="\u{1D4C3}",EV="\u2224",SV="\u2226",MV="\u2241",OV="\u2244",LV="\u2244",AV="\u2224",NV="\u2226",DV="\u22E2",IV="\u22E3",RV="\u2284",BV="\u2AC5\u0338",PV="\u2288",HV="\u2282\u20D2",FV="\u2288",qV="\u2AC5\u0338",_V="\u2281",$V="\u2AB0\u0338",zV="\u2285",VV="\u2AC6\u0338",UV="\u2289",WV="\u2283\u20D2",jV="\u2289",GV="\u2AC6\u0338",KV="\u2279",JV="\xD1",XV="\xF1",QV="\u2278",YV="\u22EA",ZV="\u22EC",e2="\u22EB",t2="\u22ED",r2="\u039D",n2="\u03BD",i2="#",a2="\u2116",o2="\u2007",s2="\u224D\u20D2",l2="\u22AC",u2="\u22AD",c2="\u22AE",f2="\u22AF",d2="\u2265\u20D2",h2=">\u20D2",p2="\u2904",v2="\u29DE",m2="\u2902",g2="\u2264\u20D2",y2="<\u20D2",b2="\u22B4\u20D2",w2="\u2903",k2="\u22B5\u20D2",C2="\u223C\u20D2",T2="\u2923",x2="\u2196",E2="\u21D6",S2="\u2196",M2="\u2927",O2="\xD3",L2="\xF3",A2="\u229B",N2="\xD4",D2="\xF4",I2="\u229A",R2="\u041E",B2="\u043E",P2="\u229D",H2="\u0150",F2="\u0151",q2="\u2A38",_2="\u2299",$2="\u29BC",z2="\u0152",V2="\u0153",U2="\u29BF",W2="\u{1D512}",j2="\u{1D52C}",G2="\u02DB",K2="\xD2",J2="\xF2",X2="\u29C1",Q2="\u29B5",Y2="\u03A9",Z2="\u222E",eU="\u21BA",tU="\u29BE",rU="\u29BB",nU="\u203E",iU="\u29C0",aU="\u014C",oU="\u014D",sU="\u03A9",lU="\u03C9",uU="\u039F",cU="\u03BF",fU="\u29B6",dU="\u2296",hU="\u{1D546}",pU="\u{1D560}",vU="\u29B7",mU="\u201C",gU="\u2018",yU="\u29B9",bU="\u2295",wU="\u21BB",kU="\u2A54",CU="\u2228",TU="\u2A5D",xU="\u2134",EU="\u2134",SU="\xAA",MU="\xBA",OU="\u22B6",LU="\u2A56",AU="\u2A57",NU="\u2A5B",DU="\u24C8",IU="\u{1D4AA}",RU="\u2134",BU="\xD8",PU="\xF8",HU="\u2298",FU="\xD5",qU="\xF5",_U="\u2A36",$U="\u2A37",zU="\u2297",VU="\xD6",UU="\xF6",WU="\u233D",jU="\u203E",GU="\u23DE",KU="\u23B4",JU="\u23DC",XU="\xB6",QU="\u2225",YU="\u2225",ZU="\u2AF3",eW="\u2AFD",tW="\u2202",rW="\u2202",nW="\u041F",iW="\u043F",aW="%",oW=".",sW="\u2030",lW="\u22A5",uW="\u2031",cW="\u{1D513}",fW="\u{1D52D}",dW="\u03A6",hW="\u03C6",pW="\u03D5",vW="\u2133",mW="\u260E",gW="\u03A0",yW="\u03C0",bW="\u22D4",wW="\u03D6",kW="\u210F",CW="\u210E",TW="\u210F",xW="\u2A23",EW="\u229E",SW="\u2A22",MW="+",OW="\u2214",LW="\u2A25",AW="\u2A72",NW="\xB1",DW="\xB1",IW="\u2A26",RW="\u2A27",BW="\xB1",PW="\u210C",HW="\u2A15",FW="\u{1D561}",qW="\u2119",_W="\xA3",$W="\u2AB7",zW="\u2ABB",VW="\u227A",UW="\u227C",WW="\u2AB7",jW="\u227A",GW="\u227C",KW="\u227A",JW="\u2AAF",XW="\u227C",QW="\u227E",YW="\u2AAF",ZW="\u2AB9",ej="\u2AB5",tj="\u22E8",rj="\u2AAF",nj="\u2AB3",ij="\u227E",aj="\u2032",oj="\u2033",sj="\u2119",lj="\u2AB9",uj="\u2AB5",cj="\u22E8",fj="\u220F",dj="\u220F",hj="\u232E",pj="\u2312",vj="\u2313",mj="\u221D",gj="\u221D",yj="\u2237",bj="\u221D",wj="\u227E",kj="\u22B0",Cj="\u{1D4AB}",Tj="\u{1D4C5}",xj="\u03A8",Ej="\u03C8",Sj="\u2008",Mj="\u{1D514}",Oj="\u{1D52E}",Lj="\u2A0C",Aj="\u{1D562}",Nj="\u211A",Dj="\u2057",Ij="\u{1D4AC}",Rj="\u{1D4C6}",Bj="\u210D",Pj="\u2A16",Hj="?",Fj="\u225F",qj='"',_j='"',$j="\u21DB",zj="\u223D\u0331",Vj="\u0154",Uj="\u0155",Wj="\u221A",jj="\u29B3",Gj="\u27E9",Kj="\u27EB",Jj="\u2992",Xj="\u29A5",Qj="\u27E9",Yj="\xBB",Zj="\u2975",e3="\u21E5",t3="\u2920",r3="\u2933",n3="\u2192",i3="\u21A0",a3="\u21D2",o3="\u291E",s3="\u21AA",l3="\u21AC",u3="\u2945",c3="\u2974",f3="\u2916",d3="\u21A3",h3="\u219D",p3="\u291A",v3="\u291C",m3="\u2236",g3="\u211A",y3="\u290D",b3="\u290F",w3="\u2910",k3="\u2773",C3="}",T3="]",x3="\u298C",E3="\u298E",S3="\u2990",M3="\u0158",O3="\u0159",L3="\u0156",A3="\u0157",N3="\u2309",D3="}",I3="\u0420",R3="\u0440",B3="\u2937",P3="\u2969",H3="\u201D",F3="\u201D",q3="\u21B3",_3="\u211C",$3="\u211B",z3="\u211C",V3="\u211D",U3="\u211C",W3="\u25AD",j3="\xAE",G3="\xAE",K3="\u220B",J3="\u21CB",X3="\u296F",Q3="\u297D",Y3="\u230B",Z3="\u{1D52F}",eG="\u211C",tG="\u2964",rG="\u21C1",nG="\u21C0",iG="\u296C",aG="\u03A1",oG="\u03C1",sG="\u03F1",lG="\u27E9",uG="\u21E
185",cG="\u2192",fG="\u2192",dG="\u21D2",hG="\u21C4",pG="\u21A3",vG="\u2309",mG="\u27E7",gG="\u295D",yG="\u2955",bG="\u21C2",wG="\u230B",kG="\u21C1",CG="\u21C0",TG="\u21C4",xG="\u21CC",EG="\u21C9",SG="\u219D",MG="\u21A6",OG="\u22A2",LG="\u295B",AG="\u22CC",NG="\u29D0",DG="\u22B3",IG="\u22B5",RG="\u294F",BG="\u295C",PG="\u2954",HG="\u21BE",FG="\u2953",qG="\u21C0",_G="\u02DA",$G="\u2253",zG="\u21C4",VG="\u21CC",UG="\u200F",WG="\u23B1",jG="\u23B1",GG="\u2AEE",KG="\u27ED",JG="\u21FE",XG="\u27E7",QG="\u2986",YG="\u{1D563}",ZG="\u211D",e4="\u2A2E",t4="\u2A35",r4="\u2970",n4=")",i4="\u2994",a4="\u2A12",o4="\u21C9",s4="\u21DB",l4="\u203A",u4="\u{1D4C7}",c4="\u211B",f4="\u21B1",d4="\u21B1",h4="]",p4="\u2019",v4="\u2019",m4="\u22CC",g4="\u22CA",y4="\u25B9",b4="\u22B5",w4="\u25B8",k4="\u29CE",C4="\u29F4",T4="\u2968",x4="\u211E",E4="\u015A",S4="\u015B",M4="\u201A",O4="\u2AB8",L4="\u0160",A4="\u0161",N4="\u2ABC",D4="\u227B",I4="\u227D",R4="\u2AB0",B4="\u2AB4",P4="\u015E",H4="\u015F",F4="\u015C",q4="\u015D",_4="\u2ABA",$4="\u2AB6",z4="\u22E9",V4="\u2A13",U4="\u227F",W4="\u0421",j4="\u0441",G4="\u22A1",K4="\u22C5",J4="\u2A66",X4="\u2925",Q4="\u2198",Y4="\u21D8",Z4="\u2198",eK="\xA7",tK=";",rK="\u2929",nK="\u2216",iK="\u2216",aK="\u2736",oK="\u{1D516}",sK="\u{1D530}",lK="\u2322",uK="\u266F",cK="\u0429",fK="\u0449",dK="\u0428",hK="\u0448",pK="\u2193",vK="\u2190",mK="\u2223",gK="\u2225",yK="\u2192",bK="\u2191",wK="\xAD",kK="\u03A3",CK="\u03C3",TK="\u03C2",xK="\u03C2",EK="\u223C",SK="\u2A6A",MK="\u2243",OK="\u2243",LK="\u2A9E",AK="\u2AA0",NK="\u2A9D",DK="\u2A9F",IK="\u2246",RK="\u2A24",BK="\u2972",PK="\u2190",HK="\u2218",FK="\u2216",qK="\u2A33",_K="\u29E4",$K="\u2223",zK="\u2323",VK="\u2AAA",UK="\u2AAC",WK="\u2AAC\uFE00",jK="\u042C",GK="\u044C",KK="\u233F",JK="\u29C4",XK="/",QK="\u{1D54A}",YK="\u{1D564}",ZK="\u2660",e5="\u2660",t5="\u2225",r5="\u2293",n5="\u2293\uFE00",i5="\u2294",a5="\u2294\uFE00",o5="\u221A",s5="\u228F",l5="\u2291",u5="\u228F",c5="\u2291",f5="\u2290",d5="\u2292",h5="\u2290",p5="\u2292",v5="\u25A1",m5="\u25A1",g5="\u2293",y5="\u228F",b5="\u2291",w5="\u2290",k5="\u2292",C5="\u2294",T5="\u25AA",x5="\u25A1",E5="\u25AA",S5="\u2192",M5="\u{1D4AE}",O5="\u{1D4C8}",L5="\u2216",A5="\u2323",N5="\u22C6",D5="\u22C6",I5="\u2606",R5="\u2605",B5="\u03F5",P5="\u03D5",H5="\xAF",F5="\u2282",q5="\u22D0",_5="\u2ABD",$5="\u2AC5",z5="\u2286",V5="\u2AC3",U5="\u2AC1",W5="\u2ACB",j5="\u228A",G5="\u2ABF",K5="\u2979",J5="\u2282",X5="\u22D0",Q5="\u2286",Y5="\u2AC5",Z5="\u2286",e8="\u228A",t8="\u2ACB",r8="\u2AC7",n8="\u2AD5",i8="\u2AD3",a8="\u2AB8",o8="\u227B",s8="\u227D",l8="\u227B",u8="\u2AB0",c8="\u227D",f8="\u227F",d8="\u2AB0",h8="\u2ABA",p8="\u2AB6",v8="\u22E9",m8="\u227F",g8="\u220B",y8="\u2211",b8="\u2211",w8="\u266A",k8="\xB9",C8="\xB2",T8="\xB3",x8="\u2283",E8="\u22D1",S8="\u2ABE",M8="\u2AD8",O8="\u2AC6",L8="\u2287",A8="\u2AC4",N8="\u2283",D8="\u2287",I8="\u27C9",R8="\u2AD7",B8="\u297B",P8="\u2AC2",H8="\u2ACC",F8="\u228B",q8="\u2AC0",_8="\u2283",$8="\u22D1",z8="\u2287",V8="\u2AC6",U8="\u228B",W8="\u2ACC",j8="\u2AC8",G8="\u2AD4",K8="\u2AD6",J8="\u2926",X8="\u2199",Q8="\u21D9",Y8="\u2199",Z8="\u292A",eJ="\xDF",tJ="	",rJ="\u2316",nJ="\u03A4",iJ="\u03C4",aJ="\u23B4",oJ="\u0164",sJ="\u0165",lJ="\u0162",uJ="\u0163",cJ="\u0422",fJ="\u0442",dJ="\u20DB",hJ="\u2315",pJ="\u{1D517}",vJ="\u{1D531}
18",mJ="\u2234",gJ="\u2234",yJ="\u2234",bJ="\u0398",wJ="\u03B8",kJ="\u03D1",CJ="\u03D1",TJ="\u2248",xJ="\u223C",EJ="\u205F\u200A",SJ="\u2009",MJ="\u2009",OJ="\u2248",LJ="\u223C",AJ="\xDE",NJ="\xFE",DJ="\u02DC",IJ="\u223C",RJ="\u2243",BJ="\u2245",PJ="\u2248",HJ="\u2A31",FJ="\u22A0",qJ="\xD7",_J="\u2A30",$J="\u222D",zJ="\u2928",VJ="\u2336",UJ="\u2AF1",WJ="\u22A4",jJ="\u{1D54B}",GJ="\u{1D565}",KJ="\u2ADA",JJ="\u2929",XJ="\u2034",QJ="\u2122",YJ="\u2122",ZJ="\u25B5",e6="\u25BF",t6="\u25C3",r6="\u22B4",n6="\u225C",i6="\u25B9",a6="\u22B5",o6="\u25EC",s6="\u225C",l6="\u2A3A",u6="\u20DB",c6="\u2A39",f6="\u29CD",d6="\u2A3B",h6="\u23E2",p6="\u{1D4AF}",v6="\u{1D4C9}",m6="\u0426",g6="\u0446",y6="\u040B",b6="\u045B",w6="\u0166",k6="\u0167",C6="\u226C",T6="\u219E",x6="\u21A0",E6="\xDA",S6="\xFA",M6="\u2191",O6="\u219F",L6="\u21D1",A6="\u2949",N6="\u040E",D6="\u045E",I6="\u016C",R6="\u016D",B6="\xDB",P6="\xFB",H6="\u0423",F6="\u0443",q6="\u21C5",_6="\u0170",$6="\u0171",z6="\u296E",V6="\u297E",U6="\u{1D518}",W6="\u{1D532}",j6="\xD9",G6="\xF9",K6="\u2963",J6="\u21BF",X6="\u21BE",Q6="\u2580",Y6="\u231C",Z6="\u231C",e9="\u230F",t9="\u25F8",r9="\u016A",n9="\u016B",i9="\xA8",a9="_",o9="\u23DF",s9="\u23B5",l9="\u23DD",u9="\u22C3",c9="\u228E",f9="\u0172",d9="\u0173",h9="\u{1D54C}",p9="\u{1D566}",v9="\u2912",m9="\u2191",g9="\u2191",y9="\u21D1",b9="\u21C5",w9="\u2195",k9="\u2195",C9="\u21D5",T9="\u296E",x9="\u21BF",E9="\u21BE",S9="\u228E",M9="\u2196",O9="\u2197",L9="\u03C5",A9="\u03D2",N9="\u03D2",D9="\u03A5",I9="\u03C5",R9="\u21A5",B9="\u22A5",P9="\u21C8",H9="\u231D",F9="\u231D",q9="\u230E",_9="\u016E",$9="\u016F",z9="\u25F9",V9="\u{1D4B0}",U9="\u{1D4CA}",W9="\u22F0",j9="\u0168",G9="\u0169",K9="\u25B5",J9="\u25B4",X9="\u21C8",Q9="\xDC",Y9="\xFC",Z9="\u29A7",e7="\u299C",t7="\u03F5",r7="\u03F0",n7="\u2205",i7="\u03D5",a7="\u03D6",o7="\u221D",s7="\u2195",l7="\u21D5",u7="\u03F1",c7="\u03C2",f7="\u228A\uFE00",d7="\u2ACB\uFE00",h7="\u228B\uFE00",p7="\u2ACC\uFE00",v7="\u03D1",m7="\u22B2",g7="\u22B3",y7="\u2AE8",b7="\u2AEB",w7="\u2AE9",k7="\u0412",C7="\u0432",T7="\u22A2",x7="\u22A8",E7="\u22A9",S7="\u22AB",M7="\u2AE6",O7="\u22BB",L7="\u2228",A7="\u22C1",N7="\u225A",D7="\u22EE",I7="|",R7="\u2016",B7="|",P7="\u2016",H7="\u2223",F7="|",q7="\u2758",_7="\u2240",$7="\u200A",z7="\u{1D519}",V7="\u{1D533}",U7="\u22B2",W7="\u2282\u20D2",j7="\u2283\u20D2",G7="\u{1D54D}",K7="\u{1D567}",J7="\u221D",X7="\u22B3",Q7="\u{1D4B1}",Y7="\u{1D4CB}",Z7="\u2ACB\uFE00",eX="\u228A\uFE00",tX="\u2ACC\uFE00",rX="\u228B\uFE00",nX="\u22AA",iX="\u299A",aX="\u0174",oX="\u0175",sX="\u2A5F",lX="\u2227",uX="\u22C0",cX="\u2259",fX="\u2118",dX="\u{1D51A}",hX="\u{1D534}",pX="\u{1D54E}",vX="\u{1D568}",mX="\u2118",gX="\u2240",yX="\u2240",bX="\u{1D4B2}",wX="\u{1D4CC}",kX="\u22C2",CX="\u25EF",TX="\u22C3",xX="\u25BD",EX="\u{1D51B}",SX="\u{1D535}",MX="\u27F7",OX="\u27FA",LX="\u039E",AX="\u03BE",NX="\u27F5",DX="\u27F8",IX="\u27FC",RX="\u22FB",BX="\u2A00",PX="\u{1D54F}",HX="\u{1D569}",FX="\u2A01",qX="\u2A02",_X="\u27F6",$X="\u27F9",zX="\u{1D4B3}",VX="\u{1D4CD}",UX="\u2A06",WX="\u2A04",jX="\u25B3",GX="\u22C1",KX="\u22C0",JX="\xDD",XX="\xFD",QX="\u042F",YX="\u044F",ZX="\u0176",eQ="\u0177",tQ="\u042B",rQ="\u044B",nQ="\xA5",iQ="\u{1D51C}
18",aQ="\u{1D536}",oQ="\u0407",sQ="\u0457",lQ="\u{1D550}",uQ="\u{1D56A}",cQ="\u{1D4B4}",fQ="\u{1D4CE}",dQ="\u042E",hQ="\u044E",pQ="\xFF",vQ="\u0178",mQ="\u0179",gQ="\u017A",yQ="\u017D",bQ="\u017E",wQ="\u0417",kQ="\u0437",CQ="\u017B",TQ="\u017C",xQ="\u2128",EQ="\u200B",SQ="\u0396",MQ="\u03B6",OQ="\u{1D537}",LQ="\u2128",AQ="\u0416",NQ="\u0436",DQ="\u21DD",IQ="\u{1D56B}",RQ="\u2124",BQ="\u{1D4B5}",PQ="\u{1D4CF}",HQ="\u200D",FQ="\u200C",Sp={Aacute:CC,aacute:TC,Abreve:xC,abreve:EC,ac:SC,acd:MC,acE:OC,Acirc:LC,acirc:AC,acute:NC,Acy:DC,acy:IC,AElig:RC,aelig:BC,af:PC,Afr:HC,afr:FC,Agrave:qC,agrave:_C,alefsym:$C,aleph:zC,Alpha:VC,alpha:UC,Amacr:WC,amacr:jC,amalg:GC,amp:KC,AMP:JC,andand:XC,And:QC,and:YC,andd:ZC,andslope:e0,andv:t0,ang:r0,ange:n0,angle:i0,angmsdaa:a0,angmsdab:o0,angmsdac:s0,angmsdad:l0,angmsdae:u0,angmsdaf:c0,angmsdag:f0,angmsdah:d0,angmsd:h0,angrt:p0,angrtvb:v0,angrtvbd:m0,angsph:g0,angst:y0,angzarr:b0,Aogon:w0,aogon:k0,Aopf:C0,aopf:T0,apacir:x0,ap:E0,apE:S0,ape:M0,apid:O0,apos:L0,ApplyFunction:A0,approx:N0,approxeq:D0,Aring:I0,aring:R0,Ascr:B0,ascr:P0,Assign:H0,ast:F0,asymp:q0,asympeq:_0,Atilde:$0,atilde:z0,Auml:V0,auml:U0,awconint:W0,awint:j0,backcong:G0,backepsilon:K0,backprime:J0,backsim:X0,backsimeq:Q0,Backslash:Y0,Barv:Z0,barvee:eT,barwed:tT,Barwed:rT,barwedge:nT,bbrk:iT,bbrktbrk:aT,bcong:oT,Bcy:sT,bcy:lT,bdquo:uT,becaus:cT,because:fT,Because:dT,bemptyv:hT,bepsi:pT,bernou:vT,Bernoullis:mT,Beta:gT,beta:yT,beth:bT,between:wT,Bfr:kT,bfr:CT,bigcap:TT,bigcirc:xT,bigcup:ET,bigodot:ST,bigoplus:MT,bigotimes:OT,bigsqcup:LT,bigstar:AT,bigtriangledown:NT,bigtriangleup:DT,biguplus:IT,bigvee:RT,bigwedge:BT,bkarow:PT,blacklozenge:HT,blacksquare:FT,blacktriangle:qT,blacktriangledown:_T,blacktriangleleft:$T,blacktriangleright:zT,blank:VT,blk12:UT,blk14:WT,blk34:jT,block:GT,bne:KT,bnequiv:JT,bNot:XT,bnot:QT,Bopf:YT,bopf:ZT,bot:e1,bottom:t1,bowtie:r1,boxbox:n1,boxdl:i1,boxdL:a1,boxDl:o1,boxDL:s1,boxdr:l1,boxdR:u1,boxDr:c1,boxDR:f1,boxh:d1,boxH:h1,boxhd:p1,boxHd:v1,boxhD:m1,boxHD:g1,boxhu:y1,boxHu:b1,boxhU:w1,boxHU:k1,boxminus:C1,boxplus:T1,boxtimes:x1,boxul:E1,boxuL:S1,boxUl:M1,boxUL:O1,boxur:L1,boxuR:A1,boxUr:N1,boxUR:D1,boxv:I1,boxV:R1,boxvh:B1,boxvH:P1,boxVh:H1,boxVH:F1,boxvl:q1,boxvL:_1,boxVl:$1,boxVL:z1,boxvr:V1,boxvR:U1,boxVr:W1,boxVR:j1,bprime:G1,breve:K1,Breve:J1,brvbar:X1,bscr:Q1,Bscr:Y1,bsemi:Z1,bsim:ex,bsime:tx,bsolb:rx,bsol:nx,bsolhsub:ix,bull:ax,bullet:ox,bump:sx,bumpE:lx,bumpe:ux,Bumpeq:cx,bumpeq:fx,Cacute:dx,cacute:hx,capand:px,capbrcup:vx,capcap:mx,cap:gx,Cap:yx,capcup:bx,capdot:wx,CapitalDifferentialD:kx,caps:Cx,caret:Tx,caron:xx,Cayleys:Ex,ccaps:Sx,Ccaron:Mx,ccaron:Ox,Ccedil:Lx,ccedil:Ax,Ccirc:Nx,ccirc:Dx,Cconint:Ix,ccups:Rx,ccupssm:Bx,Cdot:Px,cdot:Hx,cedil:Fx,Cedilla:qx,cemptyv:_x,cent:$x,centerdot:zx,CenterDot:Vx,cfr:Ux,Cfr:Wx,CHcy:jx,chcy:Gx,check:Kx,checkmark:Jx,Chi:Xx,chi:Qx,circ:Yx,circeq:Zx,circlearrowleft:eE,circlearrowright:tE,circledast:rE,circledcirc:nE,circleddash:iE,CircleDot:aE,circledR:oE,circledS:sE,CircleMinus:lE,CirclePlus:uE,CircleTimes:cE,cir:fE,cirE:dE,cire:hE,cirfnint:pE,cirmid:vE,cirscir:mE,ClockwiseContourIntegral:gE,CloseCurlyDoubleQuote:yE,CloseCurlyQuote:bE,clubs:wE,clubsuit:kE,colon:CE,Colon:TE,Colone:xE,colone:EE,coloneq:SE,comma:ME,commat:OE,comp:LE,compfn:AE,complement:NE,complexes:DE,cong:IE,congdot:RE,Congruent:BE,conint:PE,Conint:HE,ContourIntegral:FE,copf:qE,Copf:_E,coprod:$E,Coproduct:zE,copy:VE,COPY:UE,copysr:WE,CounterClockwiseContourIntegral:jE,crarr:GE,cross:KE,Cross:JE,Cscr:XE,cscr:QE,csub:YE,csube:ZE,csup:eS,csupe:tS,ctdot:rS,cudarrl:nS,cudarrr:iS,cuepr:aS,cuesc:oS,cularr:sS,cularrp:lS,cupbrcap:uS,cupcap:cS,CupCap:fS,cup:dS,Cup:hS,cupcup:pS,cupdot:vS,cupor:mS,cups:gS,curarr:yS,curarrm:bS,curlyeqprec:wS,curlyeqsucc:kS,curlyvee:CS,curlywedge:TS,curren:xS,curvearrowleft:ES,curvearrowright:SS,cuvee:MS,cuwed:OS,cwconint:LS,cwint:AS,cylcty:NS,dagger:DS,Dagger:IS,daleth:RS,darr:BS,Darr:PS,dArr:HS,dash:FS,Dashv:qS,dashv:_S,dbkarow:$S,dblac:zS,Dcaron:VS,dcaron:US,Dcy:WS,dcy:jS,ddagger:GS,ddarr:KS,DD:JS,dd:XS,DDotrahd:QS,ddotseq:YS,deg:ZS,Del:eM,Delta:tM,delta:rM,demptyv:nM,dfisht:iM,Dfr:aM,dfr:oM,dHar:sM,dharl:lM,dharr:uM,DiacriticalAcute:cM,DiacriticalDot:fM,DiacriticalDoubleAcute:dM,DiacriticalGrave:hM,DiacriticalTilde:pM,diam:vM,diamond:mM,Diamond:gM,diamondsuit:yM,diams:bM,die:wM,DifferentialD:kM,digamma:CM,disin:TM,div:xM,divide:EM,divideontimes:SM,divonx:MM,DJcy:OM,djcy:LM,dlcorn:AM,dlcrop:NM,dollar:DM,Dopf:IM,dopf:RM,Dot:BM,dot:PM,DotDot:HM,doteq:FM,doteqdot:qM,DotEqual:_M,dotminus:$M,dotplus:zM,dotsquare:VM,doublebarwedge:UM,DoubleContourIntegral:WM,DoubleDot:jM,DoubleDownArrow:GM,DoubleLeftArrow:KM,DoubleLeftRightArrow:JM,DoubleLeftTee:XM,DoubleLongLeftArrow:QM,DoubleLongLeftRightArrow:YM,DoubleLongRightArrow:ZM,DoubleRightArrow:eO,DoubleRightTee:tO,DoubleUpArrow:rO,DoubleUpDownArrow:nO,DoubleVerticalBar:iO,DownArrowBar:aO,downarrow:oO,DownArrow:sO,Downarrow:lO,DownArrowUpArrow:uO,DownBreve:cO,downdownarrows:fO,downharpoonleft:dO,downharpoonright:hO,DownLeftRightVector:pO,DownLeftTeeVector:vO,DownLeftVectorBar:mO,DownLeftVector:gO,DownRightTeeVector:yO,DownRightVectorBar:bO,DownRightVector:wO,DownTeeArrow:kO,DownTee:CO,drbkarow:TO,drcorn:xO,drcrop:EO,Dscr:SO,dscr:MO,DScy:OO,dscy:LO,dsol:AO,Dstrok:NO,dstrok:DO,dtdot:IO,dtri:RO,dtrif:BO,duarr:PO,duhar:HO,dwangle:FO,DZcy:qO,dzcy:_O,dzigrarr:$O,Eacute:zO,eacute:VO,easter:UO,Ecaron:WO,ecaron:jO,Ecirc:GO,ecirc:KO,ecir:JO,ecolon:XO,Ecy:QO,ecy:YO,eDDot:ZO,Edot:eL,edot:tL,eDot:rL,ee:nL,efDot:iL,Efr:aL,efr:oL,eg:sL,Egrave:lL,egrave:uL,egs:cL,egsdot:fL,el:dL,Element:hL,elinters:pL,ell:vL,els:mL,elsdot:gL,Emacr:yL,emacr:bL,empty:wL,emptyset:kL,EmptySmallSquare:CL,emptyv:TL,EmptyVerySmallSquare:xL,emsp13:EL,emsp14:SL,emsp:ML,ENG:OL,eng:LL,ensp:AL,Eogon:NL,eogon:DL,Eopf:IL,eopf:RL,epar:BL,eparsl:PL,eplus:HL,epsi:FL,Epsilon:qL,epsilon:_L,epsiv:$L,eqcirc:zL,eqcolon:VL,eqsim:UL,eqslantgtr:WL,eqslantless:jL,Equal:GL,equals:KL,EqualTilde:JL,equest:XL,Equilibrium:QL,equiv:YL,equivDD:ZL,eqvparsl:eA,erarr:tA,erDot:rA,escr:nA,Escr:iA,esdot:aA,Esim:oA,esim:sA,Eta:lA,eta:uA,ETH:cA,eth:fA,Euml:dA,euml:hA,euro:pA,excl:vA,exist:mA,Exists:gA,expectation:yA,exponentiale:bA,ExponentialE:wA,fallingdotseq:kA,Fcy:CA,fcy:TA,female:xA,ffilig:EA,fflig:SA,ffllig:MA,Ffr:OA,ffr:LA,filig:AA,FilledSmallSquare:NA,FilledVerySmallSquare:DA,fjlig:IA,flat:RA,fllig:BA,fltns:PA,fnof:HA,Fopf:FA,fo
18pf:qA,forall:_A,ForAll:$A,fork:zA,forkv:VA,Fouriertrf:UA,fpartint:WA,frac12:jA,frac13:GA,frac14:KA,frac15:JA,frac16:XA,frac18:QA,frac23:YA,frac25:ZA,frac34:eN,frac35:tN,frac38:rN,frac45:nN,frac56:iN,frac58:aN,frac78:oN,frasl:sN,frown:lN,fscr:uN,Fscr:cN,gacute:fN,Gamma:dN,gamma:hN,Gammad:pN,gammad:vN,gap:mN,Gbreve:gN,gbreve:yN,Gcedil:bN,Gcirc:wN,gcirc:kN,Gcy:CN,gcy:TN,Gdot:xN,gdot:EN,ge:SN,gE:MN,gEl:ON,gel:LN,geq:AN,geqq:NN,geqslant:DN,gescc:IN,ges:RN,gesdot:BN,gesdoto:PN,gesdotol:HN,gesl:FN,gesles:qN,Gfr:_N,gfr:$N,gg:zN,Gg:VN,ggg:UN,gimel:WN,GJcy:jN,gjcy:GN,gla:KN,gl:JN,glE:XN,glj:QN,gnap:YN,gnapprox:ZN,gne:eD,gnE:tD,gneq:rD,gneqq:nD,gnsim:iD,Gopf:aD,gopf:oD,grave:sD,GreaterEqual:lD,GreaterEqualLess:uD,GreaterFullEqual:cD,GreaterGreater:fD,GreaterLess:dD,GreaterSlantEqual:hD,GreaterTilde:pD,Gscr:vD,gscr:mD,gsim:gD,gsime:yD,gsiml:bD,gtcc:wD,gtcir:kD,gt:CD,GT:TD,Gt:xD,gtdot:ED,gtlPar:SD,gtquest:MD,gtrapprox:OD,gtrarr:LD,gtrdot:AD,gtreqless:ND,gtreqqless:DD,gtrless:ID,gtrsim:RD,gvertneqq:BD,gvnE:PD,Hacek:HD,hairsp:FD,half:qD,hamilt:_D,HARDcy:$D,hardcy:zD,harrcir:VD,harr:UD,hArr:WD,harrw:jD,Hat:GD,hbar:KD,Hcirc:JD,hcirc:XD,hearts:QD,heartsuit:YD,hellip:ZD,hercon:eI,hfr:tI,Hfr:rI,HilbertSpace:nI,hksearow:iI,hkswarow:aI,hoarr:oI,homtht:sI,hookleftarrow:lI,hookrightarrow:uI,hopf:cI,Hopf:fI,horbar:dI,HorizontalLine:hI,hscr:pI,Hscr:vI,hslash:mI,Hstrok:gI,hstrok:yI,HumpDownHump:bI,HumpEqual:wI,hybull:kI,hyphen:CI,Iacute:TI,iacute:xI,ic:EI,Icirc:SI,icirc:MI,Icy:OI,icy:LI,Idot:AI,IEcy:NI,iecy:DI,iexcl:II,iff:RI,ifr:BI,Ifr:PI,Igrave:HI,igrave:FI,ii:qI,iiiint:_I,iiint:$I,iinfin:zI,iiota:VI,IJlig:UI,ijlig:WI,Imacr:jI,imacr:GI,image:KI,ImaginaryI:JI,imagline:XI,imagpart:Q
18I,imath:YI,Im:ZI,imof:eR,imped:tR,Implies:rR,incare:nR,in:"\u2208",infin:iR,infintie:aR,inodot:oR,intcal:sR,int:lR,Int:uR,integers:cR,Integral:fR,intercal:dR,Intersection:hR,intlarhk:pR,intprod:vR,InvisibleComma:mR,InvisibleTimes:gR,IOcy:yR,iocy:bR,Iogon:wR,iogon:kR,Iopf:CR,iopf:TR,Iota:xR,iota:ER,iprod:SR,iquest:MR,iscr:OR,Iscr:LR,isin:AR,isindot:NR,isinE:DR,isins:IR,isinsv:RR,isinv:BR,it:PR,Itilde:HR,itilde:FR,Iukcy:qR,iukcy:_R,Iuml:$R,iuml:zR,Jcirc:VR,jcirc:UR,Jcy:WR,jcy:jR,Jfr:GR,jfr:KR,jmath:JR,Jopf:XR,jopf:QR,Jscr:YR,jscr:ZR,Jsercy:eB,jsercy:tB,Jukcy:rB,jukcy:nB,Kappa:iB,kappa:aB,kappav:oB,Kcedil:sB,kcedil:lB,Kcy:uB,kcy:cB,Kfr:fB,kfr:dB,kgreen:hB,KHcy:pB,khcy:vB,KJcy:mB,kjcy:gB,Kopf:yB,kopf:bB,Kscr:wB,kscr:kB,lAarr:CB,Lacute:TB,lacute:xB,laemptyv:EB,lagran:SB,Lambda:MB,lambda:OB,lang:LB,Lang:AB,langd:NB,langle:DB,lap:IB,Laplacetrf:RB,laquo:BB,larrb:PB,larrbfs:HB,larr:FB,Larr:qB,lArr:_B,larrfs:$B,larrhk:zB,larrlp:VB,larrpl:UB,larrsim:WB,larrtl:jB,latail:GB,lAtail:KB,lat:JB,late:XB,lates:QB,lbarr:YB,lBarr:ZB,lbbrk:eP,lbrace:tP,lbrack:rP,lbrke:nP,lbrksld:iP,lbrkslu:aP,Lcaron:oP,lcaron:sP,Lcedil:lP,lcedil:uP,lceil:cP,lcub:fP,Lcy:dP,lcy:hP,ldca:pP,ldquo:vP,ldquor:mP,ldrdhar:gP,ldrushar:yP,ldsh:bP,le:wP,lE:kP,LeftAngleBracket:CP,LeftArrowBar:TP,leftarrow:xP,LeftArrow:EP,Leftarrow:SP,LeftArrowRightArrow:MP,leftarrowtail:OP,LeftCeiling:LP,LeftDoubleBracket:AP,LeftDownTeeVector:NP,LeftDownVectorBar:DP,LeftDownVector:IP,LeftFloor:RP,leftharpoondown:BP,leftharpoonup:PP,leftleftarrows:HP,leftrightarrow:FP,LeftRightArrow:qP,Leftrightarrow:_P,leftrightarrows:$P,leftrightharpoons:zP,leftrightsquigarrow:VP,LeftRightVector:UP,LeftTeeArrow:WP,LeftTee:jP,LeftTeeVector:GP,leftthreetimes:KP,LeftTriangleBar:JP,LeftTriangle:XP,LeftTriangleEqual:QP,LeftUpDownVector:YP,LeftUpTeeVector:ZP,LeftUpVectorBar:eH,LeftUpVector:tH,LeftVectorBar:rH,LeftVector:nH,lEg:iH,leg:aH,leq:oH,leqq:sH,leqslant:lH,lescc:uH,les:cH,lesdot:fH,lesdoto:dH,lesdotor:hH,lesg:pH,lesges:vH,lessapprox:mH,lessdot:gH,lesseqgtr:yH,lesseqqgtr:bH,LessEqualGreater:wH,LessFullEqual:kH,LessGreater:CH,lessgtr:TH,LessLess:xH,lesssim:EH,LessSlantEqual:SH,LessTilde:MH,lfisht:OH,lfloor:LH,Lfr:AH,lfr:NH,lg:DH,lgE:IH,lHar:RH,lhard:BH,lharu:PH,lharul:HH,lhblk:FH,LJcy:qH,ljcy:_H,llarr:$H,ll:zH,Ll:VH,llcorner:UH,Lleftarrow:WH,llhard:jH,lltri:GH,Lmidot:KH,lmidot:JH,lmoustache:XH,lmoust:QH,lnap:YH,lnapprox:ZH,lne:eF,lnE:tF,lneq:rF,lneqq:nF,lnsim:iF,loang:aF,loarr:oF,lobrk:sF,longleftarrow:lF,LongLeftArrow:uF,Longleftarrow:cF,longleftrightarrow:fF,LongLeftRightArrow:dF,Longleftrightarrow:hF,longmapsto:pF,longrightarrow:vF,LongRightArrow:mF,Longrightarrow:gF,looparrowleft:yF,looparrowright:bF,lopar:wF,Lopf:kF,lopf:CF,loplus:TF,lotimes:xF,lowast:EF,lowbar:SF,LowerLeftArrow:MF,LowerRightArrow:OF,loz:LF,lozenge:AF,lozf:NF,lpar:DF,lparlt:IF,lrarr:RF,lrcorner:BF,lrhar:PF,lrhard:HF,lrm:FF,lrtri:qF,lsaquo:_F,lscr:$F,Lscr:zF,lsh:VF,Lsh:UF,lsim:WF,lsime:jF,lsimg:GF,lsqb:KF,lsquo:JF,lsquor:XF,Lstrok:QF,lstrok:YF,ltcc:ZF,ltcir:eq,lt:tq,LT:rq,Lt:nq,ltdot:iq,lthree:aq,ltimes:oq,ltlarr:sq,ltquest:lq,ltri:uq,ltrie:cq,ltrif:fq,ltrPar:dq,lurdshar:hq,luruhar:pq,lvertneqq:vq,lvnE:mq,macr:gq,male:yq,malt:bq,maltese:wq,Map:"\u2905",map:kq,mapsto:Cq,mapstodown:Tq,mapstoleft:xq,mapstoup:Eq,marker:Sq,mcomma:Mq,Mcy:Oq,mcy:Lq,mdash:Aq,mDDot:Nq,measuredangle:Dq,MediumSpace:Iq,Mellintrf:Rq,Mfr:Bq,mfr:Pq,mho:Hq,micro:Fq,midast:qq,midcir:_q,mid:$q,middot:zq,minusb:Vq,minus:Uq,minusd:Wq,minusdu:jq,MinusPlus:Gq,mlcp:Kq,mldr:Jq,mnplus:Xq,models:Qq,Mopf:Yq,mopf:Zq,mp:e_,mscr:t_,Mscr:r_,mstpos:n_,Mu:i_,mu:a_,multimap:o_,mumap:s_,nabla:l_,Nacute:u_,nacute:c_,nang:f_,nap:d_,napE:h_,napid:p_,napos:v_,napprox:m_,natural:g_,naturals:y_,natur:b_,nbsp:w_,nbump:k_,nbumpe:C_,ncap:T_,Ncaron:x_,ncaron:E_,Ncedil:S_,ncedil:M_,ncong:O_,ncongdot:L_,ncup:A_,Ncy:N_,ncy:D_,ndash:I_,nearhk:R_,nearr:B_,neArr:P_,nearrow:H_,ne:F_,nedot:q_,NegativeMediumSpace:__,NegativeThickSpace:$_,NegativeThinSpace:z_,NegativeVeryThinSpace:V_,nequiv:U_,nesear:W_,nesim:j_,NestedGreaterGreater:G_,NestedLessLess:K_,NewLine:J_,nexist:X_,nexists:Q_,Nfr:Y_,nfr:Z_,ngE:e$,nge:t$,ngeq:r$,ngeqq:n$,ngeqslant:i$,nges:a$,nGg:o$,ngsim:s$,nGt:l$,ngt:u$,ngtr:c$,nGtv:f$,nharr:d$,nhArr:h$,nhpar:p$,ni:v$,nis:m$,nisd:g$,niv:y$,NJcy:b$,njcy:w$,nlarr:k$,nlArr:C$,nldr:T$,nlE:x$,nle:E$,nleftarrow:S$,nLeftarrow:M$,nleftrightarrow:O$,nLeftrightarrow:L$,nleq:A$,nleqq:N$,nleqslant:D$,nles:I$,nless:R$,nLl:B$,nlsim:P$,nLt:H$,nlt:F$,nltri:q$,nltrie:_$,nLtv:$$,nmid:z$,NoBreak:V$,NonBreakingSpace:U$,nopf:W$,Nopf:j$,Not:G$,not:K$,NotCongruent:J$,NotCupCap:X$,NotDoubleVerticalBar:Q$,NotElement:Y$,NotEqual:Z$,NotEqualTilde:ez,NotExists:tz,NotGreater:rz,NotGreaterEqual:nz,NotGreaterFullEqual:iz,NotGreaterGreater:az,NotGreaterLess:oz,NotGreaterSlantEqual:sz,NotGreaterTilde:lz,NotHumpDownHump:uz,NotHumpEqual:cz,notin:fz,notindot:dz,notinE:hz,notinva:pz,notinvb:vz,notinvc:mz,NotLeftTriangleBar:gz,NotLeftTriangle:yz,NotLeftTriangleEqual:bz,NotLess:wz,N
18otLessEqual:kz,NotLessGreater:Cz,NotLessLess:Tz,NotLessSlantEqual:xz,NotLessTilde:Ez,NotNestedGreaterGreater:Sz,NotNestedLessLess:Mz,notni:Oz,notniva:Lz,notnivb:Az,notnivc:Nz,NotPrecedes:Dz,NotPrecedesEqual:Iz,NotPrecedesSlantEqual:Rz,NotReverseElement:Bz,NotRightTriangleBar:Pz,NotRightTriangle:Hz,NotRightTriangleEqual:Fz,NotSquareSubset:qz,NotSquareSubsetEqual:_z,NotSquareSuperset:$z,NotSquareSupersetEqual:zz,NotSubset:Vz,NotSubsetEqual:Uz,NotSucceeds:Wz,NotSucceedsEqual:jz,NotSucceedsSlantEqual:Gz,NotSucceedsTilde:Kz,NotSuperset:Jz,NotSupersetEqual:Xz,NotTilde:Qz,NotTildeEqual:Yz,NotTildeFullEqual:Zz,NotTildeTilde:eV,NotVerticalBar:tV,nparallel:rV,npar:nV,nparsl:iV,npart:aV,npolint:oV,npr:sV,nprcue:lV,nprec:uV,npreceq:cV,npre:fV,nrarrc:dV,nrarr:hV,nrArr:pV,nrarrw:vV,nrightarrow:mV,nRightarrow:gV,nrtri:yV,nrtrie:bV,nsc:wV,nsccue:kV,nsce:CV,Nscr:TV,nscr:xV,nshortmid:EV,nshortparallel:SV,nsim:MV,nsime:OV,nsimeq:LV,nsmid:AV,nspar:NV,nsqsube:DV,nsqsupe:IV,nsub:RV,nsubE:BV,nsube:PV,nsubset:HV,nsubseteq:FV,nsubseteqq:qV,nsucc:_V,nsucceq:$V,nsup:zV,nsupE:VV,nsupe:UV,nsupset:WV,nsupseteq:jV,nsupseteqq:GV,ntgl:KV,Ntilde:JV,ntilde:XV,ntlg:QV,ntriangleleft:YV,ntrianglelefteq:ZV,ntriangleright:e2,ntrianglerighteq:t2,Nu:r2,nu:n2,num:i2,numero:a2,numsp:o2,nvap:s2,nvdash:l2,nvDash:u2,nVdash:c2,nVDash:f2,nvge:d2,nvgt:h2,nvHarr:p2,nvinfin:v2,nvlArr:m2,nvle:g2,nvlt:y2,nvltrie:b2,nvrArr:w2,nvrtrie:k2,nvsim:C2,nwarhk:T2,nwarr:x2,nwArr:E2,nwarrow:S2,nwnear:M2,Oacute:O2,oacute:L2,oast:A2,Ocirc:N2,ocirc:D2,ocir:I2,Ocy:R2,ocy:B2,odash:P2,Odblac:H2,odblac:F2,odiv:q2,odot:_2,odsold:$2,OElig:z2,oelig:V2,ofcir:U2,Ofr:W2,ofr:j2,ogon:G2,Ograve:K2,ograve:J2,ogt:X2,ohbar:Q2,ohm:Y2,oint:Z2,olarr:eU,olcir:tU,olcross:rU,oline:nU,olt:iU,Omacr:aU,omacr:oU,Omega:sU,omega:lU,Omicron:uU,omicron:cU,omid:fU,ominus:dU,Oopf:hU,oopf:pU,opar:vU,OpenCurlyDoubleQuote:mU,OpenCurlyQuote:gU,operp:yU,oplus:bU,orarr:wU,Or:kU,or:CU,ord:TU,order:xU,orderof:EU,ordf:SU,ordm:MU,origof:OU,oror:LU,orslope:AU,orv:NU,oS:DU,Oscr:IU,oscr:RU,Oslash:BU,oslash:PU,osol:HU,Otilde:FU,otilde:qU,otimesas:_U,Otimes:$U,otimes:zU,Ouml:VU,ouml:UU,ovbar:WU,OverBar:jU,OverBrace:GU,OverBracket:KU,OverParenthesis:JU,para:XU,parallel:QU,par:YU,parsim:ZU,parsl:eW,part:tW,PartialD:rW,Pcy:nW,pcy:iW,percnt:aW,period:oW,permil:sW,perp:lW,pertenk:uW,Pfr:cW,pfr:fW,Phi:dW,phi:hW,phiv:pW,phmmat:vW,phone:mW,Pi:gW,pi:yW,pitchfork:bW,piv:wW,planck:kW,planckh:CW,plankv:TW,plusacir:xW,plusb:EW,pluscir:SW,plus:MW,plusdo:OW,plusdu:LW,pluse:AW,PlusMinus:NW,plusmn:DW,plussim:IW,plustwo:RW,pm:BW,Poincareplane:PW,pointint:HW,popf:FW,Popf:qW,pound:_W,prap:$W,Pr:zW,pr:VW,prcue:UW,precapprox:WW,prec:jW,preccurlyeq:GW,Precedes:KW,PrecedesEqual:JW,PrecedesSlantEqual:XW,PrecedesTilde:QW,preceq:YW,precnapprox:ZW,precneqq:ej,precnsim:tj,pre:rj,prE:nj,precsim:ij,prime:aj,Prime:oj,primes:sj,prnap:lj,prnE:uj,prnsim:cj,prod:fj,Product:dj,profalar:hj,profline:pj,profsurf:vj,prop:mj,Proportional:gj,Proportion:yj,propto:bj,prsim:wj,prurel:kj,Pscr:Cj,pscr:Tj,Psi:xj,psi:Ej,puncsp:Sj,Qfr:Mj,qfr:Oj,qint:Lj,qopf:Aj,Qopf:Nj,qprime:Dj,Qscr:Ij,qscr:Rj,quaternions:Bj,quatint:Pj,quest:Hj,questeq:Fj,quot:qj,QUOT:_j,rAarr:$j,race:zj,Racute:Vj,racute:Uj,radic:Wj,raemptyv:jj,rang:Gj,Rang:Kj,rangd:Jj,range:Xj,rangle:Qj,raquo:Yj,rarrap:Zj,rarrb:e3,rarrbfs:t3,rarrc:r3,rarr:n3,Rarr:i3,rArr:a3,rarrfs:o3,rarrhk:s3,rarrlp:l3,rarrpl:u3,rarrsim:c3,Rarrtl:f3,rarrtl:d3,rarrw:h3,ratail:p3,rAtail:v3,ratio:m3,rationals:g3,rbarr:y3,rBarr:b3,RBarr:w3,rbbrk:k3,rbrace:C3,rbrack:T3,rbrke:x3,rbrksld:E3,rbrkslu:S3,Rcaron:M3,rcaron:O3,Rcedil:L3,rcedil:A3,rceil:N3,rcub:D3,Rcy:I3,rcy:R3,rdca:B3,rdldhar:P3,rdquo:H3,rdquor:F3,rdsh:q3,real:_3,realine:$3,realpart:z3,reals:V3,Re:U3,rect:W3,reg:j3,REG:G3,ReverseElement:K3,ReverseEquilibrium:J3,ReverseUpEquilibrium:X3,rfisht:Q3,rfloor:Y3,rfr:Z3,Rfr:eG,rHar:tG,rhard:rG,rharu:nG,rharul:iG,Rho:aG,rho:oG,rhov:sG,RightAngleBracket:lG,RightArrowBar:uG,rightarrow:cG,RightArrow:fG,Rightarrow:dG,RightArrowLeftArrow:hG,rightarrowtail:pG,RightCeiling:vG,RightDoubleBracket:mG,RightDownTeeVector:gG,RightDownVectorBar:yG,RightDownVector:bG,RightFloor:wG,rightharpoondown:kG,rightharpoonup:CG,rightleftarrows:TG,rightleftharpoons:xG,rightrightarrows:EG,rightsquigarrow:SG,RightTeeArrow:MG,RightTee:OG,RightTeeVector:LG,rightthreetimes:AG,RightTriangleBar:NG,RightTriangle:DG,RightTriangleEqual:IG,RightUpDownVector:RG,RightUpTeeVector:BG,RightUpVectorBar:PG,RightUpVector:HG,RightVectorBar:FG,RightVector:qG,ring:_G,risingdotseq:$G,rlarr:zG,rlhar:VG,rlm:UG,rmoustache:WG,rmoust:jG,rnmid:GG,roang:KG,roarr:JG,robrk:XG,ropar:QG,ropf:YG,Ropf:ZG,roplus:e4,rotimes:t4,RoundImplies:r4,rpar:n4,rpargt:i4,rppolint:a4,rrarr:o4,Rrightarrow:s4,rsaquo:l4,rscr:u4,Rscr:c4,rsh:f4,Rsh:d4,rsqb:h4,rsquo:p4,rsquor:v4,rthree:m4,rtimes:g4,rtri:y4,rtrie:b4,rtrif:w4,rtriltri:k4,RuleDelayed:C4,ruluhar:T4,rx:x4,Sacute:E4,sacute:S4,sbquo:M4,scap:O4,Scaron:L4,scaron:A4,Sc:N4,sc:D4,sccue:I4,sce:R4,scE:B4,Scedil:P4,scedil:H4,Scirc:F4,scirc:q4,scnap:_4,scnE:$4,scnsim:z4,scpolint:V4,scsim:U4,Scy:W4,scy:j4,sdotb:G4,sdot:K4,sdote:J4,searhk:X4,searr:Q4,seArr:Y4,searrow:Z4,sect:eK,semi:tK,seswar:rK,setminus:nK,setmn:iK,sext:aK,Sfr:oK,sfr:sK,sfrown:lK,sharp:uK,SHCHcy:cK,shchcy:fK,SHcy:dK,shcy:hK,ShortDownArrow:pK,ShortLeftArrow:vK,shortmid:mK,shortparallel:gK,ShortRightArrow:yK,ShortUpArrow:bK,shy:wK,Sigma:kK,sigma:CK,sigmaf:TK,sigmav:xK,sim:EK,simdot:SK,sime:MK,simeq:OK,simg:LK,simgE:AK,siml:NK,simlE:DK,simne:IK,simplus:RK,simrarr:BK,slarr:PK,SmallCircle:HK,smallsetminus:FK,smashp:qK,smeparsl:_K,smid:$K,smile:zK,smt:VK,smte:UK,smtes:WK,SOFTcy:jK,softcy:GK,solbar:KK,solb:JK,sol:XK,Sopf:QK,sopf:YK,spades:ZK,spadesuit:e5,spar:t5,sqcap:r5,sqcaps:n5,sqcup:i5,sqcups:a5,Sqrt:o5,sqsub:s5,sqsube:l5,sqsubset:u5,sqsubseteq:c5,sqsup:f5,sqsupe:d5,sqsupset:h5,sqsupseteq:p5,square:v5,Square:m5,SquareIntersection:g5,SquareSubset:y5,SquareSubsetEqual:b5,SquareSuperset:w5,SquareSupersetEqual:k5,SquareUnion:C5,squarf:T5,squ:x5,squf:E5,srarr:S5,Sscr:M5,sscr:O5,ssetmn:L5,ssmile:A5,sstarf:N5,Star:D5,star:I5,starf:R5,straightepsilon:B5,straightphi:P5,strns:H5,sub:F5,Sub:q5,subdot:_5,subE:$5,sube:z5,subedot:V5,submult:U5,subnE:W5,subne:j5,subplus:G5,subrarr:K5,subset:J5,Subset:X5,subseteq:Q5,subseteqq:Y5,SubsetEqual:Z5,subsetneq:e8,subsetneqq:t8,subsim:r8,subsub:n8,subsup:i8,succapprox:a8,succ:o8,succcurlyeq:s8,Succeeds:l8,SucceedsEqual:u8,SucceedsSlantEqual:c8,SucceedsTilde:f8,succeq:d8,succnapprox:h8,succneqq:p8,succnsim:v8,succsim:m8,SuchThat:g8,sum:y8,Sum:b8,sung:w8,sup1:k8,sup2:C8,sup3:T8,sup:x8,Sup:E8,supdot:S8,supdsub:M8,supE:O8,supe:L8,supedot:A8,Superset:N8,SupersetEqual:D8,suphsol:I8,suphsub
18:R8,suplarr:B8,supmult:P8,supnE:H8,supne:F8,supplus:q8,supset:_8,Supset:$8,supseteq:z8,supseteqq:V8,supsetneq:U8,supsetneqq:W8,supsim:j8,supsub:G8,supsup:K8,swarhk:J8,swarr:X8,swArr:Q8,swarrow:Y8,swnwar:Z8,szlig:eJ,Tab:tJ,target:rJ,Tau:nJ,tau:iJ,tbrk:aJ,Tcaron:oJ,tcaron:sJ,Tcedil:lJ,tcedil:uJ,Tcy:cJ,tcy:fJ,tdot:dJ,telrec:hJ,Tfr:pJ,tfr:vJ,there4:mJ,therefore:gJ,Therefore:yJ,Theta:bJ,theta:wJ,thetasym:kJ,thetav:CJ,thickapprox:TJ,thicksim:xJ,ThickSpace:EJ,ThinSpace:SJ,thinsp:MJ,thkap:OJ,thksim:LJ,THORN:AJ,thorn:NJ,tilde:DJ,Tilde:IJ,TildeEqual:RJ,TildeFullEqual:BJ,TildeTilde:PJ,timesbar:HJ,timesb:FJ,times:qJ,timesd:_J,tint:$J,toea:zJ,topbot:VJ,topcir:UJ,top:WJ,Topf:jJ,topf:GJ,topfork:KJ,tosa:JJ,tprime:XJ,trade:QJ,TRADE:YJ,triangle:ZJ,triangledown:e6,triangleleft:t6,trianglelefteq:r6,triangleq:n6,triangleright:i6,trianglerighteq:a6,tridot:o6,trie:s6,triminus:l6,TripleDot:u6,triplus:c6,trisb:f6,tritime:d6,trpezium:h6,Tscr:p6,tscr:v6,TScy:m6,tscy:g6,TSHcy:y6,tshcy:b6,Tstrok:w6,tstrok:k6,twixt:C6,twoheadleftarrow:T6,twoheadrightarrow:x6,Uacute:E6,uacute:S6,uarr:M6,Uarr:O6,uArr:L6,Uarrocir:A6,Ubrcy:N6,ubrcy:D6,Ubreve:I6,ubreve:R6,Ucirc:B6,ucirc:P6,Ucy:H6,ucy:F6,udarr:q6,Udblac:_6,udblac:$6,udhar:z6,ufisht:V6,Ufr:U6,ufr:W6,Ugrave:j6,ugrave:G6,uHar:K6,uharl:J6,uharr:X6,uhblk:Q6,ulcorn:Y6,ulcorner:Z6,ulcrop:e9,ultri:t9,Umacr:r9,umacr:n9,uml:i9,UnderBar:a9,UnderBrace:o9,UnderBracket:s9,UnderParenthesis:l9,Union:u9,UnionPlus:c9,Uogon:f9,uogon:d9,Uopf:h9,uopf:p9,UpArrowBar:v9,uparrow:m9,UpArrow:g9,Uparrow:y9,UpArrowDownArrow:b9,updownarrow:w9,UpDownArrow:k9,Updownarrow:C9,UpEquilibrium:T9,upharpoonleft:x9,upharpoonright:E9,uplus:S9,UpperLeftArrow:M9,UpperRightArrow:O9,upsi:L9,Upsi:A9,upsih:N9,Upsilon:D9,upsilon:I9,UpTeeArrow:R9,UpTee:B9,upuparrows:P9,urcorn:H9,urcorner:F9,urcrop:q9,Uring:_9,uring:$9,urtri:z9,Uscr:V9,uscr:U9,utdot:W9,Utilde:j9,utilde:G9,utri:K9,utrif:J9,uuarr:X9,Uuml:Q9,uuml:Y9,uwangle:Z9,vangrt:e7,varepsilon:t7,varkappa:r7,varnothing:n7,varphi:i7,varpi:a7,varpropto:o7,varr:s7,vArr:l7,varrho:u7,varsigma:c7,varsubsetneq:f7,varsubsetneqq:d7,varsupsetneq:h7,varsupsetneqq:p7,vartheta:v7,vartriangleleft:m7,vartriangleright:g7,vBar:y7,Vbar:b7,vBarv:w7,Vcy:k7,vcy:C7,vdash:T7,vDash:x7,Vdash:E7,VDash:S7,Vdashl:M7,veebar:O7,vee:L7,Vee:A7,veeeq:N7,vellip:D7,verbar:I7,Verbar:R7,vert:B7,Vert:P7,VerticalBar:H7,VerticalLine:F7,VerticalSeparator:q7,VerticalTilde:_7,VeryThinSpace:$7,Vfr:z7,vfr:V7,vltri:U7,vnsub:W7,vnsup:j7,Vopf:G7,vopf:K7,vprop:J7,vrtri:X7,Vscr:Q7,vscr:Y7,vsubnE:Z7,vsubne:eX,vsupnE:tX,vsupne:rX,Vvdash:nX,vzigzag:iX,Wcirc:aX,wcirc:oX,wedbar:sX,wedge:lX,Wedge:uX,wedgeq:cX,weierp:fX,Wfr:dX,wfr:hX,Wopf:pX,wopf:vX,wp:mX,wr:gX,wreath:yX,Wscr:bX,wscr:wX,xcap:kX,xcirc:CX,xcup:TX,xdtri:xX,Xfr:EX,xfr:SX,xharr:MX,xhArr:OX,Xi:LX,xi:AX,xlarr:NX,xlArr:DX,xmap:IX,xnis:RX,xodot:BX,Xopf:PX,xopf:HX,xoplus:FX,xotime:qX,xrarr:_X,xrArr:$X,Xscr:zX,xscr:VX,xsqcup:UX,xuplus:WX,xutri:jX,xvee:GX,xwedge:KX,Yacute:JX,yacute:XX,YAcy:QX,yacy:YX,Ycirc:ZX,ycirc:eQ,Ycy:tQ,ycy:rQ,yen:nQ,Yfr:iQ,yfr:aQ,YIcy:oQ,yicy:sQ,Yopf:lQ,yopf:uQ,Yscr:cQ,yscr:fQ,YUcy:dQ,yucy:hQ,yuml:pQ,Yuml:vQ,Zacute:mQ,zacute:gQ,Zcaron:yQ,zcaron:bQ,Zcy:wQ,zcy:kQ,Zdot:CQ,zdot:TQ,zeetrf:xQ,ZeroWidthSpace:EQ,Zeta:SQ,zeta:MQ,zfr:OQ,Zfr:LQ,ZHcy:AQ,zhcy:NQ,zigrarr:DQ,zopf:IQ,Zopf:RQ,Zscr:BQ,zscr:PQ,zwj:HQ,zwnj:FQ},qQ="\xC1",_Q="\xE1",$Q="\xC2",zQ="\xE2",VQ="\xB4",UQ="\xC6",WQ="\xE6",jQ="\xC0",GQ="\xE0",KQ="&",JQ="&",XQ="\xC5",QQ="\xE5",YQ="\xC3",ZQ="\xE3",eY="\xC4",tY="\xE4",rY="\xA6",nY="\xC7",iY="\xE7",aY="\xB8",oY="\xA2",sY="\xA9",lY="\xA9",uY="\xA4",cY="\xB0",fY="\xF7",dY="\xC9",hY="\xE9",pY="\xCA",vY="\xEA",mY="\xC8",gY="\xE8",yY="\xD0",bY="\xF0",wY="\xCB",kY="\xEB",CY="\xBD",TY="\xBC",xY="\xBE",EY=">",SY=">",MY="\xCD",OY="\xED",LY="\xCE",AY="\xEE",NY="\xA1",DY="\xCC",IY="\xEC",RY="\xBF",BY="\xCF",PY="\xEF",HY="\xAB",FY="<",qY="<",_Y="\xAF",$Y="\xB5",zY="\xB7",VY="\xA0",UY="\xAC",WY="\xD1",jY="\xF1",GY="\xD3",KY="\xF3",JY="\xD4",XY="\xF4",QY="\xD2",YY="\xF2",ZY="\xAA",eZ="\xBA",tZ="\xD8",rZ="\xF8",nZ="\xD5",iZ="\xF5",aZ="\xD6",oZ="\xF6",sZ="\xB6",lZ="\xB1",uZ="\xA3",cZ='"',fZ='"',dZ="\xBB",hZ="\xAE",pZ="\xAE",vZ="\xA7",mZ="\xAD",gZ="\xB9",yZ="\xB2",bZ="\xB3",wZ="\xDF",kZ="\xDE",CZ="\xFE",TZ="\xD7",xZ="\xDA",EZ="\xFA",SZ="\xDB",MZ="\xFB",OZ="\xD9",LZ="\xF9",AZ="\xA8",NZ="\xDC",DZ="\xFC",IZ="\xDD",RZ="\xFD",BZ="\xA5",PZ="\xFF",HZ={Aacute:qQ,aacute:_Q,Acirc:$Q,acirc:zQ,acute:VQ,AElig:UQ,aelig:WQ,Agrave:jQ,agrave:GQ,amp:KQ,AMP:JQ,Aring:XQ,aring:QQ,Atilde:YQ,atilde:ZQ,Auml:eY,auml:tY,brvbar:rY,Ccedil
vendor: 68,668 bytes, lines 18-32
18:nY,ccedil:iY,cedil:aY,cent:oY,copy:sY,COPY:lY,curren:uY,deg:cY,divide:fY,Eacute:dY,eacute:hY,Ecirc:pY,ecirc:vY,Egrave:mY,egrave:gY,ETH:yY,eth:bY,Euml:wY,euml:kY,frac12:CY,frac14:TY,frac34:xY,gt:EY,GT:SY,Iacute:MY,iacute:OY,Icirc:LY,icirc:AY,iexcl:NY,Igrave:DY,igrave:IY,iquest:RY,Iuml:BY,iuml:PY,laquo:HY,lt:FY,LT:qY,macr:_Y,micro:$Y,middot:zY,nbsp:VY,not:UY,Ntilde:WY,ntilde:jY,Oacute:GY,oacute:KY,Ocirc:JY,ocirc:XY,Ograve:QY,ograve:YY,ordf:ZY,ordm:eZ,Oslash:tZ,oslash:rZ,Otilde:nZ,otilde:iZ,Ouml:aZ,ouml:oZ,para:sZ,plusmn:lZ,pound:uZ,quot:cZ,QUOT:fZ,raquo:dZ,reg:hZ,REG:pZ,sect:vZ,shy:mZ,sup1:gZ,sup2:yZ,sup3:bZ,szlig:wZ,THORN:kZ,thorn:CZ,times:TZ,Uacute:xZ,uacute:EZ,Ucirc:SZ,ucirc:MZ,Ugrave:OZ,ugrave:LZ,uml:AZ,Uuml:NZ,uuml:DZ,Yacute:IZ,yacute:RZ,yen:BZ,yuml:PZ},FZ="&",qZ="'",_Z=">",$Z="<",zZ='"',Mp={amp:FZ,apos:qZ,gt:_Z,lt:$Z,quot:zZ},bl={},VZ={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},UZ=tn&&tn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bl,"__esModule",{value:!0});var ad=UZ(VZ),WZ=String.fromCodePoint||function(r){var e="";return r>65535&&(r-=65536,e+=String.fromCharCode(r>>>10&1023|55296),r=56320|r&1023),e+=String.fromCharCode(r),e};function jZ(r){return r>=55296&&r<=57343||r>1114111?"\uFFFD":(r in ad.default&&(r=ad.default[r]),WZ(r))}bl.default=jZ;var Ca=tn&&tn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xt,"__esModule",{value:!0});xt.decodeHTML=xt.decodeHTMLStrict=xt.decodeXML=void 0;var Bs=Ca(Sp),GZ=Ca(HZ),KZ=Ca(Mp),od=Ca(bl),JZ=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;xt.decodeXML=Op(KZ.default);xt.decodeHTMLStrict=Op(Bs.default);function Op(r){var e=Lp(r);return function(t){return String(t).replace(JZ,e)}}var sd=function(r,e){return r<e?1:-1};xt.decodeHTML=(function(){for(var r=Object.keys(GZ.default).sort(sd),e=Object.keys(Bs.default).sort(sd),t=0,n=0;t<e.length;t++)r[n]===e[t]?(e[t]+=";?",n++):e[t]+=";";var i=new RegExp("&(?:"+e.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),a=Lp(Bs.default);function o(s){return s.substr(-1)!==";"&&(s+=";"),a(s)}return function(s){return String(s).replace(i,o)}})();function Lp(r){return function(t){if(t.charAt(1)==="#"){var n=t.charAt(2);return n==="X"||n==="x"?od.default(parseInt(t.substr(3),16)):od.default(parseInt(t.substr(2),10))}return r[t.slice(1,-1)]||t}}var Re={},Ap=tn&&tn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Re,"__esModule",{value:!0});Re.escapeUTF8=Re.escape=Re.encodeNonAsciiHTML=Re.encodeHTML=Re.encodeXML=void 0;var XZ=Ap(Mp),Np=Ip(XZ.default),Dp=Rp(Np);Re.encodeXML=Hp(Np);var QZ=Ap(Sp),wl=Ip(QZ.default),YZ=Rp(wl);Re.encodeHTML=eee(wl,YZ);Re.encodeNonAsciiHTML=Hp(wl);function Ip(r){return Object.keys(r).sort().reduce(function(e,t){return e[r[t]]="&"+t+";",e},{})}function Rp(r){for(var e=[],t=[],n=0,i=Object.keys(r);n<i.length;n++){var a=i[n];a.length===1?e.push("\\"+a):t.push(a)}e.sort();for(var o=0;o<e.length-1;o++){for(var s=o;s<e.length-1&&e[s].charCodeAt(1)+1===e[s+1].charCodeAt(1);)s+=1;var l=1+s-o;l<3||e.splice(o,l,e[o]+"-"+e[s])}return t.unshift("["+e.join("")+"]"),new RegExp(t.join("|"),"g")}var Bp=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,ZZ=String.prototype.codePointAt!=null?function(r){return r.codePointAt(0)}:function(r){return(r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536};function Ta(r){return"&#x"+(r.length>1?ZZ(r):r.charCodeAt(0)).toString(16).toUpperCase()+";"}function eee(r,e){return function(t){return t.replace(e,function(n){return r[n]}).replace(Bp,Ta)}}var Pp=new RegExp(Dp.source+"|"+Bp.source,"g");function tee(r){return r.replace(Pp,Ta)}Re.escape=tee;function ree(r){return r.replace(Dp,Ta)}Re.escapeUTF8=ree;function Hp(r){return function(e){return e.replace(Pp,function(t){return r[t]||Ta(t)})}}(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.decodeXMLStrict=r.decodeHTML5Strict=r.decodeHTML4Strict=r.decodeHTML5=r.decodeHTML4=r.decodeHTMLStrict=r.decodeHTML=r.decodeXML=r.encodeHTML5=r.encodeHTML4=r.escapeUTF8=r.escape=r.encodeNonAsciiHTML=r.encodeHTML=r.encodeXML=r.encode=r.decodeStrict=r.decode=void 0;var e=xt,t=Re;function n(l,u){return(!u||u<=0?e.decodeXML:e.decodeHTML)(l)}r.decode=n;function i(l,u){return(!u||u<=0?e.decodeXML:e.decodeHTMLStrict)(l)}r.decodeStrict=i;function a(l,u){return(!u||u<=0?t.encodeXML:t.encodeHTML)(l)}r.encode=a;var o=Re;Object.defineProperty(r,"encodeXML",{enumerable:!0,get:function(){return o.encodeXML}}),Object.defineProperty(r,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(r,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(r,"escape",{enumerable:!0,get:function(){return o.escape}}),Object.defineProperty(r,"escapeUTF8",{enumerable:!0,get:function(){return o.escapeUTF8}}),Object.defineProperty(r,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(r,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var s=xt;Object.defineProperty(r,"decodeXML",{enumerable:!0,get:function(){return s.decodeXML}}),Object.defineProperty(r,"decodeHTML",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(r,"decodeHTMLStrict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(r,"decodeHTML4",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(r,"decodeHTML5",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(r,"decodeHTML4Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(r,"decodeHTML5Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(r,"decodeXMLStrict",{enumerable:!0,get:function(){return s.decodeXML}})})(yl);var Fp="&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});",nee=92,iee=/[\\&]/,kl="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",aee=new RegExp("\\\\"+kl+"|"+Fp,"gi"),oee='[&<>"]',ld=new RegExp(oee,"g"),see=function(r){return r.charCodeAt(0)===nee?r.charAt(1):yl.decodeHTML(r)};function _n(r){return iee.test(r)?r.replace(aee,see):r}function Bi(r){try{return kC(r)}catch{return r}}function lee(r){switch(r){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";default:return r}}function Gr(r){return ld.test(r)?r.replace(ld,lee):r}function Ps(r,e){for(var t=[],n=0;n<e;n++)t.push(r);return t.join("")}function ud(r){return r?!/[^ \t]+/.test(r):!0}var uee=(function(){function r(e){this.current=e,this.root=e,this.entering=!0}return r.prototype.next=function(){var e=this.current,t=this.entering;if(e===null)return null;var n=Cl(e);return t&&n?e.firstChild?(this.current=e.firstChild,this.entering=!0):this.entering=!1:e===this.root?this.current=null:e.next===null?(this.current=e.parent,this.entering=!1):(this.current=e.next,this.entering=!0),{entering:t,node:e}},r.prototype.resumeAt=function(e,t){this.current=e,this.entering=t===!0},r})();function Cl(r){switch(r.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}var cee=1,xa={};function fee(r){return xa[r]}function Hs(r){delete xa[r]}function dee(){xa={}}var Un=(function(){function r(e,t){this.parent=null,this.prev=null,this.next=null,this.firstChild=null,this.lastChild=null,this.literal=null,e==="document"?this.id=-1:this.id=cee++,this.type=e,this.sourcepos=t,xa[this.id]=this}return r.prototype.isContainer=function(){return Cl(this)},r.prototype.unlink=function(){this.prev?this.prev.next=this.next:this.parent&&(this.parent.firstChild=this.next),this.next?this.next.prev=this.prev:this.parent&&(this.parent.lastChild=this.prev),this.parent=null,this.next=null,this.prev=null},r.prototype.replaceWith=function(e){this.insertBefore(e),this.unlink()},r.prototype.insertAfter=function(e){e.unlink(),e.next=this.next,e.next&&(e.next.prev=e),e.prev=this,this.next=e,this.parent&&(e.parent=this.parent,e.next||(e.parent.lastChild=e))},r.prototype.insertBefore=function(e){e.unlink(),e.prev=this.prev,e.prev&&(e.prev.next=e),e.next=this,this.prev=e,e.parent=this.parent,e.prev||(e.parent.firstChild=e)},r.prototype.appendChild=function(e){e.unlink(),e.parent=this,this.lastChild?(this.lastChild.next=e,e.prev=this.lastChild,this.lastChild=e):(this.firstChild=e,this.lastChild=e)},r.prototype.prependChild=function(e){e.unlink(),e.parent=this,this.firstChild?(this.firstChild.prev=e,e.next=this.firstChild,this.firstChild=e):(this.firstChild=e,this.lastChild=e)},r.prototype.walker=function(){return new uee(this)},r})(),Mt=(function(r){Ue(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.open=!0,i.lineOffsets=null,i.stringContent=null,i.lastLineBlank=!1,i.lastLineChecked=!1,i.type=t,i}return e})(Un),hee=(function(r){Ue(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.listData=null,t}return e})(Mt),pee=(function(r){Ue(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.level=0,t.headingType="atx",t}return e})(Mt),vee=(function(r){Ue(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.isFenced=!1,t.fenceChar=null,t.fenceLength=0,t.fenceOffset=-1,t.info=null,t.infoPadding=0,t}return e})(Mt),mee=(function(r){Ue(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.columns=[],t}return e})(Mt),gee=(function(r){Ue(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.startIdx=0,t.endIdx=0,t.paddingLeft=0,t.paddingRight=0,t.ignored=!1,t}return e})(Mt),yee=(function(r){Ue(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.title="",t.dest="",t.label="",t}return e})(Mt),bee=(function(r){Ue(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.syntaxLength=0,t.offset=-1,t.info="",t}return e})(Mt),wee=(function(r){Ue(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.htmlBlockType=-1,t}return e})(Mt),kee=(function(r){Ue(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.destination=null,t.title=null,t.extendedAutolink=!1,t}return e})(Un),Cee=(function(r){Ue(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.tickCount=0,t}return e})(Un),Tee=(function(r){Ue(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.info="",t}return e})(Un);function J(r,e){switch(r){case"heading":return new pee(r,e);case"list":case"item":return new hee(r,e);case"link":case"image":return new kee(r,e);case"codeBlock":return new vee(r,e);case"htmlBlock":return new wee(r,e);case"table":return new mee(r,e);case"tableCell":return new gee(r,e);case"document":case"paragraph":case"blockQuote":case"thematicBreak":case"tableRow":case"tableBody":case"tableHead":case"frontMatter":return new Mt(r,e);case"code":return new Cee(r,e);case"refDef":return new yee(r,e);case"customBlock":return new bee(r,e);case"customInline":return new Tee(r,e);default:return new Un(r,e)}}function qp(r){return r.type==="codeBlock"}function xee(r){return r.type==="htmlBlock"}function Eee(r){return r.type==="heading"}function cd(r){return r.type==="list"}function See(r){return r.type==="table"}function Ur(r){return r.type==="refDef"}function _p(r){return r.type==="customBlock"}function Mee(r){return r.type==="customInline"}function ee(r,e){var t=J("text",e);return t.literal=r,t}var $p="[A-Za-z][A-Za-z0-9-]*",Oee="[a-zA-Z_:][a-zA-Z0-9:._-]*",Lee="[^\"'=<>`\\x00-\\x20]+",Aee="'[^']*'",Nee='"[^"]*"',Dee="(?:"+Lee+"|"+Aee+"|"+Nee+")",Iee="(?:\\s*=\\s*"+Dee+")",Ree="(?:\\s+"+Oee+Iee+"?)",zp="<"+$p+Ree+"*\\s*/?>",Vp="</"+$p+"\\s*[>]",Bee="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Pee="[<][?].*?[?][>]",Hee="<![A-Z]+\\s+[^>]*>",Fee="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",qee="(?:"+zp+"|"+Vp+"|"+Bee+"|"+Pee+"|"+Hee+"|"+Fee+")",_ee=new RegExp("^"+qee,"i");var Fs;String.fromCodePoint?Fs=function(r){try{return String.fromCodePoint(r)}catch(e){if(e instanceof RangeError)return"\uFFFD";throw e}}:(fd=String.fromCharCode,dd=Math.floor,Fs=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=16384,n=[],i,a,o=-1,s=r.length;if(!s)return"";for(var l="";++o<s;){var u=Number(r[o]);if(!isFinite(u)||u<0||u>1114111||dd(u)!==u)return"\uFFFD";u<=65535?n.push(u):(u-=65536,i=(u>>10)+55296,a=u%1024+56320,n.push(i,a)),(o+1===s||n.length>t)&&(l+=fd.apply(void 0,n),n.length=0)}return l});var fd,dd,cs=Fs,$ee="(?:[w-]+.)*[A-Za-z0-9-]+.[A-Za-z0-9-]+",zee="[^<\\s]*[^<?!.,:*_?~\\s]",Vee="[\\w.+-]+@(?:[\\w-]+\\.)+[\\w-]+";function Uee(r){var e=/\)+$/.exec(r);if(e){for(var t=0,n=0,i=r;n<i.length;n++){var a=i[n];a==="("?t<0?t=1:t+=1:a===")"&&(t-=1)}if(t<0){var o=Math.min(-t,e[0].length);return r.substring(0,r.length-o)}}return r}function Wee(r){return r.replace(/&[A-Za-z0-9]+;$/,"")}function jee(r){for(var e=new RegExp(Vee,"g"),t=[],n;n=e.exec(r);){var i=n[0];/[_-]+$/.test(i)||t.push({text:i,range:[n.index,n.index+i.length-1],url:"mailto:"+i})}return t}function Gee(r){for(var e=new RegExp("(www|https?://)."+$ee+zee,"g"),t=[],n;n=e.exec(r);){var i=Wee(Uee(n[0])),a=n[1]==="www"?"http://":"";t.push({text:i,range:[n.index,n.index+i.length-1],url:""+a+i})}return t}function Kee(r){return Rs(Rs([],Gee(r)),jee(r)).sort(function(e,t){return e.range[0]-t.range[0]})}function Jee(r,e){typeof e=="boolean"&&(e=Kee);for(var t,n=function(){var i=t.entering,a=t.node;if(i&&a.type==="text"&&a.parent.type!=="link"){var o=a.literal,s=e(o);if(!s||!s.length)return"continue";for(var l=0,u=a.sourcepos[0],c=u[0],f=u[1],d=function(N,P){return[[c,f+N],[c,f+P]]},h=[],p=0,v=s;p<v.length;p++){var m=v[p],g=m.range,w=m.url,k=m.text;g[0]>l&&h.push(ee(o.substring(l,g[0]),d(l,g[0]-1)));var C=J("link",d.apply(void 0,g));C.appendChild(ee(k,d.apply(void 0,g))),C.destination=w,C.extendedAutolink=!0,h.push(C),l=g[1]+1}l<o.length&&h.push(ee(o.substring(l),d(l,o.length-1)));for(var x=0,L=h;x<L.length;x++){var E=L[x];a.insertBefore(E)}a.unlink()}};t=r.next();)n()}function oa(r){return r[r.length-1]}function hd(r){return r.slice(1,r.length-1).trim().replace(/[ \t\r\n]+/," ").toLowerCase().toUpperCase()}function Pi(r,e){Object.keys(r).forEach(function(t){e(t,r[t])})}function Xee(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var n=he({},r);return e.forEach(function(i){delete n[i]}),n}function Wr(r){return!Object.keys(r).length}function Qee(r){Object.keys(r).forEach(function(e){delete r[e]})}var qs=10,fs=42,Hi=95,Yee=96,pd=91,Zee=93,Fi=126,vd=60,ete=33,md=92,tte=38,gd=40,ds=41,rte=58,lr=39,ur=34,cr=36,hs="\\\\"+kl,yd=new RegExp(/[!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~\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\u0AF0\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-\u2E42\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]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/),nte=new RegExp('^(?:"('+hs+'|[^"\\x00])*"|'+("'("+hs+"|[^'\\x00])*'")+"|"+("\\(("+hs+"|[^()\\x00])*\\))")),ite=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,bd=new RegExp("^"+kl),ate=new RegExp("^"+Fp,"i"),ote=/`+/,ste=/^`+/,lte=/\.\.\./g,ute=/--+/g,cte=/^<([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])?)*)>/,fte=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,dte=/^ *(?:\n *)?/,ps=/^[ \t\n\x0b\x0c\x0d]/,wd=/^\s/,hte=/ *$/,pte=/^ */,kd=/^ *(?:\n|$)/,vte=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/,mte=/^[^\n`\[\]\\!<&*_'"~$]+/m,gte=(function(){function r(e){this.subject="",this.delimiters=null,this.brackets=null,this.pos=0,this.lineStartNum=0,this.lineIdx=0,this.lineOffsets=[0],this.linePosOffset=0,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.options=e}return r.prototype.sourcepos=function(e,t){var n=this.linePosOffset+this.lineOffsets[this.lineIdx],i=this.lineStartNum+this.lineIdx,a=[i,e+n];return typeof t=="number"?[a,[i,t+n]]:a},r.prototype.nextLine=function(){this.lineIdx+=1,this.linePosOffset=-this.pos},r.prototype.match=function(e){var t=e.exec(this.subject.slice(this.pos));return t===null?null:(this.pos+=t.index+t[0].length,t[0])},r.prototype.peek=function(){return this.pos<this.subject.length?this.subject.charCodeAt(this.pos):-1},r.prototype.spnl=function(){return this.match(dte),!0},r.prototype.parseBackticks=function(e){var t=this.pos+1,n=this.match(ste);if(n===null)return!1;for(var i=this.pos,a;(a=this.match(ote))!==null;)if(a===n){var o=this.subject.slice(i,this.pos-n.length),s=this.sourcepos(t,this.pos),l=o.split(`
19`);if(l.length>1){var u=oa(l);this.lineIdx+=l.length-1,this.linePosOffset=-(this.pos-u.length-n.length),s[1]=this.sourcepos(this.pos),o=l.join(" ")}var c=J("code",s);return o.length>0&&o.match(/[^ ]/)!==null&&o[0]==" "&&o[o.length-1]==" "?c.literal=o.slice(1,o.length-1):c.literal=o,c.tickCount=n.length,e.appendChild(c),!0}return this.pos=i,e.appendChild(ee(n,this.sourcepos(t,this.pos-1))),!0},r.prototype.parseBackslash=function(e){var t=this.subject,n;this.pos+=1;var i=this.pos;return this.peek()===qs?(this.pos+=1,n=J("linebreak",this.sourcepos(this.pos-1,this.pos)),e.appendChild(n),this.nextLine()):bd.test(t.charAt(this.pos))?(e.appendChild(ee(t.charAt(this.pos),this.sourcepos(i,this.pos))),this.pos+=1):e.appendChild(ee("\\",this.sourcepos(i,i))),!0},r.prototype.parseAutolink=function(e){var t,n,i,a=this.pos+1;return(t=this.match(cte))?(n=t.slice(1,t.length-1),i=J("link",this.sourcepos(a,this.pos)),i.destination=Bi("mailto:"+n),i.title="",i.appendChild(ee(n,this.sourcepos(a+1,this.pos-1))),e.appendChild(i),!0):(t=this.match(fte))?(n=t.slice(1,t.length-1),i=J("link",this.sourcepos(a,this.pos)),i.destination=Bi(n),i.title="",i.appendChild(ee(n,this.sourcepos(a+1,this.pos-1))),e.appendChild(i),!0):!1},r.prototype.parseHtmlTag=function(e){var t=this.pos+1,n=this.match(_ee);if(n===null)return!1;var i=J("htmlInline",this.sourcepos(t,this.pos));return i.literal=n,e.appendChild(i),!0},r.prototype.scanDelims=function(e){var t=0,n=this.pos;if(e===lr||e===ur)t++,this.pos++;else for(;this.peek()===e;)t++,this.pos++;if(t===0||t<2&&(e===Fi||e===cr))return this.pos=n,null;var i=n===0?`
20`:this.subject.charAt(n-1),a=this.peek(),o;a===-1?o=`
21`:o=cs(a);var s=wd.test(o),l=yd.test(o),u=wd.test(i),c=yd.test(i),f=!s&&(!l||u||c),d=!u&&(!c||s||l),h,p;return e===Hi?(h=f&&(!d||c),p=d&&(!f||l)):e===lr||e===ur?(h=f&&!d,p=d):e===cr?(h=!s,p=!u):(h=f,p=d),this.pos=n,{numdelims:t,canOpen:h,canClose:p}},r.prototype.handleDelim=function(e,t){var n=this.scanDelims(e);if(!n)return!1;var i=n.numdelims,a=this.pos+1,o;this.pos+=i,e===lr?o="\u2019":e===ur?o="\u201C":o=this.subject.slice(a-1,this.pos);var s=ee(o,this.sourcepos(a,this.pos));return t.appendChild(s),(n.canOpen||n.canClose)&&(this.options.smart||e!==lr&&e!==ur)&&(this.delimiters={cc:e,numdelims:i,origdelims:i,node:s,previous:this.delimiters,next:null,canOpen:n.canOpen,canClose:n.canClose},this.delimiters.previous&&(this.delimiters.previous.next=this.delimiters)),!0},r.prototype.removeDelimiter=function(e){e.previous!==null&&(e.previous.next=e.next),e.next===null?this.delimiters=e.previous:e.next.previous=e.previous},r.prototype.removeDelimitersBetween=function(e,t){e.next!==t&&(e.next=t,t.previous=e)},r.prototype.processEmphasis=function(e){var t,n,i,a,o,s,l,u=!1,c=(t={},t[Hi]=[e,e,e],t[fs]=[e,e,e],t[lr]=[e],t[ur]=[e],t[Fi]=[e],t[cr]=[e],t);for(i=this.delimiters;i!==null&&i.previous!==e;)i=i.previous;for(;i!==null;){var f=i.cc,d=f===Hi||f===fs;if(!i.canClose)i=i.next;else{for(n=i.previous,l=!1;n!==null&&n!==e&&n!==c[f][d?i.origdelims%3:0];){if(u=d&&(i.canOpen||n.canClose)&&i.origdelims%3!==0&&(n.origdelims+i.origdelims)%3===0,n.cc===i.cc&&n.canOpen&&!u){l=!0;break}n=n.previous}if(a=i,d||f===Fi||f===cr){if(!l)i=i.next;else if(n){var h=i.numdelims>=2&&n.numdelims>=2?2:1,p=d?0:1;o=n.node,s=i.node;var v=d?h===1?"emph":"strong":"strike";f===cr&&(v="customInline");var m=J(v),g=o.sourcepos[1],w=s.sourcepos[0];m.sourcepos=[[g[0],g[1]-h+1],[w[0],w[1]+h-1]],o.sourcepos[1][1]-=h,s.sourcepos[0][1]+=h,o.literal=o.literal.slice(h),s.literal=s.literal.slice(h),n.numdelims-=h,i.numdelims-=h;for(var k=o.next,C=void 0;k&&k!==s;)C=k.next,k.unlink(),m.appendChild(k),k=C;if(f===cr){var x=m.firstChild,L=x.literal||"",E=L.split(/\s/)[0];m.info=E,L.length<=E.length?x.unlink():(x.sourcepos[0][1]+=E.length,x.literal=L.replace(E+" ",""))}if(o.insertAfter(m),this.removeDelimitersBetween(n,i),n.numdelims<=p&&(n.numdelims===0&&o.unlink(),this.removeDelimiter(n)),i.numdelims<=p){i.numdelims===0&&s.unlink();var N=i.next;this.removeDelimiter(i),i=N}}}else f===lr?(i.node.literal="\u2019",l&&(n.node.literal="\u2018"),i=i.next):f===ur&&(i.node.literal="\u201D",l&&(n.node.literal="\u201C"),i=i.next);l||(c[f][d?a.origdelims%3:0]=a.previous,a.canOpen||this.removeDelimiter(a))}}for(;this.delimiters!==null&&this.delimiters!==e;)this.removeDelimiter(this.delimiters)},r.prototype.parseLinkTitle=function(){var e=this.match(nte);return e===null?null:_n(e.substr(1,e.length-2))},r.prototype.parseLinkDestination=function(){var e=this.match(ite);if(e===null){if(this.peek()===vd)return null;for(var t=this.pos,n=0,i=void 0;(i=this.peek())!==-1;)if(i===md&&bd.test(this.subject.charAt(this.pos+1)))this.pos+=1,this.peek()!==-1&&(this.pos+=1);else if(i===gd)this.pos+=1,n+=1;else if(i===ds){if(n<1)break;this.pos+=1,n-=1}else{if(ps.exec(cs(i))!==null)break;this.pos+=1}return this.pos===t&&i!==ds||n!==0?null:(e=this.subject.substr(t,this.pos-t),Bi(_n(e)))}return Bi(_n(e.substr(1,e.length-2)))},r.prototype.parseLinkLabel=function(){var e=this.match(vte);return e===null||e.length>1001?0:e.length},r.prototype.parseOpenBracket=function(e){var t=this.pos;this.pos+=1;var n=ee("[",this.sourcepos(this.pos,this.pos));return e.appendChild(n),this.addBracket(n,t,!1),!0},r.prototype.parseBang=function(e){var t=this.pos;if(this.pos+=1,this.peek()===pd){this.pos+=1;var n=ee("![",this.sourcepos(this.pos-1,this.pos));e.appendChild(n),this.addBracket(n,t+1,!0)}else{var n=ee("!",this.sourcepos(this.pos,this.pos));e.appendChild(n)}return!0},r.prototype.parseCloseBracket=function(e){var t=null,n=null,i=!1;this.pos+=1;var a=this.pos,o=this.brackets;if(o===null)return e.appendChild(ee("]",this.sourcepos(a,a))),!0;if(!o.active)return e.appendChild(ee("]",this.sourcepos(a,a))),this.removeBracket(),!0;var s=o.image,l=this.pos;this.peek()===gd&&(this.pos++,this.spnl()&&(t=this.parseLinkDestination())!==null&&this.spnl()&&(ps.test(this.subject.charAt(this.pos-1))&&(n=this.parseLinkTitle())||!0)&&this.spnl()&&this.peek()===ds?(this.pos+=1,i=!0):this.pos=l);var u="";if(!i){var c=this.pos,f=this.parseLinkLabel();if(f>2?u=this.subject.slice(c,c+f):o.bracketAfter||(u=this.subject.slice(o.index,a)),f===0&&(this.pos=l),u){u=hd(u);var d=this.refMap[u];d&&(t=d.destination,n=d.title,i=!0)}}if(i){var h=J(s?"image":"link");h.destination=t,h.title=n||"",h.sourcepos=[o.startpos,this.sourcepos(this.pos)];for(var p=o.node.next,v=void 0;p;)v=p.next,p.unlink(),h.appendChild(p),p=v;if(e.appendChild(h),this.processEmphasis(o.previousDelimiter),this.removeBracket(),o.node.unlink(),!s)for(o=this.brackets;o!==null;)o.image||(o.active=!1),o=o.previous;return this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:u}),!0}return this.removeBracket(),this.pos=a,e.appendChild(ee("]",this.sourcepos(a,a))),this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:u}),!0},r.prototype.addBracket=function(e,t,n){this.brackets!==null&&(this.brackets.bracketAfter=!0),this.brackets={node:e,startpos:this.sourcepos(t+(n?0:1)),previous:this.brackets,previousDelimiter:this.delimiters,index:t,image:n,active:!0}},r.prototype.removeBracket=function(){this.brackets&&(this.brackets=this.brackets.previous)},r.prototype.parseEntity=function(e){var t,n=this.pos+1;return(t=this.match(ate))?(e.appendChild(ee(yl.decodeHTML(t),this.sourcepos(n,this.pos))),!0):!1},r.prototype.parseString=function(e){var t,n=this.pos+1;if(t=this.match(mte)){if(this.options.smart){var i=t.replace(lte,"\u2026").replace(ute,function(o){var s=0,l=0;return o.length%3===0?l=o.length/3:o.length%2===0?s=o.length/2:o.length%3===2?(s=1,l=(o.length-2)/3):(s=2,l=(o.length-4)/3),Ps("\u2014",l)+Ps("\u2013",s)});e.appendChild(ee(i,this.sourcepos(n,this.pos)))}else{var a=ee(t,this.sourcepos(n,this.pos));e.appendChild(a)}return!0}return!1},r.prototype.parseNewline=function(e){this.pos+=1;var t=e.lastChild;if(t&&t.type==="text"&&t.literal[t.literal.length-1]===" "){var n=t.literal[t.literal.length-2]===" ",i=t.literal.length;t.literal=t.literal.replace(hte,"");var a=i-t.literal.length;t.sourcepos[1][1]-=a,e.appendChild(J(n?"linebreak":"softbreak",this.sourcepos(this.pos-a,this.pos)))}else e.appendChild(J("softbreak",this.sourcepos(this.pos,this.pos)));return this.nextLine(),this.match(pte),!0},r.prototype.parseReference=function(e,t){if(!this.options.referenceDefinition)return 0;this.subject=e.stringContent,this.pos=0;var n=null,i=this.pos,a=this.parseLinkLabel();if(a===0)return 0;var o=this.subject.substr(0,a);if(this.peek()===rte)this.pos++;else return this.pos=i,0;this.spnl();var s=this.parseLinkDestination();if(s===null)return this.pos=i,0;var l=this.pos;this.spnl(),this.pos!==l&&(n=this.parseLinkTitle()),n===null&&(n="",this.pos=l);var u=!0;if(this.match(kd)===null&&(n===""?u=!1:(n="",this.pos=l,u=this.match(kd)!==null)),!u)return this.pos=i,0;var c=hd(o);if(c==="")return this.pos=i,0;var f=this.getReferenceDefSourcepos(e);e.sourcepos[0][0]=f[1][0]+1;var d=J("refDef",f);return d.title=n,d.dest=s,d.label=c,e.insertBefore(d),t[c]?this.refDefCandidateMap[d.id]=d:t[c]=zs(d),this.pos-i},r.prototype.mergeTextNodes=function(e){for(var t,n=[];t=e.next();){var i=t.entering,a=t.node;if(i&&a.type==="text")n.push(a);else if(n.length===1)n=[];else if(n.length>1){var o=n[0],s=n[n.length-1];o.sourcepos&&s.sourcepos&&(o.sourcepos[1]=s.sourcepos[1]),o.next=s.next,o.next&&(o.next.prev=o);for(var l=1;l<n.length;l+=1)o.literal+=n[l].literal,n[l].unlink();n=[]}}},r.prototype.getReferenceDefSourcepos=function(e){for(var t=e.stringContent.split(/\n|\r\n/),n=!1,i=0,a={line:0,ch:0},o=0;o<t.length;o+=1){var s=t[o];if(ps.test(s))break;if(/\:/.test(s)&&i===0){if(n)break;var l=s.indexOf(":")===s.length-1?o+1:o;a={line:l,ch:t[l].length},n=!0}var u=s.match(/'|"/g);if(u&&(i+=u.length),i===2){a={line:o,ch:s.length};break}}return[[e.sourcepos[0][0],e.sourcepos[0][1]],[e.sourcepos[0][0]+a.line,a.ch]]},r.prototype.parseInline=function(e){var t,n=!1,i=this.peek();if(i===-1)return!1;switch(i){case qs:n=this.parseNewline(e);break;case md:n=this.parseBackslash(e);break;case Yee:n=this.parseBackticks(e);break;case fs:case Hi:case Fi:case cr:n=this.handleDelim(i,e);break;case lr:case ur:n=!!(!((t=this.options)===null||t===void 0)&&t.smart)&&this.handleDelim(i,e);break;case pd:n=this.parseOpenBracket(e);break;case ete:n=this.parseBang(e);break;case Zee:n=this.parseCloseBracket(e);break;case vd:n=this.parseAutolink(e)||this.parseHtmlTag(e);break;case tte:e.disabledEntityParse||(n=this.parseEntity(e));break;default:n=this.parseString(e);break}return n||(this.pos+=1,e.appendChild(ee(cs(i),this.sourcepos(this.pos,this.pos+1)))),!0},r.prototype.parse=function(e){for(this.subject=e.stringContent.trim(),this.pos=0,this.delimiters=null,this.brackets=null,this.lineOffsets=e.lineOffsets||[0],this.lineIdx=0,this.linePosOffset=0,this.lineStartNum=e.sourcepos[0][0],Eee(e)&&(this.lineOffsets[0]+=e.level+1);this.parseInline(e););e.stringContent=null,this.processEmphasis(null),this.mergeTextNodes(e.walker());var t=this.options,n=t.extendedAutolinks,i=t.customParser;if(n&&Jee(e.walker(),n),i&&e.firstChild)for(var a,o=e.firstChild.walker();a=o.next();){var s=a.node,l=a.entering;i[s.type]&&i[s.type](s,{entering:l,options:this.options})}},r})(),yte=/^\[([ \txX])\][ \t]+/;function bte(r,e){if(e.firstChild&&e.firstChild.type==="paragraph"){var t=e.firstChild,n=t.stringContent.match(yte);if(n){var i=n[0].length;t.stringContent=t.stringContent.substring(i-1),t.sourcepos[0][1]+=i,t.lineOffsets[0]+=i,e.listData.task=!0,e.listData.checked=/[xX]/.test(n[1])}}}var wte={continue:function(){return 0},finalize:function(){},canContain:function(r){return r==="tableHead"||r==="tableBody"},acceptsLines:!1},kte={continue:function(){return 0},finalize:function(){},canContain:function(r){return r==="tableRow"},acceptsLines:!1},Cte={continue:function(){return 1},finalize:function(){},canContain:function(r){return r==="tableRow"||r==="tableDelimRow"},acceptsLines:!1},Tte={continue:function(){return 1},finalize:function(){},canContain:function(r){return r==="tableDelimCell"},acceptsLines:!1},xte={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},Ete={continue:function(){return 1},finalize:function(){},canContain:function(r){return r==="tableCell"},acceptsLines:!1},Ste={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},sa=4,Up=9,Wp=62,Mte=60,jp=32,Gp=91,Kp=/[^ \t\f\v\r\n]/,Ote=/^(?:`{3,}|~{3,})(?= *$)/;function Cd(r){for(var e=r;e;){if(e.lastLineBlank)return!0;var t=e.type;if(!e.lastLineChecked&&(t==="list"||t==="item"))e.lastLineChecked=!0,e=e.lastChild;else{e.lastLineChecked=!0;break}}return!1}function Be(r,e){return e<r.length?r.charCodeAt(e):-1}function Jp(r){return!Kp.test(r)}function rn(r){return r===jp||r===Up}var Lte=/^\$\$$/,Ate={continue:function(r,e){var t=r.currentLine,n=t.match(Lte);if(n)return r.lastLineLength=n[0].length,r.finalize(e,r.lineNumber),2;for(var i=e.offset;i>0&&rn(Be(t,r.offset));)r.advanceOffset(1,!0),i--;return 0},finalize:function(r,e){if(e.stringContent!==null){var t=e.stringContent,n=t.indexOf(`
22`),i=t.slice(0,n),a=t.slice(n+1),o=i.match(/^(\s*)(.*)/);e.info=_n(o[2].trim()),e.literal=a,e.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},Xp={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!0},Nte={continue:function(){return 0},finalize:function(){},canContain:function(r){return r!=="item"},acceptsLines:!1},Dte={continue:function(){return 0},finalize:function(r,e){for(var t=e.firstChild;t;){if(Cd(t)&&t.next){e.listData.tight=!1;break}for(var n=t.firstChild;n;){if(Cd(n)&&(t.next||n.next)){e.listData.tight=!1;break}n=n.next}t=t.next}},canContain:function(r){return r==="item"},acceptsLines:!1},Ite={continue:function(r){var e=r.currentLine;if(!r.indented&&Be(e,r.nextNonspace)===Wp)r.advanceNextNonspace(),r.advanceOffset(1,!1),rn(Be(e,r.offset))&&r.advanceOffset(1,!0);else return 1;return 0},finalize:function(){},canContain:function(r){return r!=="item"},acceptsLines:!1},Rte={continue:function(r,e){if(r.blank){if(e.firstChild===null)return 1;r.advanceNextNonspace()}else if(r.indent>=e.listData.markerOffset+e.listData.padding)r.advanceOffset(e.listData.markerOffset+e.listData.padding,!0);else return 1;return 0},finalize:bte,canContain:function(r){return r!=="item"},acceptsLines:!1},Bte={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},Pte={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},Hte={continue:function(r,e){var t=r.currentLine,n=r.indent;if(e.isFenced){var i=n<=3&&t.charAt(r.nextNonspace)===e.fenceChar&&t.slice(r.nextNonspace).match(Ote);if(i&&i[0].length>=e.fenceLength)return r.lastLineLength=r.offset+n+i[0].length,r.finalize(e,r.lineNumber),2;for(var a=e.fenceOffset;a>0&&rn(Be(t,r.offset));)r.advanceOffset(1,!0),a--}else if(n>=sa)r.advanceOffset(sa,!0);else if(r.blank)r.advanceNextNonspace();else return 1;return 0},finalize:function(r,e){var t;if(e.stringContent!==null){if(e.isFenced){var n=e.stringContent,i=n.indexOf(`
23`),a=n.slice(0,i),o=n.slice(i+1),s=a.match(/^(\s*)(.*)/);e.infoPadding=s[1].length,e.info=_n(s[2].trim()),e.literal=o}else e.literal=(t=e.stringContent)===null||t===void 0?void 0:t.replace(/(\n *)+$/,`
24`);e.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},Fte={continue:function(r,e){return r.blank&&(e.htmlBlockType===6||e.htmlBlockType===7)?1:0},finalize:function(r,e){var t;e.literal=((t=e.stringContent)===null||t===void 0?void 0:t.replace(/(\n *)+$/,""))||null,e.stringContent=null},canContain:function(){return!1},acceptsLines:!0},qte={continue:function(r){return r.blank?1:0},finalize:function(r,e){if(e.stringContent!==null){for(var t,n=!1;Be(e.stringContent,0)===Gp&&(t=r.inlineParser.parseReference(e,r.refMap));)e.stringContent=e.stringContent.slice(t),n=!0;n&&Jp(e.stringContent)&&e.unlink()}},canContain:function(){return!1},acceptsLines:!0},_te=Xp,$te=Xp,jr={document:Nte,list:Dte,blockQuote:Ite,item:Rte,heading:Bte,thematicBreak:Pte,codeBlock:Hte,htmlBlock:Fte,paragraph:qte,table:wte,tableBody:kte,tableHead:Cte,tableRow:Ete,tableCell:Ste,tableDelimRow:Tte,tableDelimCell:xte,refDef:_te,customBlock:Ate,frontMatter:$te};function _s(r){for(var e=0,t=0,n=[],i=0;i<r.length;i+=1)if(r[i]==="|"&&r[i-1]!=="\\"){var a=r.substring(e,i);e===0&&ud(a)?t=i+1:n.push(a),e=i+1}if(e<r.length){var a=r.substring(e,r.length);ud(a)||n.push(a)}return[t,n]}function $s(r,e,t,n){for(var i=[],a=0,o=e;a<o.length;a++){var s=o[a],l=s.match(/^[ \t]+/),u=l?l[0].length:0,c=void 0,f=void 0;if(u===s.length)u=0,c=0,f="";else{var d=s.match(/[ \t]+$/);c=d?d[0].length:0,f=s.slice(u,s.length-c)}var h=n+u,p=J(r,[[t,n],[t,n+s.length-1]]);p.stringContent=f.replace(/\\\|/g,"|"),p.startIdx=i.length,p.endIdx=i.length,p.lineOffsets=[h-1],p.paddingLeft=u,p.paddingRight=c,i.push(p),n+=s.length+1}return i}function zte(r){var e=null,t=r.stringContent,n=t[0],i=t[t.length-1];return i===":"?e=n===":"?"center":"right":n===":"&&(e="left"),{align:e}}var Vte=function(r,e){var t=e.stringContent;if(e.type==="paragraph"&&!r.indented&&!r.blank){var n=t.length-1,i=t.lastIndexOf(`
25`,n-1)+1,a=t.slice(i,n),o=r.currentLine.slice(r.nextNonspace),s=_s(a),l=s[0],u=s[1],c=_s(o),f=c[0],d=c[1],h=/^[ \t]*:?-+:?[ \t]*$/;if(!u.length||!d.length||d.some(function(N){return!h.test(N)})||d.length===1&&o.indexOf("|")!==0)return 0;var p=e.lineOffsets,v=r.lineNumber-1,m=oa(p)+1,g=J("table",[[v,m],[r.lineNumber,r.offset]]);if(g.columns=d.map(function(){return{align:null}}),e.insertAfter(g),p.length===1)e.unlink();else{e.stringContent=t.slice(0,i);var w=t.lastIndexOf(`
26`,i-2)+1,k=i-w-1;r.lastLineLength=p[p.length-2]+k,r.finalize(e,v-1)}r.advanceOffset(r.currentLine.length-r.offset,!1);var C=J("tableHead",[[v,m],[r.lineNumber,r.offset]]);g.appendChild(C);var x=J("tableRow",[[v,m],[v,m+a.length-1]]),L=J("tableDelimRow",[[r.lineNumber,r.nextNonspace+1],[r.lineNumber,r.offset]]);C.appendChild(x),C.appendChild(L),$s("tableCell",u,v,m+l).forEach(function(N){x.appendChild(N)});var E=$s("tableDelimCell",d,r.lineNumber,r.nextNonspace+1+f);return E.forEach(function(N){L.appendChild(N)}),g.columns=E.map(zte),r.tip=g,2}return 0},Ute=function(r,e){if(e.type!=="table"&&e.type!=="tableBody"||!r.blank&&r.currentLine.indexOf("|")===-1)return 0;if(r.advanceOffset(r.currentLine.length-r.offset,!1),r.blank){var t=e;return e.type==="tableBody"&&(t=e.parent,r.finalize(e,r.lineNumber-1)),r.finalize(t,r.lineNumber-1),0}var n=e;e.type==="table"&&(n=r.addChild("tableBody",r.nextNonspace),n.stringContent=null);var i=J("tableRow",[[r.lineNumber,r.nextNonspace+1],[r.lineNumber,r.currentLine.length]]);n.appendChild(i);var a=n.parent,o=r.currentLine.slice(r.nextNonspace),s=_s(o),l=s[0],u=s[1];return $s("tableCell",u,r.lineNumber,r.nextNonspace+1+l).forEach(function(c,f){f>=a.columns.length&&(c.ignored=!0),i.appendChild(c)}),2},Wte=/^(\$\$)(\s*[a-zA-Z])+/,jte=/^(\$\$)(\s*[a-zA-Z])+.*(\$\$)/,Gte=function(r){var e;if(!r.indented&&!jte.test(r.currentLine)&&(e=r.currentLine.match(Wte))){var t=e[1].length;r.closeUnmatchedBlocks();var n=r.addChild("customBlock",r.nextNonspace);return n.syntaxLength=t,n.offset=r.indent,r.advanceNextNonspace(),r.advanceOffset(t,!1),2}return 0},Kte=/^`{3,}(?!.*`)|^~{3,}/,Jte=[/./,/^<(?:script|pre|style)(?:\s|>|$)/i,/^<!--/,/^<[?]/,/^<![A-Z]/,/^<!\[CDATA\[/,/^<[/]?(?: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|h[123456]|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)(?:\s|[/]?[>]|$)/i,new RegExp("^(?:"+zp+"|"+Vp+")\\s*$","i")],Xte=/^(?:=+|-+)[ \t]*$/,Qte=/^#{1,6}(?:[ \t]+|$)/,Yte=/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})[ \t]*$/,Qp=/^[*+-]/,Yp=/^(\d{1,9})([.)])/;function Zte(r,e){var t=r.currentLine.slice(r.nextNonspace),n,i,a={type:"bullet",tight:!0,bulletChar:"",start:0,delimiter:"",padding:0,markerOffset:r.indent,task:!1,checked:!1};if(r.indent>=4)return null;if(n=t.match(Qp))a.type="bullet",a.bulletChar=n[0][0];else if((n=t.match(Yp))&&(e.type!=="paragraph"||n[1]==="1"))a.type="ordered",a.start=parseInt(n[1],10),a.delimiter=n[2];else return null;if(i=Be(r.currentLine,r.nextNonspace+n[0].length),!(i===-1||i===Up||i===jp)||e.type==="paragraph"&&!r.currentLine.slice(r.nextNonspace+n[0].length).match(Kp))return null;r.advanceNextNonspace(),r.advanceOffset(n[0].length,!0);var o=r.column,s=r.offset;do r.advanceOffset(1,!0),i=Be(r.currentLine,r.offset);while(r.column-o<5&&rn(i));var l=Be(r.currentLine,r.offset)===-1,u=r.column-o;return u>=5||u<1||l?(a.padding=n[0].length+1,r.column=o,r.offset=s,rn(Be(r.currentLine,r.offset))&&r.advanceOffset(1,!0)):a.padding=n[0].length+u,a}function ere(r,e){return r.type===e.type&&r.delimiter===e.delimiter&&r.bulletChar===e.bulletChar}function Zp(r,e){return r.options.disallowDeepHeading&&(e.type==="blockQuote"||e.type==="item")}var tre=function(r){return!r.indented&&Be(r.currentLine,r.nextNonspace)===Wp?(r.advanceNextNonspace(),r.advanceOffset(1,!1),rn(Be(r.currentLine,r.offset))&&r.advanceOffset(1,!0),r.closeUnmatchedBlocks(),r.addChild("blockQuote",r.nextNonspace),1):0},rre=function(r,e){var t;if(!r.indented&&!Zp(r,e)&&(t=r.currentLine.slice(r.nextNonspace).match(Qte))){r.advanceNextNonspace(),r.advanceOffset(t[0].length,!1),r.closeUnmatchedBlocks();var n=r.addChild("heading",r.nextNonspace);return n.level=t[0].trim().length,n.headingType="atx",n.stringContent=r.currentLine.slice(r.offset).replace(/^[ \t]*#+[ \t]*$/,"").replace(/[ \t]+#+[ \t]*$/,""),r.advanceOffset(r.currentLine.length-r.offset),2}return 0},nre=function(r){var e;if(!r.indented&&(e=r.currentLine.slice(r.nextNonspace).match(Kte))){var t=e[0].length;r.closeUnmatchedBlocks();var n=r.addChild("codeBlock",r.nextNonspace);return n.isFenced=!0,n.fenceLength=t,n.fenceChar=e[0][0],n.fenceOffset=r.indent,r.advanceNextNonspace(),r.advanceOffset(t,!1),2}return 0},ire=function(r,e){if(!r.indented&&Be(r.currentLine,r.nextNonspace)===Mte){var t=r.currentLine.slice(r.nextNonspace),n=r.options.disallowedHtmlBlockTags,i=void 0;for(i=1;i<=7;i++){var a=t.match(Jte[i]);if(a){if(i===7){if(e.type==="paragraph")return 0;if(n.length>0){var o=new RegExp("</?(?:"+n.join("|")+")","i");if(o.test(a[0]))return 0}}r.closeUnmatchedBlocks();var s=r.addChild("htmlBlock",r.offset);return s.htmlBlockType=i,2}}}return 0},are=function(r,e){var t;if(e.stringContent!==null&&!r.indented&&e.type==="paragraph"&&!Zp(r,e.parent)&&(t=r.currentLine.slice(r.nextNonspace).match(Xte))){r.closeUnmatchedBlocks();for(var n=void 0;Be(e.stringContent,0)===Gp&&(n=r.inlineParser.parseReference(e,r.refMap));)e.stringContent=e.stringContent.slice(n);if(e.stringContent.length>0){var i=J("heading",e.sourcepos);return i.level=t[0][0]==="="?1:2,i.headingType="setext",i.stringContent=e.stringContent,e.insertAfter(i),e.unlink(),r.tip=i,r.advanceOffset(r.currentLine.length-r.offset,!1),2}return 0}return 0},ore=function(r){return!r.indented&&Yte.test(r.currentLine.slice(r.nextNonspace))?(r.closeUnmatchedBlocks(),r.addChild("thematicBreak",r.nextNonspace),r.advanceOffset(r.currentLine.length-r.offset,!1),2):0},sre=function(r,e){var t,n=e;return(!r.indented||e.type==="list")&&(t=Zte(r,n))?(r.closeUnmatchedBlocks(),(r.tip.type!=="list"||!ere(n.listData,t))&&(n=r.addChild("list",r.nextNonspace),n.listData=t),n=r.addChild("item",r.nextNonspace),n.listData=t,1):0},lre=function(r){return r.indented&&r.tip.type!=="paragraph"&&!r.blank?(r.advanceOffset(sa,!0),r.closeUnmatchedBlocks(),r.addChild("codeBlock",r.offset),2):0},vs=[tre,rre,nre,ire,are,ore,sre,lre,Vte,Ute,Gte],ev=/^(-{3}|\+{3}|;{3})$/,ure=function(r,e){var t=r.currentLine,n=r.lineNumber,i=r.indented;if(n===1&&!i&&e.type==="document"&&ev.test(t)){r.closeUnmatchedBlocks();var a=r.addChild("frontMatter",r.nextNonspace);return a.stringContent=t,r.advanceNextNonspace(),r.advanceOffset(t.length,!1),2}return 0},cre={continue:function(r,e){var t=r.currentLine,n=t.match(ev);return e.type==="frontMatter"&&n?(e.stringContent+=t,r.lastLineLength=n[0].length,r.finalize(e,r.lineNumber),2):0},finalize:function(r,e){e.stringContent!==null&&(e.literal=e.stringContent,e.stringContent=null)},canContain:function(){return!1},acceptsLines:!0},fre=[/./,/<\/(?:script|pre|style)>/i,/-->/,/\?>/,/>/,/\]\]>/],dre=/^[#`~*+_=<>0-9-;$]/,hre=/\r\n|\n|\r/;function ms(){return J("document",[[1,1],[0,0]])}var pre={smart:!1,tagFilter:!1,extendedAutolinks:!1,disallowedHtmlBlockTags:[],referenceDefinition:!1,disallowDeepHeading:!1,customParser:null,frontMatter:!1},vre=(function(){function r(e){this.options=he(he({},pre),e),this.doc=ms(),this.tip=this.doc,this.oldtip=this.doc,this.lineNumber=0,this.offset=0,this.column=0,this.nextNonspace=0,this.nextNonspaceColumn=0,this.indent=0,this.currentLine="",this.indented=!1,this.blank=!1,this.partiallyConsumedTab=!1,this.allClosed=!0,this.lastMatchedContainer=this.doc,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.lastLineLength=0,this.lines=[],this.options.frontMatter&&(jr.frontMatter=cre,vs.unshift(ure)),this.inlineParser=new gte(this.options)}return r.prototype.advanceOffset=function(e,t){t===void 0&&(t=!1);for(var n=this.currentLine,i,a,o;e>0&&(o=n[this.offset]);)o==="	"?(i=4-this.column%4,t?(this.partiallyConsumedTab=i>e,a=i>e?e:i,this.column+=a,this.offset+=this.partiallyConsumedTab?0:1,e-=a):(this.partiallyConsumedTab=!1,this.column+=i,this.offset+=1,e-=1)):(this.partiallyConsumedTab=!1,this.offset+=1,this.column+=1,e-=1)},r.prototype.advanceNextNonspace=function(){this.offset=this.nextNonspace,this.column=this.nextNonspaceColumn,this.partiallyConsumedTab=!1},r.prototype.findNextNonspace=function(){for(var e=this.currentLine,t=this.offset,n=this.column,i;(i=e.charAt(t))!=="";)if(i===" ")t++,n++;else if(i==="	")t++,n+=4-n%4;else break;this.blank=i===`
27`||i==="\r"||i==="",this.nextNonspace=t,this.nextNonspaceColumn=n,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=sa},r.prototype.addLine=function(){if(this.partiallyConsumedTab){this.offset+=1;var e=4-this.column%4;this.tip.stringContent+=Ps(" ",e)}this.tip.lineOffsets?this.tip.lineOffsets.push(this.offset):this.tip.lineOffsets=[this.offset],this.tip.stringContent+=this.currentLine.slice(this.offset)+`
28`},r.prototype.addChild=function(e,t){for(;!jr[this.tip.type].canContain(e);)this.finalize(this.tip,this.lineNumber-1);var n=t+1,i=J(e,[[this.lineNumber,n],[0,0]]);return i.stringContent="",this.tip.appendChild(i),this.tip=i,i},r.prototype.closeUnmatchedBlocks=function(){if(!this.allClosed){for(;this.oldtip!==this.lastMatchedContainer;){var e=this.oldtip.parent;this.finalize(this.oldtip,this.lineNumber-1),this.oldtip=e}this.allClosed=!0}},r.prototype.finalize=function(e,t){var n=e.parent;e.open=!1,e.sourcepos[1]=[t,this.lastLineLength],jr[e.type].finalize(this,e),this.tip=n},r.prototype.processInlines=function(e){var t,n=this.options.customParser,i=e.walker();for(this.inlineParser.refMap=this.refMap,this.inlineParser.refLinkCandidateMap=this.refLinkCandidateMap,this.inlineParser.refDefCandidateMap=this.refDefCandidateMap,this.inlineParser.options=this.options;t=i.next();){var a=t.node,o=t.entering,s=a.type;n&&n[s]&&n[s](a,{entering:o,options:this.options}),!o&&(s==="paragraph"||s==="heading"||s==="tableCell"&&!a.ignored)&&this.inlineParser.parse(a)}},r.prototype.incorporateLine=function(e){var t=this.doc;this.oldtip=this.tip,this.offset=0,this.column=0,this.blank=!1,this.partiallyConsumedTab=!1,this.lineNumber+=1,e.indexOf("\0")!==-1&&(e=e.replace(/\0/g,"\uFFFD")),this.currentLine=e;for(var n=!0,i;(i=t.lastChild)&&i.open;){switch(t=i,this.findNextNonspace(),jr[t.type].continue(this,t)){case 0:break;case 1:n=!1;break;case 2:this.lastLineLength=e.length;return;default:throw new Error("continue returned illegal value, must be 0, 1, or 2")}if(!n){t=t.parent;break}}this.allClosed=t===this.oldtip,this.lastMatchedContainer=t;for(var a=t.type!=="paragraph"&&jr[t.type].acceptsLines,o=vs.length;!a;){if(this.findNextNonspace(),t.type!=="table"&&t.type!=="tableBody"&&t.type!=="paragraph"&&!this.indented&&!dre.test(e.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var s=0;s<o;){var l=vs[s](this,t);if(l===1){t=this.tip;break}else if(l===2){t=this.tip,a=!0;break}else s++}if(s===o){this.advanceNextNonspace();break}}if(!this.allClosed&&!this.blank&&this.tip.type==="paragraph")this.addLine();else{this.closeUnmatchedBlocks(),this.blank&&t.lastChild&&(t.lastChild.lastLineBlank=!0);for(var u=t.type,c=this.blank&&!(u==="blockQuote"||qp(t)&&t.isFenced||u==="item"&&!t.firstChild&&t.sourcepos[0][0]===this.lineNumber),f=t;f;)f.lastLineBlank=c,f=f.parent;jr[u].acceptsLines?(this.addLine(),xee(t)&&t.htmlBlockType>=1&&t.htmlBlockType<=5&&fre[t.htmlBlockType].test(this.currentLine.slice(this.offset))&&(this.lastLineLength=e.length,this.finalize(t,this.lineNumber))):this.offset<e.length&&!this.blank&&(t=this.addChild("paragraph",this.offset),this.advanceNextNonspace(),this.addLine())}this.lastLineLength=e.length},r.prototype.parse=function(e,t){this.doc=ms(),this.tip=this.doc,this.lineNumber=0,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";var n=e.split(hre),i=n.length;this.lines=t||n,this.options.referenceDefinition&&this.clearRefMaps(),e.charCodeAt(e.length-1)===qs&&(i-=1);for(var a=0;a<i;a++)this.incorporateLine(n[a]);for(;this.tip;)this.finalize(this.tip,i);return this.processInlines(this.doc),this.doc},r.prototype.partialParseStart=function(e,t){this.doc=ms(),this.tip=this.doc,this.lineNumber=e-1,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";for(var n=t.length,i=0;i<n;i++)this.incorporateLine(t[i]);return this.doc},r.prototype.partialParseExtends=function(e){for(var t=0;t<e.length;t++)this.incorporateLine(e[t])},r.prototype.partialParseFinish=function(){for(;this.tip;)this.finalize(this.tip,this.lineNumber);this.processInlines(this.doc)},r.prototype.setRefMaps=function(e,t,n){this.refMap=e,this.refLinkCandidateMap=t,this.refDefCandidateMap=n},r.prototype.clearRefMaps=function(){[this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(e){Qee(e)})},r})();function Td(r,e){return r[0]<e[0]?1:r[0]>e[0]?-1:r[1]<e[1]?1:r[1]>e[1]?-1:0}function mre(r,e){var t=r[0],n=r[1];return Td(n,e)===1?1:Td(t,e)===-1?-1:0}function gre(r,e){if(!(r.parent!==e.parent||r===e)){for(var t=r.next;t&&t!==e;){for(var n=t.next,i=0,a=["parent","prev","next"];i<a.length;i++){var o=a[i];t[o]&&(Hs(t[o].id),t[o]=null)}t=n}r.next=e.next,e.next?e.next.prev=r:r.parent.lastChild=r}}function yre(r){for(var e=[],t=r.firstChild;t;)e.push(t),t=t.next;return e}function xd(r,e){for(var t=0,n=e;t<n.length;t++){var i=n[t];r.insertBefore(i)}}function bre(r,e){for(var t=e.length-1;t>=0;t-=1)r.prependChild(e[t])}function wre(r,e){if(!(!r||!r.parent||e===0)){var t=r.parent.walker();t.resumeAt(r,!0);for(var n;n=t.next();){var i=n.node,a=n.entering;a&&(i.sourcepos[0][0]+=e,i.sourcepos[1][0]+=e)}}}function tv(r,e){var t=r[0],n=r[1];return n[0]<e?1:t[0]>e?-1:0}function qi(r,e){for(var t=r.firstChild;t;){var n=tv(t.sourcepos,e);if(n===0)return t;if(n===-1)return t.prev||t;t=t.next}return r.lastChild}function kre(r){for(;r.lastChild;)r=r.lastChild;return r}function Cre(r){for(;r.parent&&r.parent.type!=="document"&&r.parent.sourcepos[0][0]===r.sourcepos[0][0];)r=r.parent;return r}function Tre(r,e){for(var t=r.firstChild,n=null;t;){var i=tv(t.sourcepos,e);if(i===0){if(t.sourcepos[0][0]===e||!t.firstChild)return t;n=t,t=t.firstChild}else{if(i===-1)break;n=t,t=t.next}}return n?Cre(kre(n)):null}function xre(r,e){for(var t=r,n=null;t;){var i=mre(t.sourcepos,e);if(i===0)if(t.firstChild)n=t,t=t.firstChild;else return t;else{if(i===-1)return n;if(t.next)t=t.next;else return n}}return t}function rv(r){return fee(r)||null}function gs(r,e,t){if(t===void 0&&(t=null),e)for(var n=e.walker();e&&e!==t;){r(e);var i=n.next();if(i)e=i.node;else break}}function Ere(r){var e=rv(r);if(!e)return!0;for(;e&&e.type!=="document";){if(!e.parent&&!e.prev&&!e.next)return!0;e=e.parent}return!1}var Ed=/\r\n|\n|\r/;function Sre(r){var e=r.match(/^[ \t]+/);if(e&&(e[0].length>=2||/\t/.test(e[0])))return!0;var t=e?r.slice(e.length):r;return Qp.test(t)||Yp.test(t)}function Mre(r){return!Jp(r)&&r.indexOf("|")!==-1}function zs(r){var e=r.id,t=r.title,n=r.sourcepos,i=r.dest;return{id:e,title:t,sourcepos:n,unlinked:!1,destination:i}}var nv=(function(){function r(e,t){this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.referenceDefinition=!!t?.referenceDefinition,this.parser=new vre(t),this.parser.setRefMaps(this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap),this.eventHandlerMap={change:[]},e=e||"",this.lineTexts=e.split(Ed),this.root=this.parser.parse(e,this.lineTexts)}return r.prototype.updateLineTexts=function(e,t,n){var i,a=e[0],o=e[1],s=t[0],l=t[1],u=n.split(Ed),c=u.length,f=this.lineTexts[a-1],d=this.lineTexts[s-1];u[0]=f.slice(0,o-1)+u[0],u[c-1]=u[c-1]+d.slice(l-1);var h=s-a+1;return(i=this.lineTexts).splice.apply(i,Rs([a-1,h],u)),c-h},r.prototype.updateRootNodeState=function(){if(this.lineTexts.length===1&&this.lineTexts[0]===""){this.root.lastLineBlank=!0,this.root.sourcepos=[[1,1],[1,0]];return}this.root.lastChild&&(this.root.lastLineBlank=this.root.lastChild.lastLineBlank);for(var e=this.lineTexts,t=e.length-1;e[t]==="";)t-=1;e.length-2>t&&(t+=1),this.root.sourcepos[1]=[t+1,e[t].length]},r.prototype.replaceRangeNodes=function(e,t,n){e?(xd(e,n),gre(e,t),[e.id,t.id].forEach(function(i){return Hs(i)}),e.unlink()):t?(xd(t,n),Hs(t.id),t.unlink()):bre(this.root,n)},r.prototype.getNodeRange=function(e,t){var n=qi(this.root,e[0]),i=qi(this.root,t[0]);return i&&i.next&&t[0]+1===i.next.sourcepos[0][0]&&(i=i.next),[n,i]},r.prototype.trigger=function(e,t){this.eventHandlerMap[e].forEach(function(n){n(t)})},r.prototype.extendEndLine=function(e){for(;this.lineTexts[e]==="";)e+=1;return e},r.prototype.parseRange=function(e,t,n,i){e&&e.prev&&(cd(e.prev)&&Sre(this.lineTexts[n-1])||See(e.prev)&&Mre(this.lineTexts[n-1]))&&(e=e.prev,n=e.sourcepos[0][0]);for(var a=this.lineTexts.slice(n-1,i),o=this.parser.partialParseStart(n,a),s=t?t.next:this.root.firstChild,l=o.lastChild,u=l&&qp(l)&&l.open,c=l&&_p(l)&&l.open,f=l&&cd(l);(u||c)&&s||f&&s&&(s.type==="list"||s.sourcepos[0][1]>=2);){var d=this.extendEndLine(s.sourcepos[1][0]);this.parser.partialParseExtends(this.lineTexts.slice(i,d)),e||(e=t),t=s,i=d,s=s.next}this.parser.partialParseFinish();var h=yre(o);return{newNodes:h,extStartNode:e,extEndNode:t}},r.prototype.getRemovedNodeRange=function(e,t){return!e||e&&Ur(e)||t&&Ur(t)?null:{id:[e.id,t.id],line:[e.sourcepos[0][0]-1,t.sourcepos[1][0]-1]}},r.prototype.markDeletedRefMap=function(e,t){var n=this;if(!Wr(this.refMap)){var i=function(a){if(Ur(a)){var o=n.refMap[a.label];o&&a.id===o.id&&(o.unlinked=!0)}};e&&gs(i,e.parent,t),t&&gs(i,t)}},r.prototype.replaceWithNewRefDefState=function(e){var t=this;if(!Wr(this.refMap)){var n=function(i){if(Ur(i)){var a=i.label,o=t.refMap[a];(!o||o.unlinked)&&(t.refMap[a]=zs(i))}};e.forEach(function(i){gs(n,i)})}},r.prototype.replaceWithRefDefCandidate=function(){var e=this;Wr(this.refDefCandidateMap)||Pi(this.refDefCandidateMap,function(t,n){var i=n.label,a=n.sourcepos,o=e.refMap[i];(!o||o.unlinked||o.sourcepos[0][0]>a[0][0])&&(e.refMap[i]=zs(n))})},r.prototype.getRangeWithRefDef=function(e,t,n,i,a){if(this.referenceDefinition&&!Wr(this.refMap)){var o=qi(this.root,e-1),s=qi(this.root,t+1);o&&Ur(o)&&o!==n&&o!==i&&(n=o,e=n.sourcepos[0][0]),s&&Ur(s)&&s!==n&&s!==i&&(i=s,t=this.extendEndLine(i.sourcepos[1][0]+a))}return[n,i,e,t]},r.prototype.parse=function(e,t,n){n===void 0&&(n=0);var i=this.getNodeRange(e,t),a=i[0],o=i[1],s=a?Math.min(a.sourcepos[0][0],e[0]):e[0],l=this.extendEndLine((o?Math.max(o.sourcepos[1][0],t[0]):t[0])+n),u=this.parseRange.apply(this,this.getRangeWithRefDef(s,l,a,o,n)),c=u.newNodes,f=u.extStartNode,d=u.extEndNode,h=this.getRemovedNodeRange(f,d),p=d?d.next:this.root.firstChild;return this.referenceDefinition?(this.markDeletedRefMap(f,d),this.replaceRangeNodes(f,d,c),this.replaceWithNewRefDefState(c)):this.replaceRangeNodes(f,d,c),{nodes:c,removedNodeRange:h,nextNode:p}},r.prototype.parseRefLink=function(){var e=this,t=[];return Wr(this.refMap)||Pi(this.refMap,function(n,i){i.unlinked&&delete e.refMap[n],Pi(e.refLinkCandidateMap,function(a,o){var s=o.node,l=o.refLabel;l===n&&t.push(e.parse(s.sourcepos[0],s.sourcepos[1]))})}),t},r.prototype.removeUnlinkedCandidate=function(){Wr(this.refDefCandidateMap)||[this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(e){Pi(e,function(t){Ere(t)&&delete e[t]})})},r.prototype.editMarkdown=function(e,t,n){var i=this.updateLineTexts(e,t,n),a=this.parse(e,t,i),o=Xee(a,"nextNode");wre(a.nextNode,i),this.updateRootNodeState();var s=[o];return this.referenceDefinition&&(this.removeUnlinkedCandidate(),this.replaceWithRefDefCandidate(),s=s.concat(this.parseRefLink())),this.trigger("change",s),s},r.prototype.getLineTexts=function(){return this.lineTexts},r.prototype.getRootNode=function(){return this.root},r.prototype.findNodeAtPosition=function(e){var t=xre(this.root,e);return!t||t===this.root?null:t},r.prototype.findFirstNodeAtLine=function(e){return Tre(this.root,e)},r.prototype.on=function(e,t){this.eventHandlerMap[e].push(t)},r.prototype.off=function(e,t){var n=this.eventHandlerMap[e],i=n.indexOf(t);n.splice(i,1)},r.prototype.findNodeById=function(e){return rv(e)},r.prototype.removeAllNode=function(){dee()},r})(),Ore=["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"],Sd=new RegExp("<(/?(?:"+Ore.join("|")+")[^>]*>)","ig");function Md(r){return Sd.test(r)?r.replace(Sd,function(e,t){return"&lt;"+t}):r}var Od={heading:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"h"+r.level,outerNewLine:!0}},text:function(r){return{type:"text",content:r.literal}},softbreak:function(r,e){var t=e.options;return{type:"html",content:t.softbreak}},linebreak:function(){return{type:"html",content:`<br />
29`}},emph:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"em"}},strong:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"strong"}},paragraph:function(r,e){var t,n=e.entering,i=(t=r.parent)===null||t===void 0?void 0:t.parent;return i&&i.type==="list"&&i.listData.tight?null:{type:n?"openTag":"closeTag",tagName:"p",outerNewLine:!0}},thematicBreak:function(){return{type:"openTag",tagName:"hr",outerNewLine:!0,selfClose:!0}},blockQuote:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"blockquote",outerNewLine:!0,innerNewLine:!0}},list:function(r,e){var t=e.entering,n=r.listData,i=n.type,a=n.start,o=i==="bullet"?"ul":"ol",s={};return o==="ol"&&a!==null&&a!==1&&(s.start=a.toString()),{type:t?"openTag":"closeTag",tagName:o,attributes:s,outerNewLine:!0}},item:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"li",outerNewLine:!0}},htmlInline:function(r,e){var t=e.options,n=t.tagFilter?Md(r.literal):r.literal;return{type:"html",content:n}},htmlBlock:function(r,e){var t=e.options,n=t.tagFilter?Md(r.literal):r.literal;return t.nodeId?[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"html",content:n},{type:"closeTag",tagName:"div",outerNewLine:!0}]:{type:"html",content:n,outerNewLine:!0}},code:function(r){return[{type:"openTag",tagName:"code"},{type:"text",content:r.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(r){var e=r.info,t=e?e.split(/\s+/):[],n=[];return t.length>0&&t[0].length>0&&n.push("language-"+Gr(t[0])),[{type:"openTag",tagName:"pre",outerNewLine:!0},{type:"openTag",tagName:"code",classNames:n},{type:"text",content:r.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre",outerNewLine:!0}]},link:function(r,e){var t=e.entering;if(t){var n=r,i=n.title,a=n.destination;return{type:"openTag",tagName:"a",attributes:he({href:Gr(a)},i&&{title:Gr(i)})}}return{type:"closeTag",tagName:"a"}},image:function(r,e){var t=e.getChildrenText,n=e.skipChildren,i=r,a=i.title,o=i.destination;return n(),{type:"openTag",tagName:"img",selfClose:!0,attributes:he({src:Gr(o),alt:t(r)},a&&{title:Gr(a)})}},customBlock:function(r,e,t){var n=r.info.trim().toLowerCase(),i=t[n];if(i)try{return i(r,e)}catch(a){console.warn("[@toast-ui/editor] - The error occurred when "+n+" block node was parsed in markdown renderer: "+a)}return[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"text",content:r.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},frontMatter:function(r){return[{type:"openTag",tagName:"div",outerNewLine:!0,attributes:{style:"white-space: pre; display: none;"}},{type:"text",content:r.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},customInline:function(r,e,t){var n=r,i=n.info,a=n.firstChild,o=i.trim().toLowerCase(),s=t[o],l=e.entering;if(s)try{return s(r,e)}catch(u){console.warn("[@toast-ui/editor] - The error occurred when "+o+" inline node was parsed in markdown renderer: "+u)}return l?[{type:"openTag",tagName:"span"},{type:"text",content:"$$"+i+(a?" ":"")}]:[{type:"text",content:"$$"},{type:"closeTag",tagName:"span"}]}},Ld={strike:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"del"}},item:function(r,e){var t=e.entering,n=r.listData,i=n.checked,a=n.task;if(t){var o={type:"openTag",tagName:"li",outerNewLine:!0};return a?[o,{type:"openTag",tagName:"input",selfClose:!0,attributes:he(he({},i&&{checked:""}),{disabled:"",type:"checkbox"})},{type:"text",content:" "}]:o}return{type:"closeTag",tagName:"li",outerNewLine:!0}},table:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"table",outerNewLine:!0}},tableHead:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"thead",outerNewLine:!0}},tableBody:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"tbody",outerNewLine:!0}},tableRow:function(r,e){var t=e.entering;if(t)return{type:"openTag",tagName:"tr",outerNewLine:!0};var n=[];if(r.lastChild)for(var i=r.parent.parent.columns.length,a=r.lastChild.endIdx,o=a+1;o<i;o+=1)n.push({type:"openTag",tagName:"td",outerNewLine:!0},{type:"closeTag",tagName:"td",outerNewLine:!0});return n.push({type:"closeTag",tagName:"tr",outerNewLine:!0}),n},tableCell:function(r,e){var t=e.entering;if(r.ignored)return{type:"text",content:""};var n=r.parent.parent,i=n.type==="tableHead"?"th":"td",a=n.parent,o=a.columns[r.startIdx],s=o?.align?{align:o.align}:null;return t?he({type:"openTag",tagName:i,outerNewLine:!0},s&&{attributes:s}):{type:"closeTag",tagName:i,outerNewLine:!0}}},Lre={softbreak:`
30`,gfm:!1,tagFilter:!1,nodeId:!1};function Are(r){for(var e=[],t=r.walker(),n=null;n=t.next();){var i=n.node;i.type==="text"&&e.push(i.literal)}return e.join("")}var Tl=(function(){function r(e){this.buffer=[],this.options=he(he({},Lre),e),this.convertors=this.createConvertors(),delete this.options.convertors}return r.prototype.createConvertors=function(){var e=he({},Od);if(this.options.gfm&&(e=he(he({},e),Ld)),this.options.convertors){var t=this.options.convertors,n=Object.keys(t),i=he(he({},Od),Ld);n.forEach(function(a){var o=e[a],s=t[a],l=Object.keys(i).indexOf(a)===-1?a.toLowerCase():a;o?e[l]=function(u,c,f){return c.origin=function(){return o(u,c,f)},s(u,c)}:e[l]=s})}return e},r.prototype.getConvertors=function(){return this.convertors},r.prototype.getOptions=function(){return this.options},r.prototype.render=function(e){var t=this;this.buffer=[];for(var n=e.walker(),i=null,a=function(){var s=i.node,l=i.entering,u=o.convertors[s.type];if(!u)return"continue";var c=!1,f={entering:l,leaf:!Cl(s),options:o.options,getChildrenText:Are,skipChildren:function(){c=!0}},d=_p(s)||Mee(s)?u(s,f,o.convertors):u(s,f);if(d){var h=Array.isArray(d)?d:[d];h.forEach(function(p,v){p.type==="openTag"&&t.options.nodeId&&v===0&&(p.attributes||(p.attributes={}),p.attributes["data-nodeid"]=String(s.id)),t.renderHTMLNode(p)}),c&&(n.resumeAt(s,!1),n.next())}},o=this;i=n.next();)a();return this.addNewLine(),this.buffer.join("")},r.prototype.renderHTMLNode=function(e){switch(e.type){case"openTag":case"closeTag":this.renderElementNode(e);break;case"text":this.renderTextNode(e);break;case"html":this.renderRawHtmlNode(e);break}},r.prototype.generateOpenTagString=function(e){var t=this,n=e.tagName,i=e.classNames,a=e.attributes;this.buffer.push("<"+n),i&&i.length>0&&this.buffer.push(' class="'+i.join(" ")+'"'),a&&Object.keys(a).forEach(function(o){var s=a[o];t.buffer.push(" "+o+'="'+s+'"')}),e.selfClose&&this.buffer.push(" /"),this.buffer.push(">")},r.prototype.generateCloseTagString=function(e){var t=e.tagName;this.buffer.push("</"+t+">")},r.prototype.addNewLine=function(){this.buffer.length&&oa(oa(this.buffer))!==`
31`&&this.buffer.push(`
32`)},r.prototype.addOuterNewLine=function(e){e.outerNewLine&&this.addNewLine()},r.prototype.addInnerNewLine=function(e){e.innerNewLine&&this.addNewLine()},r.prototype.renderTextNode=function(e){this.buffer.push(Gr(e.content))},r.prototype.renderRawHtmlNode=function(e){this.addOuterNewLine(e),this.buffer.push(e.content),this.addOuterNewLine(e)},r.prototype.renderElementNode=function(e){e.type==="openTag"?(this.addOuterNewLine(e),this.generateOpenTagString(e),e.selfClose?this.addOuterNewLine(e):this.addInnerNewLine(e)):(this.addInnerNewLine(e),this.generateCloseTagString(e),this.addOuterNewLine(e))},r})();function Nre(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var Dre=Object.hasOwnProperty,Ad=Object.setPrototypeOf,Ire=Object.isFrozen,Rre=Object.getPrototypeOf,Bre=Object.getOwnPropertyDescriptor,Le=Object.freeze,Et=Object.seal,Pre=Object.create,iv=typeof Reflect<"u"&&Reflect,la=iv.apply,Vs=iv.construct;la||(la=function(e,t,n){return e.apply(t,n)});Le||(Le=function(e){return e});Et||(Et=function(e){return e});Vs||(Vs=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(Nre(t))))});var Hre=Ye(Array.prototype.forEach),Nd=Ye(Array.prototype.pop),In=Ye(Array.prototype.push),Wi=Ye(String.prototype.toLowerCase),Dd=Ye(String.prototype.match),qt=Ye(String.prototype.replace),Fre=Ye(String.prototype.indexOf),qre=Ye(String.prototype.trim),wt=Ye(RegExp.prototype.test),Id=_re(TypeError);function Ye(r){return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return la(r,e,n)}}function _re(r){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Vs(r,t)}}function F(r,e){Ad&&Ad(r,null);for(var t=e.length;t--;){var n=e[t];if(typeof n=="string"){var i=Wi(n);i!==n&&(Ire(e)||(e[t]=i),n=i)}r[n]=!0}return r}function fr(r){var e=Pre(null),t=void 0;for(t in r)la(Dre,r,[t])&&(e[t]=r[t]);return e}function _i(r,e){for(;r!==null;){var t=Bre(r,e);if(t){if(t.get)return Ye(t.get);if(typeof t.value=="function")return Ye(t.value)}r=Rre(r)}function n(i){return console.warn("fallback value for",i),null}return n}var Rd=Le(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ys=Le(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),bs=Le(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$re=Le(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ws=Le(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),zre=Le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Bd=Le(["#text"]),Pd=Le(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
32spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),ks=Le(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Hd=Le(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),$i=Le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vre=Et(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Ure=Et(/<%[\s\S]*|[\s\S]*%>/gm),Wre=Et(/^data-[\-\w.\u00B7-\uFFFF]/),jre=Et(/^aria-[\-\w]+$/),Gre=Et(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Kre=Et(/^(?:\w+script|data):/i),Jre=Et(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function it(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var Xre=function(){return typeof window>"u"?null:window},Qre=function(e,t){if((typeof e>"u"?"undefined":qn(e))!=="object"||typeof e.createPolicy!="function")return null;var n=null,i="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(i)&&(n=t.currentScript.getAttribute(i));var a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function av(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xre(),e=function(y){return av(y)};if(e.version="2.3.3",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var t=r.document,n=r.document,i=r.DocumentFragment,a=r.HTMLTemplateElement,o=r.Node,s=r.Element,l=r.NodeFilter,u=r.NamedNodeMap,c=u===void 0?r.NamedNodeMap||r.MozNamedAttrMap:u,f=r.Text,d=r.Comment,h=r.DOMParser,p=r.trustedTypes,v=s.prototype,m=_i(v,"cloneNode"),g=_i(v,"nextSibling"),w=_i(v,"childNodes"),k=_i(v,"parentNode");if(typeof a=="function"){var C=n.createElement("template");C.content&&C.content.ownerDocument&&(n=C.content.ownerDocument)}var x=Qre(p,t),L=x&&Gn?x.createHTML(""):"",E=n,N=E.implementation,P=E.createNodeIterator,j=E.createDocumentFragment,se=E.getElementsByTagName,Pe=t.importNode,Wn={};try{Wn=fr(n).documentMode?n.documentMode:{}}catch{}var Ze={};e.isSupported=typeof k=="function"&&N&&typeof N.createHTMLDocument<"u"&&Wn!==9;var Ma=Vre,Oa=Ure,jv=Wre,Gv=jre,Kv=Kre,Al=Jre,La=Gre,me=null,Nl=F({},[].concat(it(Rd),it(ys),it(bs),it(ws),it(Bd))),ge=null,Dl=F({},[].concat(it(Pd),it(ks),it(Hd),it($i))),Aa=null,Na=null,Il=!0,Da=!0,Rl=!1,wr=!1,kr=!1,Ia=!1,Ra=!1,Cr=!1,jn=!1,Bl=!0,Gn=!1,Pl=!0,Ba=!0,ln=!1,Tr={},xr=null,Hl=F({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Fl=null,ql=F({},["audio","video","img","source","image","track"]),Pa=null,_l=F({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ha="http://www.w3.org/1998/Math/MathML",Fa="http://www.w3.org/2000/svg",Ot="http://www.w3.org/1999/xhtml",Kn=Ot,qa=!1,Er=void 0,Jv=["application/xhtml+xml","text/html"],Xv="text/html",Sr=void 0,Mr=null,Qv=n.createElement("form"),_a=function(y){Mr&&Mr===y||((!y||(typeof y>"u"?"undefined":qn(y))!=="object")&&(y={}),y=fr(y),me="ALLOWED_TAGS"in y?F({},y.ALLOWED_TAGS):Nl,ge="ALLOWED_ATTR"in y?F({},y.ALLOWED_ATTR):Dl,Pa="ADD_URI_SAFE_ATTR"in y?F(fr(_l),y.ADD_URI_SAFE_ATTR):_l,Fl="ADD_DATA_URI_TAGS"in y?F(fr(ql),y.ADD_DATA_URI_TAGS):ql,xr="FORBID_CONTENTS"in y?F({},y.FORBID_CONTENTS):Hl,Aa="FORBID_TAGS"in y?F({},y.FORBID_TAGS):{},Na="FORBID_ATTR"in y?F({},y.FORBID_ATTR):{},Tr="USE_PROFILES"in y?y.USE_PROFILES:!1,Il=y.ALLOW_ARIA_ATTR!==!1,Da=y.ALLOW_DATA_ATTR!==!1,Rl=y.ALLOW_UNKNOWN_PROTOCOLS||!1,wr=y.SAFE_FOR_TEMPLATES||!1,kr=y.WHOLE_DOCUMENT||!1,Cr=y.RETURN_DOM||!1,jn=y.RETURN_DOM_FRAGMENT||!1,Bl=y.RETURN_DOM_IMPORT!==!1,Gn=y.RETURN_TRUSTED_TYPE||!1,Ra=y.FORCE_BODY||!1,Pl=y.SANITIZE_DOM!==!1,Ba=y.KEEP_CONTENT!==!1,ln=y.IN_PLACE||!1,La=y.ALLOWED_URI_REGEXP||La,Kn=y.NAMESPACE||Ot,Er=Jv.indexOf(y.PARSER_MEDIA_TYPE
vendor: 144,251 bytes, lines 32-151
32)===-1?Er=Xv:Er=y.PARSER_MEDIA_TYPE,Sr=Er==="application/xhtml+xml"?function(S){return S}:Wi,wr&&(Da=!1),jn&&(Cr=!0),Tr&&(me=F({},[].concat(it(Bd))),ge=[],Tr.html===!0&&(F(me,Rd),F(ge,Pd)),Tr.svg===!0&&(F(me,ys),F(ge,ks),F(ge,$i)),Tr.svgFilters===!0&&(F(me,bs),F(ge,ks),F(ge,$i)),Tr.mathMl===!0&&(F(me,ws),F(ge,Hd),F(ge,$i))),y.ADD_TAGS&&(me===Nl&&(me=fr(me)),F(me,y.ADD_TAGS)),y.ADD_ATTR&&(ge===Dl&&(ge=fr(ge)),F(ge,y.ADD_ATTR)),y.ADD_URI_SAFE_ATTR&&F(Pa,y.ADD_URI_SAFE_ATTR),y.FORBID_CONTENTS&&(xr===Hl&&(xr=fr(xr)),F(xr,y.FORBID_CONTENTS)),Ba&&(me["#text"]=!0),kr&&F(me,["html","head","body"]),me.table&&(F(me,["tbody"]),delete Aa.tbody),Le&&Le(y),Mr=y)},$l=F({},["mi","mo","mn","ms","mtext"]),zl=F({},["foreignobject","desc","title","annotation-xml"]),Jn=F({},ys);F(Jn,bs),F(Jn,$re);var $a=F({},ws);F($a,zre);var Yv=function(y){var S=k(y);(!S||!S.tagName)&&(S={namespaceURI:Ot,tagName:"template"});var D=Wi(y.tagName),U=Wi(S.tagName);if(y.namespaceURI===Fa)return S.namespaceURI===Ot?D==="svg":S.namespaceURI===Ha?D==="svg"&&(U==="annotation-xml"||$l[U]):!!Jn[D];if(y.namespaceURI===Ha)return S.namespaceURI===Ot?D==="math":S.namespaceURI===Fa?D==="math"&&zl[U]:!!$a[D];if(y.namespaceURI===Ot){if(S.namespaceURI===Fa&&!zl[U]||S.namespaceURI===Ha&&!$l[U])return!1;var ye=F({},["title","style","font","a","script"]);return!$a[D]&&(ye[D]||!Jn[D])}return!1},ct=function(y){In(e.removed,{element:y});try{y.parentNode.removeChild(y)}catch{try{y.outerHTML=L}catch{y.remove()}}},Vl=function(y,S){try{In(e.removed,{attribute:S.getAttributeNode(y),from:S})}catch{In(e.removed,{attribute:null,from:S})}if(S.removeAttribute(y),y==="is"&&!ge[y])if(Cr||jn)try{ct(S)}catch{}else try{S.setAttribute(y,"")}catch{}},Ul=function(y){var S=void 0,D=void 0;if(Ra)y="<remove></remove>"+y;else{var U=Dd(y,/^[\r\n\t ]+/);D=U&&U[0]}Er==="application/xhtml+xml"&&(y='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+y+"</body></html>");var ye=x?x.createHTML(y):y;if(Kn===Ot)try{S=new h().parseFromString(ye,Er)}catch{}if(!S||!S.documentElement){S=N.createDocument(Kn,"template",null);try{S.documentElement.innerHTML=qa?"":ye}catch{}}var be=S.body||S.documentElement;return y&&D&&be.insertBefore(n.createTextNode(D),be.childNodes[0]||null),Kn===Ot?se.call(S,kr?"html":"body")[0]:kr?S.documentElement:be},Wl=function(y){return P.call(y.ownerDocument||y,y,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Zv=function(y){return y instanceof f||y instanceof d?!1:typeof y.nodeName!="string"||typeof y.textContent!="string"||typeof y.removeChild!="function"||!(y.attributes instanceof c)||typeof y.removeAttribute!="function"||typeof y.setAttribute!="function"||typeof y.namespaceURI!="string"||typeof y.insertBefore!="function"},un=function(y){return(typeof o>"u"?"undefined":qn(o))==="object"?y instanceof o:y&&(typeof y>"u"?"undefined":qn(y))==="object"&&typeof y.nodeType=="number"&&typeof y.nodeName=="string"},ft=function(y,S,D){Ze[y]&&Hre(Ze[y],function(U){U.call(e,S,D,Mr)})},jl=function(y){var S=void 0;if(ft("beforeSanitizeElements",y,null),Zv(y)||Dd(y.nodeName,/[\u0080-\uFFFF]/))return ct(y),!0;var D=Sr(y.nodeName);if(ft("uponSanitizeElement",y,{tagName:D,allowedTags:me}),!un(y.firstElementChild)&&(!un(y.content)||!un(y.content.firstElementChild))&&wt(/<[/\w]/g,y.innerHTML)&&wt(/<[/\w]/g,y.textContent)||D==="select"&&wt(/<template/i,y.innerHTML))return ct(y),!0;if(!me[D]||Aa[D]){if(Ba&&!xr[D]){var U=k(y)||y.parentNode,ye=w(y)||y.childNodes;if(ye&&U)for(var be=ye.length,we=be-1;we>=0;--we)U.insertBefore(m(ye[we],!0),g(y))}return ct(y),!0}return y instanceof s&&!Yv(y)||(D==="noscript"||D==="noembed")&&wt(/<\/no(script|embed)/i,y.innerHTML)?(ct(y),!0):(wr&&y.nodeType===3&&(S=y.textContent,S=qt(S,Ma," "),S=qt(S,Oa," "),y.textContent!==S&&(In(e.removed,{element:y.cloneNode()}),y.textContent=S)),ft("afterSanitizeElements",y,null),!1)},Gl=function(y,S,D){if(Pl&&(S==="id"||S==="name")&&(D in n||D in Qv))return!1;if(!(Da&&!Na[S]&&wt(jv,S))){if(!(Il&&wt(Gv,S))){if(!ge[S]||Na[S])return!1;if(!Pa[S]){if(!wt(La,qt(D,Al,""))){if(!((S==="src"||S==="xlink:href"||S==="href")&&y!=="script"&&Fre(D,"data:")===0&&Fl[y])){if(!(Rl&&!wt(Kv,qt(D,Al,"")))){if(D)return!1}}}}}}return!0},Kl=function(y){var S=void 0,D=void 0,U=void 0,ye=void 0;ft("beforeSanitizeAttributes",y,null);var be=y.attributes;if(be){var we={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(ye=be.length;ye--;){S=be[ye];var dt=S,cn=dt.name,Jl=dt.namespaceURI;if(D=qre(S.value),U=Sr(cn),we.attrName=U,we.attrValue=D,we.keepAttr=!0,we.forceKeepAttr=void 0,ft("uponSanitizeAttribute",y,we),D=we.attrValue,!we.forceKeepAttr&&(Vl(cn,y),!!we.keepAttr)){if(wt(/\/>/i,D)){Vl(cn,y);continue}wr&&(D=qt(D,Ma," "),D=qt(D,Oa," "));var tm=Sr(y.nodeName);if(Gl(tm,U,D))try{Jl?y.setAttributeNS(Jl,cn,D):y.setAttribute(cn,D),Nd(e.removed)}catch{}}}ft("afterSanitizeAttributes",y,null)}},em=function I(y){var S=void 0,D=Wl(y);for(ft("beforeSanitizeShadowDOM",y,null);S=D.nextNode();)ft("uponSanitizeShadowNode",S,null),!jl(S)&&(S.content instanceof i&&I(S.content),Kl(S));ft("afterSanitizeShadowDOM",y,null)};return e.sanitize=function(I,y){var S=void 0,D=void 0,U=void 0,ye=void 0,be=void 0;if(qa=!I,qa&&(I="<!-->"),typeof I!="string"&&!un(I)){if(typeof I.toString!="function")throw Id("toString is not a function");if(I=I.toString(),typeof I!="string")throw Id("dirty is not a string, aborting")}if(!e.isSupported){if(qn(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof I=="string")return r.toStaticHTML(I);if(un(I))return r.toStaticHTML(I.outerHTML)}return I}if(Ia||_a(y),e.removed=[],typeof I=="string"&&(ln=!1),!ln)if(I instanceof o)S=Ul("<!---->"),D=S.ownerDocument.importNode(I,!0),D.nodeType===1&&D.nodeName==="BODY"||D.nodeName==="HTML"?S=D:S.appendChild(D);else{if(!Cr&&!wr&&!kr&&I.indexOf("<")===-1)return x&&Gn?x.createHTML(I):I;if(S=Ul(I),!S)return Cr?null:L}S&&Ra&&ct(S.firstChild);for(var we=Wl(ln?I:S);U=we.nextNode();)U.nodeType===3&&U===ye||jl(U)||(U.content instanceof i&&em(U.content),Kl(U),ye=U);if(ye=null,ln)return I;if(Cr){if(jn)for(be=j.call(S.ownerDocument);S.firstChild;)be.appendChild(S.firstChild);else be=S;return Bl&&(be=Pe.call(t,be,!0)),be}var dt=kr?S.outerHTML:S.innerHTML;return wr&&(dt=qt(dt,Ma," "),dt=qt(dt,Oa," ")),x&&Gn?x.createHTML(dt):dt},e.setConfig=function(I){_a(I),Ia=!0},e.clearConfig=function(){Mr=null,Ia=!1},e.isValidAttribute=function(I,y,S){Mr||_a({});var D=Sr(I),U=Sr(y);return Gl(D,U,S)},e.addHook=function(I,y){typeof y=="function"&&(Ze[I]=Ze[I]||[],In(Ze[I],y))},e.removeHook=function(I){Ze[I]&&Nd(Ze[I])},e.removeHooks=function(I){Ze[I]&&(Ze[I]=[])},e.removeAllHooks=function(){Ze={}},e}var Yre=av(),Zre=["iframe","embed"],ov=[];function sv(r){ve(Zre,r)&&ov.push(r.toLowerCase())}function br(r,e){return Yre.sanitize(r,b({ADD_TAGS:ov,ADD_ATTR:["rel","target","hreflang","type"],FORBID_TAGS:["input","script","textarea","form","button","select","meta","style","link","title","object","base"]},e))}function lv(r,e){return r.literal.replace(new RegExp("(<\\s*"+e+"[^>]*>)|(</"+e+"\\s*[>])","ig"),"").trim()}function Us(r){r=r.match(Zr)[0];var e=r.match(new RegExp(np,"g"));return e?e.reduce(function(t,n){var i=n.trim().split("="),a=i[0],o=i.slice(1);return o.length&&(t[a]=o.join("=").replace(/'|"/g,"").trim()),t},{}):{}}function Ws(r){return ut(r.attributes).reduce(function(e,t){return e[t.nodeName]=t.nodeValue,e},{})}function Fd(r,e,t,n){var i=n.getToDOMNode(e)(r),a=t(i.outerHTML),o=document.createElement("div");o.innerHTML=a,i=o.firstChild;var s=Ws(i);return{dom:i,htmlAttrs:s}}var ene={htmlBlock:function(r,e,t){return{atom:!0,content:"block+",group:"block",attrs:{htmlAttrs:{default:{}},childrenHTML:{default:""},htmlBlock:{default:!0}},parseDOM:[{tag:r,getAttrs:function(n){return{htmlAttrs:Ws(n),childrenHTML:n.innerHTML}}}],toDOM:function(n){var i=Fd(n,r,e,t),a=i.dom,o=i.htmlAttrs;return o.class=o.class?o.class+" html-block":"html-block",Ne([r,o],ut(a.childNodes))}}},htmlInline:function(r,e,t){return{attrs:{htmlAttrs:{default:{}},htmlInline:{default:!0}},parseDOM:[{tag:r,getAttrs:function(n){return{htmlAttrs:Ws(n)}}}],toDOM:function(n){var i=Fd(n,r,e,t).htmlAttrs;return[r,i,0]}}}};function tne(r,e,t){var n={nodes:{},marks:{}};return["htmlBlock","htmlInline"].forEach(function(i){r[i]&&Object.keys(r[i]).forEach(function(a){var o=i==="htmlBlock"?"nodes":"marks";sv(a),n[o][a]=ene[i](a,e,t)})}),n}var rne=/^\s*<\s*\//,nne={paragraph:function(r,e){var t=e.entering,n=e.origin,i=e.options;return i.nodeId?{type:t?"openTag":"closeTag",outerNewLine:!0,tagName:"p"}:n()},softbreak:function(r){var e=r.prev&&r.prev.type==="htmlInline",t=e&&/<br ?\/?>/.test(r.prev.literal),n=t?`
33`:`<br>
34`;return{type:"html",content:n}},item:function(r,e){var t=e.entering;if(t){var n={},i=[];return r.listData.task&&(n["data-task"]="",i.push("task-list-item"),r.listData.checked&&(i.push("checked"),n["data-task-checked"]="")),{type:"openTag",tagName:"li",classNames:i,attributes:n,outerNewLine:!0}}return{type:"closeTag",tagName:"li",outerNewLine:!0}},code:function(r){var e={"data-backticks":String(r.tickCount)};return[{type:"openTag",tagName:"code",attributes:e},{type:"text",content:r.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(r){var e=r,t=e.fenceLength,n=e.info,i=n?n.split(/\s+/):[],a=[],o={};if(t>3&&(o["data-backticks"]=t),i.length>0&&i[0].length>0){var s=i[0];a.push("lang-"+s),o["data-language"]=s}return[{type:"openTag",tagName:"pre",classNames:a},{type:"openTag",tagName:"code",attributes:o},{type:"text",content:r.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre"}]},customInline:function(r,e){var t=e.origin,n=e.entering,i=e.skipChildren,a=r.info;if(a.indexOf("widget")!==-1&&n){i();var o=Zh(r),s=Yh(a,o).outerHTML;return[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:s},{type:"closeTag",tagName:"span"}]}return t()}};function xl(r,e){var t=b({},nne);return r&&(t.link=function(n,i){var a=i.entering,o=i.origin,s=o();return a&&(s.attributes=b(b({},s.attributes),r)),s}),e&&Object.keys(e).forEach(function(n){var i=t[n],a=e[n];i&&Ve(a)?t[n]=function(o,s){var l=b({},s);return l.origin=function(){return i(o,s)},a(o,l)}:ve(["htmlBlock","htmlInline"],n)&&!Ve(a)?t[n]=function(o,s){var l=o.literal.match(Zr);if(l){var u=l[0],c=l[1],f=l[3],d=(c||f).toLowerCase(),h=a[d],p=lv(o,d);if(h){var v=b({},o);return v.attrs=Us(u),v.childrenHTML=p,v.type=d,s.entering=!rne.test(o.literal),h(v,s)}}return s.origin()}:t[n]=a}),t}var ine=["list","item","blockQuote"],ane=["UL","OL","BLOCKQUOTE"];function one(r,e){var t,n=r.child(e);return!n.childCount||n.childCount===1&&!(!((t=n.firstChild.text)===null||t===void 0)&&t.trim())}function qd(r,e,t){var n=Vn(e)-1,i=va(e)-1,a=t[n].getBoundingClientRect(),o=t[i].offsetTop-t[n].offsetTop+t[i].clientHeight;return{height:o<=0?t[n].clientHeight:o+sne(r,t,Math.min(i+1,r.childCount-1)),rect:a}}function sne(r,e,t){for(var n=r.childCount-1,i=0;t<=n&&one(r,t);)i+=e[t].clientHeight,t+=1;return i}function lne(r,e){for(;!r.getAttribute("data-nodeid")&&r.parentElement!==e;)r=r.parentElement;return r}function ua(r,e){for(var t=0;r&&r!==e&&(ve(ane,r.tagName)||(t+=r.offsetTop),r.offsetParent!==e.offsetParent);)r=r.parentElement;return t}function une(r,e){for(var t=e,n=null;t;){var i=t.firstElementChild;if(!i)break;var a=uv(i,r,ua(t,e));n=t,t=a}var o=t||n;return o===e?null:o}function uv(r,e,t){return r&&e>t+r.offsetTop?uv(r.nextElementSibling,e,t)||r:null}function cne(r,e,t,n){var i=Math.min((r-e)/t,1);return i*n}function Cs(r,e){for(var t=r.querySelector('[data-nodeid="'+e.id+'"]');!t||ew(e);)e=e.parent,t=r.querySelector('[data-nodeid="'+e.id+'"]');return fne({mdNode:e,el:t})}function fne(r){for(var e=r.mdNode,t=r.el;(ve(ine,e.type)||e.type==="table")&&e.firstChild;)e=e.firstChild,t=t.firstElementChild;return{mdNode:e,el:t}}var Je={};function dne(r,e){Je[r]=Je[r]||{},Je[r].height=e}function hne(r,e){Je[r]=Je[r]||{},Je[r].offsetTop=e}function pne(r){return Je[r]&&Je[r].height}function vne(r){return Je[r]&&Je[r].offsetTop}function js(r){r&&(delete Je[Number(r.getAttribute("data-nodeid"))],ut(r.children).forEach(function(e){js(e)}))}function mne(r,e,t){var n=pne(t),i=vne(t),a=n||r.clientHeight,o=i||ua(r,e)||r.offsetTop;return n||dne(t,a),i||hne(t,o),{nodeHeight:a,offsetTop:o}}var Ts=A("md-preview-highlight");function gne(r,e){for(var t=r.firstChild;t&&t.next&&!(ma(t.next)>e+1);)t=t.next;return t}var cv=(function(){function r(e,t){var n=document.createElement("div");this.el=n,this.eventEmitter=e,this.isViewer=!!t.isViewer,this.el.className=A("md-preview");var i=t.linkAttributes,a=t.customHTMLRenderer,o=t.sanitizer,s=t.highlight,l=s===void 0?!1:s;this.renderer=new Tl({gfm:!0,nodeId:!0,convertors:xl(i,a)}),this.cursorNodeId=null,this.sanitizer=o,this.initEvent(l),this.initContentSection(),this.isViewer&&(this.previewContent.style.overflowWrap="break-word")}return r.prototype.initContentSection=function(){this.previewContent=lp('<div class="'+A("contents")+'"></div>'),this.isViewer||this.el.appendChild(this.previewContent)},r.prototype.toggleActive=function(e){ul(this.el,"active",e)},r.prototype.initEvent=function(e){var t=this;this.eventEmitter.listen("updatePreview",this.update.bind(this)),!this.isViewer&&(e&&(this.eventEmitter.listen("changeToolbarState",function(n){var i=n.mdNode,a=n.cursorPos;t.updateCursorNode(i,a)}),this.eventEmitter.listen("blur",function(){t.removeHighlight()})),Ep(this.el,"scroll",function(n){t.eventEmitter.emit("scroll","preview",une(n.target.scrollTop,t.previewContent))}),this.eventEmitter.listen("changePreviewTabPreview",function(){return t.toggleActive(!0)}),this.eventEmitter.listen("changePreviewTabWrite",function(){return t.toggleActive(!1)}))},r.prototype.removeHighlight=function(){if(this.cursorNodeId){var e=this.getElementByNodeId(this.cursorNodeId);e&&Ke(e,Ts)}},r.prototype.updateCursorNode=function(e,t){e&&(e=Yr(e,function(o){return!nw(o)}),e.type==="tableRow"?e=gne(e,t[1]):e.type==="tableBody"&&(e=null));var n=e?e.id:null;if(this.cursorNodeId!==n){var i=this.getElementByNodeId(this.cursorNodeId),a=this.getElementByNodeId(n);i&&Ke(i,Ts),a&&ot(a,Ts),this.cursorNodeId=n}},r.prototype.getElementByNodeId=function(e){return e?this.previewContent.querySelector('[data-nodeid="'+e+'"]'):null},r.prototype.update=function(e){var t=this;e.forEach(function(n){return t.replaceRangeNodes(n)}),this.eventEmitter.emit("afterPreviewRender",this)},r.prototype.replaceRangeNodes=function(e){var t=this,n=e.nodes,i=e.removedNodeRange,a=this.previewContent,o=this.eventEmitter.emitReduce("beforePreviewRender",this.sanitizer(n.map(function(p){return t.renderer.render(p)}).join("")));if(!i)a.insertAdjacentHTML("afterbegin",o);else{var s=i.id,l=s[0],u=s[1],c=this.getElementByNodeId(l),f=this.getElementByNodeId(u);if(c){c.insertAdjacentHTML("beforebegin",o);for(var d=c;d&&d!==f;){var h=d.nextElementSibling;mr(d),js(d),d=h}d?.parentNode&&(mr(d),js(d))}}},r.prototype.getRenderer=function(){return this.renderer},r.prototype.destroy=function(){xp(this.el,"scroll"),this.el=null},r.prototype.getElement=function(){return this.el},r.prototype.getHTML=function(){return dl(this.previewContent.innerHTML)},r.prototype.setHTML=function(e){this.previewContent.innerHTML=e},r.prototype.setHeight=function(e){lt(this.el,{height:e+"px"})},r.prototype.setMinHeight=function(e){lt(this.el,{minHeight:e+"px"})},r})();function Ct(r,e){for(var t=r.depth;t;){var n=r.node(t);if(e(n,t))return{node:n,depth:t,offset:t>0?r.before(t):0};t-=1}return null}function nn(r){return!!Ct(r,function(e){var t=e.type;return t.name==="listItem"||t.name==="bulletList"||t.name==="orderedList"})}function ca(r){return!!Ct(r,function(e){var t=e.type;return t.name==="tableHeadCell"||t.name==="tableBodyCell"})}function an(r){return Ct(r,function(e){var t=e.type;return t.name==="listItem"})}function Ea(r){return{tag:r,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return b({},t&&{rawHTML:t})}}}function fv(r){return Object.keys(r).reduce(function(e,t){return t!=="rawHTML"&&r[t]&&(t=t==="className"?"class":t,e[t]=r[t]),e},{})}function dv(r){return{tag:r,getAttrs:function(e){return["rawHTML","colspan","rowspan","extended"].reduce(function(t,n){var i=n==="rawHTML"?"data-raw-html":n,a=e.getAttribute(i);return a&&(t[n]=ve(["rawHTML","extended"],n)?a:Number(a)),t},{})}}}function oe(){return{htmlAttrs:{default:null},classNames:{default:null}}}function Y(r){var e=r.htmlAttrs,t=r.classNames;return b(b({},e),{class:t?t.join(" "):null})}function yne(r,e){var t=r.parent,n=r.startIndex,i=r.endIndex,a=t.contentMatchAt(n).findWrapping(e);if(a){var o=a.length?a[0]:e;return t.canReplaceWith(n,i,o)?a:null}return null}function bne(r,e){var t=r.parent,n=r.startIndex,i=r.endIndex,a=t.child(n),o=e.contentMatch.findWrapping(a.type);if(o){for(var s=o.length?o[o.length-1]:e,l=s.contentMatch,u=n;l&&u<i;u+=1)l=l.matchType(t.child(u).type);if(l&&l.validEnd)return o}return null}function wne(r,e,t,n){var i=yne(r,t),a=bne(e,t);if(i&&a){var o=i.map(function(l){return{type:l}}),s=a.map(function(l){return{type:l,attrs:n}});return o.concat({type:t}).concat(s)}return null}function kne(r,e,t,n,i){for(var a=e.start,o=e.end,s=e.startIndex,l=e.endIndex,u=e.parent,c=T.empty,f=t.length-1;f>=0;f-=1)c=T.from(t[f].type.create(t[f].attrs,c));r.step(new Z(a-(n?2:0),o,a,o,new M(c,0,0),t.length,!0));for(var d=0,f=0;f<t.length;f+=1)if(t[f].type===i){d=f+1;break}for(var h=t.length-d,p=a+t.length-(n?2:0),f=s,v=l;f<v;f+=1){var m=f===s;!m&&At(r.doc,p,h)&&(r.split(p,h),p+=h*2),p+=u.child(f).nodeSize}return r}function hv(r,e,t,n){var i=e.$from,a=e.$to,o=e.depth,s=e,l=!1;if(o>=2&&i.node(o-1).type.compatibleContent(t)&&e.startIndex===0&&i.index(o-1)){var u=r.doc.resolve(e.start-2);s=new Gt(u,u,o),e.endIndex<e.parent.childCount&&(e=new Gt(i,r.doc.resolve(a.end(o)),o)),l=!0}var c=wne(s,e,t,n);return c?kne(r,e,c,l,t):r}function pv(r,e){for(var t=r.resolve(e);t.node().type.name!=="paragraph";)e-=2,t=r.resolve(e);return an(t)}function Cne(r,e){var t=e.$from,n=e.$to,i=an(t),a=an(n);if(i&&a)for(;a;){var o=a.offset,s=a.node,l={task:!s.attrs.task,checked:!1};if(r.setNodeMarkup(o,null,l),o===i.offset)break;a=pv(r.doc,o)}return r}function Tne(r,e,t){var n=e.$from,i=e.$to,a=an(n),o=an(i);if(a&&o)for(;o;){var s=o.offset,l=o.node,u=o.depth;l.attrs.task&&r.setNodeMarkup(s,null,{task:!1,checked:!1});var c=r.doc.resolve(s);if(c.parent.type!==t){var f=c.before(u-1);r.setNodeMarkup(f,t)}if(s===a.offset)break;o=pv(r.doc,s)}return r}function vv(r){return function(e,t){var n=e.selection,i=e.tr,a=n.$from,o=n.$to,s=a.blockRange(o);if(s){var l=nn(a)?Tne(i,s,r):hv(i,s,r);return t(l),!0}return!1}}function xne(){return function(r,e){var t=r.selection,n=r.tr,i=r.schema,a=t.$from,o=t.$to,s=a.blockRange(o);if(s){var l=nn(a)?Cne(n,s):hv(n,s,i.nodes.bulletList,{task:!0});return e(l),!0}return!1}}function Ene(r){return function(e,t){var n=e.tr,i=e.selection,a=i.$from,o=i.$to,s=a.blockRange(o,function(v){var m=v.childCount,g=v.firstChild;return!!m&&g.type===r});if(s&&s.startIndex>0){var l=s.parent,u=l.child(s.startIndex-1);if(u.type!==r)return!1;var c=u.lastChild&&u.lastChild.type===l.type,f=c?T.from(r.create()):null,d=new M(T.from(r.create(null,T.from(l.type.create(null,f)))),c?3:1,0),h=s.start,p=s.end;return n.step(new Z(h-(c?3:1),p,h,p,d,1,!0)),t(n),!0}return!1}}function Sne(r,e,t){var n=e.$from,i=e.$to,a=e.end,o=e.depth,s=e.parent,l=i.end(o);return a<l&&(r.step(new Z(a-1,l,a,l,new M(T.from(t.create(null,s.copy())),1,0),1,!0)),e=new Gt(r.doc.resolve(n.pos),r.doc.resolve(l),o)),r.lift(e,Nr(e)),r}function Mne(r,e){for(var t=e.parent,n=e.end,i=e.endIndex-1,a=e.startIndex;i>a;i-=1)n-=t.child(i).nodeSize,r.delete(n-1,n+1);var o=r.doc.resolve(e.start),s=o.nodeAfter,l=e.startIndex===0,u=e.endIndex===t.childCount,c=o.node(-1),f=o.index(-1),d=c.canReplace(f+(l?0:1),f+1,s?.content.append(u?T.empty:T.from(t)));if(s&&d){var h=o.pos,p=h+s.nodeSize;r.step(new Z(h-(l?1:0),p+(u?1:0),h+1,p-1,new M((l?T.empty:T.from(t.copy(T.empty))).append(u?T.empty:T.from(t.copy(T.empty))),l?0:1,u?0:1),l?0:1))}return r}function One(r){return function(e,t){var n=e.tr,i=e.selection,a=i.$from,o=i.$to,s=a.blockRange(o,function(c){var f=c.childCount,d=c.firstChild;return!!f&&d.type===r});if(s){var l=a.node(s.depth-1).type===r,u=l?Sne(n,s,r):Mne(n,s);return t(u),!0}return!1}}function Lne(r){return function(e,t){var n=e.tr,i=e.selection,a=i.$from,o=i.$to;if(a.depth<2||!a.sameParent(o))return!1;var s=a.node(-1);if(s.type!==r)return!1;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==r||a.index(-2)!==a.node(-2).childCount-1)return!1;for(var l=a.index(-1)>0,u=T.empty,c=a.depth-(l?1:2);c>=a.depth-3;c-=1)u=T.from(a.node(c).copy(u));return u=u.append(T.from(r.createAndFill())),n.replace(l?a.before():a.before(-1),a.after(-3),new M(u,l?3:2,2)),n.setSelection(H.near(n.doc.resolve(a.pos+(l?3:2)))),t(n),!0}var f=o.pos===a.end()?s.contentMatchAt(0).defaultType:null,d=f&&[null,{type:f}];return n.delete(a.pos,o.pos),At(n.doc,a.pos,2,d)?(n.split(a.pos,2,d),t(n),!0):!1}}function Ane(){return function(){return function(r,e){var t=r.selection,n=r.schema,i=t.$from,a=t.$to,o=i.blockRange(a);return o&&nn(i)?Ene(n.nodes.listItem)(r,e):!1}}}function Nne(){return function(){return function(r,e){var t=r.selection,n=r.schema,i=t.$from,a=t.$to,o=i.blockRange(a);return o&&nn(i)?One(n.nodes.listItem)(r,e):!1}}}function El(){return{indent:Ane(),outdent:Nne()}}var _d=new Map,de=(function(){function r(e,t,n,i){this.table=e,this.tableRows=t,this.tableStartPos=n,this.rowInfo=i}return r.create=function(e){var t=Ct(e,function(p){var v=p.type;return v.name==="table"});if(t){var n=t.node,i=t.depth,a=t.offset,o=_d.get(n);if(o?.tableStartPos===a+1)return o;var s=[],l=e.start(i),u=n.child(0),c=n.child(1),f=Gs(u,l),d=Gs(c,l+u.nodeSize);u.forEach(function(p){return s.push(p)}),c.forEach(function(p){return s.push(p)});var h=new r(n,s,l,f.concat(d));return _d.set(n,h),h}return null},Object.defineProperty(r.prototype,"totalRowCount",{get:function(){return this.rowInfo.length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"totalColumnCount",{get:function(){return this.rowInfo[0].length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tableStartOffset",{get:function(){return this.tableStartPos},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tableEndOffset",{get:function(){return this.tableStartPos+this.table.nodeSize-1},enumerable:!1,configurable:!0}),r.prototype.getCellInfo=function(e,t){return this.rowInfo[e][t]},r.prototype.posAt=function(e,t){for(var n=0,i=this.tableStartPos;;n+=1){var a=i+this.tableRows[n].nodeSize;if(n===e){for(var o=t;o<this.totalColumnCount&&this.rowInfo[n][o].offset<i;)o+=1;return o===this.totalColumnCount?a:this.rowInfo[n][o].offset}i=a}},r.prototype.getNodeAndPos=function(e,t){var n=this.rowInfo[e][t];return{node:this.table.nodeAt(n.offset-this.tableStartOffset),pos:n.offset}},r.prototype.extendedRowspan=function(e,t){return!1},r.prototype.extendedColspan=function(e,t){return!1},r.prototype.getRowspanCount=function(e,t){return 0},r.prototype.getColspanCount=function(e,t){return 0},r.prototype.decreaseColspanCount=function(e,t){return 0},r.prototype.decreaseRowspanCount=function(e,t){return 0},r.prototype.getColspanStartInfo=function(e,t){return null},r.prototype.getRowspanStartInfo=function(e,t){return null},r.prototype.getCellStartOffset=function(e,t){var n=this.rowInfo[e][t].offset;return this.extendedRowspan(e,t)?this.posAt(e,t):n},r.prototype.getCellEndOffset=function(e,t){var n=this.rowInfo[e][t],i=n.offset,a=n.nodeSize;return this.extendedRowspan(e,t)?this.posAt(e,t):i+a},r.prototype.getCellIndex=function(e){for(var t=0;t<this.totalRowCount;t+=1)for(var n=this.rowInfo[t],i=0;i<this.totalColumnCount;i+=1)if(n[i].offset+1>e.pos)return[t,i];return[0,0]},r.prototype.getRectOffsets=function(e,t){var n,i,a;t===void 0&&(t=e),e.pos>t.pos&&(n=[t,e],e=n[0],t=n[1]);var o=this.getCellIndex(e),s=o[0],l=o[1],u=this.getCellIndex(t),c=u[0],f=u[1];return i=qf(s,c),s=i[0],c=i[1],a=qf(l,f),l=a[0],f=a[1],this.getSpannedOffsets({startRowIdx:s,startColIdx:l,endRowIdx:c,endColIdx:f})},r.prototype.getSpannedOffsets=function(e){return e},r})(),Gs=function(r,e){var t=[];return r.forEach(function(n,i){var a={rowspanMap:{},colspanMap:{},length:0};n.forEach(function(o,s){for(var l=o.nodeSize,u=0;a[u];)u+=1;a[u]={offset:e+i+s+2,nodeSize:l},a.length+=1}),t.push(a)}),t};function Dne(r,e){return al(de.prototype,r),Gs=e,de}function Ine(r,e,t){for(var n=t.startRowIdx,i=t.startColIdx,a=t.endRowIdx,o=t.endColIdx,s=[],l=n;l<=a;l+=1)for(var u=i;u<=o;u+=1){var c=e.getCellInfo(l,u),f=c.offset,d=c.nodeSize;s.push(new Nt(r.resolve(f+1),r.resolve(f+d-1)))}return s}function Rne(r,e){var t=[];return r.childCount&&t.push(r),e.childCount&&t.push(e),T.from(t)}var Sl=(function(r){O(e,r);function e(t,n){n===void 0&&(n=t);var i=this,a=t.node(0),o=de.create(t),s=o.getRectOffsets(t,n),l=Ine(a,o,s);return i=r.call(this,l[0].$from,l[0].$to,l)||this,i.startCell=t,i.endCell=n,i.offsetMap=o,i.isCellSelection=!0,i.visible=!1,i}return e.prototype.map=function(t,n){var i=this.startCell.pos,a=this.endCell.pos,o=t.resolve(n.map(i)),s=t.resolve(n.map(a)),l=de.create(o);if(this.offsetMap.totalColumnCount>l.totalColumnCount||this.offsetMap.totalRowCount>l.totalRowCount){var u={tableBody:1,tableRow:2,tableCell:3,paragraph:4},c=u[s.parent.type.name],f=s.end(s.depth-c),d=Math.min(f-4,s.pos);return q.create(t,d)}return new e(o,s)},e.prototype.eq=function(t){return t instanceof e&&t.startCell.pos===this.startCell.pos&&t.endCell.pos===this.endCell.pos},e.prototype.content=function(){for(var t=this.startCell.node(-2),n=this.startCell.start(-2),i=t.child(1).firstChild,a=t.child(0).type.create(),o=t.child(1).type.create(),s=de.create(this.startCell),l=s.getRectOffsets(this.startCell,this.endCell),u=l.startRowIdx,c=l.startColIdx,f=l.endRowIdx,d=l.endColIdx,h=!1,p=u;p<=f;p+=1){for(var v=[],m=c;m<=d;m+=1){var g=s.getCellInfo(p,m).offset,w=t.nodeAt(g-n);w&&(h=w.type.name==="tableHeadCell",s.extendedRowspan(p,m)||s.extendedColspan(p,m)?v.push(w.type.create({extended:!0})):v.push(w.copy(w.content)))}var k=i.copy(T.from(v)),C=h?a:o;C.content=C.content.append(T.from(k))}return new M(Rne(a,o),1,1)},e.prototype.toJSON=function(){return JSON.stringify(this)},e})(H);function Bne(r,e,t){for(var n=e.nodes,i=n.tableRow,a=n.tableHeadCell,o=n.paragraph,s=[],l=0;l<r;l+=1){var u=t&&t[l],c=o.create(null,u?e.text(u):[]);s.push(a.create(null,c))}return[i.create(null,s)]}function mv(r,e,t,n){for(var i=t.nodes,a=i.tableRow,o=i.tableBodyCell,s=i.paragraph,l=[],u=0;u<r;u+=1){for(var c=[],f=0;f<e;f+=1){var d=n&&n[u*e+f],h=s.create(null,d?t.text(d):[]);c.push(o.create(null,h))}l.push(a.create(null,c))}return l}function ji(r,e,t,n){n===void 0&&(n=null);for(var i=t.nodes,a=i.tableHeadCell,o=i.tableBodyCell,s=i.paragraph,l=e===0?a:o,u=[],c=0;c<r;c+=1)u.push(l.create(n,s.create()));return u}function gv(r,e){for(;r&&r!==e;){if(r.nodeName==="TD"||r.nodeName==="TH")return r;r=r.parentNode}return null}function yv(r){return Ct(r,function(e){var t=e.type;return t.name==="tableHeadCell"||t.name==="tableBodyCell"})}function at(r){if(r instanceof q){var e=r.$anchor,t=yv(e);if(t){var n=e.node(0).resolve(e.before(t.depth));return{anchor:n,head:n}}}var i=r,a=i.startCell,o=i.endCell;return{anchor:a,head:o}}function bv(r){var e;if(r.size){var t=r.content,n=r.openStart,i=r.openEnd;if(t.childCount!==1)return null;for(;t.childCount===1&&(n>0&&i>0||((e=t.firstChild)===null||e===void 0?void 0:e.type.name)==="table");)n-=1,i-=1,t=t.firstChild.content;if(t.firstChild.type.name==="tableHead"||t.firstChild.type.name==="tableBody")return t}return null}function Jr(r){var e=r.startRowIdx,t=r.startColIdx,n=r.endRowIdx,i=r.endColIdx,a=n-e+1,o=i-t+1;return{rowCount:a,columnCount:o}}function Pne(r,e){return b(b({},r.attrs),e)}var _t=new ht("cellSelection"),Hne=2,Fne=(function(){function r(e){this.view=e,this.handlers={mousedown:this.handleMousedown.bind(this),mousemove:this.handleMousemove.bind(this),mouseup:this.handleMouseup.bind(this)},this.startCellPos=null,this.init()}return r.prototype.init=function(){this.view.dom.addEventListener("mousedown",this.handlers.mousedown)},r.prototype.handleMousedown=function(e){var t=gv(e.target,this.view.dom);if(e.button===Hne){e.preventDefault();return}if(t){var n=this.getCellPos(e);n&&(this.startCellPos=n),this.bindEvent()}},r.prototype.handleMousemove=function(e){var t=_t.getState(this.view.state),n=this.getCellPos(e),i=this.startCellPos,a;t?a=this.view.state.doc.resolve(t):i!==n&&(a=i),a&&i&&n&&this.setCellSelection(i,n)},r.prototype.handleMouseup=function(){this.startCellPos=null,this.unbindEvent(),_t.getState(this.view.state)!==null&&this.view.dispatch(this.view.state.tr.setMeta(_t,-1))},r.prototype.bindEvent=function(){var e=this.view.dom;e.addEventListener("mousemove",this.handlers.mousemove),e.addEventListener("mouseup",this.handlers.mouseup)},r.prototype.unbindEvent=function(){var e=this.view.dom;e.removeEventListener("mousemove",this.handlers.mousemove),e.removeEventListener("mouseup",this.handlers.mouseup)},r.prototype.getCellPos=function(e){var t=e.clientX,n=e.clientY,i=this.view.posAtCoords({left:t,top:n});if(i){var a=this.view.state.doc,o=a.resolve(i.pos),s=yv(o);if(s){var l=o.before(s.depth);return a.resolve(l)}}return null},r.prototype.setCellSelection=function(e,t){var n=this.view.state,i=n.selection,a=n.tr,o=_t.getState(this.view.state)===null,s=new Sl(e,t);if(o||!i.eq(s)){var l=a.setSelection(s);o&&l.setMeta(_t,t.pos),this.view.dispatch(l)}},r.prototype.destroy=function(){this.view.dom.removeEventListener("mousedown",this.handlers.mousedown)},r})(),qne=A("cell-selected");function _ne(r){var e=r.selection,t=r.doc;if(e instanceof Sl){var n=[],i=e.ranges;return i.forEach(function(a){var o=a.$from,s=a.$to;n.push(ze.node(o.pos-1,s.pos+1,{class:qne}))}),xe.create(t,n)}return null}function $ne(){return new X({key:_t,state:{init:function(){return null},apply:function(r,e){var t=r.getMeta(_t);if(t)return t===-1?null:t;if(Xi(e)||!r.docChanged)return e;var n=r.mapping.mapResult(e),i=n.deleted,a=n.pos;return i?null:a}},props:{decorations:_ne,createSelectionBetween:function(r){var e=r.state;return Xi(_t.getState(e))?null:e.selection}},view:function(r){return new Fne(r)}})}var wv=(function(){function r(){this.keys=[],this.values=[]}return r.prototype.getKeyIndex=function(e){return pr(e,this.keys)},r.prototype.get=function(e){return this.values[this.getKeyIndex(e)]},r.prototype.set=function(e,t){var n=this.getKeyIndex(e);return n>-1?this.values[n]=t:(this.keys.push(e),this.values.push(t)),this},r.prototype.has=function(e){return this.getKeyIndex(e)>-1},r.prototype.delete=function(e){var t=this.getKeyIndex(e);return t>-1?(this.keys.splice(t,1),this.values.splice(t,1),!0):!1},r.prototype.forEach=function(e,t){var n=this;t===void 0&&(t=this),this.values.forEach(function(i,a){i&&n.keys[a]&&e.call(t,i,n.keys[a],n)})},r.prototype.clear=function(){this.keys=[],this.values=[]},r})(),xs="en-US",zne=(function(){function r(){this.code=xs,this.langs=new wv}return r.prototype.setCode=function(e){this.code=e||xs},r.prototype.setLanguage=function(e,t){var n=this;e=[].concat(e),e.forEach(function(i){if(!n.langs.has(i))n.langs.set(i,t);else{var a=n.langs.get(i);n.langs.set(i,Zs(a,t))}})},r.prototype.get=function(e,t){t||(t=this.code);var n=this.langs.get(t);n||(n=this.langs.get(xs));var i=n[e];if(!i)throw new Error('There is no text key "'+e+'" in '+t);return i},r})(),B=new zne,Vne=[[{action:"Add row to up",command:"addRowToUp",disableInThead:!0,className:"add-row-up"},{action:"Add row to down",command:"addRowToDown",disableInThead:!0,className:"add-row-down"},{action:"Remove row",command:"removeRow",disableInThead:!0,className:"remove-row"}],[{action:"Add column to left",command:"addColumnToLeft",className:"add-column-left"},{action:"Add column to right",command:"addColumnToRight",className:"add-column-right"},{action:"Remove column",command:"removeColumn",className:"remove-column"}],[{action:"Align column to left",command:"alignColumn",payload:{align:"left"},className:"align-column-left"},{action:"Align column to center",command:"alignColumn",payload:{align:"center"},className:"align-column-center"},{action:"Align column to right",command:"alignColumn",payload:{align:"right"},className:"align-column-right"}],[{action:"Remove table",command:"removeTable",className:"remove-table"}]];function Une(r,e){return Vne.map(function(t){return t.map(function(n){var i=n.action,a=n.command,o=n.payload,s=n.disableInThead,l=n.className;return{label:B.get(i),onClick:function(){r.emit("command",a,o)},disabled:e&&!!s,className:l}})}).concat()}function Wne(r){return new X({props:{handleDOMEvents:{contextmenu:function(e,t){var n=gv(t.target,e.dom);if(n){t.preventDefault();var i=t,a=i.clientX,o=i.clientY,s=e.dom.parentNode.getBoundingClientRect(),l=s.left,u=s.top,c=n.nodeName==="TH";return r.emit("contextmenu",{pos:{left:a-l+10+"px",top:o-u+30+"px"},menuGroups:Une(r,c),tableCell:n}),!0}return!1}}}})}function jne(){return new X({props:{handleDOMEvents:{mousedown:function(r,e){var t=e,n=t.clientX,i=t.clientY,a=r.posAtCoords({left:n,top:i});if(a){var o=r.state,s=o.doc,l=o.tr,u=s.resolve(a.pos),c=an(u),f=e.target,d=getComputedStyle(f,":before"),h=e,p=h.offsetX,v=h.offsetY;if(!c||!ll(d,p,v))return!1;e.preventDefault();var m=u.before(c.depth),g=c.node.attrs;return l.setNodeMarkup(m,null,b(b({},g),{checked:!g.checked})),r.dispatch(l),!0}return!1}}}})}var Gne=["image","link","customBlock","frontMatter"],Kne=["strong","strike","emph","code"],kv=["bulletList","orderedList","taskList"];function Jne(r,e){var t=r.type.name;return t==="listItem"?r.attrs.task?"taskList":e.type.name:t.indexOf("table")!==-1?"table":t}function Xne(r,e){e[r]={active:!0},kv.filter(function(t){return t!==r}).forEach(function(t){e[t]&&delete e[t]})}function Qne(r,e,t,n){Kne.forEach(function(i){var a=t.marks[i],o=r.marksAcross(e)||[],s=!!a.isInSet(o);s&&(n[i]={active:!0})})}function Yne(r,e,t){var n=r.$from,i=r.$to,a=r.from,o=r.to,s={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}};return e.nodesBetween(a,o,function(l,u,c){var f=Jne(l,c);ve(Gne,f)||(ve(kv,f)?(Xne(f,s),s.indent.disabled=!1,s.outdent.disabled=!1):f==="paragraph"||f==="text"?Qne(n,i,t,s):s[f]={active:!0})}),s}function Zne(r){return new X({view:function(){return{update:function(e){var t=e.state,n=t.selection,i=t.doc,a=t.schema;r.emit("changeToolbarState",{toolbarState:Yne(n,i,a)})}}}})}var eie=(function(){function r(e,t,n,i){var a=this;this.openEditor=function(){if(a.innerEditorView)throw new Error("The editor is already opened.");a.dom.draggable=!1,a.wrapper.style.display="none",a.innerViewContainer.style.display="block",a.innerEditorView=new or(a.innerViewContainer,{state:Tn.create({doc:a.node,plugins:[_r({"Mod-z":function(){return Vr(a.innerEditorView.state,a.innerEditorView.dispatch)},"Shift-Mod-z":function(){return Ni(a.innerEditorView.state,a.innerEditorView.dispatch)},Tab:function(o,s){return s(o.tr.insertText("	")),!0},Enter:Jo,Escape:function(){return a.cancelEditing(),!0},"Ctrl-Enter":function(){return a.saveAndFinishEditing(),!0}}),ns()]}),dispatchTransaction:function(o){return a.dispatchInner(o)},handleDOMEvents:{mousedown:function(){return a.editorView.hasFocus()&&a.innerEditorView.focus(),!0},blur:function(){return a.saveAndFinishEditing(),!0}}}),a.innerEditorView.focus()},this.node=e,this.editorView=t,this.getPos=n,this.toDOMAdaptor=i,this.innerEditorView=null,this.canceled=!1,this.dom=document.createElement("div"),this.dom.className=A("custom-block"),this.wrapper=document.createElement("div"),this.wrapper.className=A("custom-block-view"),this.createInnerViewContainer(),this.renderCustomBlock(),this.dom.appendChild(this.innerViewContainer),this.dom.appendChild(this.wrapper)}return r.prototype.renderToolArea=function(){var e=this,t=document.createElement("div"),n=document.createElement("span"),i=document.createElement("button");t.className="tool",n.textContent=this.node.attrs.info,n.className="info",i.type="button",i.addEventListener("click",function(){return e.openEditor()}),t.appendChild(n),t.appendChild(i),this.wrapper.appendChild(t)},r.prototype.renderCustomBlock=function(){var e=this.toDOMAdaptor.getToDOMNode(this.node.attrs.info);if(e){for(var t=e(this.node);this.wrapper.hasChildNodes();)this.wrapper.removeChild(this.wrapper.lastChild);t&&this.wrapper.appendChild(t),this.renderToolArea()}},r.prototype.createInnerViewContainer=function(){this.innerViewContainer=document.createElement("div"),this.innerViewContainer.className=A("custom-block-editor"),this.innerViewContainer.style.display="none"},r.prototype.closeEditor=function(){this.innerEditorView&&(this.innerEditorView.destroy(),this.innerEditorView=null,this.innerViewContainer.style.display="none"),this.wrapper.style.display="block"},r.prototype.saveAndFinishEditing=function(){var e=this.editorView.state.selection.to,t=this.editorView.state;this.editorView.dispatch(t.tr.setSelection(G(t.tr,e))),this.editorView.focus(),this.renderCustomBlock(),this.closeEditor()},r.prototype.cancelEditing=function(){var e=Nf(this.innerEditorView.state);for(this.canceled=!0;e--;)Vr(this.innerEditorView.state,this.innerEditorView.dispatch),Vr(this.editorView.state,this.editorView.dispatch);this.canceled=!1;var t=this.editorView.state.selection.to,n=this.editorView.state;this.editorView.dispatch(n.tr.setSelection(q.create(n.doc,t))),this.editorView.focus(),this.closeEditor()},r.prototype.dispatchInner=function(e){var t=this.innerEditorView.state.applyTransaction(e),n=t.state,i=t.transactions;if(this.innerEditorView.updateState(n),!this.canceled&&Ve(this.getPos)){for(var a=this.editorView.state.tr,o=We.offset(this.getPos()+1),s=0;s<i.length;s+=1)for(var l=i[s].steps,u=0;u<l.length;u+=1)a.step(l[u].map(o));a.docChanged&&this.editorView.dispatch(a)}},r.prototype.update=function(e){return e.sameMarkup(this.node)?(this.node=e,this.innerEditorView||this.renderCustomBlock(),!0):!1},r.prototype.stopEvent=function(e){return!!this.innerEditorView&&!!e.target&&this.innerEditorView.dom.contains(e.target)},r.prototype.ignoreMutation=function(){return!0},r.prototype.destroy=function(){this.dom.removeEventListener("dblclick",this.openEditor),this.closeEditor()},r})(),$d="image-link",tie=(function(){function r(e,t,n,i){var a=this,o;this.handleMousedown=function(s){s.preventDefault();var l=s.target,u=s.offsetX,c=s.offsetY;if(a.imageLink&&Ve(a.getPos)&&tp(l,$d)){var f=getComputedStyle(l,":before");if(s.stopPropagation(),ll(f,u,c)){var d=a.view.state.tr,h=a.getPos();d.setSelection(G(d,h,h+1)),a.view.dispatch(d),a.eventEmitter.emit("openPopup","link",a.imageLink.attrs)}}},this.node=e,this.view=t,this.getPos=n,this.eventEmitter=i,this.imageLink=(o=e.marks.filter(function(s){var l=s.type;return l.name==="link"})[0])!==null&&o!==void 0?o:null,this.dom=this.createElement(),this.bindEvent()}return r.prototype.createElement=function(){var e=this.createImageElement(this.node);if(this.imageLink){var t=document.createElement("span");return t.className=$d,t.appendChild(e),t}return e},r.prototype.createImageElement=function(e){var t=document.createElement("img"),n=e.attrs,i=n.imageUrl,a=n.altText,o=Y(e.attrs);return t.src=i,a&&(t.alt=a),fl(o,t),t},r.prototype.bindEvent=function(){this.imageLink&&this.dom.addEventListener("mousedown",this.handleMousedown)},r.prototype.stopEvent=function(){return!0},r.prototype.destroy=function(){this.imageLink&&this.dom.removeEventListener("mousedown",this.handleMousedown)},r})(),rie="toastui-editor-ww-code-block",nie="toastui-editor-ww-code-block-language",iie=(function(){function r(e,t,n,i){var a=this;this.contentDOM=null,this.input=null,this.timer=null,this.handleMousedown=function(o){var s=o.target,l=getComputedStyle(s,":after");if(l.backgroundImage!=="none"&&Ve(a.getPos)){var u=a.view.coordsAtPos(a.getPos()),c=u.top,f=u.right;a.createLanguageEditor({top:c,right:f})}},this.handleKeydown=function(o){o.key==="Enter"&&a.input&&(o.preventDefault(),a.changeLanguage())},this.node=e,this.view=t,this.getPos=n,this.eventEmitter=i,this.createElement(),this.bindDOMEvent(),this.bindEvent()}return r.prototype.createElement=function(){var e=this.node.attrs.language,t=document.createElement("div");t.setAttribute("data-language",e||"text"),t.className=rie;var n=this.createCodeBlockElement(),i=n.firstChild;t.appendChild(n),this.dom=t,this.contentDOM=i},r.prototype.createCodeBlockElement=function(){var e=document.createElement("pre"),t=document.createElement("code"),n=this.node.attrs.language,i=Y(this.node.attrs);return n&&t.setAttribute("data-language",n),fl(i,e),e.appendChild(t),e},r.prototype.createLanguageEditor=function(e){var t=this,n=e.top,i=e.right,a=document.createElement("span");a.className=nie;var o=document.createElement("input");o.type="text",o.value=this.node.attrs.language,a.appendChild(o),this.view.dom.parentElement.appendChild(a);var s=a.clientWidth;lt(a,{top:n+10+"px",left:i-s-10+"px",width:s+"px"}),this.input=o,this.input.addEventListener("blur",function(){return t.changeLanguage()}),this.input.addEventListener("keydown",this.handleKeydown),this.clearTimer(),this.timer=setTimeout(function(){t.input.focus()})},r.prototype.bindDOMEvent=function(){this.dom&&this.dom.addEventListener("click",this.handleMousedown)},r.prototype.bindEvent=function(){var e=this;this.eventEmitter.listen("scroll",function(){e.input&&e.reset()})},r.prototype.changeLanguage=function(){if(this.input&&Ve(this.getPos)){var e=this.input.value;this.reset();var t=this.getPos(),n=this.view.state.tr;n.setNodeMarkup(t,null,{language:e}),this.view.dispatch(n)}},r.prototype.reset=function(){var e;if(!((e=this.input)===null||e===void 0)&&e.parentElement){var t=this.input.parentElement;this.input=null,mr(t)}},r.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},r.prototype.stopEvent=function(){return!0},r.prototype.update=function(e){return e.sameMarkup(this.node)?(this.node=e,!0):!1},r.prototype.destroy=function(){this.reset(),this.clearTimer(),this.dom&&this.dom.removeEventListener("click",this.handleMousedown)},r})(),aie=/MsoListParagraph/,Cv=/style=(.|\n)*mso-/,Tv=/mso-list:(.*)/,oie=/O:P/,sie=/^(n|u|l)/,lie="p.MsoListParagraph";function uie(r){return Cv.test(r)}function cie(r){for(var e=[],t=document.createTreeWalker(r,1,null,!1);t.nextNode();){var n=t.currentNode;if(ya(n)){var i=n,a=i.outerHTML,o=i.textContent,s=Cv.test(a),l=Tv.test(a);s&&!l&&o?e.push([n,!0]):(oie.test(n.nodeName)||s&&!o||l)&&e.push([n,!1])}}return e.forEach(function(u){var c=u[0],f=u[1];f?Nw(c):mr(c)}),r.innerHTML.trim()}function fie(r,e){var t=r.getAttribute("style");if(t){var n=t.match(Tv),i=n[1],a=i.trim().split(" "),o=a[1],s=parseInt(o.replace("level",""),10),l=sie.test(r.textContent||"");return{id:e,level:s,prev:null,parent:null,children:[],unordered:l,contents:cie(r)}}return null}function die(r,e){if(e.level<r.level)e.children.push(r),r.parent=e;else{for(;e&&e.level!==r.level;)e=e.parent;e&&(r.prev=e,r.parent=e.parent,r.parent&&r.parent.children.push(r))}}function hie(r){var e=[];return r.forEach(function(t,n){var i=e[n-1],a=fie(t,n);a&&(i&&die(a,i),e.push(a))}),e}function xv(r){var e=r[0].unordered?"ul":"ol",t=document.createElement(e);return r.forEach(function(n){var i=n.children,a=n.contents,o=document.createElement("li");o.innerHTML=a,t.appendChild(o),i.length&&t.appendChild(xv(i))}),t}function pie(r){var e=hie(r),t=e.filter(function(n){var i=n.parent;return!i});return xv(t)}function vie(r){for(;r&&!ya(r);)r=r.nextSibling;return r?!aie.test(r.className):!0}function mie(r){var e=document.createElement("div");e.innerHTML=r;var t=[],n=Ow(e,lie);n.forEach(function(a){var o=vie(a.nextSibling);if(t.push(a),o){var s=pie(t),l=a.nextSibling;l?Aw(s,l):Lw(e,s),t=[]}mr(a)});var i=n.length?"<p></p>":"";return""+i+e.innerHTML}var zd="<!--StartFragment-->",gie="<!--EndFragment-->";function yie(r){var e=r.indexOf(zd),t=r.lastIndexOf(gie);return e>-1&&t>-1&&(r=r.slice(e+zd.length,t)),r.replace(/<br[^>]*>/g,op)}function bie(r){return/<\/td>((?!<\/tr>)[\s\S])*$/i.test(r)&&(r="<tr>"+r+"</tr>"),/<\/tr>((?!<\/table>)[\s\S])*$/i.test(r)&&(r="<table>"+r+"</table>"),r}function wie(r){return r=yie(r),r=bie(r),uie(r)&&(r=mie(r)),r}function kie(r){var e=r.reduce(function(t,n){return t.childCount>n.childCount?t:n});return e.childCount}function Ev(r,e,t){for(var n=[],i=r.childCount,a=0;a<i;a+=1)if(!r.child(a).attrs.extended){var o=a<i?t.create(r.child(a).attrs,r.child(a).content):t.createAndFill();n.push(o)}return n}function Sv(r,e,t){var n=t.nodes,i=n.tableRow,a=n.tableHeadCell,o=Ev(r,e,a);return i.create(null,o)}function Mv(r,e,t){var n=t.nodes,i=n.tableRow,a=n.tableBodyCell,o=Ev(r,e,a);return i.create(null,o)}function Cie(r,e){for(var t=e.nodes,n=t.tableRow,i=t.tableBodyCell,a=[],o=0;o<r;o+=1){var s=i.createAndFill();a.push(s)}return n.create({dummyRowForPasting:!0},a)}function Ov(r){var e=[],t=[];if(r.firstChild.type.name==="tableHead"){var n=r.firstChild;n.forEach(function(a){return e.push(a)})}if(r.lastChild.type.name==="tableBody"){var i=r.lastChild;i.forEach(function(a){return t.push(a)})}return Ne(Ne([],e),t)}function Tie(r,e,t){var n=Sv(r,e,t);return t.nodes.tableHead.create(null,n)}function Vd(r,e,t){var n=r.map(function(a){return Mv(a,e,t)});if(!r.length){var i=Cie(e,t);n.push(i)}return t.nodes.tableBody.create(null,n)}function xie(r,e,t,n){var i=kie(r);if(t&&n)return e.nodes.table.create(null,[Vd(r,i,e)]);var a=r[0],o=r.slice(1),s=[Tie(a,i,e)];return o.length&&s.push(Vd(o,i,e)),e.nodes.table.create(null,s)}function Eie(r,e,t){var n=[],i=r.content,a=r.openStart,o=r.openEnd;return i.forEach(function(s){if(s.type.name==="table"){var l=bv(new M(T.from(s),0,0));if(l){var u=Ov(l),c=l.firstChild.type.name==="tableBody",f=xie(u,e,c,t);n.push(f)}}else n.push(s)}),new M(T.from(n),a,o)}var Sie=4,Mie=2;function Gi(r){return r*Sie}function Oie(r,e,t){var n=[],i=Ov(r),a=i[0].childCount,o=i.length,s=e.startRowIdx===0,l=i.slice(0,o);if(s){var u=l.shift();if(u){var c=Sv(u,a,t).content;n.push(c)}}return l.forEach(function(f){if(!f.attrs.dummyRowForPasting){var d=Mv(f,a,t).content;n.push(d)}}),n}function Lie(r,e,t){for(var n=e.startRowIdx,i=e.startColIdx,a=t.length,o=0,s=function(h){var p=t[h].childCount;t[h].forEach(function(v){var m=v.attrs,g=m.colspan;g>1&&(p+=g-1)}),o=Math.max(o,p)},l=0;l<a;l+=1)s(l);var u=n+a-1,c=i+o-1,f=Math.max(u+1-r.totalRowCount,0),d=Math.max(c+1-r.totalColumnCount,0);return{startRowIdx:n,startColIdx:i,endRowIdx:u,endColIdx:c,addedRowCount:f,addedColumnCount:d}}function Aie(r,e){for(var t=r.startRowIdx,n=r.startColIdx,i=r.endRowIdx,a=r.endColIdx,o=r.addedRowCount,s=r.addedColumnCount,l=t;l<=i-o;l+=1)e.push({rowIdx:l,startColIdx:n,endColIdx:a-s})}function Nie(r,e,t,n,i){for(var a=n.startRowIdx,o=n.startColIdx,s=n.endRowIdx,l=n.endColIdx,u=n.addedRowCount,c=n.addedColumnCount,f=t.totalRowCount,d=0,h=0;h<f;h+=1){var p=t.getCellInfo(h,l-c),v=p.offset,m=p.nodeSize,g=r.mapping.map(v+m),w=ji(c,h,e);if(r.insert(g,w),h>=a&&h<=s-u){var k=t.getCellInfo(h,l-c),C=r.mapping.map(k.offset),x=g+Gi(c);i[d]={rowIdx:h,startColIdx:o,endColIdx:l,dummyOffsets:[C,x]},d+=1}}}function Die(r,e,t,n,i){var a=n.addedRowCount,o=n.addedColumnCount,s=n.startColIdx,l=n.endColIdx,u=r.mapping.maps.length,c=t.tableEndOffset-2,f=mv(a,t.totalColumnCount+o,e),d=c;r.insert(r.mapping.slice(u).map(d),f);for(var h=0;h<a;h+=1){var p=d+Gi(s)+1,v=d+Gi(l+1)+1,m=d+Gi(t.totalColumnCount+o)+Mie;i.push({rowIdx:h+t.totalRowCount,startColIdx:s,endColIdx:l,dummyOffsets:[p,v]}),d=m}}function Iie(r,e,t,n){var i=r.mapping.maps.length;t.forEach(function(a,o){var s=a.rowIdx,l=a.startColIdx,u=a.endColIdx,c=a.dummyOffsets,f=r.mapping.slice(i),d=new M(e[o],0,0),h=c?c[0]:n.getCellStartOffset(s,l),p=c?c[1]:n.getCellEndOffset(s,u);r.replace(f.map(h),f.map(p),d)})}function Rie(r,e){var t=r.state,n=t.selection,i=t.schema,a=t.tr,o=at(n),s=o.anchor,l=o.head;if(s&&l){var u=bv(e);if(!u)return!1;var c=de.create(s),f=c.getRectOffsets(s,l),d=Oie(u,f,i),h=Lie(c,f,d),p=[];return Pie(c,h)&&(Aie(h,p),h.addedColumnCount&&Nie(a,i,c,h,p),h.addedRowCount&&Die(a,i,c,h,p),Iie(a,d,p,c),r.dispatch(a),Bie(r,p,c.getCellInfo(0,0).offset)),!0}return!1}function Bie(r,e,t){var n=r.state,i=n.tr,a=n.doc,o=de.create(a.resolve(t)),s=e[0],l=s.rowIdx,u=s.startColIdx,c=Ee(e),f=c.rowIdx,d=c.endColIdx,h=o.getCellInfo(l,u).offset,p=o.getCellInfo(f,d).offset;r.dispatch(i.setSelection(new Sl(a.resolve(h),a.resolve(p))))}function Pie(r,e){var t=r.getSpannedOffsets(e),n=Jr(t),i=n.rowCount,a=n.columnCount,o=Jr(e),s=o.rowCount,l=o.columnCount;return i===s&&a===l}var Hie=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"doc"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"block+"}},enumerable:!1,configurable:!0}),e})(W),Fie=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"paragraph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"inline*",group:"block",attrs:b({},oe()),parseDOM:[{tag:"p"}],toDOM:function(t){var n=t.attrs;return["p",Y(n),0]}}},enumerable:!1,configurable:!0}),e})(W),qie=/\s{1,4}$/,_ie=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"text"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{group:"inline"}},enumerable:!1,configurable:!0}),e.prototype.addSpaces=function(){return function(t,n){var i=t.selection,a=t.tr,o=i.$from,s=i.$to,l=o.blockRange(s);return l&&!nn(o)&&!ca(o)?(n(a.insertText("    ",o.pos,s.pos)),!0):!1}},e.prototype.removeSpaces=function(){return function(t,n){var i=t.selection,a=t.tr,o=i.$from,s=i.$to,l=i.from,u=o.blockRange(s);if(u&&!nn(o)&&!ca(o)){var c=o.nodeBefore;if(c&&c.isText){var f=c.text,d=f.replace(qie,""),h=f.length-d.length;return n(a.delete(l-h,l)),!0}}return!1}},e.prototype.keymaps=function(){return{Tab:this.addSpaces(),"Shift-Tab":this.removeSpaces()}},e})(W),$ie=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"heading"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"levels",{get:function(){return[1,2,3,4,5,6]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=this.levels.map(function(n){return{tag:"h"+n,getAttrs:function(i){var a=i.getAttribute("data-raw-html");return b({level:n},a&&{rawHTML:a})}}});return{attrs:b({level:{default:1},headingType:{default:"atx"},rawHTML:{default:null}},oe()),content:"inline*",group:"block",defining:!0,parseDOM:t,toDOM:function(n){var i=n.attrs;return["h"+i.level,Y(i),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(t){return function(n,i){var a=n.schema.nodes[t.level?"heading":"paragraph"];return Mi(a,t)(n,i)}}},e})(W),zie=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",attrs:b({language:{default:null},rawHTML:{default:null}},oe()),code:!0,defining:!0,marks:"",parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:function(t){var n=t.getAttribute("data-raw-html"),i=t.firstElementChild;return b({language:i?.getAttribute("data-language")||null},n&&{rawHTML:n})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"pre",["code",b({"data-language":n.language},Y(n)),0]]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return Mi(t.schema.nodes.codeBlock)(t,n)}}},e.prototype.moveCursor=function(t){var n=this;return function(i,a){var o=i.tr,s=i.doc,l=i.schema,u=i.selection.$from,c=n.context.view;if(c.endOfTextblock(t)&&u.node().type.name==="codeBlock"){var f=u.parent.textContent.split(`
35`),d=t==="up"?u.start():u.end(),h=t==="up"?[d,f[0].length+d]:[d-Ee(f).length,d],p=s.resolve(t==="up"?u.before():u.after()),v=t==="up"?p.nodeBefore:p.nodeAfter;if(Xb(u.pos,h[0],h[1])&&!v){var m=ol(o,p,l);if(m)return a(m),!0}}return!1}},e.prototype.keymaps=function(){var t=this.commands()();return{"Shift-Mod-p":t,"Shift-Mod-P":t,ArrowUp:this.moveCursor("up"),ArrowDown:this.moveCursor("down")}},e})(W),Vie=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"bulletList"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:b({rawHTML:{default:null}},oe()),parseDOM:[Ea("ul")],toDOM:function(t){var n=t.attrs;return["ul",Y(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.changeList=function(){return function(t,n){return vv(t.schema.nodes.bulletList)(t,n)}},e.prototype.commands=function(){return{bulletList:this.changeList,taskList:xne}},e.prototype.keymaps=function(){var t=this.changeList(),n=El(),i=n.indent,a=n.outdent;return{"Mod-u":t,"Mod-U":t,Tab:i(),"Shift-Tab":a()}},e})(W),Uie=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"orderedList"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:b({order:{default:1},rawHTML:{default:null}},oe()),parseDOM:[{tag:"ol",getAttrs:function(t){var n=t.getAttribute("start"),i=t.getAttribute("data-raw-html");return b({order:t.hasAttribute("start")?Number(n):1},i&&{rawHTML:i})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"ol",b({start:n.order===1?null:n.order},Y(n)),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return vv(t.schema.nodes.orderedList)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()(),n=El(),i=n.indent,a=n.outdent;return{"Mod-o":t,"Mod-O":t,Tab:i(),"Shift-Tab":a()}},e})(W),Wie=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"listItem"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"paragraph block*",selectable:!1,attrs:{task:{default:!1},checked:{default:!1},rawHTML:{default:null}},defining:!0,parseDOM:[{tag:"li",getAttrs:function(t){var n=t.getAttribute("data-raw-html");return b({task:t.hasAttribute("data-task"),checked:t.hasAttribute("data-task-checked")},n&&{rawHTML:n})}}],toDOM:function(t){var n=t.attrs,i=n.task,a=n.checked;if(!i)return[n.rawHTML||"li",0];var o=["task-list-item"];return a&&o.push("checked"),[n.rawHTML||"li",b({class:o.join(" "),"data-task":i},a&&{"data-task-checked":a}),0]}}},enumerable:!1,configurable:!0}),e.prototype.liftToPrevListItem=function(){return function(t,n){var i=t.selection,a=t.tr,o=t.schema,s=i.$from,l=i.empty,u=o.nodes.listItem,c=s.parent,f=s.node(-1);if(l&&!c.childCount&&f.type===u){if(s.index(-2)>=1)return a.delete(s.start(-1)-1,s.end(-1)),n(a),!0;var d=s.node(-3);if(d.type===u)return a.delete(s.start(-2)-1,s.end(-1)),n(a),!0}return!1}},e.prototype.keymaps=function(){var t=function(n,i){return Lne(n.schema.nodes.listItem)(n,i)};return{Backspace:this.liftToPrevListItem(),Enter:t}},e})(W),jie=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:b({rawHTML:{default:null}},oe()),content:"block+",group:"block",parseDOM:[Ea("blockquote")],toDOM:function(t){var n=t.attrs;return["blockquote",Y(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return xf(t.schema.nodes.blockQuote)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()();return{"Alt-q":t,"Alt-Q":t}},e})(W),Gie={left:tae,right:eae,up:rae,down:nae};function Kie(r,e,t){var n=t[0],i=t[1],a=e.resolve(r.before(n-1));return i===n&&!a.nodeBefore}function Jie(r){for(var e,t=r.depth,n;t&&(n=r.node(t),n.type.name!=="tableBodyCell");){if(n.type.name==="listItem"){var i=r.node(t-1),a=i.lastChild===n,o=((e=n.lastChild)===null||e===void 0?void 0:e.type.name)!=="paragraph";return a?!o:!1}t-=1}return!1}function Xie(r,e,t,n,i){var a=e[0],o=e[1],s=e[2];if(r==="left"||r==="up"){if(i&&!Kie(t,n,[a,o]))return!1;var l=t.before(s),u=n.resolve(l).nodeBefore;if(u)return!1}return!0}function Qie(r,e,t,n,i){if(r==="right"||r==="down"){if(i&&!Jie(t))return!1;var a=t.after(e),o=n.resolve(a).nodeAfter;if(o)return!1}return!0}function Yie(r,e,t,n){var i=e[0],a=e[1],o=i+3,s=a>=o,l=s?i+1:a,u=Xie(r,[a,o,l],t,n,s),c=Qie(r,l,t,n,s);return u&&c}function Ud(r,e,t){var n=t[0],i=t[1],a=e.getRowspanStartInfo(n,i),o=r==="up"&&n===0,s=r==="down"&&(a?.count>1?n+a.count-1:n)===e.totalRowCount-1;return o||s}function Zie(r,e,t){var n=r.doc.resolve(e.tableStartOffset-1);return n.nodeBefore?r.setSelection(H.near(n,-1)):ol(r,n,t)}function Es(r,e,t,n){n===void 0&&(n=!1);var i=r.doc.resolve(e.tableEndOffset);return n||!i.nodeAfter?ol(r,i,t):r.setSelection(H.near(i,1))}function eae(r,e){var t=r[0],n=r[1],i=e.totalRowCount,a=e.totalColumnCount,o=n===a-1,s=t===i-1&&o;if(!s){var l=n+1,u=e.getColspanStartInfo(t,n);u?.count>1&&(l+=u.count-1),(o||l===a)&&(t+=1,l=0);var c=e.getCellInfo(t,l).offset;return c+2}return null}function tae(r,e){var t=r[0],n=r[1],i=e.totalColumnCount,a=n===0,o=t===0&&a;if(!o){n-=1,a&&(t-=1,n=i-1);var s=e.getCellInfo(t,n),l=s.offset,u=s.nodeSize;return l+u-2}return null}function rae(r,e){var t=r[0],n=r[1];if(t>0){var i=e.getCellInfo(t-1,n),a=i.offset,o=i.nodeSize;return a+o-2}return null}function nae(r,e){var t=r[0],n=r[1],i=e.totalRowCount;if(t<i-1){var a=t+1,o=e.getRowspanStartInfo(t,n);o?.count>1&&(a+=o.count-1);var s=e.getCellInfo(a,n).offset;return s+2}return null}function Wd(r,e,t,n){var i=Gie[r],a=i(t,n);if(a){var o=r==="right"||r==="down"?1:-1;return e.setSelection(H.near(e.doc.resolve(a),o))}return null}function iae(r,e,t){var n=t[0],i=t[1];if(r==="up"||r==="down")return!1;var a=e.tableStartOffset,o=e.tableEndOffset,s=e.getCellInfo(n,i),l=s.offset,u=s.nodeSize,c=r==="left"?a:o,f=r==="left"?l-2:l+u+3;return c===f}function aae(r,e,t){var n=r.doc.resolve(e.before(t-3));return r.setSelection(new R(n))}function oae(r,e,t){var n,i,a;return r==="up"?(n=t.startRowIdx,i=0,a=-1):(n=t.endRowIdx,i=e.totalColumnCount-1,a=e.getCellInfo(n,i).nodeSize+1),{targetRowIdx:n,insertColIdx:i,nodeSize:a}}function sae(r,e,t){var n=r.getCellInfo(e,0).offset,i=r.getCellInfo(e,t-1),a=i.offset,o=i.nodeSize;return{from:n,to:a+o}}var lae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"table"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"tableHead{1} tableBody{1}",group:"block",attrs:b({rawHTML:{default:null}},oe()),parseDOM:[Ea("table")],toDOM:function(t){var n=t.attrs;return["table",Y(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.addTable=function(){return function(t){return t===void 0&&(t={rowCount:2,columnCount:1,data:[]}),function(n,i){var a=t.rowCount,o=t.columnCount,s=t.data,l=n.schema,u=n.selection,c=n.tr,f=u.from,d=u.to,h=u.$from,p=f===d;if(p&&!ca(h)){var v=l.nodes,m=v.tableHead,g=v.tableBody,w=s?.slice(0,o),k=s?.slice(o,s.length),C=Bne(o,l,w),x=mv(a-1,o,l,k),L=l.nodes.table.create(null,[m.create(null,C),g.create(null,x)]);return i(c.replaceSelectionWith(L)),!0}return!1}}},e.prototype.removeTable=function(){return function(){return function(t,n){var i=t.selection,a=t.tr,o=de.create(i.$anchor);if(o){var s=o.tableStartOffset,l=o.tableEndOffset,u=s-1,c=G(a.delete(u,l),u);return n(a.setSelection(c)),!0}return!1}}},e.prototype.addColumn=function(t){return function(){return function(n,i){var a=n.selection,o=n.tr,s=n.schema,l=at(a),u=l.anchor,c=l.head;if(u&&c){for(var f=de.create(u),d=f.getRectOffsets(u,c),h=t==="left"?d.startColIdx:d.endColIdx+1,p=Jr(d).columnCount,v=f.totalRowCount,m=0;m<v;m+=1){var g=ji(p,m,s);o.insert(o.mapping.map(f.posAt(m,h)),g)}return i(o),!0}return!1}}},e.prototype.removeColumn=function(){return function(){return function(t,n){var i=t.selection,a=t.tr,o=at(i),s=o.anchor,l=o.head;if(s&&l){var u=de.create(s),c=u.getRectOffsets(s,l),f=u.totalColumnCount,d=u.totalRowCount,h=Jr(c).columnCount,p=h===f;if(p)return!1;for(var v=c.startColIdx,m=c.endColIdx,g=a.mapping.maps.length,w=0;w<d;w+=1)for(var k=m;k>=v;k-=1){var C=u.getCellInfo(w,k),x=C.offset,L=C.nodeSize,E=a.mapping.slice(g).map(x),N=E+L;a.delete(E,N)}return n(a),!0}return!1}}},e.prototype.addRow=function(t){return function(){return function(n,i){var a=n.selection,o=n.schema,s=n.tr,l=at(a),u=l.anchor,c=l.head;if(u&&c){var f=de.create(u),d=f.totalColumnCount,h=f.getRectOffsets(u,c),p=Jr(h).rowCount,v=oae(t,f,h),m=v.targetRowIdx,g=v.insertColIdx,w=v.nodeSize,k=m===0;if(!k){for(var C=[],x=s.mapping.map(f.posAt(m,g))+w,L=[],E=0;E<d;E+=1)L=L.concat(ji(1,m,o));for(var N=0;N<p;N+=1)C.push(o.nodes.tableRow.create(null,L));return i(s.insert(x,C)),!0}}return!1}}},e.prototype.removeRow=function(){return function(){return function(t,n){var i=t.selection,a=t.tr,o=at(i),s=o.anchor,l=o.head;if(s&&l){var u=de.create(s),c=u.totalRowCount,f=u.totalColumnCount,d=u.getRectOffsets(s,l),h=Jr(d).rowCount,p=d.startRowIdx,v=d.endRowIdx,m=p===0,g=h===c-1;if(g||m)return!1;for(var w=v;w>=p;w-=1){var k=sae(u,w,f),C=k.from,x=k.to;a.delete(C-1,x+1)}return n(a),!0}return!1}}},e.prototype.alignColumn=function(){return function(t){return t===void 0&&(t={align:"center"}),function(n,i){var a=t.align,o=n.selection,s=n.tr,l=at(o),u=l.anchor,c=l.head;if(u&&c){for(var f=de.create(u),d=f.totalRowCount,h=f.getRectOffsets(u,c),p=h.startColIdx,v=h.endColIdx,m=0;m<d;m+=1)for(var g=p;g<=v;g+=1)if(!f.extendedRowspan(m,g)&&!f.extendedColspan(m,g)){var w=f.getNodeAndPos(m,g),k=w.node,C=w.pos,x=Pne(k,{align:a});s.setNodeMarkup(C,null,x)}return i(s),!0}return!1}}},e.prototype.moveToCell=function(t){return function(n,i){var a=n.selection,o=n.tr,s=n.schema,l=at(a),u=l.anchor,c=l.head;if(u&&c){var f=de.create(u),d=f.getCellIndex(u),h=void 0;if(Ud(t,f,d)?h=Es(o,f,s):h=Wd(t,o,d,f),h)return i(h),!0}return!1}},e.prototype.moveInCell=function(t){var n=this;return function(i,a){var o=i.selection,s=i.tr,l=i.doc,u=i.schema,c=o.$from,f=n.context.view;if(!f.endOfTextblock(t))return!1;var d=Ct(c,function(k){var C=k.type;return C.name==="tableHeadCell"||C.name==="tableBodyCell"});if(d){var h=Ct(c,function(k){var C=k.type;return C.name==="paragraph"}),p=d.depth;if(h&&Yie(t,[p,h.depth],c,l)){var v=at(o).anchor,m=de.create(v),g=m.getCellIndex(v),w=void 0;if(iae(t,m,g)?w=aae(s,c,p):Ud(t,m,g)?t==="up"?w=Zie(s,m,u):t==="down"&&(w=Es(s,m,u)):w=Wd(t,s,g,m),w)return a(w),!0}}return!1}},e.prototype.deleteCells=function(){return function(t,n){var i=t.schema,a=t.selection,o=t.tr,s=at(a),l=s.anchor,u=s.head,c=a instanceof q;if(l&&u&&!c){for(var f=de.create(l),d=f.getRectOffsets(l,u),h=d.startRowIdx,p=d.startColIdx,v=d.endRowIdx,m=d.endColIdx,g=h;g<=v;g+=1)for(var w=p;w<=m;w+=1)if(!f.extendedRowspan(g,w)&&!f.extendedColspan(g,w)){var k=f.getNodeAndPos(g,w),C=k.node,x=k.pos,L=ji(1,g,i,C.attrs);o.replaceWith(o.mapping.map(x),o.mapping.map(x+C.nodeSize),L)}return n(o),!0}return!1}},e.prototype.exitTable=function(){return function(t,n){var i=t.selection,a=t.tr,o=t.schema,s=i.$from,l=Ct(s,function(d){var h=d.type;return h.name==="tableHeadCell"||h.name==="tableBodyCell"});if(l){var u=Ct(s,function(d){var h=d.type;return h.name==="paragraph"});if(u){var c=at(i).anchor,f=de.create(c);return n(Es(a,f,o,!0)),!0}}return!1}},e.prototype.commands=function(){return{addTable:this.addTable(),removeTable:this.removeTable(),addColumnToLeft:this.addColumn("left"),addColumnToRight:this.addColumn("right"),removeColumn:this.removeColumn(),addRowToUp:this.addRow("up"),addRowToDown:this.addRow("down"),removeRow:this.removeRow(),alignColumn:this.alignColumn()}},e.prototype.keymaps=function(){var t=this.deleteCells();return{Tab:this.moveToCell("right"),"Shift-Tab":this.moveToCell("left"),ArrowUp:this.moveInCell("up"),ArrowDown:this.moveInCell("down"),ArrowLeft:this.moveInCell("left"),ArrowRight:this.moveInCell("right"),Backspace:t,"Mod-Backspace":t,Delete:t,"Mod-Delete":t,"Mod-Enter":this.exitTable()}},e})(W),uae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableHead"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"tableRow{1}",attrs:b({rawHTML:{default:null}},oe()),parseDOM:[Ea("thead")],toDOM:function(t){var n=t.attrs;return["thead",Y(n),0]}}},enumerable:!1,configurable:!0}),e})(W),cae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableBody"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"tableRow+",attrs:b({rawHTML:{default:null}},oe()),parseDOM:[{tag:"tbody",getAttrs:function(t){var n=t.querySelectorAll("tr"),i=n[0].children.length,a=t.getAttribute("data-raw-html");return i?b({},a&&{rawHTML:a}):!1}}],toDOM:function(t){var n=t.attrs;return["tbody",Y(n),0]}}},enumerable:!1,configurable:!0}),e})(W),fae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableRow"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"(tableHeadCell | tableBodyCell)*",attrs:b({rawHTML:{default:null}},oe()),parseDOM:[{tag:"tr",getAttrs:function(t){var n=t.children.length,i=t.getAttribute("data-raw-html");return n?b({},i&&{rawHTML:i}):!1}}],toDOM:function(t){var n=t.attrs;return["tr",Y(n),0]}}},enumerable:!1,configurable:!0}),e})(W),dae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableHeadCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"paragraph+",attrs:b({align:{default:null},className:{default:null},rawHTML:{default:null},colspan:{default:null},extended:{default:null}},oe()),isolating:!0,parseDOM:[dv("th")],toDOM:function(t){var n=t.attrs,i=fv(n);return["th",b(b({},i),Y(n)),0]}}},enumerable:!1,configurable:!0}),e})(W),hae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableBodyCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"(paragraph | bulletList | orderedList)+",attrs:{align:{default:null},className:{default:null},rawHTML:{default:null},colspan:{default:null},rowspan:{default:null},extended:{default:null}},isolating:!0,parseDOM:[dv("td")],toDOM:function(t){var n=t.attrs,i=fv(n);return["td",i,0]}}},enumerable:!1,configurable:!0}),e})(W),pae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"image"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{inline:!0,attrs:b({imageUrl:{default:""},altText:{default:null},rawHTML:{default:null}},oe()),group:"inline",selectable:!1,parseDOM:[{tag:"img[src]",getAttrs:function(t){var n=br(t,{RETURN_DOM_FRAGMENT:!0}).firstChild,i=n.getAttribute("src")||"",a=n.getAttribute("data-raw-html"),o=n.getAttribute("alt");return b({imageUrl:i,altText:o},a&&{rawHTML:a})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"img",b(b({src:Kr(n.imageUrl)},n.altText&&{alt:n.altText}),Y(n))]}}},enumerable:!1,configurable:!0}),e.prototype.addImage=function(){return function(t){return function(n,i){var a=n.schema,o=n.tr,s=t,l=s.imageUrl,u=s.altText;if(!l)return!1;var c=a.nodes.image.createAndFill(b({imageUrl:l},u&&{altText:u}));return i(o.replaceSelectionWith(c).scrollIntoView()),!0}}},e.prototype.commands=function(){return{addImage:this.addImage()}},e})(W),jd=1,vae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:b({rawHTML:{default:null}},oe()),group:"block",parseDOM:[{tag:"hr"}],selectable:!1,toDOM:function(t){var n=t.attrs;return["div",Y(n),[n.rawHTML||"hr"]]}}},enumerable:!1,configurable:!0}),e.prototype.hr=function(){var t=this;return function(){return function(n,i){var a,o=n.selection,s=o.$from,l=o.$to;if(s===l){var u=n.doc,c=n.schema.nodes,f=c.thematicBreak,d=c.paragraph,h=[f.create()],p=s.node(jd),v=u.child(u.childCount-1)===p,m=u.resolve(s.after(jd)),g=((a=s.nodeAfter)===null||a===void 0?void 0:a.type.name)===t.name;return(v||g)&&h.push(d.create()),i(n.tr.insert(m.pos,h).scrollIntoView()),!0}return!1}}},e.prototype.commands=function(){return{hr:this.hr()}},e.prototype.keymaps=function(){var t=this.hr()();return{"Mod-l":t,"Mod-L":t}},e})(W),mae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strong"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=["b","strong"].map(function(n){return{tag:n,getAttrs:function(i){var a=i.getAttribute("data-raw-html");return b({},a&&{rawHTML:a})}}});return{attrs:b({rawHTML:{default:null}},oe()),parseDOM:t,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"strong",Y(i)]}}},enumerable:!1,configurable:!0}),e.prototype.bold=function(){return function(){return function(t,n){return zr(t.schema.marks.strong)(t,n)}}},e.prototype.commands=function(){return{bold:this.bold()}},e.prototype.keymaps=function(){var t=this.bold()();return{"Mod-b":t,"Mod-B":t}},e})(K),gae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"emph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=["i","em"].map(function(n){return{tag:n,getAttrs:function(i){var a=i.getAttribute("data-raw-html");return b({},a&&{rawHTML:a})}}});return{attrs:b({rawHTML:{default:null}},oe()),parseDOM:t,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"em",Y(i)]}}},enumerable:!1,configurable:!0}),e.prototype.italic=function(){return function(){return function(t,n){return zr(t.schema.marks.emph)(t,n)}}},e.prototype.commands=function(){return{italic:this.italic()}},e.prototype.keymaps=function(){var t=this.italic()();return{"Mod-i":t,"Mod-I":t}},e})(K),yae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strike"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=["s","del"].map(function(n){return{tag:n,getAttrs:function(i){var a=i.getAttribute("data-raw-html");return b({},a&&{rawHTML:a})}}});return{attrs:b({rawHTML:{default:null}},oe()),parseDOM:t,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"del",Y(i)]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return zr(t.schema.marks.strike)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()();return{"Mod-s":t,"Mod-S":t}},e})(K),bae=(function(r){O(e,r);function e(t){var n=r.call(this)||this;return n.linkAttributes=t,n}return Object.defineProperty(e.prototype,"name",{get:function(){return"link"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=this;return{attrs:b({linkUrl:{default:""},title:{default:null},rawHTML:{default:null}},oe()),inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(n){var i=br(n,{RETURN_DOM_FRAGMENT:!0}).firstChild,a=i.getAttribute("href")||"",o=i.getAttribute("title")||"",s=i.getAttribute("data-raw-html");return b({linkUrl:a,title:o},s&&{rawHTML:s})}}],toDOM:function(n){var i=n.attrs;return[i.rawHTML||"a",b(b({href:Kr(i.linkUrl)},t.linkAttributes),Y(i))]}}},enumerable:!1,configurable:!0}),e.prototype.addLink=function(){return function(t){return function(n,i){var a=t,o=a.linkUrl,s=a.linkText,l=s===void 0?"":s,u=n.schema,c=n.tr,f=n.selection,d=f.empty,h=f.from,p=f.to;if(h&&p&&o){var v={linkUrl:o},m=u.mark("link",v);if(d&&l){var g=pe(u,l,m);c.replaceRangeWith(h,p,g)}else c.addMark(h,p,m);return i(c.scrollIntoView()),!0}return!1}}},e.prototype.toggleLink=function(){return function(t){return function(n,i){return zr(n.schema.marks.link,t)(n,i)}}},e.prototype.commands=function(){return{addLink:this.addLink(),toggleLink:this.toggleLink()}},e})(K),wae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"code"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:b({rawHTML:{default:null}},oe()),parseDOM:[{tag:"code",getAttrs:function(t){var n=t.getAttribute("data-raw-html");return b({},n&&{rawHTML:n})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"code",Y(n)]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return zr(t.schema.marks.code)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()();return{"Shift-Mod-c":t,"Shift-Mod-C":t}},e})(K),kae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"customBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",attrs:{info:{default:null}},atom:!0,code:!0,defining:!0,parseDOM:[{tag:"div[data-custom-info]",getAttrs:function(t){var n=t.getAttribute("data-custom-info");return{info:n}}}],toDOM:function(t){var n=t.attrs;return["div",{"data-custom-info":n.info||null},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(t){return function(n,i){return t?.info?Mi(n.schema.nodes.customBlock,t)(n,i):!1}}},e})(W),Cae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"frontMatter"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",code:!0,defining:!0,parseDOM:[{preserveWhitespace:"full",tag:"div[data-front-matter]"}],toDOM:function(){return["div",{"data-front-matter":"true"},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n,i){var a=t.selection.$from;return i.endOfTextblock("down")&&a.node().type.name==="frontMatter"?Si(t,n):!1}}},e.prototype.keymaps=function(){return{Enter:this.commands()()}},e})(W),Tae=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"htmlComment"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",code:!0,defining:!0,parseDOM:[{preserveWhitespace:"full",tag:"div[data-html-comment]"}],toDOM:function(){return["div",{"data-html-comment":"true"},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n,i){var a=t.selection.$from;return i.endOfTextblock("down")&&a.node().type.name==="htmlComment"?Si(t,n):!1}}},e.prototype.keymaps=function(){return{Enter:this.commands()()}},e})(W);function xae(r){return new vp([new Hie,new Fie,new _ie,new $ie,new zie,new Vie,new Uie,new Wie,new jie,new lae,new uae,new cae,new fae,new dae,new hae,new pae,new vae,new mae,new gae,new yae,new bae(r),new wae,new kae,new Cae,new hp,new Tae])}var Eae=A("contents"),Sae=(function(r){O(e,r);function e(t,n){var i=r.call(this,t)||this,a=n.toDOMAdaptor,o=n.htmlSchemaMap,s=o===void 0?{}:o,l=n.linkAttributes,u=l===void 0?{}:l,c=n.useCommandShortcut,f=c===void 0?!0:c,d=n.wwPlugins,h=d===void 0?[]:d,p=n.wwNodeViews,v=p===void 0?{}:p;return i.editorType="wysiwyg",i.el.classList.add("ww-mode"),i.toDOMAdaptor=a,i.linkAttributes=u,i.extraPlugins=h,i.pluginNodeViews=v,i.specs=i.createSpecs(),i.schema=i.createSchema(s),i.context=i.createContext(),i.keymaps=i.createKeymaps(f),i.view=i.createView(),i.commands=i.createCommands(),i.specs.setContext(b(b({},i.context),{view:i.view})),i.initEvent(),i}return e.prototype.createSpecs=function(){return xae(this.linkAttributes)},e.prototype.createContext=function(){return{schema:this.schema,eventEmitter:this.eventEmitter}},e.prototype.createSchema=function(t){return new pn({nodes:b(b({},this.specs.nodes),t.nodes),marks:b(b({},this.specs.marks),t.marks)})},e.prototype.createPlugins=function(){return Ne([$ne(),Wne(this.eventEmitter),jne(),Zne(this.eventEmitter)],this.createPluginProps()).concat(this.defaultPlugins)},e.prototype.createPluginNodeViews=function(){var t=this,n=t.eventEmitter,i=t.pluginNodeViews,a={};return i&&Object.keys(i).forEach(function(o){a[o]=function(s,l,u){return i[o](s,l,u,n)}}),a},e.prototype.createView=function(){var t=this,n=this,i=n.toDOMAdaptor,a=n.eventEmitter;return new or(this.el,{state:this.createState(),attributes:{class:Eae},nodeViews:b({customBlock:function(o,s,l){return new eie(o,s,l,i)},image:function(o,s,l){return new tie(o,s,l,a)},codeBlock:function(o,s,l){return new iie(o,s,l,a)},widget:dp},this.createPluginNodeViews()),dispatchTransaction:function(o){var s=t.view.state.applyTransaction(o).state;t.view.updateState(s),t.emitChangeEvent(o.scrollIntoView()),t.eventEmitter.emit("setFocusedNode",s.selection.$from.node(1))},transformPastedHTML:wie,transformPasted:function(o){return Eie(o,t.schema,ca(t.view.state.selection.$from))},handlePaste:function(o,s,l){return Rie(o,l)},handleKeyDown:function(o,s){return t.eventEmitter.emit("keydown",t.editorType,s),!1},handleDOMEvents:{paste:function(o,s){var l=s.clipboardData||window.clipboardData,u=l?.items;if(u){var c=ut(u).some(function(d){return d.kind==="string"&&d.type==="text/rtf"});if(!c){var f=fp(u);f&&(s.preventDefault(),hl(t.eventEmitter,f,s.type))}}return!1},keyup:function(o,s){return t.eventEmitter.emit("keyup",t.editorType,s),!1},scroll:function(){return t.eventEmitter.emit("scroll","editor"),!0}}})},e.prototype.createCommands=function(){return this.specs.commands(this.view,El())},e.prototype.getHTML=function(){return dl(this.view.dom.innerHTML)},e.prototype.getModel=function(){return this.view.state.doc},e.prototype.getSelection=function(){var t=this.view.state.selection,n=t.from,i=t.to;return[n,i]},e.prototype.getSchema=function(){return this.view.state.schema},e.prototype.replaceSelection=function(t,n,i){var a=this.view.state,o=a.schema,s=a.tr,l=t.split(`
36`),u=l.map(function(d){return ea(o,hr(d,o))}),c=new M(T.from(u),1,1),f=kt(n)&&kt(i)?s.replaceRange(n,i,c):s.replaceSelection(c);this.view.dispatch(f),this.focus()},e.prototype.deleteSelection=function(t,n){var i=this.view.state.tr,a=kt(t)&&kt(n)?i.deleteRange(t,n):i.deleteSelection();this.view.dispatch(a.scrollIntoView())},e.prototype.getSelectedText=function(t,n){var i=this.view.state,a=i.doc,o=i.selection,s=o.from,l=o.to;return kt(t)&&kt(n)&&(s=t,l=n),a.textBetween(s,l,`
37`)},e.prototype.setModel=function(t,n){n===void 0&&(n=!1);var i=this.view.state,a=i.tr,o=i.doc;this.view.dispatch(a.replaceWith(0,o.content.size,t)),n&&this.moveCursorToEnd(!0)},e.prototype.setSelection=function(t,n){n===void 0&&(n=t);var i=this.view.state.tr,a=G(i,t,n);this.view.dispatch(i.setSelection(a).scrollIntoView())},e.prototype.addWidget=function(t,n,i){var a=this.view,o=a.dispatch,s=a.state;o(s.tr.setMeta("widget",{pos:i??s.selection.to,node:t,style:n}))},e.prototype.replaceWithWidget=function(t,n,i){var a=this.view.state,o=a.tr,s=a.schema,l=hr(i,s);this.view.dispatch(o.replaceWith(t,n,l))},e.prototype.getRangeInfoOfNode=function(t){var n=this.view.state,i=n.doc,a=n.selection,o=t?i.resolve(t):a.$from,s=o.marks(),l=o.node(),u=o.start(),c=o.end(),f=l.type.name;if(s.length||f==="paragraph"){var d=s[s.length-1],h=function(p){return p.length?ve(p,d):!0};f=d?d.type.name:"text",l.forEach(function(p,v){var m=p.isText,g=p.nodeSize,w=p.marks,k=o.pos-u;m&&v<=k&&v+g>=k&&h(w)&&(u=u+v,c=u+g)})}return{range:[u,c],type:f}},e})(pp),Mae=Qe,Oae=Xi;function Lae(r){return!Mae(r)&&!Oae(r)}var Aae=Lae,Nae=Aae;function Dae(r){return Nae(r)&&r!==!1}var Iae=Dae,Rae=Iae;function Bae(r){return!Rae(r)}var Pae=Bae,Gd=["afterPreviewRender","updatePreview","changeMode","needChangeMode","command","changePreviewStyle","changePreviewTabPreview","changePreviewTabWrite","scroll","contextmenu","show","hide","changeLanguage","changeToolbarState","toggleScrollSync","mixinTableOffsetMapPrototype","setFocusedNode","removePopupWidget","query","openPopup","closePopup","addImageBlobHook","beforePreviewRender","beforeConvertWysiwygToMarkdown","load","loadUI","change","caretChange","destroy","focus","blur","keydown","keyup"],Lv=(function(){function r(){var e=this;this.events=new wv,this.eventTypes=Gd.reduce(function(t,n){return b(b({},t),{type:n})},{}),this.hold=!1,Gd.forEach(function(t){e.addEventType(t)})}return r.prototype.listen=function(e,t){var n=this.getTypeInfo(e),i=this.events.get(n.type)||[];if(!this.hasEventType(n.type))throw new Error("There is no event type "+n.type);n.namespace&&(t.namespace=n.namespace),i.push(t),this.events.set(n.type,i)},r.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=this.getTypeInfo(e),a=this.events.get(i.type),o=[];return!this.hold&&a&&a.forEach(function(s){var l=s.apply(void 0,t);Qe(l)||o.push(l)}),o},r.prototype.emitReduce=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var a=this.events.get(e);return!this.hold&&a&&a.forEach(function(o){var s=o.apply(void 0,Ne([t],n));Pae(s)||(t=s)}),t},r.prototype.getTypeInfo=function(e){var t=e.split(".");return{type:t[0],namespace:t[1]}},r.prototype.hasEventType=function(e){return!Qe(this.eventTypes[this.getTypeInfo(e).type])},r.prototype.addEventType=function(e){if(this.hasEventType(e))throw new Error("There is already have event type "+e);this.eventTypes[e]=e},r.prototype.removeEventHandler=function(e,t){var n=this,i=this.getTypeInfo(e),a=i.type,o=i.namespace;a&&t?this.removeEventHandlerWithHandler(a,t):a&&!o?this.events.delete(a):!a&&o?this.events.forEach(function(s,l){n.removeEventHandlerWithTypeInfo(l,o)}):a&&o&&this.removeEventHandlerWithTypeInfo(a,o)},r.prototype.removeEventHandlerWithHandler=function(e,t){var n=this.events.get(e);if(n){var i=n.indexOf(t);n.indexOf(t)>=0&&n.splice(i,1)}},r.prototype.removeEventHandlerWithTypeInfo=function(e,t){var n=[],i=this.events.get(e);i&&(i.map(function(a){return a.namespace!==t&&n.push(a),null}),this.events.set(e,n))},r.prototype.getEvents=function(){return this.events},r.prototype.holdEventInvoke=function(e){this.hold=!0,e(),this.hold=!1},r})(),Hae=(function(){function r(e,t,n,i){this.eventEmitter=e,this.mdCommands=t,this.wwCommands=n,this.getEditorType=i,this.initEvent()}return r.prototype.initEvent=function(){var e=this;this.eventEmitter.listen("command",function(t,n){e.exec(t,n)})},r.prototype.addCommand=function(e,t,n){e==="markdown"?this.mdCommands[t]=n:this.wwCommands[t]=n},r.prototype.deleteCommand=function(e,t){e==="markdown"?delete this.mdCommands[t]:delete this.wwCommands[t]},r.prototype.exec=function(e,t){var n=this.getEditorType();n==="markdown"?this.mdCommands[e](t):this.wwCommands[e](t)},r})();function Ki(r){return r[r.length-1]===`
38`?r.slice(0,r.length-1):r}function Ks(r,e){var t=r.schema,n=e.literal,i=n.match(Zr);if(i){var a=i[1],o=i[3],s=(a||o).toLowerCase();return e.type==="htmlInline"&&!!(t.marks[s]||t.nodes[s])}return!1}function Js(r){var e=r.type;return ve(["text","strong","emph","strike","image","link","code"],e)}function Kd(r){return r?.type==="softbreak"}function Rn(r){var e=r.type,t=r.literal,n=e==="htmlInline"&&t.match(Zr);if(n){var i=n[1],a=n[3],o=i||a;if(o)return ve(["ul","ol","li"],o.toLowerCase())}return!1}function Fae(r){var e=r.literal,t=/data-task/.test(e),n=/data-task-checked/.test(e);return{task:t,checked:n}}function Jd(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var n=document.createElement("div");n.innerHTML=br(r);var i=n.firstChild;return e.map(function(a){return i.getAttribute(a)||""})}function qae(r){var e={};return Object.keys(r).forEach(function(t){var n=t.split(", ");n.forEach(function(i){var a=i.toLowerCase();e[a]=r[t]})}),e}var _ae={"b, strong":function(r,e,t){var n=r.schema.marks.strong;t?r.openMark(n.create({rawHTML:t})):r.closeMark(n)},"i, em":function(r,e,t){var n=r.schema.marks.emph;t?r.openMark(n.create({rawHTML:t})):r.closeMark(n)},"s, del":function(r,e,t){var n=r.schema.marks.strike;t?r.openMark(n.create({rawHTML:t})):r.closeMark(n)},code:function(r,e,t){var n=r.schema.marks.code;t?r.openMark(n.create({rawHTML:t})):r.closeMark(n)},a:function(r,e,t){var n=e.literal,i=r.schema.marks.link;if(t){var a=Jd(n,"href")[0];r.openMark(i.create({linkUrl:a,rawHTML:t}))}else r.closeMark(i)},img:function(r,e,t){var n=e.literal;if(t){var i=Jd(n,"src","alt"),a=i[0],o=i[1],s=r.schema.nodes.image;r.addNode(s,b({rawHTML:t,imageUrl:a},o&&{altText:o}))}},hr:function(r,e,t){r.addNode(r.schema.nodes.thematicBreak,{rawHTML:t})},br:function(r,e){var t=r.schema.nodes.paragraph,n=e.parent,i=e.prev,a=e.next;n?.type==="paragraph"?(Kd(i)&&r.openNode(t),Kd(a)?r.closeNode():a&&(r.closeNode(),r.openNode(t))):n?.type==="tableCell"&&(i&&(Js(i)||Ks(r,i))&&r.closeNode(),a&&(Js(a)||Ks(r,a))&&r.openNode(t))},pre:function(r,e,t){var n,i,a=document.createElement("div");a.innerHTML=e.literal;var o=(i=(n=a.firstChild)===null||n===void 0?void 0:n.firstChild)===null||i===void 0?void 0:i.textContent;r.openNode(r.schema.nodes.codeBlock,{rawHTML:t}),r.addText(Ki(o)),r.closeNode()},"ul, ol":function(r,e,t){if(e.parent.type==="tableCell"){var n=r.schema.nodes,i=n.bulletList,a=n.orderedList,o=n.paragraph,s=t==="ul"?i:a;t?(e.prev&&!Rn(e.prev)&&r.closeNode(),r.openNode(s,{rawHTML:t})):(r.closeNode(),e.next&&!Rn(e.next)&&r.openNode(o))}},li:function(r,e,t){var n;if(((n=e.parent)===null||n===void 0?void 0:n.type)==="tableCell"){var i=r.schema.nodes,a=i.listItem,o=i.paragraph;if(t){var s=Fae(e);e.prev&&!Rn(e.prev)&&r.closeNode(),r.openNode(a,b({rawHTML:t},s)),e.next&&!Rn(e.next)&&r.openNode(o)}else e.prev&&!Rn(e.prev)&&r.closeNode(),r.closeNode()}}},$ae=qae(_ae);function Xd(r){return r.type==="htmlInline"&&Ls.test(r.literal)}function Av(r){ut(r.childNodes).forEach(function(e){if(ya(e)){var t=e.nodeName.toLowerCase();e.setAttribute("data-raw-html",t),e.childNodes&&Av(e)}})}var Qd={text:function(r,e){r.addText(e.literal||"")},paragraph:function(r,e,t,n){var i,a=t.entering;if(a){var o=r.schema.nodes.paragraph;((i=e.prev)===null||i===void 0?void 0:i.type)==="paragraph"&&(r.openNode(o,n),r.closeNode()),r.openNode(o,n)}else r.closeNode()},heading:function(r,e,t,n){var i=t.entering;if(i){var a=e,o=a.level,s=a.headingType;r.openNode(r.schema.nodes.heading,b({level:o,headingType:s},n))}else r.closeNode()},codeBlock:function(r,e,t){var n=r.schema.nodes.codeBlock,i=e,a=i.info,o=i.literal;r.openNode(n,b({language:a},t)),r.addText(Ki(o||"")),r.closeNode()},list:function(r,e,t,n){var i=t.entering;if(i){var a=r.schema.nodes,o=a.bulletList,s=a.orderedList,l=e.listData,u=l.type,c=l.start;u==="bullet"?r.openNode(o,n):r.openNode(s,b({order:c},n))}else r.closeNode()},item:function(r,e,t,n){var i=t.entering,a=r.schema.nodes.listItem,o=e.listData,s=o.task,l=o.checked;if(i){var u=b(b(b({},s&&{task:s}),l&&{checked:l}),n);r.openNode(a,u)}else r.closeNode()},blockQuote:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.blockQuote,n):r.closeNode()},image:function(r,e,t,n){var i=t.entering,a=t.skipChildren,o=r.schema.nodes.image,s=e,l=s.destination,u=s.firstChild;i&&a&&a(),r.addNode(o,b(b({imageUrl:l},u&&{altText:u.literal}),n))},thematicBreak:function(r,e,t,n){r.addNode(r.schema.nodes.thematicBreak,n)},strong:function(r,e,t,n){var i=t.entering,a=r.schema.marks.strong;i?r.openMark(a.create(n)):r.closeMark(a)},emph:function(r,e,t,n){var i=t.entering,a=r.schema.marks.emph;i?r.openMark(a.create(n)):r.closeMark(a)},link:function(r,e,t,n){var i=t.entering,a=r.schema.marks.link,o=e,s=o.destination,l=o.title;if(i){var u=b({linkUrl:s,title:l},n);r.openMark(a.create(u))}else r.closeMark(a)},softbreak:function(r,e){if(e.parent.type==="paragraph"){var t=e.prev,n=e.next;t&&!Xd(t)&&r.closeNode(),n&&!Xd(n)&&r.openNode(r.schema.nodes.paragraph)}},table:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.table,n):r.closeNode()},tableHead:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.tableHead,n):r.closeNode()},tableBody:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.tableBody,n):r.closeNode()},tableRow:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.tableRow,n):r.closeNode()},tableCell:function(r,e,t){var n=t.entering;if(!e.ignored){var i=function(p){return p&&(Js(p)||Ks(r,p))};if(n){var a=r.schema.nodes,o=a.tableHeadCell,s=a.tableBodyCell,l=a.paragraph,u=e.parent.parent,c=u.type==="tableHead"?o:s,f=u.parent,d=(f.columns[e.startIdx]||{}).align,h=b({},e.attrs);d&&(h.align=d),r.openNode(c,h),i(e.firstChild)&&r.openNode(l)}else i(e.lastChild)&&r.closeNode(),r.closeNode()}},strike:function(r,e,t,n){var i=t.entering,a=r.schema.marks.strike;i?r.openMark(a.create(n)):r.closeMark(a)},code:function(r,e,t,n){var i=r.schema.marks.code;r.openMark(i.create(n)),r.addText(Ki(e.literal||"")),r.closeMark(i)},customBlock:function(r,e){var t=r.schema.nodes,n=t.customBlock,i=t.paragraph,a=e,o=a.info,s=a.literal;r.openNode(n,{info:o}),r.addText(Ki(s||"")),r.closeNode(),e.next||(r.openNode(i),r.closeNode())},frontMatter:function(r,e){r.openNode(r.schema.nodes.frontMatter),r.addText(e.literal),r.closeNode()},htmlInline:function(r,e){var t=e.literal,n=t.match(Zr),i=n[1],a=n[3],o=(i||a).toLowerCase(),s=r.schema.marks[o],l=br(t);if(s?.spec.attrs.htmlInline)if(i){var u=Us(l);r.openMark(s.create({htmlAttrs:u}))}else r.closeMark(s);else{var c=$ae[o];c&&c(r,e,i)}},htmlBlock:function(r,e){var t=e.literal,n=document.createElement("div"),i=Sw.test(t);if(i)r.openNode(r.schema.nodes.htmlComment),r.addText(e.literal),r.closeNode();else{var a=t.match(Zr),o=a[1],s=a[3],l=(o||s).toLowerCase(),u=r.schema.nodes[l],c=br(t);if(u?.spec.attrs.htmlBlock){var f=Us(c),d=lv(e,l);r.addNode(u,{htmlAttrs:f,childrenHTML:d})}else n.innerHTML=c,Av(n),r.convertByDOMParser(n)}},customInline:function(r,e,t){var n=t.entering,i=t.skipChildren,a=e,o=a.info,s=a.firstChild,l=r.schema;if(o.indexOf("widget")!==-1&&n){var u=Zh(e);i(),r.addNode(l.nodes.widget,{info:o},[l.text(Qh(o,u))])}else{var c="$$";n&&(c+=s?o+" ":o),r.addText(c)}}};function zae(r){var e=Object.keys(r),t=b({},Qd),n=new Tl({gfm:!0,nodeId:!0,convertors:r}),i=n.getConvertors();return e.forEach(function(a){var o=Qd[a];o&&!ve(["htmlBlock","htmlInline"],a)&&(t[a]=function(s,l,u){u.origin=function(){return i[a](l,u,i)};var c=r[a](l,u),f;if(c){var d=Array.isArray(c)?c[0]:c,h=d.attributes,p=d.classNames;f={htmlAttrs:h,classNames:p}}o(s,l,u,f)})}),t}function Vae(r,e){return r.isText&&e.isText&&_.sameSet(r.marks,e.marks)?r.withText(r.text+e.text):!1}var Uae=(function(){function r(e,t){this.schema=e,this.convertors=t,this.stack=[{type:this.schema.topNodeType,attrs:null,content:[]}],this.marks=_.none}return r.prototype.top=function(){return Ee(this.stack)},r.prototype.push=function(e){this.stack.length&&this.top().content.push(e)},r.prototype.addText=function(e){if(e){var t=this.top().content,n=Ee(t),i=this.schema.text(e,this.marks),a=n&&Vae(n,i);a?t[t.length-1]=a:t.push(i)}},r.prototype.openMark=function(e){this.marks=e.addToSet(this.marks)},r.prototype.closeMark=function(e){this.marks=e.removeFromSet(this.marks)},r.prototype.addNode=function(e,t,n){var i=e.createAndFill(t,n,this.marks);return i?(this.push(i),i):null},r.prototype.openNode=function(e,t){this.stack.push({type:e,attrs:t,content:[]})},r.prototype.closeNode=function(){this.marks.length&&(this.marks=_.none);var e=this.stack.pop(),t=e.type,n=e.attrs,i=e.content;return this.addNode(t,n,i)},r.prototype.convertByDOMParser=function(e){var t=this,n=Lt.fromSchema(this.schema).parse(e);n.content.forEach(function(i){return t.push(i)})},r.prototype.closeUnmatchedHTMLInline=function(e,t){var n;if(!t&&e.type!=="htmlInline")for(var i=this.stack.length-1,a=i;a>=0;a-=1){var o=this.stack[a];if(!((n=o.attrs)===null||n===void 0)&&n.rawHTML)o.content.length?this.closeNode():this.stack.pop();else break}},r.prototype.convert=function(e,t){for(var n=e.walker(),i=n.next(),a=function(){var s=i.node,l=i.entering,u=o.convertors[s.type],c=!1;if(u){var f={entering:l,leaf:!ow(s),getChildrenText:sw,options:{gfm:!0,nodeId:!1,tagFilter:!1,softbreak:`
39`},skipChildren:function(){c=!0}};if(o.closeUnmatchedHTMLInline(s,l),u(o,s,f),t?.node===s){var d=o.stack.reduce(function(h,p){return h+p.content.reduce(function(v,m){return v+m.nodeSize},0)},0)+1;t.setMappedPos(d)}}c&&(n.resumeAt(s,!1),n.next()),i=n.next()},o=this;i;)a()},r.prototype.convertNode=function(e,t){return this.convert(e,t),this.stack.length?this.closeNode():null},r})();function Wae(r,e,t){var n=t[0],i=t[1];r.write(n),r.convertInline(e),r.write(i)}function jae(r,e,t){var n=e.node,i=e.parent,a=t[0],o=t[1];r.stopNewline=!0,r.write(a),r.convertNode(n),r.write(o),i?.type.name==="doc"&&(r.closeBlock(n),r.stopNewline=!1)}function Gae(r,e){var t=r.length,n="",i="";return e==="left"?(n=":",t-=1):e==="right"?(i=":",t-=1):e==="center"&&(n=":",i=":",t-=2),""+n+Qi("-",Math.max(t,3))+i}var Xs={text:function(r,e){var t,n=e.node,i=(t=n.text)!==null&&t!==void 0?t:"";(n.marks||[]).some(function(a){return a.type.name==="link"})?r.text(Yi(i),!1):r.text(i)},paragraph:function(r,e){var t=e.node,n=e.parent,i=e.index,a=i===void 0?0:i;if(r.stopNewline)r.convertInline(t);else{var o=a===0,s=!o&&n.child(a-1),l=s&&s.childCount===0,u=a<n.childCount-1&&n.child(a+1),c=u&&u.type.name==="paragraph",f=t.childCount===0;if(f&&l)r.write(`<br>
40`);else if(f&&!l&&!o){if(n?.type.name==="listItem"){var d=r.getDelim();r.setDelim(""),r.write("<br>"),r.setDelim(d)}r.write(`
41`)}else r.convertInline(t),c?r.write(`
42`):r.closeBlock(t)}},heading:function(r,e,t){var n=e.node,i=t.delim,a=n.attrs.headingType;a==="atx"?(r.write(i+" "),r.convertInline(n),r.closeBlock(n)):(r.convertInline(n),r.ensureNewLine(),r.write(i),r.closeBlock(n))},codeBlock:function(r,e,t){var n=e.node,i=t.delim,a=t.text,o=i,s=o[0],l=o[1];r.write(s),r.ensureNewLine(),r.text(a,!1),r.ensureNewLine(),r.write(l),r.closeBlock(n)},blockQuote:function(r,e,t){var n=e.node,i=e.parent,a=t.delim;i?.type.name===n.type.name&&r.flushClose(1),r.wrapBlock(a,null,n,function(){return r.convertNode(n)})},bulletList:function(r,e,t){var n=e.node,i=t.delim;r.convertList(n,Qi(" ",4),function(){return i+" "})},orderedList:function(r,e){var t=e.node,n=t.attrs.order||1;r.convertList(t,Qi(" ",4),function(i){var a=String(n+i);return a+". "})},listItem:function(r,e){var t=e.node,n=t.attrs,i=n.task,a=n.checked;i&&r.write("["+(a?"x":" ")+"] "),r.convertNode(t)},image:function(r,e,t){var n=t.attrs;r.write("!["+n?.altText+"]("+n?.imageUrl+")")},thematicBreak:function(r,e,t){var n=e.node,i=t.delim;r.write(i),r.closeBlock(n)},table:function(r,e){var t=e.node;r.convertNode(t),r.closeBlock(t)},tableHead:function(r,e,t){var n=e.node,i=t.delim,a=n.firstChild;r.convertNode(n);var o=i??"";!i&&a&&a.forEach(function(s){var l=s.textContent,u=s.attrs,c=Gae(l,u.align);o+="| "+c+" "}),r.write(o+"|"),r.ensureNewLine()},tableBody:function(r,e){var t=e.node;r.convertNode(t)},tableRow:function(r,e){var t=e.node;r.convertNode(t),r.write("|"),r.ensureNewLine()},tableHeadCell:function(r,e,t){var n=e.node,i=t.delim,a=i===void 0?"| ":i;r.write(a),r.convertTableCell(n),r.write(" ")},tableBodyCell:function(r,e,t){var n=e.node,i=t.delim,a=i===void 0?"| ":i;r.write(a),r.convertTableCell(n),r.write(" ")},customBlock:function(r,e,t){var n=e.node,i=t.delim,a=t.text,o=i,s=o[0],l=o[1];r.write(s),r.ensureNewLine(),r.text(a,!1),r.ensureNewLine(),r.write(l),r.closeBlock(n)},frontMatter:function(r,e,t){var n=e.node,i=t.text;r.text(i,!1),r.closeBlock(n)},widget:function(r,e,t){var n=t.text;r.write(n)},html:function(r,e,t){var n=e.node,i=t.text;r.write(i),n.attrs.htmlBlock&&r.closeBlock(n)},htmlComment:function(r,e,t){var n=e.node,i=t.text;r.write(i),r.closeBlock(n)}};function Kae(r,e){var t=e.state,n=e.nodeInfo,i=e.params,a=i.rawHTML;a?pr(r,["heading","codeBlock"])>-1?Wae(t,n.node,a):pr(r,["image","thematicBreak"])>-1?t.write(a):jae(t,n,a):Xs[r](t,n,i)}function Yd(r,e){var t=r.text,n=/`+/g,i=0;if(r.isText&&t)for(var a=n.exec(t);a;)i=Math.max(i,a[0].length),a=n.exec(t);for(var o=i>0&&e>0?" `":"`",s=0;s<i;s+=1)o+="`";return i>0&&e<0&&(o+=" "),o}function Ge(r){return r?["<"+r+">","</"+r+">"]:null}function Bn(r){return r?"<"+r+">":null}function Pn(r){return r?"</"+r+">":null}var Hn={heading:function(r){var e=r.node,t=e.attrs,n=t.level,i=Qi("#",n);return t.headingType==="setext"&&(i=n===1?"===":"---"),{delim:i,rawHTML:Ge(t.rawHTML)}},codeBlock:function(r){var e=r.node,t=e,n=t.attrs,i=t.textContent;return{delim:["```"+(n.language||""),"```"],rawHTML:Ge(n.rawHTML),text:i}},blockQuote:function(r){var e=r.node;return{delim:"> ",rawHTML:Ge(e.attrs.rawHTML)}},bulletList:function(r,e){var t=r.node,n=e.inTable,i=t.attrs.rawHTML;return n&&(i=i||"ul"),{delim:"*",rawHTML:Ge(i)}},orderedList:function(r,e){var t=r.node,n=e.inTable,i=t.attrs.rawHTML;return n&&(i=i||"ol"),{rawHTML:Ge(i)}},listItem:function(r,e){var t=r.node,n=e.inTable,i=t.attrs,a=i.task,o=i.checked,s=t.attrs.rawHTML;n&&(s=s||"li");var l=a?' class="task-list-item'+(o?" checked":"")+'"':"",u=a?" data-task"+(o?" data-task-checked":""):"";return{rawHTML:s?["<"+s+l+u+">","</"+s+">"]:null}},table:function(r){var e=r.node;return{rawHTML:Ge(e.attrs.rawHTML)}},tableHead:function(r){var e=r.node;return{rawHTML:Ge(e.attrs.rawHTML)}},tableBody:function(r){var e=r.node;return{rawHTML:Ge(e.attrs.rawHTML)}},tableRow:function(r){var e=r.node;return{rawHTML:Ge(e.attrs.rawHTML)}},tableHeadCell:function(r){var e=r.node;return{rawHTML:Ge(e.attrs.rawHTML)}},tableBodyCell:function(r){var e=r.node;return{rawHTML:Ge(e.attrs.rawHTML)}},image:function(r){var e=r.node,t=e.attrs,n=t.rawHTML,i=t.altText,a=t.imageUrl.replace(/&amp;/g,"&"),o=i?' alt="'+Kr(i)+'"':"";return{rawHTML:n?"<"+n+' src="'+Kr(a)+'"'+o+">":null,attrs:{altText:Yi(i||""),imageUrl:a}}},thematicBreak:function(r){var e=r.node;return{delim:"***",rawHTML:Bn(e.attrs.rawHTML)}},customBlock:function(r){var e=r.node,t=e,n=t.attrs,i=t.textContent;return{delim:["$$"+n.info,"$$"],text:i}},frontMatter:function(r){var e=r.node;return{text:e.textContent}},widget:function(r){var e=r.node;return{text:e.textContent}},strong:function(r,e){var t=r.node,n=e.entering,i=t.attrs.rawHTML;return{delim:"**",rawHTML:n?Bn(i):Pn(i)}},emph:function(r,e){var t=r.node,n=e.entering,i=t.attrs.rawHTML;return{delim:"*",rawHTML:n?Bn(i):Pn(i)}},strike:function(r,e){var t=r.node,n=e.entering,i=t.attrs.rawHTML;return{delim:"~~",rawHTML:n?Bn(i):Pn(i)}},link:function(r,e){var t=r.node,n=e.entering,i=t.attrs,a=i.title,o=i.rawHTML,s=i.linkUrl.replace(/&amp;/g,"&"),l=a?' title="'+Kr(a)+'"':"";return n?{delim:"[",rawHTML:o?"<"+o+' href="'+Kr(s)+'"'+l+">":null}:{delim:"]("+s+(a?" "+Jb(Yi(a)):"")+")",rawHTML:Pn(o)}},code:function(r,e){var t=r.node,n=r.parent,i=r.index,a=i===void 0?0:i,o=e.entering,s=o?Yd(n.child(a),-1):Yd(n.child(a-1),1),l=o?Bn(t.attrs.rawHTML):Pn(t.attrs.rawHTML);return{delim:s,rawHTML:l}},htmlComment:function(r){var e=r.node;return{text:e.textContent}},html:function(r,e){var t=r.node,n=e.entering,i=t.type.name,a=t.attrs.htmlAttrs,o="<"+i,s="</"+i+">";return Object.keys(a).forEach(function(l){o+=" "+l+'="'+a[l].replace(/"/g,"'")+'"'}),o+=">",t.attrs.htmlInline?{rawHTML:n?o:s}:{text:""+o+t.attrs.childrenHTML+s}}},Zd={strong:{mixable:!0,removedEnclosingWhitespace:!0},emph:{mixable:!0,removedEnclosingWhitespace:!0},strike:{mixable:!0,removedEnclosingWhitespace:!0},code:{escape:!1},link:null,html:null};function Jae(r){var e={},t=Object.keys(Xs);return t.forEach(function(n){e[n]=function(i,a){var o=Xs[n];if(o){var s=r[n],l=s?s(a,{inTable:i.inTable}):{};Kae(n,{state:i,nodeInfo:a,params:l})}}}),e}function Xae(r){var e={},t=Object.keys(Zd);return t.forEach(function(n){e[n]=function(i,a){var o=Zd[n],s=r[n],l=s&&i&&!Qe(a),u=l?s(i,{entering:a}):{};return b(b({},u),o)}}),e}function Qae(r){var e=Object.keys(r);e.forEach(function(i){var a=Hn[i],o=r[i];a?Hn[i]=function(s,l){return l.origin=function(){return a(s,l)},o(s,l)}:Hn[i]=o,delete r[i]});var t=Jae(Hn),n=Xae(Hn);return{nodeTypeConvertors:t,markTypeConvertors:n}}var Yae=(function(){function r(e){var t=e.nodeTypeConvertors,n=e.markTypeConvertors;this.nodeTypeConvertors=t,this.markTypeConvertors=n,this.delim="",this.result="",this.closed=!1,this.tightList=!1,this.stopNewline=!1,this.inTable=!1}return r.prototype.getMarkConvertor=function(e){var t=e.attrs.htmlInline?"html":e.type.name;return this.markTypeConvertors[t]},r.prototype.isInBlank=function(){return/(^|\n)$/.test(this.result)},r.prototype.markText=function(e,t,n,i){var a=this.getMarkConvertor(e);if(a){var o=a({node:e,parent:n,index:i},t),s=o.delim,l=o.rawHTML;return l||s}return""},r.prototype.setDelim=function(e){this.delim=e},r.prototype.getDelim=function(){return this.delim},r.prototype.flushClose=function(e){if(!this.stopNewline&&this.closed){if(this.isInBlank()||(this.result+=`
43`),e||(e=2),e>1){var t=this.delim,n=/\s+$/.exec(t);n&&(t=t.slice(0,t.length-n[0].length));for(var i=1;i<e;i+=1)this.result+=t+`
44`}this.closed=!1}},r.prototype.wrapBlock=function(e,t,n,i){var a=this.getDelim();this.write(t||e),this.setDelim(this.getDelim()+e),i(),this.setDelim(a),this.closeBlock(n)},r.prototype.ensureNewLine=function(){this.isInBlank()||(this.result+=`
45`)},r.prototype.write=function(e){e===void 0&&(e=""),this.flushClose(),this.delim&&this.isInBlank()&&(this.result+=this.delim),e&&(this.result+=e)},r.prototype.closeBlock=function(e){this.closed=e},r.prototype.text=function(e,t){t===void 0&&(t=!0);for(var n=e.split(`
46`),i=0;i<n.length;i+=1)this.write(),this.result+=t?Kb(n[i]):n[i],i!==n.length-1&&(this.result+=`
47`)},r.prototype.convertBlock=function(e,t,n){var i=e.type.name,a=this.nodeTypeConvertors[i],o={node:e,parent:t,index:n};e.attrs.htmlBlock?this.nodeTypeConvertors.html(this,o):a&&a(this,o)},r.prototype.convertInline=function(e){var t=this,n=[],i="",a=function(o,s,l){var u=o?o.marks:[],c=i;i="";var f=o&&o.isText&&u.some(function(j){var se=t.getMarkConvertor(j),Pe=se&&se();return Pe&&Pe.removedEnclosingWhitespace});if(f&&o&&o.text){var d=/^(\s*)(.*?)(\s*)$/m.exec(o.text),h=d[1],p=d[2],v=d[3];c+=h,i=v,(h||v)&&(o=p?o.withText(p):null,o||(u=n))}for(var m=u.length&&Ee(u),g=m&&t.getMarkConvertor(m),w=g&&g(),k=w&&w.escape===!1,C=u.length-(k?1:0),x=0;x<C;x+=1){var p=u[x];if(w&&!w.mixable)break;for(var L=0;L<n.length;L+=1){var E=n[L];if(w&&!w.mixable)break;if(p.eq(E)){x>L?u=u.slice(0,L).concat(p).concat(u.slice(L,x)).concat(u.slice(x+1,C)):L>x&&(u=u.slice(0,x).concat(u.slice(x+1,L)).concat(p).concat(u.slice(L,C)));break}}}for(var N=0;N<Math.min(n.length,C)&&u[N].eq(n[N]);)N+=1;for(;N<n.length;){var P=n.pop();P&&t.text(t.markText(P,!1,e,l),!1)}if(c&&t.text(c),o){for(;n.length<C;){var p=u[n.length];n.push(p),t.text(t.markText(p,!0,e,l),!1)}k&&o.isText?t.text(t.markText(m,!0,e,l)+o.text+t.markText(m,!1,e,l+1),!1):t.convertBlock(o,e,l)}};e.forEach(a),a(null,null,e.childCount)},r.prototype.convertList=function(e,t,n){var i=this,a;this.closed&&this.closed.type===e.type?this.flushClose(3):this.tightList&&this.flushClose(1);var o=(a=e.attrs.tight)!==null&&a!==void 0?a:!0,s=this.tightList;this.tightList=o,e.forEach(function(l,u,c){c&&o&&i.flushClose(1),i.wrapBlock(t,n(c),e,function(){return i.convertBlock(l,e,c)})}),this.tightList=s},r.prototype.convertTableCell=function(e){var t=this;this.stopNewline=!0,this.inTable=!0,e.forEach(function(n,i,a){if(ve(["bulletList","orderedList"],n.type.name))t.convertBlock(n,e,a),t.closed=!1;else if(t.convertInline(n),a<e.childCount-1){var o=e.child(a+1);o.type.name==="paragraph"&&t.write("<br>")}}),this.stopNewline=!1,this.inTable=!1},r.prototype.convertNode=function(e,t){var n=this;return e.forEach(function(i,a,o){if(n.convertBlock(i,e,o),t?.node===i){var s=n.result.split(`
48`);t.setMappedPos([s.length,Ee(s).length+1])}}),this.result},r})(),Zae=(function(){function r(e,t,n,i){var a=this;this.setMappedPos=function(o){a.mappedPosWhenConverting=o},this.schema=e,this.eventEmitter=i,this.focusedNode=null,this.mappedPosWhenConverting=null,this.toWwConvertors=zae(n),this.toMdConvertors=Qae(t||{}),this.eventEmitter.listen("setFocusedNode",function(o){return a.focusedNode=o})}return r.prototype.getMappedPos=function(){return this.mappedPosWhenConverting},r.prototype.getInfoForPosSync=function(){return{node:this.focusedNode,setMappedPos:this.setMappedPos}},r.prototype.toWysiwygModel=function(e){var t=new Uae(this.schema,this.toWwConvertors);return t.convertNode(e,this.getInfoForPosSync())},r.prototype.toMarkdownText=function(e){var t=new Yae(this.toMdConvertors),n=t.convertNode(e,this.getInfoForPosSync());return n=this.eventEmitter.emitReduce("beforeConvertWysiwygToMarkdown",n),n},r})();function eoe(r){var e=r.plugin,t=r.eventEmitter,n=r.usageStatistics,i=r.instance,a={Plugin:X,PluginKey:ht,Selection:H,TextSelection:q},o={Decoration:ze,DecorationSet:xe},s={Fragment:T},l={InputRule:je,inputRules:Zo,undoInputRule:Mf},u={keymap:_r},c={eventEmitter:t,usageStatistics:n,instance:i,pmState:a,pmView:o,pmModel:s,pmRules:l,pmKeymap:u,i18n:B};if(sn(e)){var f=e[0],d=e[1],h=d===void 0?{}:d;return f(c,h)}return e(c)}function Nv(r){var e=r.plugins,t=r.eventEmitter,n=r.usageStatistics,i=r.instance;return t.listen("mixinTableOffsetMapPrototype",Dne),(e??[]).reduce(function(a,o){var s=eoe({plugin:o,eventEmitter:t,usageStatistics:n,instance:i});if(!s)throw new Error("The return value of the executed plugin is empty.");var l=s.markdownParsers,u=s.toHTMLRenderers,c=s.toMarkdownRenderers,f=s.markdownPlugins,d=s.wysiwygPlugins,h=s.wysiwygNodeViews,p=s.markdownCommands,v=s.wysiwygCommands,m=s.toolbarItems;return u&&(a.toHTMLRenderers=Zi(a.toHTMLRenderers,u)),c&&(a.toMarkdownRenderers=Zi(a.toMarkdownRenderers,c)),f&&(a.mdPlugins=a.mdPlugins.concat(f)),d&&(a.wwPlugins=a.wwPlugins.concat(d)),h&&(a.wwNodeViews=b(b({},a.wwNodeViews),h)),p&&(a.mdCommands=b(b({},a.mdCommands),p)),v&&(a.wwCommands=b(b({},a.wwCommands),v)),m&&(a.toolbarItems=a.toolbarItems.concat(m)),l&&(a.markdownParsers=b(b({},a.markdownParsers),l)),a},{toHTMLRenderers:{},toMarkdownRenderers:{},mdPlugins:[],wwPlugins:[],wwNodeViews:{},mdCommands:{},wwCommands:{},toolbarItems:[],markdownParsers:{}})}var toe="data-task",roe="data-task-disabled",noe="checked";function ioe(r){["htmlBlock","htmlInline"].forEach(function(e){r[e]&&Object.keys(r[e]).forEach(function(t){return sv(t)})})}var Dv=(function(){function r(e){var t=this;this.options=Zs({linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,usageStatistics:!0,theme:"light"},e),this.eventEmitter=new Lv;var n=Kh(this.options.linkAttributes),i=Nv({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this})||{},a=i.toHTMLRenderers,o=i.markdownParsers,s=this.options,l=s.customHTMLRenderer,u=s.extendedAutolinks,c=s.referenceDefinition,f=s.frontMatter,d=s.customHTMLSanitizer,h={linkAttributes:n,customHTMLRenderer:b(b({},a),l),extendedAutolinks:u,referenceDefinition:c,frontMatter:f,sanitizer:d||br};ioe(h.customHTMLRenderer),this.options.events&&Xr(this.options.events,function(k,C){t.on(C,k)});var p=this.options,v=p.el,m=p.initialValue,g=p.theme,w=v.innerHTML;g!=="light"&&v.classList.add(A(g)),v.innerHTML="",this.toastMark=new nv("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:u,referenceDefinition:c,disallowDeepHeading:!0,frontMatter:f,customParser:o}),this.preview=new cv(this.eventEmitter,b(b({},h),{isViewer:!0})),Ep(this.preview.previewContent,"mousedown",this.toggleTask.bind(this)),m?this.setMarkdown(m):w&&this.preview.setHTML(w),v.appendChild(this.preview.previewContent),this.eventEmitter.emit("load",this)}return r.prototype.toggleTask=function(e){var t=e.target,n=getComputedStyle(t,":before");!t.hasAttribute(roe)&&t.hasAttribute(toe)&&ll(n,e.offsetX,e.offsetY)&&(ul(t,noe),this.eventEmitter.emit("change",{source:"viewer",date:e}))},r.prototype.setMarkdown=function(e){var t=this.toastMark.getLineTexts(),n=t.length,i=Ee(t),a=[n,i.length+1],o=this.toastMark.editMarkdown([1,1],a,e||"");this.eventEmitter.emit("updatePreview",o)},r.prototype.on=function(e,t){this.eventEmitter.listen(e,t)},r.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},r.prototype.addHook=function(e,t){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,t)},r.prototype.destroy=function(){xp(this.preview.el,"mousedown",this.toggleTask.bind(this)),this.preview.destroy(),this.eventEmitter.emit("destroy")},r.prototype.isViewer=function(){return!0},r.prototype.isMarkdownMode=function(){return!1},r.prototype.isWysiwygMode=function(){return!1},r})();function Ji(r){return r instanceof He}function Iv(r){var e=["document","blockQuote","bulletList","orderedList","listItem","paragraph","heading","emph","strong","strike","link","image","table","tableHead","tableBody","tableRow","tableHeadCell","tableBodyCell"];return ve(e,r)}function aoe(r){var e=r.attrs,t=r.type,n=t.name,i={type:n,wysiwygNode:!0,literal:!Iv(n)&&Ji(r)?r.textContent:null},a={heading:{level:e.level},link:{destination:e.linkUrl,title:e.title},image:{destination:e.imageUrl},codeBlock:{info:e.language},bulletList:{type:"list",listData:{type:"bullet"}},orderedList:{type:"list",listData:{type:"ordered",start:e.order}},listItem:{type:"item",listData:{task:e.task,checked:e.checked}},tableHeadCell:{type:"tableCell",cellType:"head",align:e.align},tableBodyCell:{type:"tableCell",cellType:"body",align:e.align},customBlock:{info:e.info}},o=a[n],s=b(b({},i),o),l=r.attrs,u=l.htmlAttrs,c=l.childrenHTML;return u?b(b({},s),{attrs:u,childrenHTML:c}):s}var ooe={openTag:function(r,e){var t=r,n=t.tagName,i=t.classNames,a=t.attributes,o=document.createElement(n),s={};i&&(o.className=i.join(" ")),a&&(s=b(b({},s),a)),fl(s,o),e.push(o)},closeTag:function(r,e){if(e.length>1){var t=e.pop();Ee(e).appendChild(t)}},html:function(r,e){Ee(e).insertAdjacentHTML("beforeend",r.content)},text:function(r,e){var t=document.createTextNode(r.content);Ee(e).appendChild(t)}},soe=(function(){function r(e,t){var n=xl(e,t),i=b(b({},t.htmlBlock),t.htmlInline);this.customConvertorKeys=Object.keys(t).concat(Object.keys(i)),this.renderer=new Tl({gfm:!0,convertors:b(b({},n),i)}),this.convertors=this.renderer.getConvertors()}return r.prototype.generateTokens=function(e){var t=aoe(e),n={entering:!0,leaf:Ji(e)?e.isLeaf:!1,options:this.renderer.getOptions(),getChildrenText:function(){return Ji(e)?e.textContent:""},skipChildren:function(){return!1}},i=this.convertors[e.type.name],a=i(t,n,this.convertors),o=sn(a)?a:[a];return(Iv(e.type.name)||e.attrs.htmlInline)&&(n.entering=!1,o.push({type:"text",content:Ji(e)?e.textContent:""}),o=o.concat(i(t,n,this.convertors))),o},r.prototype.toDOMNode=function(e){var t=this.generateTokens(e),n=[];return t.forEach(function(i){return ooe[i.type](i,n)}),n[0]},r.prototype.getToDOMNode=function(e){return ve(this.customConvertorKeys,e)?this.toDOMNode.bind(this):null},r})(),loe=100,uoe=15,zi=null,Ss=null;function eh(r,e){var t=e.syncScrollTop,n=e.releaseEventBlock;Ss&&clearTimeout(Ss),t(r),Ss=setTimeout(function(){n()},uoe)}function coe(r,e,t){var n=e-r,i=Date.now(),a=function(){var o=Date.now(),s=(o-i)/loe,l;zi&&clearTimeout(zi),s<1?(l=r+n*Math.cos((1-s)*Math.PI/2),eh(Math.ceil(l),t),zi=setTimeout(a,1)):(eh(e,t),zi=null)};a()}var foe=18,doe=(function(){function r(e,t,n){this.latestEditorScrollTop=null,this.latestPreviewScrollTop=null,this.blockedScroll=null,this.active=!0,this.timer=null;var i=t.previewContent,a=t.el;this.previewRoot=i,this.previewEl=a,this.mdEditor=e,this.editorView=e.view,this.toastMark=e.getToastMark(),this.eventEmitter=n,this.addScrollSyncEvent()}return r.prototype.addScrollSyncEvent=function(){var e=this;this.eventEmitter.listen("afterPreviewRender",function(){e.clearTimer(),e.timer=setTimeout(function(){e.syncPreviewScrollTop(!0)},200)}),this.eventEmitter.listen("scroll",function(t,n){e.active&&(t==="editor"&&e.blockedScroll!=="editor"?e.syncPreviewScrollTop():t==="preview"&&e.blockedScroll!=="preview"&&e.syncEditorScrollTop(n))}),this.eventEmitter.listen("toggleScrollSync",function(t){e.active=t})},r.prototype.getMdNodeAtPos=function(e,t){var n=e.content.findIndex(t.pos),i=n.index;return this.toastMark.findFirstNodeAtLine(i+1)},r.prototype.getScrollTopByCaretPos=function(){var e=this.mdEditor.getSelection(),t=this.toastMark.findFirstNodeAtLine(e[0][0]),n=this.previewEl.clientHeight,i=Cs(this.previewRoot,t).el,a=ua(i,this.previewRoot)||i.offsetTop,o=i.clientHeight,s=a+o-n*.5;this.latestEditorScrollTop=null;var l=i.getBoundingClientRect().top-this.previewEl.getBoundingClientRect().top;return l<n?null:s},r.prototype.syncPreviewScrollTop=function(e){e===void 0&&(e=!1);var t=this,n=t.editorView,i=t.previewEl,a=t.previewRoot,o=n.dom.getBoundingClientRect(),s=o.left,l=o.top,u=n.posAtCoords({left:s,top:l}),c=n.state.doc,f=this.getMdNodeAtPos(c,u);if(!(!f||Zb(f))){var d=i.scrollTop,h=n.dom,p=h.scrollTop,v=h.scrollHeight,m=h.clientHeight,g=h.children,w=v-p<=m+foe,k=w?i.scrollHeight:0;if(p&&!w){if(e){var C=this.getScrollTopByCaretPos();if(!C)return;k=C}else{var x=Cs(this.previewRoot,f),L=x.el,E=x.mdNode,N=qd(c,E,g),P=N.height,j=N.rect,se=ua(L,a)||L.offsetTop,Pe=L.clientHeight,Wn=l>j.top?Math.min((l-j.top)/P,1):0;k=se+Pe*Wn}k=this.getResolvedScrollTop("editor",p,k,d),this.latestEditorScrollTop=p}k!==d&&this.run("editor",k,d)}},r.prototype.syncEditorScrollTop=function(e){var t=this,n=t.toastMark,i=t.editorView,a=t.previewRoot,o=t.previewEl,s=i.dom,l=i.state,u=o.scrollTop,c=o.clientHeight,f=o.scrollHeight,d=f-u<=c,h=s.scrollTop,p=d?s.scrollHeight:0;if(u&&e&&!d){if(e=lne(e,a),!e.getAttribute("data-nodeid"))return;var v=s.children,m=Number(e.getAttribute("data-nodeid")),g=Cs(this.previewRoot,n.findNodeById(m)),w=g.mdNode,k=g.el,C=Vn(w);p=v[C-1].offsetTop;var x=qd(l.doc,w,v).height,L=mne(k,a,m),E=L.nodeHeight,N=L.offsetTop;p+=cne(u,N,E,x),p=this.getResolvedScrollTop("preview",u,p,h),this.latestPreviewScrollTop=u}p!==h&&this.run("preview",p,h)},r.prototype.getResolvedScrollTop=function(e,t,n,i){var a=e==="editor"?this.latestEditorScrollTop:this.latestPreviewScrollTop;return a===null?n:a<t?Math.max(n,i):Math.min(n,i)},r.prototype.run=function(e,t,n){var i=this,a;e==="editor"?(a=this.previewEl,this.blockedScroll="preview"):(a=this.editorView.dom,this.blockedScroll="editor");var o={syncScrollTop:function(s){return a.scrollTop=s},releaseEventBlock:function(){return i.blockedScroll=null}};coe(n,t,o)},r.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},r.prototype.destroy=function(){this.clearTimer(),this.eventEmitter.removeEventHandler("scroll"),this.eventEmitter.removeEventHandler("afterPreviewRender")},r})(),hoe={getPopupInitialValues:function(r,e){var t=e.popupName;return t==="link"?{linkText:r.getSelectedText()}:{}}};function poe(r){r.eventEmitter.listen("query",function(e,t){return hoe[e](r,t)})}var Rv=(function(){function r(e){var t=this;this.initialHTML=e.el.innerHTML,e.el.innerHTML="",this.options=Zs({previewStyle:"tab",previewHighlight:!0,initialEditType:"markdown",height:"300px",minHeight:"200px",language:"en-US",useCommandShortcut:!0,usageStatistics:!0,toolbarItems:[["heading","bold","italic","strike"],["hr","quote"],["ul","ol","task","indent","outdent"],["table","image","link"],["code","codeblock"],["scrollSync"]],hideModeSwitch:!1,linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,customMarkdownRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,widgetRules:[],theme:"light",autofocus:!0},e);var n=this.options,i=n.customHTMLRenderer,a=n.extendedAutolinks,o=n.referenceDefinition,s=n.frontMatter,l=n.customMarkdownRenderer,u=n.useCommandShortcut,c=n.initialEditType,f=n.widgetRules,d=n.customHTMLSanitizer;this.mode=c||"markdown",this.mdPreviewStyle=this.options.previewStyle,this.i18n=B,this.i18n.setCode(this.options.language),this.eventEmitter=new Lv,uw(f);var h=Kh(this.options.linkAttributes);this.pluginInfo=Nv({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this});var p=this.pluginInfo,v=p.toHTMLRenderers,m=p.toMarkdownRenderers,g=p.mdPlugins,w=p.wwPlugins,k=p.wwNodeViews,C=p.mdCommands,x=p.wwCommands,L=p.markdownParsers,E={linkAttributes:h,customHTMLRenderer:Zi(v,i),extendedAutolinks:a,referenceDefinition:o,frontMatter:s,sanitizer:d||br},N=new soe(h,E.customHTMLRenderer),P=tne(E.customHTMLRenderer,E.sanitizer,N);this.toastMark=new nv("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:a,referenceDefinition:o,disallowDeepHeading:!0,frontMatter:s,customParser:L}),this.mdEditor=new fC(this.eventEmitter,{toastMark:this.toastMark,useCommandShortcut:u,mdPlugins:g}),this.preview=new cv(this.eventEmitter,b(b({},E),{isViewer:!1,highlight:this.options.previewHighlight})),this.wwEditor=new Sae(this.eventEmitter,{toDOMAdaptor:N,useCommandShortcut:u,htmlSchemaMap:P,linkAttributes:h,wwPlugins:w,wwNodeViews:k}),this.convertor=new Zae(this.wwEditor.getSchema(),b(b({},m),l),xl(h,E.customHTMLRenderer),this.eventEmitter),this.setMinHeight(this.options.minHeight),this.setHeight(this.options.height),this.setMarkdown(this.options.initialValue,!1),this.options.placeholder&&this.setPlaceholder(this.options.placeholder),this.options.initialValue||this.setHTML(this.initialHTML,!1),this.commandManager=new Hae(this.eventEmitter,this.mdEditor.commands,this.wwEditor.commands,function(){return t.mode}),this.options.usageStatistics&&Ub(),this.scrollSync=new doe(this.mdEditor,this.preview,this.eventEmitter),this.addInitEvent(),this.addInitCommand(C,x),poe(this),this.options.hooks&&Xr(this.options.hooks,function(j,se){return t.addHook(se,j)}),this.options.events&&Xr(this.options.events,function(j,se){return t.on(se,j)}),this.eventEmitter.emit("load",this),this.moveCursorToStart(this.options.autofocus)}return r.prototype.addInitEvent=function(){var e=this;this.on("needChangeMode",this.changeMode.bind(this)),this.on("loadUI",function(){if(e.height!=="auto"){var t=Math.min(parseInt(e.minHeight,10),parseInt(e.height,10)-75)+"px";e.setMinHeight(t)}}),Bw(this.eventEmitter)},r.prototype.addInitCommand=function(e,t){var n=this,i=function(a,o){Object.keys(o).forEach(function(s){n.addCommand(a,s,o[s])})};this.addCommand("markdown","toggleScrollSync",function(a){return n.eventEmitter.emit("toggleScrollSync",a.active),!0}),i("markdown",e),i("wysiwyg",t)},r.prototype.getCurrentModeEditor=function(){return this.isMarkdownMode()?this.mdEditor:this.wwEditor},r.factory=function(e){return e.viewer?new Dv(e):new r(e)},r.setLanguage=function(e,t){B.setLanguage(e,t)},r.prototype.changePreviewStyle=function(e){this.mdPreviewStyle!==e&&(this.mdPreviewStyle=e,this.eventEmitter.emit("changePreviewStyle",e))},r.prototype.exec=function(e,t){this.commandManager.exec(e,t)},r.prototype.addCommand=function(e,t,n){var i=this,a=function(o){o===void 0&&(o={});var s=(e==="markdown"?i.mdEditor:i.wwEditor).view;n(o,s.state,s.dispatch,s)};this.commandManager.addCommand(e,t,a)},r.prototype.on=function(e,t){this.eventEmitter.listen(e,t)},r.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},r.prototype.addHook=function(e,t){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,t)},r.prototype.removeHook=function(e){this.eventEmitter.removeEventHandler(e)},r.prototype.focus=function(){this.getCurrentModeEditor().focus()},r.prototype.blur=function(){this.getCurrentModeEditor().blur()},r.prototype.moveCursorToEnd=function(e){e===void 0&&(e=!0),this.getCurrentModeEditor().moveCursorToEnd(e)},r.prototype.moveCursorToStart=function(e){e===void 0&&(e=!0),this.getCurrentModeEditor().moveCursorToStart(e)},r.prototype.setMarkdown=function(e,t){if(e===void 0&&(e=""),t===void 0&&(t=!0),this.mdEditor.setMarkdown(e,t),this.isWysiwygMode()){var n=this.toastMark.getRootNode(),i=this.convertor.toWysiwygModel(n);this.wwEditor.setModel(i,t)}},r.prototype.setHTML=function(e,t){e===void 0&&(e=""),t===void 0&&(t=!0);var n=document.createElement("div");n.innerHTML=Dw(e);var i=Lt.fromSchema(this.wwEditor.schema).parse(n);this.isMarkdownMode()?this.mdEditor.setMarkdown(this.convertor.toMarkdownText(i),t):this.wwEditor.setModel(i,t)},r.prototype.getMarkdown=function(){return this.isMarkdownMode()?this.mdEditor.getMarkdown():this.convertor.toMarkdownText(this.wwEditor.getModel())},r.prototype.getHTML=function(){var e=this;this.eventEmitter.holdEventInvoke(function(){if(e.isMarkdownMode()){var i=e.toastMark.getRootNode(),a=e.convertor.toWysiwygModel(i);e.wwEditor.setModel(a)}});var t=dl(this.wwEditor.view.dom.innerHTML);if(this.placeholder){var n=new RegExp('<span class="placeholder[^>]+>'+this.placeholder+"</span>","i");return t.replace(n,"")}return t},r.prototype.insertText=function(e){this.getCurrentModeEditor().replaceSelection(e)},r.prototype.setSelection=function(e,t){this.getCurrentModeEditor().setSelection(e,t)},r.prototype.replaceSelection=function(e,t,n){this.getCurrentModeEditor().replaceSelection(e,t,n)},r.prototype.deleteSelection=function(e,t){this.getCurrentModeEditor().deleteSelection(e,t)},r.prototype.getSelectedText=function(e,t){return this.getCurrentModeEditor().getSelectedText(e,t)},r.prototype.getRangeInfoOfNode=function(e){return this.getCurrentModeEditor().getRangeInfoOfNode(e)},r.prototype.addWidget=function(e,t,n){this.getCurrentModeEditor().addWidget(e,t,n)},r.prototype.replaceWithWidget=function(e,t,n){this.getCurrentModeEditor().replaceWithWidget(e,t,n)},r.prototype.setHeight=function(e){var t=this.options.el;St(e)&&(e==="auto"?ot(t,"auto-height"):Ke(t,"auto-height"),this.setMinHeight(this.getMinHeight())),lt(t,{height:e}),this.height=e},r.prototype.getHeight=function(){return this.height},r.prototype.setMinHeight=function(e){if(e!==this.minHeight){var t=this.height||this.options.height;t!=="auto"&&this.options.el.querySelector("."+A("main"))&&(e=Math.min(parseInt(e,10),parseInt(t,10)-75)+"px");var n=parseInt(e,10);this.minHeight=e,this.wwEditor.setMinHeight(n),this.mdEditor.setMinHeight(n),this.preview.setMinHeight(n)}},r.prototype.getMinHeight=function(){return this.minHeight},r.prototype.isMarkdownMode=function(){return this.mode==="markdown"},r.prototype.isWysiwygMode=function(){return this.mode==="wysiwyg"},r.prototype.isViewer=function(){return!1},r.prototype.getCurrentPreviewStyle=function(){return this.mdPreviewStyle},r.prototype.changeMode=function(e,t){if(this.mode!==e){if(this.mode=e,this.isWysiwygMode()){var n=this.toastMark.getRootNode(),i=this.convertor.toWysiwygModel(n);this.wwEditor.setModel(i)}else{var i=this.wwEditor.getModel();this.mdEditor.setMarkdown(this.convertor.toMarkdownText(i),!t)}if(this.eventEmitter.emit("removePopupWidget"),this.eventEmitter.emit("changeMode",e),!t){var a=this.convertor.getMappedPos();this.focus(),this.isWysiwygMode()&&kt(a)?this.wwEditor.setSelection(a):Array.isArray(a)&&this.mdEditor.setSelection(a)}}},r.prototype.destroy=function(){var e=this;this.wwEditor.destroy(),this.mdEditor.destroy(),this.preview.destroy(),this.scrollSync.destroy(),this.eventEmitter.emit("destroy"),this.eventEmitter.getEvents().forEach(function(t,n){return e.off(n)})},r.prototype.hide=function(){this.eventEmitter.emit("hide")},r.prototype.show=function(){this.eventEmitter.emit("show")},r.prototype.setScrollTop=function(e){this.getCurrentModeEditor().setScrollTop(e)},r.prototype.getScrollTop=function(){return this.getCurrentModeEditor().getScrollTop()},r.prototype.reset=function(){this.wwEditor.setModel([]),this.mdEditor.setMarkdown("")},r.prototype.getSelection=function(){return this.getCurrentModeEditor().getSelection()},r.prototype.setPlaceholder=function(e){this.placeholder=e,this.mdEditor.setPlaceholder(e),this.wwEditor.setPlaceholder(e)},r.prototype.getEditorElements=function(){return{mdEditor:this.mdEditor.getElement(),mdPreview:this.preview.getElement(),wwEditor:this.wwEditor.getElement()}},r.prototype.convertPosToMatchEditorMode=function(e,t,n){var i,a;t===void 0&&(t=e),n===void 0&&(n=this.mode);var o=this.mdEditor.view.state.doc,s=Array.isArray(e),l=Array.isArray(t),u=e,c=t;if(s!==l)throw new Error("Types of arguments must be same");return n==="markdown"&&!s&&!l?(i=Vi(o,e,t),u=i[0],c=i[1]):n==="wysiwyg"&&s&&l&&(a=dr(o,e,t),u=a[0],c=a[1]),[u,c]},r})();function voe(r){for(var e,t,n=arguments,i=1,a="",o="",s=[0],l=function(c){i===1&&(c||(a=a.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(c?n[c]:a):i===3&&(c||a)?(s[1]=c?n[c]:a,i=2):i===2&&a==="..."&&c?s[2]=al(s[2]||{},n[c]):i===2&&a&&!c?(s[2]=s[2]||{})[a]=!0:i>=5&&(i===5?((s[2]=s[2]||{})[t]=c?a?a+n[c]:n[c]:a,i=6):(c||a)&&(s[2][t]+=c?a+n[c]:a)),a=""},u=0;u<r.length;u++){u&&(i===1&&l(),l(u));for(let c=0;c<r[u].length;c++)e=r[u][c],i===1?e==="<"?(l(),s=[s,"",null],i=3):a+=e:i===4?a==="--"&&e===">"?(i=1,a=""):a=e+a[0]:o?e===o?o="":a+=e:e==='"'||e==="'"?o=e:e===">"?(l(),i=1):i&&(e==="="?(i=5,t=a,a=""):e==="/"&&(i<5||r[u][c+1]===">")?(l(),i===3&&(s=s[0]),i=s,(s=s[0]).push(this.apply(null,i.slice(1))),i=0):e===" "||e==="	"||e===`
49`||e==="\r"?(l(),i=2):a+=e),i===3&&a==="!--"&&(i=4,s=s[0])}return l(),s.length>2?s.slice(1):s[1]}function moe(r){return typeof r=="boolean"||r instanceof Boolean}var goe=moe,yoe=(function(){function r(e){this.current=e,this.root=e,this.entering=!0}return r.prototype.walk=function(){var e=this,t=e.entering,n=e.current;return n?(t?n.firstChild?(this.current=n.firstChild,this.entering=!0):this.entering=!1:n===this.root?this.current=null:n.next?(this.current=n.next,this.entering=!0):(this.current=n.parent,this.entering=!1),{vnode:n,entering:t}):null},r})(),Xe=(function(){function r(e,t,n){this.parent=null,this.old=null,this.firstChild=null,this.next=null,this.skip=!1,this.type=e,this.props=t,this.children=n,this.props.children=n,t.ref&&(this.ref=t.ref,delete t.ref),t.key&&(this.key=t.key,delete t.key)}return r.prototype.walker=function(){return new yoe(this)},r.removalNodes=[],r})();function boe(r){return new Xe("TEXT_NODE",{nodeValue:r},[])}function th(r,e){var t=r;goe(r)||r==null?t=null:(St(r)||kt(r))&&(t=boe(String(r))),t&&e.push(t)}function woe(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var i=[];return t.forEach(function(a){Array.isArray(a)?a.forEach(function(o){th(o,i)}):th(a,i)}),new Xe(r,e||{},i)}var z=voe.bind(woe);function koe(r){return r===Object(r)}var Coe=koe;function Toe(r){var e;return r.type==="TEXT_NODE"?e=document.createTextNode(r.props.nodeValue):(e=document.createElement(r.type),Pv(e,{},r.props)),e}function Bv(r,e){r.node?e.removeChild(r.node):Bv(r.firstChild,e)}function xoe(r,e,t){Object.keys(e).forEach(function(n){if(/^on/.test(n)){if(!t[n]||e[n]!==t[n]){var i=n.slice(2).toLowerCase();r.removeEventListener(i,e[n])}}else n!=="children"&&!t[n]&&!Mw(r)&&r.removeAttribute(n)}),Pv(r,e,t,function(n){return!tl(e[n],t[n])})}var Eoe=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function Pv(r,e,t,n){Object.keys(t).forEach(function(i){if(!n||n(i))if(/^on/.test(i)){var a=i.slice(2).toLowerCase();r.addEventListener(a,t[i])}else i==="nodeValue"?r[i]=t[i]:i==="style"&&Coe(t[i])?Soe(r,e[i],t[i]):i!=="children"&&(t[i]===!1?r.removeAttribute(i):r.setAttribute(i,t[i]))})}function Soe(r,e,t){e&&Object.keys(e).forEach(function(n){r.style[n]=""}),Object.keys(t).forEach(function(n){var i=t[n];r.style[n]=kt(i)&&!Eoe.test(n)?i+"px":i})}function Ml(r){if(Xe.removalNodes.forEach(function(a){return nh(a)}),r){for(var e=void 0,t=r.walker();e=t.walk();)if(r=e.vnode,e.entering)nh(r);else if(Ve(r.type)){var n=r.component;if(!r.old&&n.mounted&&n.mounted(),r.old&&n.updated){var i=n.prevProps||{};n.updated(i)}}}}function rh(r){for(var e=r.parent;!e.node;)e=e.parent;return e.node}function nh(r){if(!(!r||!r.parent)){if(r.node){var e=rh(r);r.effect==="A"?e.appendChild(r.node):r.effect==="U"&&xoe(r.node,r.old.props,r.props)}if(r.effect==="D"){for(var t=void 0,n=r.walker();t=n.walk();)if(r=t.vnode,!t.entering)if(Ve(r.type)){var i=r.component;i.beforeDestroy&&i.beforeDestroy()}else{var e=rh(r);Bv(r,e)}}r.ref&&(r.component?r.ref(r.component):r.node&&r.ref(r.node))}}function Moe(r,e){var t=e.props,n=e.component;return n?(n.prevProps=n.props,n.props=e.props,n):new r(t)}function Hv(r){for(var e=r;r&&!r.skip;){if(Ve(r.type)){var t=Moe(r.type,r);t.vnode=r,r.component=t,r.props.children=r.children=[t.render()],ih(r)}else r.node||(r.node=Toe(r)),ih(r);if(r.firstChild)r=r.firstChild;else{for(;r&&r.parent&&!r.next&&(r=r.parent,r!==e););r=r.next}}}function Ooe(r,e){return r&&e&&e.type===r.type&&(!e.key||e.key===r.key)}function ih(r){var e=r.children,t=r.old?r.old.firstChild:null,n=null;e.forEach(function(a,o){var s=Ooe(t,a);s&&(a.old=t,a.parent=r,a.node=t.node,a.component=t.component,a.effect="U"),a&&!s&&(a.old=null,a.parent=r,a.node=null,a.effect="A"),t&&!s&&(Xe.removalNodes.push(t),t.effect="D"),t&&(t=t.next),o===0?r.firstChild=a:a&&(n.next=a),n=a});var i=Ee(e);if(!e.length)for(;t;)Xe.removalNodes.push(t),t.effect="D",t=t.next;for(;t&&i;)t&&i.old!==t&&(Xe.removalNodes.push(t),t.effect="D",t=t.next)}function Loe(r){r.effect="D",Xe.removalNodes=[r],Ml(),Xe.removalNodes=[]}function Aoe(r){var e=r.vnode;e.effect="U",e.old=e,e.next&&(e.next.skip=!0),Xe.removalNodes=[],Hv(e),Ml(e),e.next&&(e.next.skip=!1)}function Noe(r,e){var t=new Xe(r.tagName.toLowerCase(),{},[e]);return t.node=r,Xe.removalNodes=[],Hv(t),Ml(t),function(){return Loe(t.firstChild)}}var Se=(function(){function r(e){this.props=e,this.state={},this.refs={}}return r.prototype.setState=function(e){var t=b(b({},this.state),e);tl(this.state,t)||(this.state=t,Aoe(this))},r})(),Doe=(function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.state={hide:!1},n}return e.prototype.show=function(){this.setState({hide:!1})},e.prototype.hide=function(){this.setState({hide:!0})},e.prototype.render=function(){var t=this.props,n=t.editorType,i=t.eventEmitter;return z(ah||(ah=$([`
50      <div class="`,'" style="display: ',`">
51        <div
52          class="tab-item`,`"
53          onClick=`,`
54        >
55          `,`
56        </div>
57        <div
58          class="tab-item`,`"
59          onClick=`,`
60        >
61          `,`
62        </div>
63      </div>
64    `],[`
65      <div class="`,'" style="display: ',`">
66        <div
67          class="tab-item`,`"
68          onClick=`,`
69        >
70          `,`
71        </div>
72        <div
73          class="tab-item`,`"
74          onClick=`,`
75        >
76          `,`
77        </div>
78      </div>
79    `])),A("mode-switch"),this.state.hide?"none":"block",n==="markdown"?" active":"",function(){i.emit("needChangeMode","markdown")},B.get("Markdown"),n==="wysiwyg"?" active":"",function(){i.emit("needChangeMode","wysiwyg")},B.get("WYSIWYG"))},e})(Se),ah;function Ioe(r,e){var t,n;e=e||0;function i(){n=Array.prototype.slice.call(arguments),window.clearTimeout(t),t=window.setTimeout(function(){r.apply(null,n)},e)}return i}var Roe=Ioe,Boe=Roe;function Poe(r,e){var t,n=!0,i=function(c){r.apply(null,c),t=null},a,o,s;e=e||0,a=Boe(i,e);function l(){if(s=Array.prototype.slice.call(arguments),n){i(s),n=!1;return}o=Number(new Date),t=t||o,a(s),o-t>=e&&i(s)}function u(){n=!0,t=null}return l.reset=u,l}var Hoe=Poe,Fv=(function(){if(typeof Map<"u")return Map;function r(e,t){var n=-1;return e.some(function(i,a){return i[0]===t?(n=a,!0):!1}),n}return(function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(t){var n=r(this.__entries__,t),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(t,n){var i=r(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},e.prototype.delete=function(t){var n=this.__entries__,i=r(n,t);~i&&n.splice(i,1)},e.prototype.has=function(t){return!!~r(this.__entries__,t)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,n){n===void 0&&(n=null);for(var i=0,a=this.__entries__;i<a.length;i++){var o=a[i];t.call(n,o[1],o[0])}},e})()})(),Qs=typeof window<"u"&&typeof document<"u"&&window.document===document,fa=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),Foe=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(fa):function(r){return setTimeout(function(){return r(Date.now())},1e3/60)}})(),qoe=2;function _oe(r,e){var t=!1,n=!1,i=0;function a(){t&&(t=!1,r()),n&&s()}function o(){Foe(a)}function s(){var l=Date.now();if(t){if(l-i<qoe)return;n=!0}else t=!0,n=!1,setTimeout(o,e);i=l}return s}var $oe=20,zoe=["top","right","bottom","left","width","height","size","weight"],Voe=typeof MutationObserver<"u",Uoe=(function(){function r(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=_oe(this.refresh.bind(this),$oe)}return r.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},r.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},r.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},r.prototype.updateObservers_=function(){var e=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return e.forEach(function(t){return t.broadcastActive()}),e.length>0},r.prototype.connect_=function(){!Qs||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Voe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},r.prototype.disconnect_=function(){!Qs||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},r.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?"":t,i=zoe.some(function(a){return!!~n.indexOf(a)});i&&this.refresh()},r.getInstance=function(){return this.instance_||(this.instance_=new r),this.instance_},r.instance_=null,r})(),qv=function(r,e){for(var t=0,n=Object.keys(e);t<n.length;t++){var i=n[t];Object.defineProperty(r,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return r},on=function(r){var e=r&&r.ownerDocument&&r.ownerDocument.defaultView;return e||fa},_v=Sa(0,0,0,0);function da(r){return parseFloat(r)||0}function oh(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return e.reduce(function(n,i){var a=r["border-"+i+"-width"];return n+da(a)},0)}function Woe(r){for(var e=["top","right","bottom","left"],t={},n=0,i=e;n<i.length;n++){var a=i[n],o=r["padding-"+a];t[a]=da(o)}return t}function joe(r){var e=r.getBBox();return Sa(0,0,e.width,e.height)}function Goe(r){var e=r.clientWidth,t=r.clientHeight;if(!e&&!t)return _v;var n=on(r).getComputedStyle(r),i=Woe(n),a=i.left+i.right,o=i.top+i.bottom,s=da(n.width),l=da(n.height);if(n.boxSizing==="border-box"&&(Math.round(s+a)!==e&&(s-=oh(n,"left","right")+a),Math.round(l+o)!==t&&(l-=oh(n,"top","bottom")+o)),!Joe(r)){var u=Math.round(s+a)-e,c=Math.round(l+o)-t;Math.abs(u)!==1&&(s-=u),Math.abs(c)!==1&&(l-=c)}return Sa(i.left,i.top,s,l)}var Koe=(function(){return typeof SVGGraphicsElement<"u"?function(r){return r instanceof on(r).SVGGraphicsElement}:function(r){return r instanceof on(r).SVGElement&&typeof r.getBBox=="function"}})();function Joe(r){return r===on(r).document.documentElement}function Xoe(r){return Qs?Koe(r)?joe(r):Goe(r):_v}function Qoe(r){var e=r.x,t=r.y,n=r.width,i=r.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(a.prototype);return qv(o,{x:e,y:t,width:n,height:i,top:t,right:e+n,bottom:i+t,left:e}),o}function Sa(r,e,t,n){return{x:r,y:e,width:t,height:n}}var Yoe=(function(){function r(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Sa(0,0,0,0),this.target=e}return r.prototype.isActive=function(){var e=Xoe(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},r.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},r})(),Zoe=(function(){function r(e,t){var n=Qoe(t);qv(this,{target:e,contentRect:n})}return r})(),ese=(function(){function r(e,t,n){if(this.activeObservations_=[],this.observations_=new Fv,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return r.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof on(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new Yoe(e)),this.controller_.addObserver(this),this.controller_.refresh())}},r.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof on(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},r.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},r.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},r.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(n){return new Zoe(n.target,n.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},r.prototype.clearActive=function(){this.activeObservations_.splice(0)},r.prototype.hasActive=function(){return this.activeObservations_.length>0},r})(),$v=typeof WeakMap<"u"?new WeakMap:new Fv,zv=(function(){function r(e){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=Uoe.getInstance(),n=new ese(e,t,this);$v.set(this,n)}return r})();["observe","unobserve","disconnect"].forEach(function(r){zv.prototype[r]=function(){var e;return(e=$v.get(this))[r].apply(e,arguments)}});var tse=(function(){return typeof fa.ResizeObserver<"u"?fa.ResizeObserver:zv})(),rse=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.execCommand=function(t){var n=st(t.target,"li");this.props.execCommand("heading",{level:Number(n.getAttribute("data-level"))})},e.prototype.render=function(){var t=this;return z(lh||(lh=$([`
80      <ul
81        onClick=`,`
82        aria-role="menu"
83        aria-label="`,`"
84      >
85        `,`
86        <li data-type="Paragraph" aria-role="menuitem">
87          <div>`,`</div>
88        </li>
89      </ul>
90    `],[`
91      <ul
92        onClick=`,`
93        aria-role="menu"
94        aria-label="`,`"
95      >
96        `,`
97        <li data-type="Paragraph" aria-role="menuitem">
98          <div>`,`</div>
99        </li>
100      </ul>
101    `])),function(n){return t.execCommand(n)},B.get("Headings"),[1,2,3,4,5,6].map(function(n){return z(sh||(sh=$([`
102              <li data-level="`,`" data-type="Heading" aria-role="menuitem">
103                <`,">"," ",`</$>
104              </li>
105            `],[`
106              <li data-level="`,`" data-type="Heading" aria-role="menuitem">
107                <`,">"," ",`</$>
108              </li>
109            `])),n,"h"+n,B.get("Heading"),n)}),B.get("Paragraph"))},e})(Se),sh,lh,Vv=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.toggleTab=function(t,n){this.props.onClick(t,n)},e.prototype.render=function(){var t=this;return z(ch||(ch=$([`
110      <div class="`,`" aria-role="tabpanel">
111        `,`
112      </div>
113    `],[`
114      <div class="`,`" aria-role="tabpanel">
115        `,`
116      </div>
117    `])),A("tabs"),this.props.tabs.map(function(n){var i=n.name,a=n.text,o=t.props.activeTab===i;return z(uh||(uh=$([`
118            <div
119              class="tab-item`,`"
120              onClick=`,`
121              aria-role="tab"
122              aria-label="`,`"
123              aria-selected="`,`"
124              tabindex="`,`"
125            >
126              `,`
127            </div>
128          `],[`
129            <div
130              class="tab-item`,`"
131              onClick=`,`
132              aria-role="tab"
133              aria-label="`,`"
134              aria-selected="`,`"
135              tabindex="`,`"
136            >
137              `,`
138            </div>
139          `])),o?" active":"",function(s){return t.toggleTab(s,i)},B.get(a),o?"true":"false",o?"0":"-1",B.get(a))}))},e})(Se),uh,ch,nse="ui",ise=(function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.initialize=function(i){i===void 0&&(i="file");var a=n.refs.url;a.value="",n.refs.altText.value="",n.refs.file.value="",Ke(a,"wrong"),n.setState({activeTab:i,file:null,fileNameElClassName:""})},n.execCommand=function(){n.state.activeTab==="file"?n.emitAddImageBlob():n.emitAddImage()},n.toggleTab=function(i,a){a!==n.state.activeTab&&n.initialize(a)},n.showFileSelectBox=function(){n.refs.file.click()},n.changeFile=function(i){var a=i.target.files;a?.length&&n.setState({file:a[0]})},n.state={activeTab:"file",file:null,fileNameElClassName:""},n.tabs=[{name:"file",text:"File"},{name:"url",text:"URL"}],n}return e.prototype.emitAddImageBlob=function(){var t=this,n=this.refs.file.files,i=this.refs.altText,a=" wrong";if(n?.length){a="";var o=n.item(0),s=function(l,u){return t.props.execCommand("addImage",{imageUrl:l,altText:u||i.value})};this.props.eventEmitter.emit("addImageBlobHook",o,s,nse)}this.setState({fileNameElClassName:a})},e.prototype.emitAddImage=function(){var t=this.refs.url,n=this.refs.altText,i=t.value,a=n.value||"image";if(Ke(t,"wrong"),!i.length){ot(t,"wrong");return}i&&this.props.execCommand("addImage",{imageUrl:i,altText:a})},e.prototype.preventSelectStart=function(t){t.preventDefault()},e.prototype.updated=function(){this.props.show||this.initialize()},e.prototype.render=function(){var t=this,n=this.state,i=n.activeTab,a=n.file,o=n.fileNameElClassName;return z(fh||(fh=$([`
140      <div aria-label="`,`">
141        <`," tabs="," activeTab="," onClick=",` />
142        <div style="display:`,`">
143          <label for="toastuiImageUrlInput">`,`</label>
144          <input
145            id="toastuiImageUrlInput"
146            type="text"
147            ref=`,`
148          />
149        </div>
150        <div style="display:`,`;position: relative;">
151          <label for="toastuiImageFileInput">`,`</label>
152          <span
153            class="`,"",`"
154            onClick=`,`
155            onSelectstart=`,`
156          >
157            `,`
158          </span>
159          <button
160            type="button"
161            class="`,`"
162            onClick=`,`
163          >
164            `,`
165          </button>
166          <input
167            id="toastuiImageFileInput"
168            type="file"
169            accept="image/*"
170            onChange=`,`
171            ref=`,`
172          />
173        </div>
174        <label for="toastuiAltTextInput">`,`</label>
175        <input
176          id="toastuiAltTextInput"
177          type="text"
178          ref=`,`
179        />
180        <div class="`,`">
181          <button type="button" class="`,'" onClick=',`>
182            `,`
183          </button>
184          <button type="button" class="`,'" onClick=',`>
185            `,`
186          </button>
187        </div>
188      </div>
189    `],[`
190      <div aria-label="`,`">
191        <`," tabs="," activeTab="," onClick=",` />
192        <div style="display:`,`">
193          <label for="toastuiImageUrlInput">`,`</label>
194          <input
195            id="toastuiImageUrlInput"
196            type="text"
197            ref=`,`
198          />
199        </div>
200        <div style="display:`,`;position: relative;">
201          <label for="toastuiImageFileInput">`,`</label>
202          <span
203            class="`,"",`"
204            onClick=`,`
205            onSelectstart=`,`
206          >
207            `,`
208          </span>
209          <button
210            type="button"
211            class="`,`"
212            onClick=`,`
213          >
214            `,`
215          </button>
216          <input
217            id="toastuiImageFileInput"
218            type="file"
219            accept="image/*"
220            onChange=`,`
221            ref=`,`
222          />
223        </div>
224        <label for="toastuiAltTextInput">`,`</label>
225        <input
226          id="toastuiAltTextInput"
227          type="text"
228          ref=`,`
229        />
230        <div class="`,`">
231          <button type="button" class="`,'" onClick=',`>
232            `,`
233          </button>
234          <button type="button" class="`,'" onClick=',`>
235            `,`
236          </button>
237        </div>
238      </div>
239    `])),B.get("Insert image"),Vv,this.tabs,i,this.toggleTab,i==="url"?"block":"none",B.get("Image URL"),function(s){return t.refs.url=s},i==="file"?"block":"none",B.get("Select image file"),A("file-name"),a?" has-file":o,this.showFileSelectBox,this.preventSelectStart,a?a.name:B.get("No file"),A("file-select-button"),this.showFileSelectBox,B.get("Choose a file"),this.changeFile,function(s){return t.refs.file=s},B.get("Description"),function(s){return t.refs.altText=s},A("button-container"),A("close-button"),this.props.hidePopup,B.get("Cancel"),A("ok-button"),this.execCommand,B.get("OK"))},e})(Se),fh,ase=(function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.execCommand=function(){var n=t.refs.url,i=t.refs.text;if(Ke(n,"wrong"),Ke(i,"wrong"),n.value.length<1){ot(n,"wrong");return}var a=Qe(t.props.initialValues.linkUrl);if(a&&i.value.length<1){ot(i,"wrong");return}t.props.execCommand("addLink",{linkUrl:n.value,linkText:i.value})},t}return e.prototype.initialize=function(){var t=this.props.initialValues,n=t.linkUrl,i=t.linkText,a=this.refs.url,o=this.refs.text;Ke(a,"wrong"),Ke(o,"wrong","disabled"),o.removeAttribute("disabled"),n&&(ot(o,"disabled"),o.setAttribute("disabled","disabled")),a.value=n||"",o.value=i||""},e.prototype.mounted=function(){this.initialize()},e.prototype.updated=function(t){!t.show&&this.props.show&&this.initialize()},e.prototype.render=function(){var t=this;return z(dh||(dh=$([`
240      <div aria-label="`,`">
241        <label for="toastuiLinkUrlInput">`,`</label>
242        <input
243          id="toastuiLinkUrlInput"
244          type="text"
245          ref=`,`
246        />
247        <label for="toastuiLinkTextInput">`,`</label>
248        <input
249          id="toastuiLinkTextInput"
250          type="text"
251          ref=`,`
252        />
253        <div class="`,`">
254          <button type="button" class="`,'" onClick=',`>
255            `,`
256          </button>
257          <button type="button" class="`,'" onClick=',`>
258            `,`
259          </button>
260        </div>
261      </div>
262    `],[`
263      <div aria-label="`,`">
264        <label for="toastuiLinkUrlInput">`,`</label>
265        <input
266          id="toastuiLinkUrlInput"
267          type="text"
268          ref=`,`
269        />
270        <label for="toastuiLinkTextInput">`,`</label>
271        <input
272          id="toastuiLinkTextInput"
273          type="text"
274          ref=`,`
275        />
276        <div class="`,`">
277          <button type="button" class="`,'" onClick=',`>
278            `,`
279          </button>
280          <button type="button" class="`,'" onClick=',`>
281            `,`
282          </button>
283        </div>
284      </div>
285    `])),B.get("Insert link"),B.get("URL"),function(n){return t.refs.url=n},B.get("Link text"),function(n){return t.refs.text=n},A("button-container"),A("close-button"),this.props.hidePopup,B.get("Cancel"),A("ok-button"),this.execCommand,B.get("OK"))},e})(Se),dh,hh=20,ph=20,vh=5,mh=14,gh=5,yh=9,ose=1,sse=1,bh=1,lse=(function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.extendSelectionRange=function(i){var a=i.pageX,o=i.pageY,s=a-n.offsetRect.left,l=o-n.offsetRect.top,u=n.getSelectionRangeByOffset(s,l);n.setState(b({},u))},n.execCommand=function(){n.props.execCommand("addTable",{rowCount:n.state.rowIdx+1,columnCount:n.state.colIdx+1})},n.state={rowIdx:-1,colIdx:-1},n}return e.prototype.getDescription=function(){return this.state.colIdx===-1?"":this.state.colIdx+1+" x "+(this.state.rowIdx+1)},e.prototype.getBoundByRange=function(t,n){return{width:(t+1)*hh,height:(n+1)*ph}}
vendor: 4,558 bytes, lines 285-311
285,e.prototype.getRangeByOffset=function(t,n){return{colIdx:Math.floor(t/hh),rowIdx:Math.floor(n/ph)}},e.prototype.getTableRange=function(){var t=this.state,n=t.colIdx,i=t.rowIdx,a=Math.max(n,gh),o=Math.max(i,vh);return n>=gh&&a<yh&&(a+=1),i>=vh&&o<mh&&(o+=1),{colIdx:a+1,rowIdx:o+1}},e.prototype.getSelectionAreaBound=function(){var t=this.getBoundByRange(this.state.colIdx,this.state.rowIdx),n=t.width,i=t.height;return!n&&!i?{display:"none"}:{width:n-bh,height:i-bh,display:"block"}},e.prototype.getSelectionRangeByOffset=function(t,n){var i=this.getRangeByOffset(t,n);return i.rowIdx=Math.min(Math.max(i.rowIdx,ose),mh),i.colIdx=Math.min(Math.max(i.colIdx,sse),yh),i},e.prototype.updated=function(){if(!this.props.show)this.setState({colIdx:-1,rowIdx:-1});else if(this.state.colIdx===-1&&this.state.rowIdx===-1){var t=this.refs.tableEl.getBoundingClientRect(),n=t.left,i=t.top;this.offsetRect={left:window.pageXOffset+n,top:window.pageYOffset+i}}},e.prototype.createTableArea=function(t){for(var n=t.colIdx,i=t.rowIdx,a=[],o=0;o<i;o+=1){for(var s=[],l=0;l<n;l+=1){var u=""+A("table-cell")+(o>0?"":" header");s.push(z(wh||(wh=$(['<div class="','"></div>'],['<div class="','"></div>'])),u))}a.push(z(kh||(kh=$(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),A("table-row"),s))}return z(Ch||(Ch=$(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),A("table"),a)},e.prototype.render=function(){var t=this,n=this.getTableRange(),i=this.getSelectionAreaBound();return z(Th||(Th=$([`
286      <div aria-label="`,`">
287        <div
288          class="`,`"
289          ref=`,`
290          onMousemove=`,`
291          onClick=`,`
292        >
293          `,`
294          <div class="`,'" style=',`></div>
295        </div>
296        <p class="`,'">',`</p>
297      </div>
298    `],[`
299      <div aria-label="`,`">
300        <div
301          class="`,`"
302          ref=`,`
303          onMousemove=`,`
304          onClick=`,`
305        >
306          `,`
307          <div class="`,'" style=',`></div>
308        </div>
309        <p class="`,'">',`</p>
310      </div>
311    `])),B.get("Insert table"),A("table-selection"),function(a){return t.refs.tableEl=a},this.extendSelectionRange,this.execCommand,this.createTableArea(n),A("table-selection-layer"),i,A("table-description"),this.getDescription())},e})(Se),wh,kh,Ch,Th,use=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.mounted=function(){this.refs.el.appendChild(this.props.body)},e.prototype.updated=function(t){this.refs.el.replaceChild(this.props.body,t.body)},e.prototype.render=function(){var t=this;return z(xh||(xh=$(["<div ref=","></div>"],["<div ref=","></div>"])),function(n){return t.refs.el=n})},e})(Se),xh;function Ys(r){return St(r)?fse(r):r}function cse(){var r=document.createElement("label"),e=document.createElement("input"),t=document.createElement("span");r.className="scroll-sync active",e.type="checkbox",e.checked=!0,t.className="switch";var n=function(i){return e.addEventListener("change",function(a){var o=a.target.checked;o?ot(r,"active"):Ke(r,"active"),i("toggleScrollSync",{active:o})})};return r.appendChild(e),r.appendChild(t),{name:"scrollSync",el:r,onMounted:n}}function fse(r){var e;switch(r){case"heading":e={name:"heading",className:"heading",tooltip:B.get("Headings"),state:"heading"};break;case"bold":e={name:"bold",className:"bold",command:"bold",tooltip:B.get("Bold"),state:"strong"};break;case"italic":e={name:"italic",className:"italic",command:"italic",tooltip:B.get("Italic"),state:"emph"};break;case"strike":e={name:"strike",className:"strike",command:"strike",tooltip:B.get("Strike"),state:"strike"};break;case"hr":e={name:"hr",className:"hrline",command:"hr",tooltip:B.get("Line"),state:"thematicBreak"};break;case"quote":e={name:"quote",className:"quote",command:"blockQuote",tooltip:B.get("Blockquote"),state:"blockQuote"};break;case"ul":e={name:"ul",className:"bullet-list",command:"bulletList",tooltip:B.get("Unordered list"),state:"bulletList"};break;case"ol":e={name:"ol",className:"ordered-list",command:"orderedList",tooltip:B.get("Ordered list"),state:"orderedList"};break;case"task":e={name:"task",className:"task-list",command:"taskList",tooltip:B.get("Task"),state:"taskList"};break;case"table":e={name:"table",className:"table",tooltip:B.get("Insert table"),state:"table"};break;case"image":e={name:"image",className:"image",tooltip:B.get("Insert image")};break;case"link":e={name:"link",className:"link",tooltip:B.get("Insert link")};break;case"code":e={name:"code",className:"code",command:"code",tooltip:B.get("Code"),state:"co
311de"};break;case"codeblock":e={name:"codeblock",className:"codeblock",command:"codeBlock",tooltip:B.get("Insert CodeBlock"),state:"codeBlock"};break;case"indent":e={name:"indent",className:"indent",command:"indent",tooltip:B.get("Indent"),state:"indent"};break;case"outdent":e={name:"outdent",className:"outdent",command:"outdent",tooltip:B.get("Outdent"),state:"outdent"};break;case"scrollSync":e=cse();break;case"more":e={name:"more",className:"more",tooltip:B.get("More")};break}return e.name!=="scrollSync"&&(e.className+=" "+A("toolbar-icons")),e}function Ol(r,e){var t=e.el,n=e.pos,i=e.popup,a=e.initialValues;switch(r){case"heading":return{render:function(o){return z(Eh||(Eh=$(["<"," ..."," />"],["<"," ..."," />"])),rse,o)},className:A("popup-add-heading"),fromEl:t,pos:n};case"link":return{render:function(o){return z(Sh||(Sh=$(["<"," ..."," />"],["<"," ..."," />"])),ase,o)},className:A("popup-add-link"),fromEl:t,pos:n,initialValues:a};case"image":return{render:function(o){return z(Mh||(Mh=$(["<"," ..."," />"],["<"," ..."," />"])),ise,o)},className:A("popup-add-image"),fromEl:t,pos:n};case"table":return{render:function(o){return z(Oh||(Oh=$(["<"," ..."," />"],["<"," ..."," />"])),lse,o)},className:A("popup-add-table"),fromEl:t,pos:n};case"customPopupBody":return i?b({render:function(o){return z(Lh||(Lh=$(["<"," ..."," body="," />"],["<"," ..."," body="," />"])),use,o,i.body)},fromEl:t,pos:n},i):null;default:return null}}function ha(r){r.hidden=r.length===r.filter(function(e){return e.hidden}).length}function dse(r,e){var t=function(n){return n.hidden=n.name==="scrollSync"&&e,n};return r.reduce(function(n,i){n.push(i.map(function(o){return t(Ys(o))}));var a=n[(n.length||1)-1];return a&&ha(a),n},[])}function hse(r,e){r.forEach(function(t){t.forEach(function(n){return n.hidden=n.name==="scrollSync"&&e}),ha(t)})}var Eh,Sh,Mh,Oh,Lh,pse=20,vse=(function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handleMousedown=function(n){!st(n.target,"."+A("popup"))&&!st(n.target,t.props.info.fromEl)&&t.props.hidePopup()},t}return e.prototype.mounted=function(){document.addEventListener("mousedown",this.handleMousedown),this.props.eventEmitter.listen("closePopup",this.props.hidePopup)},e.prototype.beforeDestroy=function(){document.removeEventListener("mousedown",this.handleMousedown)},e.prototype.updated=function(t){var n=this.props,i=n.show,a=n.info;if(i&&a.pos&&t.show!==i){var o=b({},a.pos),s=this.refs.el.offsetWidth,l=st(this.refs.el,"."+A("toolbar")),u=l.offsetWidth;o.left+s>=u&&(o.left=u-s-pse),tl(this.state.popupPos,o)||this.setState({popupPos:o})}},e.prototype.render=function(){var t=this,n=this.props,i=n.info,a=n.show,o=n.hidePopup,s=n.eventEmitter,l=n.execCommand,u=i||{},c=u.className,f=c===void 0?"":c,d=u.style,h=u.render,p=u.initialValues,v=p===void 0?{}:p,m=b(b({display:a?"block":"none"},d),this.state.popupPos);return z(Ah||(Ah=$([`
312      <div
313        class="`," ",`"
314        style=`,`
315        ref=`,`
316        aria-role="dialog"
317      >
318        <div class="`,`">
319          `,`
320        </div>
321      </div>
322    `],[`
323      <div
324        class="`," ",`"
325        style=`,`
326        ref=`,`
327        aria-role="dialog"
328      >
329        <div class="`,`">
330          `,`
331        </div>
332      </div>
333    `])),A("popup"),f,m,function(g){return t.refs.el=g},A("popup-body"),h&&h({eventEmitter:s,show:a,hidePopup:o,execCommand:l,initialValues:v}))},e})(Se),Ah,Nh=6;function Ll(r){return(function(e){O(t,e);function t(n){var i=e.call(this,n)||this;return i.showTooltip=function(a){var o=i.props.item.tooltip;if(!i.props.disabled&&o){var s=i.getBound(a),l=s.left+Nh+"px",u=s.top+Nh+"px";lt(i.props.tooltipRef.current,{display:"block",left:l,top:u}),i.props.tooltipRef.current.querySelector(".text").textContent=o}},i.hideTooltip=function(){lt(i.props.tooltipRef.current,"display","none")},i.state={active:!1,disabled:n.disabled},i.addEvent(),i}return t.prototype.addEvent=function(){var n=this,i=this.props,a=i.item,o=i.eventEmitter;a.state&&o.listen("changeToolbarState",function(s){var l,u=s.toolbarState,c=(l=u[a.state])!==null&&l!==void 0?l:{},f=c.active,d=c.disabled;n.setState({active:!!f,disabled:d??n.props.disabled})})},t.prototype.getBound=function(n){var i=up(n,st(n,"."+A("toolbar"))),a=i.offsetLeft,o=i.offsetTop;return{left:a,top:n.offsetHeight+o}},t.prototype.render=function(){return z(Dh||(Dh=$([`
334        <`,`
335          ...`,`
336          active=`,`
337          showTooltip=`,`
338          hideTooltip=`,`
339          getBound=`,`
340          disabled=`,`
341        />
342      `],[`
343        <`,`
344          ...`,`
345          active=`,`
346          showTooltip=`,`
347          hideTooltip=`,`
348          getBound=`,`
349          disabled=`,`
350        />
351      `])),r,this.props,this.state.active,this.showTooltip,this.hideTooltip,this.getBound,this.state.disabled||this.props.disabled)},t})(Se)}var Dh,mse=80,gse=(function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.showTooltip=function(){t.props.showTooltip(t.refs.el)},t.execCommand=function(){var n=t.props,i=n.item,a=n.execCommand,o=n.setPopupInfo,s=n.getBound,l=n.eventEmitter,u=i.command,c=i.name,f=i.popup;
vendor: 4,485 bytes, lines 351-414
351if(u)a(u);else{var d=f?"customPopupBody":c,h=l.emit("query","getPopupInitialValues",{popupName:d})[0],p=Ol(d,{el:t.refs.el,pos:s(t.refs.el),popup:f,initialValues:h});p&&o(p)}},t}return e.prototype.mounted=function(){this.setItemWidth()},e.prototype.updated=function(t){t.item.name!==this.props.item.name&&this.setItemWidth()},e.prototype.setItemWidth=function(){var t=this.props,n=t.setItemWidth,i=t.item;n&&n(i.name,cl(this.refs.el)+(i.hidden?mse:0))},e.prototype.render=function(){var t=this,n=this.props,i=n.hideTooltip,a=n.disabled,o=n.item,s=n.active,l=b({display:o.hidden?"none":null},o.style),u=""+(o.className||"")+(s?" active":"");return z(Ih||(Ih=$([`
352      <button
353        ref=`,`
354        type="button"
355        style=`,`
356        class=`,`
357        onClick=`,`
358        onMouseover=`,`
359        onMouseout=`,`
360        disabled=`,`
361        aria-label=`,`
362      >
363        `,`
364      </button>
365    `],[`
366      <button
367        ref=`,`
368        type="button"
369        style=`,`
370        class=`,`
371        onClick=`,`
372        onMouseover=`,`
373        onMouseout=`,`
374        disabled=`,`
375        aria-label=`,`
376      >
377        `,`
378      </button>
379    `])),function(c){return t.refs.el=c},l,u,this.execCommand,this.showTooltip,i,!!a,o.text||o.tooltip||"",o.text||"")},e})(Se),yse=Ll(gse),Ih,bse=(function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.showTooltip=function(){t.props.showTooltip(t.refs.el)},t.showPopup=function(){var n=Ol("customPopupBody",{el:t.refs.el,pos:t.props.getBound(t.refs.el),popup:t.props.item.popup});n&&t.props.setPopupInfo(n)},t}return e.prototype.mounted=function(){var t=this.props,n=t.setItemWidth,i=t.item;this.refs.el.appendChild(i.el),n&&n(i.name,cl(this.refs.el)),i.onMounted&&i.onMounted(this.props.execCommand)},e.prototype.updated=function(t){var n,i=this.props,a=i.item,o=i.active,s=i.disabled;(t.active!==o||t.disabled!==s)&&((n=a.onUpdated)===null||n===void 0||n.call(a,{active:o,disabled:s}))},e.prototype.render=function(){var t=this,n=this.props,i=n.disabled,a=n.item,o={display:a.hidden?"none":"inline-block"},s=function(l){return i?null:l};return z(Rh||(Rh=$([`
380      <div
381        ref=`,`
382        style=`,`
383        class=`,`
384        onClick=`,`
385        onMouseover=`,`
386        onMouseout=`,`
387      ></div>
388    `],[`
389      <div
390        ref=`,`
391        style=`,`
392        class=`,`
393        onClick=`,`
394        onMouseover=`,`
395        onMouseout=`,`
396      ></div>
397    `])),function(l){return t.refs.el=l},o,A("toolbar-item-wrapper"),s(this.showPopup),s(this.showTooltip),s(this.props.hideTooltip))},e})(Se),wse=Ll(bse),Rh,Uv=(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(){var t=this,n=this.props,i=n.group,a=n.hiddenDivider,o=i.hidden?{display:"none"}:null,s=a?{display:"none"}:null;return z(Ph||(Ph=$([`
398      <div class="`,'" style=',`>
399        `,`
400        <div class="`,'" style=',`></div>
401      </div>
402    `],[`
403      <div class="`,'" style=',`>
404        `,`
405        <div class="`,'" style=',`></div>
406      </div>
407    `])),A("toolbar-group"),o,i.map(function(l){var u=l.el?wse:yse;return z(Bh||(Bh=$(["<"," key="," ..."," item="," />"],["<"," key="," ..."," item="," />"])),u,l.name,t.props,l)}),A("toolbar-divider"),s)},e})(Se),Bh,Ph,kse=4,Cse=(function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.handleClickDocument=function(i){var a=i.target;!st(a,"."+A("dropdown-toolbar"))&&!st(a,".more")&&n.setState({showDropdown:!1,dropdownPos:null})},n.showTooltip=function(){n.props.showTooltip(n.refs.el)},n.state={showDropdown:!1,dropdownPos:null},n}return e.prototype.getBound=function(){var t=this.props.getBound(this.refs.el);return t.top+=kse,b(b({},t),{left:null,right:10})},e.prototype.mounted=function(){document.addEventListener("click",this.handleClickDocument)},e.prototype.updated=function(){this.state.showDropdown&&!this.state.dropdownPos&&this.setState({dropdownPos:this.getBound()})},e.prototype.beforeDestroy=function(){document.removeEventListener("click",this.handleClickDocument)},e.prototype.render=function(){var t=this,n=this.state,i=n.showDropdown,a=n.dropdownPos,o=this.props,s=o.disabled,l=o.item,u=o.items,c=o.hideTooltip,f=u.filter(function(p){return!p.hidden}),d=f.length?null:{display:"none"},h=i?null:{display:"none"};return z(Fh||(Fh=$([`
408      <div class="`,'" style=',`>
409        <button
410          ref=`,`
411          type="button"
412          class=`,`
413          onClick=`,`
414          onMouseover=`,`
415          onMouseout=`,`
416          disabled=`,`
417        ></button>
418        <div
419          class="`,`"
420          style=`,`
421          ref=`,`
422        >
423          `,`
424        </div>
425      </div>
426    `],[`
427      <div class="`,'" style=',`>
428        <button
429          ref=`,`
430          type="button"
431          class=`,`
432          onClick=`,`
433          onMouseover=`,`
434          onMouseout=`,`
435          disabled=`,`
436        ></button>
437        <div
438          class="`,`"
439          style=`,`
440          ref=`,`
441        >
442          `,`
443        </div>
444      </div>
445    `])),A("toolbar-group"),d,function(p){return t.refs.el=p},l.className,function(){return t.setState({showDropdown:!0})},this.showTooltip,c,s,A("dropdown-toolbar"),b(b({},h),a),function(p){return t.refs.dropdownEl=p},f.length?f.map(function(p,v){var m;return z(Hh||(Hh=$([`
446                  <`,`
447                    group=`,`
448                    hiddenDivider=`,`
449                    ...`,`
450                  />
451                `],[`
452                  <`,`
453                    group=`,`
454                    hiddenDivider=`,`
455                    ...`,`
456                  />
457                `])),Uv,p,v===f.length-1||((m=f[v+1])===null||m===void 0?void 0:m.hidden),t.props)}):null)},e})(Se),Tse=Ll(Cse),Hh,Fh,xse=50,Ese=(function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.toggleTab=function(i,a){var o=n.props.eventEmitter;if(n.state.activeTab!==a){var s=a==="write"?"changePreviewTabWrite":"changePreviewTabPreview";o.emit(s),n.setState({activeTab:a})}},n.setItemWidth=function(i,a){n.itemWidthMap[i]=a},n.setPopupInfo=function(i){n.setState({showPopup:!0,popupInfo:i})},n.openPopup=function(i,a){a===void 0&&(a={});var o=n.refs.el.querySelector("."+A("toolbar-group")+" ."+i);if(o){var s=up(o,st(o,"."+A("toolbar"))),l=s.offsetLeft,u=s.offsetTop,c=Ol(i,{el:o,pos:{left:l,top:o.offsetHeight+u},initialValues:a});c&&n.setPopupInfo(c)}},n.hidePopup=function(){n.state.showPopup&&n.setState({showPopup:!1})},n.execCommand=function(i,a){var o=n.props.eventEmitter;o.emit("command",i,a),n.hidePopup()},n.tabs=[{name:"write",text:"Write"},{name:"preview",text:"Preview"}],n.itemWidthMap={},n.initialItems=dse(t.toolbarItems||[],n.hiddenScrollSync()),n.state={items:n.initialItems,dropdownItems:[],showPopup:!1,popupInfo:{},activeTab:"write"},n.tooltipRef={current:null},n.resizeObserver=new tse(function(){return n.handleResize()}),n.addEvent(),n}return e.prototype.insertToolbarItem=function(t,n){var i=t.groupIndex,a=t.itemIndex,o=this.initialItems[i];n=Ys(n),o?o.splice(a,0,n):this.initialItems.push([n]),this.setState(this.classifyToolbarItems())},e.prototype.removeToolbarItem=function(t){var n=this;Qr(this.initialItems,function(i){var a=!1;return Qr(i,function(o,s){return o.name===t?(a=!0,i.splice(s,1),n.setState(n.classifyToolbarItems()),!1):!0}),!a})},e.prototype.addEvent=function(){var t=this,n=this.props.eventEmitter;this.handleResize=Hoe(function(){t.setState({items:t.initialItems,dropdownItems:[]}),t.setState(t.classifyToolbarItems())},200),n.listen("openPopup",this.openPopup)},e.prototype.appendTooltipToRoot=function(){var t='<div class="'+A("tooltip")+`" style="display:none">
458        <div class="arrow"></div>
459        <span class="text"></span>
460      </div>`;this.tooltipRef.current=lp(t,this.refs.el)},e.prototype.hiddenScrollSync=function(){return this.props.editorType==="wysiwyg"||this.props.previewStyle==="tab"},e.prototype.movePrevItemToDropdownToolbar=function(t,n,i,a){var o=function(l){var u=l.pop();u&&a.push(u)};if(t>1)o(i);else{var s=Ee(n);s&&o(s)}},e.prototype.classifyToolbarItems=function(){var t=this,n=0,i=this.refs.el.clientWidth,a=this.refs.el.querySelector("."+A("toolbar-divider")),o=a?cl(a):0,s=[],l=[],u=!1;return this.initialItems.forEach(function(c,f){var d=[],h=[];c.forEach(function(p,v){p.hidden||(n+=t.itemWidthMap[p.name],n>i-xse?(u||(t.movePrevItemToDropdownToolbar(v,s,d,h),u=!0),h.push(p)):d.push(p))}),d.length&&(ha(d),s.push(d)),h.length&&(ha(h),l.push(h)),f<t.state.items.length-1&&(n+=o)}),{items:s,dropdownItems:l}},e.prototype.mounted=function(){this.props.previewStyle==="tab"&&this.props.eventEmitter.emit("changePreviewTabWrite",!0),this.setState(this.classifyToolbarItems()),this.appendTooltipToRoot(),this.resizeObserver.observe(this.refs.el)},e.prototype.updated=function(t){var n=this.props,i=n.editorType,a=n.previewStyle,o=n.eventEmitter,s=a!==t.previewStyle,l=i!==t.editorType;if(s||l){hse(this.initialItems,this.hiddenScrollSync());var u=this.classifyToolbarItems();(s||a==="tab"&&i==="markdown")&&(o.emit("changePreviewTabWrite"),u.activeTab="write"),this.setState(u)}},e.prototype.beforeDestroy=function(){window.removeEventListener("resize",this.handleResize),this.resizeObserver.disconnect(),mr(this.tooltipRef.current)},e.prototype.render=function(){var t=this,n=this.props,i=n.previewStyle,a=n.eventEmitter,o=n.editorType,s=this.state,l=s.popupInfo,u=s.showPopup,c=s.activeTab,f=s.items,d=s.dropdownItems,h={eventEmitter:a,tooltipRef:this.tooltipRef,disabled:o==="markdown"&&i==="tab"&&c==="preview",execCommand:this.execCommand,setPopupInfo:this.setPopupInfo},p=i==="tab"?{borderTopLeftRadius:0}:null;return z(_h||(_h=$([`
461      <div class="`,`">
462        <div
463          class="`,`"
464          style="display: `,`"
465        >
466          <`," tabs="," activeTab="," onClick=",` />
467        </div>
468        <div
469          class="`,`"
470          ref=`,`
471          style=`,`
472        >
473          `,`
474          <`,`
475            item=`,`
476            items=`,`
477            ...`,`
478          />
479        </div>
480        <`,`
481          info=`,`
482          show=`,`
483          eventEmitter=`,`
484          hidePopup=`,`
485          execCommand=`,`
486        />
487      </div>
488    `],[`
489      <div class="`,`">
490        <div
491          class="`,`"
492          style="display: `,`"
493        >
494          <`," tabs="," activeTab="," onClick=",` />
495        </div>
496        <div
497          class="`,`"
498          ref=`,`
499          style=`,`
500        >
501          `,`
502          <`,`
503            item=`,`
504            items=`,`
505            ...`,`
506          />
507        </div>
508        <`,`
509          info=`,`
510          show=`,`
511          eventEmitter=`,`
512          hidePopup=`,`
513          execCommand=`,`
514        />
515      </div>
516    `])),A("toolbar"),A("md-tab-container"),o==="wysiwyg"||i==="vertical"?"none":"block",Vv,this.tabs,c,this.toggleTab,A("defaultUI-toolbar"),function(v){return t.refs.el=v},p,f.map(function(v,m){var g;return z(qh||(qh=$([`
517              <`,`
518                group=`,`
519                hiddenDivider=`,`
520                setItemWidth=`,`
521                ...`,`
522              />
523            `],[`
524              <`,`
525                group=`,`
526                hiddenDivider=`,`
527                setItemWidth=`,`
528                ...`,`
529              />
530            `])),Uv,v,m===f.length-1||((g=f[m+1])===null||g===void 0?void 0:g.hidden),t.setItemWidth,h)}),Tse,Ys("more"),d,h,vse,l,u,a,this.hidePopup,this.execCommand)},e})(Se),qh,_h,Sse=(function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.handleClickDocument=function(i){st(i.target,"."+A("context-menu"))||n.setState({pos:null})},n.state={pos:null,menuGroups:[]},n.addEvent(),n}return e.prototype.addEvent=function(){var t=this;this.props.eventEmitter.listen("contextmenu",function(n){var i=n.pos,a=n.menuGroups;t.setState({pos:i,menuGroups:a})})},e.prototype.mounted=function(){document.addEventListener("click",this.handleClickDocument)},e.prototype.beforeDestroy=function(){document.removeEventListener("click",this.handleClickDocument)},e.prototype.getMenuGroupElements=function(){var t=this,n=this.state,i=n.pos,a=n.menuGroups;return i?a.reduce(function(o,s){var l=[];
vendor: 5,090 bytes, lines 530-640
530return s.forEach(function(u){var c=u.label,f=u.className,d=f===void 0?!1:f,h=u.disabled,p=u.onClick,v=function(){h||(p(),t.setState({pos:null}))};l.push(z($h||($h=$([`
531                <li
532                  onClick=`,`
533                  class="menu-item`,`"
534                  aria-role="menuitem"
535                >
536                  <span class="`,'">',`</span>
537                </li>
538              `],[`
539                <li
540                  onClick=`,`
541                  class="menu-item`,`"
542                  aria-role="menuitem"
543                >
544                  <span class="`,'">',`</span>
545                </li>
546              `])),v,h?" disabled":"",d,c))}),o.push(z(zh||(zh=$([`<ul class="menu-group">
547              `,`
548            </ul>`],[`<ul class="menu-group">
549              `,`
550            </ul>`])),l)),o},[]):[]},e.prototype.render=function(){var t=b({display:this.state.pos?"block":"none"},this.state.pos);return z(Vh||(Vh=$(['<div class="','" style=',` aria-role="menu">
551      `,`
552    </div>`],['<div class="','" style=',` aria-role="menu">
553      `,`
554    </div>`])),A("context-menu"),t,this.getMenuGroupElements())},e})(Se),$h,zh,Vh,Mse=(function(r){O(e,r);function e(t){var n=r.call(this,t)||this;n.changeMode=function(o){o!==n.state.editorType&&n.setState({editorType:o})},n.changePreviewStyle=function(o){o!==n.state.previewStyle&&n.setState({previewStyle:o})},n.hide=function(){n.setState({hide:!0})},n.show=function(){n.setState({hide:!1})};var i=t.editorType,a=t.previewStyle;return n.state={editorType:i,previewStyle:a,hide:!1},n.addEvent(),n}return e.prototype.mounted=function(){var t=this.props.slots,n=t.wwEditor,i=t.mdEditor,a=t.mdPreview;this.refs.wwContainer.appendChild(n),this.refs.mdContainer.insertAdjacentElement("afterbegin",i),this.refs.mdContainer.appendChild(a)},e.prototype.insertToolbarItem=function(t,n){this.toolbar.insertToolbarItem(t,n)},e.prototype.removeToolbarItem=function(t){this.toolbar.removeToolbarItem(t)},e.prototype.render=function(){var t=this,n=this.props,i=n.eventEmitter,a=n.hideModeSwitch,o=n.toolbarItems,s=n.theme,l=this.state,u=l.hide,c=l.previewStyle,f=l.editorType,d=u?" hidden":"",h=A(f==="markdown"?"md-mode":"ww-mode"),p=A("md")+"-"+c+"-style",v=A([s!=="light",s+" "]);return z(Wh||(Wh=$([`
555      <div
556        class="`,"","",`"
557        ref=`,`
558      >
559        <`,`
560          ref=`,`
561          eventEmitter=`,`
562          previewStyle=`,`
563          toolbarItems=`,`
564          editorType=`,`
565        />
566        <div
567          class="`," ",`"
568          ref=`,`
569        >
570          <div class="`,`">
571            <div
572              class="`," ",`"
573              ref=`,`
574            >
575              <div class="`,`"></div>
576            </div>
577            <div
578              class="`,`"
579              ref=`,`
580            />
581          </div>
582        </div>
583        `,`
584        <`," eventEmitter=",` />
585      </div>
586    `],[`
587      <div
588        class="`,"","",`"
589        ref=`,`
590      >
591        <`,`
592          ref=`,`
593          eventEmitter=`,`
594          previewStyle=`,`
595          toolbarItems=`,`
596          editorType=`,`
597        />
598        <div
599          class="`," ",`"
600          ref=`,`
601        >
602          <div class="`,`">
603            <div
604              class="`," ",`"
605              ref=`,`
606            >
607              <div class="`,`"></div>
608            </div>
609            <div
610              class="`,`"
611              ref=`,`
612            />
613          </div>
614        </div>
615        `,`
616        <`," eventEmitter=",` />
617      </div>
618    `])),v,A("defaultUI"),d,function(m){return t.refs.el=m},Ese,function(m){return t.toolbar=m},i,c,o,f,A("main"),h,function(m){return t.refs.editorSection=m},A("main-container"),A("md-container"),p,function(m){return t.refs.mdContainer=m},A("md-splitter"),A("ww-container"),function(m){return t.refs.wwContainer=m},!a&&z(Uh||(Uh=$(["<"," eventEmitter="," editorType="," />"],["<"," eventEmitter="," editorType="," />"])),Doe,i,f),Sse,i)},e.prototype.addEvent=function(){var t=this.props.eventEmitter;t.listen("hide",this.hide),t.listen("show",this.show),t.listen("changeMode",this.changeMode),t.listen("changePreviewStyle",this.changePreviewStyle)},e})(Se),Uh,Wh,Wv=(function(r){O(e,r);function e(t){var n,i=r.call(this,t)||this,a,o=Noe(i.options.el,z(jh||(jh=$([`
619        <`,`
620          ref=`,`
621          eventEmitter=`,`
622          slots=`,`
623          hideModeSwitch=`,`
624          toolbarItems=`,`
625          previewStyle=`,`
626          editorType=`,`
627          theme=`,`
628        />
629      `],[`
630        <`,`
631          ref=`,`
632          eventEmitter=`,`
633          slots=`,`
634          hideModeSwitch=`,`
635          toolbarItems=`,`
636          previewStyle=`,`
637          editorType=`,`
638          theme=`,`
639        />
640      `])),Mse,function(s){return a=s},i.eventEmitter,i.getEditorElements(),i.options.hideModeSwitch,i.options.toolbarItems,i.options.previewStyle,i.options.initialEditType,i.options.theme));return i.setMinHeight(i.options.minHeight),i.setHeight(i.options.height),i.defaultUI={insertToolbarItem:a.insertToolbarItem.bind(a),removeToolbarItem:a.removeToolbarItem.bind(a),destroy:o}
640,(n=i.pluginInfo.toolbarItems)===null||n===void 0||n.forEach(function(s){var l=s.groupIndex,u=s.itemIndex,c=s.item;i.defaultUI.insertToolbarItem({groupIndex:l,itemIndex:u},c)}),i.eventEmitter.emit("loadUI",i),i}return e.factory=function(t){return t.viewer?new Dv(t):new e(t)},e.prototype.insertToolbarItem=function(t,n){this.defaultUI.insertToolbarItem(t,n)},e.prototype.removeToolbarItem=function(t){this.defaultUI.removeToolbarItem(t)},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.defaultUI.destroy()},e})(Rv),jh;Rv.setLanguage(["en","en-US"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Write",Preview:"Preview",Headings:"Headings",Paragraph:"Paragraph",Bold:"Bold",Italic:"Italic",Strike:"Strike",Code:"Inline code",Line:"Line",Blockquote:"Blockquote","Unordered list":"Unordered list","Ordered list":"Ordered list",Task:"Task",Indent:"Indent",Outdent:"Outdent","Insert link":"Insert link","Insert CodeBlock":"Insert codeBlock","Insert table":"Insert table","Insert image":"Insert image",Heading:"Heading","Image URL":"Image URL","Select image file":"Select image file","Choose a file":"Choose a file","No file":"No file",Description:"Description",OK:"OK",More:"More",Cancel:"Cancel",File:"File",URL:"URL","Link text":"Link text","Add row to up":"Add row to up","Add row to down":"Add row to down","Add column to left":"Add column to left","Add column to right":"Add column to right","Remove row":"Remove row","Remove column":"Remove column","Align column to left":"Align column to left","Align column to center":"Align column to center","Align column to right":"Align column to right","Remove table":"Remove table","Would you like to paste as table?":"Would you like to paste as table?","Text color":"Text color","Auto scroll enabled":"Auto scroll enabled","Auto scroll disabled":"Auto scroll disabled","Choose language":"Choose language"});var Ose=["editorEl"];function Lse(r,e){if(r&1&&(Wa(0,"div",2),ou(1),ja()),r&2){let t=ru();Ua(),su("",t.characterCount,"/",t.maxLength())}}function Ase(){if(typeof document>"u"||document.getElementById("toastui-editor-css"))return;let r=document.createElement("link");r.id="toastui-editor-css",r.rel="stylesheet",r.href="https://uicdn.toast.com/editor/latest/toastui-editor.min.css",document.head.appendChild(r);let e=document.createElement("link");e.id="toastui-editor-dark-css",e.rel="stylesheet",e.href="https://uicdn.toast.com/editor/latest/theme/toastui-editor-dark.min.css",document.head.appendChild(e)}var Dle=(()=>{class r{constructor(){this.placeholder=Xn(""),this.minHeight=Xn(200),this.maxLength=Xn(void 0),this.valueChange=uu(),this.platformId=za(Ql),this.themeService=za(fu),this.isBrowser=cu(this.platformId),this.editor=null,this._value="",this.characterCount=0,this.onChange=()=>{},this.onTouched=()=>{},this.disabled=!1,Va(()=>{if(this.editor&&this.isBrowser){let t=this.minHeight(),n=this.editorEl.nativeElement.querySelector(".toastui-editor-defaultUI");n&&n.style.setProperty("--editor-min-height",`${t}px`)}}),Va(()=>{let t=this.themeService.isDark();this.editor&&this.isBrowser&&this.applyTheme(t)})}ngAfterViewInit(){if(!this.isBrowser)return;Ase();let t=this.themeService.isDark();this.editor=new Wv({el:this.editorEl.nativeElement,height:`${this.minHeight()}px`,initialEditType:"markdown",previewStyle:"tab",placeholder:this.placeholder(),hideModeSwitch:!0,theme:t?"dark":"default",toolbarItems:[["heading","bold","italic"],["ul","ol"],["link"],["code","codeblock"]],usageStatistics:!1,events:{change:()=>{let n=this.editor.getMarkdown();this._value=n,this.updateCharCount(),this.onChange(n),this.valueChange.emit(n)},blur:()=>{this.onTouched()}}}),this._value&&(this.editor.setMarkdown(this._value),this.updateCharCount())}ngOnDestroy(){this.editor&&(this.editor.destroy(),this.editor=null)}applyTheme(t){let n=this.editorEl.nativeElement.querySelector(".toastui-editor-defaultUI");n&&(t?n.classList.add("toastui-editor-dark"):n.classList.remove("toastui-editor-dark"))}updateCharCount(){this.characterCount=this._value.length}writeValue(t){this._value=t||"",this.editor&&(this.editor.setMarkdown(this._value),this.updateCharCount())}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){if(this.disabled=t,this.editor&&this.editorEl){let n=this.editorEl.n
640ativeElement.querySelector(".toastui-editor-defaultUI");n&&(n.style.pointerEvents=t?"none":"auto",n.style.opacity=t?"0.5":"1")}}static{this.\u0275fac=function(n){return new(n||r)}}static{this.\u0275cmp=Yl({type:r,selectors:[["app-markdown-editor"]],viewQuery:function(n,i){if(n&1&&nu(Ose,7),n&2){let a;iu(a=au())&&(i.editorEl=a.first)}},inputs:{placeholder:[1,"placeholder"],minHeight:[1,"minHeight"],maxLength:[1,"maxLength"]},outputs:{valueChange:"valueChange"},features:[lu([{provide:du,useExisting:Xl(()=>r),multi:!0}])],decls:4,vars:1,consts:[["editorEl",""],[1,"markdown-editor-wrapper"],[1,"char-count"]],template:function(n,i){n&1&&(Wa(0,"div",1),tu(1,"div",null,0),Zl(3,Lse,2,2,"div",2),ja()),n&2&&(Ua(3),eu(i.maxLength()&&i.maxLength()>0?3:-1))},styles:[".markdown-editor-wrapper[_ngcontent-%COMP%]{position:relative}.char-count[_ngcontent-%COMP%]{position:absolute;bottom:10px;right:10px;font-size:.75rem;color:var(--muted-foreground);background:var(--background);padding:2px 6px;border-radius:4px;pointer-events:none;z-index:10}[_nghost-%COMP%]     .toastui-editor-defaultUI{border-radius:8px!important;overflow:hidden}[_nghost-%COMP%]     .toastui-editor-defaultUI-toolbar{border-top-left-radius:8px;border-top-right-radius:8px}"]})}}return r})();export{Dle as a};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.